SV: SV: [commited] jit: Support for global rvalue initialization and constructors

2021-12-30 Thread Petter Tomner via Gcc-patches
Oh ye no it is probably terrible missuse trying to write into the constructor. =) Maybe I should look into barring that entrypoint for constructors. Kinda overlooked that rvalue arrays could be used as lvalues. /Petter Från: Antoni Boucher Skickat: den 30 december 2021 02:40 Till: Petter Tomn

[PATCH] libcpp: Fix up ##__VA_OPT__ handling [PR89971]

2021-12-30 Thread Jakub Jelinek via Gcc-patches
Hi! In the following testcase we incorrectly error about pasting / token with padding token (which is a result of __VA_OPT__); instead we should like e.g. for ##arg where arg is empty macro argument clear PASTE_LEFT flag of the previous token if __VA_OPT__ doesn't add any real tokens (which can ha

[PATCH] objc: Fix handling of break stmt inside of switch inside of ObjC foreach [PR103639]

2021-12-30 Thread Jakub Jelinek via Gcc-patches
Hi! The r11-3302-g3696a50beeb73f changes broke the following ObjC testcase. in_statement is either 0 (not in a looping statement), various IN_* flags for various kinds of looping statements (or OpenMP structured blocks) or those flags ored with IN_SWITCH_STMT when a switch appears inside of those

[PATCH] shrink-wrapping: Fix up prologue block discovery [PR103860]

2021-12-30 Thread Jakub Jelinek via Gcc-patches
Hi! The following testcase is miscompiled, because a prologue which contains subq $8, %rsp instruction is emitted at the start of a basic block which contains conditional jump that depends on flags register set in an earlier basic block, the prologue instruction then clobbers those flags. Normally

Re: [PATCH] shrink-wrapping: Fix up prologue block discovery [PR103860]

2021-12-30 Thread Segher Boessenkool
Hi! On Thu, Dec 30, 2021 at 10:43:32AM +0100, Jakub Jelinek wrote: > The following testcase is miscompiled, because a prologue which > contains subq $8, %rsp instruction is emitted at the start of > a basic block which contains conditional jump that depends on > flags register set in an earlier ba

Re: [PATCH] shrink-wrapping: Fix up prologue block discovery [PR103860]

2021-12-30 Thread Jeff Law via Gcc-patches
On 12/30/2021 3:08 AM, Segher Boessenkool wrote: Hi! On Thu, Dec 30, 2021 at 10:43:32AM +0100, Jakub Jelinek wrote: The following testcase is miscompiled, because a prologue which contains subq $8, %rsp instruction is emitted at the start of a basic block which contains conditional jump that

Re: [PATCH] c-family: Use BULTINS_LOCATION for predefined macros changed upon optimize or target pragmas [PR103012]

2021-12-30 Thread Jeff Law via Gcc-patches
On 12/29/2021 3:01 AM, Jakub Jelinek via Gcc-patches wrote: Hi! The following testcases ICE when an optimize or target pragma is followed by a long line (4096+ chars). This is because on such long lines we can't use columns anymore, but the cpp_define calls performed by c_cpp_builtins_optimiz

Re: [PATCH] emit-rtl: Fix a -fcompare-debug issue due to var-tracking [PR103808]

