On Fri, Oct 05, 2018 at 01:48:24PM +0100, Richard Sandiford wrote: > 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. > > Tested on aarch64-linux-gnu. OK to install? > > Richard > > > 2018-10-05 Richard Sandiford <richard.sandif...@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.
This testcase fails on i686-linux (unless configured to default to -msse2): Executing on host: /home/jakub/src/gcc/obj27/gcc/xgcc -B/home/jakub/src/gcc/obj27/gcc/ /home/jakub/src/gcc/gcc/testsuite/gcc.dg/pr87286.c -fno-diagnostics-show-caret -fno-diagnostics-show-line-numbers -fdiagnostics-color=never -ansi -pedantic-errors -S -o pr87286.s (timeout = 300) spawn -ignore SIGHUP /home/jakub/src/gcc/obj27/gcc/xgcc -B/home/jakub/src/gcc/obj27/gcc/ /home/jakub/src/gcc/gcc/testsuite/gcc.dg/pr87286.c -fno-diagnostics-show-caret -fno-diagnostics-show-line-numbers -fdiagnostics-color=never -ansi -pedantic-errors -S -o pr87286.s /home/jakub/src/gcc/gcc/testsuite/gcc.dg/pr87286.c: In function 'add': /home/jakub/src/gcc/gcc/testsuite/gcc.dg/pr87286.c:3:1: warning: SSE vector return without SSE enabled changes the ABI [-Wpsabi] /home/jakub/src/gcc/gcc/testsuite/gcc.dg/pr87286.c:3:9: note: The ABI for passing parameters with 16-byte alignment has changed in GCC 4.6 /home/jakub/src/gcc/gcc/testsuite/gcc.dg/pr87286.c:3:9: warning: SSE vector argument without SSE enabled changes the ABI [-Wpsabi] FAIL: gcc.dg/pr87286.c (test for excess errors) Excess errors: /home/jakub/src/gcc/gcc/testsuite/gcc.dg/pr87286.c:3:1: warning: SSE vector return without SSE enabled changes the ABI [-Wpsabi] /home/jakub/src/gcc/gcc/testsuite/gcc.dg/pr87286.c:3:9: warning: SSE vector argument without SSE enabled changes the ABI [-Wpsabi] Fixed thusly, committed as obvious: 2018-10-10 Jakub Jelinek <ja...@redhat.com> PR c/87286 * gcc.dg/pr87286.c: Add -Wno-psabi to dg-options. --- gcc/testsuite/gcc.dg/pr87286.c.jj 2018-10-08 15:18:28.923990456 +0200 +++ gcc/testsuite/gcc.dg/pr87286.c 2018-10-10 10:59:15.111698976 +0200 @@ -1,3 +1,4 @@ +/* { dg-options "-Wno-psabi" } */ enum foo { F }; typedef enum foo vec_foo __attribute__((vector_size (16))); vec_foo add (vec_foo x, vec_foo y) { return x + y; } Jakub