-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[flang][test] Restrict Semantics/kinds04_q10.f90 to x86_64 #103724
base: main
Are you sure you want to change the base?
Conversation
`Flang :: Semantics/kinds04_q10.f90` `FAIL`s on SPARC, both Solaris/sparcv9 and Linux/sparc64: ``` actual at 16: invalid argument on REAL(10) to REAL(4) conversion actual at 20: invalid argument on REAL(10) to REAL(4) conversion actual at 24: invalid argument on REAL(10) to REAL(4) conversion actual at 31: invalid argument on REAL(10) to REAL(8) conversion actual at 37: invalid argument on REAL(10) to REAL(8) conversion ``` This seems to be the same issue recently seen in PR llvm#102890: even though the target in question supports `REAL(10)`, the host does not. Therefore this patch restricts the test to `x86_64`. Tested on `sparcv9-sun-solaris2.11`, `sparc64-unknown-linux-gnu`, `amd64-pc-solaris2.11`, and `x86_64-pc-linux-gnu`.
@llvm/pr-subscribers-flang-semantics Author: Rainer Orth (rorth) Changes
This seems to be the same issue recently seen in PR #102890: even though the target in question supports Therefore this patch restricts the test to Tested on Full diff: https://github.com/llvm/llvm-project/pull/103724.diff 1 Files Affected:
diff --git a/flang/test/Semantics/kinds04_q10.f90 b/flang/test/Semantics/kinds04_q10.f90
index d352daa1cbbf06..25121657da1202 100644
--- a/flang/test/Semantics/kinds04_q10.f90
+++ b/flang/test/Semantics/kinds04_q10.f90
@@ -8,7 +8,7 @@
! This test is for x86_64, where exponent-letter 'q' is for
! 10-byte extended precision
! UNSUPPORTED: system-windows, system-aix
-! REQUIRES: x86-registered-target
+! REQUIRES: target=x86_64{{.*}}
subroutine s(var)
real :: realvar1 = 4.0E6_4
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder why this test seems to be failing only on SPARC, since there weren't complaints of it failing on other hosts. AArch64 hosts also don't support REAL(10)
, but, at least on the machine that I used, the test on #102890 worked correctly when targeting x86_64
. In that test case, however, AArch64 and other targets were already being skipped.
I'm OK with restricting this test to x86_64
only, as long as an issue is opened to track this problem, of programs using REAL(10)
failing to compile on some hosts, even when they are targeting x86_64
. But it would be good to wait for other reviewers' comments on this.
#103928 may be related. |
I've just applied this patch and rebuilt/retested (with this patch to the testcase reverted). That one still
I've also tried a minimal testcase of a function returning |
It seems to me that the code would "work" on little-endian system regardless if it supports The IR for
The same literal on big-endian (AIX)
The reason for |
Given @DanielCChen's findings and similar ones by myself when compiling a minimal version of
between the Maybe @DanielCChen is in a better position to file an Issue than I am, given that he's well familiar with the code? |
The two test files, Example 1,
Example 2:
I am not sure if I agree with the x86 message for the 2nd example as exponent letter On top of what is shown at the above, on AIX (big-endian), there is also an extra message for the code in the 1st example as
It is due to the reason I mentioned in the previous post that on AIX, the constant is 0x7FFF (+infinity) rather than a valid number so it cannot be converted to REAL*16. I fixed I think these two test files could be merged into one as the source code are identical, and use the |
Flang :: Semantics/kinds04_q10.f90
FAIL
s on SPARC, both Solaris/sparcv9 and Linux/sparc64:This seems to be the same issue recently seen in PR #102890: even though the target in question supports
REAL(10)
, the host does not.Therefore this patch restricts the test to
x86_64
.Tested on
sparcv9-sun-solaris2.11
,sparc64-unknown-linux-gnu
,amd64-pc-solaris2.11
, andx86_64-pc-linux-gnu
.