When the current scope is an implied DO loop nested within a derived type declaration, it is possible for name resolution to mistakenly resolve a name to a component rather than to a name in the outer scope. Fix. Fixes https://github.com/llvm/llvm-project/issues/158412.
7 lines
197 B
Fortran
7 lines
197 B
Fortran
!RUN: %flang_fc1 -fdebug-unparse %s 2>&1 | FileCheck %s
|
|
double precision, parameter :: x = 1.0d0
|
|
type t
|
|
!CHECK: REAL :: x(1_4) = [INTEGER(4)::8_4]
|
|
real :: x(1) = [(kind(x),j=1,1)]
|
|
end type
|
|
end
|