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

Subversion Repositories openrisc

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /openrisc/trunk/gnu-old/gcc-4.2.2/gcc/testsuite/g++.dg/parse
    from Rev 154 to Rev 816
    Reverse comparison

Rev 154 → Rev 816

/lookup5.C
0,0 → 1,26
// { dg-do compile }
 
struct A {};
 
template <class T> struct B
{
T a, b;
B() {}
B(T x, T y) : a(x), b(y) {}
template <class U> operator B<U> () const
{ return B<U>((U)(this->a), (U)(this->b)); }
};
 
template <class T> struct C : public B<int>
{
T *c;
inline T & operator *() { return *c; }
};
 
template <class T> struct D : virtual public C<T> { };
 
void
foo (D<A> x)
{
*x;
}
lookup5.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: error19.C =================================================================== --- error19.C (nonexistent) +++ error19.C (revision 816) @@ -0,0 +1,13 @@ +// PR C++/17867 + +struct A +{ // { dg-error "candidate" } + A(int); +}; + +const A& foo(); + +void bar() +{ + foo()=A(0); // { dg-error "A" } +}
error19.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 816) @@ -0,0 +1,12 @@ +// { dg-do compile } + +// Origin: Volker Reichelt + +// PR c++/10553: ICE processing typename with context error. + +template struct A {}; + +template struct B +{ + typedef A C; // { dg-error "declared|invalid|no type|expected" } +};
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: crash25.C =================================================================== --- crash25.C (nonexistent) +++ crash25.C (revision 816) @@ -0,0 +1,10 @@ +// PR c++/20536 +// Found by Wolfgang Wieser 03/2005. +// { dg-do compile } + +struct yyguts_t +{ + class TestScanner* yyextra_r; // { dg-error "forward declaration" } +}; + +TestScanner::TestScanner() {} // { dg-error "invalid use" }
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: dtor12.C =================================================================== --- dtor12.C (nonexistent) +++ dtor12.C (revision 816) @@ -0,0 +1,6 @@ +// PR c++/29408 + +template class a +{ + ~a(); +};
dtor12.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: new2.C =================================================================== --- new2.C (nonexistent) +++ new2.C (revision 816) @@ -0,0 +1,9 @@ +// { dg-do compile } +// Contributed by David Daney +// PR c++/14181: Cryptic error message for ill-formed new expressions + +void f1(void) +{ + (void)new (char*)[10]; // { dg-error "parenthesized|parentheses" } + (void)new char*[10]; +}
new2.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: break-in-for.C =================================================================== --- break-in-for.C (nonexistent) +++ break-in-for.C (revision 816) @@ -0,0 +1,12 @@ +/* PR17412 - ICE in fold_const.c during parsing. + fold would try to fold the operands of the break statement. */ +/* { dg-do compile } */ +/* { dg-options "" } */ + + +void foo () +{ + for (;;) + for (;;({break;})); +} +
break-in-for.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: template23.C =================================================================== --- template23.C (nonexistent) +++ template23.C (revision 816) @@ -0,0 +1,10 @@ +/* PR c++/30895 This used to ICE. */ +/* { dg-do "compile" } */ + +template struct A {}; + +template struct B +{ + A a1; /* { dg-error "imaginary constants are a GCC extension" } */ + A a2; /* { dg-error "imaginary constants are a GCC extension" } */ +};
template23.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: operator5.C =================================================================== --- operator5.C (nonexistent) +++ operator5.C (revision 816) @@ -0,0 +1,7 @@ +// PR c++/17685 + +struct S { + operator int; // { dg-error "" } + operator void; // { dg-error "" } +}; +
operator5.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: typedef1.C =================================================================== --- typedef1.C (nonexistent) +++ typedef1.C (revision 816) @@ -0,0 +1,3 @@ +// PR c++/6477 +typedef struct A_ *A; // { dg-error "previous declaration" } +typedef struct A B; // { dg-error "typedef|invalid type" }
typedef1.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: namespace5.C =================================================================== --- namespace5.C (nonexistent) +++ namespace5.C (revision 816) @@ -0,0 +1,5 @@ +// PR c++/7229 +// { dg-do compile } + +namespace A { namespace B { typedef int type; } } +typename A::B<0>::type x; // { dg-error "" }
namespace5.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: attr-externally-visible-1.C =================================================================== --- attr-externally-visible-1.C (nonexistent) +++ attr-externally-visible-1.C (revision 816) @@ -0,0 +1,48 @@ +// { dg-do compile } +// { dg-options "-O3 -fwhole-program" } +// { dg-final { scan-assembler "foo1" } } +// { dg-final { scan-assembler "foo2" } } +// { dg-final { scan-assembler "foo3" } } +// { dg-final { scan-assembler "foo4" } } +// { dg-final { scan-assembler "foo5" } } +// { dg-final { scan-assembler-not "foo6" } } +// { dg-final { scan-assembler "bar1" } } +// { dg-final { scan-assembler "bar2" } } +// { dg-final { scan-assembler "bar3" } } +// { dg-final { scan-assembler "bar4" } } +// { dg-final { scan-assembler "bar5" } } +// { dg-final { scan-assembler-not "bar6" } } + +extern void foo1 (void) __attribute__((externally_visible)); +void foo1 (void) { } + +extern void foo2 (void) __attribute__((externally_visible)); +__attribute__((externally_visible)) void foo2 (void) { } + +extern void foo3 (void); +__attribute__((externally_visible)) void foo3 (void) { } + +__attribute__((externally_visible)) void foo4 (void) { } + +void foo5 (void) { } +extern void foo5 (void) __attribute__((externally_visible)); + +void foo6 (void) { } + +extern char *bar1 __attribute__((externally_visible)); +char *bar1; + +extern char *bar2 __attribute__((externally_visible)); +char *bar2 __attribute__((externally_visible)); + +extern char *bar3; +char *bar3 __attribute__((externally_visible)); + +char *bar4 __attribute__((externally_visible)); + +char *bar5; +extern char *bar5 __attribute__((externally_visible)); + +char *bar6; + +int main (void) { }
attr-externally-visible-1.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: dtor1.C =================================================================== --- dtor1.C (nonexistent) +++ dtor1.C (revision 816) @@ -0,0 +1,6 @@ +struct A { typedef int I; }; +int main(void) +{ + int * p; + p->A::I::~I(); +}
dtor1.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: ctor4.C =================================================================== --- ctor4.C (nonexistent) +++ ctor4.C (revision 816) @@ -0,0 +1,7 @@ +// PR c++/27279 +// { dg-do compile } + +struct A +{ + A(void,void); // { dg-error "incomplete type|invalid use" } +};
ctor4.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: error20.C =================================================================== --- error20.C (nonexistent) +++ error20.C (revision 816) @@ -0,0 +1,17 @@ +// PR c++/17821 + +struct A { + A(int i) {} +}; +struct B { + int i; +}; +struct C { + B* p; +}; +int main() { + C c; + A(c.p.i); // { dg-error "member.*non-class" } + return 0; +} +
error20.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: parse1.C =================================================================== --- parse1.C (nonexistent) +++ parse1.C (revision 816) @@ -0,0 +1,9 @@ +/* PR c++/50 */ +/* { dg-do compile } */ + +namespace A {typedef int Z;} +int main(void) +{ + A::Z* z; + z->A::Z::~Z(); +}
parse1.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: defarg12.C =================================================================== --- defarg12.C (nonexistent) +++ defarg12.C (revision 816) @@ -0,0 +1,13 @@ +/* PR28266 This used to ICE in gimple_add_tmp_var */ +/* { dg-do "compile" } */ + +struct A +{ + int i; + A(int = X); /* { dg-error "was not declared in this scope" }*/ +}; + +void foo() +{ + A().i; +}
defarg12.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: ret-type2.C =================================================================== --- ret-type2.C (nonexistent) +++ ret-type2.C (revision 816) @@ -0,0 +1,5 @@ +struct S {} f(); // { dg-error "" } +struct T {} *g(); // { dg-error "" } +struct U {} h() {} // { dg-error "" } +struct V {} *i() {} // { dg-error "" } +struct W {} (*p) (); // { dg-error "" }
ret-type2.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: offsetof1.C =================================================================== --- offsetof1.C (nonexistent) +++ offsetof1.C (revision 816) @@ -0,0 +1,11 @@ +#include + +template struct StaticAssert; +template <> struct StaticAssert {}; + +struct MyPOD +{ + int a; int b; int c; +}; + +StaticAssert<(offsetof(MyPOD, a) == 0)> s;
offsetof1.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 816) @@ -0,0 +1,8 @@ +struct X { + X(double *data, double d0, double d1); +}; + +int foo(double d0) { + double * data; + X(data,d0,d0); +}
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: template5.C =================================================================== --- template5.C (nonexistent) +++ template5.C (revision 816) @@ -0,0 +1,19 @@ +// { dg-do compile } + +// Copyright (C) 2003 Free Software Foundation, Inc. +// Contributed by Nathan Sidwell 28 Jan 2003 + +// PR 3902. More type/decl confusion. + +template +struct S +{ + S foo (T (T)); + S foo (T(const T&)); +}; + +int main () +{ + S (S::*pf1)(int (int)) = &S::foo; + S (S::*pf2)(int (const int&)) = &S::foo; +}
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: dtor9.C =================================================================== --- dtor9.C (nonexistent) +++ dtor9.C (revision 816) @@ -0,0 +1,5 @@ +// PR c++/27508 +// { dg-do compile } + +struct A; +using ::~A; // { dg-error "not a class-name" }
dtor9.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: ambig3.C =================================================================== --- ambig3.C (nonexistent) +++ ambig3.C (revision 816) @@ -0,0 +1,21 @@ +// PR c++/9452 +// Origin: Wolfgang Bangerth +// { dg-do compile } + +template struct A { static const int i = 1; }; +template struct B {}; + +template int foo(B<0>) +{ + return 0; +} + +template B::i-1> foo(B) +{ + return B<0>(); +} + +int main() +{ + return foo(B<0>()); +}
ambig3.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: error28.C =================================================================== --- error28.C (nonexistent) +++ error28.C (revision 816) @@ -0,0 +1,10 @@ +// PR c++/21908 + +struct virt { virt () {} virt (int i) {} }; +struct der : public virtual virt { // { dg-error "der" } + der (int i) : virt(i) {} // { dg-error "der" } +}; +struct top : public der { + // { dg-error "der\\(\\)" "" { target *-*-* } 9 } + top () {} // { dg-bogus "der\\(const" } +};
error28.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 816) @@ -0,0 +1,9 @@ +// PR c++/16716 + +template class allocator; + +template class vector { + // With the dg-error on the next line, we are really just trying to + // check that the message is not an ICE message. + typedef typename allocator allocator_type; // { dg-error "expected|invalid" } +};
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: defarg1.C =================================================================== --- defarg1.C (nonexistent) +++ defarg1.C (revision 816) @@ -0,0 +1,5 @@ +class A +{ +public: + A(int nBits = ((int)0x8) | ((int)0x4) | ((int)0x2)); +};
defarg1.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 816) @@ -0,0 +1,6 @@ +struct INCOMPLETE; +template struct X { + static INCOMPLETE value; +}; +template <> INCOMPLETE X<1>::value = 0; // { dg-error "" } +
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 816) @@ -0,0 +1,11 @@ +// PR c++/13536 +// { dg-require-effective-target ilp32 } */ +// { dg-options "-w" } + +#include + +void f() { + (int((char*)0)); + sizeof ((int((char*)0))); + typeid ((int((char*)0))); +}
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: constant4.C =================================================================== --- constant4.C (nonexistent) +++ constant4.C (revision 816) @@ -0,0 +1,40 @@ +// { dg-do compile } + +// Copyright (C) 2003 Free Software Foundation, Inc. +// Contributed by Nathan Sidwell 31 Jul 2003 + +// PR c++/11525 incorrect error about non-constant initalizer + +template class X; +template class Y {}; + + +template +void Foo () +{ + static const unsigned I = X::I; + + Y i; + + static const unsigned J = X::J; + + Y j; // { dg-error "non-constant" "" } +} + +struct A +{ + operator unsigned () const; +}; + +template struct X +{ + enum {I}; + static A const J; +}; + +void Baz () +{ + Foo (); // { dg-error "instantiated" "" } +} + +
constant4.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: non-dependent1.C =================================================================== --- non-dependent1.C (nonexistent) +++ non-dependent1.C (revision 816) @@ -0,0 +1,19 @@ +// PR c++/8921 +// Origin: Chin-Lung Chang +// { dg-do compile } + +struct A +{ + template void foo(); +}; + +template void bar(A& a) +{ + a.foo(); +} + +void baz() +{ + A a; + bar(a); +}
non-dependent1.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: defarg9.C =================================================================== --- defarg9.C (nonexistent) +++ defarg9.C (revision 816) @@ -0,0 +1,20 @@ +// Copyright (C) 2005 Free Software Foundation, Inc. +// Contributed by Nathan Sidwell 6 Jun 2005 + +// PR 21903:Reject legal with default arg confusion +// Origin: Wolfgang Bangerth + + +struct O { + template struct B { + void set (T, bool=true); + }; + + struct D : public B {}; +}; + +void x () +{ + O::D d; + d.set(1); +}
defarg9.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: template15.C =================================================================== --- template15.C (nonexistent) +++ template15.C (revision 816) @@ -0,0 +1,26 @@ +// { dg-do compile } +// Contributed by: Peter Schmid +// +// PR c++/14545: constructor calls are not integer constant expressions + +struct A1 { A1(); }; +struct A2 { }; + +template +struct B +{ + void foo() { + A1(); + A1 a1 = A1(); + + A2(); + A2 a2 = A2(); + + int(); + int a3 = int(); + float(); + float a4 = float(); + } +}; + +template struct B;
template15.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: crash2.C =================================================================== --- crash2.C (nonexistent) +++ crash2.C (revision 816) @@ -0,0 +1,7 @@ +/* { dg-do compile } */ +int main(void) +{ + char x, y; + if ('A' == x) && ('B' == y)) { } /* { dg-error "" } */ + if (x == 'A') && (y == 'B')) { } /* { dg-error "" } */ +}
crash2.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: error9.C =================================================================== --- error9.C (nonexistent) +++ error9.C (revision 816) @@ -0,0 +1,5 @@ +// PR c++/12613 +// { dg-options "" } + +enum { FOO = 1, BAR = 2 }; +int a[] = { FOO: 1, BAR: 2 }; // { dg-error "" }
error9.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: enum1.C =================================================================== --- enum1.C (nonexistent) +++ enum1.C (revision 816) @@ -0,0 +1,4 @@ +// PR c++/15862 + +enum yn { Y, N }; +enum yn x = Y;
enum1.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: undefined6.C =================================================================== --- undefined6.C (nonexistent) +++ undefined6.C (revision 816) @@ -0,0 +1,6 @@ +// PR c++/8596 +// Origin: Wolfgang Bangerth +// { dg-do compile } + +template struct A {}; +template struct B : A{}; // { dg-error "" }
undefined6.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: ptrmem3.C =================================================================== --- ptrmem3.C (nonexistent) +++ ptrmem3.C (revision 816) @@ -0,0 +1,11 @@ +// Copyright (C) 2005 Free Software Foundation, Inc. +// Contributed by Nathan Sidwell 14 Feb 2005 + +// Origin: Volker Reichelt +// Bug 19895: ICE on invalid + + +template struct A +{ + int A<0>::* p; // { dg-error "(type/value mismatch)|(expected)" "" } +};
ptrmem3.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: builtin2.C =================================================================== --- builtin2.C (nonexistent) +++ builtin2.C (revision 816) @@ -0,0 +1,5 @@ +// PR c++/14432 +// { dg-options "" } + +struct Y {}; +Y y1;
builtin2.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: access7.C =================================================================== --- access7.C (nonexistent) +++ access7.C (revision 816) @@ -0,0 +1,13 @@ +// { dg-do compile } + +// Origin: Paolo Carlini + +// PR c++/5655: Access of member redeclaration. + +struct S { + class A; + template class B; +private: + class A {}; // { dg-error "different access" } + template class B {}; // { dg-error "different access" } +};
access7.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: dupl-tmpl-args1.C =================================================================== --- dupl-tmpl-args1.C (nonexistent) +++ dupl-tmpl-args1.C (revision 816) @@ -0,0 +1,13 @@ +// PR c++/8928 +// Origin: +// { dg-do compile } + +namespace N +{ + +template struct A {}; +typedef A B; + +} + +N::B a; // { dg-error "" }
dupl-tmpl-args1.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: error12.C =================================================================== --- error12.C (nonexistent) +++ error12.C (revision 816) @@ -0,0 +1,12 @@ +// { dg-do compile } +// Origin: Giovanni Bajo +// Make sure the error about '<:' can be turned into a warning +// { dg-options "-fpermissive" } + +struct B; + +template +struct Foo {}; + +Foo<::B> foo; // { dg-bogus "error" "error in place of warning" } +// { dg-error "" "" { target *-*-* } 11 }
error12.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: friend5.C =================================================================== --- friend5.C (nonexistent) +++ friend5.C (revision 816) @@ -0,0 +1,7 @@ +// PR c++/23694 + +extern "C" struct A +{ + friend void foo(int) {} // { dg-error "declaration" } + friend void foo() {} // { dg-error "foo" } +};
friend5.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: typename6.C =================================================================== --- typename6.C (nonexistent) +++ typename6.C (revision 816) @@ -0,0 +1,17 @@ +// { dg-do compile } +// Contributed by Matt Austern +// PR c++/13407: Gracefully handle keyword typename in base class specifier. + +struct A { }; +struct B { typedef A Type; }; + +template +struct X : + public typename T::Type // { dg-error "not allowed in this context" } +{ }; + +X x; + +struct C : + public typename A // { dg-error "not allowed outside of templates" } +{ };
typename6.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: crash26.C =================================================================== --- crash26.C (nonexistent) +++ crash26.C (revision 816) @@ -0,0 +1,12 @@ +// Copyright (C) 2005 Free Software Foundation, Inc. +// Contributed by Nathan Sidwell 13 Jun 2005 + +// Origin: Volker Reichelt +// Bug 21929: ICE on invalid + +template struct A +{ + struct B; +}; + +template<> struct A::B {}; // { dg-error "mismatch|expected|name a type|extra" }
crash26.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: new3.C =================================================================== --- new3.C (nonexistent) +++ new3.C (revision 816) @@ -0,0 +1,4 @@ +// PR c++/28593 +// { dg-do compile } + +void *p = new (::X; // { dg-error "declared|type-specifier" }
new3.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: long1.C =================================================================== --- long1.C (nonexistent) +++ long1.C (revision 816) @@ -0,0 +1,11 @@ +// PR c++/6634 +// { dg-do compile } +// { dg-options "" } + +long long double x; // { dg-error "long long" } +long double y; +long float z; // { dg-error "long" } + +typedef short void SV; // { dg-error "short" } +typedef long struct A LA; // { dg-error "long" } +typedef short char SC; // { dg-error "short" }
long1.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: operator6.C =================================================================== --- operator6.C (nonexistent) +++ operator6.C (revision 816) @@ -0,0 +1,5 @@ +// PR c++/25635 + +struct A {}; + +A::operator int(); // { dg-error "class" }
operator6.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: typedef2.C =================================================================== --- typedef2.C (nonexistent) +++ typedef2.C (revision 816) @@ -0,0 +1,3 @@ +template struct B { typedef typename T::X X; }; +template struct A { typedef B::X::Y Z; }; // { dg-error "" } +
typedef2.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: namespace6.C =================================================================== --- namespace6.C (nonexistent) +++ namespace6.C (revision 816) @@ -0,0 +1,10 @@ +namespace a { + namespace b { + void foo(); + } +} + +void +a::b:foo() // { dg-error "" } +{ +}
namespace6.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: attr-externally-visible-2.C =================================================================== --- attr-externally-visible-2.C (nonexistent) +++ attr-externally-visible-2.C (revision 816) @@ -0,0 +1,38 @@ +// { dg-do compile } +// { dg-options "-O -fwhole-program" } + +static void foo1 (void) { } // { dg-warning "have effect only on public" } +extern void foo1 (void) __attribute__((externally_visible)); + +struct C +{ + __attribute__((externally_visible)) void foo3 (void) { } +}; + +__attribute__((externally_visible)) static void foo3 (void) { } // { dg-warning "have effect only on public" } + +static int bar1; +extern int bar1 __attribute__((externally_visible)); // { dg-warning "have effect only on public" } + +static int bar2 __attribute__((externally_visible)); // { dg-warning "have effect only on public" } + +void fn1 (void) +{ + static int bar3 __attribute__((externally_visible)); // { dg-warning "have effect only on public" } +} + +void fn2 (void) +{ + int bar4 __attribute__((externally_visible)); // { dg-warning "have effect only on public" } +} + +struct A +{ +} __attribute__((externally_visible)); // { dg-warning "does not apply to types" } + +typedef int B __attribute__((externally_visible)); // { dg-warning "attribute ignored" } + +struct D +{ + static int d __attribute__((externally_visible)); +};
attr-externally-visible-2.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: dtor2.C =================================================================== --- dtor2.C (nonexistent) +++ dtor2.C (revision 816) @@ -0,0 +1,4 @@ +struct A { + typedef A A2; + ~A2(); // { dg-error "" } +};
dtor2.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: attr1.C =================================================================== --- attr1.C (nonexistent) +++ attr1.C (revision 816) @@ -0,0 +1,50 @@ +// Test whether attributes are accepted both immediately after +// struct/union keyword and after the closing brace. +// { dg-do compile } + +struct foo +{ + union __attribute__ ((packed)) + { + int a; + long b; + }; + union __attribute__ ((packed)) __attribute__ ((unused)) + { + int c; + long d; + }; +}; + +union __attribute__ ((packed)) bar +{ + int c; + long d; +}; + +struct __attribute__ ((packed)) baz +{ + int e; + long f; +}; + +struct foo2 +{ + union + { + int a; + long b; + } __attribute__ ((packed)); +}; + +union bar2 +{ + int c; + long d; +} __attribute__ ((packed)); + +struct baz2 +{ + int e; + long f; +} __attribute__ ((packed));
attr1.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: ret-type3.C =================================================================== --- ret-type3.C (nonexistent) +++ ret-type3.C (revision 816) @@ -0,0 +1,8 @@ +// PR c++/21369 + +struct bar; + +template struct bar *foo (T *p) +{ + return p->t; +}
ret-type3.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: ctor5.C =================================================================== --- ctor5.C (nonexistent) +++ ctor5.C (revision 816) @@ -0,0 +1,14 @@ +// PR c++/27309 + +struct A +{ + int i; + A() i() {} // { dg-error "expected" } +}; // { dg-error "expected" } + +struct B +{ + A a; +}; + +B b;
ctor5.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: error21.C =================================================================== --- error21.C (nonexistent) +++ error21.C (revision 816) @@ -0,0 +1,12 @@ +// PR c++/17393 +// { dg-options "-Wall" } + +struct A { }; + +void foo() +{ + // Check that we do not complain about an unused + // compiler-generated variable. + A& = a; // { dg-error "token|declarator|not declared" } +} +
error21.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: parse2.C =================================================================== --- parse2.C (nonexistent) +++ parse2.C (revision 816) @@ -0,0 +1,8 @@ +/* PR c++/67 */ +/* { dg-do compile } */ + +template struct foo { + static const int bar [3]; +}; +// Used to fail if 2+1 rather than 3. +template const int foo::bar [2+1] = { 0, 0, 0 };
parse2.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: pure1.C =================================================================== --- pure1.C (nonexistent) +++ pure1.C (revision 816) @@ -0,0 +1,11 @@ +// PR c++/28506 + +struct A +{ + virtual void* foo() = 1; // { dg-error "pure" } +}; + +struct B +{ + void operator()()() = 1; // { dg-error "pure|function|initializer" } +};
pure1.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: offsetof2.C =================================================================== --- offsetof2.C (nonexistent) +++ offsetof2.C (revision 816) @@ -0,0 +1,12 @@ +#include + +struct choke_me +{ + int size; + char storage[1]; +}; + +struct offset_is_broken +{ + static const int offset = offsetof(choke_me, storage); +};
offsetof2.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: specialization1.C =================================================================== --- specialization1.C (nonexistent) +++ specialization1.C (revision 816) @@ -0,0 +1,6 @@ +// PR c++/5723, PR c++/8522 +// Origin: Matthias Kleinmann, Peter Karl Mueller +// { dg-do compile } + +template class A; +template class A::B; // { dg-error "declaration" }
specialization1.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: angle-bracket.C =================================================================== --- angle-bracket.C (nonexistent) +++ angle-bracket.C (revision 816) @@ -0,0 +1,9 @@ +// Contributed by Gabriel Dos Reis +// Origin: Bill Somerville +// { dg-do compile } + +int main() +{ + ( int() > int() ); + return 0; +}
angle-bracket.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 816) @@ -0,0 +1,20 @@ +// { dg-do compile } + +// Copyright (C) 2003 Free Software Foundation, Inc. +// Contributed by Wolfgang Bangerth 20 Feb 2003. + +// PR c++/9778. Ensure templated functions in other namespaces are +// correctly instantiated. + +namespace NS { + template void foo (); +} + +template struct X { + int m; + void g () { + NS::foo(); + } +}; + +template class X<2>;
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: crash10.C =================================================================== --- crash10.C (nonexistent) +++ crash10.C (revision 816) @@ -0,0 +1,13 @@ +// { dg-do compile } + +// Copyright (C) 2003 Free Software Foundation, Inc. +// Contributed by Nathan Sidwell 22 Jul 2003 + +// PR c++ 10953. ICE + +// { dg-bogus "" "" { target *-*-* } 14 } + +class +{ + typename:: // { dg-error "" "" } +; // { dg-error "" "" }
crash10.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: expr3.C =================================================================== --- expr3.C (nonexistent) +++ expr3.C (revision 816) @@ -0,0 +1,32 @@ +/* { dg-do compile } */ +/* PR/18047 Test that operators have the right precedence. */ +/* by bonzini@gnu.org */ + +#define test(lower, higher, a, b, c, d) \ + test_(lower, higher, a, b, c, d, __LINE__) + +#define test_(lower, higher, a, b, c, d, line)\ + test__(lower, higher, a, b, c, d, line) + +/* The first declaration tests that the parentheses are added correctly + by the expression parser. The second tests that the two possible + orderings of precedences do give different results. */ +#define test__(lower, higher, a, b, c, d, line) \ + char test##line[ \ + (a higher b lower c higher d) == \ + ((a higher b) lower (c higher d)) \ + ? 1 : -1]; \ + char doublecheck##line[ \ + (a higher b lower c higher d) == \ + (a higher (b lower c) higher d) \ + ? -1 : 1]; + +test (||, &&, 1, 1, 0, 0) +test (&&, |, 5, 1, 1, 19) +test (|, ^, 1, 2, 2, 1) +test (^, &, 1, 3, 2, 6) +test (&, ==, 1, 3, 2, 0) +test (==, <, 2, 0, 0, 0) +test (<, <<, 2, 3, 6, 8) +test (<<, +, 2, 3, 4, 5) +test (+, *, 2, 6, 9, 13)
expr3.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: explicit1.C =================================================================== --- explicit1.C (nonexistent) +++ explicit1.C (revision 816) @@ -0,0 +1,11 @@ +// { dg-do compile } + +// Origin: stefaandr@hotmail.com + +// PR c++/12403: ICE when explicit specialization is not in +// namespace scope. + +struct foo { + template void bar (T &t) {} + template<> void bar(double &t) {} // { dg-error "non-namespace|template|function" } +};
explicit1.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: ambig4.C =================================================================== --- ambig4.C (nonexistent) +++ ambig4.C (revision 816) @@ -0,0 +1,18 @@ +// PR c++/20293 + +namespace hide { // { dg-error "hide" } + int k; +} + +namespace { + int i; + namespace hide { // { dg-error "hide" } + int j; + } +} + +void F(int) {} + +int main() { + F(hide::j); // { dg-error "ambiguous" } +}
ambig4.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: error29.C =================================================================== --- error29.C (nonexistent) +++ error29.C (revision 816) @@ -0,0 +1,12 @@ +// PR c++/25637 + +struct A { + void foo(); + A(); + void operator delete(void *); +}; +struct B { + friend void A::foo() {} // { dg-error "define" } + friend void A::operator delete(void*) {} // { dg-error "define" } + friend A::A() {} // { dg-error "define" } +};
error29.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: cond1.C =================================================================== --- cond1.C (nonexistent) +++ cond1.C (revision 816) @@ -0,0 +1,6 @@ +// PR c++/18389 + +void foo() +{ + for (; struct A {}; ); // { dg-error "" } +}
cond1.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: stmtexpr1.C =================================================================== --- stmtexpr1.C (nonexistent) +++ stmtexpr1.C (revision 816) @@ -0,0 +1,9 @@ +// { dg-do compile } +// { dg-options "" } + +int +main (int argc, char **argv) +{ + int a = ({ 1 ? 0 : 1; }); + return ({ argc > 1 ? 1 : 0; }); +}
stmtexpr1.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: func-def1.C =================================================================== --- func-def1.C (nonexistent) +++ func-def1.C (revision 816) @@ -0,0 +1,11 @@ +// PR c++/7917 +// Origin: VACLAV HAISMAN +// { dg-do compile } + +struct A +{ + int i; + void foo() = 0 {} // { dg-error "" } + + A() : i(0) {} +};
func-def1.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: crash18.C =================================================================== --- crash18.C (nonexistent) +++ crash18.C (revision 816) @@ -0,0 +1,7 @@ +// Copyright (C) 2004 Free Software Foundation, Inc. +// Contributed by Nathan Sidwell 20 Oct 2004 + +// PR 18095: ICE +// Origin: Volker Reichelt + +struct A // { dg-error "expected" "" }
crash18.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: defarg2.C =================================================================== --- defarg2.C (nonexistent) +++ defarg2.C (revision 816) @@ -0,0 +1,9 @@ +// { dg-do compile } + +// Copyright (C) 2003 Free Software Foundation, Inc. +// Contributed by Nathan Sidwell 4 Jan 2003 + +// We erroneously prohibited default args on parenthesized function +// declarations. + +void (foo)(int i = 0);
defarg2.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: error2.C =================================================================== --- error2.C (nonexistent) +++ error2.C (revision 816) @@ -0,0 +1,10 @@ +// { dg-do compile } +// Properly print CALL_EXPRs while dumping expressions + +double g; +int func(double); + +template +struct Foo {}; + +Foo f; // { dg-error "" "func(g)" }
error2.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: cast2.C =================================================================== --- cast2.C (nonexistent) +++ cast2.C (revision 816) @@ -0,0 +1,13 @@ +// PR c++/13736 + +struct string +{ + string() {} + string(const string&) {} + string(const char*) {} +}; + +int main() +{ + string s2(string( (const char*)(""))); +}
cast2.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: constant5.C =================================================================== --- constant5.C (nonexistent) +++ constant5.C (revision 816) @@ -0,0 +1,14 @@ +enum E { + a = 24.2, // { dg-error "constant" } + b = (int)3.7, + c = int(4.2), + d = (int)(4.2 + 3.7), // { dg-error "constant" } + e = int(4.2 - 3.7), // { dg-error "constant" } + f = (int)17.25 +}; + +struct S { + static const int i = (int)4.2; + int j[(int)4.2]; + static const int k = static_cast(3.7); +};
constant5.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: non-dependent2.C =================================================================== --- non-dependent2.C (nonexistent) +++ non-dependent2.C (revision 816) @@ -0,0 +1,37 @@ +// { dg-do compile } + +// Copyright (C) 2003 Free Software Foundation, Inc. +// Contributed by Nathan Sidwell 16 Jul 2003 + +// A non-dependent field_decl can bind at parse time. + +template +struct Foo { + int j; // we never see this one. + int k; // { dg-error "" "" } + +}; + +struct Baz +{ + int j; + int k; // { dg-error "" "" } + +}; + +template +struct Bar : public Foo, Baz { + + int baz () { return j; } // binds to Baz::j + int foo () { return this->k; } // { dg-error "request for member" "" } +}; + +int main() +{ + Bar bar; + + bar.baz (); + bar.foo (); // { dg-error "instantiated" "" } + + return 0; +}
non-dependent2.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: template16.C =================================================================== --- template16.C (nonexistent) +++ template16.C (revision 816) @@ -0,0 +1,15 @@ +// Copyright (C) 2005 Free Software Foundation, Inc. +// Contributed by Nathan Sidwell 26 May 2005 + +// Origin:Volker Reichelt reichelt@gcc.gnu.org +// PR 21681. ICE with inappropriate access check. + +template struct A; + +struct B +{ + template void foo() + { + A::X::Y; + } +};
template16.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: invalid-op1.C =================================================================== --- invalid-op1.C (nonexistent) +++ invalid-op1.C (revision 816) @@ -0,0 +1,13 @@ +// PR c++/10150 +// Origin: Tom Evans +// { dg-do compile } + +template struct A +{ + template struct B + { + enum { e = I * A::B }; // { dg-error "" } + }; +}; + +A<0>::B<0> a; // { dg-error "instantiated" }
invalid-op1.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: crash3.C =================================================================== --- crash3.C (nonexistent) +++ crash3.C (revision 816) @@ -0,0 +1,2 @@ +template struct L { struct I {}; }; +template void L::I::foo() {} // { dg-error "" }
crash3.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: enum2.C =================================================================== --- enum2.C (nonexistent) +++ enum2.C (revision 816) @@ -0,0 +1,7 @@ +// { dg-do compile } + +// Origin: Volker Reichelt + +// PR c++/18123: ICE pushing tag from invalid template. + +template enum E { e }; // { dg-error "template declaration" }
enum2.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: ptrmem4.C =================================================================== --- ptrmem4.C (nonexistent) +++ ptrmem4.C (revision 816) @@ -0,0 +1,4 @@ +// PR c++/26295 + +namespace A {} +int (A::*B)(); // { dg-error "namespace" }
ptrmem4.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: undefined7.C =================================================================== --- undefined7.C (nonexistent) +++ undefined7.C (revision 816) @@ -0,0 +1,5 @@ +// PR c++/9228 +// Origin: Wolfgang Bangerth +// { dg-do compile } + +template typename A::B foo() {} // { dg-error "" }
undefined7.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: access8.C =================================================================== --- access8.C (nonexistent) +++ access8.C (revision 816) @@ -0,0 +1,12 @@ +// PR c++/22618 + +class foo +{ + typedef int memfun; // { dg-error "private" } +}; + +template +struct fm_obj { }; // { dg-error "context" } + +template // { dg-error "context" } +struct S {};
access8.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 816) @@ -0,0 +1,11 @@ +// PR c++/26068 + +extern "C" auto int a; // { dg-error "linkage" } +extern "C" register int b; // { dg-error "linkage" } +extern "C" static void c(); // { dg-error "linkage" } +extern "C" extern void d(); // { dg-error "linkage" } +extern "C" mutable int e; // { dg-error "linkage" } + +extern "C" { + static void 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: friend6.C =================================================================== --- friend6.C (nonexistent) +++ friend6.C (revision 816) @@ -0,0 +1,3 @@ +// PR c++/27808 + +template friend void T::foo; // { dg-error "friend|invalid" }
friend6.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: error13.C =================================================================== --- error13.C (nonexistent) +++ error13.C (revision 816) @@ -0,0 +1,13 @@ +// PR c++/13975 + +public: // { dg-error "" } + +int i; + +protected: // { dg-error "" } + +int j; + +private: // { dg-error "" } + +int k;
error13.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: named_ops.C =================================================================== --- named_ops.C (nonexistent) +++ named_ops.C (revision 816) @@ -0,0 +1,13 @@ +/* Copyright (C) 2002 Free Software Foundation, Inc. */ + +/* { dg-do compile } */ +/* { dg-options -fpreprocessed } */ + +/* Tests that C++ named ops are still there with -fpreprocessed. */ + +/* Source: Neil Booth, 23 May 2002. */ + +int main () +{ + return 2 xor 2; +}
named_ops.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: crash27.C =================================================================== --- crash27.C (nonexistent) +++ crash27.C (revision 816) @@ -0,0 +1,5 @@ +// Bug: 23225 + +void Dispatcher() + (__builtin_offsetof (ArgsType, largeMsgLen)) + /* { dg-error "function " "function" { target *-*-* } 4 } */
crash27.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: semicolon1.C =================================================================== --- semicolon1.C (nonexistent) +++ semicolon1.C (revision 816) @@ -0,0 +1,4 @@ +// PR c++/12479 +// { dg-options "-pedantic" } + +#include "semicolon1.h"
semicolon1.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: typename7.C =================================================================== --- typename7.C (nonexistent) +++ typename7.C (revision 816) @@ -0,0 +1,31 @@ +// { dg-do compile } + +// Origin: Volker Reichelt and +// Alexandre Oliva + +// PR c++/18757: ICE in get_innermost_template_args + +struct A +{ + template void foo(int); + template void bar(T t) { + this->foo(t); } // { dg-error "expected|parse error|no matching" } + template void bad(T t) { + foo(t); } // { dg-error "expected|parse error|no matching" } +}; + +template +struct B +{ + void bar(T t) { + A().bar(t); } // { dg-error "expected|parse error|no matching" } + void bad(T t) { + B::bar(t); } // { dg-error "invalid|not a template" } +}; + +void baz() +{ + A().bar(0); + A().bad(0); + B().bar(0); +}
typename7.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: mutable1.C =================================================================== --- mutable1.C (nonexistent) +++ mutable1.C (revision 816) @@ -0,0 +1,7 @@ +// PR c++/16518 + +struct foo { + void bar() const { m1=1; m2=1;} + mutable int m1,m2; +}; +
mutable1.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: new4.C =================================================================== --- new4.C (nonexistent) +++ new4.C (revision 816) @@ -0,0 +1,7 @@ +// PR c++/29291 +// { dg-do compile } + +template void foo() +{ + new int(; // { dg-error "before" } +}
new4.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: operator7.C =================================================================== --- operator7.C (nonexistent) +++ operator7.C (revision 816) @@ -0,0 +1,4 @@ +// PR c++/27278 +// { dg-do compile } + +int operator+(void,void); // { dg-error "incomplete type|invalid use" }
operator7.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: namespace7.C =================================================================== --- namespace7.C (nonexistent) +++ namespace7.C (revision 816) @@ -0,0 +1,8 @@ +namespace O { + struct SO; + namespace I { + struct SI; + struct O::SO {}; // { dg-error "" } + } + struct I::SI {}; +}
namespace7.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: typedef3.C =================================================================== --- typedef3.C (nonexistent) +++ typedef3.C (revision 816) @@ -0,0 +1,7 @@ +// PR c++/3004 +// Origin: Travis J.I. Corcoran +// { dg-do compile } + +struct A { typedef A* Ptr; }; // { dg-error "previous declaration" } + +struct A::Ptr; // { dg-error "typedef|not declare anything" }
typedef3.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: repo1.C =================================================================== --- repo1.C (nonexistent) +++ repo1.C (revision 816) @@ -0,0 +1,9 @@ +// { dg-options "-frepo" } + +extern "C" inline void f() {} + +int main () { + f(); +} + +// { dg-final { cleanup-repo-files } }
repo1.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: stack1.C =================================================================== --- stack1.C (nonexistent) +++ stack1.C (revision 816) @@ -0,0 +1,14 @@ +/* PR c/2161: parser stack overflow. */ +/* { dg-do compile } */ + +#define ONE else if (0) { } +#define TEN ONE ONE ONE ONE ONE ONE ONE ONE ONE ONE +#define HUN TEN TEN TEN TEN TEN TEN TEN TEN TEN TEN +#define THOU HUN HUN HUN HUN HUN HUN HUN HUN HUN HUN + +void foo() +{ + if (0) { } + /* 11,000 else if's. */ + THOU THOU THOU THOU THOU THOU THOU THOU THOU THOU THOU +}
stack1.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: dtor3.C =================================================================== --- dtor3.C (nonexistent) +++ dtor3.C (revision 816) @@ -0,0 +1,16 @@ +// { dg-do compile } +// Contributed by Wolfgang Bangerth +// PR c++/12335: Make sure we don't ICE on the qualified-id form of a +// destructor call. + +struct Y { + ~Y() {} // { dg-bogus "note" "implemented DR272" { xfail *-*-* } } +}; + +struct X : Y { + ~X() {} // { dg-bogus "note" "implemented DR272" { xfail *-*-* } } + void f() { + X::~X(); // { dg-bogus "" "implemented DR272" { xfail *-*-* } } + Y::~Y(); // { dg-bogus "" "implemented DR272" { xfail *-*-* } } + } +};
dtor3.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: attr2.C =================================================================== --- attr2.C (nonexistent) +++ attr2.C (revision 816) @@ -0,0 +1,12 @@ +// PR c++/16337 + +#define vector __attribute__((vector_size(16))) +void foo (void) +{ + vector signed int v1 = { 1, 2, 3, 4 }; + vector signed int v2, v3; + vector signed int v4; + v2 = v1; + v3 = v1; + v4 = v1; +}
attr2.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: try-catch-1.C =================================================================== --- try-catch-1.C (nonexistent) +++ try-catch-1.C (revision 816) @@ -0,0 +1,14 @@ +// Test case from: +// Reduced by +// The problem was that g++ was ICE because +// it was deferring an NULL pointer because +// it should have been taking the operand 1 +// instead of the chain in finish_fname_decls. + + +void fun() +try +{ + __FUNCTION__; +} +catch (...) {}
try-catch-1.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: parse3.C =================================================================== --- parse3.C (nonexistent) +++ parse3.C (revision 816) @@ -0,0 +1,7 @@ +/* PR c++/80 */ +/* { dg-do compile } */ + +/* Used to get: + bug.C:7: semicolon missing after declaration of `numbers' +*/ +enum numbers { zero, one, two, three } __attribute__ ((packed)) ;
parse3.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: error22.C =================================================================== --- error22.C (nonexistent) +++ error22.C (revision 816) @@ -0,0 +1,5 @@ +// PR c++/15786 + +struct A { + void foo(bar* p); /* { dg-error "declared" } */ +};
error22.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: ctor6.C =================================================================== --- ctor6.C (nonexistent) +++ ctor6.C (revision 816) @@ -0,0 +1,11 @@ +// { dg-do compile } + +// There is no ambiguity in finding a right constructor for X b(a). + +class X { +public: + X(const X&, int = 3); +}; + +extern X a; +X b(a);
ctor6.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: offsetof3.C =================================================================== --- offsetof3.C (nonexistent) +++ offsetof3.C (revision 816) @@ -0,0 +1,11 @@ +// PR c++/13529 + +#include + +struct A { int i; }; +struct B { A a; }; + +int main() +{ + return offsetof(B,a.i) != 0; +}
offsetof3.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: crash11.C =================================================================== --- crash11.C (nonexistent) +++ crash11.C (revision 816) @@ -0,0 +1,34 @@ +// { dg-do compile } + +// Origin: priesnit@math.uni-goettingen.de + +// PR c++/5767: ICE parsing typename with invalid scope. + +template