PR middle-end/78419
commitcb6c05f855c410696b3fdc075399b97534cc7c35
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 18 Nov 2016 22:21:31 +0000 (18 22:21 +0000)
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 18 Nov 2016 22:21:31 +0000 (18 22:21 +0000)
treeacf1794c26cb1e3b59a4151a8b8dcf6028251d3a
parente1c5261183f725d8ab3b0390110acc83f4e7231a
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@242608 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/multiple_target.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/pr78419.c [new file with mode: 0644]