[Bug target/96139] Vector element extract mistypes long long int down to long int

cvs-commit at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Sep 16 16:28:45 GMT 2020


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96139

--- Comment #11 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-8 branch has been updated by Will Schmidt
<willschm@gcc.gnu.org>:

https://gcc.gnu.org/g:74c624523bdbe4329c7cb77bff222ac695e36c95

commit r8-10453-g74c624523bdbe4329c7cb77bff222ac695e36c95
Author: Will Schmidt <will_schmidt@vnet.ibm.com>
Date:   Wed Sep 16 11:21:04 2020 -0500

    [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

    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.


More information about the Gcc-bugs mailing list