pr77285-2.C: Require tls_native support.
[gcc.git] / gcc / testsuite / g++.dg / pr45330.C
1 // { dg-do compile { target c++11 } }
2 // Search std, __cxxabiv1, and global namespaces, plus two more,
3 // breadth first
4
5 // { dg-options "--param cxx-max-namespaces-for-diagnostic-help=5" }
6
7 // ::, std and __cxxabiv1
8
9 namespace A
10 {
11 int foo; // { dg-message "A::foo" "suggested alternative" }
12 namespace A0
13 {
14 int foo; // not me
15 }
16 }
17
18 namespace B
19 {
20 inline namespace I
21 {
22 int foo; // { dg-message "B::I::foo" "suggested alternative" }
23 }
24 }
25
26 namespace C
27 {
28 int foo;
29 }
30
31 namespace D
32 {
33 int foo;
34 }
35
36 namespace E
37 {
38 int foo;
39 }
40
41 int bar()
42 {
43 return foo; // { dg-error "was not declared" }
44 // { dg-message "maximum limit of 5 namespaces" "maximum limit" { target *-*-* } .-1 }
45 // { dg-message "suggested alternative" "suggested alternative" { target *-*-* } .-2 }
46 }