Commit 23856459 by Jakub Jelinek Committed by Jakub Jelinek

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
parent 13335ae6
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))
......
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
/* 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;
}
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