[Bug fortran/54678] second call to get_environment_variable gives valgrind warning with 8-byte integers

burnus at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Sep 24 06:37:00 GMT 2012


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54678

Tobias Burnus <burnus at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |burnus at gcc dot gnu.org

--- Comment #1 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-09-24 06:37:26 UTC ---
Draft patch:

--- a/libgfortran/intrinsics/env.c
+++ b/libgfortran/intrinsics/env.c
@@ -186,5 +186,6 @@ get_environment_variable_i8 (char *name, char *value,
GFC_INTEGER_8 *length,

   get_environment_variable_i4 (name, value, &length4, &status4, 
-                              &trim_name4, name_len, value_len);
+                              trim_name ? &trim_name4 : NULL,
+                              name_len, value_len);

   if (length)



More information about the Gcc-bugs mailing list