public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/39643] New: [4.5 Regression]: cris-elf gcc.dg/torture/builtin-math-3.c -O1 and -Os sincos one
@ 2009-04-04 22:59 hp at gcc dot gnu dot org
2009-04-05 18:07 ` [Bug tree-optimization/39643] " rguenther at suse dot de
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: hp at gcc dot gnu dot org @ 2009-04-04 22:59 UTC (permalink / raw)
To: gcc-bugs
With revision 145488 this test passed.
>From revision 145495 and on, this test has failed as follows:
...
Running /tmp/hpautotest-gcc1/gcc/gcc/testsuite/gcc.dg/torture/dg-torture.exp
...
FAIL: gcc.dg/torture/builtin-math-3.c -O1 (test for excess errors)
FAIL: gcc.dg/torture/builtin-math-3.c -Os (test for excess errors)
...
With the message in gcc.log being:
builtin-math-3.c:(.text+0x88): undefined reference to `_link_error'
builtin-math-3.c:(.text+0xfe): undefined reference to `_link_error'
builtin-math-3.c:(.text+0x174): undefined reference to `_link_error'
builtin-math-3.c:(.text+0x1aa): undefined reference to `_link_error'
builtin-math-3.c:(.text+0x220): undefined reference to `_link_error'
/tmp/ccKBGOIU.o:builtin-math-3.c:(.text+0x296): more undefined references to
`_link_error' follow
The lack of line-numbers is of course unhelpful, but with "-g" added, the link
error becomes, for both -O1 and -Os:
builtin-math-3.o: In function `main':
/tmp/hpautotest-gcc1/gcc/gcc/testsuite/gcc.dg/torture/builtin-math-3.c:176:
undefined reference to `_link_error'
/tmp/hpautotest-gcc1/gcc/gcc/testsuite/gcc.dg/torture/builtin-math-3.c:176:
undefined reference to `_link_error'
/tmp/hpautotest-gcc1/gcc/gcc/testsuite/gcc.dg/torture/builtin-math-3.c:177:
undefined reference to `_link_error'
/tmp/hpautotest-gcc1/gcc/gcc/testsuite/gcc.dg/torture/builtin-math-3.c:177:
undefined reference to `_link_error'
Author of patches in suspect revision range CC:ed.
--
Summary: [4.5 Regression]: cris-elf gcc.dg/torture/builtin-math-
3.c -O1 and -Os sincos one
Product: gcc
Version: 4.5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: hp at gcc dot gnu dot org
GCC host triplet: x86_64-unknown-linux-gnu
GCC target triplet: cris-axis-elf
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39643
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/39643] [4.5 Regression]: cris-elf gcc.dg/torture/builtin-math-3.c -O1 and -Os sincos one
2009-04-04 22:59 [Bug tree-optimization/39643] New: [4.5 Regression]: cris-elf gcc.dg/torture/builtin-math-3.c -O1 and -Os sincos one hp at gcc dot gnu dot org
@ 2009-04-05 18:07 ` rguenther at suse dot de
2009-04-05 22:00 ` hp at gcc dot gnu dot org
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: rguenther at suse dot de @ 2009-04-05 18:07 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from rguenther at suse dot de 2009-04-05 18:07 -------
Subject: Re: New: [4.5 Regression]: cris-elf
gcc.dg/torture/builtin-math-3.c -O1 and -Os sincos one
On Sat, 4 Apr 2009, hp at gcc dot gnu dot org wrote:
> With revision 145488 this test passed.
> From revision 145495 and on, this test has failed as follows:
> ...
> Running /tmp/hpautotest-gcc1/gcc/gcc/testsuite/gcc.dg/torture/dg-torture.exp
> ...
> FAIL: gcc.dg/torture/builtin-math-3.c -O1 (test for excess errors)
> FAIL: gcc.dg/torture/builtin-math-3.c -Os (test for excess errors)
> ...
>
> With the message in gcc.log being:
> builtin-math-3.c:(.text+0x88): undefined reference to `_link_error'
> builtin-math-3.c:(.text+0xfe): undefined reference to `_link_error'
> builtin-math-3.c:(.text+0x174): undefined reference to `_link_error'
> builtin-math-3.c:(.text+0x1aa): undefined reference to `_link_error'
> builtin-math-3.c:(.text+0x220): undefined reference to `_link_error'
> /tmp/ccKBGOIU.o:builtin-math-3.c:(.text+0x296): more undefined references to
> `_link_error' follow
>
> The lack of line-numbers is of course unhelpful, but with "-g" added, the link
> error becomes, for both -O1 and -Os:
>
> builtin-math-3.o: In function `main':
> /tmp/hpautotest-gcc1/gcc/gcc/testsuite/gcc.dg/torture/builtin-math-3.c:176:
> undefined reference to `_link_error'
> /tmp/hpautotest-gcc1/gcc/gcc/testsuite/gcc.dg/torture/builtin-math-3.c:176:
> undefined reference to `_link_error'
> /tmp/hpautotest-gcc1/gcc/gcc/testsuite/gcc.dg/torture/builtin-math-3.c:177:
> undefined reference to `_link_error'
> /tmp/hpautotest-gcc1/gcc/gcc/testsuite/gcc.dg/torture/builtin-math-3.c:177:
> undefined reference to `_link_error'
>
> Author of patches in suspect revision range CC:ed.
Can you 1) reduce the testcase and attach preprocessed source that
works with a cross-compiler, 2) identify what goes wrong so we don't
have to analyze cris assembler?
Thanks,
Richard.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39643
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/39643] [4.5 Regression]: cris-elf gcc.dg/torture/builtin-math-3.c -O1 and -Os sincos one
2009-04-04 22:59 [Bug tree-optimization/39643] New: [4.5 Regression]: cris-elf gcc.dg/torture/builtin-math-3.c -O1 and -Os sincos one hp at gcc dot gnu dot org
2009-04-05 18:07 ` [Bug tree-optimization/39643] " rguenther at suse dot de
@ 2009-04-05 22:00 ` hp at gcc dot gnu dot org
2009-04-05 22:05 ` hp at gcc dot gnu dot org
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: hp at gcc dot gnu dot org @ 2009-04-05 22:00 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from hp at gcc dot gnu dot org 2009-04-05 22:00 -------
(In reply to comment #1)
> Can you 1) reduce the testcase and attach preprocessed source that
> works with a cross-compiler,
The test-case was already self-contained and had little context-sensitiveness
due to the line-oriented nature, so I didn't expect you to need this.
> 2) identify what goes wrong so we don't
> have to analyze cris assembler?
This is a bit worrying. Surely you didn't think this would ever be needed, for
a test-case where the nature of the failure is that it emits a subroutine call
to link_error()? Again, the regression is a missing optimization of sincos for
a soft-float target, as already mentioned in the summary and description.
Anyway, one reduced test-case coming up.
--
hp at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2009-04-05 22:00:23
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39643
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/39643] [4.5 Regression]: cris-elf gcc.dg/torture/builtin-math-3.c -O1 and -Os sincos one
2009-04-04 22:59 [Bug tree-optimization/39643] New: [4.5 Regression]: cris-elf gcc.dg/torture/builtin-math-3.c -O1 and -Os sincos one hp at gcc dot gnu dot org
2009-04-05 18:07 ` [Bug tree-optimization/39643] " rguenther at suse dot de
2009-04-05 22:00 ` hp at gcc dot gnu dot org
@ 2009-04-05 22:05 ` hp at gcc dot gnu dot org
2009-04-06 11:00 ` rguenth at gcc dot gnu dot org
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: hp at gcc dot gnu dot org @ 2009-04-05 22:05 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from hp at gcc dot gnu dot org 2009-04-05 22:05 -------
Created an attachment (id=17591)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=17591&action=view)
Reduced gcc.dg/torture/builtin-math-3.c
The two lines causing link_error() to be called as in the linker error messages
are cut out and the condition is reduced such that the emitted assembly-code is
still identical. Compile with e.g. -O1. Observe libcalls for "<=" and ">="
being called for constants, while in the pre-regression code, everything is
optimized out to the effect of "return 0;"
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39643
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/39643] [4.5 Regression]: cris-elf gcc.dg/torture/builtin-math-3.c -O1 and -Os sincos one
2009-04-04 22:59 [Bug tree-optimization/39643] New: [4.5 Regression]: cris-elf gcc.dg/torture/builtin-math-3.c -O1 and -Os sincos one hp at gcc dot gnu dot org
` (2 preceding siblings ...)
2009-04-05 22:05 ` hp at gcc dot gnu dot org
@ 2009-04-06 11:00 ` rguenth at gcc dot gnu dot org
2009-04-06 11:14 ` rguenth at gcc dot gnu dot org
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-04-06 11:00 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from rguenth at gcc dot gnu dot org 2009-04-06 11:00 -------
Ok, I can see at least one missed CCP optimization when looking at what
the x86_64 target produces. Now building a cross to see why for cris the
second CCP pass together with either FRE or DOM or the third CCP pass
do not fix this.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39643
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/39643] [4.5 Regression]: cris-elf gcc.dg/torture/builtin-math-3.c -O1 and -Os sincos one
2009-04-04 22:59 [Bug tree-optimization/39643] New: [4.5 Regression]: cris-elf gcc.dg/torture/builtin-math-3.c -O1 and -Os sincos one hp at gcc dot gnu dot org
` (3 preceding siblings ...)
2009-04-06 11:00 ` rguenth at gcc dot gnu dot org
@ 2009-04-06 11:14 ` rguenth at gcc dot gnu dot org
2009-04-06 14:16 ` rguenth at gcc dot gnu dot org
2009-04-06 14:17 ` rguenth at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-04-06 11:14 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from rguenth at gcc dot gnu dot org 2009-04-06 11:14 -------
For cris-axis-elf we do not fold
one_1 = 1.0e+0;
oneL_2 = 1.0e+0;
__builtin_sincos (1.0e+0, &s, &c);
to a constant because __builtin_sincos did not get transformed to
__builtin_cexpi.
We fold it later via the fold-all-builtins pass but nothing promotes
memory to registers after that pass with -O1. I have a patch that should
fix this.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |rguenth at gcc dot gnu dot
|dot org |org
Status|NEW |ASSIGNED
Keywords| |missed-optimization
Last reconfirmed|2009-04-05 22:00:23 |2009-04-06 11:14:36
date| |
Target Milestone|--- |4.5.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39643
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/39643] [4.5 Regression]: cris-elf gcc.dg/torture/builtin-math-3.c -O1 and -Os sincos one
2009-04-04 22:59 [Bug tree-optimization/39643] New: [4.5 Regression]: cris-elf gcc.dg/torture/builtin-math-3.c -O1 and -Os sincos one hp at gcc dot gnu dot org
` (4 preceding siblings ...)
2009-04-06 11:14 ` rguenth at gcc dot gnu dot org
@ 2009-04-06 14:16 ` rguenth at gcc dot gnu dot org
2009-04-06 14:17 ` rguenth at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-04-06 14:16 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from rguenth at gcc dot gnu dot org 2009-04-06 14:16 -------
Fixed.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39643
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/39643] [4.5 Regression]: cris-elf gcc.dg/torture/builtin-math-3.c -O1 and -Os sincos one
2009-04-04 22:59 [Bug tree-optimization/39643] New: [4.5 Regression]: cris-elf gcc.dg/torture/builtin-math-3.c -O1 and -Os sincos one hp at gcc dot gnu dot org
` (5 preceding siblings ...)
2009-04-06 14:16 ` rguenth at gcc dot gnu dot org
@ 2009-04-06 14:17 ` rguenth at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-04-06 14:17 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from rguenth at gcc dot gnu dot org 2009-04-06 14:16 -------
Subject: Bug 39643
Author: rguenth
Date: Mon Apr 6 14:16:15 2009
New Revision: 145604
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=145604
Log:
2009-04-06 Richard Guenther <rguenther@suse.de>
PR tree-optimization/39643
* tree-ssa-ccp.c (ccp_fold): Fold REALPART_EXPRs and
IMAGPART_EXPRs of complex constants.
(execute_fold_all_builtins): If we folded a call queue
TODO_update_address_taken.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/tree-ssa-ccp.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39643
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2009-04-06 14:17 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-04 22:59 [Bug tree-optimization/39643] New: [4.5 Regression]: cris-elf gcc.dg/torture/builtin-math-3.c -O1 and -Os sincos one hp at gcc dot gnu dot org
2009-04-05 18:07 ` [Bug tree-optimization/39643] " rguenther at suse dot de
2009-04-05 22:00 ` hp at gcc dot gnu dot org
2009-04-05 22:05 ` hp at gcc dot gnu dot org
2009-04-06 11:00 ` rguenth at gcc dot gnu dot org
2009-04-06 11:14 ` rguenth at gcc dot gnu dot org
2009-04-06 14:16 ` rguenth at gcc dot gnu dot org
2009-04-06 14:17 ` rguenth at gcc dot gnu dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).