diff mbox

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

Message ID ortw9g3e5m.fsf@lxoliva.fsfla.org
State New
Headers show

Commit Message

Alexandre Oliva Jan. 3, 2017, 5:28 a.m. UTC
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(-)

Comments

Jeff Law Jan. 3, 2017, 5:43 p.m. UTC | #1
On 01/02/2017 10:28 PM, Alexandre Oliva wrote:
> 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.
OK.
jeff
diff mbox

Patch

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;