Re: [Fortran, Coarray] Call-out to everyone having Fortran coarray-codes available

2025-07-30 Thread Andre Vehreschild
Hi Toon, yes, please keep this coming. I suffered from a catastrophic hardware fault on last Thursday and only get running again. I will process this as soon as I have processed the earlier reports. Regards, Andre On Wed, 30 Jul 2025 17:43:28 +0200 Toon Moene wrote: > On 7/28/25 20:27,

[PATCH] fortran: implement conditional expression for fortran 2023

2025-07-30 Thread Yuao Ma
Hi all, This patch introduces support for conditional expressions (also known as ternary operators in some languages) to Fortran. I decided to implement this feature after discovering that this common functionality, widely used in C/C++, wasn't available until the Fortran 2023 standard. This

Re: [Fortran, Coarray] Call-out to everyone having Fortran coarray-codes available

2025-07-30 Thread Toon Moene
On 7/30/25 18:14, Andre Vehreschild wrote: Hi Toon, yes, please keep this coming. I suffered from a catastrophic hardware fault on last Thursday and only get running again. I will process this as soon as I have processed the earlier reports. Regards, Andre On Wed, 30 Jul 2025 17:43:28

Re: [PATCH] fortran: implement conditional expression for fortran 2023

2025-07-30 Thread Paul Richard Thomas
Hi Yuao, That's exactly how I had a mind to do it. You beat me to it :-( Just get on, polish the patch and add more tests. Thanks Paul On Wed, 30 Jul 2025 at 15:53, Yuao Ma wrote: > Hi all, > > This patch introduces support for conditional expressions (also known as > ternary operators in s

Re: [PATCH] libgfortran: add fallback for trigonometric pi-based functions

2025-07-30 Thread Joseph Myers
On Sun, 6 Jul 2025, Yuao Ma wrote: > +#ifndef HAVE_COSPI > +#define HAVE_COSPI 1 > +double cospi (double); > + > +double > +cospi (double x) > +{ > + return cos (x * pihi_d + x * pilo_d); For reasonable results for large x you should first reduce mod 2 to the range [-1, 1] (or reduce mod 1 and

Re: [Fortran, Coarray] Call-out to everyone having Fortran coarray-codes available

2025-07-30 Thread Toon Moene
On 7/28/25 20:27, Toon Moene wrote: On 7/27/25 14:46, Toon Moene wrote: Today I updated my random-weather example (https://moene.org/~toon/ random-weather) to fix the problem that two different implementations of the underlying coarray library might give different result numbers due to the

[PATCH] fortran: Evaluate class function bounds in the scalarizer

2025-07-30 Thread Mikael Morin
From: Mikael Morin This one may look like a collection of obscure random changes. It started with the removal of an isolated array descriptor offset update, and the chain of regression fixes that followed completed it to the below. I have even found a testcase that is fixed by it. Regression-te

Re: [PATCH] fortran: implment split for fortran 2023

2025-07-30 Thread Mikael Morin
Le 30/07/2025 à 02:42, Yuao Ma a écrit : On 7/27/2025 8:51 PM, Mikael Morin wrote: Le 27/07/2025 à 13:46, Yuao Ma a écrit : On 7/27/2025 7:14 PM, Mikael Morin wrote: Le 27/07/2025 à 11:37, Yuao Ma a écrit : On 7/27/2025 5:19 PM, Mikael Morin wrote: +gfc_charlen_type +string_split (gfc_ch