mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-21 05:30:24 +08:00
re PR c/29736 (ICE on duplicate vector attribute)
PR c/29736 * c-common.c (handle_vector_size_attribute): Disallow VECTOR_TYPE or UNION_TYPE inner types. * gcc.dg/pr29736.c: New test. From-SVN: r119165
This commit is contained in:
parent
13335ae664
commit
238564598b
@ -1,3 +1,9 @@
|
||||
2006-11-24 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR c/29736
|
||||
* c-common.c (handle_vector_size_attribute): Disallow VECTOR_TYPE
|
||||
or UNION_TYPE inner types.
|
||||
|
||||
2006-11-24 Andrew Pinski <andrew_pinski@playstation.sony.com>
|
||||
|
||||
PR tree-opt/29964
|
||||
|
@ -5450,6 +5450,8 @@ handle_vector_size_attribute (tree *node, tree name, tree args,
|
||||
orig_mode = TYPE_MODE (type);
|
||||
|
||||
if (TREE_CODE (type) == RECORD_TYPE
|
||||
|| TREE_CODE (type) == UNION_TYPE
|
||||
|| TREE_CODE (type) == VECTOR_TYPE
|
||||
|| (!SCALAR_FLOAT_MODE_P (orig_mode)
|
||||
&& GET_MODE_CLASS (orig_mode) != MODE_INT)
|
||||
|| !host_integerp (TYPE_SIZE_UNIT (type), 1))
|
||||
|
@ -1,3 +1,8 @@
|
||||
2006-11-24 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR c/29736
|
||||
* gcc.dg/pr29736.c: New test.
|
||||
|
||||
2006-11-24 Andrew Pinski <andrew_pinski@playstation.sony.com>
|
||||
|
||||
PR tree-opt/29964
|
||||
|
13
gcc/testsuite/gcc.dg/pr29736.c
Normal file
13
gcc/testsuite/gcc.dg/pr29736.c
Normal file
@ -0,0 +1,13 @@
|
||||
/* PR c/29736 */
|
||||
|
||||
int __attribute__ ((vector_size (8), vector_size (8))) v; /* { dg-error "invalid vector type" } */
|
||||
|
||||
extern int __attribute__ ((vector_size (8))) w;
|
||||
int __attribute__ ((vector_size (8))) w;
|
||||
|
||||
void
|
||||
foo ()
|
||||
{
|
||||
v = v + v;
|
||||
w = w + w;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user