* [PATCH] Only return after resetting type_param_spec_list
@ 2021-11-29 11:28 Richard Biener
2021-11-29 19:36 ` Harald Anlauf
0 siblings, 1 reply; 3+ messages in thread
From: Richard Biener @ 2021-11-29 11:28 UTC (permalink / raw)
To: gcc-patches; +Cc: fortran
This fixes an appearant mistake in gfc_insert_parameter_exprs.
Bootstrap / regtest pending on x86_64-unknown-linux-gnu.
OK?
Thanks,
Richard.
2021-11-29 Richard Biener <rguenther@suse.de>
gcc/fortran/
* decl.c (gfc_insert_parameter_exprs): Only return after
resetting type_param_spec_list.
---
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
--
2.31.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Only return after resetting type_param_spec_list
2021-11-29 11:28 [PATCH] Only return after resetting type_param_spec_list Richard Biener
@ 2021-11-29 19:36 ` Harald Anlauf
2021-11-29 19:36 ` Harald Anlauf
0 siblings, 1 reply; 3+ messages in thread
From: Harald Anlauf @ 2021-11-29 19:36 UTC (permalink / raw)
To: Richard Biener, gcc-patches; +Cc: fortran, Paul Richard Thomas
Am 29.11.21 um 12:28 schrieb Richard Biener via Fortran:
> This fixes an appearant mistake in gfc_insert_parameter_exprs.
Yes, that looks pretty much like a missed cleanup and fix during
development. CC'ing Paul.
> Bootstrap / regtest pending on x86_64-unknown-linux-gnu.
>
> OK?
LGTM if it regtests.
Thanks,
Harald
> Thanks,
> Richard.
>
> 2021-11-29 Richard Biener <rguenther@suse.de>
>
> gcc/fortran/
> * decl.c (gfc_insert_parameter_exprs): Only return after
> resetting type_param_spec_list.
> ---
> 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
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Only return after resetting type_param_spec_list
2021-11-29 19:36 ` Harald Anlauf
@ 2021-11-29 19:36 ` Harald Anlauf
0 siblings, 0 replies; 3+ messages in thread
From: Harald Anlauf @ 2021-11-29 19:36 UTC (permalink / raw)
To: fortran; +Cc: gcc-patches
Am 29.11.21 um 12:28 schrieb Richard Biener via Fortran:
> This fixes an appearant mistake in gfc_insert_parameter_exprs.
Yes, that looks pretty much like a missed cleanup and fix during
development. CC'ing Paul.
> Bootstrap / regtest pending on x86_64-unknown-linux-gnu.
>
> OK?
LGTM if it regtests.
Thanks,
Harald
> Thanks,
> Richard.
>
> 2021-11-29 Richard Biener <rguenther@suse.de>
>
> gcc/fortran/
> * decl.c (gfc_insert_parameter_exprs): Only return after
> resetting type_param_spec_list.
> ---
> 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
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-11-29 19:37 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-29 11:28 [PATCH] Only return after resetting type_param_spec_list Richard Biener
2021-11-29 19:36 ` Harald Anlauf
2021-11-29 19:36 ` Harald Anlauf
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).