public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Richard Biener <rguenth@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc r12-5594] Only return after resetting type_param_spec_list
Date: Tue, 30 Nov 2021 08:17:10 +0000 (GMT)	[thread overview]
Message-ID: <20211130081710.9F4C9385781D@sourceware.org> (raw)

https://gcc.gnu.org/g:b962469a01b017ae2e7ef2865a40e37094ceec4b

commit r12-5594-gb962469a01b017ae2e7ef2865a40e37094ceec4b
Author: Richard Biener <rguenther@suse.de>
Date:   Mon Nov 29 12:26:39 2021 +0100

    Only return after resetting type_param_spec_list
    
    This fixes an appearant mistake in gfc_insert_parameter_exprs.
    
    2021-11-29  Richard Biener  <rguenther@suse.de>
    
    gcc/fortran/
            * decl.c (gfc_insert_parameter_exprs): Only return after
            resetting type_param_spec_list.

Diff:
---
 gcc/fortran/decl.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gcc/fortran/decl.c b/gcc/fortran/decl.c
index c0fec90e3e0..4971638f9b6 100644
--- a/gcc/fortran/decl.c
+++ b/gcc/fortran/decl.c
@@ -3733,9 +3733,9 @@ gfc_insert_parameter_exprs (gfc_expr *e, gfc_actual_arglist *param_list)
 {
   gfc_actual_arglist *old_param_spec_list = type_param_spec_list;
   type_param_spec_list = param_list;
-  return gfc_traverse_expr (e, NULL, &insert_parameter_exprs, 1);
-  type_param_spec_list = NULL;
+  bool res = gfc_traverse_expr (e, NULL, &insert_parameter_exprs, 1);
   type_param_spec_list = old_param_spec_list;
+  return res;
 }
 
 /* Determines the instance of a parameterized derived type to be used by


                 reply	other threads:[~2021-11-30  8:17 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20211130081710.9F4C9385781D@sourceware.org \
    --to=rguenth@gcc.gnu.org \
    --cc=gcc-cvs@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).