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/54990] New: [4.8 Regression] [OOP] ICE in tree_operand_check on SELECT TYPE
Date: Fri, 19 Oct 2012 17:08:00 -0000	[thread overview]
Message-ID: <bug-54990-4@http.gcc.gnu.org/bugzilla/> (raw)


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

             Bug #: 54990
           Summary: [4.8 Regression] [OOP] ICE in tree_operand_check on
                    SELECT TYPE
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: janus@gcc.gnu.org
                CC: abensonca@gmail.com


Reported by Andrew Benson at
http://gcc.gnu.org/ml/fortran/2012-10/msg00094.html. Reduced test case:


program test
  implicit none

  type :: ncBhStd
  end type

  type :: tn
    class (ncBhStd), allocatable, dimension(:) :: cBh
  end type

  type(tn), target :: a

  select type (q => a%cBh(1))
  end select

end


Compiles cleanly with 4.7, but trunk gives the following ICE:


internal compiler error: tree check: expected class ‘expression’, have
‘declaration’ (var_decl) in tree_operand_check, at tree.h:4109
 program test
 ^
linux-vdso.so.1: No such file or directory
0xcf07be tree_class_check_failed(tree_node const*, tree_code_class, char
const*, int, char const*)
        /home/jweil/gcc48/trunk/gcc/tree.c:8947
0x62d6a8 expr_check
        /home/jweil/gcc48/trunk/gcc/tree.h:3845
0x62d6a8 tree_operand_check
        /home/jweil/gcc48/trunk/gcc/tree.h:4109
0x62d6a8 gfc_get_vptr_from_expr(tree_node*)
        /home/jweil/gcc48/trunk/gcc/fortran/trans-expr.c:199
0x667411 trans_associate_var
        /home/jweil/gcc48/trunk/gcc/fortran/trans-stmt.c:1256
0x66771c gfc_trans_block_construct(gfc_code*)
        /home/jweil/gcc48/trunk/gcc/fortran/trans-stmt.c:1319
0x5fb900 trans_code
        /home/jweil/gcc48/trunk/gcc/fortran/trans.c:1412
0x5fbc62 gfc_trans_code(gfc_code*)
        /home/jweil/gcc48/trunk/gcc/fortran/trans.c:1573
0x62add7 gfc_generate_function_code(gfc_namespace*)
        /home/jweil/gcc48/trunk/gcc/fortran/trans-decl.c:5353
0x5fbca6 gfc_generate_code(gfc_namespace*)
        /home/jweil/gcc48/trunk/gcc/fortran/trans.c:1590
0x59d211 translate_all_program_units
        /home/jweil/gcc48/trunk/gcc/fortran/parse.c:4467
0x59d877 gfc_parse_file()
        /home/jweil/gcc48/trunk/gcc/fortran/parse.c:4681
0x5e8900 gfc_be_parse_file
        /home/jweil/gcc48/trunk/gcc/fortran/f95-lang.c:191


             reply	other threads:[~2012-10-19 17:08 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-19 17:08 janus at gcc dot gnu.org [this message]
2012-10-22  9:09 ` [Bug fortran/54990] " rguenth at gcc dot gnu.org
2012-11-07 13:15 ` jakub at gcc dot gnu.org
2012-12-16 15:27 ` pault at gcc dot gnu.org
2013-01-07  9:06 ` pault at gcc dot gnu.org
2013-01-07 19:11 ` 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-54990-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).