This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/69867] New: ICE on initializing character in type with array of incompatible data
- From: "gerhard dot steinmetz dot fortran at t-online dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 18 Feb 2016 19:26:01 +0000
- Subject: [Bug fortran/69867] New: ICE on initializing character in type with array of incompatible data
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69867
Bug ID: 69867
Summary: ICE on initializing character in type with array of
incompatible data
Product: gcc
Version: 6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: gerhard.steinmetz.fortran@t-online.de
Target Milestone: ---
An array on lhs with incompatible data :
$ cat z1.f90
program p
type t
character(1) :: c(1) = [1]
end type
end
$ gfortran-6 z1.f90
f951: internal compiler error: Segmentation fault
More variants :
$ cat z2.f90
program p
type t
character(1) :: d(1) = [1.]
character(1) :: e(1) = [1d1]
character(1) :: f(1) = [(0.,1.)]
character(1) :: g(1) = [.true.]
character(1) :: h(1) = [.false.]
character(1) :: n(1) = [null()]
end type
end
rhs needs not to be an array to trigger an ICE :
(incompatible ranks 0 and 1 in assignment)
$ cat z3.f90
program p
type t
character(1) :: c = [1]
character(1) :: d = [1.]
character(1) :: e = [1d1]
character(1) :: f = [(0.,1.)]
character(1) :: g = [.true.]
character(1) :: h = [.false.]
character(1) :: n = [null()]
end type
end