Add two test cases that check for acceptable combinations of float_t and
FLT_EVAL_METHOD on s390x.
Tested against an as-is glibc and one modified so that it derives
float_t from FLT_EVAL_METHOD.
gcc/testsuite/ChangeLog:
2020-12-01 Marius Hillenbrand <mhillen@linux.ibm.com>
* gcc.target/s390/float_t-1.c: New test.
* gcc.target/s390/float_t-2.c: New test.
--- /dev/null
+/* { dg-do run } */
+/* { dg-options "-std=c99" } */
+#include <math.h>
+#include <stdlib.h>
+
+int main()
+{
+ /* In standard-compliant mode, the size of float_t and FLT_EVAL_METHOD must
+ match. */
+ if (sizeof(float_t) == sizeof(double) && __FLT_EVAL_METHOD__ != 1)
+ abort();
+ if (sizeof(float_t) == sizeof(float) && __FLT_EVAL_METHOD__ != 0)
+ abort();
+ return 0;
+}
--- /dev/null
+/* { dg-do run } */
+/* { dg-options "-std=gnu99" } */
+#include <math.h>
+#include <stdlib.h>
+
+int main()
+{
+ /* In gnuXY mode, the size of float_t and FLT_EVAL_METHOD must
+ match, with the historic exception of permitting double and 0. */
+ if (sizeof(float_t) == sizeof(float) && __FLT_EVAL_METHOD__ == 1)
+ abort();
+ return 0;
+}