* [Bug target/35658] [4.3/4.4 regression] Bad interaction on ia64 between -funroll-loops -fno-automatic -O2 and common block variable
2008-03-21 17:58 [Bug fortran/35658] New: [4.3 regression] Bad interaction on ia64 between -funroll-loops -fno-automatic -O2 and common block variable kmccarty at debian dot org
@ 2008-03-22 13:25 ` rguenth at gcc dot gnu dot org
2008-04-28 4:29 ` mmitchel at gcc dot gnu dot org
` (16 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-03-22 13:25 UTC (permalink / raw)
To: gcc-bugs
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|rtl-optimization |target
Keywords| |wrong-code
Summary|[4.3 regression] Bad |[4.3/4.4 regression] Bad
|interaction on ia64 between |interaction on ia64 between
|-funroll-loops -fno- |-funroll-loops -fno-
|automatic -O2 and common |automatic -O2 and common
|block variable |block variable
Target Milestone|--- |4.3.1
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35658
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug target/35658] [4.3/4.4 regression] Bad interaction on ia64 between -funroll-loops -fno-automatic -O2 and common block variable
2008-03-21 17:58 [Bug fortran/35658] New: [4.3 regression] Bad interaction on ia64 between -funroll-loops -fno-automatic -O2 and common block variable kmccarty at debian dot org
2008-03-22 13:25 ` [Bug target/35658] [4.3/4.4 " rguenth at gcc dot gnu dot org
@ 2008-04-28 4:29 ` mmitchel at gcc dot gnu dot org
2008-05-20 20:50 ` sje at cup dot hp dot com
` (15 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2008-04-28 4:29 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from mmitchel at gcc dot gnu dot org 2008-04-28 04:28 -------
Fortran is not a primary language.
--
mmitchel at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P5
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35658
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug target/35658] [4.3/4.4 regression] Bad interaction on ia64 between -funroll-loops -fno-automatic -O2 and common block variable
2008-03-21 17:58 [Bug fortran/35658] New: [4.3 regression] Bad interaction on ia64 between -funroll-loops -fno-automatic -O2 and common block variable kmccarty at debian dot org
2008-03-22 13:25 ` [Bug target/35658] [4.3/4.4 " rguenth at gcc dot gnu dot org
2008-04-28 4:29 ` mmitchel at gcc dot gnu dot org
@ 2008-05-20 20:50 ` sje at cup dot hp dot com
2008-05-21 3:59 ` kmccarty at debian dot org
` (14 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: sje at cup dot hp dot com @ 2008-05-20 20:50 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from sje at cup dot hp dot com 2008-05-20 20:50 -------
I cannot reproduce this error. I have compiled the test case with
various options and always get output that includes
Test# 1 ( C201 ): *** failed ***
and
Test# 1 ( GENT ): *** failed ***
I get this when I use -fno-automatic -O2 -funroll-loops and when I use no
optimization at all. This is with GCC 4.3 released bits and ToT bits on
a Debian 3.1 IA64 system.
--
sje at cup dot hp dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |sje at cup dot hp dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35658
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug target/35658] [4.3/4.4 regression] Bad interaction on ia64 between -funroll-loops -fno-automatic -O2 and common block variable
2008-03-21 17:58 [Bug fortran/35658] New: [4.3 regression] Bad interaction on ia64 between -funroll-loops -fno-automatic -O2 and common block variable kmccarty at debian dot org
` (2 preceding siblings ...)
2008-05-20 20:50 ` sje at cup dot hp dot com
@ 2008-05-21 3:59 ` kmccarty at debian dot org
2008-05-21 15:31 ` sje at cup dot hp dot com
` (13 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: kmccarty at debian dot org @ 2008-05-21 3:59 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from kmccarty at debian dot org 2008-05-21 03:59 -------
(In reply to comment #2)
> Test# 1 ( GENT ): *** failed ***
>
> I get this when I use -fno-automatic -O2 -funroll-loops and when I use no
> optimization at all. This is with GCC 4.3 released bits and ToT bits on
> a Debian 3.1 IA64 system.
I tried again with the version of gcc from the 4.3 release branch (Subversion
branch gcc-4_3-branch downloaded today) and can still reproduce the bug (and
also can still reproduce the successes with no optimization or with
-fno-automatic -O2 but not -funroll-loops).
This is on an up-to-date Debian Sid system. (N.B. are you aware that Debian
3.1 is no longer security-supported?)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35658
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug target/35658] [4.3/4.4 regression] Bad interaction on ia64 between -funroll-loops -fno-automatic -O2 and common block variable
2008-03-21 17:58 [Bug fortran/35658] New: [4.3 regression] Bad interaction on ia64 between -funroll-loops -fno-automatic -O2 and common block variable kmccarty at debian dot org
` (3 preceding siblings ...)
2008-05-21 3:59 ` kmccarty at debian dot org
@ 2008-05-21 15:31 ` sje at cup dot hp dot com
2008-05-22 18:53 ` sje at cup dot hp dot com
` (12 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: sje at cup dot hp dot com @ 2008-05-21 15:31 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from sje at cup dot hp dot com 2008-05-21 15:30 -------
Now I can reproduce it. I don't know if you intended this or not but the clean
target in the Makefile removed the good objects but left the bad one so that
when I rebuilt I still had the old bad object around.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35658
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug target/35658] [4.3/4.4 regression] Bad interaction on ia64 between -funroll-loops -fno-automatic -O2 and common block variable
2008-03-21 17:58 [Bug fortran/35658] New: [4.3 regression] Bad interaction on ia64 between -funroll-loops -fno-automatic -O2 and common block variable kmccarty at debian dot org
` (4 preceding siblings ...)
2008-05-21 15:31 ` sje at cup dot hp dot com
@ 2008-05-22 18:53 ` sje at cup dot hp dot com
2008-05-22 18:53 ` sje at cup dot hp dot com
` (11 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: sje at cup dot hp dot com @ 2008-05-22 18:53 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from sje at cup dot hp dot com 2008-05-22 18:52 -------
Created an attachment (id=15672)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15672&action=view)
cutdown test case
This smaller test case requires the same options as the original.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35658
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug target/35658] [4.3/4.4 regression] Bad interaction on ia64 between -funroll-loops -fno-automatic -O2 and common block variable
2008-03-21 17:58 [Bug fortran/35658] New: [4.3 regression] Bad interaction on ia64 between -funroll-loops -fno-automatic -O2 and common block variable kmccarty at debian dot org
` (5 preceding siblings ...)
2008-05-22 18:53 ` sje at cup dot hp dot com
@ 2008-05-22 18:53 ` sje at cup dot hp dot com
2008-05-23 15:03 ` sje at cup dot hp dot com
` (10 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: sje at cup dot hp dot com @ 2008-05-22 18:53 UTC (permalink / raw)
To: gcc-bugs
--
sje at cup dot hp dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2008-05-22 18:52:59
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35658
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug target/35658] [4.3/4.4 regression] Bad interaction on ia64 between -funroll-loops -fno-automatic -O2 and common block variable
2008-03-21 17:58 [Bug fortran/35658] New: [4.3 regression] Bad interaction on ia64 between -funroll-loops -fno-automatic -O2 and common block variable kmccarty at debian dot org
` (6 preceding siblings ...)
2008-05-22 18:53 ` sje at cup dot hp dot com
@ 2008-05-23 15:03 ` sje at cup dot hp dot com
2008-06-05 23:02 ` sje at cup dot hp dot com
` (9 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: sje at cup dot hp dot com @ 2008-05-23 15:03 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from sje at cup dot hp dot com 2008-05-23 15:02 -------
It looks like this is a bug in register renaming. register renaming is turned
on by -floop-unroll. You can reproduce the bug using -frename-registers in
place of -funroll-loops.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35658
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug target/35658] [4.3/4.4 regression] Bad interaction on ia64 between -funroll-loops -fno-automatic -O2 and common block variable
2008-03-21 17:58 [Bug fortran/35658] New: [4.3 regression] Bad interaction on ia64 between -funroll-loops -fno-automatic -O2 and common block variable kmccarty at debian dot org
` (7 preceding siblings ...)
2008-05-23 15:03 ` sje at cup dot hp dot com
@ 2008-06-05 23:02 ` sje at cup dot hp dot com
2008-06-06 15:04 ` rguenth at gcc dot gnu dot org
` (8 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: sje at cup dot hp dot com @ 2008-06-05 23:02 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from sje at cup dot hp dot com 2008-06-05 23:02 -------
I now think this is a register scheduling bug. If I use -fno-schedule-insns2
then the bug doesn't happen even with "-O2 fno-automatic -frename-registers".
The problem seems to be scheduling the assignment to TEMP2 and assigning TEMP2
to F(K).
In the good code, in C201S I see the following instructions, in this order:
addl r17 = @gprel(temp2.717#), gp - r17 is addr of temp2
stfd [r17] = f0 - zero out temp2
(p11) stfd [r17] = f10 - (maybe) put value (2.0) in temp2
ldfd f9 = [r17] - load temp2
add r16 = r34, r37 - r16 is addr of F(1)
stfd [r16] = f9 - store temp2 in F(1)
In the bad code (with instruction scheduling turned on) I see:
addl r17 = @gprel(temp2.717#), gp - r17 is addr of temp2
add r16 = r34, r37 - r16 is addr of F(1)
ldfd f9 = [r17] - load temp2
stfd [r17] = f0 - zero out temp2
stfd [r16] = f9 - store (old) temp2 in F(1)
(p11) stfd [r17] = f10 - (maybe) put value (2.0) in temp2
The store into F(1) is done before we have put the correct value int temp2.
I don't understand how instruction scheduling could be this broken.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35658
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug target/35658] [4.3/4.4 regression] Bad interaction on ia64 between -funroll-loops -fno-automatic -O2 and common block variable
2008-03-21 17:58 [Bug fortran/35658] New: [4.3 regression] Bad interaction on ia64 between -funroll-loops -fno-automatic -O2 and common block variable kmccarty at debian dot org
` (8 preceding siblings ...)
2008-06-05 23:02 ` sje at cup dot hp dot com
@ 2008-06-06 15:04 ` rguenth at gcc dot gnu dot org
2008-08-18 21:53 ` [Bug target/35658] " sje at cup dot hp dot com
` (7 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-06-06 15:04 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from rguenth at gcc dot gnu dot org 2008-06-06 14:59 -------
4.3.1 is being released, adjusting target milestone.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.3.1 |4.3.2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35658
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug target/35658] between -funroll-loops -fno-automatic -O2 and common block variable
2008-03-21 17:58 [Bug fortran/35658] New: [4.3 regression] Bad interaction on ia64 between -funroll-loops -fno-automatic -O2 and common block variable kmccarty at debian dot org
` (9 preceding siblings ...)
2008-06-06 15:04 ` rguenth at gcc dot gnu dot org
@ 2008-08-18 21:53 ` sje at cup dot hp dot com
2008-08-23 3:00 ` kmccarty at debian dot org
` (6 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: sje at cup dot hp dot com @ 2008-08-18 21:53 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from sje at cup dot hp dot com 2008-08-18 21:51 -------
Kevin, I can no longer reproduce this bug. I think it was fixed by the same
patch that fixed PR 35659. Are you able to reproduce this or can we close it
as fixed?
--
sje at cup dot hp dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[4.3/4.4 regression] Bad |between -funroll-loops -fno-
|interaction on ia64 between |automatic -O2 and common
|-funroll-loops -fno- |block variable
|automatic -O2 and common |
|block variable |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35658
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug target/35658] between -funroll-loops -fno-automatic -O2 and common block variable
2008-03-21 17:58 [Bug fortran/35658] New: [4.3 regression] Bad interaction on ia64 between -funroll-loops -fno-automatic -O2 and common block variable kmccarty at debian dot org
` (10 preceding siblings ...)
2008-08-18 21:53 ` [Bug target/35658] " sje at cup dot hp dot com
@ 2008-08-23 3:00 ` kmccarty at debian dot org
2008-08-23 3:26 ` kmccarty at debian dot org
` (5 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: kmccarty at debian dot org @ 2008-08-23 3:00 UTC (permalink / raw)
To: gcc-bugs
------- Comment #10 from kmccarty at debian dot org 2008-08-23 02:59 -------
(In reply to comment #9)
> Kevin, I can no longer reproduce this bug. I think it was fixed by the same
> patch that fixed PR 35659. Are you able to reproduce this or can we close it
> as fixed?
First, sorry for the delayed reply.
With the latest gfortran from the gcc 4.3 branch in svn, I can unfortunately
still reproduce this bug using both my test case and the cut-down test case
provided by Steve Ellcey. I do find that PR 35659 is now fixed for me.
(sid)kmccarty@merulo:~$ ~/gcc-4.3-branch/bin/gfortran -v
Using built-in specs.
Target: ia64-unknown-linux-gnu
Configured with: ./configure --enable-fortran
--prefix=/home/kmccarty/gcc-4.3-branch/
--with-mpfr=/home/kmccarty/gcc-4.3-branch/
--with-gmp=/home/kmccarty/gcc-4.3-branch/
Thread model: posix
gcc version 4.3.2 20080822 (prerelease) (GCC)
Would you like me to also try with SVN trunk? Anything else you need to know?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35658
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug target/35658] between -funroll-loops -fno-automatic -O2 and common block variable
2008-03-21 17:58 [Bug fortran/35658] New: [4.3 regression] Bad interaction on ia64 between -funroll-loops -fno-automatic -O2 and common block variable kmccarty at debian dot org
` (11 preceding siblings ...)
2008-08-23 3:00 ` kmccarty at debian dot org
@ 2008-08-23 3:26 ` kmccarty at debian dot org
2008-08-27 22:08 ` jsm28 at gcc dot gnu dot org
` (4 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: kmccarty at debian dot org @ 2008-08-23 3:26 UTC (permalink / raw)
To: gcc-bugs
------- Comment #11 from kmccarty at debian dot org 2008-08-23 03:24 -------
(In reply to comment #9)
By the way, Steve, I do find (as you mentioned) that -frename-registers in
place of -funroll-loops also triggers the bug, and that adding
-fno-schedule-insns2 makes it go away.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35658
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug target/35658] between -funroll-loops -fno-automatic -O2 and common block variable
2008-03-21 17:58 [Bug fortran/35658] New: [4.3 regression] Bad interaction on ia64 between -funroll-loops -fno-automatic -O2 and common block variable kmccarty at debian dot org
` (12 preceding siblings ...)
2008-08-23 3:26 ` kmccarty at debian dot org
@ 2008-08-27 22:08 ` jsm28 at gcc dot gnu dot org
2009-01-24 10:23 ` [Bug target/35658] [4.3 Regression] " rguenth at gcc dot gnu dot org
` (3 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2008-08-27 22:08 UTC (permalink / raw)
To: gcc-bugs
------- Comment #12 from jsm28 at gcc dot gnu dot org 2008-08-27 22:03 -------
4.3.2 is released, changing milestones to 4.3.3.
--
jsm28 at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.3.2 |4.3.3
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35658
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug target/35658] [4.3 Regression] between -funroll-loops -fno-automatic -O2 and common block variable
2008-03-21 17:58 [Bug fortran/35658] New: [4.3 regression] Bad interaction on ia64 between -funroll-loops -fno-automatic -O2 and common block variable kmccarty at debian dot org
` (13 preceding siblings ...)
2008-08-27 22:08 ` jsm28 at gcc dot gnu dot org
@ 2009-01-24 10:23 ` rguenth at gcc dot gnu dot org
2009-08-04 12:51 ` rguenth at gcc dot gnu dot org
` (2 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-01-24 10:23 UTC (permalink / raw)
To: gcc-bugs
------- Comment #13 from rguenth at gcc dot gnu dot org 2009-01-24 10:20 -------
GCC 4.3.3 is being released, adjusting target milestone.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.3.3 |4.3.4
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35658
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug target/35658] [4.3 Regression] between -funroll-loops -fno-automatic -O2 and common block variable
2008-03-21 17:58 [Bug fortran/35658] New: [4.3 regression] Bad interaction on ia64 between -funroll-loops -fno-automatic -O2 and common block variable kmccarty at debian dot org
` (14 preceding siblings ...)
2009-01-24 10:23 ` [Bug target/35658] [4.3 Regression] " rguenth at gcc dot gnu dot org
@ 2009-08-04 12:51 ` rguenth at gcc dot gnu dot org
2010-05-22 18:27 ` rguenth at gcc dot gnu dot org
2010-07-20 13:56 ` steven at gcc dot gnu dot org
17 siblings, 0 replies; 19+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-08-04 12:51 UTC (permalink / raw)
To: gcc-bugs
------- Comment #14 from rguenth at gcc dot gnu dot org 2009-08-04 12:29 -------
GCC 4.3.4 is being released, adjusting target milestone.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.3.4 |4.3.5
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35658
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug target/35658] [4.3 Regression] between -funroll-loops -fno-automatic -O2 and common block variable
2008-03-21 17:58 [Bug fortran/35658] New: [4.3 regression] Bad interaction on ia64 between -funroll-loops -fno-automatic -O2 and common block variable kmccarty at debian dot org
` (15 preceding siblings ...)
2009-08-04 12:51 ` rguenth at gcc dot gnu dot org
@ 2010-05-22 18:27 ` rguenth at gcc dot gnu dot org
2010-07-20 13:56 ` steven at gcc dot gnu dot org
17 siblings, 0 replies; 19+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-05-22 18:27 UTC (permalink / raw)
To: gcc-bugs
------- Comment #15 from rguenth at gcc dot gnu dot org 2010-05-22 18:12 -------
GCC 4.3.5 is being released, adjusting target milestone.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.3.5 |4.3.6
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35658
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug target/35658] [4.3 Regression] between -funroll-loops -fno-automatic -O2 and common block variable
2008-03-21 17:58 [Bug fortran/35658] New: [4.3 regression] Bad interaction on ia64 between -funroll-loops -fno-automatic -O2 and common block variable kmccarty at debian dot org
` (16 preceding siblings ...)
2010-05-22 18:27 ` rguenth at gcc dot gnu dot org
@ 2010-07-20 13:56 ` steven at gcc dot gnu dot org
17 siblings, 0 replies; 19+ messages in thread
From: steven at gcc dot gnu dot org @ 2010-07-20 13:56 UTC (permalink / raw)
To: gcc-bugs
------- Comment #16 from steven at gcc dot gnu dot org 2010-07-20 13:55 -------
May be a dup of 43494, based on comment #7.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35658
^ permalink raw reply [flat|nested] 19+ messages in thread