[PATCH] Use unsigned long long in asm-x86-linux-rdmsr.c

2021-10-01 Thread H.J. Lu via Gcc-patches
On Wed, Aug 4, 2021 at 3:26 PM David Malcolm via Gcc-patches wrote: > > Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. > Pushed to trunk as r12-2749-gded2c2c068f6f2825474758cb03a05070a5837e8. > > gcc/ChangeLog: > PR analyzer/101570 > * Makefile.in (ANALYZER_OBJS):

[r12-4067 Regression] FAIL: g++.dg/modules/xtreme-header-3_a.H -std=c++2b (test for excess errors) on Linux/x86_64

2021-10-01 Thread sunil.k.pandey via Gcc-patches
On Linux/x86_64, c46ecb0112e91c80ee111439e79a58a953e4479d is the first bad commit commit c46ecb0112e91c80ee111439e79a58a953e4479d Author: Jonathan Wakely Date: Mon Apr 19 14:49:12 2021 +0100 libstdc++: Allow visiting inherited variants [PR 90943] caused FAIL:

Re: [PATCH] c++: unifying equal NONTYPE_ARGUMENT_PACKs [PR102547]

2021-10-01 Thread Patrick Palka via Gcc-patches
On Fri, 1 Oct 2021, Patrick Palka wrote: > On Fri, Oct 1, 2021 at 1:29 PM Patrick Palka wrote: > > > > On Fri, 1 Oct 2021, Jason Merrill wrote: > > > > > On 10/1/21 10:26, Patrick Palka wrote: > > > > On Fri, 1 Oct 2021, Jason Merrill wrote: > > > > > > > > > On 10/1/21 09:46, Patrick Palka

Re: [PATCH] c++: unifying equal NONTYPE_ARGUMENT_PACKs [PR102547]

2021-10-01 Thread Patrick Palka via Gcc-patches
On Fri, Oct 1, 2021 at 1:29 PM Patrick Palka wrote: > > On Fri, 1 Oct 2021, Jason Merrill wrote: > > > On 10/1/21 10:26, Patrick Palka wrote: > > > On Fri, 1 Oct 2021, Jason Merrill wrote: > > > > > > > On 10/1/21 09:46, Patrick Palka wrote: > > > > > Here during partial ordering of the two

[PATCH v2] c-family: Implement -Warray-compare [PR97573]

