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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.dg/] [lookup/] [koenig5.C] - Blame information for rev 816

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
// Koenig lookup is not defined as intended in the std.  DR 218 gives
2
// an indication of what is meant.  This test case encapsulates the
3
// current conservative behaviour
4
 
5
// Copyright (C) 2006 Free Software Foundation, Inc.
6
// Contributed by Nathan Sidwell 27 Aug 2006 
7
 
8
namespace N
9
{
10
  struct A {};
11
  void One (...);  // { dg-error "conflict with" "" }
12
  void (*Two) (...);  // { dg-error "not a function" "" }
13
  namespace Three {} // { dg-error "lookup finds|not a function" "" }
14
}
15
 
16
namespace M
17
{
18
  struct B {};
19
  struct One {};  // { dg-error "lookup finds|not a function" "" }
20
  void (*Two) (...);  // { dg-error "conflict with" "" }
21
  void Three (...);  // { dg-error "conflict with" "" }
22
}
23
 
24
namespace O
25
{
26
  struct C {};
27
  void Two (...); // { dg-error "conflict with" "" }
28
}
29
 
30
void g (N::A *a, M::B *b, O::C *c)
31
{
32
  One (a); // ok
33
  One (b); // { dg-error "in call to" "" }
34
  One (a, b); // { dg-error "in call to" "" }
35
 
36
  Two (a); // ok
37
  Two (a, a); // ok
38
  Two (b); // ok
39
  Two (c); // ok
40
  Two (a, b); // { dg-error "in call to" "" }
41
  Two (a, c); // { dg-error "in call to" "" }
42
 
43
  Three (a); // { dg-error "in call to" "" }
44
  Three (b); // ok
45
  Three (a, b); // { dg-error "in call to" "" }
46
}

powered by: WebSVN 2.1.0

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