public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/45656] New: [4.5 Regression]: gfortran.dg/forall_4.f90 -O3, wrong code with -g
@ 2010-09-13 13:59 hp at gcc dot gnu dot org
2010-09-13 14:00 ` [Bug tree-optimization/45656] " hp at gcc dot gnu dot org
` (8 more replies)
0 siblings, 9 replies; 10+ messages in thread
From: hp at gcc dot gnu dot org @ 2010-09-13 13:59 UTC (permalink / raw)
To: gcc-bugs
With revision r163997 this test passed.
>From revision r163998 and on, including at least r164242 this test has failed
as follows:
Running /tmp/reg_a4_998/gcc/gcc/testsuite/gfortran.dg/dg.exp ...
... (non-regressions elided)
FAIL: gfortran.dg/forall_4.f90 -O3 -g execution test
With the message in the logfile being:
Executing on host: /tmp/reg_a4_998/gccobj/gcc/testsuite/gfortran/../../gfortran
-B/tmp/reg_a4_998/gccobj/gcc/testsuite/gfortran/../../
/tmp/reg_a4_998/gcc/gcc/testsuite/gfortran.dg/forall_4.f90 -O3 -g
-pedantic-errors -isystem
/tmp/reg_a4_998/gccobj/cris-elf/./newlib/targ-include -isystem
/tmp/reg_a4_998/gcc/newlib/libc/include
-B/tmp/reg_a4_998/gccobj/cris-elf/./libgloss/cris/
-L/tmp/reg_a4_998/gccobj/cris-elf/./libgloss/cris
-L/tmp/reg_a4_998/gcc/libgloss/cris
-B/tmp/reg_a4_998/gccobj/cris-elf/./newlib/
-L/tmp/reg_a4_998/gccobj/cris-elf/./newlib -sim3
-B/tmp/reg_a4_998/gccobj/cris-elf/./libgfortran/.libs
-L/tmp/reg_a4_998/gccobj/cris-elf/./libgfortran/.libs
-L/tmp/reg_a4_998/gccobj/cris-elf/./libiberty -lm -o ./forall_4.exe
(timeout = 300)
PASS: gfortran.dg/forall_4.f90 -O3 -g (test for excess errors)
program stopped with signal 6.
FAIL: gfortran.dg/forall_4.f90 -O3 -g execution test
A shortened test-case is attached, in which the second call to abort is
executed. Apparently the "-g" is critical. There is the following
assembly-code difference without/with "-g". Note the actual *code* difference
among the expected debug-label differences, in which the comparison-part of the
cstore is lost:
...
@@ -62,18 +103,24 @@ _main:
cmpq 4,$r9
bne .L16
nop
+.LBE48:
+.LBE47:
+ .loc 1 32 0
clear.d [$sp+32]
clear.d [$sp+36]
clear.d [$sp+40]
clear.d [$sp+44]
- move.b 1,$r13
- cmp.d [$sp+16],$r13
+.LBB49:
+ .loc 1 33 0
seq $r9
- cmp.d [$sp+24],$r13
+ move.d [$sp+24],$r13
+ cmpq 1,$r13
seq $r13
lslq 16,$r13
or.d $r13,$r9
oR.d 16777472,$r9
+.LBE49:
+.LBB50:
move.b $r9,$r9
bne .L18
nop
...
There is no such actual code difference with r163997.
N.B: CRIS is a cc0 target.
Author of patch for this revision CC:ed.
--
Summary: [4.5 Regression]: gfortran.dg/forall_4.f90 -O3, wrong
code with -g
Product: gcc
Version: 4.6.0
Status: UNCONFIRMED
Keywords: wrong-code
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=45656
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/45656] [4.5 Regression]: gfortran.dg/forall_4.f90 -O3, wrong code with -g
2010-09-13 13:59 [Bug tree-optimization/45656] New: [4.5 Regression]: gfortran.dg/forall_4.f90 -O3, wrong code with -g hp at gcc dot gnu dot org
@ 2010-09-13 14:00 ` hp at gcc dot gnu dot org
2010-09-13 14:22 ` matz at gcc dot gnu dot org
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: hp at gcc dot gnu dot org @ 2010-09-13 14:00 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from hp at gcc dot gnu dot org 2010-09-13 14:00 -------
Created an attachment (id=21784)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21784&action=view)
shortened gfortran.dg/forall_4.f90
-O3 -g
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45656
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/45656] [4.5 Regression]: gfortran.dg/forall_4.f90 -O3, wrong code with -g
2010-09-13 13:59 [Bug tree-optimization/45656] New: [4.5 Regression]: gfortran.dg/forall_4.f90 -O3, wrong code with -g hp at gcc dot gnu dot org
2010-09-13 14:00 ` [Bug tree-optimization/45656] " hp at gcc dot gnu dot org
@ 2010-09-13 14:22 ` matz at gcc dot gnu dot org
2010-09-13 14:37 ` hp at gcc dot gnu dot org
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: matz at gcc dot gnu dot org @ 2010-09-13 14:22 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from matz at gcc dot gnu dot org 2010-09-13 14:21 -------
Uh, I just disabled tree-sinking in some cases. This can't be directly
the reason for the problem, rather it must have uncovered a latent problem.
Will try to investigate.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45656
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/45656] [4.5 Regression]: gfortran.dg/forall_4.f90 -O3, wrong code with -g
2010-09-13 13:59 [Bug tree-optimization/45656] New: [4.5 Regression]: gfortran.dg/forall_4.f90 -O3, wrong code with -g hp at gcc dot gnu dot org
2010-09-13 14:00 ` [Bug tree-optimization/45656] " hp at gcc dot gnu dot org
2010-09-13 14:22 ` matz at gcc dot gnu dot org
@ 2010-09-13 14:37 ` hp at gcc dot gnu dot org
2010-09-21 9:19 ` aoliva at gcc dot gnu dot org
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: hp at gcc dot gnu dot org @ 2010-09-13 14:37 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from hp at gcc dot gnu dot org 2010-09-13 14:37 -------
(In reply to comment #1)
>
> -O3 -g
I forgot to mention, also: -fno-delayed-branch (reorg is always the usual
suspect when latent bugs are exposed, but not so this time.)
I guess it's fair to include Alexandre what with the
latent-bug-code-difference-with--g observation.
--
hp at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |aoliva at gcc dot gnu dot
| |org
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2010-09-13 14:37:09
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45656
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/45656] [4.5 Regression]: gfortran.dg/forall_4.f90 -O3, wrong code with -g
2010-09-13 13:59 [Bug tree-optimization/45656] New: [4.5 Regression]: gfortran.dg/forall_4.f90 -O3, wrong code with -g hp at gcc dot gnu dot org
` (2 preceding siblings ...)
2010-09-13 14:37 ` hp at gcc dot gnu dot org
@ 2010-09-21 9:19 ` aoliva at gcc dot gnu dot org
2010-09-21 10:05 ` aoliva at gcc dot gnu dot org
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: aoliva at gcc dot gnu dot org @ 2010-09-21 9:19 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from aoliva at gcc dot gnu dot org 2010-09-21 09:19 -------
Mine. It's something wrong in combine, causing the cmp insn to be deleted as
trivially dead.
--
aoliva at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |aoliva at gcc dot gnu dot
|dot org |org
Status|NEW |ASSIGNED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45656
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/45656] [4.5 Regression]: gfortran.dg/forall_4.f90 -O3, wrong code with -g
2010-09-13 13:59 [Bug tree-optimization/45656] New: [4.5 Regression]: gfortran.dg/forall_4.f90 -O3, wrong code with -g hp at gcc dot gnu dot org
` (3 preceding siblings ...)
2010-09-21 9:19 ` aoliva at gcc dot gnu dot org
@ 2010-09-21 10:05 ` aoliva at gcc dot gnu dot org
2010-09-21 15:12 ` hp at gcc dot gnu dot org
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: aoliva at gcc dot gnu dot org @ 2010-09-21 10:05 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from aoliva at gcc dot gnu dot org 2010-09-21 10:04 -------
Created an attachment (id=21855)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21855&action=view)
Patch that fixes the problem
cse was losing track of cc0 set/use because of intervening debug insns. Anyone
got a CC0 host to bootstrap-test this on?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45656
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/45656] [4.5 Regression]: gfortran.dg/forall_4.f90 -O3, wrong code with -g
2010-09-13 13:59 [Bug tree-optimization/45656] New: [4.5 Regression]: gfortran.dg/forall_4.f90 -O3, wrong code with -g hp at gcc dot gnu dot org
` (4 preceding siblings ...)
2010-09-21 10:05 ` aoliva at gcc dot gnu dot org
@ 2010-09-21 15:12 ` hp at gcc dot gnu dot org
2010-09-21 15:17 ` hp at gcc dot gnu dot org
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: hp at gcc dot gnu dot org @ 2010-09-21 15:12 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from hp at gcc dot gnu dot org 2010-09-21 15:11 -------
(In reply to comment #5)
> Created an attachment (id=21855)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21855&action=view) [edit]
> Patch that fixes the problem
>
> cse was losing track of cc0 set/use because of intervening debug insns. Anyone
> got a CC0 host to bootstrap-test this on?
Thanks for looking to this. No bootstrap unfortunately, but I can
regression-test it for cris-elf, which should be sufficient. Well, I'm quite
certain you too know exactly the steps ;-) but I guess since I have a baseline
and a setup...
Let me just suggest changing the "... == 0" to "... == NULL_RTX" in the last
part of the patch. To incentivise, I'll test that. :)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45656
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/45656] [4.5 Regression]: gfortran.dg/forall_4.f90 -O3, wrong code with -g
2010-09-13 13:59 [Bug tree-optimization/45656] New: [4.5 Regression]: gfortran.dg/forall_4.f90 -O3, wrong code with -g hp at gcc dot gnu dot org
` (5 preceding siblings ...)
2010-09-21 15:12 ` hp at gcc dot gnu dot org
@ 2010-09-21 15:17 ` hp at gcc dot gnu dot org
2010-09-21 16:34 ` hp at gcc dot gnu dot org
2010-09-21 21:44 ` hp at gcc dot gnu dot org
8 siblings, 0 replies; 10+ messages in thread
From: hp at gcc dot gnu dot org @ 2010-09-21 15:17 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from hp at gcc dot gnu dot org 2010-09-21 15:17 -------
Created an attachment (id=21857)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21857&action=view)
Same patch, just s/0/NULL_RTX/ in two places.
As mentioned plus one more place.
--
hp at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #21855|0 |1
is obsolete| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45656
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/45656] [4.5 Regression]: gfortran.dg/forall_4.f90 -O3, wrong code with -g
2010-09-13 13:59 [Bug tree-optimization/45656] New: [4.5 Regression]: gfortran.dg/forall_4.f90 -O3, wrong code with -g hp at gcc dot gnu dot org
` (6 preceding siblings ...)
2010-09-21 15:17 ` hp at gcc dot gnu dot org
@ 2010-09-21 16:34 ` hp at gcc dot gnu dot org
2010-09-21 21:44 ` hp at gcc dot gnu dot org
8 siblings, 0 replies; 10+ messages in thread
From: hp at gcc dot gnu dot org @ 2010-09-21 16:34 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from hp at gcc dot gnu dot org 2010-09-21 16:34 -------
Created an attachment (id=21858)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21858&action=view)
Same patch, just gunzipped this time. :)
--
hp at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #21857|0 |1
is obsolete| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45656
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/45656] [4.5 Regression]: gfortran.dg/forall_4.f90 -O3, wrong code with -g
2010-09-13 13:59 [Bug tree-optimization/45656] New: [4.5 Regression]: gfortran.dg/forall_4.f90 -O3, wrong code with -g hp at gcc dot gnu dot org
` (7 preceding siblings ...)
2010-09-21 16:34 ` hp at gcc dot gnu dot org
@ 2010-09-21 21:44 ` hp at gcc dot gnu dot org
8 siblings, 0 replies; 10+ messages in thread
From: hp at gcc dot gnu dot org @ 2010-09-21 21:44 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from hp at gcc dot gnu dot org 2010-09-21 21:44 -------
(In reply to comment #8)
> Created an attachment (id=21858)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21858&action=view) [edit]
It fixes the bug with no regressions for r164480.
Thanks!
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45656
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2010-09-21 21:44 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-13 13:59 [Bug tree-optimization/45656] New: [4.5 Regression]: gfortran.dg/forall_4.f90 -O3, wrong code with -g hp at gcc dot gnu dot org
2010-09-13 14:00 ` [Bug tree-optimization/45656] " hp at gcc dot gnu dot org
2010-09-13 14:22 ` matz at gcc dot gnu dot org
2010-09-13 14:37 ` hp at gcc dot gnu dot org
2010-09-21 9:19 ` aoliva at gcc dot gnu dot org
2010-09-21 10:05 ` aoliva at gcc dot gnu dot org
2010-09-21 15:12 ` hp at gcc dot gnu dot org
2010-09-21 15:17 ` hp at gcc dot gnu dot org
2010-09-21 16:34 ` hp at gcc dot gnu dot org
2010-09-21 21:44 ` hp 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).