Re: Uninit warnings due to optimizing short-circuit conditionals

2022-02-15 Thread David Malcolm via Gcc
On Tue, 2022-02-15 at 14:28 +0100, Richard Biener wrote: > On Tue, Feb 15, 2022 at 2:00 PM Julian Seward > wrote: > > > > Sorry for the delayed response.  I've been paging this all back in. > > > > I first saw this problem when memcheck-ing Firefox as compiled by > > Clang, some > > years back. 

Re: Uninit warnings due to optimizing short-circuit conditionals

2022-02-15 Thread Richard Biener via Gcc
On Tue, Feb 15, 2022 at 2:00 PM Julian Seward wrote: > > Sorry for the delayed response. I've been paging this all back in. > > I first saw this problem when memcheck-ing Firefox as compiled by Clang, some > years back. Not long after GCC was also at it. The transformation in > question is (at

Re: Uninit warnings due to optimizing short-circuit conditionals

2022-02-15 Thread Julian Seward via Gcc
Sorry for the delayed response. I've been paging this all back in. I first saw this problem when memcheck-ing Firefox as compiled by Clang, some years back. Not long after GCC was also at it. The transformation in question is (at the C level): A && B ==> B && A if it can be proved that A

Re: Uninit warnings due to optimizing short-circuit conditionals

2022-02-15 Thread Mark Wielaard
Hi Richard, On Tue, 2022-02-15 at 08:25 +0100, Richard Biener wrote: > On Mon, Feb 14, 2022 at 6:38 PM Mark Wielaard wrote: > > Yes. valgrind keeps track of uninitialized bits and propagates them > > around till "use". Where use is anything that might alter the > > observable behavior of the prog

Re: Uninit warnings due to optimizing short-circuit conditionals

2022-02-14 Thread Richard Biener via Gcc
On Mon, Feb 14, 2022 at 6:38 PM Mark Wielaard wrote: > > On Mon, 2022-02-14 at 12:20 -0500, David Malcolm wrote: > > On Mon, 2022-02-14 at 17:57 +0100, Mark Wielaard wrote: > > > On Mon, 2022-02-14 at 10:57 -0500, David Malcolm wrote: > > > > [CCing Mark in the hopes of insight from the valgrind s

Re: Uninit warnings due to optimizing short-circuit conditionals

2022-02-14 Thread Mark Wielaard
On Mon, 2022-02-14 at 12:20 -0500, David Malcolm wrote: > On Mon, 2022-02-14 at 17:57 +0100, Mark Wielaard wrote: > > On Mon, 2022-02-14 at 10:57 -0500, David Malcolm wrote: > > > [CCing Mark in the hopes of insight from the valgrind side of > > > things] > > > > Adding Julian to CC so he can corr

Re: Uninit warnings due to optimizing short-circuit conditionals

2022-02-14 Thread David Malcolm via Gcc
On Mon, 2022-02-14 at 17:57 +0100, Mark Wielaard wrote: > Hi David, > > On Mon, 2022-02-14 at 10:57 -0500, David Malcolm wrote: > > [CCing Mark in the hopes of insight from the valgrind side of > > things] > > Adding Julian to CC so he can correct me if I say something silly. > > > There is a fa

Re: Uninit warnings due to optimizing short-circuit conditionals

2022-02-14 Thread David Malcolm via Gcc
On Mon, 2022-02-14 at 09:26 -0700, Jeff Law wrote: > > > On 2/14/2022 8:57 AM, David Malcolm via Gcc wrote: > > [CCing Mark in the hopes of insight from the valgrind side of things] > > > > There is a false positive from -Wanalyzer-use-of-uninitialized-value > > on > > gcc.dg/analyzer/pr102692.c

Re: Uninit warnings due to optimizing short-circuit conditionals

2022-02-14 Thread Mark Wielaard
Hi David, On Mon, 2022-02-14 at 10:57 -0500, David Malcolm wrote: > [CCing Mark in the hopes of insight from the valgrind side of things] Adding Julian to CC so he can correct me if I say something silly. > There is a false positive from -Wanalyzer-use-of-uninitialized-value on > gcc.dg/analyzer

Re: Uninit warnings due to optimizing short-circuit conditionals

2022-02-14 Thread Jeff Law via Gcc
On 2/14/2022 8:57 AM, David Malcolm via Gcc wrote: [CCing Mark in the hopes of insight from the valgrind side of things] There is a false positive from -Wanalyzer-use-of-uninitialized-value on gcc.dg/analyzer/pr102692.c here: ‘fix_overlays_before’: events 1-3 | | 75 | while

Uninit warnings due to optimizing short-circuit conditionals

2022-02-14 Thread David Malcolm via Gcc
[CCing Mark in the hopes of insight from the valgrind side of things] There is a false positive from -Wanalyzer-use-of-uninitialized-value on gcc.dg/analyzer/pr102692.c here: ‘fix_overlays_before’: events 1-3 | | 75 | while (tail | | | 76 | && (