public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "kargl at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/95037] gfortran fails to compile a simple subroutine, issues an opaque message
Date: Sun, 10 May 2020 17:29:21 +0000	[thread overview]
Message-ID: <bug-95037-4-POgdpyxxxT@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-95037-4@http.gcc.gnu.org/bugzilla/>

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	other threads:[~2020-05-10 17:29 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-10 15:35 [Bug fortran/95037] New: " longb at cray dot com
2020-05-10 17:29 ` kargl at gcc dot gnu.org [this message]
2020-06-14 12:36 ` [Bug fortran/95037] " tkoenig at gcc dot gnu.org
2020-06-14 12:45 ` tkoenig at gcc dot gnu.org
2020-10-18 20:27 ` longb at cray dot com
2020-10-19  5:38 ` tkoenig at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-95037-4-POgdpyxxxT@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).