This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: avoid uninitialized uses in see.c on ia64
- From: Alexandre Oliva <aoliva at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Tue, 12 Aug 2008 02:46:33 -0300
- Subject: Re: avoid uninitialized uses in see.c on ia64
- References: <or63t9piqx.fsf@oliva.athome.lsd.ic.unicamp.br>
Ping?
This occurs on x86_64-linux-gnu and i686-linux-gnu with
BOOT_CFLAGS='-O3 -g' now.
On May 20, 2008, Alexandre Oliva <aoliva@redhat.com> wrote:
> I needed the patch below to pass bootstrap on ia64-linux-gnu.
> I haven't investigated this, but I suspect see_get_extension_data
> (that gets a pointer to an otherwise-uninitialized source_mode) is
> inlined, and then GCC realizes that source_mode is not initialized in
> very many cases. In fact, I can see that for a PARALLEL, *source_mode
> won't be set by see_get_extension_data(), but
> see_merge_one_def_extension will happily compare the mode of each
> SET_DEST in it with the uninitialized source_mode. Oops.
> This patch passed bootstrap and regtest on ia64-linux-gnu, but I won't
> pretend this to be a proper fix. I suggest a deeper analysis and a
> more complete solution, but I thought I'd post this anyway in case
> it's helpful, or if people conclude it's good enough of a fix.
> for gcc/ChangeLog
> from Alexandre Oliva <aoliva@redhat.com>
> * see.c (see_merge_one_def_extension): Avoid bogus? uninitialized
> warning.
> Index: gcc/see.c
> ===================================================================
> --- gcc/see.c.orig 2008-05-13 02:24:54.000000000 -0300
> +++ gcc/see.c 2008-05-13 05:30:11.000000000 -0300
> @@ -2787,7 +2787,7 @@ see_merge_one_def_extension (void **slot
> enum rtx_code code;
> enum rtx_code extension_code;
> enum machine_mode source_extension_mode;
> - enum machine_mode source_mode;
> + enum machine_mode source_mode = VOIDmode;
> enum machine_mode dest_extension_mode;
> bool merge_success = false;
> int i;
--
Alexandre Oliva http://www.lsd.ic.unicamp.br/~oliva/
Free Software Evangelist oliva@{lsd.ic.unicamp.br, gnu.org}
FSFLA Board Member ÂSÃ Libre! => http://www.fsfla.org/
Red Hat Compiler Engineer aoliva@{redhat.com, gcc.gnu.org}