[flang-commits] [flang] cd83180 - [flang] Change global initialization for equivalence on AIX (NFC) (#74614)
via flang-commits
flang-commits at lists.llvm.org
Wed Dec 6 12:03:26 PST 2023
Author: madanial0
Date: 2023-12-06T15:03:22-05:00
New Revision: cd83180c60d8cf149123c881526e3905c9c49275
URL: https://github.com/llvm/llvm-project/commit/cd83180c60d8cf149123c881526e3905c9c49275
DIFF: https://github.com/llvm/llvm-project/commit/cd83180c60d8cf149123c881526e3905c9c49275.diff
LOG: [flang] Change global initialization for equivalence on AIX (NFC) (#74614)
default initialization for equivalence on AIX results in a different
value due to endianness, changing the testcase to account for that.
Co-authored-by: Mark Danial <mark.danial at ibm.com>
Added:
Modified:
flang/test/Lower/default-initialization-globals.f90
Removed:
################################################################################
diff --git a/flang/test/Lower/default-initialization-globals.f90 b/flang/test/Lower/default-initialization-globals.f90
index aa923f49170c1..384d1cb763ad6 100644
--- a/flang/test/Lower/default-initialization-globals.f90
+++ b/flang/test/Lower/default-initialization-globals.f90
@@ -1,5 +1,6 @@
! Test default initialization of global variables (static init)
-! RUN: bbc -hlfir=false %s -o - | FileCheck %s
+! RUN: bbc -hlfir=false %s -o - | FileCheck %s --check-prefixes=%if system-aix %{"CHECK","CHECK-BE"%} \
+! RUN: %else %{"CHECK","CHECK-LE"%}
module tinit
real, target :: ziel(100)
@@ -191,7 +192,8 @@ subroutine eqv_same_default_init()
type(tseq), save :: somet1(2), somet2
equivalence (somet1(1), somet2)
! CHECK-LABEL: fir.global internal @_QFeqv_same_default_initEsomet1 : !fir.array<2xi64> {
- ! CHECK: %[[VAL_62:.*]] = arith.constant 12884901890 : i64
+ ! CHECK-LE: %[[VAL_62:.*]] = arith.constant 12884901890 : i64
+ ! CHECK-BE: %[[VAL_62:.*]] = arith.constant 8589934595 : i64
! CHECK: %[[VAL_63:.*]] = fir.undefined !fir.array<2xi64>
! CHECK: %[[VAL_64:.*]] = fir.insert_on_range %[[VAL_63]], %[[VAL_62]] from (0) to (1) : (!fir.array<2xi64>, i64) -> !fir.array<2xi64>
! CHECK: fir.has_value %[[VAL_64]] : !fir.array<2xi64>
More information about the flang-commits
mailing list