*Ping* [Patch] Fortran: Fix bind(C) character length checks

2021-07-07 Thread Burnus, Tobias
*Ping* I intent to incorporate Sandra's suggestions, except for the beginning of line spacing - that's needed to avoid exceeding the 80 character line limit. I did not include an updated patch as just pinging is easier on a mobile during vacation :-) Thanks, Tobias Loosemore, Sandra wrote:

Re: [PATCH 1/2] CALL_INSN may not be a real function call.

2021-07-07 Thread Hongtao Liu via Gcc-patches
On Thu, Jul 8, 2021 at 7:44 AM Segher Boessenkool wrote: > > On Wed, Jul 07, 2021 at 11:23:48PM +0800, Hongtao Liu wrote: > > On Wed, Jul 7, 2021 at 10:54 PM Segher Boessenkool > > wrote: > > [ snip some old stuff ] > > > > Yeah. This stuff needs a rethink. > > > > > > What is wrong with just

Re: PING 2 [PATCH] correct handling of variable offset minus constant in -Warray-bounds (PR 100137)

2021-07-07 Thread Martin Sebor via Gcc-patches
On 7/7/21 7:48 PM, Marek Polacek wrote: On Wed, Jul 07, 2021 at 02:38:11PM -0600, Martin Sebor via Gcc-patches wrote: On 7/7/21 1:38 AM, Richard Biener wrote: On Tue, Jul 6, 2021 at 5:47 PM Martin Sebor via Gcc-patches wrote: Ping:

Re: PING 2 [PATCH] correct handling of variable offset minus constant in -Warray-bounds (PR 100137)

2021-07-07 Thread Marek Polacek via Gcc-patches
On Wed, Jul 07, 2021 at 02:38:11PM -0600, Martin Sebor via Gcc-patches wrote: > On 7/7/21 1:38 AM, Richard Biener wrote: > > On Tue, Jul 6, 2021 at 5:47 PM Martin Sebor via Gcc-patches > > wrote: > > > > > > Ping: https://gcc.gnu.org/pipermail/gcc-patches/2021-June/573349.html > > > > + if

[PATCH] c++: Fix noexcept with unevaluated operand [PR101087]

