[committed] libstdc++: Improve comments describing --enable-fully-dynamic-string

2022-01-18 Thread Jonathan Wakely via Gcc-patches
Pushed to trunk. libstdc++-v3/ChangeLog: * acinclude.m4 (GLIBCXX_ENABLE_FULLY_DYNAMIC_STRING): Improve comments. * configure: Regenerate. --- libstdc++-v3/acinclude.m4 | 17 +++-- libstdc++-v3/configure| 4 ++-- 2 files changed, 13 insertions(+), 8

[committed 2/2] libstdc++: Use GCC's predefined macro for endianness [PR104080]

2022-01-18 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux, pushed to trunk. Instead of hardcoded preprocessor conditionals with explicit target checks, just rely on the fact that __BYTE_ORDER__ is always defined by GCC. libstdc++-v3/ChangeLog: PR libstdc++/104080 * src/c++17/fast_float/LOCAL_PATCHES: Update.

Re: [gcc r12-6398] [Ada] Reduce runtime dependencies on stage1

2022-01-18 Thread Arnaud Charlet via Gcc-patches
> Unfortunately it's not OK, these are the most annoying/delicate dependencies, > so > we'd rather not reintroduce them. I'll instead update prerequisites to > document that GCC 5.1 or later is required to build GNAT. Now pushed on master: Update prerequisites for GNAT *

Re: [PATCH] LTO plugin: modernize a bit.

2022-01-18 Thread Thomas Schwinge
Hi! On 2022-01-05T12:06:12+0100, Martin Liška wrote: > The patch is about small refactoring of the plugin. Yay! > include/ChangeLog: > > * plugin-api.h (enum ld_plugin_tag): Do not set implicit enum > values. I did wonder whether the original idea there would've been to fixate

Re: GCC 11 backports

2022-01-18 Thread Martin Liška
On 12/16/21 12:46, Martin Liška wrote: On 11/8/21 13:26, Martin Liška wrote: On 11/5/21 17:08, Martin Liška wrote: On 8/23/21 10:54, Martin Liška wrote: On 8/16/21 13:13, Martin Liška wrote: I'm going to apply the following 3 tested patches. Martin One more patch I've just tested. Martin

Re: [PATCH] libgomp, OpenMP: Fix issue for omp_get_device_num on gfx targets.

2022-01-18 Thread Andrew Stubbs
Sorry, I had not seen that this was entirely within my amdgcn remit On 12/01/2022 09:43, Marcel Vollweiler wrote: Hi, Currently omp_get_device_num does not work on gcn targets with more than one offload device. The reason is that GOMP_DEVICE_NUM_VAR is static in icv-device.c and thus

[committed] libstdc++: Update status tables in manual

2022-01-18 Thread Jonathan Wakely via Gcc-patches
Pushed to trunk. libstdc++-v3/ChangeLog: * doc/xml/manual/status_cxx2017.xml: Update C++17 status. * doc/xml/manual/status_cxx2020.xml: Use 12.1 instead of 12 for upcoming release. * doc/html/manual/status.html: Regenerate. ---

[PATCH] Fix tree-optimization/101941: IPA splitting out function with error attribute

2022-01-18 Thread apinski--- via Gcc-patches
From: Andrew Pinski The Linux kernel started to fail compile when the jump threader was improved (r12-2591-g2e96b5f14e4025691). This failure was due to the IPA splitting code decided now to split off the basic block which contained two functions, one of those functions included the error

Re: [gcc r12-6398] [Ada] Reduce runtime dependencies on stage1

2022-01-18 Thread Arnaud Charlet via Gcc-patches
Thomas, > OK to push (after more testing) the attached > 'Revert parts of "[Ada] Reduce runtime dependencies on stage1"', for the > reason detailed therein? Should the comment before 'GNAT1_C_OBJS' be > re-instated/adjusted, too? Would appreciate a careful review, as I don't > really know what

[PATCH] pack fields in cgraph_simd_clone_arg and struct function

2022-01-18 Thread Richard Biener via Gcc-patches
As pointed out by pahole. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. 2022-01-18 Richard Biener * cgraph.h (struct cgraph_simd_clone_arg): Re-arrange fields to avoid padding. * function.h (struct function): Likewise. --- gcc/cgraph.h | 6 +++---

Re: [PATCH] libgomp, OpenMP: Fix issue for omp_get_device_num on gfx targets.

2022-01-18 Thread Thomas Schwinge
Hi! Maybe I'm just totally confused -- as so often ;-) -- but things seem strange here: On 2022-01-12T10:43:05+0100, Marcel Vollweiler wrote: > Currently omp_get_device_num does not work on gcn targets with more than > one offload device. The reason is that GOMP_DEVICE_NUM_VAR I understand the

Re: [PATCH] pack fields in line-map data structures

2022-01-18 Thread Jakub Jelinek via Gcc-patches
On Tue, Jan 18, 2022 at 01:16:14PM +0100, Richard Biener wrote: > As pointed out by pahole. > > Bootstrapped & tested on x86_64-unknown-linux-gnu. > > OK? > > Thanks, > Richard. > > 2022-01-18 Richard Biener > > libcpp/ > * include/line-map.h (class line_maps): Re-arrange fields >

Re: [PATCH] libgomp, OpenMP: Fix issue for omp_get_device_num on gfx targets.

