https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88973
Bug ID: 88973 Summary: New -Wrestrict warning since r268048 Product: gcc Version: 9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: marxin at gcc dot gnu.org CC: msebor at gcc dot gnu.org Target Milestone: --- Created attachment 45492 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=45492&action=edit test-case The test-case comes from autogen package: $ gcc autogen.i -c -O2 -Werror=restrict In function ‘strcpy’, inlined from ‘canonicalize_pathname’ at autogen.i:10536:17, inlined from ‘option_pathfind.constprop’ at autogen.i:10420:32: autogen.i:4050:10: error: ‘__builtin_strcpy’ accessing 1 byte at offsets [0, 9223372036854775807] and [0, 9223372036854775807] may overlap 1 byte at offset 0 [-Werror=restrict] 4050 | return __builtin___strcpy_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cc1: some warnings being treated as errors Martin can you please verify that the warning is correct?