public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/55006] New: [4.8 Regression] aermod.f90 is miscompiled with '-m64 -O2 -funroll-loops' after revision 192526
@ 2012-10-21 12:12 dominiq at lps dot ens.fr
  2012-10-21 12:24 ` [Bug tree-optimization/55006] " dominiq at lps dot ens.fr
                   ` (17 more replies)
  0 siblings, 18 replies; 19+ messages in thread
From: dominiq at lps dot ens.fr @ 2012-10-21 12:12 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55006

             Bug #: 55006
           Summary: [4.8 Regression] aermod.f90 is miscompiled with '-m64
                    -O2 -funroll-loops' after revision 192526
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: dominiq@lps.ens.fr
                CC: hubicka@gcc.gnu.org, steven@gcc.gnu.org


The polyhedron test aermod.f90 is miscompiled with '-m64 -O2 -funroll-loops'
after revision 192526

Author:    steven
Date:    Wed Oct 17 06:15:38 2012 UTC (4 days, 5 hours ago)
Changed paths:    3
Log Message:    
    * df-problems.c (df_kill_notes): Split up in two functions.
    (df_remove_dead_and_unused_notes): New function, first half of
    df_kill notes to remove all REG_DEAD and REG_UNUSED notes.
    (df_remove_dead_eq_notes): New function, second half of df_kill_notes
    to remove REG_EQUAL and REG_EQUIV notes referring to dead registers.
    (df_note_bb_compute): Call df_remove_dead_and_unused_notes instead
    of df_kill_notes.  Call df_remove_dead_eq_notes after processing insn.

    * web.c (web): Re-add DF_RD_PRUNE_DEAD_DEFS;

The executable aborts with the following backtrace

...
 F indicates top of profile (=1) or below (=0)
+Now Processing Data For Day No.    1 of 1999

Program received signal SIGSEGV, Segmentation fault.
wake_sig (x=46.0831375, xd=104.343887, xold=44.0807877, turbz=<value optimized
out>, turby=<value optimized out>, szold=Cannot access memory at address 0x8
) at aermod.f90:38204
38204             SZ = SZOLD + DELX*TURBZ
(gdb) bt
#0  wake_sig (x=46.0831375, xd=104.343887, xold=44.0807877, turbz=<value
optimized out>, turby=<value optimized out>, szold=Cannot access memory at
address 0x8
) at aermod.f90:38204
#1  0x000000010003302c in wake_dfsn (ldbhr=.FALSE., xi=40.076088,
szi=0.596251428, syi=0.618943393, z=7.06923056) at aermod.f90:36900
#2  0x000000010003852a in numrise (ldbhr=.FALSE., h=5, reff=<value optimized
out>, texit=262.600189, wexit=<value optimized out>, ntr=50, xtr=..., 
    ytr=..., ztr=..., rtr=..., linwake=.TRUE., numwake=0) at aermod.f90:35360
#3  0x000000010003b3d6 in prmdelh (xarg=30.6145649, l_inwake=.TRUE.) at
aermod.f90:39784
#4  0x000000010003cc64 in prmcalc (xbrec=<value optimized out>, ybrec=<value
optimized out>) at aermod.f90:6786
#5  0x00000001000572b2 in pcalc () at aermod.f90:6282
#6  0x000000010005905b in calc () at aermod.f90:5761
#7  0x0000000100079868 in hrloop () at aermod.f90:2596
#8  0x00000001000e7367 in aermod () at aermod.f90:2194
#9  0x00000001000f864f in main (argc=<value optimized out>, argv=<value
optimized out>) at aermod.f90:2038
#10 0x00000001000016e4 in start ()

The two subroutines which are miscompiled are wake_dfsn and wake_dfsn2, see the
attached compressed archive for testing it.


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug tree-optimization/55006] [4.8 Regression] aermod.f90 is miscompiled with '-m64 -O2 -funroll-loops' after revision 192526
  2012-10-21 12:12 [Bug tree-optimization/55006] New: [4.8 Regression] aermod.f90 is miscompiled with '-m64 -O2 -funroll-loops' after revision 192526 dominiq at lps dot ens.fr
