Re: [PATCH] pch: Add support for PCH for relocatable executables

2021-11-09 Thread Iain Sandoe
> On 9 Nov 2021, at 07:12, Richard Biener wrote: > > On Mon, 8 Nov 2021, Jakub Jelinek wrote: > >> On Mon, Nov 08, 2021 at 12:46:04PM +0100, Jakub Jelinek via Gcc-patches >> wrote: >>> So, if we want to make PCH work for PIEs, I'd say we can: >>> 1) add a new GTY option, say callback, which

[PATCH] Fix clang -Wcast-qual warning.

2021-11-09 Thread Martin Liška
Pushed as obvious. Martin gcc/ChangeLog: * genconditions.c (write_one_condition): Add const qualifier to pointer casting. --- gcc/genconditions.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/genconditions.c b/gcc/genconditions.c index a237df50127..b7f

Re: Values of WIDE_INT_MAX_ELTS in gcc11 and gcc12 are different

2021-11-09 Thread Jakub Jelinek via Gcc-patches
On Tue, Nov 09, 2021 at 08:13:57AM +0100, Richard Biener wrote: > > Hi, I tried both the following patches: > > > > Patch1: > > > > [opc@qinzhao-ol8u3-x86 gcc]$ git diff > > diff --git a/gcc/internal-fn.c b/gcc/internal-fn.c > > index 0cba95411a6..ca49d2b4514 100644 > > --- a/gcc/internal-fn.c > >

Re: Some PINGs

2021-11-09 Thread Richard Biener via Gcc-patches
On Mon, Nov 8, 2021 at 4:40 PM Richard Biener wrote: > > On Mon, Nov 8, 2021 at 3:02 PM Roger Sayle wrote: > > > > > > Hi Richard, > > > > >> I wonder if reviewers could take a look (or a second look) at some of > > >> my outstanding patches. > > >> PR middle-end/100810: Penalize IV candidates wi

Re: [AArch64] Fix NEON load/store gimple lowering and big-endian testisms

2021-11-09 Thread Andre Vieira (lists) via Gcc-patches
Thank you both! Here is a reworked version, this OK for trunk?diff --git a/gcc/config/aarch64/aarch64-builtins.c b/gcc/config/aarch64/aarch64-builtins.c index a815e4cfbccab692ca688ba87c71b06c304abbfb..e06131a7c61d31c1be3278dcdccc49c3053c78cb 100644 --- a/gcc/config/aarch64/aarch64-builtins.c +

Re: [PATCH] vect: Hookize better_loop_vinfo_p

2021-11-09 Thread Richard Biener via Gcc-patches
On Mon, Nov 8, 2021 at 3:46 PM Richard Sandiford wrote: > > Richard Biener via Gcc-patches writes: > > On Mon, Nov 8, 2021 at 2:06 PM Richard Sandiford > > wrote: > >> > >> Richard Biener writes: > >> > On Mon, Nov 8, 2021 at 11:45 AM Richard Sandiford via Gcc-patches > >> > wrote: > >> >> > >

[PATCH] c++: Fix ICE on complex constant with -frounding-math [PR103114]

2021-11-09 Thread Jakub Jelinek via Gcc-patches
Hi! The FE uses build_complex which assumes that fold_convert will fold value to a constant. With -frounding-math that isn't guaranteed though. So, the patch instead fold_build2s COMPLEX_EXPR, which will result in build_complex if both arguments are constants, and otherwise will build COMPLEX_EXP

Re: [PATCH] pch: Add support for PCH for relocatable executables

2021-11-09 Thread Jakub Jelinek via Gcc-patches
On Tue, Nov 09, 2021 at 08:12:05AM +0100, Richard Biener wrote: > > So, here is 1), 2), 3) implemented. With this patch alone, > > g++.dg/pch/system-2.C test ICEs. This is because GCC 12 has added > > function::x_range_query member, which is set to &global_ranges on > > cfun creation and is: > >

[Ada] Build activation chain for BIP only when needed

2021-11-09 Thread Pierre-Marie de Rodat via Gcc-patches
In some cases, BIP references tasking while it is not needed. Check if this is needed before adding this reference. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * exp_ch6.adb (Expand_Actuals): Add a condition to check for the possibility of task.diff --git a/gcc/ad

[Ada] Guard against illegal items in Global but not Depends

2021-11-09 Thread Pierre-Marie de Rodat via Gcc-patches
An illegal item appearing in the Global contract but missing from the Depends contract was crashing the compiler. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_prag.adb (Check_Usage): Guard against calling Usage_Error with illegal Item_Id. The intention to do t

[Ada] Fix support for prefixed call with incomplete type declarations

2021-11-09 Thread Pierre-Marie de Rodat via Gcc-patches
GNAT crashes when using -gnatX on code with an incomplete type declaration, due to a missing initialization of the list meant to store primitive operations. Now fixed. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_ch3.adb (Analyze_Incomplete_Type_Decl): Add the missing

[Ada] Fix detection of array aggregates with single others associations

2021-11-09 Thread Pierre-Marie de Rodat via Gcc-patches
Detection of array aggregates of the form "(others => ...)" needs to be adapted to iterated_component_association, which was added by Ada 2022. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * checks.adb (Apply_Constraint_Check): Guard against calling Choices when the

[Ada] Complete support for prefixed call on subtypes/derived types

2021-11-09 Thread Pierre-Marie de Rodat via Gcc-patches
Definition of subtypes and derived types needs to possibly initialize the list meant to store primitive operations when -gnatX is used. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_ch3.adb (Analyze_Subtype_Declaration, Derived_Type_Declaration): Initialize lis

[Ada] Add missing regular expression syntax error check

