re PR middle-end/12526 ([tree-ssa] internal compiler error: Segmentation fault)
PR middle-end/12526 * tree.c (build): A CALL_EXPR has side-effects if its arguments do. * calls.c (call_expr_flags): New fn. * tree.h: Declare it. * tree-cfg.c (call_expr_flags): Move to calls.c. * tree-flow.h: Move prototype to tree.h. From-SVN: r73588
This commit is contained in:
parent
53ee1bf364
commit
33552225d0
19
gcc/testsuite/g++.dg/init/cleanup2.C
Normal file
19
gcc/testsuite/g++.dg/init/cleanup2.C
Normal file
@ -0,0 +1,19 @@
|
||||
// PR c++/12526
|
||||
|
||||
// We decided that the call to strcmp has no side-effects because strcmp is
|
||||
// pure, even though the first argument has side-effects. As a result, we
|
||||
// stripped the CLEANUP_POINT_EXPR. Hilarity ensued.
|
||||
|
||||
extern "C" int strcmp (const char *, const char *);
|
||||
|
||||
struct A {
|
||||
A(int);
|
||||
const char *str();
|
||||
~A();
|
||||
};
|
||||
|
||||
void printQueryI()
|
||||
{
|
||||
if(!strcmp(A(1).str(), "foo"))
|
||||
{ }
|
||||
}
|
Loading…
Reference in New Issue
Block a user