Re: [PATCH] gcc: add trigonometric pi-based functions as gcc builtins

2025-05-18 Thread Yuao Ma
Hi Jakub, Thank you for your suggestion. I actually learned from your earlier patch (https://gcc.gnu.org/cgit/gcc/commit?id=7f940822) and had already planned to update tree-call-cdce.cc when handling these builtins. Your guidance is much appreciated! Best regards, Yuao _

[PATCH] Fortran: fix FAIL of gfortran.dg/specifics_1.f90 after r16-372 [PR120099]

2025-05-18 Thread Harald Anlauf
Dear all, the attached proposed patch fixes PR120099 by modifying gfc_return_by_reference so that it returns true with -ff2c also for intrinsics returning complex numbers, as these are not pure in the GCC IR sense, and wrapper functions for the intrinsics were optimized out by DCE. The change on

Re: [patch, fortran] PR120049 - ICE when using IS_C_ASSOCIATED ()

2025-05-18 Thread Harald Anlauf
Hi Jerry, I found 2 corner invalid cases which are silently accepted with your patch when iso_c_binding is used indirectly: print *, c_associated(c_loc(val), C_NULL_FUNPTR) print *, c_associated(C_NULL_FUNPTR, c_loc(val)) These should get rejected, too. Can you see how to catch these, too?

Re: [patch, fortran] PR120049 - ICE when using IS_C_ASSOCIATED ()

2025-05-18 Thread Jerry D
On 5/18/25 2:10 PM, Harald Anlauf wrote: Hi Jerry, I found 2 corner invalid cases which are silently accepted with your patch when iso_c_binding is used indirectly:   print *, c_associated(c_loc(val), C_NULL_FUNPTR)   print *, c_associated(C_NULL_FUNPTR, c_loc(val)) These should get rejected

Re: [patch, fortran] PR120049 - ICE when using IS_C_ASSOCIATED ()

2025-05-18 Thread Jerry D
On 5/18/25 2:34 PM, Jerry D wrote: On 5/18/25 2:10 PM, Harald Anlauf wrote: Hi Jerry, I found 2 corner invalid cases which are silently accepted with your patch when iso_c_binding is used indirectly:    print *, c_associated(c_loc(val), C_NULL_FUNPTR)    print *, c_associated(C_NULL_FUNPTR, c_