[Bug tree-optimization/117179] Confusing -Warray-bounds output for wget (wrong order of conditions in if statement)

2024-10-24 Thread qinzhao at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117179 qinzhao at gcc dot gnu.org changed: What|Removed |Added CC||rguenther at suse dot de --

[Bug tree-optimization/117179] Confusing -Warray-bounds output for wget (wrong order of conditions in if statement)

2024-10-24 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117179 --- Comment #9 from Sam James --- (In reply to qinzhao from comment #8) > for the reduced testing case, with my work-in-progress 3rd version of the > patch + -fdiagnostics-explain-harder: > t.c:15:15: warning: array subscript [0, 2] is outside a

[Bug tree-optimization/117179] Confusing -Warray-bounds output for wget (wrong order of conditions in if statement)

2024-10-23 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117179 --- Comment #7 from Sam James --- I think your patch here isn't really getting it wrong, it's just that the structure of the if() across multiple lines doesn't make it obvious?

[Bug tree-optimization/117179] Confusing -Warray-bounds output for wget (wrong order of conditions in if statement)

2024-10-23 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117179 Sam James changed: What|Removed |Added Attachment #59420|0 |1 is obsolete|

[Bug tree-optimization/117179] Confusing -Warray-bounds output for wget (wrong order of conditions in if statement)

2024-10-23 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117179 --- Comment #5 from Sam James --- Created attachment 59420 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=59420&action=edit reduced.i Reduced it a bit, it could be cleaned up more but I think it should be good enough.

[Bug tree-optimization/117179] Confusing -Warray-bounds output for wget (wrong order of conditions in if statement)

2024-10-23 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117179 Sam James changed: What|Removed |Added Status|UNCONFIRMED |ASSIGNED Last reconfirmed|

[Bug tree-optimization/117179] Confusing -Warray-bounds output for wget (wrong order of conditions in if statement)

2024-10-23 Thread qinzhao at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117179 --- Comment #4 from qinzhao at gcc dot gnu.org --- Looks like that my RFC patch currently has bugs that cannot locate the event accurately. need more study here to see how to locate the conditional event accurately. I need to reduce this test ca

[Bug tree-optimization/117179] Confusing -Warray-bounds output for wget

2024-10-16 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117179 --- Comment #2 from Sam James --- static bool setval_internal (int comind, const char *com, const char *val) { assert (0 <= comind && ((size_t) comind) < countof (commands)); if ((unsigned) comind >= countof (commands)) return NULL;

[Bug tree-optimization/117179] Confusing -Warray-bounds output for wget

2024-10-16 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117179 Sam James changed: What|Removed |Added See Also||https://gitlab.com/gnuwget/

[Bug tree-optimization/117179] Confusing -Warray-bounds output for wget

2024-10-16 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117179 --- Comment #1 from Sam James --- Created attachment 59363 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=59363&action=edit init.i.xz