OpenCores
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