aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorno-author <no-author@gcc.gnu.org>2004-03-27 16:57:39 +0000
committerno-author <no-author@gcc.gnu.org>2004-03-27 16:57:39 +0000
commit1d1eaa3e297c92d7cd4b1eae228a411a578e729c (patch)
treee52bf324e9776f41a7612b28ae40252bf977da83
parent91d2b5fa85c1d687d87d330fda26f852918b3f72 (diff)
This commit was manufactured by cvs2svn to create branch
'gcc-3_3-rhl-branch'. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-3_3-rhl-branch@80029 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/config/sparc/t-linux2
-rw-r--r--gcc/testsuite/g++.dg/eh/spec7.C35
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr13889.c7
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/20040307-1.c25
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/20040313-1.c17
-rw-r--r--gcc/testsuite/gcc.dg/20040311-2.c36
-rw-r--r--gcc/testsuite/gcc.dg/gnu89-init-3.c18
7 files changed, 140 insertions, 0 deletions
diff --git a/gcc/config/sparc/t-linux b/gcc/config/sparc/t-linux
new file mode 100644
index 00000000000..30a3ccaf83a
--- /dev/null
+++ b/gcc/config/sparc/t-linux
@@ -0,0 +1,2 @@
+# Compile libgcc2.a with pic and IEEE quad long double.
+TARGET_LIBGCC2_CFLAGS = -fPIC -mlong-double-128
diff --git a/gcc/testsuite/g++.dg/eh/spec7.C b/gcc/testsuite/g++.dg/eh/spec7.C
new file mode 100644
index 00000000000..08586a2af75
--- /dev/null
+++ b/gcc/testsuite/g++.dg/eh/spec7.C
@@ -0,0 +1,35 @@
+// PR 14535
+// { dg-do run }
+// { dg-options "-O -finline" }
+//
+// Original test case failure required that Raiser constructor be inlined.
+
+extern "C" void abort();
+bool destructor_called = false;
+
+struct B {
+ virtual void Run(){};
+};
+
+struct D : public B {
+ virtual void Run()
+ {
+ struct O {
+ ~O() { destructor_called = true; };
+ } o;
+
+ struct Raiser {
+ Raiser() throw( int ) {throw 1;};
+ } raiser;
+ };
+};
+
+int main() {
+ try {
+ D d;
+ static_cast<B&>(d).Run();
+ } catch (...) {}
+
+ if (!destructor_called)
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr13889.c b/gcc/testsuite/gcc.c-torture/compile/pr13889.c
new file mode 100644
index 00000000000..d14bc9ac542
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr13889.c
@@ -0,0 +1,7 @@
+/* PR target/13889 */
+struct { long long a; } *p;
+void initNetFlowFunct(void) {
+ unsigned int b = (unsigned int)-1;
+ p->a = b;
+}
+
diff --git a/gcc/testsuite/gcc.c-torture/execute/20040307-1.c b/gcc/testsuite/gcc.c-torture/execute/20040307-1.c
new file mode 100644
index 00000000000..8ab8008bb99
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/20040307-1.c
@@ -0,0 +1,25 @@
+int main()
+{
+ int b = 0;
+
+ struct {
+ unsigned int bit0:1;
+ unsigned int bit1:1;
+ unsigned int bit2:1;
+ unsigned int bit3:1;
+ unsigned int bit4:1;
+ unsigned int bit5:1;
+ unsigned int bit6:1;
+ unsigned int bit7:1;
+ } sdata = {0x01};
+
+ while ( sdata.bit0-- > 0 ) {
+ b++ ;
+ if ( b > 100 ) break;
+ }
+
+ if (b != 1)
+ abort ();
+ return 0;
+}
+
diff --git a/gcc/testsuite/gcc.c-torture/execute/20040313-1.c b/gcc/testsuite/gcc.c-torture/execute/20040313-1.c
new file mode 100644
index 00000000000..c05fe730f0c
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/20040313-1.c
@@ -0,0 +1,17 @@
+/* PR middle-end/14470 */
+/* Origin: Lodewijk Voge <lvoge@cs.vu.nl> */
+
+extern void abort(void);
+
+int main()
+{
+ int t[1025] = { 1024 }, d;
+
+ d = 0;
+ d = t[d]++;
+ if (t[0] != 1025)
+ abort();
+ if (d != 1024)
+ abort();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/20040311-2.c b/gcc/testsuite/gcc.dg/20040311-2.c
new file mode 100644
index 00000000000..0d0d5da3259
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/20040311-2.c
@@ -0,0 +1,36 @@
+/* PR target/14533 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -fpic" } */
+
+void bar (char *, int);
+
+extern char b[];
+extern int d, e;
+struct S
+{
+ struct S *m;
+ int n;
+} **g;
+
+void
+foo (int x, char *y)
+{
+ struct S *h;
+ int k = 1, l;
+
+again:
+ for (h = *g; h != (struct S *) g; h = h->m)
+ {
+ if (k == 0 && h->n & 0x100000);
+ l = y - b;
+ if (e)
+ bar (b, l);
+ if (d)
+ bar (b, l);
+ }
+ if (k)
+ {
+ k = 0;
+ goto again;
+ }
+}
diff --git a/gcc/testsuite/gcc.dg/gnu89-init-3.c b/gcc/testsuite/gcc.dg/gnu89-init-3.c
new file mode 100644
index 00000000000..bd4283ec875
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/gnu89-init-3.c
@@ -0,0 +1,18 @@
+/* PR 11527 */
+/* { dg-do compile } */
+/* { dg-options "-std=gnu89" } */
+
+typedef struct smrdd_memory_blocks_s
+{
+ int blocks;
+ int block[];
+} smrdd_memory_blocks_t;
+
+const smrdd_memory_blocks_t smrdd_memory_blocks =
+{
+ 3,
+ {
+ [5] = 5,
+ [1] = 2,
+ }
+};