From 53f3c1a103d3939c1bf72361830280fa621d528a Mon Sep 17 00:00:00 2001 From: Marek Polacek Date: Fri, 11 Oct 2019 20:53:26 +0000 Subject: [PATCH] PR c++/92070 - bogus error with -fchecking=2. * g++.dg/expr/cond17.C: New test. From-SVN: r276907 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/g++.dg/expr/cond17.C | 11 +++++++++++ 2 files changed, 16 insertions(+) create mode 100644 gcc/testsuite/g++.dg/expr/cond17.C 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(); } +}; -- 2.30.2