This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Fix lto-symtab ICE during Ada LTO bootstrap
- From: Eric Botcazou <ebotcazou at adacore dot com>
- To: Jan Hubicka <hubicka at ucw dot cz>
- Cc: gcc-patches at gcc dot gnu dot org, "H.J. Lu" <hjl dot tools at gmail dot com>, Richard Biener <richard dot guenther at gmail dot com>, Arnaud Charlet <charlet at adacore dot com>
- Date: Sun, 20 Dec 2015 23:19:07 +0100
- Subject: Re: Fix lto-symtab ICE during Ada LTO bootstrap
- Authentication-results: sourceware.org; auth=none
- References: <20151121182122 dot GB23225 at kam dot mff dot cuni dot cz> <2994568 dot AbHtM70Sqm at polaris> <20151123183655 dot GB77967 at kam dot mff dot cuni dot cz>
> BTW for the LTO type merging issues one could probably just drop those types
> and all derivations to alias set 0. But indeed rewriting them to pointers
> would be better, especially for ABI compatibility.
>
> The Ada ICE I get is:
> Continuing.
> +===========================GNAT BUG DETECTED==============================+
> | 6.0.0 20151122 (experimental) (x86_64-pc-linux-gnu) Assert_Failure
> | atree.adb:6776| Error detected at system.ads:107:4
It's apparently another bug in the DCE pass. From:
<bb 4063>:
# DEBUG id => e_186
_11422 = atree__unchecked_access__node4.localalias.3007 (e_186);
<bb 4064>:
# DEBUG id => NULL
# DEBUG n => _11422
# DEBUG n => NULL
if (_11422 == 0)
goto <bb 4097> (<L255>);
else
goto <bb 4065>;
in phicprop2, we have in cddce2:
Deleting : if (_11422 == 0)
and then:
<bb 4094>:
# DEBUG id => e_186
_11422 = atree__unchecked_access__node4.localalias.3007 (e_186);
<bb 4095>:
# DEBUG id => NULL
# DEBUG n => _11422
# DEBUG n => NULL
# DEBUG id => e_186
goto <bb 4076>;
which is wrong since it's the only exit of the loop in sem_prag.adb:22878:
loop
Set_Warnings_Off
(E, (Chars (Get_Pragma_Arg (Arg1)) =
Name_Off));
-- For OFF case, make entry in warnings off
-- pragma table for later processing. But we do
-- not do that within an instance, since these
-- warnings are about what is needed in the
-- template, not an instance of it.
if Chars (Get_Pragma_Arg (Arg1)) = Name_Off
and then Warn_On_Warnings_Off
and then not In_Instance
then
Warnings_Off_Pragmas.Append ((N, E, Reason));
end if;
if Is_Enumeration_Type (E) then
declare
Lit : Entity_Id;
begin
Lit := First_Literal (E);
while Present (Lit) loop
Set_Warnings_Off (Lit);
Next_Literal (Lit);
end loop;
end;
end if;
exit when No (Homonym (E));
E := Homonym (E);
end loop;
Note that the change you installed is not exactly the patch you had posted, it
contains an additional hunk:
@@ -134,7 +137,7 @@ mark_stmt_necessary (gimple *stmt, bool
gimple_set_plf (stmt, STMT_NECESSARY, true);
if (add_to_worklist)
worklist.safe_push (stmt);
- if (bb_contains_live_stmts && !is_gimple_debug (stmt))
+ if (add_to_worklist && bb_contains_live_stmts && !is_gimple_debug (stmt))
bitmap_set_bit (bb_contains_live_stmts, gimple_bb (stmt)->index);
}
which is not documented in the installed ChangeLog either.
--
Eric Botcazou