GCC 4.5 20110221 test regressions

Bug #723086 reported by Andrew Stubbs
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Linaro GCC
Fix Released
Medium
Andrew Stubbs
4.5
Fix Released
Medium
Andrew Stubbs
4.6
Fix Released
Medium
Andrew Stubbs
gcc
Fix Released
Medium
gcc-4.5 (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

The upgrade to FSF GCC pre-4.5.3 r170352 introduced two test regressions on ARM:

PASS -> FAIL: default/gfortran.sum:gfortran.dg/actual_array_constructor_3.f90 -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions execution test
PASS -> FAIL: default/gfortran.sum:gfortran.dg/actual_array_constructor_3.f90 -O3 -fomit-frame-pointer -funroll-loops execution test

Both are segmentation faults in the execution test, so presumably are bad code generation bugs.

Revision history for this message
Michael Hope (michaelh1) wrote :

Note that these are in plain upstream gcc-4.5~svn170543:
 http://ex.seabright.co.nz/build/gcc-4.5~svn170543/logs/armv7l-maverick-cbuild49-carina7-cortexa8r1/gcc-testsuite.txt

and, looking back in history, also in gcc-4.5~svn170336 and gcc-4.5~svn170108. That's as far back as my Fortran logs go.

Andrew, could you report these upstream as well?

Changed in gcc-linaro:
status: New → Triaged
Revision history for this message
Michael Hope (michaelh1) wrote :

Marked as triaged as we have sufficient information to continue.

Revision history for this message
In , Andrew Stubbs (ams-codesourcery) wrote :

Some where between svn167945 and svn170352, the gcc 4.5 branch has acquired two test regressions:

FAIL: default/gfortran.sum:gfortran.dg/actual_array_constructor_3.f90 -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions execution test
FAIL: default/gfortran.sum:gfortran.dg/actual_array_constructor_3.f90 -O3 -fomit-frame-pointer -funroll-loops execution test

These both used to pass. Both now fail with segmentation faults.

My configuration: --target=arm-none-linux-gnueabi --with-arch=armv7-a --with-float=softfp --with-fpu=vfpv3-d16 --with-mode=thumb

Changed in gcc:
importance: Unknown → Medium
status: Unknown → New
Revision history for this message
In , Burnus-gcc (burnus-gcc) wrote :

Can you narrow it down a bit? Does it also occur without optimization?

In case of Fortran, there are two commits which look as if they might be related: r168851 for PR fortran/47775 and r168851 for PR fortran/45777.

 * * *

As the issue seems to occur only for two of the runs while the test suite I think has several more, it might well be an middle-end/target change. (I have not browsed through those changes.)

Revision history for this message
In , Burnus-gcc (burnus-gcc) wrote :

CC some ARM maintainer.

It would be tremendously useful narrow down the versions a bit more; there have been 90 commits to 4.5 between -r167945:170352 on 4.5 (ignoring gccadmin DATESTAMP bumps).

Additionally, it would be interesting to know whether the 4.6 trunk is affected as well. I tried to figure this out from gcc-testresults, but there seem to be only very few arm-linux-gnueabi results and, additionally, most of the arm-*-* results do not include Fortran.

As the issue seems to occur only for
  -O3 -fomit-frame-pointer -funroll-all-loops (-finline-functions)
it might well be a middle-end/target issue. (Though it could still be a front-end issue.)

Revision history for this message
In , Michael Hope (michaelh1) wrote :

The failure also exists in 4.6.0 20110308 [trunk revision 170780]. See:
 https://lists.launchpad.net/linaro-toolchain-builds/msg00290.html

for test results. Sorry that these aren't posted to gcc-testresults@gcc yet but I'm ironing out kinks.

Running target unix
FAIL: gfortran.dg/actual_array_constructor_3.f90 -O3 -fomit-frame-pointer -funroll-loops execution test
FAIL: gfortran.dg/actual_array_constructor_3.f90 -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions execution test
FAIL: gfortran.dg/pr45636.f90 -O scan-tree-dump-times forwprop2 "memset" 0
WARNING: program timed out.
FAIL: gfortran.dg/vect/fast-math-pr38968.f90 execution test
FAIL: gfortran.dg/vect/fast-math-pr38968.f90 scan-tree-dump vect "vectorized 1 loops"
WARNING: program timed out.
FAIL: gfortran.fortran-torture/execute/entry_6.f90 compilation, -O2

Revision history for this message
In , Michael Hope (michaelh1) wrote :

Not present in svn168270, svn169407, svn169832

Present in svn170086. This leaves the following commits:

r170086 | gerald | 2011-02-13 08:22:17 +1300 (Sun, 13 Feb 2011)
r170053 | bernds | 2011-02-12 05:01:19 +1300 (Sat, 12 Feb 2011)
r170040 | danglin | 2011-02-11 15:06:55 +1300 (Fri, 11 Feb 2011)
r170013 | ro | 2011-02-11 06:23:21 +1300 (Fri, 11 Feb 2011)
r169972 | ro | 2011-02-10 03:40:15 +1300 (Thu, 10 Feb 2011)
r169951 | ebotcazou | 2011-02-09 11:56:06 +1300 (Wed, 09 Feb 2011)
r169944 | redi | 2011-02-09 09:39:29 +1300 (Wed, 09 Feb 2011)
r169883 | ro | 2011-02-08 02:15:14 +1300 (Tue, 08 Feb 2011)
r169868 | gerald | 2011-02-07 10:08:58 +1300 (Mon, 07 Feb 2011)

r170086 is ada only
r170040 is pa only
r170013 should be mips only
r169972 is libffi testsuite only
r169951 is for multilibs
r169944 is documentation
r169883 is x86/avx only
r169868 is documentation

making r170053 the most likely. I'll build 170040 and 170053 to confirm.

Revision history for this message
In , Michael Hope (michaelh1) wrote :
Revision history for this message
Michael Hope (michaelh1) wrote :

Problem is introduced by r170053:

r170053 | bernds | 2011-02-12 05:01:19 +1300 (Sat, 12 Feb 2011) | 6 lines

 PR rtl-optimization/47166
 * reload1.c (emit_reload_insns): Disable the spill_reg_store
 mechanism for PRE_MODIFY and POST_MODIFY.
 (inc_for_reload): For PRE_MODIFY, return the insn that sets the
 reloadreg.

Revision history for this message
In , Ramana-gcc (ramana-gcc) wrote :

Adding bernds to the CC .

Ramana

Revision history for this message
In , Rguenth (rguenth) wrote :

A wrong-code regression on the branch for a primary taget. P1.

Bernd, can you at least investigate? Thanks.

Can someone check the status on the 4.6 and 4.7 branch?

Changed in gcc:
status: New → Confirmed
Revision history for this message
In , Ramana-gcc (ramana-gcc) wrote :

Patch posted here and waiting for feedback.

http://gcc.gnu.org/ml/gcc-patches/2011-04/msg00540.html

Revision history for this message
In , Bernds-gcc (bernds-gcc) wrote :

Ramana,

it looks like I'm running out of time to test this properly before I disappear for a few weeks. Can you give this a proper ARM test run and commit if it's urgent?

Revision history for this message
In , Michael Hope (michaelh1) wrote :

The proposed patch bootstraps fine on i686, x86_64, and armv7l. See:
 https://code.launchpad.net/~michaelh1/gcc-linaro/pr47976/+merge/58062

-FAIL: gfortran.dg/actual_array_constructor_3.f90 -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions execution test
 +PASS: gfortran.dg/actual_array_constructor_3.f90 -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions execution test
 -FAIL: gfortran.dg/actual_array_constructor_3.f90 -O3 -fomit-frame-pointer -funroll-loops execution test
 +PASS: gfortran.dg/actual_array_constructor_3.f90 -O3 -fomit-frame-pointer -funroll-loops execution test
 -FAIL: 27_io/basic_streambuf/sputc/wchar_t/1057.cc execution test
 +PASS: 27_io/basic_streambuf/sputc/wchar_t/1057.cc execution test

The 1057.cc change is probably due to a change in binutils.

Revision history for this message
In , Rguenth (rguenth) wrote :

Author: rguenth
Date: Tue Apr 19 10:54:47 2011
New Revision: 172706

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=172706
Log:
2011-04-19 Bernd Schmidt <email address hidden>

 PR fortran/47976
 * reload1.c (inc_for_reload): Return void. All callers changed.
 (emit_input_reload_insns): Don't try to delete previous output
 reloads to a register, or record spill_reg_store for autoincs.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/reload1.c

Revision history for this message
In , Rguenth (rguenth) wrote :

Should be fixed on the trunk. Bootstrap/tests on the 4.5 branch running for
{x86_64,i586,ppc,ppc64,ia64,s390,s390x}-linux.

Revision history for this message
In , Rguenth (rguenth) wrote :

Author: rguenth
Date: Wed Apr 20 09:48:00 2011
New Revision: 172765

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=172765
Log:
2011-04-20 Richard Guenther <email address hidden>

        Backport from mainline
        2011-04-19 Bernd Schmidt <email address hidden>

 PR fortran/47976
 * reload1.c (inc_for_reload): Return void. All callers changed.
 (emit_input_reload_insns): Don't try to delete previous output
 reloads to a register, or record spill_reg_store for autoincs.

Modified:
    branches/gcc-4_6-branch/gcc/ChangeLog
    branches/gcc-4_6-branch/gcc/reload1.c

Revision history for this message
In , Rguenth (rguenth) wrote :

Author: rguenth
Date: Wed Apr 20 11:05:09 2011
New Revision: 172766

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=172766
Log:
2011-04-20 Richard Guenther <email address hidden>

        Backport from 4.6 branch
        2011-04-19 Bernd Schmidt <email address hidden>

 PR fortran/47976
 * reload1.c (inc_for_reload): Return void. All callers changed.
 (emit_input_reload_insns): Don't try to delete previous output
 reloads to a register, or record spill_reg_store for autoincs.

Modified:
    branches/gcc-4_5-branch/gcc/ChangeLog
    branches/gcc-4_5-branch/gcc/reload1.c

Revision history for this message
In , Rguenth (rguenth) wrote :

Fixed.

Changed in gcc:
status: Confirmed → Fix Released
Revision history for this message
Michael Hope (michaelh1) wrote :

Andrew, could you backport these to 4.5 and 4.6 please?

Revision history for this message
Michael Hope (michaelh1) wrote :

The fix has been picked up in the 4.5+svn merge.

Revision history for this message
Matthias Klose (doko) wrote :

fixed in gcc-4.5_4.5.3-1ubuntu2 (oneiric)

Changed in gcc-4.5 (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.