[PATCH] Fix invalid RTL sharing caused by STV changes

2019-08-21 Thread Richard Biener
I am testing the following and will commit it as obvious. Richard. 2019-08-21 Richard Biener PR target/91498 * config/i386/i386-features.c (general_scalar_chain::make_vector_copies): Copy stack temporary rtx when using it multiple times. (general_scal

Re: [PATCH] Add MD Function type check for builtin_md vectorize

2019-08-21 Thread Richard Biener
On Tue, 20 Aug 2019, Xiong Hu Luo wrote: > The DECL_MD_FUNCTION_CODE added in r274404(PR 91421) by rsandifo requires that > DECL to be a BUILTIN_IN_MD class built-in, asserts will happen when lto > as the patch r274411(PR 91287) outputs some math function symbol to the > object, > this patch will

[PATCH, PR d/90446] Committed fix for segfault in build_function_type at gcc/tree.c:8539

2019-08-21 Thread Iain Buclaw
Hi, This patch fixes a segmentation fault in the D front-end when handling built-in types that are PSImode. D does not have the notion of integer types to be of any size other than the fixed-sized byte, short, int, long, and cent types, however integer types with non-standard sizes are still matc

[PATCH, PR d/90445] Committed fix for ICE in d_build_c_type_nodes, at d/d-builtins.cc:783

2019-08-21 Thread Iain Buclaw
Hi, This patch fixes another ICE in the D front-end that occurred on targets where SIZE_TYPE was unhandled by d_build_c_type_nodes. Now signed_type_for() is used to set signed_size_type_node, and (u)intmax_type_node is determined by UINTMAX_TYPE. Bootstrapped and regression tested the D testsuit

[PATCH, d] Committed merge with upstream dmd 375ed10aa

2019-08-21 Thread Iain Buclaw
Hi, This patch merges the dmd frontend implementation with upstream dmd 375ed10aa. This allows the frontend to be able to compile on targets where the pointer size is 16-bits. Bootstrapped and regression tested the D testsuite on x86_64-linux-gnu, with further checking done on msp430-elf cross-c

[PATCH, PR d/88722] Partially fix ICE: in register_moduleinfo, at d/modules.cc:40

2019-08-21 Thread Iain Buclaw
Hi, This patch turns an ICE into a sorry() error. Not marking the PR as fixed, as an implementation of ModuleInfo code generation should be worked out when named section support is not present on the target. Bootstrapped and regression tested the D testsuite on x86_64-linux-gnu, with further che

[PATCH PR d/91339] Committed merge with upstream dmd b37a537d3

2019-08-21 Thread Iain Buclaw
Hi, This patch merges the dmd frontend implementation with upstream dmd b37a537d3. Fixes PR d/91339, in which an error: cannot find source code for runtime library file 'object.d' occurred when the path contained a '~'. Bootstrapped and regression tested the D testsuite on x86_64-linux-gnu. Com

[PATCH, libphobos] Committed merge with upstream phobos 66ae77ac3

2019-08-21 Thread Iain Buclaw
Hi, This patch merges the libphobos library with upstream phobos 66ae77ac3. Finishes off build support for phobos on musl targets. Bootstrapped and regression tested on x86_64-linux-gnu and x86_64-linux-musl. Committed to trunk as r274770. -- Iain --- diff --git a/libphobos/src/MERGE b/libphob

[PATCH, PR d/90444] Committed fix for ICE in d_init_builtins, at d/d-builtins.cc:1121

2019-08-21 Thread Iain Buclaw
Hi, This patch fixes an ICE in the D front-end that occurred in some specific targets where va_list is an anonymous RECORD_TYPE, such as mips -mabi=eabi. These are now built as its equivalent D type, and exposed in the gcc.builtins module. Bootstrapped and regression tested the D testsuite on x8

[Ada] Missing attribute update in new_copy_tree

2019-08-21 Thread Pierre-Marie de Rodat
The compiler crashes processing an internally generated cloned tree that has a subprogram call with a named actual parameter. Tested on x86_64-pc-linux-gnu, committed on trunk 2019-08-21 Javier Miranda gcc/ada/ * sem_util.adb (Update_Named_Associations): Update First_Named_Ac

[Ada] Max_Entry_Queue_Length aspect for protected entries

2019-08-21 Thread Pierre-Marie de Rodat
Allow values of negative one to be accepted as a valid parameter as a special case. Tested on x86_64-pc-linux-gnu, committed on trunk 2019-08-21 Justin Squirek gcc/ada/ * doc/gnat_rm/implementation_defined_pragmas.rst: Modify documentation to reflect expected behavior.

[Ada] Ignore subprogram address in ownership checking

2019-08-21 Thread Pierre-Marie de Rodat
Ownership checking done as in GNATprove should ignore address of subprograms, as it applies only on objects. Now fixed. There is no impact on compilation. Tested on x86_64-pc-linux-gnu, committed on trunk 2019-08-21 Yannick Moy gcc/ada/ * sem_spark.adb (Process_Path): Do nothing on

[Ada] Undefined master in task with limited class-wide aliased entry formal

2019-08-21 Thread Pierre-Marie de Rodat
In the case of a task declaring an entry with an aliased formal parameter of a limited class-wide type, the front end was creating a master object (_master) for the access type generated for such an entry formal inside the task specification, even though such access types don't need an associated m

[Ada] Fix type mismatch in extended return statement expansion

2019-08-21 Thread Pierre-Marie de Rodat
This fixes a (sub)type mismatch in the expansion of an extended return statement generated for a built-in-place function that doesn't need a BIP_Alloc_Form parameter but returns unconstrained. No functional changes. Tested on x86_64-pc-linux-gnu, committed on trunk 2019-08-21 Eric Botcazou g

[Ada] More precise propagation of Size attribute in generic instances

2019-08-21 Thread Pierre-Marie de Rodat
GNATprove analyzer for SPARK code depends on the frontend to accurately propagate the known value of Size attribute. This was not done for formal type parameters in generic instantiations. Now fixed. There is no impact on compilation. Tested on x86_64-pc-linux-gnu, committed on trunk 2019-08-21

[Ada] Fix assertion failure on derived private protected type

2019-08-21 Thread Pierre-Marie de Rodat
This fixes an assertion failure on the instantiation of a generic package on a type derived from the private view of a protected type, ultimately caused by Finalize_Address returning Empty for the subtype built for the generic actual type of the instantiation. Finalize_Address has a special proces

[Ada] Improve detection of end of the process by GNAT.Expect

2019-08-21 Thread Pierre-Marie de Rodat
'read' system call may be interrupted by signal with 'errno' is set to EINTER. In this case, re-try a few times. Tested on x86_64-pc-linux-gnu, committed on trunk 2019-08-21 Vadim Godunko gcc/ada/ * libgnat/g-expect.adb (Expect_Internal): Attempt to read several times when 'r

[Ada] More complete information level for -gnatR4 output

2019-08-21 Thread Pierre-Marie de Rodat
This instructs -gnatR4 to also list the Etype of components in user-declared record types if it is compiler-generated, for example in: package P3 is type idx is range 1 .. 100; type Arr is array (Idx range <>) of Character; type Rec is record C : Arr (1 .. 5); end record;

[Ada] Do not rewrite argument of pragma Entry_Queue_Length in analysis

2019-08-21 Thread Pierre-Marie de Rodat
It was unusual for the analysis phase of compiler to rewrite static expression of pragma Entry_Queue_Length with its value. This typically happens when expanding the AST and only if needed for a given backend. In particular, GNATprove doesn't need such an expansion and actually needs the unrewritte

[Ada] Avoid spurious error in GNATprove mode on non-null access types

2019-08-21 Thread Pierre-Marie de Rodat
GNATprove directly handles non-null access checks, and requires that the frontend does not insert explicit checks in the form of conditional exceptions being raised. Now fixed. There is no impact on compilation. Tested on x86_64-pc-linux-gnu, committed on trunk 2019-08-21 Yannick Moy gcc/ada

[PATCH][AArch64] Add support for missing CPUs

2019-08-21 Thread Dennis Zhang
Hi all, This patch adds '-mcpu' options for following CPUs: Cortex-A77, Cortex-A76AE, Cortex-A65, Cortex-A65AE, and Cortex-A34. Related specifications are as following: https://developer.arm.com/ip-products/processors/cortex-a Bootstraped/regtested for aarch64-none-linux-gnu. Please help to che

[COMMITTED] [testsuite][arm] Add missing quotes to expected warning messages.

2019-08-21 Thread Christophe Lyon
Hi, The arm/cmse/cmse-9.c test was missing quotes in the expected warning messages. Fix as obvious with r274793. Christophe 2019-08-21 Christophe Lyon * gcc.target/arm/cmse/cmse-9.c: Add quotes to expected warning messages. Index: gcc/testsuite/gcc.target/arm/cmse/cmse-9.c ===

Re: [SVE] PR88839

2019-08-21 Thread Richard Sandiford
Prathamesh Kulkarni writes: > Hi, > The attached patch is a fix for PR88839 ported from sve-acle-branch. > OK to commit to trunk ? > > Thanks, > Prathamesh > > 2019-08-21 Prathamesh Kulkarni > Richard Sandiford > > PR target/88839 > * config/aarch64/aarch64.c (aarch64_ev

Fix crash with -fdump-ada-spec

2019-08-21 Thread Eric Botcazou
This fixes a crash of the C compiler when -fdump-ada-spec is passed for: extern void (*signal (int __sig, void (*__handler)(int)))(int); It appears that the C parser is somewhat confused by this declaration and builds a FUNCTION_DECL whose type has got 2 arguments (TYPE_ARG_TYPES list) but whic

Re: [PATCH V2 2/8] bpf: new GCC port

2019-08-21 Thread Segher Boessenkool
On Tue, Aug 20, 2019 at 11:14:35PM +0200, Jose E. Marchesi wrote: > The kernel verifier doesn't allow backward jumps. > > This may change at some point. There is much discussion among the > kernel hackers in whether it is possible to allow bounded loops in a > safe way. In that case, some of the

Re: [PATCH V2 2/8] bpf: new GCC port

2019-08-21 Thread Segher Boessenkool
On Tue, Aug 20, 2019 at 03:42:53PM -0600, Jeff Law wrote: > > I have been thinking about Segher's suggestion on providing options to > > lift some of the limitations, for compiler testing. Unfortunately, many > > of the restrictions are deeply rooted in the design of the > > architecture... or the

Re: [PATCH] Builtin function roundeven folding implementation

2019-08-21 Thread Martin Jambor
Hi Tejas, On Wed, Aug 14 2019, Tejas Joshi wrote: > Hi. > Here is a clean patch that does not fold roundeven resulting for > integer type and the conditions for folding functions > round/ceil/floor/roundeven and trunc only checks for signaling NaN. wouldn't checking for *signalling* NaNs mean usi

Re: [PATCH 2/8] Introduce vcond_supported_p hook

2019-08-21 Thread Ilya Leoshkevich
> Am 20.08.2019 um 13:54 schrieb Richard Sandiford : > > Ilya Leoshkevich writes: >>> Am 20.08.2019 um 12:13 schrieb Richard Sandiford >>> : >>> >>> Ilya Leoshkevich writes: z13 supports only non-signaling vector comparisons. This means we cannot vectorize LT, LE, GT, GE and LTGT wh

Re: [PATCH] Fix PR91482

2019-08-21 Thread Richard Biener
On Tue, 20 Aug 2019, Richard Biener wrote: > > Excessive use of __builtin_assume_aligned can cause missed optimizations > because those calls are propagation barriers. The following removes > those that are redundant and provide no extra information, on the > testcase allowng store-merging to ap

Re: [SVE] PR88839

2019-08-21 Thread Prathamesh Kulkarni
On Wed, 21 Aug 2019 at 15:18, Richard Sandiford wrote: > > Prathamesh Kulkarni writes: > > Hi, > > The attached patch is a fix for PR88839 ported from sve-acle-branch. > > OK to commit to trunk ? > > > > Thanks, > > Prathamesh > > > > 2019-08-21 Prathamesh Kulkarni > > Richard Sandif

Re: Fix crash with -fdump-ada-spec

2019-08-21 Thread Joseph Myers
On Wed, 21 Aug 2019, Eric Botcazou wrote: > This fixes a crash of the C compiler when -fdump-ada-spec is passed for: > > extern void (*signal (int __sig, void (*__handler)(int)))(int); > > It appears that the C parser is somewhat confused by this declaration and > builds a FUNCTION_DECL whose t

Re: [PATCH 1/8] Document signaling for min, max and ltgt operations

2019-08-21 Thread Ilya Leoshkevich
> Am 20.08.2019 um 19:13 schrieb Segher Boessenkool > : > > On Tue, Aug 20, 2019 at 06:13:00PM +0200, Ilya Leoshkevich wrote: >>> Am 20.08.2019 um 17:50 schrieb Segher Boessenkool >>> : >>> There is currently no way to say (in trees or gimple or rtl) whether >>> comparisons are signaling ("or

Re: [PATCH] Builtin function roundeven folding implementation

2019-08-21 Thread Joseph Myers
On Wed, 21 Aug 2019, Martin Jambor wrote: > Hi Tejas, > > On Wed, Aug 14 2019, Tejas Joshi wrote: > > Hi. > > Here is a clean patch that does not fold roundeven resulting for > > integer type and the conditions for folding functions > > round/ceil/floor/roundeven and trunc only checks for signali

Re: [PATCH 1/8] Document signaling for min, max and ltgt operations

2019-08-21 Thread Segher Boessenkool
On Wed, Aug 21, 2019 at 02:00:10PM +0200, Ilya Leoshkevich wrote: > > Am 20.08.2019 um 19:13 schrieb Segher Boessenkool > > : > > On Tue, Aug 20, 2019 at 06:13:00PM +0200, Ilya Leoshkevich wrote: > >>> Am 20.08.2019 um 17:50 schrieb Segher Boessenkool > >>> : > >>> There is currently no way to sa

Re: PC-relative TLS support

2019-08-21 Thread Alan Modra
On Mon, Aug 19, 2019 at 07:45:19AM -0500, Segher Boessenkool wrote: > But if you think we can remove the !TARGET_TLS_MARKERS everywhere it > is relevant at all, now is the time, patches very welcome, it would be > a nice cleanup :-) Needs testing everywhere of course, but now is > stage 1 :-) Thi

Re: [PATCH v6 3/3] PR80791 Consider doloop cmp use in ivopts

2019-08-21 Thread Bin.Cheng
On Wed, Aug 14, 2019 at 3:23 PM Kewen.Lin wrote: > > Hi! > > Comparing to the previous versions of implementation mainly based on the > existing IV cands but zeroing the related group/use cost, this new one is > based > on Richard and Segher's suggestion introducing one doloop dedicated IV cand.

Re: [PATCH][AArch64] Expand DImode constant stores to two SImode stores when profitable

2019-08-21 Thread James Greenhalgh
On Mon, Oct 24, 2016 at 03:27:10PM +0100, Kyrill Tkachov wrote: > Hi all, > > When storing a 64-bit immediate that has equal bottom and top halves we > currently > synthesize the repeating 32-bit pattern twice and perform a single X-store. > With this patch we synthesize the 32-bit pattern once i

[C++] Protect call to copy_attributes_to_builtin (PR91505)

2019-08-21 Thread Richard Sandiford
copy_attributes_to_builtin only handles BUILT_IN_NORMAL, but C++ was calling it immediately after the: if (DECL_BUILT_IN_CLASS (newdecl) == BUILT_IN_NORMAL) block. The corresponding C code calls it inside the block instead. Tested on x86_64-linux-gnu. OK to install? Richard 2019-0

[PATCH] libgcc/crtstuff.c: Fix incorrect alignment of entries in CRT data structures (PR target/91306)

2019-08-21 Thread Jozef Lawrynowicz
As described in PR target/91306, the alignment of entries in CRT data structures as set in libgcc/crtstuff.c can be too large for msp430-elf. crtstuff.c assumes the correct alignment of entries with a type of (void *) or int32 is the "sizeof" that type. However, for msp430-elf in the large memory

Re: [C++] Protect call to copy_attributes_to_builtin (PR91505)

2019-08-21 Thread Richard Biener
On Wed, Aug 21, 2019 at 2:59 PM Richard Sandiford wrote: > > copy_attributes_to_builtin only handles BUILT_IN_NORMAL, but C++ was > calling it immediately after the: > > if (DECL_BUILT_IN_CLASS (newdecl) == BUILT_IN_NORMAL) > > block. The corresponding C code calls it inside the block i

Re: [PATCH] Add missing popcount simplifications (PR90693)

2019-08-21 Thread Wilco Dijkstra
Hi Richard, > > > > I think this should be in expand stage where there could be comparison > > of the cost of the RTLs. > > I tend to agree here, if not then for the reason the "simplified" variants > have more GIMPLE stmts which means they are not "simpler".  In > fact I'd argue for canonicaliza

Go patch committed: If hidden function referenced by inline, don't hide descriptor

2019-08-21 Thread Ian Lance Taylor
This patch to the Go frontend checks if a hidden function is referenced by an inline function when deciding whether to hid the function descriptor. This fixes https://golang.org/issue/33739. The test case is https://golang.org/cl/191001. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu.

C++ PATCH for c++/91304 - prefix attributes ignored in condition

2019-08-21 Thread Marek Polacek
Currently, we disregard prefix attributes in conditions, e.g.: if ([[maybe_unused]] int i = f()) { } The problem here is that although we've parsed the attribute, it was never passed down to start_decl, so the effects were lost. Bootstrapped/regtested on x86_64-linux, ok for trunk? 2019-08-21

Re: [PATCH V2 2/8] bpf: new GCC port

2019-08-21 Thread Jonathan Corbet
On Tue, 20 Aug 2019 23:14:35 +0200 jose.march...@oracle.com (Jose E. Marchesi) wrote: > The kernel verifier doesn't allow backward jumps. > > This may change at some point. There is much discussion among the > kernel hackers in whether it is possible to allow bounded loops in a > safe way. In t

Re: [PATCH 2/3] Add simplify rules for wrapped binary operations.

2019-08-21 Thread Robin Dapp
I'm going to commit the attached two patches. Removed the redundant changes in test cases and added constructor initialization of fold_all_stmts. Regards Robin -- gcc/ChangeLog: 2019-08-21 Robin Dapp * gimple-loop-versioning.cc (loop_versioning::record_address_fragment): A

Re: [PATCH] Add missing popcount simplifications (PR90693)

2019-08-21 Thread Jeff Law
On 8/21/19 7:57 AM, Wilco Dijkstra wrote: > Hi Richard, > >>> >>> I think this should be in expand stage where there could be comparison >>> of the cost of the RTLs. >> >> I tend to agree here, if not then for the reason the "simplified" variants >> have more GIMPLE stmts which means they are not

Re: [PATCH] builtin fadd variants implementation

2019-08-21 Thread Joseph Myers
On Thu, 8 Aug 2019, Tejas Joshi wrote: > +/* Try to evaluate: > + > + *RESULT = fadd (*ARG0, *ARG1) > + > + in format FORMAT. Return true on success. */ > + > +static bool > +fold_const_fadd (real_value *result, const real_value *arg0, > + const real_value *arg1, const real_f

Re: [PATCH][AArch64] Expand DImode constant stores to two SImode stores when profitable

2019-08-21 Thread Kyrill Tkachov
Hi James, On 8/21/19 1:48 PM, James Greenhalgh wrote: On Mon, Oct 24, 2016 at 03:27:10PM +0100, Kyrill Tkachov wrote: Hi all, When storing a 64-bit immediate that has equal bottom and top halves we currently synthesize the repeating 32-bit pattern twice and perform a single X-store. With this

Re: [PATCH] rs6000: Add ordered compares (PR58684)

2019-08-21 Thread Joseph Myers
On Thu, 8 Aug 2019, Segher Boessenkool wrote: > 2) Is it *required*, or can we delete ordered compares in some cases? > 2a) Like, if we test ab, we only need one compare instruction, > not the two that are generate right now. Yes, you only need one ordered compare there. The relevant text fr

