This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Another ldist testcase
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Richard Biener <rguenther at suse dot de>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 8 Apr 2013 10:31:10 +0200
- Subject: [PATCH] Another ldist testcase
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
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