Re: [PATCH 2/2] xtensa: Implement new target hook: TARGET_CONSTANT_OK_FOR_CPROP_P

2022-09-12 Thread Takayuki 'January June' Suwa via Gcc-patches
On 2022/09/13 4:34, Max Filippov wrote: Hi! > On Sun, Sep 11, 2022 at 1:50 PM Takayuki 'January June' Suwa > wrote: >> >> This patch implements new target hook TARGET_CONSTANT_OK_FOR_CPROP_P in >> order to exclude CONST_INTs that cannot fit into a MOVI machine instruction >> from cprop. >> >>

Re: [PATCH v2, rs6000] Change insn condition from TARGET_64BIT to TARGET_POWERPC64 for VSX scalar extract/insert instructions

2022-09-12 Thread HAO CHEN GUI via Gcc-patches
Hi Segher, On 7/9/2022 上午 1:19, Segher Boessenkool wrote: > make -k -j60 check > RUNTESTFLAGS="--target_board=unix'{-m64,-m32,-m32/-mpowerpc64}'" > > It is fine to not test -m32/-mpowerpc64 so often, and certaionly not > something I will ask everyone to always do :-) IMO, if we add

RE: [PATCH v2, rs6000] Change insn condition from TARGET_64BIT to TARGET_POWERPC64 for VSX scalar extract/insert instructions

2022-09-12 Thread HAO CHEN GUI via Gcc-patches
Hi Segher, On 10/9/2022 上午 1:17, Segher Boessenkool wrote: >> In rs6000-overload.def, the vsx_ version built-ins are overridden to vec_ >> version. > How? Where? vec_ version built-ins are defined in rs6000-overload.def. Yes, they're fine and in line with the definition in PVIPR. [VEC_VEEDP,

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

2022-09-12 Thread Jakub Jelinek via Gcc-patches
On Mon, Sep 12, 2022 at 10:52:35PM +0200, Jakub Jelinek via Gcc-patches wrote: > Can't that be implemented as 2 conversions, convert BFmode to SFmode and > then back to HFmode (or the other way around)? > SFmode is a superset of both formats, so except for the raise exception on > SNaN and

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

2022-09-12 Thread Jakub Jelinek via Gcc-patches
On Mon, Sep 12, 2022 at 07:36:05PM +, Joseph Myers wrote: > On Mon, 12 Sep 2022, Jakub Jelinek via Gcc-patches wrote: > > > Now, I guess for the fixincludes it could also use > > # if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, > > 0)) > > where earlier GCC 13

Re: [PATCH] c++: Implement C++23 P2266R1, Simpler implicit move [PR101165]

2022-09-12 Thread Jason Merrill via Gcc-patches
On 9/8/22 18:54, Marek Polacek wrote: On Tue, Sep 06, 2022 at 10:38:12PM -0400, Jason Merrill wrote: On 9/3/22 12:42, Marek Polacek wrote: This patch implements https://wg21.link/p2266, which, once again, changes the implicit move rules. Here's a brief summary of various changes in this area:

Re: [PATCH] c++: remove '_sfinae' suffix from functions

2022-09-12 Thread Jason Merrill via Gcc-patches
On 9/9/22 08:52, Patrick Palka wrote: Each of the following functions instantiate_non_dependent_expr get_target_expr require_complete_type abstract_virtuals_error cxx_constant_value is (presumably for historical reasons) just a non-SFINAE-enabled wrapper for the corresponding

[pushed] c++: auto member function and auto variable [PR106893]

2022-09-12 Thread Jason Merrill via Gcc-patches
As with PR105623, we need to call mark_single_function sooner to resolve the type of a BASELINK. Tested x86_64-pc-linux-gnu, applying to trunk. PR c++/106893 PR c++/90451 gcc/cp/ChangeLog: * decl.cc (cp_finish_decl): Call mark_single_function. gcc/testsuite/ChangeLog:

[pushed] c++: cast to array of unknown bound [PR93259]

2022-09-12 Thread Jason Merrill via Gcc-patches
We already know to treat a variable of array-of-unknown-bound type as dependent, we should do the same for arr{}. Tested x86_64-pc-linux-gnu, applying to trunk. PR c++/93259 gcc/cp/ChangeLog: * pt.cc (type_dependent_expression_p): Treat a compound literal of

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

2022-09-12 Thread Joseph Myers
On Mon, 12 Sep 2022, Jakub Jelinek via Gcc-patches wrote: > Now, I guess for the fixincludes it could also use > # if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0)) > where earlier GCC 13 snapshots would not be doing the fixincludes, > but the question is what to use

Re: [PATCH 2/2] xtensa: Implement new target hook: TARGET_CONSTANT_OK_FOR_CPROP_P

2022-09-12 Thread Max Filippov via Gcc-patches
On Sun, Sep 11, 2022 at 1:50 PM Takayuki 'January June' Suwa wrote: > > This patch implements new target hook TARGET_CONSTANT_OK_FOR_CPROP_P in > order to exclude CONST_INTs that cannot fit into a MOVI machine instruction > from cprop. > > gcc/ChangeLog: > > * config/xtensa/xtensa.c

