On Tue, 27 Jan 2026, Jakub Jelinek wrote: > On Tue, Jan 27, 2026 at 09:54:59AM +0100, Richard Biener wrote: > > > OK with the goacc testcases adjusted? OK to simply remove the > > > dg-note line or should I XFAIL it? > > > > Ping. Any opinion? > > > > > Thanks, > > > Richard. > > > > > > PR tree-optimization/123651 > > > * tree-ssa-uninit.cc (warn_uninit): Treat DECL_ARTIFICIAL > > > var as if it were not present. > > > > > > * g++.dg/warn/Wuninitialized-pr123651.C: New testcase. > > I think the current state (warning only for -g) is better than not warning > at all. Yes, we can't provide details on what exactly is wrong, it is more > something here is uninitialized, but still. > Not warning about DECL_ARTIFICIAL vars will mean we won't discover other > problems (we've had various PRs where DECL_ARTIFICIAL TARGET_EXPR slots > ended up due to FE bugs uninitialized or being used before initialization > and most of those issues were reported through -W*uninitialized first.
OK. I guess we should then try to not throw away diagnostics for other cases without a variable to point at. I'll note the reported variable in the -g case isn't any more useful than if we'd said '_3' is used uninitialized, thus fall back to a raw SSA name (we could also print that as '<temporary>' or so) Richard. > Jakub > > -- Richard Biener <[email protected]> SUSE Software Solutions Germany GmbH, Frankenstrasse 146, 90461 Nuernberg, Germany; GF: Jochen Jaser, Andrew McDonald, Werner Knoblich; (HRB 36809, AG Nuernberg)
