Re: [PATCH] Add pattern for pointer-diff on addresses with same base/offset (PR 94234)

2020-06-16 Thread Marc Glisse
On Tue, 16 Jun 2020, Feng Xue OS wrote: Here is an question about pointer operation: Pointer is treated as unsigned in comparison operation, while distance between pointers is signed. Then we can not assume the below conclusion is true? (ptr_a > ptr_b) => (ptr_a - ptr_b) >= 0 Yes yo

[PATCH] middle-end/95690 - avoid MEM_EXPRs for constants

2020-06-16 Thread Richard Biener
[the following fixes fallout of the last change which introduced an assert - after this change we can likely trim down the set of tree codes we "ignore"] The following avoids calling set_mem_attributes on the DECL_INITIAL of a CONST_DECL which seems pointless since there cannot be a sensible MEM

[PATCH take 2] middle-end: Optimize (A&C)^(B&C) to (A^B)&C in simplify_rtx.

2020-06-16 Thread Roger Sayle
As suggested by Richard Sandiford, this patch splits out the previous RTL simplification, of (X&C)^(Y&C) to (X^Y)&C, to its own function, simplify_distributive_operation, and calls it when appropriate for IOR, XOR and AND. Instrumenting a bootstrap reveals this optimization triggers 393358 times

Re: [PATCH 4/5] libgcc: vxworks: don't set __GTHREAD_HAS_COND for vxworks 5.x

2020-06-16 Thread Olivier Hainque
Hi Rasmus, > On 26 May 2020, at 16:52, Rasmus Villemoes wrote: > > The vxworks-cond.c file fails to compile for vxworks 5.x: > > libgcc/config/gthr-vxworks-cond.c:29: > ./gthr-default.h:274:3: error: unknown type name 'TASK_ID' > 274 | TASK_ID task_id; > | ^~~ > > There is a TASK

[PATCH] S/390: Emit vector alignment hints for z13 if AS accepts them

2020-06-16 Thread Stefan Schulze Frielinghaus via Gcc-patches
Since 87cb9423add vector alignment hints are emitted for target z13, too. This patch changes this behaviour in the sense that alignment hints are only emitted for target z13 if the assembler accepts them. Bootstrapped and regtested on S/390. Ok for master? gcc/ChangeLog: * config.in: Re

Re: [PATCH] wwwdocs: Document devel/omp/gcc-10 branch

2020-06-16 Thread Thomas Schwinge
Hi Kwok! On 2020-06-15T22:08:50+0100, Kwok Cheung Yeung wrote: > I have now moved the entry for devel/omp/gcc-9 into the inactive branches > section and reworded it slightly. > > Okay to push? Yes, thanks. Reviewed-by: Thomas Schwinge Grüße Thomas > On 12/06/2020 9:35 am, Thomas Schwinge

Re: [PATCH 5/5] libgcc: vxworks: don't set __GTHREAD_CXX0X for vxworks 5.x

2020-06-16 Thread Olivier Hainque
Hi Rasmus, > On 26 May 2020, at 16:52, Rasmus Villemoes wrote: > > As for __GTHREAD_HAS_COND, use __GTHREAD_CXX0X to guard the actual > contents of gthr-vxworks-thread.c. Good for me. > That should also allow dropping the > t-gthr-vxworksae fragment and simply use t-gthr-vxworks. Indeed. T

Re: [PATCH] Optimize V*QImode shift by constant using same operation on V*HImode [PR95524]

