public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/97349] New: Incorrect types for some Neon vdupq_n_<...> intrinsics
@ 2020-10-09  9:15 david.spickett at linaro dot org
  2020-10-09  9:47 ` [Bug target/97349] Incorrect types for some Arm " ktkachov at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: david.spickett at linaro dot org @ 2020-10-09  9:15 UTC (permalink / raw)
  To: gcc-bugs

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;
      |                                ^~~~~~~~~~

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2020-10-13 11:28 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-09  9:15 [Bug target/97349] New: Incorrect types for some Neon vdupq_n_<...> intrinsics david.spickett at linaro dot org
2020-10-09  9:47 ` [Bug target/97349] Incorrect types for some Arm " ktkachov at gcc dot gnu.org
2020-10-09 16:31 ` [Bug target/97349] Incorrect types for some AArch64 " ktkachov at gcc dot gnu.org
2020-10-10 15:11 ` ktkachov at gcc dot gnu.org
2020-10-12 10:55 ` cvs-commit at gcc dot gnu.org
2020-10-12 16:38 ` cvs-commit at gcc dot gnu.org
2020-10-13 10:31 ` cvs-commit at gcc dot gnu.org
2020-10-13 11:27 ` cvs-commit at gcc dot gnu.org
2020-10-13 11:28 ` ktkachov at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).