public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "janus at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/47085] [OOP] Problem in allocate( SOURCE=)  for polymorphic component
Date: Wed, 29 Dec 2010 22:39:00 -0000	[thread overview]
Message-ID: <bug-47085-4-gVr2Znyor2@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-47085-4@http.gcc.gnu.org/bugzilla/>

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47085

janus at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2010.12.29 22:39:46
     Ever Confirmed|0                           |1

--- Comment #1 from janus at gcc dot gnu.org 2010-12-29 22:39:46 UTC ---
I have reduced the test case quite a bit, while maintaining the valgrind error:


program ppde
  implicit none

  type :: t0
  end type

  type, extends(t0) :: t1
    integer, allocatable :: c(:)
  end type

  class(t0), allocatable :: x, y

  allocate(t1 :: x)
  allocate(y, source=x) 

end


When compiling this with -g and running under valgrind, I get:

==26472== Conditional jump or move depends on uninitialised value(s)
==26472==    at 0x4009B7: __copy_ppde_t1.1550 (ppde.f90:1)
==26472==    by 0x400AD1: MAIN__ (ppde.f90:16)
==26472==    by 0x400B74: main (ppde.f90:16)

This means the error happens inside the copying routine of the extended type,
and seems to be related to the allocatable component. In the original test case
the error message appeared in a triple, because three allocatable components
were involved. This is the same issue as described in PR 46408.


  reply	other threads:[~2010-12-29 22:39 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-28 20:40 [Bug fortran/47085] New: " sfilippone at uniroma2 dot it
2010-12-29 22:39 ` janus at gcc dot gnu.org [this message]
2010-12-29 22:44 ` [Bug fortran/47085] " janus at gcc dot gnu.org
2010-12-30 11:53 ` janus at gcc dot gnu.org
2011-01-02 17:52 ` janus at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-47085-4-gVr2Znyor2@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).