[PATCH] ipa-icf: skip variables with body_removed

2022-05-19 Thread Martin Liška
Similarly to cgraph_nodes, it may happen that body_removed is set during merging of symbols. PR ipa/105600 Patch can bootstrap on x86_64-linux-gnu and survives regression tests. Ready to be installed? Thanks, Martin gcc/ChangeLog: * ipa-icf.cc (sem_item_optimizer::filter_remove

[PATCH] pointer-query: Fix ICE with non-pointer param [PR105635]

2022-05-19 Thread Jakub Jelinek via Gcc-patches
Hi! The gimple_parm_array_size function comment talks about pointe parameters but doesn't actually verify it, it checks whether an attribute is present on the function and then just uses TREE_TYPE (TREE_TYPE (var)) which assumes a pointer type (or in theory could work for ARRAY_TYPE but c-family l

[PATCH v2] libgccjit: allow common objects in $(EXTRA_GCC_OBJS) and $(EXTRA_OBJS)

2022-05-19 Thread Yang Yujie
Hello, This patch fixes libgccjit build failure on loongarch* targets, and could probably be useful for future ports. For now, libgccjit is linked with objects from $(EXTRA_GCC_OBJS) and libbackend.a, which contains object files from $(EXTRA_OBJS). This effectively forbids any overlap between th

[PATCH] cfgexpand: Yet another spot with debug insns references to global vars without varpool nodes [PR105630]

2022-05-19 Thread Jakub Jelinek via Gcc-patches
Hi! This is similar to the earlier patch to avoid having MEM_EXPRs referencing global vars without varpool nodes, but this time the difference is that during gimplification some hashing actually created DECL_RTLs for the n VAR_DECL and the previous change was in the if above this when DECL_RTL is

Re: [PATCH] OpenMP, libgomp: Add new runtime routines omp_target_memcpy_async and omp_target_memcpy_rect_async

2022-05-19 Thread Marcel Vollweiler
Hi Jakub, Am 17.05.2022 um 20:08 schrieb Jakub Jelinek: On Tue, May 17, 2022 at 11:57:02AM +0200, Marcel Vollweiler wrote: More importantly, I have no idea how this can work when you pass arg_size 0 and arg_align 0. The s variable is in the current function frame, with arg_size 0 nothing is re

Re: [PATCH] OpenMP, libgomp: Add new runtime routines omp_target_memcpy_async and omp_target_memcpy_rect_async

2022-05-19 Thread Jakub Jelinek via Gcc-patches
On Thu, May 19, 2022 at 10:39:05AM +0200, Marcel Vollweiler wrote: > > add here > >else > > { > >depend[0] = 0; > > ... > > } > > Added the "depend" definition to the "if" branch (instead the "else" branch). Thanks for correcting my thinko. > gcc/ChangeLog: > > * omp

Re: [PATCH] Modula-2: merge proposal/review: 7/9 07.patch-set-05

2022-05-19 Thread Gaius Mulley via Gcc-patches
Joseph Myers writes: > On Wed, 18 May 2022, Gaius Mulley via Gcc-patches wrote: > >> /* This is the contribution to the `documented_lang_options' array in >>toplev.c for gm2. */ > > I'm not sure what this is (an unused file?), but documented_lang_options > was removed in 2003. And in gener

Re: [PATCH] pointer-query: Fix ICE with non-pointer param [PR105635]

2022-05-19 Thread Richard Biener via Gcc-patches
On Thu, 19 May 2022, Jakub Jelinek wrote: > Hi! > > The gimple_parm_array_size function comment talks about pointe parameters > but doesn't actually verify it, it checks whether an attribute is present > on the function and then just uses TREE_TYPE (TREE_TYPE (var)) which > assumes a pointer type

Re: [PATCH] cfgexpand: Yet another spot with debug insns references to global vars without varpool nodes [PR105630]

2022-05-19 Thread Richard Biener via Gcc-patches
On Thu, 19 May 2022, Jakub Jelinek wrote: > Hi! > > This is similar to the earlier patch to avoid having MEM_EXPRs > referencing global vars without varpool nodes, but this time > the difference is that during gimplification some hashing > actually created DECL_RTLs for the n VAR_DECL and the pre

Re: [0/9] [middle-end] Add param to vec_perm_const hook to specify mode of input operand

2022-05-19 Thread Richard Biener via Gcc-patches
On Wed, May 18, 2022 at 9:08 AM Prathamesh Kulkarni via Gcc-patches wrote: > > Hi, > The attached patch adds another parameter machine_mode op_mode to > vec_perm_const > hook to specify mode of input operands. The motivation for doing this > is PR96463, > where we create vec_perm_expr of the form

Patch structure and timing for re-adding gcj

2022-05-19 Thread Zopolis0 via Gcc-patches
Over the past few months I have been working on re-adding gcj to gcc ( https://github.com/Zopolis4/gcj/tree/mster). It is now at the point where all of the code in gcc/java and the related additions to other gcc files compiles successfully, although libjava still breaks. Given that I do not know h

Re: [PATCH] middle-end/105604 - snprintf dianostics and non-constant sizes/offsets

2022-05-19 Thread Richard Biener via Gcc-patches
On Wed, 18 May 2022, Martin Sebor wrote: > On 5/18/22 00:26, Richard Biener wrote: > > On Tue, 17 May 2022, Martin Sebor wrote: > > > >> On 5/16/22 03:16, Richard Biener wrote: > >>> The following tries to correct get_origin_and_offset_r not handling > >>> non-constant sizes of array elements in

[wwwdocs] OpenMP - minor update/fixes for gomp + gcc-13

2022-05-19 Thread Tobias Burnus
Hi Jakub, hi all, the main reason for this patch is to change Documentation from to in projects/gomp/ as I realized that those cross references weren't as prominently visible as I had hoped for. Additionally: * gcc-13/changes.html: Add a feature I had missed (non-rect loop nest in F90) + new

Re: [wwwdocs] OpenMP - minor update/fixes for gomp + gcc-13

2022-05-19 Thread Jakub Jelinek via Gcc-patches
On Thu, May 19, 2022 at 02:13:03PM +0200, Tobias Burnus wrote: > Hi Jakub, hi all, > > the main reason for this patch is to change Documentation from to > in projects/gomp/ as I realized that those cross references weren't as > prominently visible as I had hoped for. > > Additionally: > * gcc-1

[PATCH 2/8] libcpp: update for move of FINAL And OVERRIDE

2022-05-19 Thread David Malcolm via Gcc-patches
I can self-approve this one, assuming that patch 1 is approved. libcpp/ChangeLog: * lex.cc: Replace uses of "FINAL" and "OVERRIDE" with "final" and "override". Signed-off-by: David Malcolm --- libcpp/lex.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libc

[PATCH 1/8] Move FINAL and OVERRIDE from ansidecl.h to gcc-plugin.h

2022-05-19 Thread David Malcolm via Gcc-patches
As of GCC 11 onwards we have required a C++11 compiler, such as GCC 4.8 or later. On the assumption that any such compiler correctly implements "final" and "override", this patch removes the FINAL and OVERRIDE macros from ansidecl.h. It adds them back to gcc-plugins.h in case any plugins make use

[PATCH 4/8] c-family: update for move of FINAL and OVERRIDE

2022-05-19 Thread David Malcolm via Gcc-patches
gcc/c-family/ChangeLog: * c-format.cc: Replace uses of "FINAL" and "OVERRIDE" with "final" and "override". * c-pretty-print.h: Likewise. Signed-off-by: David Malcolm --- gcc/c-family/c-format.cc | 2 +- gcc/c-family/c-pretty-print.h | 2 +- 2 files changed, 2 inserti

[PATCH 5/8] c++: update for move of FINAL and OVERRIDE

2022-05-19 Thread David Malcolm via Gcc-patches
gcc/cp/ChangeLog: * cxx-pretty-print.h: Replace uses of "FINAL" and "OVERRIDE" with "final" and "override". * error.cc: Likewise. Signed-off-by: David Malcolm --- gcc/cp/cxx-pretty-print.h | 2 +- gcc/cp/error.cc | 4 ++-- 2 files changed, 3 insertions(+), 3 del

[PATCH 7/8] gcc: update for move of FINAL and OVERRIDE

2022-05-19 Thread David Malcolm via Gcc-patches
gcc/ChangeLog: * diagnostic-path.h: Replace uses of "FINAL" and "OVERRIDE" with "final" and "override". * digraph.cc: Likewise. * gcc-rich-location.h: Likewise. * gimple-array-bounds.cc: Likewise. * gimple-loop-versioning.cc: Likewise. * gimpl

[PATCH 3/8] analyzer: update for move of FINAL and OVERRIDE

2022-05-19 Thread David Malcolm via Gcc-patches
I can self-approve this one, assuming that patch 1 is approved. gcc/analyzer/ChangeLog: * analyzer-pass.cc: Replace uses of "FINAL" and "OVERRIDE" with "final" and "override". * call-info.h: Likewise. * checker-path.h: Likewise. * constraint-manager.cc: Like

[PATCH 6/8] jit: update for move of FINAL and OVERRIDE

2022-05-19 Thread David Malcolm via Gcc-patches
I can self-approve this one, assuming that patch 1 is approved. gcc/jit/ChangeLog: * jit-playback.h: Replace uses of "FINAL" and "OVERRIDE" with "final" and "override". * jit-recording.cc: Likewise. * jit-recording.h: Likewise. Signed-off-by: David Malcolm --- gc

[PATCH 8/8] aarch64: update for move of FINAL and OVERRIDE

2022-05-19 Thread David Malcolm via Gcc-patches
gcc/ChangeLog: * config/aarch64/aarch64-sve-builtins-base.cc: Replace uses of "FINAL" and "OVERRIDE" with "final" and "override". * config/aarch64/aarch64-sve-builtins-functions.h: Likewise. * config/aarch64/aarch64-sve-builtins-shapes.cc: Likewise. * config/

Re: [PATCH take #2] PR middle-end/98865: Expand X*Y as X&-Y when Y is [0.1].

2022-05-19 Thread Richard Biener via Gcc-patches
On Wed, May 18, 2022 at 6:55 PM Roger Sayle wrote: > > > The patch is a revised solution for PR middle-end/98865 incorporating > the feedback/suggestions from Richard Biener's review here: > https://gcc.gnu.org/pipermail/gcc-patches/2022-May/593928.html > Most significantly, this patch now perform

Re: [PATCH 1/8] Move FINAL and OVERRIDE from ansidecl.h to gcc-plugin.h

2022-05-19 Thread David Malcolm via Gcc-patches
On Thu, 2022-05-19 at 08:32 -0400, David Malcolm wrote: > As of GCC 11 onwards we have required a C++11 compiler, such as GCC > 4.8 > or later.  On the assumption that any such compiler correctly > implements > "final" and "override", this patch removes the FINAL and OVERRIDE > macros > from anside

Re: [PATCH 1/8] Move FINAL and OVERRIDE from ansidecl.h to gcc-plugin.h

2022-05-19 Thread Richard Biener via Gcc-patches
On Thu, May 19, 2022 at 2:33 PM David Malcolm via Gcc-patches wrote: > > As of GCC 11 onwards we have required a C++11 compiler, such as GCC 4.8 > or later. On the assumption that any such compiler correctly implements > "final" and "override", this patch removes the FINAL and OVERRIDE macros > f

Re: [PATCH 1/8] Move FINAL and OVERRIDE from ansidecl.h to gcc-plugin.h

2022-05-19 Thread Richard Biener via Gcc-patches
On Thu, May 19, 2022 at 2:43 PM David Malcolm via Gcc-patches wrote: > > On Thu, 2022-05-19 at 08:32 -0400, David Malcolm wrote: > > As of GCC 11 onwards we have required a C++11 compiler, such as GCC > > 4.8 > > or later. On the assumption that any such compiler correctly > > implements > > "fin

Re: [PATCH 8/8] aarch64: update for move of FINAL and OVERRIDE

2022-05-19 Thread Richard Sandiford via Gcc-patches
David Malcolm via Gcc-patches writes: > gcc/ChangeLog: > * config/aarch64/aarch64-sve-builtins-base.cc: Replace uses of > "FINAL" and "OVERRIDE" with "final" and "override". > * config/aarch64/aarch64-sve-builtins-functions.h: Likewise. > * config/aarch64/aarch64-sve-builti

[committed] analyzer: update docs about -fanalyzer-checker=taint

2022-05-19 Thread David Malcolm via Gcc-patches
Tested as part of a bootstrap (on x86_64-pc-linux-gnu); verified generated manpage. Committed to trunk as r13-632-g19258b113872bd (as a followup to r13-514-g2402dc6b982c4d). gcc/ChangeLog: * doc/invoke.texi (-fanalyzer-checker=): Add -Wanalyzer-va-list-leak and -Wanalyzer-va-list-

Re: [PATCH] PR105647 Update pr105169* so it does not fail on powerpc64le

2022-05-19 Thread Giuliano Belinassi via Gcc-patches
On Thu, 2022-05-19 at 06:34 +, Richard Biener wrote: > On Wed, 18 May 2022, Giuliano Belinassi wrote: > > > On powerpc64le, the tests related to pr105169 failed because the > > .localentry was not on a power of two address due to the extra nop > > instruction taking one byte and thus moving it

Re: [PATCH v3 09/10] libgcc: Add support for HF mode (aka _Float16) in libbid

2022-05-19 Thread Christophe Lyon via Gcc-patches
Hi Joseph, May I ping you on this version? (I've moved the tests to gcc.dg/torture/ and checked they work on aarch64 and x86_64. Thanks, Christophe On 5/16/22 15:47, Christophe Lyon wrote: This patch adds support for trunc and extend operations between HF mode (_Float16) and Decimal Floatin

Re: [COMMITTED] Add ranger side effect infrastructure.

2022-05-19 Thread Bernhard Reutner-Fischer via Gcc-patches
Hi Andrew, On Tue, 17 May 2022 14:38:39 -0400 Andrew MacLeod via Gcc-patches wrote: > commit b7501739f3b14ac7749aace93f636d021fd607f7 > Author: Andrew MacLeod > Date: Mon May 9 15:35:14 2022 -0400 > diff --git a/gcc/gimple-range-cache.cc b/gcc/gimple-range-cache.cc > index d3cf8be9bd8..56f45

Re: [PATCH] Add divide by zero side effect.

2022-05-19 Thread Andrew MacLeod via Gcc-patches
On 5/18/22 16:40, Segher Boessenkool wrote: On Wed, May 18, 2022 at 04:24:06PM -0400, Andrew MacLeod wrote: On 5/18/22 14:13, Segher Boessenkool wrote: "Side effect" already has a meaning, very commonly used in language theory, and even in the C standard itself: a function has a side effect if

Re: [PATCH] Fix OMP CAS expansion with separate condition

2022-05-19 Thread Jakub Jelinek via Gcc-patches
On Fri, May 13, 2022 at 12:23:01PM +0200, Richard Biener wrote: > 2022-05-13 Richard Biener > > * omp-expand.cc (expand_omp_atomic_cas): Do not short-cut > computation of the new value. Ok, thanks. Though, depending on what exactly you allow or disallow, maybe even the im != 0 mig

Re: [Patch] OpenMP: Handle descriptors in target's firstprivate [PR104949]

2022-05-19 Thread Jakub Jelinek via Gcc-patches
On Wed, May 11, 2022 at 07:33:00PM +0200, Tobias Burnus wrote: > gcc/fortran/ChangeLog: > > PR fortran/104949 > * f95-lang.cc (LANG_HOOKS_OMP_ARRAY_SIZE): Redefine. > * trans-openmp.cc (gfc_omp_array_size): New. > (gfc_trans_omp_variable_list): Never turn has_device_addr >

Re: [PATCH] Fix OMP CAS expansion with separate condition

2022-05-19 Thread Richard Biener via Gcc-patches
On Thu, 19 May 2022, Jakub Jelinek wrote: > On Fri, May 13, 2022 at 12:23:01PM +0200, Richard Biener wrote: > > 2022-05-13 Richard Biener > > > > * omp-expand.cc (expand_omp_atomic_cas): Do not short-cut > > computation of the new value. > > Ok, thanks. > > Though, depending on what

[Ada] Remove dead code for scope entity having E_Subprogram_Body kind

2022-05-19 Thread Pierre-Marie de Rodat via Gcc-patches
In GNAT AST the Scope field always points to the semantic scope (e.g. subprogram) and never to syntactic scope (e.g. subprogram body). Cleanup related to handling of circular access-to-record types. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * gcc-interface/decl.cc (gnat

[Ada] Small housekeeping work

2022-05-19 Thread Pierre-Marie de Rodat via Gcc-patches
No functional changes. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * gcc-interface/trans.cc (Subprogram_Body_to_gnu): Rename a couple of local variables and use Is_Generic_Subprogram predicate. (process_decls): Likewise.diff --git a/gcc/ada/gcc-interface/tr

[Ada] Small housekeeping work continued

2022-05-19 Thread Pierre-Marie de Rodat via Gcc-patches
No functional changes. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * gcc-interface/trans.cc: Fix formatting issues in comments. (Subprogram_Body_to_gnu): Tidy up. (Exception_Handler_to_gnu_gcc): Rename into... (Exception_Handler_to_gnu): ...this.

[Ada] Get rid of secondary stack for controlled components

2022-05-19 Thread Pierre-Marie de Rodat via Gcc-patches
This eliminates the use of the secondary stack to return composite types with controlled components from functions, by exposing the return slot of these functions through the support interface of memory pools, much like for the secondary stack itself. This is piggybacked on the support of a specif

[Ada] Casing style on record components

2022-05-19 Thread Pierre-Marie de Rodat via Gcc-patches
This patch fixes a bug where the -gnatyr switch fails to detect incorrect casing of record components. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * style.adb (Check_Identifier): Deal with the case where a record component definition has been transformed; we want t

[PATCH] Remove get_or_alloc_expression_id

2022-05-19 Thread Richard Biener via Gcc-patches
This function is no longer needed. Bootstrapped and tested on x86_64-unknown-linux-gnu with a change to assert it is computed when queried. Pushed. 2022-05-19 Richard Biener * tree-ssa-pre.cc (get_or_alloc_expression_id): Remove. (add_to_value): Use get_expression_id.

[Ada] Further adapt proof of double arithmetic runtime unit

2022-05-19 Thread Pierre-Marie de Rodat via Gcc-patches
After changes in Why3 and generation of VCs, ghost code needs to be adapted for proofs to remain automatic. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * libgnat/s-aridou.adb (Lemma_Abs_Range, Lemma_Double_Shift_Left, Lemma_Shift_Left): New lemmas. (Double_

[Ada] Support Ada 2022 null array aggregates

2022-05-19 Thread Pierre-Marie de Rodat via Gcc-patches
Add support for Ada 2022's "[]" null array aggregates (thanks to Ed Schonberg for producing most of this patch). Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * erroutc.ads: Fix a single-character typo in a comment. * exp_aggr.adb: Fix a single-character typo in a co

[Ada] Improve optimization of "=" on bit-packed arrays

2022-05-19 Thread Pierre-Marie de Rodat via Gcc-patches
This patch fixes a performance regression, introduced by a previous bug fix. That fix had the unintended side effect of removing the optimization in cases where the two operands are of two different compiler-generated modular types. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/

[Ada] Fix proof of runtime unit a-strfix and a-strsup

2022-05-19 Thread Pierre-Marie de Rodat via Gcc-patches
Update to provers caused some proof regressions. Fix the proof by adding an assertion. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * libgnat/a-strfix.adb: Add assertions. * libgnat/a-strsup.adb: Idem.diff --git a/gcc/ada/libgnat/a-strfix.adb b/gcc/ada/libgnat/a-st

[Ada] Cleanup expansion of protected entry families

2022-05-19 Thread Pierre-Marie de Rodat via Gcc-patches
Expansion of entry families contained a condition that was always true. Cleanup related to detection of uninitialized scalar objects (which uncovered that expansion of entry families creates a slightly illegal AST with Elsif_Parts being an empty list). Tested on x86_64-pc-linux-gnu, committed on t

[Ada] Fix invalid expanded code for entry families

2022-05-19 Thread Pierre-Marie de Rodat via Gcc-patches
Expansion of entry families created a slightly illegal AST with Elsif_Parts being an empty list. Cleanup uncovered by the work on detection of uninitialized scalars. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * exp_ch9.adb (Build_Find_Body_Index): Remove empty Elsif_Parts

[Ada] Avoid copy operation for returns involving function calls

2022-05-19 Thread Pierre-Marie de Rodat via Gcc-patches
The underlying issue is that the front-end does not create transient scopes for return statements, so objects copied for these statements can never be finalized properly. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * exp_ch6.adb (Expand_Call_Helper): Adjust comment.

[Ada] Ignore Predicate_Failure in GNATprove mode

2022-05-19 Thread Pierre-Marie de Rodat via Gcc-patches
In GNATprove mode we are don't want predicate failure to pollute the predicate expression extracted from the predicate function. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_ch13.adb (Build_Predicate_Function): Ignore predicate failure in GNATprove mode.diff -

[Ada] Fix bug in handling of Predicate_Failure aspect

2022-05-19 Thread Pierre-Marie de Rodat via Gcc-patches
The run-time behavior of the Ada 2022 Predicate_Failure aspect was incorrectly implemented. This could cause incorrect exception messages at execution time in the case of a predicate check failure, as demonstrated by ACATS test C324006. In addition, a new attribute (Predicate_Expression) is defined

[Ada] Wrong interface dynamic dispatch via access parameter

2022-05-19 Thread Pierre-Marie de Rodat via Gcc-patches
When the prefix of an Access attribute is an explicit dereference of an access parameter (or a renaming of such a dereference, or a subcomponent of such a dereference), the context is a general access type to a class-wide interface type, and an accessibility check must be generated, the frontend si

[Ada] Preserve and reuse original type in Narrow_Large_Operation

2022-05-19 Thread Pierre-Marie de Rodat via Gcc-patches
Instead of using that of Original_Node (N) after rewriting, which does not work if N had previously been rewritten. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * exp_ch4.adb (Narrow_Large_Operation): Preserve and reuse Etype.diff --git a/gcc/ada/exp_ch4.adb b/gcc/ada/exp_c

[Ada] Fix compilation of raise-gcc.c with -DSTANDALONE under windows

2022-05-19 Thread Pierre-Marie de Rodat via Gcc-patches
This is needed in particular by GNAT LLVM builds. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * raise-gcc.c: Fix compilation with -DSTANDALONE under windows.diff --git a/gcc/ada/raise-gcc.c b/gcc/ada/raise-gcc.c --- a/gcc/ada/raise-gcc.c +++ b/gcc/ada/raise-gcc.c @@ -78,7

[Ada] Fix spurious violations of No_Secondary_Stack restriction

2022-05-19 Thread Pierre-Marie de Rodat via Gcc-patches
Now that finalization and return on the secondary stack are decoupled, the transient scopes created because of the former need not necessarily manage the secondary stack and trigger a violation of the associated restriction. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * ex

[Ada] Mark Requires_Transient_Scope as Inline

2022-05-19 Thread Pierre-Marie de Rodat via Gcc-patches
The predicate is now a simple disjunction of two other predicates. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_util.ads (Requires_Transient_Scope): Add pragma Inline.diff --git a/gcc/ada/sem_util.ads b/gcc/ada/sem_util.ads --- a/gcc/ada/sem_util.ads +++ b/gcc/ada/sem

[Ada] Fix continuation message without a prior error

2022-05-19 Thread Pierre-Marie de Rodat via Gcc-patches
When resolution of an expanded name fails, we call routine Error_Missing_With_Of_Known_Unit which emits an error continuation message (i.e. an error string starting with \\). However, for error continuations to work properly there must be some prior error, because continuation itself doesn't set fl

[Ada] Remove redundant marking of illegal pragma with error posted

2022-05-19 Thread Pierre-Marie de Rodat via Gcc-patches
We flag illegal pragma Elaborate with a call to Error_Msg on the pragma argument, which in turn calls Set_Error_Posted on the enclosing statement, i.e. on the pragma itself. The explicit call to Set_Error_Posted on the pragma itself was redundant. Cleanup related to handling of illegal code when d

[Ada] Preserve unchecked conversion of string constant

2022-05-19 Thread Pierre-Marie de Rodat via Gcc-patches
This makes it possible to pass the result to a C function directly. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * gcc-interface/utils.cc (unchecked_convert): Do not fold a string constant if the target type is pointer to character.diff --git a/gcc/ada/gcc-interface

[Ada] Fix for internal error on semi-circular record aggregate

2022-05-19 Thread Pierre-Marie de Rodat via Gcc-patches
This creates a couple of record subtypes pointing to each other through access subtypes, and we break the circularity at the latter subtypes. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * gcc-interface/decl.cc (gnat_to_gnu_entity) : If it is a special subtype desig

[Ada] Fix internal error on semi-circular record types

2022-05-19 Thread Pierre-Marie de Rodat via Gcc-patches
The front-end properly computes a linear elaboration order for them, but there was a loophole in the handling of the delayed case. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * gcc-interface/decl.cc (gnat_to_gnu_entity) : And skip the elaboration of the designated

[Ada] Do not set Current_Error_Node to a node without location

2022-05-19 Thread Pierre-Marie de Rodat via Gcc-patches
The message "No source file position information available" is displayed in the bugbox when Current_Error_Node has no location, which is useless. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * gcc-interface/trans.cc (gnat_to_gnu): Do not set Current_Error_Node to a

[Ada] Fix internal error on unchecked union with component clauses (2)

2022-05-19 Thread Pierre-Marie de Rodat via Gcc-patches
The issue arises when the unchecked union contains both a fixed part and a variant part, and is subject to a full representation clause covering all the components in all the variants, when the component clauses do not align the variant boundaries with byte boundaries consistently. Tested on x86_6

[Ada] Small housekeeping work in gnat_gimplify_expr

2022-05-19 Thread Pierre-Marie de Rodat via Gcc-patches
This alphabetizes the large switch statement, removes a useless nested switch statement, an artificial fall through and adds a default return. No functional changes. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * gcc-interface/trans.cc (gnat_gimplify_expr): Tidy up.diff --

[Ada] Do not give warnings for compiler-generated entities by default

2022-05-19 Thread Pierre-Marie de Rodat via Gcc-patches
The rationale is that these entities are almost always the result of expansion activities in the front-end, over which the user has very limited control. These warnings can be restored by means of -gnatD. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * gcc-interface/utils.c

Re: [PATCH] Mitigate -Wmaybe-uninitialized in expmed.cc.

2022-05-19 Thread Martin Liška
On 5/16/22 10:56, Richard Sandiford wrote: > Martin Liška writes: >> It's the warning I see every time I build GCC: >> >> In file included from /home/marxin/Programming/gcc/gcc/coretypes.h:478, >> from /home/marxin/Programming/gcc/gcc/expmed.cc:26: >> In function ‘poly_uint16 mode

Re: [PATCH] Fix OMP CAS expansion with separate condition

2022-05-19 Thread Jakub Jelinek via Gcc-patches
On Thu, May 19, 2022 at 02:13:33PM +, Richard Biener wrote: > > Though, depending on what exactly you allow or disallow, maybe even > > the im != 0 might not be acceptable. > > Oh, and if COND_EXPRs can only use some limited set of comparisons, we might > > need to adjust e.g. arith_overflow_ch

Re: [PATCH] Fix OMP CAS expansion with separate condition

2022-05-19 Thread Richard Biener via Gcc-patches
On Thu, 19 May 2022, Jakub Jelinek wrote: > On Thu, May 19, 2022 at 02:13:33PM +, Richard Biener wrote: > > > Though, depending on what exactly you allow or disallow, maybe even > > > the im != 0 might not be acceptable. > > > Oh, and if COND_EXPRs can only use some limited set of comparisons,

[committed] libstdc++: Implement LWG 3683 for pmr::polymorphic_allocator

2022-05-19 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux, pushed to trunk. -- >8 -- This issue has recently been moved to Tentatively Ready, and seems uncontroversial. This allows equality comparison with types that are convertible to pmr::polymorphic_allocator, which fail deduction for the existing equality operator. libstdc++-v3/

Re: [COMMITTED] Add ranger side effect infrastructure.

2022-05-19 Thread David Malcolm via Gcc-patches
On Thu, 2022-05-19 at 15:16 +0200, Bernhard Reutner-Fischer via Gcc- patches wrote: > Hi Andrew, > > On Tue, 17 May 2022 14:38:39 -0400 > Andrew MacLeod via Gcc-patches wrote: > > > commit b7501739f3b14ac7749aace93f636d021fd607f7 > > Author: Andrew MacLeod > > Date:   Mon May 9 15:35:14 2022 -0

Re: [PATCH] ipa-icf: skip variables with body_removed

2022-05-19 Thread Jan Hubicka via Gcc-patches
> Similarly to cgraph_nodes, it may happen that body_removed is set > during merging of symbols. > > PR ipa/105600 > > Patch can bootstrap on x86_64-linux-gnu and survives regression tests. > > Ready to be installed? > Thanks, > Martin > > gcc/ChangeLog: > > * ipa-icf.cc (sem_item_

Re: [PATCH, OpenMP, v2] Implement uses_allocators clause for target regions

2022-05-19 Thread Jakub Jelinek via Gcc-patches
On Tue, May 10, 2022 at 07:29:23PM +0800, Chung-Lin Tang wrote: > I've attached v2 of the patch. Currently in testing. Just a general rant, the non-requires dynamic_allocators support seems to be a total mess in the standard. Probably something that should be discussed on omp-lang. Allocators ca

Re: [COMMITTED] Add ranger side effect infrastructure.

2022-05-19 Thread Bernhard Reutner-Fischer via Gcc-patches
On Thu, 19 May 2022 10:52:35 -0400 David Malcolm wrote: > > In file included from ../../../src/gcc-13.mine/gcc/tree-vrp.h:23, > > from ../../../src/gcc-13.mine/gcc/ssa.h:28, > > from ../../../src/gcc-13.mine/gcc/gimple-warn- > > types.cc:30: > > ../../../src/gcc-

Re: [PATCH, OpenMP, v2] Implement uses_allocators clause for target regions

2022-05-19 Thread Andrew Stubbs
On 19/05/2022 17:00, Jakub Jelinek wrote: Without requires dynamic_allocators, there are various extra restrictions imposed: 1) omp_init_allocator/omp_destroy_allocator may not be called (except for implicit calls to it from uses_allocators) in a target region I interpreted that more like "

Re: [PATCH, OpenMP, v2] Implement uses_allocators clause for target regions

2022-05-19 Thread Jakub Jelinek via Gcc-patches
On Tue, May 10, 2022 at 07:29:23PM +0800, Chung-Lin Tang wrote: > @@ -15624,6 +15626,233 @@ c_parser_omp_clause_allocate (c_parser *parser, > tree list) >return nl; > } > > +/* OpenMP 5.2: > + uses_allocators ( allocator-list ) As uses_allocators is a 5.0 feature already, the above shoul

Re: [PATCH, OpenMP, v2] Implement uses_allocators clause for target regions

2022-05-19 Thread Jakub Jelinek via Gcc-patches
On Thu, May 19, 2022 at 06:02:43PM +0100, Andrew Stubbs wrote: > On 19/05/2022 17:00, Jakub Jelinek wrote: > > Without requires dynamic_allocators, there are various extra restrictions > > imposed: > > 1) omp_init_allocator/omp_destroy_allocator may not be called (except for > > implicit calls

Re: [PATCH v3 09/10] libgcc: Add support for HF mode (aka _Float16) in libbid

2022-05-19 Thread Joseph Myers
On Thu, 19 May 2022, Christophe Lyon via Gcc-patches wrote: > Hi Joseph, > > May I ping you on this version? (I've moved the tests to gcc.dg/torture/ and > checked they work on aarch64 and x86_64. This version is OK, given a bug report filed in Bugzilla for the double-rounding issues with conve

Re: [PATCH v2] x86: Document -mcet-switch

2022-05-19 Thread H.J. Lu via Gcc-patches
On Wed, May 18, 2022 at 11:02 PM Richard Biener wrote: > > On Wed, May 18, 2022 at 7:32 PM H.J. Lu via Gcc-patches > wrote: > > > > On Wed, May 11, 2022 at 1:52 PM H.J. Lu wrote: > > > > > > When -fcf-protection=branch is used, the compiler will generate jump > > > tables for switch statements w

Re: [PATCH v2] x86: Document -mcet-switch

2022-05-19 Thread Florian Weimer via Gcc-patches
* H. J. Lu: > How about this? > > @item -mcet-switch > @opindex mcet-switch > By default, CET instrumentation is turned off on switch statements that > use a jump table and indirect branch track is disabled. Maybe add here: “Since jump tables are stored in read-only memory, this does not result i

Re: [PATCH] Add divide by zero side effect.

2022-05-19 Thread Segher Boessenkool
On Thu, May 19, 2022 at 09:22:32AM -0400, Andrew MacLeod wrote: > On 5/18/22 16:40, Segher Boessenkool wrote: > >On Wed, May 18, 2022 at 04:24:06PM -0400, Andrew MacLeod wrote: > >>On 5/18/22 14:13, Segher Boessenkool wrote: > >>>"Side effect" already has a meaning, very commonly used in language >

[committed] libstdc++: Ensure pmr aliases work without

2022-05-19 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux, pushed to trunk. This adds a lot more code to every container header, which is unfortunate. I plan to replace the inclusion of in the header with something smaller that just defines std:tuple, and not all the helpers like std::make_tuple. -- >8 -- Currently the alias

[committed] libstdc++: Only include for COW string

2022-05-19 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux, pushed to trunk. -- >8 -- Since the COW std::string was moved to its own header, we don't need the atomic dispatch helpers in the definition of std::__cxx11::string. Move the inclusion of the header to where it's needed. libstdc++-v3/ChangeLog: * include/bits

[committed] libstdc++: Avoid including for std::char_traits

2022-05-19 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux, pushed to trunk. -- >8 -- We should prefer the __UINT_LEAST16_TYPE__ and __UINT_LEAST32_TYPE__ macros, if available, so that we don't need all of in every header that uses std::char_traits. libstdc++-v3/ChangeLog: * include/bits/char_traits.h: Only include wh

Re: [PATCH] Remove GIMPLE restriction of ! using match.pd patterns

2022-05-19 Thread Hans-Peter Nilsson via Gcc-patches
> From: Richard Biener via Gcc-patches > Date: Mon, 9 May 2022 13:42:27 +0200 > This removes #if GIMPLE guards around patterns using ! which is > now also provided in the GENERIC implementation. > > Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. > > 2022-05-09 Richard Biener >

Re: [PATCH v2] x86: Document -mcet-switch

2022-05-19 Thread H.J. Lu via Gcc-patches
On Thu, May 19, 2022 at 1:49 PM Florian Weimer wrote: > > * H. J. Lu: > > > How about this? > > > > @item -mcet-switch > > @opindex mcet-switch > > By default, CET instrumentation is turned off on switch statements that > > use a jump table and indirect branch track is disabled. > > Maybe add here

Re: [PATCH] Add divide by zero side effect.

2022-05-19 Thread Andrew MacLeod via Gcc-patches
On 5/19/22 18:23, Segher Boessenkool wrote: On Thu, May 19, 2022 at 09:22:32AM -0400, Andrew MacLeod wrote: On 5/18/22 16:40, Segher Boessenkool wrote: On Wed, May 18, 2022 at 04:24:06PM -0400, Andrew MacLeod wrote: On 5/18/22 14:13, Segher Boessenkool wrote: "Side effect" already has a meani

[PATCH] libstdc++-v3: Set 26_numerics/random/n.b.d./op./values.cc timeout-factor to 3

2022-05-19 Thread Hans-Peter Nilsson via Gcc-patches
Also, how about shortening those test-suite file-paths? They're path sort-of overlong for any git (and ChangeLog) commit-line limit. 1/2 :-) Ok to commit (without renaming)? --- 8< --- I happened to run my cris-elf regression-tester and some large job in parallel when this test was running. Acc

Re: [PATCH] gdc 9, 10 and 11 bug fix

2022-05-19 Thread Marc Aurèle La France
On Tue, 17 May 2022, Marc Aurèle La France wrote: On Tue, 17 May 2022, Iain Buclaw wrote: Excerpts from Marc Aurèle La France's message of Mai 17, 2022 5:31 pm: On Tue, 17 May 2022, Iain Buclaw wrote: Excerpts from Marc Aurèle La France's message of Mai 16, 2022 11:34 pm: On Sun, 15 May 2022,

[PATCH] Increase move cost between mask and gpr.

2022-05-19 Thread liuhongt via Gcc-patches
kmovd only uses port5 which is often the bottleneck of performance. Also from latency perspective, spill and reload mostly could be STLF or even MRN which only take 1 cycle. So the patch increase move cost between gpr and mask to be the same as gpr <-> sse register. Bootstrapped and regtested on

Re: [PATCH] Add divide by zero side effect.

2022-05-19 Thread Richard Biener via Gcc-patches
On Fri, May 20, 2022 at 4:15 AM Andrew MacLeod via Gcc-patches wrote: > > On 5/19/22 18:23, Segher Boessenkool wrote: > > On Thu, May 19, 2022 at 09:22:32AM -0400, Andrew MacLeod wrote: > >> On 5/18/22 16:40, Segher Boessenkool wrote: > >>> On Wed, May 18, 2022 at 04:24:06PM -0400, Andrew MacLeod

Re: [PATCH] Add divide by zero side effect.

2022-05-19 Thread Alexander Monakov via Gcc-patches
On Fri, 20 May 2022, Richard Biener via Gcc-patches wrote: > > Still waiting for a suggestion, since "side effect" is the description > > that made sense to me :-) > > I think side-effect captures it quite well even if it overlaps with a term > used in language standards. Doing c = a << b has th

Re: [PATCH, OpenMP, v2] Implement uses_allocators clause for target regions

2022-05-19 Thread Tobias Burnus
Hi Jakub, On 19.05.22 18:00, Jakub Jelinek wrote: On Tue, May 10, 2022 at 07:29:23PM +0800, Chung-Lin Tang wrote: I've attached v2 of the patch. Currently in testing. Just a general rant, the non-requires dynamic_allocators support seems to be a total mess in the standard. Probably something