2021-12-30 Thread Jeff Law via Gcc-patches
On 12/29/2021 3:35 AM, Jakub Jelinek wrote: Hi! We get a -fcompare-debug FAIL on the following testcase. The problem is that during cprop we get when a TImode pseudo holding x is being constructed: (debug_insn 111 59 103 7 (var_location:TI D#2 (clobber (const_int 0 [0]))) -1 (nil)) (in

Re: [PATCH] fixed testcase fail gcc.dg/analyzer/pr103526.c leak

2021-12-30 Thread Jeff Law via Gcc-patches
On 12/29/2021 7:21 PM, shi...@iscas.ac.cn wrote: From: LiaoShihua following 'false' branch in line 20, 'tmp.word_state' leaks in line 26. So free 'tmp.word_state' before return 'rval'. gcc/testsuite\ChangeLog: * gcc.dg/analyzer/pr103526.c: Umm, isn't the whole point of t

[RFC PATCH] i386: Introduce V2QImode vectorized arithmetic [PR103861]

2021-12-30 Thread Uros Bizjak via Gcc-patches
This patch adds basic V2QImode infrastructure and V2QImode arithmetic operations (plus, minus and neg). The patched compiler can emit SSE vectorized QImode operations (e.g. PADDB) with partial QImode vector, and also synthesized double HI/LO QImode operations with integer registers. The testcase:

Re: [PATCH] convert (xor (and (xor A B) C) A) to (ior (and A ~C) (and B C)) [PR90323]

2021-12-30 Thread Jeff Law via Gcc-patches
On 12/28/2021 6:27 PM, Xionghu Luo via Gcc-patches wrote: Bootstrapped and regtested on powerpc64le-linux-gnu {P10,P9} powerpc64-linux-gnu {P8, P7} and X86. OK for master? gcc/ChangeLog: PR 90323 * simplify-rtx.c (simplify_context::simplify_binary_operation_1): Relax

Re: [PATCH] libcpp: Fix up ##__VA_OPT__ handling [PR89971]

2021-12-30 Thread Jeff Law via Gcc-patches
On 12/30/2021 2:24 AM, Jakub Jelinek via Gcc-patches wrote: Hi! In the following testcase we incorrectly error about pasting / token with padding token (which is a result of __VA_OPT__); instead we should like e.g. for ##arg where arg is empty macro argument clear PASTE_LEFT flag of the previ

Re: [PATCH] convert (xor (and (xor A B) C) A) to (ior (and A ~C) (and B C)) [PR90323]

2021-12-30 Thread Jakub Jelinek via Gcc-patches
On Thu, Dec 30, 2021 at 09:22:51AM -0700, Jeff Law via Gcc-patches wrote: > On 12/28/2021 6:27 PM, Xionghu Luo via Gcc-patches wrote: > > Bootstrapped and regtested on powerpc64le-linux-gnu {P10,P9} > > powerpc64-linux-gnu {P8, P7} and X86. OK for master? > > > > gcc/ChangeLog: > > > > PR 90

Re: [PATCH] Testsuite: Add btf-dataset option for RISC-V.

2021-12-30 Thread Jeff Law via Gcc-patches
On 12/29/2021 8:02 PM, jiawei wrote: Add -msmall-data-limit option to put global and static data into right section and generate 'btt_info' on RISC-V target. BTF (BPF Type Format) is the metadata format which encodes the debug info related to BPF program/map, more details on: https://www.ker

Re: [PATCH] convert (xor (and (xor A B) C) A) to (ior (and A ~C) (and B C)) [PR90323]

2021-12-30 Thread Jeff Law via Gcc-patches
On 12/30/2021 9:27 AM, Jakub Jelinek wrote: On Thu, Dec 30, 2021 at 09:22:51AM -0700, Jeff Law via Gcc-patches wrote: On 12/28/2021 6:27 PM, Xionghu Luo via Gcc-patches wrote: Bootstrapped and regtested on powerpc64le-linux-gnu {P10,P9} powerpc64-linux-gnu {P8, P7} and X86. OK for master?

Re: [PATCH] regrename: Fix -fcompare-debug issue in find_rename_reg [PR103756]

2021-12-30 Thread Jeff Law via Gcc-patches
On 12/29/2021 3:19 AM, Jakub Jelinek wrote: Hi! The r12-5978 change caused a -fcompare-debug issue, because without -g a chain might start with a noop move, but with -g there could be one or more DEBUG_INSNs in the chain before the noop move and so regrename could make different decisions bet

Re: [PATCH] libiberty: support digits in cpp mangled clone names

2021-12-30 Thread Jeff Law via Gcc-patches
On 12/16/2021 3:40 AM, lsix--- via Gcc-patches wrote: From: Lancelot SIX Currently libiberty fails to demangle the name of cloned functions if the clone-type-identifier contains numbers. This can be observed with the following example: $ cat > ex.cc

Re: [PATCH] aix: handle 64bit inodes for include directories

2021-12-30 Thread David Edelsohn via Gcc-patches
Hi, Jeff Is the revised patch from Clement okay? Thanks, David On Tue, Aug 24, 2021 at 3:59 AM CHIGOT, CLEMENT wrote: > > >>> So my worry here is this is really a host property -- ie, this is > >>> behavior of where GCC runs, not the target for which GCC is generating > >>> code. > >>> > >>> T

Re: [PATCH] Testsuite: Add btf-dataset option for RISC-V.

2021-12-30 Thread Palmer Dabbelt
On Thu, 30 Dec 2021 08:28:34 PST (-0800), gcc-patches@gcc.gnu.org wrote: On 12/29/2021 8:02 PM, jiawei wrote: Add -msmall-data-limit option to put global and static data into right section and generate 'btt_info' on RISC-V target. BTF (BPF Type Format) is the metadata format which encodes the

Re: [PATCH] convert (xor (and (xor A B) C) A) to (ior (and A ~C) (and B C)) [PR90323]

2021-12-30 Thread Segher Boessenkool
On Thu, Dec 30, 2021 at 09:22:51AM -0700, Jeff Law wrote: > On 12/28/2021 6:27 PM, Xionghu Luo via Gcc-patches wrote: > > PR 90323 > > * simplify-rtx.c (simplify_context::simplify_binary_operation_1): > > Relax > > C from constant to constant or reg. > > > >gcc/testsuite/ChangeLog:

Ping^3: [PATCH, rs6000 V2] rotate and mask constants [PR94393]

2021-12-30 Thread Pat Haugen via Gcc-patches
Ping. On 11/22/21 1:38 PM, Pat Haugen via Gcc-patches wrote: > Updated version of the patch. Changes made from original are updated > commentary to hopefully aid readability, no functional changes. > > > Implement more two insn constants. rotate_and_mask_constant covers > 64-bit constants that

Re: [PATCH] aix: handle 64bit inodes for include directories

2021-12-30 Thread Jeff Law via Gcc-patches
On 12/30/2021 9:43 AM, David Edelsohn wrote: Hi, Jeff Is the revised patch from Clement okay? I *think* so.    I don't think it's likely to affect any other system as a host, build or target.   I'm not entirely sure it's right for canadian crosses to/from involving aix, but that seems like

Re: [PATCH] convert (xor (and (xor A B) C) A) to (ior (and A ~C) (and B C)) [PR90323]

2021-12-30 Thread Segher Boessenkool
Hi! On Tue, Dec 28, 2021 at 07:27:06PM -0600, Xionghu Luo wrote: > Bootstrapped and regtested on powerpc64le-linux-gnu {P10,P9} > powerpc64-linux-gnu {P8, P7} and X86. OK for master? > > gcc/ChangeLog: > > PR 90323 > * simplify-rtx.c (simplify_context::simplify_binary_operation_1):

[PATCH 0/3] c++: expr-cast - C-style cast conformance [PR77465]

2021-12-30 Thread Ed Catmur
This patch series improves conformance to the C++ standard for C-style casts (explicit cast notation, [expr.cast]) in two scenarios. First, as discussed in CWG 909 [1], a C-style cast may invoke a user-defined conversion (as a static_cast) followed by a const_cast; currently this is erroneously

[PATCH 1/3] c++: expr-cast - C-style cast conformance [PR77465]

2021-12-30 Thread Ed Catmur
PR c++/77465 - [DR909] rejected C-style cast involving casting away constness from result of conversion operator PR c++/77465 gcc/cp/ChangeLog: * call.c (tourney): (joust): (build_user_type_conversion_1): (reference_binding): (implicit_conversion_

[PATCH 2/3] c++: expr-cast - C-style cast conformance [PR77465]

2021-12-30 Thread Ed Catmur
gcc/cp/ChangeLog: * call.c (reference_binding): gcc/testsuite/ChangeLog: * g++.dg/cpp0x/constexpr-union.C: * g++.dg/warn/Wstrict-aliasing-5.C: * g++.old-deja/g++.jason/rvalue3.C: * g++.dg/conversion/explicit1.C: New test. 0002-Add-const-qualification-to-s

[PATCH 3/3] c++: expr-cast - C-style cast conformance [PR77465]

2021-12-30 Thread Ed Catmur
gcc/testsuite/ChangeLog: * g++.dg/conversion/explicit2.C: New test. * g++.dg/conversion/explicit3.C: New test. 0003-Add-tests-verifying-conformance-to-explicit.patch Description: Binary data

Re: [PATCH] Register --sysroot in the driver switches table

2021-12-30 Thread Olivier Hainque via Gcc-patches
> On 28 Dec 2021, at 17:38, Jeff Law wrote: >> gcc/ >> * gcc.c (driver_handle_option): do_save --sysroot. > OK. Thanks for the prompt review Jeff! I have another simple one coming :)

Re: [PATCH] Set __FLT_EVAL_METHOD__/__FLT_EVAL_METHOD_TS_18661_3__ to FLT_EVAL_METHOD_PROMOTE_TO_FLOAT when FLT_EVAL_METHOD_PROMOTE_TO_FLOAT16.

2021-12-30 Thread Joseph Myers
On Mon, 27 Dec 2021, liuhongt via Gcc-patches wrote: > Since FLT_EVAL_METHOD only accepts negative value, 0, 1 or 2. > > gcc/c-family/ChangeLog: > > PR c/100854 > * c-common.c (excess_precision_mode_join): Return > FLT_EVAL_METHOD_PROMOTE_TO_FLOAT when both x and y are >

Re: Re: [PATCH] Testsuite: Add btf-dataset option for RISC-V.

2021-12-30 Thread 陈嘉炜
> -原始邮件- > 发件人: "Palmer Dabbelt" > 发送时间: 2021-12-31 00:59:08 (星期五) > 收件人: jeffreya...@gmail.com > 抄送: gcc-patches@gcc.gnu.org, jia...@iscas.ac.cn, gcc-patches@gcc.gnu.org, indu.bha...@oracle.com, kito.ch...@sifive.com, yul...@nj.iscas.ac.cn, si...@isrc.iscas.ac.cn, shi...@iscas.ac.cn