This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/34911] [4.1/4.2/4.3 regression] ICE with vectors of bool
- From: "tromey at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 22 Jan 2008 21:51:51 -0000
- Subject: [Bug c/34911] [4.1/4.2/4.3 regression] ICE with vectors of bool
- References: <bug-34911-1771@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from tromey at gcc dot gnu dot org 2008-01-22 21:51 -------
It is easy to reject bools, but I wonder if that is enough.
It is interesting that handle_vector_size_attribute doesn't
call vector_mode_valid_p, but the corresponding mode attribute does.
Anyway, I can regtest & submit this if you think it is what we want.
Index: c-common.c
===================================================================
--- c-common.c (revision 131731)
+++ c-common.c (working copy)
@@ -6044,7 +6044,8 @@
|| (!SCALAR_FLOAT_MODE_P (orig_mode)
&& GET_MODE_CLASS (orig_mode) != MODE_INT
&& !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);
return NULL_TREE;
--
tromey at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |tromey at gcc dot gnu dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34911