2000-08-21 Jakub Jelinek <jakub@redhat.com>
+ * g++.old-deja/g++.other/loop2.C: New test.
+
* gcc.c-torture/compile/20000606-1.c: New test.
* gcc.c-torture/compile/20000728-1.c: New test.
* gcc.c-torture/execute/20000801-1.c: New test.
--- /dev/null
+// Build don't link:
+// Special g++ Options: -O
+
+class foo {
+public:
+ operator const char*() const { return a; }
+ char *a;
+};
+
+class bar {
+public:
+ ~bar();
+ void operator++(int);
+ bool b() const;
+protected:
+ void* c() const;
+};
+
+class baz : public bar {
+public:
+ foo const &d() const { return *(foo *)bar::c(); }
+};
+
+extern int tst (const char *, const char *) throw();
+
+void die(const foo& x)
+{
+ for (baz hi; hi.b(); hi++)
+ if (tst (hi.d(), x) == 0)
+ return;
+}