public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug regression/48477] New: [4.7 Regression]: gfortran.dg/coarray_13.f90
@ 2011-04-06  6:50 hp at gcc dot gnu.org
  2011-04-06 10:10 ` [Bug regression/48477] " rguenth at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: hp at gcc dot gnu.org @ 2011-04-06  6:50 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: [4.7 Regression]: gfortran.dg/coarray_13.f90
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: normal
          Priority: P3
         Component: regression
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: hp@gcc.gnu.org
                CC: burnus@gcc.gnu.org
              Host: x86_64-unknown-linux-gnu
            Target: cris-axis-elf


Created attachment 23895
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=23895
Reduced gfortran.dg/coarray_13.f90 exposing the failure

This test previously passed, now it fails.
Revision r171949 caused this regression.  Since then it fails as follows:

Running /tmp/hpautotest-gcc1/gcc/gcc/testsuite/gfortran.dg/dg.exp ...
...
FAIL: gfortran.dg/coarray_13.f90  -O2  execution test
FAIL: gfortran.dg/coarray_13.f90  -O3 -fomit-frame-pointer  execution test
FAIL: gfortran.dg/coarray_13.f90  -O3 -fomit-frame-pointer -funroll-loops 
execution test
FAIL: gfortran.dg/coarray_13.f90  -O3 -fomit-frame-pointer -funroll-all-loops
-finline-functions  execution test
FAIL: gfortran.dg/coarray_13.f90  -O3 -g  execution test

The messages in gfortran.log are similar:

PASS: gfortran.dg/coarray_13.f90  -O2  (test for excess errors)
core: 4 byte write to unmapped address 0x10190 at 0x146

program stopped with signal 11.


Author/committer of suspect revision CC:ed.

Looking into this, I see badness in the form of a modified test-case.  Multiple
tests for new (or greatly improved) functionality were apparently added to an
existing test-case. While that worked for the tested platform, it didn't work
for cris-elf and I'd guess also some other unfortunate platform. So, because an
existing test was modified rather than new tests added, it comes out as a
regression. That's why existing test-cases should never be upgraded like that;
they should be fixed only if they were actually wrong or just enough to
maintain the intention of the test when gcc gets too smart.

I'm adding a reduced test-case which fails at r172016; all but a single test
and call to abort. Hopefully this is enough to spark some ideas as to the
cause. I can assist with some target-specific testing; execution tracing etc.
but note that the general instructions for building and running on a simulator
toolchain apply to cris-elf.

(For the record, at revision r171949 the tree was in a flux, with 52
regressions in total for cris-elf, but that's been resolved to this single
regression at r172016.  I tested r171943 (last regression-free revision before
r171949) patched with the single commit of r171949; that combination also
fails.)


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

* [Bug regression/48477] [4.7 Regression]: gfortran.dg/coarray_13.f90
  2011-04-06  6:50 [Bug regression/48477] New: [4.7 Regression]: gfortran.dg/coarray_13.f90 hp at gcc dot gnu.org
@ 2011-04-06 10:10 ` rguenth at gcc dot gnu.org
  2011-04-06 13:04 ` burnus at gcc dot gnu.org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-04-06 10:10 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.7.0


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

* [Bug regression/48477] [4.7 Regression]: gfortran.dg/coarray_13.f90
  2011-04-06  6:50 [Bug regression/48477] New: [4.7 Regression]: gfortran.dg/coarray_13.f90 hp at gcc dot gnu.org
  2011-04-06 10:10 ` [Bug regression/48477] " rguenth at gcc dot gnu.org
@ 2011-04-06 13:04 ` burnus at gcc dot gnu.org
  2011-04-06 18:32 ` burnus at gcc dot gnu.org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: burnus at gcc dot gnu.org @ 2011-04-06 13:04 UTC (permalink / raw)
  To: gcc-bugs

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

Tobias Burnus <burnus at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2011.04.06 13:04:07
     Ever Confirmed|0                           |1