2021-07-07 Thread Marek Polacek via Gcc-patches
It sounds plausible that this assert int f(); static_assert(noexcept(sizeof(f(; should pass: sizeof produces a std::size_t and its operand is not evaluated, so it can't throw. noexcept should only evaluate to false for potentially evaluated operands. Therefore I think that

Re: [PATCH] Add gnu::diagnose_as attribute

2021-07-07 Thread Jason Merrill via Gcc-patches
On 7/7/21 4:23 AM, Matthias Kretz wrote: On Tuesday, 22 June 2021 21:52:16 CEST Jason Merrill wrote: 2. About the namespace aliases: IIUC an attribute would currently be rejected because of the C++ grammar. Do you want to make it valid before WG21 officially decides how to proceed? And if you

Re: [PATCH] docs: Add 'S' to Machine Constraints for RISC-V

2021-07-07 Thread Palmer Dabbelt
On Wed, 07 Jul 2021 16:26:25 PDT (-0700), i...@maskray.me wrote: On 2021-07-02, Kito Cheng wrote: It was undocument before, but already used in linux kernel, so LLVM community suggest we should document that, so that make it become supported/documented/non-internal machine constraints.

Re: [PATCH] rs6000: Support [u]mod3 for vector modulo insns

2021-07-07 Thread Kewen.Lin via Gcc-patches
Hi Segher, on 2021/7/8 上午1:10, Segher Boessenkool wrote: > Hi! > > On Wed, Jul 07, 2021 at 05:03:23PM +0800, Kewen.Lin wrote: >> This patch is to make Power10 newly introduced vector >> modulo instructions exploited in vectorized loops, it >> just simply renames existing define_insns as standard

Re: [PATCH 1/2] CALL_INSN may not be a real function call.

2021-07-07 Thread Segher Boessenkool
On Wed, Jul 07, 2021 at 11:32:59PM +0800, Hongtao Liu wrote: > On Wed, Jul 7, 2021 at 10:54 PM Segher Boessenkool > wrote: > > So, a "FAKE_CALL" is very much a *real* call, on the RTL level, which is > > where we are here. But you want it to be treated differently because it > > will eventually

Re: [PATCH 1/2] CALL_INSN may not be a real function call.

2021-07-07 Thread Segher Boessenkool
On Wed, Jul 07, 2021 at 11:23:48PM +0800, Hongtao Liu wrote: > On Wed, Jul 7, 2021 at 10:54 PM Segher Boessenkool > wrote: [ snip some old stuff ] > > Yeah. This stuff needs a rethink. > > > > What is wrong with just using an unspec and clobbers? > > > It's partial and **potential clobber**,

[committed] analyzer: remove add_any_constraints_from_ssa_def_stmt

2021-07-07 Thread David Malcolm via Gcc-patches
I'm working on reimplementing -Wanalyzer-use-of-uninitialized-value, but I ran into issues with region_model::add_any_constraints_from_ssa_def_stmt. This function is from the initial commit of the analyzer and walks the SSA names finding conditions that were missed due to the GCC 10 era

Re: [PATCH] docs: Add 'S' to Machine Constraints for RISC-V

2021-07-07 Thread Fangrui Song
On 2021-07-02, Kito Cheng wrote: It was undocument before, but already used in linux kernel, so LLVM community suggest we should document that, so that make it become supported/documented/non-internal machine constraints. gcc/ChangeLog: PR target/101275 * doc/md.text (Machine

Re: Repost: [PATCH] Generate 128-bit int divide/modulus on power10.

2021-07-07 Thread Segher Boessenkool
On Wed, Jul 07, 2021 at 03:55:44PM -0400, Michael Meissner wrote: > This patch adds support for the VDIVSQ, VDIVUQ, VMODSQ, and VMODUQ > instructions to do 128-bit arithmetic. > gcc/ > PR target/100809 > * config/rs6000/rs6000.md (udivti3): New insn. > (divti3): New insn. >

Re: [PATCH] Add gnu::diagnose_as attribute

2021-07-07 Thread Jason Merrill via Gcc-patches
On 7/5/21 10:18 AM, Matthias Kretz wrote: On Thursday, 1 July 2021 17:18:26 CEST Jason Merrill wrote: You probably want to adjust is_late_template_attribute to change that. Right, I hacked is_late_template_attribute but now I only see a TYPE_DECL passed to my attribute handler

[Patch] MAINTAINERS - Add myself for write after approval and DCO

2021-07-07 Thread Gaius Mulley via Gcc-patches
Hello, I have added myself for Write After Approval and DCO. Thanks Gaius = / * MAINTAINERS: Add myself for write after approval and DCO. 2021-07-06 Gaius Mulley Signed-off-by: Gaius Mulley diff --git a/MAINTAINERS b/MAINTAINERS index

Re: [PATCH v2] IBM Z: Use @PLT symbols for local functions in 64-bit mode

2021-07-07 Thread Ilya Leoshkevich via Gcc-patches
On Wed, 2021-07-07 at 21:03 +0200, Ilya Leoshkevich wrote: > Bootstrapped and regtested on s390x-redhat-linux.  Ok for master? > > v1: https://gcc.gnu.org/pipermail/gcc-patches/2021-June/573614.html > v1 -> v2: Do not use UNSPEC_PLT in 64-bit code and rename it to >   UNSPEC_PLT31

Re: [PATCH] c++: Fix PR101247 in another way

2021-07-07 Thread Jason Merrill via Gcc-patches
On 7/7/21 11:29 AM, Patrick Palka wrote: r12-1989 fixed the testcase in the PR, but unfortunately the fix is buggy: 1. It breaks the case where the common template between the TEMPLATE_DECL t and ctx_parms is the innermost template (as in concepts-memtmpl5.C below). This can be

Re: PING 2 [PATCH] correct handling of variable offset minus constant in -Warray-bounds (PR 100137)

2021-07-07 Thread Martin Sebor via Gcc-patches
On 7/7/21 1:38 AM, Richard Biener wrote: On Tue, Jul 6, 2021 at 5:47 PM Martin Sebor via Gcc-patches wrote: Ping: https://gcc.gnu.org/pipermail/gcc-patches/2021-June/573349.html + if (TREE_CODE (axstype) != UNION_TYPE) what about QUAL_UNION_TYPE? (why constrain union type accesses here -

Repost: [PATCH] PR 100168: Fix call test on power10.

2021-07-07 Thread Michael Meissner via Gcc-patches
[PATCH] PR 100168: Fix call test on power10. Fix a test that was checking for 64-bit TOC calls, to also allow for PC-relative calls. I have verified that this test passes when run on a power10 system configured with --with-cpu=power10 and it continues to pass on power9 little endian and power8

Repost: [PATCH] PR 100170: Fix eq/ne tests on power10.

2021-07-07 Thread Michael Meissner via Gcc-patches
[PATCH] PR 100170: Fix eq/ne tests on power10. This patch updates eq/ne tests in the testsuite to adjust the test if power10 code generation is used. I have verified that these tests run on a power10 system using the --with-cpu=power10 configuration option, and they continue to run on power9

Repost: [PATCH] PR 100167: Fix vector long long multiply/divide tests on power10

2021-07-07 Thread Michael Meissner via Gcc-patches
[PATCH] PR 100167: Fix vector long long multiply/divide tests on power10. This patch updates the vector long long multiply and divide tests to supply the correct code information if power10 code generation is used. 2021-07-07 Michael Meissner gcc/testsuite/ PR testsuite/100167

Repost: [PATCH] Deal with prefixed loads/stores in tests, PR testsuite/100166

2021-07-07 Thread Michael Meissner via Gcc-patches
[PATCH] Deal with prefixed loads/stores in tests, PR testsuite/100166 This patch updates the various tests in the testsuite to treat plxv and pstxv as being vector loads/stores. This shows up if you run the testsuite with a compiler configured with the option: --with-cpu=power10. I have

Repost: [PATCH] Fix vec-splati-runnable.c test.

2021-07-07 Thread Michael Meissner via Gcc-patches
[PATCH] Fix vec-splati-runnable.c test. I noticed that the vec-splati-runnable.c did not have an abort after one of the tests. If the test was run with optimization, the optimizer could delete some of the tests and throw off the count. However, due to the fact that the value being loaded in

Repost: [PATCH] Change rs6000_const_f32_to_i32 return type.

2021-07-07 Thread Michael Meissner via Gcc-patches
[PATCH] Change rs6000_const_f32_to_i32 return type. The function rs6000_const_f32_to_i32 called REAL_VALUE_TO_TARGET_SINGLE with a long long type and returns it. This patch changes the type to long which is the proper type for REAL_VALUE_TO_TARGET_SINGLE. 2021-07-07 Michael Meissner gcc/

Repost: [PATCH] Fix long double tests when default long double is not IBM.

2021-07-07 Thread Michael Meissner via Gcc-patches
[PATCH] Fix long double tests when default long double is not IBM. This patch adds 3 more selections to target-supports.exp to see if we can force the compiler to use a particular long double format (IEEE 128-bit, IBM extended double, 64-bit), and the library support will track the changes for

Repost: [PATCH] Generate 128-bit int divide/modulus on power10.

2021-07-07 Thread Michael Meissner via Gcc-patches
[PATCH] Generate 128-bit int divide/modulus on power10. This patch adds support for the VDIVSQ, VDIVUQ, VMODSQ, and VMODUQ instructions to do 128-bit arithmetic. Ideally this patch can be approved in time to be back ported to GCC 11.2. Can I check this into the master branch, and eventually

Re: [PATCH 2/4 REVIEW] libtool.m4: fix nm BSD flag detection

2021-07-07 Thread Nick Alcock via Gcc-patches
On 7 Jul 2021, Nick Clifton told this: > Hi Nick, > >> Ping? > > Oops. I sent a bunch of pings out at the same time, to a bunch of different projects. You are the only person to respond, so thank you! >>> PR libctf/27482 >>> * libtool.m4 (LT_PATH_NM): Try BSDization flags with a

[PATCH v2] IBM Z: Use @PLT symbols for local functions in 64-bit mode

2021-07-07 Thread Ilya Leoshkevich via Gcc-patches
Bootstrapped and regtested on s390x-redhat-linux. Ok for master? v1: https://gcc.gnu.org/pipermail/gcc-patches/2021-June/573614.html v1 -> v2: Do not use UNSPEC_PLT in 64-bit code and rename it to UNSPEC_PLT31 (Ulrich, Andreas). Do not append @PLT only to weak symbols in

Re: [PATCH] rs6000: Add MMA __builtin_vsx_lxvp and __builtin_vsx_stxvp built-ins

2021-07-07 Thread Peter Bergner via Gcc-patches
On 7/7/21 11:55 AM, Peter Bergner wrote: > On 7/6/21 5:05 PM, Segher Boessenkool wrote: >> On Tue, Jul 06, 2021 at 04:13:06PM -0500, Peter Bergner wrote: >>> On 7/6/21 3:08 PM, Bill Schmidt wrote: On 7/6/21 2:29 PM, Peter Bergner wrote: > These are RS6000_BTC_GIMPLE, so I think they

[Patch] C, C++, Fortran, OpenMP: Add support for device-modifiers for 'omp target device'

2021-07-07 Thread Marcel Vollweiler
This patch adds device-modifiers to the device clause: #pragma omp target device ([ device-modifier :] integer-expression) where device-modifier is either 'ancestor' or 'device_num'. The 'device_num' case #pragma omp target device (device_num : integer-expression) is treated in the

Re: [PATCH 1/2] CALL_INSN may not be a real function call.

2021-07-07 Thread Jeff Law via Gcc-patches
On 7/7/2021 8:55 AM, Segher Boessenkool wrote: On Mon, Jul 05, 2021 at 06:03:21PM -0600, Jeff Law wrote: It reminds me a bit of millicode calls on the PA or calls to special routines in libgcc.  They're calls to functions, but those functions do not follow the standard ABI. Something with

Re: [PATCH] rs6000: Support [u]mod3 for vector modulo insns

2021-07-07 Thread Segher Boessenkool
Hi! On Wed, Jul 07, 2021 at 05:03:23PM +0800, Kewen.Lin wrote: > This patch is to make Power10 newly introduced vector > modulo instructions exploited in vectorized loops, it > just simply renames existing define_insns as standard > pattern names. > > Is it ok for trunk? > > BR, > Kewen >

Re: [PATCH] rs6000: Add MMA __builtin_vsx_lxvp and __builtin_vsx_stxvp built-ins

2021-07-07 Thread Peter Bergner via Gcc-patches
On 7/6/21 5:05 PM, Segher Boessenkool wrote: > On Tue, Jul 06, 2021 at 04:13:06PM -0500, Peter Bergner wrote: >> On 7/6/21 3:08 PM, Bill Schmidt wrote: >>> On 7/6/21 2:29 PM, Peter Bergner wrote: These are RS6000_BTC_GIMPLE, so I think they should be handled within the "if (gimple_func)

Re: [PATCH] test/rs6000: Add case to cover vector division

2021-07-07 Thread Segher Boessenkool
On Wed, Jul 07, 2021 at 05:03:07PM +0800, Kewen.Lin wrote: > This patch is to add one test case to check if vectorizer > can exploit vector division instrutions newly introduced > by Power10. Okay, great, thanks! Segher

[Ada] Remove unused define

2021-07-07 Thread Pierre-Marie de Rodat
__MINWGW32__ is typo and was not working, but anyway the MSG_WAITALL is defined on Windows. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * s-oscons-tmplt.c (MSG_WAITALL): Remove wrong #ifdef __MINWGW32__.diff --git a/gcc/ada/s-oscons-tmplt.c

[Ada] Assertion errors on concurrent types with -gnatc and extensions enabled

2021-07-07 Thread Pierre-Marie de Rodat
When expansion is disabled (such as with -gnatc), there are cases where uses of concurrent types can lead to an Assertion_Failure when extensions are enabled (by use of -gnatX, or due to instantiation of a predefined library generic, such as Unchecked_Conversion), because Primitive_Operations can

[Ada] Stronger assertion about flag for checking static expressions

2021-07-07 Thread Pierre-Marie de Rodat
Ensure that Checking_For_Potentially_Static_Expression flag is manipulated in a stack-like manner (with stack depth 1 at the most). The previous assertion didn't prevent us from setting the flag to True or to False twice in a row. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/

[Ada] Front-end inlining and instantiations of UC

2021-07-07 Thread Pierre-Marie de Rodat
A recent change exposed a latent bug where the Is_Intrinsic_Subprogram flag was not propagated properly, leading to errors from the front-end inlining of the form: cannot inline "xxx" (nested function instantiation) Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ *

[Ada] Keepalive control on Windows

2021-07-07 Thread Pierre-Marie de Rodat
Windows headers in GCC could miss some available constants. Hardcode TCP_KEEPCNT, TCP_KEEPIDLE, and TCP_KEEPINTVL constants for such case. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * s-oscons-tmplt.c (TCP_KEEPCNT TCP_KEEPIDLE, TCP_KEEPINTVL): Hardcode on Windows

[Ada] Optimize away certain elaboration checks

2021-07-07 Thread Pierre-Marie de Rodat
The body of every primitive subprogram contains an elaboration check, in case a dispatching call is made. These checks happen even in the static model. This patch removes the checks if pragma Pure or Preelaborate is present, because they cannot fail in that case. Tested on x86_64-pc-linux-gnu,

[Ada] Simplify code by reusing Remove on list of primitive operations

2021-07-07 Thread Pierre-Marie de Rodat
Code cleanup; semantics is unaffected. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_prag.adb (Analyze_Pragma): Simplify processing of pragma CPP_Constructor.diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb --- a/gcc/ada/sem_prag.adb +++

[Ada] Minor code cleanup

2021-07-07 Thread Pierre-Marie de Rodat
To help codepeer analysis. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * libgnat/g-debpoo.adb (Code_Address_For_Allocate_End): Default Initialize.diff --git a/gcc/ada/libgnat/g-debpoo.adb b/gcc/ada/libgnat/g-debpoo.adb --- a/gcc/ada/libgnat/g-debpoo.adb +++

[Ada] Code cleanups in System.Atomic_Counters

2021-07-07 Thread Pierre-Marie de Rodat
In particular, now that we are using Atomic_Unsigned which is marked Atomic, we no longer need to mark Atomic_Counter.Value explicitly atomic. We can also get rid of all uses of 'Unrestricted_Access Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * libgnat/s-atocou.ads,

[Ada] Implement new legality checks specified by AI12-0412

2021-07-07 Thread Pierre-Marie de Rodat
Ada 2022, in AI12-0412, specifies that certain uses of primitives of an abstract type that have Pre'Class or Post'Class aspect are illegal when an aspect is given with a nonstatic expression. Specifically, if the primitive is nonabstract and has such aspects, it's illegal to make a nondispatching

[Ada] Fix location of errors about volatile compatibility

2021-07-07 Thread Pierre-Marie de Rodat
Ada 2022 errors about volatile compatibility between generic actual and formal types were emitted on type declaration; now they are emitted at the actual type within the generic instance. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_ch12.adb

[Ada] Use bounded string buffer in Get_Unit_Name

2021-07-07 Thread Pierre-Marie de Rodat
Code cleanup; semantics is unaffected. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * uname.adb (Get_Unit_Name): Simplify with a bounded string buffer; also, this addresses a ??? comment about the max length being exceeded.diff --git a/gcc/ada/uname.adb

[Ada] Replace obsolete calls that use global name buffer

2021-07-07 Thread Pierre-Marie de Rodat
Code cleanup related to loading of compilation units; behaviour is unaffected. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * uname.adb (Get_Body_Name, Get_Parent_Body_Name, Get_Parent_Spec_Name, Get_Spec_Name, Is_Child_Name, Is_Body_Name, Is_Spec_Name,

[Ada] Fix bugs in Value_Size clauses and refactor

2021-07-07 Thread Pierre-Marie de Rodat
Size and Value_Size clauses are documented to be the same, except that Value_Size is allowed for nonfirst subtypes, and Size is allowed for objects. This was far from true, which caused bugs such as ignoring Value_Size for access types, in cases where a Size clause would trigger the use of thin

[Ada] Improve interactions between DSA and Put_Image routines for tagged types

2021-07-07 Thread Pierre-Marie de Rodat
Back out of an overly aggressive workaround for compilation problems associated with a Put_Image routine for a tagged type in a Remote_Types package and try a different (hopefully better) approach that is more consistent with how other predefined primitives are treated. Tested on

[Ada] Timeout correction on Get_Socket_Option

2021-07-07 Thread Pierre-Marie de Rodat
The Set_Socket_Option shifts timeout for -500ms on old Windows versions, but Get_Socket_Option did +500ms for timeouts on all Windows versions. This commit fixes it and +500ms on Get_Socket_Option only for old Windows versions. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/

[Ada] Unchecked_Convert_To: set Parent

2021-07-07 Thread Pierre-Marie de Rodat
A previous change to Unchecked_Convert_To removed the setting of the Parent of the new node, because it was thought to be unnecessary. However, in rare cases, it is necessary because for example Remove_Side_Effects is called on the new node before attaching it to the tree. Tested on

[Ada] Simplify handling of sure errors in GNATprove mode

2021-07-07 Thread Pierre-Marie de Rodat
In cases where it is known statically that an exception will be raised, the frontend inserts a node of kind N_Raise_xxx_Error. This node kind was previously not supported in GNATprove, which required special handling for these cases in GNATprove mode. This is not needed anymore. Tested on

[Ada] Reduce scope of local variables

2021-07-07 Thread Pierre-Marie de Rodat
Code cleanup; semantics is unaffected. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_ch6.adb (Check_For_Primitive_Subprogram): Move declarations of local variables after nested subprogram bodies.diff --git a/gcc/ada/sem_ch6.adb b/gcc/ada/sem_ch6.adb ---

[Ada] Simplify code by reusing List_Length

2021-07-07 Thread Pierre-Marie de Rodat
Code cleanup; semantics is unaffected. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * exp_disp.adb (CPP_Num_Prims): Reuse List_Length.diff --git a/gcc/ada/exp_disp.adb b/gcc/ada/exp_disp.adb --- a/gcc/ada/exp_disp.adb +++ b/gcc/ada/exp_disp.adb @@ -588,19 +588,7 @@ package

[Ada] Replace low-level membership tests with Is_Private_Type

2021-07-07 Thread Pierre-Marie de Rodat
Code cleanup; semantics is unaffected. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * exp_ch3.adb, exp_ch6.adb, sem_ch6.adb: Replace Ekind membership test in Private_Kind with a call to Is_Private_Type.diff --git a/gcc/ada/exp_ch3.adb b/gcc/ada/exp_ch3.adb ---

[Ada] Linker_Section_Pragma cleanup

2021-07-07 Thread Pierre-Marie de Rodat
Remove Linker_Section_Pragma field from Record_Field_Kind. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * gen_il-gen-gen_entities.adb: Remove Linker_Section_Pragma field from Record_Field_Kind. Minor comment improvement.diff --git

[Ada] Fix precondition of Cot for code analyzers

2021-07-07 Thread Pierre-Marie de Rodat
The precondition of Cot in Ada.Numerics.Generic_Elementary_Functions is not meant for execution (as enforced by the Assertion_Policy at the top of the file) but for analysis only. A conjunct in the precondition of Cot applied to two arguments (with a Cycle value) was incorrect, now fixed. Tested

[Ada] Replace chopped string copy with renaming

2021-07-07 Thread Pierre-Marie de Rodat
Avoid local string copy with renaming, which both make the code shorter to read and should be marginally faster to execute. Code cleanup only related to loading of compilation units; semantics is unaffected. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * par.adb (Par): A

[Ada] Simplify handling of Generate_Code flag for compilation units

2021-07-07 Thread Pierre-Marie de Rodat
There are three kinds of units that require code generation: the main unit, its corresponding spec and generic instances needed by the main unit. Previously the main unit and its corresponding spec were flagged as requiring code generation just before calling the backend, while instance units

[Ada] Add socket options to control keepalive on TCP connection

2021-07-07 Thread Pierre-Marie de Rodat
This adds socket options that are needed to control the keepalive status of TCP connections. The new options are Keep_Alive_Count, Keep_Alive_Idle, and Keep_Alive_Interval. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * libgnat/g-socket.ads (Option_Name): Add

[Ada] Tune discovery of No_Elaboration_Code restriction

2021-07-07 Thread Pierre-Marie de Rodat
When discovering violation of the No_Elaboration_Code restriction it is enough to find one unit that violates it; we don't need to examine all units. Code cleanup; semantics is unaffected. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * lib-writ.adb (Write_ALI): Exit from

[Ada] Simplify iteration over pending instantiations

2021-07-07 Thread Pierre-Marie de Rodat
Code cleanup; semantics is unaffected. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * inline.adb (Instantiate_Bodies): Fix white in declaration. (Remove_Dead_Instance): Change iteration from WHILE to FOR.diff --git a/gcc/ada/inline.adb b/gcc/ada/inline.adb ---

[Ada] Transient scope cleanup

2021-07-07 Thread Pierre-Marie de Rodat
Use Tbuild.Unchecked_Convert_To instead of Nmake.Make_Unchecked_Type_Conversion. This leads to more readable source code in the compiler, and also more readable .dg code, because it removes redundant unchecked conversions. There is only one remaining call to Make_Unchecked_Type_Conversion, which

[Ada] Unsynchronized access to a Boolean in tasking state

2021-07-07 Thread Pierre-Marie de Rodat
The Terminated flag for a task was being queried without first aquiring the task lock. It is not clear that this unsychronized access has ever caused a problem in practice, but the thread-sanitizer tool flags it. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ *

Re: [PATCH 1/2] CALL_INSN may not be a real function call.

2021-07-07 Thread Hongtao Liu via Gcc-patches
On Wed, Jul 7, 2021 at 4:15 PM Richard Biener wrote: > > On Wed, Jul 7, 2021 at 4:40 AM Hongtao Liu via Gcc-patches > wrote: > > > > On Tue, Jul 6, 2021 at 9:37 AM Hongtao Liu wrote: > > > > > > On Tue, Jul 6, 2021 at 7:31 AM Segher Boessenkool > > > wrote: > > > > > > > > Hi! > > > > > > > >

Re: [PATCH] test/rs6000: Add cases to cover vector multiply

2021-07-07 Thread Segher Boessenkool
Hi! On Wed, Jul 07, 2021 at 05:02:42PM +0800, Kewen.Lin wrote: > This patch is to add test cases to check if vectorizer > can exploit vector multiply instrutions on Power, some > of them are supported since Power8, the other are newly > introduced by Power10. Okay for trunk. Thank you! Segher

Re: [PATCH 1/2] CALL_INSN may not be a real function call.

2021-07-07 Thread Hongtao Liu via Gcc-patches
On Wed, Jul 7, 2021 at 10:54 PM Segher Boessenkool wrote: > > Hi! > > On Wed, Jul 07, 2021 at 10:15:08AM +0200, Richard Biener wrote: > > On Wed, Jul 7, 2021 at 4:40 AM Hongtao Liu via Gcc-patches > > wrote: > > > On Tue, Jul 6, 2021 at 9:37 AM Hongtao Liu wrote: > > > > On Tue, Jul 6, 2021 at

[PATCH] c++: Fix PR101247 in another way

2021-07-07 Thread Patrick Palka via Gcc-patches
r12-1989 fixed the testcase in the PR, but unfortunately the fix is buggy: 1. It breaks the case where the common template between the TEMPLATE_DECL t and ctx_parms is the innermost template (as in concepts-memtmpl5.C below). This can be fixed by instead passing the TREE_TYPE of

Re: [PATCH 1/2] CALL_INSN may not be a real function call.

2021-07-07 Thread Hongtao Liu via Gcc-patches
On Wed, Jul 7, 2021 at 10:54 PM Segher Boessenkool wrote: > > Hi! > > On Wed, Jul 07, 2021 at 10:15:08AM +0200, Richard Biener wrote: > > On Wed, Jul 7, 2021 at 4:40 AM Hongtao Liu via Gcc-patches > > wrote: > > > On Tue, Jul 6, 2021 at 9:37 AM Hongtao Liu wrote: > > > > On Tue, Jul 6, 2021 at

[PATCH] soft-fp: Update soft-fp from glibc

2021-07-07 Thread H.J. Lu via Gcc-patches
From: liuhongt 1. Add __extendhfdf2/__extendhfsf2 to return an IEEE half converted to IEEE double/single. 2. Add __truncdfhf2/__extendsfhf2 to truncate IEEE double/single into IEEE half. 3. Add __eqhf2/__nehf2 to return 0 if a == b and a,b are not NAN, otherwise return 1. These are needed by

Re: [PATCH 1/2] CALL_INSN may not be a real function call.

2021-07-07 Thread Segher Boessenkool
On Mon, Jul 05, 2021 at 06:03:21PM -0600, Jeff Law wrote: > It reminds me a bit of millicode calls on the PA or calls to special > routines in libgcc.  They're calls to functions, but those functions do > not follow the standard ABI. Something with CALL_INSN_FUNCTION_USAGE? And maybe some

Re: [PATCH 1/2] CALL_INSN may not be a real function call.

2021-07-07 Thread Segher Boessenkool
Hi! On Wed, Jul 07, 2021 at 10:15:08AM +0200, Richard Biener wrote: > On Wed, Jul 7, 2021 at 4:40 AM Hongtao Liu via Gcc-patches > wrote: > > On Tue, Jul 6, 2021 at 9:37 AM Hongtao Liu wrote: > > > On Tue, Jul 6, 2021 at 7:31 AM Segher Boessenkool > > > wrote: > > > > I ran into this in

Re: [PATCH 2/4 REVIEW] libtool.m4: fix nm BSD flag detection

2021-07-07 Thread Nick Clifton via Gcc-patches
Hi Nick, Ping? Oops. PR libctf/27482 * libtool.m4 (LT_PATH_NM): Try BSDization flags with a user-provided Changes to libtool need to be posted to the libtool project: https://www.gnu.org/software/libtool/ They have mailing lists for bug reports and patch submissions.

Re: [PING][PATCH] define auto_vec copy ctor and assignment (PR 90904)

2021-07-07 Thread Martin Sebor via Gcc-patches
On 7/7/21 1:28 AM, Richard Biener wrote: On Tue, Jul 6, 2021 at 5:06 PM Martin Sebor wrote: Ping: https://gcc.gnu.org/pipermail/gcc-patches/2021-June/573968.html Any questions/suggestions on the final patch or is it okay to commit? I don't remember seeing one (aka saying

[PATCH V2] gcc: Add vec_select -> subreg RTL simplification

2021-07-07 Thread Jonathan Wright via Gcc-patches
Hi, Version 2 of this patch adds more code generation tests to show the benefit of this RTL simplification as well as adding a new helper function 'rtx_vec_series_p' to reduce code duplication. Patch tested as version 1 - ok for master? Thanks, Jonathan --- gcc/ChangeLog: 2021-06-08  

Re: [PATCH] New hook adjust_iv_update_pos

2021-07-07 Thread Richard Biener via Gcc-patches
On Tue, Jun 29, 2021 at 11:19 AM Xionghu Luo wrote: > > > > On 2021/6/28 16:25, Richard Biener wrote: > > On Mon, Jun 28, 2021 at 10:07 AM Xionghu Luo wrote: > >> > >> > >> > >> On 2021/6/25 18:02, Richard Biener wrote: > >>> On Fri, Jun 25, 2021 at 11:41 AM Xionghu Luo wrote: > > >

[PATCH v2] Analyze niter for until-wrap condition [PR101145]

2021-07-07 Thread Jiufu Guo via Gcc-patches
Changes since v1: * Update assumptions for niter, add more test cases check * Use widest_int/wide_int instead mpz to do +-/ * Move some early check for quick return For code like: unsigned foo(unsigned val, unsigned start) { unsigned cnt = 0; for (unsigned i = start; i > val; ++i) cnt++;

Re: [PATCH] testsuite: Add arm_arch_v7a_ok effective-target to pr57351.c

2021-07-07 Thread Christophe Lyon via Gcc-patches
ping? On Wed, Jun 30, 2021 at 3:58 PM Christophe LYON via Gcc-patches < gcc-patches@gcc.gnu.org> wrote: > I've noticed that overriding cpu/arch flags when running the testsuite > can cause this test to fail rather than being skipped because of > incompatible flags combination. > > Since the test

[PATCH] tree-optimization/99728 - improve LIM for loops with aggregate copies

2021-07-07 Thread Richard Biener
This improves LIM by recording aggregate copies for disambiguation purposes instead of as UNANALYZABLE_MEM which will prevent any invariant or store motion across it. This allows four of the six references in the loop of the testcase to be promoted. Bootstrapped and tested on

[PATCH] tree-optimization/34195 - testcase for fixed vectorization

2021-07-07 Thread Richard Biener
This adds a testcase for an old fixed PR. Tested on x86_64-unknwon-linux-gnu, pushed. 2021-07-07 Richard Biener PR tree-optimization/34195 * gcc.dg/vect/pr34195.c: New testcase. --- gcc/testsuite/gcc.dg/vect/pr34195.c | 33 + 1 file changed, 33

Re: [PATCH 4/4] remove %G and %K support from pretty printer and -Wformat (PR 98512)

2021-07-07 Thread Andreas Schwab
On Jul 07 2021, Christophe Lyon wrote: > On Wed, Jul 7, 2021 at 11:38 AM Andreas Schwab > wrote: > >> This broke bootstrap on aarch64. >> >> > This is https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101363 Nope. This is a *bootstap* failure. Andreas. -- Andreas Schwab, sch...@linux-m68k.org

Re: [PATCH 4/4] remove %G and %K support from pretty printer and -Wformat (PR 98512)

2021-07-07 Thread Christophe Lyon via Gcc-patches
On Wed, Jul 7, 2021 at 11:38 AM Andreas Schwab wrote: > This broke bootstrap on aarch64. > > This is https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101363 Christophe > Andreas. > > -- > Andreas Schwab, sch...@linux-m68k.org > GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA

Re: [PATCH 4/4] remove %G and %K support from pretty printer and -Wformat (PR 98512)

2021-07-07 Thread Andreas Schwab
This broke bootstrap on aarch64. Andreas. -- Andreas Schwab, sch...@linux-m68k.org GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 "And now for something completely different."

[PATCH] rs6000: Support [u]mod3 for vector modulo insns

2021-07-07 Thread Kewen.Lin via Gcc-patches
Hi, This patch is to make Power10 newly introduced vector modulo instructions exploited in vectorized loops, it just simply renames existing define_insns as standard pattern names. Is it ok for trunk? BR, Kewen - gcc/ChangeLog: * config/rs6000/rs6000-builtin.def (MODS_V2DI,

[PATCH] test/rs6000: Add case to cover vector division

2021-07-07 Thread Kewen.Lin via Gcc-patches
Hi, This patch is to add one test case to check if vectorizer can exploit vector division instrutions newly introduced by Power10. Is it ok for trunk? BR, Kewen - gcc/testsuite/ChangeLog: * gcc.target/powerpc/div-vectorize-1.c: New test. ---

[PATCH] test/rs6000: Add cases to cover vector multiply

2021-07-07 Thread Kewen.Lin via Gcc-patches
Hi, This patch is to add test cases to check if vectorizer can exploit vector multiply instrutions on Power, some of them are supported since Power8, the other are newly introduced by Power10. Is it ok for trunk? BR, Kewen - gcc/testsuite/ChangeLog: *

Re: [PATCH] Add gnu::diagnose_as attribute

2021-07-07 Thread Matthias Kretz
On Tuesday, 22 June 2021 21:52:16 CEST Jason Merrill wrote: > > 2. About the namespace aliases: IIUC an attribute would currently be > > rejected because of the C++ grammar. Do you want to make it valid before > > WG21 officially decides how to proceed? And if you have a pointer for me > > where

Re: [PATCH 1/2] CALL_INSN may not be a real function call.

2021-07-07 Thread Richard Biener via Gcc-patches
On Wed, Jul 7, 2021 at 4:40 AM Hongtao Liu via Gcc-patches wrote: > > On Tue, Jul 6, 2021 at 9:37 AM Hongtao Liu wrote: > > > > On Tue, Jul 6, 2021 at 7:31 AM Segher Boessenkool > > wrote: > > > > > > Hi! > > > > > > I ran into this in shrink-wrap.c today. > > > > > > On Thu, Jun 03, 2021 at

Re: [PATCH] Add FMADDSUB and FMSUBADD SLP vectorization patterns and optabs

2021-07-07 Thread Richard Biener
On Wed, 7 Jul 2021, Hongtao Liu wrote: > > > > > and I have no easy way to test things there. Handling AVX512 > > > > > should be easy as followup though. > > Here's the patch adding avx512f tests for FMADDSUB/FMSUBADD slp patterns. > Pushed to the trunk. Thanks! Richard.

Re: [PATCH] PR tree-opt/40210: Fold (bswap(X)>>C1) to (X>>C3) in match.pd

2021-07-07 Thread Richard Biener via Gcc-patches
On Tue, Jul 6, 2021 at 9:01 PM Roger Sayle wrote: > > > All of the optimizations/transformations mentioned in bugzilla for > PR tree-optimization/40210 are already implemented in mainline GCC, > with one exception. In comment #5, there's a suggestion that > (bswap64(x)>>56)&0xff can be

ping: [PATCH] c-family: Add more predefined macros for math flags

2021-07-07 Thread Matthias Kretz
OK? (I want to use the macros in libstdc++.) On Wednesday, 30 June 2021 10:59:28 CEST Matthias Kretz wrote: > Library code, especially in headers, sometimes needs to know how the > compiler interprets / optimizes floating-point types and operations. > This information can be used for additional

Re: PING 2 [PATCH] correct handling of variable offset minus constant in -Warray-bounds (PR 100137)

2021-07-07 Thread Richard Biener via Gcc-patches
On Tue, Jul 6, 2021 at 5:47 PM Martin Sebor via Gcc-patches wrote: > > Ping: https://gcc.gnu.org/pipermail/gcc-patches/2021-June/573349.html + if (TREE_CODE (axstype) != UNION_TYPE) what about QUAL_UNION_TYPE? (why constrain union type accesses here - note you don't seem to constrain accesses

Re: [PING][PATCH] define auto_vec copy ctor and assignment (PR 90904)

2021-07-07 Thread Richard Biener via Gcc-patches
On Tue, Jul 6, 2021 at 5:06 PM Martin Sebor wrote: > > Ping: https://gcc.gnu.org/pipermail/gcc-patches/2021-June/573968.html > > Any questions/suggestions on the final patch or is it okay to commit? I don't remember seeing one (aka saying "bootstrapped/tested, OK to commit?" or so) - and the

Re: [PATCH] Add FMADDSUB and FMSUBADD SLP vectorization patterns and optabs

2021-07-07 Thread Hongtao Liu via Gcc-patches
> > > > and I have no easy way to test things there. Handling AVX512 > > > > should be easy as followup though. Here's the patch adding avx512f tests for FMADDSUB/FMSUBADD slp patterns. Pushed to the trunk. -- BR, Hongtao From 2dc666974cca3a62686f4d7135ca36c25d61a802 Mon Sep 17 00:00:00 2001