From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21130 invoked by alias); 11 Nov 2012 17:37:54 -0000 Received: (qmail 18717 invoked by uid 48); 11 Nov 2012 17:37:35 -0000 From: "dominiq at lps dot ens.fr" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/55272] New: [4.8 Regression] ICE on passing coarray argument between files Date: Sun, 11 Nov 2012 17:37: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-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: dominiq at lps dot ens.fr X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 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 X-SW-Source: 2012-11/txt/msg00941.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55272 Bug #: 55272 Summary: [4.8 Regression] ICE on passing coarray argument between files Classification: Unclassified Product: gcc Version: 4.8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned@gcc.gnu.org ReportedBy: dominiq@lps.ens.fr CC: burnus@gcc.gnu.org >>From http://gcc.gnu.org/ml/fortran/2012-11/msg00021.html $ cat co_sum_module.f90 module co_sum_module implicit none contains subroutine co_sum(scalar) integer scalar[*] end subroutine end module $ cat league.f90 program main use co_sum_module implicit none integer score[*] call co_sum(score) end program $ gfortran -c -fcoarray=single co_sum_module.f90 $ gfortran -fcoarray=single league.f90 co_sum_module.o league.f90: In function 'MAIN__': league.f90:5:0: internal compiler error: Segmentation fault: 11 call co_sum(score) Revision 189780 (2012-07-23) is OK, revision 189986 (2012-07-30) gives the ICE. The backtrace at r193387 is #0 gfc_get_nodesc_array_type (etype=, as=, packed=, restricted=) at ../../_clean/gcc/fortran/trans-types.c:1574 #1 0x000000010011f778 in gfc_sym_type (sym=) at ../../_clean/gcc/fortran/trans-types.c:2157 #2 0x000000010011e3a5 in gfc_get_function_type (sym=) at ../../_clean/gcc/fortran/trans-types.c:2766 #3 0x00000001000e3bbe in gfc_get_extern_function_decl (sym=) at ../../_clean/gcc/fortran/trans-decl.c:1750 #4 0x00000001000efbf2 in gfc_conv_procedure_call (se=, sym=, args=, expr=, append_args=) at ../../_clean/gcc/fortran/trans-expr.c:2675 #5 0x0000000100111b20 in gfc_trans_call (code=, dependency_check=, mask=, count1=, invert=) at ../../_clean/gcc/fortran/trans-stmt.c:407 #6 0x00000001000c85f0 in trans_code (code=0x141514fb0, cond=0x0) at ../../_clean/gcc/fortran/trans.c:1385 #7 0x00000001000e7004 in gfc_generate_function_code (ns=) at ../../_clean/gcc/fortran/trans-decl.c:5349 #8 0x000000010008465f in gfc_parse_file () at ../../_clean/gcc/fortran/parse.c:4634 #9 0x00000001000c4376 in gfc_be_parse_file () at ../../_clean/gcc/fortran/f95-lang.c:191 #10 0x000000010066a509 in compile_file () at ../../_clean/gcc/toplev.c:544 #11 0x000000010066c369 in toplev_main (argc=4, argv=0x7fff5fbfd758) at ../../_clean/gcc/toplev.c:1864 #12 0x000000010000acb4 in start (pc=, bases=0x0) at ../../../_clean/libgcc/config/unwind-dw2-fde-darwin.c:271 The ICE disappears if I revert revision 189881 on top of 193391. Note that the ICE can be reproduced with a single file compiled with -fcoarray=single -fno-whole-file.