This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/83311] New: Unable to optimize alloc calls with casts and string builtins
- 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: Thu, 07 Dec 2017 07:55:23 +0000
- Subject: [Bug tree-optimization/83311] New: Unable to optimize alloc calls with casts and string builtins
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83311
Bug ID: 83311
Summary: Unable to optimize alloc calls with casts and string
builtins
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: denis.campredon at gmail dot com
Target Milestone: ---
Hello,
The fix for #pr83128 does not optimize the following testcase which should
produce the same result
----------------
int fn() {
// same with malloc or calloc
char * s = __builtin_alloca(sizeof(*s));
return ((char*)__builtin_memcpy(s, "a", 1))[0];
}
-------------
Regards,
Denis