mirror-llvm-project/flang/test/Semantics/resolve127.f90
Peter Klausler 615977a5bc
[flang] Fix name resolution bug (#158749)
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.
2025-09-17 09:15:13 -07:00

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