Don't ICE on vectors of enums (PR 87286)
authorRichard Sandiford <richard.sandiford@arm.com>
Mon, 8 Oct 2018 08:16:13 +0000 (08:16 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Mon, 8 Oct 2018 08:16:13 +0000 (08:16 +0000)
commit8656dafa39de8e537940433220e8f5db3bf7a614
tree165aa7158bf1941139ea902e141af4b3c83f48ba
parent090680870b633853e40a750036dab2b3df63dd18
Don't ICE on vectors of enums (PR 87286)

We've traditionally allowed vectors of enums (not sure if that's
deliberate) but vector_types_compatible_elements_p checked for
INTEGER_TYPE rather than INTEGRAL_TYPE_P.

2018-10-08  Richard Sandiford  <richard.sandiford@arm.com>

gcc/c-family/
PR c/87286
* c-common.c (vector_types_compatible_elements_p): Use
INTEGRAL_TYPE_P instead of checking only for INTEGER_TYPE.

gcc/testsuite/
PR c/87286
* gcc.dg/pr87286.c: New test.

From-SVN: r264913
gcc/c-family/ChangeLog
gcc/c-family/c-common.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/pr87286.c [new file with mode: 0644]