This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/29253] expand_abs wrong default code for floating point
- From: "bergner at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 4 Feb 2008 17:04:43 -0000
- Subject: [Bug middle-end/29253] expand_abs wrong default code for floating point
- References: <bug-29253-327@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #8 from bergner at gcc dot gnu dot org 2008-02-04 17:04 -------
Ok, I bootstrapped with revision 132091. The patched compiler ICE's on the
following test case:
typedef float TFtype __attribute__ ((mode (TF)));
TFtype
divtc3 (TFtype a, TFtype b)
{
if (__builtin_fabsl (a) < __builtin_fabsl (b))
{
return a;
}
return b;
}
Here's a backtrace from the non debug build:
Program received signal SIGSEGV, Segmentation fault.
0x105475d4 in commutative_operand_precedence (op=0x0)
at /home/bergner/gcc/PR29253/gcc-mainline-patched/gcc/rtlanal.c:2886
2886 enum rtx_code code = GET_CODE (op);
(gdb) bt
#0 0x105475d4 in commutative_operand_precedence (op=0x0)
at /home/bergner/gcc/PR29253/gcc-mainline-patched/gcc/rtlanal.c:2886
#1 0x105478b8 in swap_commutative_operands_p (x=0x0, y=0x0)
at /home/bergner/gcc/PR29253/gcc-mainline-patched/gcc/rtlanal.c:2951
#2 0x10212b1c in do_compare_rtx_and_jump (op0=0x0, op1=0x0, code=LT,
unsignedp=0, mode=TFmode, size=0x0,
if_false_label=0x0, if_true_label=0xf7f02b70)
at /home/bergner/gcc/PR29253/gcc-mainline-patched/gcc/dojump.c:837
#3 0x10213edc in do_compare_and_jump (exp=0xf7f022a0, signed_code=LT,
unsigned_code=LTU, if_false_label=0x0,
if_true_label=0xf7f02b70) at
/home/bergner/gcc/PR29253/gcc-mainline-patched/gcc/dojump.c:1014
#4 0x1020f4cc in do_jump (exp=0xf7f022a0, if_false_label=0x0,
if_true_label=0xf7f02b70)
at /home/bergner/gcc/PR29253/gcc-mainline-patched/gcc/dojump.c:396
#5 0x1020c138 in jumpif (exp=0xf7f022a0, label=0xf7f02b70)
at /home/bergner/gcc/PR29253/gcc-mainline-patched/gcc/dojump.c:109
#6 0x10b42a44 in expand_gimple_cond_expr (bb=0xf7f0f6c0, stmt=0xf7f02300)
at /home/bergner/gcc/PR29253/gcc-mainline-patched/gcc/cfgexpand.c:1315
#7 0x10b43c44 in expand_gimple_basic_block (bb=0xf7f0f6c0)
at /home/bergner/gcc/PR29253/gcc-mainline-patched/gcc/cfgexpand.c:1578
#8 0x10b45dc0 in tree_expand_cfg () at
/home/bergner/gcc/PR29253/gcc-mainline-patched/gcc/cfgexpand.c:1921
[snip]
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29253