2021-11-09 Thread Pierre-Marie de Rodat via Gcc-patches
The procedure System.Regexp.Compile.Check_Well_Formed_Pattern is intended to verify the syntactic correctness of a regular expression pattern. It was failing to detect the (incorrect) case of a pattern that ends in a "|". Subsequent code depends on the pattern being correct, so failing to detect t

[Ada] Tune comment about expansion of array equality

2021-11-09 Thread Pierre-Marie de Rodat via Gcc-patches
Cleanup related to expansion of dispatching equality for GNATprove. Semantics is unaffected. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * exp_ch4.adb (Arr_Attr): Refine type of the parameter from Int to Pos; refine name of the parameter from Num to Dim; fix

[Ada] Errors on globals in expressions of predicate aspects in generic bodies

2021-11-09 Thread Pierre-Marie de Rodat via Gcc-patches
When a predicate aspect is given on a declaration inside of a generic body and the expression of the aspect references entities declared outside of the generic, errors about those entities not being defined can be issued in instantiations of the generic. This happens because the expression of the P

[Ada] Document the SuSE kernel bug

2021-11-09 Thread Pierre-Marie de Rodat via Gcc-patches
We found a SuSE kernel bug that affects 32-bit debugging on 64-bit machines. We agreed to document the problem in gnat_ugn. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * doc/gnat_ugn/platform_specific_information.rst: Document the SuSE kernel bug. * gnat_u

[Ada] Reference in Unbounded_String is almost never null

2021-11-09 Thread Pierre-Marie de Rodat via Gcc-patches
The underlying reference in Unbounded_String is almost never null, so recently it was changed to a non-excluding type (to avoid runtime checks that are almost never needed). The low-level routines that modify that reference had to be adapted, but only the Deallocate routine was adapted. This patch

[Ada] Simplify expansion of array equality