Go patch committed: Don't use pkgpath for fieldtrack of unexported field

2019-08-21 Thread Ian Lance Taylor
This patch to the Go frontend fixes it to not use the full package path for the fieldtrack information generated for an unexported field. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian Index: gcc/go/gofrontend/MERGE ===

[PATCH] [PR81810] unused strcpy to a local buffer not eliminated

2019-08-21 Thread kamlesh kumar
Hi , This patch include fix for PR81810 Bootstrapped/regtested on x86_64-linux, ok for trunk? Thanks ./Kamlesh 2019-08-21 Kamlesh Kumar PR tree-optimization/81810 * tree-ssa-dse.c (dse_dom_walker::dse_optimize_stmt): Added BUILT_IN_STRCPY to consider for dse. (may

[PATCH 0/4] True IPA reimplementation of IPA-SRA (v4)

2019-08-21 Thread Martin Jambor
Hello, I have fixed two bugs of the previous IPA-SRA submission and re-based it on a recent trunk and am posting it again so that people can have look at an up-to-date version (and also as a reminder that it is still pending review). Previous submissions are available at: - https://gcc.gnu.or

[PATCH 1/4] Remove old IPA-SRA, introduce tree-sra.h

2019-08-21 Thread Martin Jambor
This patch removes the old IPA-SRA. Please see the covert letter for more information about the whole patch-set. Martin 2019-07-23 Martin Jambor * dbgcnt.def: Remove eipa_sra. * passes.def: Remove old IPA-SRA. * tree-pass.h (make_pass_early_ipa_sra): Remove declaratio

[PATCH 3/4] New IPA-SRA implementation

2019-08-21 Thread Martin Jambor
This patch actually adds the analysis bits of IPA-SRA - both the function summary generation and the interprocedural analysis and decision stage. The transformation itself then happens in the call graph cloning infrastructure changes which are in the previous patch. Please see the cover letter of

[PATCH 4/4] Modifications to the testsuite

2019-08-21 Thread Martin Jambor
This are all modifications to the testsuite required to get to the state described in the cover letter of the entire IPA-SRA patch-series. Please note that ipa/ipa-sra-2.c and ipa/ipa-sra-6.c should actually be svn rm-ed instead as they try to invoke functionality that the new IPA-SRA does not hav

Re: [PATCH] Builtin function roundeven folding implementation

2019-08-21 Thread Martin Jambor
Hi, On Wed, Aug 21 2019, Joseph Myers wrote: > On Wed, 21 Aug 2019, Martin Jambor wrote: > >> Hi Tejas, >> >> On Wed, Aug 14 2019, Tejas Joshi wrote: >> > Hi. >> > Here is a clean patch that does not fold roundeven resulting for >> > integer type and the conditions for folding functions >> > roun

Re: Merge from trunk to gccgo branch

2019-08-21 Thread Ian Lance Taylor
I've merged trunk revision 274803 to the gccgo branch. Ian

Re: [SVE] PR86753

2019-08-21 Thread Prathamesh Kulkarni
On Thu, 15 Aug 2019 at 01:50, Richard Sandiford wrote: > > Richard Biener writes: > > On Wed, Aug 14, 2019 at 6:49 PM Richard Biener > > wrote: > >> > >> On Wed, Aug 14, 2019 at 5:06 PM Prathamesh Kulkarni > >> wrote: > >> > > >> > Hi, > >> > The attached patch tries to fix PR86753. > >> > > >>

Re: PR90724 - ICE with __sync_bool_compare_and_swap with -march=armv8.2-a

2019-08-21 Thread Prathamesh Kulkarni
On Mon, 19 Aug 2019 at 22:14, James Greenhalgh wrote: > > On Thu, Aug 15, 2019 at 02:11:25PM +0100, Prathamesh Kulkarni wrote: > > On Thu, 8 Aug 2019 at 11:22, Prathamesh Kulkarni > > wrote: > > > > > > On Thu, 1 Aug 2019 at 15:34, Prathamesh Kulkarni > > > wrote: > > > > > > > > On Thu, 25 Jul

Re: [PATCH] Builtin function roundeven folding implementation

2019-08-21 Thread Joseph Myers
On Wed, 21 Aug 2019, Martin Jambor wrote: > - I have listed roundeven variants in extend.texi. If I did not find > the right spot, I will gladly move to a more appropriate one. I don't think they should be documented with the __builtin_* that are always expanded inline. They should be do

Re: [RFC] Enable math functions linking with static library for LTO

2019-08-21 Thread Joseph Myers
I'm afraid I'm not clear on the semantics of builtin_with_linkage_p (as in the current checked-in version). It says: /* Return true if the builtin DECL is implemented in a standard library. Otherwise returns false which doesn't guarantee it is not (thus the list of handled builtins below m

Re: [PATCH] issue consistent warning for past-the-end array stores (PR 91457)

2019-08-21 Thread Martin Sebor
On 8/20/19 1:26 AM, Richard Biener wrote: On Tue, Aug 20, 2019 at 4:32 AM Martin Sebor wrote: On 8/19/19 8:10 AM, Richard Biener wrote: On Sat, Aug 17, 2019 at 12:43 AM Martin Sebor wrote: With the recent enhancement to the strlen handling of multibyte stores the g++.dg/warn/Warray-bounds-

[PATCH] fold constant flexarrays to strings (PR 91490)

2019-08-21 Thread Martin Sebor
This patch is a subset of the solution for PR 91457 whose main goal is to eliminate inconsistencies in warnings issued for out-of-bounds accesses to the various flavors of flexible array members of constant objects. That patch was posted here: https://gcc.gnu.org/ml/gcc-patches/2019-08/msg01202

Re: [PATCH] [PR81810] unused strcpy to a local buffer not eliminated

2019-08-21 Thread Jeff Law
On 8/21/19 11:23 AM, kamlesh kumar wrote: > Hi , > This patch include fix for PR81810 > Bootstrapped/regtested on x86_64-linux, ok for trunk? > > Thanks > ./Kamlesh > > 2019-08-21 Kamlesh Kumar > >PR tree-optimization/81810 >* tree-ssa-dse.c (dse_dom_walker::dse_optimize_stmt

Re: [PATCH] [PR81810] unused strcpy to a local buffer not eliminated

2019-08-21 Thread Jeff Law
On 8/21/19 11:23 AM, kamlesh kumar wrote: > Hi , > This patch include fix for PR81810 > Bootstrapped/regtested on x86_64-linux, ok for trunk? > > Thanks > ./Kamlesh > > 2019-08-21 Kamlesh Kumar > >PR tree-optimization/81810 >* tree-ssa-dse.c (dse_dom_walker::dse_optimize_stmt

Re: Fix crash with -fdump-ada-spec

2019-08-21 Thread Eric Botcazou
> The problem is that the logic in c_parser_declaration_or_fndef for setting > DECL_ARGUMENTS (not previously meaningful in non-definition declarations > at all), as introduced by > > r253411 | dmalcolm | 2017-10-04 14:10:59 + (Wed, 04 Oct 2017) | 85 lines > > C: underline parameters in misma

Re: Fix crash with -fdump-ada-spec

2019-08-21 Thread Joseph Myers
On Wed, 21 Aug 2019, Eric Botcazou wrote: > > Rather than checking if the outermost declarator is > > cdk_function and using its parameters if so, it's necessary to check if > > the *innermost declarator that isn't cdk_id or cdk_attrs* is cdk_function > > and use its parameters if so, as that's wh

Re: [PATCH] fold constant flexarrays to strings (PR 91490)

2019-08-21 Thread Jeff Law
On 8/21/19 2:50 PM, Martin Sebor wrote: > This patch is a subset of the solution for PR 91457 whose main > goal is to eliminate inconsistencies in warnings issued for > out-of-bounds accesses to the various flavors of flexible array > members of constant objects.  That patch was posted here: >   ht

Re: [RFA] [tree-optimization/80576] Handle non-constant sizes in DSE

2019-08-21 Thread Jeff Law
On 8/16/19 4:21 PM, Martin Sebor wrote: > On 8/16/19 12:15 PM, Jeff Law wrote: >> On 8/16/19 12:09 PM, Marc Glisse wrote: >>> On Fri, 16 Aug 2019, Jeff Law wrote: >>> This patch improves our ability to detect dead stores by handling cases where the size memcpy, memset, strncpy, etc call i

Re: [RFA] [tree-optimization/80576] Handle non-constant sizes in DSE

2019-08-21 Thread Jeff Law
On 8/19/19 7:57 AM, Richard Biener wrote: > > +static tree > +objsize_from_type (tree object) > +{ > + if (TREE_CODE (object) != ADDR_EXPR) > +return NULL_TREE; > + > + tree type = TREE_TYPE (object); > + if (POINTER_TYPE_P (type)) > > that if looks suspicious... I'd say > if (!POINTER

Re: [wwwdocs] Document C++ news in GCC 10 Release Notes

2019-08-21 Thread Gerald Pfeifer
On Mon, 19 Aug 2019, Marek Polacek wrote: > I'm of the mind that we should advertise some of the new cool > C++ changes going into GCC 10, esp. those that are user-visible. I concur. :-) > Checking this in. Thank you! Gerald

RE: PR90724 - ICE with __sync_bool_compare_and_swap with -march=armv8.2-a

2019-08-21 Thread JiangNing OS
> -Original Message- > From: gcc-patches-ow...@gcc.gnu.org On > Behalf Of Prathamesh Kulkarni > Sent: Thursday, August 22, 2019 2:36 AM > To: James Greenhalgh > Cc: gcc Patches ; Richard Sandiford > ; Kyrill Tkachov ; > nd > Subject: Re: PR90724 - ICE with __sync_bool_compare_and_swap wi

RE: PR90724 - ICE with __sync_bool_compare_and_swap with -march=armv8.2-a

2019-08-21 Thread JiangNing OS
> -Original Message- > From: gcc-patches-ow...@gcc.gnu.org On > Behalf Of JiangNing OS > Sent: Thursday, August 22, 2019 8:24 AM > To: Prathamesh Kulkarni ; James Greenhalgh > > Cc: gcc Patches ; Richard Sandiford > ; Kyrill Tkachov ; > nd > Subject: RE: PR90724 - ICE with __sync_bool_

Re: [PATCH V2 2/8] bpf: new GCC port

2019-08-21 Thread Jose E. Marchesi
> +#undef TARGET_PASS_BY_REFERENCE > +#define TARGET_PASS_BY_REFERENCE bpf_pass_by_reference I might have misunderstood, but I thought from an earlier (IRC?) message, it wasn't possible for the callee to access the caller's frame, which was why you

Re: [PATCH] Add MD Function type check for builtin_md vectorize

2019-08-21 Thread luoxhu
On 2019/8/21 15:40, Richard Biener wrote: On Tue, 20 Aug 2019, Xiong Hu Luo wrote: The DECL_MD_FUNCTION_CODE added in r274404(PR 91421) by rsandifo requires that DECL to be a BUILTIN_IN_MD class built-in, asserts will happen when lto as the patch r274411(PR 91287) outputs some math function sym

Re: [PATCH v6 3/3] PR80791 Consider doloop cmp use in ivopts

2019-08-21 Thread Kewen.Lin
Hi Bin, Thanks for your time! on 2019/8/21 下午8:32, Bin.Cheng wrote: > On Wed, Aug 14, 2019 at 3:23 PM Kewen.Lin wrote: >> >> Hi! >> >> Comparing to the previous versions of implementation mainly based on the >> existing IV cands but zeroing the related group/use cost, this new one is >> based >

Re: Implement C++20 p1424 - 'constexpr' feature macro concerns.

2019-08-21 Thread Ed Smith-Rowland via gcc-patches
On 8/20/19 6:14 PM, Jonathan Wakely wrote: On 16/08/19 22:39 -0400, Ed Smith-Rowland via libstdc++ wrote: The latest draft and I guess the above paper changed the macro names for the C++20 constexpr lib featues. __cpp_lib_constexpr_algorithms ->__cpp_lib_constexpr. The __cpp_lib_constexpr ma

Re: [PATCH v6 3/3] PR80791 Consider doloop cmp use in ivopts

2019-08-21 Thread Bin.Cheng
On Thu, Aug 22, 2019 at 11:18 AM Kewen.Lin wrote: > > Hi Bin, > > Thanks for your time! > > on 2019/8/21 下午8:32, Bin.Cheng wrote: > > On Wed, Aug 14, 2019 at 3:23 PM Kewen.Lin wrote: > >> > >> Hi! > >> > >> Comparing to the previous versions of implementation mainly based on the > >> existing IV

[SVE] [aarch64] Add "@" in vcond_mask pattern

2019-08-21 Thread Prathamesh Kulkarni
Hi Richard, I screwed up while committing pr88839 fix, by not including the change to aarch64-sve.md that adds "@" to vcond_mask pattern, which resulted in trunk failing to build with: "gen_vcond_mask" was not declared in this scope -:/ The attached patch resolves the failure. OK to commit ? Thank