@ 2012-10-21 12:24 ` dominiq at lps dot ens.fr
  2012-10-21 12:39 ` dominiq at lps dot ens.fr
                   ` (16 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: dominiq at lps dot ens.fr @ 2012-10-21 12:24 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55006

--- Comment #1 from Dominique d'Humieres <dominiq at lps dot ens.fr> 2012-10-21 12:24:23 UTC ---
Created attachment 28499
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28499
Compressed archive for aermod

The attachment contains the files needed to compile and run the test aermod.
The original source has been split in aermod_red.f90, wake_dfsn.f90, and
wake_dfsn2.f90 (the two subroutines that are miscompiled).

It can be used as

gfc -c -m64 -O2 -funroll-loops aermod_red.f90 wake_dfsn.f90 wake_dfsn2.f90
gfc aermod_red.o wake_dfsn.o wake_dfsn2.o

where gfc is gfortran at revision 192526 or later. This gives the miscompiled
code. If the files wake_dfsn.f90 and wake_dfsn2.f90 are then compiled with
revision 192525 or older (and same options), then the new executable is OK.


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug tree-optimization/55006] [4.8 Regression] aermod.f90 is miscompiled with '-m64 -O2 -funroll-loops' after revision 192526
  2012-10-21 12:12 [Bug tree-optimization/55006] New: [4.8 Regression] aermod.f90 is miscompiled with '-m64 -O2 -funroll-loops' after revision 192526 dominiq at lps dot ens.fr
  2012-10-21 12:24 ` [Bug tree-optimization/55006] " dominiq at lps dot ens.fr
@ 2012-10-21 12:39 ` dominiq at lps dot ens.fr
  2012-10-22  9:06 ` rguenth at gcc dot gnu.org
                   ` (15 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: dominiq at lps dot ens.fr @ 2012-10-21 12:39 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55006

Dominique d'Humieres <dominiq at lps dot ens.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Target|                            |x86_64-apple-darwin10
               Host|                            |x86_64-apple-darwin10
              Build|                            |x86_64-apple-darwin10

--- Comment #2 from Dominique d'Humieres <dominiq at lps dot ens.fr> 2012-10-21 12:38:53 UTC ---
On powerpc-apple-darwin9, aermod is compiled correctly at revision 192623, so
changing the host/target/build fields.


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug tree-optimization/55006] [4.8 Regression] aermod.f90 is miscompiled with '-m64 -O2 -funroll-loops' after revision 192526
  2012-10-21 12:12 [Bug tree-optimization/55006] New: [4.8 Regression] aermod.f90 is miscompiled with '-m64 -O2 -funroll-loops' after revision 192526 dominiq at lps dot ens.fr
  2012-10-21 12:24 ` [Bug tree-optimization/55006] " dominiq at lps dot ens.fr
  2012-10-21 12:39 ` dominiq at lps dot ens.fr
@ 2012-10-22  9:06 ` rguenth at gcc dot gnu.org
  2012-10-29 19:25 ` izamyatin at gmail dot com
                   ` (14 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-10-22  9:06 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55006

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.8.0


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug tree-optimization/55006] [4.8 Regression] aermod.f90 is miscompiled with '-m64 -O2 -funroll-loops' after revision 192526
  2012-10-21 12:12 [Bug tree-optimization/55006] New: [4.8 Regression] aermod.f90 is miscompiled with '-m64 -O2 -funroll-loops' after revision 192526 dominiq at lps dot ens.fr
                   ` (2 preceding siblings ...)
  2012-10-22  9:06 ` rguenth at gcc dot gnu.org
