[Bug c/111211] No warning for iterator going out of scope

2023-08-28 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111211 --- Comment #4 from Andrew Pinski --- (In reply to Lehua Ding from comment #3) > (In reply to Richard Biener from comment #2) > > We diagnose this after unrolling, so the difference is whether we unroll or > > not. > > But based on the assembly

[Bug c/111211] No warning for iterator going out of scope

2023-08-28 Thread lehua.ding at rivai dot ai via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111211 --- Comment #3 from Lehua Ding --- (In reply to Richard Biener from comment #2) > We diagnose this after unrolling, so the difference is whether we unroll or > not. But based on the assembly code it looks like both are unrolled. foo: n

[Bug c/111211] No warning for iterator going out of scope

2023-08-28 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111211 --- Comment #2 from Richard Biener --- We diagnose this after unrolling, so the difference is whether we unroll or not.

[Bug c/111211] No warning for iterator going out of scope

2023-08-28 Thread lehua.ding at rivai dot ai via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111211 --- Comment #1 from Lehua Ding --- Reproduce: Compile Command: gcc -O3 -Wall -Wextra C Code: ``` #include int foo (uint64_t ddr0_addr_access) { uint64_t check[1] = {0}; for (int k = 0; k < 7; k += 1) { asm volatile ("no