This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] Fix ICE during SCC hashing in LTO mode
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: Eric Botcazou <ebotcazou at adacore dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 30 Jun 2015 13:06:48 +0200
- Subject: Re: [patch] Fix ICE during SCC hashing in LTO mode
- Authentication-results: sourceware.org; auth=none
- References: <9576026 dot O56SWyA4nx at polaris>
On Tue, Jun 30, 2015 at 12:10 PM, Eric Botcazou <ebotcazou@adacore.com> wrote:
> Hi,
>
> the attached Ada testcase triggers an internal error in LTO mode:
>
> eric@polaris:~/build/gcc/native> gcc/gnat1 -quiet lto17.adb -flto
> +===========================GNAT BUG DETECTED==============================+
> | 6.0.0 20150629 (experimental) [trunk revision 225111] (x86_64-suse-linux)
> GCC error:|
> | in hash_scc, at lto-streamer-out.c:1445
>
> This is the assertion verifying that you walk the same SCC using DFS after
> starting from another element of the SCC in hash_scc. It fails here because
> this second DFS is not performed with the same THIS_REF_P parameter as the
> initial one, so there is no guaranteee that this will yield the same result
> because DFS_write_tree will behave differently.
>
> Fixed by passing the THIS_REF_P and REF_P parameters for FIRST to hash_scc.
>
> Tested on x86_64-suse-linux, OK for the mainline?
Ok (I suppose this also affects the GCC 5 branch?)
Thanks,
Richard.
>
> 2015-06-30 Eric Botcazou <ebotcazou@adacore.com>
>
> * lto-streamer-out.c (class DFS): Adjust hash_scc method.
> (DFS::DFS): Pass this_ref_p and ref_p to hash_scc.
> (hash_scc): Add this_ref_p and ref_p parameters and pass them
> to the inner DFS walk.
>
>
> 2015-06-30 Eric Botcazou <ebotcazou@adacore.com>
>
> * gnat.dg/lto17.ad[sb]: New test.
>
>
> --
> Eric Botcazou