]> gcc.gnu.org Git - gcc.git/commit
[PATCH, rs6000] Fix vector long long subtype (PR96139)
authorWill Schmidt <will_schmidt@vnet.ibm.com>
Tue, 15 Sep 2020 20:06:08 +0000 (15:06 -0500)
committerWill Schmidt <will_schmidt@vnet.ibm.com>
Tue, 15 Sep 2020 21:45:24 +0000 (16:45 -0500)
commit04a9b796436c68a07c052805631e962a1126dcca
treee0544e4dfb5b3929ec5fdef739227298960cbb2d
parentd0a094ce39fc49681b0d5cfd2ee1d232859c4824
[PATCH, rs6000] Fix vector long long subtype (PR96139)

Hi,
  This corrects an issue with the powerpc vector long long subtypes.
As reported by SjMunroe, when building some code with -Wall, and
attempting to print an element of a "long long vector" with a
long long printf format string, we will report an error because
the vector sub-type was improperly defined as int.

When defining a V2DI_type_node we use a TARGET_POWERPC64 ternary to
define the V2DI_type_node with "vector long" or "vector long long".
We also need to specify the proper sub-type when we define the type.

Due to some file renames, This is a backport and rework of both
    [PATCH, rs6000] Fix vector long long subtype (PR96139)
and
    [PATCH, rs6000] Testsuite fixup pr96139 tests

PR target/96139

2020-09-03  Will Schmidt  <will_schmidt@vnet.ibm.com>

gcc/ChangeLog:
* config/rs6000/rs6000.c (rs6000_init_builtin): Update V2DI_type_node
and unsigned_V2DI_type_node definitions.

gcc/testsuite/ChangeLog:
* gcc.target/powerpc/pr96139-a.c: New test.
* gcc.target/powerpc/pr96139-b.c: New test.
* gcc.target/powerpc/pr96139-c.c: New test.
gcc/config/rs6000/rs6000.c
gcc/testsuite/gcc.target/powerpc/pr96139-a.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/pr96139-b.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/pr96139-c.c [new file with mode: 0644]
This page took 0.066586 seconds and 6 git commands to generate.