This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/67806] New: ICE on initialization of type(character) with len null
- 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, 01 Oct 2015 18:43:38 +0000
- Subject: [Bug fortran/67806] New: ICE on initialization of type(character) with len null
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67806
Bug ID: 67806
Summary: ICE on initialization of type(character) with len null
Product: gcc
Version: 5.2.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: gerhard.steinmetz.fortran@t-online.de
Target Milestone: ---
This code :
$ cat z1.f90
program p
type t
character(null()) :: c
end type
type(t) :: x = t('a')
end
yields :
$ gfortran -g -O0 -Wall -fcheck=all -fno-frontend-optimize z1.f90
internal compiler error: in gfc_get_derived_type, at fortran/trans-types.c:2539
Same issue for these variations :
$ cat z2.f90
program p
type t
character([null()]) :: c
end type
type(t) :: x = t('a')
end
$ cat z4.f90
program p
integer, pointer :: n
type t
character(null(n)) :: c
end type
type(t) :: x = t('a')
end