[PATCH] c++, v2: Fix up floating point complex handling in build_zero_init_1 [PR98353]

2020-12-22 Thread Jakub Jelinek via Gcc-patches
On Tue, Dec 22, 2020 at 09:56:03AM -0500, Jason Merrill via Gcc-patches wrote: > > Not exactly sure why we just don't call build_zero_cst (type); for the > > > scalar types > > I don't know either. Want to test that? The following passed bootstrap/regtested on x86_64-linux and i686-linux too.

Re: [PATCH] ira: Skip some pseudos in move_unallocated_pseudos

2020-12-22 Thread Kewen.Lin via Gcc-patches
Hi Segher, on 2020/12/22 下午9:55, Segher Boessenkool wrote: > Hi! > > Just a dumb formatting comment: > > On Tue, Dec 22, 2020 at 04:05:39PM +0800, Kewen.Lin wrote: >> This patch is to make move_unallocated_pseudos consistent >> to what we have in function find_moveable_pseudos, where we >>

[RFC] Enable CET in libffi

2020-12-22 Thread H.J. Lu via Gcc-patches
Hi, I have 2 patches to enable CET in libffi on users/hjl/cet/master branch at: https://gitlab.com/x86-gcc/gcc/-/commits/users/hjl/cet/master They use FFI_EXEC_TRAMPOLINE_TABLE to avoid changing libffi ABI. I tested it on Tiger Lake with CC="cc" CXX="g++"

Ping ^ 3: [PATCH 3/4] rs6000: Enable vec_insert for P8 with rs6000_expand_vector_set_var_p8

2020-12-22 Thread Xionghu Luo via Gcc-patches
Ping^3 for stage 3. And this followed patch: [PATCH 4/4] rs6000: Update testcases' instruction count. Thanks:) On 2020/12/3 22:16, Xionghu Luo via Gcc-patches wrote: Ping. Thanks. On 2020/11/27 09:04, Xionghu Luo via Gcc-patches wrote: Hi Segher, Thanks for the approval of [PATCH 1/4] and

[PR97714] final: accept markers at line 0

2020-12-22 Thread Alexandre Oliva via Gcc-patches
Back when I introduced debug markers, I seem to have been under the impression that location line 0 would only ever occur for unknown and builtin locations. Though line 0 never comes up in normal processing of source files, and debug info formats often cannot represent them, I suppose there's

RE: Optimize combination of comparisons to dec+compare

2020-12-22 Thread Eugene Rozenfeld via Gcc-patches
Re-sending my question and re-attaching the patch. Richard, can you please clarify your feedback? Thanks, Eugene -Original Message- From: Gcc-patches On Behalf Of Eugene Rozenfeld via Gcc-patches Sent: Tuesday, December 15, 2020 2:06 PM To: Richard Biener Cc: gcc-patches@gcc.gnu.org

Re: C++ 20 modules

2020-12-22 Thread Gerald Pfeifer
On Mon, 21 Dec 2020, Nathan Sidwell wrote: > Yes, this is good. I already managed to commit some of this with > the 98412 patch. I wasn't sure, but seeing that you had not applied this, I figured this was approval and pushed the remaining portion this afternoon, per the below. Gerald PS: I am

Go patch committed: Initialize saw_send_stmt locals

2020-12-22 Thread Ian Lance Taylor via Gcc-patches
This patch to the Go frontend initializes a couple of saw_send_stmt local variables that were incorrectly left uninitialized. These are variables in the compiler source, not in the generated code. The C++ compiler wasn't warning because we take their address. This fixes

Go patch committed: Eliminate the scase.kind field

2020-12-22 Thread Ian Lance Taylor via Gcc-patches
This patch to the Go frontend and libgo eliminates the scase.kind field, saving some space on the stack when running a select statement. Instead of using a kind, the compiler now sorts all the send cases before the receive cases, and gives the default case a special index of -1. This is in

make FOR_EACH_IMM_USE_STMT safe for early exits (was: Re: move sincos after pre)

