There are currently no checks for LHS = RHS where RHS is an array constructor,
if -fbounds-check / -fcheck=bounds is used. (Neither is it detected by NAG f95,
ifort, g95.)
Example:
integer :: a(2), b(5), i
b = 0
i = 2
a = [1, 2, b(1:i)] ! RHS too many items
i = 1
a = [ b(1:i)] ! RHS too few items
end
--
Summary: Bounds checking (-fcheck=bounds): "A = [ constructor ]"
does not work
Product: gcc
Version: 4.4.0
Status: UNCONFIRMED
Keywords: diagnostic
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: burnus at gcc dot gnu dot org
OtherBugsDependingO 27766
nThis:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39994