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>
* 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/cpp0x/defaulted18.C: New.
......
......@@ -14,10 +14,9 @@ struct B : A
B(B&); // { dg-message "candidates" "" }
};
void foo(B);
void foo(B); // { dg-error "initializing" }
void bar()
{
foo(0); // { dg-error "no matching function" "no matching" }
// { dg-error "initializing" "initializing" { target *-*-* } 21 }
}
......@@ -10,12 +10,11 @@ struct B
struct A
{
A (B);
A (B); // { dg-error "initializing" }
};
B
f (B const& b)
{
return b; // { dg-error "matching" "matching" }
// { dg-error "initializing" "initializing" { target *-*-* } 19 }
}
......@@ -7,12 +7,11 @@ namespace N1 {
X(); // { dg-message "candidate" }
explicit X(const X&);
};
void f(X);
void f(X); // { dg-error "initializing" }
int foo()
{
X x;
f(x); // { dg-error "matching" "matching" }
// { dg-error "initializing" "initializing" { target *-*-* } 14 }
}
}
......@@ -24,14 +23,13 @@ namespace N2 {
};
template <class T>
void f(T ) {}
void f(T ) {} // { dg-error "initializing" }
template <class T>
int foo()
{
X<T> x;
N2::f(x); // { dg-error "matching" "matching" }
// { dg-error "initializing " initializing" { target *-*-* } 33 }
}
template int foo<float>(); // { dg-message "instantiated from here" }
......
......@@ -5,12 +5,12 @@ class A; // { dg-error "forward declaration" }
template <typename T> struct X
{
static int f (T);
static int f (T); // { dg-error "initializing" }
static const T &make ();
};
int
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" }
template <typename T> struct X
{
static int f (T);
static int f (T); // { dg-error "initializing" }
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
......
......@@ -3,11 +3,11 @@
class A; // { dg-error "forward declaration" }
int f (A);
int f (A); // { dg-error "initializing" }
const A &make ();
int
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:
B(void) {}
};
void f(B b) {
void f(B b) { // { dg-error "initializing" }
}
void g() {
B h;
f(h); // { dg-error "argument" "arg" }
// { dg-message "synthesized" "synth" { target *-*-* } 23 }
f(h); // { dg-message "synthesized" "synth" }
}
......@@ -44,7 +44,7 @@ struct Derived : Base { Derived() {} };
auto_ptr<Derived> f() { auto_ptr<Derived> null(0); return null; }
void g(auto_ptr<Derived>) { }
void h(auto_ptr<Base>) { }
void h(auto_ptr<Base>) { } // { dg-error "initializing" }
int main() {
auto_ptr<Base> x(f());
......@@ -52,5 +52,4 @@ int main() {
x = y;
g(f());
h(f()); // { dg-error "match" "match" } no usable copy ctor
// { dg-error "initializing" "init" { target *-*-* } 54 }
}
// { dg-do assemble }
template <class T>
void f(T) {}
void f(T) {} // { dg-error "initializing" }
class C; // { dg-error "forward declaration" }
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