[flang-commits] [flang] [flang][test] Fix Lower/default-initialization-globals.f90 on SPARC (PR #103722)

via flang-commits flang-commits at lists.llvm.org
Wed Aug 14 02:04:02 PDT 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-flang-fir-hlfir

Author: Rainer Orth (rorth)

<details>
<summary>Changes</summary>

`Flang :: Lower/default-initialization-globals.f90` `FAIL`s on SPARC, both Solaris/sparcv9 and Linux/sparc64.

The failure mode is same as on AIX/PowerPC, so both targets being big-endian, this patch treats them the same.

Tested on `sparcv9-sun-solaris2.11`, `sparc64-unknown-linux-gnu`, `amd64-pc-solaris2.11`, and `x86_64-pc-linux-gnu`.

---
Full diff: https://github.com/llvm/llvm-project/pull/103722.diff


1 Files Affected:

- (modified) flang/test/Lower/default-initialization-globals.f90 (+1-1) 


``````````diff
diff --git a/flang/test/Lower/default-initialization-globals.f90 b/flang/test/Lower/default-initialization-globals.f90
index 384d1cb763ad6..e9611dab467cb 100644
--- a/flang/test/Lower/default-initialization-globals.f90
+++ b/flang/test/Lower/default-initialization-globals.f90
@@ -1,5 +1,5 @@
 ! Test default initialization of global variables (static init)
-! RUN: bbc -hlfir=false %s -o - | FileCheck %s --check-prefixes=%if system-aix %{"CHECK","CHECK-BE"%} \
+! RUN: bbc -hlfir=false %s -o - | FileCheck %s --check-prefixes=%if target={{.*-aix.*|sparc.*}} %{"CHECK","CHECK-BE"%} \
 ! RUN:                                         %else %{"CHECK","CHECK-LE"%}
 
 module tinit

``````````

</details>


https://github.com/llvm/llvm-project/pull/103722


More information about the flang-commits mailing list