diff options
author | Lorry Tar Creator <lorry-tar-importer@baserock.org> | 2015-04-22 10:21:45 +0000 |
---|---|---|
committer | <> | 2015-04-25 21:44:09 +0000 |
commit | f80b5ea1605c9f9408c5aa386ba71c16d918ebbf (patch) | |
tree | bb7eafaa81fc4b8c5c215bc08d517fd158db234a /gcc/testsuite/g++.dg/pr61289-2.c | |
parent | c27a97d04853380f1e80525391b3f0d156ed4c84 (diff) | |
download | gcc-tarball-f80b5ea1605c9f9408c5aa386ba71c16d918ebbf.tar.gz |
Imported from /home/lorry/working-area/delta_gcc-tarball/gcc-5.1.0.tar.bz2.gcc-5.1.0
Diffstat (limited to 'gcc/testsuite/g++.dg/pr61289-2.c')
-rw-r--r-- | gcc/testsuite/g++.dg/pr61289-2.c | 62 |
1 files changed, 0 insertions, 62 deletions
diff --git a/gcc/testsuite/g++.dg/pr61289-2.c b/gcc/testsuite/g++.dg/pr61289-2.c deleted file mode 100644 index 4cc3ebe468..0000000000 --- a/gcc/testsuite/g++.dg/pr61289-2.c +++ /dev/null @@ -1,62 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-O2 -fno-exceptions" } */ -struct S -{ - inline int fn1 () const { return s; } - __attribute__ ((noinline, noclone)) S *fn2 (int); - __attribute__ ((noinline, noclone)) void fn3 (); - __attribute__ ((noinline, noclone)) static S *fn4 (int); - S (int i) : s (i) {} - int s; -}; - -int a = 0; -S *b = 0; - -S * -S::fn2 (int i) -{ - a++; - if (a == 1) - return b; - if (a > 3) - __builtin_abort (); - b = this; - return new S (i + s); -} - -S * -S::fn4 (int i) -{ - b = new S (i); - return b; -} - -void -S::fn3 () -{ - delete this; -} - -void -foo () -{ - S *c = S::fn4 (20); - for (int i = 0; i < 2;) - { - S *d = c->fn2 (c->fn1 () + 10); - if (c != d) -{ - c->fn3 (); - c = d; - ++i; -} - } - c->fn3 (); -} - -int -main () -{ - foo (); -} |