https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97349
Bug ID: 97349
Summary: Incorrect types for some Neon vdupq_n_<...> intrinsics
Product: gcc
Version: 11.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: david.spickett at linaro dot org
Target Milestone: ---
Created attachment 49337
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49337&action=edit
test C file
The attached file has function pointers with the expected types for these
intrinsics as shown in the ACLE.
https://developer.arm.com/architectures/instruction-sets/simd-isas/neon/intrinsics?search=vdupq_n_
This fails to compile because some of the intrinsic types are incorrect.
(I haven't included all the vdupq_n_, just the ones that have issues)
$ ./aarch64-none-elf-gcc -v
Using built-in specs.
COLLECT_GCC=./aarch64-none-elf-gcc
COLLECT_LTO_WRAPPER=/arm/pdtl/builds/fsf-trunk.2226/installed/rhe6x86_64/aarch64-none-elf/bin/../libexec/gcc/aarch64-none-elf/11.0.0/lto-wrapper
Target: aarch64-none-elf
Configured with:
/tmp/dgboter/bbs/rhev-vm4--rhe6x86_64/buildbot/rhe6x86_64--aarch64-none-elf/build/src/gcc/configure
--target=aarch64-none-elf
--prefix=/tmp/dgboter/bbs/rhev-vm4--rhe6x86_64/buildbot/rhe6x86_64--aarch64-none-elf/build/build-aarch64-none-elf/install//
--with-gmp=/tmp/dgboter/bbs/rhev-vm4--rhe6x86_64/buildbot/rhe6x86_64--aarch64-none-elf/build/build-aarch64-none-elf/host-tools
--with-mpfr=/tmp/dgboter/bbs/rhev-vm4--rhe6x86_64/buildbot/rhe6x86_64--aarch64-none-elf/build/build-aarch64-none-elf/host-tools
--with-mpc=/tmp/dgboter/bbs/rhev-vm4--rhe6x86_64/buildbot/rhe6x86_64--aarch64-none-elf/build/build-aarch64-none-elf/host-tools
--with-isl=/tmp/dgboter/bbs/rhev-vm4--rhe6x86_64/buildbot/rhe6x86_64--aarch64-none-elf/build/build-aarch64-none-elf/host-tools
--disable-shared --disable-nls --disable-threads --disable-tls
--enable-checking=yes --enable-languages=c,c++,fortran --with-newlib
--with-pkgversion=fsf-trunk.2226
Thread model: single
Supported LTO compression algorithms: zlib
gcc version 11.0.0 20200609 (experimental) (fsf-trunk.2226)
$ ./aarch64-none-elf-gcc /tmp/test.c -Wall -Wextra -c -o /dev/null
/tmp/test.c:3:32: warning: initialization of 'poly16x8_t (*)(poly16_t)' {aka
'poly16x8_t (*)(__Poly16_t)'} from incompatible pointer type 'poly16x8_t
(*)(uint32_t)' {aka 'poly16x8_t (*)(unsigned int)'}
[-Wincompatible-pointer-types]
3 | poly16x8_t (*fp0)(poly16_t) = vdupq_n_p16;
| ^~~~~~~~~~~
/tmp/test.c:4:32: warning: initialization of 'poly64x2_t (*)(poly64_t)' {aka
'poly64x2_t (*)(__Poly64_t)'} from incompatible pointer type 'poly64x2_t
(*)(uint64_t)' {aka 'poly64x2_t (*)(long unsigned int)'}
[-Wincompatible-pointer-types]
4 | poly64x2_t (*fp1)(poly64_t) = vdupq_n_p64;
| ^~~~~~~~~~~
/tmp/test.c:5:32: warning: initialization of 'poly8x16_t (*)(poly8_t)' {aka
'poly8x16_t (*)(__Poly8_t)'} from incompatible pointer type 'poly8x16_t
(*)(uint32_t)' {aka 'poly8x16_t (*)(unsigned int)'}
[-Wincompatible-pointer-types]
5 | poly8x16_t (*fp2)(poly8_t) = vdupq_n_p8;
| ^~~~~~~~~~
/tmp/test.c:6:32: warning: initialization of 'int16x8_t (*)(int16_t)' {aka
'int16x8_t (*)(short int)'} from incompatible pointer type 'int16x8_t
(*)(int32_t)' {aka 'int16x8_t (*)(int)'} [-Wincompatible-pointer-types]
6 | int16x8_t (*fp3)(int16_t) = vdupq_n_s16;
| ^~~~~~~~~~~
/tmp/test.c:7:32: warning: initialization of 'int8x16_t (*)(int8_t)' {aka
'int8x16_t (*)(signed char)'} from incompatible pointer type 'int8x16_t
(*)(int32_t)' {aka 'int8x16_t (*)(int)'} [-Wincompatible-pointer-types]
7 | int8x16_t (*fp4)(int8_t) = vdupq_n_s8;
| ^~~~~~~~~~
/tmp/test.c:8:32: warning: initialization of 'uint16x8_t (*)(uint16_t)' {aka
'uint16x8_t (*)(short unsigned int)'} from incompatible pointer type
'uint16x8_t (*)(uint32_t)' {aka 'uint16x8_t (*)(unsigned int)'}
[-Wincompatible-pointer-types]
8 | uint16x8_t (*fp5)(uint16_t) = vdupq_n_u16;
| ^~~~~~~~~~~
/tmp/test.c:9:32: warning: initialization of 'uint8x16_t (*)(uint8_t)' {aka
'uint8x16_t (*)(unsigned char)'} from incompatible pointer type 'uint8x16_t
(*)(uint32_t)' {aka 'uint8x16_t (*)(unsigned int)'}
[-Wincompatible-pointer-types]
9 | uint8x16_t (*fp6)(uint8_t) = vdupq_n_u8;
| ^~~~~~~~~~