[Bug tree-optimization/56456] [meta-bug] bogus warning when inlining or unrolling: "array subscript is above array bounds"
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56456 --- Comment #5 from Mason --- Slightly smaller testcase, similar to bug 80907. extern int M[16]; void foo(int n) { for (int i = 0; i < n; ++i) for (int j = 0; j < i; ++j) M[i+j] = 0; } $ gcc-7 -O3 -Wall -S testcase4.c testcase4.c: In function 'foo': testcase4.c:6:5: warning: array subscript is above array bounds [-Warray-bounds] M[i+j] = 0; ~^ testcase4.c:6:5: warning: array subscript is above array bounds [-Warray-bounds] testcase4.c:6:5: warning: array subscript is above array bounds [-Warray-bounds] testcase4.c:6:5: warning: array subscript is above array bounds [-Warray-bounds] testcase4.c:6:5: warning: array subscript is above array bounds [-Warray-bounds] testcase4.c:6:5: warning: array subscript is above array bounds [-Warray-bounds] testcase4.c:6:5: warning: array subscript is above array bounds [-Warray-bounds] testcase4.c:6:5: warning: array subscript is above array bounds [-Warray-bounds] Same result with trunk. Using -fopt-info adds: testcase4.c:5:3: note: loop turned into non-loop; it never loops. testcase4.c:5:3: note: loop with 17 iterations completely unrolled
[Bug tree-optimization/56456] [meta-bug] bogus warning when inlining or unrolling: "array subscript is above array bounds"
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56456 --- Comment #4 from rguenther at suse dot de --- On Tue, 17 Oct 2017, egallager at gcc dot gnu.org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56456 > > Eric Gallager changed: > >What|Removed |Added > > CC||egallager at gcc dot gnu.org > > --- Comment #3 from Eric Gallager --- How > essential is the "when inlining or unrolling" portion of the title for > this bug? i.e., can it be used as a meta-bug for all -Warray-bounds > issues? If not, how to tell if any given -Warray-bounds bug is related > to inlining/unrolling or not? It's hard to tell. Unless we have another meta-bug just re-use this one.
[Bug tree-optimization/56456] [meta-bug] bogus warning when inlining or unrolling: "array subscript is above array bounds"
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56456 Eric Gallager changed: What|Removed |Added CC||egallager at gcc dot gnu.org --- Comment #3 from Eric Gallager --- How essential is the "when inlining or unrolling" portion of the title for this bug? i.e., can it be used as a meta-bug for all -Warray-bounds issues? If not, how to tell if any given -Warray-bounds bug is related to inlining/unrolling or not?
[Bug tree-optimization/56456] [meta-bug] bogus warning when inlining or unrolling: "array subscript is above array bounds"
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56456 Bug 56456 depends on bug 38480, which changed state. Bug 38480 Summary: bogus warning with -O3 -Wall: "array subscript is above array bounds" https://gcc.gnu.org/bugzilla/show_bug.cgi?id=38480 What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED
[Bug tree-optimization/56456] [meta-bug] bogus warning when inlining or unrolling: "array subscript is above array bounds"
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56456 Bug 56456 depends on bug 45180, which changed state. Bug 45180 Summary: bogus warning: array subscript is above array bounds https://gcc.gnu.org/bugzilla/show_bug.cgi?id=45180 What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED
[Bug tree-optimization/56456] [meta-bug] bogus warning when inlining or unrolling: "array subscript is above array bounds"
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56456 Bug 56456 depends on bug 47418, which changed state. Bug 47418 Summary: warning: array subscript is above array bounds at O2 with sin6_addr https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47418 What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED
[Bug tree-optimization/56456] [meta-bug] bogus warning when inlining or unrolling: "array subscript is above array bounds"
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56456 Mason changed: What|Removed |Added CC||jwakely.gcc at gmail dot com, ||law at redhat dot com, ||rguenth at gcc dot gnu.org, ||slash.tmp at free dot fr --- Comment #2 from Mason --- A few more bugs should be added to this tracker: (It seems I don't have permission to do that?) bug 59124 bug 63441 bug 63477 bug 80907 bug 82286 Adding my own testcase here: extern int array[3]; void foo(int n) { for (int i = 0; i < n; ++i) for (int j = 0; j < i; ++j) if (array[i] == array[j]) array[j] = 0; } gcc -Wall -O3 test.c triggers bogus warning(s) with any version of gcc >= 4.8
[Bug tree-optimization/56456] [meta-bug] bogus warning when inlining or unrolling: "array subscript is above array bounds"
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56456 Bug 56456 depends on bug 41847, which changed state. Bug 41847 Summary: warning: array subscript is above array bounds https://gcc.gnu.org/bugzilla/show_bug.cgi?id=41847 What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|--- |FIXED
[Bug tree-optimization/56456] [meta-bug] bogus warning when inlining or unrolling: array subscript is above array bounds
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56456 Bug 56456 depends on bug 56273, which changed state. Bug 56273 Summary: [4.8 regression] Bogus -Warray-bounds warning https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56273 What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|--- |FIXED
[Bug tree-optimization/56456] [meta-bug] bogus warning when inlining or unrolling: array subscript is above array bounds
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56456 Bug 56456 depends on bug 53198, which changed state. Bug 53198 Summary: [4.7 Regression] gcc wrongly emits array subscript is above array bounds for simple arrays https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53198 What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED