[Bug middle-end/71893] gfortran.dg ICEs in gcc/tree-ssa-pre.c; -fcode-hoisting?
rguenth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Jul 15 11:42:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71893
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot gnu.org
--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
Value numbering _5 stmt = _5 = (bitsizetype) _4;
Setting value number of _5 to _5 (changed)
...
Value numbering _74 stmt = _74 = (sizetype) _6;
Match-and-simplified (sizetype) _6 to _5
RHS (sizetype) _6 simplified to _5
Setting value number of _74 to _5 (changed)
so it seems sizetype and bitsizetype are actually the same.
Indeed:
(gdb) p sizetype_tab[stk_sizetype]
$1 = (tree_node *) 0x7ffff688c0a8
(gdb) p sizetype_tab[stk_bitsizetype]
$2 = (tree_node *) 0x7ffff688c150
(gdb) p debug_tree ($1)
<integer_type 0x7ffff688c0a8 sizetype public unsigned DI
size <integer_cst 0x7ffff6887378 type <integer_type 0x7ffff688c150
bitsizetype> constant 64>
unit size <integer_cst 0x7ffff6887390 type <integer_type 0x7ffff688c0a8
sizetype> constant 8>
align 64 symtab 0 alias set -1 canonical type 0x7ffff688c0a8 precision 64
min <integer_cst 0x7ffff68873a8 0> max <integer_cst 0x7ffff6890420
18446744073709551615>>
$3 = void
(gdb) p debug_tree ($2)
<integer_type 0x7ffff688c150 bitsizetype public unsigned DI
size <integer_cst 0x7ffff6887378 type <integer_type 0x7ffff688c150
bitsizetype> constant 64>
unit size <integer_cst 0x7ffff6887390 type <integer_type 0x7ffff688c0a8
sizetype> constant 8>
align 64 symtab 0 alias set -1 canonical type 0x7ffff688c150 precision 64
min <integer_cst 0x7ffff68873c0 0> max <integer_cst 0x7ffff6890440
18446744073709551615>>
$4 = void
and array_ref_element_size even notices this:
/* If a size was specified in the ARRAY_REF, it's the size measured
in alignment units of the element type. So multiply by that value. */
if (aligned_size)
{
/* ??? tree_ssa_useless_type_conversion will eliminate casts to
sizetype from another type of the same width and signedness. */
if (TREE_TYPE (aligned_size) != sizetype)
aligned_size = fold_convert_loc (loc, sizetype, aligned_size);
return size_binop_loc (loc, MULT_EXPR, aligned_size,
size_int (TYPE_ALIGN_UNIT (elmt_type)));
because otherwise size_binop would complain.
I'll fixup in VN/PRE.
More information about the Gcc-bugs
mailing list