Re: [committed] Fortran: Prefer GCC internal macros to float.h in ISO_Fortran_binding.h (was: [PATCH, Fortran] Revert to non-multilib-specific ISO_Fortran_binding.h)

2021-09-17 Thread Gerald Pfeifer
On Fri, 17 Sep 2021, Tobias Burnus wrote: > I have now committed the attached patch as r12-3621. It includes the > patch by Sandra > https://gcc.gnu.org/pipermail/gcc-patches/2021-September/579372.html > (approved 3 days ago) plus adding the "== 53" similar to above. Thank you, Tobias; thank you,

[committed] Fortran: Prefer GCC internal macros to float.h in ISO_Fortran_binding.h (was: [PATCH, Fortran] Revert to non-multilib-specific ISO_Fortran_binding.h)

2021-09-17 Thread Tobias Burnus
On 17.09.21 08:03, Gerald Pfeifer wrote: On Tue, 14 Sep 2021, Gerald Pfeifer 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

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

2021-09-16 Thread Gerald Pfeifer
On Tue, 14 Sep 2021, Gerald Pfeifer 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

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

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 []);

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 Gcc-patches
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 |

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

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

2021-09-13 Thread Sandra Loosemore
On 9/13/21 11:07 AM, Tobias Burnus wrote: On 13.09.21 18:59, Sandra Loosemore wrote: On 9/13/21 10:51 AM, Jakub Jelinek wrote: >>> Wouldn't it be better to use the __LDBL_* macros anyway and not rely on float.h?  The header doesn't want to test what float.h tells about the long double type, bu

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

2021-09-13 Thread Jakub Jelinek via Gcc-patches
On Mon, Sep 13, 2021 at 05:56:53PM +0200, 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 163

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

2021-09-13 Thread Andreas Schwab
On Sep 13 2021, 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 looks like it

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

2021-09-13 Thread Jakub Jelinek via Gcc-patches
On Mon, Sep 13, 2021 at 07:07:01PM +0200, Tobias Burnus wrote: > Regarding FreeBSD: Does this output different values? – If yes, we know > what to do, otherwise – hmm. > > [...] > > > > Wouldn't it be better to use the __LDBL_* macros anyway and not rely on > > > float.h? The header doesn't want

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

2021-09-13 Thread Tobias Burnus
On 13.09.21 18:59, Sandra Loosemore wrote: On 9/13/21 10:51 AM, Jakub Jelinek wrote: On Mon, Sep 13, 2021 at 06:32:56PM +0200, Tobias Burnus wrote: On 13.09.21 17:56, Gerald Pfeifer wrote: This broke bootstrap on i586-unknown-freebsd11: % egrep -r '#define.*LDBL_(MANT_DIG|MIN_EXP|MAX_EXP)' /u

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

2021-09-13 Thread Sandra Loosemore
On 9/13/21 10:51 AM, Jakub Jelinek wrote: On Mon, Sep 13, 2021 at 06:32:56PM +0200, Tobias Burnus wrote: On 13.09.21 17:56, Gerald Pfeifer wrote: This broke bootstrap on i586-unknown-freebsd11: In file included from .../GCC-HEAD/libgfortran/runtime/ISO_Fortran_binding.c:30: .../GCC-HE

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

2021-09-13 Thread Jakub Jelinek via Gcc-patches
On Mon, Sep 13, 2021 at 06:32:56PM +0200, Tobias Burnus wrote: > On 13.09.21 17:56, Gerald Pfeifer wrote: > > This broke bootstrap on i586-unknown-freebsd11: > > > >In file included from > > .../GCC-HEAD/libgfortran/runtime/ISO_Fortran_binding.c:30: > >.../GCC-HEAD/libgfortran/ISO_Fortran

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

2021-09-13 Thread Tobias Burnus
Hi Gerald, On 13.09.21 17:56, Gerald Pfeifer wrote: This broke bootstrap on i586-unknown-freebsd11: In file included from .../GCC-HEAD/libgfortran/runtime/ISO_Fortran_binding.c:30: .../GCC-HEAD/libgfortran/ISO_Fortran_binding.h:255:2: error: #error "Can't determine kind of long double

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

2021-09-13 Thread Gerald Pfeifer
On Wed, 18 Aug 2021, Sandra Loosemore wrote: > I realized last week that having multilib-specific versions of > ISO_Fortran_binding.h (generated by running the compiler to ask what kinds it > supports) was still broken outside of the test support; the directory where > it's being installed isn't on

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

2021-09-13 Thread Tobias Burnus
On 10.09.21 17:39, Andreas Schwab wrote: This misses the m68k extended real format. * ISO_Fortran_binding.h (CFI_type_long_double) (CFI_type_long_double_Complex) [LDBL_MANT_DIG == 64 && LDBL_MIN_EXP == -16382 && LDBL_MAX_EXP == 16384]: Define. LGTM – thanks! Tobias --- l

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

2021-09-10 Thread Andreas Schwab
This misses the m68k extended real format. Andreas. * ISO_Fortran_binding.h (CFI_type_long_double) (CFI_type_long_double_Complex) [LDBL_MANT_DIG == 64 && LDBL_MIN_EXP == -16382 && LDBL_MAX_EXP == 16384]: Define. --- libgfortran/ISO_Fortran_binding.h | 7 +++ 1 file ch

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

2021-09-06 Thread Tobias Burnus
On 19.08.21 04:57, Sandra Loosemore wrote: This is a follow-up to commit fef67987cf502fe322e92ddce22eea7ac46b4d75: https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=fef67987cf502fe322e92ddce22eea7ac46b4d75 I realized last week that having multilib-specific versions of ISO_Fortran_binding.h (genera

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

2021-09-02 Thread Sandra Loosemore
On 8/18/21 8:57 PM, Sandra Loosemore wrote: This is a follow-up to commit fef67987cf502fe322e92ddce22eea7ac46b4d75: https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=fef67987cf502fe322e92ddce22eea7ac46b4d75 I realized last week that having multilib-specific versions of ISO_Fortran_binding.h (g

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

2021-08-18 Thread Sandra Loosemore
This is a follow-up to commit fef67987cf502fe322e92ddce22eea7ac46b4d75: https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=fef67987cf502fe322e92ddce22eea7ac46b4d75 I realized last week that having multilib-specific versions of ISO_Fortran_binding.h (generated by running the compiler to ask what kin