+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>
PR c++/16889
--- /dev/null
+// 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;
+ }
+ }
+}