[PATCH] c++: Fix up constexpr evaluation of arguments passed by invisible reference [PR97388]

2020-10-20 Thread Jakub Jelinek via Gcc-patches
Hi! For arguments passed by invisible reference, in the IL until genericization we have the source types on the callee side and while on the caller side we already pass references to the actual argument slot in the caller, we undo that in cxx_bind_parameters_in_call's if (TREE_ADDRESSABLE

Re: [Ada,FYI] revamp ada.numerics.aux

2020-10-20 Thread Rainer Orth
Hi Alexandre, > On Oct 19, 2020, Andreas Schwab wrote: > >> -nostdinc a-nallfl.ads -o a-nallfl.o >> a-nallfl.ads:48:13: warning: intrinsic binding type mismatch on return value >> a-nallfl.ads:48:13: warning: intrinsic binding type mismatch on argument 1 >> a-nallfl.ads:48:13: warning: profile

Re: PING – Re: [Patch] collect-utils.c, lto-wrapper + mkoffload: Improve -save-temps filename

2020-10-20 Thread Richard Biener
On Mon, 19 Oct 2020, Tobias Burnus wrote: > PING. > > Attached patch has a minor change: the renamed suffixes for nvptx as > suggested by Tom > (and for considency, 'ltrans.args' ? 'ltrans_args'). > > OK? OK. Thanks, Richard. > Tobias > > On 10/13/20 9:37 PM, Tobias Burnus wrote: > > This

[PATCH] Add { target int128 } to gcc.dg/pr97488.c

2020-10-20 Thread Aldy Hernandez via Gcc-patches
__int128 does not exist on 32-bit targets. Pushed. gcc/testsuite/ChangeLog: * gcc.dg/pr97488.c: Add target int128 predicate. --- gcc/testsuite/gcc.dg/pr97488.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/testsuite/gcc.dg/pr97488.c

Re: preprocessor: Fix non-fn fn-like macro at EOF [PR97471]

2020-10-20 Thread Jakub Jelinek via Gcc-patches
On Mon, Oct 19, 2020 at 11:00:34AM -0400, Nathan Sidwell wrote: > We inject EOF tokens between macro argument lists, but had > confused/stale logic in the non-fn invocation.Renamed the magic > 'eof' token, as it's now only used for macro argument termination. > Always rewind the

Re: [PATCH] Handle right shifts by zero in range-ops.

2020-10-20 Thread Aldy Hernandez via Gcc-patches
On 10/19/20 4:22 PM, Jakub Jelinek wrote: On Mon, Oct 19, 2020 at 10:19:48AM -0400, Andrew MacLeod via Gcc-patches wrote: On 10/19/20 5:38 AM, Aldy Hernandez wrote: If the shift amount in operator_lshift::op1_range was zero, an invalid range of [1, 0] was being created. Should we do the

Re: [PATCH] Libsanitizer: merge from master.

2020-10-20 Thread Martin Liška
On 10/20/20 10:09 AM, Tobias Burnus wrote: On 10/19/20 9:39 AM, Tobias Burnus wrote: Filled as https://bugs.llvm.org/show_bug.cgi?id=47896 That issue was fixed. What's the proper way to apply this patch? Simply committing the attached patch* or is there more required? We normally do only a

[Ada] New warning on not fully initialized box aggregate

2020-10-20 Thread Pierre-Marie de Rodat
This new warning detect cases of aggregates of the form (others => <>) where the type doesn't have full default values for all its components. Refine handling of -gnatwv by not warning when an object of a type with partial initialization is declared (and used): this generates a better ratio of

[Ada] Fixes for pretty command-line GNATprove output with -gnatdF

2020-10-20 Thread Pierre-Marie de Rodat
Various fixes are applied to the recent pretty output mode for GNATprove, activated under debug switch -gnatdF: - do not separate info messages from previous ones - do not display souce code line for info messages - display source code lines closer to the format adopted in GCC - do not set the

[Ada] Crash on cond expression as actual for anonymous access formal

2020-10-20 Thread Pierre-Marie de Rodat
This patch fixes a bug in the compiler whereby a conditional expression used as an actual for an anonymous access formal when the condition is known at compile time triggers a crash during compilation. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * exp_ch6.adb

[Ada] Make attribute Update an obsolescent feature

2020-10-20 Thread Pierre-Marie de Rodat
In the new version of Ada, GNAT specific 'Update atttribute is replaced by delta aggregates. Add a warning on occurrences of 'Update. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_attr.adb (Analyze_Attribute): Emit a warning on 'Update when

[Ada] gnatpp: Fix documentation of threshold switches

2020-10-20 Thread Pierre-Marie de Rodat
The gnatpp switches --call-threshold and --par-threshold were documented with "_" instead of "-" (as in "--par_threshold"). It does accept that form, but for consistency, the documentation is changed to "-". Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ *

[Ada] Issue with gnatbind -V switch and Ada 2012

2020-10-20 Thread Pierre-Marie de Rodat
When compiling the binder generated file in Ada 2012 mode and using the gnatbind -V switch, invalid characters are flagged. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * bindgen.adb (Gen_Bind_Env_String): Generate Ada 2012 compatible strings. Code cleanup.diff

[Ada] Crash on precondition, discriminant and protected objects

2020-10-20 Thread Pierre-Marie de Rodat
This combination led to a hole in function Is_Prologue_Renaming, causing the generation of precondition checks too early. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * contracts.adb (Is_Prologue_Renaming): This function was missing support for E_Constant which can

