diff options
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.other/sibcall2.C')
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.other/sibcall2.C | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.other/sibcall2.C b/gcc/testsuite/g++.old-deja/g++.other/sibcall2.C new file mode 100644 index 000000000..818fa231c --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.other/sibcall2.C @@ -0,0 +1,19 @@ +// { dg-do assemble } +// { dg-options "-O2 -foptimize-sibling-calls -fno-exceptions" } + +struct X +{ + const char *c() const { return b; }; + char *b; +}; +extern "C" int f (const char *); +struct A +{ + X x; + void y(); +}; +void A::y() +{ + const char *const a[] = { x.c() }; + f (a[0]); +} |