public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "antony at cosmologist dot info" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/64674] New: OOP Internal compiler error in associate with allocated class
Date: Mon, 19 Jan 2015 17:03:00 -0000	[thread overview]
Message-ID: <bug-64674-4@http.gcc.gnu.org/bugzilla/> (raw)

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

            Bug ID: 64674
           Summary: OOP Internal compiler error in associate with
                    allocated class
           Product: gcc
           Version: fortran-dev
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: antony at cosmologist dot info

On latest trunk

module X
  Type T
   integer :: map
  end Type T
contains

subroutine DoBug
   class(T), allocatable :: Cls(:,:)

   allocate(T::Cls(2, 2))
   associate(CL => Cls(1,2))
      CL%map = 2
   end associate

end subroutine
end module X

gives

testbug.f90:12:0:

       CL%map = 2
 1
internal compiler error: in gfc_conv_component_ref, at
fortran/trans-expr.c:1954
0x82e588e gfc_conv_component_ref
    ../../gcc-trunk/gcc/fortran/trans-expr.c:1954
0x82ed630 gfc_conv_variable
    ../../gcc-trunk/gcc/fortran/trans-expr.c:2211
0x82eaea0 gfc_conv_expr(gfc_se*, gfc_expr*)
    ../../gcc-trunk/gcc/fortran/trans-expr.c:6836
0x82f856d gfc_trans_assignment_1
    ../../gcc-trunk/gcc/fortran/trans-expr.c:8568
0x82f9a75 gfc_trans_assign(gfc_code*)
    ../../gcc-trunk/gcc/fortran/trans-expr.c:8765
0x82b836d trans_code
    ../../gcc-trunk/gcc/fortran/trans.c:1650
0x832b3f7 gfc_trans_block_construct(gfc_code*)
    ../../gcc-trunk/gcc/fortran/trans-stmt.c:1456
0x82b80c8 trans_code
    ../../gcc-trunk/gcc/fortran/trans.c:1755
0x82e1f55 gfc_generate_function_code(gfc_namespace*)
    ../../gcc-trunk/gcc/fortran/trans-decl.c:5843
0x82bc482 gfc_generate_module_code(gfc_namespace*)
    ../../gcc-trunk/gcc/fortran/trans.c:2021
0x82761ba translate_all_program_units
    ../../gcc-trunk/gcc/fortran/parse.c:5328
0x82761ba gfc_parse_file()
    ../../gcc-trunk/gcc/fortran/parse.c:5538
0x82b436b gfc_be_parse_file
    ../../gcc-trunk/gcc/fortran/f95-lang.c:228
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.

If you change class(T) to type(T) it compiles OK.


             reply	other threads:[~2015-01-19 17:03 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-19 17:03 antony at cosmologist dot info [this message]
2015-01-19 22:09 ` [Bug fortran/64674] [OOP] ICE in ASSOCIATE " janus at gcc dot gnu.org
2015-02-09 11:14 ` [Bug fortran/64674] [OOP] ICE in ASSOCIATE with class array dominiq at lps dot ens.fr
2015-05-04 15:08 ` vehre at gcc dot gnu.org
2015-05-04 15:10 ` vehre at gcc dot gnu.org
2015-06-23  9:07 ` vehre at gcc dot gnu.org
2015-07-03  8:16 ` vehre 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-64674-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).