This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Fix PR 34911, ICE with vectors of bool


Hi,
  A vector of bool does not make sense really because most of the
time, you really want a mask when dealing with vectors.  This patch
disables the attribute vector_size for boolean types (_Bool in C and
bool in C++).

OK? Bootstrapped and tested on x86_64-linux-gnu with no regressions.

Thanks,
Andrew Pinski

ChangeLog:

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

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

Attachment: fixvectorbool.diff.txt
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]