2022-01-18 Thread Andrew Stubbs
On 18/01/2022 12:25, Thomas Schwinge wrote: Hi! Maybe I'm just totally confused -- as so often ;-) -- but things seem strange here: On 2022-01-12T10:43:05+0100, Marcel Vollweiler wrote: Currently omp_get_device_num does not work on gcn targets with more than one offload device. The reason is

Re: [PATCH] disable aggressive_loop_optimizations until niter ready

2022-01-18 Thread Richard Biener via Gcc-patches
On Mon, 17 Jan 2022, Jiufu Guo wrote: > Richard Biener writes: > > > On Fri, 14 Jan 2022, Jiufu Guo wrote: > > > >> Richard Biener writes: > >> > >> > On Thu, 13 Jan 2022, guojiufu wrote: > >> > > >> >> On 2022-01-03 22:30, Richard Biener wrote: > >> >> > On Wed, 22 Dec 2021, Jiufu Guo wrote:

Re: [PATCH] disable aggressive_loop_optimizations until niter ready

2022-01-18 Thread Richard Biener via Gcc-patches
On Tue, 18 Jan 2022, Richard Biener wrote: > On Mon, 17 Jan 2022, Jiufu Guo wrote: > > > Richard Biener writes: > > > > > On Fri, 14 Jan 2022, Jiufu Guo wrote: > > > > > >> Richard Biener writes: > > >> > > >> > On Thu, 13 Jan 2022, guojiufu wrote: > > >> > > > >> >> On 2022-01-03 22:30,

[pushed] aarch64: Fix overly optimistic LDP/STP matching [PR104005]

2022-01-18 Thread Richard Sandiford via Gcc-patches
In g:526e1639aa76b0a8496b0dc3a3ff2c450229544e I'd added support for finding more consecutive MEMs. However, the check was too eager, in that it matched MEM_REFs with the same base address even if that base address was an arbitrary SSA name. This can give wrong results if a MEM_REF from one loop

Re: [PATCH] c++: Further address_compare fixes [PR89074]

2022-01-18 Thread Jakub Jelinek via Gcc-patches
On Tue, Jan 18, 2022 at 11:17:41AM +0100, Jakub Jelinek via Gcc-patches wrote: > Anyway, the following has been successfully bootstrapped/regtested on > x86_64-linux and i686-linux, ok for trunk? Actually, I missed one regression (thought it is caused by PR104025 patch but it is this one): +FAIL:

[PATCH] powerc: Fix asm machine directive for some CPUs

2022-01-18 Thread Sebastian Huber
For some CPUs, the assembler machine directive cannot be determined by ISA flags. gcc/ PR 104090/target * config/rs6000/rs6000.cc (rs6000_machine_from_flags): Use also rtems_cpu. --- gcc/config/rs6000/rs6000.cc | 28 1 file changed, 28

[PATCH] pack fields in line-map data structures

2022-01-18 Thread Richard Biener via Gcc-patches
As pointed out by pahole. Bootstrapped & tested on x86_64-unknown-linux-gnu. OK? Thanks, Richard. 2022-01-18 Richard Biener libcpp/ * include/line-map.h (class line_maps): Re-arrange fields to minimize padding. (class rich_location): Likewise. * line-map.cc

[PATCH] ipa/103989 - avoid IPA inlining of small functions with -Og

2022-01-18 Thread Richard Biener via Gcc-patches
The following change avoids doing IPA inlining of small functions into functions compiled with -Og - those functions will see almost no followup scalar cleanups so that the benefit anticipated by the inliner will not be realized and instead the late diagnostic code will be confused by dead code

Re: [pushed] aarch64: Fix overly optimistic LDP/STP matching [PR104005]

2022-01-18 Thread Richard Biener via Gcc-patches
On Tue, Jan 18, 2022 at 1:22 PM Richard Sandiford via Gcc-patches wrote: > > In g:526e1639aa76b0a8496b0dc3a3ff2c450229544e I'd added support > for finding more consecutive MEMs. However, the check was too > eager, in that it matched MEM_REFs with the same base address > even if that base address

[PATCH] waccess: Look at calls when tracking clobbers [PR104092]

2022-01-18 Thread Richard Sandiford via Gcc-patches
In this PR the waccess pass was fed: D.10779 ={v} {CLOBBER}; VIEW_CONVERT_EXPR(D.10779) = .MASK_LOAD_LANES (addr_5(D), 64B, _2); _7 = D.10779.__val[0]; However, the tracking of m_clobbers only looked at gassigns, so it missed that the clobber on the first line was overwritten by the call

Re: [PATCH] ipa/103989 - tame IPA optimizations at -Og

2022-01-18 Thread Jan Hubicka via Gcc-patches
> With -Og we are not prepared to do cleanup after IPA optimizations > and dead code exposed by those confuses late diagnostic passes. > This is a first patch removing unwanted IPA optimizations, namely > both late modref and pure-const analysis. > > Bootstrap and regtest running on

Re: [ANNOUNCEMENT] Mass rename of C++ .c files to .cc suffix is going to happen on Jan 17 evening UTC TZ

2022-01-18 Thread Martin Liška
On 1/18/22 09:36, Eric Botcazou wrote: Martin, The renaming patches have been just installed and I've built a few target compilers so far. I'll be online in ~10 hours from now so I can address potential issues caused by the patch. Who approved it though? Release managers. The renaming of

Re: Ping Re: [PATCH] middle-end: move initialization of stack_limit_rtx [PR103163]

