diff options
Diffstat (limited to 'gcc/testsuite/g++.dg')
-rw-r--r-- | gcc/testsuite/g++.dg/lto/pr62026.C | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/lto/pr62026.C b/gcc/testsuite/g++.dg/lto/pr62026.C new file mode 100644 index 00000000000..63766a85b98 --- /dev/null +++ b/gcc/testsuite/g++.dg/lto/pr62026.C @@ -0,0 +1,22 @@ +// { dg-lto-do link } +// { dg-lto-options {{-flto -O3 -r -nostdlib}} } +class C; +class F { + virtual C m_fn1(); +}; +class C { + public: + virtual int *m_fn3(int); +}; +class G : F, C { + int offsets; + int *m_fn3(int); +}; +C *a; +int *G::m_fn3(int) { + if (offsets) return 0; +} + +void fn1() { + for (;;) a->m_fn3(0); +} |