URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Subversion Repositories openrisc
Compare Revisions
- This comparison shows the changes necessary to convert path
/openrisc/tags/gnu-src/gcc-4.5.1/gcc-4.5.1-or32-1.0rc4/gcc/testsuite/g++.old-deja/g++.oliva
- from Rev 305 to Rev 519
- ↔ Reverse comparison
Rev 305 → Rev 519
/partspec1.C
0,0 → 1,20
// { dg-do assemble } |
|
// Copyright (C) 1999 Free Software Foundation |
|
// by Alexandre Oliva <oliva@dcc.unicamp.br> |
// simplified from bug report by Andrey Slepuhin <pooh@msu.ru> |
|
template <typename A, int* P> struct X; |
|
int a; |
|
template <typename A> |
struct X<A,&a> {}; |
|
int b; |
|
template <typename A> |
struct X<A,&b> {}; |
|
X<int,&a> x; |
partspec1.C
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: typename1.C
===================================================================
--- typename1.C (nonexistent)
+++ typename1.C (revision 519)
@@ -0,0 +1,16 @@
+// { dg-do assemble }
+
+// Copyright (C) 1999 Free Software Foundation
+
+// by Alexandre Oliva
+// based on bug report by Nick Rasmussen
+
+template struct foo;
+
+template struct bar {
+ typedef int foo;
+};
+
+template struct baz {
+ typedef bar::foo foo; // { dg-error "" } missing typename
+};
typename1.C
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: typename2.C
===================================================================
--- typename2.C (nonexistent)
+++ typename2.C (revision 519)
@@ -0,0 +1,28 @@
+// { dg-do assemble }
+// { dg-options "" }
+
+// Copyright (C) 1999 Free Software Foundation
+
+// by Alexandre Oliva
+// based on bug report by Nick Rasmussen
+
+// This is slightly different from typename1.C. This one tests
+// whether the implicit typename extension works. gcc 2.95 reports:
+
+// warning: lookup of `foo' finds `struct foo'
+// warning: instead of `baz::foo' from dependent base class
+// warning: (use `typename baz::foo' if that's what you meant)
+
+// But baz::foo is not a base class, and `foo' should have been
+// found in baz's scope.
+
+struct foo;
+
+template struct bar {
+ typedef int foo;
+};
+
+template struct baz {
+ typedef bar::foo foo; // { dg-error "" } implicit typename
+ void m(foo);
+};
typename2.C
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: new1.C
===================================================================
--- new1.C (nonexistent)
+++ new1.C (revision 519)
@@ -0,0 +1,20 @@
+// { dg-do run }
+// Copyright (C) 1999 Free Software Foundation
+
+// by Alexandre Oliva
+
+// based on comp.std.c++ post by Alexander Schiemann
+
+// execution test
+
+#include
+#include
+
+struct A {
+ A() { throw 0; }
+ void* operator new(size_t size, double = 0.0) { return ::operator new(size);}
+ void operator delete(void* p, double) { exit(0); }
+ void operator delete(void* p) { abort(); }
+};
+
+int main() { try { new A; } catch(...) {} }
new1.C
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: thunk1.C
===================================================================
--- thunk1.C (nonexistent)
+++ thunk1.C (revision 519)
@@ -0,0 +1,36 @@
+// { dg-do run }
+// Copyright (C) 1999 Free Software Foundation
+
+// by Alexandre Oliva
+// based on bug report by Fredrik Öhrström
+
+#include
+
+using namespace std;
+
+struct vbase {
+ virtual int get_a() const = 0;
+};
+
+struct base: virtual vbase {
+ int a;
+ base(int aa) : a(aa) {}
+ int get_a() const { return a; }
+};
+
+struct mid: base {
+ mid(int bb) : base(bb) {
+ // when mid is not in charge of vbase initialization,
+ // a derived-aware vtable is needed for vbase
+ if (((vbase*)this)->get_a() != bb)
+ abort();
+ }
+};
+
+struct derived: virtual mid {
+ derived(int cc) : mid(cc) {}
+};
+
+int main () {
+ derived(1);
+}
thunk1.C
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: ext1.C
===================================================================
--- ext1.C (nonexistent)
+++ ext1.C (revision 519)
@@ -0,0 +1,19 @@
+// { dg-do run }
+// { dg-options "" }
+// Copyright (C) 1999 Free Software Foundation
+
+// by Alexandre Oliva
+// simplified from bug report by Michael Rosenbruch
+
+
+extern "C" void abort();
+
+int main () {
+ char x[1];
+ char *y = x ? /* implicit x */ : 0;
+ /* For some reason, the array x is copied twice, and y points to the
+ second copy (the first is never used). If x is explicit, no copy
+ is created, and the program succeeds. */
+ if (x != y)
+ abort();
+}
ext1.C
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: dwarf1.C
===================================================================
--- dwarf1.C (nonexistent)
+++ dwarf1.C (revision 519)
@@ -0,0 +1,15 @@
+// { dg-do assemble }
+
+// Copyright (C) 1999 Free Software Foundation
+
+// by Alexandre Oliva
+// based on bug report by Chris McKay
+
+// Used to fail with dwarf debugging.
+
+template
+struct foo {
+ static const int ELEMENTS = 1;
+ int bar[ELEMENTS];
+};
+foo<> bar;
dwarf1.C
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: dwarf2.C
===================================================================
--- dwarf2.C (nonexistent)
+++ dwarf2.C (revision 519)
@@ -0,0 +1,10 @@
+// { dg-do assemble }
+
+// Copyright (C) 1999 Free Software Foundation
+
+// by Alexandre Oliva
+
+// Fails with dwarf debugging.
+
+typedef __java_boolean jboolean;
+void foo() {}
dwarf2.C
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: dwarf3.C
===================================================================
--- dwarf3.C (nonexistent)
+++ dwarf3.C (revision 519)
@@ -0,0 +1,25 @@
+// { dg-do assemble }
+
+// Copyright (C) 1999 Free Software Foundation
+
+// by Alexandre Oliva
+// based on bug report by Andreas Stolcke
+
+// Fails with dwarf debugging.
+
+template struct foo {
+ int data[1];
+};
+
+template struct bar {
+ bar(foo<> *);
+};
+
+template bar::bar(foo<> *x) {
+ *x;
+}
+
+void baz() {
+ foo<> *baz;
+ bar<> baar(baz);
+}
dwarf3.C
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: ctor1.C
===================================================================
--- ctor1.C (nonexistent)
+++ ctor1.C (revision 519)
@@ -0,0 +1,19 @@
+// { dg-do assemble }
+
+// Copyright (C) 1999 Free Software Foundation
+
+// by Alexandre Oliva
+// based on bug report by Harri Porten
+
+struct A {
+ A() : x; // { dg-error "" } missing body
+};
+
+struct B {
+ void m() {}
+};
+
+struct C {
+ // The error message below says it is within A::B::m()!
+ void n() {}
+};
ctor1.C
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: template1.C
===================================================================
--- template1.C (nonexistent)
+++ template1.C (revision 519)
@@ -0,0 +1,15 @@
+// { dg-do assemble }
+
+// Copyright (C) 1999, 2003 Free Software Foundation
+
+// by Alexandre Oliva
+// based on bug report by Stefan Wetzel
+
+
+template struct foo {
+ static void bar(double (*)[dim]) {} // { dg-error "'dim' was not declared" }
+};
+
+void bar() {
+ foo<>::bar(0);
+}
template1.C
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: overload1.C
===================================================================
--- overload1.C (nonexistent)
+++ overload1.C (revision 519)
@@ -0,0 +1,24 @@
+// { dg-do assemble }
+
+// Copyright (C) 1999 Free Software Foundation
+
+// by Alexandre Oliva
+// Based on bug report by JDonner
+
+struct foo {
+ static int bar(); // { dg-error "candidate" }
+ void bar(int); // { dg-error "foo::bar" }
+};
+
+/* gcc emits a hard error without -pedantic, and a warning with
+ -pedantic, even in bad1. */
+int (*ok1)() = foo::bar;
+void (foo::*bad1)(int) = foo::bar; // { dg-error "assuming pointer" }
+// { dg-message "note" "note" { target *-*-* } 16 }
+
+int (*ok2)() = &foo::bar; // ok
+void (*bad2)(int) = foo::bar; // { dg-error "no matches" }
+
+void (foo::*ok3)(int) = &foo::bar; // ok
+int (foo::*bad3)() = foo::bar; // { dg-error "no matches" }
+
overload1.C
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: template2.C
===================================================================
--- template2.C (nonexistent)
+++ template2.C (revision 519)
@@ -0,0 +1,14 @@
+// { dg-do assemble }
+
+// Copyright (C) 1999 Free Software Foundation
+
+// by Alexandre Oliva
+// based on bug report by Gabriel Dos_Reis
+
+template class C, typename T> class foo {
+ typedef typename C::bar bar;
+ foo(bar);
+};
+
+template class C, typename T> foo::foo(bar)
+{} // { dg-bogus "" } C not a class
template2.C
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: template3.C
===================================================================
--- template3.C (nonexistent)
+++ template3.C (revision 519)
@@ -0,0 +1,9 @@
+// { dg-do assemble }
+
+// Copyright (C) 1999 Free Software Foundation
+
+// by Alexandre Oliva
+// based on bug report by Ulf Larsson
+
+template class C {};
+class foo {} bar = bar.C(); // { dg-error "" } call to template
template3.C
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: inline1.C
===================================================================
--- inline1.C (nonexistent)
+++ inline1.C (revision 519)
@@ -0,0 +1,30 @@
+// { dg-do assemble }
+
+// Copyright (C) 1999 Free Software Foundation
+
+// by Alexandre Oliva
+// Derived from GNU lilypond.
+
+
+struct foo {
+ foo();
+ foo(const foo&);
+ ~foo();
+};
+
+struct bar {
+ foo foo_member;
+ bar();
+ bar(const bar&);
+ // ~bar();
+};
+
+struct baz {
+ void error (bar s);
+};
+
+void fail() __attribute__((noreturn));
+
+void baz::error (bar s) {
+ fail();
+}
inline1.C
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: template4.C
===================================================================
--- template4.C (nonexistent)
+++ template4.C (revision 519)
@@ -0,0 +1,20 @@
+// { dg-do assemble }
+
+// Copyright (C) 1999 Free Software Foundation
+
+// by Alexandre Oliva
+// based on bug report by Andrey Slepuhin
+
+template struct X {};
+
+int a = 1;
+X x; // ok, a has external linkage
+
+const int b = 2;
+X y; // { dg-error "" } const b has internal linkage
+
+extern const int c;
+X z; // ok, c has external linkage
+
+extern const int c = 3;
+X z_; // { dg-bogus "" } using c as constant
template4.C
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: expr1.C
===================================================================
--- expr1.C (nonexistent)
+++ expr1.C (revision 519)
@@ -0,0 +1,12 @@
+// { dg-do assemble }
+
+// Copyright (C) 1999 Free Software Foundation
+
+// by Alexandre Oliva
+// simplified from bug report by Tudor Hulubei
+
+// gcc 2.95 reports:
+// invalid operands `foo' and `int' to binary `operator !='
+
+class foo {} bar;
+int i = void(bar) ? 1 : 0; // { dg-bogus "" "" { xfail *-*-* } } - operator!= -
expr1.C
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: template5.C
===================================================================
--- template5.C (nonexistent)
+++ template5.C (revision 519)
@@ -0,0 +1,12 @@
+// { dg-do assemble }
+
+// Copyright (C) 1999 Free Software Foundation
+
+// by Alexandre Oliva
+// simplified from bug report by Andrey Slepuhin
+
+template class X {
+ template class Z;
+};
+
+X a;
template5.C
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: expr2.C
===================================================================
--- expr2.C (nonexistent)
+++ expr2.C (revision 519)
@@ -0,0 +1,16 @@
+// { dg-do run }
+
+// Copyright (C) 2000 Free Software Foundation
+
+// by Alexandre Oliva
+
+int i, j;
+
+const int &f(const int& I, const int& J) {
+ // this must not be optimized to I because it's an lvalue
+ return (I != J) ? I : J;
+}
+
+int main () {
+ return (&f(i, j) != &j);
+}
expr2.C
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: template6.C
===================================================================
--- template6.C (nonexistent)
+++ template6.C (revision 519)
@@ -0,0 +1,12 @@
+// { dg-do assemble }
+
+// Copyright (C) 1999 Free Software Foundation
+
+// by Alexandre Oliva
+// simplified from bug report by Meenaradchagan Vishnu
+
+template struct foo {};
+template <> void foo(); // { dg-error "not a template function" } bad specialization
+
+struct baz {};
+template <> void baz (); // { dg-error "not a template function" } bad specialization
template6.C
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: ns1.C
===================================================================
--- ns1.C (nonexistent)
+++ ns1.C (revision 519)
@@ -0,0 +1,13 @@
+// { dg-do assemble }
+
+// Copyright (C) 1999, 2000 Free Software Foundation
+
+// by Alexandre Oliva
+// based on bug report by Dima Volodin
+
+void foo();
+namespace bar {
+ class baz {
+ friend void ::foo(); // { dg-bogus "" } parse error
+ };
+}
ns1.C
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: template7.C
===================================================================
--- template7.C (nonexistent)
+++ template7.C (revision 519)
@@ -0,0 +1,14 @@
+// { dg-do assemble }
+
+// Copyright (C) 1999, 2000 Free Software Foundation
+
+// by Alexandre Oliva
+// simplified from bug report by Paul Burchard
+
+template struct A {};
+template class T> struct B {
+ B() {
+ T(); // { dg-bogus "" } conversion from int to non-scalar
+ }
+};
+B foo;
template7.C
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: ns2.C
===================================================================
--- ns2.C (nonexistent)
+++ ns2.C (revision 519)
@@ -0,0 +1,15 @@
+// { dg-do assemble }
+
+// Copyright (C) 1999 Free Software Foundation
+
+// by Alexandre Oliva
+// based on bug report by Dima Volodin
+// variation of ns1.C
+
+void foo();
+namespace bar {
+ using ::foo;
+ class baz {
+ friend void foo(); // { dg-bogus "" "" { xfail *-*-* } } - conflict -
+ };
+}
ns2.C
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: template8.C
===================================================================
--- template8.C (nonexistent)
+++ template8.C (revision 519)
@@ -0,0 +1,18 @@
+// { dg-do assemble }
+
+// Copyright (C) 1999 Free Software Foundation
+
+// by Alexandre Oliva
+// simplified from bug report by redleaf
+
+struct B {
+ template void bar();
+} b;
+
+template void foo() {
+ b.bar(); // no longer { dg-bogus "" } bar undeclared
+ b.template bar(); // no longer { dg-bogus "" } ditto
+ b.B::bar(); // ok
+}
+
+template void foo(); // no longer { dg-bogus "" }
template8.C
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: ns3.C
===================================================================
--- ns3.C (nonexistent)
+++ ns3.C (revision 519)
@@ -0,0 +1,13 @@
+// { dg-do assemble }
+
+// Copyright (C) 1999 Free Software Foundation
+
+// by Alexandre Oliva
+// based on bug report by Ovidiu Toader
+
+
+namespace N {
+ template class A {
+ template friend class A;
+ };
+}
ns3.C
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: template9.C
===================================================================
--- template9.C (nonexistent)
+++ template9.C (revision 519)
@@ -0,0 +1,11 @@
+// { dg-do assemble }
+
+// Copyright (C) 1999 Free Software Foundation
+
+// by Alexandre Oliva
+// based on bug report by Philippe Bouchard
+
+struct foo {
+ template
+ void bar() = 0; // { dg-error "virtual" }
+};
template9.C
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: ChangeLog
===================================================================
--- ChangeLog (nonexistent)
+++ ChangeLog (revision 519)
@@ -0,0 +1,135 @@
+2010-07-31 Release Manager
+
+ * GCC 4.5.1 released.
+
+2010-04-14 Release Manager
+
+ * GCC 4.5.0 released.
+
+2005-04-03 Alexandre Oliva
+
+ PR c++/19199
+ * expr2.C: Fixed.
+
+2003-06-04 J"orn Rennecke
+
+ * template1.C (bar): Remove xfail marker.
+
+2002-07-06 Alexandre Oliva
+
+ * linkage1.C, linkage1-main.cc: New test.
+
+2001-02-15 Alexandre Oliva
+
+ * friend1.C: New test.
+
+2000-05-28 Alexandre Oliva
+
+ * expr2.C: New test.
+
+2000-04-19 Alexandre Oliva
+
+ * stkalign.C: New test.
+
+1999-12-22 Alexandre Oliva
+
+ * nameret2.C: New test.
+
+ * nameret1.C: New test.
+
+ * template10.C: New test.
+
+1999-11-21 Alexandre Oliva
+
+ * delete2.C, delete3.C, delete4.C, delete5.C: New tests.
+
+1999-11-19 Alexandre Oliva
+
+ * template7.C: Crash test passes, bug error is now bogus.
+
+1999-11-11 Alexandre Oliva
+
+ * template9.C: New test.
+
+1999-09-18 Alexandre Oliva
+
+ * overload1.C: New test.
+
+ * inline1.C: New test.
+
+1999-08-25 Alexandre Oliva
+
+ * thunk1.C: New test.
+
+1999-08-06 Alexandre Oliva
+
+ * dwarf2.C, dwarf3.C: Added XFAIL for Solaris/x86. Removed
+ -gdwarf.
+ * dwarf1.C: Removed -gdwarf.
+
+1999-08-05 Alexandre Oliva
+
+ * new1.C, template8.C: Removed XFAIL.
+ * template3.C: Re-introduced XFAIL. :-(
+
+1999-08-03 Alexandre Oliva
+
+ * ext1.C: New test.
+
+ * dwarf1.C, dwarf2.C, dwarf3.C: New tests.
+
+1999-07-20 Alexandre Oliva
+
+ * template8.C, typeof1.C: New test.
+
+1999-07-17 Alexandre Oliva
+
+ * template6.C, delete1.C, template7.C: New test.
+
+1999-07-13 Alexandre Oliva
+
+ * template5.C: New test.
+
+ * template4.C: New test.
+
+ * expr1.C: New test.
+
+ * partspec1.C: New test.
+
+1999-07-05 Alexandre Oliva
+
+ * typename1.C, typename2.C: New tests.
+
+ * template3.C: Fixed.
+
+ * ns3.C: New test.
+
+1999-07-03 Alexandre Oliva
+
+ * ctor1.C: New test.
+
+ * template3.C: New test.
+
+1999-07-02 Alexandre Oliva
+
+ * ns1.C: Typo.
+ * ns2.C: New test.
+
+ * template2.C: New test.
+
+ * ns1.C: New test.
+
+1999-07-01 Alexandre Oliva
+
+ * new1.C: New test.
+
+ * partord1.C: New test.
+
+ * template1.C: New test.
+
+
+Copyright (C) 1999, 2000, 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
+
+Copying and distribution of this file, with or without modification,
+are permitted in any medium without royalty provided the copyright
+notice and this notice are preserved.
ChangeLog
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: nameret1.C
===================================================================
--- nameret1.C (nonexistent)
+++ nameret1.C (revision 519)
@@ -0,0 +1,14 @@
+// { dg-do assemble }
+// { dg-options "-Wno-deprecated" }
+// Copyright (C) 1999, 2000, 2002 Free Software Foundation
+
+// by Alexandre Oliva
+
+// distilled from libg++'s Rational.cc
+
+
+inline int bar () return r {} // { dg-error "" }
+
+int foo () {
+ return bar ();
+}
nameret1.C
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: stkalign.C
===================================================================
--- stkalign.C (nonexistent)
+++ stkalign.C (revision 519)
@@ -0,0 +1,18 @@
+// { dg-do assemble }
+
+// Copyright (C) 2000 Free Software Foundation
+
+// by Alexandre Oliva
+// distilled from libg++'s Fix.cc
+
+
+struct Integer {
+ ~Integer () {}
+};
+
+void foo (const Integer& y);
+Integer bar (const Integer& x);
+
+void show (const Integer& x) {
+ foo (bar (x));
+}
stkalign.C
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: template10.C
===================================================================
--- template10.C (nonexistent)
+++ template10.C (revision 519)
@@ -0,0 +1,22 @@
+// { dg-do assemble }
+
+// Copyright (C) 1999 Free Software Foundation
+
+// by Alexandre Oliva
+// bug report by Martin Sebor
+// based on C++ Standard example in [temp.expl.spec]/5
+
+/* Members of explicitly specialized template classes shall not be
+ defined with template-specialization syntax. The example in the
+ Standard contains a definition of a member function of the
+ explicitly specialized class template, but the paragraph refers to
+ members in general, not only member functions. */
+
+template struct A {};
+
+template<> struct A {
+ static bool a, b;
+};
+
+bool A::a = true; // ok
+template<> bool A::b = false; // { dg-error "template header" }
template10.C
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: nameret2.C
===================================================================
--- nameret2.C (nonexistent)
+++ nameret2.C (revision 519)
@@ -0,0 +1,15 @@
+// { dg-do assemble }
+// { dg-options "-O1 -Wno-deprecated" }
+// Copyright (C) 1999, 2000, 2002 Free Software Foundation
+
+// by Alexandre Oliva
+
+// distilled from libg++'s Integer.cc
+
+
+inline int bar () return r {} // { dg-error "" }
+
+int& foo (int& x) {
+ bar ();
+ return x;
+}
nameret2.C
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: linkage1-main.cc
===================================================================
--- linkage1-main.cc (nonexistent)
+++ linkage1-main.cc (revision 519)
@@ -0,0 +1,13 @@
+// Copyright 2002 Free Software Foundation
+
+// Derived by Alexandre Oliva from code posted by
+// Mark Mitchell
+
+typedef struct {
+ void f();
+} S;
+
+int main() {
+ S s;
+ s.f();
+}
Index: delete1.C
===================================================================
--- delete1.C (nonexistent)
+++ delete1.C (revision 519)
@@ -0,0 +1,32 @@
+// { dg-do assemble }
+
+// Copyright (C) 1999, 2001 Free Software Foundation
+
+// by Alexandre Oliva
+// simplified from bug report by K. Haley
+// based on analysis by Martin v. Loewis
+
+// [class.dtor]/11: delete must be implicitly checked for
+// accessibility only in the definition of virtual destructors,
+// implicitly defined or not.
+
+struct foo {
+ foo() {}
+private:
+ void operator delete(void *) {} // { dg-error "" } private
+} foo_;
+
+struct bar : foo {
+ ~bar() {
+ delete this; // { dg-error "" } delete is private
+ // An implicit invocation of delete is emitted in destructors, but
+ // it should only be checked in virtual destructors
+ } // { dg-bogus "" } not virtual
+} bar_;
+
+struct baz : foo {
+ virtual ~baz() {} // { dg-error "" } delete is private in vdtor
+} baz_;
+
+struct bad : baz {} bad_; // { dg-error "" } delete is private in vdtor
+// { dg-message "synthesized" "note" { target *-*-* } 31 }
delete1.C
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: delete2.C
===================================================================
--- delete2.C (nonexistent)
+++ delete2.C (revision 519)
@@ -0,0 +1,26 @@
+// { dg-do run }
+// Copyright (C) 1999 Free Software Foundation
+
+// by Alexandre Oliva
+// distilled from bug report by Barry M. Caceres
+
+// Test whether dtors of vbases are called on delete[].
+
+extern "C" void abort();
+extern "C" void exit(int);
+
+struct Foo {
+ ~Foo() {
+ exit(0);
+ }
+};
+
+struct Bar : virtual Foo {
+};
+
+int main() {
+ delete [] new Bar[1];
+ abort();
+}
+
+
delete2.C
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: delete3.C
===================================================================
--- delete3.C (nonexistent)
+++ delete3.C (revision 519)
@@ -0,0 +1,38 @@
+// { dg-do run }
+// Copyright (C) 1999 Free Software Foundation
+
+// by Alexandre Oliva
+
+// Test whether dtors of vbases are called on throw within new[].
+// Variant of delete2.C.
+
+extern "C" void abort();
+extern "C" void exit(int);
+
+struct Foo {
+ static bool first;
+
+ Foo() {
+ if (first)
+ first = false;
+ else
+ throw first;
+ }
+
+ ~Foo() {
+ exit(0);
+ }
+};
+
+bool Foo::first = true;
+
+struct Bar : virtual Foo {
+};
+
+int main() {
+ try {
+ delete [] new Bar[2];
+ } catch (...) {
+ }
+ abort();
+}
delete3.C
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: delete4.C
===================================================================
--- delete4.C (nonexistent)
+++ delete4.C (revision 519)
@@ -0,0 +1,30 @@
+// { dg-do run }
+// Copyright (C) 1999 Free Software Foundation
+
+// by Alexandre Oliva
+
+// Test whether dtors of vbases are called from dtor of aggregate of array.
+// Variant of delete2.C and delete3.C.
+
+extern "C" void abort();
+extern "C" void exit(int);
+
+struct Foo {
+ ~Foo() {
+ exit(0);
+ }
+};
+
+struct Bar : virtual Foo {
+};
+
+struct Baz {
+ Bar i[1];
+};
+
+int main() {
+ Baz();
+ abort();
+}
+
+
delete4.C
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: delete5.C
===================================================================
--- delete5.C (nonexistent)
+++ delete5.C (revision 519)
@@ -0,0 +1,30 @@
+// { dg-do run }
+// Copyright (C) 1999 Free Software Foundation
+
+// by Alexandre Oliva
+
+// Test whether dtors of vbases are called from dtor of auto array.
+// Variant of delete2.C, delete3.C and delete4.C.
+
+extern "C" void abort();
+extern "C" void exit(int);
+
+struct Foo {
+ ~Foo() {
+ exit(0);
+ }
+};
+
+struct Bar : virtual Foo {
+};
+
+void foo() {
+ Bar i[1];
+}
+
+int main() {
+ foo();
+ abort();
+}
+
+
delete5.C
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: typeof1.C
===================================================================
--- typeof1.C (nonexistent)
+++ typeof1.C (revision 519)
@@ -0,0 +1,19 @@
+// { dg-do assemble }
+
+// Copyright (C) 1999 Free Software Foundation
+
+// by Alexandre Oliva
+
+struct B {
+ int i;
+};
+
+template void foo(T b) {
+ b.T::i; // ok
+ // b.__typeof__(b)::i; // parse error, should this be accepted?
+ typedef T t1;
+ b.t1::i; // ok
+ typedef __typeof__(b) t2;
+}
+
+template void foo(B); // not needed for the crash
typeof1.C
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: friend1.C
===================================================================
--- friend1.C (nonexistent)
+++ friend1.C (revision 519)
@@ -0,0 +1,12 @@
+// { dg-do assemble }
+
+// Copyright (C) 2001 Free Software Foundation
+
+// by Alexandre Oliva
+
+// We shouldn't warn about bar referring to a non-template in this case.
+
+template
+class foo {
+ friend int bar(int);
+};
friend1.C
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: linkage1.C
===================================================================
--- linkage1.C (nonexistent)
+++ linkage1.C (revision 519)
@@ -0,0 +1,20 @@
+// { dg-do link }
+// { dg-additional-sources " linkage1-main.cc" }
+
+// Copyright 2002 Free Software Foundation
+
+// Derived by Alexandre Oliva from code posted by
+// Mark Mitchell
+
+// Verify that a member of a class is given global linkage when it's a
+// member of a function whose name is taken from a typedef, by
+// checking that another translation unit can call it. We don't do
+// the right things on functions, but we do on data members.
+
+// { dg-bogus "" "" { xfail *-*-* } 0 }
+
+typedef struct {
+ void f();
+} S;
+
+void S::f() {}
linkage1.C
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Index: partord1.C
===================================================================
--- partord1.C (nonexistent)
+++ partord1.C (revision 519)
@@ -0,0 +1,28 @@
+// { dg-do assemble }
+
+// Copyright (C) 1999 Free Software Foundation
+
+// by Alexandre Oliva
+
+template void foo(T);
+template void foo(T*);
+
+template class bar {
+ private:
+ int i; // { dg-error "" } this variable
+ friend void foo(T);
+};
+
+template void foo(T) {
+ bar().i = 0; // ok, I'm a friend
+}
+template void foo(T*) {
+ bar().i = 1; // { dg-error "" } not a friend
+}
+
+int main() {
+ int j = 0;
+ foo(j); // calls foo(int), ok
+ foo(&j); // calls foo(int*)
+ foo(&j); // calls foo(int*), ok
+}
partord1.C
Property changes :
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property