https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100110
Bug ID: 100110
Summary: Parameterized Derived Types, problems with global
variable
Product: gcc
Version: 10.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: [email protected]
Target Milestone: ---
the test case is,
program p
implicit none
type t(n)
integer, len :: n
integer :: arr(n, n)
end type
type(t(2)) :: obj
print *, obj%n
print *, shape(obj%arr)
call test()
contains
subroutine test()
print *, obj%n
print *, shape(obj%arr)
end subroutine
end program
expected result is
2
2 2
2
2 2
but is
0
0 0
0
0 0