This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/59881] New: Memory corruption with allocatable arrays in polymorphic types
- From: "juergen.reuter at desy dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 19 Jan 2014 17:16:19 +0000
- Subject: [Bug fortran/59881] New: Memory corruption with allocatable arrays in polymorphic types
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59881
Bug ID: 59881
Summary: Memory corruption with allocatable arrays in
polymorphic types
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: juergen.reuter at desy dot de
Created attachment 31891
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31891&action=edit
Tar ball that produces code triggering the memory corruption.
The code attached (unpack, do make, make run) triggers the memory leak. Sorry
for not being able/having time to reduce the case further. The propgram
./seg_prod reads in the file structure_5.sin specifying a scan over integer and
real values that is steered in commands.f90 via the type range_t. First there
is some test output (the internal tree-like syntax structure we use),the
trivial examples pass, the final example with a multi-component range fails.
The example works with gfortran 4.8.x and 4.9.0, but fails with all 4.7.x.
Sometimes the values are forgotten, sometimes a memory leak appears. We were
able to program around this, but nevertheless wanted to file a bug report.
Here in our svn commit you can see how we basically removed one layer of
polymorphism for the type range_t:
https://whizard.hepforge.org/trac/changeset/5096
Furthermore, the finalizer range_final then worked again. Hope, you can boil
this down to the essential part.