[Bug middle-end/103483] context-sensitive ranges change triggers stringop-overread

2021-12-11 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103483 --- Comment #14 from Jason Merrill --- (In reply to Martin Sebor from comment #13) > static inline void copy (const char *p) > { > int N = null_safe_strlen (p); > if (N) /* disabling this branch prevents the warning */ >

[Bug middle-end/103483] context-sensitive ranges change triggers stringop-overread

2021-12-10 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103483 --- Comment #13 from Martin Sebor --- The warning for the test case in comment #12 isn't directly related to ranges: it's issued simply because the invalid statement is in the IL and not eliminated by DCE (the secret functions don't let it).

[Bug middle-end/103483] context-sensitive ranges change triggers stringop-overread

2021-12-10 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103483 Jason Merrill changed: What|Removed |Added CC||jason at gcc dot gnu.org See

[Bug middle-end/103483] context-sensitive ranges change triggers stringop-overread

2021-12-09 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103483 --- Comment #11 from CVS Commits --- The master branch has been updated by Jonathan Wakely : https://gcc.gnu.org/g:f8463b0e3ec2438b4cfb8c9a468d59761db2c8a0 commit r12-5874-gf8463b0e3ec2438b4cfb8c9a468d59761db2c8a0 Author: Jonathan Wakely

[Bug middle-end/103483] context-sensitive ranges change triggers stringop-overread

2021-12-02 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103483 Martin Sebor changed: What|Removed |Added Keywords|missed-optimization | --- Comment #10 from Martin Sebor ---

[Bug middle-end/103483] context-sensitive ranges change triggers stringop-overread

2021-12-01 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103483 --- Comment #9 from Andrew Pinski --- (In reply to Andrew Pinski from comment #8) > I think we should come up with a better plan in general for "flow sensative" > warnings really. Maybe only enable them with -O2 and above. But we keep on >

[Bug middle-end/103483] context-sensitive ranges change triggers stringop-overread

2021-12-01 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103483 Andrew Pinski changed: What|Removed |Added Resolution|WONTFIX |--- Status|RESOLVED

[Bug middle-end/103483] context-sensitive ranges change triggers stringop-overread

2021-12-01 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103483 --- Comment #7 from Jonathan Wakely --- I have a patch: --- a/libstdc++-v3/include/bits/char_traits.h +++ b/libstdc++-v3/include/bits/char_traits.h @@ -54,6 +54,11 @@ namespace __gnu_cxx _GLIBCXX_VISIBILITY(default) {

[Bug middle-end/103483] context-sensitive ranges change triggers stringop-overread

2021-12-01 Thread aldyh at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103483 Aldy Hernandez changed: What|Removed |Added CC||aldyh at gcc dot gnu.org,

[Bug middle-end/103483] context-sensitive ranges change triggers stringop-overread

2021-11-30 Thread john at mcfarlane dot name via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103483 --- Comment #5 from John McFarlane --- Here is an example of the real-world code causing this warning: https://github.com/johnmcfarlane/cnl/blob/6d46b6cf10a998e3bdcc32557f202c8579b5717c/test/unit/scaled_int/to_chars.h#L60 It is converting a

[Bug middle-end/103483] context-sensitive ranges change triggers stringop-overread

2021-11-30 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103483 Martin Sebor changed: What|Removed |Added Resolution|--- |WONTFIX Status|NEW

[Bug middle-end/103483] context-sensitive ranges change triggers stringop-overread

2021-11-30 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103483 Martin Sebor changed: What|Removed |Added Component|c++ |middle-end Keywords|