This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/51878] ICE or OOM with decltype + variadic templates + "indirect" function call
- From: "paolo.carlini at oracle dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 17 Jan 2012 11:28:43 +0000
- Subject: [Bug c++/51878] ICE or OOM with decltype + variadic templates + "indirect" function call
- Auto-submitted: auto-generated
- References: <bug-51878-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51878
Paolo Carlini <paolo.carlini at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jason at gcc dot gnu.org
--- Comment #2 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-01-17 11:28:43 UTC ---
If I apply the below patchlet (parts of it are probably sane changes anyway) I
see a clean ICE with template instantiation depth exceeded. Then I wonder if
modulo the small tweaks we have just a duplicate of, eg, PR51304.
Maybe Jason can help triaging... (thanks in advance)
//////////////////
Index: error.c
===================================================================
--- error.c (revision 183238)
+++ error.c (working copy)
@@ -2471,6 +2471,10 @@ dump_expr (tree t, int flags)
dump_expr (resolve_virtual_fun_from_obj_type_ref (t), flags);
break;
+ case NONTYPE_ARGUMENT_PACK:
+ dump_template_argument (t, flags);
+ break;
+
/* This list is incomplete, but should suffice for now.
It is very important that `sorry' does not call
`report_error_function'. That could cause an infinite loop. */
Index: mangle.c
===================================================================
--- mangle.c (revision 183238)
+++ mangle.c (working copy)
@@ -2319,6 +2319,9 @@ write_bare_function_type (const tree type, const i
{
int java_method_p;
+ if (type == error_mark_node)
+ return;
+
MANGLE_TRACE_TREE ("bare-function-type", type);
/* Detect Java methods and emit special encoding. */