This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/83128] Unable to optimize {m,c}alloc when strings builtin are used
- From: "denis.campredon at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 01 Dec 2017 15:34:29 +0000
- Subject: [Bug tree-optimization/83128] Unable to optimize {m,c}alloc when strings builtin are used
- Auto-submitted: auto-generated
- References: <bug-83128-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83128
--- Comment #4 from denis.campredon at gmail dot com ---
Hi Richard,
Thanks for your quick response.
I don't know if I should open a new bug or not, but your patch does not seems
to handle casts. It fails to optimize the following snippet.
------------
int fn() {
char * s = malloc(sizeof(*s));
return ((char*)__builtin_memcpy(s, "a", 1))[0];
}
------------
Regards,
Denis