This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/43305] [4.4/4.5 Regression] ICE: in emit_unop_insn, at optabs.c:3838 with -Os -ffast-math and ilogbl()
- From: "zsojka at seznam dot cz" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 9 Mar 2010 15:19:07 -0000
- Subject: [Bug target/43305] [4.4/4.5 Regression] ICE: in emit_unop_insn, at optabs.c:3838 with -Os -ffast-math and ilogbl()
- References: <bug-43305-14164@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from zsojka at seznam dot cz 2010-03-09 15:19 -------
I don't have 4.3 (or older) builds with enabled checking available. But without
checking, the code below prints "0.000000" for 4.4/4.5 and "6.000000" for 4.3
and older (4.2.4, 4.1.2, 3.3.6, 3.4.6).
Command line:
gcc -Os -ffast-math main.c -lm && ./a.out
------- main.c ------
extern int ilogbl(long double);
extern int printf(const char *format, ...);
__attribute__((noinline, noclone))
int foo(long double x) { return ilogbl(x); }
int main() { printf("%f\n", (float)foo(100)); }
---------------------
In 4.4/4.5 without checking, foo() is reduced to:
xorl %eax, %eax
ret
while in 4.3/4.2/4.1, it is:
jmp ilogbl
--
zsojka at seznam dot cz changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |ice-checking, ice-on-valid-
| |code, wrong-code
Summary|ICE: in emit_unop_insn, at |[4.4/4.5 Regression] ICE: in
|optabs.c:3838 with -Os - |emit_unop_insn, at
|ffast-math and ilogbl() |optabs.c:3838 with -Os -
| |ffast-math and ilogbl()
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43305