This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Another ldist testcase


Hi!

I was curious whether we don't miscompile the following testcase on 4.8
branch (-1+0i matches integer_all_onesp), but apparently we don't, because
TYPE_PRECISION on the COMPLEX_TYPE is 0.  Anyway, I'd like to check this
into trunk/4.8 branch, ok?

2013-04-08  Jakub Jelinek  <jakub@redhat.com>

	* gcc.c-torture/execute/pr56837.c: New test.

--- gcc/testsuite/gcc.c-torture/execute/pr56837.c.jj	2013-02-13 21:50:57.150673158 +0100
+++ gcc/testsuite/gcc.c-torture/execute/pr56837.c	2013-04-08 10:23:44.941870778 +0200
@@ -0,0 +1,21 @@
+extern void abort (void);
+_Complex int a[1024];
+
+__attribute__((noinline, noclone)) void
+foo (void)
+{
+  int i;
+  for (i = 0; i < 1024; i++)
+    a[i] = -1;
+}
+
+int
+main ()
+{
+  int i;
+  foo ();
+  for (i = 0; i < 1024; i++)
+    if (a[i] != -1)
+      abort ();
+  return 0;
+}

	Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]