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

--- Comment #2 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Alice Carlotti <[email protected]>:

https://gcc.gnu.org/g:b41352c7aa2645de6c5751d447589c2ef8c4fa4d

commit r17-3185-gb41352c7aa2645de6c5751d447589c2ef8c4fa4d
Author: Alice Carlotti <[email protected]>
Date:   Fri Aug 7 17:56:49 2026 +0100

    aarch64: Fix -march=native when -mtune is used [PR124629]

    Handling of -march=native for recognised cores was broken by
    r13-2937-g00c22ba69d8e73, which added "V" to ARCH_IDENT values and
    filtered it out in some locations.  This causes a lookup by stringified
    ARCH_IDENT values to fail.  If no -mtune or -mcpu option is used, then
    we avoid this bug by upgrading -march=native to -mcpu=native.

    Fix this by removing the '+ 1' string offset, so that the ident strings
    match again.  It would be marginally more efficient to use enum values
    here, but I've stuck with this simpler fix instead.

    gcc/ChangeLog:

            PR target/124629
            * config/aarch64/driver-aarch64.cc (AARCH64_ARCH):
            Don't skip first character of #ARCH_IDENT.

    gcc/testsuite/ChangeLog:

            PR target/124629
            * gcc.target/aarch64/cpunative/info_36: New test file.
            * gcc.target/aarch64/cpunative/native_cpu_36.c: New test.

Reply via email to