Re: [PATCH] Improve converting between 128-bit modes that use the same format

2022-09-12 Thread Michael Meissner via Gcc-patches
I submitted a new patch that rewrites what this patch was trying to do. I didn't see the original version I submitted on September 8th, so I just reposted it. https://gcc.gnu.org/pipermail/gcc-patches/2022-September/601504.html -- Michael Meissner, IBM PO Box 98, Ayer, Massachusetts, USA,

[PATCH] Update float 128-bit conversions

2022-09-12 Thread Michael Meissner via Gcc-patches
I had sent this out on Thrusday, but it doesn't seem to have gone out. This patch is a rewrite of the patch submitted on August 18th: | https://gcc.gnu.org/pipermail/gcc-patches/2022-August/599988.html This patch reworks the conversions between 128-bit binary floating point types. Previously,

Re: [PATCH] Implement known/maybe fpclassify like API for frange.

2022-09-12 Thread Jan-Benedict Glaw
Hi Aldy! On Mon, 2022-09-12 15:12:46 +0200, Aldy Hernandez wrote: > On Mon, Sep 12, 2022 at 10:48 AM Jan-Benedict Glaw wrote: > > > > On Thu, 2022-09-08 12:56:24 +0200, Aldy Hernandez via Gcc-patches > > wrote: > > > > > From 795baa0b044953e9f198f49e379374d633f43b47 Mon Sep 17 00:00:00 2001 >

Re: [PATCH 1/4] libstdc++: Add already-accepted testcase [PR106320]

2022-09-12 Thread Jonathan Wakely via Gcc-patches
On Mon, 12 Sep 2022, 17:46 Patrick Palka via Libstdc++, < libstd...@gcc.gnu.org> wrote: > Although PR106320 only affected the 10 and 11 branches, and the testcase > from there was already correctly accepted on trunk and the 12 branch, we > should also add the testcase to 12/trunk for inter-branch

Re: [PATCH] PR rtl-optimization/106594: Preserve zero_extend when cheap.

2022-09-12 Thread Segher Boessenkool
On Mon, Sep 12, 2022 at 11:47:47AM -0500, Segher Boessenkool wrote: > On Mon, Sep 12, 2022 at 12:40:31AM +0100, Roger Sayle wrote: > > * gcc/combine.cc (expand_compound_operation): Don't expand/transform > > ZERO_EXTEND or SIGN_EXTEND on targets where rtx_cost claims they are > >

Re: [PATCH v3] eliminate mutex in fast path of __register_frame

2022-09-12 Thread Thomas Neumann via Gcc-patches
Thanks for your feedback, I will update the patch in the next few days, addressing the comments and reorganizing classify_object_over_fdes. Concerning your question: + +restart: +  struct btree_node *iter; +  uintptr_t lock; +  { +    // Accessing the root node requires defending against

[PATCH] c++: lambda capture of array with deduced bounds [PR106567]

2022-09-12 Thread Jason Merrill via Gcc-patches
We can't use the type of an array variable directly if we haven't deduced its length yet. Tested x86_64-pc-linux-gnu, applying to trunk. PR c++/106567 gcc/cp/ChangeLog: * lambda.cc (type_deducible_expression_p): Check array_of_unknown_bound_p. gcc/testsuite/ChangeLog:

[PATCH] libstdc++: Squelch -Wparentheses warning with debug iterators

2022-09-12 Thread Patrick Palka via Gcc-patches
I noticed compiling e.g. std/ranges/adaptors/join.cc with -D_GLIBCXX_DEBUG -Wsystem-headers -Wall gives the warning: gcc/libstdc++-v3/include/debug/safe_iterator.h:477:9: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses] Tested on x86_64-pc-linux-gnu, does this look OK for

Re: [PATCH] PR rtl-optimization/106594: Preserve zero_extend when cheap.

2022-09-12 Thread Segher Boessenkool
Hi! On Mon, Sep 12, 2022 at 12:40:31AM +0100, Roger Sayle wrote: > * gcc/combine.cc (expand_compound_operation): Don't expand/transform > ZERO_EXTEND or SIGN_EXTEND on targets where rtx_cost claims they are > cheap. If gen_lowpart returns a SUBREG of something other than

[PATCH 4/4] libstdc++: Implement ranges::slide_view from P2442R1

2022-09-12 Thread Patrick Palka via Gcc-patches
This also implements the LWG 3711 and 3712 changes to slide_view. libstdc++-v3/ChangeLog: * include/std/ranges (__detail::__slide_caches_nothing): Define. (__detail::__slide_caches_last): Define. (__detail::__slide_caches_first): Define. (slide_view): Define.

[PATCH 2/4] libstdc++: Implement LWG 3569 changes to join_view::_Iterator

