Commit e4e5261f by Andrew Pinski Committed by Andrew Pinski

re PR c/34911 (ICE with vectors of bool)

2009-01-05  Andrew Pinski  <andrew_pinski@playstation.sony.com>

        PR c/34911
        * c-common.c (handle_vector_size_attribute): Also reject BOOLEAN_TYPE types.

2009-01-05  Andrew Pinski  <andrew_pinski@playstation.sony.com>

        PR c/34911
        * gcc.dg/vector-3.c: New testcase.
        * g++.dg/ext/vector15.C: New test.

From-SVN: r143099
parent 381009fe
2009-01-05 Andrew Pinski <andrew_pinski@playstation.sony.com>
PR c/34911
* c-common.c (handle_vector_size_attribute): Also reject BOOLEAN_TYPE types.
2009-01-05 Sebastian Pop <sebastian.pop@amd.com> 2009-01-05 Sebastian Pop <sebastian.pop@amd.com>
PR tree-optimization/38492 PR tree-optimization/38492
......
...@@ -6544,7 +6544,8 @@ handle_vector_size_attribute (tree *node, tree name, tree args, ...@@ -6544,7 +6544,8 @@ handle_vector_size_attribute (tree *node, tree name, tree args,
|| (!SCALAR_FLOAT_MODE_P (orig_mode) || (!SCALAR_FLOAT_MODE_P (orig_mode)
&& GET_MODE_CLASS (orig_mode) != MODE_INT && GET_MODE_CLASS (orig_mode) != MODE_INT
&& !ALL_SCALAR_FIXED_POINT_MODE_P (orig_mode)) && !ALL_SCALAR_FIXED_POINT_MODE_P (orig_mode))
|| !host_integerp (TYPE_SIZE_UNIT (type), 1)) || !host_integerp (TYPE_SIZE_UNIT (type), 1)
|| TREE_CODE (type) == BOOLEAN_TYPE)
{ {
error ("invalid vector type for attribute %qE", name); error ("invalid vector type for attribute %qE", name);
return NULL_TREE; return NULL_TREE;
......
2009-01-05 Andrew Pinski <andrew_pinski@playstation.sony.com>
PR c/34911
* gcc.dg/vector-3.c: New testcase.
* g++.dg/ext/vector15.C: New test.
2009-01-05 Harsha Jagasia <harsha.jagasia@amd.com> 2009-01-05 Harsha Jagasia <harsha.jagasia@amd.com>
PR tree-optimization/38510 PR tree-optimization/38510
......
/* { dg-do compile } */
/* Check that we error out when using vector_size on the bool type. */
__attribute__((vector_size(16) )) bool a; /* { dg-error "" } */
/* { dg-do compile } */
/* Check that we error out when using vector_size on the bool type. */
__attribute__((vector_size(16) )) _Bool a; /* { dg-error "" } */
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