diff options
Diffstat (limited to 'gcc/testsuite/g++.dg/debug/dwarf2/local-var-in-contructor.C')
-rw-r--r-- | gcc/testsuite/g++.dg/debug/dwarf2/local-var-in-contructor.C | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/local-var-in-contructor.C b/gcc/testsuite/g++.dg/debug/dwarf2/local-var-in-contructor.C new file mode 100644 index 000000000..d61d27fe7 --- /dev/null +++ b/gcc/testsuite/g++.dg/debug/dwarf2/local-var-in-contructor.C @@ -0,0 +1,30 @@ +// Contributed by Dodji Seketeli <dodji@redhat.com> +// Origin PR27574 +// { dg-do compile } +// { dg-options "-O0 -g" } +// { dg-final { scan-assembler "problem" } } + +void f (int *) +{ +} + +class A +{ +public: + A(int i); +}; + +A::A(int i) +{ + int *problem = new int(i); + f (problem); +} + +int +main (void) +{ + A a (0); + + return 0; +} + |