From a5bfbcc85c030d2ae6efeca8224c587ef3beb2b7 Mon Sep 17 00:00:00 2001 From: Marek Polacek Date: Tue, 25 Sep 2018 18:02:47 +0000 Subject: [PATCH] re PR c++/87425 (ICE with virtual assignment operator) PR c++/87425 * g++.dg/cpp2a/constexpr-virtual12.C: New test. From-SVN: r264581 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/g++.dg/cpp2a/constexpr-virtual12.C | 15 +++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 gcc/testsuite/g++.dg/cpp2a/constexpr-virtual12.C diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 68f1c3d9a2b..90f54494ae9 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2018-09-25 Marek Polacek + + PR c++/87425 + * g++.dg/cpp2a/constexpr-virtual12.C: New test. + 2018-09-25 Jakub Jelinek PR c++/87398 diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-virtual12.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-virtual12.C new file mode 100644 index 00000000000..8f28ecadc68 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-virtual12.C @@ -0,0 +1,15 @@ +// PR c++/87425 +// P1064R0 +// { dg-do compile } +// { dg-options "-std=c++2a" } + +struct A +{ + virtual A& operator= (int); +}; + +struct B +{ + A a; + B() { a = 0; } +}; -- 2.30.2