This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: ICE outputting unaligned fp constant on powerpc-apple-darwin5.1
- From: David Edelsohn <dje at watson dot ibm dot com>
- To: Stuart Hastings <stuart at apple dot com>
- Cc: Stan Shebs <shebs at apple dot com>, gcc-patches at gcc dot gnu dot org
- Date: Sun, 09 Dec 2001 01:14:23 -0500
- Subject: Re: ICE outputting unaligned fp constant on powerpc-apple-darwin5.1
FP constants normally will end up with less than natural alignment
due to the ADJUST_FIELD_ALIGN, so maybe we should just use that macro as
the test.
However, I am almost positive that one can create a failure using
the GCC align/pack attribute extensions, so it seems that the earlier
alignment checking patch broke GCC's extension.
In general, this is the area of ABIs and GCC should not be
designating what is allowed and what is not allowed.
David
* varasm.c (assemble_real): Do not check alignment is
ADJUST_FIELD_ALIGN is present.
Index: varasm.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/varasm.c,v
retrieving revision 1.235
diff -c -p -r1.235 varasm.c
*** varasm.c 2001/12/05 22:52:05 1.235
--- varasm.c 2001/12/09 06:01:53
*************** assemble_real (d, mode, align)
*** 2138,2143 ****
--- 2138,2144 ----
args.d = &d;
args.mode = mode;
+ #ifndef ADJUST_FIELD_ALIGN
/* We cannot emit unaligned floating point constants. This is slightly
complicated in that we don't know what "unaligned" means exactly. */
#ifdef BIGGEST_FIELD_ALIGNMENT
*************** assemble_real (d, mode, align)
*** 2147,2152 ****
--- 2148,2154 ----
#endif
if (align < GET_MODE_ALIGNMENT (mode))
abort ();
+ #endif
if (do_float_handler (assemble_real_1, (PTR) &args))
return;