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? Thanks, Richard. > > 2022-05-13 Eric Botcazou <ebotca...@adacore.com> > > * dwarf2out.c (loc_list_from_tree_1) <COND_EXPR>: Swap the operands > if the condition is a TRUTH_NOT_EXPR. > > -- > Eric Botcazou