2022-09-12 Thread Patrick Palka via Gcc-patches
Tested on x86_64-pc-linux-gnu, does this look OK for trunk only? libstdc++-v3/ChangeLog: * include/std/ranges (join_view::_Iterator::_M_satisfy): Adjust resetting _M_inner as per LWG 3569. (join_view::_Iterator::_M_inner): Wrap in std::optional as per LWG 3569.

[PATCH 3/4] libstdc++: Implement ranges::chunk_view from P2442R1

2022-09-12 Thread Patrick Palka via Gcc-patches
This also implements the LWG 3707, 3710 and 3712 changes to chunk_view. libstdc++-v3/ChangeLog: * include/std/ranges (__detail::__div_ceil): Define. (chunk_view): Define. (chunk_view::_OuterIter): Define. (chunk_view::_OuterIter::value_type): Define.

[PATCH 1/4] libstdc++: Add already-accepted testcase [PR106320]

2022-09-12 Thread Patrick Palka via Gcc-patches
Although PR106320 only affected the 10 and 11 branches, and the testcase from there was already correctly accepted on trunk and the 12 branch, we should also add the testcase to 12/trunk for inter-branch consistency. Tested on x86_64-pc-linux-gnu, does this look OK for trunk/12? PR

Re: [GCC13][Patch][V4][PATCH 1/2] Add a new option -fstrict-flex-arrays[=n] and new attribute strict_flex_arrays

2022-09-12 Thread Martin Sebor via Gcc-patches
On 9/6/22 18:28, Qing Zhao wrote: Add the following new option -fstrict-flex-arrays[=n] and a corresponding attribute strict_flex_arrays to GCC: '-fstrict-flex-arrays' Treat the trailing array of a structure as a flexible array member in a stricter way. A minor problem with this

Re: [PATCH] testsuite: gluefile file need to be prefixed

2022-09-12 Thread Yvan Roux via Gcc-patches
On Mon, Sep 12, 2022 at 05:09:57PM +0100, Richard Sandiford wrote: > Yvan Roux writes: > > Hi Richard, > > On Mon, Sep 12, 2022 at 12:56:52PM +0100, Richard Sandiford via Gcc-patches > > wrote: > >> Torbjörn SVENSSON via Gcc-patches writes: > >> > PR/95720 > >> > When the status wrapper is

Re: [PATCH] c++: Refer to internal linkage for -Wsubobject-linkage [PR86491]

2022-09-12 Thread Jason Merrill via Gcc-patches
Oops, failed to CC the list. Forwarded Message Subject: Re: [PATCH] c++: Refer to internal linkage for -Wsubobject-linkage [PR86491] Date: Mon, 12 Sep 2022 12:09:38 -0400 From: Jason Merrill To: Jonathan Wakely On 7/23/22 07:31, Jonathan Wakely wrote: I'll try that on

Re: [PATCH] testsuite: gluefile file need to be prefixed

2022-09-12 Thread Richard Sandiford via Gcc-patches
Yvan Roux writes: > Hi Richard, > On Mon, Sep 12, 2022 at 12:56:52PM +0100, Richard Sandiford via Gcc-patches > wrote: >> Torbjörn SVENSSON via Gcc-patches writes: >> > PR/95720 >> > When the status wrapper is used, the gluefile need to be prefixed with >> > -Wl, in order for the test cases to

Re: [PATCH v3] eliminate mutex in fast path of __register_frame

2022-09-12 Thread Jason Merrill via Gcc-patches
On 6/26/22 05:13, Thomas Neumann via Gcc-patches wrote: NOTE: A stress test program and a detailed walkthrough that breaks this patch into manageable parts can be found here: https://databasearchitects.blogspot.com/2022/06/making-unwinding-through-jit-ed-code.html The

Re: [PATCH] testsuite: gluefile file need to be prefixed

2022-09-12 Thread Yvan Roux via Gcc-patches
Hi Richard, On Mon, Sep 12, 2022 at 12:56:52PM +0100, Richard Sandiford via Gcc-patches wrote: > Torbjörn SVENSSON via Gcc-patches writes: > > PR/95720 > > When the status wrapper is used, the gluefile need to be prefixed with > > -Wl, in order for the test cases to have the dump files with

Re: [PATCH] PR rtl-optimization/106594: Preserve zero_extend when cheap.

2022-09-12 Thread Richard Sandiford via Gcc-patches
"Roger Sayle" writes: > Hi Richard, > >> "Roger Sayle" writes: >> > This patch addresses PR rtl-optimization/106594, a significant >> > performance regression affecting aarch64 recently introduced (exposed) >> > by one of my recent RTL simplification improvements. Firstly many >> > thanks to

Re: Extend fold_vec_perm to fold VEC_PERM_EXPR in VLA manner

2022-09-12 Thread Richard Sandiford via Gcc-patches
Prathamesh Kulkarni writes: > On Mon, 5 Sept 2022 at 15:51, Richard Sandiford > wrote: >> >> Sorry for the slow reply. I wrote a response a couple of weeks ago >> but I think it get lost in a machine outage. >> >> Prathamesh Kulkarni writes: >> > Hi, >> > The attached prototype patch extends

