2018-07-20 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / g++.dg / pr45330.C
blobf16094d93f1f724580f4ebc0aec913c9b61685f5
1 // { dg-do compile { target c++11 } }
2 // Search std, __cxxabiv1, and global namespaces, plus two more,
3 // breadth first
5 // { dg-options "--param cxx-max-namespaces-for-diagnostic-help=5" }
7 // ::, std and __cxxabiv1
9 namespace A
11   int foo;                      // { dg-message "A::foo" "suggested alternative" }
12   namespace A0
13   {
14     int foo; // not me
15   }
18 namespace B
20   inline namespace I
21   {
22     int foo;                    // { dg-message "B::I::foo" "suggested alternative" }
23   }
26 namespace C
28   int foo;
31 namespace D
33   int foo;
36 namespace E
38   int foo;
41 int bar()
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 }