On 9/14/21 4:13 PM, Michael Matz wrote:
Hello, On Mon, 13 Sep 2021, Aldy Hernandez via Gcc-patches wrote: The testcase still tests what it's supposed to test with ...typedef unsigned short uint16_t; uint16_t a, b; int *j_global; uint16_t f(void) { int c, **p; short d = 2, e = 4;... "c = a;" added here (i.e. it still hangs before the pr55107 change).for (;; b++) { int *j = j_global, k = 0; for (; *j; j++) { for(; c; c++) for(; k < 1; k++) { short *f = &d; if(b) return *f; } } if(!c) d *= e; a = d; if ((a ? b = 0 : (**p ? : 1) != (d != 1 ? 1 : (b = 0))) != ((k ? a: 0)< (a * (c = k)))) **p = 0; } }Thanks for getting rid of the noise here. I've simplified the above to show what's going on in the warning on nds32-elf: int george, *global; int stuff(), readme(); int f (void) { int store; for (;;) { int k = 0; while (global) { for (; store; ++store)Yeah, that seems a correct warning, your 'store' (the 'c' in the original testcase) is really used uninitialized (when 'global' aka '*j_global' is non-zero). Sorry for not noticing earlier, I was only getting rid of warnings, not carefully looking at the testcase itself. I think with above initialization of 'c' it's conforming, and still a correct test for the original bug.
This is good news. So far, every single warning/problem that has surfaced with the backward threader rewrite has been a latent bug elsewhere (or a bad test) :-).
Would you mind checking in your changes to the testcase? Thanks. Aldy
