Re: [PATCH RFA] input: add get_source_text_between

2022-11-04 Thread David Malcolm via Gcc-patches
On Fri, 2022-11-04 at 13:06 -0400, Jason Merrill wrote: > On 11/4/22 11:16, David Malcolm wrote: > > On Fri, 2022-11-04 at 10:27 -0400, Jason Merrill wrote: > > > On 11/3/22 19:06, David Malcolm wrote: > > > > On Thu, 2022-11-03 at 15:59 -0400, Jason Merrill via Gcc- > > > > patches > > > > wrote:

Re: [PATCH 5a/6] diagnostics: Handle generated data locations in edit_context

2022-11-04 Thread David Malcolm via Gcc-patches
On Fri, 2022-11-04 at 17:05 -0400, Lewis Hyatt wrote: > [PATCH 5a/6] diagnostics: Handle generated data locations in > edit_context > > Class edit_context handles outputting fixit hints in diff form that > could be > manually or automatically applied by the user. This will not make > sense for >

Re: [PATCH 5b/6] diagnostics: Remove null-termination requirement for json::string

2022-11-04 Thread David Malcolm via Gcc-patches
On Fri, 2022-11-04 at 17:05 -0400, Lewis Hyatt wrote: > [PATCH 5b/6] diagnostics: Remove null-termination requirement for > json::string > > json::string currently handles null-terminated data and so can't work > with > data that may contain embedded null bytes or that is not null- > terminated.

Re: [PATCH] riscv: implement TARGET_MODE_REP_EXTENDED

