[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 check_effective_target_py

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

[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: * co

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 runtime

[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 delet

[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. --- libstdc++-v3/doc/html/manual/status

[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;

[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 template

[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.

[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 se

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 backslash.

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:

[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 attribut

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 I

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 * doc/install

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, Rich

[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 inserti

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

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 thes

[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] 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 +++--- gc

[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 i

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] 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:

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 >

[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,

[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 tha

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 far

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: 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: [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] 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,

[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 o

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

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 "__gom

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 x86_64-unknown

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 dea

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] 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, complain)

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 t

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 acc

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] 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 device

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): affe

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, An

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() noexce

[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 o

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] 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): affe

[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: * gcc.target/powerpc/bfp/s

[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 (aarch64_simd_expand_bui

[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] 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 rea

[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: * testsuite/libgomp.oacc-c++/priv

[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 (nds32_check_isr_at

[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): Like

[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

[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. --- gcc/config/vms/vms-

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

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] 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

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, u

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 a/gcc/common/config/r

[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 con

[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 __cpl

[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 previou

[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. libst

[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 a/libstdc

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 the

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 20

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++: 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 t

[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 fu

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', removin

[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 { uwo

[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 in

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

[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 check

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 clobber

Re: [vect] PR103997: Fix epilogue mode skipping

2022-01-18 Thread Andre Vieira (lists) via Gcc-patches
On 14/01/2022 09:57, Richard Biener wrote: The 'used_vector_modes' is also a heuristic by itself since it registers every vector type we query, not only those that are used in the end ... So it's really all heuristics that can eventually go bad. IMHO remembering the VF that we ended up with (

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 WILDCARD_TYPE

Re: [PATCH] git-backport: support renamed .cc files in commit message.

2022-01-18 Thread Harald Anlauf via Gcc-patches
Am 17.01.22 um 22:26 schrieb Martin Liška: On 1/12/22 16:54, Martin Liška wrote: There's a patch that enhances git-backport so that it updates commit messages for files which name ends now with .cc and is still .c on a branch. The patch has been installed as I've made the renaming now. Chee

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 > > com

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

2022-01-18 Thread Patrick Palka via Gcc-patches
On Tue, Jan 18, 2022 at 5:12 AM Jonathan Wakely wrote: > > 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. Thanks a lot for fixing these! I apparently m

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

2022-01-18 Thread Patrick Palka via Gcc-patches
On Tue, 18 Jan 2022, Patrick Palka wrote: > On Tue, Jan 18, 2022 at 5:12 AM Jonathan Wakely wrote: > > > > 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

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

2022-01-18 Thread Jakub Jelinek via Gcc-patches
On Tue, Jan 18, 2022 at 02:44:34PM -0500, Patrick Palka via Gcc-patches wrote: > On Tue, Jan 18, 2022 at 5:12 AM Jonathan Wakely wrote: > > > > Tested x86_64-linux, pushed to trunk. > > > > > > Instead of hardcoded preprocessor conditionals with explicit target > > checks, just rely on the fact th

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

2022-01-18 Thread Jason Merrill via Gcc-patches
On 1/18/22 13:06, Martin Sebor wrote: 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

[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: write CO-RE relocation record size only once

2022-01-18 Thread David Faust via Gcc-patches
The CO-RE relocation record size should be written only once in the .BTF.ext section, not once for each section with relocations. Tested for bpf-unknown-none, OK to install? Thanks gcc/ChangeLog: * config/bpf/coreout.c (output_btfext_header): Account for 4-byte record size in cor

[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: [committed 2/2] libstdc++: Use GCC's predefined macro for endianness [PR104080]

2022-01-18 Thread Jonathan Wakely via Gcc-patches
On Tue, 18 Jan 2022 at 20:01, Patrick Palka wrote: > On Tue, 18 Jan 2022, Patrick Palka wrote: > > > On Tue, Jan 18, 2022 at 5:12 AM Jonathan Wakely > wrote: > > > > > > Tested x86_64-linux, pushed to trunk. > > > > > > > > > Instead of hardcoded preprocessor conditionals with explicit target >

[committed] analyzer: fix ICE on realloc of zeroed memory [PR104062]

2022-01-18 Thread David Malcolm via Gcc-patches
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. Pushed to trunk as r12-6699-g79e746bb05e432dcd1c18161469272d67c33d79d. gcc/analyzer/ChangeLog: PR analyzer/104062 * region-model-manager.cc (region_model_manager::maybe_fold_sub_svalue): Avoid casting to

[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

[PATCH v2] bpf: write CO-RE relocation record size only once

2022-01-18 Thread David Faust via Gcc-patches
[Changed from v1: Adjust to account for file renaming so patch applies.] The CO-RE relocation record size should be written only once in the .BTF.ext section, not once for each section with relocations. Tested for bpf-unknown-none. OK to install? Thanks. gcc/ChangeLog: * config/bpf/core

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

2022-01-18 Thread David Faust via Gcc-patches
[Changed from v1: Adjust to account for file renaming so patch applies.] 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 standar

Re: [PATCH v2] bpf: write CO-RE relocation record size only once

2022-01-18 Thread Jose E. Marchesi via Gcc-patches
Hi David. > [Changed from v1: Adjust to account for file renaming so patch applies.] > > The CO-RE relocation record size should be written only once in the > .BTF.ext section, not once for each section with relocations. > > Tested for bpf-unknown-none. OK to install? This is OK. Thanks for the

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

2022-01-18 Thread Jose E. Marchesi via Gcc-patches
Hi David. > [Changed from v1: Adjust to account for file renaming so patch applies.] > > 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

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

2022-01-18 Thread Segher Boessenkool
On Tue, Jan 18, 2022 at 11:57:32AM +, Richard Sandiford wrote: > "Kewen.Lin" writes: > >>PR tree-optimization/104015 > >>* gcc.dg/vect/slp-perm-9.c: Adjust. > >>* gcc.target/powerpc/pr104015-1.c: New test. > >>* gcc.target/powerpc/pr104015-2.c: New test. > OK for the target-in

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

2022-01-18 Thread Segher Boessenkool
Hi! On Tue, Jan 18, 2022 at 12:51:39PM +0100, Sebastian Huber wrote: > For some CPUs, the assembler machine directive cannot be determined by ISA > flags. That may be the best we can do here, with the current setup, yes. > PR 104090/target > * config/rs6000/rs6000.cc (rs6000_machine_

  1   2   >