[bootstrap-O3,fortran] add a NULL initializer to avoid a warning at -O3

Alexandre Oliva aoliva@redhat.com
Tue Jan 3 05:29:00 GMT 2017


Building with the bootstrap-O3 configuration option fails to compile
fortran/module.c due to an AFAICT false-positive warning about an
uninitialized use of a variable.

This patch adds a dummy initializer to silence it.

Regstrapped on x86_64-linux-gnu and i686-linux-gnu.  OK to install?

for  gcc/fortran/ChangeLog

	* module.c (load_omp_udrs): Initialize name.
---
 gcc/fortran/module.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/fortran/module.c b/gcc/fortran/module.c
index 713f272..6808366e 100644
--- a/gcc/fortran/module.c
+++ b/gcc/fortran/module.c
@@ -4702,7 +4702,7 @@ load_omp_udrs (void)
   mio_lparen ();
   while (peek_atom () != ATOM_RPAREN)
     {
-      const char *name, *newname;
+      const char *name = NULL, *newname;
       char *altname;
       gfc_typespec ts;
       gfc_symtree *st;

-- 
Alexandre Oliva, freedom fighter    http://FSFLA.org/~lxoliva/
You must be the change you wish to see in the world. -- Gandhi
Be Free! -- http://FSFLA.org/   FSF Latin America board member
Free Software Evangelist|Red Hat Brasil GNU Toolchain Engineer



More information about the Gcc-patches mailing list