1// PR tree-optimization/17697 2// { dg-do run } 3// { dg-options "-O2" } 4 5extern "C" 6{ 7 extern int strcmp (const char *s, const char *t) throw () 8 __attribute__ ((pure)); 9} 10 11namespace A 12{ 13 extern int strcmp (const char *s, const char *t) throw (); 14} 15 16inline int 17A::strcmp (const char *s, const char *t) throw () 18{ 19 return ::strcmp (s, t); 20} 21 22int 23foo (const char *x) throw () 24{ 25 return A::strcmp ("", x); 26} 27 28int 29main () 30{ 31 return foo ("") != 0 || foo ("a") == 0; 32} 33