[Bug fortran/78557] New: [7.0 regression] ICE in trans-expr.c with -fcheck=all
juergen.reuter at desy dot de
gcc-bugzilla@gcc.gnu.org
Mon Nov 28 09:21:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78557
Bug ID: 78557
Summary: [7.0 regression] ICE in trans-expr.c with -fcheck=all
Product: gcc
Version: 7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: juergen.reuter at desy dot de
Target Milestone: ---
Created attachment 40171
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40171&action=edit
Source code that triggers the ICE.
With the following code (also attached) I get an ICE in trans-expr.c as
gfortran -fcheck=all -c sf_isr_uti.f90
sf_isr_uti.f90:39:0:
allocate (t3 :: sf_int (2))
internal compiler error: in gfc_trans_assignment_1, at
fortran/trans-expr.c:9771
sf_isr_uti.f90:39:0: internal compiler error: Abort trap: 6
gfortran: internal compiler error: Abort trap: 6 (program f951)
The code correctly compiles with default options, but throws the ICE with
-fcheck=all.
At least with 4.8.4 and 4.9.4 this was working.
Here is the code (also attached):
module interactions
implicit none
private
public :: t1
type :: t1
private
logical, dimension(:), allocatable :: flag
contains
procedure :: basic_init => t1_init
end type t1
contains
subroutine t1_init (int)
class(t1), intent(out) :: int
int%flag = .false.
end subroutine t1_init
end module interactions
!!!!!
module foo_uti
use interactions
implicit none
private
type, abstract, extends (t1) :: t2
end type t2
type, extends (t2) :: t3
end type t3
contains
subroutine foo ()
class(t3), dimension(:), allocatable :: sf_int
allocate (t3 :: sf_int (2))
end subroutine foo
end module foo_uti
More information about the Gcc-bugs
mailing list