re PR c++/67108 (ICE: in cxx_eval_call_expression, at cp/constexpr.c:1345 when dumping)
PR c++/67108 * decl2.c (c_parse_final_cleanups): Set at_eof to 2 at end. * error.c (dump_template_bindings): Don't tsubst in that case. From-SVN: r226829
This commit is contained in:
parent
a024f5143d
commit
e5e58dbe28
|
@ -1,5 +1,9 @@
|
|||
2015-08-12 Jason Merrill <jason@redhat.com>
|
||||
|
||||
PR c++/67108
|
||||
* decl2.c (c_parse_final_cleanups): Set at_eof to 2 at end.
|
||||
* error.c (dump_template_bindings): Don't tsubst in that case.
|
||||
|
||||
PR c++/67161
|
||||
* error.c (dump_decl) [TEMPLATE_ID_EXPR]: Pass
|
||||
TFF_NO_OMIT_DEFAULT_TEMPLATE_ARGUMENTS.
|
||||
|
|
|
@ -4797,7 +4797,8 @@ extern GTY(()) vec<tree, va_gc> *local_classes;
|
|||
#endif /* !defined(NO_DOLLAR_IN_LABEL) || !defined(NO_DOT_IN_LABEL) */
|
||||
|
||||
|
||||
/* Nonzero if we're done parsing and into end-of-file activities. */
|
||||
/* Nonzero if we're done parsing and into end-of-file activities.
|
||||
Two if we're done with front-end processing. */
|
||||
|
||||
extern int at_eof;
|
||||
|
||||
|
|
|
@ -4846,6 +4846,9 @@ c_parse_final_cleanups (void)
|
|||
|
||||
timevar_stop (TV_PHASE_DEFERRED);
|
||||
timevar_start (TV_PHASE_PARSING);
|
||||
|
||||
/* Indicate that we're done with front end processing. */
|
||||
at_eof = 2;
|
||||
}
|
||||
|
||||
/* Perform any post compilation-proper cleanups for the C++ front-end.
|
||||
|
|
|
@ -339,6 +339,11 @@ dump_template_bindings (cxx_pretty_printer *pp, tree parms, tree args,
|
|||
&& !DECL_LANG_SPECIFIC (current_function_decl))
|
||||
return;
|
||||
|
||||
/* Don't try to do this once cgraph starts throwing away front-end
|
||||
information. */
|
||||
if (at_eof >= 2)
|
||||
return;
|
||||
|
||||
FOR_EACH_VEC_SAFE_ELT (typenames, i, t)
|
||||
{
|
||||
if (need_semicolon)
|
||||
|
|
|
@ -0,0 +1,40 @@
|
|||
// PR c++/67108
|
||||
// { dg-do compile { target c++11 } }
|
||||
|
||||
template < typename, typename > struct is_same;
|
||||
template < typename T > struct is_same <T, T >
|
||||
{
|
||||
enum
|
||||
{
|
||||
value = true
|
||||
}
|
||||
;
|
||||
constexpr bool operator () ()
|
||||
{
|
||||
return value;
|
||||
}
|
||||
}
|
||||
;
|
||||
template < bool, typename = void >struct enable_if;
|
||||
template < typename T > struct enable_if <true, T >
|
||||
{
|
||||
typedef T type;
|
||||
}
|
||||
;
|
||||
struct A;
|
||||
template < typename, typename = void >struct F;
|
||||
template < typename X > struct F <X, typename enable_if < is_same < X, A >
|
||||
{
|
||||
}
|
||||
() >::type >
|
||||
{
|
||||
template < typename MakeDependent > F (MakeDependent)
|
||||
{
|
||||
}
|
||||
}
|
||||
;
|
||||
|
||||
int main ()
|
||||
{
|
||||
F < A > (1);
|
||||
}
|
Loading…
Reference in New Issue