public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "dominiq at lps dot ens.fr" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/62044] [4.8/4.9 Regression] ICE in USE statement with RENAME for extended derived type
Date: Mon, 26 Jan 2015 11:55:00 -0000	[thread overview]
Message-ID: <bug-62044-4-GL1uEhE22o@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-62044-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62044

--- Comment #7 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
> The following, which works OK with another brand, selects the "wrong type"
> with trunk. 4.9 still segfaults. Without the use rename, 4.9 runs and gives
> the wrong result.

The following test without module also selects the "wrong type" when compiled
with 4.8 up to 5.0

  implicit none
  type, abstract :: GridImageSiloTemplate
  end type GridImageSiloTemplate

  type, extends ( GridImageSiloTemplate ) :: &
    UnstructuredGridImageSiloForm
  end type UnstructuredGridImageSiloForm

  call foo
contains
  subroutine foo
    class (GridImageSiloTemplate), allocatable :: a
    type (UnstructuredGridImageSiloForm) :: b
    allocate (a, mold = b)
    select type (a)
      type is (UnstructuredGridImageSiloForm)
        print *, "correct type selected"
      class default
        print *, "wrong type"
    end select
  end subroutine
end


  parent reply	other threads:[~2015-01-26 11:55 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-07  2:41 [Bug fortran/62044] New: " reubendb at gmail dot com
2014-08-11  8:32 ` [Bug fortran/62044] [4.8/4.9/4.10 Regression] " dominiq at lps dot ens.fr
2014-11-19 13:28 ` [Bug fortran/62044] [4.8/4.9/5 " rguenth at gcc dot gnu.org
2014-11-24 13:05 ` rguenth at gcc dot gnu.org
2014-12-19 13:42 ` jakub at gcc dot gnu.org
2015-01-14  8:31 ` janus at gcc dot gnu.org
2015-01-25 20:39 ` mikael at gcc dot gnu.org
2015-01-25 21:00 ` [Bug fortran/62044] [4.8/4.9 " mikael at gcc dot gnu.org
2015-01-26  6:40 ` paul.richard.thomas at gmail dot com
2015-01-26 11:55 ` dominiq at lps dot ens.fr [this message]
2015-01-26 13:06 ` mikael at gcc dot gnu.org
2015-01-26 13:11 ` mikael at gcc dot gnu.org
2015-01-26 18:12 ` paul.richard.thomas at gmail dot com
2015-01-26 18:20 ` paul.richard.thomas at gmail dot com
2015-01-26 19:51 ` paul.richard.thomas at gmail dot com
2015-01-26 20:13 ` damian at sourceryinstitute dot org
2015-01-26 20:20 ` damian at sourceryinstitute dot org
2015-01-26 21:59 ` pault at gcc dot gnu.org
2015-01-27 20:55 ` pault at gcc dot gnu.org
2015-01-27 21:04 ` pault 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-62044-4-GL1uEhE22o@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).