This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/78392] ICE in gfc_trans_auto_array_allocation, at fortran/trans-array.c:5979


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78392

janus at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-valid-code
                 CC|                            |dominiq at lps dot ens.fr

--- Comment #1 from janus at gcc dot gnu.org ---
When removing the SAVE attribute ...


module mytypes
   implicit none
 contains
   pure integer function get_i ()
     get_i = 13
   end function
end module

program test
  use mytypes
  implicit none
  integer, dimension(get_i()) :: x
  print *, size (x)
end


... it compiles fine with all tested versions. However, this variant is a
regression of the patch for PR 55207, see:

https://gcc.gnu.org/ml/fortran/2014-03/msg00108.html

However, as comment 0 shows, it is not a problem introduced with that patch,
but it is rather a long-standing problem that is only uncovered by the patch
(according to F08, variables in the main PROGRAM implicitly get the SAVE
attribute).

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]