[Bug sanitizer/81224] ICE in -fsanitize=address w/ a register variable of a vector type
marxin at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Sep 18 11:53:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81224
--- Comment #16 from Martin Liška <marxin at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #15)
> That looks risky to me, changes behavior. Can't you instead of the warning
> + removal from attributes just do something that doesn't crash when it sees
> an empty string wherever it crashed?
Yes, we can either:
diff --git a/gcc/c-family/c-common.c b/gcc/c-family/c-common.c
index 5089013ddcd..17c98bcba8b 100644
--- a/gcc/c-family/c-common.c
+++ b/gcc/c-family/c-common.c
@@ -9447,7 +9447,6 @@ handle_target_attribute (tree *node, tree name, tree
args, int flags,
&& TREE_STRING_LENGTH (value) == 1
&& TREE_STRING_POINTER (value)[0] == '\0')
{
- warning (OPT_Wattributes, "empty string in attribute %<target%>");
*no_add_attrs = true;
}
}
That will however skip entire attribute:
__attribute__((target("sse4.2", "", "")))
Or I can do patch that will just remove empty strings in a TREE_LIST.
What way do you prefer?
More information about the Gcc-bugs
mailing list