[PATCH, v2] Fortran: fix argument checking of intrinsics C_SIZEOF, C_F_POINTER [PR106500]

2024-04-09 Thread Harald Anlauf
Hi FX! On 4/9/24 09:32, FX Coudert wrote: Hi Harald, Thanks for the patch. + if (attr.function) +{ + gfc_error ("FPTR at %L to C_F_POINTER is a function returning a pointer", + &fptr->where); + return false; +} + if (fptr->rank > 0 && !is_c_interoperable (fptr, &msg, f

Re: [PATCH] libgfortran: Disable gthreads weak symbols for glibc 2.34

2024-04-09 Thread H.J. Lu
On Tue, Apr 9, 2024 at 10:25 AM Andrew Pinski wrote: > > > > On Tue, Apr 9, 2024, 10:07 H.J. Lu wrote: >> >> Since Glibc 2.34 all pthreads symbols are defined directly in libc not >> libpthread, and since Glibc 2.32 we have used __libc_single_threaded to >> avoid unnecessary locking in single-thr

Re: [PATCH] libgfortran: Disable gthreads weak symbols for glibc 2.34

2024-04-09 Thread Andrew Pinski
On Tue, Apr 9, 2024, 10:07 H.J. Lu wrote: > Since Glibc 2.34 all pthreads symbols are defined directly in libc not > libpthread, and since Glibc 2.32 we have used __libc_single_threaded to > avoid unnecessary locking in single-threaded programs. This means there > is no reason to avoid linking to

[Patch, fortran] PR113956 - [13/14 Regression] ice in gfc_trans_pointer_assignment, at fortran/trans-expr.cc:10524

2024-04-09 Thread Paul Richard Thomas
Patch pushed after pre-approval by Harald on Bugzilla. Fortran: Fix ICE in gfc_trans_pointer_assignment [PR113956] 2024-04-09 Paul Thomas gcc/fortran PR fortran/113956 * trans-expr.cc (gfc_trans_pointer_assignment): Remove assert causing the ICE since it was unnecesary

Re: [PATCH] Fortran: fix argument checking of intrinsics C_SIZEOF, C_F_POINTER [PR106500]

2024-04-09 Thread FX Coudert
Hi Harald, Thanks for the patch. > + if (attr.function) > +{ > + gfc_error ("FPTR at %L to C_F_POINTER is a function returning a > pointer", > + &fptr->where); > + return false; > +} > + >if (fptr->rank > 0 && !is_c_interoperable (fptr, &msg, false, true)) > return g