[Bug target/126518] Execution FAIL of gcc.dg/constructor-1.c on cris-elf

"law at gcc dot gnu.org via Gcc-bugs" <[email protected]> Mon, 03 Aug 2026 21:50:40 +0000
Newsgroups gmane.comp.gcc.bugs
Message-ID <[email protected]/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D126518

Jeffrey A. Law <law at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hans-peter.nilsson at axis=
 dot com

--- Comment #1 from Jeffrey A. Law <law at gcc dot gnu.org> ---
My evaluation puts this problem in newlib rather than GCC.  In particular t=
his
change was identified by my bisection of this failure:

commit 637a7ddc4322ee57cf7810e52e31ac9b3c03f1b8
Author: Jan Dubiec <[email protected]>
Date:   Sun Jul 12 21:54:53 2026 +0200

    H8: Add support for preinit/init/fini array

    This patch adds support for .preinit_array, .init_array, and .fini_array
    for the H8 family when binutils and GCC are configured with
"--enable-initfini-array".

    The changes to init.c and fini.c ensure that linker-defined symbols
    referenced from C code are not affected by target-specific symbol naming
    conventions. For example, GCC for H8 prefixes external symbol names with
    an underscore, whereas GCC for ARM does not. The asm keyword is used to
    associate C identifiers with the corresponding linker-defined symbol na=
mes
    in a target-independent manner.

    The patch has been tested on H8 wher it enables support for the
    initialization and finalization arrays and on ARM in order to verify th=
at
    the changes do not introduce any regressions.

    Signed-off-by: Jan Dubiec <[email protected]>=