Re: [PATCH] libstdc++: Introduce GNU/Hurd-specific libstdc++ os-defines.h

2022-09-17 Thread Samuel Thibault via Gcc-patches
Ping? Samuel Thibault, le lun. 29 août 2022 02:30:40 +0200, a ecrit: > This is notably needed because in glibc 2.34, the move of pthread functions > into libc.so happened for Linux only, not GNU/Hurd. > > The pthread_self() function can also always be used fine as it is. > >

Re: [PATCH 09/10] fortran: Support clobbering of variable subreferences [PR88364]

2022-09-17 Thread Bernhard Reutner-Fischer via Gcc-patches
On 17 September 2022 21:50:20 CEST, Mikael Morin wrote: >Le 17/09/2022 à 21:33, Mikael Morin a écrit : >> The testcase from the patch was not specifically checking lack of >> side-effect clobbers, so I have double-checked with the following testcase, >> which should lift your concerns. >> >The

Re: [PATCH] RISC-V missing __builtin_lceil and __builtin_lfloor

2022-09-17 Thread Kito Cheng via Gcc-patches
LGTM, thanks, I guess I just missed this before Palmer Dabbelt 於 2022年9月17日 週六 23:07 寫道: > On Mon, 15 Aug 2022 17:44:35 PDT (-0700), kev...@rivosinc.com wrote: > > Hello, > > Currently, __builtin_lceil and __builtin_lfloor doesn't generate an > > existing instruction fcvt, but rather calls ceil

Re: [PATCH] RISC-V missing __builtin_lceil and __builtin_lfloor

2022-09-17 Thread Palmer Dabbelt
On Mon, 15 Aug 2022 17:44:35 PDT (-0700), kev...@rivosinc.com wrote: Hello, Currently, __builtin_lceil and __builtin_lfloor doesn't generate an existing instruction fcvt, but rather calls ceil and floor from the library. This patch adds the missing iterator and attributes for lceil and lfloor to

Re: [PATCH 09/10] fortran: Support clobbering of variable subreferences [PR88364]

2022-09-17 Thread Mikael Morin
Le 17/09/2022 à 21:33, Mikael Morin a écrit : The testcase from the patch was not specifically checking lack of side-effect clobbers, so I have double-checked with the following testcase, which should lift your concerns. The dump matches didn’t fail as expected with patch 2/10 reversed. This

Re: [PATCH 09/10] fortran: Support clobbering of variable subreferences [PR88364]

2022-09-17 Thread Bernhard Reutner-Fischer via Gcc-patches
On 17 September 2022 21:33:22 CEST, Mikael Morin wrote: >Le 17/09/2022 à 19:03, Thomas Koenig via Fortran a écrit : >> >> Hi Mikael, >> >>> This adds support for clobbering of partial variable references, when >>> they are passed as actual argument and the associated dummy has the >>>

Re: [PATCH 09/10] fortran: Support clobbering of variable subreferences [PR88364]

2022-09-17 Thread Mikael Morin
Le 17/09/2022 à 19:03, Thomas Koenig via Fortran a écrit : Hi Mikael, This adds support for clobbering of partial variable references, when they are passed as actual argument and the associated dummy has the INTENT(OUT) attribute. Support includes array elements, derived type component

Re: [PATCH 09/10] fortran: Support clobbering of variable subreferences [PR88364]

2022-09-17 Thread Thomas Koenig via Gcc-patches
Hi Mikael, This adds support for clobbering of partial variable references, when they are passed as actual argument and the associated dummy has the INTENT(OUT) attribute. Support includes array elements, derived type component references, and complex real or imaginary parts. This is done by

Re: [PATCH] c++: constraint matching, TEMPLATE_ID_EXPR, current inst

2022-09-17 Thread Patrick Palka via Gcc-patches
On Sat, 17 Sep 2022, Jason Merrill wrote: > On 9/16/22 10:59, Patrick Palka wrote: > > On Fri, 16 Sep 2022, Jason Merrill wrote: > > > > > On 9/15/22 11:58, Patrick Palka wrote: > > > > Here we're crashing during constraint matching for the instantiated > > > > hidden friends due to two issues

Re: [PATCH] Fortran: add IEEE_MODES_TYPE, IEEE_GET_MODES and IEEE_SET_MODES

2022-09-17 Thread Mikael Morin
Le 04/09/2022 à 18:30, FX via Fortran a écrit : Hi, The IEEE_MODES_TYPE type and the two functions that get and set it were added in Fortran 2018. They can be implemented using the already existing target-specific functions. A future optimization could, on some targets, set/get all modes

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

2022-09-17 Thread Mikael Morin
Le 02/09/2022 à 13:37, FX via Fortran a écrit : Hi, These operations were added to Fortran 2018, and correspond to well-defined IEEE comparison operations, with defined signaling semantics for NaNs. All are implemented in terms of GCC expressions and built-ins, with no library support

Re: [PATCH] c++: Implement C++23 P1169R4 - static operator() [PR106651]

