[PATCH] libstdc++: use new built-in trait __is_reference

2023-03-18 Thread Ken Matsui via Gcc-patches
libstdc++-v3/ChangeLog: * include/std/type_traits (is_reference): Use __is_reference built-in trait. --- diff --git a/libstdc++-v3/include/std/type_traits b/libstdc++-v3/include/std/type_traits index 2bd607a8b8f..18408d8ceb6 100644 --- a/libstdc++-v3/include/std/type_traits +++

[PATCH] c++: implement __is_reference built-in trait

2023-03-18 Thread Ken Matsui via Gcc-patches
This patch implements built-in trait for std::is_reference. gcc/cp/ChangeLog: * cp-trait.def (names_builtin_p): Define __is_reference. * constraint.cc (diagnose_trait_expr): Handle CPTK_IS_REFERENCE. * semantics.cc (trait_expr_value): Likewise. (finish_trait_expr): Likewise.

Re: [PATCH] correct function attribute typo

2023-03-18 Thread Sandra Loosemore
On 3/16/23 16:37, Jonny Grant wrote: Hello There's a typo in the common function attribute docs, "nonnul" which this patch corrects. Thank you! I've pushed this patch. -Sandra

Re: [patch, wwwdocs] Mention random number generators in porting_to.html

2023-03-18 Thread Harald Anlauf via Gcc-patches
Hi Thomas, Am 18.03.23 um 19:23 schrieb Thomas Koenig via Gcc-patches: Hi, Text says it all.  OK for web pages? Best regards Thomas Mention issues with integer owerflow for random number generators. This mentions the issues with integer overflow and how to work around them. it's

Re: [PATCH] Fortran: procedures with BIND(C) attribute require explicit interface [PR85877]

2023-03-18 Thread Harald Anlauf via Gcc-patches
Hi Thomas, Am 18.03.23 um 19:52 schrieb Thomas Koenig via Gcc-patches: Hi Harald, the Fortran standard requires an explicit procedure interface in certain situations, such as when they have a BIND(C) attribute (F2018:15.4.2.2). The attached patch adds a check for this. Regtested on

Ping (gcc/configure.ac, docs): [PATCH v2 4/5] Update texinfo.tex, remove the @gol macro/alias

2023-03-18 Thread Arsen Arsenović via Gcc-patches
Evening, Ping on this patch series. I believe we're close to being able to apply it, with contents of the documentation changes being approved, and only a small build system change and a revised patch series "shape" left to review. The former change of these two is in:

Re: [PATCH] Fortran: procedures with BIND(C) attribute require explicit interface [PR85877]

2023-03-18 Thread Thomas Koenig via Gcc-patches
Hi Harald, the Fortran standard requires an explicit procedure interface in certain situations, such as when they have a BIND(C) attribute (F2018:15.4.2.2). The attached patch adds a check for this. Regtested on x86_64-pc-linux-gnu. OK for mainline? While this fixes the ICE, it misses

[patch, wwwdocs] Mention random number generators in porting_to.html

2023-03-18 Thread Thomas Koenig via Gcc-patches
Hi, Text says it all. OK for web pages? Best regards Thomas Mention issues with integer owerflow for random number generators. This mentions the issues with integer overflow and how to work around them. diff --git a/htdocs/gcc-13/porting_to.html b/htdocs/gcc-13/porting_to.html index

[pushed] analyzer: fix ICE on certain longjmp calls [PR109094]

2023-03-18 Thread David Malcolm via Gcc-patches
PR analyzer/109094 reports an ICE in the analyzer seen on qemu's target/i386/tcg/translate.c The issue turned out to be that when handling a longjmp, the code to pop the frames was generating an svalue for the result_decl of any popped frame that had a non-void return type (and discarding it)

[PATCH] c++, v2: Drop TREE_READONLY on vars (possibly) initialized by tls wrapper [PR109164]

2023-03-18 Thread Jakub Jelinek via Gcc-patches
On Sat, Mar 18, 2023 at 01:54:58PM +0100, Jakub Jelinek via Gcc-patches wrote: > The patch is mostly about DECL_EXTERNAL cases, the others are supposedly > handled by the var_definition_p code there (or at least I assumed; > testcases certainly test only DECL_EXTERNAL). > I guess it could be done

Re: [pushed] c++: constant, array, lambda, template [PR108975]

2023-03-18 Thread Patrick Palka via Gcc-patches
On Fri, 17 Mar 2023, Jason Merrill via Gcc-patches wrote: > Tested x86_64-pc-linux-gnu, applying to trunk. > > -- 8< -- > > When a lambda refers to a constant local variable in the enclosing scope, we > tentatively capture it, but if we end up pulling out its constant value, we > go back at the

Re: [PATCH] c++: Drop TREE_READONLY on vars (possibly) initialized by tls wrapper [PR109164]

2023-03-18 Thread Jakub Jelinek via Gcc-patches
On Sat, Mar 18, 2023 at 08:39:45AM -0400, Jason Merrill wrote: > On 3/17/23 13:51, Jakub Jelinek wrote: > > The following two testcases are miscompiled, because we keep TREE_READONLY > > on the vars even when they are (possibly) dynamically initialized by a TLS > > wrapper function. Normally

Re: [PATCH] c++: Drop TREE_READONLY on vars (possibly) initialized by tls wrapper [PR109164]

2023-03-18 Thread Jason Merrill via Gcc-patches
On 3/17/23 13:51, Jakub Jelinek wrote: Hi! The following two testcases are miscompiled, because we keep TREE_READONLY on the vars even when they are (possibly) dynamically initialized by a TLS wrapper function. Normally cp_finish_decl drops TREE_READONLY from vars which need dynamic

Re: [PATCH] c++: further -Wdangling-reference refinement [PR107532]

2023-03-18 Thread Jason Merrill via Gcc-patches
On 3/17/23 16:29, Marek Polacek wrote: Based on , it seems like we should treat *any* class with a reference member as a reference wrapper. This simplifies the code so I'm happy to make that change. The patch, however, does not suppress

Re: [committed] libstdc++: Add const to hash>::operator() [PR109165]

2023-03-18 Thread Jonathan Wakely via Gcc-patches
On Sat, 18 Mar 2023 at 00:49, Nathaniel Shead wrote: > On Sat, Mar 18, 2023 at 7:36 AM Jonathan Wakely via Libstdc++ > wrote: > > > > Tested x86_64-linux. Pushed to trunk. gcc-12 backport needed too. > > > > -- >8 -- > > > > libstdc++-v3/ChangeLog: > > > > PR libstdc++/109165 > >

[PATCH] or1k: Do not clear existing FPU exceptions before updating

2023-03-18 Thread Stafford Horne via Gcc-patches
We should always carry the exceptions forward. This bug was found when working on testing glibc math tests, many tests were failing with Overflow and Underflow flags not set. This was traced to here. libgcc/ChangeLog: * config/or1k/sfp-machine.h (FP_HANDLE_EXCEPTIONS): Remove

Re: [PATCH] [testsuite] test for weak_undefined support and add options

2023-03-18 Thread Mike Stump via Gcc-patches
On Mar 15, 2023, at 11:40 PM, Alexandre Oliva wrote: > > On Mar 15, 2023, Alexandre Oliva wrote: > >> Regstrapped on ppc64-linux-gnu. Also tested (with gcc-12) on multiple >> *-vxworks7r2 targets (arm, aarch64, ppc64, x86, x86_64). Ok to install? > > Further testing revealed a problem in my