This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch]: Possibly uninitialized variable in tree-vect-loop.c
- From: Richard Guenther <richard dot guenther at gmail dot com>
- To: Kai Tietz <ktietz70 at googlemail dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 23 Aug 2010 19:11:34 +0200
- Subject: Re: [patch]: Possibly uninitialized variable in tree-vect-loop.c
- References: <AANLkTi=-TebGsBtPsj+SKtC8C0uAU3KTqVGMYdGRMgF1@mail.gmail.com>
On Mon, Aug 23, 2010 at 8:36 AM, Kai Tietz <ktietz70@googlemail.com> wrote:
> Hi,
>
> Somehow the diagnostic of 4.6 about possible unitialized variables is
> a bit vague. By using an older gcc for bootstrapping I found a case in
> tree-vect-loop.c, which indeed has unitialized variable in some
> branches.
Ok.
Thanks,
Richard.
> This patch fixes it.
>
> ChangeLog
>
> 2010-08-23 ?Kai Tietz
>
> ? ? ? ?* tree-vect-loop.c (vect_get_single_scalar_iteraion_cost):
> Pre-initialize innerloop_iters to one.
>
> Tested for x86_64-pc-linux-gnu, x86_64-w64-mingw32, and
> i686-w64-mingw32. Ok for apply?
>
> Regards,
> Kai
>
> Index: tree-vect-loop.c
> ===================================================================
> --- tree-vect-loop.c ? ?(revision 163445)
> +++ tree-vect-loop.c ? ?(working copy)
> @@ -2031,6 +2031,7 @@
> ? ? ?statements. ?*/
>
> ? /* FORNOW. ?*/
> + ?innerloop_iters = 1;
> ? if (loop->inner)
> ? ? innerloop_iters = 50; /* FIXME */
>
>
> --
> |? (\_/) This is Bunny. Copy and paste
> | (='.'=) Bunny into your signature to help
> | (")_(") him gain world domination
>