diff options
Diffstat (limited to 'gcc/testsuite')
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/torture/PR58294.C | 20 |
2 files changed, 25 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 756611d..51cab1b 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2013-09-09 Jan Hubicka <jh@suse.cz> + + PR middle-end/58294 + * g++.dg/torture/PR58294.C: New testcase. + 2013-09-08 Jeff Law <law@redhat.com> * gcc.c-torture/compile/pr58340.c: New test. diff --git a/gcc/testsuite/g++.dg/torture/PR58294.C b/gcc/testsuite/g++.dg/torture/PR58294.C new file mode 100644 index 0000000..e1fb95a --- /dev/null +++ b/gcc/testsuite/g++.dg/torture/PR58294.C @@ -0,0 +1,20 @@ +// { dg-do compile } +struct A { + virtual ~A(); + virtual void m_fn1() { delete this; } + void m_fn2() { m_fn1(); } +}; + +struct B { + A *pi_; + B() { pi_->m_fn2(); } +}; +struct C { + B pn; +}; +void _setjmp(); +int png_decode() { + _setjmp(); + C a; + return 0; +} |