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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [template/] [overload12.C] - Blame information for rev 801

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
// { dg-do compile }
2
 
3
struct S {int x; int y;};
4
template
5
int foo(T a, T b) {return a + b;} // { dg-message "template" }
6
template
7
int foo(T a, T2& b, T2 c) {return a + b;}  // { dg-message "template" }
8
int foo(char*, S&); // { dg-message "foo" }
9
// { dg-message "candidate expects 2 arguments, 3 provided" "arity" { target *-*-* } 8 }
10
 
11
int foo2(int x)
12
{
13
  S s={1,2};
14
  char c;
15
  foo(c, 2, c); // { dg-error "no matching function" }
16
  // { dg-message "(candidate|deduced conflicting types for)" "candidate note" { target *-*-* } 15 }
17
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.