@ 2012-10-29 19:25 ` izamyatin at gmail dot com
  2012-11-08 12:07 ` dominiq at lps dot ens.fr
                   ` (13 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: izamyatin at gmail dot com @ 2012-10-29 19:25 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55006

Igor Zamyatin <izamyatin at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |izamyatin at gmail dot com

--- Comment #3 from Igor Zamyatin <izamyatin at gmail dot com> 2012-10-29 19:25:26 UTC ---
It's also can be seen for x86_64-unknown-linux-gnu. In particular, 447.dealII
fails with -O3 and -funroll-loops


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug tree-optimization/55006] [4.8 Regression] aermod.f90 is miscompiled with '-m64 -O2 -funroll-loops' after revision 192526
  2012-10-21 12:12 [Bug tree-optimization/55006] New: [4.8 Regression] aermod.f90 is miscompiled with '-m64 -O2 -funroll-loops' after revision 192526 dominiq at lps dot ens.fr
                   ` (3 preceding siblings ...)
  2012-10-29 19:25 ` izamyatin at gmail dot com
@ 2012-11-08 12:07 ` dominiq at lps dot ens.fr
  2012-11-18 23:11 ` dominiq at lps dot ens.fr
                   ` (12 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: dominiq at lps dot ens.fr @ 2012-11-08 12:07 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55006

Dominique d'Humieres <dominiq at lps dot ens.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Target|x86_64-apple-darwin10       |x86_64-*-*
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2012-11-08
               Host|x86_64-apple-darwin10       |
     Ever Confirmed|0                           |1
              Build|x86_64-apple-darwin10       |

--- Comment #4 from Dominique d'Humieres <dominiq at lps dot ens.fr> 2012-11-08 12:06:43 UTC ---
> It's also can be seen for x86_64-unknown-linux-gnu. In particular, 447.dealII
> fails with -O3 and -funroll-loops

So changing target to x86_64-*-* and status to new.

Note that this PR blocks the testing of the polyhedron suite with
-funroll-loops.


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug tree-optimization/55006] [4.8 Regression] aermod.f90 is miscompiled with '-m64 -O2 -funroll-loops' after revision 192526
  2012-10-21 12:12 [Bug tree-optimization/55006] New: [4.8 Regression] aermod.f90 is miscompiled with '-m64 -O2 -funroll-loops' after revision 192526 dominiq at lps dot ens.fr
                   ` (4 preceding siblings ...)
  2012-11-08 12:07 ` dominiq at lps dot ens.fr
@ 2012-11-18 23:11 ` dominiq at lps dot ens.fr
  2012-11-19 21:22 ` [Bug rtl-optimization/55006] " steven at gcc dot gnu.org
                   ` (11 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: dominiq at lps dot ens.fr @ 2012-11-18 23:11 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55006

--- Comment #5 from Dominique d'Humieres <dominiq at lps dot ens.fr> 2012-11-18 23:11:19 UTC ---
Reverting the change to gcc/web.c in revision 192526, i.e., re-removing
DF_RD_PRUNE_DEAD_DEFS, fixes the miscompilation without regression.

> Well done to us all for probing until we found the root cause of this bug!
(from http://gcc.gnu.org/ml/gcc-patches/2012-10/msg01599.html ) may have been
overoptimistic;-(


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug rtl-optimization/55006] [4.8 Regression] aermod.f90 is miscompiled with '-m64 -O2 -funroll-loops' after revision 192526
  2012-10-21 12:12 [Bug tree-optimization/55006] New: [4.8 Regression] aermod.f90 is miscompiled with '-m64 -O2 -funroll-loops' after revision 192526 dominiq at lps dot ens.fr
                   ` (5 preceding siblings ...)
  2012-11-18 23:11 ` dominiq at lps dot ens.fr
@ 2012-11-19 21:22 ` steven at gcc dot gnu.org
  2012-11-28  0:18 ` steven at gcc dot gnu.org
                   ` (10 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: steven at gcc dot gnu.org @ 2012-11-19 21:22 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55006

Steven Bosscher <steven at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Target|x86_64-*-*                  |
             Status|NEW                         |ASSIGNED
                URL|                            |http://gcc.gnu.org/ml/gcc-p
                   |                            |atches/2012-11/msg01607.htm
                   |                            |l
           Keywords|                            |patch, wrong-code
   Last reconfirmed|2012-11-08 00:00:00         |2012-11-19 0:00
          Component|tree-optimization           |rtl-optimization
                 CC|steven at gcc dot gnu.org   |
         AssignedTo|unassigned at gcc dot       |steven at gcc dot gnu.org
                   |gnu.org                     |


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug rtl-optimization/55006] [4.8 Regression] aermod.f90 is miscompiled with '-m64 -O2 -funroll-loops' after revision 192526
  2012-10-21 12:12 [Bug tree-optimization/55006] New: [4.8 Regression] aermod.f90 is miscompiled with '-m64 -O2 -funroll-loops' after revision 192526 dominiq at lps dot ens.fr
                   ` (6 preceding siblings ...)
  2012-11-19 21:22 ` [Bug rtl-optimization/55006] " steven at gcc dot gnu.org
