Bug 47976 - [4.5/4.6 Regression] Recent gfortran.dg/actual_array_constructor_3.f90 regression on arm-linux-gnueabi
Summary: [4.5/4.6 Regression] Recent gfortran.dg/actual_array_constructor_3.f90 regres...
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: middle-end (show other bugs)
Version: 4.5.3
: P1 normal
Target Milestone: 4.5.3
Assignee: Not yet assigned to anyone
URL:
Keywords: wrong-code
Depends on:
Blocks:
 
Reported: 2011-03-03 15:37 UTC by Andrew Stubbs
Modified: 2011-04-20 11:05 UTC (History)
5 users (show)

See Also:
Host:
Target: arm-linux-gnueabi
Build:
Known to work: 4.5.2
Known to fail:
Last reconfirmed: 2011-04-04 21:32:23


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Stubbs 2011-03-03 15:37:59 UTC
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
Comment 1 Tobias Burnus 2011-03-04 11:03:06 UTC
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.)
Comment 2 Tobias Burnus 2011-03-08 08:34:50 UTC
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.)
Comment 3 Michael Hope 2011-03-15 02:07:16 UTC
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
Comment 4 Michael Hope 2011-03-16 21:18:59 UTC
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.
Comment 6 Ramana Radhakrishnan 2011-04-04 20:42:11 UTC
Adding bernds to the CC .

Ramana
Comment 7 Richard Biener 2011-04-10 10:36:37 UTC
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?
Comment 8 Ramana Radhakrishnan 2011-04-11 09:03:55 UTC
Patch posted here and waiting for feedback.

http://gcc.gnu.org/ml/gcc-patches/2011-04/msg00540.html
Comment 9 Bernd Schmidt 2011-04-15 12:10:54 UTC
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?
Comment 10 Michael Hope 2011-04-19 01:05:42 UTC
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.
Comment 11 Richard Biener 2011-04-19 10:54:50 UTC
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  <bernds@codesourcery.com>

	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
Comment 12 Richard Biener 2011-04-19 11:05:27 UTC
Should be fixed on the trunk.  Bootstrap/tests on the 4.5 branch running for
{x86_64,i586,ppc,ppc64,ia64,s390,s390x}-linux.
Comment 13 Richard Biener 2011-04-20 09:48:07 UTC
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  <rguenther@suse.de>

        Backport from mainline
        2011-04-19  Bernd Schmidt  <bernds@codesourcery.com>

	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
Comment 14 Richard Biener 2011-04-20 11:05:13 UTC
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  <rguenther@suse.de>

        Backport from 4.6 branch
        2011-04-19  Bernd Schmidt  <bernds@codesourcery.com>

	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
Comment 15 Richard Biener 2011-04-20 11:05:42 UTC
Fixed.