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/83128] Unable to optimize {m,c}alloc when strings builtin are used


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

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