2018-11-07 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / g++.dg / other / anon5.C
blobee4601e270e0b6b6bd0a306f8e6fc11ac9d8cd78
1 // PR c++/34094
2 // { dg-do link { target { ! { *-*-darwin* *-*-hpux* *-*-solaris2.* } } } }
3 // { dg-options "-gdwarf-2" }
4 // Ignore additional message on powerpc-ibm-aix
5 // { dg-prune-output "obtain more information" } */
6 // Ignore additional messages on Linux/x86 with PIE
7 // { dg-prune-output "\[Bb\]ad value" } */
9 namespace {
10   struct c
11   {
12     static const bool t = 0;
13   };
16 const bool &f()
18   return c::t;  // { dg-message "\[Uu\]ndefined" "undefined" { target *-*-* } 0 }
19                 // Some targets report the error for the previous line, others
20                 // don't give line number inforamtion for it, so use line 0.
23 int main(void)
25   return 0;