This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/57742] memset(malloc(n),0,n) -> calloc(n,1)
- From: "glisse at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 25 Jun 2014 07:53:17 +0000
- Subject: [Bug tree-optimization/57742] memset(malloc(n),0,n) -> calloc(n,1)
- Auto-submitted: auto-generated
- References: <bug-57742-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57742
--- Comment #20 from Marc Glisse <glisse at gcc dot gnu.org> ---
(In reply to Joost VandeVondele from comment #18)
> The following now fails, so'll reopen this PR. It is at least related to
> zeroing pvec twice in a row, and doesn seem to happen if I manually inline
> the routine get_pseudo_param .
Hum, right, I thought I had tested that, but it was in an earlier version of
the patch and I forgot to add it to one of the testcases :-(
void*f(){
char*p=malloc(42);
memset(p,0,42);
memset(p,0,42);
return p;
};