--- Comment #1 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-04-06 13:04:07 UTC ---
Confirm on x86-64-Linux. In a way I am surprised that it does not crash there -
but at least valgrind properly warns.

The issue is:

  allocate(B(3)[-4:*])
  call three_b(3,B)
...
  subroutine three_b(n,A)
    integer :: n
    integer :: A(-1:3,0:4,-2:5,-4:7)[n+2:n+5,n-1:*]
...
    A(1,1,1,1) = 42

Thus, one passes "B" which is a size 3 array as actual argument to a dummy
array "A" which has the size 2400. (That's questionable usage, but still
valid.)

If one now accesses the element A(1,1,1,1) on effectively accesses array
element B(144) which is not that healthy if B has only 3 elements.


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

* [Bug regression/48477] [4.7 Regression]: gfortran.dg/coarray_13.f90
  2011-04-06  6:50 [Bug regression/48477] New: [4.7 Regression]: gfortran.dg/coarray_13.f90 hp at gcc dot gnu.org
  2011-04-06 10:10 ` [Bug regression/48477] " rguenth at gcc dot gnu.org
  2011-04-06 13:04 ` burnus at gcc dot gnu.org
@ 2011-04-06 18:32 ` burnus at gcc dot gnu.org
  2011-04-06 22:51 ` burnus at gcc dot gnu.org
  2011-04-07  0:18 ` hp at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: burnus at gcc dot gnu.org @ 2011-04-06 18:32 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-04-06 18:32:31 UTC ---
Author: burnus
Date: Wed Apr  6 18:32:27 2011
New Revision: 172061

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=172061
Log:
2011-04-06  Tobias Burnus  <burnus@net-b.de>

        PR fortran/18918
        PR fortran/48477
        * gfortran.dg/coarray_13.f90: Avoid out-of-bounds access.


Modified:
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gfortran.dg/coarray_13.f90


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

* [Bug regression/48477] [4.7 Regression]: gfortran.dg/coarray_13.f90
  2011-04-06  6:50 [Bug regression/48477] New: [4.7 Regression]: gfortran.dg/coarray_13.f90 hp at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2011-04-06 18:32 ` burnus at gcc dot gnu.org
@ 2011-04-06 22:51 ` burnus at gcc dot gnu.org
  2011-04-07  0:18 ` hp at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: burnus at gcc dot gnu.org @ 2011-04-06 22:51 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-04-06 22:51:30 UTC ---
Please confirm that it now works - and if so, please close the PR.

Thanks for the report!


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

* [Bug regression/48477] [4.7 Regression]: gfortran.dg/coarray_13.f90
  2011-04-06  6:50 [Bug regression/48477] New: [4.7 Regression]: gfortran.dg/coarray_13.f90 hp at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2011-04-06 22:51 ` burnus at gcc dot gnu.org
@ 2011-04-07  0:18 ` hp at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: hp at gcc dot gnu.org @ 2011-04-07  0:18 UTC (permalink / raw)
  To: gcc-bugs

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

Hans-Peter Nilsson <hp at gcc dot gnu.org> changed:

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

--- Comment #4 from Hans-Peter Nilsson <hp at gcc dot gnu.org> 2011-04-07 00:16:46 UTC ---
(In reply to comment #3)
> Please confirm that it now works - and if so, please close the PR.

My autotester is back to no regressions at r172064.
Thanks for the quick turnaround!


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

end of thread, other threads:[~2011-04-07  0:18 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-06  6:50 [Bug regression/48477] New: [4.7 Regression]: gfortran.dg/coarray_13.f90 hp at gcc dot gnu.org
2011-04-06 10:10 ` [Bug regression/48477] " rguenth at gcc dot gnu.org
2011-04-06 13:04 ` burnus at gcc dot gnu.org
2011-04-06 18:32 ` burnus at gcc dot gnu.org
2011-04-06 22:51 ` burnus at gcc dot gnu.org
2011-04-07  0:18 ` hp 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).