Re: Missing finalizations

2021-09-14 Thread Paul Richard Thomas via Fortran
Hi Andrew, Not long before I had to step aside (temporarily, I hope) from gfortran maintenance, I made quite a lot of progress on missing finalizations. I'll dig out the in-progress patch for you and remind myself of the remaining issues. One of these was a standards problem, where the patched gfo

Re: [PATCH, Fortran] Revert to non-multilib-specific ISO_Fortran_binding.h

2021-09-14 Thread Joseph Myers
On Tue, 14 Sep 2021, Andreas Schwab wrote: > On Sep 14 2021, Jakub Jelinek wrote: > > > But, wonder why it didn't work with the float.h include then, because > > https://github.com/lattera/freebsd/blob/master/sys/x86/include/float.h > > seems to define LDBL_MANT_DIG to 64, LDBL_MIN_EXP to (-16381

Missing finalizations

2021-09-14 Thread Andrew Benson via Fortran
I will (hopefully) have some time in the next few months to work on gfortran. I could pick up a few easy PRs to fix, but a more ambitious (and more useful) task would be to work on some of the missing finalizations. For my own work finalization of function results and stay constructors would be

Re: [PATCH, Fortran] Revert to non-multilib-specific ISO_Fortran_binding.h

2021-09-14 Thread Gerald Pfeifer
On Tue, 14 Sep 2021, Tobias Burnus wrote: > And, related, does the following make sense and fixes the issue? > > --- a/libgfortran/ISO_Fortran_binding.h > +++ b/libgfortran/ISO_Fortran_binding.h > @@ -228,5 +228,5 @@ extern int CFI_setpointer (CFI_cdesc_t *, CFI_cdesc_t *, > const CFI_index_t []);

[PATCH] PR fortran/102287 - optional allocatable array arguments (intent out) of derived types with allocatable components are not properly passed to subroutines

2021-09-14 Thread Harald Anlauf via Fortran
As nicely described in the PR, we mishandled the case of passing optional allocatable DT arguments with allocatable components when the INTENT was declared as INTENT(OUT), as we unconditionally tried to deallocate these components even when the argument was not present. The obvious solution is to

[PATCH, committed] PR fortran/102311 - fix ICE during error recovery checking entry characteristics

2021-09-14 Thread Harald Anlauf via Fortran
Committed as obvious as r12-3533. The fix to PR87737 did work for the given testcase, but could lead to a bad internal compiler state for a variation of the testcase. (Found by Gerhard...) The solution was to not return too early after emitting the error message but going through a 'cleanup' inst

Re: [PATCH, Fortran] Revert to non-multilib-specific ISO_Fortran_binding.h

2021-09-14 Thread Gerald Pfeifer
On Mon, 13 Sep 2021, Sandra Loosemore wrote: > Here's a patch. Gerald, can you check that this fixes your bootstrap > problem on i586-unknown-freebsd11? I does not change the bootstrap failure on i586-unknown-freebsd11 - though looking at the discussion here still looks like a good change to ma

Re: [PATCH, Fortran] Revert to non-multilib-specific ISO_Fortran_binding.h

2021-09-14 Thread Andreas Schwab
On Sep 14 2021, Jakub Jelinek wrote: > But, wonder why it didn't work with the float.h include then, because > https://github.com/lattera/freebsd/blob/master/sys/x86/include/float.h > seems to define LDBL_MANT_DIG to 64, LDBL_MIN_EXP to (-16381) and > LDBL_MAX_EXP to 16384 and that case was handle

Re: [PATCH, Fortran] Revert to non-multilib-specific ISO_Fortran_binding.h

2021-09-14 Thread Jakub Jelinek via Fortran
On Tue, Sep 14, 2021 at 05:17:04PM +0200, Andreas Schwab wrote: > On Sep 14 2021, Gerald Pfeifer wrote: > > > #define __LDBL_MANT_DIG__ 53 > > #define __LDBL_DIG__ 15 > > #define __LDBL_MIN_EXP__ (-16381) > > #define __LDBL_MIN_10_EXP__ (-4931) > > #define __LDBL_MAX_EXP__ 16384 > > #d

Re: [PATCH, Fortran] Revert to non-multilib-specific ISO_Fortran_binding.h

2021-09-14 Thread Andreas Schwab
On Sep 14 2021, Gerald Pfeifer wrote: > #define __LDBL_MANT_DIG__ 53 > #define __LDBL_DIG__ 15 > #define __LDBL_MIN_EXP__ (-16381) > #define __LDBL_MIN_10_EXP__ (-4931) > #define __LDBL_MAX_EXP__ 16384 > #define __LDBL_MAX_10_EXP__ 4932 > #define __LDBL_DECIMAL_DIG__ 17 > #define _

Re: [PATCH, Fortran] Revert to non-multilib-specific ISO_Fortran_binding.h

2021-09-14 Thread Tobias Burnus
Hi Gerald, I note: On 13.09.21 17:56, Gerald Pfeifer wrote: % egrep -r '#define.*LDBL_(MANT_DIG|MIN_EXP|MAX_EXP)'/usr/include/ /usr/include/x86/float.h:#define LDBL_MANT_DIG 64 /usr/include/x86/float.h:#define LDBL_MIN_EXP (-16381) /usr/include/x86/float.h:#define LDBL_MAX_EXP 16384 This

Re: [PATCH, Fortran] Revert to non-multilib-specific ISO_Fortran_binding.h

2021-09-14 Thread Gerald Pfeifer
On Mon, 13 Sep 2021, Tobias Burnus wrote: > Can you run 'echo | cpp -E -g3|grep DBL' to (or in the build dir: echo | > ./gcc/cc1 -E -g3 -dD|grep DBL) to check what's the output? Thank you, Tobias, and I'm just testing the proposed patch, but still wanted to follow up on your question: % echo |

[committed] Fortran: Add missing ST_OMP_END_SCOPE handling [PR102313]

2021-09-14 Thread Tobias Burnus
Committed as obvious as r12-3524. I have also re-checked openmp.c omp_code_to_statement (seems to be complete, 'omp declare...' + 'omp requires' missing but it is probably fine that those are absent). And I checked gfc_ascii_statement – missing are some internally used ones (like ST_SIMPLE_IF),

Re: [PATCH, Fortran] Revert to non-multilib-specific ISO_Fortran_binding.h

2021-09-14 Thread Tobias Burnus
On 14.09.21 05:39, Sandra Loosemore wrote: Here's a patch. Gerald, can you check that this fixes your bootstrap problem on i586-unknown-freebsd11? LGTM – thanks! Tobias Fortran: Prefer GCC internal macros to float.h in ISO_Fortran_binding.h. 2021-09-13 Sandra Loosemore libgfor