* [Bug lto/49302] [4.7 Regression] FAIL: gcc.dg/lto/20110201-1 c_lto_20110201-1_0.o-c_lto_20110201-1_0.o
2011-06-06 17:40 [Bug lto/49302] New: [4.7 Regression] FAIL: gcc.dg/lto/20110201-1 c_lto_20110201-1_0.o-c_lto_20110201-1_0.o hjl.tools at gmail dot com
@ 2011-06-07 4:14 ` hjl.tools at gmail dot com
2011-06-07 11:52 ` wschmidt at gcc dot gnu.org
` (12 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: hjl.tools at gmail dot com @ 2011-06-07 4:14 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49302
H.J. Lu <hjl.tools at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |wschmidt at gcc dot gnu.org
--- Comment #1 from H.J. Lu <hjl.tools at gmail dot com> 2011-06-07 04:13:48 UTC ---
It is caused by revision 174701:
http://gcc.gnu.org/ml/gcc-cvs/2011-06/msg00189.html
I got
Executing on host: /export/regression/rrs/174701/bld/gcc/xgcc
-B/export/regression/rrs/174701/bld/gcc/ c_lto_20110201-1_0.o -O0 -flto -O2
-ffast-math -fuse-linker-plugin -m32 -o gcc-dg-lto-20110201-1-01
(timeout = 300)
spawn -ignore SIGHUP /export/regression/rrs/174701/bld/gcc/xgcc
-B/export/regression/rrs/174701/bld/gcc/ c_lto_20110201-1_0.o -O0 -flto -O2
-ffast-math -fuse-linker-plugin -m32 -o gcc-dg-lto-20110201-1-01^M
/tmp/cc5ZLSPu.ltrans0.ltrans.o: In function `foo':^M
cc5ZLSPu.ltrans0.o:(.text+0x45): undefined reference to `pow'^M
cc5ZLSPu.ltrans0.o:(.text+0x5d): undefined reference to `pow'^M
collect2: error: ld returned 1 exit status^M
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug lto/49302] [4.7 Regression] FAIL: gcc.dg/lto/20110201-1 c_lto_20110201-1_0.o-c_lto_20110201-1_0.o
2011-06-06 17:40 [Bug lto/49302] New: [4.7 Regression] FAIL: gcc.dg/lto/20110201-1 c_lto_20110201-1_0.o-c_lto_20110201-1_0.o hjl.tools at gmail dot com
2011-06-07 4:14 ` [Bug lto/49302] " hjl.tools at gmail dot com
@ 2011-06-07 11:52 ` wschmidt at gcc dot gnu.org
2011-06-07 12:09 ` wschmidt at gcc dot gnu.org
` (11 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: wschmidt at gcc dot gnu.org @ 2011-06-07 11:52 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49302
--- Comment #2 from William J. Schmidt <wschmidt at gcc dot gnu.org> 2011-06-07 11:51:56 UTC ---
I'll have a look. With -ffast-math, cabs is converted to
sqrt(pow(rpart,2.0),pow(ipart,2.0)). Not sure yet why the pow calls aren't
converted back to x*x form. We may have to restore just that transformation to
the expander for builtin pow. Will dig deeper today.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug lto/49302] [4.7 Regression] FAIL: gcc.dg/lto/20110201-1 c_lto_20110201-1_0.o-c_lto_20110201-1_0.o
2011-06-06 17:40 [Bug lto/49302] New: [4.7 Regression] FAIL: gcc.dg/lto/20110201-1 c_lto_20110201-1_0.o-c_lto_20110201-1_0.o hjl.tools at gmail dot com
2011-06-07 4:14 ` [Bug lto/49302] " hjl.tools at gmail dot com
2011-06-07 11:52 ` wschmidt at gcc dot gnu.org
@ 2011-06-07 12:09 ` wschmidt at gcc dot gnu.org
2011-06-07 12:34 ` rguenth at gcc dot gnu.org
` (10 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: wschmidt at gcc dot gnu.org @ 2011-06-07 12:09 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49302
--- Comment #3 from William J. Schmidt <wschmidt at gcc dot gnu.org> 2011-06-07 12:08:17 UTC ---
(In reply to comment #2)
> I'll have a look. With -ffast-math, cabs is converted to
> sqrt(pow(rpart,2.0),pow(ipart,2.0)). Not sure yet why the pow calls aren't
> converted back to x*x form. We may have to restore just that transformation to
> the expander for builtin pow. Will dig deeper today.
Too early to be typing. Of course I meant sqrt(pow(rpart,2.0)+pow(ipart,2.0)).
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug lto/49302] [4.7 Regression] FAIL: gcc.dg/lto/20110201-1 c_lto_20110201-1_0.o-c_lto_20110201-1_0.o
2011-06-06 17:40 [Bug lto/49302] New: [4.7 Regression] FAIL: gcc.dg/lto/20110201-1 c_lto_20110201-1_0.o-c_lto_20110201-1_0.o hjl.tools at gmail dot com
` (2 preceding siblings ...)
2011-06-07 12:09 ` wschmidt at gcc dot gnu.org
@ 2011-06-07 12:34 ` rguenth at gcc dot gnu.org
2011-06-07 13:16 ` wschmidt at gcc dot gnu.org
` (9 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-06-07 12:34 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49302
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2011.06.07 12:34:08
Target Milestone|--- |4.7.0
Ever Confirmed|0 |1
--- Comment #4 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-06-07 12:34:08 UTC ---
Well, it fails at the -O0 (non-LTO) link. Hmm. The testcase is from PR47566.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug lto/49302] [4.7 Regression] FAIL: gcc.dg/lto/20110201-1 c_lto_20110201-1_0.o-c_lto_20110201-1_0.o
2011-06-06 17:40 [Bug lto/49302] New: [4.7 Regression] FAIL: gcc.dg/lto/20110201-1 c_lto_20110201-1_0.o-c_lto_20110201-1_0.o hjl.tools at gmail dot com
` (3 preceding siblings ...)
2011-06-07 12:34 ` rguenth at gcc dot gnu.org
@ 2011-06-07 13:16 ` wschmidt at gcc dot gnu.org
2011-06-07 13:24 ` wschmidt at gcc dot gnu.org
` (8 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: wschmidt at gcc dot gnu.org @ 2011-06-07 13:16 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49302
William J. Schmidt <wschmidt at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |bergner at gcc dot gnu.org
--- Comment #5 from William J. Schmidt <wschmidt at gcc dot gnu.org> 2011-06-07 13:16:12 UTC ---
(In reply to comment #4)
> Well, it fails at the -O0 (non-LTO) link. Hmm. The testcase is from PR47566.
OK. So the LTO writer assumed -O2 -ffast-math, causing the pow calls to be
generated, but at -O0 the gimple expand code for pow was skipped.
I _think_ that
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug lto/49302] [4.7 Regression] FAIL: gcc.dg/lto/20110201-1 c_lto_20110201-1_0.o-c_lto_20110201-1_0.o
2011-06-06 17:40 [Bug lto/49302] New: [4.7 Regression] FAIL: gcc.dg/lto/20110201-1 c_lto_20110201-1_0.o-c_lto_20110201-1_0.o hjl.tools at gmail dot com
` (4 preceding siblings ...)
2011-06-07 13:16 ` wschmidt at gcc dot gnu.org
@ 2011-06-07 13:24 ` wschmidt at gcc dot gnu.org
2011-06-07 13:48 ` rguenth at gcc dot gnu.org
` (7 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: wschmidt at gcc dot gnu.org @ 2011-06-07 13:24 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49302
--- Comment #6 from William J. Schmidt <wschmidt at gcc dot gnu.org> 2011-06-07 13:23:06 UTC ---
(In reply to comment #5)
Please ignore that. It leaked in when I was trying to CC somebody.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug lto/49302] [4.7 Regression] FAIL: gcc.dg/lto/20110201-1 c_lto_20110201-1_0.o-c_lto_20110201-1_0.o
2011-06-06 17:40 [Bug lto/49302] New: [4.7 Regression] FAIL: gcc.dg/lto/20110201-1 c_lto_20110201-1_0.o-c_lto_20110201-1_0.o hjl.tools at gmail dot com
` (5 preceding siblings ...)
2011-06-07 13:24 ` wschmidt at gcc dot gnu.org
@ 2011-06-07 13:48 ` rguenth at gcc dot gnu.org
2011-06-07 20:25 ` wschmidt at gcc dot gnu.org
` (6 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-06-07 13:48 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49302
--- Comment #7 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-06-07 13:47:00 UTC ---
The original failure only occured with -O0 compile and -O2 -ffast-math link.
The linker-plugin use was already a workaround for the -O0 link by collect2,
so not sure why that isn't working anymore. Thus, I guess this still needs
investigation.
I don't see the cabs -> sqrt (pow, pow) folding anymore. Ah, because it
happens from PRE which folds and inserts cabs into the predecessor. But
PRE runs after pass_sincos.
I think the cabs -> sqrt (pow, pow) folding should happen during
pass_sincos.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug lto/49302] [4.7 Regression] FAIL: gcc.dg/lto/20110201-1 c_lto_20110201-1_0.o-c_lto_20110201-1_0.o
2011-06-06 17:40 [Bug lto/49302] New: [4.7 Regression] FAIL: gcc.dg/lto/20110201-1 c_lto_20110201-1_0.o-c_lto_20110201-1_0.o hjl.tools at gmail dot com
` (6 preceding siblings ...)
2011-06-07 13:48 ` rguenth at gcc dot gnu.org
@ 2011-06-07 20:25 ` wschmidt at gcc dot gnu.org
2011-06-08 13:52 ` wschmidt at gcc dot gnu.org
` (5 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: wschmidt at gcc dot gnu.org @ 2011-06-07 20:25 UTC (permalink / raw)
To: gcc-bugs
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.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug lto/49302] [4.7 Regression] FAIL: gcc.dg/lto/20110201-1 c_lto_20110201-1_0.o-c_lto_20110201-1_0.o
2011-06-06 17:40 [Bug lto/49302] New: [4.7 Regression] FAIL: gcc.dg/lto/20110201-1 c_lto_20110201-1_0.o-c_lto_20110201-1_0.o hjl.tools at gmail dot com
` (7 preceding siblings ...)
2011-06-07 20:25 ` wschmidt at gcc dot gnu.org
@ 2011-06-08 13:52 ` wschmidt at gcc dot gnu.org
2011-06-08 17:07 ` wschmidt at gcc dot gnu.org
` (4 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: wschmidt at gcc dot gnu.org @ 2011-06-08 13:52 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49302
--- Comment #9 from William J. Schmidt <wschmidt at gcc dot gnu.org> 2011-06-08 13:51:34 UTC ---
Hm, this isn't going to work for all cases. When I reproduce the problem on
powerpc64-linux without forcing a hardware square root, I see:
spawn /home/wschmidt/gcc/build/gcc-mainline-pr49302/gcc/xgcc
-B/home/wschmidt/gcc/build/gcc-mainline-pr49302/gcc/ c_lto_20110201-1_0.o -O0
-flto -O2 -ffast-math -fuse-linker-plugin -m32 -o gcc-dg-lto-20110201-1-01
/tmp/cc1mUEPp.ltrans0.ltrans.o: In function `foo':
cc1mUEPp.ltrans0.o:(.text+0x5c): undefined reference to `pow'
cc1mUEPp.ltrans0.o:(.text+0x74): undefined reference to `sqrt'
collect2: error: ld returned 1 exit status
compiler exited with status 1
output is:
/tmp/cc1mUEPp.ltrans0.ltrans.o: In function `foo':
cc1mUEPp.ltrans0.o:(.text+0x5c): undefined reference to `pow'
cc1mUEPp.ltrans0.o:(.text+0x74): undefined reference to `sqrt'
collect2: error: ld returned 1 exit status
Expanding cabs to sqrt(r*r + i*i) will still leave an unresolved reference to
sqrt.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug lto/49302] [4.7 Regression] FAIL: gcc.dg/lto/20110201-1 c_lto_20110201-1_0.o-c_lto_20110201-1_0.o
2011-06-06 17:40 [Bug lto/49302] New: [4.7 Regression] FAIL: gcc.dg/lto/20110201-1 c_lto_20110201-1_0.o-c_lto_20110201-1_0.o hjl.tools at gmail dot com
` (8 preceding siblings ...)
2011-06-08 13:52 ` wschmidt at gcc dot gnu.org
@ 2011-06-08 17:07 ` wschmidt at gcc dot gnu.org
2011-06-10 15:29 ` wschmidt at gcc dot gnu.org
` (3 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: wschmidt at gcc dot gnu.org @ 2011-06-08 17:07 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49302
--- Comment #10 from William J. Schmidt <wschmidt at gcc dot gnu.org> 2011-06-08 17:07:42 UTC ---
Proposed fix: http://gcc.gnu.org/ml/gcc-patches/2011-06/msg00661.html
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug lto/49302] [4.7 Regression] FAIL: gcc.dg/lto/20110201-1 c_lto_20110201-1_0.o-c_lto_20110201-1_0.o
2011-06-06 17:40 [Bug lto/49302] New: [4.7 Regression] FAIL: gcc.dg/lto/20110201-1 c_lto_20110201-1_0.o-c_lto_20110201-1_0.o hjl.tools at gmail dot com
` (9 preceding siblings ...)
2011-06-08 17:07 ` wschmidt at gcc dot gnu.org
@ 2011-06-10 15:29 ` wschmidt at gcc dot gnu.org
2011-06-10 15:34 ` wschmidt at gcc dot gnu.org
` (2 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: wschmidt at gcc dot gnu.org @ 2011-06-10 15:29 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49302
--- Comment #11 from William J. Schmidt <wschmidt at gcc dot gnu.org> 2011-06-10 15:28:52 UTC ---
Author: wschmidt
Date: Fri Jun 10 15:28:46 2011
New Revision: 174912
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=174912
Log:
2011-06-10 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
PR lto/49302
* tree-ssa-math-opts.c (powi_as_mults): Minor cleanup.
(build_and_insert_call): Likewise.
(build_and_insert_ref): New.
(gimple_expand_builtin_pow): Minor cleanup.
(gimple_expand_builtin_cabs): New.
(execute_cse_sincos): Add case for BUILT_IN_CABS.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/tree-ssa-math-opts.c
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug lto/49302] [4.7 Regression] FAIL: gcc.dg/lto/20110201-1 c_lto_20110201-1_0.o-c_lto_20110201-1_0.o
2011-06-06 17:40 [Bug lto/49302] New: [4.7 Regression] FAIL: gcc.dg/lto/20110201-1 c_lto_20110201-1_0.o-c_lto_20110201-1_0.o hjl.tools at gmail dot com
` (10 preceding siblings ...)
2011-06-10 15:29 ` wschmidt at gcc dot gnu.org
@ 2011-06-10 15:34 ` wschmidt at gcc dot gnu.org
2011-06-15 17:42 ` meissner at gcc dot gnu.org
2011-06-15 17:45 ` wschmidt at gcc dot gnu.org
13 siblings, 0 replies; 15+ messages in thread
From: wschmidt at gcc dot gnu.org @ 2011-06-10 15:34 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49302
--- Comment #12 from William J. Schmidt <wschmidt at gcc dot gnu.org> 2011-06-10 15:33:53 UTC ---
Fixed.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug lto/49302] [4.7 Regression] FAIL: gcc.dg/lto/20110201-1 c_lto_20110201-1_0.o-c_lto_20110201-1_0.o
2011-06-06 17:40 [Bug lto/49302] New: [4.7 Regression] FAIL: gcc.dg/lto/20110201-1 c_lto_20110201-1_0.o-c_lto_20110201-1_0.o hjl.tools at gmail dot com
` (11 preceding siblings ...)
2011-06-10 15:34 ` wschmidt at gcc dot gnu.org
@ 2011-06-15 17:42 ` meissner at gcc dot gnu.org
2011-06-15 17:45 ` wschmidt at gcc dot gnu.org
13 siblings, 0 replies; 15+ messages in thread
From: meissner at gcc dot gnu.org @ 2011-06-15 17:42 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49302
Michael Meissner <meissner at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
CC| |meissner at gcc dot gnu.org
AssignedTo|unassigned at gcc dot |wschmidt at gcc dot gnu.org
|gnu.org |
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug lto/49302] [4.7 Regression] FAIL: gcc.dg/lto/20110201-1 c_lto_20110201-1_0.o-c_lto_20110201-1_0.o
2011-06-06 17:40 [Bug lto/49302] New: [4.7 Regression] FAIL: gcc.dg/lto/20110201-1 c_lto_20110201-1_0.o-c_lto_20110201-1_0.o hjl.tools at gmail dot com
` (12 preceding siblings ...)
2011-06-15 17:42 ` meissner at gcc dot gnu.org
@ 2011-06-15 17:45 ` wschmidt at gcc dot gnu.org
13 siblings, 0 replies; 15+ messages in thread
From: wschmidt at gcc dot gnu.org @ 2011-06-15 17:45 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49302
William J. Schmidt <wschmidt at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
--- Comment #13 from William J. Schmidt <wschmidt at gcc dot gnu.org> 2011-06-15 17:45:05 UTC ---
Fixed.
^ permalink raw reply [flat|nested] 15+ messages in thread