public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: "François-Xavier Coudert" <fxcoudert@gmail.com>
To: GFortran <fortran@gcc.gnu.org>, gcc-patches <gcc-patches@gcc.gnu.org>
Subject: [patch]
Date: Wed, 10 May 2006 10:44:00 -0000	[thread overview]
Message-ID: <19c433eb0605100206y4bbbcbbbo535c31582ee5fcc@mail.gmail.com> (raw)

:ADDPATCH fortran:

I tried to understand PR 24549
(http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24549), an ICE after
error recovery. We see a statement we don't understand, we skip to the
next and there is the ICE, because we use a value for gfc_new_block
that has been freed (it was allocated for the last statement). I don't
see any reason why, in reject_statement(), we don't set gfc_new_block
= NULL, leading to the following patch:

Index: parse.c
===================================================================
--- parse.c     (revision 113603)
+++ parse.c     (working copy)
@@ -1292,7 +1292,7 @@
 static void
 reject_statement (void)
 {
-
+  gfc_new_block = NULL;
   gfc_undo_symbols ();
   gfc_clear_warning ();
   undo_new_statement ();


So, I'd like to know, from someone who's accustomed to gfortran error
recovery mechanism, if there is a reason for not setting clearing
gfc_new_block. And, if not, is the above patch approved (I'll add a
testcase and the obvious ChangeLog entries, of course).

Thanks,
FX

PS: I know this is patch submission is not in very good order, but I'm
at work and it's such a simple patch, I couldn't keep it for later.

             reply	other threads:[~2006-05-10  9:06 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-10 10:44 François-Xavier Coudert [this message]
     [not found] <ormtqpsbuc.fsf@lxoliva.fsfla.org>
2021-09-09  7:11 ` [PATCH] strub: machine-independent stack scrubbing Alexandre Oliva
2022-07-29  6:16   ` [PATCH v2 00/10] Introduce " Alexandre Oliva
2023-06-16  6:09     ` [PATCH v3] " Alexandre Oliva
2023-10-20  6:03       ` [PATCH v4] " Alexandre Oliva
2023-10-26  6:15         ` Alexandre Oliva
2023-11-20 12:40           ` Alexandre Oliva
2023-11-22 14:14             ` Richard Biener
2023-11-23 10:56               ` Alexandre Oliva
2023-11-23 12:05                 ` Richard Biener
2023-11-29  8:53                   ` Alexandre Oliva
2023-11-29 12:48                     ` Richard Biener
2023-11-30  4:13                       ` Alexandre Oliva
2023-11-30 12:00                         ` Richard Biener
2023-12-02 17:56                           ` [PATCH v5] " Alexandre Oliva
2023-12-06  8:36                             ` Causes to nvptx bootstrap fail: " Tobias Burnus
2023-12-06 11:32                               ` Thomas Schwinge
2023-12-06 22:12                                 ` Alexandre Oliva
2023-12-07  3:33                                   ` [PATCH] strub: enable conditional support Alexandre Oliva
2023-12-07 16:44                                     ` Thomas Schwinge
2023-12-07 17:52                                       ` [PATCH] Alexandre Oliva
2023-12-08  6:46                                         ` [PATCH] Richard Biener
  -- strict thread matches above, loose matches on Subject: below --
2006-10-10 19:31 [PATCH]: Kaveh R. GHAZI
     [not found] <no.id>
2004-05-04  0:50 ` [PATCH] Ulrich Weigand
2004-05-04  0:52   ` [PATCH] Eric Christopher
2004-05-04  0:42 [PATCH] Ulrich Weigand
2004-05-04  0:52 ` [PATCH] Eric Christopher
2004-05-04  1:14   ` [PATCH] Ulrich Weigand
2004-05-04  2:05     ` [PATCH] Eric Christopher
2004-05-04  1:11 ` [PATCH] Eric Christopher
2004-05-04  1:14   ` [PATCH] Ulrich Weigand
2004-05-04  0:26 [PATCH] Eric Christopher
2004-02-08 22:05 [PATCH] Bernardo Innocenti
2004-02-08 22:55 ` [PATCH] Richard Henderson
2004-02-21 13:45   ` [PATCH] Richard Henderson
2004-02-21 13:45 ` [PATCH] Bernardo Innocenti
2003-12-16 14:00 [PATCH] Hartmut Penner
2003-12-16 17:36 ` [PATCH] Zack Weinberg
2003-02-20 12:36 [PATCH] Zdenek Dvorak

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=19c433eb0605100206y4bbbcbbbo535c31582ee5fcc@mail.gmail.com \
    --to=fxcoudert@gmail.com \
    --cc=fortran@gcc.gnu.org \
    --cc=gcc-patches@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).