re PR middle-end/78419 (ICE with target_clone on invalid target)
authorJakub Jelinek <jakub@redhat.com>
Fri, 18 Nov 2016 22:21:31 +0000 (23:21 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Fri, 18 Nov 2016 22:21:31 +0000 (23:21 +0100)
commit5e7c77616e704623086a71bc9870dee9c580fb79
treeacf1794c26cb1e3b59a4151a8b8dcf6028251d3a
parent6c554a2ab8291d6f6c94325ea72cfbc7af3c1c55
re PR middle-end/78419 (ICE with target_clone on invalid target)

PR middle-end/78419
* multiple_target.c (get_attr_len): Start with argnum and increment
argnum on every arg.  Use strchr in a loop instead of counting commas
manually.
(get_attr_str): Increment argnum for every comma in the string.
(separate_attrs): Use for instead of while loop, simplify.
(expand_target_clones): Rename defenition argument to definition.
Free attrs and attr_str even when diagnosing errors.  Temporarily
change input_location around targetm.target_option.valid_attribute_p
calls.  Don't emit warning or errors if that function fails.

* gcc.target/i386/pr78419.c: New test.

From-SVN: r242608
gcc/ChangeLog
gcc/multiple_target.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/pr78419.c [new file with mode: 0644]