2021-11-09 Thread Pierre-Marie de Rodat via Gcc-patches
Cleanup related to expansion of dispatching equality for GNATprove. Semantics is unaffected Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * exp_ch4.adb (Test_Empty_Arrays): Simplify with Evolve_Or_Else; remove unnecessary call to Relocate_Node. (Test_Lengths_

[Ada] Return a valid value when handling Constraint_Error

2021-11-09 Thread Pierre-Marie de Rodat via Gcc-patches
We hit the Constraint_Error because Start_Column is outside bounds. So it should not be returned because that will again raise a Constraint_Error. Instead return its type'Last which is then properly handled. Also reformat the Blanks_Loop to be a simple loop. It seems, the nested if's were writte

[Ada] Simplify building of entity occurrences

2021-11-09 Thread Pierre-Marie de Rodat via Gcc-patches
Code cleanup related to expansion of predefined equality for GNATprove; semantics is unaffected. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * tbuild.adb (New_Occurrence_Of): Simplify by reusing Make_Identifier.diff --git a/gcc/ada/tbuild.adb b/gcc/ada/tbuild.adb -

[Ada] Refine type in expansion of array equality

2021-11-09 Thread Pierre-Marie de Rodat via Gcc-patches
Code cleanup related to expansion of predefined equality for GNATprove; semantics is unaffected. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * exp_ch4.adb (Handle_One_Dimension): Parameter N must be always positive, because it is translated into expression of 'Firs

[Ada] Cleanup building of renamed equality

2021-11-09 Thread Pierre-Marie de Rodat via Gcc-patches
Cleanup related to expansion of predefined equality for GNATprove; semantics is unaffected. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * exp_ch8.adb (Build_Body_For_Renaming): Remove unnecessary calls to Sloc; set Handled_Statement_Sequence when building s

[Ada] Cleanup copying of parameter lists

2021-11-09 Thread Pierre-Marie de Rodat via Gcc-patches
Cleanup related to expansion of predefined equality for GNATprove; semantics is unaffected. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_util.adb (Copy_Parameter_List): Refactor to remove repeated calls to First_Formal.diff --git a/gcc/ada/sem_util.adb b/gcc/a

[Ada] Accessibility fix

2021-11-09 Thread Pierre-Marie de Rodat via Gcc-patches
This commit fixes an issue where when creating initialization procedures, GNAT would generate failing accessibility checks because it would use the scope depth of the parameter of the initialization procedure instead of using the scope depth passed as parameter. Tested on x86_64-pc-linux-gnu, comm

[Ada] Use atomics in runtime on ARM and Aarch64 VxWorks

2021-11-09 Thread Pierre-Marie de Rodat via Gcc-patches
For ARM and Aarch64 architectures we use runtime units that rely on atomic builtins instructions on all OSes except VxWorks (e.g. QNX, Linux, FreeBSD). This looks like an oversight, because the builtins depend on the architecture, not on the OS. Part of improving efficiency of the Ada.Strings.Unbo

[Ada] Initialize Current_Source_Unit

2021-11-09 Thread Pierre-Marie de Rodat via Gcc-patches
Preprocessing may call Error_Msg though Current_Source_Unit is not initialized. When gnat1 is compiled with gnatVa, this leads to a Constraint_Error. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sinput.ads: Initialize Current_Source_Unit to No_Unit.diff --git a/gcc/ada/si

[Ada] Improve integration of strub with type systems

2021-11-09 Thread Pierre-Marie de Rodat via Gcc-patches
This patch brings various improvements to the integration of strub modes into the Ada type system. Strub modes for subprograms are promoted to subprogram types when applied to access-to-subprogram objects and types, and promoted from subprograms to access types' designated types. Matching strub m

[Ada] Crash on expansion of tagged membership test

2021-11-09 Thread Pierre-Marie de Rodat via Gcc-patches
This patch corrects an issue in the compiler whereby the expansion of a tagged membership test when one of the types involved is a protected type can cause a crash a compile-time. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * exp_ch4.adb (Tagged_Membership): Use correspond

[Ada] Hang on compilation of unit with type extension in body

2021-11-09 Thread Pierre-Marie de Rodat via Gcc-patches
This patch corrects an issue in the compiler whereby the expansion of a type extension declared in the body of a package with an overriding primitive causes an infinite loop during compilation when the type being extended is both declared in the package spec and has a function and a procedure primi

[Ada] Do not indicate a pending abort if the task is already aborting

2021-11-09 Thread Pierre-Marie de Rodat via Gcc-patches
Check_Abort_Status would return the equivalent of True while a task was in the process of aborting causing another Abort exception to be raised and not to terminate cleanly. This only affects targets that use stack check emulation, which is currently limited to RTEMS. Tested on x86_64-pc-linux-gnu

[Ada] Print Storage_Pool and Procedure_To_Call fields

2021-11-09 Thread Pierre-Marie de Rodat via Gcc-patches
This makes Sprint output the Storage_Pool and Procedure_To_Call fields of the nodes for which they are defined (allocator, free and returns). Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sprint.adb (Sprint_Node_Actual) : Also print the Procedure_To_Call field if i

[Ada] Invalid GPR_PROJECT_PATH_FILE confuses gnatls

2021-11-09 Thread Pierre-Marie de Rodat via Gcc-patches
This patch corrects an issue within gnatls whereby having an invalid GPR_PROJECT_PATH_FILE causes an early abort when initializing the default project path, leading to GPR_PROJECT_PATH being ignored. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * gnatls.adb (Initialize_Defa

[Ada] Tidy up implementation of Has_Compatible_Type

2021-11-09 Thread Pierre-Marie de Rodat via Gcc-patches
Has_Compatible_Type is essentially a wrapper around Covers in Sem_Type that handles overloading and a few other details, i.e. calling: Has_Compatible_Type (N, Typ) is morally equivalent to calling: Covers (Typ, Etype (N)) or Covers (Typ, Interp (N)) Except that the implementation also perfo

[Ada] Fix Codepeer warning

2021-11-09 Thread Pierre-Marie de Rodat via Gcc-patches
Codepeer was emitting a warning about Ifaces_List not being initialized. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * freeze.adb (Check_Inherited_Conditions): Initialize Ifaces_List.diff --git a/gcc/ada/freeze.adb b/gcc/ada/freeze.adb --- a/gcc/ada/freeze.adb +++

Re: [PATCH] pch: Add support for PCH for relocatable executables

2021-11-09 Thread Jakub Jelinek via Gcc-patches
On Mon, Nov 08, 2021 at 04:03:09PM -0500, John David Anglin wrote: > On 2021-11-08 2:48 p.m., Jakub Jelinek wrote: > > Not really sure about PA or IA-64 function descriptors, are any of those > > allocated by the dynamic linker rather than created by the static linker? > On PA, the static linker cr

[PATCH] Fix aarch64 PR 99657: ICE with SVE types used without an error

2021-11-09 Thread apinski--- via Gcc-patches
From: Andrew Pinski This fixes fully where SVE types were being used without sve being enabled. Instead of trying to fix it such that we error out during RTL time, it is better to error out in front-ends. This expands verify_type_context to have a context of auto storage decl which is used for b

Re: [PATCH] [pass_if_conversion] Extend is_cond_scalar_reduction to handle bit_and/bit_xor/bit_ior.

2021-11-09 Thread Richard Biener via Gcc-patches
On Tue, Nov 9, 2021 at 3:09 AM liuhongt wrote: > > This will enable transformation like > > - # sum1_50 = PHI > - # sum2_52 = PHI > + # sum1_50 = PHI <_87(13), 0(4)> > + # sum2_52 = PHI <_89(13), 0(4)> ># ivtmp_62 = PHI >i.2_7 = (long unsigned int) i_49; >_8 = i.2_7 * 8; > ... >

Re: [PATCH 1/2] [Gimple] Simplify (trunc)fmax/fmin((extend)a, (extend)b) to MAX/MIN(a,b)

2021-11-09 Thread Richard Biener via Gcc-patches
On Tue, Nov 9, 2021 at 3:37 AM Hongtao Liu wrote: > > On Mon, Nov 8, 2021 at 4:59 PM Richard Biener > wrote: > > > > On Mon, Nov 8, 2021 at 2:30 AM Hongtao Liu wrote: > > > > > > On Fri, Nov 5, 2021 at 5:52 PM Richard Biener > > > wrote: > > > > > > > > On Fri, Nov 5, 2021 at 6:38 AM liuhongt

Get rid of infinite recursion for 'typedef' used with GTY-marked 'gcc/diagnostic-spec.h:nowarn_map' [PR101204] (was: [PATCH 1/13] v2 [PATCH 1/13] Add support for per-location warning groups (PR 74765)

2021-11-09 Thread Thomas Schwinge
Hi! On 2021-09-01T18:14:46-0600, Martin Sebor wrote: > On 9/1/21 1:35 PM, Thomas Schwinge wrote: >> On 2021-06-23T13:47:08-0600, Martin Sebor via Gcc-patches >> wrote: >>> --- /dev/null >>> +++ b/gcc/diagnostic-spec.h >> >>> +typedef location_t key_type_t; >>> +typedef int_hash xint_hash_t; >>

Re: [PATCH] PR tree-optimization/102232 Adding a missing pattern to match.pd

2021-11-09 Thread Richard Biener via Gcc-patches
On Tue, Nov 9, 2021 at 5:12 AM Navid Rahimi via Gcc-patches wrote: > > Hi GCC community, > > This patch will add the missed pattern described in bug 102232 [1] to the > match.pd. The testcase will test whether the multiplication and division has > been removed from the code or not. The correctne

Re: Values of WIDE_INT_MAX_ELTS in gcc11 and gcc12 are different

2021-11-09 Thread Richard Biener via Gcc-patches
On Tue, Nov 9, 2021 at 10:10 AM Jakub Jelinek wrote: > > On Tue, Nov 09, 2021 at 08:13:57AM +0100, Richard Biener wrote: > > > Hi, I tried both the following patches: > > > > > > Patch1: > > > > > > [opc@qinzhao-ol8u3-x86 gcc]$ git diff > > > diff --git a/gcc/internal-fn.c b/gcc/internal-fn.c > >

Re: [AArch64] Fix NEON load/store gimple lowering and big-endian testisms

2021-11-09 Thread Richard Biener via Gcc-patches
On Tue, Nov 9, 2021 at 10:19 AM Andre Vieira (lists) wrote: > > Thank you both! > > Here is a reworked version, this OK for trunk? Looks good to me. Richard.

Re: [PATCH] vect: Hookize better_loop_vinfo_p

2021-11-09 Thread Richard Sandiford via Gcc-patches
Richard Biener via Gcc-patches writes: > On Mon, Nov 8, 2021 at 3:46 PM Richard Sandiford > wrote: >> >> Richard Biener via Gcc-patches writes: >> > On Mon, Nov 8, 2021 at 2:06 PM Richard Sandiford >> > wrote: >> >> >> >> Richard Biener writes: >> >> > On Mon, Nov 8, 2021 at 11:45 AM Richard S

Re: Get rid of infinite recursion for 'typedef' used with GTY-marked 'gcc/diagnostic-spec.h:nowarn_map' [PR101204] (was: [PATCH 1/13] v2 [PATCH 1/13] Add support for per-location warning groups (PR 74

2021-11-09 Thread Richard Biener via Gcc-patches
On Tue, Nov 9, 2021 at 11:28 AM Thomas Schwinge wrote: > > Hi! > > On 2021-09-01T18:14:46-0600, Martin Sebor wrote: > > On 9/1/21 1:35 PM, Thomas Schwinge wrote: > >> On 2021-06-23T13:47:08-0600, Martin Sebor via Gcc-patches > >> wrote: > >>> --- /dev/null > >>> +++ b/gcc/diagnostic-spec.h > >>

Re: [PATCH] Introduce build_debug_expr_decl

2021-11-09 Thread Martin Jambor
Hi, On Mon, Nov 08 2021, Prathamesh Kulkarni wrote: > On Mon, 8 Nov 2021 at 23:24, Martin Jambor wrote: >> >> Hi, >> >> this patch introduces a helper function build_debug_expr_decl to build >> DEBUG_EXPR_DECL tree nodes in the most common way and replaces with a >> call of this function all code

Re: [PATCH] vect: Hookize better_loop_vinfo_p

2021-11-09 Thread Richard Biener via Gcc-patches
On Tue, Nov 9, 2021 at 11:47 AM Richard Sandiford wrote: > > Richard Biener via Gcc-patches writes: > > On Mon, Nov 8, 2021 at 3:46 PM Richard Sandiford > > wrote: > >> > >> Richard Biener via Gcc-patches writes: > >> > On Mon, Nov 8, 2021 at 2:06 PM Richard Sandiford > >> > wrote: > >> >> > >

Re: [PATCH] Introduce build_debug_expr_decl

2021-11-09 Thread Richard Biener via Gcc-patches
On Tue, 9 Nov 2021, Martin Jambor wrote: > Hi, > > On Mon, Nov 08 2021, Prathamesh Kulkarni wrote: > > On Mon, 8 Nov 2021 at 23:24, Martin Jambor wrote: > >> > >> Hi, > >> > >> this patch introduces a helper function build_debug_expr_decl to build > >> DEBUG_EXPR_DECL tree nodes in the most comm

[COMMITTED] Cleanup path solver dumps.

2021-11-09 Thread Aldy Hernandez via Gcc-patches
This patch makes the path solver dumps a bit more consistent. Tested on x86-64 Linux. gcc/ChangeLog: * gimple-range-path.cc (path_range_query::dump): Clean up. (path_range_query::compute_ranges): Same. * value-relation.cc (path_oracle::dump): Same. --- gcc/gimple-range-p

[COMMITTED] Remove TDF_THREADING flag in favor of param.

2021-11-09 Thread Aldy Hernandez via Gcc-patches
I am returning a TDF_* flag to the queue of available entries as I am unconvinced that we need to burn an entire flag for internal debugging constructs, especially since we seem to be running out of them. I've added a --param=threader-debug entry similar to the one we use for ranger debugging. Cu

[PATCH] Dump details of an attempt to register a jump threading path.

2021-11-09 Thread Aldy Hernandez via Gcc-patches
The goal with these sets of patches is to improve the detailed dumps for the threader, as I hope we eventually reach the point when I'm not the only one looking at these dumps ;-). This patch adds candidate paths to the detailed threading dumps to make it easier to see the decisions the threader m

[PATCH] Return NULL for maybe_register_path when unprofitable.

2021-11-09 Thread Aldy Hernandez via Gcc-patches
This is a minor cleanup for maybe_register_path to return NULL when the path is unprofitable. It is needed for a follow-up patch to generate better dumps from the threader. There is no change in behavior, since the only call to this function bails on !profitable_path_p. Tested on x86-64 Linux.

Re: [PATCH] pch: Add support for PCH for relocatable executables

2021-11-09 Thread Jakub Jelinek via Gcc-patches
On Tue, Nov 09, 2021 at 10:44:45AM +0100, Jakub Jelinek via Gcc-patches wrote: > On Tue, Nov 09, 2021 at 08:12:05AM +0100, Richard Biener wrote: > > > So, here is 1), 2), 3) implemented. With this patch alone, > > > g++.dg/pch/system-2.C test ICEs. This is because GCC 12 has added > > > function:

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

2021-11-09 Thread Przemyslaw Wirkus via Gcc-patches
> > > -Original Message- > > > From: Przemyslaw Wirkus > > > Sent: 18 October 2021 10:37 > > > To: gcc-patches@gcc.gnu.org > > > Cc: Richard Earnshaw ; Ramana > > > Radhakrishnan ; Kyrylo Tkachov > > > ; ni...@redhat.com > > > Subject: [PATCH][GCC] arm: add armv9-a architecture to -march >

Re: [PATCH] pch: Add support for PCH for relocatable executables

2021-11-09 Thread Iain Sandoe
> On 9 Nov 2021, at 08:07, Iain Sandoe wrote: > > > >> On 9 Nov 2021, at 07:12, Richard Biener wrote: >> >> On Mon, 8 Nov 2021, Jakub Jelinek wrote: >> >>> On Mon, Nov 08, 2021 at 12:46:04PM +0100, Jakub Jelinek via Gcc-patches >>> wrote: So, if we want to make PCH work for PIEs, I'

Re: [PATCH] PR middle-end/103059: reload: Also accept ASHIFT with indexed addressing

2021-11-09 Thread Maciej W. Rozycki
On Sun, 7 Nov 2021, Maciej W. Rozycki wrote: > For the record the change does fix numerous regressions in GCC 11 too, > e.g.: > > === gcc Summary === > > # of expected passes 122244 > # of unexpected failures 1852 > # of expected passes 122428 > # of unexpe

Re: [PATCH] pch: Add support for PCH for relocatable executables

2021-11-09 Thread Richard Biener via Gcc-patches
On Tue, 9 Nov 2021, Jakub Jelinek wrote: > On Tue, Nov 09, 2021 at 10:44:45AM +0100, Jakub Jelinek via Gcc-patches wrote: > > On Tue, Nov 09, 2021 at 08:12:05AM +0100, Richard Biener wrote: > > > > So, here is 1), 2), 3) implemented. With this patch alone, > > > > g++.dg/pch/system-2.C test ICEs.

