[PATCH] libfortran: Fix up _gfortran_s{max,min}loc1_{4,8,16}_s{1,4} [PR120191]

2025-05-12 Thread Jakub Jelinek
Hi! There is a bug in _gfortran_s{max,min}loc1_{4,8,16}_s{1,4} which the following testcase shows. The functions return but then crash in the caller. Seems that is because buffer overflows, I believe those functions for if (mask == NULL || *mask) condition being false are supposed to fill in the r

[PATCH] libfortran: Fix up _gfortran_s{max,min}loc2_{4,8,16}_s{1,4} [PR120191]

2025-05-12 Thread Jakub Jelinek
Hi! I've tried to write a testcase for the BT_CHARACTER maxloc/minloc with named or unnamed arguments and indeed the just posted patch fixed the arguments in there in multiple cases to match what the library expects. But the testcase still fails, due to library problems. One dealt with in this pa

[Patch] Fortran: Use mpfr_sinu etc. with mpfr 4.2.0+ for degree trigonometric functions [PR120225]

2025-05-12 Thread Tobias Burnus
C23 added the sinpi, cospi, etc. functions. Therefore, MPFR in 4.2.0 added the mpfr_ counter parts. I assume that those internally use the mpfr_sinu, mpfr_cosu, ... functions, which are also user accessible. In any case, MPFR makes the ...u functions available and explicitly documents that for u

Re: [Patch] Fortran: Use mpfr_sinu etc. with mpfr 4.2.0+ for degree trigonometric functions [PR120225]

2025-05-12 Thread Richard Biener
On Mon, May 12, 2025 at 11:42 AM Tobias Burnus wrote: > > C23 added the sinpi, cospi, etc. functions. Therefore, MPFR in 4.2.0 > added the mpfr_ counter parts. I assume that those internally use the > mpfr_sinu, mpfr_cosu, ... functions, which are also user accessible. > > In any case, MPFR makes

[PATCH] fortran: map atand(y, x) to atan2d(y, x) [PR113413]

2025-05-12 Thread Yuao Ma
Hi Tobias, Following up on your review comments, I have updated the patch. Specifically, I have: * Added the PR number to the subject line. * Used the -b and -p options when running git gcc-commit-mklog. * Updated the intrinsic documentation as requested. Could you please take another look when yo

Re: aarch64-w64-mingw32-gfortran: just checking

2025-05-12 Thread Iain Sandoe
> On 12 May 2025, at 17:20, Allin Cottrell wrote: > > If gcc 15.1.0 is built as a cross compiler from Linux x86_64 to > aarch64-w64-mingw32, is it expected that gfortran will work? I doubt > it, since fortran support is not mentioned in the context of the > AArch64 MinGW target at https://gcc.

Re: aarch64-w64-mingw32-gfortran: just checking

2025-05-12 Thread Cottrell, Allin
On Mon, May 12, 2025 at 6:49 PM Iain Sandoe wrote: > > > On 12 May 2025, at 17:20, Allin Cottrell wrote: > > > > If gcc 15.1.0 is built as a cross compiler from Linux x86_64 to > > aarch64-w64-mingw32, is it expected that gfortran will work? I doubt > > it, since fortran support is not mentioned

aarch64-w64-mingw32-gfortran: just checking

2025-05-12 Thread Allin Cottrell
If gcc 15.1.0 is built as a cross compiler from Linux x86_64 to aarch64-w64-mingw32, is it expected that gfortran will work? I doubt it, since fortran support is not mentioned in the context of the AArch64 MinGW target at https://gcc.gnu.org/gcc-15/changes.html (only C and C++) but I just wanted to