2022-09-17 Thread Jason Merrill via Gcc-patches
On 9/17/22 02:42, Jakub Jelinek wrote: On Sat, Sep 17, 2022 at 01:23:59AM +0200, Jason Merrill wrote: On 9/13/22 12:42, Jakub Jelinek wrote: The following patch attempts to implement C++23 P1169R4 - static operator() paper's compiler side (there is some small library side too not implemented

[PATCH] testsuite: Only run test on target if VMA == LMA

2022-09-17 Thread Torbjörn SVENSSON via Gcc-patches
Checking that the triplet matches arm*-*-eabi (or msp430-*-*) is not enough to know if the execution will enter an endless loop, or if it will give a meaningful result. As the execution test only work when VMA and LMA are equal, make sure that this condition is met. 2022-09-16 Torbjörn SVENSSON

[PATCH] LoongArch: Drop the stack first when performing stack checking.

2022-09-17 Thread Lulu Cheng
The old stack detection was performed before the stack was dropped, which would cause the detection tool to report a memory leak. The current stack detection scheme is as follows: '-fstack-clash-protection': 1. When the frame->total_size is smaller than the guard page size, the stack is

Re: [PATCH] c++: Implement P1467R9 - Extended floating-point types and standard names compiler part except for bfloat16 [PR106652]

2022-09-17 Thread Jason Merrill via Gcc-patches
On 9/16/22 13:34, Jakub Jelinek wrote: On Fri, Sep 16, 2022 at 01:48:54PM +0200, Jason Merrill wrote: On 9/12/22 04:05, Jakub Jelinek wrote: The following patch implements the compiler part of C++23 P1467R9 - Extended floating-point types and standard names compiler part by introducing

[PATCH] frange: flush denormals to zero for -funsafe-math-optimizations.

2022-09-17 Thread Aldy Hernandez via Gcc-patches
Jakub has mentioned that for -funsafe-math-optimizations we may flush denormals to zero, in which case we need to be careful to extend the ranges to the appropriate zero. This patch does exactly that. For a range of [x, -DENORMAL] we flush to [x, -0.0] and for [+DENORMAL, x] we flush to [+0.0,

Re: [PATCH] riscv: implement TARGET_MODE_REP_EXTENDED

2022-09-17 Thread Palmer Dabbelt
On Fri, 16 Sep 2022 16:48:24 PDT (-0700), gcc-patches@gcc.gnu.org wrote: On 9/6/22 05:39, Alexander Monakov via Gcc-patches wrote: On Mon, 5 Sep 2022, Philipp Tomsich wrote: +riscv_mode_rep_extended (scalar_int_mode mode, scalar_int_mode mode_rep) +{ + /* On 64-bit targets, SImode register

[PATCH] [PR106831] Avoid propagating long doubles that may have multiple representations.

2022-09-17 Thread Aldy Hernandez via Gcc-patches
Long doubles are tricky when it comes to considering singletons because small numbers and +-INF can have multiple representations for the same number. So we need to be very careful not to treat those as singletons, lest they be incorrectly propagated by VRP. This is similar to the -0.0 and +0.0

Re: [PATCH] c++: Implement C++23 P1169R4 - static operator() [PR106651]

2022-09-17 Thread Jakub Jelinek via Gcc-patches
On Sat, Sep 17, 2022 at 01:23:59AM +0200, Jason Merrill wrote: > On 9/13/22 12:42, Jakub Jelinek wrote: > > The following patch attempts to implement C++23 P1169R4 - static operator() > > paper's compiler side (there is some small library side too not implemented > > yet). This allows static

Re: [PATCH] c++: modules ICE with typename friend declaration

2022-09-17 Thread Nathan Sidwell via Gcc-patches
On 9/16/22 11:54, Patrick Palka wrote: On Fri, 16 Sep 2022, Nathan Sidwell wrote: Thanks, this looks right. Sigh templates can mess up ones mental invariants! The test case should really be a foo_[ab].C kind, to test both sides of the streaming. Bonus points for using the template after

Re: [PATCH] reassoc: Fix up recent regression in optimize_range_tests_cmp_bitwise [PR106958]

2022-09-17 Thread Richard Biener via Gcc-patches
> Am 17.09.2022 um 08:03 schrieb Jakub Jelinek via Gcc-patches > : > > Hi! > > As the following testcase reduced from glibc fmtmsg.c shows > (it doesn't ICE on x86_64/i686 unfortunately, but does on various other > arches), my last optimize_range_tests_cmp_bitwise change wasn't fully >

[PATCH] reassoc: Fix up recent regression in optimize_range_tests_cmp_bitwise [PR106958]

2022-09-17 Thread Jakub Jelinek via Gcc-patches
Hi! As the following testcase reduced from glibc fmtmsg.c shows (it doesn't ICE on x86_64/i686 unfortunately, but does on various other arches), my last optimize_range_tests_cmp_bitwise change wasn't fully correct. The intent was to let all pointer operands be cast to pointer_sized_int_node