[flang-commits] [flang] [flang][test] Restrict Semantics/kinds04_q10.f90 to x86_64 (PR #103724)

Rainer Orth via flang-commits flang-commits at lists.llvm.org
Thu Aug 15 02:18:07 PDT 2024


rorth wrote:

> #103928 may be related. This would explain why no failures were observed on little endian targets.

I've just applied this patch and rebuilt/retested (with this patch to the testcase reverted).  That one still `FAIL`s, but directly comparing the `flang-new -fc1` output, there are differences for the `REAL(10)` tests:
```
--- /homes/ro/k04.out.sparcv9.prev2	2024-08-15 11:10:27.946232000 +0200
+++ /homes/ro/k04.out.sparcv9	2024-08-15 11:07:41.005641000 +0200
@@ -1,5 +1,5 @@
 error: Semantic errors in flang/test/Semantics/kinds04_q10.f90
-flang/test/Semantics/kinds04_q10.f90:16:22: warning: invalid argument on REAL(10) to REAL(4) conversion
+flang/test/Semantics/kinds04_q10.f90:16:22: warning: underflow on REAL(10) to REAL(4) conversion
     real :: realvar3 = 4.0Q6
                        ^^^^^
 flang/test/Semantics/kinds04_q10.f90:18:22: portability: Explicit kind parameter together with non-'E' exponent letter is not standard
@@ -8,19 +8,19 @@
 flang/test/Semantics/kinds04_q10.f90:20:22: portability: Explicit kind parameter together with non-'E' exponent letter is not standard
     real :: realvar5 = 4.0Q6_10
                        ^^^^^
-flang/test/Semantics/kinds04_q10.f90:20:22: warning: invalid argument on REAL(10) to REAL(4) conversion
+flang/test/Semantics/kinds04_q10.f90:20:22: warning: underflow on REAL(10) to REAL(4) conversion
     real :: realvar5 = 4.0Q6_10
                        ^^^^^^^^
 flang/test/Semantics/kinds04_q10.f90:22:22: warning: Explicit kind parameter on real constant disagrees with exponent letter 'q'
     real :: realvar6 = 4.0Q6_16
                        ^^^^^
-flang/test/Semantics/kinds04_q10.f90:24:22: warning: invalid argument on REAL(10) to REAL(4) conversion
+flang/test/Semantics/kinds04_q10.f90:24:22: warning: underflow on REAL(10) to REAL(4) conversion
     real :: realvar8 = 4.0E6_10
                        ^^^^^^^^
 flang/test/Semantics/kinds04_q10.f90:27:23: error: Unsupported REAL(KIND=32)
     real :: realvar10 = 4.0E6_32
                         ^^^^^
-flang/test/Semantics/kinds04_q10.f90:31:36: warning: invalid argument on REAL(10) to REAL(8) conversion
+flang/test/Semantics/kinds04_q10.f90:31:36: warning: underflow on REAL(10) to REAL(8) conversion
     double precision :: doublevar3 = 4.0Q6
                                      ^^^^^
 flang/test/Semantics/kinds04_q10.f90:33:36: portability: Explicit kind parameter together with non-'E' exponent letter is not standard
@@ -29,7 +29,7 @@
 flang/test/Semantics/kinds04_q10.f90:35:36: warning: Explicit kind parameter on real constant disagrees with exponent letter 'q'
     double precision :: doublevar5 = 4.0Q6_16
                                      ^^^^^
-flang/test/Semantics/kinds04_q10.f90:37:36: warning: invalid argument on REAL(10) to REAL(8) conversion
+flang/test/Semantics/kinds04_q10.f90:37:36: warning: underflow on REAL(10) to REAL(8) conversion
     double precision :: doublevar7 = 4.0E6_10
                                      ^^^^^^^^
 flang/test/Semantics/kinds04_q10.f90:40:36: error: Unsupported REAL(KIND=32)
```

I've also tried a minimal testcase of a function returning `REAL(10)` and that produced the same assembler output on both Solaris/sparcv9 and Solaris/amd64 (each targetting `x86_64-unknown-linux-gnu`.

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


More information about the flang-commits mailing list