https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101750
--- Comment #3 from rguenther at suse dot de <rguenther at suse dot de> --- On Tue, 3 Aug 2021, tnfchris at gcc dot gnu.org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101750 > > --- Comment #2 from Tamar Christina <tnfchris at gcc dot gnu.org> --- > (In reply to Richard Biener from comment #1) > > On x86_64 the testcase is optimized to the following now: > > not sure how we conclude that 'n' is not written to anywhere. The issue > > persists even when I rename 'main' to 'foo' (when it's 'main' we could > > indeed > > conclude so). > > I think it's because it's concluding that the access of `h` must trap since > `h` > is local and uninitialized. Hmm, but 'h' is a member of the class object 'n' which is global. > That also explains the abort. Looks like the reducer needs some slight > adjustment. if I declare `h` static then it works again.