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

--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Richard Earnshaw
<rearn...@gcc.gnu.org>:

https://gcc.gnu.org/g:0faee8bae391fab7e1ba4a494360dd9793e15fb5

commit r11-8473-g0faee8bae391fab7e1ba4a494360dd9793e15fb5
Author: Richard Earnshaw <rearn...@arm.com>
Date:   Thu May 27 10:25:37 2021 +0100

    arm: Remove use of opts_set in arm_configure_build_target [PR100767]

    The variable global_options_set is a reflection of which options have
    been explicitly set from the command line in the structure
    global_options.  But it doesn't describe the contents of a
    cl_target_option.  cl_target_option is a set of options to apply and
    once configured should represent a viable set of options without
    needing to know which were explicitly set by the user.

    Unfortunately arm_configure_build_target was incorrectly conflating
    the two.  Fortunately, however, we do not really need to know this
    since the various override_options functions should have sanitized the
    target_options values before constructing a cl_target_option
    structure.  It is safe, therefore, to simply drop this parameter to
    arm_configure_build_target and rely on checking that various string
    parameters are non-null before dereferencing them.

    gcc:

            PR target/100767
            * config/arm/arm.c (arm_configure_build_target): Remove parameter
            opts_set, directly check opts parameters for being non-null.
            (arm_option_restore): Update call to arm_configure_build_target.
            (arm_option_override): Likewise.
            (arm_can_inline_p): Likewise.
            (arm_valid_target_attribute_tree): Likewise.
            * config/arm/arm-c.c (arm_pragma_target_parse): Likewise.
            * config/arm/arm-protos.h (arm_configure_build_target): Adjust
            prototype.

    (cherry picked from commit 262e75d22c350acbdf4c1fb4f224cc5d3d711eff)

Reply via email to