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 class TP>
+struct A
+{
+ template
+ struct Template
+ {
+ typedef typename TP::Type Type;
+ };
+};
+template class TP>
+struct B
+{
+ template
+ struct Template
+ {
+ typedef typename A::Template> // { dg-error "mismatch|class template" }
+ ::template Template::Type Type; // { dg-error "" }
+ };
+};
+template
+struct C
+{
+ typedef void Type;
+};
+int main()
+{
+ typedef B::Template::Type Type; // { dg-error "does not name a type" }
+}
crash11.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 816)
@@ -0,0 +1,4 @@
+template
+void f();
+
+void g() { f<(3, 2)>(); } // { dg-error "" }
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: cond2.C
===================================================================
--- cond2.C (nonexistent)
+++ cond2.C (revision 816)
@@ -0,0 +1,14 @@
+// PR c++/20905
+
+struct name {};
+
+int
+f ();
+
+void
+g ()
+{
+ if (int name = f ())
+ {
+ }
+}
cond2.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: using1.C
===================================================================
--- using1.C (nonexistent)
+++ using1.C (revision 816)
@@ -0,0 +1 @@
+namespace A { using ::B; } // { dg-error "" }
using1.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: stmtexpr2.C
===================================================================
--- stmtexpr2.C (nonexistent)
+++ stmtexpr2.C (revision 816)
@@ -0,0 +1,11 @@
+// { dg-do compile }
+// { dg-options "" }
+
+#define DMAX(a,b) ({double _a = (a), _b = (b); _a > _b ? _a : _b; })
+
+void foo(void)
+{
+ double xl, dy;
+ xl = DMAX(dy, 0.0);
+}
+
stmtexpr2.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: varmod1.C
===================================================================
--- varmod1.C (nonexistent)
+++ varmod1.C (revision 816)
@@ -0,0 +1,7 @@
+int main(int argc, char** argv) {
+ int nx = 2;
+ void theerror(double a[][nx+1]); // { dg-error "" }
+ double** a;
+ theerror(a); // { dg-error "" }
+ return 0;
+}
varmod1.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: crash19.C
===================================================================
--- crash19.C (nonexistent)
+++ crash19.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" "" }
crash19.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: defarg3.C
===================================================================
--- defarg3.C (nonexistent)
+++ defarg3.C (revision 816)
@@ -0,0 +1,5 @@
+struct A {
+ enum { value = 10 };
+ A() { f(); }
+ static int f(int i=value);
+};
defarg3.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: error3.C
===================================================================
--- error3.C (nonexistent)
+++ error3.C (revision 816)
@@ -0,0 +1,6 @@
+// PR c++/10779
+
+static void InstantiateConstraint(const float&, unsigned,
+ void(*AddFunction)(const TYPE&,bool&, // { dg-error "" }
+ char*, char*,
+ unsigned*)); // { dg-error "" }
error3.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: decl-specifier-1.C
===================================================================
--- decl-specifier-1.C (nonexistent)
+++ decl-specifier-1.C (revision 816)
@@ -0,0 +1,16 @@
+// Contributed by Gabriel Dos Reis
+// Origin: PRs 7721 and 7803
+// { dg-do compile }
+
+namespace N
+{
+ template
+ struct X { };
+}
+
+N::X X; // { dg-error "" "" }
+
+int main()
+{
+ return sizeof(X); // { dg-error "" "" }
+}
decl-specifier-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: semicolon1.h
===================================================================
--- semicolon1.h (nonexistent)
+++ semicolon1.h (revision 816)
@@ -0,0 +1,2 @@
+#pragma GCC system_header
+;
semicolon1.h
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: constant6.C
===================================================================
--- constant6.C (nonexistent)
+++ constant6.C (revision 816)
@@ -0,0 +1,23 @@
+// PR c++/19883
+
+template struct A
+{
+ static const T i = 1;
+ char a[int(i)];
+};
+
+template struct B {};
+
+template struct C
+{
+ static const T i = 2;
+ B a;
+};
+
+template< typename T, T N >
+struct integral_c
+{
+ static const T value = N;
+
+ typedef integral_c< T, static_cast((value + 1)) > next;
+};
constant6.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-dependent3.C
===================================================================
--- non-dependent3.C (nonexistent)
+++ non-dependent3.C (revision 816)
@@ -0,0 +1,17 @@
+// PR c++/14586
+
+enum E { e };
+
+E & operator |= (E &f1, const E &f2);
+
+E operator | (const E &f1, const E &f2) {
+ E result = f1;
+ result |= f2;
+ return result;
+}
+
+template void foo () {
+ const E flags = e | e;
+}
+
+template void foo ();
non-dependent3.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: access1.C
===================================================================
--- access1.C (nonexistent)
+++ access1.C (revision 816)
@@ -0,0 +1,13 @@
+// { dg-do compile }
+
+// Origin: Volker Lukas
+
+// PR c++/9554: Access checking for template ID as class head.
+
+class enclose
+{
+ template struct enclosed;
+};
+
+template <>
+struct enclose::enclosed;
access1.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: template17.C
===================================================================
--- template17.C (nonexistent)
+++ template17.C (revision 816)
@@ -0,0 +1,13 @@
+// PR c++/23841
+
+template
+struct S
+{
+ int f(int i = I) { return i; }
+};
+
+void
+g ()
+{
+ S<(int)0.> a2;
+}
template17.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: crash4.C
===================================================================
--- crash4.C (nonexistent)
+++ crash4.C (revision 816)
@@ -0,0 +1,12 @@
+struct Bar
+ {
+ typedef int type;
+ };
+
+ struct Foo
+ {
+ void func(void)
+ {
+ mutable Bar::type x; // { dg-error "" }
+ }
+ };
crash4.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: elab1.C
===================================================================
--- elab1.C (nonexistent)
+++ elab1.C (revision 816)
@@ -0,0 +1,9 @@
+namespace Name {
+
+ typedef void *(*Function)( void *, int ); // { dg-error "previous declaration" }
+
+ struct Foo {
+ struct Function xyz[5]; // { dg-error "" }
+ };
+
+}
elab1.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: enum3.C
===================================================================
--- enum3.C (nonexistent)
+++ enum3.C (revision 816)
@@ -0,0 +1,5 @@
+// PR c++/28261
+
+struct A {}; // { dg-error "A" }
+
+A::A (enum { e }) {} // { dg-error "defined|match" }
enum3.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: ptrmem5.C
===================================================================
--- ptrmem5.C (nonexistent)
+++ ptrmem5.C (revision 816)
@@ -0,0 +1,9 @@
+// PR c++/27806
+
+struct A {};
+
+void foo()
+{
+ p; // { dg-error "p" }
+ extern int A::* p;
+}
ptrmem5.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: access9.C
===================================================================
--- access9.C (nonexistent)
+++ access9.C (revision 816)
@@ -0,0 +1,5 @@
+// PR c++/24782
+
+class Foo { public: typedef int type1; };
+class Bar { private: typedef Foo type2; }; // { dg-error "private" }
+void g(Bar::type2::type1) {} // { dg-error "context" }
access9.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: linkage2.C
===================================================================
--- linkage2.C (nonexistent)
+++ linkage2.C (revision 816)
@@ -0,0 +1,3 @@
+// PR c++/27884
+
+extern "C" void foo(register int *my_perl);
linkage2.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: error31.C
===================================================================
--- error31.C (nonexistent)
+++ error31.C (revision 816)
@@ -0,0 +1,12 @@
+// PR c++/32190
+
+template class foo{ };
+
+int main() {
+ foo i;
+ foo j; // { dg-error "template argument" }
+ int k;
+ int l;
+ foo m;
+ return 0;
+ }
error31.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: error14.C
===================================================================
--- error14.C (nonexistent)
+++ error14.C (revision 816)
@@ -0,0 +1,22 @@
+// PR c++/13970
+
+struct X
+{
+ template< typename Z > Z Zunc()
+ {
+ return Z();
+ }
+
+ template< typename Z > void Zinc()
+ {
+ }
+
+ void tst()
+ {
+ Zunc();
+
+ Zinc( //);
+ // }
+
+}; // { dg-error "" }
+
error14.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: parameter-declaration-1.C
===================================================================
--- parameter-declaration-1.C (nonexistent)
+++ parameter-declaration-1.C (revision 816)
@@ -0,0 +1,6 @@
+// Contributed by Gabriel Dos Reis
+// Origin: Robert Schiele; PR C++/8799
+// { dg-do compile }
+
+struct {
+ a(void = 0; a(0), a(0) // { dg-error "" "" { target *-*-* } }
parameter-declaration-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: crash20.C
===================================================================
--- crash20.C (nonexistent)
+++ crash20.C (revision 816)
@@ -0,0 +1,14 @@
+// { dg-do compile }
+
+// Copyright (C) 2004 Free Software Foundation, Inc.
+// Contributed by Nathan Sidwell 1 Dec 2004
+
+// PR 18729: ICE on ill formed
+// Origin: Volker Reichelt
+
+template struct A
+{
+ typedef typename T::X Y; // { dg-error "not a class" "" }
+};
+
+A::Y y; // { dg-error "instantiated from here" "" }
crash20.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: parens1.C
===================================================================
--- parens1.C (nonexistent)
+++ parens1.C (revision 816)
@@ -0,0 +1,18 @@
+/* PR c++/8237 */
+/* { dg-do compile } */
+class A {
+public:
+ A() { }
+};
+
+class B {
+public:
+ B(A a) { }
+ void form() { }
+};
+
+int main() {
+ // This used to give a parse error.
+ B(A()).form();
+}
+
parens1.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: typename8.C
===================================================================
--- typename8.C (nonexistent)
+++ typename8.C (revision 816)
@@ -0,0 +1,11 @@
+// Copyright (C) 2005 Free Software Foundation, Inc.
+// Contributed by Nathan Sidwell 12 Oct 2005
+
+// PR 23797:ICE
+// Origin: Volker Reichelt
+
+// { dg-options "-fpermissive -w" }
+
+struct A { typedef int X; };
+
+int i = typename A::X();
typename8.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: crash28.C
===================================================================
--- crash28.C (nonexistent)
+++ crash28.C (revision 816)
@@ -0,0 +1,14 @@
+// Copyright (C) 2005 Free Software Foundation, Inc.
+// Contributed by Nathan Sidwell 10 Aug 2005
+
+// PR 23219, ICE
+// Origin:Andrew Pinski
+// Volker Reichelt
+
+template class insert_iterator > {}; // { dg-error "not a template|not declared in this scope|expected unqualified-id|extra" }
+template class insert_iterator { // { dg-error "template" }
+ hash_set<_Value>;
+};
+
+template struct A > {}; // { dg-error "not a template|not declared in this scope|expected unqualified-id|extra" }
+struct A {};
crash28.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: typedef4.C
===================================================================
--- typedef4.C (nonexistent)
+++ typedef4.C (revision 816)
@@ -0,0 +1,12 @@
+// { dg-do compile }
+
+// Origin: Matt Austern
+
+// PR c++/7983: ICE typedef to typename as friend.
+
+template class smart_ptr2 {
+ T* real_ptr;
+ public:
+ typedef typename T::subT td; // { dg-error "previous declaration" }
+ friend class td; // { dg-error "typedef|not name a class" }
+};
typedef4.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: namespace8.C
===================================================================
--- namespace8.C (nonexistent)
+++ namespace8.C (revision 816)
@@ -0,0 +1,6 @@
+namespace X {
+ typedef struct {
+ } x;
+}
+typedef X::x x;
+using X::x;
namespace8.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: too-many-tmpl-args1.C
===================================================================
--- too-many-tmpl-args1.C (nonexistent)
+++ too-many-tmpl-args1.C (revision 816)
@@ -0,0 +1,11 @@
+// PR c++/9229
+// Origin: Wolfgang Bangerth
+// { dg-do compile }
+
+template class A // { dg-error "" }
+{
+ struct B;
+ template friend typename A::B foo(); // { dg-error "" }
+};
+
+template class A;
too-many-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: pragma1.C
===================================================================
--- pragma1.C (nonexistent)
+++ pragma1.C (revision 816)
@@ -0,0 +1,8 @@
+// PR c++/17916
+
+class T {
+#pragma X
+ struct S {
+ };
+#pragma Y
+};
pragma1.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: wrong-inline1.C
===================================================================
--- wrong-inline1.C (nonexistent)
+++ wrong-inline1.C (revision 816)
@@ -0,0 +1,12 @@
+// PR c++/5921
+// Origin: Volker Reichelt
+// { dg-do compile }
+
+struct A
+{
+ struct B { B(); };
+};
+
+static A::B b;
+
+inline template void f (); // { dg-error "" }
wrong-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: non-templ1.C
===================================================================
--- non-templ1.C (nonexistent)
+++ non-templ1.C (revision 816)
@@ -0,0 +1,10 @@
+// PR c++/9228
+// Origin: Wolfgang Bangerth
+// { dg-do compile }
+
+struct A
+{
+ struct B { B(int); };
+};
+
+template typename A::B foo() { return 1; } // { dg-error "" }
non-templ1.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: dtor4.C
===================================================================
--- dtor4.C (nonexistent)
+++ dtor4.C (revision 816)
@@ -0,0 +1,10 @@
+// { dg-do compile }
+// Contributed by Paul Koning
+// PR c++/15947: Accept destructor as template in qualified-id
+
+template struct X {
+ ~X();
+};
+
+template
+X::~X(){}
dtor4.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: ctor7.C
===================================================================
--- ctor7.C (nonexistent)
+++ ctor7.C (revision 816)
@@ -0,0 +1,15 @@
+//PR c++/28505
+
+struct A
+{
+ A : (); // { dg-error "primary-expression|incomplete type" }
+ A : (int); // { dg-error "primary-expression|incomplete type|'int'" }
+};
+
+struct B
+{
+ char c;
+ A a;
+};
+
+B b = (B){0}; // { dg-error "compound-literals" }
ctor7.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: error23.C
===================================================================
--- error23.C (nonexistent)
+++ error23.C (revision 816)
@@ -0,0 +1,7 @@
+// PR c++/19149
+
+struct QChar {
+ QChar( char c );
+ QChar( const QChar& c );
+ static const ; // { dg-error "" }
+};
error23.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: parse4.C
===================================================================
--- parse4.C (nonexistent)
+++ parse4.C (revision 816)
@@ -0,0 +1,25 @@
+/* PR c++/88 */
+/* { dg-do compile } */
+
+class Hvec
+{
+public:
+ Hvec(double x, double y, double z);
+ ~Hvec();
+};
+
+
+class Camera1
+{
+public:
+ Camera1(const Hvec &basepos=Hvec(0.0,0.0,0.0));
+ ~Camera1();
+};
+
+class Camera2
+{
+public:
+ Camera2(const Hvec &basepos);
+ inline Camera2() { Camera2(Hvec(0.0,0.0,0.0)); };
+ ~Camera2();
+};
parse4.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: funptr1.C
===================================================================
--- funptr1.C (nonexistent)
+++ funptr1.C (revision 816)
@@ -0,0 +1,13 @@
+// PR c++/9282
+// Origin: Thomas Richter
+// { dg-do compile }
+
+typedef void (*fptr)();
+
+struct A
+{
+ template static void foo() {}
+ template static void bar() { (*f)(); }
+};
+
+fptr f = A::bar< A::foo<0> >;
funptr1.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: offsetof4.C
===================================================================
--- offsetof4.C (nonexistent)
+++ offsetof4.C (revision 816)
@@ -0,0 +1,13 @@
+// { dg-do compile }
+// Contributed by Bill Helfinstine
+// PR c++/14932: Allow subscript operator in offsetof
+
+#include
+
+struct A
+{
+ int bar;
+ int foo[22];
+};
+
+const int off = offsetof(A, foo[12]);
offsetof4.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 816)
@@ -0,0 +1,16 @@
+namespace N
+{
+
+template struct A
+{
+ template A(A);
+};
+
+}
+
+void foo(N::A);
+
+void bar()
+{
+ foo(N::A); // { dg-error "" }
+}
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: crash12.C
===================================================================
--- crash12.C (nonexistent)
+++ crash12.C (revision 816)
@@ -0,0 +1,24 @@
+// { dg-do compile }
+
+// Origin: Martin von Loewis
+
+// PR c++/157: Incorrect type/template decision in function parameter.
+
+template class auto_ptr {};
+template
+class counted_ptr
+{
+public:
+ counted_ptr(auto_ptr<_Tp>& __a); // { dg-error "candidate" }
+ auto_ptr<_Tp> auto_ptr();
+};
+
+template
+inline counted_ptr<_Tp>::counted_ptr(class auto_ptr& __a) // { dg-error "required|not match|template" }
+{
+}
+
+template
+inline class auto_ptr<_Tp> counted_ptr<_Tp>::auto_ptr()
+{
+}
crash12.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: tmpl-tmpl-param1.C
===================================================================
--- tmpl-tmpl-param1.C (nonexistent)
+++ tmpl-tmpl-param1.C (revision 816)
@@ -0,0 +1,14 @@
+// PR c++/7259
+// Origin: Philipp Buettgenbach
+// Reduced version: Volker Reichelt
+// { dg-do compile }
+
+template class T> class A : public T<0> {};
+
+template struct B
+{
+ template class C {};
+ typedef A D;
+};
+
+B::D d;
tmpl-tmpl-param1.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: cond3.C
===================================================================
--- cond3.C (nonexistent)
+++ cond3.C (revision 816)
@@ -0,0 +1,15 @@
+// PR c++/30847
+// { dg-do compile }
+// { dg-options "" }
+
+int j, k, l;
+extern void baz ();
+
+void
+foo (int i)
+{
+ (i ? j : k) = ({ l++; (void) l; }); // { dg-error "void value not ignored" }
+ (i ? j : k) += ({ l++; (void) l; }); // { dg-error "void value not ignored" }
+ (i ? j : k) = baz (); // { dg-error "void value not ignored" }
+ (i ? j : k) *= baz (); // { dg-error "void value not ignored" }
+}
cond3.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: using2.C
===================================================================
--- using2.C (nonexistent)
+++ using2.C (revision 816)
@@ -0,0 +1,8 @@
+namespace N {
+ template
+ struct foo {};
+}
+
+int main() {
+ using N::foo; // { dg-error "" }
+}
using2.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: struct-as-enum1.C
===================================================================
--- struct-as-enum1.C (nonexistent)
+++ struct-as-enum1.C (revision 816)
@@ -0,0 +1,10 @@
+// PR c++/163, PR c++/8595
+// Origin: , Mark Leone
+// { dg-do compile }
+
+namespace N
+{
+ struct A {}; // { dg-error "previous declaration" }
+}
+
+typedef enum N::A B; // { dg-error "enum|invalid type" }
struct-as-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: stmtexpr3.C
===================================================================
--- stmtexpr3.C (nonexistent)
+++ stmtexpr3.C (revision 816)
@@ -0,0 +1,8 @@
+// { dg-do compile }
+// { dg-options "" }
+
+struct B
+{
+ int a;
+ B() : a(({ 1; })) {}
+};
stmtexpr3.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: crash37.C
===================================================================
--- crash37.C (nonexistent)
+++ crash37.C (revision 816)
@@ -0,0 +1,15 @@
+// PR c++/31941
+// { dg-do compile }
+
+struct S
+{
+ S() throw () { }
+ virtual ~S () throw ();
+ virtual const char* what () const throw ();
+};
+
+const char *
+foo (S &e)
+{
+ return e.what ().c_str (); // { dg-error "c_str.*S::what.*which is of non-class type" }
+}
crash37.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 816)
@@ -0,0 +1,15 @@
+// PR c++/9486
+// Origin: John Levon
+// { dg-do compile }
+
+template struct A
+{
+ template void foo(T);
+};
+
+template void bar()
+{
+ A().template foo(0);
+}
+
+template void bar();
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: defarg4.C
===================================================================
--- defarg4.C (nonexistent)
+++ defarg4.C (revision 816)
@@ -0,0 +1,32 @@
+// { dg-do compile }
+
+// Copyright (C) 2003 Free Software Foundation, Inc.
+// Contributed by Nathan Sidwell 3 Jul 2003
+
+// PR c++ 9162. default args got left unprocessed
+
+struct S {
+ friend int foo (const S&, int = 100);
+};
+S s;
+int i = foo (s);
+
+struct R
+{
+ template R (T, int = 0);
+};
+
+int Foo ()
+{
+ R s (1);
+}
+
+template struct Q
+{
+ int Foo (T, int = 0);
+};
+
+int Foo (Q *s)
+{
+ s->Foo (1);
+}
defarg4.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: args1.C
===================================================================
--- args1.C (nonexistent)
+++ args1.C (revision 816)
@@ -0,0 +1,12 @@
+// { dg-do compile }
+
+// Copyright (C) 2003 Free Software Foundation, Inc.
+// Contributed by Nathan Sidwell 9 Jul 2003
+
+// PR c++ 11050. Accepted ill-formed
+
+
+void Foo (int)
+{
+ Foo(2 2); // { dg-error "expected" "" }
+}
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: error4.C
===================================================================
--- error4.C (nonexistent)
+++ error4.C (revision 816)
@@ -0,0 +1,7 @@
+// PR c++/12160
+
+struct X {
+ virtual void f(int,
+ itn, // { dg-error "declared" }
+ int);
+};
error4.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: constant7.C
===================================================================
--- constant7.C (nonexistent)
+++ constant7.C (revision 816)
@@ -0,0 +1,9 @@
+// PR c++/19991
+
+enum { e = 1 };
+
+template struct A
+{
+ static const int i = e;
+ char a[i];
+};
constant7.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: undefined1.C
===================================================================
--- undefined1.C (nonexistent)
+++ undefined1.C (revision 816)
@@ -0,0 +1,10 @@
+// PR c++/8143
+// { dg-do compile }
+
+struct foo
+{
+ X x; // { dg-error "" }
+
+ foo(X) {} // { dg-error "" }
+ foo(X y, int) : x() {} // { dg-error "" }
+};
undefined1.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: access2.C
===================================================================
--- access2.C (nonexistent)
+++ access2.C (revision 816)
@@ -0,0 +1,15 @@
+// Copyright (C) 2003 Free Software Foundation
+// Contributed by Kriang Lerdsuwanakij
+// { dg-do compile }
+
+// Deferred access checking of variable declaration.
+
+class A {
+ typedef int X; // { dg-error "private" }
+ static X a, b, c;
+};
+
+A::X A::a;
+A::X A::b, x; // { dg-error "this context" }
+A::X y, A::c; // { dg-error "this context" }
+A::X z; // { dg-error "this context" }
access2.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: extern-C-1.C
===================================================================
--- extern-C-1.C (nonexistent)
+++ extern-C-1.C (revision 816)
@@ -0,0 +1,13 @@
+/* PR c++/4754 */
+/* { dg-do compile } */
+// GCC 3.2 got very confused by the nested extern "C" blocks, and thought
+// there was a storage class specifier on 'int i'.
+
+extern "C"
+{
+ extern "C" struct Test
+ {
+ int i;
+ };
+}
+
extern-C-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: template18.C
===================================================================
--- template18.C (nonexistent)
+++ template18.C (revision 816)
@@ -0,0 +1,52 @@
+// PR c++/22173
+
+struct A
+{
+ static void a1();
+ template
+ static void b1(T);
+ template
+ struct B {
+ static void b1();
+ template
+ static void b2(T);
+ };
+ struct C {
+ static void c1();
+ };
+};
+
+template void f1()
+{
+ A* p;
+ A::template a1(); // { dg-error "template" }
+ A::template b1(0);
+ p->template a1(); // { dg-error "template" }
+ p->template b1('a');
+
+ A::template B<0>::b1();
+ A::template B<0>::template b1(); // { dg-error "template" }
+ A::template B<0>::template b2(0);
+ A::template B<0>::template b2(0);
+
+ // Because B is dependent, none of these are errors, as this
+ // function is not instantiated.
+ A::template B::b1();
+ A::template B::template b1();
+ A::template B::template b2(0);
+ A::template B::template b2(0);
+
+ A::template C::c1(); // { dg-error "template" }
+}
+
+template void f2()
+{
+ // These are copies of lines from f1, but this function is
+ // instantiated, so we should get errors here.
+ A::template B::b1();
+ A::template B::template b1(); // { dg-error "template" }
+ A::template B::template b2(0);
+ A::template B::template b2(0);
+}
+
+template void f2<0>(); // { dg-error "instantiated" }
template18.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: elab2.C
===================================================================
--- elab2.C (nonexistent)
+++ elab2.C (revision 816)
@@ -0,0 +1,7 @@
+struct A {};
+
+struct B
+{
+ typedef A T; // { dg-error "previous declaration" }
+ friend struct T; // { dg-error "" }
+};
elab2.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: crash5.C
===================================================================
--- crash5.C (nonexistent)
+++ crash5.C (revision 816)
@@ -0,0 +1,13 @@
+// { dg-options "-w" }
+
+class QString { // { dg-error "" }
+ QString (const QString & a); // { dg-error "" }
+};
+
+class QString { }; // { dg-error "" }
+
+const QString q () {
+ QString z; // { dg-error "" }
+ int x;
+ return x ? QString () : QString (); // { dg-error "" }
+}
crash5.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: lookup1.C
===================================================================
--- lookup1.C (nonexistent)
+++ lookup1.C (revision 816)
@@ -0,0 +1,9 @@
+#include
-
+
+using namespace std;
+
+template
lookup1.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: ptrmem6.C
===================================================================
--- ptrmem6.C (nonexistent)
+++ ptrmem6.C (revision 816)
@@ -0,0 +1,11 @@
+//PR C++/27805
+
+struct A;
+
+void foo()
+{
+ int A::* p;
+ A a; // { dg-error "incomplete type" }
+ a.*p;
+}
+
ptrmem6.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: namespace10.C
===================================================================
--- namespace10.C (nonexistent)
+++ namespace10.C (revision 816)
@@ -0,0 +1,9 @@
+// PR c++/16529
+
+namespace m {} // { dg-error "" }
+
+namespace n {
+ namespace m {}
+}
+
+namespace m = n::m; // { dg-error "" }
namespace10.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: direct-initialization-2.C
===================================================================
--- direct-initialization-2.C (nonexistent)
+++ direct-initialization-2.C (revision 816)
@@ -0,0 +1,18 @@
+// Copyright (C) 2002 Free Software Foundation
+// Origin: C++/729
+// Contributed by Gabriel Dos Reis
+// { dg-do compile }
+
+struct A {
+ A(int) { }
+};
+
+struct B {
+ typedef B T;
+ B(A, char**) {}
+};
+
+int main(int argc, char** argv)
+{
+ B::T t(A(argc), argv);
+}
direct-initialization-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: error15.C
===================================================================
--- error15.C (nonexistent)
+++ error15.C (revision 816)
@@ -0,0 +1,37 @@
+// { dg-do compile }
+// Contributed by Volker Reichelt
+// PR c++/14008: Improve diagnostic on invalid types in declarators.
+
+namespace N
+{
+ template struct A {};
+ struct C {};
+ int K;
+}
+
+N::A f2; // { dg-error "without an argument list" }
+N::INVALID f3; // { dg-error "in namespace 'N' does not name a type" }
+N::C::INVALID f4; // { dg-error "in class 'N::C' does not name a type" }
+N::K f6; // { dg-error "in namespace 'N' does not name a type" }
+typename N::A f7; // { dg-error "without an argument list|outside of template" }
+
+struct B
+{
+ N::A f2; // { dg-error "without an argument list" }
+ N::INVALID f3; // { dg-error "in namespace 'N' does not name a type" }
+ N::C::INVALID f4; // { dg-error "in class 'N::C' does not name a type" }
+ N::K f6; // { dg-error "in namespace 'N' does not name a type" }
+ typename N::A f7; // { dg-error "without an argument list|outside of template" }
+};
+
+template
+struct C
+{
+ N::A f2; // { dg-error "without an argument list" }
+ N::INVALID f3; // { dg-error "in namespace 'N' does not name a type" }
+ N::C::INVALID f4; // { dg-error "in class 'N::C' does not name a type" }
+ N::K f6; // { dg-error "in namespace 'N' does not name a type" }
+ typename N::A f7; // { dg-error "without an argument list" }
+};
+
+// { dg-bogus "" "bogus excess errors in declaration" { xfail *-*-* } 16 }
error15.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 816)
@@ -0,0 +1,5 @@
+template
+struct bar
+{
+ typedef typename baz::typename rebind foo; // { dg-error "" }
+};
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: crash21.C
===================================================================
--- crash21.C (nonexistent)
+++ crash21.C (revision 816)
@@ -0,0 +1,7 @@
+namespace N
+{
+ struct A; // { dg-error "previous declaration" "" }
+}
+
+template
+struct N::A {}; // { dg-error "redeclared" "" }
crash21.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: catch1.C
===================================================================
--- catch1.C (nonexistent)
+++ catch1.C (revision 816)
@@ -0,0 +1,8 @@
+// PR c++/28249
+// { dg-do compile }
+
+void foo()
+{
+ try {}
+ catch (long long long) {} // { dg-error "long long long" }
+}
catch1.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: register1.C
===================================================================
--- register1.C (nonexistent)
+++ register1.C (revision 816)
@@ -0,0 +1,14 @@
+// PR c++/23839
+
+class C
+{
+ int i;
+public:
+ C(int j) : i(j) { }
+ operator int() { return i; }
+};
+
+C f (register C x)
+{
+ return x + 31;
+}
register1.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: no-value1.C
===================================================================
--- no-value1.C (nonexistent)
+++ no-value1.C (revision 816)
@@ -0,0 +1,14 @@
+// PR c++/5533
+// { dg-do compile }
+
+namespace N
+{
+ template struct A{};
+}
+
+template void foo(T) {}
+
+void bar()
+{
+ foo(N::A); // { dg-error "" }
+}
no-value1.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: parens2.C
===================================================================
--- parens2.C (nonexistent)
+++ parens2.C (revision 816)
@@ -0,0 +1,11 @@
+/* PR c++/8842. */
+/* { dg-do compile } */
+int main( int argc, char* argv )
+{
+ int i = 5;
+ // This always worked:
+ // double l1 = double(int(i)) / double(int(i));
+ // But this used to give a parse error before the `/' token:
+ double l2 = (double(int(i)) / double(int(i)));
+}
+
parens2.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: typename9.C
===================================================================
--- typename9.C (nonexistent)
+++ typename9.C (revision 816)
@@ -0,0 +1,3 @@
+struct A { typedef int X; };
+
+int i = typename A::X(); // { dg-error "typename" }
typename9.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: crash29.C
===================================================================
--- crash29.C (nonexistent)
+++ crash29.C (revision 816)
@@ -0,0 +1,10 @@
+// Copyright (C) 2005 Free Software Foundation, Inc.
+// Contributed by Nathan Sidwell 23 Aug 2005
+
+// PR 22454: ICE
+// Origin: Volker Reichelt reichelt@gcc.gnu.org
+
+template struct A
+{
+ A(void* = &operator new);
+};
crash29.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: operator1.C
===================================================================
--- operator1.C (nonexistent)
+++ operator1.C (revision 816)
@@ -0,0 +1,11 @@
+/* PR c++/8982 */
+/* { dg-do compile } */
+namespace foo {
+ template
+ int operator- (X x);
+}
+
+int main() {
+ using foo::operator-; // syntax error under gcc 3.2
+}
+
operator1.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: namespace1.C
===================================================================
--- namespace1.C (nonexistent)
+++ namespace1.C (revision 816)
@@ -0,0 +1,7 @@
+namespace foo {
+void baz(int);
+}
+
+int bar(int foo) {
+ foo::baz (3);
+}
namespace1.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-bracket2.C
===================================================================
--- angle-bracket2.C (nonexistent)
+++ angle-bracket2.C (revision 816)
@@ -0,0 +1,6 @@
+// { dg-do compile }
+// Contributed by MattyT
+// PR c++/14028: Parser accepts invalid unbalanced bracket.
+
+template struct A {};
+template class B : public A<4 {}; // { dg-error "" }
angle-bracket2.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: struct-1.C
===================================================================
--- struct-1.C (nonexistent)
+++ struct-1.C (revision 816)
@@ -0,0 +1,4 @@
+// Origin: Volker Reichelt
+// PR c++/18731
+
+template struct T::A {}; // { dg-error "invalid class name" }
struct-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: qualified1.C
===================================================================
--- qualified1.C (nonexistent)
+++ qualified1.C (revision 816)
@@ -0,0 +1,14 @@
+struct A {};
+
+struct B : public A
+{
+ static void foo ();
+};
+
+template struct C
+{
+ C() : f(B::foo) {}
+ void (*f)();
+};
+
+C c;
qualified1.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: typedef5.C
===================================================================
--- typedef5.C (nonexistent)
+++ typedef5.C (revision 816)
@@ -0,0 +1,6 @@
+namespace A
+{
+ typedef int T; // { dg-error "previous declaration" }
+}
+
+class A::T x; // { dg-error "using typedef-name|invalid type" }
typedef5.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: namespace9.C
===================================================================
--- namespace9.C (nonexistent)
+++ namespace9.C (revision 816)
@@ -0,0 +1,8 @@
+namespace A {
+ void f();
+}
+int g()
+{
+ struct f { };
+ using A::f;
+}
namespace9.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: pragma2.C
===================================================================
--- pragma2.C (nonexistent)
+++ pragma2.C (revision 816)
@@ -0,0 +1,8 @@
+// PR c++/17595
+
+// Ideally, the #pragma error would come one line further down, but it
+// does not.
+int f(int x,
+#pragma interface // { dg-error "not allowed here" }
+ // The parser gets confused and issues an error on the next line.
+ int y); // { dg-bogus "" "" { xfail *-*-* } }
pragma2.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 816)
@@ -0,0 +1,11 @@
+struct CPU {
+ typedef int (*pfun)();
+
+ template
+ static int dispatch();
+};
+
+template
+static int foo();
+
+template int CPU::dispatch<&template foo<2> > (); // { dg-error "" }
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: dtor5.C
===================================================================
--- dtor5.C (nonexistent)
+++ dtor5.C (revision 816)
@@ -0,0 +1,12 @@
+// PR c++/19732
+
+struct A;
+typedef int ~A; // { dg-error "non-function" }
+struct B {
+ ~A(); // { dg-error "" }
+ typedef int ~A; // { dg-error "non-function" }
+ void f() {
+ extern ~B(); // { dg-error "non-member" }
+ }
+};
+void ~A(); // { dg-error "non-member" }
dtor5.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: ctor8.C
===================================================================
--- ctor8.C (nonexistent)
+++ ctor8.C (revision 816)
@@ -0,0 +1,9 @@
+//PR c++/28505
+
+struct A
+{
+ A : (); // { dg-error "primary-expression|incomplete type" }
+ A : (int); // { dg-error "primary-expression|incomplete type|'int'" }
+};
+
+A a = (A){0}; // { dg-error "too many initializers|compound-literals" }
ctor8.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: error24.C
===================================================================
--- error24.C (nonexistent)
+++ error24.C (revision 816)
@@ -0,0 +1,7 @@
+// PR c++/19395
+
+struct A {
+ typedef int ::X; // { dg-error "" }
+};
+
+
error24.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: parse5.C
===================================================================
--- parse5.C (nonexistent)
+++ parse5.C (revision 816)
@@ -0,0 +1,33 @@
+/* PR c++/590 */
+/* { dg-do compile } */
+
+#include
+#include
+using namespace std;
+
+enum ExternalEnum { EXTERNAL_VALUE = 2 };
+
+class BadStream : public ostringstream
+{
+public:
+ enum InternalEnum { VALUE = 0 };
+ BadStream( InternalEnum e ) {};
+ BadStream( InternalEnum e, int i ) {};
+};
+
+int main()
+{
+ ( BadStream( BadStream::VALUE ) ) << "foobar" << endl;
+
+ BadStream((BadStream::InternalEnum)BadStream::VALUE ) << "foobar";
+
+ BadStream::InternalEnum in = BadStream::VALUE;
+ BadStream( in ) << "foobar";
+
+ BadStream( BadStream::VALUE, 0 ) << "foobar" << endl;
+
+ // This didn't used to compile:
+ BadStream( BadStream::VALUE ) << "foobar" << endl;
+
+ return 0;
+}
parse5.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: offsetof5.C
===================================================================
--- offsetof5.C (nonexistent)
+++ offsetof5.C (revision 816)
@@ -0,0 +1,13 @@
+// PR c++/16618
+
+#include
+
+struct test
+{
+ const char a;
+};
+
+int main()
+{
+ offsetof(test,a);
+}
offsetof5.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: crash30.C
===================================================================
--- crash30.C (nonexistent)
+++ crash30.C (revision 816)
@@ -0,0 +1,18 @@
+// { dg-do compile }
+namespace N { template struct A { operator int() const; }; }
+namespace M { template struct A {}; }
+namespace P { typedef int I; }
+
+template void foo()
+{
+ +typename N::A<0>(); // { dg-bogus "expected" }
+}
+
+template void bar()
+{
+ +typename M::A<0>; // { dg-error "expected" }
+}
+
+template void baz() {
+ typename P::I i; // { dg-bogus "expected" }
+}
crash30.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: bitfield1.C
===================================================================
--- bitfield1.C (nonexistent)
+++ bitfield1.C (revision 816)
@@ -0,0 +1,11 @@
+// PR c++/27803
+
+struct A
+{
+ double i : 8; // { dg-error "type" }
+};
+
+void foo(A& a)
+{
+ (char)a.i; // { dg-error "no member" }
+}
bitfield1.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: missing-template1.C
===================================================================
--- missing-template1.C (nonexistent)
+++ missing-template1.C (revision 816)
@@ -0,0 +1,21 @@
+// PR c++/8736
+// Origin: Peter Kolloch
+// { dg-do compile }
+
+template struct A
+{
+ template struct B
+ {
+ typedef int X;
+ };
+};
+
+template void foo()
+{
+ typedef typename A::B::X Y; // { dg-error "" }
+}
+
+void bar()
+{
+ foo();
+}
missing-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: template9.C
===================================================================
--- template9.C (nonexistent)
+++ template9.C (revision 816)
@@ -0,0 +1,5 @@
+template
+void f() {
+ g(); // { dg-error "" }
+ h(3); // { dg-error "" }
+}
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: crash13.C
===================================================================
--- crash13.C (nonexistent)
+++ crash13.C (revision 816)
@@ -0,0 +1,22 @@
+// { dg-do compile }
+
+// Origin: Giovanni Bajo
+
+// PR c++/10583: ICE using template function with invalid signature.
+
+template
+struct A
+{
+ struct B
+ {};
+};
+
+template
+void func(A::B* ) // { dg-error "variable|template|expression" }
+{
+}
+
+int main()
+{
+ func(0); // { dg-error "not declared|expression|;" }
+}
crash13.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: using3.C
===================================================================
--- using3.C (nonexistent)
+++ using3.C (revision 816)
@@ -0,0 +1,22 @@
+// { dg-do compile }
+
+// Copyright (C) 2003 Free Software Foundation, Inc.
+// Contributed by Nathan Sidwell 6 Sep 2003
+// Origin: stefaandr@hotmail.com
+
+// PR c++/11794. Using decl in nested classes of a template class
+
+template struct a
+{
+ struct a1: T
+ {
+ using T::aa;
+
+ a1() { aa = 5; }
+ };
+};
+struct b { int aa; };
+template <> struct a::a1 { a1 () {} };
+
+a::a1 a_b;
+a::a1 a_i;
using3.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: template11.C
===================================================================
--- template11.C (nonexistent)
+++ template11.C (revision 816)
@@ -0,0 +1,15 @@
+// PR c++/9488
+// Origin: Wolfgang Bangerth
+// { dg-do compile }
+
+struct A
+{
+ template void foo() {}
+};
+
+template struct B
+{
+ void bar() { A().foo(); }
+};
+
+template struct B;
template11.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: defarg5.C
===================================================================
--- defarg5.C (nonexistent)
+++ defarg5.C (revision 816)
@@ -0,0 +1,15 @@
+// { dg-do compile }
+
+// Copyright (C) 2003 Free Software Foundation, Inc.
+// Contributed by Nathan Sidwell 5 Sep 2003
+// Origin:Wolfgang Bangerth bangerth@dealii.org
+
+// PR c++/12167 - infinite recursion
+
+class A {
+ void report(int d
+ // the default arg is what NAN etc can expand to, but
+ // with the floatiness removed.
+ = (__extension__ ((union { unsigned l; int d; })
+ { l: 0x7fc00000U }).d));
+};
defarg5.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: no-typename1.C
===================================================================
--- no-typename1.C (nonexistent)
+++ no-typename1.C (revision 816)
@@ -0,0 +1,11 @@
+// PR c++/4903
+// Origin: Dan Marinescu
+// { dg-do compile }
+
+template struct A
+{
+ template struct B
+ {
+ A::template B foo(); // { dg-error "" }
+ };
+};
no-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: nontype1.C
===================================================================
--- nontype1.C (nonexistent)
+++ nontype1.C (revision 816)
@@ -0,0 +1,9 @@
+// Copyright (C) 2003 Free Software Foundation
+// Contributed by Kriang Lerdsuwanakij
+// { dg-do compile }
+
+// PR c++/13289: Incorrectly reject non-type template argument that has
+// dependent type
+
+template class C {};
+template class D { C c; };
nontype1.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: error5.C
===================================================================
--- error5.C (nonexistent)
+++ error5.C (revision 816)
@@ -0,0 +1,4 @@
+// PR c++/13269
+
+class Foo { int foo() return 0; } }; // { dg-error "" }
+
error5.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: undefined2.C
===================================================================
--- undefined2.C (nonexistent)
+++ undefined2.C (revision 816)
@@ -0,0 +1,12 @@
+// PR c++/9173
+// Origin:
+// { dg-do compile }
+
+class A {};
+
+class B
+{
+ void foo(int,A::X); // { dg-error "" }
+};
+
+void B::foo(int,A::X) {} // { dg-error "" }
undefined2.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: access3.C
===================================================================
--- access3.C (nonexistent)
+++ access3.C (revision 816)
@@ -0,0 +1,14 @@
+// { dg-do compile }
+
+// Origin:
+
+// PR c++/7809: Befriending inaccessible name.
+
+class A {
+private:
+ void f(); // { dg-error "private" }
+};
+
+class B {
+ friend void A::f(); // { dg-error "context" }
+};
access3.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: template19.C
===================================================================
--- template19.C (nonexistent)
+++ template19.C (revision 816)
@@ -0,0 +1,11 @@
+// PR c++/26558
+// Origin: Jan Gorski
+// { dg-do compile }
+
+template struct A
+{
+ template void foo()
+ {
+ foo<0>::; // { dg-error "before" }
+ }
+};
template19.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: crash6.C
===================================================================
--- crash6.C (nonexistent)
+++ crash6.C (revision 816)
@@ -0,0 +1,10 @@
+struct P {};
+
+template
+struct O
+{
+ struct I;
+};
+
+template
+struct O::I::S : P {}; // { dg-error "" }
crash6.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 816)
@@ -0,0 +1,9 @@
+namespace N {
+ template
+ static void f ();
+
+ struct S {
+ friend void N::f ();
+ static void f (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: lookup2.C
===================================================================
--- lookup2.C (nonexistent)
+++ lookup2.C (revision 816)
@@ -0,0 +1,21 @@
+template struct A
+{
+ typedef int X;
+};
+
+template struct B
+{
+ typename A::X x;
+};
+
+template struct C
+{
+ void foo(int);
+ B*> b;
+};
+
+template struct D
+{
+ enum { e };
+ void bar() { C::foo(e); }
+};
lookup2.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: def-tmpl-arg1.C
===================================================================
--- def-tmpl-arg1.C (nonexistent)
+++ def-tmpl-arg1.C (revision 816)
@@ -0,0 +1,9 @@
+// PR c++/8895
+// Origin: Wolfgang Bangerth
+// { dg-do compile }
+
+template > struct A // { dg-error "" }
+{
+ A();
+ A(const A&);
+};
def-tmpl-arg1.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: error16.C
===================================================================
--- error16.C (nonexistent)
+++ error16.C (revision 816)
@@ -0,0 +1,8 @@
+// PR c++/16964
+
+struct A
+{
+ struct B {}; // { dg-error "previous" }
+};
+
+struct A::B{}; // { dg-error "redefinition" }
error16.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: access10.C
===================================================================
--- access10.C (nonexistent)
+++ access10.C (revision 816)
@@ -0,0 +1,13 @@
+// PR c++/18698
+// The compiler was giving an error message for invalid syntax
+// that irrelevantly talked about using-declarations.
+
+template struct A
+{
+ ::A~(); // { dg-bogus "using-declaration" }
+};
+
+// Instead of the bogus error we get 3 separate errors.
+// { dg-error "no type" "" { target *-*-* } 7 }
+// { dg-error "::" "" { target *-*-* } 7 }
+// { dg-error "~" "" { target *-*-* } 7 }
access10.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 816)
@@ -0,0 +1,17 @@
+template
+struct UnaryReturn {
+ typedef T Type_t;
+};
+
+struct foo
+{
+ template
+ typename UnaryReturn::Type_t
+ bar();
+};
+
+template
+struct UnaryReturn {
+ typedef bool Type_t;
+};
+
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: crash22.C
===================================================================
--- crash22.C (nonexistent)
+++ crash22.C (revision 816)
@@ -0,0 +1,25 @@
+// Copyright (C) 2005 Free Software Foundation, Inc.
+// Contributed by Nathan Sidwell 4 Jan 2005
+
+// PR 19030: ICE
+// Origin: Volker Reichelt
+
+struct A; // { dg-error "A" }
+
+namespace N
+{
+ struct A; // { dg-error "A" }
+}
+
+using namespace N;
+
+int A::i; // { dg-error "ambiguous|declared here" "" }
+int A::i; // { dg-error "ambiguous|redefinition of" "" }
+
+namespace N
+{
+ struct C;
+ struct C {};
+}
+
+class D : N::C {};
crash22.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: local1.C
===================================================================
--- local1.C (nonexistent)
+++ local1.C (revision 816)
@@ -0,0 +1,18 @@
+// PR c++/28056
+
+void f1();
+
+namespace N {
+ void f2();
+}
+
+class C {
+ static void f3();
+};
+
+void foo() {
+ void ::f1(); // { dg-error "qualified" }
+ void N::f2(); // { dg-error "qualified" }
+ void C::f3(); // { dg-error "qualified" }
+ void ::f4(); // { dg-error "qualified" }
+}
local1.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: template20.C
===================================================================
--- template20.C (nonexistent)
+++ template20.C (revision 816)
@@ -0,0 +1,7 @@
+// PR c++/28858
+// { dg-do compile }
+
+template 0; // { dg-bogus "" }
+int j = i; // { dg-bogus "" }
template20.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: operator2.C
===================================================================
--- operator2.C (nonexistent)
+++ operator2.C (revision 816)
@@ -0,0 +1,15 @@
+// PR c++/7906
+// Origin: Marcel Loose
+// { dg-do compile }
+
+template struct A { typedef int X; };
+
+template struct B
+{
+ typedef A Y;
+ struct C { operator typename Y::X() const; };
+};
+
+template B::C::operator typename B::Y::X() const { return 0; }
+
+B b;
operator2.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: namespace2.C
===================================================================
--- namespace2.C (nonexistent)
+++ namespace2.C (revision 816)
@@ -0,0 +1,15 @@
+/* PR c++/2537 */
+/* { dg-do compile } */
+
+// Used to have namespace name/identifier conflict, prior to 3.4.
+
+namespace baz {}
+
+namespace foo
+ {
+ struct bar
+ {
+ unsigned baz:1;
+ };
+ }
+
namespace2.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: struct-2.C
===================================================================
--- struct-2.C (nonexistent)
+++ struct-2.C (revision 816)
@@ -0,0 +1,7 @@
+// Origin: Volker Reichelt
+// PR c++/18731
+
+template struct A
+{
+ struct T::B {}; // { dg-error "invalid class name" }
+};
struct-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: qualified2.C
===================================================================
--- qualified2.C (nonexistent)
+++ qualified2.C (revision 816)
@@ -0,0 +1,4 @@
+namespace Glib {
+ template class Value {};
+ template <> class Glib::Value {}; // { dg-error "" }
+}
qualified2.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: typedef6.C
===================================================================
--- typedef6.C (nonexistent)
+++ typedef6.C (revision 816)
@@ -0,0 +1,6 @@
+// PR c++/14667
+
+template
+class Class1;
+
+class Class2 {} typedef Class1 Type1; // { dg-error "" }
typedef6.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 816)
@@ -0,0 +1,9 @@
+class L {
+public:
+ L(int);
+};
+
+class R {
+ friend L::L(int);
+};
+
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: pragma3.C
===================================================================
--- pragma3.C (nonexistent)
+++ pragma3.C (revision 816)
@@ -0,0 +1,26 @@
+// PR c++/25294
+// { dg-do run }
+
+extern "C" void abort (void);
+
+struct S
+{
+ char a[3];
+#pragma pack(1) /* A block comment
+ that ends on the next line. */
+ struct T
+ {
+ char b;
+ int c;
+ } d;
+#pragma pack /*/ */ () // C++ comment
+ int e;
+} s;
+
+int
+main ()
+{
+ if (sizeof (int) == 4 && sizeof (s) != 12)
+ abort ();
+ return 0;
+}
pragma3.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 816)
@@ -0,0 +1,7 @@
+namespace N {
+ template < typename T > class C : T {};
+}
+
+int main() {
+ N::C(); // { dg-error "template" }
+}
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: dtor6.C
===================================================================
--- dtor6.C (nonexistent)
+++ dtor6.C (revision 816)
@@ -0,0 +1,8 @@
+// PR c++/25638
+
+struct A { ~A(); }; // { dg-error "candidate" }
+
+struct B : A
+{
+ template friend A::~A(); // { dg-error "match" }
+};
dtor6.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: tmpl-tmpl-operator1.C
===================================================================
--- tmpl-tmpl-operator1.C (nonexistent)
+++ tmpl-tmpl-operator1.C (revision 816)
@@ -0,0 +1,20 @@
+// PR c++/8857
+// Origin: Martin v. Loewis
+// { dg-do compile }
+
+template struct A
+{
+ template operator U() { return sizeof(U); }
+};
+
+template struct B
+{
+ template class X> operator X() { return X(); }
+};
+
+int main()
+{
+ A a;
+ B b;
+ a = b;
+}
tmpl-tmpl-operator1.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: error25.C
===================================================================
--- error25.C (nonexistent)
+++ error25.C (revision 816)
@@ -0,0 +1,17 @@
+// { dg-do compile }
+// Origin: Steven Bosscher
+// PR c++/17401: ICE with invalid pure specifier
+
+// NOTE: This also tests QoI of diagnostic for invalid pure specifiers.
+// Please do *not* relax the dg-error tests.
+
+class foo
+{
+ virtual void bar1 () = 0;
+ virtual void bar2 () = __null; // { dg-error "invalid pure specifier" }
+ virtual void bar3 () = 4; // { dg-error "invalid pure specifier" }
+ virtual void bar4 () = A::f; // { dg-error "invalid pure specifier" }
+ virtual void bar5 () = 0l; // { dg-error "invalid pure specifier" }
+ virtual void bar6 () = 00; // { dg-error "invalid pure specifier" }
+ virtual void bar7 () = 0x0; // { dg-error "invalid pure specifier" }
+};
error25.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: parse6.C
===================================================================
--- parse6.C (nonexistent)
+++ parse6.C (revision 816)
@@ -0,0 +1,31 @@
+/* PR c++/3012 */
+/* { dg-do compile } */
+
+class A
+{
+ public:
+
+ template
+ void foo() const
+ {
+ }
+};
+
+template
+class B
+{
+ public:
+
+ void bar(const A& a) const
+ {
+ // Compile used to fail with parse error before `;' token
+ a.foo();
+ }
+};
+
+int main()
+{
+ A a;
+ B b;
+ b.bar(a);
+}
parse6.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: offsetof6.C
===================================================================
--- offsetof6.C (nonexistent)
+++ offsetof6.C (revision 816)
@@ -0,0 +1,19 @@
+/* { dg-do compile } */
+
+// From PR28573
+
+struct A
+{
+ char d[44];
+ char &operator [] ( int indx ) { return d[indx]; }
+};
+
+struct B
+{
+ A a;
+};
+
+int main()
+{
+ return __builtin_offsetof(B, a[0]); /* { dg-error "cannot apply.*offsetof" } */
+}
offsetof6.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: casting-operator1.C
===================================================================
--- casting-operator1.C (nonexistent)
+++ casting-operator1.C (revision 816)
@@ -0,0 +1,11 @@
+// PR c++/8578
+// Origin:
+// { dg-do compile }
+
+template struct A
+{
+ typedef typename T::X X;
+ operator X();
+};
+
+template A::operator typename A::X () {}
casting-operator1.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: crash31.C
===================================================================
--- crash31.C (nonexistent)
+++ crash31.C (revision 816)
@@ -0,0 +1,9 @@
+struct A
+{ // { dg-error "forward declaration" }
+ A : A; // { dg-error "expected|incomplete" }
+ A : B; // { dg-error "not declared|incomplete" }
+ A : A(); // { dg-error "undefined type|incomplete" }
+ A : B(); // { dg-error "function call|incomplete" }
+ A : A[]; // { dg-error "expected|array reference|incomplete" }
+ A : B[]; // { dg-error "not declared|expected|array reference|incomplete" }
+};
crash31.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: bitfield2.C
===================================================================
--- bitfield2.C (nonexistent)
+++ bitfield2.C (revision 816)
@@ -0,0 +1,34 @@
+//PR c++/28053
+
+struct X {};
+
+struct A
+{
+ X x : 2; // { dg-error "non-integral type" }
+};
+struct B : A {};
+
+template
+struct C
+{
+ T t : 3;
+};
+
+C c;
+
+template
+struct D
+{
+ T t : 3; // { dg-error "non-integral type" }
+};
+
+D d; // { dg-error "instantiated" }
+
+template
+struct E
+{
+ typedef T* U;
+ U t : 3; // { dg-error "non-integral type" }
+};
+
+E e;
bitfield2.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: crash14.C
===================================================================
--- crash14.C (nonexistent)
+++ crash14.C (revision 816)
@@ -0,0 +1,20 @@
+// { dg-do compile }
+// Contributed by: Giovanni Bajo
+// PR c++/14448: Fold constant initializers in templates
+
+template struct A
+{
+ A();
+};
+
+
+template void foo(T)
+{
+ static const int n=1+1;
+ A a;
+}
+
+void bar()
+{
+ foo(0);
+}
crash14.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: redef1.C
===================================================================
--- redef1.C (nonexistent)
+++ redef1.C (revision 816)
@@ -0,0 +1,10 @@
+// { dg-options "" }
+// PR c++/16193
+
+# 1 "syshdr1.C"
+# 1 "syshdr1.h" 1 3
+// Redefinitions of built-in types are allowed in system headers so
+// that G++ will work with system headers that are not fully
+// C++-aware.
+typedef long wchar_t;
+# 2 "syshdr1.C" 2
redef1.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: dot1.C
===================================================================
--- dot1.C (nonexistent)
+++ dot1.C (revision 816)
@@ -0,0 +1,4 @@
+// PR c++/24560
+
+struct A { void f(); };
+void g() { A().f.a; } // { dg-error "class" }
dot1.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: constant1.C
===================================================================
--- constant1.C (nonexistent)
+++ constant1.C (revision 816)
@@ -0,0 +1,13 @@
+void f () {
+ switch (0) {
+ case (3, 0): // { dg-error "" }
+ break;
+ }
+}
+
+int g ();
+
+struct S {
+ int i : (false ? g () : 1); // { dg-error "" }
+};
+
constant1.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: typespec1.C
===================================================================
--- typespec1.C (nonexistent)
+++ typespec1.C (revision 816)
@@ -0,0 +1,4 @@
+// PR c++/26571
+
+struct A {};
+unsigned A a; // { dg-error "multiple" }
typespec1.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: template12.C
===================================================================
--- template12.C (nonexistent)
+++ template12.C (revision 816)
@@ -0,0 +1,10 @@
+template
+struct A {
+};
+
+struct B {
+ template
+ struct C : public A {};
+
+ typedef double I;
+};
template12.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: defarg6.C
===================================================================
--- defarg6.C (nonexistent)
+++ defarg6.C (revision 816)
@@ -0,0 +1,11 @@
+// { dg-do compile }
+
+// Origin: Falk Hueffner
+
+// PR c++/13166: ICE default function argument for friend declaration.
+
+namespace sc_dt {
+ class sc_length_param {
+ friend int compare_unsigned(int if_v_signed = 0) {}
+ };
+}
defarg6.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: error6.C
===================================================================
--- error6.C (nonexistent)
+++ error6.C (revision 816)
@@ -0,0 +1,6 @@
+// PR c++/10603
+
+int f(int not) { // { dg-error "!" }
+ return 1-not; // { dg-error "" }
+}
+
error6.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: undefined3.C
===================================================================
--- undefined3.C (nonexistent)
+++ undefined3.C (revision 816)
@@ -0,0 +1,6 @@
+// PR c++/5657
+// Origin: Volker Reichelt
+// { dg-do compile }
+
+template struct A { A(B); };
+template A::A(B) {} // { dg-error "" }
undefined3.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: access4.C
===================================================================
--- access4.C (nonexistent)
+++ access4.C (revision 816)
@@ -0,0 +1,20 @@
+// { dg-do compile }
+
+// Origin: Mike Reed
+
+// PR c++/11174: Access checking of pointer-to-member function
+
+class A {
+protected:
+ void foo() {} // { dg-error "protected" }
+public:
+ A();
+};
+
+class B : public A {
+ void bar() {
+ A a;
+ void (A::*pmf)() = &A::foo; // { dg-error "this context" }
+ (a.*pmf)();
+ }
+};
access4.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: crash7.C
===================================================================
--- crash7.C (nonexistent)
+++ crash7.C (revision 816)
@@ -0,0 +1,10 @@
+struct A
+{
+ int foo () const { return 0; }
+};
+
+template void bar (int x[], const A &a)
+{
+ const int i=a.foo();
+ x[i]=0;
+}
crash7.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: friend2.C
===================================================================
--- friend2.C (nonexistent)
+++ friend2.C (revision 816)
@@ -0,0 +1,16 @@
+// { dg-do compile }
+// Origin:
+
+// PR c++/8591
+// Template or class detection in friend declaration
+
+namespace NS {
+ template
+ struct C {};
+}
+
+template class X {
+ friend class NS::C; // { dg-error "template|friend" }
+};
+
+X c;
friend2.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: lookup3.C
===================================================================
--- lookup3.C (nonexistent)
+++ lookup3.C (revision 816)
@@ -0,0 +1,12 @@
+struct X {};
+
+template
+struct Base {
+ static void foo () {
+ X::NONEXISTENT (); // { dg-error "" }
+ }
+};
+
+int main () {
+ Base<2>::foo ();
+}
lookup3.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-ctor1.C
===================================================================
--- attr-ctor1.C (nonexistent)
+++ attr-ctor1.C (revision 816)
@@ -0,0 +1,9 @@
+// PR c++/6992
+// Origin:
+// { dg-do compile }
+// { dg-require-named-sections "" }
+
+class A
+{
+ __attribute__((section("whatever"))) A();
+};
attr-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: error17.C
===================================================================
--- error17.C (nonexistent)
+++ error17.C (revision 816)
@@ -0,0 +1,8 @@
+// PR c++/16965
+
+template struct B {
+ static int Bar(T); // { dg-error "" }
+};
+struct D : B, B {};
+
+int i2 = D::Bar(2); // { dg-error "" }
error17.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: typename3.C
===================================================================
--- typename3.C (nonexistent)
+++ typename3.C (revision 816)
@@ -0,0 +1,8 @@
+template
+struct D2 : public T::B {
+ typedef typename T::X::Y Y;
+
+ void f () {
+ Y::f ();
+ }
+};
typename3.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: crash23.C
===================================================================
--- crash23.C (nonexistent)
+++ crash23.C (revision 816)
@@ -0,0 +1,12 @@
+// PR c++/19733
+
+struct A {};
+typedef int I;
+void foo() {
+ A().~A; // { dg-error "" }
+ A().A::~A; // { dg-error "" }
+ (int().I::~I, 3); // { dg-error "" }
+ int().I::~I; // { dg-error "" }
+}
+
+
crash23.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: tmpl-outside1.C
===================================================================
--- tmpl-outside1.C (nonexistent)
+++ tmpl-outside1.C (revision 816)
@@ -0,0 +1,10 @@
+// PR c++/3792
+// Origin:
+// { dg-do compile }
+
+struct X
+{
+ template struct Y {};
+};
+
+typedef X::template Y<0> y; // { dg-error "template|invalid" }
tmpl-outside1.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: dtor10.C
===================================================================
--- dtor10.C (nonexistent)
+++ dtor10.C (revision 816)
@@ -0,0 +1,9 @@
+// PR c++/27508
+// { dg-do compile }
+
+namespace N
+{
+ struct A { ~A(); };
+}
+
+N::~A () {} // { dg-error "not a class-name" }
dtor10.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: comma1.C
===================================================================
--- comma1.C (nonexistent)
+++ comma1.C (revision 816)
@@ -0,0 +1,14 @@
+// PR c++/14278
+// { dg-options "" }
+
+struct X {
+ X (int p);
+};
+
+struct A {
+ A(X);
+};
+
+void *p_fun;
+
+A a(X ((*(int (*)(int, int)) p_fun)(0, 0)));
comma1.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: template21.C
===================================================================
--- template21.C (nonexistent)
+++ template21.C (revision 816)
@@ -0,0 +1,5 @@
+// PR c++/28211
+
+template class Helper { };
+const int foo = 0;
+typedef Helper<&foo> HelperType; // { dg-error "linkage|type" }
template21.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: int-as-enum1.C
===================================================================
--- int-as-enum1.C (nonexistent)
+++ int-as-enum1.C (revision 816)
@@ -0,0 +1,6 @@
+// PR c++/4207
+// Origin:
+// { dg-do compile }
+
+typedef int A; // { dg-error "previous" }
+enum ::A {}; // { dg-error "typedef-name|expected unqualified-id" }
int-as-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: operator3.C
===================================================================
--- operator3.C (nonexistent)
+++ operator3.C (revision 816)
@@ -0,0 +1,11 @@
+// PR c++/9454
+// Origin: Wolfgang Bangerth
+// { dg-do compile }
+
+template struct A
+{
+ struct B { operator int (); };
+ struct C : B { operator int (); };
+};
+
+A<0> a;
operator3.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: primary-expression-1.C
===================================================================
--- primary-expression-1.C (nonexistent)
+++ primary-expression-1.C (revision 816)
@@ -0,0 +1,58 @@
+// Copyright (C) 2002 Free Software Foundation
+// Origin: C++/717
+// Contributed by Gabriel Dos Reis
+class _eSeq
+{
+public:
+ _eSeq(const X thing){}
+ int _oHash() {return 0;}
+ _eSeq _oPlusPlus(const _eSeq other) const
+ {
+ return *this;
+ }
+ _eSeq take(const _eSeq other) const
+ {
+ return *this;
+ }
+};
+
+
+template
+class _eHndl
+{
+public:
+ _eHndl(const _eAny *obj){}
+};
+
+class VarInstances : public _eAny
+{
+public:
+ VarInstances() : _eAny() {}
+};
+
+void testFunc(const VarInstances *testInstance)
+{
+ const _eSeq<_eHndl > temp1 =
+ _eSeq<_eHndl >(_eHndl(testInstance));
+
+ if((_eSeq<_eHndl
+ >(_eHndl(testInstance))._oPlusPlus(temp1)._oHash() ==
+ 7))
+ {
+ return;
+ }
+}
+
+int main(int argc, char** argv)
+{
+ testFunc(new VarInstances());
+}
primary-expression-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: namespace3.C
===================================================================
--- namespace3.C (nonexistent)
+++ namespace3.C (revision 816)
@@ -0,0 +1,12 @@
+/* PR c+/3816 */
+/* { dg-do compile } */
+namespace A {}
+
+namespace OtherNamespace {
+
+ typedef struct {
+ int member;
+ } A; // used to conflict with A namespace
+
+} // end of namespace
+
namespace3.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: octal1.C
===================================================================
--- octal1.C (nonexistent)
+++ octal1.C (revision 816)
@@ -0,0 +1 @@
+int i = 08; // { dg-error "" }
octal1.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: conv_op1.C
===================================================================
--- conv_op1.C (nonexistent)
+++ conv_op1.C (revision 816)
@@ -0,0 +1,30 @@
+
+// { dg-do compile }
+
+// Copyright (C) 2002 Free Software Foundation, Inc.
+// Contributed by Nathan Sidwell 21 Dec 2002
+
+// PR 8572. ICE with templated conversion operators.
+
+template struct A
+{
+ struct B { };
+ operator B* () const;
+ B *Foo ();
+};
+
+template typename A::B *A::Foo ()
+{
+ return 0;
+}
+
+template A::operator typename A::B* () const
+{
+ return 0;
+}
+
+void Foo (A &p)
+{
+ p.Foo ();
+ static_cast ::B *> (p);
+}
conv_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: struct-3.C
===================================================================
--- struct-3.C (nonexistent)
+++ struct-3.C (revision 816)
@@ -0,0 +1,10 @@
+// Origin: Volker Reichelt
+// PR c++/18731
+
+struct A
+{
+ struct B;
+ typedef B C;
+};
+
+struct A::C {}; // { dg-error "invalid class name" }
struct-3.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: qualified3.C
===================================================================
--- qualified3.C (nonexistent)
+++ qualified3.C (revision 816)
@@ -0,0 +1,8 @@
+// PR c++/18466
+
+int ::i; // { dg-error "" }
+void ::f(); // { dg-error "" }
+namespace N {
+ int N::j; // { dg-error "" }
+ void N::g(); // { dg-error "" }
+}
qualified3.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: extern1.C
===================================================================
--- extern1.C (nonexistent)
+++ extern1.C (revision 816)
@@ -0,0 +1,14 @@
+// PR c++/21495
+// { dg-do compile }
+
+class A
+{
+ extern void *copy (void) // { dg-error "storage class specified" }
+ {
+ return 0;
+ }
+ extern A &operator= (const A &) // { dg-error "storage class specified" }
+ {
+ return *this;
+ }
+};
extern1.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: class1.C
===================================================================
--- class1.C (nonexistent)
+++ class1.C (revision 816)
@@ -0,0 +1,10 @@
+namespace N
+{
+ struct A;
+ int f() {
+ struct N::A { // { dg-error "" }
+ A() {}
+ };
+ return 0;
+ }
+}
class1.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: typedef7.C
===================================================================
--- typedef7.C (nonexistent)
+++ typedef7.C (revision 816)
@@ -0,0 +1,2 @@
+// PR c++/18285
+typedef void int char void double X; // { dg-error "" }
typedef7.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: concat1.C
===================================================================
--- concat1.C (nonexistent)
+++ concat1.C (revision 816)
@@ -0,0 +1,15 @@
+/* PR c/3581 */
+/* { dg-do compile } */
+
+/* Intended as a compile-time test for string literal concatenation.
+ The fact that the string isn't actually used in the resulting program
+ should allow this to compile for any target. */
+
+#define e0 "a"
+#define e1 e0 e0 e0 e0 e0 e0 e0 e0 e0 e0
+#define e2 e1 e1 e1 e1 e1 e1 e1 e1 e1 e1
+#define e3 e2 e2 e2 e2 e2 e2 e2 e2 e2 e2
+#define e4 e3 e3 e3 e3 e3 e3 e3 e3 e3 e3
+#define e5 e4 e4 e4 e4 e4 e4 e4 e4 e4 e4
+
+void foo() { (void)(e5); }
concat1.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: ctor2.C
===================================================================
--- ctor2.C (nonexistent)
+++ ctor2.C (revision 816)
@@ -0,0 +1,4 @@
+// PR c++/19244
+
+typedef struct { void f(); } f;
+void f::f() { }
ctor2.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: defarg10.C
===================================================================
--- defarg10.C (nonexistent)
+++ defarg10.C (revision 816)
@@ -0,0 +1,11 @@
+// Copyright (C) 2005 Free Software Foundation, Inc.
+// Contributed by Nathan Sidwell 7 Jun 2005
+
+// From java library.
+
+void Foo (int = 0);
+
+class Klasse
+{
+ friend void Foo (int);
+};
defarg10.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 816)
@@ -0,0 +1,17 @@
+// { dg-do compile }
+
+// Copyright (C) 2003 Free Software Foundation, Inc.
+// Contributed by Nathan Sidwell 24 Jan 2003
+
+// PR 9403. We failed to parse template keyword, and we accepted code
+// which required one.
+
+template struct Outer;
+
+template
+struct X : Outer::template Inner
+{};
+
+template
+struct Y : Outer::Inner {}; // { dg-error "" "" }
+
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: dtor7.C
===================================================================
--- dtor7.C (nonexistent)
+++ dtor7.C (revision 816)
@@ -0,0 +1,4 @@
+// PR c++/25856
+
+struct A; // { dg-error "forward" }
+A::~A() {} // { dg-error "incomplete" }
dtor7.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: ambig1.C
===================================================================
--- ambig1.C (nonexistent)
+++ ambig1.C (revision 816)
@@ -0,0 +1,12 @@
+// { dg-do compile }
+
+// Copyright (C) 2003 Free Software Foundation, Inc.
+// Contributed by Nathan Sidwell 4 Jan 2003
+
+// PR 9109. Ambiguity. [dcl.ambig.res]/7
+
+template void Foo (int (T))
+{
+ try {}
+ catch (int (T)) {}
+}
ambig1.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: parse7.C
===================================================================
--- parse7.C (nonexistent)
+++ parse7.C (revision 816)
@@ -0,0 +1,24 @@
+/* PR c++/3650 */
+/* { dg-do compile } */
+
+class class1 {
+public:
+ explicit class1(double a) { data = a; }
+ double data;
+};
+
+class class2 {
+public:
+ class2(class1 a, float t) { }
+ class2(float t, class1 a) { }
+};
+
+int main() {
+ float t2 = 1.5;
+ double pir = 3.14159;
+ // Used to get: error: type specifier omitted for parameter `t2'
+ class2 h(class1(double(pir)), t2);
+ class2 i(class1(pir), t2);
+
+ return 0;
+}
parse7.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: error26.C
===================================================================
--- error26.C (nonexistent)
+++ error26.C (revision 816)
@@ -0,0 +1,12 @@
+// PR c++/20148
+// { dg-options "" }
+
+void foo()
+{
+ if (({int c[2];})) ; // { dg-error "\{\.\.\.\}" }
+}
+
+void bar()
+{
+ if (({})); // { dg-error "\{\.\.\.\}" }
+}
error26.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: offsetof7.C
===================================================================
--- offsetof7.C (nonexistent)
+++ offsetof7.C (revision 816)
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+
+// From PR28573
+
+struct A
+{
+ int operator [] ( int indx ) { return indx; }
+};
+
+struct B
+{
+ A a;
+};
+
+int main()
+{
+ return __builtin_offsetof(B, a[0]); /* { dg-error "cannot apply.*offsetof" } */
+}
offsetof7.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: condexpr1.C
===================================================================
--- condexpr1.C (nonexistent)
+++ condexpr1.C (revision 816)
@@ -0,0 +1,13 @@
+// PR c++/10247
+// Origin: Lars Gullik Bjønes
+// { dg-do compile }
+
+struct A {};
+
+A const foo();
+
+void bar()
+{
+ A a = foo();
+ A b = true ? a : foo();
+}
condexpr1.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: casting-operator2.C
===================================================================
--- casting-operator2.C (nonexistent)
+++ casting-operator2.C (revision 816)
@@ -0,0 +1,27 @@
+// { dg-do compile }
+// Contributed by Martin Loewis
+// PR c++/8856: Make sure template conversion operators are not parsed as
+// template names.
+
+struct K {};
+template struct K2 {};
+
+template struct A {
+ template operator U() { return U(); }
+};
+
+int main() {
+ A a;
+
+ (void)a.operator int();
+ (void)a.operator double();
+ (void)a.operator K2();
+ (void)a.A::operator int();
+ (void)a.A::operator double();
+ (void)a.A::operator K2();
+
+ (void)a.operator double(); // { dg-error "not a template" }
+ (void)a.operator K(); // { dg-error "not a template" }
+ (void)a.A::operator double(); // { dg-error "not a template" }
+ (void)a.A::operator K(); // { dg-error "not a template" }
+}
casting-operator2.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: crash32.C
===================================================================
--- crash32.C (nonexistent)
+++ crash32.C (revision 816)
@@ -0,0 +1,13 @@
+// { dg-do compile }
+struct Visitor;
+
+struct Ast
+{
+ virtual void accept (Visitor& v);
+};
+
+void
+Ast::accept (Visitor& v)
+{
+ v (*this); // { dg-error "no match for call" "" }
+}
crash32.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: crash15.C
===================================================================
--- crash15.C (nonexistent)
+++ crash15.C (revision 816)
@@ -0,0 +1,9 @@
+// { dg-do compile }
+
+// Copyright (C) 2001 Free Software Foundation, Inc.
+// Contributed by Nathan Sidwell 29 Jun 2004
+
+// Origin: Volker Reichelt
+// Bug 16260. ICE
+
+template int foo() { return T::X::Y; }
crash15.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: constructor1.C
===================================================================
--- constructor1.C (nonexistent)
+++ constructor1.C (revision 816)
@@ -0,0 +1,4 @@
+ACE_Process_Descriptor::ACE_Process_Descriptor () : // { dg-error "" }
+ process_ (0)
+{
+}
constructor1.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: array-size1.C
===================================================================
--- array-size1.C (nonexistent)
+++ array-size1.C (revision 816)
@@ -0,0 +1,13 @@
+// PR c++/38
+// Origin: Wolfgang Bangerth
+// { dg-do compile }
+
+template struct A
+{
+ static const int n = 1;
+ typedef double X[n];
+
+ A (const X&);
+};
+
+template A::A (const X&) {}
array-size1.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: fused-params1.C
===================================================================
--- fused-params1.C (nonexistent)
+++ fused-params1.C (revision 816)
@@ -0,0 +1,12 @@
+// PR c++/8785
+// Origin: Alexander Zvyagin
+// { dg-do compile }
+
+template struct A
+{ // { dg-error "" }
+ typedef T X;
+ template void foo (const A&);
+};
+
+template
+void A::foo (const A&) {} // { dg-error "" }
fused-params1.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: constant2.C
===================================================================
--- constant2.C (nonexistent)
+++ constant2.C (revision 816)
@@ -0,0 +1,28 @@
+// { dg-do compile }
+// Origin:
+// PR c++/10750: error when using a static const member initialized
+// with a dependent expression as constant-expression
+
+struct A
+{
+ enum { a = 42 };
+};
+
+template
+struct B
+{
+ static const int b = Q::a;
+};
+
+template class P>
+struct C
+{
+ static const bool a = T::a;
+ static const bool a_ = a;
+ static const bool b = P::b;
+ static const bool b_ = b;
+ static const int c = sizeof(T);
+ static const int c_ = c;
+};
+
+template struct C;
constant2.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: dce1.C
===================================================================
--- dce1.C (nonexistent)
+++ dce1.C (revision 816)
@@ -0,0 +1,13 @@
+/* Make sure that dead code isn't eliminated too early, avoiding
+ detection of errors. */
+/* { dg-do compile } */
+
+void foo(void)
+{
+ if (0)
+ break; /* { dg-error "" } */
+ if (1)
+ ;
+ else
+ continue; /* { dg-error "" } */
+}
dce1.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: local-class1.C
===================================================================
--- local-class1.C (nonexistent)
+++ local-class1.C (revision 816)
@@ -0,0 +1,14 @@
+ // Copyright (C) 2005 Free Software Foundation, Inc.
+// Contributed by Nathan Sidwell 14 Feb 2005
+
+// Origin: Jorn Wolfgang Rennecke
+// Bug 19608: ICE on invalid
+
+
+void f ()
+{
+ class c
+ {
+ friend void g () { } // { dg-error "local class definition" "" }
+ };
+}
local-class1.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: defarg7.C
===================================================================
--- defarg7.C (nonexistent)
+++ defarg7.C (revision 816)
@@ -0,0 +1,5 @@
+// PR c++/14361
+
+class A {
+ A ( int n=0 int n ); // { dg-error "" }
+};
defarg7.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: template13.C
===================================================================
--- template13.C (nonexistent)
+++ template13.C (revision 816)
@@ -0,0 +1,10 @@
+// PR c++/14002
+
+template void foo (T x) { x; }
+
+void bar() { foo(0); }
+
+struct A
+{
+ friend void foo (int);
+};
template13.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: error7.C
===================================================================
--- error7.C (nonexistent)
+++ error7.C (revision 816)
@@ -0,0 +1,4 @@
+// PR c++/12827
+
+void f(int x
+ int y); // { dg-error "," }
error7.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: typename10.C
===================================================================
--- typename10.C (nonexistent)
+++ typename10.C (revision 816)
@@ -0,0 +1,8 @@
+// PR c++/19253
+
+namespace N { struct X; }
+
+template struct A
+{
+ A a; // { dg-error "invalid" }
+};
typename10.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: ptrmem1.C
===================================================================
--- ptrmem1.C (nonexistent)
+++ ptrmem1.C (revision 816)
@@ -0,0 +1,10 @@
+struct A {
+ void f(int = 0) const;
+};
+
+typedef void (A::*PF)(int) const;
+
+void f()
+{
+ PF pf = &A::f;
+}
ptrmem1.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: undefined4.C
===================================================================
--- undefined4.C (nonexistent)
+++ undefined4.C (revision 816)
@@ -0,0 +1,11 @@
+// PR c++/5665
+// Origin: Bergur Ragnarsson
+// Reduced version: Volker Reichelt
+// { dg-do compile }
+
+template class A
+{
+ class B { X foo(); }; // { dg-error "" }
+};
+
+template X A::B::foo() {} // { dg-error "" }
undefined4.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: access5.C
===================================================================
--- access5.C (nonexistent)
+++ access5.C (revision 816)
@@ -0,0 +1,18 @@
+// { dg-do compile }
+
+// Origin: Giovanni Bajo
+
+// PR c++/11174: Access checking on pointer to member data.
+
+struct A
+{
+protected:
+ int a; // { dg-error "protected" }
+};
+
+struct B : A
+{
+ void foo() {
+ (void)&A::a; // { dg-error "this context" }
+ }
+};
access5.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: friend3.C
===================================================================
--- friend3.C (nonexistent)
+++ friend3.C (revision 816)
@@ -0,0 +1,10 @@
+// { dg-do compile }
+//
+// PR 11553 catch duplicate friend specifiers
+
+struct S
+{
+ friend friend class C; // { dg-error "duplicate" }
+};
+
+
friend3.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: error10.C
===================================================================
--- error10.C (nonexistent)
+++ error10.C (revision 816)
@@ -0,0 +1,15 @@
+// PR c++/3478
+// { dg-options "" }
+
+template struct A
+{
+ enum E {};
+};
+
+template void foo()
+{
+ enum A::E e1;
+ typename A::E e2;
+ enum A::E e3;
+ enum typename A::E e4; // { dg-error "" }
+}
error10.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: lookup4.C
===================================================================
--- lookup4.C (nonexistent)
+++ lookup4.C (revision 816)
@@ -0,0 +1,7 @@
+// PR c++/16637
+
+typedef int I;
+
+struct S {
+ ::I I;
+};
lookup4.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: error18.C
===================================================================
--- error18.C (nonexistent)
+++ error18.C (revision 816)
@@ -0,0 +1,7 @@
+// PR c++/16002
+
+void f()
+{
+ double Q *= 5.0; // { dg-error "initializer" }
+}
+
error18.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: crash24.C
===================================================================
--- crash24.C (nonexistent)
+++ crash24.C (revision 816)
@@ -0,0 +1,6 @@
+// PR c++/20461
+// { dg-do compile }
+
+class C; // { dg-error "forward declaration" }
+
+C::C() : f() {} // { dg-error "invalid use|does not have" }
crash24.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: typename4.C
===================================================================
--- typename4.C (nonexistent)
+++ typename4.C (revision 816)
@@ -0,0 +1,7 @@
+// { dg-do compile }
+
+// Origin: Christian Ehrhardt
+
+// PR c++/9364: ICE processing typename with name error.
+
+void find(typename int&); // { dg-error "typename|void|expected" }
typename4.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 816)
@@ -0,0 +1,7 @@
+struct T; // { dg-error "forward" }
+T* manage(T* t);
+template struct ObjectSlot0_ {
+ void create() {
+ void* tmp = manage(new T()); // { dg-error "incomplete" }
+ }
+};
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: dtor11.C
===================================================================
--- dtor11.C (nonexistent)
+++ dtor11.C (revision 816)
@@ -0,0 +1,12 @@
+// PR c++/28606
+// { dg-do compile }
+
+struct A
+{
+ ~A A(); // { dg-error "destructor" }
+};
+
+struct B
+{
+ A::~B B(); // { dg-error "as member of" }
+};
dtor11.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: comma2.C
===================================================================
--- comma2.C (nonexistent)
+++ comma2.C (revision 816)
@@ -0,0 +1,19 @@
+// { dg-do compile }
+
+// Copyright (C) 2005 Free Software Foundation, Inc.
+
+// PR c++/24907 [3.4/4.0/4.1/4.2 Regression] "int x, ;" accepted
+
+int x;
+int y,; /* { dg-error "expected" } */
+
+int main()
+{
+ int a;
+ int b,; /* { dg-error "expected" } */
+ int c,d;
+ int e,f,; /* { dg-error "expected" } */
+ int g,h,i;
+ int j,k,l,;/* { dg-error "expected" } */
+ int m,,,n; /* { dg-error "expected" } */
+}
comma2.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: operator4.C
===================================================================
--- operator4.C (nonexistent)
+++ operator4.C (revision 816)
@@ -0,0 +1 @@
+int operator *(int, ...); // { dg-error "class|variable number of arguments" }
operator4.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: namespace4.C
===================================================================
--- namespace4.C (nonexistent)
+++ namespace4.C (revision 816)
@@ -0,0 +1,18 @@
+/* PR c++/4652 */
+/* { dg-do compile } */
+/* Another conflict between namespace IDs and other things. */
+
+namespace A { }
+
+class B {
+
+ struct {
+ int x;
+ } A;
+
+};
+
+int main() {
+ B b;
+ return 0;
+}
namespace4.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: saved1.C
===================================================================
--- saved1.C (nonexistent)
+++ saved1.C (revision 816)
@@ -0,0 +1,6 @@
+// Test that the parser doesn't go into an infinite loop from ignoring the
+// PRE_PARSED_FUNCTION_DECL token.
+
+class C { static void* operator new(size_t); }; // { dg-error "" "" }
+void* C::operator new(size_t) { return 0; } // { dg-error "" "" }
+class D { D(int i): integer(i){}}; // { dg-error "" "" }
saved1.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: qualified4.C
===================================================================
--- qualified4.C (nonexistent)
+++ qualified4.C (revision 816)
@@ -0,0 +1,6 @@
+// PR c++/16782
+// { dg-options "" }
+
+struct X {
+ void X::bar() {} // { dg-error "" }
+};
qualified4.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: class2.C
===================================================================
--- class2.C (nonexistent)
+++ class2.C (revision 816)
@@ -0,0 +1,14 @@
+// PR c++/13140
+
+struct foo {
+ foo();
+ void f();
+ static int i;
+};
+
+
+namespace bar {
+ foo::foo() {} // { dg-error "namespace" }
+ void foo::f() {} // { dg-error "namespace" }
+ int foo::i; // { dg-error "namespace" }
+}
class2.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: typedef8.C
===================================================================
--- typedef8.C (nonexistent)
+++ typedef8.C (revision 816)
@@ -0,0 +1,11 @@
+//PR c++ 29024
+
+typedef static int a; // { dg-error "conflicting" }
+typedef register int b; // { dg-error "conflicting" }
+typedef extern int c; // { dg-error "conflicting" }
+static typedef int a; // { dg-error "conflicting" }
+
+int foo()
+{
+ typedef auto int bar; // { dg-error "conflicting" }
+}
typedef8.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: ctor3.C
===================================================================
--- ctor3.C (nonexistent)
+++ ctor3.C (revision 816)
@@ -0,0 +1,8 @@
+// PR c++/25633
+
+struct A {};
+
+struct B : A
+{
+ B() : A {} // { dg-error "expected" }
+};
ctor3.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: defarg11.C
===================================================================
--- defarg11.C (nonexistent)
+++ defarg11.C (revision 816)
@@ -0,0 +1,9 @@
+// { dg-do compile }
+// { dg-options "-pedantic" }
+
+class foo {
+public:
+ void operator& (int = 1); // { dg-error "default argument" }
+ void operator++ (int = 2); // { dg-error "default argument" }
+ void operator-- (int = 3); // { dg-error "default argument" }
+};
defarg11.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-type1.C
===================================================================
--- ret-type1.C (nonexistent)
+++ ret-type1.C (revision 816)
@@ -0,0 +1,10 @@
+// PR c++/2738
+// Origin: Wolfgang Bangerth
+// { dg-do compile }
+
+template class A
+{
+ class C { C(); };
+};
+
+template void A::C::C () {} // { dg-error "return type" }
ret-type1.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: ref1.C
===================================================================
--- ref1.C (nonexistent)
+++ ref1.C (revision 816)
@@ -0,0 +1,17 @@
+// PR c++/6402
+// Origin: Wolfgang Bangerth
+// { dg-do compile }
+
+class A
+{
+ A (const A&);
+ public:
+ A();
+};
+
+struct B { A a; };
+
+struct C : public B
+{
+ void foo() { const A &ref = B::a; } // taking reference, not a copy!
+};
ref1.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 816)
@@ -0,0 +1,7 @@
+struct f
+{
+ int oo()
+ {
+ return (2; // { dg-error "" }
+ }
+};
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: expr1.C
===================================================================
--- expr1.C (nonexistent)
+++ expr1.C (revision 816)
@@ -0,0 +1,8 @@
+struct A {
+ A (int, int);
+ void f ();
+};
+
+void f (int a) {
+ A (a, a).f ();
+}
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: template4.C
===================================================================
--- template4.C (nonexistent)
+++ template4.C (revision 816)
@@ -0,0 +1,21 @@
+// { dg-do compile }
+
+// Copyright (C) 2003 Free Software Foundation, Inc.
+// Contributed by Nathan Sidwell 32 Jan 2003
+
+// PR 795. fields are not necessarily a dependent type.
+
+struct V
+{
+ template T get ();
+};
+
+struct L
+{
+ V v;
+
+ template T at (int i)
+ {
+ return v.get ();
+ }
+};
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: dtor8.C
===================================================================
--- dtor8.C (nonexistent)
+++ dtor8.C (revision 816)
@@ -0,0 +1,8 @@
+// { dg-do compile }
+
+struct A {};
+
+struct B
+{
+ friend A::~B(); // { dg-error "as member of" }
+};
dtor8.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: ambig2.C
===================================================================
--- ambig2.C (nonexistent)
+++ ambig2.C (revision 816)
@@ -0,0 +1,27 @@
+// { dg-do compile }
+
+// Copyright (C) 2003 Free Software Foundation, Inc.
+// Contributed by Nathan Sidwell 6 Jan 2003
+
+// PR 9212. We erroneously accepted an ill-formed
+// function-declaration, rather than a variable initializer.
+
+
+struct A
+{
+ enum E { e };
+ A(E);
+};
+
+struct B
+{
+ enum F { f };
+ B(F);
+};
+
+struct C
+{
+ C(A, B, A);
+};
+
+C c(A(A::e), B(B::f), A(A::e)); // This is not a function declaration
ambig2.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: error27.C
===================================================================
--- error27.C (nonexistent)
+++ error27.C (revision 816)
@@ -0,0 +1,7 @@
+// PR c++/20152
+
+struct KrSelectionMode { virtual void init() = 0; }; // { dg-error "previous definition" }
+struct KrKDESelectionMode : public KrSelectionMode { void init() { } }; // { dg-error "previous definition" }
+struct KrSelectionMode { virtual void init() = 0; }; // { dg-error "" }
+struct KrKDESelectionMode : public KrSelectionMode { void init() { } }; // { dg-error "" }
+KrKDESelectionMode krKDESelectionMode;
error27.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: crash33.C
===================================================================
--- crash33.C (nonexistent)
+++ crash33.C (revision 816)
@@ -0,0 +1,8 @@
+// PR c++/28878
+// { dg-do compile }
+
+template
+void foo()
+[
+ throw; // { dg-error "expected" }
+} // { dg-error "expected" }
crash33.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: for1.C
===================================================================
--- for1.C (nonexistent)
+++ for1.C (revision 816)
@@ -0,0 +1,7 @@
+// PR c++/23440
+// Origin: Volker Reichelt
+// { dg-do compile }
+// { dg-options "" }
+
+# 0 "for1.C"
+void foo() { for (;;) // { dg-error "at end of input" "" { target *-*-* } 0 }
for1.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: crash16.C
===================================================================
--- crash16.C (nonexistent)
+++ crash16.C (revision 816)
@@ -0,0 +1,8 @@
+// PR c++/16971
+
+namespace N {
+ int i; // { dg-error "" }
+ // By checking for an explicit keyword on the next line we avoid
+ // matching an ICE message.
+ int i; // { dg-error "redefinition" }
+}
crash16.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: constructor2.C
===================================================================
--- constructor2.C (nonexistent)
+++ constructor2.C (revision 816)
@@ -0,0 +1,11 @@
+// PR c++/14260
+
+template
+class T
+{
+public:
+ T(short,short f=0) {}
+ T(int f) {}
+ T(int f=0,const char* b=0) {}
+};
+
constructor2.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: array-size2.C
===================================================================
--- array-size2.C (nonexistent)
+++ array-size2.C (revision 816)
@@ -0,0 +1,19 @@
+// PR c/25682
+// { dg-do compile }
+// Test whether we don't ICE on invalid array sizes.
+
+struct S
+{
+ char a[4];
+ int b;
+};
+
+extern void bar (char *, char *);
+
+void
+foo (void)
+{
+ char g[(char *) &((struct S *) 0)->b - (char *) 0]; // { dg-error "not an integral constant-expression" }
+ char h[(__SIZE_TYPE__) &((struct S *) 8)->b]; // { dg-error "not an integral constant-expression" }
+ bar (g, h);
+}
array-size2.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: constant3.C
===================================================================
--- constant3.C (nonexistent)
+++ constant3.C (revision 816)
@@ -0,0 +1,7 @@
+const int i = 1;
+const int j (2);
+const int k = { 3 };
+
+enum { a = i, b = j, c = k };
+
+
constant3.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: defarg8.C
===================================================================
--- defarg8.C (nonexistent)
+++ defarg8.C (revision 816)
@@ -0,0 +1,10 @@
+struct A {
+ static void g(int);
+};
+
+struct S {
+ static int i;
+
+ friend void f(int = i);
+ friend void A::g(int = i);
+};
defarg8.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: template14.C
===================================================================
--- template14.C (nonexistent)
+++ template14.C (revision 816)
@@ -0,0 +1,17 @@
+// PR c++/14550
+
+struct A {
+ A();
+};
+
+template void foo()
+{
+ A *p = new A;
+}
+
+void bar()
+{
+ foo<0>();
+}
+
+
template14.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: error8.C
===================================================================
--- error8.C (nonexistent)
+++ error8.C (revision 816)
@@ -0,0 +1,4 @@
+// PR c++/13438
+
+struct A { friend typename struct B; }; // { dg-error "" }
+
error8.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: crash1.C
===================================================================
--- crash1.C (nonexistent)
+++ crash1.C (revision 816)
@@ -0,0 +1 @@
+struct s { s(std::b o) { } }; // { dg-error "" }
crash1.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: ptrmem2.C
===================================================================
--- ptrmem2.C (nonexistent)
+++ ptrmem2.C (revision 816)
@@ -0,0 +1,11 @@
+// { dg-do compile }
+
+// Copyright (C) 2004 Free Software Foundation, Inc.
+// Contributed by Nathan Sidwell 2 Dec 2004
+
+// PR 18782: ICE with ptr-to-member
+// Origin: Volker Reichelt
+
+namespace A {}
+
+int A::* p; // { dg-error "is a namespace" "" }
ptrmem2.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: undefined5.C
===================================================================
--- undefined5.C (nonexistent)
+++ undefined5.C (revision 816)
@@ -0,0 +1,5 @@
+// PR c++/5975
+// Origin: Volker Reichelt
+// { dg-do compile }
+
+typedef typename X::Y<> y; // { dg-error "" }
undefined5.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: access6.C
===================================================================
--- access6.C (nonexistent)
+++ access6.C (revision 816)
@@ -0,0 +1,24 @@
+// { dg-do compile }
+
+// Origin: David Baron
+
+// PR c++/3765: Changing access from public to private by member
+// using declaration.
+
+class A
+{
+ public:
+ int foo() { return 1; } // { dg-error "inaccessible" }
+};
+
+class B : public A
+{
+ private:
+ using A::foo;
+};
+
+int main()
+{
+ B b;
+ return b.foo(); // { dg-error "this context" }
+}
access6.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: builtin1.C
===================================================================
--- builtin1.C (nonexistent)
+++ builtin1.C (revision 816)
@@ -0,0 +1,16 @@
+namespace std {
+class Base {};
+}
+
+struct Derived : public std::Base {
+ operator const char*() const;
+ operator bool(void) const;
+};
+
+void log(const char* str);
+
+void nothing()
+{
+ Derived temp;
+ log(temp);
+}
builtin1.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: crash9.C
===================================================================
--- crash9.C (nonexistent)
+++ crash9.C (revision 816)
@@ -0,0 +1,9 @@
+// { dg-do compile }
+
+// Origin: Volker Reichelt
+
+// PR c++/10793: ICE in handling base class when the current class
+// contains error.
+
+template struct A {};
+template struct A : A { }; // { dg-error "not declared|invalid|token|extra" }
crash9.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: friend4.C
===================================================================
--- friend4.C (nonexistent)
+++ friend4.C (revision 816)
@@ -0,0 +1,8 @@
+// { dg-do compile }
+
+// PR c++/4100
+// You can't use friend when defining a class.
+
+class A {
+ friend class B { }; // { dg-error "friend" }
+};
friend4.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: error11.C
===================================================================
--- error11.C (nonexistent)
+++ error11.C (revision 816)
@@ -0,0 +1,53 @@
+// { dg-do compile }
+// Origin: Giovanni Bajo
+// Try to find out when the digraph '<:' is used as a mistake, and parse it
+// correctly to avoid cascaded errors.
+
+struct B;
+
+template
+struct Foo
+{
+ template
+ struct Nested
+ {
+ static void method(void) {}
+ };
+
+ void method(void) {
+ typename Foo<::B>::template Nested<::B> n; // { dg-error "cannot begin|alternate spelling" }
+ n.template Nested::method();
+ n.template Nested<::B>::method(); // { dg-error "cannot begin|alternate spelling" }
+ Nested::method();
+ Nested<::B>::method(); // { dg-error "cannot begin|alternate spelling" }
+ }
+};
+
+template struct Foo2 {};
+template struct Foo2<::B>; // { dg-error "cannot begin|alternate spelling|type/value mismatch|expected a constant" }
+
+int value = 0;
+
+void func(void)
+{
+ Foo<::B> f; // { dg-error "cannot begin|alternate spelling" }
+ f.Foo::method();
+ f.Foo<::B>::method(); // { dg-error "cannot begin|alternate spelling" }
+
+ // Check cases where we the token sequence is the correct one, but there
+ // was no digraph or whitespaces in the middle, so we should not emit
+ // the special error message.
+ Foo<: :B> k2; // { dg-bogus "cannot begin|alternate spelling" "smart error should not be triggered here" }
+ Foo[:B> k1; // { dg-bogus "cannot begin|alternate spelling" "smart error should not be triggered here" }
+// { dg-error "" "" { target *-*-* } 40 }
+// { dg-error "" "" { target *-*-* } 41 }
+
+ int Foo[2];
+ Foo[::value] = 0;
+}
+
+template struct Foo<::B>; // { dg-error "cannot begin|alternate spelling" }
+
+// On the first error message, an additional note about the use of
+// -fpermissive should be present
+// { dg-error "-fpermissive" "-fpermissive" { target *-*-* } 18 }
error11.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