This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug lto/49302] [4.7 Regression] FAIL: gcc.dg/lto/20110201-1 c_lto_20110201-1_0.o-c_lto_20110201-1_0.o
- From: "wschmidt at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 7 Jun 2011 20:25:25 +0000
- Subject: [Bug lto/49302] [4.7 Regression] FAIL: gcc.dg/lto/20110201-1 c_lto_20110201-1_0.o-c_lto_20110201-1_0.o
- Auto-submitted: auto-generated
- References: <bug-49302-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49302
--- Comment #8 from William J. Schmidt <wschmidt at gcc dot gnu.org> 2011-06-07 20:25:20 UTC ---
Because the compile uses -O0 and the link uses -O2 -ffast-math, we have a
mismatch of expectations. With -O0 and no -ffast-math, builtin cabs isn't
folded into sqrt(pow+pow) during parsing. With -O2 -ffast-math, we expect all
pow's to have been exposed before cse_sincos, but the folding doesn't have a
chance to occur until PRE.
It seems odd to use a -O0 compile when we're going to force a -O2 link, but
assuming that's WAD, then I agree with adding a cabs fold in cse_sincos. I can
work on that.
I assume we don't want to mirror the other folds from
builtins.c:fold_builtin_cabs, as this is just a matter of ensuring things
compile correctly with -O0 -lto.