https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90576
--- Comment #2 from Martin Liška <marxin at gcc dot gnu.org> ---
So the problem can be reproduced when only factor.cc is compiled with -flto
-Os.
Problematic comparison is:
for (pivot = temp.pivots.next; pivot != &temp.pivots;
pivot = pivot->next)
{
eliminatePivot(pivot->idx, pivot->pos, eps );
}
}
I reduced that to problematic call to:
#0 aliasing_component_refs_p (ref1=0x7ffff73cd480, ref1_alias_set=15,
base1_alias_set=6, offset1=..., max_size1=..., ref2=0x7ffff7441030,
ref2_alias_set=15, base2_alias_set=13, offset2=..., max_size2=...,
ref2_is_decl=false)
true is returned for:
(gdb) p print_generic_expr (stderr, ref1, 0)
this_16(D)->temp.pivots.next$8 = void
(gdb) p print_generic_expr (stderr, ref2, 0)
_1090->next$9 = void
(gdb) p debug_tree(ref1)
<component_ref 0x7ffff73cd480
type <pointer_type 0x7ffff759d690
type <record_type 0x7ffff758e888 Pring addressable BLK
size <integer_cst 0x7ffff7786ed0 constant 256>
unit-size <integer_cst 0x7ffff7786fc0 constant 32>
align:64 warn_if_not_align:0 symtab:0 alias-set 13 canonical-type
0x7ffff758e888 fields <field_decl 0x7ffff758ded8 next> context <record_type
0x7ffff758e738 CLUFactor>
pointer_to_this <pointer_type 0x7ffff759d690>>
public unsigned DI
size <integer_cst 0x7ffff7786b70 constant 64>
unit-size <integer_cst 0x7ffff7786b88 constant 8>
align:64 warn_if_not_align:0 symtab:0 alias-set 15 structural-equality
pointer_to_this <pointer_type 0x7ffff75a1b28> reference_to_this
<reference_type 0x7ffff759d738>>
arg:0 <component_ref 0x7ffff73cd4b0 type <record_type 0x7ffff758e888 Pring>
arg:0 <component_ref 0x7ffff73cd4e0 type <record_type 0x7ffff758e7e0
Temp>
arg:0 <mem_ref 0x7ffff73ce0c8 type <record_type 0x7ffff758e738
CLUFactor>
arg:0 <ssa_name 0x7ffff7315a68 type <pointer_type
0x7ffff759fdc8>
visited var <parm_decl 0x7ffff7731500 this>
def_stmt GIMPLE_NOP
version:16
ptr-info 0x7ffff76c0eb8>
arg:1 <integer_cst 0x7ffff75b79c0 constant 0>> arg:1
<field_decl 0x7ffff758d8e8 temp>
factor.cc:1369:23 start: factor.cc:1369:23 finish:
factor.cc:1369:23>
arg:1 <field_decl 0x7ffff758dbe0 pivots type <record_type
0x7ffff758e888 Pring>
nonlocal BLK clufactor.h:75:15 size <integer_cst 0x7ffff7786ed0
256> unit-size <integer_cst 0x7ffff7786fc0 32>
align:64 warn_if_not_align:0 offset_align 128 offset <integer_cst
0x7ffff7786fc0 32>
bit-offset <integer_cst 0x7ffff7786be8 constant 0> context
<record_type 0x7ffff758e7e0 Temp> chain <field_decl 0x7ffff758db48 pivot_col>>
factor.cc:1369:28 start: factor.cc:1369:28 finish: factor.cc:1369:28>
arg:1 <field_decl 0x7ffff758ded8 next
type <pointer_type 0x7ffff758e5e8 type <record_type 0x7ffff758e690
Pring>
unsigned DI size <integer_cst 0x7ffff7786b70 64> unit-size
<integer_cst 0x7ffff7786b88 8>
align:64 warn_if_not_align:0 symtab:0 alias-set -1
structural-equality reference_to_this <reference_type 0x7ffff758ee70>>
unsigned nonlocal DI clufactor.h:53:14 size <integer_cst 0x7ffff7786b70
64> unit-size <integer_cst 0x7ffff7786b88 8>
align:64 warn_if_not_align:0 offset_align 128
offset <integer_cst 0x7ffff7786ba0 constant 0> bit-offset <integer_cst
0x7ffff7786be8 0> context <record_type 0x7ffff758e888 Pring>
chain <field_decl 0x7ffff758de40 prev type <pointer_type
0x7ffff758e5e8>
unsigned nonlocal DI clufactor.h:54:14 size <integer_cst
0x7ffff7786b70 64> unit-size <integer_cst 0x7ffff7786b88 8>
align:64 warn_if_not_align:0 offset_align 128 offset <integer_cst
0x7ffff7786ba0 0> bit-offset <integer_cst 0x7ffff7786b70 64> context
<record_type 0x7ffff758e888 Pring> chain <field_decl 0x7ffff758dda8 idx>>>
factor.cc:1369:35 start: factor.cc:1369:35 finish: factor.cc:1369:35>
(gdb) p debug_tree(ref2)
<component_ref 0x7ffff7441030
type <pointer_type 0x7ffff759d690
type <record_type 0x7ffff758e888 Pring addressable BLK
size <integer_cst 0x7ffff7786ed0 constant 256>
unit-size <integer_cst 0x7ffff7786fc0 constant 32>
align:64 warn_if_not_align:0 symtab:0 alias-set 13 canonical-type
0x7ffff758e888 fields <field_decl 0x7ffff758ded8 next> context <record_type
0x7ffff758e738 CLUFactor>
pointer_to_this <pointer_type 0x7ffff759d690>>
public unsigned DI
size <integer_cst 0x7ffff7786b70 constant 64>
unit-size <integer_cst 0x7ffff7786b88 constant 8>
align:64 warn_if_not_align:0 symtab:0 alias-set 15 structural-equality
pointer_to_this <pointer_type 0x7ffff75a1b28> reference_to_this
<reference_type 0x7ffff759d738>>
arg:0 <mem_ref 0x7ffff743b500 type <record_type 0x7ffff758e888 Pring>
arg:0 <ssa_name 0x7ffff743cee8 type <pointer_type 0x7ffff759d690>
visited
def_stmt _1090 = _1088->prev;
version:1090
ptr-info 0x7ffff75e6228>
arg:1 <integer_cst 0x7ffff7638dc8 constant 0>>
arg:1 <field_decl 0x7ffff758ded8 next
type <pointer_type 0x7ffff758e5e8 type <record_type 0x7ffff758e690
Pring>
unsigned DI size <integer_cst 0x7ffff7786b70 64> unit-size
<integer_cst 0x7ffff7786b88 8>
align:64 warn_if_not_align:0 symtab:0 alias-set -1
structural-equality reference_to_this <reference_type 0x7ffff758ee70>>
unsigned nonlocal DI clufactor.h:53:14 size <integer_cst 0x7ffff7786b70
64> unit-size <integer_cst 0x7ffff7786b88 8>
align:64 warn_if_not_align:0 offset_align 128
offset <integer_cst 0x7ffff7786ba0 constant 0>
bit-offset <integer_cst 0x7ffff7786be8 constant 0> context <record_type
0x7ffff758e888 Pring>
chain <field_decl 0x7ffff758de40 prev type <pointer_type
0x7ffff758e5e8>
unsigned nonlocal DI clufactor.h:54:14 size <integer_cst
0x7ffff7786b70 64> unit-size <integer_cst 0x7ffff7786b88 8>
align:64 warn_if_not_align:0 offset_align 128 offset <integer_cst
0x7ffff7786ba0 0> bit-offset <integer_cst 0x7ffff7786b70 64> context
<record_type 0x7ffff758e888 Pring> chain <field_decl 0x7ffff758dda8 idx>>>
factor.cc:1079:7 start: factor.cc:1079:7 finish: factor.cc:1079:7>
(gdb) p offset1
$12 = {
<poly_int_pod<1, long>> = {
coeffs = {3392}
}, <No data fields>}
(gdb) p offset2
$13 = {
<poly_int_pod<1, long>> = {
coeffs = {0}
}, <No data fields>}
(gdb) p max_size1
$14 = {
<poly_int_pod<1, long>> = {
coeffs = {64}
}, <No data fields>}
(gdb) p max_size2
$15 = {
<poly_int_pod<1, long>> = {
coeffs = {64}
}, <No data fields>}
I hope it will be enough information.
Honza?