Commit 2c55ffb2 by Andrew MacLeod Committed by Andrew Macleod

Test case for PR 17517

From-SVN: r88050
parent 8d481c2e
2004-09-24 Andrew MacLeod <amacleod@redhat.com>
PR tree-optimzation/17517
* g++.dg/tree-ssa/pr17517.C: New Test.
2004-08-24 Nathan Sidwell <nathan@codesourcery.com> 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
PR c++/16889 PR c++/16889
......
// Test PR 17517. Test case provided by Serge Belyshev.
/* { dg-do compile } */
/* { dg-options "-O2" } */
extern void foo ();
struct Ptr {
int * ptr;
Ptr () { ptr = 0; }
~Ptr() { delete ptr; }
Ptr &operator= (int * p) { ptr = p; return *this; }
};
int *new_checker () { foo (); return 0; }
void pipe (int c)
{
Ptr checker;
foo ();
for (;;)
{
switch (c)
{
case '-':
checker = new_checker ();
break;
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment