re PR target/56540 (No __SIZEOF__XXX__ macro for __float128)
authorJakub Jelinek <jakub@redhat.com>
Fri, 2 Mar 2018 16:17:18 +0000 (17:17 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Fri, 2 Mar 2018 16:17:18 +0000 (17:17 +0100)
PR target/56540
* config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
__SIZEOF_{FPREG,FLOAT{80,128}}__ macros.

* gcc.target/ia64/pr56540.c: New test.

From-SVN: r258138

gcc/ChangeLog
gcc/config/ia64/ia64.h
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/ia64/pr56540.c [new file with mode: 0644]

index 957d15282319d8b345cca9ea4875c3736a7d86fc..5269f935216deb3c454211962140aa134369aed0 100644 (file)
@@ -1,5 +1,9 @@
 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
 
+       PR target/56540
+       * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
+       __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
+
        * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
        instead of -1U in last predictors element's probability member.
 
index 384bfe6bf015f7c6e289125a741ec8f512d33b0c..6ecc15510e3b0828ae147a0d5372d1e8f3a18130 100644 (file)
@@ -38,6 +38,9 @@ do {                                          \
        builtin_define("__itanium__");          \
        if (TARGET_BIG_ENDIAN)                  \
          builtin_define("__BIG_ENDIAN__");     \
+       builtin_define("__SIZEOF_FPREG__=16");  \
+       builtin_define("__SIZEOF_FLOAT80__=16");\
+       builtin_define("__SIZEOF_FLOAT128__=16");\
 } while (0)
 
 #ifndef SUBTARGET_EXTRA_SPECS
index 94900056afd397f07850a565ce7ab76abeebe02a..67eefea359baf0a7bb823f25d05d2deed3aa7a4c 100644 (file)
@@ -1,3 +1,8 @@
+2018-03-02  Jakub Jelinek  <jakub@redhat.com>
+
+       PR target/56540
+       * gcc.target/ia64/pr56540.c: New test.
+
 2018-03-02  Will Schmidt  <will_schmidt@vnet.ibm.com>
 
        * gcc.target/powerpc/altivec-7-be.c: Remove VSX content, allow
diff --git a/gcc/testsuite/gcc.target/ia64/pr56540.c b/gcc/testsuite/gcc.target/ia64/pr56540.c
new file mode 100644 (file)
index 0000000..adcd2db
--- /dev/null
@@ -0,0 +1,6 @@
+/* PR target/56540 */
+/* { dg-do compile } */
+
+extern int a[__SIZEOF_FPREG__ != sizeof (__fpreg) ? -1 : 1];
+extern int b[__SIZEOF_FLOAT80__ != sizeof (__float80) ? -1 : 1];
+extern int c[__SIZEOF_FLOAT128__ != sizeof (__float128) ? -1 : 1];