[Ada] Flexible AST node structure

2020-10-20 Thread Pierre-Marie de Rodat
This patch is preliminary work in preparation for changing the node structure so that nodes and entities can be of different sizes depending on the Node_Kind or Entity_Kind. This is cleanup/simplification combined with efficiency improvements. We rearrange the subranges of the various union

[Ada] Propagate predicate function to a full view of a private subtype

2020-10-20 Thread Pierre-Marie de Rodat
When the ancestor in subtype declaration is a private type, routine Analyze_Subtype_Declaration creates private and full view, but only the private view had Predicate_Function inherited from the ancestor. Now also the full view has Predicate_Function inherited. This doesn't appear to affect

[Ada] Remove extra validity check in case statement

2020-10-20 Thread Pierre-Marie de Rodat
Recognize code of the form: if X'Valid then case X is [...] and suppress the redundant validity check on X done as part of the case statement. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * exp_ch5.adb (Expand_N_Case_Statement): Do not generate validity

[Ada] Fix internal error on bit-aligned component of function call

2020-10-20 Thread Pierre-Marie de Rodat
This fixes an internal error in the code generator triggered by a reference generated by the front-end to a bit-aligned component of the result of a function call. Such a reference cannot be handled by the code generator because the object is not aligned on a byte boundary, so it is replaced by a

[Ada] Display source code pointing at locations in messages for GNATprove

2020-10-20 Thread Pierre-Marie de Rodat
In GNATprove, output of messages is adapted (under debug switch -gnatdF) so that both for the location of messages, and extra locations appearing as line insertion in continuation messages, the corresponding line of source code is displayed. For example: incr.adb:3:11: medium: overflow check

[Ada] Ada_2020: Further code cleanup for container aggregates

2020-10-20 Thread Pierre-Marie de Rodat
This patch corrects a potential use of an uninitialized variable uncovered by CodePeer in Expand_Iterated_Component, and removes some code duplication. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * exp_aggr.adb (Expand_Iterated_Component): Reorganize code to

[Ada] Refine result type of Get_Accessibility

2020-10-20 Thread Pierre-Marie de Rodat
Routine Get_Accessibility returns either the result of Minimum_Accessibility or Extra_Accessibility functions, both of which return Entity_Id, so Get_Accessibility should return Entity_Id as well, not just Node_Id. Cleanup only; behavior is not affected. Tested on x86_64-pc-linux-gnu, committed

[Ada] Hang on cond expression as actual for anonymous access formal

2020-10-20 Thread Pierre-Marie de Rodat
This patch fixes a bug in the compiler whereby a conditional expression used as an actual for an anonymous access formal when the condition is known at compile time. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * exp_ch6.adb (Expand_Call_Helper): Properly handle the case

[Ada] Support for new aspect Subprogram_Variant on recursive subprograms

2020-10-20 Thread Pierre-Marie de Rodat
This patch introduces a new aspect "Subprogram_Variant" with expressions that are meant to increase/decrease with each recursive call of the annotated subprogram. It is inspired by the existing pragma Loop_Variant, whose expressions are meant to increase/decrease with each iteration of the loop.

[Ada] Spurious discriminant check on "for of" loop

2020-10-20 Thread Pierre-Marie de Rodat
When using a "for ... of" loop with an element of a record type with defaulted discriminants, a spurious disciminant check is emitted. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_ch8.adb (Check_Constrained_Object): Suppress discriminant checks when the type

[Ada] Inlining nonstatic calls to static expression functions

2020-10-20 Thread Pierre-Marie de Rodat
Static expression functions were already effectively inlined in the case of calls to them with static arguments, but calls with nonstatic arguments were not generally being inlined, but now they are, as a result of setting the Has_Pragma_Inline and Is_Inlined flags on such functions. It appears

[PATCH] gcov-profile: use static pool for TOPN first

2020-10-20 Thread Martin Liška
Hello. As noticed in the PR, it's quite tricky to not run malloc (or calloc) in context of libgcov. I'm suggesting a new approach where we'll first use the pre-allocated static buffer in hope that malloc function is initialized and so every call to calloc can happen. That's why I increased

[PATCH] tree-optimization/97496 - avoid SLP externs in patterns

2020-10-20 Thread Richard Biener
I forgot to guard the promotion to external for the case where the def is in a pattern. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. 2020-10-20 Richard Biener PR tree-optimization/97496 * tree-vect-slp.c (vect_get_and_check_slp_defs): Guard extern

[Ada] AI12-0339: Empty function for Aggregate aspect of Ada containers

2020-10-20 Thread Pierre-Marie de Rodat
The specification of the aspect Aggregate includes a primitive operation Empty that returns the initial value to be used when building an aggregate for the corresponding composite type. For bounded containers, the function Empty includes an explicit parameter that corresponds to the discriminant

[Ada] Add support for Unreferenced aspect on formal parameters

2020-10-20 Thread Pierre-Marie de Rodat
This is useful in particular to be able to mark a formal parameter of an expression function as unreferenced: function F (Param : Integer with Unreferenced) return Integer is (1); We also add the infrastructure to support other aspects on formal parameters in the future. Put this feature

[Ada] Refine type for type constraining routines