@ 2012-11-28  0:18 ` steven at gcc dot gnu.org
  2012-12-03 15:59 ` rguenth at gcc dot gnu.org
                   ` (9 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: steven at gcc dot gnu.org @ 2012-11-28  0:18 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55006

--- Comment #6 from Steven Bosscher <steven at gcc dot gnu.org> 2012-11-28 00:17:40 UTC ---
Author: steven
Date: Wed Nov 28 00:17:34 2012
New Revision: 193876

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=193876
Log:
    PR rtl-optimization/55006
    * loop-unroll.c (struct iv_to_split): Add new 'orig_var' member.
    (analyze_iv_to_split_insn): Record it.
    (maybe_strip_eq_note_for_split_iv): New function to remove REG_EQUAL
    notes that refer to IVs that are being split.
    (apply_opt_in_copies): Use maybe_strip_eq_note_for_split_iv.  Twice.
    Use FOR_BB_INSNS_SAFE.


Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/loop-unroll.c


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug rtl-optimization/55006] [4.8 Regression] aermod.f90 is miscompiled with '-m64 -O2 -funroll-loops' after revision 192526
  2012-10-21 12:12 [Bug tree-optimization/55006] New: [4.8 Regression] aermod.f90 is miscompiled with '-m64 -O2 -funroll-loops' after revision 192526 dominiq at lps dot ens.fr
                   ` (7 preceding siblings ...)
  2012-11-28  0:18 ` steven at gcc dot gnu.org
@ 2012-12-03 15:59 ` rguenth at gcc dot gnu.org
  2012-12-03 16:04 ` steven at gcc dot gnu.org
                   ` (8 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-12-03 15:59 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55006

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P1

--- Comment #7 from Richard Biener <rguenth at gcc dot gnu.org> 2012-12-03 15:59:09 UTC ---
As far as I remember this is not yet fixed?


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug rtl-optimization/55006] [4.8 Regression] aermod.f90 is miscompiled with '-m64 -O2 -funroll-loops' after revision 192526
  2012-10-21 12:12 [Bug tree-optimization/55006] New: [4.8 Regression] aermod.f90 is miscompiled with '-m64 -O2 -funroll-loops' after revision 192526 dominiq at lps dot ens.fr
                   ` (8 preceding siblings ...)
  2012-12-03 15:59 ` rguenth at gcc dot gnu.org
@ 2012-12-03 16:04 ` steven at gcc dot gnu.org
  2012-12-05 11:54 ` krebbel at gcc dot gnu.org
                   ` (7 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: steven at gcc dot gnu.org @ 2012-12-03 16:04 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55006

Steven Bosscher <steven at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                URL|http://gcc.gnu.org/ml/gcc-p |http://gcc.gnu.org/ml/gcc-p
                   |atches/2012-11/msg01607.htm |atches/2012-12/msg00076.htm
                   |l                           |l

--- Comment #8 from Steven Bosscher <steven at gcc dot gnu.org> 2012-12-03 16:03:19 UTC ---
Correct, not yet fixed. Patch is pending.
This is a bit of a can of worms, and getting a patch approved
has turned out to be a bit more troublesome than I had hoped.


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug rtl-optimization/55006] [4.8 Regression] aermod.f90 is miscompiled with '-m64 -O2 -funroll-loops' after revision 192526
  2012-10-21 12:12 [Bug tree-optimization/55006] New: [4.8 Regression] aermod.f90 is miscompiled with '-m64 -O2 -funroll-loops' after revision 192526 dominiq at lps dot ens.fr
                   ` (9 preceding siblings ...)
  2012-12-03 16:04 ` steven at gcc dot gnu.org
@ 2012-12-05 11:54 ` krebbel at gcc dot gnu.org
  2012-12-05 11:56 ` krebbel at gcc dot gnu.org
                   ` (6 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: krebbel at gcc dot gnu.org @ 2012-12-05 11:54 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55006

--- Comment #9 from Andreas Krebbel <krebbel at gcc dot gnu.org> 2012-12-05 11:54:11 UTC ---
Created attachment 28879
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28879
Reduced testcase


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug rtl-optimization/55006] [4.8 Regression] aermod.f90 is miscompiled with '-m64 -O2 -funroll-loops' after revision 192526
  2012-10-21 12:12 [Bug tree-optimization/55006] New: [4.8 Regression] aermod.f90 is miscompiled with '-m64 -O2 -funroll-loops' after revision 192526 dominiq at lps dot ens.fr
                   ` (10 preceding siblings ...)
  2012-12-05 11:54 ` krebbel at gcc dot gnu.org