2020-12-22 Thread Alexandre Oliva
On Oct 28, 2020, Richard Biener wrote: >> BTW, any reason why we are not (yet?) using something like: >> >> #define FOR_EACH_IMM_USE_STMT(STMT, ITER, SSAVAR) \ >> for (auto_end_imm_use_stmt_traverse auto_end \ >> STMT) = first_imm_use_stmt (&(ITER),

g++.dg/tls/pr79288.C: Skip on vxworks_kernel (TLS model not supported)

2020-12-22 Thread Alexandre Oliva
The only TLS model supported in VxWorks kernel mode is local-exec. Regstrapped on x86_64-linux-gnu, and tested with -x-arm-wrs-vxworks7r2. Ok to install? from Jerome Lambourg for gcc/testsuite/ChangeLog * g++.dg/tls/pr79288.C: Skip on vxworks_kernel (TLS model not

compile gcc.target/arm/{pr78255-2.c, memset-inline-2.c} with -mno-long-calls

2020-12-22 Thread Alexandre Oliva
If the target is configured such that -mlong-call is passed by default, the function calls these tests are trying to detect by scanning the assembly file are performed using long calls, like so: | foo: | @ memset-inline-2.c:12: memset (a, -1, 14); | mov r2, #14 @,

disable some aapcs/vfp*.c test if not arm_fp16_alternative_ok

2020-12-22 Thread Alexandre Oliva
The tests use -mfp16-format=alternative, and so should not be run if that option isn't supported. Regstrapped on x86_64-linux-gnu, and tested with -x-arm-wrs-vxworks7r2. Ok to install? from Joel Brobecker for gcc/testsuite/ChangeLog * lib/target-supports.exp

Fix testsuite/g++.old-deja/g++.mike/p658.C build failure on VxWorks RTP

2020-12-22 Thread Alexandre Oliva
The conflicting definition of OK is present in VxWorks RTP headers too. Regstrapped on x86_64-linux-gnu, and tested with -x-arm-wrs-vxworks7r2. Ok to install? from Jerome Lambourg for gcc/testsuite/ChangeLog * g++.old-deja/g++.mike/p658.C: Also undefine OK on VxWorks RTP. ---

Fix testsuite/g++.dg/opt/20050511-1.C compilation error on VxWorks 7

2020-12-22 Thread Alexandre Oliva
In VxWorks 7, UINT32 is defined in both modes, kernel and rtp. Adjust the work around accordingly. Regstrapped on x86_64-linux-gnu, and tested with -x-arm-wrs-vxworks7r2. Ok to install? from Jerome Lambourg for gcc/testsuite/ChangeLog * g++.dg/opt/20050511-1.C: Work around UINT32

Fix testsuite/g++.dg/cpp1y/constexpr-66093.C execution failure...

2020-12-22 Thread Alexandre Oliva
The constexpr iteration dereferenced an array element past the end of the array. Regstrapped on x86_64-linux-gnu, and tested with -x-arm-wrs-vxworks7r2. Ok to install? from Jerome Lambourg for gcc/testsuite/ChangeLog * g++.dg/cpp1y/constexpr-66093.C: Fix bounds issue. ---

Skip testsuite/g++.old-deja/g++.pt/const2.C on vxworks_kernel

2020-12-22 Thread Alexandre Oliva
Linking in vxworks kernel-mode is partial linking, so missing symbols are not detected. Regstrapped on x86_64-linux-gnu, and tested with -x-arm-wrs-vxworks7r2. Ok to install? from Jerome Lambourg for gcc/testsuite/ChangeLog * g++.old-deja/g++.pt/const2.C: Skip on vxworks kernel.

Remove VxWorks-specific test directives in g++.dg/warn/miss-format-1.C

2020-12-22 Thread Alexandre Oliva
These are no longer applicable. Regstrapped on x86_64-linux-gnu, and tested with -x-arm-wrs-vxworks7r2. Ok to install? from Jerome Lambourg for gcc/testsuite/ChangeLog * g++.dg/warn/miss-format-1.C: Remove vxworks-specific test directives. ---

Undefine ERROR in g++.dg/tree-ssa/copyprop.C

2020-12-22 Thread Alexandre Oliva
VxWorks headers define ERROR as a macro, which conflicts with the use in the test. Regstrapped on x86_64-linux-gnu, and tested with -x-arm-wrs-vxworks7r2. Ok to install? from Jerome Lambourg for gcc/testsuite/ChangeLog * g++.dg/tree-ssa/copyprop.C: Undefine ERROR if defined. ---

skip testsuite/g++.dg/other/anon5.C on vxworks_kernel targets

2020-12-22 Thread Alexandre Oliva
The vxworks kernel-mode linking is partial linking, so it cannot detect missing symbols. Regstrapped on x86_64-linux-gnu, and tested with -x-arm-wrs-vxworks7r2. Ok to install? from Jerome Lambourg for gcc/testsuite/ChangeLog * g++.dg/other/anon5.C: Skip on vxworks kernel. ---

fix testsuite/g++.dg/init/new26.C for C++-14 and later

2020-12-22 Thread Alexandre Oliva
This test fails during the execution on VxWorks 7 when using C++-14 and C++-17. Regstrapped on x86_64-linux-gnu, and tested with -x-arm-wrs-vxworks7r2. Ok to install? from Jerome Lambourg for gcc/testsuite/ChangeLog * g++.dg/init/new26.C: Fix overriding of the delete operator

Account for VxWorks headers in libstdc++ test on names

2020-12-22 Thread Alexandre Oliva
Undefine various macros unexpectedly defined by VxWorks headers. Regstrapped on x86_64-linux-gnu, and tested with -x-arm-wrs-vxworks7r2. Ok to install? from Olivier Hainque for libstdc++-v3/ChangeLog * testsuite/17_intro/names.cc: Account for VxWorks headers. ---

Add conditions on VxWorks versions for gcc.dg/vxworks/initpri?.c

2020-12-22 Thread Alexandre Oliva
Adjust vxworks initpri expectations, given that vxworks7 has switched to .init_array. Regstrapped on x86_64-linux-gnu, and tested with -x-arm-wrs-vxworks7r2. Ok to install? from Jerome Lambourg for gcc/testsuite/ChangeLog * gcc.dg/vxworks/initpri1.c: Tigthen VxWorks version check.

gcc.dg/intmax_t-1.c compiles without error on VxWorks 7 SR06x0

2020-12-22 Thread Alexandre Oliva
This test currently fails on VxWorks 7 SR06x0 targets when in kernel mode, because it expects a discrepancy between built-in and system intmax_t for all VxWorks targets when in kernel mode. Fortunately, this has now been fixed when targetting VxWorks 7 SR06x0, so this commit adjusts the

Fix VxWorks xfail filters on pthread-init-?.c

2020-12-22 Thread Alexandre Oliva
Match xfail on kernel instead of rtp mode. Regstrapped on x86_64-linux-gnu, and tested with -x-arm-wrs-vxworks7r2. Ok to install? from Olivier Hainque for gcc/testsuite/changeLog * gcc.dg/pthread-init-1.c: Fix the VxWorks xfail filters. * gcc.dg/pthread-init-2.c: Ditto. ---

Add missing vxworks filters to lib/target-supports.exp functions

2020-12-22 Thread Alexandre Oliva
Explicitly disable some vxworks-missing features in the testsuite, that the current feature tests detect as present. Regstrapped on x86_64-linux-gnu, and tested with -x-arm-wrs-vxworks7r2. Ok to install? from Olivier Hainque for gcc/testsuite/ChangeLog * lib/target-supports.exp

Split wchars tests from the normal variant

2020-12-22 Thread Alexandre Oliva
This change extracts apart the wchar specific parts of character conversion tests to allow conditonalizating these parts on actual wchar support while applying the rest more generally. This turned out useful during our work on the libstdc++ support for VxWorks, to expose the problematic areas

mark some tests in gcc.target/arm as requiring "fpic" support

2020-12-22 Thread Alexandre Oliva
Require effective target fpic support in tests using pic flags. Regstrapped on x86_64-linux-gnu, and tested with -x-arm-wrs-vxworks7r2. I understand we have pre-approval for the addition of such pic requirement markers, so I'm going to give this some 24 hours for any objections to be raised,

Add conditional include of vxWorks.h for kernel mode

2020-12-22 Thread Alexandre Oliva
In kernel mode, an application must include vxWorks.h before any other system header, this patch adds exactly that to the test that were failing due to a missing declaration that was found in vxWorks.h. Regstrapped on x86_64-linux-gnu, and tested with -x-arm-wrs-vxworks7r2. Ok to install?

Add dg-require-wchars to libstdc++ testsuite

2020-12-22 Thread Alexandre Oliva
Some tests uses structures from the libstdc++ that are present only if the target has a wchar.h header. However, those tests do not check that the target supports those constructs before executing the tests. The function dg-require-wchars checks that "_GLIBCXX_USE_WCHAR_T" is defined by the

Re: [PATCH v2] C++ : Add the -stdlib= option.

2020-12-22 Thread Jason Merrill via Gcc-patches
On 12/22/20 3:39 PM, Iain Sandoe wrote: Hi Jason, Jason Merrill wrote: On 11/11/20 3:58 PM, Iain Sandoe wrote: This option allows the user to specify alternate C++ runtime libraries, for example when a platform uses libc++ as the installed C++ runtime. It is the same spelling as a clang

testsuite: C++ module tests

2020-12-22 Thread Nathan Sidwell
This adds most of the modules tests. I do not include the tests that excercise system & C++ library header files. Those will be later. gcc/testsuite/ * g++.dg/modules/*: Many tests. -- Nathan Sidwell tests.diff.gz Description: application/gzip

c++: Module ICE fix

2020-12-22 Thread Nathan Sidwell
A missing check for decl lang specific has madeitself apparent. gcc/cp/ * module.cc (has_definition): Check DECL_LANG_SPECIFIC. (test in the next uber-patch) -- Nathan Sidwell diff --git i/gcc/cp/module.cc w/gcc/cp/module.cc index ed3dbe244a3..19fe66346bd 100644 ---

[PATCH v2] C++ : Add the -stdlib= option.

2020-12-22 Thread Iain Sandoe
Hi Jason, Jason Merrill wrote: > On 11/11/20 3:58 PM, Iain Sandoe wrote: >> This option allows the user to specify alternate C++ runtime libraries, >> for example when a platform uses libc++ as the installed C++ runtime. >> It is the same spelling as a clang option that allows that to use

libgo patch committed: Add a success field to the sudog structure

2020-12-22 Thread Ian Lance Taylor via Gcc-patches
This libgo patch adds a success field to the sudog structure used to manage select statements. This is a step toward enabling some compiler changes as part of upgrading to the Go 1.16beta1 release. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian

libgo patch committed: Omit nil-channel cases from selectgo order slices

2020-12-22 Thread Ian Lance Taylor via Gcc-patches
This patch to libgo omits the nil-channel cases from the order slices used in the selectgo function. This is a simplification for future work. This is being brought in here as part of updating to the Go 1.16beta1 release. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to

Go patch committed: Remove the scase.releasetime field

2020-12-22 Thread Ian Lance Taylor via Gcc-patches
This patch to the Go frontend and libgo removes the scase.releasetime field. This is a step toward updating libgo to the Go1.16beta1 release. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian 9f5d0bc8ace6b8d386ed40fd8ff904251912be5c diff --git

Re: [PATCH v3] arm: subdivide the type attribute "alu_shfit_imm"

2020-12-22 Thread Richard Sandiford via Gcc-patches
"Qian, Jianhua" writes: > Hi Richard > > Thanks for reviewing again. > I have updated the patch to v3. Thanks, pushed to master now that the copyright assignment is on file. Richard

Re: [PATCH] Add pytest for a GCOV test-case

2020-12-22 Thread David Malcolm via Gcc-patches
On Tue, 2020-12-22 at 12:39 +0100, Martin Liška wrote: > Hello. > > The patch adds a new test for an existing GCOV test-case. Newly > added run-gcov-pytest parses JSON format produced by GCOV and > runs pytest on it. > > Patch can bootstrap on x86_64-linux-gnu and survives regression > tests.

Re: [PATCH] c++: Handle array members in build_comparison_op [PR93480]

2020-12-22 Thread Jason Merrill via Gcc-patches
On 12/21/20 3:12 AM, Jakub Jelinek wrote: Hi! http://eel.is/c++draft/class.compare.default#6 says for the expanded list of subobjects: "In that list, any subobject of array type is recursively expanded to the sequence of its elements, in the order of increasing subscript." but

[PATCH] i386: Fix __builtin_floor with FE_DOWNWARD rounding direction [PR96793]

2020-12-22 Thread Uros Bizjak via Gcc-patches
x86_expand_floorceil expander uses x86_sse_copysign_to_positive, which is unable to change the sign from - to +. When FE_DOWNWARD rounding direction is in effect, the expanded sequence that involves subtraction can trigger x - x = -0.0 special rule. x86_sse_copysign_to_positive fails to change

Re: [RFC] Run pass_sink_code once more after ivopts/fre

2020-12-22 Thread Richard Biener
On December 21, 2020 10:03:43 AM GMT+01:00, Xiong Hu Luo wrote: >Here comes another case that requires run a pass once more, as this is >not the common suggested direction to solve problems, not quite sure >whether it is still a reasonble fix here. Source code is something >like: > >ref = ip +

Re: [PATCH][DOC] Document my changes in GCC 11.

2020-12-22 Thread Jonathan Wakely via Gcc-patches
On Tue, 22 Dec 2020 at 14:55, Martin Liška wrote: > > On 12/22/20 1:54 PM, Jonathan Wakely wrote: > > That seems good to me, but I think this reads a little better: "The > > GCOV data file format outputs smaller files by representing zero > > counters in a more compact way." ", > > All right.

Re: [PATCH] c++: Fix up floating point complex handling in build_zero_init_1 [PR98353]

2020-12-22 Thread Jason Merrill via Gcc-patches
On 12/21/20 6:10 PM, Jakub Jelinek wrote: Hi! While the gimplifier patch I've just committed fixed an ICE, in some cases like on the committed testcase cp folding doesn't happen after build_zero_init_1 because it is called already during gimplification. Not exactly sure why we just don't call

Re: [PATCH][DOC] Document my changes in GCC 11.

2020-12-22 Thread Martin Liška
On 12/22/20 1:54 PM, Jonathan Wakely wrote: That seems good to me, but I think this reads a little better: "The GCOV data file format outputs smaller files by representing zero counters in a more compact way." ", All right. Thank you for all the suggestions and I have the following now: diff

Re: [PATCH] ira: Skip some pseudos in move_unallocated_pseudos

2020-12-22 Thread Segher Boessenkool
Hi! Just a dumb formatting comment: On Tue, Dec 22, 2020 at 04:05:39PM +0800, Kewen.Lin wrote: > This patch is to make move_unallocated_pseudos consistent > to what we have in function find_moveable_pseudos, where we > record the original pseudo into pseudo_replaced_reg only if > validate_change

Re: Add libcody

2020-12-22 Thread Sebastian Huber
On 21/12/2020 20:47, Nathan Sidwell wrote: On 12/21/20 1:23 PM, Sebastian Huber wrote: Hello Nathan, ../../gnu-mirror-gcc-cf22f78/gcc/../libcody/cody.hh:24: In file included from /usr/include/c++/v1/memory:654: /usr/include/c++/v1/typeinfo:231:5: error: no member named 'fancy_abort' in

Re: [PATCH][DOC] Document my changes in GCC 11.

2020-12-22 Thread Jonathan Wakely via Gcc-patches
On Tue, 22 Dec 2020 at 12:01, Martin Liška wrote: > > On 12/22/20 12:46 PM, Jonathan Wakely wrote: > > On Tue, 22 Dec 2020 at 08:29, Martin Liška wrote: > >> > >> Hello. > >> > >> May I please ask a native speaker for a correction of my wording? > >> > >> Thanks, > >> Martin > >> > >> --- > >>

Re: [PATCH][DOC] Document my changes in GCC 11.

2020-12-22 Thread Martin Jambor
On Tue, Dec 22 2020, Martin Liška wrote: > On 12/22/20 12:46 PM, Jonathan Wakely wrote: >> On Tue, 22 Dec 2020 at 08:29, Martin Liška wrote: [...] >>> + >>> + >>> +New command-line options: >>> + >>> +>>

Re: [PATCH][DOC] Document my changes in GCC 11.

2020-12-22 Thread Martin Liška
On 12/22/20 12:46 PM, Jonathan Wakely wrote: On Tue, 22 Dec 2020 at 08:29, Martin Liška wrote: Hello. May I please ask a native speaker for a correction of my wording? Thanks, Martin --- htdocs/gcc-11/changes.html | 28 1 file changed, 28 insertions(+)

Re: [PATCH][DOC] Document my changes in GCC 11.

2020-12-22 Thread Jonathan Wakely via Gcc-patches
On Tue, 22 Dec 2020 at 08:29, Martin Liška wrote: > > Hello. > > May I please ask a native speaker for a correction of my wording? > > Thanks, > Martin > > --- > htdocs/gcc-11/changes.html | 28 > 1 file changed, 28 insertions(+) > > diff --git

Re: [PATCH][DOC] Document my changes in GCC 11.

2020-12-22 Thread Gerald Pfeifer
On Tue, 22 Dec 2020, Martin Liška wrote: > May I please ask a native speaker for a correction of my wording? That excludes myself ;), but let me give it a pass, and perhaps you can then post an updated patch (for Jonathan or another native speaker to go through)? > + New warning

[PATCH] Add pytest for a GCOV test-case

2020-12-22 Thread Martin Liška
Hello. The patch adds a new test for an existing GCOV test-case. Newly added run-gcov-pytest parses JSON format produced by GCOV and runs pytest on it. Patch can bootstrap on x86_64-linux-gnu and survives regression tests. Ready to be installed? Thanks, Martin gcc/testsuite/ChangeLog:

Re: [patch] libstdc++/testsuite: Tweak dg-prune-output regex for out-of-tree contexts

2020-12-22 Thread Olivier Hainque
> On 21 Dec 2020, at 12:40, Jonathan Wakely wrote: >> Probably more robust, I agree. This still works >> both with build tree (tested on mainline) and install >> tree (tested on our gcc-10 branch). >> >> Same ChangeLog. > > OK to commit like that then, thanks. Sure, will do. Thanks for

Re: The defaulted default constructor defined as deleted when one of variant member has a default member initializer

2020-12-22 Thread Jakub Jelinek via Gcc-patches
On Tue, Dec 22, 2020 at 03:57:56PM +0800, jim x via Gcc-patches wrote: > struct A{ > A(){} > }; > union C{ >A a; >int b = 0; > }; > int main(){ > C c; > } > > GCC reports the default constructor for union `C` is defined as > deleted. However, the relevant rule in the current c++

[PATCH] libstdc++: gdb pretty printer fails from c frame

2020-12-22 Thread Rae Kim via Gcc-patches
Pretty prining c++ object from c frame fails with python exception. The bug filed in gdb bugzilla shows very simple example. - https://sourceware.org/bugzilla/show_bug.cgi?id=27021 main.cc: #include #include std::map foo_map; int main() { foo_map[1] =

[PATCH][DOC] Document my changes in GCC 11.

2020-12-22 Thread Martin Liška
Hello. May I please ask a native speaker for a correction of my wording? Thanks, Martin --- htdocs/gcc-11/changes.html | 28 1 file changed, 28 insertions(+) diff --git a/htdocs/gcc-11/changes.html b/htdocs/gcc-11/changes.html index 1a9e72c1..badc9e12 100644 ---

[PATCH] rs6000: Use rldimi for vec init instead of shift + ior

2020-12-22 Thread Kewen.Lin via Gcc-patches
Hi, This patch is to make unsigned int vector init go with rldimi to merge two integers instead of shift and ior. I tried to use nonzero_bits in md file to make it more general, but the testing shows it isn't doable. The reason is that some passes would replace some pseudos with other pseudos

[PATCH] ira: Skip some pseudos in move_unallocated_pseudos

2020-12-22 Thread Kewen.Lin via Gcc-patches
Hi, This patch is to make move_unallocated_pseudos consistent to what we have in function find_moveable_pseudos, where we record the original pseudo into pseudo_replaced_reg only if validate_change succeeds with newreg. To ensure every unallocated pseudo in move_unallocated_pseudos has expected