We have many execution failures on SPARC for the 980628-* series of testcases: FAIL: gfortran.dg/g77/980628-0.f -O1 execution test FAIL: gfortran.dg/g77/980628-0.f -O2 execution test FAIL: gfortran.dg/g77/980628-0.f -O3 -fomit-frame-pointer execution test FAIL: gfortran.dg/g77/980628-0.f -O3 -fomit-frame-pointer -funroll-loops execution test FAIL: gfortran.dg/g77/980628-0.f -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions execution test FAIL: gfortran.dg/g77/980628-0.f -O3 -g execution test FAIL: gfortran.dg/g77/980628-0.f -Os execution test FAIL: gfortran.dg/g77/980628-1.f -O1 execution test FAIL: gfortran.dg/g77/980628-1.f -O2 execution test FAIL: gfortran.dg/g77/980628-1.f -O3 -fomit-frame-pointer execution test FAIL: gfortran.dg/g77/980628-1.f -O3 -fomit-frame-pointer -funroll-loops execution test FAIL: gfortran.dg/g77/980628-1.f -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions execution test FAIL: gfortran.dg/g77/980628-1.f -O3 -g execution test FAIL: gfortran.dg/g77/980628-1.f -Os execution test FAIL: gfortran.dg/g77/980628-10.f -O0 execution test FAIL: gfortran.dg/g77/980628-10.f -O1 execution test FAIL: gfortran.dg/g77/980628-10.f -O2 execution test FAIL: gfortran.dg/g77/980628-10.f -O3 -fomit-frame-pointer execution test FAIL: gfortran.dg/g77/980628-10.f -O3 -fomit-frame-pointer -funroll-loops execution test FAIL: gfortran.dg/g77/980628-10.f -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions execution test FAIL: gfortran.dg/g77/980628-10.f -O3 -g execution test FAIL: gfortran.dg/g77/980628-10.f -Os execution test FAIL: gfortran.dg/g77/980628-2.f -O0 execution test FAIL: gfortran.dg/g77/980628-2.f -O1 execution test FAIL: gfortran.dg/g77/980628-2.f -O2 execution test FAIL: gfortran.dg/g77/980628-2.f -O3 -fomit-frame-pointer execution test FAIL: gfortran.dg/g77/980628-2.f -O3 -fomit-frame-pointer -funroll-loops execution test FAIL: gfortran.dg/g77/980628-2.f -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions execution test FAIL: gfortran.dg/g77/980628-2.f -O3 -g execution test FAIL: gfortran.dg/g77/980628-2.f -Os execution test FAIL: gfortran.dg/g77/980628-3.f -O0 execution test FAIL: gfortran.dg/g77/980628-3.f -O1 execution test FAIL: gfortran.dg/g77/980628-3.f -O2 execution test FAIL: gfortran.dg/g77/980628-3.f -O3 -fomit-frame-pointer execution test FAIL: gfortran.dg/g77/980628-3.f -O3 -fomit-frame-pointer -funroll-loops execution test FAIL: gfortran.dg/g77/980628-3.f -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions execution test FAIL: gfortran.dg/g77/980628-3.f -O3 -g execution test FAIL: gfortran.dg/g77/980628-3.f -Os execution test FAIL: gfortran.dg/g77/980628-7.f -O1 execution test FAIL: gfortran.dg/g77/980628-7.f -O2 execution test FAIL: gfortran.dg/g77/980628-7.f -O3 -fomit-frame-pointer execution test FAIL: gfortran.dg/g77/980628-7.f -O3 -fomit-frame-pointer -funroll-loops execution test FAIL: gfortran.dg/g77/980628-7.f -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions execution test FAIL: gfortran.dg/g77/980628-7.f -O3 -g execution test FAIL: gfortran.dg/g77/980628-7.f -Os execution test FAIL: gfortran.dg/g77/980628-8.f -O1 execution test FAIL: gfortran.dg/g77/980628-8.f -O2 execution test FAIL: gfortran.dg/g77/980628-8.f -O3 -fomit-frame-pointer execution test FAIL: gfortran.dg/g77/980628-8.f -O3 -fomit-frame-pointer -funroll-loops execution test FAIL: gfortran.dg/g77/980628-8.f -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions execution test FAIL: gfortran.dg/g77/980628-8.f -O3 -g execution test FAIL: gfortran.dg/g77/980628-8.f -Os execution test FAIL: gfortran.dg/g77/980628-9.f -O0 execution test FAIL: gfortran.dg/g77/980628-9.f -O1 execution test FAIL: gfortran.dg/g77/980628-9.f -O2 execution test FAIL: gfortran.dg/g77/980628-9.f -O3 -fomit-frame-pointer execution test FAIL: gfortran.dg/g77/980628-9.f -O3 -fomit-frame-pointer -funroll-loops execution test FAIL: gfortran.dg/g77/980628-9.f -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions execution test FAIL: gfortran.dg/g77/980628-9.f -O3 -g execution test FAIL: gfortran.dg/g77/980628-9.f -Os execution test It appears that the old bug mentioned in the head comment is back: * g77 0.5.23 and previous had bugs involving too little space * allocated for EQUIVALENCE and COMMON areas needing initial * padding to meet alignment requirements of the system. G95: Program received signal SIGSEGV, Segmentation fault. 0x00010a94 in x_ (c1=0xffbefaa4, r1=@0xffbefaa5, c2=0xffbefab0, r2=@0xffbefab1, c3=0xffbefabc, r3=@0xffbefabd, c4=@0xffbefaa3, c5=@0xffbefaa1, c6=@0xffbefaa2, _c1=1, _c2=1, _c3=1, _c4=1, _c5=1, _c6=1) at 980628-2.f:44 44 if (r1 .ne. 1.) call abort G77: Breakpoint 1, x_ (c1=0xffbefaab, r1=0xffbefaac, c2=0xffbefa9b, r2=0xffbefa9c, c3=0xffbefa8b, r3=0xffbefa8c, c4=0xffbefa87, c5=0xffbefa86, c6=0xffbefa85, __g77_length_c1=1, __g77_length_c2=1, __g77_length_c3=1, __g77_length_c4=1, __g77_length_c5=1, __g77_length_c6=1) at 980628-2.f:44 44 if (r1 .ne. 1.) call abort Note the discrepancy for the alignment of r1, r2 and r3.
A regression wrt the old frontend.
This is critical on the SPARC.
I'm getting the same problems on sparc32 builds.
well, I get a few too, see http://gcc.gnu.org/ml/gcc-testresults/2004- 11/msg01283.html and http://gcc.gnu.org/ml/gcc-testresults/2004- 11/msg01296.html
I haven't tested this yet, but perhaps something as simple as Index: trans-common.c =================================================================== RCS file: /cvsroot/gcc/gcc/gcc/fortran/trans-common.c,v retrieving revision 1.18 diff -u -p -r1.18 trans-common.c --- trans-common.c 16 Sep 2004 16:00:43 -0000 1.18 +++ trans-common.c 17 Dec 2004 20:41:48 -0000 @@ -269,6 +269,9 @@ build_equiv_decl (tree union_type, bool TREE_ADDRESSABLE (decl) = 1; TREE_USED (decl) = 1; + DECL_ALIGN (decl) = BIGGEST_ALIGNMENT; + DECL_USER_ALIGN (decl) = 0; + /* The source location has been lost, and doesn't really matter. We need to set it to something though. */ gfc_set_decl_location (decl, &gfc_current_locus); Would fix the problem.
Sorry for the noise. That patch doesn't do anything.
Patch here: <http://gcc.gnu.org/ml/gcc-patches/2004-12/msg01605.html>.
I don't think that patch is sufficient. I'm about halfway to a fix. I don't think the behaviour should be conditional on STRICT_ALIGNMENT. Either enforce alignment, or annotate things properly so that the backend generates unaligned loads. g77 enforces alignment.
*** Bug 19338 has been marked as a duplicate of this bug. ***
Subject: Bug 17675 CVSROOT: /cvs/gcc Module name: gcc Changes by: pbrook@gcc.gnu.org 2005-01-09 22:57:45 Modified files: gcc/fortran : ChangeLog trans-common.c gcc/testsuite : ChangeLog Added files: gcc/testsuite/gfortran.dg: common_2.f90 common_3.f90 Log message: 2005-01-09 Paul Brook <paul@codesourcery.com> PR fortran/17675 * trans-common.c (current_common, current_offset): Remove. (create_common): Add head argument. (align_segment): New function. (apply_segment_offset): New function. (translate_common): Merge code from new_segment. Handle alignment. (new_segment): Remove. (finish_equivalences): Ensure proper alignment. testsuite/ * gfortran.dg/common_2.f90: New file. * gfortran.dg/common_3.f90: New file. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/ChangeLog.diff?cvsroot=gcc&r1=1.288&r2=1.289 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/trans-common.c.diff?cvsroot=gcc&r1=1.18&r2=1.19 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.4874&r2=1.4875 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.dg/common_2.f90.diff?cvsroot=gcc&r1=NONE&r2=1.1 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.dg/common_3.f90.diff?cvsroot=gcc&r1=NONE&r2=1.1
Should be fixed now.
> Should be fixed now. Unfortunately not all of them: FAIL: gfortran.dg/g77/980628-10.f -O0 execution test FAIL: gfortran.dg/g77/980628-10.f -O1 execution test FAIL: gfortran.dg/g77/980628-10.f -O2 execution test FAIL: gfortran.dg/g77/980628-10.f -O3 -fomit-frame-pointer execution test FAIL: gfortran.dg/g77/980628-10.f -O3 -fomit-frame-pointer -funroll-loops execution test FAIL: gfortran.dg/g77/980628-10.f -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions execution test FAIL: gfortran.dg/g77/980628-10.f -O3 -g execution test FAIL: gfortran.dg/g77/980628-10.f -Os execution test FAIL: gfortran.dg/g77/980628-7.f -O0 execution test FAIL: gfortran.dg/g77/980628-7.f -O1 execution test FAIL: gfortran.dg/g77/980628-7.f -O2 execution test FAIL: gfortran.dg/g77/980628-7.f -O3 -fomit-frame-pointer execution test FAIL: gfortran.dg/g77/980628-7.f -O3 -fomit-frame-pointer -funroll-loops execution test FAIL: gfortran.dg/g77/980628-7.f -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions execution test FAIL: gfortran.dg/g77/980628-7.f -O3 -g execution test FAIL: gfortran.dg/g77/980628-7.f -Os execution test FAIL: gfortran.dg/g77/980628-8.f -O0 execution test FAIL: gfortran.dg/g77/980628-8.f -O1 execution test FAIL: gfortran.dg/g77/980628-8.f -O2 execution test FAIL: gfortran.dg/g77/980628-8.f -O3 -fomit-frame-pointer execution test FAIL: gfortran.dg/g77/980628-8.f -O3 -fomit-frame-pointer -funroll-loops execution test FAIL: gfortran.dg/g77/980628-8.f -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions execution test FAIL: gfortran.dg/g77/980628-8.f -O3 -g execution test FAIL: gfortran.dg/g77/980628-8.f -Os execution test FAIL: gfortran.dg/g77/980628-9.f -O0 execution test FAIL: gfortran.dg/g77/980628-9.f -O1 execution test FAIL: gfortran.dg/g77/980628-9.f -O2 execution test FAIL: gfortran.dg/g77/980628-9.f -O3 -fomit-frame-pointer execution test FAIL: gfortran.dg/g77/980628-9.f -O3 -fomit-frame-pointer -funroll-loops execution test FAIL: gfortran.dg/g77/980628-9.f -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions execution test FAIL: gfortran.dg/g77/980628-9.f -O3 -g execution test FAIL: gfortran.dg/g77/980628-9.f -Os execution test FAIL: gfortran.dg/g77/980701-1.f -O0 execution test FAIL: gfortran.dg/g77/980701-1.f -O1 execution test FAIL: gfortran.dg/g77/980701-1.f -O2 execution test FAIL: gfortran.dg/g77/980701-1.f -O3 -fomit-frame-pointer execution test FAIL: gfortran.dg/g77/980701-1.f -O3 -fomit-frame-pointer -funroll-loops execution test FAIL: gfortran.dg/g77/980701-1.f -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions execution test FAIL: gfortran.dg/g77/980701-1.f -O3 -g execution test FAIL: gfortran.dg/g77/980701-1.f -Os execution test Note that Steve's patch fixes all of them.
Subject: Bug 17675 CVSROOT: /cvs/gcc Module name: gcc Changes by: pbrook@gcc.gnu.org 2005-01-16 12:05:54 Modified files: gcc/fortran : ChangeLog trans-common.c gcc/testsuite : ChangeLog Added files: gcc/testsuite/gfortran.dg: common_4.f90 Log message: 2004-01-16 Paul Brook <paul@codesourcery.com> PR fortran/17675 * trans-common.c (translate_common): Remove duplicate function call. (finish_equivalences): Preserve alignment when biasing offsets. testsuite/ * gfortran.dg/common_4.f90: New test. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/ChangeLog.diff?cvsroot=gcc&r1=1.293&r2=1.294 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/trans-common.c.diff?cvsroot=gcc&r1=1.20&r2=1.21 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.4893&r2=1.4894 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.dg/common_4.f90.diff?cvsroot=gcc&r1=NONE&r2=1.1
> PR fortran/17675 > * trans-common.c (translate_common): Remove duplicate function call. > (finish_equivalences): Preserve alignment when biasing offsets. > testsuite/ > * gfortran.dg/common_4.f90: New test. You got them all on both SPARC 32-bit and 64-bit. Thanks!
This is now fixed right?
Subject: Re: [Regression w.r.t. g77] Alignment constraints > ------- Additional Comments From pinskia at gcc dot gnu dot org 2005-01-16 > 16:08 ------- > This is now fixed right? Should know in a couple of hours. I have builds going on hppa2.0w-hp-hpux11.11 and hppa64-hp-hpux11.11. Dave
Subject: Re: [Regression w.r.t. g77] Alignment constraints > > ------- Additional Comments From pinskia at gcc dot gnu dot org 2005-01-16 > > 16:08 ------- > > This is now fixed right? > > Should know in a couple of hours. I have builds going on > hppa2.0w-hp-hpux11.11 and hppa64-hp-hpux11.11. Yes. Dave
Fixed.