OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /openrisc/trunk/gnu-src/gcc-4.2.2/gcc/testsuite/g++.old-deja/g++.pt
    from Rev 149 to Rev 154
    Reverse comparison

Rev 149 → Rev 154

/t21.C
0,0 → 1,8
// { dg-do assemble }
 
template <class X> class A { public: int a; X x; };
template <class X> X f (A<X> a) { return a.x; }
 
extern A<double> a_dbl;
 
double fred () { return f (a_dbl); }
t21.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: crash42.C =================================================================== --- crash42.C (nonexistent) +++ crash42.C (revision 154) @@ -0,0 +1,14 @@ +// { dg-do assemble } +// Origin: Walter Brisken + +template class list {}; + +class newtype +{ +}; + +void crash() +{ + newtype* n; + n->list.size (); // { dg-error "" } invalid use of template +}
crash42.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: t04.C =================================================================== --- t04.C (nonexistent) +++ t04.C (revision 154) @@ -0,0 +1,8 @@ +// { dg-do assemble } + +template class B { public: A a; }; +static B b_int; +static B b_char; +static B b_uchar; + +int foo () { return b_int.a + b_char.a + b_uchar.a; }
t04.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: crash25.C =================================================================== --- crash25.C (nonexistent) +++ crash25.C (revision 154) @@ -0,0 +1,7 @@ +// { dg-do assemble } + +template +void f() +{ + int i[1 << 3]; +}
crash25.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: typename5.C =================================================================== --- typename5.C (nonexistent) +++ typename5.C (revision 154) @@ -0,0 +1,26 @@ +// { dg-do assemble } +// { dg-options "-Wno-deprecated" } + +template +struct A +{ + typedef T A_Type; +}; + + +template +struct B : public A +{ +}; + + +template +struct C : public B +{ + void Func(A_Type); // { dg-warning "" } implicit typename +}; + + +template +void C::Func(A_Type) { // { dg-warning "" } implicit typename +}
typename5.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: union1.C =================================================================== --- union1.C (nonexistent) +++ union1.C (revision 154) @@ -0,0 +1,18 @@ +// { dg-do assemble } + +union Un {int i;}; + +template struct St1 {}; +template struct St1 {}; + +template struct St2 {}; +template<> struct St2 {}; + +template struct St3 {}; +template<> struct St3 {}; + +void f() { + St1 s1; + St2 s2; + St3 s3; +}
union1.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: friend33.C =================================================================== --- friend33.C (nonexistent) +++ friend33.C (revision 154) @@ -0,0 +1,28 @@ +// { dg-do link } +// { dg-options "-g" } + +template +struct S1 +{ + struct SS1 + { + }; + friend void Foo (const SS1& ss1) + { + } +}; + +template +void Foo(const S1& s1) +{ + typedef typename S1::SS1 TYPE; + TYPE t; + Foo(t); +} + +int main () +{ + S1 obj; + Foo(obj); +} +
friend33.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: friend16.C =================================================================== --- friend16.C (nonexistent) +++ friend16.C (revision 154) @@ -0,0 +1,31 @@ +// { dg-do assemble } + +template +class S2 +{ +public: + static void f(); +}; + + +template +class S1 +{ + template + friend class S2; + + static int i; +}; + + +template +void S2::f() +{ + S1::i = 3; +} + +void g() +{ + S2::f(); + S2::f(); +}
friend16.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: ttp53.C =================================================================== --- ttp53.C (nonexistent) +++ ttp53.C (revision 154) @@ -0,0 +1,35 @@ +// { dg-do assemble } + +// Submitted by Erez Louidor Lior + +template class H; +template +H foo(const H&); + +template +class H{ + +#ifdef OK +public: +#endif + template class Caster, typename Source> + static H cast(const H& s); + +#ifndef OK + template + friend H foo(const H&); +#endif + +}; + +template class caster; + +template +H foo(const H& s){ + return H::template cast(s); +} + +int main(){ + H i; + foo(i); +}
ttp53.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: memtemp85.C =================================================================== --- memtemp85.C (nonexistent) +++ memtemp85.C (revision 154) @@ -0,0 +1,15 @@ +// { dg-do assemble } + +// by Paul Burchard , Level Set Systems, Inc. +// Copyright (C) 1999 Free Software Foundation + +struct Q { + template + class X { + }; +}; +template class> +class Y { +}; +Y y1; +
memtemp85.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: switch1.C =================================================================== --- switch1.C (nonexistent) +++ switch1.C (revision 154) @@ -0,0 +1,15 @@ +// { dg-do assemble } +// Origin: Mark Mitchell + +template +void f () +{ + int i; + + switch (int i = 3) { + } +} + +template void f(); + +
switch1.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: memtemp68.C =================================================================== --- memtemp68.C (nonexistent) +++ memtemp68.C (revision 154) @@ -0,0 +1,9 @@ +// { dg-do assemble } + + struct locale + { + template + locale (const locale&, _Facet*); + locale(int*) throw(); + }; + void f(int* p) { locale keep (p); }
memtemp68.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: static11.C =================================================================== --- static11.C (nonexistent) +++ static11.C (revision 154) @@ -0,0 +1,35 @@ +// Some targets (e.g. those with "set_board_info needs_status_wrapper 1" +// in their dejagnu baseboard description) require that the status is +// final when exit is entered (or main returns), and not "overruled" by a +// destructor calling _exit. It's not really worth it to handle that. +// { dg-do run { xfail mmix-knuth-mmixware xtensa-*-elf* arm*-*-elf arm*-*-eabi m68k-*-elf } } + +// Bug: g++ was failing to destroy C::a because it was using two +// different sentry variables for construction and destruction. + +extern "C" void _exit (int); + +int r = 1; + +struct A +{ + void f(){}; + A(){ ++r; } + ~A(){ r -= 2; _exit (r); } +}; + +template +struct C +{ + C(){ a.f(); } + static A a; +}; + +template A C::a; +typedef C B; + +int main() +{ + C c; + return r; +}
static11.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: explicit82.C =================================================================== --- explicit82.C (nonexistent) +++ explicit82.C (revision 154) @@ -0,0 +1,18 @@ +// { dg-do assemble } +// Copyright (C) 2000 Free Software Foundation, Inc. +// Contributed by Nathan Sidwell 7 Sep 2000 + +// Bug 508. We failed to set/clear lastiddecl appropriately for +// operator names. + +struct A {}; + +template void foo (A, int); +template void operator<< (A, int); + +int main() +{ + A a; + operator<< (a, 0); + foo (a, 0); +}
explicit82.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: typename28.C =================================================================== --- typename28.C (nonexistent) +++ typename28.C (revision 154) @@ -0,0 +1,27 @@ +// { dg-do assemble } +// +// Origin: Jens.Maurer@gmx.net +// Copyright (C) 2001 Free Software Foundation, Inc. +// Contributed by Nathan Sidwell 11 Apr 2001 + +// Bug 1844. We can meet types in cp_tree_equal via a template-id-expr. + +typedef int *Ptr; + +template struct B +{ + typedef typename T::template X type; + typedef typename T::template X type2; + typedef typename T::template X type3; + + void foo (type); + void baz (type2); + +}; + +template void B::foo (type) +{ +} +template void B::baz (type3) +{ +}
typename28.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: explicit65.C =================================================================== --- explicit65.C (nonexistent) +++ explicit65.C (revision 154) @@ -0,0 +1,34 @@ +// { dg-do run } +extern "C" void abort (); + +template void f () +{ + abort (); +} + +template <> void f () +{ + abort (); +} + +template void f (int) +{ + abort (); +} + +template <> void f (int) +{ +} + +template class C +{ + friend void f (int); + public: + void ff () { f (0); } +}; + +int main () +{ + C c; + c.ff(); +}
explicit65.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: spec11.C =================================================================== --- spec11.C (nonexistent) +++ spec11.C (revision 154) @@ -0,0 +1,21 @@ +// { dg-do run } +extern "C" void abort(); + +template +struct S +{ + template + int f(U u); +}; + +template <> +template <> +int S::f(int i) { return 1; } + +int main() +{ + S sc; + + if (sc.f(3) != 1) + abort(); +}
spec11.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: ref2.C =================================================================== --- ref2.C (nonexistent) +++ ref2.C (revision 154) @@ -0,0 +1,12 @@ +// { dg-do assemble } +// Origin: Mark Mitchell + +template +class C; + +template +class C {}; + +int i; + +C c;
ref2.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: deduct7.C =================================================================== --- deduct7.C (nonexistent) +++ deduct7.C (revision 154) @@ -0,0 +1,15 @@ +// { dg-do run } +// Copyright (C) 2001 Free Software Foundation, Inc. +// Contributed by Jason Merrill 14 Jun 2001 + +// Test that deduction can add cv-quals to a pointer-to-member type. + +struct A; +int A::* pi; + +template void f (const T A::*) {} + +int main () +{ + f (pi); +}
deduct7.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: label1.C =================================================================== --- label1.C (nonexistent) +++ label1.C (revision 154) @@ -0,0 +1,25 @@ +// { dg-do assemble } + +template +struct S {}; + +template +inline void g(T t) +{ + here: + S st; + goto here; +} + +template +void f(T t) +{ + here: + g(t); + goto here; +} + +void h() +{ + f(3); +}
label1.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: overload7.C =================================================================== --- overload7.C (nonexistent) +++ overload7.C (revision 154) @@ -0,0 +1,20 @@ +// { dg-do assemble } + +// Adapted from testcase by Corey Kosak + +template +struct moo_t { + struct cow_t {}; +}; + +template void foo(typename moo_t::cow_t) {} + +template void foo(moo_t) { + typename moo_t::cow_t p; + foo(p); // { dg-bogus "" "" { xfail *-*-* } } - no matching function for call - +} + +int main() { + moo_t x; + foo(x); // { dg-bogus "" "" { xfail *-*-* } } - instantiated from here - +}
overload7.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: memtemp10.C =================================================================== --- memtemp10.C (nonexistent) +++ memtemp10.C (revision 154) @@ -0,0 +1,24 @@ +// { dg-do link } +// GROUPS passed templates membertemplates +extern "C" int printf(const char*, ...); + +struct S { + template + operator T*(); +}; + + +template +S::operator T*() +{ + printf("Hello, world.\n"); + return 0; +} + + +int main() +{ + S s; + + char* cp = s.operator char*(); +}
memtemp10.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: t30.C =================================================================== --- t30.C (nonexistent) +++ t30.C (revision 154) @@ -0,0 +1,8 @@ +// { dg-do assemble } + +template X f (auto X (*x)[n]) { return (*x)[n/2]; } +extern int i[30], i2[33]; +extern double d[99]; + +int foo (int ii) { return f (&i) + f(&i2); } // causes abort +double foo (double dd) { return f (&d); }
t30.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: crash51.C =================================================================== --- crash51.C (nonexistent) +++ crash51.C (revision 154) @@ -0,0 +1,13 @@ +// { dg-do assemble } +// { dg-options "-fpermissive -w" } +// Origin: Mark Mitchell + +char foo[26]; + +template +void f () +{ + foo = "0123456789012345678901234"; // { dg-error "array" } +} + +template void f();
crash51.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: crash34.C =================================================================== --- crash34.C (nonexistent) +++ crash34.C (revision 154) @@ -0,0 +1,20 @@ +// { dg-do assemble } +// Origin: Theodore Papadopoulo + +template +class A { +public: + class B { }; + class C: public B { + public: + C(A&):B() { } + }; + C f() { return C(*this); } +}; + +int +main() +{ + A a; + a.f(); +}
crash34.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: t13.C =================================================================== --- t13.C (nonexistent) +++ t13.C (revision 154) @@ -0,0 +1,19 @@ +// { dg-do assemble } + +template class B { +public: + B(); + A a; + int i; +}; + +void *f () { + return new B; +} + +struct foo { int i[10]; }; +extern B *foop; + +void f2 () { + foop = new B; +}
t13.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: crash17.C =================================================================== --- crash17.C (nonexistent) +++ crash17.C (revision 154) @@ -0,0 +1,10 @@ +// { dg-do assemble } + +template +class foo; + +template +class bar +{ + typedef foo<(U::id > 0)> foobar; +};
crash17.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: explicit8.C =================================================================== --- explicit8.C (nonexistent) +++ explicit8.C (revision 154) @@ -0,0 +1,13 @@ +// { dg-do assemble } +// GROUPS passed templates +template +void foo(T t, U u); + +template +void foo(double, U) {} + +void baz() +{ + foo(3.0, "abc"); + foo("abc", 3.0); +}
explicit8.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: t14a.C =================================================================== --- t14a.C (nonexistent) +++ t14a.C (revision 154) @@ -0,0 +1,25 @@ +// { dg-do assemble } + +class OBJECT +{ + int a; +}; + + + +template class TESTA +{ +public: + TESTA(); + T foo(int i) {T t = 0; return t;} +}; + + + +void foo() +{ + TESTA *foo; + + foo = new TESTA; +} +
t14a.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: error1.C =================================================================== --- error1.C (nonexistent) +++ error1.C (revision 154) @@ -0,0 +1,19 @@ +// { dg-do assemble } +// Origin: Mark Mitchell + +template +struct S +{ + template + void f (); + +}; + +template +template +void S::f () +{ + U& u; // { dg-error "" } uninitialized reference +} + +template void S::f();
error1.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: cast1.C =================================================================== --- cast1.C (nonexistent) +++ cast1.C (revision 154) @@ -0,0 +1,7 @@ +// { dg-do assemble } +// Origin: Mark Mitchell + +template +void f (T t) { + const_cast(t); +}
cast1.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: memclass16.C =================================================================== --- memclass16.C (nonexistent) +++ memclass16.C (revision 154) @@ -0,0 +1,13 @@ +// { dg-do assemble } + +template +class A { +public: + + typedef enum { X, Y } B; + template class Traits{ }; +}; + + +template class A; +template class A::Traits::X>;
memclass16.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: spec1.C =================================================================== --- spec1.C (nonexistent) +++ spec1.C (revision 154) @@ -0,0 +1,21 @@ +// { dg-do assemble } + +template +class mem_fun1_t { +public: + mem_fun1_t(S (T::*pf)(double)) {} +}; + +template +class mem_fun1_t { +public: + mem_fun1_t(void (T::*pf)(double)) {} +}; + +struct Operation { + double eval(double) { return 0; } +}; + +int main() { + mem_fun1_t m(&Operation::eval); +}
spec1.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: friend42.C =================================================================== --- friend42.C (nonexistent) +++ friend42.C (revision 154) @@ -0,0 +1,10 @@ +// { dg-do assemble } +// Origin: Mark Mitchell + +template +struct S { + template + friend struct S2; +}; + +template struct S;
friend42.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: unify3.C =================================================================== --- unify3.C (nonexistent) +++ unify3.C (revision 154) @@ -0,0 +1,22 @@ +// { dg-do assemble } + +template +struct ComputeBinaryType +{ +}; + +template +struct ComputeBinaryType { + void g(); +}; + +template +struct ComputeBinaryType { + void h(); +}; + +void f() +{ + ComputeBinaryType cb; + cb.g(); +}
unify3.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: m2.C =================================================================== --- m2.C (nonexistent) +++ m2.C (revision 154) @@ -0,0 +1,9 @@ +// { dg-do assemble } + +struct A { A() { a = 2; } int a; }; + +int f1 () { + struct A { A() { a = 2; } int a; }; + A aa; + return aa.a; +}
m2.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: friend25.C =================================================================== --- friend25.C (nonexistent) +++ friend25.C (revision 154) @@ -0,0 +1,15 @@ +// { dg-do assemble } + +template struct A; + +struct B +{ + template + friend class A; // { dg-error "" } does not specialize any args +}; + +struct C +{ + template + friend class A; // { dg-error "" } partial specialization +};
friend25.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: ttp62.C =================================================================== --- ttp62.C (nonexistent) +++ ttp62.C (revision 154) @@ -0,0 +1,30 @@ +// { dg-do run } +// Origin: Ewgenij Gawrilow + +extern "C" void abort (); + +template