| 1 |
// { dg-do assemble } |
| 2 |
// Test for proper merging of functions from multiple using directives. |
| 3 |
|
| 4 |
|
| 5 |
namespace standard |
| 6 |
{ void print(int) {} |
| 7 |
void dump(int) {} |
| 8 |
} |
| 9 |
namespace A { using standard::print; } |
| 10 |
namespace B { using namespace standard; } |
| 11 |
namespace User |
| 12 |
{ using namespace standard; |
| 13 |
using namespace A; |
| 14 |
void test() |
| 15 |
{ print(1); } |
| 16 |
// egcs-1.1: call of overloaded `print (int)' is ambiguous |
| 17 |
} |
| 18 |
namespace User2 |
| 19 |
{ using namespace standard; |
| 20 |
using namespace B; |
| 21 |
void test() |
| 22 |
{ print(1); } // egcs has no problems here |
| 23 |
} |
| 24 |
|