A new test case
H.J. Lu
hjl@lucon.org
Wed Feb 11 17:22:00 GMT 1998
This test failed on both egcs 1.0.1 and egcs 1.0.2 under Linux/x86.
--
H.J. Lu (hjl@gnu.org)
---
Wed Feb 11 17:09:18 1998 H.J. Lu (hjl@gnu.org)
* gcc.c-torture/execute/980211-1.c: New to test long double.
--- /dev/null Wed Dec 31 16:00:00 1969
+++ gcc.c-torture/execute/980211-1.c Wed Feb 11 17:09:00 1998
@@ -0,0 +1,22 @@
+__inline int
+__signbitl (long double __x)
+{
+ union { long double __l; int __i[3]; } __u = { __l: __x };
+
+ return (__u.__i[2] & 0x8000) != 0;
+}
+
+void
+foo (long double x, long double y)
+{
+ long double z = x / y;
+ if (__signbitl (x) && __signbitl (z))
+ abort ();
+}
+
+int main()
+{
+ if (sizeof (long double) > sizeof (double))
+ foo (-0.0, -1.0);
+ return 0;
+}
More information about the Gcc
mailing list