From: marxin Date: Fri, 11 Dec 2015 10:59:29 +0000 (+0000) Subject: Fix PR target/67484 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7c257960eed9ce842e874b68beea1b3a5fa40cc8;p=thirdparty%2Fgcc.git Fix PR target/67484 Uros Bizjak PR target/67484 * config/i386/i386.c (ix86_valid_target_attribute_tree): Use ggc_strdup to copy option_strings to opts->x_ix86_arch_string and opts->x_ix86_tune_string. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@231556 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c150e00dc3ee..de877d493c9d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,12 @@ +2015-12-11 Martin Liska + + Uros Bizjak + + PR target/67484 + * config/i386/i386.c (ix86_valid_target_attribute_tree): + Use ggc_strdup to copy option_strings to opts->x_ix86_arch_string and + opts->x_ix86_tune_string. + 2015-12-11 Richard Biener * lto-streamer.h (lto_simple_header_with_strings): Remove diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index e565c0bc643a..cecea2496a96 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -6152,7 +6152,7 @@ ix86_valid_target_attribute_tree (tree args, if (option_strings[IX86_FUNCTION_SPECIFIC_ARCH]) { opts->x_ix86_arch_string - = option_strings[IX86_FUNCTION_SPECIFIC_ARCH]; + = ggc_strdup (option_strings[IX86_FUNCTION_SPECIFIC_ARCH]); /* If arch= is set, clear all bits in x_ix86_isa_flags, except for ISA_64BIT, ABI_64, ABI_X32, and CODE16. */ @@ -6166,7 +6166,8 @@ ix86_valid_target_attribute_tree (tree args, opts->x_ix86_arch_string = NULL; if (option_strings[IX86_FUNCTION_SPECIFIC_TUNE]) - opts->x_ix86_tune_string = option_strings[IX86_FUNCTION_SPECIFIC_TUNE]; + opts->x_ix86_tune_string + = ggc_strdup (option_strings[IX86_FUNCTION_SPECIFIC_TUNE]); else if (orig_tune_defaulted) opts->x_ix86_tune_string = NULL;