Merge from mainline
[official-gcc.git] / gcc / testsuite / g++.dg / opt / pr17697-3.C
blobfa7cff0a49fdf9a03649b2aca8e8ea78e9d462be
1 // PR tree-optimization/17697
2 // { dg-do run }
3 // { dg-options "-O2" }
5 extern "C" extern int strcmp (const char *s, const char *t);
7 namespace A
9   extern int strcmp (const char *s, const char *t);
12 inline int
13 A::strcmp (const char *s, const char *t)
15   return ::strcmp (s, t);
18 int
19 foo (const char *x)
21   return A::strcmp ("", x);
24 int
25 main ()
27   return foo ("") != 0 || foo ("a") == 0;