Re: [PATCH] PR middle-end/103059: reload: Also accept ASHIFT with indexed addressing

2021-11-09 Thread Maciej W. Rozycki
On Mon, 8 Nov 2021, Hans-Peter Nilsson wrote: > I regression-tested this patch for cris-elf at > r12-4987-g14e355df3053. No regressions compared to > r12-4987-g14e355df3053. (JFTR, that's at regress-11, > compared to T0=2007-01-05-16:47:21). Great, thanks! Maciej

[RFC PATCH] or1k: Fix clobbering of _mcount argument if fPIC is enabled

2021-11-09 Thread Stafford Horne via Gcc-patches
Recently we changed the PROFILE_HOOK _mcount call to pass in the link register as an argument. This actually does not work when the _mcount call uses a PLT because the GOT register setup code ends up getting inserted before the PROFILE_HOOK and clobbers the link register argument. These glibc tes

Re: [PATCH] pch: Add support for PCH for relocatable executables

2021-11-09 Thread Jakub Jelinek via Gcc-patches
On Tue, Nov 09, 2021 at 11:40:08AM +, Iain Sandoe wrote: > There were two issues, of which one remains and probably affects all targets. > > 1. The Darwin PCH memory allocation scheme used a system that works reliably > for no-PIE but not for PIE > > .. I hacked in a similar scheme to th

[AArch64] Fix big-endian testisms introduced by NEON gimple lowering patch

2021-11-09 Thread Andre Vieira (lists) via Gcc-patches
Decided to split the patches up to make it clear that the testisms fixes had nothing to do with the TBAA fix. I'll be committing these two separately First: [AArch64] Fix big-endian testisms introduced by NEON gimple lowering patch This patch reverts the tests for big-endian after the NEON gim

Get rid of infinite recursion for 'typedef' used with GTY-marked 'gcc/diagnostic-spec.h:nowarn_map' [PR101204, PR103157]

2021-11-09 Thread Thomas Schwinge
Hi! On 2021-11-09T11:54:04+0100, Richard Biener wrote: > On Tue, Nov 9, 2021 at 11:28 AM Thomas Schwinge > wrote: >> On 2021-09-01T18:14:46-0600, Martin Sebor wrote: >> > On 9/1/21 1:35 PM, Thomas Schwinge wrote: >> >> On 2021-06-23T13:47:08-0600, Martin Sebor via Gcc-patches >> >> wrote: >>

[AArch64] Fix TBAA information when lowering NEON loads and stores to gimple

2021-11-09 Thread Andre Vieira (lists) via Gcc-patches
And second (also added a test): [AArch64] Fix TBAA information when lowering NEON loads and stores to gimple This patch fixes the wrong TBAA information when lowering NEON loads and stores to gimple that showed up when bootstrapping with UBSAN. gcc/ChangeLog:     * config/aarch64/aarch64

Re: [PATCH] pch: Add support for PCH for relocatable executables

2021-11-09 Thread Jakub Jelinek via Gcc-patches
On Tue, Nov 09, 2021 at 01:03:38PM +0100, Richard Biener wrote: > > Apparently the range_of_expr can handle some tree cases through > > range_query::get_tree_range, like INTEGER_CSTs, ADDR_EXPRs, > > and some binary and unary ops. > > But that shouldn't need a range query object ... this was all >

Re: [PATCH v5] Improve integer bit test on __atomic_fetch_[or|and]_* returns

2021-11-09 Thread Richard Biener via Gcc-patches
On Thu, Nov 4, 2021 at 2:28 AM liuhongt wrote: > > Sorry for the slow reply: Likewise ;) > Here is update according to comments > 1. Define new match function in match.pd. > 2. Adjust code for below >>> + gsi_remove (gsip, true); >>> + var = build1 (NOP_EXPR, TREE

Re: [PATCH 3/N] Come up with casm global state.

2021-11-09 Thread Richard Biener via Gcc-patches
On Fri, Nov 5, 2021 at 3:27 PM Martin Liška wrote: > > On 10/26/21 09:45, Richard Biener wrote: > > On Mon, Oct 25, 2021 at 6:32 PM Segher Boessenkool > > wrote: > >> > >> Hi! > >> > >> On Mon, Oct 25, 2021 at 03:36:25PM +0200, Martin Liška wrote: > >>> --- a/gcc/config/rs6000/rs6000-internal.h >

Re: [PATCH] Loop unswitching: support gswitch statements.

2021-11-09 Thread Richard Biener via Gcc-patches
On Mon, Nov 8, 2021 at 8:45 PM Andrew MacLeod wrote: > > On 11/8/21 10:05 AM, Martin Liška wrote: > > On 9/28/21 22:39, Andrew MacLeod wrote: > >> In Theory, modifying the IL should be fine, it happens already in > >> places, but its not extensively tested under those conditions yet. > > > > Hello

[PATCH] powerpc: Remove LINK_OS_EXTRA_SPEC{32, 64} from --with-advance-toolchain

2021-11-09 Thread Lucas A. M. Magalhaes via Gcc-patches
Ping. -- >8 -- Historically this was added to fill gaps from ld.so.cache on early AT releases. This now are just causing errors and rework. Since AT5.0 the AT's ld.so is using a correctly configured ld.so.cache and sets the DT_INTERP to AT's ld.so. This two factors are sufficient for an AT builde

[PATCH] Define m_rtx_reuse_manager only if not GENERATOR_FILE.

2021-11-09 Thread Martin Liška
It removes one more Clang warning: warning: private field 'm_rtx_reuse_manager' is not used [-Wunused-private-field] pushed to master as obvious. Martin gcc/ChangeLog: * print-rtl.c (rtx_writer::rtx_writer): Make the compilation conditional based on * print-rtl.h (clas

Re: [PING^3] Generalize 'gcc/input.h:struct location_hash' (was: [Committed] [PATCH 2/4] (v4) On-demand locations within string-literals)

2021-11-09 Thread Thomas Schwinge
Hi! On 2021-10-17T16:33:03-0600, Jeff Law via Gcc-patches wrote: > On 9/30/2021 12:47 AM, Thomas Schwinge wrote: >> On 2021-09-17T13:16:14+0200, I wrote: >>> On 2021-09-10T09:48:56+0200, I wrote: On 2021-09-03T18:33:37+0200, I wrote: > On 2021-09-02T21:09:54+0200, I wrote: >> On 202

[PATCH] fixincludes: don't assume getcwd() can handle NULL argument

2021-11-09 Thread Xi Ruoyao via Gcc-patches
POSIX says: On some implementations, if buf is a null pointer, getcwd() may obtain size bytes of memory using malloc(). In this case, the pointer returned by getcwd() may be used as the argument in a subsequent call to free(). Invoking getcwd() with buf as a null pointer is not rec

Re: [PATCH v1 1/7] LoongArch Port: gcc

2021-11-09 Thread Xi Ruoyao via Gcc-patches
On Mon, 2021-11-08 at 23:14 +, Joseph Myers wrote: /* snip */ > Please make sure the back end builds cleanly with current GCC mainline.  > This can be tested either with a native bootstrap, or by building a cross > compiler, using a native compiler of the same GCC mainline version for the

Re: [PATCH] c++: Fix ICE on complex constant with -frounding-math [PR103114]

2021-11-09 Thread Jason Merrill via Gcc-patches
On 11/9/21 04:38, Jakub Jelinek wrote: Hi! The FE uses build_complex which assumes that fold_convert will fold value to a constant. With -frounding-math that isn't guaranteed though. So, the patch instead fold_build2s COMPLEX_EXPR, which will result in build_complex if both arguments are consta

[PATCH] Remove dead Fortran function.

2021-11-09 Thread Martin Liška
Hello. The function was introduced in 2009 in g:cf2b3c22a2cbd7f50db530ca9d2b14c70ba0359d and has never been used since that. Ready to be installed? Thanks, Martin gcc/fortran/ChangeLog: * symbol.c (gfc_get_ultimate_derived_super_type): Remove. --- gcc/fortran/symbol.c | 17 --

[wwwdocs] Document feature test macro for C++ constexpr dynamic alloc

2021-11-09 Thread Jonathan Wakely via Gcc-patches
OK for wwwdocs? --- htdocs/projects/cxx-status.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/projects/cxx-status.html b/htdocs/projects/cxx-status.html index 0ff9e94d..d2d6eab4 100644 --- a/htdocs/projects/cxx-status.html +++ b/htdocs/projects/cxx-status.html @@

Re: [wwwdocs] Document feature test macro for C++ constexpr dynamic alloc

2021-11-09 Thread Marek Polacek via Gcc-patches
On Tue, Nov 09, 2021 at 02:04:09PM +, Jonathan Wakely wrote: > OK for wwwdocs? Sure, thanks. > --- > htdocs/projects/cxx-status.html | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/htdocs/projects/cxx-status.html b/htdocs/projects/cxx-status.html > index 0ff9e94d..d

Re: [COMMITTED] Remove TDF_THREADING flag in favor of param.

2021-11-09 Thread Martin Liška
+-param=threader-debug= Please document the param in gcc/doc/invoke.texi. Missing: @item threader-debug threader-debug=[none|all] Enables verbose dumping of the threader solver. Cheers, Martin

Use 'location_hash' for 'gcc/diagnostic-spec.h:nowarn_map' (was: [PATCH 1/13] v2 [PATCH 1/13] Add support for per-location warning groups (PR 74765))

2021-11-09 Thread Thomas Schwinge
Hi! On 2021-09-03T21:16:46+0200, I wrote: > On 2021-09-01T18:14:46-0600, Martin Sebor wrote: >> On 9/1/21 1:35 PM, Thomas Schwinge wrote: >>> On 2021-06-23T13:47:08-0600, Martin Sebor via Gcc-patches >>> wrote: --- /dev/null +++ b/gcc/diagnostic-spec.h >>> +typedef location_t key

Re: [PATCH] powerpc: Remove LINK_OS_EXTRA_SPEC{32, 64} from --with-advance-toolchain

2021-11-09 Thread Segher Boessenkool
Hi! On Tue, Nov 09, 2021 at 10:39:46AM -0300, Lucas A. M. Magalhaes wrote: > Ping. I did not get the original, and neither did the archives? > Historically this was added to fill gaps from ld.so.cache on early AT > releases. This now are just causing errors and rework. Since AT5.0 the > AT's ld.

Re: [COMMITTED] Remove TDF_THREADING flag in favor of param.

2021-11-09 Thread Aldy Hernandez via Gcc-patches
On Tue, Nov 9, 2021 at 3:10 PM Martin Liška wrote: > > > +-param=threader-debug= > > Please document the param in gcc/doc/invoke.texi. I purposely didn't document it. This is an internal debugging construct. What's our policy on this? I'm happy to do this; I just didn't want the CI bots trying

Re: [COMMITTED] Remove TDF_THREADING flag in favor of param.

2021-11-09 Thread Martin Liška
On 11/9/21 15:22, Aldy Hernandez wrote: On Tue, Nov 9, 2021 at 3:10 PM Martin Liška wrote: +-param=threader-debug= Please document the param in gcc/doc/invoke.texi. I purposely didn't document it. This is an internal debugging construct. What's our policy on this? Well, quite some par

Use 'location_hash' for 'seen_locations' in 'gcc/profile.c:branch_prob' (was: [PATCH] Fix GCOV CFG related issues)

2021-11-09 Thread Thomas Schwinge
Hi! On 2018-07-25T15:40:24+0200, Martin Liška wrote: > --- a/gcc/profile.c > +++ b/gcc/profile.c > @@ -1256,6 +1256,8 @@ branch_prob (void) >/* Initialize the output. */ >output_location (NULL, 0, NULL, NULL); > > + hash_set > seen_locations; > + >FOR_EACH_BB_FN (bb,

Re: [COMMITTED] Remove TDF_THREADING flag in favor of param.

2021-11-09 Thread Aldy Hernandez via Gcc-patches
On Tue, Nov 9, 2021 at 3:28 PM Martin Liška wrote: > > On 11/9/21 15:22, Aldy Hernandez wrote: > > On Tue, Nov 9, 2021 at 3:10 PM Martin Liška wrote: > >> > >>> +-param=threader-debug= > >> > >> Please document the param in gcc/doc/invoke.texi. > > > > I purposely didn't document it. This is an

Re: Use 'location_hash' for 'seen_locations' in 'gcc/profile.c:branch_prob' (was: [PATCH] Fix GCOV CFG related issues)

2021-11-09 Thread Martin Liška
On 11/9/21 15:29, Thomas Schwinge wrote: Hi! On 2018-07-25T15:40:24+0200, Martin Liška wrote: --- a/gcc/profile.c +++ b/gcc/profile.c @@ -1256,6 +1256,8 @@ branch_prob (void) /* Initialize the output. */ output_location (NULL, 0, NULL, NULL); + hash_set > seen_locations;

Re: [PATCH] Fix aarch64 PR 99657: ICE with SVE types used without an error

2021-11-09 Thread Richard Sandiford via Gcc-patches
apinski--- via Gcc-patches writes: > From: Andrew Pinski > > This fixes fully where SVE types were being used without sve being enabled. > Instead of trying to fix it such that we error out during RTL time, it is > better to error out in front-ends. This expands verify_type_context to > have a c

Re: [COMMITTED] Remove TDF_THREADING flag in favor of param.

2021-11-09 Thread Martin Liška
On 11/9/21 15:36, Aldy Hernandez wrote: I don't see any ordering in these items, so I've placed it next to another of the backward threader knobs. How does this look? That's fine, thanks. Note that similar --param 'ranger-debug' is also documented ;P Cheers, Martin

[committed] libstdc++: Make spurious std::random_device FAIL less likely

2021-11-09 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux, committed to trunk. It's possible that independent reads from /dev/random and /dev/urandom could produce the same value by chance. Retry if that happens. The chances of it happening twice are miniscule. libstdc++-v3/ChangeLog: * testsuite/26_numerics/random/random_d

Re: [PATCH] pch: Add support for PCH for relocatable executables

2021-11-09 Thread Andrew MacLeod via Gcc-patches
On 11/9/21 7:29 AM, Jakub Jelinek wrote: On Tue, Nov 09, 2021 at 01:03:38PM +0100, Richard Biener wrote: Apparently the range_of_expr can handle some tree cases through range_query::get_tree_range, like INTEGER_CSTs, ADDR_EXPRs, and some binary and unary ops. But that shouldn't need a range que

[committed] libstdc++: Support getentropy and arc4random in std::random_device

2021-11-09 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux, and Iain Sandoe tested the arc4random code on darwin too. Pushed to trunk. This adds additional "getentropy" and "arc4random" tokens to std::random_device. The former is supported on Glibc and OpenBSD (and apparently wasm), and the latter is supported on various BSDs. libstd

Re: [PATCH] aarch64: [PR101529] Fix vector shuffle insertion expansion

2021-11-09 Thread Richard Sandiford via Gcc-patches
apinski--- via Gcc-patches writes: > From: Andrew Pinski > > The function aarch64_evpc_ins would reuse the target even though > it might be the same register as the two inputs. > Instead of checking to see if we can reuse the target, creating > a new register always is better. > > OK? Bootstrappe

Re: [aarch64] PR102376 - Emit better diagnostic for arch extensions in target attr

2021-11-09 Thread Richard Sandiford via Gcc-patches
Prathamesh Kulkarni writes: > On Thu, 4 Nov 2021 at 14:19, Richard Sandiford > wrote: >> >> Prathamesh Kulkarni writes: >> > On Wed, 20 Oct 2021 at 15:05, Richard Sandiford >> > wrote: >> >> >> >> Prathamesh Kulkarni writes: >> >> > On Tue, 19 Oct 2021 at 19:58, Richard Sandiford >> >> > wrot

Re: [PATCH] pch: Add support for PCH for relocatable executables

2021-11-09 Thread Jakub Jelinek via Gcc-patches
On Tue, Nov 09, 2021 at 09:41:08AM -0500, Andrew MacLeod wrote: > Yeah, Im not particular about how we do this...  I think thats perfectly > reasonable.   Would something like the following solve this issue? Yes, but see below. > commit 17a5b03c95549b5488bc8dd2af4f6e2cc9ddf098 > Author: Andrew Ma

Re: [AArch64] Fix TBAA information when lowering NEON loads and stores to gimple

2021-11-09 Thread Richard Sandiford via Gcc-patches
"Andre Vieira (lists)" writes: > And second (also added a test): > > [AArch64] Fix TBAA information when lowering NEON loads and stores to gimple > > This patch fixes the wrong TBAA information when lowering NEON loads and > stores > to gimple that showed up when bootstrapping with UBSAN. > > gcc

Re: require et random_device for cons token test

2021-11-09 Thread Jonathan Wakely via Gcc-patches
On Thu, 25 Mar 2021 at 11:38, Jonathan Wakely wrote: > On 25/03/21 08:00 -0300, Alexandre Oliva wrote: > >On Mar 24, 2021, Jonathan Wakely wrote: > > > >> Does vxworks provide any platform-specific source of randomness, like > >> Linux getrandom(2) or BSD arc4random(3) or Windows rand_s? If yes,

RE: [PATCH]middle-end Add an RPO pass after successful vectorization

2021-11-09 Thread Tamar Christina via Gcc-patches
> > + bitmap_set_bit (exit_bbs, single_exit (loop)->dest->index); > > + bitmap_set_bit (exit_bbs, loop->latch->index); > > treating the latch as exit is probably premature optimization (yes, it's > empty). > > > + > > + do_rpo_vn (cfun, loop_preheader_edge (loop), exit_bbs); > > +

Re: [PATCH 14/18] rs6000: Debug support

2021-11-09 Thread Bill Schmidt via Gcc-patches
On 11/5/21 4:34 PM, Segher Boessenkool wrote: > On Wed, Sep 01, 2021 at 11:13:50AM -0500, Bill Schmidt wrote: >> * config/rs6000/rs6000-call.c (rs6000_debug_type): New function. >> (def_builtin): Change debug formatting for easier parsing and >> include more information. >> (r

[committed] libstdc++: Do not use 64-bit DARN on 32-bit powerpc [PR103146]

2021-11-09 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux, pushed to trunk. We need to use the 64-bit DARN to detect failure without bias, but it's not available in 32-bit mode. libstdc++-v3/ChangeLog: PR libstdc++/103146 * src/c++11/random.cc: Check __powerpc64__ not __powerpc__. --- libstdc++-v3/src/c++11/ra

[committed] libstdc++: Make test print which random_device tokens work

2021-11-09 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux, pushed to trunk. libstdc++-v3/ChangeLog: * testsuite/26_numerics/random/random_device/cons/token.cc: Print results of random_device_available checks. --- .../26_numerics/random/random_device/cons/token.cc | 7 +++ 1 file changed, 7 insertions(+)

Re: [committed] libstdc++: Support getentropy and arc4random in std::random_device

2021-11-09 Thread Jonathan Wakely via Gcc-patches
On Fri, 5 Nov 2021 at 18:22, Jonathan Wakely wrote: > Oops sorry - this is NOT committed yet. I won't push it until I've tested > it on at least one BSD, preferably OpenBSD so I can test parts of the new > code. > It got tested on darwin, and has been pushed to trunk now. > > > On Fri, 5 Nov 2

Re: [PATCH, v2, OpenMP 5.0] Implement relaxation of implicit map vs. existing device mappings (for mainline trunk)

2021-11-09 Thread Jakub Jelinek via Gcc-patches
On Sat, Nov 06, 2021 at 12:51:59AM +0800, Chung-Lin Tang wrote: > static int > get_kind (bool short_mapkind, void *kinds, int idx) > { > - return short_mapkind ? ((unsigned short *) kinds)[idx] > -: ((unsigned char *) kinds)[idx]; > + int val = (short_mapkind > + ?

  1   2   >