Mercurial > hg > CbC > CbC_gcc
diff gcc/testsuite/g++.dg/ipa/pr91956.C @ 145:1830386684a0
gcc-9.2.0
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 11:34:05 +0900 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gcc/testsuite/g++.dg/ipa/pr91956.C Thu Feb 13 11:34:05 2020 +0900 @@ -0,0 +1,27 @@ +/* { dg-do compile } */ +/* { dg-options "-Os -std=c++11 -fno-strict-aliasing -fno-tree-fre -fno-tree-vrp" } */ + +int count = 0; +struct VB +{ + VB() {++count;} +}; + +struct B : virtual VB +{ + B() : B(42) {} + B(int) {} +}; + +struct D : B +{ + D() {} + D(int) : D() {} +}; + +int main() +{ + D d{42}; + if (count != 1) + __builtin_abort(); +}