[C++ PATCH] Fix up strip_typedefs (PR debug/56819)

2013-04-03 Thread Jakub Jelinek
Hi! On the following testcase we ICE with -fcompare-debug with --enable-checking=yes, because strip_typedefs copies args to a new TREE_VEC, but doesn't copy over NON_DEFAULT_TEMPLATE_ARGS_COUNT. For ENABLE_CHECKING the code requires that it is set, for !ENABLE_CHECKING it would be needed only if

Re: [C++ PATCH] Fix up strip_typedefs (PR debug/56819)

2013-04-03 Thread Gabriel Dos Reis
On Wed, Apr 3, 2013 at 7:36 AM, Jakub Jelinek ja...@redhat.com wrote: Hi! On the following testcase we ICE with -fcompare-debug with --enable-checking=yes, because strip_typedefs copies args to a new TREE_VEC, but doesn't copy over NON_DEFAULT_TEMPLATE_ARGS_COUNT. For ENABLE_CHECKING the

Re: [C++ PATCH] Fix up strip_typedefs (PR debug/56819)

2013-04-03 Thread Jason Merrill
We should be able to just copy NON_DEFAULT_TEMPLATE_ARGS_COUNT over rather than mess with looking into and building an INTEGER_CST. Jason

Re: [C++ PATCH] Fix up strip_typedefs (PR debug/56819)

2013-04-03 Thread Jakub Jelinek
On Wed, Apr 03, 2013 at 08:38:01AM -0500, Gabriel Dos Reis wrote: 2013-04-03 Jakub Jelinek ja...@redhat.com PR debug/56819 * tree.c (strip_typedefs): SET_NON_DEFAULT_TEMPLATE_ARGS_COUNT on new_args. * g++.dg/debug/pr56819.C: New test. ---

Re: [C++ PATCH] Fix up strip_typedefs (PR debug/56819)

2013-04-03 Thread Jakub Jelinek
On Wed, Apr 03, 2013 at 09:43:01AM -0400, Jason Merrill wrote: We should be able to just copy NON_DEFAULT_TEMPLATE_ARGS_COUNT over rather than mess with looking into and building an INTEGER_CST. So is this ok instead? 2013-04-03 Jakub Jelinek ja...@redhat.com PR debug/56819

Re: [C++ PATCH] Fix up strip_typedefs (PR debug/56819)

2013-04-03 Thread Jason Merrill
OK. Jason

Re: [C++ PATCH] Fix up strip_typedefs (PR debug/56819)

2013-04-03 Thread Gabriel Dos Reis
Though, as INTEGER_CSTs should be shared, perhaps this could be just NON_DEFAULT_TEMPLATE_ARGS_COUNT (new_args) = NON_DEFAULT_TEMPLATE_ARGS_COUNT (args); Yes, thanks! and strip_typedefs_expr could be changed to do the same thing.