@ 2012-12-05 11:56 ` krebbel at gcc dot gnu.org
  2012-12-05 11:58 ` krebbel at gcc dot gnu.org
                   ` (5 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: krebbel at gcc dot gnu.org @ 2012-12-05 11:56 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55006

Andreas Krebbel <krebbel at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |krebbel at gcc dot gnu.org

--- Comment #10 from Andreas Krebbel <krebbel at gcc dot gnu.org> 2012-12-05 11:56:03 UTC ---
The attached testcase gets miscompiled starting with that revision.

cc1  -fpreprocessed -quiet  -O2 -march=z196 -funroll-loops  t.c 

Perl_lex_start:
.LFB0:
    stgrl    %r2,PL_linestr
    tm    13(%r2),128
    stmg    %r14,%r15,112(%r15)
.LCFI0:
    lay    %r15,-168(%r15)
.LCFI1:
    jne    .L6
    l    %r0,12            <------ broken (access to absolute address 12)
    lgrl    %r2,PL_linestr
.L2:
    tmlh    %r0,4
    jne    .L1
    la    %r3,160(%r15)
    lghi    %r4,2
    brasl    %r14,Perl_sv_2pv_flags
.L1:
    lmg    %r14,%r15,280(%r15)
.LCFI2:
    br    %r14
.L6:
.LCFI3:
    brasl    %r14,Perl_sv_2mortal
    stgrl    %r2,PL_linestr
    l    %r0,12(%r2)
    j    .L2


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug rtl-optimization/55006] [4.8 Regression] aermod.f90 is miscompiled with '-m64 -O2 -funroll-loops' after revision 192526
  2012-10-21 12:12 [Bug tree-optimization/55006] New: [4.8 Regression] aermod.f90 is miscompiled with '-m64 -O2 -funroll-loops' after revision 192526 dominiq at lps dot ens.fr
                   ` (11 preceding siblings ...)
  2012-12-05 11:56 ` krebbel at gcc dot gnu.org
@ 2012-12-05 11:58 ` krebbel at gcc dot gnu.org
  2012-12-05 11:59 ` krebbel at gcc dot gnu.org
                   ` (4 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: krebbel at gcc dot gnu.org @ 2012-12-05 11:58 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55006

--- Comment #11 from Andreas Krebbel <krebbel at gcc dot gnu.org> 2012-12-05 11:58:25 UTC ---
Created attachment 28880
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28880
web output r192525


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug rtl-optimization/55006] [4.8 Regression] aermod.f90 is miscompiled with '-m64 -O2 -funroll-loops' after revision 192526
  2012-10-21 12:12 [Bug tree-optimization/55006] New: [4.8 Regression] aermod.f90 is miscompiled with '-m64 -O2 -funroll-loops' after revision 192526 dominiq at lps dot ens.fr
                   ` (12 preceding siblings ...)
  2012-12-05 11:58 ` krebbel at gcc dot gnu.org
