[Bug fortran/86262] New: allocation with non-parameter array expression as SOURCE sets LBOUND to 0
simon.kluepfel at gmail dot com
gcc-bugzilla@gcc.gnu.org
Thu Jun 21 09:54:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86262
Bug ID: 86262
Summary: allocation with non-parameter array expression as
SOURCE sets LBOUND to 0
Product: gcc
Version: 8.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: simon.kluepfel at gmail dot com
Target Milestone: ---
Created attachment 44307
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44307&action=edit
source code
If a variable expression is used as SOURCE in an allocate statement, the lower
bound is not set correctly to one.
The most exemplary lines in the attached code are the different results for
allocate(rarr1,source= rarr )
and
allocate(rarr2,source=(rarr))
For an expression of a parameter as SOURCE all seems to work as expected.
The output using gfortran 6 to 8 is for me:
1 2 2
1 2 2
0 2 1
1 2 2
1 2 2
1 2 2
0 2 1
0 2 1
It should be all as the first line I would think.
More information about the Gcc-bugs
mailing list