[Bug middle-end/78419] ICE with target_clone on invalid target
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Nov 18 23:52:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78419
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Fri Nov 18 22:21:31 2016
New Revision: 242608
URL: https://gcc.gnu.org/viewcvs?rev=242608&root=gcc&view=rev
Log:
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.
Added:
trunk/gcc/testsuite/gcc.target/i386/pr78419.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/multiple_target.c
trunk/gcc/testsuite/ChangeLog
More information about the Gcc-bugs
mailing list