https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64550
--- Comment #3 from Martin Liška <marxin at gcc dot gnu.org> ---
The problem is hidden in missing volatile side-effect comparison for:
# VUSE <.MEM_5(D)>
__mptr_8 ={v} _17->first;
(gdb) call debug_gimple_stmt(s2)
# VUSE <.MEM_5(D)>
__mptr_8 = _17->first;
where compare_memory_operand is called for:
<component_ref 0x7ffff6d65ed0
type <pointer_type 0x7ffff6d54bd0
type <record_type 0x7ffff6d54b28 __hlist_node type_0 TI
size <integer_cst 0x7ffff6c36cf0 constant 128>
unit size <integer_cst 0x7ffff6c36d08 constant 16>
align 64 symtab 0 alias set 5 canonical type 0x7ffff6d54b28 fields
<field_decl 0x7ffff6c5aed8 next> context <translation_unit_decl 0x7ffff7fee3c0
D.1890>
pointer_to_this <pointer_type 0x7ffff6d54bd0> chain <type_decl
0x7ffff6c5ada8 D.1830>>
sizes-gimplified public unsigned DI
size <integer_cst 0x7ffff6c36ca8 constant 64>
unit size <integer_cst 0x7ffff6c36cc0 constant 8>
align 64 symtab 0 alias set 3 canonical type 0x7ffff6d54bd0
pointer_to_this <pointer_type 0x7ffff6d54c78>>
side-effects volatile
arg 0 <mem_ref 0x7ffff6d70f78
type <record_type 0x7ffff6d54a80 __hlist_head type_0 DI size
<integer_cst 0x7ffff6c36ca8 64> unit size <integer_cst 0x7ffff6c36cc0 8>
align 64 symtab 0 alias set 4 canonical type 0x7ffff6d54a80 fields
<field_decl 0x7ffff6c5ae40 first> context <translation_unit_decl 0x7ffff7fee3c0
D.1890>
pointer_to_this <pointer_type 0x7ffff6d54dc8> chain <type_decl
0x7ffff6c5ad10 D.1829>>
arg 0 <ssa_name 0x7ffff6d83288 type <pointer_type 0x7ffff6d54dc8>
visiteddef_stmt _17 = _13 + _16;
version 17
ptr-info 0x7ffff6d71750>
arg 1 <integer_cst 0x7ffff6d71078 constant 0>
/home/marxin/Programming/testcases/ppc64-linux-bug.c:41:664>
arg 1 <field_decl 0x7ffff6c5ae40 first type <pointer_type 0x7ffff6d54bd0>
unsigned DI file /home/marxin/Programming/testcases/ppc64-linux-bug.c
line 2 col 23 size <integer_cst 0x7ffff6c36ca8 64> unit size <integer_cst
0x7ffff6c36cc0 8>
align 64 offset_align 128
offset <integer_cst 0x7ffff6c36cd8 constant 0>
bit offset <integer_cst 0x7ffff6c36d20 constant 0> context <record_type
0x7ffff6d54a80 __hlist_head>>
/home/marxin/Programming/testcases/ppc64-linux-bug.c:41:630>
Where volatile is correctly set, but after refactoring our volatile comparison
is based on result of ao_ref_base which is:
<mem_ref 0x7ffff6d70f78
Shouldn't be Richard TREE_THIS_VOLATILE called for arguments given to
func_checker::compare_memory_operand function in case we know it's a memory
reference?
Thanks,
Martin