From: Marek Polacek Date: Fri, 11 Oct 2019 20:53:26 +0000 (+0000) Subject: PR c++/92070 - bogus error with -fchecking=2. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=53f3c1a103d3939c1bf72361830280fa621d528a;p=gcc.git PR c++/92070 - bogus error with -fchecking=2. * g++.dg/expr/cond17.C: New test. From-SVN: r276907 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index bbcea404db4..dadb4425cc9 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-10-11 Marek Polacek + + PR c++/92070 - bogus error with -fchecking=2. + * g++.dg/expr/cond17.C: New test. + 2019-10-11 Marek Polacek PR c++/92049 - extra error with -fchecking=2. diff --git a/gcc/testsuite/g++.dg/expr/cond17.C b/gcc/testsuite/g++.dg/expr/cond17.C new file mode 100644 index 00000000000..1999c376dd1 --- /dev/null +++ b/gcc/testsuite/g++.dg/expr/cond17.C @@ -0,0 +1,11 @@ +// PR c++/92070 - bogus error with -fchecking=2. +// { dg-additional-options "-fchecking=2" } + +struct a; +struct b { + static a c(); +}; +struct a : b {}; +template struct d { + void e() { 0 ? b() : b::c(); } +};