Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libc/gdtoa add may alias attribute to the double union b...



details:   https://anonhg.NetBSD.org/src/rev/f160f4b6a63a
branches:  trunk
changeset: 761246:f160f4b6a63a
user:      christos <christos%NetBSD.org@localhost>
date:      Fri Jan 21 23:36:49 2011 +0000

description:
add may alias attribute to the double union because gcc-4.5.x produces
incorrect code on ARMv7a. From Nikunj Badjatya and Amol Pise.

diffstat:

 lib/libc/gdtoa/gdtoaimp.h |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (18 lines):

diff -r 9fe85457ba48 -r f160f4b6a63a lib/libc/gdtoa/gdtoaimp.h
--- a/lib/libc/gdtoa/gdtoaimp.h Fri Jan 21 23:30:31 2011 +0000
+++ b/lib/libc/gdtoa/gdtoaimp.h Fri Jan 21 23:36:49 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: gdtoaimp.h,v 1.7 2009/05/07 20:31:44 christos Exp $ */
+/* $NetBSD: gdtoaimp.h,v 1.8 2011/01/21 23:36:49 christos Exp $ */
 
 /****************************************************************
 
@@ -276,7 +276,7 @@
 Exactly one of IEEE_LITTLE_ENDIAN, IEEE_BIG_ENDIAN, VAX, or IBM should be defined.
 #endif
 
-typedef union { double d; ULong L[2]; } U;
+typedef union { double d; ULong L[2]; } __attribute__((__may_alias__)) U;
 
 #ifdef YES_ALIAS
 #define dval(x) x



Home | Main Index | Thread Index | Old Index