2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / g++.dg / init / cleanup2.C
blobe62364be15b7f9493f85ec438c79a829fdb26e30
1 // PR c++/12526
3 // We decided that the call to strcmp has no side-effects because strcmp is
4 // pure, even though the first argument has side-effects.  As a result, we
5 // stripped the CLEANUP_POINT_EXPR.  Hilarity ensued.
7 extern "C" int strcmp (const char *, const char *);
9 struct A {
10   A(int);
11   const char *str();
12   ~A();
15 void printQueryI()
17   if(!strcmp(A(1).str(), "foo"))
18     { }