llvm-project/flang/test/Semantics/resolve111.f90
Daniil Dudkin 2c27d5b36a [flang] Fix internal error with DATA-statement style initializers
The code below causes flang to crash with an exception.
After fixing the crash flang with an internal error "no symbol found for 'bar'"
This change fixes all the issues.

  program name
    implicit none
    integer, parameter :: bar = 1
    integer foo(bar) /bar*2/
  end program name

Reviewed By: kiranchandramohan, klausler

Differential Revision: https://reviews.llvm.org/D124914
2022-05-06 18:21:34 +03:00

8 lines
314 B
Fortran

!RUN: %flang_fc1 -fdebug-dump-symbols %s | FileCheck %s
!Resolve names in legacy data initializers
program name
implicit none
integer, parameter :: bar = 1
integer foo(bar) /bar*2/ !CHECK: foo (InDataStmt) size=4 offset=4: ObjectEntity type: INTEGER(4) shape: 1_8:1_8 init:[INTEGER(4)::2_4]
end program name