[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gcc-bugs
Subject:    [Bug fortran/51522] ICE in gfortran 4.6.2, x86_64
From:       "dominiq at lps dot ens.fr" <gcc-bugzilla () gcc ! gnu ! org>
Date:       2012-01-31 15:52:19
Message-ID: bug-51522-4-W4vRtvxp5o () http ! gcc ! gnu ! org/bugzilla/
[Download RAW message or body]

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51522

Dominique d'Humieres <dominiq at lps dot ens.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
                 CC|                            |jb at gcc dot gnu.org
         Resolution|FIXED                       |

--- Comment #4 from Dominique d'Humieres <dominiq at lps dot ens.fr> 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  <jb@gcc.gnu.org>

    * 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 <http://gcc.gnu.org/bugs.html> 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
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic