Merge reload-branch up to revision 101000
[official-gcc.git] / gcc / testsuite / g++.dg / opt / pr17697-1.C
blob0e2f671c629918da61e61f44d557723656ce8938
1 // PR tree-optimization/17697
2 // { dg-do run }
3 // { dg-options "-O2" }
5 extern "C"
7   extern int strcmp (const char *s, const char *t) throw ()
8     __attribute__ ((pure));
11 namespace A
13   extern int strcmp (const char *s, const char *t);
16 inline int
17 A::strcmp (const char *s, const char *t)
19   return ::strcmp (s, t);
22 int
23 foo (char *x) throw ()
25   return A::strcmp ("", x);
28 int
29 main ()
31   return foo ("") != 0 || foo ("a") == 0;