llvm-project/flang/test/Lower/environment-defaults.f90
David Truby ecec1311fe
[flang] Remove double pointer indirection for _QQEnvironmentDefaults (#90615)
A double pointer was being passed to the call to FortranStart rather than just a pointer to the EnvironmentDefaults.list. This now passes `null` directly when there's no EnvironmentDefaults.list and passes the list directly when there is, removing the original global variable which was a pointer to a pointer containing null or the EnvironmentDefaults.list global.

Fixes #90537
2024-04-30 22:38:36 +01:00

14 lines
420 B
Fortran
Executable File

! RUN: %flang_fc1 -emit-fir %s -o - | FileCheck %s
! RUN: bbc -emit-fir -o - %s | FileCheck %s
program test
continue
end
! Test that a null pointer is passed for environment defaults if nothing is specified
! CHECK-NOT: @_QQEnvironmentDefaults
! CHECK: %0 = fir.zero_bits !fir.ref<tuple<i32, !fir.ref<!fir.array<0xtuple<!fir.ref<i8>, !fir.ref<i8>>>>>>
! CHECK-NEXT: @_FortranAProgramStart(%arg0, %arg1, %arg2, %0)