aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorWill Schmidt <will_schmidt@vnet.ibm.com>2020-02-11 14:01:59 -0600
committerWill Schmidt <will_schmidt@vnet.ibm.com>2020-02-11 14:01:59 -0600
commitad21e0072e20b7c8e4d7af5ca78f24cc6ae407d1 (patch)
treedbb4bf21a0f8eca68954399f10cab0d6dcd6f3cc /gcc
parent7a775242ea296849a34ce27de179eaaec411e880 (diff)
downloadgcc-ad21e0072e20b7c8e4d7af5ca78f24cc6ae407d1.zip
gcc-ad21e0072e20b7c8e4d7af5ca78f24cc6ae407d1.tar.gz
gcc-ad21e0072e20b7c8e4d7af5ca78f24cc6ae407d1.tar.bz2
Add ppc_ieee128_ok target-supports proc
Add a target_supports entry to check that the __ieee128 keyword is understood by the target. Also add a dg-requires check to the existing pr92796 testcase. [testsuite] * lib/target-supports.exp (check_effective_target_ppc_ieee128_ok): New. * gcc.target/powerpc/pr92796.c: Add a require-effective-target statement for ppc_ieee128_ok.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/ChangeLog6
-rw-r--r--gcc/testsuite/gcc.target/powerpc/pr92796.c1
-rw-r--r--gcc/testsuite/lib/target-supports.exp19
3 files changed, 26 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 4f59153..8120020 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+2020-02-11 Will Schmidt <will_schmidt@vnet.ibm.com>
+
+ * lib/target-supports.exp (check_effective_target_ppc_ieee128_ok): New.
+ * gcc.target/powerpc/pr92796.c: Add a require-effective-target
+ statement for ppc_ieee128_ok.
+
2020-02-11 David Malcolm <dmalcolm@redhat.com>
PR analyzer/93374
diff --git a/gcc/testsuite/gcc.target/powerpc/pr92796.c b/gcc/testsuite/gcc.target/powerpc/pr92796.c
index aa15b2d..da4b6a4 100644
--- a/gcc/testsuite/gcc.target/powerpc/pr92796.c
+++ b/gcc/testsuite/gcc.target/powerpc/pr92796.c
@@ -1,5 +1,6 @@
/* { dg-do compile } */
/* { dg-options "-O2 -fstack-protector-strong -mcpu=power8" } */
+/* { dg-require-effective-target ppc_ieee128_ok } */
typedef union
{
diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
index d3b2798..fb177c5 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -2250,6 +2250,25 @@ proc check_ppc_float128_hw_available { } {
}]
}
+# See if the __ieee128 keyword is understood.
+proc check_effective_target_ppc_ieee128_ok { } {
+ return [check_cached_effective_target ppc_ieee128_ok {
+ # disable on AIX.
+ if { [istarget *-*-aix*] } {
+ expr 0
+ } else {
+ set options "-mfloat128"
+ check_runtime_nocache ppc_ieee128_ok {
+ int main()
+ {
+ __ieee128 a;
+ return 0;
+ }
+ } $options
+ }
+ }]
+}
+
# Return 1 if the target supports executing VSX instructions, 0
# otherwise. Cache the result.