This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/83311] New: Unable to optimize alloc calls with casts and string builtins


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]