@ 2012-12-05 11:59 ` krebbel at gcc dot gnu.org
  2012-12-05 12:24 ` steven at gcc dot gnu.org
                   ` (3 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: krebbel at gcc dot gnu.org @ 2012-12-05 11:59 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55006

--- Comment #12 from Andreas Krebbel <krebbel at gcc dot gnu.org> 2012-12-05 11:58:53 UTC ---
Created attachment 28881
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28881
web output r192526


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug rtl-optimization/55006] [4.8 Regression] aermod.f90 is miscompiled with '-m64 -O2 -funroll-loops' after revision 192526
  2012-10-21 12:12 [Bug tree-optimization/55006] New: [4.8 Regression] aermod.f90 is miscompiled with '-m64 -O2 -funroll-loops' after revision 192526 dominiq at lps dot ens.fr
                   ` (13 preceding siblings ...)
  2012-12-05 11:59 ` krebbel at gcc dot gnu.org
@ 2012-12-05 12:24 ` steven at gcc dot gnu.org
  2012-12-05 12:32 ` steven at gcc dot gnu.org
                   ` (2 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: steven at gcc dot gnu.org @ 2012-12-05 12:24 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55006

--- Comment #13 from Steven Bosscher <steven at gcc dot gnu.org> 2012-12-05 12:24:27 UTC ---
(In reply to comment #10)
> The attached testcase gets miscompiled starting with that revision.

And is not fixed after r194108?


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug rtl-optimization/55006] [4.8 Regression] aermod.f90 is miscompiled with '-m64 -O2 -funroll-loops' after revision 192526
  2012-10-21 12:12 [Bug tree-optimization/55006] New: [4.8 Regression] aermod.f90 is miscompiled with '-m64 -O2 -funroll-loops' after revision 192526 dominiq at lps dot ens.fr
                   ` (14 preceding siblings ...)
  2012-12-05 12:24 ` steven at gcc dot gnu.org
@ 2012-12-05 12:32 ` steven at gcc dot gnu.org
  2012-12-05 12:55 ` krebbel at gcc dot gnu.org
  2012-12-21 12:19 ` rguenth at gcc dot gnu.org
  17 siblings, 0 replies; 19+ messages in thread
From: steven at gcc dot gnu.org @ 2012-12-05 12:32 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55006

--- Comment #14 from Steven Bosscher <steven at gcc dot gnu.org> 2012-12-05 12:32:24 UTC ---
Nothing new here, just yet another invalid REG_EQUAL note:

The webizer tries to split r51 in this insn:

;; basic block 4, loop depth 0, count 0, freq 7100, maybe hot
;;  prev block 3, next block 5, flags: (REACHABLE, RTL, MODIFIED)
;;  pred:       2 [71.0%]
;; bb 4 artificial_defs: { }
;; bb 4 artificial_uses: { u20(11){ }u21(15){ }u22(32){ }u23(34){ }}
;; lr  in        11 [%r11] 15 [%r15] 32 [%ap] 34 [%fp] 55
;; lr  use       11 [%r11] 15 [%r15] 32 [%ap] 34 [%fp] 55
;; lr  def       48 50
;; live  in      11 [%r11] 15 [%r15] 32 [%ap] 34 [%fp] 55
;; live  gen     48 50
;; live  kill
(code_label 38 6 37 4 4 "" [1 uses])
(note 37 38 58 4 [bb 4] NOTE_INSN_BASIC_BLOCK)
(insn 58 37 5 4 (set (reg:SI 50 [ D.1400 ])
        (reg:SI 55 [ D.1400 ])) 67 {*movsi_zarch}
     (expr_list:REG_EQUAL (mem:SI (plus:DI (reg/v/f:DI 51 [ line ])
                (const_int 12 [0xc])) [4 line_4(D)->sv_flags+0 S4 A32])
        (nil)))

Web oldreg=51 newreg=56
Updating insn 58 (51->56)

But r51 is not live on entry to bb4, and not defined in bb4 before insn58, so
it's a REG_EQUAL use of a dead register.

The sole DEF or r51 is a parameter load, and r55 is set almost immediately
after it:

(note 7 0 2 2 [bb 2] NOTE_INSN_BASIC_BLOCK)
(insn 2 7 3 2 (set (reg/v/f:DI 51 [ line ])
        (reg:DI 2 %r2 [ line ])) t.c:25 63 {*movdi_64}
     (nil))
(note 3 2 9 2 NOTE_INSN_FUNCTION_BEG)
(insn 9 3 10 2 (set (mem/f/c:DI (symbol_ref:DI ("PL_linestr") [flags 0x40] 
<var_decl 0x3fff74f65f0 PL_linestr>) [2 PL_linestr+0 S8 A64])
        (reg/v/f:DI 51 [ line ])) t.c:28 63 {*movdi_64}
     (nil))
(insn 10 9 11 2 (set (reg:SI 55 [ D.1400 ])
        (mem:SI (plus:DI (reg/v/f:DI 51 [ line ])
                (const_int 12 [0xc])) [4 line_4(D)->sv_flags+0 S4 A32])) t.c:29
67 {*movsi_zarch}
     (nil))

r51 dies in in insn 10.


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug rtl-optimization/55006] [4.8 Regression] aermod.f90 is miscompiled with '-m64 -O2 -funroll-loops' after revision 192526
  2012-10-21 12:12 [Bug tree-optimization/55006] New: [4.8 Regression] aermod.f90 is miscompiled with '-m64 -O2 -funroll-loops' after revision 192526 dominiq at lps dot ens.fr
                   ` (15 preceding siblings ...)
  2012-12-05 12:32 ` steven at gcc dot gnu.org
@ 2012-12-05 12:55 ` krebbel at gcc dot gnu.org
  2012-12-21 12:19 ` rguenth at gcc dot gnu.org
  17 siblings, 0 replies; 19+ messages in thread
From: krebbel at gcc dot gnu.org @ 2012-12-05 12:55 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55006

--- Comment #15 from Andreas Krebbel <krebbel at gcc dot gnu.org> 2012-12-05 12:55:41 UTC ---
(In reply to comment #13)
> (In reply to comment #10)
> > The attached testcase gets miscompiled starting with that revision.
> 
> And is not fixed after r194108?

Just tested with r194219 - works again. Thanks!


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug rtl-optimization/55006] [4.8 Regression] aermod.f90 is miscompiled with '-m64 -O2 -funroll-loops' after revision 192526
  2012-10-21 12:12 [Bug tree-optimization/55006] New: [4.8 Regression] aermod.f90 is miscompiled with '-m64 -O2 -funroll-loops' after revision 192526 dominiq at lps dot ens.fr
                   ` (16 preceding siblings ...)
  2012-12-05 12:55 ` krebbel at gcc dot gnu.org
@ 2012-12-21 12:19 ` rguenth at gcc dot gnu.org
  17 siblings, 0 replies; 19+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-12-21 12:19 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55006

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED

--- Comment #16 from Richard Biener <rguenth at gcc dot gnu.org> 2012-12-21 12:18:50 UTC ---
This bug has been hijacked multiple times for related stuff it seems.  In
particular aermod works for me on x86_64 now.

Please re-open if the original bug (see $summary) still persists.  Please
open new bugreports for everything else.  Thanks.


^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2012-12-21 12:19 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-21 12:12 [Bug tree-optimization/55006] New: [4.8 Regression] aermod.f90 is miscompiled with '-m64 -O2 -funroll-loops' after revision 192526 dominiq at lps dot ens.fr
2012-10-21 12:24 ` [Bug tree-optimization/55006] " dominiq at lps dot ens.fr
2012-10-21 12:39 ` dominiq at lps dot ens.fr
2012-10-22  9:06 ` rguenth at gcc dot gnu.org
2012-10-29 19:25 ` izamyatin at gmail dot com
2012-11-08 12:07 ` dominiq at lps dot ens.fr
2012-11-18 23:11 ` dominiq at lps dot ens.fr
2012-11-19 21:22 ` [Bug rtl-optimization/55006] " steven at gcc dot gnu.org
2012-11-28  0:18 ` steven at gcc dot gnu.org
2012-12-03 15:59 ` rguenth at gcc dot gnu.org
2012-12-03 16:04 ` steven at gcc dot gnu.org
2012-12-05 11:54 ` krebbel at gcc dot gnu.org
2012-12-05 11:56 ` krebbel at gcc dot gnu.org
2012-12-05 11:58 ` krebbel at gcc dot gnu.org
2012-12-05 11:59 ` krebbel at gcc dot gnu.org
2012-12-05 12:24 ` steven at gcc dot gnu.org
2012-12-05 12:32 ` steven at gcc dot gnu.org
2012-12-05 12:55 ` krebbel at gcc dot gnu.org
2012-12-21 12:19 ` rguenth at gcc dot gnu.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).