Re: [PATCH] Fortran: add IEEE_QUIET_* and IEEE_SIGNALING_* comparisons

2023-06-10 Thread FX Coudert via Fortran
Hi Harald,

> I just looked at that thread.  I guess if you answer Mikael's
> questions at
>  https://gcc.gnu.org/pipermail/gcc-patches/2022-September/601744.html
> the patch will be fine.

Amended patch, adding the required testing of signalling vs. quiet behaviour.
I still need to get an OK on the middle-end part first, but I consider the 
Fortran part approved.

Thanks,
FX



0001-Add-__builtin_iseqsig.patch
Description: Binary data


0002-Fortran-add-IEEE_QUIET_-and-IEEE_SIGNALING_-comparis.patch
Description: Binary data


Re: [PATCH] Fortran: add Fortran 2018 IEEE_{MIN,MAX} functions

2023-06-10 Thread FX Coudert via Fortran
Hi Thomas,

> The KIND=17 is a bit of a kludge.  It is not visible for
> user programs, they use KIND=16, but this is then translated
> to library calls as if it was KIND=17 if the IEEE 128-bit floats
> are selected

Can you check what the IEEE test results are when -mabi=ieeelongdouble is 
enabled?
It’s not even clear to me what the IEEE kinds selected should be, in this case, 
depending on -mabi=ieeelongdouble


> Regarding FX's patch: I am not quite sure that I am
> actually testing the right thing if running the testsuite
> there, so POWER should not hold up this patch.  If it turns
> out that POWER needs additonal work on IEEE, we can always
> add that later.

Actually, it sounds like the situation is: the same target can have two ABIs 
based on a compile-time flag. That sounds like a job for multilib, i.e., we 
should compile libgfortran twice, one for each ABI. I am sure this was 
considered and rejected, do you remember what was the rationale?

Thanks,
FX

Re: [PATCH] Fortran: add Fortran 2018 IEEE_{MIN,MAX} functions

2023-06-10 Thread FX Coudert via Fortran
Given the agreement that the patch is not making things for powerpc worse, and 
the review by Steve, I have committed as 
https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=17bccd1d2c0fa1f08e0483c8ed841994a95febb0

Best,
FX

Fortran 2008 DATA statement restrictions

2023-06-10 Thread FX Coudert via Fortran
Hi,

I was looking at our table for Fortran 2008 conformance 
(https://gcc.gnu.org/wiki/Fortran2008Status) and we really have only a few 
items missing. One in particular is: "Data statement restrictions lifted”.

Quoting the document:

> Subscripts and nested implied-do limits in a data statement can be any 
> constant expression instead of being limited to combinations of constants, 
> implied-do variables, and intrinsic operations.

Unless I misunderstand this quote, I think we have that already. Maybe we 
always had that? I have run the attached test program, which uses non-trivial 
constant expressions, and it passes fine.

So I plan to add that to our testsuite, and change the wiki. But I would like 
someone else to confirm: do you understand this the same way I do? Do you have 
ideas of other ways to test it, tricky expressions, etc? Are there other ways 
that "Subscripts and nested implied-do limits” may appear in a DATA statement?

Thanks,
FX




data.f90
Description: Binary data


Re: Fortran 2008 DATA statement restrictions

2023-06-10 Thread Harald Anlauf via Fortran

Hi FX!

Am 10.06.23 um 18:22 schrieb FX Coudert:

Hi,

I was looking at our table for Fortran 2008 conformance 
(https://gcc.gnu.org/wiki/Fortran2008Status) and we really have only a few items 
missing. One in particular is: "Data statement restrictions lifted”.

Quoting the document:


Subscripts and nested implied-do limits in a data statement can be any constant 
expression instead of being limited to combinations of constants, implied-do 
variables, and intrinsic operations.


Unless I misunderstand this quote, I think we have that already. Maybe we 
always had that? I have run the attached test program, which uses non-trivial 
constant expressions, and it passes fine.

So I plan to add that to our testsuite, and change the wiki. But I would like 
someone else to confirm: do you understand this the same way I do? Do you have ideas 
of other ways to test it, tricky expressions, etc? Are there other ways that 
"Subscripts and nested implied-do limits” may appear in a DATA statement?


There is a meta-bug:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=33056

and in particular one PR about vector subscripts:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=49588

This one gives an ICE:

f951: internal compiler error: TODO: Vector sections in data statements


Thanks,
FX






libgfortran: remove support for --enable-intermodule

2023-06-10 Thread FX Coudert via Fortran
See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109373
I don’t believe it is widely used, and it was removed from everywhere else in 
gcc.

Bootstrapped and regtested on x86_64-pc-linux-gnu.
OK to commit?

FX



0001-libgfortran-remove-support-for-enable-intermodule.patch
Description: Binary data