2022-01-18 Thread Richard Biener via Gcc-patches
On Mon, Jan 17, 2022 at 7:20 PM Sandra Loosemore wrote: > > On 1/17/22 1:29 AM, Richard Biener wrote: > > On Mon, Jan 17, 2022 at 4:15 AM Sandra Loosemore > > wrote: > >> > >> On 1/8/22 9:24 PM, Sandra Loosemore wrote: > >>> This patch fixes the ICE I reported in PR103163. We were initializing

[PATCH 1/1] Fixed fast_float build error in NEWLIB

2022-01-18 Thread shihua
From: LiaoShihua When I built riscv-gcc with newlib, it will be terminated with message "fatal error: endian.h: No such file or directory". So, fixed it in fast_float.h. libstdc++-v3\ChangeLog: * src/c++17/fast_float/fast_float.h (defined):fast_float.h will include with using newlib

[committed 1/2] libstdc++: Fix deduction failure for std::min call [PR104080]

2022-01-18 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux, pushed to trunk. Reported upstream as https://github.com/fastfloat/fast_float/pull/122 libstdc++-v3/ChangeLog: PR libstdc++/104080 * src/c++17/fast_float/LOCAL_PATCHES: UPDATE. * src/c++17/fast_float/fast_float.h (round): Use explicit

Re: [PATCH 1/1] Fixed fast_float build error in NEWLIB

2022-01-18 Thread Jonathan Wakely via Gcc-patches
On Tue, 18 Jan 2022 at 09:05, LiaoShihua wrote: > > When I built riscv-gcc with newlib, it will be terminated with message > "fatal error: endian.h: No such file or directory". > So, fixed it in fast_float.h. > > libstdc++-v3\ChangeLog: > N.B. you need to use a forward slash here, not

Re: [PATCH] Fix -Wformat-diag for s390x target.

2022-01-18 Thread Martin Liška
On 1/12/22 10:03, Martin Liška wrote: Ready to be installed? I'm going to install the patch as it's pre-approved by Jeff. Martin

[PATCH] c++: Fix handling of temporaries with consteval ctors and non-trivial dtors [PR104055]

