On Fri, May 13, 2022 at 10:25:02AM +0200, Richard Biener via Gcc-patches wrote: > On Fri, May 13, 2022 at 10:21 AM Eric Botcazou via Gcc-patches > <gcc-patches@gcc.gnu.org> wrote: > > > > Hi, > > > > DW_OP_not is a bitwise, not a logical NOT, so it computes the wrong result > > in > > a DWARF conditional expression. > > > > Tested (GCC + GDB° on x86-64/Linux, OK for the mainline? > > But this doesn't fix > > case TRUTH_NOT_EXPR: > case BIT_NOT_EXPR: > op = DW_OP_not; > goto do_unop; > > I also wonder where we get the TRUTH_NOT_EXPR to expand from? I suspect > some non-gimplified global tree?
So shouldn't we expand TRUTH_NOT_EXPR as (push argument) DW_OP_lit0 DW_OP_eq then? Jakub