public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] Fix a pasto in gfc_check_num_images
@ 2017-07-31  7:39 Jakub Jelinek
  2017-07-31  8:51 ` Richard Biener
  0 siblings, 1 reply; 2+ messages in thread
From: Jakub Jelinek @ 2017-07-31  7:39 UTC (permalink / raw)
  To: fortran; +Cc: gcc-patches

Hi!

bootstrap-ubsan reported taking address of a &distance->where when
distance is NULL.  The function has one block guarded with if (distance)
and another guarded with if (failed), so I think this is just a pasto
from the earlier if (distance) block.

Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?

2017-07-31  Jakub Jelinek  <jakub@redhat.com>

	* check.c (gfc_check_num_images): Fix a pasto.

--- gcc/fortran/check.c.jj	2017-03-05 22:39:52.000000000 +0100
+++ gcc/fortran/check.c	2017-07-28 14:30:40.503511275 +0200
@@ -5149,7 +5149,7 @@ gfc_check_num_images (gfc_expr *distance
 	return false;
 
       if (!gfc_notify_std (GFC_STD_F2008_TS, "FAILED= argument to "
-			   "NUM_IMAGES at %L", &distance->where))
+			   "NUM_IMAGES at %L", &failed->where))
 	return false;
     }
 

	Jakub

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] Fix a pasto in gfc_check_num_images
  2017-07-31  7:39 [PATCH] Fix a pasto in gfc_check_num_images Jakub Jelinek
@ 2017-07-31  8:51 ` Richard Biener
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Biener @ 2017-07-31  8:51 UTC (permalink / raw)
  To: Jakub Jelinek; +Cc: fortran, GCC Patches

On Mon, Jul 31, 2017 at 9:39 AM, Jakub Jelinek <jakub@redhat.com> wrote:
> Hi!
>
> bootstrap-ubsan reported taking address of a &distance->where when
> distance is NULL.  The function has one block guarded with if (distance)
> and another guarded with if (failed), so I think this is just a pasto
> from the earlier if (distance) block.
>
> Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?

Ok.

Richard.

> 2017-07-31  Jakub Jelinek  <jakub@redhat.com>
>
>         * check.c (gfc_check_num_images): Fix a pasto.
>
> --- gcc/fortran/check.c.jj      2017-03-05 22:39:52.000000000 +0100
> +++ gcc/fortran/check.c 2017-07-28 14:30:40.503511275 +0200
> @@ -5149,7 +5149,7 @@ gfc_check_num_images (gfc_expr *distance
>         return false;
>
>        if (!gfc_notify_std (GFC_STD_F2008_TS, "FAILED= argument to "
> -                          "NUM_IMAGES at %L", &distance->where))
> +                          "NUM_IMAGES at %L", &failed->where))
>         return false;
>      }
>
>
>         Jakub

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-07-31  8:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-31  7:39 [PATCH] Fix a pasto in gfc_check_num_images Jakub Jelinek
2017-07-31  8:51 ` Richard Biener

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).