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/66578] [F2008] Invalid free on allocate(...,source=a(:)) in block


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

--- Comment #6 from vehre at gcc dot gnu.org ---
c= a(:) works because there is no additional array descriptor inbetween. 

The (new) allocate gets its own temporary array descriptor for the source=
expression, which in turn has incorrect bounds in it. The arrayspec is an
AS_DEFERRED which is then used to generate the temporary array descriptor and
defaults to a lower bound of zero, where all the miserable things begin with.


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