This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/70852] ice in warn_for_memset
- From: "mpolacek at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 28 Apr 2016 15:30:26 +0000
- Subject: [Bug c/70852] ice in warn_for_memset
- Auto-submitted: auto-generated
- References: <bug-70852-4 at http dot gcc dot gnu dot org/bugzilla/>
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))