From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10296 invoked by alias); 31 Jan 2012 15:53:02 -0000 Received: (qmail 10019 invoked by uid 22791); 31 Jan 2012 15:52:58 -0000 X-SWARE-Spam-Status: No, hits=-2.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,TW_EP X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 31 Jan 2012 15:52:45 +0000 From: "dominiq at lps dot ens.fr" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/51522] ICE in gfortran 4.6.2, x86_64 Date: Tue, 31 Jan 2012 16:11:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Keywords: error-recovery X-Bugzilla-Severity: normal X-Bugzilla-Who: dominiq at lps dot ens.fr X-Bugzilla-Status: REOPENED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Status CC Resolution Message-ID: In-Reply-To: References: 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-01/txt/msg03698.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51522 Dominique d'Humieres changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED CC| |jb at gcc dot gnu.org Resolution|FIXED | --- Comment #4 from Dominique d'Humieres 2012-01-31 15:52:19 UTC --- Revision 183681 Author: jb Date: Sun Jan 29 20:29:50 2012 UTC (43 hours, 17 minutes ago) Changed paths: 2 Log Message: Reduce size of pointer_info tree, minor cleanups. 2012-01-29 Janne Blomqvist * module.c (pointer_info): Make true_name and module pointers rather than arrays, order pointers before other fields. (free_pi_tree): free true_name and module as well. (mio_read_string): Rename to read_string. (mio_write_string): Remove. (load_commons): Use read_string. (read_module): Use read_string rather than mio_internal_string. (write_blank_common): Call write_atom directly. (write_symbol): Likewise. gives again an ICE for the test case and the reduced one below. Since I see in comment #2: > With the patch for PR 51578 (for GCC 4.7), the ICE is fixed. For the lines ... I cannot decide if the bug has been really fixed or only hidden, so I reopen the PR. Revision 183680 does not give any ICE [macbook] f90/bug% /opt/gcc/gcc4.7p-183680/bin/gfortran -w pr51522_red.f90 pr51522_red.f90:94.10: integer(c_int) function vect_Utils_vuTriIneqHolds_c(u, v, tol, exception) & 1 Error: Parameter 'c_int' at (1) has not been declared or is a variable, which does not reduce to a constant expression pr51522_red.f90:96.7: real(c_double) function vect_Utils_vuNorm_c(u, tol, badLevel, exception) bind 1 Error: Parameter 'c_double' at (1) has not been declared or is a variable, which does not reduce to a constant expression while r183681 does [macbook] f90/bug% /opt/gcc/gcc4.7p-183681/bin/gfortran -w pr51522_red.f90 pr51522_red.f90:94.10: integer(c_int) function vect_Utils_vuTriIneqHolds_c(u, v, tol, exception) & 1 Error: Parameter 'c_int' at (1) has not been declared or is a variable, which does not reduce to a constant expression pr51522_red.f90:96.7: real(c_double) function vect_Utils_vuNorm_c(u, tol, badLevel, exception) bind 1 Error: Parameter 'c_double' at (1) has not been declared or is a variable, which does not reduce to a constant expression f951: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See for instructions. This is how much I can reduce the original test. Commenting any line in the first two derived types make the ICE to go away (I lost patience after that;-). Also trying to avoid the ton of warnings by defining the arguments in the last interface block makes the ICE to go away. module vect_Utils_type_F03 use, intrinsic :: iso_c_binding type, bind(c) :: vect_Utils_sepv_t type(c_funptr) :: f__set_hooks_static type(c_funptr) :: f__set_contracts_static type(c_funptr) :: f__dump_stats_static type(c_funptr) :: f_vuIsZero type(c_funptr) :: f_vuIsUnit type(c_funptr) :: f_vuAreEqual type(c_funptr) :: f_vuAreOrth type(c_funptr) :: f_vuSchwarzHolds type(c_funptr) :: f_vuTriIneqHolds type(c_funptr) :: f_vuDot type(c_funptr) :: f_vuProduct type(c_funptr) :: f_vuNegate type(c_funptr) :: f_vuNormalize type(c_funptr) :: f_vuSum type(c_funptr) :: f_vuDiff end type type, bind(c) :: vect_Utils_epv_t type(c_funptr) :: f__cast type(c_funptr) :: f__delete type(c_funptr) :: f__exec type(c_funptr) :: f__getURL type(c_funptr) :: f__raddRef type(c_funptr) :: f__isRemote type(c_funptr) :: f__set_hooks type(c_funptr) :: f__set_contracts type(c_funptr) :: f__dump_stats type(c_funptr) :: f__ctor type(c_funptr) :: f__ctor2 type(c_funptr) :: f__dtor type(c_funptr) :: f__load type(c_funptr) :: f_addRef type(c_funptr) :: f_deleteRef type(c_funptr) :: f_isSame type(c_funptr) :: f_isType type(c_funptr) :: f_getClassInfo end type type, bind(c) :: vect_Utils_pre_epv_t integer(c_int) :: avoid_empty_type end type type, bind(c) :: vect_Utils_post_sepv_t type(c_funptr) :: f_vuIsUnit_post type(c_funptr) :: f_vuAreEqual_post type(c_funptr) :: f_vuAreOrth_post type(c_funptr) :: f_vuSchwarzHolds_post type(c_funptr) :: f_vuTriIneqHolds_post type(c_funptr) :: f_vuNorm_post type(c_funptr) :: f_vuDot_post type(c_funptr) :: f_vuProduct_post type(c_funptr) :: f_vuNegate_post type(c_funptr) :: f_vuNormalize_post type(c_funptr) :: f_vuSum_post type(c_funptr) :: f_vuDiff_post end type type, bind(c) :: vect_Utils_pre_sepv_t type(c_funptr) :: f_vuIsZero_pre type(c_funptr) :: f_vuIsUnit_pre type(c_funptr) :: f_vuAreEqual_pre type(c_funptr) :: f_vuAreOrth_pre type(c_funptr) :: f_vuSchwarzHolds_pre type(c_funptr) :: f_vuTriIneqHolds_pre type(c_funptr) :: f_vuNorm_pre type(c_funptr) :: f_vuDot_pre type(c_funptr) :: f_vuProduct_pre type(c_funptr) :: f_vuNegate_pre type(c_funptr) :: f_vuNormalize_pre type(c_funptr) :: f_vuSum_pre type(c_funptr) :: f_vuDiff_pre end type type vect_Utils_t type(c_ptr) :: d_ior = c_null_ptr type(vect_Utils_epv_t), pointer :: d_epv => null() end type vect_Utils_t interface cache_epv module procedure cache_epv_s end interface cache_epv contains subroutine cache_epv_s(self) implicit none class(vect_Utils_t) :: self end subroutine cache_epv_s end module vect_Utils_type_F03 module vect_Utils_F03 use vect_Utils_type_F03 interface type(c_ptr) function get_sepv_c() bind(c, name="vect_Utils_getSEPV") use, intrinsic :: iso_c_binding end function get_sepv_c integer(c_int) function vect_Utils_vuIsUnit_c(u, tol, exception) bind(c) use, intrinsic :: iso_c_binding end function vect_Utils_vuIsUnit_c integer(c_int) function vect_Utils_vuTriIneqHolds_c(u, v, tol, exception) & use, intrinsic :: iso_c_binding real(c_double) function vect_Utils_vuNorm_c(u, tol, badLevel, exception) bind(c) end function vect_Utils_vuNorm_c end interface end module vect_Utils_F03