RE: [PATCH] PR rtl-optimization/106594: Preserve zero_extend when cheap.

2022-09-12 Thread Roger Sayle
Hi Richard, > "Roger Sayle" writes: > > This patch addresses PR rtl-optimization/106594, a significant > > performance regression affecting aarch64 recently introduced (exposed) > > by one of my recent RTL simplification improvements. Firstly many > > thanks to Tamar Christina for confirming

Re: [PATCH] Implement known/maybe fpclassify like API for frange.

2022-09-12 Thread Aldy Hernandez via Gcc-patches
On Mon, Sep 12, 2022 at 10:48 AM Jan-Benedict Glaw wrote: > > Hi Aldy! > > On Thu, 2022-09-08 12:56:24 +0200, Aldy Hernandez via Gcc-patches > wrote: > > > From 795baa0b044953e9f198f49e379374d633f43b47 Mon Sep 17 00:00:00 2001 > > From: Aldy Hernandez > > Date: Thu, 8 Sep 2022 08:11:43 +0200 >

[COMMITTED] frange::set_signbit: Avoid changing sign when already in the correct sign.

2022-09-12 Thread Aldy Hernandez via Gcc-patches
We should avoid pessimizing the signbit when it's already correct. In this particular case we were trying to change the signbit to "unknown", when it was obviously negative. This test is actually slated for removal with my upcoming revamp of the signbit and NAN tracking, per the conversations

[PATCH] C-SKY: Fix unsigned comparison warning

2022-09-12 Thread Jan-Benedict Glaw
Hi! When -mfloat-abi=hard support was added, a cast went missing that used to silence a warning in common code: /usr/lib/gcc-snapshot/bin/g++ -fno-PIE -c -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing

Re: [Patch] nvptx/mkoffload.cc: Warn instead of error when reverse offload is not possible (was: Re: [Patch][2/3][v2] nvptx: libgomp+mkoffload.cc: Prepare for reverse offload fn lookup)

