https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104088
Tobias Burnus <burnus at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |burnus at gcc dot gnu.org --- Comment #5 from Tobias Burnus <burnus at gcc dot gnu.org> --- I did have a look at this the other day. If I recall correctly, the issue was that tree destsize = compute_objsize (dest, stmt, ostype, &aref, &ptr_qry); in strlen_pass::maybe_warn_overflow (in file tree-ssa-strlen.cc) wrongly returned 0 for a var[i]._char_memb. Somewhere ('var'?) was a variable which did not use the 64bit generic memory space but a 32-byte one. My feeling is that the problem is related to having a non-generic memory space. (Disclaimer: It was a couple of days back when I had a quick look and I might misremember. The 'var[i]._char_memb' matches pattern wise but the name was surely different.) However, reading now the commit message title, quoted in comment 0 - "Use enclosing object size if it's smaller than member" -, explains why the 1-byte character type's length is not used even if it looks fine.