This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Fix ICE on loop over constant vector at -O
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: Eric Botcazou <ebotcazou at adacore dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 10 Dec 2012 10:18:35 +0100
- Subject: Re: Fix ICE on loop over constant vector at -O
- References: <1486156.RQZsauqaQ0@polaris>
On Sat, Dec 8, 2012 at 12:42 PM, Eric Botcazou <ebotcazou@adacore.com> wrote:
> This is an internal error in for_each_index at -O:
>
> +===========================GNAT BUG DETECTED==============================+
> | 4.8.0 20121208 (experimental) [trunk revision 194319] (x86_64-suse-linux)
> GCC error:|
> | in for_each_index, at tree-ssa-loop-im.c:324 |
> | Error detected around vect9.adb:45:1|
>
> The callback is invoked on a vector CONST_DECL and stops. That's an unusual
> situation (the CONST_DECL is wrapped up in a VIEW_CONVERT_EXPR to array type)
> but IMO there is no reason to accept other DECLs and stop on CONST_DECLs.
>
> Tested on x86_64-suse-linux, applied on the mainline as obvious.
Well ... I would have expected that we'd have folded the CONST_DECL to
its DECL_INITIAL. At least that is what we do for all other CONST_DECLs.
The only way CONST_DECLs should appear in the IL (after some optimization
of course) is when you take their address.
So - if you can burn some extra cycles to figure out why it's not
replaced by its DECL_INITIAL ...?
Richard.
> 2012-12-08 Eric Botcazou <ebotcazou@adacore.com>
>
> * tree-ssa-loop-im.c (for_each_index) <CONST_DECL>: New case.
>
>
> 2012-12-08 Eric Botcazou <ebotcazou@adacore.com>
>
> * gnat.dg/vect9.ad[sb]: New test.
> * gnat.dg/vect9_pkg.ads: New helper.
>
>
> --
> Eric Botcazou