[Bug target/104380] -D_FORTIFY_SOURCE -mabi=ieeelongdouble -std=c* wrong-code

cvs-commit at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Feb 4 17:31:41 GMT 2022


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

--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>:

https://gcc.gnu.org/g:8d6fffc4bcd4afa0beb0efad4f3b95394aa15618

commit r12-7059-g8d6fffc4bcd4afa0beb0efad4f3b95394aa15618
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Fri Feb 4 18:30:59 2022 +0100

    rs6000: Fix up -D_FORTIFY_SOURCE* with -mabi=ieeelongdouble [PR104380]

    The following testcase FAILs when configured with
    --with-long-double-format=ieee .  Only happens in the -std=c* modes, not
the
    GNU modes; while the glibc headers have __asm redirects of
    vsnprintf and __vsnprinf_chk to __vsnprintfieee128 and
    __vsnprintf_chkieee128, the vsnprintf fortification extern inline
gnu_inline
    always_inline wrapper calls __builtin_vsnprintf_chk and we actually emit
    a call to __vsnprinf_chk (i.e. with IBM extended long double) instead of
    __vsnprintf_chkieee128.

    rs6000_mangle_decl_assembler_name already had cases for *printf and *scanf,
    so this just adds another case for *printf_chk.  *scanf_chk doesn't exist.
    __ prefixing isn't done because *printf_chk already starts with __.

    2022-02-04  Jakub Jelinek  <jakub@redhat.com>

            PR target/104380
            * config/rs6000/rs6000.cc (rs6000_mangle_decl_assembler_name): Also
            adjust mangling of __builtin*printf_chk.

            * gcc.dg/pr104380.c: New test.


More information about the Gcc-bugs mailing list