Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/g++.dg/torture/pr59265.C @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children |
rev | line source |
---|---|
111 | 1 // { dg-do compile } |
131 | 2 // { dg-options "-fprofile-use -std=gnu++11 -Wno-return-type -Wno-missing-profile" } |
111 | 3 |
4 class A { | |
5 int m_fn1() const; | |
6 unsigned m_fn2() const; | |
7 }; | |
8 class B { | |
9 public: | |
10 virtual void m_fn1(); | |
11 }; | |
12 class C final : B { | |
13 C(); | |
14 virtual void m_fn2() { m_fn1(); } | |
15 }; | |
16 int a; | |
17 unsigned A::m_fn2() const { | |
18 if (m_fn1()) | |
19 return 0; | |
20 a = m_fn2(); | |
21 } | |
22 C::C() {} |