[Bug middle-end/95556] Not replacing __builtin___memcpy_chk() as documented

2020-06-07 Thread pg...@j-davis.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95556 --- Comment #9 from Jeff Davis --- I still feel like the documentation is misleading on this point. Regardless, it doesn't seem like you think there is any bug here, so go ahead and close.

[Bug middle-end/95556] Not replacing __builtin___memcpy_chk() as documented

2020-06-06 Thread pg...@j-davis.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95556 --- Comment #7 from Jeff Davis --- "...built-in functions are optimized into the normal string functions like memcpy if the last argument is (size_t) -1..." My reading of the document lead me to believe that a last argument of -1 *would* be a no

[Bug c/95556] Not replacing __builtin___memcpy_chk() as documented

2020-06-05 Thread pg...@j-davis.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95556 --- Comment #3 from Jeff Davis --- Original larger case was discovered in PostgreSQL: https://www.postgresql.org/message-id/99b2eab335c1592c925d8143979c8e9e81e1575f.ca...@j-davis.com

[Bug middle-end/95556] Not replacing __builtin___memcpy_chk() as documented

2020-06-05 Thread pg...@j-davis.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95556 --- Comment #2 from Jeff Davis --- Created attachment 48688 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48688&action=edit Example 3 Another example that works (i.e. builtin is properly replaced by memcpy as described in the document).

[Bug c/95556] Not replacing __builtin___memcpy_chk() as documented

2020-06-05 Thread pg...@j-davis.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95556 --- Comment #1 from Jeff Davis --- Created attachment 48687 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48687&action=edit Example 1

[Bug c/95556] New: Not replacing __builtin___memcpy_chk() as documented

2020-06-05 Thread pg...@j-davis.com
Component: c Assignee: unassigned at gcc dot gnu.org Reporter: pg...@j-davis.com Target Milestone: --- Created attachment 48686 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48686&action=edit Example 2 GCC's Object Size Checking doc says: "There are b