Commit 1f8a2544 by Jason Merrill Committed by Jason Merrill

arg3.C: Adjust error locations.

	* g++.dg/overload/arg3.C: Adjust error locations.
	* g++.dg/overload/copy1.C: Likewise.
	* g++.dg/tc1/dr152.C: Likewise.
	* g++.dg/template/incomplete4.C: Likewise.
	* g++.dg/template/incomplete5.C: Likewise.
	* g++.old-deja/g++.bob/inherit2.C: Likewise.
	* g++.old-deja/g++.pt/auto_ptr.C: Likewise.
	* g++.old-deja/g++.pt/crash9.C: Likewise.

From-SVN: r160814
parent f582a3aa
2010-06-15 Jason Merrill <jason@redhat.com> 2010-06-15 Jason Merrill <jason@redhat.com>
* g++.dg/overload/arg3.C: Adjust error locations.
* g++.dg/overload/copy1.C: Likewise.
* g++.dg/tc1/dr152.C: Likewise.
* g++.dg/template/incomplete4.C: Likewise.
* g++.dg/template/incomplete5.C: Likewise.
* g++.old-deja/g++.bob/inherit2.C: Likewise.
* g++.old-deja/g++.pt/auto_ptr.C: Likewise.
* g++.old-deja/g++.pt/crash9.C: Likewise.
* g++.dg/inherit/virtual5.C: New. * g++.dg/inherit/virtual5.C: New.
* g++.dg/cpp0x/defaulted18.C: New. * g++.dg/cpp0x/defaulted18.C: New.
......
...@@ -14,10 +14,9 @@ struct B : A ...@@ -14,10 +14,9 @@ struct B : A
B(B&); // { dg-message "candidates" "" } B(B&); // { dg-message "candidates" "" }
}; };
void foo(B); void foo(B); // { dg-error "initializing" }
void bar() void bar()
{ {
foo(0); // { dg-error "no matching function" "no matching" } foo(0); // { dg-error "no matching function" "no matching" }
// { dg-error "initializing" "initializing" { target *-*-* } 21 }
} }
...@@ -10,12 +10,11 @@ struct B ...@@ -10,12 +10,11 @@ struct B
struct A struct A
{ {
A (B); A (B); // { dg-error "initializing" }
}; };
B B
f (B const& b) f (B const& b)
{ {
return b; // { dg-error "matching" "matching" } return b; // { dg-error "matching" "matching" }
// { dg-error "initializing" "initializing" { target *-*-* } 19 }
} }
...@@ -7,12 +7,11 @@ namespace N1 { ...@@ -7,12 +7,11 @@ namespace N1 {
X(); // { dg-message "candidate" } X(); // { dg-message "candidate" }
explicit X(const X&); explicit X(const X&);
}; };
void f(X); void f(X); // { dg-error "initializing" }
int foo() int foo()
{ {
X x; X x;
f(x); // { dg-error "matching" "matching" } f(x); // { dg-error "matching" "matching" }
// { dg-error "initializing" "initializing" { target *-*-* } 14 }
} }
} }
...@@ -24,14 +23,13 @@ namespace N2 { ...@@ -24,14 +23,13 @@ namespace N2 {
}; };
template <class T> template <class T>
void f(T ) {} void f(T ) {} // { dg-error "initializing" }
template <class T> template <class T>
int foo() int foo()
{ {
X<T> x; X<T> x;
N2::f(x); // { dg-error "matching" "matching" } N2::f(x); // { dg-error "matching" "matching" }
// { dg-error "initializing " initializing" { target *-*-* } 33 }
} }
template int foo<float>(); // { dg-message "instantiated from here" } template int foo<float>(); // { dg-message "instantiated from here" }
......
...@@ -5,12 +5,12 @@ class A; // { dg-error "forward declaration" } ...@@ -5,12 +5,12 @@ class A; // { dg-error "forward declaration" }
template <typename T> struct X template <typename T> struct X
{ {
static int f (T); static int f (T); // { dg-error "initializing" }
static const T &make (); static const T &make ();
}; };
int int
main () main ()
{ {
return X<A>::f (X<A>::make ()); // { dg-error "invalid use of incomplete type|initializing argument" } return X<A>::f (X<A>::make ()); // { dg-error "invalid use of incomplete type" }
} }
...@@ -5,9 +5,9 @@ class A; // { dg-error "forward declaration" } ...@@ -5,9 +5,9 @@ class A; // { dg-error "forward declaration" }
template <typename T> struct X template <typename T> struct X
{ {
static int f (T); static int f (T); // { dg-error "initializing" }
static const T &make (); static const T &make ();
static const bool value = sizeof (f (make ())) == sizeof (int); // { dg-error "invalid use of incomplete type|initializing argument" } static const bool value = sizeof (f (make ())) == sizeof (int); // { dg-error "invalid use of incomplete type" }
}; };
int int
......
...@@ -3,11 +3,11 @@ ...@@ -3,11 +3,11 @@
class A; // { dg-error "forward declaration" } class A; // { dg-error "forward declaration" }
int f (A); int f (A); // { dg-error "initializing" }
const A &make (); const A &make ();
int int
main () main ()
{ {
return f (make ()); // { dg-error "invalid use of incomplete type|initializing argument" } return f (make ()); // { dg-error "invalid use of incomplete type" }
} }
...@@ -15,11 +15,10 @@ public: ...@@ -15,11 +15,10 @@ public:
B(void) {} B(void) {}
}; };
void f(B b) { void f(B b) { // { dg-error "initializing" }
} }
void g() { void g() {
B h; B h;
f(h); // { dg-error "argument" "arg" } f(h); // { dg-message "synthesized" "synth" }
// { dg-message "synthesized" "synth" { target *-*-* } 23 }
} }
...@@ -44,7 +44,7 @@ struct Derived : Base { Derived() {} }; ...@@ -44,7 +44,7 @@ struct Derived : Base { Derived() {} };
auto_ptr<Derived> f() { auto_ptr<Derived> null(0); return null; } auto_ptr<Derived> f() { auto_ptr<Derived> null(0); return null; }
void g(auto_ptr<Derived>) { } void g(auto_ptr<Derived>) { }
void h(auto_ptr<Base>) { } void h(auto_ptr<Base>) { } // { dg-error "initializing" }
int main() { int main() {
auto_ptr<Base> x(f()); auto_ptr<Base> x(f());
...@@ -52,5 +52,4 @@ int main() { ...@@ -52,5 +52,4 @@ int main() {
x = y; x = y;
g(f()); g(f());
h(f()); // { dg-error "match" "match" } no usable copy ctor h(f()); // { dg-error "match" "match" } no usable copy ctor
// { dg-error "initializing" "init" { target *-*-* } 54 }
} }
// { dg-do assemble } // { dg-do assemble }
template <class T> template <class T>
void f(T) {} void f(T) {} // { dg-error "initializing" }
class C; // { dg-error "forward declaration" } class C; // { dg-error "forward declaration" }
void g(const C& c) void g(const C& c)
{ {
f(c); // { dg-error "invalid use of incomplete type|initializing argument" } f(c); // { dg-error "invalid use of incomplete type" }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment