[Bug fortran/66380] New: ICE for intrinsic reshape with insufficient number of array elements
gerhard.steinmetz.fortran@t-online.de
gcc-bugzilla@gcc.gnu.org
Tue Jun 2 14:26:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66380
Bug ID: 66380
Summary: ICE for intrinsic reshape with insufficient number of
array elements
Product: gcc
Version: 5.1.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 with less array elements than requested via shape sh :
program p
integer, parameter :: sh(2) = [2, 3]
integer, parameter :: a(2,2) = reshape([1, 2, 3, 4], sh)
print *, a
end
yields :
f951: internal compiler error: in gfc_simplify_reshape, at
fortran/simplify.c:5177
---
Whereas this version :
program p
integer, parameter :: sh(2) = [2, 1]
integer, parameter :: a(2,2) = reshape([1, 2, 3, 4], sh)
print *, a
end
flags an error :
integer, parameter :: a(2,2) = reshape([1, 2, 3, 4], sh)
1
Error: Different shape for array assignment at (1) on dimension 2 (2 and 1)
More information about the Gcc-bugs
mailing list