aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2008-03-14 17:17:38 +0000
committerJakub Jelinek <jakub@redhat.com>2008-03-14 17:17:38 +0000
commit51da7aa3cafc86c9a1d3902948f5a674bffc15f7 (patch)
treea3ca0f55f16b8d7c745f784375ac6ad48e830177 /gcc/testsuite
parent4a700f9d166839b2c8c83e87a9b15a634300f529 (diff)
svn merge -r133000:133221 svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_3-branch/
git-svn-id: https://gcc.gnu.org/svn/gcc/branches/redhat/gcc-4_3-branch@133223 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite')
-rw-r--r--gcc/testsuite/ChangeLog93
-rw-r--r--gcc/testsuite/g++.dg/gomp/pr35099.C39
-rw-r--r--gcc/testsuite/g++.dg/gomp/pr35328.C31
-rw-r--r--gcc/testsuite/g++.dg/gomp/pr35337.C20
-rw-r--r--gcc/testsuite/g++.dg/inherit/override-attribs.C4
-rw-r--r--gcc/testsuite/g++.dg/other/i386-3.C8
-rw-r--r--gcc/testsuite/g++.dg/torture/pr35526.C18
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr35456.c21
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr35472.c22
-rw-r--r--gcc/testsuite/gcc.dg/gomp/pr35438.c6
-rw-r--r--gcc/testsuite/gcc.dg/gomp/pr35439.c6
-rw-r--r--gcc/testsuite/gcc.dg/pr34989-1.c10
-rw-r--r--gcc/testsuite/gcc.dg/pr34989-2.c3
-rw-r--r--gcc/testsuite/gcc.target/i386/3dnow-1.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/3dnow-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/3dnowA-1.c7
-rw-r--r--gcc/testsuite/gcc.target/i386/3dnowA-2.c7
-rw-r--r--gcc/testsuite/gcc.target/i386/isa-1.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/isa-10.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/isa-11.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/isa-12.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/isa-13.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/isa-14.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/isa-2.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/isa-3.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/mmx-1.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/mmx-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/pr35540.c45
-rw-r--r--gcc/testsuite/gcc.target/i386/sse-13.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/sse-14.c4
-rw-r--r--gcc/testsuite/gfortran.dg/module_commons_2.f9021
-rw-r--r--gcc/testsuite/gnat.dg/frame_overflow.adb8
32 files changed, 377 insertions, 32 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 24c2dabed20..ea08c5dee6c 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,96 @@
+2008-03-14 Richard Guenther <rguenther@suse.de>
+
+ Backport from mainline:
+ 2008-02-19 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/34989
+ * gcc.dg/pr34989-1.c: New testcase.
+ * gcc.dg/pr34989-2.c: Likewise.
+
+2008-03-14 Uros Bizjak <ubizjak@gmail.com>
+
+ PR target/34000
+ PR target/35553
+ * g++.dg/other/i386-3.C: New test.
+ * gcc.target/i386/sse-13.c: Redefine extern instead of static.
+ * gcc.target/i386/sse-14.c: Ditto.
+ * gcc.target/i386/mmx-1.c: Ditto.
+ * gcc.target/i386/mmx-2.c: Ditto.
+ * gcc.target/i386/3dnow-1.c: Ditto.
+ * gcc.target/i386/3dnow-2.c: Ditto.
+ * gcc.target/i386/3dnowA-1.c: Ditto.
+ * gcc.target/i386/3dnowA-2.c: Ditto.
+
+2008-03-14 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/35474
+ * gfortran.dg/module_commons_2.f90 : New test.
+
+2008-03-12 Uros Bizjak <ubizjak@gmail.com>
+
+ PR target/35540
+ * gcc.target/i386/pr35540.c: New test.
+
+2008-03-11 Uros Bizjak <ubizjak@gmail.com>
+
+ * g++.dg/inherit/override-attribs.C: Require ilp32 x86 target.
+
+2008-03-11 Uros Bizjak <ubizjak@gmail.com>
+
+ PR middle-end/35526
+ * g++.dg/torture/pr35526.C: New test.
+
+2008-03-10 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/35328
+ * g++.dg/gomp/pr35328.C: New test.
+
+ PR c++/35337
+ * g++.dg/gomp/pr35337.C: New test.
+
+ PR c/35438
+ PR c/35439
+ * gcc.dg/gomp/pr35438.c: New test.
+ * gcc.dg/gomp/pr35439.c: New test.
+
+ PR middle-end/35099
+ * g++.dg/gomp/pr35099.C: New test.
+
+2008-03-10 Uros Bizjak <ubizjak@gmail.com>
+
+ Backport from mainline:
+ 2008-03-04 Uros Bizjak <ubizjak@gmail.com>
+
+ PR middle-end/35456
+ * gcc.c-torture/execute/pr35456.c: New test.
+
+2008-03-09 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/frame_overflow.adb: Improve portability.
+
+2008-03-08 H.J. Lu <hongjiu.lu@intel.com>
+
+ Backport from mainline:
+ 2008-03-08 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR target/35350
+ * gcc.target/i386/isa-1.c: Add -march=x86-64.
+ * gcc.target/i386/isa-2.c: Likewise.
+ * gcc.target/i386/isa-3.c: Likewise.
+ * gcc.target/i386/isa-10.c: Likewise.
+ * gcc.target/i386/isa-11.c: Likewise.
+ * gcc.target/i386/isa-12.c: Likewise.
+ * gcc.target/i386/isa-13.c: Likewise.
+ * gcc.target/i386/isa-14.c: Likewise.
+
+2008-03-07 Richard Guenther <rguenther@suse.de>
+
+ Backport from mainline:
+ 2008-03-05 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/35472
+ * gcc.c-torture/execute/pr35472.c: New testcase.
+
2008-03-06 H.J. Lu <hongjiu.lu@intel.com>
Backport from mainline:
diff --git a/gcc/testsuite/g++.dg/gomp/pr35099.C b/gcc/testsuite/g++.dg/gomp/pr35099.C
new file mode 100644
index 00000000000..6c793a3f8c2
--- /dev/null
+++ b/gcc/testsuite/g++.dg/gomp/pr35099.C
@@ -0,0 +1,39 @@
+// PR middle-end/35099
+// { dg-do compile }
+// { dg-options "-O2 -fopenmp" }
+
+struct A
+{
+ ~A () throw ();
+ void foo ();
+};
+
+struct B
+{
+ B () { A ().foo (); }
+};
+
+void
+bar ()
+{
+#pragma omp parallel
+ {
+ #pragma omp single
+ B ();
+ #pragma omp for
+ for (int i = 0; i < 2; ++i)
+ B ();
+ }
+}
+
+void
+baz ()
+{
+#pragma omp parallel
+ {
+ #pragma omp single
+ B ();
+ #pragma omp single
+ B ();
+ }
+}
diff --git a/gcc/testsuite/g++.dg/gomp/pr35328.C b/gcc/testsuite/g++.dg/gomp/pr35328.C
new file mode 100644
index 00000000000..718283b5957
--- /dev/null
+++ b/gcc/testsuite/g++.dg/gomp/pr35328.C
@@ -0,0 +1,31 @@
+// PR c++/35328
+// { dg-do compile }
+// { dg-options "-fopenmp" }
+
+struct A
+{
+ ~A ()(); // { dg-error "declared as function returning a function" }
+};
+struct B
+{
+ B ()(); // { dg-error "declared as function returning a function" }
+};
+struct C
+{
+ C ();
+ C (const C &)(); // { dg-error "declared as function returning a function" }
+};
+
+void
+foo ()
+{
+ A a;
+ B b;
+ C c;
+ #pragma omp parallel firstprivate (a)
+ ;
+ #pragma omp parallel private (b)
+ ;
+ #pragma omp parallel firstprivate (c)
+ ;
+}
diff --git a/gcc/testsuite/g++.dg/gomp/pr35337.C b/gcc/testsuite/g++.dg/gomp/pr35337.C
new file mode 100644
index 00000000000..2e9ca6b207f
--- /dev/null
+++ b/gcc/testsuite/g++.dg/gomp/pr35337.C
@@ -0,0 +1,20 @@
+// PR c++/35337
+// { dg-do compile }
+// { dg-options "-fopenmp" }
+
+struct A { };
+
+void
+foo ()
+{
+#pragma omp parallel firstprivate(A) // { dg-error "struct A\[^\n\]*is not a variable" }
+ ;
+}
+
+void
+bar ()
+{
+#pragma omp for lastprivate(A) // { dg-error "struct A\[^\n\]*is not a variable" }
+ for (int i = 0; i < 10; i++)
+ ;
+}
diff --git a/gcc/testsuite/g++.dg/inherit/override-attribs.C b/gcc/testsuite/g++.dg/inherit/override-attribs.C
index 44a1ea49734..e28b8d48430 100644
--- a/gcc/testsuite/g++.dg/inherit/override-attribs.C
+++ b/gcc/testsuite/g++.dg/inherit/override-attribs.C
@@ -1,5 +1,7 @@
// PR c++/14688
-// { dg-do compile { target i?86-*-* } }
+// { dg-do compile { target i?86-*-* x86_64-*-* } }
+// { dg-require-effective-target ilp32 }
+
class one
{
public:
diff --git a/gcc/testsuite/g++.dg/other/i386-3.C b/gcc/testsuite/g++.dg/other/i386-3.C
new file mode 100644
index 00000000000..8ebc74e628c
--- /dev/null
+++ b/gcc/testsuite/g++.dg/other/i386-3.C
@@ -0,0 +1,8 @@
+/* Test that {,x,e,p,t,s,a,b}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 -msse4 -msse5" } */
+
+#include <bmmintrin.h>
+#include <smmintrin.h>
+#include <mm3dnow.h>
diff --git a/gcc/testsuite/g++.dg/torture/pr35526.C b/gcc/testsuite/g++.dg/torture/pr35526.C
new file mode 100644
index 00000000000..d0a8e6d2c2f
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/pr35526.C
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+
+extern void *memcpy (void *__dest, __const void *__src, __SIZE_TYPE__ __n);
+
+char internal_crash_read_ip[] = { 0xb8 };
+
+struct u_internal_crash_read_t
+{
+ char ip[sizeof (internal_crash_read_ip)];
+}
+u_internal_crash_read;
+
+void
+gSignalHandler (int psignalNr, int pinfo, int pctx)
+{
+ memcpy (u_internal_crash_read.ip, internal_crash_read_ip,
+ sizeof (internal_crash_read_ip));
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr35456.c b/gcc/testsuite/gcc.c-torture/execute/pr35456.c
new file mode 100644
index 00000000000..175a0b2abfa
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr35456.c
@@ -0,0 +1,21 @@
+extern void abort (void);
+
+double
+__attribute__ ((noinline))
+not_fabs (double x)
+{
+ return x >= 0.0 ? x : -x;
+}
+
+int main()
+{
+ double x = -0.0;
+ double y;
+
+ y = not_fabs (x);
+
+ if (!__builtin_signbit (y))
+ abort();
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr35472.c b/gcc/testsuite/gcc.c-torture/execute/pr35472.c
new file mode 100644
index 00000000000..c8678e268c9
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr35472.c
@@ -0,0 +1,22 @@
+extern void abort (void);
+extern void *memset (void *s, int c, __SIZE_TYPE__ n);
+struct S { int i[16]; };
+struct S *p;
+void __attribute__((noinline))
+foo(struct S *a, struct S *b) { a->i[0] = -1; p = b; }
+void test (void)
+{
+ struct S a, b;
+ memset (&a.i[0], '\0', sizeof (a.i));
+ memset (&b.i[0], '\0', sizeof (b.i));
+ foo (&a, &b);
+ *p = a;
+ *p = b;
+ if (b.i[0] != -1)
+ abort ();
+}
+int main()
+{
+ test();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/gomp/pr35438.c b/gcc/testsuite/gcc.dg/gomp/pr35438.c
new file mode 100644
index 00000000000..a3ae7de0b6a
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/gomp/pr35438.c
@@ -0,0 +1,6 @@
+/* PR c/35438 */
+/* { dg-do compile } */
+/* { dg-options "-fopenmp" } */
+
+void foo ();
+#pragma omp threadprivate(foo) /* { dg-error "is not a variable" } */
diff --git a/gcc/testsuite/gcc.dg/gomp/pr35439.c b/gcc/testsuite/gcc.dg/gomp/pr35439.c
new file mode 100644
index 00000000000..1669a97a08f
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/gomp/pr35439.c
@@ -0,0 +1,6 @@
+/* PR c/35439 */
+/* { dg-do compile } */
+/* { dg-options "-fopenmp" } */
+
+void x[1]; /* { dg-error "array of voids" } */
+#pragma omp threadprivate(x)
diff --git a/gcc/testsuite/gcc.dg/pr34989-1.c b/gcc/testsuite/gcc.dg/pr34989-1.c
new file mode 100644
index 00000000000..88e8d64c64e
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr34989-1.c
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-options "--combine -O2" } */
+/* { dg-additional-sources "pr34989-2.c" } */
+
+extern struct globals *const ptr_to_globals;
+struct globals { };
+int syslogd_main(int argc, char **argv)
+{
+ (*(struct globals**)&ptr_to_globals) = 0;
+}
diff --git a/gcc/testsuite/gcc.dg/pr34989-2.c b/gcc/testsuite/gcc.dg/pr34989-2.c
new file mode 100644
index 00000000000..c2c719dc0a7
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr34989-2.c
@@ -0,0 +1,3 @@
+/* { dg-do compile } */
+
+extern struct globals *const ptr_to_globals;
diff --git a/gcc/testsuite/gcc.target/i386/3dnow-1.c b/gcc/testsuite/gcc.target/i386/3dnow-1.c
index d332021c547..de5a2c3f935 100644
--- a/gcc/testsuite/gcc.target/i386/3dnow-1.c
+++ b/gcc/testsuite/gcc.target/i386/3dnow-1.c
@@ -3,10 +3,10 @@
/* Test that the intrinsics compile with optimization. All of them are
defined as inline functions in mmintrin.h that reference the proper
- builtin functions. Defining away "static" and "__inline" results in
+ builtin functions. Defining away "extern" and "__inline" results in
all of them being compiled as proper functions. */
-#define static
+#define extern
#define __inline
#include <mm3dnow.h>
diff --git a/gcc/testsuite/gcc.target/i386/3dnow-2.c b/gcc/testsuite/gcc.target/i386/3dnow-2.c
index 382c1432aa9..4b4d7472265 100644
--- a/gcc/testsuite/gcc.target/i386/3dnow-2.c
+++ b/gcc/testsuite/gcc.target/i386/3dnow-2.c
@@ -3,10 +3,10 @@
/* Test that the intrinsics compile without optimization. All of them are
defined as inline functions in mmintrin.h that reference the proper
- builtin functions. Defining away "static" and "__inline" results in
+ builtin functions. Defining away "extern" and "__inline" results in
all of them being compiled as proper functions. */
-#define static
+#define extern
#define __inline
#include <mm3dnow.h>
diff --git a/gcc/testsuite/gcc.target/i386/3dnowA-1.c b/gcc/testsuite/gcc.target/i386/3dnowA-1.c
index 3ced01ddfc2..6d4f32532bc 100644
--- a/gcc/testsuite/gcc.target/i386/3dnowA-1.c
+++ b/gcc/testsuite/gcc.target/i386/3dnowA-1.c
@@ -1,13 +1,12 @@
/* { dg-do assemble } */
-/* { dg-require-effective-target ilp32 } */
-/* { dg-options "-O2 -Werror-implicit-function-declaration -m3dnow -march=athlon" } */
+/* { dg-options "-O2 -Werror-implicit-function-declaration -march=k8 -m3dnow" } */
/* Test that the intrinsics compile with optimization. All of them are
defined as inline functions in mmintrin.h that reference the proper
- builtin functions. Defining away "static" and "__inline" results in
+ builtin functions. Defining away "extern" and "__inline" results in
all of them being compiled as proper functions. */
-#define static
+#define extern
#define __inline
#include <mm3dnow.h>
diff --git a/gcc/testsuite/gcc.target/i386/3dnowA-2.c b/gcc/testsuite/gcc.target/i386/3dnowA-2.c
index 0c40382af7f..0a30d61c9e6 100644
--- a/gcc/testsuite/gcc.target/i386/3dnowA-2.c
+++ b/gcc/testsuite/gcc.target/i386/3dnowA-2.c
@@ -1,13 +1,12 @@
/* { dg-do assemble } */
-/* { dg-require-effective-target ilp32 } */
-/* { dg-options "-O0 -Werror-implicit-function-declaration -m3dnow -march=athlon" } */
+/* { dg-options "-O0 -Werror-implicit-function-declaration -march=k8 -m3dnow" } */
/* Test that the intrinsics compile without optimization. All of them are
defined as inline functions in mmintrin.h that reference the proper
- builtin functions. Defining away "static" and "__inline" results in
+ builtin functions. Defining away "extern" and "__inline" results in
all of them being compiled as proper functions. */
-#define static
+#define extern
#define __inline
#include <mm3dnow.h>
diff --git a/gcc/testsuite/gcc.target/i386/isa-1.c b/gcc/testsuite/gcc.target/i386/isa-1.c
index 0bee0969a35..ad4e7ed1741 100644
--- a/gcc/testsuite/gcc.target/i386/isa-1.c
+++ b/gcc/testsuite/gcc.target/i386/isa-1.c
@@ -1,5 +1,5 @@
/* { dg-do run } */
-/* { dg-options "-msse4" } */
+/* { dg-options "-march=x86-64 -msse4" } */
extern void abort (void);
diff --git a/gcc/testsuite/gcc.target/i386/isa-10.c b/gcc/testsuite/gcc.target/i386/isa-10.c
index 1fd7eac147e..76fe3559335 100644
--- a/gcc/testsuite/gcc.target/i386/isa-10.c
+++ b/gcc/testsuite/gcc.target/i386/isa-10.c
@@ -1,5 +1,5 @@
/* { dg-do run } */
-/* { dg-options "-msse5 -mno-sse4" } */
+/* { dg-options "-march=x86-64 -msse5 -mno-sse4" } */
extern void abort (void);
diff --git a/gcc/testsuite/gcc.target/i386/isa-11.c b/gcc/testsuite/gcc.target/i386/isa-11.c
index dc55d6219e8..29688d5a783 100644
--- a/gcc/testsuite/gcc.target/i386/isa-11.c
+++ b/gcc/testsuite/gcc.target/i386/isa-11.c
@@ -1,5 +1,5 @@
/* { dg-do run } */
-/* { dg-options "-msse5 -mno-ssse3" } */
+/* { dg-options "-march=x86-64 -msse5 -mno-ssse3" } */
extern void abort (void);
diff --git a/gcc/testsuite/gcc.target/i386/isa-12.c b/gcc/testsuite/gcc.target/i386/isa-12.c
index 782768d51df..4b7e2e2304a 100644
--- a/gcc/testsuite/gcc.target/i386/isa-12.c
+++ b/gcc/testsuite/gcc.target/i386/isa-12.c
@@ -1,5 +1,5 @@
/* { dg-do run } */
-/* { dg-options "-msse5 -mno-sse3" } */
+/* { dg-options "-march=x86-64 -msse5 -mno-sse3" } */
extern void abort (void);
diff --git a/gcc/testsuite/gcc.target/i386/isa-13.c b/gcc/testsuite/gcc.target/i386/isa-13.c
index 5b0317449f9..ab623c4b192 100644
--- a/gcc/testsuite/gcc.target/i386/isa-13.c
+++ b/gcc/testsuite/gcc.target/i386/isa-13.c
@@ -1,5 +1,5 @@
/* { dg-do run } */
-/* { dg-options "-msse5 -mno-sse2" } */
+/* { dg-options "-march=x86-64 -msse5 -mno-sse2" } */
extern void abort (void);
diff --git a/gcc/testsuite/gcc.target/i386/isa-14.c b/gcc/testsuite/gcc.target/i386/isa-14.c
index b901691691d..09b421c3779 100644
--- a/gcc/testsuite/gcc.target/i386/isa-14.c
+++ b/gcc/testsuite/gcc.target/i386/isa-14.c
@@ -1,5 +1,5 @@
/* { dg-do run } */
-/* { dg-options "-msse5 -mno-sse" } */
+/* { dg-options "-march=x86-64 -msse5 -mno-sse" } */
extern void abort (void);
diff --git a/gcc/testsuite/gcc.target/i386/isa-2.c b/gcc/testsuite/gcc.target/i386/isa-2.c
index f43b1991218..ebbef772d8a 100644
--- a/gcc/testsuite/gcc.target/i386/isa-2.c
+++ b/gcc/testsuite/gcc.target/i386/isa-2.c
@@ -1,5 +1,5 @@
/* { dg-do run } */
-/* { dg-options "-msse4 -msse5" } */
+/* { dg-options "-march=x86-64 -msse4 -msse5" } */
extern void abort (void);
diff --git a/gcc/testsuite/gcc.target/i386/isa-3.c b/gcc/testsuite/gcc.target/i386/isa-3.c
index c74ab9f50d6..c22954406cb 100644
--- a/gcc/testsuite/gcc.target/i386/isa-3.c
+++ b/gcc/testsuite/gcc.target/i386/isa-3.c
@@ -1,5 +1,5 @@
/* { dg-do run } */
-/* { dg-options "-msse4 -msse5 -msse4a" } */
+/* { dg-options "-march=x86-64 -msse4 -msse5 -msse4a" } */
extern void abort (void);
diff --git a/gcc/testsuite/gcc.target/i386/mmx-1.c b/gcc/testsuite/gcc.target/i386/mmx-1.c
index 63d81885d78..7f439395389 100644
--- a/gcc/testsuite/gcc.target/i386/mmx-1.c
+++ b/gcc/testsuite/gcc.target/i386/mmx-1.c
@@ -3,10 +3,10 @@
/* Test that the intrinsics compile with optimization. All of them are
defined as inline functions in mmintrin.h that reference the proper
- builtin functions. Defining away "static" and "__inline" results in
+ builtin functions. Defining away "extern" and "__inline" results in
all of them being compiled as proper functions. */
-#define static
+#define extern
#define __inline
#include <mmintrin.h>
diff --git a/gcc/testsuite/gcc.target/i386/mmx-2.c b/gcc/testsuite/gcc.target/i386/mmx-2.c
index 6f6f89b8d29..c9708f3bfff 100644
--- a/gcc/testsuite/gcc.target/i386/mmx-2.c
+++ b/gcc/testsuite/gcc.target/i386/mmx-2.c
@@ -3,10 +3,10 @@
/* Test that the intrinsics compile without optimization. All of them are
defined as inline functions in mmintrin.h that reference the proper
- builtin functions. Defining away "static" and "__inline" results in
+ builtin functions. Defining away "extern" and "__inline" results in
all of them being compiled as proper functions. */
-#define static
+#define extern
#define __inline
#include <mmintrin.h>
diff --git a/gcc/testsuite/gcc.target/i386/pr35540.c b/gcc/testsuite/gcc.target/i386/pr35540.c
new file mode 100644
index 00000000000..00af637d002
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr35540.c
@@ -0,0 +1,45 @@
+/* { dg-do run } */
+/* { dg-options "-O2" } */
+
+extern void abort (void);
+
+int __attribute__ ((noinline))
+test (unsigned int *a, int b)
+{
+ return b ? 1 : __builtin_parity (*a);
+}
+
+int __attribute__ ((noinline))
+testl (unsigned long *a, int b)
+{
+ return b ? 1 : __builtin_parityl (*a);
+}
+
+int __attribute__ ((noinline))
+testll (unsigned long long *a, int b)
+{
+ return b ? 1 : __builtin_parityll (*a);
+}
+
+int
+main ()
+{
+ unsigned int a = 0;
+ unsigned long al;
+ unsigned long long all;
+
+ a = 0x12345670;
+ if (test (&a, 0))
+ abort ();
+
+ al = 0x12345670ul;
+ if (testl (&al, 0))
+ abort();
+
+#if 1
+ all = 0x12345678abcdef0ull;
+ if (testll (&all, 0))
+ abort ();
+#endif
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/i386/sse-13.c b/gcc/testsuite/gcc.target/i386/sse-13.c
index 05e9a9eea24..5e3aa489b65 100644
--- a/gcc/testsuite/gcc.target/i386/sse-13.c
+++ b/gcc/testsuite/gcc.target/i386/sse-13.c
@@ -3,10 +3,10 @@
/* Test that the intrinsics compile with optimization. All of them are
defined as inline functions in {,x,e,p,t,s,a,b}mmintrin.h and mm3dnow.h
- that reference the proper builtin functions. Defining away "static" and
+ that reference the proper builtin functions. Defining away "extern" and
"__inline" results in all of them being compiled as proper functions. */
-#define static
+#define extern
#define __inline
/* Following intrinsics require immediate arguments. */
diff --git a/gcc/testsuite/gcc.target/i386/sse-14.c b/gcc/testsuite/gcc.target/i386/sse-14.c
index ff8a9ffa488..5bec14dd57c 100644
--- a/gcc/testsuite/gcc.target/i386/sse-14.c
+++ b/gcc/testsuite/gcc.target/i386/sse-14.c
@@ -3,10 +3,10 @@
/* Test that the intrinsics compile without optimization. All of them are
defined as inline functions in {,x,e,p,t,s,a,b}mmintrin.h and mm3dnow.h
- that reference the proper builtin functions. Defining away "static" and
+ that reference the proper builtin functions. Defining away "extern" and
"__inline" results in all of them being compiled as proper functions. */
-#define static
+#define extern
#define __inline
#include <bmmintrin.h>
diff --git a/gcc/testsuite/gfortran.dg/module_commons_2.f90 b/gcc/testsuite/gfortran.dg/module_commons_2.f90
new file mode 100644
index 00000000000..3c3214c20ff
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/module_commons_2.f90
@@ -0,0 +1,21 @@
+! { dg-do compile }
+! Tests the fix for PR35474, in which the PRIVATE statement would
+! cause the error Internal Error at (1): free_pi_tree(): Unresolved fixup
+! This arose because the symbol for 'i' emanating from the COMMON was
+! not being fixed-up as the EQUIVALENCE was built.
+!
+! Contributed by FX Coudert <fxcoudert@gcc.gnu.org>
+!
+module h5global
+ integer i
+ integer j
+ common /c/ i
+ equivalence (i, j)
+ private
+end module h5global
+
+program bug
+ use h5global
+end
+
+! { dg-final { cleanup-modules "h5global" } }
diff --git a/gcc/testsuite/gnat.dg/frame_overflow.adb b/gcc/testsuite/gnat.dg/frame_overflow.adb
index 4172fc013ce..286c93d5983 100644
--- a/gcc/testsuite/gnat.dg/frame_overflow.adb
+++ b/gcc/testsuite/gnat.dg/frame_overflow.adb
@@ -1,15 +1,17 @@
-- { dg-do compile }
+with System;
+
procedure frame_overflow is
- type Bitpos_Range_T is new Positive;
+ type Bitpos_Range_T is range 1..2**(System.Word_Size-1)-1;
type Bitmap_Array_T is array (Bitpos_Range_T) of Boolean;
type Bitmap_T is record
Bits : Bitmap_Array_T := (others => False);
end record;
- function -- { dg-error "too large" "" }
+ function -- { dg-error "too large" }
Set_In (Bitmap : Bitmap_T; Bitpos : Bitpos_Range_T) return Bitmap_T
is
Result: Bitmap_T := Bitmap;
@@ -18,7 +20,7 @@ procedure frame_overflow is
return Result;
end;
- function -- { dg-error "too large" "" }
+ function -- { dg-error "too large" }
Negate (Bitmap : Bitmap_T) return Bitmap_T is
Result: Bitmap_T;
begin