diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-08-21 13:04:38 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-08-21 13:04:38 +0000 |
commit | 0c55dfc6680bbea9f00c5c6332d71596523865d0 (patch) | |
tree | 086840cf8c0bb9378bf34c186670d0d12cec170c /gcc/testsuite | |
parent | 8d80962ddc3a07cf399e0f6e366771f5d3aef63b (diff) | |
download | gcc-0c55dfc6680bbea9f00c5c6332d71596523865d0.tar.gz |
* g++.old-deja/g++.other/loop2.C: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@35839 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite')
-rw-r--r-- | gcc/testsuite/ChangeLog | 2 | ||||
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.other/loop2.C | 31 |
2 files changed, 33 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index d0c10da4456..0297b60fdd4 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,7 @@ 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. diff --git a/gcc/testsuite/g++.old-deja/g++.other/loop2.C b/gcc/testsuite/g++.old-deja/g++.other/loop2.C new file mode 100644 index 00000000000..7fd90c714b6 --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.other/loop2.C @@ -0,0 +1,31 @@ +// 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; +} |