From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10134 invoked by alias); 19 Jan 2015 17:03:44 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 10101 invoked by uid 48); 19 Jan 2015 17:03:37 -0000 From: "antony at cosmologist dot info" 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 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Version: fortran-dev X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: antony at cosmologist dot info X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-01/txt/msg01863.txt.bz2 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.