diff mbox

[C++] PR 80186 ("ICE on C++ code with invalid constructor...")

Message ID CADzB+2kAMkO-w=aTawnw_k-P4JHFQKLF2HG0tMng5oT1NuyNbQ@mail.gmail.com
State New
Headers show

Commit Message

Jason Merrill May 10, 2017, 3:53 p.m. UTC
> On Mon, May 8, 2017 at 7:25 AM, Paolo Carlini <paolo.carlini@oracle.com> wrote:
>> in order to avoid this error recovery issue I think we want to check the
>> return value of grok_ctor_properties, as we do in decl.c, for its only other
>> use. Tested x86_64-linux.

The new testcase fails with -std=c++1z because the rvalue directly
initializes the parameter, so we don't get the second error.  Fixing
thus.

Jason
commit 6a6c7d18384241ce7b7a9a23490e074b196b8ef9
Author: Jason Merrill <jason@redhat.com>
Date:   Wed May 10 11:14:28 2017 -0400

    * g++.dg/template/crash126.C: Second error doesn't apply to C++17.
diff mbox

Patch

diff --git a/gcc/testsuite/g++.dg/template/crash126.C b/gcc/testsuite/g++.dg/template/crash126.C
index 8a3112e..903cab8 100644
--- a/gcc/testsuite/g++.dg/template/crash126.C
+++ b/gcc/testsuite/g++.dg/template/crash126.C
@@ -9,5 +9,5 @@  template < class T, class > struct A
 
 void f () 
 {
-  A < int, int > (A < int, int >());  // { dg-error "cannot bind" }
+  A < int, int > (A < int, int >());  // { dg-error "cannot bind" "" { target c++14_down } }
 }