https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95037

kargl at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
                 CC|                            |kargl at gcc dot gnu.org
   Last reconfirmed|                            |2020-05-10
             Status|UNCONFIRMED                 |NEW
           Priority|P3                          |P4

--- Comment #1 from kargl at gcc dot gnu.org ---
Do not dereference a NULL pointer.  Patch against svn r280157.

Index: gcc/fortran/check.c
===================================================================
--- gcc/fortran/check.c (revision 280157)
+++ gcc/fortran/check.c (working copy)
@@ -6600,10 +6600,10 @@ gfc_check_random_seed (gfc_expr *size, gfc_expr *put, 

       if (gfc_array_size (put, &put_size)
          && mpz_get_ui (put_size) < seed_size)
-       gfc_error ("Size of %qs argument of %qs intrinsic at %L "
+       gfc_error ("Size of %qs argument of %qs intrinsic at %C "
                   "too small (%i/%i)",
                   gfc_current_intrinsic_arg[1]->name, gfc_current_intrinsic,
-                  where, (int) mpz_get_ui (put_size), seed_size);
+                  (int) mpz_get_ui (put_size), seed_size);
     }

   if (get != NULL)
@@ -6632,10 +6632,10 @@ gfc_check_random_seed (gfc_expr *size, gfc_expr *put, 

        if (gfc_array_size (get, &get_size)
           && mpz_get_ui (get_size) < seed_size)
-       gfc_error ("Size of %qs argument of %qs intrinsic at %L "
+       gfc_error ("Size of %qs argument of %qs intrinsic at %C "
                   "too small (%i/%i)",
                   gfc_current_intrinsic_arg[2]->name, gfc_current_intrinsic,
-                  where, (int) mpz_get_ui (get_size), seed_size);
+                  (int) mpz_get_ui (get_size), seed_size);
     }

   /* RANDOM_SEED may not have more than one non-optional argument.  */

Reply via email to