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

--- Comment #8 from Tamar Christina <tnfchris at gcc dot gnu.org> ---
Author: tnfchris
Date: Wed Mar  6 09:34:04 2019
New Revision: 269412

URL: https://gcc.gnu.org/viewcvs?rev=269412&root=gcc&view=rev
Log:
AArch64: Have empty HWCAPs string ignored during native feature detection.

This patch makes the feature detection code for AArch64 GCC not add features
automatically when the feature had no hwcaps string to match against.

This means that -mcpu=native no longer adds feature flags such as +profile.
The behavior wasn't noticed before because at the time +profile was added a bug
was preventing any feature bits from being added by native detections.

The loop has also been changed as Jakub specified in order to avoid a memory
leak that was present in the existing code and to be slightly more efficient.

gcc/ChangeLog:

        Backport from trunk.
        2019-02-28  Tamar Christina  <tamar.christ...@arm.com>

        PR target/88530
        * config/aarch64/aarch64-option-extensions.def: Document it.
        * config/aarch64/driver-aarch64.c (host_detect_local_cpu): Skip feature
        if empty hwcaps.

gcc/testsuite/ChangeLog:

        Backport from trunk.
        2019-02-28  Tamar Christina  <tamar.christ...@arm.com>

        PR target/88530
        * gcc.target/aarch64/options_set_10.c: New test.


Added:
    branches/gcc-8-branch/gcc/testsuite/gcc.target/aarch64/options_set_10.c
Modified:
    branches/gcc-8-branch/gcc/ChangeLog
    branches/gcc-8-branch/gcc/config/aarch64/aarch64-option-extensions.def
    branches/gcc-8-branch/gcc/config/aarch64/driver-aarch64.c
    branches/gcc-8-branch/gcc/testsuite/ChangeLog

Reply via email to