2020-06-16 Thread Jakub Jelinek via Gcc-patches
On Tue, Jun 16, 2020 at 10:09:08AM +0800, Hongtao Liu via Gcc-patches wrote: > > + machine_mode qimode, himode; > > + unsigned int shift_constant, and_constant, xor_constant; > > + rtx vec_const_and, vec_const_xor; > > + rtx tmp, op1_subreg; > > + rtx (*gen_shift) (rtx, rtx, rtx); > > + rtx (

[PATCH PR95199 v2] vect: CSE for bump and offset in strided load/store operations

2020-06-16 Thread zhoukaipeng (A)
Hi, I try to eliminate the common stmts for *vec_offset also. But I am not sure it is a good way. New patch attached. Bootstraped and testsuites are being tested. Kaipeng Zhou > -Original Message- > From: Richard Biener [mailto:rguent...@suse.de] > Sent: Monday, June 15, 2020 2:21 PM

Re: [PATCH] vectorizer: add _bb_vec_info::const_iterator

2020-06-16 Thread Richard Sandiford
Martin Liška writes: > > Also, one minor formatting nit, sorry: the other functions instead > > indent the “{” block by the same amount as the function prototype, > > which seems more consistent with the usual out-of-class formatting. > > Hope I fixed that. Sorry, I meant the other functions were

Re: [PATCH] Defined libcall_arg_t

2020-06-16 Thread Richard Sandiford
Thanks for doing this. Kamlesh Kumar via Gcc-patches writes: > diff --git a/gcc/rtl.h b/gcc/rtl.h > index 0872cc4..c023ff0 100644 > --- a/gcc/rtl.h > +++ b/gcc/rtl.h > @@ -2238,6 +2238,18 @@ struct address_info { >enum rtx_code base_outer_code; > }; > > +/* This is used for passing args in

[PATCH][documentation] Fix typo in access function attribute example

2020-06-16 Thread Forrest Timour via Gcc-patches
Hi, This patch fixes an off-by-one typo in the documentation example of the access function attribute. This is my first contribution and I don't have write access, so I will need somebody to submit for me on approval. Thanks, Forrest --- Fix t

Re: [PATCH] avoid false positives due to compute_objsize (PR 95353)

2020-06-16 Thread Richard Biener via Gcc-patches
On Mon, Jun 15, 2020 at 7:11 PM Martin Sebor via Gcc-patches wrote: > > On 6/14/20 12:37 PM, Jeff Law wrote: > > On Sat, 2020-06-13 at 17:49 -0600, Martin Sebor wrote: > >> On 6/13/20 3:50 PM, Sandra Loosemore wrote: > >>> On 6/2/20 6:12 PM, Martin Sebor via Gcc-patches wrote: > The compute_o

Re: [Patch] testsuite: Add offloading_enabled check and use it for xfail (PR95622)

2020-06-16 Thread Thomas Schwinge
Hi Tobias! On 2020-06-12T16:12:44+0200, Tobias Burnus wrote: > For real offloading compilers, the configure-time ENABLE_OFFLOAD > macro is set to true. I once toyed with the idea of getting rid of that configure-time 'ENABLE_OFFLOAD' flag, moving it to GCC run time, implicitly set by '-fopenacc'

Re: [PATCH PR95199 v2] vect: CSE for bump and offset in strided load/store operations

2020-06-16 Thread Richard Biener
On Tue, 16 Jun 2020, zhoukaipeng (A) wrote: > Hi, > > I try to eliminate the common stmts for *vec_offset also. But I am not sure > it is a good way. > > New patch attached. Bootstraped and testsuites are being tested. Looks good to me and certainly worth if it makes a difference for IV calcu

[RFC PATCH] Fix plugin build errors on systems where unistd.h includes getopt.h

2020-06-16 Thread Ilya Leoshkevich via Gcc-patches
Hello, I ran into an issue with building plugins, which appears to be fairly old [1]. Below is my attempt to fix it - I'm currently verifying it on various farm machines, and so far it's looking good. I'm not sure whether I went in the right direction with the fix though (portability is hard!),

Re: [PATCH] recog: Use parameter packs for operator()

2020-06-16 Thread Richard Sandiford
Jonathan Wakely writes: > + template > + rtx_insn *operator() (Ts... args...) const > > Why is this declared as a variadic template **and** a varargs function? > > I think the second ellipsis is wrong, it should be just: > > + template > + rtx_insn *operator() (Ts... args) const Oops, yes. >

[PATCH][GCC-10 Backport] arm: Fix unintentional fall throughs in arm.c

2020-06-16 Thread Srinath Parvathaneni
Hi all, This small patch fix some unintentional fall-throughs in `mve_vector_mem_operand'. Regtested and bootstraped on arm-linux-gnueabihf. Okay for GCC-10 branch? Regards, Srinath gcc/ChangeLog 2020-06-09 Srinath Parvathaneni Backported from mainline 2020-05-28 Andrea C

[PATCH][GCC-10 Backport] arm: Fix the wrong code-gen generated by MVE vector load/store intrinsics (PR94959).

2020-06-16 Thread Srinath Parvathaneni
Hello, Few MVE intrinsics like vldrbq_s32, vldrhq_s32 etc., the assembler instructions generated by current compiler are wrong. eg: vldrbq_s32 generates an assembly instructions `vldrb.s32 q0,[ip]`. But as per Arm-arm second argument in above instructions must also be a low register (<= r7). This

[PATCH][GCC-10 Backport] arm: Fix the MVE ACLE vbicq intrinsics.

2020-06-16 Thread Srinath Parvathaneni
Hello, Following MVE intrinsic testcases are failing in GCC testsuite. Directory: gcc.target/arm/mve/intrinsics/ Testcases: vbicq_f16.c, vbicq_f32.c, vbicq_s16.c, vbicq_s32.c, vbicq_s8.c ,vbicq_u16.c, vbicq_u32.c and vbicq_u8.c. This patch fixes the vbicq intrinsics by modifying the intrinsic pa

[PATCH][GCC-10 Backport] arm: Correct the grouping of operands in MVE vector scatter store intrinsics (PR94735).

2020-06-16 Thread Srinath Parvathaneni
Hello, The operands in RTL patterns of MVE vector scatter store intrinsics are wrongly grouped, because of which few vector loads and stores instructions are wrongly getting optimized out with -O2. A new predicate "mve_scatter_memory" is defined in this patch, this predicate returns TRUE on mat

RE: [PATCH][GCC-10 Backport] arm: Fix the MVE ACLE vbicq intrinsics.

2020-06-16 Thread Kyrylo Tkachov
> -Original Message- > From: Srinath Parvathaneni > Sent: 16 June 2020 11:53 > To: gcc-patches@gcc.gnu.org > Cc: Kyrylo Tkachov > Subject: [PATCH][GCC-10 Backport] arm: Fix the MVE ACLE vbicq intrinsics. > > Hello, > > Following MVE intrinsic testcases are failing in GCC testsuite. >

RE: [PATCH][GCC-10 Backport] arm: Fix unintentional fall throughs in arm.c

2020-06-16 Thread Kyrylo Tkachov
> -Original Message- > From: Srinath Parvathaneni > Sent: 16 June 2020 11:52 > To: gcc-patches@gcc.gnu.org > Cc: Kyrylo Tkachov > Subject: [PATCH][GCC-10 Backport] arm: Fix unintentional fall throughs in > arm.c > > Hi all, > > This small patch fix some unintentional fall-throughs in

Re: [PATCH] Defined libcall_arg_t

2020-06-16 Thread Kamlesh Kumar via Gcc-patches
thanks Richard, addressed your concern. diff --git a/gcc/rtl.h b/gcc/rtl.h index 0872cc4..7206c8a 100644 --- a/gcc/rtl.h +++ b/gcc/rtl.h @@ -2238,6 +2238,16 @@ struct address_info {    enum rtx_code base_outer_code;  }; +/* This is used for passing args in emit_library_* functions */ +struct li

[PATCH] libiberty, include: add bsearch_r

2020-06-16 Thread Nick Alcock via Gcc-patches
A resend of something I sent over, sheesh, six months ago. Jeff Law acked it but, well, it was six months ago. I think getting a re-ack might be a good idea. (Also... could someone push it for me? I should have push privs, but only on binutils and I have yet to test them. Starting my pushing car

Re: gcc.dg testsuite glitches

2020-06-16 Thread Thomas Schwinge
Hi! On 2020-04-28T11:12:56+0200, Manfred Schwarb wrote: > I guess this goes under the obvious and trivial rules. > > There are several malformed dejagnu directives in the gcc.dg testsuite. Generally, ACK, and thanks for the cleanup. > Below I fixed some of them following these criteria: > - fix

[Patch] OpenMP/Fortran: Permit impure ELEMENTAL in omp directives

2020-06-16 Thread Tobias Burnus
Hi all, when looking into a PURE/ELEMENTAL issue with OpenACC, Thomas and I came across the analogous OpenMP code – and stumbled over ELEMENTAL. In Fortran, ELEMENTAL implies PURE but one can also have an IMPURE ELEMENTAL procedure. As PR 79154 quotes, OpenMP 4 had: "OpenMP directives may not a

Re: [PATCH][v2] tree-optimization/94988 - enhance SM some more

2020-06-16 Thread Thomas Schwinge
Hi! On 2020-05-11T16:51:41+0200, Richard Biener wrote: > This enhances store-order preserving store motion to handle the case > of non-invariant dependent stores in the sequence of unconditionally > executed stores on exit by re-issueing them as part of the sequence > of stores on the exit. This

Re: [Patch] OpenMP/Fortran: Permit impure ELEMENTAL in omp directives

2020-06-16 Thread Jakub Jelinek via Gcc-patches
On Tue, Jun 16, 2020 at 01:27:43PM +0200, Tobias Burnus wrote: > when looking into a PURE/ELEMENTAL issue with OpenACC, Thomas and > I came across the analogous OpenMP code – and stumbled over > ELEMENTAL. > > In Fortran, ELEMENTAL implies PURE but one can also have an IMPURE > ELEMENTAL procedure

RE: [PATCH][GCC-10 Backport] arm: Fix the wrong code-gen generated by MVE vector load/store intrinsics (PR94959).

2020-06-16 Thread Kyrylo Tkachov
> -Original Message- > From: Srinath Parvathaneni > Sent: 16 June 2020 11:50 > To: gcc-patches@gcc.gnu.org > Cc: Kyrylo Tkachov > Subject: [PATCH][GCC-10 Backport] arm: Fix the wrong code-gen generated > by MVE vector load/store intrinsics (PR94959). > > Hello, > > Few MVE intrinsics

RE: [PATCH][GCC-10 Backport] arm: Correct the grouping of operands in MVE vector scatter store intrinsics (PR94735).

2020-06-16 Thread Kyrylo Tkachov
> -Original Message- > From: Srinath Parvathaneni > Sent: 16 June 2020 11:53 > To: gcc-patches@gcc.gnu.org > Cc: Kyrylo Tkachov > Subject: [PATCH][GCC-10 Backport] arm: Correct the grouping of operands in > MVE vector scatter store intrinsics (PR94735). > > Hello, > > The operands in

RE: [PATCH][GCC] arm: Fix MVE scalar shift intrinsics code-gen.

2020-06-16 Thread Kyrylo Tkachov
> -Original Message- > From: Srinath Parvathaneni > Sent: 15 June 2020 09:46 > To: gcc Patches > Cc: Kyrylo Tkachov ; Richard Earnshaw > > Subject: [PATCH][GCC] arm: Fix MVE scalar shift intrinsics code-gen. > > Hello, > > This patch modifies the MVE scalar shift RTL patterns. The c

RE: [PATCH][GCC] arm: Fix the MVE ACLE vaddq_m polymorphic variants.

2020-06-16 Thread Kyrylo Tkachov
> -Original Message- > From: Srinath Parvathaneni > Sent: 04 June 2020 17:57 > To: gcc-patches@gcc.gnu.org > Cc: Kyrylo Tkachov > Subject: [PATCH][GCC] arm: Fix the MVE ACLE vaddq_m polymorphic variants. > > Hello, > > This patch fixes the MVE ACLE vaddq_m polymorphic variants by mod

RE: [PATCH][GCC][Aarch64]: Fix for PR94880: Failure to recognize andn pattern

2020-06-16 Thread Przemyslaw Wirkus
On 12 June 2020 20:55 Andrew Pinski wrote: > Subject: Re: [PATCH][GCC][Aarch64]: Fix for PR94880: Failure to recognize > andn pattern > > On Fri, Jun 12, 2020 at 7:50 AM Przemyslaw Wirkus > wrote: > > > > Hi all, > > > > Pattern "(x | y) - y" can be optimized to simple "(x & ~y)" andn pattern. >

Re: [PATCH][v2] tree-optimization/94988 - enhance SM some more

2020-06-16 Thread Richard Biener
On Tue, 16 Jun 2020, Thomas Schwinge wrote: > Hi! > > On 2020-05-11T16:51:41+0200, Richard Biener wrote: > > This enhances store-order preserving store motion to handle the case > > of non-invariant dependent stores in the sequence of unconditionally > > executed stores on exit by re-issueing th

Re: [PATCH] middle-end/95690 - avoid MEM_EXPRs for constants

2020-06-16 Thread Richard Biener
On Tue, 16 Jun 2020, Richard Biener wrote: > > [the following fixes fallout of the last change which introduced > an assert - after this change we can likely trim down the set > of tree codes we "ignore"] > > The following avoids calling set_mem_attributes on the > DECL_INITIAL of a CONST_DECL w

Re: [PATCH] ipa: special pass-through op for Fortran strides

2020-06-16 Thread Martin Jambor
Hi, On Mon, Jun 15 2020, Jan Hubicka wrote: >> On Fri, Jun 12, 2020 at 11:28 PM Martin Jambor wrote: >> > >> > Hi, >> > >> > when Fortran functions pass array descriptors they receive as a >> > parameter to another function, they actually rebuild it. Thanks to >> > work done mainly by Feng, IPA-

Re: [PATCH] Defined libcall_arg_t

2020-06-16 Thread Richard Sandiford
Kamlesh Kumar writes: > thanks Richard, > > addressed your concern. > > diff --git a/gcc/rtl.h b/gcc/rtl.h > index 0872cc4..7206c8a 100644 > --- a/gcc/rtl.h > +++ b/gcc/rtl.h > @@ -2238,6 +2238,16 @@ struct address_info { >    enum rtx_code base_outer_code; >  }; > > +/* This is used for passing

Re: [stage1][PATCH] Change semantics of -frecord-gcc-switches and add -frecord-gcc-switches-format.

2020-06-16 Thread Martin Liška
PING^3 On 6/2/20 11:16 AM, Martin Liška wrote: PING^2 On 5/15/20 11:58 AM, Martin Liška wrote: We're in stage1: PING^1 On 4/3/20 8:15 PM, Egeyar Bagcioglu wrote: On 3/18/20 10:05 AM, Martin Liška wrote: On 3/17/20 7:43 PM, Egeyar Bagcioglu wrote: Hi Martin, I like the patch. It definite

[PATCH] gcov: fix gcov-tool merge for TOPN counters

2020-06-16 Thread Martin Liška
Hello. The patch is about corrupted gcov-tool merge command for a TOPN counter. What was missing is transition of a on-disk representation to a memory representation expected by __gcov_merge_topn function. Patch can bootstrap on x86_64-linux-gnu and survives regression tests. I'm going to instal

RE: [PATCH PR95199 v2] vect: CSE for bump and offset in strided load/store operations

2020-06-16 Thread zhoukaipeng (A)
Bootstrapped and tested on aarch64-linux-gnu & x86_64-linux-gnu. Could you please help install this patch? Kaipeng Zhou > -Original Message- > From: Richard Biener [mailto:rguent...@suse.de] > Sent: Tuesday, June 16, 2020 5:49 PM > To: zhoukaipeng (A) > Cc: Richard Sandiford ; gcc- > p

Re: [PATCH] c++: zero_init_expr_p of dependent expression

2020-06-16 Thread Patrick Palka via Gcc-patches
On Thu, Apr 23, 2020 at 5:17 PM Jason Merrill wrote: > > On 4/23/20 4:09 PM, Patrick Palka wrote: > > This fixes a ICE coming from mangle.c:write_expression when compiling the > > ranges-v3 testsuite; the added testcase is a reduced reproducer of the ICE. > > > > Bootstrapped and regtested on x86_

[Ada] Fix small fallout of freezing change for expression functions

2020-06-16 Thread Pierre-Marie de Rodat
The previous change implemented the rule in Freeze_Expression that expression functions that are not completions are not freeze points. However, for code generation purposes, the artificial entities that are created during the expansion of the expressions must still be frozen inside the body create

[Ada] Fix spurious error on implicit dereference for private type

2020-06-16 Thread Pierre-Marie de Rodat
This is a fallout of the earlier work on the handling of Ada 95 implicit dereferences. The dereferences are now made explicit only at the final stage of type resolution and this slightly changes the way they are analyzed during semantic analysis. In particular, in the case of an implicit derefere

[Ada] Spurious undefined symbol with nested call to expression function

2020-06-16 Thread Pierre-Marie de Rodat
The compiler creates a link failure involving an expression function that is not a completion when the expression of the expression function includes a call to a function F declared in on outer scope of the same package declaration, becausw the compiler places the freeze node for F in the generated

[Ada] Check if attribute Passed_By_Reference is called on incomplete types

2020-06-16 Thread Pierre-Marie de Rodat
Problem: When Passed_By_Reference is used on an incomplete type (e.g. `type T; B : Boolean := T'Passed_By_Reference;`) GNAT crashes in Gigi because it doesn't know the size of T. Solution: Reject programs that use Passed_By_Reference on incomplete types, just like what is currently done for the Al

[Ada] Implement AI12-0351 Matching for actuals for formal derived types

2020-06-16 Thread Pierre-Marie de Rodat
This implements the AI in all versions of the language, since it is a binding interpretation. The AI extends the 12.5.1(8) subclause: "For a generic formal derived type with no discriminant_part, the actual subtype shall be statically compatible with the ancestor subtype" from constained types to

[Ada] Accept renamings of folded string aggregates

2020-06-16 Thread Pierre-Marie de Rodat
Routine Is_Object_Reference, which implements Ada RM 3.3(2) that says "All of the following are objects: ..." was slightly diverging from the exact wording of that rule and from the exact wording of AI05-0003, which allows qualified expressions to be used as objects (provided that their expression

[Ada] Force evaluation of qualified aggregates

2020-06-16 Thread Pierre-Marie de Rodat
This patch fixes regressions in GNATprove, after a previous patch changed routine Is_Object_Reference to literally implement the Ada RM and recognize aggregates as objects. Now routine Evaluate_Name also literally implements the Ada RM rules about name evaluation; in particular, it restores forced

[Ada] ACATS 4.1K - B452001 - No errors detected

2020-06-16 Thread Pierre-Marie de Rodat
This is a test against RM 4.5.2(4.1/4), the rule that ensures that equality is visible for a membership involving objects. GNAT wasn't handling this case properly because during the rewrite of membership tests, the legality rules were bypassed as the rewrite was no longer treated as if it came from

[Ada] ACATS 4.1P - C432003 - Errors missed on extension aggregates

2020-06-16 Thread Pierre-Marie de Rodat
This ACATS test show that GNAT was not implementing AI05-0115 properly, now fixed by checking the relevant parent type. Tested on x86_64-pc-linux-gnu, committed on trunk 2020-06-16 Arnaud Charlet gcc/ada/ * sem_aggr.adb (Resolve_Extension_Aggregate): Fix implementation of AI0

[Ada] Force evaluation of operator calls in renamings

2020-06-16 Thread Pierre-Marie de Rodat
When renaming a qualified expression with an operator, e.g.: Y : Boolean renames Boolean'(not X); routine Evaluate_Name should handle operators just like it handles function calls. This doesn't appear to matter for GNAT (where this routine is called in very few cases, as described in the comme

[Ada] Fix assertion failure on qualified type names in predicates

2020-06-16 Thread Pierre-Marie de Rodat
An assertion is code for static membership tests was failing on this code: subtype A is Integer with predicate => A > 0; subtype B is Integer with predicate => B in P.A; where a qualified type name "P.A" appears in the predicate of type B. The fix is trivial and the problem didn'

[Ada] ACATS 4.1P - BC55001 - Error missed

2020-06-16 Thread Pierre-Marie de Rodat
This ACATS test shows that we are not checking legality of functions returning interfaces that need to be abstract. Tested on x86_64-pc-linux-gnu, committed on trunk 2020-06-16 Arnaud Charlet gcc/ada/ * sem_ch6.adb (Analyze_Subprogram_Specification): Generate error message fo

[Ada] ACATS C452005/C452006 memberships use wrong equality operation

2020-06-16 Thread Pierre-Marie de Rodat
ACATS tests C452005 and C452006 show that GNAT is using the wrong equality operation for non record/non limited types as defined in RM 4.5.2 (28.1/4). This is actually a follow up/complement of the previous change for ACATS B452001 against RM 4.5.2(4.1/4). Tested on x86_64-pc-linux-gnu, committed

[Ada] Fix premature freezing of artificial array subtype

2020-06-16 Thread Pierre-Marie de Rodat
This prevents the compiler from placing the freeze node of an array subtype, generated for the expression of an if-expression whose type is an array type declared with a predicate, ahead of this expression and, in particular, before its declaration. Tested on x86_64-pc-linux-gnu, committed on trun

[Ada] Enable literal aspect specifications in Big_Numbers specs

2020-06-16 Thread Pierre-Marie de Rodat
Specify the Integer_Literal aspect for the type Ada.Numerics.Big_Numbers.Big_Integers.Big_Integer. Specify the Real_Literal aspect for the type Ada.Numerics.Big_Numbers.Big_Reals.Big_Real. Tested on x86_64-pc-linux-gnu, committed on trunk 2020-06-16 Steve Baird gcc/ada/ * libgnat/a-

[Ada] Implement AI12-0216 on restricting overlap errors in calls

2020-06-16 Thread Pierre-Marie de Rodat
This patch implements A12-0216, which clarifies RM 6.4.1 (6.16-17/3) concerning illegal overlappings between actuals in a call. The previous illegality rule applied to a call in which two writable actuals, one of them having an elementary type, are known to overlap. The new rule states that illegal

[Ada] Crash in tagged type constructor with task components

2020-06-16 Thread Pierre-Marie de Rodat
This patch fixes the regressions introduced in CodePeer (caused by missing support for thunks) and enforces checks on BIP formals in the frontend to avoid mismatch when their values are passed as actuals of BIP calls. Tested on x86_64-pc-linux-gnu, committed on trunk 2020-06-16 Javier Miranda

[Ada] Crash in tagged type constructor with task components

2020-06-16 Thread Pierre-Marie de Rodat
This patch removes part of the patch added to process the run-time package system.ads; it is not needed because we now rely on Targparm.Restrictions_On_Target. Tested on x86_64-pc-linux-gnu, committed on trunk 2020-06-16 Javier Miranda gcc/ada/ * sem_prag.adb (Process_Restrictions_Or

[Ada] Implement AI12-0249, AI12-0295 (user-defined numeric & string literals)

2020-06-16 Thread Pierre-Marie de Rodat
Implement Ada 202x's Integer_Literal, Real_Literal, and String_Literal aspects. This is just a preliminary implementation; interactions with controlled types, build-in-place functions, abstract types, interface types, aspects specifying an operator (e.g, "+"), mandatory aspect overriding, and many

[Ada] Minor casing of " The " after a comma in docs and comments

2020-06-16 Thread Pierre-Marie de Rodat
Fix wrong casing in phrases like "something, The"; also, fix other small typos in comments. Tested on x86_64-pc-linux-gnu, committed on trunk 2020-06-16 Piotr Trojanek gcc/ada/ * checks.adb, doc/gnat_ugn/the_gnat_compilation_model.rst, einfo.ads, exp_ch5.adb, exp_ch7.adb, lib

[Ada] Expand 'Pos and 'Val for enumeration types with standard representation

2020-06-16 Thread Pierre-Marie de Rodat
This changes the front-end to expand the 'Pos and 'Val attributes for enumeration types with standard representation. It turns out that this was the only remaining case where it does not expand them, as it does so for enumeration types with non-standard representation as well as for integer types.

[Ada] Fix spurious error on derived private type with predicate

2020-06-16 Thread Pierre-Marie de Rodat
As explained in the head comment of Compatible_Types_In_Predicate, anomalies involving private and full views can occur when a call to a predicate or invariant function is generated by the compiler. The function uses the child function Common_Type to reconcile the various views of a private type,

[Ada] Declare expressions

2020-06-16 Thread Pierre-Marie de Rodat
This patch implements AI12-0236-1, declare expressions. They are implemented in terms of N_Expression_With_Actions, which has the same semantics. A superset of the semantics, actually. Tested on x86_64-pc-linux-gnu, committed on trunk 2020-06-16 Bob Duff gcc/ada/ * par-ch4.adb (P_Cas

[Ada] Improve bug box customer language

2020-06-16 Thread Pierre-Marie de Rodat
The language used in the bugbox for a customer to report an error message is missing an upper-case for the start of a sentence and also could be worded a bit clearer. Tested on x86_64-pc-linux-gnu, committed on trunk 2020-06-16 Richard Kenner gcc/ada/ * comperr.adb (Compiler_Abort):

[Ada] Reuse Is_Object where possible

2020-06-16 Thread Pierre-Marie de Rodat
Reuse a high-level Is_Object, which is meant to be more readable than a low-level membership test with Ekind. Semantics is unaffected. Tested on x86_64-pc-linux-gnu, committed on trunk 2020-06-16 Piotr Trojanek gcc/ada/ * einfo.adb, exp_spark.adb, exp_util.adb, sem_eval.adb: Replace

[Ada] Change how we detect internal protected subprograms

2020-06-16 Thread Pierre-Marie de Rodat
We don't always have Convention_Protected, so test for presence of Protected_Body_Subprogram. Tested on x86_64-pc-linux-gnu, committed on trunk 2020-06-16 Richard Kenner gcc/ada/ * exp_unst.adb (Subp_Index): Change way we detect internal protected subprograms.--- gcc/ada/exp_

Re: [PATCH] vectorizer: add _bb_vec_info::const_iterator

2020-06-16 Thread Martin Liška
On 6/16/20 10:50 AM, Richard Sandiford wrote: Martin Liška writes: Also, one minor formatting nit, sorry: the other functions instead indent the “{” block by the same amount as the function prototype, which seems more consistent with the usual out-of-class formatting. Hope I fixed that. Sor

Re: [PATCH] recog: Use parameter packs for operator()

2020-06-16 Thread Jonathan Wakely via Gcc-patches
On 16/06/20 11:42 +0100, Richard Sandiford wrote: Jonathan Wakely writes: + template + rtx_insn *operator() (Ts... args...) const Why is this declared as a variadic template **and** a varargs function? I think the second ellipsis is wrong, it should be just: + template + rtx_insn *operat

OpenACC/Fortran: permit 'routine' inside PURE

2020-06-16 Thread Tobias Burnus
While OpenACC 2.0 had "OpenACC directives may not appear in Fortran PURE or ELEMENTAL procedures" OpenACC 2.5 relaxed this. This patch permits 'acc routine' (with explicit or implicit 'seq' clause) inside PURE procedures. The 'match' → 'matcha' change permits that the gfc_errors inside the 'rou

Re: [PATCH] vectorizer: add _bb_vec_info::const_iterator

2020-06-16 Thread Richard Sandiford
Martin Liška writes: > On 6/16/20 10:50 AM, Richard Sandiford wrote: >> Martin Liška writes: Also, one minor formatting nit, sorry: the other functions instead indent the “{” block by the same amount as the function prototype, which seems more consistent with the usual out-of-class

Re: PING^2: [PATCH] x86: Add UNSPECV_PATCHABLE_AREA

2020-06-16 Thread Jakub Jelinek via Gcc-patches
On Tue, Jun 09, 2020 at 09:34:01AM -0700, H.J. Lu via Gcc-patches wrote: > > > * gcc.target/i386/pr93492-3.c: Likewise. > > > * gcc.target/i386/pr93492-5.c: Likewise. These tests FAIL on i686-linux. E.g. in the first one I see .file "pr93492-3.c" .text .gl

Re: PING^2: [PATCH] x86: Add UNSPECV_PATCHABLE_AREA

2020-06-16 Thread H.J. Lu via Gcc-patches
On Tue, Jun 16, 2020 at 7:17 AM Jakub Jelinek wrote: > > On Tue, Jun 09, 2020 at 09:34:01AM -0700, H.J. Lu via Gcc-patches wrote: > > > > * gcc.target/i386/pr93492-3.c: Likewise. > > > > * gcc.target/i386/pr93492-5.c: Likewise. > > These tests FAIL on i686-linux. > E.g. in the firs

[committed] openmp: Diagnose invalid OpenMP schedule(simd, static)

2020-06-16 Thread Jakub Jelinek via Gcc-patches
Hi! I've noticed we weren't diagnosing this, fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux, committed to trunk. 2020-06-16 Jakub Jelinek gcc/c/ * c-parser.c (c_parser_omp_clause_schedule): Reject modifier separated from kind by comma rather than colon. gc

Re: [Patch] OpenMP/Fortran: Permit impure ELEMENTAL in omp directives

2020-06-16 Thread Thomas Schwinge
Hi! On 2020-06-16T13:27:43+0200, Tobias Burnus wrote: > when looking into a PURE/ELEMENTAL issue with OpenACC, Thomas and > I came across the analogous OpenMP code – and stumbled over > ELEMENTAL. > > In Fortran, ELEMENTAL implies PURE but one can also have an IMPURE > ELEMENTAL procedure. > > As

[committed] openmp: Initial part of OpenMP 5.0 non-rectangular loop support

2020-06-16 Thread Jakub Jelinek via Gcc-patches
Hi! OpenMP 5.0 adds support for non-rectangular loop collapses, e.g. triangular and more complex. This patch deals just with the diagnostics so that they aren't rejected immediately as before. As the spec generally requires as before that the iteration variable initializer and bound in the compa

Re: [PATCH] S/390: Emit vector alignment hints for z13 if AS accepts them

2020-06-16 Thread Andreas Krebbel via Gcc-patches
On 16.06.20 10:26, Stefan Schulze Frielinghaus wrote: > Since 87cb9423add vector alignment hints are emitted for target z13, > too. This patch changes this behaviour in the sense that alignment > hints are only emitted for target z13 if the assembler accepts them. > > Bootstrapped and regtested o

Re: [Patch] OpenMP/Fortran: Permit impure ELEMENTAL in omp directives

2020-06-16 Thread Tobias Burnus
Ups. Good catch. – I think the follow-up patch is obvious. Unless there are comments, I will commit it as such. Tobias On 6/16/20 4:41 PM, Thomas Schwinge wrote: Hi! On 2020-06-16T13:27:43+0200, Tobias Burnus wrote: when looking into a PURE/ELEMENTAL issue with OpenACC, Thomas and I came ac

[PATCH v2, RS6000 PR target/94954] Fix wrong codegen for vec_pack_to_short_fp32() builtin

2020-06-16 Thread will schmidt via Gcc-patches
[PATCH v2, PR target/94954] Fix wrong codegen for vec_pack_to_short_fp32() builtin Hi, Fix codegen for builtin vec_pack_to_short_fp32. This includes adding a define_insn for xvcvsphp, and adding a new define_expand for convert_4f32_8f16. [v2] Comment on altivec.md "convert_4f32_8f16"

Re: [PATCH v2] c++: Don't allow designated initializers with non-aggregates [PR95369]

2020-06-16 Thread Jason Merrill via Gcc-patches
On 6/15/20 4:56 PM, Marek Polacek wrote: On Thu, Jun 11, 2020 at 06:15:26PM -0400, Jason Merrill via Gcc-patches wrote: On 6/11/20 5:28 PM, Marek Polacek wrote: On Thu, Jun 11, 2020 at 03:51:29PM -0400, Jason Merrill wrote: On 6/9/20 2:17 PM, Marek Polacek wrote: Another part of 95369 is that

Re: [PATCH] c++: zero_init_expr_p of dependent expression

2020-06-16 Thread Jason Merrill via Gcc-patches
On 6/16/20 9:06 AM, Patrick Palka wrote: On Thu, Apr 23, 2020 at 5:17 PM Jason Merrill wrote: On 4/23/20 4:09 PM, Patrick Palka wrote: This fixes a ICE coming from mangle.c:write_expression when compiling the ranges-v3 testsuite; the added testcase is a reduced reproducer of the ICE. Bootstr

Re: [PATCH] c++: Fix ICE in check_local_shadow with enum [PR95560]

2020-06-16 Thread Jason Merrill via Gcc-patches
On 6/15/20 9:20 PM, Marek Polacek wrote: On Thu, Jun 11, 2020 at 03:32:14PM -0400, Jason Merrill wrote: On 6/10/20 5:11 PM, Marek Polacek wrote: Another indication that perhaps this warning is emitted too early. We crash because same_type_p gets a null type: we have an enumerator without a fix

Re: [PATCH] avoid false positives due to compute_objsize (PR 95353)

2020-06-16 Thread Jeff Law via Gcc-patches
On Mon, 2020-06-15 at 11:10 -0600, Martin Sebor wrote: > > That's fine. Since they are treated as equivalent it shouldn't > matter which of the equivalent alternatives is chosen (there > may be many). It's the particular choice of the smaller member > that makes it a problem: both in the terms o

Re: [PATCH] sanitizer: do not inline no-sanitize into sanitizer fn

2020-06-16 Thread Jakub Jelinek via Gcc-patches
Hi! On Tue, Jun 09, 2020 at 09:58:11PM +0200, Martin Liška wrote: > On 6/9/20 9:42 PM, Rainer Orth wrote: > > Excess errors: > > cc1: error: '-fsanitize=address' is incompatible with > > '-fsanitize=kernel-address' > > Sorry for that, I'm going to install the following patch. These tests are UN

[PATCH] middle-end: Add another testcase for PR 95493

2020-06-16 Thread Jonathan Wakely via Gcc-patches
This was reported on the gcc-help mailing list. The regression started with r10-589 and was fixed by r11-963. gcc/testsuite/ChangeLog: * g++.dg/torture/pr95493-1.C: New test. Tested x86_64-linux. OK for master? commit 03f6e6bea110994d4e1d49a2469f808082d5bded Author: Jonathan Wakely Da

PING^2: V5 [PATCH] x86: Move cpuinfo.h from libgcc to common/config/i386

2020-06-16 Thread H.J. Lu via Gcc-patches
On Tue, Jun 9, 2020 at 9:35 AM H.J. Lu wrote: > > On Tue, May 26, 2020 at 6:27 AM Martin Liška wrote: > > > > On 5/26/20 1:59 PM, H.J. Lu wrote: > > > On Tue, May 26, 2020 at 2:30 AM Martin Liška wrote: > > >> > > >> On 5/25/20 7:42 PM, H.J. Lu wrote: > > >>> Here is the updated patch. OK for m

Re: [PATCH] avoid false positives due to compute_objsize (PR 95353)

2020-06-16 Thread Martin Sebor via Gcc-patches
On 6/16/20 10:13 AM, Jeff Law wrote: On Mon, 2020-06-15 at 11:10 -0600, Martin Sebor wrote: That's fine. Since they are treated as equivalent it shouldn't matter which of the equivalent alternatives is chosen (there may be many). It's the particular choice of the smaller member that makes it

Re: [PATCH 1/6 ver 2] rs6000, Update support for vec_extract

2020-06-16 Thread will schmidt via Gcc-patches
On Mon, 2020-06-15 at 16:37 -0700, Carl Love via Gcc-patches wrote: > v2 changes > > config/rs6000/altivec.md log entry for move from changed as > suggested. > > config/rs6000/vsx.md log entro for moved to here changed as > suggested. > > define_mode_iterator VI2 also moved, included in both cha

Re: [PATCH 3/6 ver 2] rs6000, Add vector replace builtin support

2020-06-16 Thread will schmidt via Gcc-patches
On Mon, 2020-06-15 at 16:37 -0700, Carl Love via Gcc-patches wrote: > v2 fixes: > > change log entries config/rs6000/vsx.md, config/rs6000/rs6000-builtin.def, > config/rs6000/rs6000-call.c. > > gcc/config/rs6000/rs6000-call.c: fixed if check for 3rd arg between 0 and 3 >

[pushed] PR tree-optimization/95649: Fix pasto in the substitute_and_fold_engine merge with evrp.

2020-06-16 Thread Aldy Hernandez via Gcc-patches
The original code only propagated into PHI arguments if the value was a constant. This behavior was lost in the conversion, allowing any value (SSAs for instance) to be propagated into PHIs. Pre-approved by Jeff in the PR. Aldy commit 8fb4d1d58362b77da78c09740c6b5562124a369e Author: Aldy Hern

Re: [PATCH 1/3] rs6000: Add base support and types for defining MMA built-ins.

2020-06-16 Thread Peter Bergner via Gcc-patches
On 6/15/20 5:43 PM, will schmidt wrote: > On Mon, 2020-06-15 at 14:56 -0500, Peter Bergner via Gcc-patches wrote: >> * config/rs6000/rs6000-cpus.def (OTHER_FUTURE_MASKS): Add >> OPTION_MASK_MMA. >> (POWERPC_MASKS): Likewise. > > Don't see POWERPC_MASKS in the patch here. It's this

Re: [PATCH 2/3] rs6000: Add MMA built-in function definitions

2020-06-16 Thread Peter Bergner via Gcc-patches
On 6/15/20 5:43 PM, will schmidt wrote: > checked noses, all have been found below. Thanks for verifying! >> * config/rs6000/rs6000.md ('type' attribute): Add mma type. > > (mma) : New 'type' attribute. I just copied what someone else did, but agree this is more readable. Will change.

Re: [PATCH] avoid false positives due to compute_objsize (PR 95353)

2020-06-16 Thread Martin Sebor via Gcc-patches
On 6/16/20 3:33 AM, Richard Biener wrote: On Mon, Jun 15, 2020 at 7:11 PM Martin Sebor via Gcc-patches wrote: On 6/14/20 12:37 PM, Jeff Law wrote: On Sat, 2020-06-13 at 17:49 -0600, Martin Sebor wrote: On 6/13/20 3:50 PM, Sandra Loosemore wrote: On 6/2/20 6:12 PM, Martin Sebor via Gcc-patch

Re: [PATCH 2/6 ver 2] rs6000 Add vector insert builtin support

2020-06-16 Thread will schmidt via Gcc-patches
On Mon, 2020-06-15 at 16:37 -0700, Carl Love via Gcc-patches wrote: > v2 changes > > Fix change log entry for config/rs6000/altivec.h > > Fix change log entry for config/rs6000/rs6000-builtin.def > > Fix change log entry for config/rs6000/rs6000-call.c > > vsx.md: Fixed if (BYTES_BIG_ENDIAN) el

[PATCH] PR fortran/95688 - ICE in gfc_get_string, at fortran/iresolve.c:70

2020-06-16 Thread Harald Anlauf
Here's an almost obvious one on a testcase by Gerhard, which triggered an internal error since the buffer size was checked. By looking at the format string and arguments used in name mangling, I decided to stick with the simple approach of using a fixed size buffer, but larger. Regtested on x86_6

Re: [PATCH 4/6 ver 2] rs6000, Add vector shift double builtin support

2020-06-16 Thread will schmidt via Gcc-patches
On Mon, 2020-06-15 at 16:38 -0700, Carl Love via Gcc-patches wrote: > v2 fixes: > > change logs redone > > gcc/config/rs6000/rs6000-call.c - added spaces before parenthesis around > args. > > - > GCC maintainers: > > The follow

Re: [PATCH 5/6 ver 2] rs6000, Add vector splat builtin support

2020-06-16 Thread will schmidt via Gcc-patches
On Mon, 2020-06-15 at 16:38 -0700, Carl Love via Gcc-patches wrote: > v2 changes: > > change log fixes > > gcc/config/rs6000/altivec changed name of define_insn and define_expand > for vxxspltiw... to xxspltiw... Fixed spaces in > gen_xxsplti32dx_v4sf_inst (operands[0], GEN_INT >

Re: [PATCH 2/3] rs6000: Add MMA built-in function definitions

2020-06-16 Thread Segher Boessenkool
Hi! On Tue, Jun 16, 2020 at 02:02:36PM -0500, Peter Bergner wrote: > On 6/15/20 5:43 PM, will schmidt wrote: > >>* config/rs6000/rs6000.md ('type' attribute): Add mma type. > > > > (mma) : New 'type' attribute. > > I just copied what someone else did, but agree this is more readable. > Will

Re: [PATCH 6/6 ver 2] rs6000 Add vector blend, permute builtin support

2020-06-16 Thread will schmidt via Gcc-patches
On Mon, 2020-06-15 at 16:38 -0700, Carl Love via Gcc-patches wrote: > v2 changes: > >Updated ChangeLog per comments. > >define_expand "xxpermx", Updated implementation to use XOR Unclear.. Updated implementation of the xxpermx ? >(icode == CODE_FOR_xxpermx, fix comments and check

  1   2   >