aboutsummaryrefslogtreecommitdiff
path: root/libjava/testsuite/libjava.compile/ArrayClass.java
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2023-03-28 10:50:40 +0100
committerJonathan Wakely <jwakely@redhat.com>2023-03-28 21:12:18 +0100
commitbf78b43873b0b7e8f9a430df38749b8b61f9c9b8 (patch)
treeff6f661fe5972bb61b27e118123eb5eeeb4808e0 /libjava/testsuite/libjava.compile/ArrayClass.java
parentcf19ef9eca82b01dd0a3a0a8e4c8bcec236eb2d9 (diff)
downloadgcc-bf78b43873b0b7e8f9a430df38749b8b61f9c9b8.zip
gcc-bf78b43873b0b7e8f9a430df38749b8b61f9c9b8.tar.gz
gcc-bf78b43873b0b7e8f9a430df38749b8b61f9c9b8.tar.bz2
libstdc++: Tell GCC what basic_string::_M_is_local() means [PR109299]
This avoids a bogus warning about overflowing a buffer, because GCC can't tell that we don't copy into the buffer unless it fits. By adding a __builtin_unreachable() hint we inform the compiler about the invariant that the buffer is only used when it's big enough. This can also improve codegen, by eliminating dead code that GCC couldn't tell was unreachable. libstdc++-v3/ChangeLog: PR libstdc++/109299 * include/bits/basic_string.h (basic_string::_M_is_local()): Add hint for compiler that local strings fit in the local buffer.
Diffstat (limited to 'libjava/testsuite/libjava.compile/ArrayClass.java')
0 files changed, 0 insertions, 0 deletions