public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/46408] New: [OOP] Segfault when running gfortran.dg/class_allocate_6.f03
@ 2010-11-10 10:39 burnus at gcc dot gnu.org
  2010-11-10 13:05 ` [Bug fortran/46408] " janus at gcc dot gnu.org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: burnus at gcc dot gnu.org @ 2010-11-10 10:39 UTC (permalink / raw)
  To: gcc-bugs

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)


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2011-01-02 21:20 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-10 10:39 [Bug fortran/46408] New: [OOP] Segfault when running gfortran.dg/class_allocate_6.f03 burnus at gcc dot gnu.org
2010-11-10 13:05 ` [Bug fortran/46408] " janus at gcc dot gnu.org
2010-11-11 10:09 ` burnus at gcc dot gnu.org
2010-11-20 22:02 ` danglin at gcc dot gnu.org
2011-01-02 15:58 ` janus at gcc dot gnu.org
2011-01-02 16:24 ` janus at gcc dot gnu.org
2011-01-02 17:51 ` janus at gcc dot gnu.org
2011-01-02 19:02 ` janus at gcc dot gnu.org
2011-01-02 19:24 ` janus at gcc dot gnu.org
2011-01-02 21:02 ` janus at gcc dot gnu.org
2011-01-02 21:20 ` janus at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).