2022-11-04 Thread Philipp Tomsich
Alexander, I had missed your comment until now. On Tue, 6 Sept 2022 at 13:39, Alexander Monakov wrote: > > On Mon, 5 Sep 2022, Philipp Tomsich wrote: > > > +riscv_mode_rep_extended (scalar_int_mode mode, scalar_int_mode mode_rep) > > +{ > > + /* On 64-bit targets, SImode register values are

Re: [PATCH 5/6] diagnostics: Support generated data in additional contexts

2022-11-04 Thread Lewis Hyatt via Gcc-patches
On Fri, Nov 04, 2022 at 12:42:29PM -0400, David Malcolm wrote: > On Fri, 2022-11-04 at 09:44 -0400, Lewis Hyatt via Gcc-patches wrote: > > Add awareness that diagnostic locations may be in generated buffers > > rather > > than an actual file to other places in the diagnostics code that may > >

Re: [PATCH] [PR24021] Implement PLUS_EXPR range-op entry for floats.

2022-11-04 Thread Jakub Jelinek via Gcc-patches
On Fri, Nov 04, 2022 at 08:14:23PM +0100, Jakub Jelinek via Gcc-patches wrote: > One thing that is clear is that real_isdenormal is never true for these > (but then a question is if flush_denormals_to_zero actually works). So, after some more investigation, I think that is actually the case,

Re: [PATCH] [PR24021] Implement PLUS_EXPR range-op entry for floats.

2022-11-04 Thread Jakub Jelinek via Gcc-patches
On Mon, Oct 17, 2022 at 08:21:01AM +0200, Aldy Hernandez wrote: > +// Set VALUE to its next real value, or INF if the operation overflows. > + > +inline void > +frange_nextafter (enum machine_mode mode, > + REAL_VALUE_TYPE , > + const REAL_VALUE_TYPE ) > +{ > + const

Re: [PATCH] c++: libcpp: Support raw strings with newlines in directives [PR55971]

2022-11-04 Thread Jason Merrill via Gcc-patches
On 10/27/22 13:30, Lewis Hyatt wrote: Hello- May I please ask for a review of this patch from June? I realize it's a 10-year-old PR that doesn't seem to be bothering people much, but I still feel like it's an unfortunate gap in C++11 support that is not hard to fix. Original submission is

Re: [PATCH 2/2] libstdc++: Move stream initialization into compiled library [PR44952]

2022-11-04 Thread Florian Weimer via Gcc-patches
* Patrick Palka: > On Fri, 4 Nov 2022, Florian Weimer wrote: > >> * Patrick Palka via Gcc-patches: >> >> > This patch moves the global object for constructing the standard streams >> > out from and into the compiled library on targets that support >> > the init_priority attribute. This means

Re: [PATCH 2/2] libstdc++: Move stream initialization into compiled library [PR44952]

2022-11-04 Thread Patrick Palka via Gcc-patches
On Fri, 4 Nov 2022, Florian Weimer wrote: > * Patrick Palka via Gcc-patches: > > > This patch moves the global object for constructing the standard streams > > out from and into the compiled library on targets that support > > the init_priority attribute. This means that no longer > >

Re: [AArch64] Enable generation of FRINTNZ instructions

2022-11-04 Thread Andre Vieira (lists) via Gcc-patches
Sorry for the delay, just been reminded I still had this patch outstanding from last stage 1. Hopefully since it has been mostly reviewed it could go in for this stage 1? I addressed the comments and gave the slp-part of vectorizable_call some TLC to make it work. I also changed

[PATCH] gcc/file-prefix-map: Fix NULL filename handling

2022-11-04 Thread Richard Purdie via Gcc-patches
e5c15eb183f17e806ad6b58c9497321ded87866f introduced a regression as some ada tests end up passing NULL as the filename to remap_filename(). Handle this as before to fix the tests. gcc/ChangeLog: * file-prefix-map.cc (remap_filename): Handle NULL filenames. Signed-off-by: Richard Purdie ---

Re: [PATCH 1/2] gcc/file-prefix-map: Allow remapping of relative paths

2022-11-04 Thread Richard Purdie via Gcc-patches
On Fri, 2022-11-04 at 10:12 +0100, Eric Botcazou wrote: > > gcc/ChangeLog: > > > > * file-prefix-map.cc (remap_filename): Allow remapping of > > relative paths > > Small regression in Ada though, probably a missing guard somewhere: > > === gnat tests === > > > Running

Re: [PATCH] testsuite: Add testcase from C++23 P2314R4 - Character sets and encodings

2022-11-04 Thread Jason Merrill via Gcc-patches
On 11/4/22 05:14, Jakub Jelinek wrote: Hi! I've read the paper and I believe we just implement it with no changes needed (at least since PR67224 and similar libcpp changes in GCC 10), but I could be wrong. The following patch at least adds a testcase from the start of the paper.

[committed] AArch64: Fix testcase

2022-11-04 Thread Wilco Dijkstra via Gcc-patches
Committed as trivial fix. gcc/testsuite/ * gcc.target/aarch64/mgeneral-regs_3.c: Fix testcase. --- diff --git a/gcc/testsuite/gcc.target/aarch64/mgeneral-regs_3.c b/gcc/testsuite/gcc.target/aarch64/mgeneral-regs_3.c index

Re: [PATCH RFA] input: add get_source_text_between

2022-11-04 Thread Jason Merrill via Gcc-patches
On 11/4/22 11:16, David Malcolm wrote: On Fri, 2022-11-04 at 10:27 -0400, Jason Merrill wrote: On 11/3/22 19:06, David Malcolm wrote: On Thu, 2022-11-03 at 15:59 -0400, Jason Merrill via Gcc-patches wrote: [...snip...] Do you have test coverage for this from the DejaGnu side?  If not,

Re: [PATCH 2/2] libstdc++: Move stream initialization into compiled library [PR44952]

2022-11-04 Thread Florian Weimer via Gcc-patches
* Patrick Palka via Gcc-patches: > This patch moves the global object for constructing the standard streams > out from and into the compiled library on targets that support > the init_priority attribute. This means that no longer > introduces a separate global constructor in each TU that

Re: [PATCH 2/2] libstdc++: Move stream initialization into compiled library [PR44952]

2022-11-04 Thread Jonathan Wakely via Gcc-patches
On Fri, 4 Nov 2022 at 16:31, Patrick Palka wrote: > > On Fri, 4 Nov 2022, Jonathan Wakely wrote: > > > On Fri, 4 Nov 2022 at 15:08, Patrick Palka via Libstdc++ > > wrote: > > > > > > This patch moves the global object for constructing the standard streams > > > out from and into the compiled

Re: [PATCH 5/6] diagnostics: Support generated data in additional contexts

2022-11-04 Thread David Malcolm via Gcc-patches
On Fri, 2022-11-04 at 09:44 -0400, Lewis Hyatt via Gcc-patches wrote: > Add awareness that diagnostic locations may be in generated buffers > rather > than an actual file to other places in the diagnostics code that may > care, > most notably SARIF output (which needs to obtain its own snapshots

[PATCH] symtab: also change RTL decl name [was: RFH: attr target_clones default assembler name ignored?]

2022-11-04 Thread Bernhard Reutner-Fischer via Gcc-patches
On Thu, 3 Nov 2022 23:23:55 +0100 Bernhard Reutner-Fischer wrote: > Hi! > > I encounter a problem/pilot error when using the target_clones > attribute. > > The symptom is that the default clone is not renamed in the output and > thus conflicts with the (proper) global name which is used for

Re: [PATCH 2/2] libstdc++: Move stream initialization into compiled library [PR44952]

2022-11-04 Thread Patrick Palka via Gcc-patches
On Fri, 4 Nov 2022, Jonathan Wakely wrote: > On Fri, 4 Nov 2022 at 15:08, Patrick Palka via Libstdc++ > wrote: > > > > This patch moves the global object for constructing the standard streams > > out from and into the compiled library on targets that support > > the init_priority attribute.

Re: [PATCH 1/2] c++: correct __has_attribute(init_priority)

2022-11-04 Thread Jason Merrill via Gcc-patches
On 11/4/22 11:05, Patrick Palka wrote: Currently __has_attribute(init_priority) always returns true, even on targets that don't actually support init priorities, and when using the attribute on such targets, we issue a hard error that init priorities are unsupported. This makes it impossible to

Re: [PATCH 2/6] diagnostics: Use an inline function rather than hardcoding string

2022-11-04 Thread David Malcolm via Gcc-patches
On Fri, 2022-11-04 at 09:44 -0400, Lewis Hyatt via Gcc-patches wrote: > The string "" is hard-coded in several places throughout > the > diagnostics code, and in some of those places, it is used incorrectly > with > respect to internationalization. (Comparing a translated string to an >

Re: [PATCH 1/6] diagnostics: Fix macro tracking for ad-hoc locations

2022-11-04 Thread David Malcolm via Gcc-patches
On Fri, 2022-11-04 at 09:44 -0400, Lewis Hyatt via Gcc-patches wrote: > The result of linemap_resolve_location() can be an ad-hoc location, > if that is > what was stored in a relevant macro map.  > maybe_unwind_expanded_macro_loc() > did not previously handle this case, causing it to print the

Re: [PATCH 2/2] libstdc++: Move stream initialization into compiled library [PR44952]

2022-11-04 Thread Jonathan Wakely via Gcc-patches
On Fri, 4 Nov 2022 at 15:08, Patrick Palka via Libstdc++ wrote: > > This patch moves the global object for constructing the standard streams > out from and into the compiled library on targets that support > the init_priority attribute. This means that no longer > introduces a separate global

Re: [PATCH RFA] input: add get_source_text_between

2022-11-04 Thread David Malcolm via Gcc-patches
On Fri, 2022-11-04 at 10:27 -0400, Jason Merrill wrote: > On 11/3/22 19:06, David Malcolm wrote: > > On Thu, 2022-11-03 at 15:59 -0400, Jason Merrill via Gcc-patches > > wrote: [...snip...] > > > > > > Do you have test coverage for this from the DejaGnu side?  If not, > > you > > could add

[PATCH 2/2] libstdc++: Move stream initialization into compiled library [PR44952]

2022-11-04 Thread Patrick Palka via Gcc-patches
This patch moves the global object for constructing the standard streams out from and into the compiled library on targets that support the init_priority attribute. This means that no longer introduces a separate global constructor in each TU that includes it. We can do this only if the

[PATCH 1/2] c++: correct __has_attribute(init_priority)

2022-11-04 Thread Patrick Palka via Gcc-patches
Currently __has_attribute(init_priority) always returns true, even on targets that don't actually support init priorities, and when using the attribute on such targets, we issue a hard error that init priorities are unsupported. This makes it impossible to conditionally use the attribute by

[PATCH] LoongArch: Add fcopysign instructions

2022-11-04 Thread Xi Ruoyao via Gcc-patches
Add fcopysign.{s,d} with the names copysign{sf,df}3 so GCC will expand __builtin_copysign{f,} to a single instruction. Link: https://sourceware.org/pipermail/libc-alpha/2022-November/143177.html gcc/ChangeLog: * config/loongarch/loongarch.md (UNSPEC_FCOPYSIGN): New unspec.

Re: [PATCH RFA] input: add get_source_text_between

2022-11-04 Thread Jason Merrill via Gcc-patches
On 11/3/22 19:06, David Malcolm wrote: On Thu, 2022-11-03 at 15:59 -0400, Jason Merrill via Gcc-patches wrote: Tested x86_64-pc-linux-gnu, OK for trunk? -- >8 -- The c++-contracts branch uses this to retrieve the source form of the contract predicate, to be returned by

[COMMITTED] Set nonzero bits for multiplication and divisions by a power of 2.

2022-11-04 Thread Aldy Hernandez via Gcc-patches
We're missing a lot of TLC in keeping track of nonzero bits across range-ops. It isn't an oversight, but just limited amount of hours to implement stuff. This patch keeps better track of the nonzero mask (really maybe_nonzero bits as discussed) across multiplication and division when the RHS is

[committed] libstdc++: Simplify lifetime of eh_globals variable [PR107500]

2022-11-04 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux. Pushed to trunk. -- >8 -- Since this is a trivial type, we probably don't need to do anything to ensure it's still accessible after other static dtors. libstdc++-v3/ChangeLog: PR libstdc++/107500 * libsupc++/eh_globals.cc (eh_globals): Remove

[committed] libstdc++: Define _GNU_SOURCE for secure_getenv on Cygwin [PR107511]

2022-11-04 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux. Pushed to trunk. -- >8 -- As in r12-6867-ge20486d508afdf we need to define _GNU_SOURCE explicitly for Cygwin, because configure finds it in libc but it isn't declared unless we request it. libstdc++-v3/ChangeLog: PR libstdc++/107511 *

[COMMITTED] ada: Cleanup code for unreferenced variables

2022-11-04 Thread Marc Poulhiès via Gcc-patches
From: Piotr Trojanek Further cleanups related to warnings about unreferenced objects. gcc/ada/ * sem_warn.adb (Check_References): Remove useless query for "spec" of a variable; refactor nested if-statements into a single condition. Tested on x86_64-pc-linux-gnu,

[COMMITTED] ada: Fix for validity checks combined with aliasing checks

2022-11-04 Thread Marc Poulhiès via Gcc-patches
From: Justin Squirek Attribute Overlaps_Storage, which can appear implicitly in expansion of aliasing checks, is now excluded from operand validity checks. Likewise for attribute Has_Same_Storage. gcc/ada/ * exp_attr.adb (Expand_N_Attribute_Reference): Skip operand validity

[COMMITTED] ada: Cleanup code for warnings about unset references

2022-11-04 Thread Marc Poulhiès via Gcc-patches
From: Piotr Trojanek Cleanup related to new checks for unset references. gcc/ada/ * sem_util.adb (In_Pragma_Expression): Add standard guard against searching too far. (In_Quantified_Expression): Likewise. * sem_warn.adb

[COMMITTED] ada: Fix couple of issues with arrays indexed by enumeration type

2022-11-04 Thread Marc Poulhiès via Gcc-patches
From: Eric Botcazou The first one is that Remove_Warning_Messages reinstates the Original_Node of an N_Raise_Constraint_Error node in the tree for no clear reasons, and the Original_Node may contain constructs whose expansion has been stopped when the Constraint_Error was asserted, eventually

[COMMITTED] ada: Fix various typos in GNAT User's Guide

2022-11-04 Thread Marc Poulhiès via Gcc-patches
From: Piotr Trojanek Fix uncontroversial typos. gcc/ada/ * doc/gnat_ugn/building_executable_programs_with_gnat.rst: Fix typos. * doc/gnat_ugn/elaboration_order_handling_in_gnat.rst: Fix typos and refill as necessary; remove trailing whitespace. *

[COMMITTED] ada: Fix typo in comment referring to pragma Restrictions

2022-11-04 Thread Marc Poulhiès via Gcc-patches
From: Piotr Trojanek Comment cleanup only. gcc/ada/ * libgnat/g-excact.ads (Register_Global_Action): Refill comment. (Name_To_Id): Change pragma Restriction from singular to plural. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/libgnat/g-excact.ads

[COMMITTED] ada: Fix repeated killing of private entity values

2022-11-04 Thread Marc Poulhiès via Gcc-patches
From: Piotr Trojanek When killing known values of assignable entities we iterated from First_Entity and then again from First_Private_Entity. This second iteration was unnecessary, because the entity chain that starts with First_Entity contains all entities, including the private ones. This is

[COMMITTED] ada: Flag unsupported dispatching constructor calls

2022-11-04 Thread Marc Poulhiès via Gcc-patches
From: Javier Miranda gcc/ada/ * exp_intr.adb (Expand_Dispatching_Constructor_Call): Report an error on unsupported dispatching constructor calls and report a warning on calls that may fail at run time. gcc/testsuite/ * gnat.dg/abstract1.ads: Cleanup

[COMMITTED] ada: Cleanup code for warnings about unreferenced formal parameters

2022-11-04 Thread Marc Poulhiès via Gcc-patches
From: Piotr Trojanek Cleanup related to new checks for unset references. gcc/ada/ * sem_warn.adb (Check_References): Remove redundant guard, as it is implied by a preceding call to Referenced_Check_Spec. Tested on x86_64-pc-linux-gnu, committed on master. ---

[COMMITTED] ada: Remove sa_messages

2022-11-04 Thread Marc Poulhiès via Gcc-patches
From: Ghjuvan Lacambre Spark and CodePeer do not depend on this unit anymore. gcc/ada/ * sa_messages.ads, sa_messages.adb: Remove files. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/sa_messages.adb | 539

[COMMITTED] ada: Simplify detection of controlling formals

2022-11-04 Thread Marc Poulhiès via Gcc-patches
From: Piotr Trojanek When detecting controlling formals we are only interested in formal parameters and not in other entities. gcc/ada/ * sem_ch6.adb (Controlling_Formal): Iterate with First/Next_Formal and not with First/Next_Entity. Tested on x86_64-pc-linux-gnu, committed

[COMMITTED] ada: Avoid repeated iteration over private protected components

2022-11-04 Thread Marc Poulhiès via Gcc-patches
From: Piotr Trojanek The First_Entity/Next_Entity chain includes private entities, so there it no need to iterate starting both from First_Entity and First_Private_Entity. Code cleanup related to improved detection of references to uninitialized objects; behavior is unaffected. gcc/ada/

[COMMITTED] ada: Static intrinsic functions are a core language extension.

2022-11-04 Thread Marc Poulhiès via Gcc-patches
From: Steve Baird GNAT-defined Ada extensions are divided into two categories: those that are enabled by either -gnatX or -gnatX0 and those which require -gnatX0. Move static intrinsic functions from the second category into the first. gcc/ada/ *

[COMMITTED] ada: Fix various typos in GNAT RM

2022-11-04 Thread Marc Poulhiès via Gcc-patches
From: Piotr Trojanek List of unknown words in files can be produced with: $ cat *.rst | ispell -l | tr '[:upper:]' '[:lower:]' | sort | uniq | less and can be easily filtered with eyes. gcc/ada/ * doc/gnat_rm/implementation_defined_aspects.rst: Fix typos. *

[COMMITTED] ada: Skip dynamic interface conversion under configurable runtime

2022-11-04 Thread Marc Poulhiès via Gcc-patches
From: Javier Miranda gcc/ada/ * exp_disp.adb (Expand_Interface_Conversion): Fix typo in comment. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/exp_disp.adb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/ada/exp_disp.adb

[COMMITTED] ada: Cleanup clearing flags on package variables

2022-11-04 Thread Marc Poulhiès via Gcc-patches
From: Piotr Trojanek When killing flags on assignable entities we iterated from First_Entity and then again from First_Private_Entity. This second iteration was unnecessary, because the entity chain that starts with First_Entity contains all entities, including the private ones. This is just a

[COMMITTED] ada: Remove redundant calls in handling of aspect specifications

2022-11-04 Thread Marc Poulhiès via Gcc-patches
From: Piotr Trojanek Routine Set_Aspect_Specifications sets the Has_Aspect flag, so there is no need to set this flag again afterwards. Code cleanup; semantics is unaffected. gcc/ada/ * aspects.adb (Relocate_Aspect): Remove call to Set_Has_Aspects. * sem_ch12.adb

[COMMITTED] ada: Improve efficiency of scope stack restoration

2022-11-04 Thread Marc Poulhiès via Gcc-patches
From: Piotr Trojanek We save/restore visibility by setting the Is_Immediately_Visible flag and appending entities to / removing them from the tail of an element list. However, the Is_Immediately_Visible flag can be restored in any order, while the element list is singly-linked and removal from

[COMMITTED] ada: Skip dynamic interface conversion under configurable runtime

2022-11-04 Thread Marc Poulhiès via Gcc-patches
From: Javier Miranda gcc/ada/ * exp_disp.adb (Expand_Interface_Conversion): Under configurable runtime, when the target type is an interface that is an ancestor of the operand type, skip generating code to displace the pointer to reference the target

[COMMITTED] ada: Fix typo

2022-11-04 Thread Marc Poulhiès via Gcc-patches
From: Ronan Desplanques Fix typo in documentation. gcc/ada/ * doc/gnat_rm/standard_library_routines.rst: Fix typo. * gnat_rm.texi: Regenerate. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/doc/gnat_rm/standard_library_routines.rst | 2 +-

[COMMITTED] ada: Fix loop unnesting issue.

2022-11-04 Thread Marc Poulhiès via Gcc-patches
During loop unnesting, when the loop statements are wrapped in a code block, the newly created block's scope must be set to the loop scope (instead of the previous 'Current_Scope' that would point to an upper scope). gcc/ada/ * sem_util.ads (Add_Block_Identifier): Add new extra Scope

[COMMITTED] ada: Small editorial changes to documentation comments

2022-11-04 Thread Marc Poulhiès via Gcc-patches
From: Ronan Desplanques gcc/ada/ * sinfo.ads: Small editorial changes. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/sinfo.ads | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gcc/ada/sinfo.ads b/gcc/ada/sinfo.ads index

[COMMITTED] ada: Refactor: replace uses of `not Present(X)` with `No (X)`

2022-11-04 Thread Marc Poulhiès via Gcc-patches
From: Ghjuvan Lacambre `No (X)` is essentially `not Present (X)`, there's no reason for not using this shorter form. gcc/ada/ * checks.adb, exp_atag.adb, exp_attr.adb, exp_ch4.adb, exp_ch6.adb, exp_ch7.adb, exp_dbug.adb, exp_disp.adb, exp_unst.adb, exp_util.adb,

[COMMITTED] ada: Fix various typos in node and entity description comments

2022-11-04 Thread Marc Poulhiès via Gcc-patches
From: Piotr Trojanek Fix typos in units that describe GNAT abstract syntax tree. gcc/ada/ * einfo.ads: Fix typos in comments; refill as necessary. * sinfo.ads: Likewise. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/einfo.ads | 13 +++--

[COMMITTED] ada: Allow enabling a restricted set of language extensions.

2022-11-04 Thread Marc Poulhiès via Gcc-patches
From: Steve Baird The -gnatX switch (and the related Extensions_Allowed pragma) is currently a two-valued all-or-nothing option. Add support for enabling a curated subset of language extensions without enabling others via the -gnatX switch and for enabling all language extensions via the new

[COMMITTED] ada: Generate missing object decls for adainit/adafinal registration calls

2022-11-04 Thread Marc Poulhiès via Gcc-patches
From: Steve Baird A previous change on this ticket introduced calls to CUDA_Register_Function for adainit and adafinal, but failed to introduce declarations for the C string variables that are initialized and then passed as actual parameters in this call. Provide the missing declarations (and,

[COMMITTED] ada: Remove VxWorks 6 and VxWorks 653 2.x content from the UGX

2022-11-04 Thread Marc Poulhiès via Gcc-patches
From: Cedric Landet Because they are not supported anymore. gcc/ada/ * doc/gnat_rm/implementation_defined_pragmas.rst: Remove VxWorks version 6. * gnat_rm.texi, gnat_ugn.texi: Regenerate. Tested on x86_64-pc-linux-gnu, committed on master. ---

[COMMITTED] ada: Support lock-free protected objects with pragma Initialize_Scalars

2022-11-04 Thread Marc Poulhiès via Gcc-patches
From: Piotr Trojanek In general, protected subprograms are only eligible for a lock-free expansion if they do not reference global assignable objects. However, it seems reasonable to ignore references to variables in System.Scalar_Values, which are generated when pragma Initialize_Scalars is

[COMMITTED] ada: Reject expanded global names in lock-free protected objects

2022-11-04 Thread Marc Poulhiès via Gcc-patches
From: Piotr Trojanek Lock-free expansion of protected subprograms is only possible when there are no references to global assignable objects. We only detected such references when they appeared as direct names, but we must similarly detect expanded names. gcc/ada/ * sem_ch9.adb

[COMMITTED] ada: Generate host-side CUDA_Register_Function calls for device's adainit/adafinal

2022-11-04 Thread Marc Poulhiès via Gcc-patches
From: Steve Baird To invoke a device-side subprogram from the host (via a CUDA_execute pragma), the subprogram also has to be registered by calling CUDA_Register_Function. The host-side adainit and adafinal procedures need to invoke the corresponding device-side procedures, so corresponding

Re: [PATCH v2] tree-object-size: Support strndup and strdup

2022-11-04 Thread Siddhesh Poyarekar
On 2022-11-04 09:43, Prathamesh Kulkarni wrote: On Fri, 4 Nov 2022 at 18:18, Siddhesh Poyarekar wrote: Use string length of input to strdup to determine the usable size of the resulting object. Avoid doing the same for strndup since there's a chance that the input may be too large, resulting

[PATCH 6/6] diagnostics: libcpp: Assign real locations to the tokens inside _Pragma strings

2022-11-04 Thread Lewis Hyatt via Gcc-patches
Currently, the tokens obtained from a destringified _Pragma string do not get assigned proper locations while they are being lexed. After the tokens have been obtained, they are reassigned the same location as the _Pragma token, which is sufficient to make things like _Pragma("GCC diagnostic

[PATCH 5/6] diagnostics: Support generated data in additional contexts

2022-11-04 Thread Lewis Hyatt via Gcc-patches
Add awareness that diagnostic locations may be in generated buffers rather than an actual file to other places in the diagnostics code that may care, most notably SARIF output (which needs to obtain its own snapshots of the code involved). For edit context output, which outputs fixit hints as

[PATCH 4/6] diagnostics: libcpp: Add LC_GEN linemaps to support in-memory buffers

2022-11-04 Thread Lewis Hyatt via Gcc-patches
Add a new linemap reason LC_GEN which enables encoding the location of data that was generated during compilation and does not appear in any source file. There could be many use cases, such as, for instance, referring to the content of builtin macros (not yet implemented, but an easy lift after

[PATCH 2/6] diagnostics: Use an inline function rather than hardcoding string

2022-11-04 Thread Lewis Hyatt via Gcc-patches
The string "" is hard-coded in several places throughout the diagnostics code, and in some of those places, it is used incorrectly with respect to internationalization. (Comparing a translated string to an untranslated string.) The error is not currently observable in any output GCC actually

[PATCH 3/6] libcpp: Fix paste error with unknown pragma after macro expansion

2022-11-04 Thread Lewis Hyatt via Gcc-patches
In directives.cc, do_pragma() contains logic to handle a case such as the new testcase pragma-omp-unknown.c, where an unknown pragma was the result of macro expansion (for pragma namespaces that permit expansion). This no longer works correctly as shown by the testcase, fixed by adding PREV_WHITE

[PATCH 1/6] diagnostics: Fix macro tracking for ad-hoc locations

2022-11-04 Thread Lewis Hyatt via Gcc-patches
The result of linemap_resolve_location() can be an ad-hoc location, if that is what was stored in a relevant macro map. maybe_unwind_expanded_macro_loc() did not previously handle this case, causing it to print the wrong tracking information for an example such as the new testcase

[PATCH 0/6] diagnostics: libcpp: Overhaul locations for _Pragma tokens

2022-11-04 Thread Lewis Hyatt via Gcc-patches
Hello- In the past couple years there has been a ton of progress in fixing bugs related to _Pragma, especially its use in the type of macros that many projects like to implement for manipulating GCC diagnostic pragmas more easily. For GCC 13 I have been going through the remaining open PRs,

Re: [PATCH v2] tree-object-size: Support strndup and strdup

2022-11-04 Thread Prathamesh Kulkarni via Gcc-patches
On Fri, 4 Nov 2022 at 18:18, Siddhesh Poyarekar wrote: > > Use string length of input to strdup to determine the usable size of the > resulting object. Avoid doing the same for strndup since there's a > chance that the input may be too large, resulting in an unnecessary > overhead or worse, the

Re: [PATCH] libcpp: Update to Unicode 15

2022-11-04 Thread Marek Polacek via Gcc-patches
On Fri, Nov 04, 2022 at 09:55:55AM +0100, Jakub Jelinek wrote: > Hi! > > The following patch (included in the mail is for uname2c.h part > just a pseudo patch with a lot of changes replaced with ... > because it is too large but the important changes like > -static const char uname2c_dict[59418]

Re: [PATCH] [PR24021] Implement PLUS_EXPR range-op entry for floats.

2022-11-04 Thread Jakub Jelinek via Gcc-patches
On Mon, Oct 17, 2022 at 08:21:01AM +0200, Aldy Hernandez wrote: > --- a/gcc/range-op-float.cc > +++ b/gcc/range-op-float.cc > @@ -200,6 +200,116 @@ frelop_early_resolve (irange , tree type, > && relop_early_resolve (r, type, op1, op2, rel, my_rel)); > } > > +// If R contains a NAN of

Re: [PATCH v2] libgcc: Mostly vectorize CIE encoding extraction for FDEs

2022-11-04 Thread Florian Weimer via Gcc-patches
* Jakub Jelinek: >> +#undef C >> + >> + /* Validate the augmentation length, and return the enconding after >> + it. No check for the return address column because it is >> + byte-encoded with CIE version 1. */ >> + if (__builtin_expect ((value & mask) == expected >> +

[PATCH v2] tree-object-size: Support strndup and strdup

2022-11-04 Thread Siddhesh Poyarekar
Use string length of input to strdup to determine the usable size of the resulting object. Avoid doing the same for strndup since there's a chance that the input may be too large, resulting in an unnecessary overhead or worse, the input may not be NULL terminated, resulting in a crash where there

[PATCH] doc: Document correct -fwide-exec-charset defaults [PR41041]

2022-11-04 Thread Jonathan Wakely via Gcc-patches
OK for trunk and release branches? -- >8 -- As shown in the PR, the default is not UTF-32 but rather UTF-32BE or UTF-32LE, avoiding the need for a byte order mark in literals. gcc/ChangeLog: PR c/41041 * doc/cppopts.texi: Document -fwide-exec-charset defaults correctly.

Re: [PATCH] cgraph_node: Remove redundant section clearing

2022-11-04 Thread Jan Hubicka via Gcc-patches
> Ok for trunk if testing passes? > > gcc/ChangeLog: > > * cgraph.cc (cgraph_node::make_local): Remove redundant set_section. > * multiple_target.cc (create_dispatcher_calls): Likewise. OK (not sure how this slipped in) The code in create_dispatcher_calls is clearly cut of

Re: GCC 13: OpenMP offloading to Intel MIC has been removed (was: Remove support for Intel MIC offloading)

2022-11-04 Thread Jakub Jelinek via Gcc-patches
On Fri, Nov 04, 2022 at 11:05:13AM +0100, Thomas Schwinge wrote: > Hi! > > On 2022-10-20T13:34:41+0200, Jakub Jelinek via Gcc-patches > wrote: > > we'll need to update the offloading wiki > > I'll look into that. I assume we just remove any "Intel MIC" text, > unless historically or otherwise

Re: Remove support for Intel MIC offloading

2022-11-04 Thread Thomas Schwinge
Hi Jakub! On 2022-11-04T11:30:04+0100, Jakub Jelinek wrote: > On Fri, Nov 04, 2022 at 10:54:02AM +0100, Thomas Schwinge wrote: >> On 2022-10-20T22:56:57+0200, I wrote: >> > Hi Jakub, Tobias! >> > >> > On 2022-10-20T13:15:43+0200, I wrote: >> >> I'm proposing the attached "Remove support for

Re: Remove support for Intel MIC offloading

2022-11-04 Thread Jakub Jelinek via Gcc-patches
On Fri, Nov 04, 2022 at 10:54:02AM +0100, Thomas Schwinge wrote: > Hi! > > On 2022-10-20T22:56:57+0200, I wrote: > > Hi Jakub, Tobias! > > > > On 2022-10-20T13:15:43+0200, I wrote: > >> I'm proposing the attached "Remove support for Intel MIC offloading" > > > > Can you please confirm: > >

Re: [PATCH v2] libgcc: Mostly vectorize CIE encoding extraction for FDEs

2022-11-04 Thread Jakub Jelinek via Gcc-patches
On Fri, Nov 04, 2022 at 10:37:56AM +0100, Florian Weimer via Gcc-patches wrote: > "zR" and "zPLR" are the most common augmentations. Use a simple > SIMD-with-in-a-register technique to check for both augmentations, > and that the following variable-length integers have length 1, to > get more

[PATCH][committed] aarch64: Fix typo in aarch64-sve.md comment

2022-11-04 Thread Kyrylo Tkachov via Gcc-patches
Pushing as obvious. Thanks, Kyrill gcc/ChangeLog: * config/aarch64/aarch64-sve2.md: Fix typo in Cryptographic extensions comment. typo.patch Description: typo.patch

GCC 13: OpenMP offloading to Intel MIC has been removed (was: Remove support for Intel MIC offloading)

2022-11-04 Thread Thomas Schwinge
Hi! On 2022-10-20T13:34:41+0200, Jakub Jelinek via Gcc-patches wrote: > we'll need to update the offloading wiki I'll look into that. I assume we just remove any "Intel MIC" text, unless historically or otherwise still relevant, of course. Likewise I'll look through open PRs to see if any

Remove support for Intel MIC offloading

2022-11-04 Thread Thomas Schwinge
Hi! On 2022-10-20T22:56:57+0200, I wrote: > Hi Jakub, Tobias! > > On 2022-10-20T13:15:43+0200, I wrote: >> I'm proposing the attached "Remove support for Intel MIC offloading" > > Can you please confirm: Taking your non-response as silent approval, I've now pushed to master branch commit

Re: [PATCH, v2] Fortran: ordering of hidden procedure arguments [PR107441]

2022-11-04 Thread Mikael Morin
Le 03/11/2022 à 23:03, Harald Anlauf a écrit : Am 03.11.22 um 11:06 schrieb Mikael Morin: Le 02/11/2022 à 22:19, Harald Anlauf via Fortran a écrit : I do see what needs to be done in gfc_get_function_type, which seems in fact very simple.  But I get really lost in create_function_arglist when

Update Affiliation.

2022-11-04 Thread Ramana Radhakrishnan via Gcc-patches
Update affiliation as I'm moving on from Arm. More from me in a month or so. Pushed to trunk regards Ramana commit 4e5f373406ed5da42c4a7c4b7f650d92195f2984 Author: Ramana Radhakrishnan Date: Fri Nov 4 09:30:00 2022 + Update affiliation diff --git a/htdocs/steering.html

Re: [PATCH] Fix recent thinko in operand_equal_p

2022-11-04 Thread Richard Biener via Gcc-patches
> Am 04.11.2022 um 10:29 schrieb Eric Botcazou via Gcc-patches > : > > Hi, > > there is a thinko in the recent improvement by Jan: > > 2020-11-19 Jan Hubicka > >* fold-const.c (operand_compare::operand_equal_p): Fix thinko in >COMPONENT_REF handling and guard types_same_for_odr

[PATCH v2] libgcc: Mostly vectorize CIE encoding extraction for FDEs

2022-11-04 Thread Florian Weimer via Gcc-patches
"zR" and "zPLR" are the most common augmentations. Use a simple SIMD-with-in-a-register technique to check for both augmentations, and that the following variable-length integers have length 1, to get more quickly at the encoding field. libgcc/ * unwind-dw2-fde.c

Re: [PATCH 1/3] STABS: remove -gstabs and -gxcoff functionality

2022-11-04 Thread Thomas Schwinge
Hi! On 2022-09-01T12:05:23+0200, Martin Liška wrote: > gcc/ChangeLog: > --- a/gcc/system.h > +++ b/gcc/system.h > @@ -1009,8 +1009,7 @@ extern void fancy_abort (const char *, int, const char > *) > ASM_OUTPUT_DEFINE_LABEL_DIFFERENCE_SYMBOL HOST_WORDS_BIG_ENDIAN\ > OBJC_PROLOGUE

[PATCH] Fix recent thinko in operand_equal_p

2022-11-04 Thread Eric Botcazou via Gcc-patches
Hi, there is a thinko in the recent improvement by Jan: 2020-11-19 Jan Hubicka * fold-const.c (operand_compare::operand_equal_p): Fix thinko in COMPONENT_REF handling and guard types_same_for_odr by virtual_method_call_p. (operand_compare::hash_operand):

[PATCH] testsuite: Add testcase from C++23 P2314R4 - Character sets and encodings

2022-11-04 Thread Jakub Jelinek via Gcc-patches
Hi! I've read the paper and I believe we just implement it with no changes needed (at least since PR67224 and similar libcpp changes in GCC 10), but I could be wrong. The following patch at least adds a testcase from the start of the paper. Bootstrapped/regtested on x86_64-linux and i686-linux,

Better integrate default 'sorry' 'TARGET_ASM_CONSTRUCTOR', 'TARGET_ASM_DESTRUCTOR' (was: Restore default 'sorry' 'TARGET_ASM_CONSTRUCTOR', 'TARGET_ASM_DESTRUCTOR')

2022-11-04 Thread Thomas Schwinge
Hi! On 2022-10-11T08:40:02+0200, Richard Biener via Gcc-patches wrote: > On Mon, Oct 10, 2022 at 4:23 PM Tom de Vries wrote: >> FWIW, nvptx change looks in the obvious category to me. I hadn't put you on CC for approval of the one-line '#include' change, but rather to inform you about the

Re: [PATCH 1/2] gcc/file-prefix-map: Allow remapping of relative paths

2022-11-04 Thread Eric Botcazou via Gcc-patches
> gcc/ChangeLog: > > * file-prefix-map.cc (remap_filename): Allow remapping of relative paths Small regression in Ada though, probably a missing guard somewhere: === gnat tests === Running target unix FAIL: gnat.dg/specs/coverage1.ads (test for excess errors) In order to

Re: Restore default 'sorry' 'TARGET_ASM_CONSTRUCTOR', 'TARGET_ASM_DESTRUCTOR' (was: [PATCH 1/3] STABS: remove -gstabs and -gxcoff functionality)

2022-11-04 Thread Thomas Schwinge
Hi! On 2022-11-04T10:04:59+0100, wrote: > On 2022-10-12T11:21:19+0200, Martin Liška wrote: >> On 10/10/22 16:19, Thomas Schwinge wrote: >>> attached >>> "Restore default 'sorry' 'TARGET_ASM_CONSTRUCTOR', 'TARGET_ASM_DESTRUCTOR'". > >> Thanks for the fix, really appreciated! > > Pushed to master

Restore default 'sorry' 'TARGET_ASM_CONSTRUCTOR', 'TARGET_ASM_DESTRUCTOR' (was: [PATCH 1/3] STABS: remove -gstabs and -gxcoff functionality)

2022-11-04 Thread Thomas Schwinge
Hi! On 2022-10-12T11:21:19+0200, Martin Liška wrote: > On 10/10/22 16:19, Thomas Schwinge wrote: >> attached >> "Restore default 'sorry' 'TARGET_ASM_CONSTRUCTOR', 'TARGET_ASM_DESTRUCTOR'". > Thanks for the fix, really appreciated! Pushed to master branch commit

[PATCH] libcpp: Update to Unicode 15

2022-11-04 Thread Jakub Jelinek via Gcc-patches
Hi! The following pseudo-patch (for uname2c.h part just a pseudo patch with a lot of changes replaced with ... because it is too large but the important changes like -static const char uname2c_dict[59418] = +static const char uname2c_dict[59891] = -static const unsigned char uname2c_tree[208765]

Re: Extend fold_vec_perm to fold VEC_PERM_EXPR in VLA manner

2022-11-04 Thread Prathamesh Kulkarni via Gcc-patches
On Mon, 31 Oct 2022 at 15:27, Richard Sandiford wrote: > > Prathamesh Kulkarni writes: > > On Wed, 26 Oct 2022 at 21:07, Richard Sandiford > > wrote: > >> > >> Sorry for the slow response. I wanted to find some time to think > >> about this a bit more. > >> > >> Prathamesh Kulkarni writes: >

Re: c: tree: target: C2x (...) function prototypes and va_start relaxation

2022-11-04 Thread Eric Botcazou via Gcc-patches
> And also: > > FAIL: gcc.dg/torture/c2x-stdarg-split-1a.c -O0 execution test > FAIL: gcc.dg/torture/c2x-stdarg-split-1a.c -O1 execution test > FAIL: gcc.dg/torture/c2x-stdarg-split-1a.c -O2 execution test > FAIL: gcc.dg/torture/c2x-stdarg-split-1a.c -O3 -g execution test > FAIL:

[PATCH] Initial Granite Rapids support

2022-11-04 Thread Haochen Jiang via Gcc-patches
From: "Hu, Lin1" Hi all, This patch aimed to add initial Granite Rapids support for GCC. It needs to be checked in after prefetchit0/t1 patch. The information for Granite Rapids comes following:

  1   2   >