Re: [PATCH] Fortran: reject MODULE PROCEDURE outside generic module interface [PR99036]

2023-03-21 Thread Harald Anlauf via Fortran
Hi Tobias, Am 21.03.23 um 09:31 schrieb Tobias Burnus: On 20.03.23 21:57, Harald Anlauf via Gcc-patches wrote: --- a/gcc/fortran/decl.cc +++ b/gcc/fortran/decl.cc @@ -9998,6 +9998,7 @@ gfc_match_modproc (void)     if ((gfc_state_stack->state != COMP_INTERFACE && gfc_state_stack->state

Re: [PATCHv4, gfortran] Escalate failure when Hollerith constant to real conversion fails [PR103628]

2023-03-21 Thread Tobias Burnus
Hi, LGTM, except for: On 21.03.23 07:29, HAO CHEN GUI wrote: @@ -4708,7 +4710,12 @@ do_simplify (gfc_intrinsic_sym *specific, gfc_expr *e) finish: if (result == _bad_expr) -return false; +{ + if (errorcount == old_errorcount + && (!gfc_buffered_p () &&

Re: [PATCH] Fortran: reject MODULE PROCEDURE outside generic module interface [PR99036]

2023-03-21 Thread Tobias Burnus
On 20.03.23 21:57, Harald Anlauf via Gcc-patches wrote: --- a/gcc/fortran/decl.cc +++ b/gcc/fortran/decl.cc @@ -9998,6 +9998,7 @@ gfc_match_modproc (void) if ((gfc_state_stack->state != COMP_INTERFACE && gfc_state_stack->state != COMP_CONTAINS) || gfc_state_stack->previous

Re: [PATCH] Fortran: reject MODULE PROCEDURE outside generic module interface [PR99036]

2023-03-21 Thread Paul Richard Thomas via Fortran
Hi Harald, This is good for trunk and for backporting. Thanks for the rapid fix. Paul On Mon, 20 Mar 2023 at 20:57, Harald Anlauf via Fortran wrote: > Dear all, > > the attached trivial patch catches a MODULE PROCEDURE outside of a > module interface before we run into an internal error. >

[PATCHv4, gfortran] Escalate failure when Hollerith constant to real conversion fails [PR103628]

2023-03-21 Thread HAO CHEN GUI via Fortran
Hi, I refined the patch according to reviewer's advice. The main change is to check if buffer_p is set and buffered error exists. Also two regtests are fixed by catching the new error. I sent out the revised one for review due to my limited knowledge on Fortran front end. The patch