diff options
Diffstat (limited to 'gcc/testsuite/g++.dg/other/pr42806.C')
-rw-r--r-- | gcc/testsuite/g++.dg/other/pr42806.C | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/other/pr42806.C b/gcc/testsuite/g++.dg/other/pr42806.C new file mode 100644 index 000000000..9823238d5 --- /dev/null +++ b/gcc/testsuite/g++.dg/other/pr42806.C @@ -0,0 +1,22 @@ +// { dg-do compile } +// { dg-options "-O -fcompare-debug" } + +struct S1 { + ~S1() { } +}; + +struct S2 { + S1 s1; + void m(); + ~S2() { m(); } +}; + +struct S3 { + S3(int, S2); +}; + +void foo() +{ + S3(0, S2()); +} + |