This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[patch] -m128bit-long-double asserts
- From: Stuart Hastings <stuart at apple dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Tue, 15 Mar 2005 14:01:30 -0800
- Subject: [patch] -m128bit-long-double asserts
This testcase turns on -m128-bit-long-double,
------------------------------------------------------------------------
---------------------------
/* Extracted from libgcc2.c(mulxc3). */
/* { dg-do compile { target i?86-*-* } } */
/* { dg-options "-m128bit-long-double" } */
typedef float XFtype __attribute__ ((mode (XF)));
typedef _Complex float XCtype __attribute__ ((mode (XC)));
XCtype
mulxc3 (XFtype a)
{
a = __builtin_copysignl (__builtin_expect (a,0), a);
return a + 1i * a;
}
------------------------------------------------------------------------
---------------------------
...and it trips an assert in rtlanal.c. The 'simple fix' is to remove
the assert:
------------------------------------------------------------------------
---------------------------
Index: gcc.fsf.fixed/gcc/rtlanal.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/rtlanal.c,v
retrieving revision 1.211
diff -c -3 -p -r1.211 rtlanal.c
*** gcc.fsf.fixed/gcc/rtlanal.c 24 Jan 2005 08:55:39 -0000 1.211
--- gcc.fsf.fixed/gcc/rtlanal.c 15 Mar 2005 19:51:46 -0000
*************** subreg_offset_representable_p (unsigned
*** 3119,3125 ****
nregs_multiple = nregs_xmode / nregs_ymode;
gcc_assert ((offset % GET_MODE_SIZE (ymode)) == 0);
- gcc_assert ((mode_multiple % nregs_multiple) == 0);
return (!(y_offset % (mode_multiple / nregs_multiple)));
}
--- 3119,3124 ----
------------------------------------------------------------------------
---------------------------
Boostrapped & DejaGnu on Linux/x86, no regressions. Testcase works.
2005-03-15 Stuart Hastings <stuart@apple.com>
* rtlanal.c (subreg_offset_representable_p): Delete overzealous
assertion.
* gcc.c-torture/compile/20050309-1.c: New testcase for above.
If this isn't the correct fix (I haven't looked at this long enough to
know), I'd be happy to create a Bugzilla for this.
O.K. to commit to mainline? I'd guess the testcase would become
gcc.c-torture/compile/<todays_date>-1.c or similar.
stuart hastings
Apple Computer