[Bug fortran/46408] New: [OOP] Segfault when running gfortran.dg/class_allocate_6.f03
burnus at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Nov 10 10:39:00 GMT 2010
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46408
Summary: [OOP] Segfault when running
gfortran.dg/class_allocate_6.f03
Product: gcc
Version: 4.6.0
Status: UNCONFIRMED
Keywords: wrong-code
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: burnus@gcc.gnu.org
CC: janus@gcc.gnu.org
This might be a known problem, but the test case
gfortran.dg/class_allocate_6.f03
fails for me. (The test was added for PR 45451 / PR 46174, which does a deep
copy.)
To be precise, I get a segfault using when executing the line:
allocate(y, source=x)
A "PRINT" statement placed directly after that line will not be printed, i.e.
it is not a finally/cleanup issue.
The segfault disappears if I unset MALLOC_PERTURB_ which indicates the use of
an uninitialized variable.
Valgrind shows:
Conditional jump or move depends on uninitialised value(s)
at 0x400C37: __copy_MAIN___t2.1547 (class_allocate_6.f03:7)
by 0x400ED4: MAIN__ (class_allocate_6.f03:48)
by 0x400FD7: main (class_allocate_6.f03:48)
Related: PR 46321 (deep-freeing of polymorphic variables)
More information about the Gcc-bugs
mailing list