2021-10-01 Thread Marek Polacek via Gcc-patches
On Fri, Oct 01, 2021 at 11:15:45PM +0200, Jakub Jelinek wrote: > On Fri, Oct 01, 2021 at 04:11:08PM -0400, Marek Polacek via Gcc-patches wrote: > > + auto_diagnostic_group d; > > + if (warning_at (location, OPT_Warray_compare, > > + "comparison between two arrays%s", > > +

Re: [PATCH] c-format: Add -Wformat-same-precision option [PR80060]

2021-10-01 Thread Daniil Stas via Gcc-patches
Hi, Martin On Thu, 30 Sep 2021 09:02:28 -0600 Martin Sebor wrote: > On 9/26/21 3:52 PM, Daniil Stas via Gcc-patches wrote: > > This option is enabled by default when -Wformat option is enabled. A > > user can specify -Wno-format-same-precision to disable emitting > > warnings about an argument

Re: [committed] libstdc++: Specialize std::pointer_traits<__normal_iterator>

2021-10-01 Thread Jonathan Wakely via Gcc-patches
On Thu, 30 Sept 2021 at 21:27, François Dumont via Libstdc++ wrote: > > Here is the _Safe_iterator one. > > Doing so I noticed that pointer_traits rebind for __normal_iterator was > wrong and added tests on it. Oops, thanks! > For _Safe_iterator maybe I should specialize only when instantiated

RE: [PATCH][GCC] aarch64: enable cortex-x2 CPU

2021-10-01 Thread Przemyslaw Wirkus via Gcc-patches
> Subject: RE: [PATCH][GCC] aarch64: enable cortex-x2 CPU > > > > > -Original Message- > > From: Kyrylo Tkachov > > Sent: Friday, October 1, 2021 1:17 PM > > To: Przemyslaw Wirkus ; gcc- > > patc...@gcc.gnu.org > > Cc: Richard Earnshaw ; Richard Sandiford > > ; Marcus Shawcroft > > > >

RE: [PATCH][GCC] aarch64: enable cortex-a510 CPU

2021-10-01 Thread Przemyslaw Wirkus via Gcc-patches
> Hi Przemek, > > > -Original Message- > > From: Przemyslaw Wirkus > > Sent: Wednesday, September 22, 2021 9:35 AM > > To: gcc-patches@gcc.gnu.org > > Cc: Richard Earnshaw ; Richard Sandiford > > ; Marcus Shawcroft > > ; Kyrylo Tkachov > > > Subject: [PATCH][GCC] aarch64: enable

RE: [PATCH][GCC] aarch64: enable cortex-a710 CPU

2021-10-01 Thread Przemyslaw Wirkus via Gcc-patches
> -Original Message- > From: Kyrylo Tkachov > Sent: 01 October 2021 13:16 > To: Przemyslaw Wirkus ; gcc- > patc...@gcc.gnu.org > Cc: Richard Earnshaw ; Richard Sandiford > ; Marcus Shawcroft > > Subject: RE: [PATCH][GCC] aarch64: enable cortex-a710 CPU > > > > > -Original

[PATCH v6] Fix for powerpc64 long double complex divide failure

2021-10-01 Thread Patrick McGehearty via Gcc-patches
- - - - New in version 6: Due to an oversight (i.e. coding error), version 5 changed the use of __LIBGCC_TF_EPSILON__ to __LIBGCC_DF_EPSILON__ but not the other LIBGCC_TF values. For correct execution of the long double test case it is necessary to also switch to using __LIBGCC_DF_MIN__. For

Re: [PATCH] c-family: Implement -Warray-compare [PR97573]

2021-10-01 Thread Jakub Jelinek via Gcc-patches
On Fri, Oct 01, 2021 at 04:11:08PM -0400, Marek Polacek via Gcc-patches wrote: > + auto_diagnostic_group d; > + if (warning_at (location, OPT_Warray_compare, > + "comparison between two arrays%s", > + (c_dialect_cxx () && cxx_dialect >= cxx20) > + ? " is

[PATCH] c++: Do not warn about lifetime of std::initializer_list& [PR102482]

2021-10-01 Thread Jonathan Wakely via Gcc-patches
An initializer-list constructor taking a non-const lvalue cannot be called with a temporary, so the array's lifetime probably doesn't end with the full expression. -Winit-list-lifetime should not warn for that case. PR c++/102482 gcc/cp/ChangeLog: * init.c

Re: [committed] libstdc++: Make std::jthread support pointers to member functions [PR 100612]

2021-10-01 Thread Jonathan Wakely via Gcc-patches
On Fri, 1 Oct 2021 at 21:26, Ville Voutilainen wrote: > > On Fri, 1 Oct 2021 at 23:19, Jonathan Wakely via Libstdc++ > wrote: > > > > This adds a non-standard extension to support initializing a > > std::jthread with a pointer to a member function that expects a > > stop_token to be added to the

Re: [committed] libstdc++: Make std::jthread support pointers to member functions [PR 100612]

2021-10-01 Thread Ville Voutilainen via Gcc-patches
On Fri, 1 Oct 2021 at 23:19, Jonathan Wakely via Libstdc++ wrote: > > This adds a non-standard extension to support initializing a > std::jthread with a pointer to a member function that expects a > stop_token to be added to the arguments. That use case is not supported > by C++20, because the

[committed] libstdc++: Restore printing of assertion messages [PR102100]

2021-10-01 Thread Jonathan Wakely via Gcc-patches
My changes for PR 101429 broke the _-replacement_assert function, because we now always just abort without printing anything. That's because I added checks for _GLIBCXX_HOSTED and _GLIBCXX_VERBOSE, but the checks are done before those get defined. This adds a new macro which is set by the sed

Re: [PATCH] c++: Implement C++20 -Wdeprecated-array-compare [PR97573]

2021-10-01 Thread Marek Polacek via Gcc-patches
On Fri, Oct 01, 2021 at 09:30:41AM -0400, Jason Merrill wrote: > On 9/30/21 17:56, Marek Polacek wrote: > > On Thu, Sep 30, 2021 at 03:34:24PM -0400, Jason Merrill wrote: > > > On 9/30/21 10:50, Marek Polacek wrote: > > > > This patch addresses one of my leftovers from GCC 11. C++20 introduced >

[PATCH] c-family: Implement -Warray-compare [PR97573]

2021-10-01 Thread Marek Polacek via Gcc-patches
This patch addresses one of my leftovers from GCC 11. C++20 introduced [depr.array.comp]: "Equality and relational comparisons between two operands of array type are deprecated." so this patch adds -Warray-compare. Since the code in question is dubious (the comparison doesn't actually compare

[PATCH] c++: ttp variadic constraint subsumption [PR99904]

2021-10-01 Thread Patrick Palka via Gcc-patches
Here we're crashing when level-lowering the variadic constraints on the template template parameter TT because tsubst_pack_expansion expects processing_template_decl to be set during a partial substitution. bootstrapped and regtested on x86_64-pc-linux-gnu, does this look OK for trunk/11? Also

Re: [PATCH] c++: Suppress error when cv-qualified reference is introduced by typedef [PR101783]

2021-10-01 Thread Nick Huang via Gcc-patches
> ...the subject line for the commit should be the first line of the > commit message, followed by a blank line, followed by the description of > the patch; without the subject line, git format-patch thought your whole > description was the subject of the patch. oh, I didn't realize this without

[committed] libstdc++: Allow stateful allocators in std::list::sort [PR 66742]

2021-10-01 Thread Jonathan Wakely via Gcc-patches
The temporary lists used by std::list::sort are default constructed, which means they use default constructed allocators. The sort operation is defined in terms of merge and splice operations, which have undefined behaviour (and abort) if the allocators do not compare equal. This means it is not

[committed] libstdc++: Make std::jthread support pointers to member functions [PR 100612]

2021-10-01 Thread Jonathan Wakely via Gcc-patches
This adds a non-standard extension to support initializing a std::jthread with a pointer to a member function that expects a stop_token to be added to the arguments. That use case is not supported by C++20, because the stop_token would get added as the first argument, which is where the object

[committed] libstdc++: Add container adaptor constructors taking iterators (P1425R4)

2021-10-01 Thread Jonathan Wakely via Gcc-patches
This adds a feature that was recently added to the C++23 working draft. Signed-off-by: Jonathan Wakely libstdc++-v3/ChangeLog: * include/bits/stl_queue.h (__cpp_lib_adaptor_iterator_pair_constructor): Define for C++23, as per P1425R4. (queue(InputIterator,

[committed] libstdc++: Implement LWG 3506 for std::priority_queue

2021-10-01 Thread Jonathan Wakely via Gcc-patches
The LWG 3506 issue ads allocator-extended versions of the constructors that take iterator arguments. Signed-off-by: Jonathan Wakely libstdc++-v3/ChangeLog: * include/bits/stl_queue.h (priority_queue): Add allocator-extended overloads for constructors taking iterator. *

[committed] libstdc++: Implement LWG 3529 for std::priority_queue

2021-10-01 Thread Jonathan Wakely via Gcc-patches
The LWG 3529 issue changes to use two overloads instead of one with a default argument, so that the sequence can be initialized directly with the iterator range when no sequence argument is provided. Signed-off-by: Jonathan Wakely libstdc++-v3/ChangeLog: * include/bits/stl_queue.h

[committed] libstdc++: Implement LWG 3522 for std::priority_queue

2021-10-01 Thread Jonathan Wakely via Gcc-patches
The LWG 3522 issue constrains all constructors of container adaptors that have InputIterator parameters. Signed-off-by: Jonathan Wakely libstdc++-v3/ChangeLog: * include/bits/stl_queue.h (priority_queue): Constrain constructors with InputIterator parameters (LWG 3522).

[committed] libstdc++: Implement LWG 3392 for std::ranges::distance

2021-10-01 Thread Jonathan Wakely via Gcc-patches
libstdc++-v3/ChangeLog: * include/bits/ranges_base.h (ranges::distance): Split overload into two (LWG 3392). * testsuite/24_iterators/range_operations/lwg3392.cc: New test. Tested powerpc64le-linux. Committed to trunk. commit 20751fad19e1b0fb4272309dd6d7fde182b08dc1

[committed] libstdc++: Remove unary_function base classes from std::thread tests

2021-10-01 Thread Jonathan Wakely via Gcc-patches
std::thread does not care if a function object is adaptable, so there is no need to derive from the deprecated std::unary_function class in these tests. Signed-off-by: Jonathan Wakely libstdc++-v3/ChangeLog: * testsuite/30_threads/thread/cons/3.cc: Remove derivation from

[committed] libstdc++: Remove useless base classes in pb_db tests

2021-10-01 Thread Jonathan Wakely via Gcc-patches
These function objects do not need to be adaptable, so stop deriving from deprecated classes. Also the 'inline' keyword is redundant on member functions defined in the class body. Signed-off-by: Jonathan Wakely libstdc++-v3/ChangeLog: * testsuite/ext/pb_ds/example/basic_multimap.cc:

[committed] libstdc++: Simplify __throw_out_of_range_fmt for freestanding

2021-10-01 Thread Jonathan Wakely via Gcc-patches
There is no point expanding the format string if we're just going to abort instead of throw an exception. And for freestanding or non-verbose builds we shouldn't do it either, to reduce the binary size. Signed-off-by: Jonathan Wakely libstdc++-v3/ChangeLog: * src/c++11/functexcept.cc

[committed] libstdc++: Fix narrowing conversion in std::visit

2021-10-01 Thread Jonathan Wakely via Gcc-patches
Signed-off-by: Jonathan Wakely libstdc++-v3/ChangeLog: * include/std/variant (__do_visit): Use variant_npos instead of literal -1 that requires a narrowing conversion. Tested powerpc64le-linux. Committed to trunk. commit dc1b29508d765b874372f4b1737ac6dc86962506 Author:

[committed] libstdc++: Avoid unconditional use of errc::not_supported [PR 99327]

2021-10-01 Thread Jonathan Wakely via Gcc-patches
The errc::not_supported constant is only defined if ENOTSUP is defined, which is not true for all targets. Many uses of errc::not_supported in the filesystem library do not actually match the intended meaning of ENOTSUP described by POSIX. They should be using ENOSYS instead (i.e.

[committed] libstdc++: Add std::__conditional_t alias template

2021-10-01 Thread Jonathan Wakely via Gcc-patches
This change is inspired by the suggestion in http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p1715r0.html The new std::__conditional_t alias template is functionally equivalent to std::conditional_t but should be more efficient to compile, due to only ever instantiating two

[committed] libstdc++: Add utility for creating std::error_code from OS errors

2021-10-01 Thread Jonathan Wakely via Gcc-patches
This adds a helper function to encapsulate obtaining an error code for errors from OS calls. For Windows we want to use GetLastError() and the system error category, but otherwise just use errno and the generic error category. This should not be used to replace existing uses of ec.assign(errno,

[committed] libstdc++: Optimize std::visit for the common case [PR 78113]

2021-10-01 Thread Jonathan Wakely via Gcc-patches
GCC does not do a good job of optimizing the table of function pointers used for variant visitation. This avoids using the table for the common case of visiting a single variant with a small number of alternative types. Instead we use: switch(v.index()) { case 0: return visitor(get<0>(v));

[committed] libstdc++: Allow visiting inherited variants [PR 90943]

2021-10-01 Thread Jonathan Wakely via Gcc-patches
Implement the changes from P2162R2 (as a DR for C++17). Signed-off-by: Jonathan Wakely libstdc++-v3/ChangeLog: PR libstdc++/90943 * include/std/variant (__cpp_lib_variant): Update value. (__detail::__variant::__as): New helpers implementing the as-variant

[committed] libstdc++: Simplify __normal_iterator converting constructor

2021-10-01 Thread Jonathan Wakely via Gcc-patches
This uses C++11 features to simplify the definition of the __normal_iterator constructor that allows converting from iterator to const_iterator. The previous definition relied on _Container::pointer which is present in std::vector and std::basic_string, but is not actually part of the container

[committed] libstdc++: Make move ctor noexcept for fully-dynamic string

2021-10-01 Thread Jonathan Wakely via Gcc-patches
The move constructor for the "fully-dynamic" COW string is not noexcept, because it allocates a new empty string rep for the moved-from string. However, there is no need to do that, because the moved-from string does not have to be left empty. Instead, implement move construction for the

[committed] libstdc++: Add noexcept to common_iterator proxy operators

2021-10-01 Thread Jonathan Wakely via Gcc-patches
Signed-off-by: Jonathan Wakely libstdc++-v3/ChangeLog: * include/bits/stl_iterator.h (common_iterator::__arrow_proxy) (common_iterator::__postfix_proxy): Add noexcept. Tested powerpc64le-linux. Committed to trunk. commit ce709ad3dc0ed5d7ea48a116311d4441225446f0 Author:

[committed] libstdc++: Use conditional noexcept in std::reverse_iterator [PR 94418]

2021-10-01 Thread Jonathan Wakely via Gcc-patches
This adds a noexcept-specifier to each constructor and assignment operator of std::reverse_iterator so that they are noexcept when the corresponding operation on the underlying iterator is noexcept. The std::reverse_iterator class template already requires that the operations on the underlying

[committed] libstdc++: Do not allocate a zero-size vector [PR 100153]

2021-10-01 Thread Jonathan Wakely via Gcc-patches
The vector::shrink_to_fit() implementation will allocate new storage even if the vector is empty. That then leads to the end-of-storage pointer being non-null and equal to the _M_start._M_p pointer, which means that _M_end_addr() has undefined behaviour. The fix is to stop doing a useless

[committed] libstdc++: Implement std::clamp with std::min and std::max [PR 96733]

2021-10-01 Thread Jonathan Wakely via Gcc-patches
The compiler doesn't know about the precondition of std::clamp that (hi < lo) is false, and so can't optimize as well as we'd like. By using std::min and std::max we help the compiler. Signed-off-by: Jonathan Wakely libstdc++-v3/ChangeLog: PR libstdc++/96733 *

[committed] libstdc++: Reduce header dependencies for C++20 std::erase [PR92546]

2021-10-01 Thread Jonathan Wakely via Gcc-patches
This reduces the preprocessed size of , and by not including for std::remove and std::remove_if. Also unwrap iterators using __niter_base, to avoid redundant debug mode checks. PR libstdc++/92546 * include/bits/erase_if.h (__erase_nodes_if): Use __niter_base to unwrap

Re: [Patch] Fortran: Avoid var initialization in interfaces [PR54753]

2021-10-01 Thread Harald Anlauf via Gcc-patches
[Resending as I did not see it show up in the MLs] Hi Tobias, Am 29.09.21 um 10:53 schrieb Tobias Burnus: Found when looking at F2018:C839 / PR54753. For INTENT(OUT) the dummy variable (might) also be default initialized or deallocated. However, with assumed rank, that causes issues, which

Re: [PING^2][PATCH] libgcc, emutls: Allow building weak definitions of the emutls functions.

2021-10-01 Thread Iain Sandoe
Hi, So let’s ignore the questions for now - OK for the non-Darwin parts of the patch ? > On 24 Sep 2021, at 17:57, Iain Sandoe wrote: > > as noted below the non-Darwin parts of this are trivial (and a no-OP). > I’d like to apply this to start work towards solving Darwin’s libgcc issues, >>

Re: PING #2 [PATCH] warn for more impossible null pointer tests [PR102103]

2021-10-01 Thread Martin Sebor via Gcc-patches
On 9/30/21 1:35 PM, Joseph Myers wrote: On Thu, 30 Sep 2021, Martin Sebor via Gcc-patches wrote: Jason, since you approved the C++ changes, would you mind looking over the C bits and if they look good to you giving me the green light to commit the patch?

[committed] hppa: Default to dwarf version 4 on hppa64-hpux

2021-10-01 Thread John David Anglin
DWARF5 is not supported by gdb on hpux, so we need to to limit version to 4. Tested on hppa64-hp-hpux11.11. Committed to trunk and gcc-11. Dave --- Default to dwarf version 4 on hppa64-hpux 2021-10-01 John David Anglin gcc/ChangeLog: PR debug/102373 * config/pa/pa.c

Re: [PATCH] libiberty: testsuite: add missing format on d-demangle-expected

2021-10-01 Thread Luís Ferreira
Noted. On Fri, 2021-10-01 at 11:28 -0600, Jeff Law wrote: >   >   > On 9/29/2021 6:50 PM, Luís Ferreira wrote: >   > > This patch adds a missing format parameter that prevents d- > > demangle-expected > > test collection from running successfully. > > > > Signed-off-by: Luís Ferreira >  THanks. 

Re: [PATCH] c++: unifying equal NONTYPE_ARGUMENT_PACKs [PR102547]

2021-10-01 Thread Patrick Palka via Gcc-patches
On Fri, 1 Oct 2021, Jason Merrill wrote: > On 10/1/21 10:26, Patrick Palka wrote: > > On Fri, 1 Oct 2021, Jason Merrill wrote: > > > > > On 10/1/21 09:46, Patrick Palka wrote: > > > > Here during partial ordering of the two partial specializations we end > > > > up in unify with

Re: [PATCH] libiberty: testsuite: add missing format on d-demangle-expected

2021-10-01 Thread Jeff Law via Gcc-patches
On 9/29/2021 6:50 PM, Luís Ferreira wrote: This patch adds a missing format parameter that prevents d-demangle-expected test collection from running successfully. Signed-off-by: Luís Ferreira THanks.  Pushed to the trunk. Can you please start including ChangeLog entries so that I don't

Re: [PATCH 05/11] OpenMP/OpenACC: Hoist struct sibling list handling in gimplification

2021-10-01 Thread Julian Brown
Oops, editing: On Fri, 1 Oct 2021 10:09:03 -0700 Julian Brown wrote: > Secondly, it means that in the first pass gathering up sibling lists > from parsed OpenMP/OpenACC clauses, we don't need to worry about > gimplifying: that means we can see struct bases & components we need > to sort sibling

[PATCH 11/11] OpenMP/OpenACC: [WIP] Add gcc_unreachable to apparently-dead path in build_struct_comp_nodes

2021-10-01 Thread Julian Brown
The previous "not for committing" taxonomy patch shows that the path handling "extra nodes" in build_struct_comp_nodes is probably now dead, at least across the current testsuite. This patch adds gcc_unreachable on that path: this passes testing, which suggests that the extra node handling can

[PATCH 10/11] Not for committing: noisy mapping-group taxonomy

2021-10-01 Thread Julian Brown
As a possible aid to review, this is code that can be used to enumerate all the mapping group forms currently in use across the GCC/libgomp testsuites for OpenMP/OpenACC. These groups have been added somewhat organically, so there might be a couple of surprises: see e.g. the patch following this

[PATCH 09/11] Not for committing: noisy sibling-list handling output

2021-10-01 Thread Julian Brown
As a possible aid to review, this is my "printf-style" debugging cruft for the sibling list handling hoist/rework. It's not meant for committing. --- gcc/gimplify.c | 131 + 1 file changed, 131 insertions(+) diff --git a/gcc/gimplify.c

[PATCH 07/11] OpenMP: Fix non-zero attach/detach bias for struct dereferences

2021-10-01 Thread Julian Brown
This patch fixes attach/detach operations for OpenMP that have a non-zero bias: these can occur if we have a mapping such as: #pragma omp target map(mystruct->a.b[idx].c[:arrsz]) i.e. where there is an offset between the attachment point ("mystruct" here) and the pointed-to data. (The "b" and

[PATCH 08/11] Not for committing: noisy topological sorting output

2021-10-01 Thread Julian Brown
As a possible aid to review, this is my "printf-style" debugging cruft for the topological sorting implementation. We might want to rework this into something that emits scannable output into the gimple dump in order to write tests to make sure base pointer dependencies are being found properly,

[PATCH 06/11] OpenMP: Allow array ref components for C & C++

2021-10-01 Thread Julian Brown
This patch fixes parsing for struct components that are array references in OMP clauses in both the C and C++ front ends. OK for mainline? Thanks, Julian 2021-09-29 Julian Brown gcc/c/ * c-typeck.c (c_finish_omp_clauses): Allow ARRAY_REF components. gcc/cp/ * semantics.c

[PATCH 05/11] OpenMP/OpenACC: Hoist struct sibling list handling in gimplification

2021-10-01 Thread Julian Brown
This patch lifts struct sibling-list handling out of the main loop in gimplify_scan_omp_clauses. The reasons for this are several: first, it means that we can subject created sibling list groups to topological sorting (see previous patch) so base-pointer data dependencies are handled correctly.

[PATCH 04/11] Remove omp_target_reorder_clauses

2021-10-01 Thread Julian Brown
This patch has been split out from the previous one to avoid a confusingly-interleaved diff. The two patches should probably be committed squashed together. 2021-10-01 Julian Brown gcc/ * gimplify.c (omp_target_reorder_clauses): Delete. --- gcc/gimplify.c | 183

[PATCH 03/11] OpenMP 5.0: Clause ordering for OpenMP 5.0 (topological sorting by base pointer)

2021-10-01 Thread Julian Brown
This patch reimplements the omp_target_reorder_clauses function in anticipation of supporting "deeper" struct mappings (that is, with several structure dereference operators, or similar). The idea is that in place of the (possibly quadratic) algorithm in omp_target_reorder_clauses that greedily

[PATCH 02/11] Remove base_ind/base_ref handling from extract_base_bit_offset

2021-10-01 Thread Julian Brown
In preparation for follow-up patches extending struct dereference handling for OpenMP, this patch removes base_ind/base_ref handling from gimplify.c:extract_base_bit_offset. This arguably simplifies some of the code around the callers of the function also, though subsequent patches modify those

[PATCH 01/11] libgomp: Release device lock on cbuf error path

2021-10-01 Thread Julian Brown
This patch releases the device lock on a sanity-checking error path in transfer combining (cbuf) handling in libgomp:target.c. This shouldn't happen when handling well-formed mapping clauses, but erroneous clauses can currently cause a hang if the condition triggers. Tested with offloading to

[PATCH 00/11] OpenMP: Deep struct dereferences

2021-10-01 Thread Julian Brown
This is a series of patches to support deep struct dereferences for OpenMP 5.0 (i.e. with multiple arrow operators, "a->b[foo]->c[lo:hi]"). Apart from a couple of general bug fixes, the main parts of this comprise: 1. Topological sorting of OMP clauses by base pointer dependencies. 2.

Re: [RFC][Patch][middle-end/PR102359]Not add initialization for READONLY variables with -ftrivial-auto-var-init

2021-10-01 Thread Qing Zhao via Gcc-patches
> On Oct 1, 2021, at 10:33 AM, Jason Merrill wrote: > > On 10/1/21 10:54, Qing Zhao wrote: >>> On Sep 30, 2021, at 2:31 PM, Jason Merrill wrote: >>> >>> On 9/30/21 11:42, Qing Zhao wrote: > On Sep 30, 2021, at 1:54 AM, Richard Biener wrote: > > On Thu, 30 Sep 2021, Jason

Re: [PATCH] c++: Suppress error when cv-qualified reference is introduced by typedef [PR101783]

2021-10-01 Thread Jason Merrill via Gcc-patches
On 10/1/21 11:10, Nick Huang wrote: gcc-verify still fails with this version: ERR: line should start with a tab: "PR c++/101783" ERR: line should start with a tab: "* tree.c (cp_build_qualified_type_real): Excluding typedef from error" ERR: line should start with a tab: "PR

Re: [PATCH] libiberty: testsuite: add missing format on d-demangle-expected

2021-10-01 Thread H.J. Lu via Gcc-patches
On Wed, Sep 29, 2021 at 5:51 PM Luís Ferreira wrote: > > This patch adds a missing format parameter that prevents d-demangle-expected > test collection from running successfully. > > Signed-off-by: Luís Ferreira > --- > libiberty/testsuite/d-demangle-expected | 1 + > 1 file changed, 1

Re: [PATCH] c++: Implement C++20 -Wdeprecated-array-compare [PR97573]

2021-10-01 Thread Marek Polacek via Gcc-patches
On Fri, Oct 01, 2021 at 09:16:53AM -0600, Martin Sebor wrote: > On 9/30/21 8:50 AM, Marek Polacek via Gcc-patches wrote: > > This patch addresses one of my leftovers from GCC 11. C++20 introduced > > [depr.array.comp]: > > "Equality and relational comparisons between two operands of array type

Re: [PATCH] c++: unifying equal NONTYPE_ARGUMENT_PACKs [PR102547]

2021-10-01 Thread Jason Merrill via Gcc-patches
On 10/1/21 10:26, Patrick Palka wrote: On Fri, 1 Oct 2021, Jason Merrill wrote: On 10/1/21 09:46, Patrick Palka wrote: Here during partial ordering of the two partial specializations we end up in unify with parm=arg=NONTYPE_ARGUMENT_PACK, and crash shortly thereafter because

[PATCH 2/4] libsanitizer: Apply local patches

2021-10-01 Thread H.J. Lu via Gcc-patches
--- libsanitizer/asan/asan_globals.cpp| 19 -- libsanitizer/asan/asan_interceptors.h | 7 ++- libsanitizer/asan/asan_mapping.h | 2 +- .../sanitizer_linux_libcdep.cpp | 4 .../sanitizer_common/sanitizer_mac.cpp| 12

[PATCH 0/4] libsanitizer: Merge with upstream commit 1c2e5fd66ea

2021-10-01 Thread H.J. Lu via Gcc-patches
Merge with upstream commit: commit 1c2e5fd66ea27d0c51360ba4e22099124a915562 Author: peter klausler Date: Wed Sep 15 08:28:48 2021 -0700 [flang] Enforce constraint: defined ass't in WHERE must be elemental A defined assignment subroutine invoked in the context of a WHERE statement

[PATCH 1/4] libsanitizer: Merge with upstream

2021-10-01 Thread H.J. Lu via Gcc-patches
Merged revision: 1c2e5fd66ea27d0c51360ba4e22099124a915562 --- libsanitizer/MERGE|2 +- libsanitizer/asan/asan_fuchsia.cpp| 35 +- libsanitizer/asan/asan_globals.cpp| 33 +- libsanitizer/asan/asan_interceptors.cpp | 18 +-

[PATCH 3/4] libsanitizer: Bump asan/tsan versions

2021-10-01 Thread H.J. Lu via Gcc-patches
Bump asan/tsan versions for upstream commits: commit f1bb30a4956f83e46406d6082e5d376ce65391e0 Author: Vitaly Buka Date: Thu Aug 26 10:25:09 2021 -0700 [sanitizer] No THREADLOCAL in qsort and bsearch qsort can reuse qsort_r if available. bsearch always passes key as the first

[PATCH 4/4] Update c-c++-common/tsan/atomic_stack.c

2021-10-01 Thread H.J. Lu via Gcc-patches
Print out from __tsan_atomic32_fetch_add was removed by commit da7a5c09c86c3f639c63ce8843d6f21c915ae1c6 Author: Dmitry Vyukov Date: Wed Jul 28 16:57:39 2021 +0200 tsan: don't print __tsan_atomic* functions in report stacks Currently __tsan_atomic* functions do FuncEntry/Exit using

Re: [RFC][Patch][middle-end/PR102359]Not add initialization for READONLY variables with -ftrivial-auto-var-init

2021-10-01 Thread Jason Merrill via Gcc-patches
On 10/1/21 10:54, Qing Zhao wrote: On Sep 30, 2021, at 2:31 PM, Jason Merrill wrote: On 9/30/21 11:42, Qing Zhao wrote: On Sep 30, 2021, at 1:54 AM, Richard Biener wrote: On Thu, 30 Sep 2021, Jason Merrill wrote: On 9/29/21 17:30, Qing Zhao wrote: Hi, PR102359 (ICE gimplification

PING^4 [PATCH] x86: Update memcpy/memset inline strategies for -mtune=generic

2021-10-01 Thread H.J. Lu via Gcc-patches
On Mon, Sep 20, 2021 at 10:06 AM H.J. Lu wrote: > > On Mon, Sep 13, 2021 at 6:38 AM H.J. Lu wrote: > > > > On Tue, Sep 7, 2021 at 8:01 PM H.J. Lu wrote: > > > > > > On Sun, Aug 22, 2021 at 8:28 AM H.J. Lu wrote: > > > > > > > > On Tue, Mar 23, 2021 at 09:19:38AM +0100, Richard Biener wrote: >

Re: [PATCH] c++: Implement C++20 -Wdeprecated-array-compare [PR97573]

2021-10-01 Thread Martin Sebor via Gcc-patches
On 9/30/21 8:50 AM, Marek Polacek via Gcc-patches wrote: This patch addresses one of my leftovers from GCC 11. C++20 introduced [depr.array.comp]: "Equality and relational comparisons between two operands of array type are deprecated." so this patch adds -Wdeprecated-array-compare (enabled by

Re: [PATCH] c++: Suppress error when cv-qualified reference is introduced by typedef [PR101783]

2021-10-01 Thread Nick Huang via Gcc-patches
> gcc-verify still fails with this version: > > > ERR: line should start with a tab: "PR c++/101783" > > ERR: line should start with a tab: "* tree.c > > (cp_build_qualified_type_real): Excluding typedef from error" > > ERR: line should start with a tab: "PR c++/101783" > > ERR: line

[PATCH, v4] c++: Fix up synthetization of defaulted comparison operators on classes with bitfields [PR102490]

2021-10-01 Thread Jakub Jelinek via Gcc-patches
On Thu, Sep 30, 2021 at 03:01:49PM -0400, Jason Merrill wrote: > > After fixing the incomplete std::strong_ordering spaceship-synth8.C is now > > accepted, but I'm afraid I'm getting lost in this - clang++ rejects that > > testcase instead complaining that D has <=> operator, but has it pure > >

Re: [RFC][Patch][middle-end/PR102359]Not add initialization for READONLY variables with -ftrivial-auto-var-init

2021-10-01 Thread Qing Zhao via Gcc-patches
> On Sep 30, 2021, at 2:31 PM, Jason Merrill wrote: > > On 9/30/21 11:42, Qing Zhao wrote: >>> On Sep 30, 2021, at 1:54 AM, Richard Biener wrote: >>> >>> On Thu, 30 Sep 2021, Jason Merrill wrote: >>> On 9/29/21 17:30, Qing Zhao wrote: > Hi, > > PR102359 (ICE gimplification

Re: [PATCH] Handle EQ_EXPR relation for operator_lshift.

2021-10-01 Thread Aldy Hernandez via Gcc-patches
Well, after talking with Andrew it seems that X << Y being non-zero also implies X is non-zero. So we don't even need relationals here. So, I leave gori relationals in his capable hands, while I test this much simpler patch which fixes the PR with no additional infrastructure ;-). Will push

Re: [PATCH] libiberty: prevent null dereferencing on dlang_type

2021-10-01 Thread Luís Ferreira via Gcc-patches
Hi, Yes, I'm sorry, I forgot to add --format=dlang parameter. This patch fixes it https://gcc.gnu.org/pipermail/gcc-patches/2021-September/580544.html . On Fri, 2021-10-01 at 07:23 -0700, H.J. Lu wrote: > On Thu, Sep 23, 2021 at 8:55 AM Jeff Law via Gcc-patches > wrote: > > > > > > > > On

Re: [PATCH] c++: unifying equal NONTYPE_ARGUMENT_PACKs [PR102547]

2021-10-01 Thread Patrick Palka via Gcc-patches
On Fri, 1 Oct 2021, Jason Merrill wrote: > On 10/1/21 09:46, Patrick Palka wrote: > > Here during partial ordering of the two partial specializations we end > > up in unify with parm=arg=NONTYPE_ARGUMENT_PACK, and crash shortly > > thereafter because uses_template_parms calls

Re: [PATCH] libiberty: prevent null dereferencing on dlang_type

2021-10-01 Thread H.J. Lu via Gcc-patches
On Thu, Sep 23, 2021 at 8:55 AM Jeff Law via Gcc-patches wrote: > > > > On 9/23/2021 4:17 AM, ibuclaw--- via Gcc-patches wrote: > >> On 22/09/2021 03:31 Luís Ferreira wrote: > >> > >> > >> This patch prevents dereferencing a null reference on a crafted > >> malformed magled name, often causing

[committed] libstdc++: Define basic_regex::multiline for non-strict modes

2021-10-01 Thread Jonathan Wakely via Gcc-patches
The regex_constants::multiline constant is defined for non-strict C++11 and C++14 modes, on the basis that the feature is a DR (even though it was really a new feature addition to C++17 and probably shouldn't have gone through the issues list). This makes the basic_regex::multiline constant

[committed] libstdc++: Add missing header to test

2021-10-01 Thread Jonathan Wakely via Gcc-patches
We need to include (or one of the containers) to get a definition for std::begin. libstdc++-v3/ChangeLog: * testsuite/25_algorithms/is_permutation/2.cc: Include . Tested x86_64-linux. Committed to trunk. commit 94311bf34704ebecf745043fe2df03df201052fe Author: Jonathan Wakely Date:

[committed] libstdc++: Add noexcept to istream_iterator and ostream_iterator

2021-10-01 Thread Jonathan Wakely via Gcc-patches
libstdc++-v3/ChangeLog: * include/bits/stream_iterator.h (istream_iterator): Add noexcept to constructors and non-throwing member functions and friend functions. (ostream_iterator): Likewise. Tested x86_64-linux. Committed to trunk. commit

[committed] libstdc++: Fix _ForwardIteratorConcept for __gnu_debug::vector

2021-10-01 Thread Jonathan Wakely via Gcc-patches
The recent changes to the _GLIBCXX_CONCEPT_CHECKS checks for forward iterators don't work for vector iterators in debug mode, because the _Safe_iterator specializations don't match the special cases I added for _Bit_iterator and _Bit_const_iterator. This refactors the

[committed] libstdc++: Replace try-catch in std::list::merge to avoid O(N) size

2021-10-01 Thread Jonathan Wakely via Gcc-patches
The current std::list::merge code calls size() before starting to merge any elements, so that the _M_size members can be updated after the merge finishes. The work is done in a try-block so that the sizes can still be updated in an exception handler if any element comparison throws. The _M_size

Re: [PATCH] c++: unifying equal NONTYPE_ARGUMENT_PACKs [PR102547]

2021-10-01 Thread Jason Merrill via Gcc-patches
On 10/1/21 09:46, Patrick Palka wrote: Here during partial ordering of the two partial specializations we end up in unify with parm=arg=NONTYPE_ARGUMENT_PACK, and crash shortly thereafter because uses_template_parms calls potential_constant_expression which doesn't handle NONTYPE_ARGUMENT_PACK.

[PATCH][pushed] options: fix concat of options.

2021-10-01 Thread Martin Liška
It's quite an obvious error I made during concat of merged_decoded_options. make check -k RUNTESTFLAGS="i386.exp" works fine now. Martin PR target/102552 gcc/c-family/ChangeLog: * c-common.c (parse_optimize_options): decoded_options[0] is used for program name, so

[PATCH] c++: unifying equal NONTYPE_ARGUMENT_PACKs [PR102547]

2021-10-01 Thread Patrick Palka via Gcc-patches
Here during partial ordering of the two partial specializations we end up in unify with parm=arg=NONTYPE_ARGUMENT_PACK, and crash shortly thereafter because uses_template_parms calls potential_constant_expression which doesn't handle NONTYPE_ARGUMENT_PACK. This patch fixes this by checking

Re: [PATCH] Pass relations down to range_operator::op[12]_range.

2021-10-01 Thread Andrew MacLeod via Gcc-patches
On 10/1/21 8:43 AM, Aldy Hernandez wrote: It looks like we don't pass relations down to the op[12]_range operators. This is causing problems when implementing some relational magic for the shift operators. Andrew, this looks like an oversight. If so, how does this look? Hrm.  It's at least

Re: [PATCH] c++: Implement C++20 -Wdeprecated-array-compare [PR97573]

2021-10-01 Thread Jason Merrill via Gcc-patches
On 9/30/21 17:56, Marek Polacek wrote: On Thu, Sep 30, 2021 at 03:34:24PM -0400, Jason Merrill wrote: On 9/30/21 10:50, Marek Polacek wrote: This patch addresses one of my leftovers from GCC 11. C++20 introduced [depr.array.comp]: "Equality and relational comparisons between two operands of

Re: [PATCH] c++: Suppress error when cv-qualified reference is introduced by typedef [PR101783]

2021-10-01 Thread Jason Merrill via Gcc-patches
On 9/30/21 14:24, nick huang wrote: You may need to run contrib/gcc-git-customization.sh to get the git gcc-verify command. I re-setup and can use git gcc-verify. Now I can see it rejects because I forgot to add a description of modified file. Now that it passes gcc-verify and I attach the

[PATCH][GCC][committed] aarch64: fix AARCH64_FL_V9 flag value

2021-10-01 Thread Przemyslaw Wirkus via Gcc-patches
Patch is fixing AARCH64_FL_V9 flag value which is now wrongly set due to merge error. Committed as obvious. gcc/ChangeLog: * config/aarch64/aarch64.h (AARCH64_FL_V9): Update value. --- diff --git a/gcc/config/aarch64/aarch64.h b/gcc/config/aarch64/aarch64.h index

Re: [PATCH v2] tree-optimization/101186 - extend FRE with "equivalence map" for condition prediction

2021-10-01 Thread Richard Biener via Gcc-patches
On Thu, Sep 16, 2021 at 8:13 PM Di Zhao OS wrote: > > Sorry about updating on this after so long. It took me much time to work out a > new plan and pass the tests. > > The new idea is to use one variable to represent a set of equal variables at > some basic-block. This variable is called a

[PATCH] Handle EQ_EXPR relation for operator_lshift.

2021-10-01 Thread Aldy Hernandez via Gcc-patches
Knowing that X << X is non-zero means X is also non-zero. This patch teaches this this to range-ops. As usual, the big twiddling experts could come up with all sorts of fancy enhancements in this area, and we welcome all patches :). I will push this pending tests. gcc/ChangeLog: PR

[PATCH] Pass relations down to range_operator::op[12]_range.

2021-10-01 Thread Aldy Hernandez via Gcc-patches
It looks like we don't pass relations down to the op[12]_range operators. This is causing problems when implementing some relational magic for the shift operators. Andrew, this looks like an oversight. If so, how does this look? Tested on x86-64 Linux. gcc/ChangeLog: *

[COMMITTED] Remove shadowed oracle field.

2021-10-01 Thread Aldy Hernandez via Gcc-patches
The m_oracle field in the path solver was shadowing the base class. This was causing subtle problems while calculating outgoing edges between blocks, because the query object being passed did not have an oracle set. This should further improve our solving ability. Tested on x86-64 Linux.

RE: [PATCH][GCC] aarch64: enable cortex-x2 CPU

2021-10-01 Thread Kyrylo Tkachov via Gcc-patches
> -Original Message- > From: Kyrylo Tkachov > Sent: Friday, October 1, 2021 1:17 PM > To: Przemyslaw Wirkus ; gcc- > patc...@gcc.gnu.org > Cc: Richard Earnshaw ; Richard Sandiford > ; Marcus Shawcroft > > Subject: RE: [PATCH][GCC] aarch64: enable cortex-x2 CPU > > > > >

  1   2   >