aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <cgf@redhat.com>2003-11-16 02:28:10 +0000
committerChristopher Faylor <cgf@redhat.com>2003-11-16 02:28:10 +0000
commit4f15ee40c6482a8f0ebc199e755dd42e4ff2ae0c (patch)
treeca8074187b6d362f75096260fb3b8d1066066d6d
parent81ab8ffa68f36492c29e365f9b470ba56c55c95c (diff)
merge from 3.3.2 release branch.cygming331
git-svn-id: https://gcc.gnu.org/svn/gcc/branches/cygming331@73641 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/fixinc/tests/base/ansi/string.h22
-rw-r--r--gcc/fixinc/tests/base/string.h6
-rw-r--r--gcc/fixinc/tests/base/sys/regset.h14
-rw-r--r--gcc/testsuite/g++.dg/opt/longbranch2.C2
-rw-r--r--gcc/testsuite/g++.dg/rtti/typeid3.C4
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/20030907-1.c22
-rw-r--r--gcc/testsuite/gcc.dg/20031009-1.c19
7 files changed, 71 insertions, 18 deletions
diff --git a/gcc/fixinc/tests/base/ansi/string.h b/gcc/fixinc/tests/base/ansi/string.h
new file mode 100644
index 00000000000..4067275d515
--- /dev/null
+++ b/gcc/fixinc/tests/base/ansi/string.h
@@ -0,0 +1,22 @@
+/* DO NOT EDIT THIS FILE.
+
+ It has been auto-edited by fixincludes from:
+
+ "fixinc/tests/inc/ansi/string.h"
+
+ This had to be done to correct non-standard usages in the
+ original, manufacturer supplied header file. */
+
+
+
+#if defined( SCO_STRING_CHECK )
+#ifndef __GNUC__
+extern "C++" {
+inline void *memchr(void *__1, int __2, size_t __3)
+ { return (void *)memchr((const void *)__1, __2, __3); }
+inline char *strstr(char *__1, const char *__2)
+ { return (char *)strstr((const char *)__1, __2); }
+}
+#endif /* ! __GNUC__ */
+
+#endif /* SCO_STRING_CHECK */
diff --git a/gcc/fixinc/tests/base/string.h b/gcc/fixinc/tests/base/string.h
index d70f9e08a3a..f32c240ae34 100644
--- a/gcc/fixinc/tests/base/string.h
+++ b/gcc/fixinc/tests/base/string.h
@@ -8,6 +8,6 @@
original, manufacturer supplied header file. */
#ifndef _STRING_INCLUDED
- #define _STRING_INCLUDED
- #include <strings.h>
-#endif /* _STRING_INCLUDED */ \ No newline at end of file
+#define _STRING_INCLUDED
+#include <strings.h>
+#endif /* _STRING_INCLUDED */
diff --git a/gcc/fixinc/tests/base/sys/regset.h b/gcc/fixinc/tests/base/sys/regset.h
index 6723427e89c..b23a0b07809 100644
--- a/gcc/fixinc/tests/base/sys/regset.h
+++ b/gcc/fixinc/tests/base/sys/regset.h
@@ -10,17 +10,7 @@
#if defined( SCO_REGSET_CHECK )
-union u_fps {
- struct rsfpstate
- {
- int whatever;
- }
-};
-union _u_fps {
- struct _rsfpstate
- {
- int whatever;
- }
-};
+union u_fps { struct rsfpstate { int whatever; } };
+union _u_fps { struct _rsfpstate { int whatever; } };
#endif /* SCO_REGSET_CHECK */
diff --git a/gcc/testsuite/g++.dg/opt/longbranch2.C b/gcc/testsuite/g++.dg/opt/longbranch2.C
index b74ceddf085..00c7f04c15c 100644
--- a/gcc/testsuite/g++.dg/opt/longbranch2.C
+++ b/gcc/testsuite/g++.dg/opt/longbranch2.C
@@ -2,7 +2,7 @@
// Originator: thor@math.tu-berlin.de
// { dg-do compile }
-// { dg-options "-O3 -funroll-loops -mtune=k6 -fomit-frame-pointer" { target i?86-*-* } }
+// { dg-options "-O3 -funroll-loops -mcpu=k6 -fomit-frame-pointer" { target i?86-*-* } }
// This used to fail to assemble because of an out-of-range 'loop' instructions.
diff --git a/gcc/testsuite/g++.dg/rtti/typeid3.C b/gcc/testsuite/g++.dg/rtti/typeid3.C
index a07b399249c..b36563ad65a 100644
--- a/gcc/testsuite/g++.dg/rtti/typeid3.C
+++ b/gcc/testsuite/g++.dg/rtti/typeid3.C
@@ -2,10 +2,10 @@
template <template <class> class T> struct A {
void error() {
- typeid(T).name(); // { dg-error "missing" }
+ typeid(T).name(); // { dg-error "" }
}
};
template <class T> struct B {};
-template void A<B>::error();
+template void A<B>::error(); // { dg-error "instantiated" }
diff --git a/gcc/testsuite/gcc.c-torture/execute/20030907-1.c b/gcc/testsuite/gcc.c-torture/execute/20030907-1.c
new file mode 100644
index 00000000000..cbdcf0c2f84
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/20030907-1.c
@@ -0,0 +1,22 @@
+/* PR optimization/11662 */
+/* Origin: heinrich.brand@fujitsu-siemens.com */
+
+/* This used to fail on SPARC at -O1 because the combiner didn't
+ correctly propagate an error indicator. */
+
+unsigned long long r;
+
+void test(unsigned long a, unsigned long b, unsigned long long c)
+{
+ r = (a^b)&c;
+}
+
+int main()
+{
+ test(1,2,3);
+
+ if (r != 3)
+ abort();
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/20031009-1.c b/gcc/testsuite/gcc.dg/20031009-1.c
new file mode 100644
index 00000000000..696d574daf9
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/20031009-1.c
@@ -0,0 +1,19 @@
+/* PR optimization/12510 */
+/* Origin: Lars Skovlund <lskovlun@image.dk> */
+/* Reduced testcase by Volker Reichelt <reichelt@igpm.rwth-aachen.de> */
+
+/* Verify that one splitting pass is not missing on x86 at -O1 */
+
+/* { dg-do compile } */
+/* { dg-options "-O -mcpu=i686" { target i?86-*-* } } */
+
+extern foo(double);
+
+void bar(double x, double y)
+{
+ foo (x);
+ if (y) x = y ? 0 : 1/y;
+ else if (y) x = y < 1 ? 1 : y;
+ else x = 1/y < 1 ? 1 : x;
+ foo (x);
+}