[Bug fortran/104927] New: Invalid array size specification accepted
federico.perini at gmail dot com
gcc-bugzilla@gcc.gnu.org
Tue Mar 15 08:46:47 GMT 2022
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104927
Bug ID: 104927
Summary: Invalid array size specification accepted
Product: gcc
Version: 10.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: federico.perini at gmail dot com
Target Milestone: ---
Created attachment 52627
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52627&action=edit
test program
A low priority bug, I guess.
The following invalid code with double array size specifications is accepted by
gfortran 10.3.0 all the way down to at least 8.1.0:
integer, allocatable, dimension(:,:) :: a(:)
integer, allocatable, dimension(:) :: b(:,:)
integer, allocatable, dimension(:,:) :: c(:,:)
It appears that the shape then picked by gfortran is that on the right hand
side, but no errors/warning are printed. I've attached a test program for this.
Thanks for the hardwork on gfortran!
Federico
More information about the Gcc-bugs
mailing list