https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101574
Thomas Schwinge <tschwinge at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |marxin at gcc dot gnu.org, | |msebor at gcc dot gnu.org Keywords| |GC --- Comment #6 from Thomas Schwinge <tschwinge at gcc dot gnu.org> --- Short summary: I ran into an unexpected '0xa5a5a5a5' in 'gcc/warning-control.cc', and a search through email archives pointed me to PR101292, PR101204, which superficially indeed do look similar. Anybody got a good suggestion about how to proceed here? --- (gdb) break c-common.c:3633 Breakpoint 3 at 0xea31b5: file [...]/source-gcc/gcc/c-family/c-common.c, line 3633. (gdb) r [...] Breakpoint 3, c_common_truthvalue_conversion (location=2147537812, expr=0x7ffff3f10550) at [...]/source-gcc/gcc/c-family/c-common.c:3635 3635 if (!warning_suppressed_p (expr, OPT_Wparentheses) (gdb) c Continuing. Breakpoint 3, c_common_truthvalue_conversion (location=2147537812, expr=0x7ffff3f105f0) at [...]/source-gcc/gcc/c-family/c-common.c:3635 3635 if (!warning_suppressed_p (expr, OPT_Wparentheses) (gdb) c Continuing. Breakpoint 3, c_common_truthvalue_conversion (location=2147537909, expr=0x7ffff3f14be0) at [...]/source-gcc/gcc/c-family/c-common.c:3635 3635 if (!warning_suppressed_p (expr, OPT_Wparentheses) (gdb) s warning_suppressed_p (expr=0x7ffff3f14be0, opt=OPT_Wparentheses) at [...]/source-gcc/gcc/warning-control.cc:119 119 const nowarn_spec_t *spec = get_nowarn_spec (expr); (gdb) s get_nowarn_spec (expr=0x7ffff3f14be0) at [...]/source-gcc/gcc/warning-control.cc:92 92 const key_type_t key = convert_to_key (expr); (gdb) call debug_tree(expr) <modify_expr 0x7ffff3f14be0 type <integer_type 0x7ffff65fc690 unsigned int public unsigned type_6 SI size <integer_cst 0x7ffff65ff120 constant 32> unit-size <integer_cst 0x7ffff65ff138 constant 4> align:32 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type 0x7ffff65fc690 precision:32 min <integer_cst 0x7ffff65ff150 0> max <integer_cst 0x7ffff65ff108 4294967295> pointer_to_this <pointer_type 0x7ffff660c348> reference_to_this <reference_type 0x7ffff3ce9d20>> side-effects arg:0 <view_convert_expr 0x7ffff2f46780 type <integer_type 0x7ffff65fc690 unsigned int> tree_2 arg:0 <view_convert_expr 0x7ffff2f467a0 type <integer_type 0x7ffff65fc690 unsigned int> public arg:0 <var_decl 0x7ffff608e6c0 i> [...]/source-gcc/gcc/lra-lives.c:304:3 start: [...]/source-gcc/gcc/lra-lives.c:304:3 finish: [...]/source-gcc/gcc/lra-lives.c:304:3> [...]/source-gcc/gcc/lra-lives.c:304:3 start: [...]/source-gcc/gcc/lra-lives.c:304:3 finish: [...]/source-gcc/gcc/lra-lives.c:304:3> arg:1 <call_expr 0x7ffff30edd58 type <integer_type 0x7ffff65fc690 unsigned int> side-effects nothrow fn <addr_expr 0x7ffff2f467c0 type <pointer_type 0x7ffff246bc78> constant arg:0 <function_decl 0x7ffff2794c00 sparseset_iter_elm>> arg:0 <view_convert_expr 0x7ffff2f467e0 type <pointer_type 0x7ffff278eb28 sparseset> public arg:0 <var_decl 0x7ffff60426c0 pseudos_live> [...]/source-gcc/gcc/lra-lives.c:304:3 start: [...]/source-gcc/gcc/lra-lives.c:304:3 finish: [...]/source-gcc/gcc/lra-lives.c:304:3> [...]/source-gcc/gcc/lra-lives.c:304:3 start: [...]/source-gcc/gcc/lra-lives.c:304:3 finish: [...]/source-gcc/gcc/lra-lives.c:304:3> [...]/source-gcc/gcc/lra-lives.c:304:3 start: [...]/source-gcc/gcc/lra-lives.c:304:3 finish: [...]/source-gcc/gcc/lra-lives.c:304:3> (gdb) n 94 if (!get_no_warning_bit (expr) || !key) (gdb) print key $4 = 2147537909 (gdb) print/x key $5 = 0x8000d3f5 (gdb) s get_no_warning_bit (expr=0x7ffff3f14be0) at [...]/source-gcc/gcc/warning-control.cc:40 40 return expr->base.nowarning_flag; (gdb) finish Run till exit from #0 get_no_warning_bit (expr=0x7ffff3f14be0) at [...]/source-gcc/gcc/warning-control.cc:40 0x0000000001d18699 in get_nowarn_spec (expr=0x7ffff3f14be0) at [...]/source-gcc/gcc/warning-control.cc:94 94 if (!get_no_warning_bit (expr) || !key) Value returned is $6 = true (gdb) n 97 return nowarn_map ? nowarn_map->get (key) : NULL; (gdb) print nowarn_map $7 = (xint_hash_map_t *) 0x7ffff675ae10 (gdb) finish Run till exit from #0 get_nowarn_spec (expr=0x7ffff3f14be0) at [...]/source-gcc/gcc/warning-control.cc:97 0x0000000001d18764 in warning_suppressed_p (expr=0x7ffff3f14be0, opt=OPT_Wparentheses) at [...]/source-gcc/gcc/warning-control.cc:119 119 const nowarn_spec_t *spec = get_nowarn_spec (expr); Value returned is $8 = (nowarn_spec_t *) 0x7ffff65c66d4 (gdb) print/x *$8 $9 = {m_bits = 0xa5a5a5a5} (This is what then causes the spurious diagnostic; in a "non-faulting" build, this is 'm_bits = 2'.)