This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/68019] New: ICE on rank mismatch of implied-shape array of user-defined type
- 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: Mon, 19 Oct 2015 17:48:36 +0000
- Subject: [Bug fortran/68019] New: ICE on rank mismatch of implied-shape array of user-defined type
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68019
Bug ID: 68019
Summary: ICE on rank mismatch of implied-shape array of
user-defined type
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: ---
With a rank mismatch of "arr" :
$ cat z1.f90
program p
integer :: i
type t
integer :: n
end type
type(t), parameter :: vec(*) = [(t(i), i = 1, 4)]
type(t), parameter :: arr(*) = reshape(vec, [2, 2])
end
$ gfortran -g -O0 -Wall -fcheck=all z1.f90
f951: internal compiler error: in add_init_expr_to_sym, at fortran/decl.c:1457
---
Whereas :
$ cat z2.f90
program p
integer :: i
integer, parameter :: vec(*) = [(i, i = 1, 4)]
integer, parameter :: arr(*) = reshape(vec, [2, 2])
end
$ gfortran -g -O0 -Wall -fcheck=all z2.f90
z2.f90:4:31:
integer, parameter :: arr(*) = reshape(vec, [2, 2])
1
Error: Incompatible ranks 1 and 2 in assignment at (1)