Hi,
  While working on an aarch64 patch, I ran into wrong code produced by
my patch.  I am not ready to submit the patch yet but since I reduced
the testcase and there was no testcase in the testsuite yet, I thought
I commit the testcase.  This testcase is reduced from
aarch64_float_const_representable_p in aarch64.c.

Thanks,
Andrew Pinski

ChangeLog:
* gcc.c-torture/execute/20141125-1.c: New testcase.
Index: testsuite/gcc.c-torture/execute/20141125-1.c
===================================================================
--- testsuite/gcc.c-torture/execute/20141125-1.c        (revision 0)
+++ testsuite/gcc.c-torture/execute/20141125-1.c        (revision 0)
@@ -0,0 +1,17 @@
+int f(long long a) __attribute__((noinline,noclone));
+int f(long long a)
+{
+  if (a & 0x3ffffffffffffffull)
+    return 1;
+  return 1024;
+}
+
+int main(void)
+{
+  if(f(0x48375d8000000000ull) != 1)
+    __builtin_abort ();
+  if (f(0xfc00000000000000ull) != 1024)
+    __builtin_abort ();
+  return 0;
+}
+

Reply via email to