Re: [PATCH] c++: designated init of char array by string constant [PR55227]

2021-11-17 Thread will wray via Gcc-patches
Thanks for the review Marek; I'll post the updated patch in a follow-on message and on bugzilla. On Mon, Nov 15, 2021 at 8:03 PM Marek Polacek wrote: > I also noticed the C++ FE rejects > > struct A { char x[4]; }; > struct B { struct A a; }; > struct B b = { .a.x = "abc" }; > but the C FE

Re: [PATCH] i386: add alias for f*mul_*ch intrinsics

2021-11-17 Thread Hongtao Liu via Gcc-patches
On Tue, Nov 16, 2021 at 4:35 PM Hongtao Liu wrote: > > On Tue, Nov 16, 2021 at 4:23 PM Kong, Lingling via Gcc-patches > wrote: > > > > Hi, > > > > This patch is to add alias for f*mul_*ch intrinsics. > > > > Ok for master? > This patch just adds some macro definitions (new aliases for > intrinsic

Re: [PATCH] c++: designated init of char array by string constant [PR55227]

2021-11-17 Thread will wray via Gcc-patches
V2 Patch https://gcc.gnu.org/bugzilla/attachment.cgi?id=51828 On Wed, Nov 17, 2021 at 10:06 PM will wray wrote: > > Thanks for the review Marek; > I'll post the updated patch in a follow-on message and on bugzilla. > > On Mon, Nov 15, 2021 at 8:03 PM Marek Polacek wrote: > > > I also noticed the

Re: [PATCH] c++: unqual lookup performed twice w/ template-id ADL [PR102670]

2021-11-17 Thread Jason Merrill via Gcc-patches
On 11/3/21 12:04, Patrick Palka wrote: Here we're incorrectly performing unqualified lookup of 'adl' again at substitution time for the call adl(t) (for which name lookup at parse time found nothing) which causes us to reject the testcase because the second unqualified lookup finds the later-decl

Re: [PATCH] c++: template-id ADL and partial instantiation [PR99911]

2021-11-17 Thread Jason Merrill via Gcc-patches
On 11/10/21 11:53, Patrick Palka wrote: Here when partially instantiating the call get(T{}) with T=N::A (for which earlier unqualified name lookup for 'get' found nothing) the arguments after substitution are no longer dependent but the callee still is, so perform_koenig_lookup postpones ADL. Bu

[PATCH] Reduce cost of aligned sse register store.

2021-11-17 Thread liuhongt via Gcc-patches
Make them be equal to cost of unaligned ones to avoid odd alignment peeling. Impact for SPEC2017 on CLX: fprate: 503.bwaves_rBuildSame 507.cactuBSSN_r -0.22 508.namd_r -0.02 510.parest_r-0.28 511.povray_r-0.20 519.lbm_r BuildSame 521.wrf_r

Re: [PATCH] Fix PR target/103100 -mstrict-align and memset on not aligned buffers

2021-11-17 Thread Andrew Pinski via Gcc-patches
On Wed, Nov 17, 2021 at 1:39 AM Richard Sandiford via Gcc-patches wrote: > > apinski--- via Gcc-patches writes: > > From: Andrew Pinski > > > > The problem here is with -mstrict-align, aarch64_expand_setmem needs > > to check the alginment of the mode to make sure we can use it for > > doing the

[PATCH] Don't allow mask/sse/mmx mov in TLS code sequences.

2021-11-17 Thread liuhongt via Gcc-patches
As change in assembler, refer to [1], this patch disallow mask/sse/mmx mov in TLS code sequences which require integer MOV instructions. [1] https://sourceware.org/git/?p=binutils-gdb.git;a=patch;h=d7e3e627027fcf37d63e284144fe27ff4eba36b5 Bootstrapped and regtested on x86_64-pc-linux-gnu{-m32,}.

Re: [PATCH 4/4] Darwin, Ada : Add loader path as a default rpath.

2021-11-17 Thread Arnaud Charlet via Gcc-patches
> Allow the Ada runtimes to find GCC runtimes relative to their non- > standard install positions. > > gcc/ada/ > * gcc-interface/Makefile.in: Add @loader_path runpaths to the > libgnat and libgnarl shared library builds. OK, thanks.

[PATCH] i386: Fix wrong codegen for -mrelax-cmpxchg-loop

2021-11-17 Thread Hongyu Wang via Gcc-patches
Hi Uros, For -mrelax-cmpxchg-loop introduced by PR 103069/r12-5265, it would produce infinite loop. The correct code should be .L84: movl(%rdi), %ecx movl%eax, %edx orl %esi, %edx cmpl%eax, %ecx jne .L82 lock cmpxchgl %edx, (%r

[PATCH] Fix tree-optimization/103257: Missed jump threading due too early conversion of bool*A into bool?A:0

2021-11-17 Thread apinski--- via Gcc-patches
From: Andrew Pinski So like many optimizations on the gimple level, sometimes it makes sense to do the optimization early or later. In this case, creating a cond expression early causes other optimizations to be missed. So just disable it until canonicalize_math_p () is false. OK? Bootstrapp

Re: [PATCH] Fortran: Mark internal symbols as artificial [PR88009,PR68800]

2021-11-17 Thread Bernhard Reutner-Fischer via Gcc-patches
On Tue, 16 Nov 2021 21:46:32 +0100 Harald Anlauf via Fortran wrote: > Hi Bernhard, > > I'm trying to understand your patch. What does it really try to solve? Compiler generated symbols should be marked artificial. The fix for PR88009 ( f8add009ce300f24b75e9c2e2cc5dd944a020c28 , r9-5194 ) added

[PATCH, rs6000] optimization for vec_reve builtin [PR100868]

2021-11-17 Thread HAO CHEN GUI via Gcc-patches
Hi,   The patch optimized for vec_reve builtin on rs6000. For V2DI and V2DF, it is implemented by xxswapd on all targets. For V16QI, V8HI, V4SI and V4SF, it is implemented by quadword byte reverse plus halfword/word byte reverse when p9_vector is set.   Bootstrapped and tested on powerpc64le-l

Re: [PATCH][GCC] arm: add armv9-a architecture to -march

2021-11-17 Thread Christophe Lyon via Gcc-patches
Hi, Indeed I wasn't asking for a ~partial revert, rather making sure the new behaviour is intended: current GCC trunk won't build with A-profile multilibs unless using trunk binutils. We probably had the same situation when v8-a was introduced, just maybe I wasn't running CI with multilibs enabled

Re: [RFC] c++: Print function template parms when relevant (was: [PATCH v4] c++: Add gnu::diagnose_as attribute)

2021-11-17 Thread Matthias Kretz
On Wednesday, 17 November 2021 07:09:18 CET Jason Merrill wrote: > > - if (CHECKING_P) > > -SET_NON_DEFAULT_TEMPLATE_ARGS_COUNT (a, TREE_VEC_LENGTH (a)); > > + SET_NON_DEFAULT_TEMPLATE_ARGS_COUNT (a, nondefault); > > should have been > > if (CHECKING_P || nondefault != TREE_VEC_LENGTH (a))

Re: [PATCH] x86: Add -mharden-sls=[none|all|return|indirect-branch]

2021-11-17 Thread Uros Bizjak via Gcc-patches
On Tue, Nov 16, 2021 at 7:20 PM H.J. Lu via Gcc-patches wrote: > > Add -mharden-sls= to mitigate against straight line speculation (SLS) > for function return and indirect branch by adding an INT3 instruction > after function return and indirect branch. > > gcc/ > > PR target/102952 >

Re: [PATCH v4 1/1] [ARM] Add support for TLS register based stack protector canary access

2021-11-17 Thread Ramana Radhakrishnan via Gcc-patches
Thanks Ard and Qing. I have been busy with other things in the last few weeks and I don’t work on GCC as part of my day job : however I’ll try to find some time to review this patch set in the coming days. Sorry about the delay. Regards, Ramana From: Ard Biesheuvel Date: Tuesday, 9 November

Re: [PATCH] x86: Add -mindirect-branch-cs-prefix

2021-11-17 Thread Uros Bizjak via Gcc-patches
On Tue, Nov 16, 2021 at 7:51 PM H.J. Lu via Gcc-patches wrote: > > Add -mindirect-branch-cs-prefix to add CS prefix to call and jmp to thunk > via r8-r15 registers when converting indirect call and jump to increase > the instruction length to 6, allowing the non-thunk form to be inlined. > > gcc/

[PATCH] lim: Reset flow sensitive info even for pointers [PR103192]

2021-11-17 Thread Jakub Jelinek via Gcc-patches
Hi! Since 2014 is lim clearing SSA_NAME_RANGE_INFO for integral SSA_NAMEs if moving them from conditional contexts inside of a loop into unconditional before the loop, but as the miscompilation of gimplify.c shows, we need to treat pointers the same, even for them we need to reset whether the poin

[PATCH] libcpp: Fix up handling of block comments in -fdirectives-only mode [PR103130]

2021-11-17 Thread Jakub Jelinek via Gcc-patches
Hi! Normal preprocessing, -fdirectives-only preprocessing before the Nathan's rewrite, and all other compilers I've tried on godbolt treat even \*/ as end of a block comment, but the new -fdirectives-only handling doesn't. Fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux, ok fo

Re: [PATCH 2/6] Add returns_zero_on_success/failure attributes

2021-11-17 Thread Prathamesh Kulkarni via Gcc-patches
On Tue, 16 Nov 2021 at 03:42, David Malcolm wrote: > > On Mon, 2021-11-15 at 12:33 +0530, Prathamesh Kulkarni wrote: > > On Sun, 14 Nov 2021 at 02:07, David Malcolm via Gcc-patches > > wrote: > > > > > > This patch adds two new attributes. The followup patch makes use of > > > the attributes in

[PATCH] ranger: Fix up fold_using_range::range_of_address [PR103255]

2021-11-17 Thread Jakub Jelinek via Gcc-patches
Hi! If on &base->member the offset isn't constant or isn't zero and -fdelete-null-pointer-checks and not -fwrapv-pointer and base has a range that doesn't include NULL, we return the range of the base. Usually it isn't a big deal, because for most pointers we just use varying, range_zero and range

<    1   2