[Bug c/70852] ice in warn_for_memset
mpolacek at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Apr 28 15:30:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70852
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |mpolacek at gcc dot gnu.org
Target Milestone|--- |7.0
--- Comment #3 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
The fix should be just:
--- a/gcc/c-family/c-common.c
+++ b/gcc/c-family/c-common.c
@@ -11796,6 +11796,7 @@ warn_for_memset (location_t loc, tree arg0, tree arg2,
tree elt_type = TREE_TYPE (type);
tree domain = TYPE_DOMAIN (type);
if (!integer_onep (TYPE_SIZE_UNIT (elt_type))
+ && domain != NULL_TREE
&& TYPE_MAXVAL (domain)
&& TYPE_MINVAL (domain)
&& integer_zerop (TYPE_MINVAL (domain))
More information about the Gcc-bugs
mailing list