Commit 9ebced77 by Jakub Jelinek Committed by Jakub Jelinek

re PR c++/56543 (ICE on valid code in copy_node_stat)

	PR c++/56543
	* tree.c (strip_typedefs): Don't copy args if they are NULL.

	* g++.dg/template/typename20.C: New test.

From-SVN: r196491
parent 6632162b
2013-03-06 Jakub Jelinek <jakub@redhat.com>
PR c++/56543
* tree.c (strip_typedefs): Don't copy args if they are NULL.
2013-03-05 Jakub Jelinek <jakub@redhat.com> 2013-03-05 Jakub Jelinek <jakub@redhat.com>
* parser.c (cp_parser_braced_list): For {} initialize * parser.c (cp_parser_braced_list): For {} initialize
......
...@@ -1222,7 +1222,8 @@ strip_typedefs (tree t) ...@@ -1222,7 +1222,8 @@ strip_typedefs (tree t)
case TYPENAME_TYPE: case TYPENAME_TYPE:
{ {
tree fullname = TYPENAME_TYPE_FULLNAME (t); tree fullname = TYPENAME_TYPE_FULLNAME (t);
if (TREE_CODE (fullname) == TEMPLATE_ID_EXPR) if (TREE_CODE (fullname) == TEMPLATE_ID_EXPR
&& TREE_OPERAND (fullname, 1))
{ {
tree args = TREE_OPERAND (fullname, 1); tree args = TREE_OPERAND (fullname, 1);
tree new_args = copy_node (args); tree new_args = copy_node (args);
......
2013-03-06 Jakub Jelinek <jakub@redhat.com>
PR c++/56543
* g++.dg/template/typename20.C: New test.
2013-03-05 Jakub Jelinek <jakub@redhat.com> 2013-03-05 Jakub Jelinek <jakub@redhat.com>
PR debug/56510 PR debug/56510
......
// PR c++/56543
template <typename>
struct S;
template <typename T>
struct U
{
typedef typename S <T>::template V <> W;
S <W> x;
};
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