re PR c++/34100 (ICE with vector attribute)
PR c++/34100 * pt.c (apply_late_template_attributes): Do nothing if decl's type is error_mark_node. * g++.dg/template/crash73.C: New test. From-SVN: r130220
This commit is contained in:
parent
b481444e66
commit
823e5f7f9f
4 changed files with 25 additions and 1 deletions
|
@ -1,3 +1,9 @@
|
|||
2007-11-16 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR c++/34100
|
||||
* pt.c (apply_late_template_attributes): Do nothing if decl's type is
|
||||
error_mark_node.
|
||||
|
||||
2007-11-13 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR c++/34054
|
||||
|
|
|
@ -6622,7 +6622,11 @@ apply_late_template_attributes (tree *decl_p, tree attributes, int attr_flags,
|
|||
}
|
||||
|
||||
if (DECL_P (*decl_p))
|
||||
p = &DECL_ATTRIBUTES (*decl_p);
|
||||
{
|
||||
if (TREE_TYPE (*decl_p) == error_mark_node)
|
||||
return;
|
||||
p = &DECL_ATTRIBUTES (*decl_p);
|
||||
}
|
||||
else
|
||||
p = &TYPE_ATTRIBUTES (*decl_p);
|
||||
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2007-11-16 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR c++/34100
|
||||
* g++.dg/template/crash73.C: New test.
|
||||
|
||||
2007-11-15 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR middle-end/23848
|
||||
|
|
9
gcc/testsuite/g++.dg/template/crash73.C
Normal file
9
gcc/testsuite/g++.dg/template/crash73.C
Normal file
|
@ -0,0 +1,9 @@
|
|||
// PR c++/34100
|
||||
// { dg-do compile }
|
||||
|
||||
template<typename T> struct A
|
||||
{
|
||||
typedef typename T::X Y __attribute__((vector_size(8))); // { dg-error "is not a class, struct" }
|
||||
};
|
||||
|
||||
A<int> a;
|
Loading…
Add table
Reference in a new issue