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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |burnus at gcc dot gnu.org,
                   |                            |therobbot at gmail dot com

--- Comment #5 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-02-28 
16:11:08 UTC ---
Robert Hayward wrote in comment #4:
> Created attachment 26770 [details]
> test program to reproduce bug

Please do not attach test cases to random bugreports! But create a new bug
report and put more information in the report. -- Except that both issues are
related to Fortran 2003's (re)allocation on intrinsic assignment, they do not
have anything in common.

The issue of comment 4 / Robert Hayward's issue is a bug in gfortran 4.6/4.7,
which has been been reported in PR 52012 and fixed around 2012-01-31. Please
try a newer version of GCC 4.6/4.7 - or use -fno-realloc-lhs as work around.



(The issue in comment 0 is a bug in the original reporter's program for Fortran
90/95: The shape on the right and on the left have to be the same. The proper
assignment should have been one of the following:
  ivec(1:2) = [1,2]
  ivec(2:3) = [1,2]
  ivec(1:2:2) = [1,2] ! or   ivec([1,3]) = [1,2]

With Fortran 2003, the program became valid - as the compiler reallocated
"ivec" with the shape of the right side.

With -std=f95 or if the left-hand side weren't allocatable, -fcheck=bounds had
given a run-time error.)

Reply via email to