public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "alipasha.celeris at gmail dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/56136] New: Compiler fails when code contains lhs-reallocation of an object with overloaded (elemental) Assignment operator Date: Tue, 29 Jan 2013 03:12:00 -0000 [thread overview] Message-ID: <bug-56136-4@http.gcc.gnu.org/bugzilla/> (raw) http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56136 Bug #: 56136 Summary: Compiler fails when code contains lhs-reallocation of an object with overloaded (elemental) Assignment operator Classification: Unclassified Product: gcc Version: 4.8.0 Status: UNCONFIRMED Severity: major Priority: P3 Component: fortran AssignedTo: unassigned@gcc.gnu.org ReportedBy: alipasha.celeris@gmail.com Created attachment 29299 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=29299 The code that causes compiler crash Upon compiling the following code using GNU Fortran (GCC) 4.8.0 20130128 (experimental): MODULE A_TEST_M TYPE :: A_TYPE CONTAINS GENERIC :: ASSIGNMENT (=) => ASGN_A PROCEDURE, PRIVATE :: ASGN_A END TYPE CONTAINS ELEMENTAL SUBROUTINE ASGN_A (A, B) CLASS (A_TYPE), INTENT (INOUT) :: A CLASS (A_TYPE), INTENT (IN) :: B END SUBROUTINE END MODULE A_TEST_M PROGRAM ASGN_REALLOC_TEST USE A_TEST_M TYPE (A_TYPE), ALLOCATABLE :: A(:) ALLOCATE (A(100)) A(1:50) = A(51:100) A = A(1:50) END PROGRAM placed in file "asgn_realloc_test.f" with compile call: user@machine:~/../quicktest$ gfortran asgn_realloc_test.f causes compiler to crash with the following messages: asgn_realloc_test.f: In function ‘test’: asgn_realloc_test.f:22:0: internal compiler error: in gfc_conv_variable, at fortran/trans-expr.c:1658 A = A(1:50) ^ 0x5db000 gfc_conv_variable ../.././gcc/fortran/trans-expr.c:1658 0x5d75ca gfc_conv_expr(gfc_se*, gfc_expr*) ../.././gcc/fortran/trans-expr.c:6263 0x5dbef3 gfc_conv_expr_reference(gfc_se*, gfc_expr*) ../.././gcc/fortran/trans-expr.c:6357 0x5dc2fa gfc_conv_derived_to_class(gfc_se*, gfc_expr*, gfc_typespec, tree_node*, bool, bool) ../.././gcc/fortran/trans-expr.c:305 0x5d426a gfc_conv_procedure_call(gfc_se*, gfc_symbol*, gfc_actual_arglist*, gfc_expr*, vec<tree_node*, va_gc, vl_embed>*) ../.././gcc/fortran/trans-expr.c:4087 0x5ff84c gfc_trans_call(gfc_code*, bool, tree_node*, tree_node*, bool) ../.././gcc/fortran/trans-stmt.c:491 0x5a4663 trans_code ../.././gcc/fortran/trans.c:1511 0x5cb57e gfc_generate_function_code(gfc_namespace*) ../.././gcc/fortran/trans-decl.c:5390 0x564390 translate_all_program_units ../.././gcc/fortran/parse.c:4463 0x564390 gfc_parse_file() ../.././gcc/fortran/parse.c:4677 0x59fe75 gfc_be_parse_file ../.././gcc/fortran/f95-lang.c:189 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <http://gcc.gnu.org/bugs.html> for instructions. Note that the line before the reallocating assignment (A(1:50) = A(51:100)) will not cause errors. Compiler was configured using: sudo LIBRARY_PATH=/usr/lib/x86_64-linux-gnu ./configure --enable-languages=c,c++,fortran --enable-libgomp --enable-lto --enable-gold --with-plugin-ld=/usr/bin/gold on Ubuntu: Release 12.04 (precise) 64-bit Kernel Linux 3.2.0-36-generic
next reply other threads:[~2013-01-29 3:12 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2013-01-29 3:12 alipasha.celeris at gmail dot com [this message] 2013-01-29 8:39 ` [Bug fortran/56136] [OOP] ICE on lhs-reallocation of an object with overloaded (elemental) assignment operator janus at gcc dot gnu.org 2013-06-14 15:17 ` dominiq at lps dot ens.fr 2013-06-15 10:59 ` mikael at gcc dot gnu.org 2013-06-15 21:25 ` mikael at gcc dot gnu.org 2013-06-15 21:28 ` mikael 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-56136-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: linkBe 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).