2022-01-18 Thread Jakub Jelinek via Gcc-patches
Hi! The following testcase is miscompiled. We see the constructor is immediate, in build_over_call we trigger: if (obj_arg && is_dummy_object (obj_arg)) { call = build_cplus_new (DECL_CONTEXT (fndecl), call, complain); obj_arg = NULL_TREE;

[PATCH] c++: Further address_compare fixes [PR89074]

2022-01-18 Thread Jakub Jelinek via Gcc-patches
On Thu, Jan 13, 2022 at 04:18:33PM -0500, Jason Merrill wrote: > > Note, address_compare has some special cases, e.g. it assumes that > > static vars are never adjacent to automatic vars, which is the case > > for the usual layout where automatic vars are on the stack and after > > .rodata/.data

[PATCH] ipa/103989 - tame IPA optimizations at -Og

2022-01-18 Thread Richard Biener via Gcc-patches
With -Og we are not prepared to do cleanup after IPA optimizations and dead code exposed by those confuses late diagnostic passes. This is a first patch removing unwanted IPA optimizations, namely both late modref and pure-const analysis. Bootstrap and regtest running on x86_64-unknown-linux-gnu,

Re: [ANNOUNCEMENT] Mass rename of C++ .c files to .cc suffix is going to happen on Jan 17 evening UTC TZ

2022-01-18 Thread Richard Earnshaw via Gcc-patches
On 17/01/2022 21:41, Martin Liška wrote: On 1/13/22 12:01, Martin Liška wrote: Hello. Based on the discussion with release managers, the change is going to happen after stage4 begins. Martin Hi. The renaming patches have been just installed and I've built a few target compilers so

Re: [ANNOUNCEMENT] Mass rename of C++ .c files to .cc suffix is going to happen on Jan 17 evening UTC TZ

2022-01-18 Thread Martin Liška
On 1/18/22 14:10, Richard Earnshaw wrote: Is that worth adding to contrib/gcc-git-customization.sh ? Yes, can you please do that? Thanks, Martin

Re: [PATCH] testsuite: Adjust possibly fragile slp-perm-9.c [PR104015]

2022-01-18 Thread Richard Sandiford via Gcc-patches
"Kewen.Lin" writes: > on 2022/1/18 锟斤拷锟斤拷11:06, Kewen.Lin via Gcc-patches wrote: >> Hi, >> >> As discussed in PR104015, the test case slp-perm-9.c can be >> fragile when vectorizer tries to use different vectorisation >> strategies. >> >> As Richard suggested, this patch tries to make the check

[PATCH] tree-optimization/103987 - guard DSE modref query

2022-01-18 Thread Richard Biener via Gcc-patches
This adds a missing guard for a pointer to the DSE modref query, otherwise we can end up invoking APIs desired to only work on pointers on non-pointers when there are mismatches between declared and actual arguments of functions in the program. Bootstrapped and tested on x86_64-unknown-linux-gnu,

Re: [PATCH] ipa/103989 - avoid IPA inlining of small functions with -Og

2022-01-18 Thread Jan Hubicka via Gcc-patches
> The following change avoids doing IPA inlining of small functions > into functions compiled with -Og - those functions will see almost no > followup scalar cleanups so that the benefit anticipated by the > inliner will not be realized and instead the late diagnostic code > will be confused by

Re: [PATCH] tree-optimization/104038 - Limit the number of relations registered per basic block.

2022-01-18 Thread Richard Biener via Gcc-patches
On Mon, Jan 17, 2022 at 8:56 PM Andrew MacLeod via Gcc-patches wrote: > > As mentioned in the PR, this demonstrates the potentially quadratic > performance behaviour of adding transitive relations over a series of > cascading calculations. > > As the lookup in a basic block is also linear in

Re: [ANNOUNCEMENT] Mass rename of C++ .c files to .cc suffix is going to happen on Jan 17 evening UTC TZ

2022-01-18 Thread Martin Liška
LGTM. I've just installed that, the Ada testsuite should work now. Martin

Re: [PATCH] Enhance vec_pack_trunc for integral mode mask.

2022-01-18 Thread Richard Biener via Gcc-patches
On Tue, Jan 18, 2022 at 7:26 AM liuhongt wrote: > > For testcase in PR, the patch supports QI:4 -> HI:16 pack with > multi steps(first pack QI:4 -> QI:8 through vec_pack_sbool_trunc_qi, > then pack QI:8 -> HI:16 through vec_pack_trunc_hi). > Similar for QI:2 -> HI:16 which is test4 in

[PATCH] tree-optimization/104064 - UBSAN issue in vect dataref analysis

2022-01-18 Thread Richard Biener via Gcc-patches
Since we order DRs after DR_INIT we know the difference will be positive and thus can avoid signed overflow issues by using unsigned arithmetic to produce the known unsigned result. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. 2022-01-18 Richard Biener PR

Re: [PATCH] testsuite: Adjust possibly fragile slp-perm-9.c [PR104015]

2022-01-18 Thread Kewen.Lin via Gcc-patches
on 2022/1/18 上午11:06, Kewen.Lin via Gcc-patches wrote: > Hi, > > As discussed in PR104015, the test case slp-perm-9.c can be > fragile when vectorizer tries to use different vectorisation > strategies. > > As Richard suggested, this patch tries to make the check not > sensitive on the re-trying

Re: [PATCH] Check sorting of MAINTAINERS

2022-01-18 Thread Martin Liška
On 1/18/22 08:59, Thomas Schwinge wrote: Hi! On 2022-01-10T17:14:00+0100, Martin Liška wrote: The script is capable of checking if MAINTAINER names are sorted alphabetically. Irrespective of the pre-existing issue that a concept of a first and a last name doesn't exist in all cultures, and

Re: [PATCH] Fix tree-optimization/101941: IPA splitting out function with error attribute

2022-01-18 Thread Jakub Jelinek via Gcc-patches
On Mon, Jan 17, 2022 at 09:08:22PM -0800, Andrew Pinski wrote: > > Perhaps even > > /* Check builtins that prevent splitting. */ > > if (gimple_code (stmt) == GIMPLE_CALL) > > if (tree decl = gimple_call_fndecl (stmt)) > > { > > if (fndecl_built_in_p

Re: [ANNOUNCEMENT] Mass rename of C++ .c files to .cc suffix is going to happen on Jan 17 evening UTC TZ

2022-01-18 Thread Martin Liška
On 1/18/22 09:53, Richard Biener wrote: Technically all release managers are also global reviewers, but I agree the speciality of the Ada setup (esp. the runtime being in gcc/) could have been anticipated. Yeah, I thought that building Ada FE is enough for testing effort, sorry. I would like

[PATCH][pushed] Add check_effective_target_python3_module.

2022-01-18 Thread Martin Liška
The patch adds detection of non-standard 'unicode' python module. Martin gcc/testsuite/ChangeLog: * gcc.src/maintainers.exp: Use check_effective_target_python3_module for checking of unicode module. * lib/target-supports.exp: Add

Re: [ANNOUNCEMENT] Mass rename of C++ .c files to .cc suffix is going to happen on Jan 17 evening UTC TZ

2022-01-18 Thread Eric Botcazou via Gcc-patches
Martin, > The renaming patches have been just installed and I've built a few target > compilers so far. I'll be online in ~10 hours from now so I can address > potential issues caused by the patch. Who approved it though? The renaming of the C files in the ada/ directory is wrong and should be

Re: [ANNOUNCEMENT] Mass rename of C++ .c files to .cc suffix is going to happen on Jan 17 evening UTC TZ

2022-01-18 Thread Jakub Jelinek via Gcc-patches
On Tue, Jan 18, 2022 at 10:08:20AM +0100, Martin Liška wrote: > On 1/18/22 09:53, Richard Biener wrote: > > Technically all release managers are also global reviewers, but I > > agree the speciality > > of the Ada setup (esp. the runtime being in gcc/) could have been > > anticipated. > > Yeah,

[PATCH][pushed] Fix options.exp.

2022-01-18 Thread Martin Liška
Pushed as obvious. Martin gcc/testsuite/ChangeLog: * gcc.misc-tests/options.exp: Include renamed file. --- gcc/testsuite/gcc.misc-tests/options.exp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/testsuite/gcc.misc-tests/options.exp

Re: [ANNOUNCEMENT] Mass rename of C++ .c files to .cc suffix is going to happen on Jan 17 evening UTC TZ

2022-01-18 Thread Eric Botcazou via Gcc-patches
> Release managers. They certainly have authority on the timing, but not on the contents. > Working on that right now, sorry.. OK, thanks in advance. -- Eric Botcazou

[PATCH] RISC-V: Handle different sigcontext struct layout.

2022-01-18 Thread Kito Cheng
RISC-V glibc intend to removed its own `sigcontext.h`[1] and use the linux kernel's one, however the struct layout is slightly different between those two version, fortunately they have identical layout, so we just need a magical way to detect which one we are used. libgcc/ChangeLog: *

Re: [PATCH] middle-end/101292 - invalid memory access with warning control

2022-01-18 Thread Richard Biener via Gcc-patches
On Mon, 17 Jan 2022, Martin Sebor wrote: > On 1/17/22 07:32, Richard Biener via Gcc-patches wrote: > > The warning control falls into the C++ trap of using a reference > > to old hashtable contents for a put operation which can end up > > re-allocating that before reading from the old freed

Re: [gcc r12-6398] [Ada] Reduce runtime dependencies on stage1

2022-01-18 Thread Thomas Schwinge
Hi! On 2022-01-10T09:41:08+, Pierre-Marie de Rodat via Gcc-cvs wrote: > https://gcc.gnu.org/g:a6eae6a9bbf83ada3aab7f5a2a74e7024889d237 > > commit r12-6398-ga6eae6a9bbf83ada3aab7f5a2a74e7024889d237 > Author: Arnaud Charlet > Date: Mon Nov 29 10:15:26 2021 + > > [Ada] Reduce

Re: [PATCH] c++: ICE with noexcept and canonical types [PR101715]

2022-01-18 Thread Marek Polacek via Gcc-patches
On Sat, Jan 15, 2022 at 09:24:05AM -0500, Patrick Palka wrote: > On Fri, 14 Jan 2022, Marek Polacek via Gcc-patches wrote: > > > This is a "canonical types differ for identical types" ICE, which started > > with r11-4682. It's a bit tricky to explain. Consider: > > > > template struct S { >

[PATCH] nvptx: fix -Wformat-diag warnings

2022-01-18 Thread Martin Liška
Pushed as pre-approved by Jeff. The patch fixes -Wformat-diag warnings. Martin gcc/ChangeLog: * config/nvptx/nvptx.cc (nvptx_goacc_validate_dims_1): Wrap keyword. * config/nvptx/nvptx.md: Remove trailing dot. libgomp/ChangeLog: *

Re: [PATCH] middle-end/101292 - invalid memory access with warning control

2022-01-18 Thread Martin Sebor via Gcc-patches
On 1/18/22 01:36, Richard Biener wrote: On Mon, 17 Jan 2022, Martin Sebor wrote: On 1/17/22 07:32, Richard Biener via Gcc-patches wrote: The warning control falls into the C++ trap of using a reference to old hashtable contents for a put operation which can end up re-allocating that before

Re: [PATCH] riscv: fix -Wformat-diag errors.

2022-01-18 Thread Kito Cheng via Gcc-patches
Thanks Martin! On Wed, Jan 19, 2022 at 12:23 AM Martin Liška wrote: > > Pushed as pre-approved by Jeff. The patch fixes -Wformat-diag warnings. > > Martin > > gcc/ChangeLog: > > * common/config/riscv/riscv-common.cc (riscv_subset_list::add): > Wrap keywords with quotes and remove

[committed] libstdc++: Fix suggested alternative to std::ptr_fun

2022-01-18 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux, pushed to trunk. libstdc++-v3/ChangeLog: * include/bits/stl_function.h (ptr_fun): Fix suggestion for non-deprecated alternative. --- libstdc++-v3/include/bits/stl_function.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

Re: [PATCH] rs6000: fix last -Wformat-diag

2022-01-18 Thread Segher Boessenkool
On Tue, Jan 18, 2022 at 05:21:30PM +0100, Martin Liška wrote: > I'm going to install the following -Wformat-diag that is based on Segher's > wording. Thanks! (But please fix the format=flawed: > Content-Type: text/plain; charset=UTF-8; format=flowed ) Segher

Re: [PATCH] ipa/103989 - avoid IPA inlining of small functions with -Og

2022-01-18 Thread Richard Biener via Gcc-patches
On Tue, 18 Jan 2022, Jan Hubicka wrote: > > The following change avoids doing IPA inlining of small functions > > into functions compiled with -Og - those functions will see almost no > > followup scalar cleanups so that the benefit anticipated by the > > inliner will not be realized and instead

Re: [PATCH] c++: ICE with noexcept and canonical types [PR101715]

2022-01-18 Thread Marek Polacek via Gcc-patches
On Mon, Jan 17, 2022 at 01:48:48PM -0500, Jason Merrill wrote: > On 1/14/22 19:22, Marek Polacek wrote: > > This is a "canonical types differ for identical types" ICE, which started > > with r11-4682. It's a bit tricky to explain. Consider: > > > >template struct S { > > S bar()

Enable -Werror=format-diag for bootstrap

2022-01-18 Thread Martin Liška
On 1/16/22 01:31, Martin Sebor wrote: Hello. (I think your message in unrelated to this email thread). Martin, I've looked into removing the -Wno-error for this warning for just a subset of targets.  It seems doable with some hardcoding in configure.ac but if you're planning to do the cleanup 

Re: [PATCH] nvptx: fix -Wformat-diag warnings

2022-01-18 Thread Thomas Schwinge
Hi Martin! On 2022-01-18T17:22:53+0100, Martin Liška wrote: > Pushed as pre-approved by Jeff. The patch fixes -Wformat-diag warnings. > --- a/gcc/config/nvptx/nvptx.cc > +++ b/gcc/config/nvptx/nvptx.cc > @@ -5894,7 +5894,7 @@ nvptx_goacc_validate_dims_1 (tree decl, int dims[], int > fn_level,

[committed] libstdc++: Declare std::c8rtomb and std::mbrtoc8 if provided by the C library

2022-01-18 Thread Jonathan Wakely via Gcc-patches
From: Tom Honermann Tested powerpc64le-linux, pushed to trunk. This patch completes implementation of the C++20 proposal P0482R6 [1] by adding declarations of std::c8rtomb() and std::mbrtoc8() in if provided by the C library in . This patch addresses feedback provided in response to a

OpenMP, libgomp: Environment variable syntax extension.

2022-01-18 Thread Marcel Vollweiler
Hi, This patch considers the environment variable syntax extension for device-specific variants of environment variables from OpenMP 5.1 (see OpenMP 5.1 specification, p. 75 and p. 639). An environment variable (e.g. OMP_NUM_TEAMS) can have different suffixes: _DEV (e.g. OMP_NUM_TEAMS_DEV):

[PATCH] Fix -Wformat-diag in various targets.

2022-01-18 Thread Martin Liška
Hello. The patch fixes -Wformat-diag in various targets. I'm going to install the patch based on Jeff's pre-approval of similar patches. Martin gcc/ChangeLog: * collect2.cc (scan_libraries): Fix -Wformat-diag issues. * config/aarch64/aarch64-builtins.cc

[PATCH] rs6000: fix last -Wformat-diag

2022-01-18 Thread Martin Liška
I'm going to install the following -Wformat-diag that is based on Segher's wording. Pushed to master. Martin gcc/ChangeLog: * config/rs6000/rs6000-call.cc (rs6000_invalid_builtin): Change wording of an error message. gcc/testsuite/ChangeLog: *

[committed] libstdc++: Define for C++23

2022-01-18 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux, pushed to trunk. This adds the C++23 header, as proposed by P0943R6, for compatibility with C code. There are still some ABI differences between atomic_xxx in C and C++ std::atomic_xxx in C++, so this only provides source compatibility, not binary compatibility.

Re: [PATCH] RISC-V: Fix use-after-free error in `parse_multiletter_ext'

2022-01-18 Thread Kito Cheng via Gcc-patches
LGTM, thanks :) On Wed, Jan 19, 2022 at 12:59 AM Maciej W. Rozycki wrote: > > Avoid undefined arithmetic involving a pointer to a heap allocation that > has been freed and move a problematic calculation ahead of the following > call to `free' in `riscv_subset_list::parse_multiletter_ext',

Re: [PATCH, OpenMP] PR103642 - Fix omp-low ICE for indirect references based off component access

2022-01-18 Thread Jakub Jelinek via Gcc-patches
On Mon, Jan 03, 2022 at 10:15:26PM +0800, Chung-Lin Tang wrote: > This issue was triggered after the patch extending syntax for component access > in map clauses > (https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=0ab29cf0bb68960c) > > In gimplify_scan_omp_clauses, the case for handling indirect

Re: [PATCH] c++: Fix handling of temporaries with consteval ctors and non-trivial dtors [PR104055]

2022-01-18 Thread Jakub Jelinek via Gcc-patches
On Tue, Jan 18, 2022 at 09:08:03AM -0500, Jason Merrill wrote: > > which makes call a TARGET_EXPR with the dtor in TARGET_EXPR_CLEANUP, > > but then call cxx_constant_value on it. In cxx_eval_outermost_constant_expr > > it triggers the: > >else if (TREE_CODE (t) != CONSTRUCTOR) > >

Re: [PATCH] libgccjit: Add support for register variables [PR104072]

2022-01-18 Thread Antoni Boucher via Gcc-patches
Also, I put the extern in gcc/system.h, but I'm not sure it's the right place. Where should I put it? Le lundi 17 janvier 2022 à 19:46 -0500, Antoni Boucher via Jit a écrit : > I missed the comment about the new define, so here's the updated > patch. > > Le lundi 17 janvier 2022 à 19:24 -0500,

[PATCH] v850: fix -Wformat-diag warnings.

2022-01-18 Thread Martin Liška
Pushed as pre-approved by Jeff. The patch fixes -Wformat-diag warnings. Martin gcc/ChangeLog: * config/v850/v850-c.cc (pop_data_area): Fix -Wformat-diag warning. (ghs_pragma_section): Likewise. (ghs_pragma_interrupt): Likewise. (ghs_pragma_starttda):

[PATCH] nds32: fix -Wformat-diag warning.

2022-01-18 Thread Martin Liška
Pushed as pre-approved by Jeff. The patch fixes -Wformat-diag warnings. Martin gcc/ChangeLog: * config/nds32/nds32-intrinsic.cc (nds32_expand_builtin_impl): Fix warnings. * config/nds32/nds32-intrinsic.md: Likewise. * config/nds32/nds32-isr.cc

[committed] libstdc++: Use __cpp_lib_concepts in std::reverse_iterator [PR104098]

2022-01-18 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux, pushed to trunk. We should not assume that std::iter_value_t etc. are defined unconditionally for C++20 mode. libstdc++-v3/ChangeLog: PR libstdc++/104098 * include/bits/stl_iterator.h (reverse_iterator): Check __cpp_lib_concepts instead of

[PATCH] vms: fix -Wformat-diag warnings.

2022-01-18 Thread Martin Liška
Pushed as pre-approved by Jeff. The patch fixes -Wformat-diag warnings. Martin gcc/ChangeLog: * config/vms/vms-c.cc (vms_pragma_nostandard): Fix -Wformat-diag warning. (vms_pragma_standard): Likewise. (vms_pragma_extern_prefix): Likewise. ---

[PATCH] xtensa: fix -Wformat-diag warnings.

2022-01-18 Thread Martin Liška
Pushed as pre-approved by Jeff. The patch fixes -Wformat-diag warnings. Martin gcc/ChangeLog: * config/xtensa/xtensa.cc (print_operand): Fix warnings. (print_operand_address): Likewise. (xtensa_multibss_section_type_flags): Likewise. --- gcc/config/xtensa/xtensa.cc | 6

[committed] libstdc++: Fix ambiguous std::pair constructors [PR101124]

2022-01-18 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux, pushed to trunk. The deprecated non-standard std::pair constructors that allow constructing std::pair from an rvalue and a literal zero where not sufficiently constrained. They were viable when constructing std::pair, and that case should work fine using the standard

Re: [PATCH] nvptx: fix -Wformat-diag warnings

2022-01-18 Thread Martin Liška
On 1/18/22 17:36, Thomas Schwinge wrote: Similar here: '%'. Grüße Thomas I see, thank you for the review. Can you please test for me the following patch candidate? Thanks, MartinFrom de5cafe27131c002e6634dd7417577452eb1aac8 Mon Sep 17 00:00:00 2001 From: Martin Liska Date: Tue, 18 Jan

Re: [PATCH] c++: Fix handling of temporaries with consteval ctors and non-trivial dtors [PR104055]

2022-01-18 Thread Jason Merrill via Gcc-patches
On 1/18/22 09:26, Jakub Jelinek wrote: On Tue, Jan 18, 2022 at 09:08:03AM -0500, Jason Merrill wrote: which makes call a TARGET_EXPR with the dtor in TARGET_EXPR_CLEANUP, but then call cxx_constant_value on it. In cxx_eval_outermost_constant_expr it triggers the: else if (TREE_CODE (t)

Re: [PATCH] c++: Fix handling of temporaries with consteval ctors and non-trivial dtors [PR104055]

2022-01-18 Thread Jason Merrill via Gcc-patches
On 1/18/22 05:10, Jakub Jelinek wrote: Hi! The following testcase is miscompiled. We see the constructor is immediate, in build_over_call we trigger: if (obj_arg && is_dummy_object (obj_arg)) { call = build_cplus_new (DECL_CONTEXT (fndecl), call,

Re: [PATCH] libgomp, OpenMP: Fix issue for omp_get_device_num on gfx targets.

2022-01-18 Thread Marcel Vollweiler
Hi Thomas, Am 18.01.2022 um 13:25 schrieb Thomas Schwinge: Hi! Maybe I'm just totally confused -- as so often ;-) -- but things seem strange here: On 2022-01-12T10:43:05+0100, Marcel Vollweiler wrote: Currently omp_get_device_num does not work on gcn targets with more than one offload

Re: [PATCH] c++: Further address_compare fixes [PR89074]

2022-01-18 Thread Jason Merrill via Gcc-patches
On 1/18/22 05:17, Jakub Jelinek wrote: On Thu, Jan 13, 2022 at 04:18:33PM -0500, Jason Merrill wrote: Note, address_compare has some special cases, e.g. it assumes that static vars are never adjacent to automatic vars, which is the case for the usual layout where automatic vars are on the stack

Re: [PATCH] c++: Further address_compare fixes [PR89074]

2022-01-18 Thread Jakub Jelinek via Gcc-patches
On Tue, Jan 18, 2022 at 11:25:38AM -0500, Jason Merrill wrote: > > Can you please comment on > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86369#c1 > > then? > > Done. Thanks. > About the rest of the patch, I thought I had seen richi comment on IRC (but > can't find the comment now) that

[PATCH] RISC-V: Fix use-after-free error in `parse_multiletter_ext'

2022-01-18 Thread Maciej W. Rozycki
Avoid undefined arithmetic involving a pointer to a heap allocation that has been freed and move a problematic calculation ahead of the following call to `free' in `riscv_subset_list::parse_multiletter_ext', removing a compilation error: .../gcc/common/config/riscv/riscv-common.cc: In member

[PATCH] c++: DEPENDENT_OPERATOR_TYPE as type of NTTP [PR104074]

2022-01-18 Thread Patrick Palka via Gcc-patches
We're incorrectly rejecting the below testcase during template argument coercion because invalid_nontype_parm_type_p returns true for DEPENDENT_OPERATOR_TYPE. This patch fixes this by partially rewriting invalid_nontype_parm_type_p in terms of WILDCARD_TYPE_P, of which DEPENDENT_OPERATOR_TYPE is

[PATCH] OpenMP, libgomp: Environment variable syntax extension.

2022-01-18 Thread Marcel Vollweiler
Hi, This patch considers the environment variable syntax extension for device-specific variants of environment variables from OpenMP 5.1 (see OpenMP 5.1 specification, p. 75 and p. 639). An environment variable (e.g. OMP_NUM_TEAMS) can have different suffixes: _DEV (e.g. OMP_NUM_TEAMS_DEV):

[PATCH] riscv: fix -Wformat-diag errors.

2022-01-18 Thread Martin Liška
Pushed as pre-approved by Jeff. The patch fixes -Wformat-diag warnings. Martin gcc/ChangeLog: * common/config/riscv/riscv-common.cc (riscv_subset_list::add): Wrap keywords with quotes and remove trailing dots. (riscv_subset_list::parsing_subset_version): Likewise.

Re: [PATCH] riscv: fix -Wformat-diag errors.

2022-01-18 Thread Palmer Dabbelt
On Tue, 18 Jan 2022 08:31:12 PST (-0800), gcc-patches@gcc.gnu.org wrote: Thanks Martin! Yep. Seeing this go by, though, I think there's some English issues with the original messages. I'd write it more like this, but I'm never 100% sure on these things: diff --git

Re: [PATCH] c++: Further address_compare fixes [PR89074]

2022-01-18 Thread Jason Merrill via Gcc-patches
On 1/18/22 11:40, Jakub Jelinek wrote: On Tue, Jan 18, 2022 at 11:25:38AM -0500, Jason Merrill wrote: Can you please comment on https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86369#c1 then? Done. Thanks. About the rest of the patch, I thought I had seen richi comment on IRC (but can't find

[PATCH] libgcc: Align __EH_FRAME_BEGIN__ to pointer size

2022-01-18 Thread H.J. Lu via Gcc-patches
Aligne __EH_FRAME_BEGIN__ to pointer size since gcc/unwind-dw2-fde.h has /* The first few fields of a CIE. The CIE_id field is 0 for a CIE, to distinguish it from a valid FDE. FDEs are aligned to an addressing unit boundary, but the fields within are unaligned. */ struct dwarf_cie {

[PATCH] RISC-V: Document the degree of position independence that medany affords

2022-01-18 Thread Palmer Dabbelt
The code generated by -mcmodel=medany is defined to be position-independent, but is not guaranteed to function correctly when linked into position-independent executables or libraries. See the recent discussion at the psABI specification [1] for more details. It would be better to reject these

Re: [PATCH] RISC-V: Fix use-after-free error in `parse_multiletter_ext'

2022-01-18 Thread Maciej W. Rozycki
On Wed, 19 Jan 2022, Kito Cheng wrote: > LGTM, thanks :) > > > Avoid undefined arithmetic involving a pointer to a heap allocation that > > has been freed and move a problematic calculation ahead of the following > > call to `free' in `riscv_subset_list::parse_multiletter_ext', removing a > >

[committed] libstdc++: Limit new basic_string(nullptr_t) constructor to C++23 [PR104099]

2022-01-18 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux, pushed to trunk. The new deleted constructors added by P2166R1 are a breaking change, making previously valid code ill-formed in C++23. As a result, they should only be defined for C++23 and not for C++11 and up. libstdc++-v3/ChangeLog: PR libstdc++/104099

[PATCH] bpf: ensure correct string offsets in BTF.ext

2022-01-18 Thread David Faust via Gcc-patches
BPF CO-RE relocations contain offsets to strings buffered in the BTF string table. These BTF-specific strings are stored in memory in the CTF auxilliary strtab, which at output time is concatenated onto the end of the standard strtab. Previously, these string offsets were computed at the time the

Re: [PATCH] c++: DEPENDENT_OPERATOR_TYPE as type of NTTP [PR104074]

2022-01-18 Thread Jason Merrill via Gcc-patches
On 1/18/22 11:08, Patrick Palka wrote: We're incorrectly rejecting the below testcase during template argument coercion because invalid_nontype_parm_type_p returns true for DEPENDENT_OPERATOR_TYPE. This patch fixes this by partially rewriting invalid_nontype_parm_type_p in terms of

[committed] analyzer: fix ICE on unary ops folding to casts of constants [PR104089]

2022-01-18 Thread David Malcolm via Gcc-patches
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. Pushed to trunk as r12-6700-g2aefe248aa4160205c44808166393a42031d2dea. gcc/analyzer/ChangeLog: PR analyzer/104089 * region-model-manager.cc (region_model_manager::get_or_create_constant_svalue): Assert that

[pushed] c++: new (nothrow) array cleanup [PR104007]

2022-01-18 Thread Jason Merrill via Gcc-patches
For this testcase, the cleanup that is supposed to happen if initialization throws was wrongly being run on the normal control path as well. This turns out to be because the EH-only handling in gimple_push_cleanup didn't apply to conditional cleanups such as we have for nothrow new, since we

Re: [PATCH] libstdc++: Implement C++20 atomic and atomic

2022-01-18 Thread David Edelsohn via Gcc-patches
This patch introduced new AIX testsuite failures. PR libstdc++/104101 Thanks, David

Re: [PATCH] waccess: Look at calls when tracking clobbers [PR104092]

2022-01-18 Thread Martin Sebor via Gcc-patches
On 1/18/22 06:37, Richard Sandiford wrote: In this PR the waccess pass was fed: D.10779 ={v} {CLOBBER}; VIEW_CONVERT_EXPR(D.10779) = .MASK_LOAD_LANES (addr_5(D), 64B, _2); _7 = D.10779.__val[0]; However, the tracking of m_clobbers only looked at gassigns, so it missed that the

  1   2   >