2022-09-12 Thread Jakub Jelinek via Gcc-patches
On Mon, Sep 12, 2022 at 02:02:16PM +0200, Tobias Burnus wrote: > + { > + warning_at (input_location, 0, > + "% requires at " > + "least % for %<-march=%> - disabling " > + "offload-code generation for this device

[COMMITTED] xtensa: gcc: fix builtin_apply return value

2022-09-12 Thread Max Filippov via Gcc-patches
xtensa may use up to 4 registers to return a value from a function, but recognition of only one register in the xtensa_function_value_regno_p and missing untyped_call pattern result in that only one register is saved by the __builtin_apply and returned by the __builtin_apply_return. gcc/

[Patch] nvptx/mkoffload.cc: Warn instead of error when reverse offload is not possible (was: Re: [Patch][2/3][v2] nvptx: libgomp+mkoffload.cc: Prepare for reverse offload fn lookup)

2022-09-12 Thread Tobias Burnus
On 09.09.22 17:36, Jakub Jelinek wrote: Wonder if we instead shouldn't arrange for silent request for no PTX offloading (or one with warning?) if sm_30 and reverse offload is needed. Error might be too harsh, the program can still offload to GCN or host just fine... Attached patch now

Re: [PATCH] testsuite: gluefile file need to be prefixed

2022-09-12 Thread Richard Sandiford via Gcc-patches
Torbjörn SVENSSON via Gcc-patches writes: > PR/95720 > When the status wrapper is used, the gluefile need to be prefixed with > -Wl, in order for the test cases to have the dump files with the > expected names. > > gcc/testsuite/ChangeLog: > > * gcc/testsuite/lib/g++.exp: Moved gluefile

Re: [committed] libstdc++: Find make_error_code and make_error_condition via ADL only

2022-09-12 Thread Jonathan Wakely via Gcc-patches
On Mon, 12 Sept 2022 at 11:55, Daniel Krügler wrote: > > Am Do., 8. Sept. 2022 um 20:30 Uhr schrieb Jonathan Wakely via > Libstdc++ : > > > > Tested powerpc64le-linux, pushed to trunk. > > > > -- >8 -- > > > > The new proposed resolution for LWG 3629 says that std::error_code and > >

Re: [committed] libstdc++: Find make_error_code and make_error_condition via ADL only

2022-09-12 Thread Daniel Krügler via Gcc-patches
Am Do., 8. Sept. 2022 um 20:30 Uhr schrieb Jonathan Wakely via Libstdc++ : > > Tested powerpc64le-linux, pushed to trunk. > > -- >8 -- > > The new proposed resolution for LWG 3629 says that std::error_code and > std::error_condition should only use ADL to find their customization > points. This

Re: [PATCH 1/2] Add new target hook: constant_ok_for_cprop_p

2022-09-12 Thread Jeff Law via Gcc-patches
On 9/12/22 01:35, Richard Biener via Gcc-patches wrote: On Sun, Sep 11, 2022 at 10:51 PM Takayuki 'January June' Suwa via Gcc-patches wrote: Hi, Many RISC machines, as we know, have some restrictions on placing register-width constants in the source of load-immediate machine instructions,

Re: [PATCH] PR rtl-optimization/106594: Preserve zero_extend when cheap.

2022-09-12 Thread Richard Sandiford via Gcc-patches
"Roger Sayle" writes: > This patch addresses PR rtl-optimization/106594, a significant performance > regression affecting aarch64 recently introduced (exposed) by one of my > recent RTL simplification improvements. Firstly many thanks to > Tamar Christina for confirming that the core of this

[committed] doc: Fix typo in documentation of __float128 suffix

2022-09-12 Thread Jonathan Wakely via Gcc-patches
This typo has gone unnoticed for 15 years. I had to check whether it was supposed to say __float128 or _Float128, but based on the commit that added it, the answer was obviously __float128. Committed as obvious. -- >8 -- gcc/ChangeLog: * doc/extend.texi (Floating Types): Fix

Re: [PATCH] gcc: honour -ffile-prefix-map in ASM_MAP [PR93371]

2022-09-12 Thread Rasmus Villemoes
On 29/08/2022 11.29, Rasmus Villemoes wrote: > -ffile-prefix-map is supposed to be a superset of -fmacro-prefix-map > and -fdebug-prefix-map. However, when building .S or .s files, gas is > not called with the appropriate --debug-prefix-map option when > -ffile-prefix-map is used. > > While the

Re: [PATCH v2] gcov: Respect triplet when looking for gcov

2022-09-12 Thread Martin Liška
On 9/12/22 11:39, Torbjorn SVENSSON wrote: > On 2022-09-12 10:40, Martin Liška wrote: >> On 9/12/22 09:06, Torbjorn SVENSSON via Gcc-patches wrote: >>> >>> >>> On 2022-09-11 21:38, Mikael Morin wrote: Le 11/09/2022 à 18:04, Torbjorn SVENSSON a écrit : > Can you fix it for me and submit it

Re: [PATCH v2] gcov: Respect triplet when looking for gcov

2022-09-12 Thread Torbjorn SVENSSON via Gcc-patches
On 2022-09-12 10:40, Martin Liška wrote: On 9/12/22 09:06, Torbjorn SVENSSON via Gcc-patches wrote: On 2022-09-11 21:38, Mikael Morin wrote: Le 11/09/2022 à 18:04, Torbjorn SVENSSON a écrit : Can you fix it for me and submit it or do you want me to send a v3? For trivial things like this,

Re: Patch ping^3 ([PATCH] libstdc++: Outline the overlapping case of string _M_replace into a separate function [PR105329])

2022-09-12 Thread Jonathan Wakely via Gcc-patches
On Mon, 12 Sept 2022 at 10:16, Jakub Jelinek wrote: > > On Wed, Aug 31, 2022 at 11:38:58AM +0200, Jakub Jelinek via Gcc-patches wrote: > > On Wed, Aug 10, 2022 at 01:27:51PM +0200, Jakub Jelinek via Gcc-patches > > wrote: > > > On Wed, Jul 27, 2022 at 11:33:29AM +0200, Jakub Jelinek via

Patch ping^3 ([PATCH] libstdc++: Outline the overlapping case of string _M_replace into a separate function [PR105329])

2022-09-12 Thread Jakub Jelinek via Gcc-patches
On Wed, Aug 31, 2022 at 11:38:58AM +0200, Jakub Jelinek via Gcc-patches wrote: > On Wed, Aug 10, 2022 at 01:27:51PM +0200, Jakub Jelinek via Gcc-patches wrote: > > On Wed, Jul 27, 2022 at 11:33:29AM +0200, Jakub Jelinek via Gcc-patches > > wrote: > > > The following patch is partially a

Re: [patch] libgomp.texi: Impl. status fix/addition

2022-09-12 Thread Jakub Jelinek via Gcc-patches
On Mon, Sep 12, 2022 at 11:04:08AM +0200, Tobias Burnus wrote: > This patch is about the OpenMP 5.{1,2} implementation status. > > For omp/ompx/omx, I think it was a bit misleading. omp/ompx (and omx) > are reserved namespaces; for 'omp' nothing needs to be done (either > already implemented or

[patch] libgomp.texi: Impl. status fix/addition

2022-09-12 Thread Tobias Burnus
This patch is about the OpenMP 5.{1,2} implementation status. For omp/ompx/omx, I think it was a bit misleading. omp/ompx (and omx) are reserved namespaces; for 'omp' nothing needs to be done (either already implemented or not), while for 'ompx'/'omx' (vendor extension), the note + footnote

[committed] libgomp: Fix up icv-6.c [PR106894]

2022-09-12 Thread Jakub Jelinek via Gcc-patches
Hi! The thing is, make check or make check RUNTESTFLAGS="c.exp='icv-6.c' c++.exp='icv-6.c'" in libgomp obj dir work fine, but make -j32 -k check RUNTESTFLAGS="c.exp='icv-6.c' c++.exp='icv-6.c'" fails. The thing is that the testcase as written relies on OMP_NUM_THREADS not being set in environment

Re: [PATCH] Implement known/maybe fpclassify like API for frange.

2022-09-12 Thread Jan-Benedict Glaw
Hi Aldy! On Thu, 2022-09-08 12:56:24 +0200, Aldy Hernandez via Gcc-patches wrote: > From 795baa0b044953e9f198f49e379374d633f43b47 Mon Sep 17 00:00:00 2001 > From: Aldy Hernandez > Date: Thu, 8 Sep 2022 08:11:43 +0200 > Subject: [PATCH] Implement known/maybe fpclassify like API for frange. >

Re: [PATCH v2] gcov: Respect triplet when looking for gcov

2022-09-12 Thread Martin Liška
On 9/12/22 09:06, Torbjorn SVENSSON via Gcc-patches wrote: > > > On 2022-09-11 21:38, Mikael Morin wrote: >> Le 11/09/2022 à 18:04, Torbjorn SVENSSON a écrit : >>> Can you fix it for me and submit it or do you want me to send a v3? >> >> For trivial things like this, there is no need for a v3

Re: [PATCH 2/2] libstdc++: Add pretty printer for std::stringstream

2022-09-12 Thread Philipp Fent via Gcc-patches
Hi Jonathan, I've sent an updated patch addressing your comments here: https://gcc.gnu.org/pipermail/libstdc++/2022-September/054587.html Details below. On 06.09.22 13:27, Jonathan Wakely wrote: +pbase = self.val['_M_out_beg'] +pptr = self.val['_M_out_cur'] +egptr =

[Ada] Special-case printing of SPARK_Mode in error messages

2022-09-12 Thread Marc Poulhiès via Gcc-patches
For error messages with inserted names that include acronyms like SPARK or CPP, we want to preserve the casing. The list of special-cased named is currently the same as in gnatpp. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * erroutc.adb (Set_Msg_Insertion_Name):

[Ada] Accept explicit SPARK_Mode Auto as configuration pragma

2022-09-12 Thread Marc Poulhiès via Gcc-patches
An explicit value of Auto is now accepted for a configuration pragma SPARK_Mode, as a way to exempt a unit from complete adherence to SPARK rules when using a global configuration pragma file where SPARK_Mode=>On is specified. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ *

[Ada] Reject 'Valid_Scalars on Unchecked_Union regardless of privacy

2022-09-12 Thread Marc Poulhiès via Gcc-patches
Attribute Valid_Scalars applied to prefix with an unchecked union component causes a legitimate crash in the backend. It was already rejected in the frontend for prefixes of a public type; now it is rejected in the frontend regardless of the type privacy. Tested on x86_64-pc-linux-gnu, committed

[Ada] Fix immediate assertion failure with -gnatd.1

2022-09-12 Thread Marc Poulhiès via Gcc-patches
The switch enables the front-end unnesting pass. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * gcc-interface/decl.cc (gnat_to_gnu_entity): Relax assertion when front-end unnesting is enabled.diff --git a/gcc/ada/gcc-interface/decl.cc

[Ada] Storage_Error raised analyzing type with call in its range constraint

2022-09-12 Thread Marc Poulhiès via Gcc-patches
This patch corrects a problem in the compiler whereby the determination of scope levels during the generation of accessibility checks for function calls within range constraints leads to a compiler crash due to the type not being fully analyzed at the point in which its scope depth must be

[Ada] Improve CUDA host-side and device-side binder support

2022-09-12 Thread Marc Poulhiès via Gcc-patches
Use switches (one already existing, one newly added here) to indicate to the binder that CUDA support code is to be generated for either the host side or for the device side. Add an invocation of Adainit on the device side from Adainit on the host side; similarly for Adafinal. Tested on

[Ada] Temporary tweak new expansion of contracts

2022-09-12 Thread Marc Poulhiès via Gcc-patches
In the case of a function, the new expansion of contracts makes use of an extended return statement to store the result of the function in the return object while the post-conditions are evaluated. Unfortunately GNAT does not elide the copy of the return object for extended return statements for

[Ada] Fix validity checking on renamed Old attribute prefix

2022-09-12 Thread Marc Poulhiès via Gcc-patches
Prefix of attribute Old is captured either as an object renaming or as an object declaration. This is now taken into account when applying validity checks. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * exp_attr.adb (Expand_N_Attribute_Reference [Attribute_Old]):

[Ada] Improve CUDA host-side and device-side binder support

2022-09-12 Thread Marc Poulhiès via Gcc-patches
On the host-side, the binder now generates CUDA_Execute pragmas to invoke initialization and finalization on the device-side. The front end's expansion of these pragmas includes references to entities declared in package CUDA.Internal. Generate a with-clause so that unit will be available. Tested

[Ada] Cleanup routine for handling SPARK_Mode kinds

2022-09-12 Thread Marc Poulhiès via Gcc-patches
Code cleanup; semantics is unaffected. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_prag.adb (Get_SPARK_Mode_Type): Fix header box; replace chained IF with a CASE statement.diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb --- a/gcc/ada/sem_prag.adb

[Ada] Remove SPARK containers from GNAT documentation

2022-09-12 Thread Marc Poulhiès via Gcc-patches
This patch removes documentation on the SPARK containers, now under the spark2014 repository. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * doc/gnat_rm/the_gnat_library.rst: Remove paragraphs about SPARK containers. * gnat_rm.texi, gnat_ugn.texi:

[Ada] Fix oversight in implementation of unnesting

2022-09-12 Thread Marc Poulhiès via Gcc-patches
The pass would traverse generic subprogram bodies, which are not expanded, thus stumbling on unexpected nodes. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * exp_unst.adb (Unnest_Subprograms.Search_Subprograms): Skip the subprogram bodies that are not to be

[Ada] Sync documentation of junk names with code

2022-09-12 Thread Marc Poulhiès via Gcc-patches
The list of junk entity names for which warnings are suppressed has been recently modified, so update the documentation accordingly. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * doc/gnat_rm/implementation_defined_pragmas.rst (Pragma Unreferenced): Sync

[Ada] Reject use in SPARK of Asm intrinsics for code insertions

2022-09-12 Thread Marc Poulhiès via Gcc-patches
SPARK does not allow code insertions. This applies also to calls to Asm intrinsics defined in System.Machine_Code. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * libgnat/s-maccod.ads: Mark package as SPARK_Mode Off.diff --git a/gcc/ada/libgnat/s-maccod.ads

[Ada] Internal error compiling formal instance of generic with Initial_Condition

2022-09-12 Thread Marc Poulhiès via Gcc-patches
Prevent the compiler from failing with an internal error in some cases involving an instance of a generic which takes as a formal parameter an instance of a second generic, where the second generic has an Initial_Condition aspect specification. Tested on x86_64-pc-linux-gnu, committed on trunk

[Ada] bugbox referencing INOX prefixed view of primitive op of modular type

2022-09-12 Thread Marc Poulhiès via Gcc-patches
The -gnatX switch enables naming a prefixed view of a subprogram with an untagged prefix. Compiling such a reference where the prefix is of a modular type could result in an internal compiler error. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_ch4.adb

[Ada] Justify false alarm from CodePeer analysis of GNAT

2022-09-12 Thread Marc Poulhiès via Gcc-patches
Branch is determined as dead following a test always False by CodePeer analysis, which is incorrect. Justify this false alarm with an appropriate pragma Annotate. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * libgnat/s-imagei.adb (Image_Integer): Add justification.diff

[Ada] Do not mark user parameters of protected subprograms as artificial

2022-09-12 Thread Marc Poulhiès via Gcc-patches
This occurs because protected subprograms are not translated directly into object code but first rewritten as a pair of subprograms by the front-end. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * exp_ch9.adb (Build_Protected_Spec): Tidy up and propagate the

[Ada] Syntax error in Ada 2022 array aggregate causes bug box

2022-09-12 Thread Marc Poulhiès via Gcc-patches
Check for the case where a user writes "in" instead of "of" in an aggregate like "[for E in Some_Array when Some_Filter (E) => E]". Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_aggr.adb (Resolve_Array_Aggregate): Generate an appropriate error message

[Ada] Lock_Free aspect takes precedence over Ceiling_Locking locking policy

2022-09-12 Thread Marc Poulhiès via Gcc-patches
Allow the Lock_Free aspect of a protected type to be True (but only by explicit specification) if Ceiling_Locking locking policy has been specified. Clarify that the Lock_Free aspect takes precedence over the Ceiling_Locking policy in that case. Tested on x86_64-pc-linux-gnu, committed on trunk

[Ada] Tech debt: Expansion of contracts

2022-09-12 Thread Marc Poulhiès via Gcc-patches
This patch modifies the expansion of contracts such that the statements and declarations of a subprogram with post-execution checks get moved to a local internally generated subprogram which the original subprogram calls directly followed by the required post-execution checks. This differs from

[Ada] Remove a no-longer-correct comment

2022-09-12 Thread Marc Poulhiès via Gcc-patches
Remove a comment about the former use of the -gnatd9 switch (that switch is now unused). Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * debug.adb: remove a comment.diff --git a/gcc/ada/debug.adb b/gcc/ada/debug.adb --- a/gcc/ada/debug.adb +++ b/gcc/ada/debug.adb @@ -1089,9

[Ada] Fix issues with compiling ACATS test for user-defined literals

2022-09-12 Thread Marc Poulhiès via Gcc-patches
The draft ACATS test (which we developed) for the Ada 2022 feature of user-defined literals has compile-time problems that are fixed with this set of changes. Two of these involve the resolution of named numbers in the context where an implicit literal conversion can occur, and for equality when

[Ada] Disable Support_Atomic_Primitives on QNX and VxWorks targets

2022-09-12 Thread Marc Poulhiès via Gcc-patches
The current configuration of the QNX and VxWorks runtimes does not support atomic primitives. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * libgnat/system-qnx-arm.ads: Set Support_Atomic_Primitives to false. * libgnat/system-vxworks7-aarch64.ads: Ditto.

[Ada] Fix bugs in check-related warnings.

2022-09-12 Thread Marc Poulhiès via Gcc-patches
Make sure warnings about wrong-length aggregates don't get suppressed. Such a warning (in a with-ed unit) can be the only explanation for an error about No_Elaboration_Code violations. Avoid passing a bogus "#" to Error_Msg. We really should never construct message templates by concatenating

[Ada] Disable Support_Atomic_Primitives on x86_64 VxWorks

2022-09-12 Thread Marc Poulhiès via Gcc-patches
The current configuration of the x86-64 VxWorks runtimes does not support atomic primitives. x86-64 VxWorks was missed from the previous patch. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * libgnat/system-vxworks7-x86_64-kernel.ads: Set Support_Atomic_Primitives

[Ada] Parser and lexer cleanup

2022-09-12 Thread Marc Poulhiès via Gcc-patches
This patch makes various minor cleanup changes to the parser. No change in behavior. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * par-tchk.adb, par-util.adb, prep.adb, prepcomp.adb, scng.adb: Use "in" instead of chains of "=" connected with "or else".

[Ada] Revert "Enforce matching of extra formals"

2022-09-12 Thread Marc Poulhiès via Gcc-patches
This reverts commit 51abc0cc8691daecd7cec8372e4988e9f3f1913c. Tested on x86_64-pc-linux-gnu, committed on trunk patch.diff.gz Description: application/gzip

Re: [PATCH][GCC 12] arm: Fix constant immediates predicates and constraints for some MVE builtins

2022-09-12 Thread Christophe Lyon via Gcc-patches
Hi! On 9/9/22 11:33, Christophe Lyon wrote: This is a backport from trunk to gcc-12. Several MVE builtins incorrectly use the same predicate/constraint pair for several modes, which does not match the specification. This patch uses the appropriate iterator instead. 2022-09-06 Christophe Lyon

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

2022-09-12 Thread Jakub Jelinek via Gcc-patches
Hi! The following patch implements the compiler part of C++23 P1467R9 - Extended floating-point types and standard names compiler part by introducing _Float{16,32,64,128} as keywords and builtin types like they are implemented for C already since GCC 7. It doesn't introduce _Float{32,64,128}x for

Re: [PATCH v2] gcov: Respect triplet when looking for gcov

2022-09-12 Thread Mikael Morin
Le 12/09/2022 à 09:06, Torbjorn SVENSSON a écrit : On 2022-09-11 21:38, Mikael Morin wrote: Le 11/09/2022 à 18:04, Torbjorn SVENSSON a écrit : Can you fix it for me and submit it or do you want me to send a v3? For trivial things like this, there is no need for a v3 (nor was there for a

Re: [PATCH 1/2] Add new target hook: constant_ok_for_cprop_p

2022-09-12 Thread Richard Biener via Gcc-patches
On Sun, Sep 11, 2022 at 10:51 PM Takayuki 'January June' Suwa via Gcc-patches wrote: > > Hi, > > Many RISC machines, as we know, have some restrictions on placing > register-width constants in the source of load-immediate machine > instructions, so the target must provide a solution for that in

Re: stdatomic.h: Do not define ATOMIC_VAR_INIT for C2x

2022-09-12 Thread Richard Biener via Gcc-patches
On Fri, Sep 9, 2022 at 10:41 PM Joseph Myers wrote: > > The macro ATOMIC_VAR_INIT, previously declared obsolete, > is removed completely in C2x; disable it for C2x in GCC's > implementation. (Although ATOMIC_* are reserved names for this > header, disabling the macro for C2x still seems

[PATCH][pushed] analyzer: remove unused fields

2022-09-12 Thread Martin Liška
Fixes: gcc/analyzer/region-model.cc:5918:8: warning: private field 'm_record_type' is not used [-Wunused-private-field] gcc/analyzer/region-model.cc:6305:25: warning: private field 'm_mgr' is not used [-Wunused-private-field] gcc/analyzer/ChangeLog: * region-model.cc

Re: [PATCH v2] gcov: Respect triplet when looking for gcov

2022-09-12 Thread Torbjorn SVENSSON via Gcc-patches
On 2022-09-11 21:38, Mikael Morin wrote: Le 11/09/2022 à 18:04, Torbjorn SVENSSON a écrit : Can you fix it for me and submit it or do you want me to send a v3? For trivial things like this, there is no need for a v3 (nor was there for a v2). Do you miss a git write account and need