2020-10-20 Thread Pierre-Marie de Rodat
Parameters of Constrain_Decimal, Constrain_Enumeration, etc. routines are type entities, which is now reflected in the parameter type. Cleanup only; behavior is unaffected. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_ch3.adb (Constrain_Decimal,

[Ada] Prevent crashes when pretty-printing freeze nodes from gdb

2020-10-20 Thread Pierre-Marie de Rodat
With recently enabled data validity checking in development builds routine "ps", when called from gdb to examine the AST, might crash on invalid data. This is because its Sprint_Node_Actual callee reads Dump_Freeze_Null global variable when processing nodes of N_Freeze_Entity and this global

[Ada] Implement AI12-0280 Making 'Old more flexible

2020-10-20 Thread Pierre-Marie de Rodat
AI12-0280 relaxes the "potentially unevaluated" restrictions on the use of the Old attribute in postconditions. A complex attribute prefix is allowed in cases that were previously forbidden if the conditions governing whether the attribute value will be needed during evaluation of the

Re: [PATCH] [PR target/97194] [AVX2] Support variable index vec_set.

2020-10-20 Thread Richard Biener via Gcc-patches
On Tue, Oct 20, 2020 at 4:35 AM Hongtao Liu wrote: > > On Mon, Oct 19, 2020 at 5:55 PM Richard Biener > wrote: > > > > On Mon, Oct 19, 2020 at 11:37 AM Hongtao Liu wrote: > > > > > > On Mon, Oct 19, 2020 at 5:07 PM Richard Biener > > > wrote: > > > > > > > > On Mon, Oct 19, 2020 at 10:21 AM

Re: [PATCH] Libsanitizer: merge from master.

2020-10-20 Thread Tobias Burnus
On 10/19/20 9:39 AM, Tobias Burnus wrote: Filled as https://bugs.llvm.org/show_bug.cgi?id=47896 That issue was fixed. What's the proper way to apply this patch? Simply committing the attached patch* or is there more required? Tobias *Namely, from LLVM: git diff

[committed] MSP430: Support a memory operand for op1 of andneghi3

2020-10-20 Thread Jozef Lawrynowicz
The attached patch fixes an ICE caused by an unrecognizeable insn generated when compiling gcc.c-torture/execute/pr97386-1.c at -O0 for msp430-elf. Successfully regtested on trunk and committed as obvious. >From 8c3846e80210ba437644b5b91d9bd9c564ca565a Mon Sep 17 00:00:00 2001 From: Jozef

Re: [PATCH] Hashtable refactoring and simplification

2020-10-20 Thread Jonathan Wakely via Gcc-patches
On 15/10/20 19:31 +0200, François Dumont via Libstdc++ wrote: I'd like to integrate some of the refactoring I had to do as part of my work on support of custom pointers in unordered containers. Those are of course the abi compatible changes. Thanks to the changes on _Hash_node type

Re: [PATCH] Avoid re-allocating PHIs in split_edge

2020-10-20 Thread Richard Biener via Gcc-patches
On Tue, Aug 22, 2017 at 4:11 PM Jeff Law wrote: > > On 08/22/2017 03:03 AM, Richard Biener wrote: > > > > The following patch makes sure to not grow the number of incoming > > edges in the destination when doing split_edge on GIMPLE. That's > > easy by first redirecting the existing edge to the

Re: [PATCH] openmp: Implement support for OMP_TARGET_OFFLOAD

2020-10-20 Thread Tobias Burnus
On 10/19/20 8:21 PM, Jakub Jelinek via Gcc-patches wrote: On Mon, Oct 19, 2020 at 06:57:49PM +0100, Kwok Cheung Yeung wrote: --- a/libgomp/target.c +++ b/libgomp/target.c ... Otherwise LGTM. Unfortunately, the committed patch (r11-4121-g1bfc07d150790fae93184a79a7cce897655cb37b) causes

Re: [PATCH] Implement no_stack_protect attribute.

2020-10-20 Thread Richard Biener via Gcc-patches
On Tue, Oct 20, 2020 at 1:24 PM Martin Liška wrote: > > PING^5 So can we use the same identifier as clang here as Nick requests? Thus, OK with re-naming everything alongside no_stack_protector. It isn't really the opposite of the stack_protect attribute since that only protects when

[patch] Introduce vxworks7r2 support for ppc and ppc64

2020-10-20 Thread Olivier Hainque
Hello, This change introduces support for the most recent versions of VxWorks on PowerPC targets, for both 32 and 64 bit thanks to a bi-arch setup. The system compilers are essentially configured as Linux toolchains with only a few specificities and we replicate that model here. The most

[committed 2/2] libstdc++: Define noop coroutine details private and inline [PR 95917]

2020-10-20 Thread Jonathan Wakely via Gcc-patches
libstdc++: Define noop coroutine details private and inline [PR 95917] This moves the __noop_coro_frame type, the __noop_coro_fr global variable, and the __dummy_resume_destroy function from namespace scope, replacing them with private members of the specialization coroutine_handle. The

[PATCH] Fix latch PHI arg lookup in vectorizable_reduction for double-reduction

2020-10-20 Thread Richard Biener
We were using the wrong loop to figure the latch arg of a double-reduction PHI. Which isn't a problem in case ->dest_idx match up with the outer loop edges - but that's of course not guaranteed. Bootstrap & regtest pending on x86_64-unknown-linux-gnu. 2020-10-20 Richard Biener *

Re: [PATCH] Implement no_stack_protect attribute.

2020-10-20 Thread Martin Liška
PING^5 On 8/17/20 2:35 PM, Martin Liška wrote: PING^4 On 7/23/20 1:10 PM, Martin Liška wrote: PING^3 On 6/24/20 11:09 AM, Martin Liška wrote: PING^2 On 6/10/20 10:12 AM, Martin Liška wrote: PING^1 On 5/25/20 3:10 PM, Martin Liška wrote: On 5/21/20 4:53 PM, Martin Sebor wrote: On

Re: [PATCH] arm: Fix multiple inheritance thunks for thumb-1 with -mpure-code

2020-10-20 Thread Richard Earnshaw via Gcc-patches
On 19/10/2020 17:32, Christophe Lyon via Gcc-patches wrote: > On Mon, 19 Oct 2020 at 16:39, Richard Earnshaw > wrote: >> >> On 12/10/2020 08:59, Christophe Lyon via Gcc-patches wrote: >>> On Thu, 8 Oct 2020 at 11:58, Richard Earnshaw >>> wrote: On 08/10/2020 10:07, Christophe Lyon via

Re: [committed][nvptx] Remove -m32

2020-10-20 Thread Tobias Burnus
On 10/15/20 3:26 PM, Tom de Vries wrote: PR target/97436 * config/nvptx/nvptx.opt (m32): Comment out. * doc/invoke.texi (NVPTX options): Remove -m32. This caused the warning: doc/invoke.texi:25617: warning: @itemx should not begin @table Fixed by the committed attached

Re: [PATCH] openmp: Add support for omp_get_supported_active_levels

2020-10-20 Thread David Edelsohn via Gcc-patches
This patch broke bootstrap on AIX. /nasfarm/edelsohn/src/src/libgomp/target.c: In function 'gomp_target_init.part.': /nasfarm/edelsohn/src/src/libgomp/target.c:3367:45: error: array subscript [-19877956975980120, 19877956975980120] is outside array bounds of 'struct gomp_device_descr[0]'

Re: [PATCH] openmp: Add support for omp_get_supported_active_levels

2020-10-20 Thread Tobias Burnus
See patch and thread at https://gcc.gnu.org/pipermail/gcc-patches/2020-October/556570.html Tobias On 10/20/20 3:51 PM, David Edelsohn via Gcc-patches wrote: This patch broke bootstrap on AIX. /nasfarm/edelsohn/src/src/libgomp/target.c: In function 'gomp_target_init.part.':

Re: [PATCH][middle-end][i386][version 3]Add -fzero-call-used-regs=[skip|used-gpr-arg|used-arg|all-arg|used-gpr|all-gpr|used|all]

2020-10-20 Thread Qing Zhao via Gcc-patches
Hi, Uros, Thanks a lot for your comments. > On Oct 19, 2020, at 2:30 PM, Uros Bizjak wrote: > >> >> diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c >> index f684954..620114f 100644 >> --- a/gcc/config/i386/i386.c >> +++ b/gcc/config/i386/i386.c >> @@ -3551,6 +3551,161 @@

[PATCH] Simplify and split irange::copy_legacy_range into two functions.

2020-10-20 Thread Aldy Hernandez via Gcc-patches
copy_legacy_range was a small but complex function. It was tricky to understand, and easy to introduce bugs into it. It also did unnecessary work on some code paths. This patch splits the function into two functions that are more efficient and easier to read (copy_to_legacy and

[PATCH] aarch64: Add vstN_lane_bf16 + vstNq_lane_bf16 intrinsics

2020-10-20 Thread Andrea Corallo via Gcc-patches
Hi all, I'd like to submit the following patch implementing the bfloat16_t neon related store intrinsics: vst2_lane_bf16, vst2q_lane_bf16, vst3_lane_bf16, vst3q_lane_bf16 vst4_lane_bf16, vst4q_lane_bf16. Please see refer to: ACLE ISA

[committed 1/2] libstdc++: Remove inheritance from std::coroutine_handle<> [LWG 3460]

2020-10-20 Thread Jonathan Wakely via Gcc-patches
This removes the coroutine_handle<> base class from the primary template and the noop_coroutine_promise explicit specialization. To preserve the API various members are added, as they are no longer inherited from the base class. I've also tweaked some indentation and formatting, and replaced

Re: [PATCH] arm: Fix multiple inheritance thunks for thumb-1 with -mpure-code

2020-10-20 Thread Richard Earnshaw via Gcc-patches
On 20/10/2020 12:22, Richard Earnshaw wrote: > On 19/10/2020 17:32, Christophe Lyon via Gcc-patches wrote: >> On Mon, 19 Oct 2020 at 16:39, Richard Earnshaw >> wrote: >>> >>> On 12/10/2020 08:59, Christophe Lyon via Gcc-patches wrote: On Thu, 8 Oct 2020 at 11:58, Richard Earnshaw

Re: [PATCH] openmp: Implement support for OMP_TARGET_OFFLOAD

2020-10-20 Thread Tobias Burnus
On 10/20/20 2:11 PM, Tobias Burnus wrote: Unfortunately, the committed patch (r11-4121-g1bfc07d150790fae93184a79a7cce897655cb37b) causes build errors. The error seems to be provoked by function cloning – as the code itself looks fine: ... struct gomp_device_descr *devices_s = malloc

Re: [PATCH] openmp: Implement support for OMP_TARGET_OFFLOAD

2020-10-20 Thread Jakub Jelinek via Gcc-patches
On Tue, Oct 20, 2020 at 02:17:26PM +0200, Tobias Burnus wrote: > On 10/20/20 2:11 PM, Tobias Burnus wrote: > > > Unfortunately, the committed patch > > (r11-4121-g1bfc07d150790fae93184a79a7cce897655cb37b) > > causes build errors. > > > > The error seems to be provoked by function cloning – as

[pushed] c++: Add fixed test [PR82239]

2020-10-20 Thread Marek Polacek via Gcc-patches
This test was fixed by r256550 but that commit was fixing another issue, and just happened to fix this too. Tested x86_64-pc-linux-gnu, applying to trunk. gcc/testsuite/ChangeLog: PR c++/82239 * g++.dg/cpp0x/static_assert16.C: New test. ---

Re: libstdc++: std::iterator is deprecated since C++17

2020-10-20 Thread Jonathan Wakely via Gcc-patches
Patches for libstdc++ need to be sent to both the gcc-patches list and libstdc++ list, or they will be ignored. Removing the std::iterator base classes is an ABI break, so not acceptable. std::iterator is deprecated, but that doesn't the library can't use it. Even after it gets removed, we can

Re: [PATCH] c++: Distinguish btw. alignof and __alignof__ in cp_tree_equal [PR97273]

2020-10-20 Thread Patrick Palka via Gcc-patches
On Fri, 9 Oct 2020, Jason Merrill wrote: > On 10/9/20 4:48 AM, Jakub Jelinek wrote: > > On Tue, Oct 06, 2020 at 03:40:52PM -0400, Jason Merrill via Gcc-patches > > wrote: > > > On 10/4/20 11:28 PM, Patrick Palka wrote: > > > > cp_tree_equal currently considers alignof the same as __alignof__, but

Re: [PATCH 1/2] [target 87767] Refactor AVX512 broadcast patterns with speical memory constraint.

2020-10-20 Thread Vladimir Makarov via Gcc-patches
On 2020-10-20 1:33 a.m., Hongtao Liu wrote: On Mon, Oct 19, 2020 at 11:38 PM Vladimir Makarov wrote: On 2020-10-11 8:58 p.m., Hongtao Liu wrote: Hi: This is done in 2 steps: 1. Extend special memory constraint to handle non MEM_P cases, i.e. (vec_duplicate:V4SF (mem:SF (addr)))

preprocessor: Further fix for EOF in macro args [PR97471]

2020-10-20 Thread Nathan Sidwell
My previous attempt at fixing this was incorrect. The problem occurs earlier in that _cpp_lex_direct processes the unwinding EOF needs in collect_args mode. This patch changes it not to do that, in the same way as directive parsing works. Also collect_args shouldn't push_back such fake EOFs,

[PATCH] Saturate overflows return from SCEV in ranger.

2020-10-20 Thread Aldy Hernandez via Gcc-patches
bounds_of_var_in_loop is returning an overflowed int, which is causing us to create a range for which we can't compare the bounds causing an ICE in verify_range. Overflowed bounds cause compare_values() to return -2, which we don't handle in verify_range. We don't represent overflowed ranges in

Re: PING: Fwd: [PATCH] Refactor range handling of builtins in vr_values and ranger.

2020-10-20 Thread Andrew MacLeod via Gcc-patches
On 10/19/20 6:03 AM, Aldy Hernandez wrote: Forwarded Message Subject: [PATCH] Refactor range handling of builtins in vr_values and ranger. Date: Fri,  9 Oct 2020 14:32:05 +0200 From: Aldy Hernandez To: GCC patches , Jakub Jelinek CC: Andrew MacLeod , Aldy Hernandez

Re: [PATCH] openmp: Implement support for OMP_TARGET_OFFLOAD

2020-10-20 Thread Jakub Jelinek via Gcc-patches
On Tue, Oct 20, 2020 at 06:39:39PM +0200, Rainer Orth wrote: > Hi Tobias, > > > On 10/19/20 8:21 PM, Jakub Jelinek via Gcc-patches wrote: > > > >> On Mon, Oct 19, 2020 at 06:57:49PM +0100, Kwok Cheung Yeung wrote: > >>> --- a/libgomp/target.c > >>> +++ b/libgomp/target.c > > ... > >> Otherwise

Re: PING: [PATCH] Convert -Walloca pass to ranger.

2020-10-20 Thread Andrew MacLeod via Gcc-patches
On 10/19/20 1:16 PM, Aldy Hernandez wrote: Rebased on current trunk. FWIW, we finally get rid of the Walloca-6.c XFAIL. This has been a long time in coming: -/* { dg-xfail-if "Currently broken but Andrew's work should fix this" { *-*-* } } */ :-) OK? You are the original author of this

Re: PING: Fwd: [PATCH] Refactor range handling of builtins in vr_values and ranger.

2020-10-20 Thread Aldy Hernandez via Gcc-patches
On Tue, Oct 20, 2020 at 6:19 PM Andrew MacLeod wrote: > > On 10/19/20 6:03 AM, Aldy Hernandez wrote: > > > > > > > > Forwarded Message > > Subject: [PATCH] Refactor range handling of builtins in vr_values and > > ranger. > > Date: Fri, 9 Oct 2020 14:32:05 +0200 > > From: Aldy

Re: [PATCH] [PR rtl-optimization/97249]Simplify vec_select of paradoxical subreg.

2020-10-20 Thread Richard Sandiford via Gcc-patches
Hongtao Liu writes: >> > + && (GET_MODE_NUNITS (mode)).is_constant () >> > + && (GET_MODE_NUNITS (GET_MODE (SUBREG_REG (trueop0 >> > + .is_constant () >> > + && known_le (l1, l2) >> >> I'm not sure the last two & are really the important condition.

Re: [PATCH] libstdc++: Fix division by zero in std::sample

2020-10-20 Thread Patrick Palka via Gcc-patches
On Tue, 20 Oct 2020, Jonathan Wakely wrote: > On 21/09/20 16:01 +0100, Jonathan Wakely wrote: > > On 18/09/20 21:08 -0400, Patrick Palka via Libstdc++ wrote: > > > This fixes a division by zero in the selection-sampling std::__search > > > overload when the input range is empty (and hence

Re: [PATCH 2/8] [RS6000] rs6000_rtx_costs for AND

2020-10-20 Thread Segher Boessenkool
On Thu, Oct 08, 2020 at 09:27:54AM +1030, Alan Modra wrote: > The existing "case AND" in this function is not sufficient for > optabs.c:avoid_expensive_constant usage, where the AND is passed in > outer_code. We'd like to cost AND of rs6000_is_valid_and_mask > or rs6000_is_valid_2insn_and variety

libgo patch committed: Adjust NetBSD-specific types

2020-10-20 Thread Ian Lance Taylor via Gcc-patches
This libgo patch by Nikhil Benesch adjusts some of the syscall types and names to maintain backward compatibility on NetBSD. Specifically, the RTM_RESOLVE constant must be added if it is missing, and the stat_t struct must use the suffix "timespec" rather than "tim" for its time-related fields.

Re: [PATCH 0/2] [OpenACC] Kernels loop annotation

2020-10-20 Thread Sandra Loosemore
On 9/9/20 11:53 AM, Sandra Loosemore wrote: This set of patches implements C/C++ and Fortran front end support for adding "acc loop auto" annotations to loop nests in OpenACC kernels regions. For background on this, refer to Thomas Schwinge's talk from last year's cauldron, at

Re: [PATCH][middle-end][i386][version 3]Add -fzero-call-used-regs=[skip|used-gpr-arg|used-arg|all-arg|used-gpr|all-gpr|used|all]

2020-10-20 Thread Richard Sandiford via Gcc-patches
Qing Zhao writes: > @@ -4959,6 +4963,52 @@ handle_no_split_stack_attribute (tree *node, tree name, > return NULL_TREE; > } > > +/* Handle a "zero_call_used_regs" attribute; arguments as in > + struct attribute_spec.handler. */ > + > +static tree > +handle_zero_call_used_regs_attribute (tree

Re: [PATCH][middle-end][i386][version 3]Add -fzero-call-used-regs=[skip|used-gpr-arg|used-arg|all-arg|used-gpr|all-gpr|used|all]

2020-10-20 Thread Qing Zhao via Gcc-patches
> On Oct 20, 2020, at 10:24 AM, Uros Bizjak wrote: > > On Tue, Oct 20, 2020 at 4:01 PM Qing Zhao > wrote: >> >> Hi, Uros, >> >> Thanks a lot for your comments. >> >> On Oct 19, 2020, at 2:30 PM, Uros Bizjak wrote: >> >> >> diff --git

Re: [PATCH] Remove vr_values::extract_range_builtin.

2020-10-20 Thread Andrew MacLeod via Gcc-patches
On 10/20/20 12:43 PM, Aldy Hernandez wrote: As promised. Now that we know the vr_values and ranger versions are in sync, it is safe to remove the vr_values version and just call the ranger one. I am holding off on pushing this for a week or two, or until Fedora gets rebuilt with the current

Re: PING: [PATCH] Convert -Wrestrict pass to ranger.

2020-10-20 Thread Andrew MacLeod via Gcc-patches
On 10/19/20 1:23 PM, Aldy Hernandez wrote: Rebased on current trunk. There is one adjustment to a C++ test which now gives a false positive. After talking with Martin Sebor, we've concluded this is expected. There is no way to communicate that libstdc++ allocated objects are always less than

libgo patch committed: Remove sendfile on NetBSD

2020-10-20 Thread Ian Lance Taylor via Gcc-patches
This libgo patch by Nikhil Benesch removes sendfile from the syscall package on NetBSD, as NetBSD doesn't have the sendfile system call. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian 76a9f0acd248bba801e6208d11a96db5b7f940dc diff --git

Re: [PATCH][middle-end][i386][version 3]Add -fzero-call-used-regs=[skip|used-gpr-arg|used-arg|all-arg|used-gpr|all-gpr|used|all]

2020-10-20 Thread Uros Bizjak via Gcc-patches
On Tue, Oct 20, 2020 at 4:01 PM Qing Zhao wrote: > > Hi, Uros, > > Thanks a lot for your comments. > > On Oct 19, 2020, at 2:30 PM, Uros Bizjak wrote: > > > diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c > index f684954..620114f 100644 > --- a/gcc/config/i386/i386.c > +++

Re: [PATCH PR94442] [AArch64] Redundant ldp/stp instructions emitted at -O3

2020-10-20 Thread Richard Sandiford via Gcc-patches
xiezhiheng writes: > I made two separate patches for these two groups, get/set register intrinsics > and store intrinsics. > > Note: It does not matter which patch is applied first. > > Bootstrapped and tested on aarch64 Linux platform. Thanks. I pushed the get/set patch. For the store patch,

Re: PING – Re: [Patch] collect-utils.c, lto-wrapper + mkoffload: Improve -save-temps filename

2020-10-20 Thread Tobias Burnus
On 10/20/20 11:27 AM, Richard Biener wrote: OK. Missed two things – a copy'n'paste issue using the wrong variable and to update a testcase, adding the newly added dump files there. Committed as obvious in r11-4132-g6267bb7a11f53381d77b2c0a6193fcb9115d2b30 Tobias On 10/13/20 9:37 PM, Tobias

libbacktrace patch committed: Use __attribute__((__fallthrough__))

2020-10-20 Thread Ian Lance Taylor via Gcc-patches
This libbacktrace patch uses __attribute__((__fallthrough__)) rather than relying on a /*fallthrough*/ comment. Bootstrapped and ran libbacktrace tests on x86_64-pc-linux-gnu. Committed to mainline. Ian * internal.h (ATTRIBUTE_FALLTHROUGH): Define. * elf.c (elf_zlib_inflate): Use

Re: [PATCH] openmp: Implement support for OMP_TARGET_OFFLOAD

2020-10-20 Thread Rainer Orth
Hi Tobias, > On 10/19/20 8:21 PM, Jakub Jelinek via Gcc-patches wrote: > >> On Mon, Oct 19, 2020 at 06:57:49PM +0100, Kwok Cheung Yeung wrote: >>> --- a/libgomp/target.c >>> +++ b/libgomp/target.c > ... >> Otherwise LGTM. > > Unfortunately, the committed patch >

Re: [PATCH] libstdc++: Fix division by zero in std::sample

2020-10-20 Thread Jonathan Wakely via Gcc-patches
On 21/09/20 16:01 +0100, Jonathan Wakely wrote: On 18/09/20 21:08 -0400, Patrick Palka via Libstdc++ wrote: This fixes a division by zero in the selection-sampling std::__search overload when the input range is empty (and hence __unsampled_sz is 0). Tested on x86_64-pc-linux-gnu.

c++: block-scope extern decl with default args

2020-10-20 Thread Nathan Sidwell
In adding the DECL_LOCAL_DECL handling, I'd forgotten that the parm-decls also need cloning -- and resetting of their DECL_CONTEXT. Also, any default args need droping when adding an alias, as those are not propagated. The std's not totally clear on this latter point when there's no exising

[PATCH] Remove vr_values::extract_range_builtin.

2020-10-20 Thread Aldy Hernandez via Gcc-patches
As promised. Now that we know the vr_values and ranger versions are in sync, it is safe to remove the vr_values version and just call the ranger one. I am holding off on pushing this for a week or two, or until Fedora gets rebuilt with the current compiler. gcc/ChangeLog: * vr-values.h

Re: [PATCH 2/8] [RS6000] rs6000_rtx_costs for AND

2020-10-20 Thread Alan Modra via Gcc-patches
On Tue, Oct 20, 2020 at 01:55:56PM -0500, Segher Boessenkool wrote: > On Thu, Oct 08, 2020 at 09:27:54AM +1030, Alan Modra wrote: > > The existing "case AND" in this function is not sufficient for > > optabs.c:avoid_expensive_constant usage, where the AND is passed in > > outer_code. We'd like to

[PATCH 2/2, rs6000, V2] VSX load/store rightmost element operations

2020-10-20 Thread will schmidt via Gcc-patches
[PATCH 2/2, rs6000, v2] VSX load/store rightmost element operations Hi, This adds support for the VSX load/store rightmost element operations. This includes the instructions lxvrbx, lxvrhx, lxvrwx, lxvrdx, stxvrbx, stxvrhx, stxvrwx, stxvrdx; And the builtins vec_xl_sext() /* vector load sign

Re: [PATCH 1/2] [target 87767] Refactor AVX512 broadcast patterns with speical memory constraint.

2020-10-20 Thread Hongtao Liu via Gcc-patches
On Tue, Oct 20, 2020 at 10:57 PM Vladimir Makarov wrote: > > > On 2020-10-20 1:33 a.m., Hongtao Liu wrote: > > On Mon, Oct 19, 2020 at 11:38 PM Vladimir Makarov > > wrote: > >> > >> On 2020-10-11 8:58 p.m., Hongtao Liu wrote: > >>> Hi: > >>> This is done in 2 steps: > >>> 1. Extend

Re: [PATCH] [PR rtl-optimization/97249]Simplify vec_select of paradoxical subreg.

2020-10-20 Thread Hongtao Liu via Gcc-patches
On Wed, Oct 21, 2020 at 12:42 AM Richard Sandiford wrote: > > Hongtao Liu writes: > >> > + && (GET_MODE_NUNITS (mode)).is_constant () > >> > + && (GET_MODE_NUNITS (GET_MODE (SUBREG_REG (trueop0 > >> > + .is_constant () > >> > + && known_le (l1, l2)

[r11-4134 Regression] FAIL: gcc.dg/Walloca-1.c (test for warnings, line 27) on Linux/x86_64

2020-10-20 Thread sunil.k.pandey via Gcc-patches
On Linux/x86_64, 495ec0b2aa808a6463b8c24288a1730cbae1cfca is the first bad commit commit 495ec0b2aa808a6463b8c24288a1730cbae1cfca Author: Aldy Hernandez Date: Mon Oct 19 16:52:51 2020 +0200 Convert -Walloca pass to ranger. caused FAIL: gcc.dg/Walloca-1.c (test for excess errors) FAIL:

[PATCH, rs6000] Optimize pcrel access of globals

2020-10-20 Thread acsawdey--- via Gcc-patches
From: Aaron Sawdey This patch implements a RTL pass that looks for pc-relative loads of the address of an external variable using the PCREL_GOT relocation and a single load or store that uses that external address. It then uses the PCREL_OPT relocation to convert that first load into a single

Re: [patch] Introduce vxworks7r2 support for ppc and ppc64

2020-10-20 Thread Segher Boessenkool
Hi! On Tue, Oct 20, 2020 at 12:10:59PM +0200, Olivier Hainque wrote: > This change introduces support for the most recent versions > of VxWorks on PowerPC targets, for both 32 and 64 bit thanks > to a bi-arch setup. > > The system compilers are essentially configured as Linux > toolchains with

Re: [PATCH] [PR rtl-optimization/97249]Simplify vec_select of paradoxical subreg.

2020-10-20 Thread Segher Boessenkool
On Tue, Oct 20, 2020 at 11:20:48AM +0800, Hongtao Liu wrote: > + unsigned HOST_WIDE_INT subreg_offset = 0; > + if (GET_CODE (trueop0) == SUBREG > + && GET_MODE_INNER (mode) > + == GET_MODE_INNER (GET_MODE (SUBREG_REG (trueop0))) > + && (GET_MODE_NUNITS

[PATCH] Temporarily disable trap in in extract_range_builtin check.

2020-10-20 Thread Andrew MacLeod via Gcc-patches
Not a permanent fix, so leave the PR open. we'll bypass the comparison assertion code until we can look closer at how to resolve the symbolic issue..  This will keep compilations going... bootstrapped on x86_64-pc-linux-gnu, no regressions, pushed. Andrew commit

Re: [PATCH] [PR rtl-optimization/97249]Simplify vec_select of paradoxical subreg.

2020-10-20 Thread Segher Boessenkool
On Thu, Oct 15, 2020 at 04:14:39PM +0800, Hongtao Liu wrote: > On Thu, Oct 15, 2020 at 1:37 AM Segher Boessenkool > wrote: > > > + gcc_assert (can_div_trunc_p (SUBREG_BYTE (trueop0), > > > +GET_MODE_SIZE (GET_MODE_INNER > > > (mode)), > > > +

Trivial testsuite fix for 16bit targets

2020-10-20 Thread Jeff Law via Gcc-patches
cr16-elf regressed this test: cr16-sim: gcc.dg/Wbuiltin-declaration-mismatch-9.c (test for excess errors) There's a dg-prune in the test which stripped out some messages, but it wasn't sufficient to cover the 16 bit targets.  This patch adds another string to prune.  Committed. Jeff

Re: [r11-4134 Regression] FAIL: gcc.dg/Walloca-1.c (test for warnings, line 27) on Linux/x86_64

2020-10-20 Thread Jeff Law via Gcc-patches
On 10/20/20 5:13 PM, sunil.k.pandey via Gcc-patches wrote: > On Linux/x86_64, > > 495ec0b2aa808a6463b8c24288a1730cbae1cfca is the first bad commit > commit 495ec0b2aa808a6463b8c24288a1730cbae1cfca > Author: Aldy Hernandez > Date: Mon Oct 19 16:52:51 2020 +0200 > > Convert -Walloca pass to

Re: [PATCH] openmp: Implement support for OMP_TARGET_OFFLOAD

2020-10-20 Thread Kwok Cheung Yeung
On 20/10/2020 1:57 pm, Jakub Jelinek wrote: On Tue, Oct 20, 2020 at 02:17:26PM +0200, Tobias Burnus wrote: On 10/20/20 2:11 PM, Tobias Burnus wrote: Unfortunately, the committed patch (r11-4121-g1bfc07d150790fae93184a79a7cce897655cb37b) causes build errors. The error seems to be provoked by

Re: [PATCH][middle-end][i386][version 3]Add -fzero-call-used-regs=[skip|used-gpr-arg|used-arg|all-arg|used-gpr|all-gpr|used|all]

2020-10-20 Thread Qing Zhao via Gcc-patches
Richard, Thanks a lot for your comments. > On Oct 20, 2020, at 1:12 PM, Richard Sandiford > wrote: > >> >> + >> + if ((strcmp (TREE_STRING_POINTER (id), "skip") != 0) >> + && (strcmp (TREE_STRING_POINTER (id), "used-gpr-arg") != 0) >> + && (strcmp (TREE_STRING_POINTER (id),

Re: [PATCH] [PR rtl-optimization/97249]Simplify vec_select of paradoxical subreg.

2020-10-20 Thread Hongtao Liu via Gcc-patches
On Wed, Oct 21, 2020 at 5:07 AM Segher Boessenkool wrote: > > On Tue, Oct 20, 2020 at 11:20:48AM +0800, Hongtao Liu wrote: > > + unsigned HOST_WIDE_INT subreg_offset = 0; > > + if (GET_CODE (trueop0) == SUBREG > > + && GET_MODE_INNER (mode) > > + ==