summaryrefslogtreecommitdiff
path: root/gcc/testsuite
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite')
-rw-r--r--gcc/testsuite/ChangeLog161
-rw-r--r--gcc/testsuite/g++.dg/ext/fixed2.C7
-rw-r--r--gcc/testsuite/g++.dg/other/i386-2.C9
-rw-r--r--gcc/testsuite/g++.dg/other/i386-3.C9
-rw-r--r--gcc/testsuite/gcc.dg/20020103-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/20020919-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/graphite/block-1.c11
-rw-r--r--gcc/testsuite/gcc.dg/graphite/block-2.c32
-rw-r--r--gcc/testsuite/gcc.dg/graphite/block-4.c26
-rw-r--r--gcc/testsuite/gcc.dg/graphite/block-5.c26
-rw-r--r--gcc/testsuite/gcc.dg/graphite/block-6.c25
-rw-r--r--gcc/testsuite/gcc.dg/graphite/pr37485.c1
-rw-r--r--gcc/testsuite/gcc.dg/graphite/pr37684.c2
-rw-r--r--gcc/testsuite/gcc.dg/graphite/pr37883.c11
-rw-r--r--gcc/testsuite/gcc.dg/graphite/pr37928.c33
-rw-r--r--gcc/testsuite/gcc.dg/graphite/pr38073.c9
-rw-r--r--gcc/testsuite/gcc.dg/graphite/pr38125.c32
-rw-r--r--gcc/testsuite/gcc.dg/graphite/pr38409.c24
-rw-r--r--gcc/testsuite/gcc.dg/graphite/pr38413.c14
-rw-r--r--gcc/testsuite/gcc.dg/graphite/pr38446.c14
-rw-r--r--gcc/testsuite/gcc.dg/graphite/scop-15.c1
-rw-r--r--gcc/testsuite/gcc.dg/graphite/scop-16.c6
-rw-r--r--gcc/testsuite/gcc.dg/graphite/scop-17.c6
-rw-r--r--gcc/testsuite/gcc.dg/graphite/scop-18.c8
-rw-r--r--gcc/testsuite/gcc.dg/pr34027-1.c6
-rw-r--r--gcc/testsuite/gcc.dg/pr35442.c3
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr38271.c18
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/loop-3.c5
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pr32044.c55
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-10.c4
-rw-r--r--gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-slp-12.c4
-rw-r--r--gcc/testsuite/gcc.dg/vect/pr36630.c1
-rw-r--r--gcc/testsuite/gcc.target/i386/sse-12.c8
-rw-r--r--gcc/testsuite/gcc.target/i386/sse-13.c41
-rw-r--r--gcc/testsuite/gcc.target/i386/sse-14.c56
-rw-r--r--gcc/testsuite/gfortran.dg/default_format_denormal_2.f902
-rw-r--r--gcc/testsuite/gfortran.dg/fmt_int_sign.f9016
-rw-r--r--gcc/testsuite/gfortran.dg/graphite/id-2.f9015
-rw-r--r--gcc/testsuite/gfortran.dg/graphite/id-4.f9034
-rw-r--r--gcc/testsuite/gfortran.dg/graphite/pr37852.f9013
-rw-r--r--gcc/testsuite/gfortran.dg/graphite/pr37857.f909
-rw-r--r--gcc/testsuite/gfortran.dg/graphite/pr37980.f9011
-rw-r--r--gcc/testsuite/gfortran.dg/graphite/pr38083.f9016
-rw-r--r--gcc/testsuite/gfortran.dg/graphite/pr38459.f9014
-rw-r--r--gcc/testsuite/gfortran.dg/matmul_argument_types.f9032
-rw-r--r--gcc/testsuite/obj-c++.dg/bitfield-1.mm4
46 files changed, 785 insertions, 53 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index c147c4cc58e..4cd90f02b0c 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,4 +1,155 @@
-2008-12-10 Uros Bizjak <ubizjak@gmail.com>
+2008-12-13 Jerry DeLisle <jvdelisle@gcc.gnu.org>
+
+ PR libfortran/38504
+ * gfortran.dg/fmt_int_sign.f90: New test.
+
+2008-12-13 Sebastian Pop <sebastian.pop@amd.com>
+
+ * gcc.dg/graphite/pr38409.c: Fixed commit problem.
+
+2008-12-13 Uros Bizjak <ubizjak@gmail.com>
+
+ * gcc.target/i386/sse-12.c: Include x86intrin.h.
+ (dg-options): Use -mavx instead of -msse4. Add -maes -mpclmul.
+ * gcc.target/i386/sse-13.c: Include x86intrin.h. Define immintrin.h
+ intrinsics that require immediate arguments.
+ (dg-options): Use -mavx instead of -msse4.
+ * gcc.target/i386/sse-14.c: Include x86intrin.h. Define immintrin.h
+ intrinsics that require immediate arguments.
+ (test_3): New macro.
+ (dg-options): Use -mavx instead of -msse4.
+ * g++.dg/other/i386-2.C: Include x86intrin.h.
+ (dg-options): Use -mavx instead of -msse4.
+ * g++.dg/other/i386-3.C: Include x86intrin.h.
+ (dg-options): Use -mavx instead of -msse4.
+
+2008-12-12 Uros Bizjak <ubizjak@gmail.com>
+
+ PR testsuite/38163
+ * gcc.dg/tree-ssa/loop-3.c: Compile only on nonpic x86 targets.
+ Remove dg-skip-if directive.
+
+2008-12-12 Janis Johnson <janis187@us.ibm.com>
+
+ PR libgfortran/24685
+ * gfortran.dg/default_format_denormal_2.f90: Change XFAIL to check
+ for size of long double.
+
+ PR objc++/31032
+ * obj-c++.dg/bitfield-1.mm: Remove XFAIL for ICE.
+
+ * gcc.dg/pr35442.c: Ignore a possible warning.
+
+2008-12-12 Zdenek Dvorak <ook@ucw.cz>
+
+ PR tree-optimization/32044
+ * gcc.dg/pr34027-1.c: Change outcome.
+ * gcc.dg/tree-ssa/pr32044.c: New test.
+
+2008-12-12 Janis Johnson <janis187@us.ibm.com>
+
+ PR target/11594
+ * gcc.dg/20020103-1.c: Remove XFAIL for powerpc.
+
+2008-12-12 Sebastian Pop <sebastian.pop@amd.com>
+
+ PR middle-end/38409
+ * gcc.dg/graphite/pr38409.c: New.
+
+2008-12-12 Daniel Franke <franke.daniel@gmail.com>
+
+ PR fortran/36355
+ * gfortran.dg/matmul_argument_types.f90: New.
+
+2008-12-11 Janis Johnson <janis187@us.ibm.com>
+
+ PR testsuite/29071
+ * gcc.dg/20020919-1.c: Fix a preprocessor check.
+
+2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
+
+ PR middle-end/38413
+ * gcc.dg/graphite/pr38413.c: New.
+
+2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
+
+ PR middle-end/37857
+ * gfortran.dg/graphite/pr37857.f90: New.
+
+2008-12-11 Harsha Jagasia <harsha.jagasia@amd.com>
+
+ PR tree-optimization/38446
+ * gcc.dg/graphite/pr38446.c: New.
+
+2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
+
+ * gcc.dg/graphite/scop-16.c: Test only scop specific info.
+ * gcc.dg/graphite/scop-17.c: Same.
+ * gcc.dg/graphite/block-5.c: New.
+ * gcc.dg/graphite/block-6.c: New.
+ * gcc.dg/graphite/pr37485.c: Clean dump file after.
+ * gcc.dg/graphite/pr37684.c: Same.
+ * gcc.dg/graphite/block-2.c: Same.
+
+2008-12-10 Tobias Grosser <grosser@fim.uni-passau.de>
+
+ PR middle-end/38459
+ * gfortran.dg/graphite/pr38459.f90: New.
+
+2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
+
+ PR middle-end/37852
+ PR middle-end/37883
+ PR middle-end/37928
+ PR middle-end/37980
+ PR middle-end/38038
+ PR middle-end/38039
+ PR middle-end/38073
+ PR middle-end/38083
+ PR middle-end/38125
+ * gcc.dg/graphite/pr37928.c: New.
+ * gcc.dg/graphite/pr37883.c: New.
+ * gcc.dg/graphite/pr38073.c: New.
+ * gcc.dg/graphite/pr38125.c: New.
+ * gfortran.dg/graphite/pr38083.f90: New.
+ * gfortran.dg/graphite/pr37852.f90: New.
+ * gfortran.dg/graphite/pr37980.f90: New.
+ * gfortran.dg/graphite/id-2.f90: New.
+ * gfortran.dg/graphite/id-4.f90: New.
+
+ * gcc.dg/graphite/scop-18.c: Remove reduction, test for
+ the number of detected scops. Copy exact same test for loop blocking...
+ * gcc.dg/graphite/block-1.c: Fix the number of expected loops
+ to be blocked as reductions are not handled.
+ * gcc.dg/graphite/block-4.c: ...here. New.
+
+2008-12-11 Ira Rosen <irar@il.ibm.com>
+
+ PR tree-optimization/38464
+ * gcc.dg/vect/costmodel/ppc/costmodel-slp-12.c: Check that three
+ loops are vectorized.
+
+2008-12-10 Jason Merrill <jason@redhat.com>
+
+ PR c++/35319
+ * g++.dg/ext/fixed2.C: New test.
+
+2008-12-10 Daniel Berlin <dberlin@dberlin.org>
+
+ PR tree-optimization/36792
+ * gcc.dg/tree-ssa/ssa-fre-10.c: Update expected results.
+
+2008-12-10 Alexandre Oliva <aoliva@redhat.com>
+
+ PR middle-end/38271
+ * gcc.dg/torture/pr38271.c: New.
+
+2008-12-10 Ira Rosen <irar@il.ibm.com>
+
+ PR tree-optimization/37416
+ * gcc.dg/vect/pr36630.c: Expect 1 vectorized loop.
+
+2008-12-10 Uros Bizjak <ubizjak@gmail.com>
* gcc.dg/20020919-1.c: Correct target selector to alpha*-*-*.
* gcc.dg/pr31866.c: Ditto.
@@ -69,6 +220,12 @@
PR c++/38410
* gcc.dg/ctor1.c: New test.
+2008-12-09 Tobias Grosser <grosser@fim.uni-passau.de>
+
+ PR middle-end/38084
+ * gfortran.dg/graphite/id-3.f90: New.
+ * gcc.dg/graphite/pr38084.c: New.
+
2008-12-08 Uros Bizjak <ubizjak@gmail.com>
* gcc.target/mips/fix-r10000-6.c: Add dg-message to look for
@@ -6981,7 +7138,7 @@
PR c++/35327
* g++.dg/parse/crash41.C: New.
-2008-06-06 Uros Bizjak <ubizjak@gmail.com>
+2008-06-06 Uros Bizjak <ubizjak@gmail.com>
PR rtl-optimization/36438
* gcc.target/i386/pr36438.c
diff --git a/gcc/testsuite/g++.dg/ext/fixed2.C b/gcc/testsuite/g++.dg/ext/fixed2.C
new file mode 100644
index 00000000000..a4766eb794c
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/fixed2.C
@@ -0,0 +1,7 @@
+// PR c++/35319
+// { dg-options "" }
+
+void foo()
+{
+ throw 0r;
+}
diff --git a/gcc/testsuite/g++.dg/other/i386-2.C b/gcc/testsuite/g++.dg/other/i386-2.C
index 57acdd32ca3..2c3cd29d890 100644
--- a/gcc/testsuite/g++.dg/other/i386-2.C
+++ b/gcc/testsuite/g++.dg/other/i386-2.C
@@ -1,11 +1,8 @@
-/* Test that {,x,e,p,t,s,w,a,b}mmintrin.h, mm3dnow.h and mm_malloc.h are
+/* Test that {,x,e,p,t,s,w,a,b,i}mmintrin.h, mm3dnow.h and mm_malloc.h are
usable with -O -pedantic-errors. */
/* { dg-do compile { target i?86-*-* x86_64-*-* } } */
-/* { dg-options "-O -pedantic-errors -march=k8 -m3dnow -msse4 -msse5 -maes -mpclmul" } */
+/* { dg-options "-O -pedantic-errors -march=k8 -m3dnow -mavx -msse5 -maes -mpclmul" } */
-#include <wmmintrin.h>
-#include <bmmintrin.h>
-#include <smmintrin.h>
-#include <mm3dnow.h>
+#include <x86intrin.h>
int dummy;
diff --git a/gcc/testsuite/g++.dg/other/i386-3.C b/gcc/testsuite/g++.dg/other/i386-3.C
index a57bae33b8a..ffbd3f3cec4 100644
--- a/gcc/testsuite/g++.dg/other/i386-3.C
+++ b/gcc/testsuite/g++.dg/other/i386-3.C
@@ -1,9 +1,6 @@
-/* Test that {,x,e,p,t,s,w,a,b}mmintrin.h, mm3dnow.h and mm_malloc.h are
+/* Test that {,x,e,p,t,s,w,a,b,i}mmintrin.h, mm3dnow.h and mm_malloc.h are
usable with -O -fkeep-inline-functions. */
/* { dg-do compile { target i?86-*-* x86_64-*-* } } */
-/* { dg-options "-O -fkeep-inline-functions -march=k8 -m3dnow -maes -mpclmul -msse4 -msse5" } */
+/* { dg-options "-O -fkeep-inline-functions -march=k8 -m3dnow -mavx -msse5 -maes -mpclmul" } */
-#include <wmmintrin.h>
-#include <bmmintrin.h>
-#include <smmintrin.h>
-#include <mm3dnow.h>
+#include <x86intrin.h>
diff --git a/gcc/testsuite/gcc.dg/20020103-1.c b/gcc/testsuite/gcc.dg/20020103-1.c
index 3402e8bdfce..81ffdb1b285 100644
--- a/gcc/testsuite/gcc.dg/20020103-1.c
+++ b/gcc/testsuite/gcc.dg/20020103-1.c
@@ -3,7 +3,7 @@
/* { dg-do compile { target { { i?86-*-* rs6000-*-* alpha*-*-* x86_64-*-* } || { powerpc*-*-* && ilp32 } } } } */
/* { dg-require-effective-target fpic } */
/* { dg-options "-O2 -fpic -fno-omit-frame-pointer -fno-asynchronous-unwind-tables" } */
-/* { dg-final { scan-assembler-not "LC\[0-9\]" { xfail powerpc*-*-* } } } */
+/* { dg-final { scan-assembler-not "LC\[0-9\]" } } */
/* Clobber all call-saved registers that can hold a pointer value. */
#if defined(__i386__)
diff --git a/gcc/testsuite/gcc.dg/20020919-1.c b/gcc/testsuite/gcc.dg/20020919-1.c
index 6b8c5ba7c52..e0fab27020a 100644
--- a/gcc/testsuite/gcc.dg/20020919-1.c
+++ b/gcc/testsuite/gcc.dg/20020919-1.c
@@ -41,7 +41,7 @@
|| defined (__POWERPC__) || defined (PPC) || defined (_IBMR2)
# define REG1 "6"
# define REG2 "7"
-# ifndef __powerpc64__
+# if !defined(__powerpc64__) && !defined(__LP64__)
# define REG3 "8"
# define REG4 "9"
# endif
diff --git a/gcc/testsuite/gcc.dg/graphite/block-1.c b/gcc/testsuite/gcc.dg/graphite/block-1.c
index 039b974fdae..857f8d54e8e 100644
--- a/gcc/testsuite/gcc.dg/graphite/block-1.c
+++ b/gcc/testsuite/gcc.dg/graphite/block-1.c
@@ -2,6 +2,8 @@
#define MAX 8192
+void bar (void);
+
int main()
{
int i, j;
@@ -9,6 +11,8 @@ int main()
int A[MAX * MAX];
int B[MAX * MAX];
+ bar ();
+
for (i = 0; i < MAX; i++)
for (j = 0; j < MAX; j++)
{
@@ -20,6 +24,11 @@ int main()
for (j = 0; j < MAX; j++)
A[i*MAX + j] += B[j*MAX + i];
+ bar ();
+
+ /* FIXME: For now, reductions are not handled by the code generation
+ of graphite. We have to bound the scop to the above loops. */
+
for(i = 0; i < MAX; i++)
for(j = 0; j < MAX; j++)
sum += A[i*MAX + j];
@@ -27,5 +36,5 @@ int main()
return sum;
}
-/* { dg-final { scan-tree-dump-times "Loop blocked" 3 "graphite"} } */
+/* { dg-final { scan-tree-dump-times "Loop blocked" 2 "graphite"} } */
/* { dg-final { cleanup-tree-dump "graphite" } } */
diff --git a/gcc/testsuite/gcc.dg/graphite/block-2.c b/gcc/testsuite/gcc.dg/graphite/block-2.c
new file mode 100644
index 00000000000..cf0969bac1d
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/graphite/block-2.c
@@ -0,0 +1,32 @@
+/* { dg-options "-O2 -floop-block -fdump-tree-graphite-all" } */
+
+typedef unsigned char UChar;
+typedef int Int32;
+typedef unsigned int UInt32;
+
+void fallbackSort ( UInt32* fmap,
+ UInt32* eclass,
+ Int32 nblock,
+ Int32 verb )
+{
+ Int32 ftab[257];
+ Int32 ftabCopy[256];
+ Int32 H, i, j, k, l, r, cc, cc1;
+ Int32 nNotDone;
+ Int32 nBhtab;
+ UChar* eclass8 = (UChar*)eclass;
+
+ if (verb >= 4)
+ VPrintf0 ( " bucket sorting ...\n" );
+ for (i = 0; i < 257; i++) ftab[i] = 0;
+ for (i = 0; i < nblock; i++) ftab[eclass8[i]]++;
+ for (i = 0; i < 256; i++) ftabCopy[i] = ftab[i];
+ for (i = 1; i < 257; i++) ftab[i] += ftab[i-1];
+
+ for (i = 0; i < nblock; i++) {
+ j = eclass8[i] + ftab [i];
+ }
+ AssertH ( j < 256, 1005 );
+}
+/* { dg-final { scan-tree-dump-times "Loop blocked" 1 "graphite" { xfail *-*-* }} } */
+/* { dg-final { cleanup-tree-dump "graphite" } } */
diff --git a/gcc/testsuite/gcc.dg/graphite/block-4.c b/gcc/testsuite/gcc.dg/graphite/block-4.c
new file mode 100644
index 00000000000..4b550b4e472
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/graphite/block-4.c
@@ -0,0 +1,26 @@
+/* { dg-options "-O2 -floop-block -fdump-tree-graphite-all" } */
+
+#define N 24
+#define M 1000
+
+float A[1000][1000], B[1000][1000], C[1000][1000];
+
+void test (void)
+{
+ int i, j, k;
+
+ /* These loops contain too few iterations for being strip-mined by 64. */
+ for (i = 0; i < 24; i++)
+ for (j = 0; j < 24; j++)
+ for (k = 0; k < 24; k++)
+ A[i][j] = B[i][k] * C[k][j];
+
+ /* These loops should still be strip mined. */
+ for (i = 0; i < 1000; i++)
+ for (j = 0; j < 1000; j++)
+ for (k = 0; k < 1000; k++)
+ A[i][j] = B[i][k] * C[k][j];
+}
+
+/* { dg-final { scan-tree-dump-times "Strip Mining is not profitable" 2 "graphite" } } */
+/* { dg-final { cleanup-tree-dump "graphite" } } */
diff --git a/gcc/testsuite/gcc.dg/graphite/block-5.c b/gcc/testsuite/gcc.dg/graphite/block-5.c
new file mode 100644
index 00000000000..e0bd4688d39
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/graphite/block-5.c
@@ -0,0 +1,26 @@
+/* { dg-options "-O2 -floop-block -fdump-tree-graphite-all" } */
+
+#define N 10000
+void foo (int);
+int test ()
+{
+ int a[N][N];
+ int b[N][N];
+ unsigned i, j;
+
+ for (i = 0; i < N; i++)
+ for (j = 0; j < N; j++)
+ a[i][j] = i*j;
+
+ for (j = 1; j < N; j++)
+ for (i = 0; i < N; i++)
+ a[i][j] = a[i][j-1] + b[i][j];
+
+ for (i = 0; i < N; i++)
+ for (j = 0; j < N; j++)
+ foo (a[i][j]);
+}
+
+/* Interchange is legal for loops 0 and 1 of the first two SCoPs */
+/* { dg-final { scan-tree-dump-times "Interchange valid for loops 0 and 1:" 2 "graphite"} } */
+/* { dg-final { cleanup-tree-dump "graphite" } } */
diff --git a/gcc/testsuite/gcc.dg/graphite/block-6.c b/gcc/testsuite/gcc.dg/graphite/block-6.c
new file mode 100644
index 00000000000..77429f1cb83
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/graphite/block-6.c
@@ -0,0 +1,25 @@
+/* { dg-options "-O2 -floop-block -fdump-tree-graphite-all" } */
+
+#define N 10000
+void foo (int);
+int test ()
+{
+ int a[N][N];
+ unsigned i, j;
+
+ for (i = 0; i < N; i++)
+ for (j = 0; j < N; j++)
+ a[i][j] = i*j;
+
+ for (i = 1; i < N; i++)
+ for (j = 1; j < (N-1) ; j++)
+ a[i][j] = a[i-1][j+1] * a[i-1][j+1]/2;
+
+ for (i = 0; i < N; i++)
+ for (j = 0; j < N; j++)
+ foo (a[i][j]);
+}
+
+/* Interchange is not legal for loops 0 and 1 of SCoP 2. */
+/* { dg-final { scan-tree-dump-times "Interchange not valid for loops 0 and 1:" 1 "graphite"} } */
+/* { dg-final { cleanup-tree-dump "graphite" } } */
diff --git a/gcc/testsuite/gcc.dg/graphite/pr37485.c b/gcc/testsuite/gcc.dg/graphite/pr37485.c
index 67661910ba2..cf0969bac1d 100644
--- a/gcc/testsuite/gcc.dg/graphite/pr37485.c
+++ b/gcc/testsuite/gcc.dg/graphite/pr37485.c
@@ -29,3 +29,4 @@ void fallbackSort ( UInt32* fmap,
AssertH ( j < 256, 1005 );
}
/* { dg-final { scan-tree-dump-times "Loop blocked" 1 "graphite" { xfail *-*-* }} } */
+/* { dg-final { cleanup-tree-dump "graphite" } } */
diff --git a/gcc/testsuite/gcc.dg/graphite/pr37684.c b/gcc/testsuite/gcc.dg/graphite/pr37684.c
index 35c32911c30..a9e6f5a4a59 100644
--- a/gcc/testsuite/gcc.dg/graphite/pr37684.c
+++ b/gcc/testsuite/gcc.dg/graphite/pr37684.c
@@ -63,3 +63,5 @@ int BZ2_bzCompressInit
}
prepare_new_block ( s );
}
+
+/* { dg-final { cleanup-tree-dump "graphite" } } */
diff --git a/gcc/testsuite/gcc.dg/graphite/pr37883.c b/gcc/testsuite/gcc.dg/graphite/pr37883.c
new file mode 100644
index 00000000000..2ab043adce1
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/graphite/pr37883.c
@@ -0,0 +1,11 @@
+/* { dg-options "-O3 -floop-block" } */
+
+void test_sort()
+{
+ char *base;
+ register char c, *i, *hi;
+
+ for (i = base; i < hi; i++)
+ *i++ = c;
+}
+
diff --git a/gcc/testsuite/gcc.dg/graphite/pr37928.c b/gcc/testsuite/gcc.dg/graphite/pr37928.c
new file mode 100644
index 00000000000..47ad5bce0bd
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/graphite/pr37928.c
@@ -0,0 +1,33 @@
+/* { dg-options "-O3 -floop-block" } */
+
+int get_state(int size, int *node, int *hash)
+{
+ int i=0;
+ while(hash[i])
+ {
+ if(node[hash[i]] == 0)
+ return hash[i]-1;
+ i++;
+ if(i==5)
+ i=0;
+ }
+ return -1;
+}
+
+void foo (int);
+
+int gate1(int size, int *node, int *hash)
+{
+ int i, j ;
+ int add_size=0;
+ for(i=0; i<size; i++)
+ {
+ j = get_state(size,node, hash);
+ if(j == -1)
+ {
+ add_size++;
+ }
+ }
+
+ foo (size+add_size);
+}
diff --git a/gcc/testsuite/gcc.dg/graphite/pr38073.c b/gcc/testsuite/gcc.dg/graphite/pr38073.c
new file mode 100644
index 00000000000..9c48d8d095f
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/graphite/pr38073.c
@@ -0,0 +1,9 @@
+/* { dg-options "-O3 -fgraphite-identity" } */
+
+test_seg(int a, int b)
+{
+ int i,r=1;
+ for(i=0; i<b ;i++)
+ r*=a;
+ return r;
+}
diff --git a/gcc/testsuite/gcc.dg/graphite/pr38125.c b/gcc/testsuite/gcc.dg/graphite/pr38125.c
new file mode 100644
index 00000000000..780e6f643e6
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/graphite/pr38125.c
@@ -0,0 +1,32 @@
+/* { dg-options "-O3 -fgraphite-identity" } */
+
+typedef struct sv TEST_SV;
+typedef struct av TEST_AV;
+typedef struct magic TEST_MAGIC;
+typedef struct xpvav TEST_XPVAV;
+struct sv
+{
+ void* sv_any;
+};
+struct av
+{
+ TEST_XPVAV* sv_any;
+};
+struct xpvav
+{
+ char* xav_array;
+ long int xav_fill;
+ long int xav_max;
+};
+struct magic {
+ TEST_SV* mg_obj;
+};
+extern TEST_SV PL_sv_undef;
+Perl_av_fill( register TEST_AV *av, int fill)
+{
+ TEST_MAGIC *mg;
+ int key = ((TEST_XPVAV*) (av)->sv_any)->xav_fill;
+ TEST_SV** ary = ((TEST_SV**)((TEST_XPVAV*) (av)->sv_any)->xav_array);
+ while (key < fill)
+ ary[++key] = &PL_sv_undef;
+}
diff --git a/gcc/testsuite/gcc.dg/graphite/pr38409.c b/gcc/testsuite/gcc.dg/graphite/pr38409.c
new file mode 100644
index 00000000000..41c67753426
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/graphite/pr38409.c
@@ -0,0 +1,24 @@
+/* { dg-options "-O2 -floop-block" } */
+
+typedef struct test input ;
+struct test
+{
+ int type ;
+ int symflag ;
+};
+Chv_copyEntriesToVector ( input *chv,double *dvec)
+{
+ double *entries ;
+ int mm, nent;
+ int first, i, k , stride ;
+ if ( ((chv)->type == 1) )
+ {
+ for ( i = 0 ; i < 10 ; i++)
+ {
+ dvec[2*mm] = entries[2*k] ;
+ k += stride ;
+ stride -= 2 ;
+ }
+ }
+ return(mm) ;
+}
diff --git a/gcc/testsuite/gcc.dg/graphite/pr38413.c b/gcc/testsuite/gcc.dg/graphite/pr38413.c
new file mode 100644
index 00000000000..6c2b23a8829
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/graphite/pr38413.c
@@ -0,0 +1,14 @@
+/* { dg-options "-O2 -fgraphite-identity" } */
+
+static int qsz;
+
+void specqsort(base, n, size, compar)
+ char *base;
+{
+ register char c, *i, *j, *lo, *hi;
+ qsz = size;
+ for (i = base, hi = base + qsz; i < hi; )
+ {
+ *i++ = c;
+ }
+}
diff --git a/gcc/testsuite/gcc.dg/graphite/pr38446.c b/gcc/testsuite/gcc.dg/graphite/pr38446.c
new file mode 100644
index 00000000000..b7b346cd98b
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/graphite/pr38446.c
@@ -0,0 +1,14 @@
+/* { dg-options "-O2 -fgraphite-identity" } */
+
+void copy_data()
+{
+ int ****source;
+ int ****dest;
+
+ int i, j, k, l;
+ for (i = 0; i < 10; i++)
+ for (k = 0; k < 2; k++)
+ for (l = 0; l < 65; l++)
+ source[i][j][k][l] = dest[i][j][k][l];
+}
+
diff --git a/gcc/testsuite/gcc.dg/graphite/scop-15.c b/gcc/testsuite/gcc.dg/graphite/scop-15.c
index 7e242537315..9324631e2fd 100644
--- a/gcc/testsuite/gcc.dg/graphite/scop-15.c
+++ b/gcc/testsuite/gcc.dg/graphite/scop-15.c
@@ -48,5 +48,6 @@ int longest_match(IPos cur_match)
&& --chain_length != 0);
return best_len;
}
+
/* { dg-final { scan-tree-dump-times "number of SCoPs: 0" 1 "graphite"} } */
/* { dg-final { cleanup-tree-dump "graphite" } } */
diff --git a/gcc/testsuite/gcc.dg/graphite/scop-16.c b/gcc/testsuite/gcc.dg/graphite/scop-16.c
index 42f7b6aade3..d0b32f63973 100644
--- a/gcc/testsuite/gcc.dg/graphite/scop-16.c
+++ b/gcc/testsuite/gcc.dg/graphite/scop-16.c
@@ -1,4 +1,5 @@
-/* { dg-options "-O2 -floop-block -fdump-tree-graphite-all" } */
+/* { dg-options "-O2 -fgraphite -fdump-tree-graphite-all" } */
+
#define N 10000
void foo (int);
int test ()
@@ -20,6 +21,5 @@ int test ()
foo (a[i][j]);
}
-/* Interchange is legal for loops 0 and 1 of the first two SCoPs */
-/* { dg-final { scan-tree-dump-times "Interchange valid for loops 0 and 1:" 2 "graphite"} } */
+/* { dg-final { scan-tree-dump-times "number of SCoPs: 2" 1 "graphite"} } */
/* { dg-final { cleanup-tree-dump "graphite" } } */
diff --git a/gcc/testsuite/gcc.dg/graphite/scop-17.c b/gcc/testsuite/gcc.dg/graphite/scop-17.c
index 4c1b0ca2993..c2fec3fccaf 100644
--- a/gcc/testsuite/gcc.dg/graphite/scop-17.c
+++ b/gcc/testsuite/gcc.dg/graphite/scop-17.c
@@ -1,4 +1,5 @@
-/* { dg-options "-O2 -floop-block -fdump-tree-graphite-all" } */
+/* { dg-options "-O2 -fgraphite -fdump-tree-graphite-all" } */
+
#define N 10000
void foo (int);
int test ()
@@ -19,6 +20,5 @@ int test ()
foo (a[i][j]);
}
-/* Interchange is not legal for loops 0 and 1 of SCoP 2. */
-/* { dg-final { scan-tree-dump-times "Interchange not valid for loops 0 and 1:" 1 "graphite"} } */
+/* { dg-final { scan-tree-dump-times "number of SCoPs: 2" 1 "graphite"} } */
/* { dg-final { cleanup-tree-dump "graphite" } } */
diff --git a/gcc/testsuite/gcc.dg/graphite/scop-18.c b/gcc/testsuite/gcc.dg/graphite/scop-18.c
index fe2d5f4a412..6264116e114 100644
--- a/gcc/testsuite/gcc.dg/graphite/scop-18.c
+++ b/gcc/testsuite/gcc.dg/graphite/scop-18.c
@@ -1,4 +1,4 @@
-/* { dg-options "-O2 -floop-block -fdump-tree-graphite-all" } */
+/* { dg-options "-O2 -fgraphite -fdump-tree-graphite-all" } */
#define N 24
#define M 1000
@@ -13,14 +13,14 @@ void test (void)
for (i = 0; i < 24; i++)
for (j = 0; j < 24; j++)
for (k = 0; k < 24; k++)
- A[i][j] += B[i][k] * C[k][j];
+ A[i][j] = B[i][k] * C[k][j];
/* These loops should still be strip mined. */
for (i = 0; i < 1000; i++)
for (j = 0; j < 1000; j++)
for (k = 0; k < 1000; k++)
- A[i][j] += B[i][k] * C[k][j];
+ A[i][j] = B[i][k] * C[k][j];
}
-/* { dg-final { scan-tree-dump-times "Strip Mining is not profitable" 3 "graphite" } } */
+/* { dg-final { scan-tree-dump-times "number of SCoPs: 2" 1 "graphite"} } */
/* { dg-final { cleanup-tree-dump "graphite" } } */
diff --git a/gcc/testsuite/gcc.dg/pr34027-1.c b/gcc/testsuite/gcc.dg/pr34027-1.c
index 532e4976dc3..8e8872a5133 100644
--- a/gcc/testsuite/gcc.dg/pr34027-1.c
+++ b/gcc/testsuite/gcc.dg/pr34027-1.c
@@ -8,5 +8,9 @@ unsigned long foobar(unsigned long ns)
return ns;
}
-/* { dg-final { scan-tree-dump "ns % 10000" "optimized" } } */
+/* This test was originally introduced to test that we transform
+ to ns % 10000. See the discussion of PR 32044 why we do not do
+ that anymore. */
+/* { dg-final { scan-tree-dump-times "%" 0 "optimized" } } */
+/* { dg-final { scan-tree-dump-times "/" 0 "optimized" } } */
/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/pr35442.c b/gcc/testsuite/gcc.dg/pr35442.c
index 4f1e3cc537f..2bf5ce67880 100644
--- a/gcc/testsuite/gcc.dg/pr35442.c
+++ b/gcc/testsuite/gcc.dg/pr35442.c
@@ -9,3 +9,6 @@ foo (A a)
{
((B) a) (); /* { dg-error "is not a function" } */
}
+
+/* Ignore a warning that is irrelevant to the purpose of this test. */
+/* { dg-prune-output ".*GCC vector passed by reference.*" } */
diff --git a/gcc/testsuite/gcc.dg/torture/pr38271.c b/gcc/testsuite/gcc.dg/torture/pr38271.c
new file mode 100644
index 00000000000..2c64a9b34a6
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr38271.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-Wuninitialized" } */
+
+struct xxx {
+ short a;
+ short b;
+ void *c;
+};
+
+void bar(struct xxx);
+
+void foo(struct xxx *p, int i)
+{
+ struct xxx s0 = *p;
+ struct xxx s = s0;
+ if (s.a) i++;
+ bar(s);
+}
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/loop-3.c b/gcc/testsuite/gcc.dg/tree-ssa/loop-3.c
index 57db5c32399..9868c078df2 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/loop-3.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/loop-3.c
@@ -2,9 +2,8 @@
Target is restricted to x86 type architectures, so that we may
assume something about memory addressing modes. */
-/* { dg-do compile { target i?86-*-* x86_64-*-* } } */
-/* { dg-skip-if "" { i?86-*-* x86_64-*-* } { "-fpic" "-fPIC" } { "" } } */
-/* { dg-options "-O1 -fno-pic -fno-PIC -fdump-tree-optimized" } */
+/* { dg-do compile { target { { i?86-*-* x86_64-*-* } && nonpic } } } */
+/* { dg-options "-O1 -fdump-tree-optimized" } */
int arr_base[100];
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr32044.c b/gcc/testsuite/gcc.dg/tree-ssa/pr32044.c
new file mode 100644
index 00000000000..0c1a58206f4
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr32044.c
@@ -0,0 +1,55 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-empty -fdump-tree-final_cleanup" } */
+
+int foo (int n)
+{
+ while (n >= 45)
+ n -= 45;
+
+ return n;
+}
+
+int bar (int n)
+{
+ while (n >= 64)
+ n -= 64;
+
+ return n;
+}
+
+int bla (int n)
+{
+ int i = 0;
+
+ while (n >= 45)
+ {
+ i++;
+ n -= 45;
+ }
+
+ return i;
+}
+
+int baz (int n)
+{
+ int i = 0;
+
+ while (n >= 64)
+ {
+ i++;
+ n -= 64;
+ }
+
+ return i;
+}
+
+/* The loops computing division/modulo by 64 should be eliminated. */
+/* { dg-final { scan-tree-dump-times "Removing empty loop" 2 "empty" } } */
+
+/* There should be no division/modulo in the final dump (division and modulo
+ by 64 are done using bit operations). */
+/* { dg-final { scan-tree-dump-times "/" 0 "final_cleanup" } } */
+/* { dg-final { scan-tree-dump-times "%" 0 "final_cleanup" } } */
+
+/* { dg-final { cleanup-tree-dump "empty" } } */
+/* { dg-final { cleanup-tree-dump "final_cleanup" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-10.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-10.c
index cfbb9c97b16..a27f2d6c023 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-10.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-10.c
@@ -4,6 +4,8 @@
union loc { unsigned reg; signed offset; };
void __frame_state_for (volatile char *state_in, int x)
{
+ /* We should move all the loads out of this loop. Right now, we only
+ move one. It takes two insertions because we insert a cast. */
union loc fs;
int reg;
for (;;) {
@@ -16,5 +18,5 @@ void __frame_state_for (volatile char *state_in, int x)
}
}
-/* { dg-final { scan-tree-dump-not "Insertions:" "pre" } } */
+/* { dg-final { scan-tree-dump "Insertions: 2" "pre" } } */
/* { dg-final { cleanup-tree-dump "pre" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-slp-12.c b/gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-slp-12.c
index 752c4f61390..5eb01ebba86 100644
--- a/gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-slp-12.c
+++ b/gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-slp-12.c
@@ -114,7 +114,7 @@ int main (void)
return 0;
}
-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" {target { vect_strided && vect_int_mult } } } } */
-/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" {target { vect_strided && vect_int_mult } } } } */
+/* { dg-final { scan-tree-dump-times "vectorized 3 loops" 1 "vect" {target { vect_strided && vect_int_mult } } } } */
+/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 3 "vect" {target { vect_strided && vect_int_mult } } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/pr36630.c b/gcc/testsuite/gcc.dg/vect/pr36630.c
index 9d85afffb20..2253f7574b8 100644
--- a/gcc/testsuite/gcc.dg/vect/pr36630.c
+++ b/gcc/testsuite/gcc.dg/vect/pr36630.c
@@ -13,4 +13,5 @@ foo (unsigned char *x, short y)
i = i + 1;
}
}
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.target/i386/sse-12.c b/gcc/testsuite/gcc.target/i386/sse-12.c
index ef4dd6e84e0..5e2173a8f6e 100644
--- a/gcc/testsuite/gcc.target/i386/sse-12.c
+++ b/gcc/testsuite/gcc.target/i386/sse-12.c
@@ -1,10 +1,8 @@
-/* Test that {,x,e,p,t,s,a}mmintrin.h, mm3dnow.h and mm_malloc.h are
+/* Test that {,x,e,p,t,s,w,a,b,i}mmintrin.h, mm3dnow.h and mm_malloc.h are
usable with -O -std=c89 -pedantic-errors. */
/* { dg-do compile } */
-/* { dg-options "-O -std=c89 -pedantic-errors -march=k8 -m3dnow -msse4 -msse5" } */
+/* { dg-options "-O -std=c89 -pedantic-errors -march=k8 -m3dnow -mavx -msse5 -maes -mpclmul" } */
-#include <bmmintrin.h>
-#include <smmintrin.h>
-#include <mm3dnow.h>
+#include <x86intrin.h>
int dummy;
diff --git a/gcc/testsuite/gcc.target/i386/sse-13.c b/gcc/testsuite/gcc.target/i386/sse-13.c
index e3deeca3549..8bfb9f866b4 100644
--- a/gcc/testsuite/gcc.target/i386/sse-13.c
+++ b/gcc/testsuite/gcc.target/i386/sse-13.c
@@ -1,10 +1,10 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -Werror-implicit-function-declaration -march=k8 -m3dnow -msse4 -msse5 -maes -mpclmul" } */
+/* { dg-options "-O2 -Werror-implicit-function-declaration -march=k8 -m3dnow -mavx -msse5 -maes -mpclmul" } */
#include <mm_malloc.h>
/* Test that the intrinsics compile with optimization. All of them are
- defined as inline functions in {,x,e,p,t,s,w,a,b}mmintrin.h and mm3dnow.h
+ defined as inline functions in {,x,e,p,t,s,w,a,b,i}mmintrin.h and mm3dnow.h
that reference the proper builtin functions. Defining away "extern" and
"__inline" results in all of them being compiled as proper functions. */
@@ -17,6 +17,38 @@
#define __builtin_ia32_extrqi(X, I, L) __builtin_ia32_extrqi(X, 1, 1)
#define __builtin_ia32_insertqi(X, Y, I, L) __builtin_ia32_insertqi(X, Y, 1, 1)
+/* immintrin.h */
+#define __builtin_ia32_blendpd256(X, Y, M) __builtin_ia32_blendpd256(X, Y, 1)
+#define __builtin_ia32_blendps256(X, Y, M) __builtin_ia32_blendps256(X, Y, 1)
+#define __builtin_ia32_dpps256(X, Y, M) __builtin_ia32_dpps256(X, Y, 1)
+#define __builtin_ia32_shufpd256(X, Y, M) __builtin_ia32_shufpd256(X, Y, 1)
+#define __builtin_ia32_shufps256(X, Y, M) __builtin_ia32_shufps256(X, Y, 1)
+#define __builtin_ia32_cmpsd(X, Y, O) __builtin_ia32_cmpsd(X, Y, 1)
+#define __builtin_ia32_cmpss(X, Y, O) __builtin_ia32_cmpss(X, Y, 1)
+#define __builtin_ia32_cmppd(X, Y, O) __builtin_ia32_cmppd(X, Y, 1)
+#define __builtin_ia32_cmpps(X, Y, O) __builtin_ia32_cmpps(X, Y, 1)
+#define __builtin_ia32_cmppd256(X, Y, O) __builtin_ia32_cmppd256(X, Y, 1)
+#define __builtin_ia32_cmpps256(X, Y, O) __builtin_ia32_cmpps256(X, Y, 1)
+#define __builtin_ia32_vextractf128_pd256(X, N) __builtin_ia32_vextractf128_pd256(X, 1)
+#define __builtin_ia32_vextractf128_ps256(X, N) __builtin_ia32_vextractf128_ps256(X, 1)
+#define __builtin_ia32_vextractf128_si256(X, N) __builtin_ia32_vextractf128_si256(X, 1)
+#define __builtin_ia32_vpermilpd(X, N) __builtin_ia32_vpermilpd(X, 1)
+#define __builtin_ia32_vpermilpd256(X, N) __builtin_ia32_vpermilpd256(X, 1)
+#define __builtin_ia32_vpermilps(X, N) __builtin_ia32_vpermilps(X, 1)
+#define __builtin_ia32_vpermilps256(X, N) __builtin_ia32_vpermilps256(X, 1)
+#define __builtin_ia32_vpermil2pd(X, Y, C, I) __builtin_ia32_vpermil2pd(X, Y, C, 1)
+#define __builtin_ia32_vpermil2pd256(X, Y, C, I) __builtin_ia32_vpermil2pd256(X, Y, C, 1)
+#define __builtin_ia32_vpermil2ps(X, Y, C, I) __builtin_ia32_vpermil2ps(X, Y, C, 1)
+#define __builtin_ia32_vpermil2ps256(X, Y, C, I) __builtin_ia32_vpermil2ps256(X, Y, C, 1)
+#define __builtin_ia32_vperm2f128_pd256(X, Y, C) __builtin_ia32_vperm2f128_pd256(X, Y, 1)
+#define __builtin_ia32_vperm2f128_ps256(X, Y, C) __builtin_ia32_vperm2f128_ps256(X, Y, 1)
+#define __builtin_ia32_vperm2f128_si256(X, Y, C) __builtin_ia32_vperm2f128_si256(X, Y, 1)
+#define __builtin_ia32_vinsertf128_pd256(X, Y, C) __builtin_ia32_vinsertf128_pd256(X, Y, 1)
+#define __builtin_ia32_vinsertf128_ps256(X, Y, C) __builtin_ia32_vinsertf128_ps256(X, Y, 1)
+#define __builtin_ia32_vinsertf128_si256(X, Y, C) __builtin_ia32_vinsertf128_si256(X, Y, 1)
+#define __builtin_ia32_roundpd256(V, M) __builtin_ia32_roundpd256(V, 1)
+#define __builtin_ia32_roundps256(V, M) __builtin_ia32_roundps256(V, 1)
+
/* wmmintrin.h */
#define __builtin_ia32_aeskeygenassist128(X, C) __builtin_ia32_aeskeygenassist128(X, 1)
#define __builtin_ia32_pclmulqdq128(X, Y, I) __builtin_ia32_pclmulqdq128(X, Y, 1)
@@ -100,7 +132,4 @@
#define __builtin_ia32_protdi(A, B) __builtin_ia32_protdi(A,1)
#define __builtin_ia32_protqi(A, B) __builtin_ia32_protqi(A,1)
-#include <wmmintrin.h>
-#include <bmmintrin.h>
-#include <smmintrin.h>
-#include <mm3dnow.h>
+#include <x86intrin.h>
diff --git a/gcc/testsuite/gcc.target/i386/sse-14.c b/gcc/testsuite/gcc.target/i386/sse-14.c
index 35db725def8..01725681f88 100644
--- a/gcc/testsuite/gcc.target/i386/sse-14.c
+++ b/gcc/testsuite/gcc.target/i386/sse-14.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O0 -Werror-implicit-function-declaration -march=k8 -m3dnow -msse4 -msse5 -maes -mpclmul" } */
+/* { dg-options "-O0 -Werror-implicit-function-declaration -march=k8 -m3dnow -mavx -msse5 -maes -mpclmul" } */
#include <mm_malloc.h>
@@ -11,10 +11,7 @@
#define extern
#define __inline
-#include <wmmintrin.h>
-#include <bmmintrin.h>
-#include <smmintrin.h>
-#include <mm3dnow.h>
+#include <x86intrin.h>
#define _CONCAT(x,y) x ## y
@@ -34,6 +31,11 @@
type _CONCAT(_,func) (op1_type A, op2_type B, int const I, int const L) \
{ return func (A, B, imm1, imm2); }
+#define test_3(func, type, op1_type, op2_type, op3_type, imm) \
+ type _CONCAT(_,func) (op1_type A, op2_type B, \
+ op3_type C, int const I) \
+ { return func (A, B, C, imm); }
+
#define test_4(func, type, op1_type, op2_type, op3_type, op4_type, imm) \
type _CONCAT(_,func) (op1_type A, op2_type B, \
op3_type C, op4_type D, int const I) \
@@ -47,6 +49,50 @@
test_1x (_mm_extracti_si64, __m128i, __m128i, 1, 1)
test_2x (_mm_inserti_si64, __m128i, __m128i, __m128i, 1, 1)
+/* immintrin.h */
+test_2 (_mm256_blend_pd, __m256d, __m256d, __m256d, 1)
+test_2 (_mm256_blend_ps, __m256, __m256, __m256, 1)
+test_2 (_mm256_dp_ps, __m256, __m256, __m256, 1)
+test_2 (_mm256_shuffle_pd, __m256d, __m256d, __m256d, 1)
+test_2 (_mm256_shuffle_ps, __m256, __m256, __m256, 1)
+test_2 (_mm_cmp_sd, __m128d, __m128d, __m128d, 1)
+test_2 (_mm_cmp_ss, __m128, __m128, __m128, 1)
+test_2 (_mm_cmp_pd, __m128d, __m128d, __m128d, 1)
+test_2 (_mm_cmp_ps, __m128, __m128, __m128, 1)
+test_2 (_mm256_cmp_pd, __m256d, __m256d, __m256d, 1)
+test_2 (_mm256_cmp_ps, __m256, __m256, __m256, 1)
+test_1 (_mm256_extractf128_pd, __m128d, __m256d, 1)
+test_1 (_mm256_extractf128_ps, __m128, __m256, 1)
+test_1 (_mm256_extractf128_si256, __m128i, __m256i, 1)
+test_1 (_mm256_extract_epi8, int, __m256i, 20)
+test_1 (_mm256_extract_epi16, int, __m256i, 13)
+test_1 (_mm256_extract_epi32, int, __m256i, 6)
+#ifdef __x86_64__
+test_1 (_mm256_extract_epi64, long long, __m256i, 2)
+#endif
+test_1 (_mm_permute_pd, __m128d, __m128d, 1)
+test_1 (_mm256_permute_pd, __m256d, __m256d, 1)
+test_1 (_mm_permute_ps, __m128, __m128, 1)
+test_1 (_mm256_permute_ps, __m256, __m256, 1)
+test_3 (_mm_permute2_pd, __m128d, __m128d, __m128d, __m128d, 1)
+test_3 (_mm256_permute2_pd, __m256d, __m256d, __m256d, __m256d, 1)
+test_3 (_mm_permute2_ps, __m128, __m128, __m128, __m128, 1)
+test_3 (_mm256_permute2_ps, __m256, __m256, __m256, __m256, 1)
+test_2 (_mm256_permute2f128_pd, __m256d, __m256d, __m256d, 1)
+test_2 (_mm256_permute2f128_ps, __m256, __m256, __m256, 1)
+test_2 (_mm256_permute2f128_si256, __m256i, __m256i, __m256i, 1)
+test_2 (_mm256_insertf128_pd, __m256d, __m256d, __m128d, 1)
+test_2 (_mm256_insertf128_ps, __m256, __m256, __m128, 1)
+test_2 (_mm256_insertf128_si256, __m256i, __m256i, __m128i, 1)
+test_2 (_mm256_insert_epi8, __m256i, __m256i, int, 30)
+test_2 (_mm256_insert_epi16, __m256i, __m256i, int, 7)
+test_2 (_mm256_insert_epi32, __m256i, __m256i, int, 3)
+#ifdef __x86_64__
+test_2 (_mm256_insert_epi64, __m256i, __m256i, long long, 1)
+#endif
+test_1 (_mm256_round_pd, __m256d, __m256d, 1)
+test_1 (_mm256_round_ps, __m256, __m256, 1)
+
/* wmmintrin.h */
test_1 (_mm_aeskeygenassist_si128, __m128i, __m128i, 1)
test_2 (_mm_clmulepi64_si128, __m128i, __m128i, __m128i, 1)
diff --git a/gcc/testsuite/gfortran.dg/default_format_denormal_2.f90 b/gcc/testsuite/gfortran.dg/default_format_denormal_2.f90
index 0ae32f8cb60..1ec70055aeb 100644
--- a/gcc/testsuite/gfortran.dg/default_format_denormal_2.f90
+++ b/gcc/testsuite/gfortran.dg/default_format_denormal_2.f90
@@ -1,5 +1,5 @@
! { dg-require-effective-target fortran_large_real }
-! { dg-do run { xfail powerpc*-apple-darwin* *-*-freebsd* powerpc*-*-linux* } }
+! { dg-do run { xfail { "powerpc*-apple-darwin* *-*-freebsd* powerpc*-*-linux*" && { ! large_long_double } } } }
! Test XFAILed on these platforms because the system's printf() lacks
! proper support for denormalized long doubles. See PR24685
!
diff --git a/gcc/testsuite/gfortran.dg/fmt_int_sign.f90 b/gcc/testsuite/gfortran.dg/fmt_int_sign.f90
new file mode 100644
index 00000000000..2257fd8296c
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/fmt_int_sign.f90
@@ -0,0 +1,16 @@
+! { dg-do run }
+! { dg-options -fno-range-check }
+! PR38504 double minus sign when printing integer
+! Test case derived from example by Jos de Kloe
+program IntAdtest
+
+ integer, parameter :: i8_ = Selected_Int_Kind(18) ! = integer*8
+ character(len=22) :: str_value
+ integer(i8_) :: value
+ character(len=*), parameter :: format_IntAd = "(i22)"
+
+ value = -9223372036854775807_i8_ -1
+ write(str_value, format_IntAd) value
+ if (str_value.ne." -9223372036854775808") call abort
+
+end program IntAdtest
diff --git a/gcc/testsuite/gfortran.dg/graphite/id-2.f90 b/gcc/testsuite/gfortran.dg/graphite/id-2.f90
new file mode 100644
index 00000000000..0c9f54bb979
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/graphite/id-2.f90
@@ -0,0 +1,15 @@
+! { dg-options "-O2 -fgraphite-identity" }
+
+module solv_cap
+ integer, parameter, public :: dp = selected_real_kind(5)
+contains
+ subroutine prod0( G, X )
+ real(kind=dp), intent(in out), dimension(:,:) :: X
+ real(kind=dp), dimension(size(X,1),size(X,2)) :: Y
+ X = Y
+ end subroutine prod0
+ function Ginteg(xq1,yq1, xq2,yq2, xp,yp) result(G)
+ end function Ginteg
+ subroutine fourir(A,ntot,kconjg, E,useold)
+ end subroutine fourir
+end module solv_cap
diff --git a/gcc/testsuite/gfortran.dg/graphite/id-4.f90 b/gcc/testsuite/gfortran.dg/graphite/id-4.f90
new file mode 100644
index 00000000000..896d608777e
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/graphite/id-4.f90
@@ -0,0 +1,34 @@
+! { dg-options "-O2 -fgraphite-identity" }
+
+MODULE Vcimage
+ CHARACTER (LEN=80), SAVE :: CARD, FIELD
+END MODULE Vcimage
+MODULE Vimage
+ LOGICAL, SAVE :: EOFF
+END MODULE Vimage
+SUBROUTINE READIN(PROB, TITLE, CSTOP, FCYCLE, DCYCLE, DHIST, VHIST&
+ & , IMAX, PHIST, DEBUG, NSTAT, STATS, MAXSTA, NCORE, PPLOT, &
+ & DPLOT, VPLOT, TPLOT, SLIST, D0, E0, NODES, SHEAT, GAMMA, COLD &
+ & , THIST, NVISC, SCREEN, WEIGHT, TSTOP, STABF)
+ USE Vcimage
+ USE Vimage
+ INTEGER, DIMENSION(MAXSTA) :: STATS
+ IF (.NOT.EOFF) THEN
+ IF (FIELD=='PROB' .OR. FIELD=='PROBLEM_NUMBER') THEN
+ CALL QSORT (STATS(1:NSTAT))
+ WRITE (16, &
+ &'(//'' YOU HAVE REQUESTED A PRINTOUT OF THE STATION'', &
+ & '' ABORT''//)')
+ ENDIF
+ ENDIF
+CONTAINS
+ RECURSIVE SUBROUTINE QSORT (LIST)
+ INTEGER, DIMENSION(:), INTENT(INOUT) :: LIST
+ INTEGER, DIMENSION(SIZE(LIST)) :: SMALLER,LARGER
+ IF (SIZE(LIST) > 1) THEN
+ LIST(NUMBER_SMALLER+1:NUMBER_SMALLER+NUMBER_EQUAL) = CHOSEN
+ CALL QSORT (LARGER(1:NUMBER_LARGER))
+ LIST(NUMBER_SMALLER+NUMBER_EQUAL+1:) = LARGER(1:NUMBER_LARGER)
+ END IF
+ END SUBROUTINE QSORT
+END SUBROUTINE READIN
diff --git a/gcc/testsuite/gfortran.dg/graphite/pr37852.f90 b/gcc/testsuite/gfortran.dg/graphite/pr37852.f90
new file mode 100644
index 00000000000..50e23428f82
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/graphite/pr37852.f90
@@ -0,0 +1,13 @@
+! { dg-options "-O2 -floop-block" }
+
+PROGRAM TEST_FPU
+CHARACTER (LEN=36) :: invert_id(1) = &
+ (/ 'Test1 - Gauss 2000 (101x101) inverts'/)
+END PROGRAM TEST_FPU
+
+SUBROUTINE Gauss (a,n)
+INTEGER, PARAMETER :: RK8 = SELECTED_REAL_KIND(15, 300)
+REAL(RK8) :: a(n,n)
+INTEGER :: ipvt(n)
+a(:,ipvt) = b
+END SUBROUTINE Gauss
diff --git a/gcc/testsuite/gfortran.dg/graphite/pr37857.f90 b/gcc/testsuite/gfortran.dg/graphite/pr37857.f90
new file mode 100644
index 00000000000..de2d3a124ee
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/graphite/pr37857.f90
@@ -0,0 +1,9 @@
+! { dg-options "-O2 -floop-block" }
+
+program superficie_proteina
+ integer, parameter :: LONGreal = selected_real_kind(12,90)
+ integer :: number_of_polypeptides, maximum_polypeptide_length
+ real (kind = LONGreal), dimension (:,:), allocatable :: individual_conformations
+ allocate (individual_conformations(-number_of_bins:0,number_of_polypeptides))
+ individual_conformations = 0.0_LONGreal
+end program superficie_proteina
diff --git a/gcc/testsuite/gfortran.dg/graphite/pr37980.f90 b/gcc/testsuite/gfortran.dg/graphite/pr37980.f90
new file mode 100644
index 00000000000..5306aa84c92
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/graphite/pr37980.f90
@@ -0,0 +1,11 @@
+! { dg-options "-O2 -floop-block" }
+
+module INT_MODULE
+contains
+ pure function spher_cartesians(in1) result(out1)
+ integer(kind=kind(1)) :: in1
+ intent(in) :: in1
+ real(kind=kind(1.0d0)), dimension(0:in1,0:in1,0:in1) :: mat0
+ mat0 = 0.0d0
+ end function spher_cartesians
+end module INT_MODULE
diff --git a/gcc/testsuite/gfortran.dg/graphite/pr38083.f90 b/gcc/testsuite/gfortran.dg/graphite/pr38083.f90
new file mode 100644
index 00000000000..834d33ab833
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/graphite/pr38083.f90
@@ -0,0 +1,16 @@
+! { dg-options "-O3 -floop-block" }
+
+SUBROUTINE IVSORT (IL,IH,NSEGS,IOUNIT)
+ INTEGER IOUNIT
+
+ INTEGER, PARAMETER :: MAXGS = 32
+
+10 IF (IL .GE. IH) GO TO 80
+20 NSEGS = (IH + IL) / 2
+ IF (NSEGS .GT. MAXSGS) THEN
+ WRITE (IOUNIT),MAXSGS
+ ENDIF
+80 NSEGS = NSEGS - 1
+90 IF (IH - IL .GE. 11) GO TO 20
+110 IF (IL .EQ. IH) GO TO 80
+END SUBROUTINE IVSORT
diff --git a/gcc/testsuite/gfortran.dg/graphite/pr38459.f90 b/gcc/testsuite/gfortran.dg/graphite/pr38459.f90
new file mode 100644
index 00000000000..1feb6e503eb
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/graphite/pr38459.f90
@@ -0,0 +1,14 @@
+! { dg-options "-O2 -fgraphite-identity" }
+# 1 "mltfftsg.F"
+# 1 "<built-in>"
+SUBROUTINE mltfftsg ( a, ldax, lday, b, ldbx, ldby, &
+ n, m)
+ INTEGER, PARAMETER :: dbl = SELECTED_REAL_KIND ( 14, 200 )
+
+! Arguments
+ INTEGER, INTENT ( IN ) :: ldbx, ldby, n, m
+ COMPLEX ( dbl ), INTENT ( INOUT ) :: b ( ldbx, ldby )
+
+ B(N+1:LDBX,1:M) = CMPLX(0._dbl,0._dbl,dbl)
+
+END SUBROUTINE mltfftsg
diff --git a/gcc/testsuite/gfortran.dg/matmul_argument_types.f90 b/gcc/testsuite/gfortran.dg/matmul_argument_types.f90
new file mode 100644
index 00000000000..1480655c4c9
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/matmul_argument_types.f90
@@ -0,0 +1,32 @@
+! { dg-do compile }
+!
+! PR fortran/36355
+! Check MATMUL argument types:
+!
+! numeric logical other
+! numeric 1 2 3
+! logical 2 1 3
+! other 3 3 3
+!
+! where
+! 1 ok
+! 2 argument type mismatch
+! 3 invalid argument types
+!
+
+ INTEGER :: a(2,2)
+ LOGICAL :: b(2,2)
+ CHARACTER :: c
+
+ a = MATMUL(a, a) ! ok
+ a = MATMUL(a, b) ! { dg-error "must match" }
+ a = MATMUL(a, c) ! { dg-error "must be numeric or LOGICAL" }
+
+ b = MATMUL(b, a) ! { dg-error "must match" }
+ b = MATMUL(b, b) ! ok
+ b = MATMUL(b, c) ! { dg-error "must be numeric or LOGICAL" }
+
+ c = MATMUL(c, a) ! { dg-error "must be numeric or LOGICAL" }
+ c = MATMUL(c, b) ! { dg-error "must be numeric or LOGICAL" }
+ c = MATMUL(c, c) ! { dg-error "must be numeric or LOGICAL" }
+END
diff --git a/gcc/testsuite/obj-c++.dg/bitfield-1.mm b/gcc/testsuite/obj-c++.dg/bitfield-1.mm
index 087a13ff7ad..d9b65a4f453 100644
--- a/gcc/testsuite/obj-c++.dg/bitfield-1.mm
+++ b/gcc/testsuite/obj-c++.dg/bitfield-1.mm
@@ -5,10 +5,10 @@
superclasses should be removed). */
/* Contributed by Ziemowit Laski <zlaski@apple.com>. */
/* { dg-do run } */
-/* { dg-xfail-if "PR31032" { *-*-* } { "*" } { "" } } */
-/* { dg-prune-output ".*internal compiler error.*" } */
/* { dg-options "-Wpadded -Wabi" } */
+/* Leave blank lines here to keep warnings on the same lines. */
+
#include <objc/objc.h>
#include <objc/Object.h>
#include <stdlib.h>