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/56596] Invalid read of size 4 gfortran.dg/class_array_7.f03
Date: Wed, 13 Mar 2013 14:18:00 -0000	[thread overview]
Message-ID: <bug-56596-4-ZifWoJE46Q@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-56596-4@http.gcc.gnu.org/bugzilla/>


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

janus at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |wrong-code
                 CC|                            |janus at gcc dot gnu.org

--- Comment #1 from janus at gcc dot gnu.org 2013-03-13 14:17:40 UTC ---
Reduced test case:


program main
  implicit none

  type :: base_type
    integer :: i
  end type

  type, extends(base_type) :: extended_type
    integer :: j
  end type

  class(base_type), dimension(:), allocatable :: a
  type(extended_type), dimension(1:2) :: tmp

  allocate (extended_type :: a(2))

  tmp%i=a%i
end


I think the problem is in the allocate statement:

a._data.data = (void * restrict) __builtin_malloc (8);

The allocation size seems to be independent of whether one allocates with
"base_type" or "extended type".


  reply	other threads:[~2013-03-13 14:18 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-11 13:54 [Bug fortran/56596] New: " dominiq at lps dot ens.fr
2013-03-13 14:18 ` janus at gcc dot gnu.org [this message]
2013-06-27 10:00 ` [Bug fortran/56596] " dominiq at lps dot ens.fr
2013-06-27 21:46 ` dominiq at lps dot ens.fr
2013-06-28  7:10 ` burnus at gcc dot gnu.org
2013-06-29 22:07 ` dominiq at lps dot ens.fr
2013-06-30 15:25 ` dominiq at lps dot ens.fr

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-56596-4-ZifWoJE46Q@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).