Commit 106b15ea by Jason Merrill Committed by Jason Merrill

PR c++/84551 - ICE with concepts and -g.

	* parser.c (add_debug_begin_stmt): Do nothing in a concept.

From-SVN: r258009
parent b671df81
2018-02-26 Jason Merrill <jason@redhat.com>
PR c++/84551 - ICE with concepts and -g.
* parser.c (add_debug_begin_stmt): Do nothing in a concept.
2018-02-26 Marek Polacek <polacek@redhat.com> 2018-02-26 Marek Polacek <polacek@redhat.com>
PR c++/84325 PR c++/84325
......
...@@ -10699,6 +10699,9 @@ add_debug_begin_stmt (location_t loc) ...@@ -10699,6 +10699,9 @@ add_debug_begin_stmt (location_t loc)
{ {
if (!MAY_HAVE_DEBUG_MARKER_STMTS) if (!MAY_HAVE_DEBUG_MARKER_STMTS)
return; return;
if (DECL_DECLARED_CONCEPT_P (current_function_decl))
/* A concept is never expanded normally. */
return;
tree stmt = build0 (DEBUG_BEGIN_STMT, void_type_node); tree stmt = build0 (DEBUG_BEGIN_STMT, void_type_node);
SET_EXPR_LOCATION (stmt, loc); SET_EXPR_LOCATION (stmt, loc);
// PR c++/84551
// { dg-options "-g -O -std=c++17 -fconcepts" }
template<typename> concept bool C() { return true; }
template<template<typename T> requires C<T>() class> struct A {};
template<typename> requires true struct B {};
A<B> a;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment