diff options
author | Lorry Tar Creator <lorry-tar-importer@lorry> | 2016-08-22 10:27:46 +0000 |
---|---|---|
committer | Lorry Tar Creator <lorry-tar-importer@lorry> | 2016-08-22 10:27:46 +0000 |
commit | f733cf303bcdc952c92b81dd62199a40a1f555ec (patch) | |
tree | 0a9a9e0f28aa7c7f5bc4d1d1d0e9647163cac4f7 /gcc/testsuite/g++.dg/pr71624.C | |
parent | e0e4357b88efe5dc53e50d341a09de4d02331200 (diff) | |
download | gcc-tarball-gcc-6.2.0.tar.gz |
gcc-6.2.0gcc-6.2.0
Diffstat (limited to 'gcc/testsuite/g++.dg/pr71624.C')
-rw-r--r-- | gcc/testsuite/g++.dg/pr71624.C | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/pr71624.C b/gcc/testsuite/g++.dg/pr71624.C new file mode 100644 index 0000000000..94a75cd4c4 --- /dev/null +++ b/gcc/testsuite/g++.dg/pr71624.C @@ -0,0 +1,35 @@ +/* PR71624 */ +// { dg-do compile { target i?86-*-* x86_64-*-* } } +/* { dg-options "-fcheck-pointer-bounds -mmpx -O2" } */ + +class c1 +{ +public: + virtual int fn1 () const; + int fn2 (const int *) const; +}; + +class c2 +{ + int fn1 (); + c1 obj; +}; + +int +c1::fn1 () const +{ + return 0; +} + +int +c1::fn2 (const int *) const +{ + return this->fn1 (); +} + +int +c2::fn1 () +{ + return obj.fn2 (0); +} + |