[Bug fortran/70856] [6/7 Regression] ICE with -fopenacc in get_constraint_for_ssa_var, at tree-ssa-structalias.c:2952
tschwinge at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu May 12 14:07:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70856
Thomas Schwinge <tschwinge at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |rguenth at gcc dot gnu.org,
| |tschwinge at gcc dot gnu.org,
| |vries at gcc dot gnu.org
--- Comment #3 from Thomas Schwinge <tschwinge at gcc dot gnu.org> ---
I had a cursory look at that one. Differently from PR70857, the ICE triggers
here the second time that pass_ipa_pta is run (all_late_ipa_passes), and not
the first one (which is only active if "-fopenacc" is in effect; Tom CCed for
your information anyway). This is "fixed" ;-) by reverting the r233734 changes
for PR69951 "[Bug tree-optimization/69951] wrong code at -O1 and above on
x86_64-linux-gnu":
2016-02-26 Richard Biener <rguenther@suse.de>
PR tree-optimization/69551
* tree-ssa-structalias.c (get_constraint_for_ssa_var): When
looking through aliases adjust DECL_PT_UID to refer to the
ultimate alias target.
--- gcc/tree-ssa-structalias.c
+++ gcc/tree-ssa-structalias.c
@@ -2943,6 +2943,14 @@ get_constraint_for_ssa_var (tree t, vec<ce_s>
*results, bool address_p)
if (node && node->alias && node->analyzed)
{
node = node->ultimate_alias_target ();
+ /* Canonicalize the PT uid of all aliases to the ultimate target.
+ ??? Hopefully the set of aliases can't change in a way that
+ changes the ultimate alias target. */
+ gcc_assert ((! DECL_PT_UID_SET_P (node->decl)
+ || DECL_PT_UID (node->decl) == DECL_UID
(node->decl))
+ && (! DECL_PT_UID_SET_P (t)
+ || DECL_PT_UID (t) == DECL_UID (node->decl)));
+ DECL_PT_UID (t) = DECL_UID (node->decl);
t = node->decl;
}
}
(gdb) call node->debug()
A.4.3435/10 (A.4) @0x7ffff6a7f800
Type: variable definition analyzed
Visibility: prevailing_def_ironly artificial
References:
Referring: A.1.3429/6 (alias)MAIN__/0 (read)
Availability: available
Varpool flags: initialized used-by-single-function read-only
const-value-known
(gdb) call debug_tree(node->decl)
<var_decl 0x7ffff7ff5c60 A.4
type <array_type 0x7ffff6a91b28
type <real_type 0x7ffff68e6540 real(kind=4) SF
size <integer_cst 0x7ffff68cde10 constant 32>
unit size <integer_cst 0x7ffff68cde28 constant 4>
align 32 symtab 0 alias set 9 canonical type 0x7ffff68e6540
precision 32
pointer_to_this <pointer_type 0x7ffff68e6738>>
type_2 DI
size <integer_cst 0x7ffff68cdbd0 constant 64>
unit size <integer_cst 0x7ffff68cdbe8 constant 8>
align 32 symtab 0 alias set 9 canonical type 0x7ffff6a91b28
domain <integer_type 0x7ffff6a91540 type <integer_type
0x7ffff68d1930 integer(kind=8)>
DI size <integer_cst 0x7ffff68cdbd0 64> unit size <integer_cst
0x7ffff68cdbe8 8>
align 64 symtab 0 alias set -1 canonical type 0x7ffff6a91540
precision 64 min <integer_cst 0x7ffff68e8258 0> max <integer_cst 0x7ffff6a886d8
1>>
pointer_to_this <pointer_type 0x7ffff6a91f18>>
readonly constant static ignored DI file ../pr70856-z1.f90 line 3 col 0
size <integer_cst 0x7ffff68cdbd0 64> unit size <integer_cst 0x7ffff68cdbe8 8>
align 64 context <function_decl 0x7ffff6a8ec40 p> initial <constructor
0x7ffff6a88c00>>
(gdb) call debug_tree(t)
<var_decl 0x7ffff7ff5a20 A.1
type <array_type 0x7ffff6a911f8
type <real_type 0x7ffff68e6540 real(kind=4) SF
size <integer_cst 0x7ffff68cde10 constant 32>
unit size <integer_cst 0x7ffff68cde28 constant 4>
align 32 symtab 0 alias set 9 canonical type 0x7ffff68e6540
precision 32
pointer_to_this <pointer_type 0x7ffff68e6738>>
type_2 DI
size <integer_cst 0x7ffff68cdbd0 constant 64>
unit size <integer_cst 0x7ffff68cdbe8 constant 8>
align 32 symtab 0 alias set 9 canonical type 0x7ffff6a911f8
domain <integer_type 0x7ffff6a91540 type <integer_type
0x7ffff68d1930 integer(kind=8)>
DI size <integer_cst 0x7ffff68cdbd0 64> unit size <integer_cst
0x7ffff68cdbe8 8>
align 64 symtab 0 alias set -1 canonical type 0x7ffff6a91540
precision 64 min <integer_cst 0x7ffff68e8258 0> max <integer_cst 0x7ffff6a886d8
1>>
pointer_to_this <pointer_type 0x7ffff6a91738>>
readonly constant static ignored DI file ../pr70856-z1.f90 line 2 col 0
size <integer_cst 0x7ffff68cdbd0 64> unit size <integer_cst 0x7ffff68cdbe8 8>
align 64 context <function_decl 0x7ffff6a8ec40 p>>
More information about the Gcc-bugs
mailing list