public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "pault at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/64943] New: No error on ultimate allocatable components in IO list
Date: Thu, 05 Feb 2015 08:16:00 -0000	[thread overview]
Message-ID: <bug-64943-4@http.gcc.gnu.org/bugzilla/> (raw)

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

            Bug ID: 64943
           Summary: No error on ultimate allocatable components in IO list
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: pault at gcc dot gnu.org

With this wrong code (other brand: Variables containing ultimate allocatable
array components are forbidden from appearing directly in input/output lists.
print *, TestReference([Test(99), Test(199)])):

  type :: Test
    integer :: i
  end type

  type :: TestReference
     class(Test), allocatable :: test(:)
  end type
print *, TestReference([Test(99), Test(199)])
end

5.0 gives:

f951: internal compiler error: Bad IO basetype (7)
0x62a1fb gfc_internal_error(char const*, ...)
    ../../trunk/gcc/fortran/error.c:1486
0x71738b transfer_expr
    ../../trunk/gcc/fortran/trans-io.c:2265
0x71724a transfer_expr
    ../../trunk/gcc/fortran/trans-io.c:2259
0x71ad25 gfc_trans_transfer(gfc_code*)
    ../../trunk/gcc/fortran/trans-io.c:2395
0x6ba7e7 trans_code
    ../../trunk/gcc/fortran/trans.c:1853
0x718790 build_dt
    ../../trunk/gcc/fortran/trans-io.c:1921
0x6ba807 trans_code
    ../../trunk/gcc/fortran/trans.c:1825
0x6e6008 gfc_generate_function_code(gfc_namespace*)
    ../../trunk/gcc/fortran/trans-decl.c:5842
0x6778c0 translate_all_program_units
    ../../trunk/gcc/fortran/parse.c:5341
0x6778c0 gfc_parse_file()
    ../../trunk/gcc/fortran/parse.c:5538
0x6b7675 gfc_be_parse_file
    ../../trunk/gcc/fortran/f95-lang.c:228


             reply	other threads:[~2015-02-05  8:16 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-05  8:16 pault at gcc dot gnu.org [this message]
2015-02-05 12:14 ` [Bug fortran/64943] " dominiq at lps dot ens.fr
2015-02-05 12:36 ` burnus at gcc dot gnu.org
2015-02-05 12:39 ` burnus at gcc dot gnu.org
2015-02-05 21:59 ` burnus at gcc dot gnu.org
2015-02-05 22:00 ` burnus 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-64943-4@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).