Re: [PATCH] go/100537 - Bootstrap-O3 and bootstrap-debug fail

2021-05-17 Thread Richard Biener
On Mon, 17 May 2021, Ian Lance Taylor wrote: > On Mon, May 17, 2021 at 1:17 AM Richard Biener via Gcc-patches > wrote: > > > > On Fri, May 14, 2021 at 11:19 AM guojiufu via Gcc-patches > > wrote: > > > > > > On 2021-05-14 15:39, guojiufu via Gcc-patches wrote: > > > > On 2021-05-14 15:15, Richar

[Committed] IBM Z: Support vector _Bool language extension

2021-05-17 Thread Andreas Krebbel via Gcc-patches
_Bool needs to be defined as macro in order to trigger the context-sensitive macro expansion mechanism. Bootstrapped and regtested on s390x. Committed to mainline. gcc/ChangeLog: * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal): Define _Bool as macro expanding to _Bool.

Re: [PATCH V2] Split loop for NE condition.

2021-05-17 Thread Bernd Edlinger
On 5/17/21 4:01 AM, Jiufu Guo via Gcc-patches wrote: > When there is the possibility that overflow/wrap may happen on the loop index, > a few optimizations would not happen. For example code: > > foo (int *a, int *b, unsigned k, unsigned n) > { > while (++k != n) > a[k] = b[k] + 1; > } > >

[Bootstrap] *PING* Re: [Patch] gcc/configure.ac: Fix cross build by using $(CFLAGS-$@) [PR100598]

2021-05-17 Thread Tobias Burnus
Early *PING* for this bootstrap issue; in the PR, it affected a Linux to mingw64 cross build. Here, it affects x86-64 → PowerPC Linux builds, which builds with the patch applied. On 14.05.21 16:19, Tobias Burnus wrote: Fixes the build fail: ../../gcc/genversion.c:37:20: error: ‘BASEVER’ was not

[PATCH] RISC-V: Properly parse the letter 'p' in '-march'.

2021-05-17 Thread Geng Qi via Gcc-patches
gcc/ChangeLog: * common/config/riscv/riscv-common.c (riscv_subset_list::parsing_subset_version): Properly parse the letter 'p' in '-march'. (riscv_subset_list::parse_std_ext, riscv_subset_list::parse_multiletter_ext): To handle errors generated in ri

Re: [PATCH] Run pass_sink_code once more before store_mergin

2021-05-17 Thread Xionghu Luo via Gcc-patches
Hi, On 2021/5/17 16:11, Richard Biener wrote: On Fri, 14 May 2021, Xionghu Luo wrote: Hi Richi, On 2021/4/21 19:54, Richard Biener wrote: On Tue, 20 Apr 2021, Xionghu Luo wrote: On 2021/4/15 19:34, Richard Biener wrote: On Thu, 15 Apr 2021, Xionghu Luo wrote: Thanks, On 2021/4/14 14:

Re: [PATCH] libstdc++: Fix iterator caching inside range adaptors [PR100479]

2021-05-17 Thread Patrick Palka via Gcc-patches
On Mon, 17 May 2021, Tim Song wrote: > On Mon, May 17, 2021 at 2:59 PM Patrick Palka wrote: > > > > + constexpr _CachedPosition& > > + operator=(_CachedPosition&& __other) noexcept > > + { > > + if (std::__addressof(__other) != this) > > I don't think we need this check

Re: [PATCH] libstdc++: Fix access issues in elements_view::_Sentinel [PR100631]

2021-05-17 Thread Patrick Palka via Gcc-patches
On Mon, 17 May 2021, Tim Song wrote: > On Mon, May 17, 2021 at 12:21 PM Patrick Palka via Gcc-patches > wrote: > > > > using _Base = elements_view::_Base<_Const>; > > sentinel_t<_Base> _M_end = sentinel_t<_Base>(); > > @@ -3800,7 +3807,7 @@ namespace views::__adaptor > >

Re: [PATCH] Add a couple of A?CST1:CST2 match and simplify optimizations

2021-05-17 Thread Andrew Pinski via Gcc-patches
> > ../../gcc-trunk-1/gcc/ada/libgnat/a-charac.ads -o ada/libgnat/a-charac.o > > /home/ed/gnu/gcc-build-2/./prev-gcc/xgcc > > -B/home/ed/gnu/gcc-build-2/./prev-gcc/ > > -B/home/ed/gnu/install/x86_64-pc-linux-gnu/bin/ > > -B/home/ed/gnu/install/x86_64-pc-linux-gnu/bin/ &

Re: [PATCH] go/100537 - Bootstrap-O3 and bootstrap-debug fail

2021-05-17 Thread Ian Lance Taylor via Gcc-patches
On Mon, May 17, 2021 at 1:17 AM Richard Biener via Gcc-patches wrote: > > On Fri, May 14, 2021 at 11:19 AM guojiufu via Gcc-patches > wrote: > > > > On 2021-05-14 15:39, guojiufu via Gcc-patches wrote: > > > On 2021-05-14 15:15, Richard Biener wrote: > > >> On May 14, 2021 4:52:56 AM GMT+02:00, J

Re: [PATCH] go/100537 - Bootstrap-O3 and bootstrap-debug fail

2021-05-17 Thread guojiufu via Gcc-patches
On 2021-05-17 16:17, Richard Biener wrote: On Fri, May 14, 2021 at 11:19 AM guojiufu via Gcc-patches wrote: On 2021-05-14 15:39, guojiufu via Gcc-patches wrote: > On 2021-05-14 15:15, Richard Biener wrote: >> On May 14, 2021 4:52:56 AM GMT+02:00, Jiufu Guo >> wrote: >>> As discussed in the PR

[PATCH] libgccjit: Add support for types used by atomic builtins [PR96066] [PR96067]

2021-05-17 Thread Antoni Boucher via Gcc-patches
Hello. This patch fixes the issue with using atomic builtins in libgccjit. Thanks to review it. From 0ce53d373ffba9f3f80a2d2b4e1a7d724ba31b7d Mon Sep 17 00:00:00 2001 From: Antoni Boucher Date: Sun, 9 May 2021 20:14:37 -0400 Subject: [PATCH] Add support for types used by atomic builtins [PR96066]

Re: [PATCH][v2] c/100547 - reject overly large vector_size attributes

2021-05-17 Thread Joseph Myers
On Mon, 17 May 2021, Richard Biener wrote: > This rejects a number of vector components that does not fit an 'int' > which is an internal limitation of RTVEC. This requires adjusting > gcc.dg/attr-vector_size.c which checks for much larger > supported vectors. Note that the RTVEC limitation is a

Re: [PATCH][DOCS] Remove install-old.texi

2021-05-17 Thread Joseph Myers
On Mon, 17 May 2021, Martin Liška wrote: > -@enumerate > -@item > -If you have chosen a configuration for GCC which requires other GNU > -tools (such as GAS or the GNU linker) instead of the standard system > -tools, install the required tools in the build directory under the names > -@file{as}, @

Re: [PATCH] libstdc++: Fix iterator caching inside range adaptors [PR100479]

2021-05-17 Thread Tim Song via Gcc-patches
On Mon, May 17, 2021 at 2:59 PM Patrick Palka wrote: > > + constexpr _CachedPosition& > + operator=(_CachedPosition&& __other) noexcept > + { > + if (std::__addressof(__other) != this) I don't think we need this check - self-move-assigning the underlying view isn't requi

Re: [PATCH] libstdc++: Fix access issues in elements_view::_Sentinel [PR100631]

2021-05-17 Thread Tim Song via Gcc-patches
On Mon, May 17, 2021 at 12:21 PM Patrick Palka via Gcc-patches wrote: > > using _Base = elements_view::_Base<_Const>; > sentinel_t<_Base> _M_end = sentinel_t<_Base>(); > @@ -3800,7 +3807,7 @@ namespace views::__adaptor > requires sized_sentinel_for, iterator_t<_Base

[PATCH] PR tree-optimization/100512: Once a range becomes constant, make it invariant.

2021-05-17 Thread Andrew MacLeod via Gcc-patches
The code in PR 100512 triggers an interaction between ranger and the propagation engine related to undefined values. I put the detailed analysis in the PR, but it boils down to the early VRP pass has concluded that something is a constant and can be replaced, and removes the definition expecti

Re: [PATCH] PING implement pre-c++20 contracts

2021-05-17 Thread Jason Merrill via Gcc-patches
On 5/14/21 4:54 PM, Jason Merrill wrote: On 4/30/21 1:44 PM, Jeff Chapman wrote: Hello! Looping back around to this. re: https://gcc.gnu.org/pipermail/gcc-patches/2021-March/567334.html On 3/25/21, Jason Merrill wrote: On 3/1/21 8:12 AM, Jeff Chapman wrote: On 1/18/21, Jason Merrill wrote:

[COMMITTED] MAINTAINERS: Add myself for write after approval

2021-05-17 Thread Serge Belyshev via Gcc-patches
2021-05-17 Serge Belyshev * MAINTAINERS (Write After Approval): Add myself. --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 5b10f212ce8..fbaa183cea4 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -317,6 +317,7 @@ Gergö Barany

Re: [PATCH] Add a couple of A?CST1:CST2 match and simplify optimizations

2021-05-17 Thread Andrew Pinski via Gcc-patches
ev-gcc/ > -B/home/ed/gnu/install/x86_64-pc-linux-gnu/bin/ > -B/home/ed/gnu/install/x86_64-pc-linux-gnu/bin/ > -B/home/ed/gnu/install/x86_64-pc-linux-gnu/lib/ -isystem > /home/ed/gnu/install/x86_64-pc-linux-gnu/include -isystem > /home/ed/gnu/install/x86_64-pc-linu

Re: [committed] arm: correctly handle inequality comparisons against max constants [PR100563]

2021-05-17 Thread Hans-Peter Nilsson
On Thu, 13 May 2021, Richard Earnshaw via Gcc-patches wrote: > > Normally we expect the gimple optimizers to fold away comparisons that > are always true, but at some lower optimization levels this is not > always the case, so the back-end has to be able to generate correct > code in these cases. >

Re: [PATCH] libstdc++: Fix iterator caching inside range adaptors [PR100479]

2021-05-17 Thread Patrick Palka via Gcc-patches
On Mon, 17 May 2021, Tim Song wrote: > On Mon, May 17, 2021 at 11:46 AM Patrick Palka via Libstdc++ > wrote: > > constexpr void > > _M_set(const _Range&, const iterator_t<_Range>& __it) > > { > > __glibcxx_assert(!_M_has_value()); > > - _M_iter = __it; >

Re: [PATCH] Hashtable PR96088

2021-05-17 Thread François Dumont via Gcc-patches
Hi     No chance yet to review this proposal ? François On 06/05/21 10:03 pm, François Dumont wrote: Hi     Considering your feedback on backtrace in debug mode is going to take me some time so here is another one.     Compared to latest submission I've added a _Hash_arg_t partial special

Re: [PATCH] libstdc++: Fix wrong thread waking on notify [PR100334]

2021-05-17 Thread Thomas Rodgers
On 2021-05-17 09:43, Jonathan Wakely wrote: On 14/05/21 18:09 +0100, Jonathan Wakely wrote: On 13/05/21 18:54 -0700, Thomas Rodgers wrote: From: Thomas Rodgers Please ignore the previous patch. This one removes the need to carry any extra state in the case of a 'laundered' atomic wait. li

Re: [PATCH] aix: handle 64bit inodes for include directories

2021-05-17 Thread David Edelsohn via Gcc-patches
The aix.h change is okay with me, but you need to get approval for the incpath.c and cpplib.h parts of the patch from the appropriate maintainers. Thanks, David On Mon, May 17, 2021 at 7:44 AM CHIGOT, CLEMENT wrote: > > On AIX, stat will store inodes in 32bit even when using LARGE_FILES. > If th

Re: [PATCH v3] bpf.2: Use standard types and attributes

2021-05-17 Thread Daniel Borkmann
On 5/16/21 11:16 AM, Alejandro Colomar (man-pages) wrote: On 5/15/21 9:01 PM, Alejandro Colomar wrote: Some manual pages are already using C99 syntax for integral types 'uint32_t', but some aren't.  There are some using kernel syntax '__u32'.  Fix those. Both the kernel and the standard types a

Re: [PATCH] libstdc++: Fix iterator caching inside range adaptors [PR100479]

2021-05-17 Thread Tim Song via Gcc-patches
On Mon, May 17, 2021 at 11:46 AM Patrick Palka via Libstdc++ wrote: > constexpr void > _M_set(const _Range&, const iterator_t<_Range>& __it) > { > __glibcxx_assert(!_M_has_value()); > - _M_iter = __it; > + this->_M_payload._M_payload._M_value = __i

Re: [PATCH][DOCS] Remove install-old.texi

2021-05-17 Thread Richard Sandiford via Gcc-patches
Martin Liška writes: > Hello. > > As mentioned at the beginning of https://gcc.gnu.org/install/old.html: > "Note most of this information is out of date and superseded by the previous > chapters of this manual." > > The installation page is deprecated for 20 years now. > > Does it make sense to r

Re: [PATCH] tree-sra: Avoid refreshing into const base decls (PR 100453)

2021-05-17 Thread Eric Botcazou
> sorry for breaking Ada over the weekend, however... No problem. > None of the non-ACATS tests fail for me without doing a bootstrap, but I > did manage to reproduce this one (by the way, there really should be a > documentation on how to run ACATS tests manually, I should not need to > spend an

Re: [PATCH][nvptx] Handle memmodel for atomic ops

2021-05-17 Thread Tobias Burnus
Hi Tom, short version works :-) now (and I don't know why it didn't). Long version: On 17.05.21 18:58, Tom de Vries wrote: I have: ... @ %r25 atom.global.exch.b32 %r22,[atomic_lock],1; @ %r25 membar.sys; ... I tried with the PowerPC cross build - running on PowerPC + Quadro GV100 did work for

[r12-837 Regression] FAIL: gcc.target/i386/pr100582.c scan-assembler-times pblendvb 1 on Linux/x86_64

2021-05-17 Thread sunil.k.pandey via Gcc-patches
On Linux/x86_64, e0a5daf81f2c79a0275eccd7c1a25349990a7a4d is the first bad commit commit e0a5daf81f2c79a0275eccd7c1a25349990a7a4d Author: Richard Biener Date: Mon May 17 13:56:14 2021 +0200 middle-end/100582 - fix array_at_struct_end_p for vector indexing caused FAIL: gcc.target/i386/pr1

Re: [PATCH 1/1 v2] PR100281 C++: Fix SImode pointer handling

2021-05-17 Thread Jason Merrill via Gcc-patches
On 5/17/21 4:48 AM, Richard Biener wrote: On Thu, May 13, 2021 at 8:28 AM Andreas Krebbel via Gcc-patches wrote: v1 -> v2: build_reference_type_for_mode and build_pointer_type_for_mode now pick pointer mode if MODE argument is VOIDmode. Bootstrapped and regression tested on x86_64 and s390x.

Re: [PATCH] c++: Fix diagnostic for binding lvalue reference to volatile rvalue [PR 100635]

2021-05-17 Thread Jason Merrill via Gcc-patches
On 5/17/21 7:15 AM, Jonathan Wakely wrote: The current diagnostic assumes the reference binding fails because the reference is non-const, but it can also fail if the rvalue is volatile. Use the current diagnostic for non-const cases, and a modified diagnostic otherwise. gcc/cp/ChangeLog:

Re: [PATCH RFA] tree-iterator: C++11 range-for and tree_stmt_iterator

2021-05-17 Thread Jason Merrill via Gcc-patches
On 5/17/21 3:56 AM, Richard Biener wrote: On Fri, May 14, 2021 at 2:23 AM Martin Sebor via Gcc-patches wrote: On 5/13/21 1:26 PM, Jason Merrill via Gcc-patches wrote: Ping. On 5/1/21 12:29 PM, Jason Merrill wrote: Like my recent patch to add ovl_range and lkp_range in the C++ front end, thi

Re: [PATCH] gcc-changelog: Remove non-strict mode.

2021-05-17 Thread Jonathan Wakely via Gcc-patches
On 11/05/21 10:56 +0200, Martin Liška wrote: Hello. I'm going to push a commit that removes non-strict mode. It's useless right now. Martin contrib/ChangeLog: * gcc-changelog/git_check_commit.py: Remove --non-strict-mode. * gcc-changelog/git_commit.py: Remove strict mode.

[PATCH v2] x86: Warn for excessive argument alignment in main

2021-05-17 Thread H.J. Lu via Gcc-patches
On Thu, May 13, 2021 at 9:15 AM Bernd Edlinger wrote: > > On 5/13/21 3:37 PM, H.J. Lu via Gcc-patches wrote: > > Warn for excessive argument alignment in main instead of ICE. > > > > gcc/ > > > > PR c/100575 > > * cfgexpand.c (expand_stack_alignment): Add a bool argument for > >

Re: [PATCH] tree-sra: Avoid refreshing into const base decls (PR 100453)

2021-05-17 Thread Martin Jambor
Hi Eric, sorry for breaking Ada over the weekend, however... On Fri, May 14 2021, Eric Botcazou wrote: >> Looks like this caused: >> >> === acats tests === >> FAIL: c41325a None of the non-ACATS tests fail for me without doing a bootstrap, but I did manage to reproduce this on

Re: [PATCH] PR libstdc++/89728 diagnose some missuses of [locale.convenience] functions

2021-05-17 Thread Jonathan Wakely via Gcc-patches
On 12/05/21 17:16 +0100, Jonathan Wakely wrote: On 12/05/21 18:51 +0300, Antony Polukhin via Libstdc++ wrote: ср, 12 мая 2021 г. в 18:38, Antony Polukhin : ср, 12 мая 2021 г. в 17:44, Jonathan Wakely : On 12/05/21 12:58 +0300, Antony Polukhin wrote: >ср, 12 мая 2021 г. в 12:18, Jonathan Wake

Re: [PATCH] libstdc++: Fix filesystem::path constraints for volatile [PR 100630]

2021-05-17 Thread Jonathan Wakely via Gcc-patches
On 17/05/21 15:25 +0100, Jonathan Wakely wrote: On 17/05/21 15:02 +0100, Jonathan Wakely wrote: The constraint check for filesystem::path construction uses decltype(__is_path_src(declval())) which mean it considers conversion from an rvalue. When Source is a volatile-qualified type it cannot us

[committed] libstdc++: Fix std::jthread assertion and re-enable skipped test

2021-05-17 Thread Jonathan Wakely via Gcc-patches
libstdc++-v3/ChangeLog: * include/std/thread (jthread::_S_create): Fix static assert message. * testsuite/30_threads/jthread/95989.cc: Re-enable test. * testsuite/30_threads/jthread/jthread.cc: Do not require pthread effective target. * testsuite/30_

Re: [PATCH][nvptx] Handle memmodel for atomic ops

2021-05-17 Thread Tom de Vries
On 5/17/21 6:47 PM, Tobias Burnus wrote: > On 17.05.21 17:49, Tom de Vries wrote: >> [ Tobias, can you test this on volta ? ] > > Unfortunately, it does not seem to help. On a non-Volta system, it still > works (run time 0.3s) but on a Volta system it fails after 1.5s (abort). > > Looking (with a

Re: [PATCH] libstdc++: Fix iterator caching inside range adaptors [PR100479]

2021-05-17 Thread Jonathan Wakely via Gcc-patches
On 17/05/21 11:43 -0400, Patrick Palka via Libstdc++ wrote: This fixes two issues with our iterator caching as described in detail in the PR. Since r12-336 added the __non_propagating_cache class template as part of P2328, this patch just rewrites the _CachedPosition partial specialization in te

Re: [PATCH] libstdc++: Fix access issues in elements_view::_Sentinel [PR100631]

2021-05-17 Thread Jonathan Wakely via Gcc-patches
On 17/05/21 12:17 -0400, Patrick Palka via Libstdc++ wrote: Tested on x86_64-pc-linux-gnu, does this look OK for 10/11/trunk? OK, thanks. libstdc++-v3/ChangeLog: PR libstdc++/100631 * include/std/ranges (elements_view::_Iterator): Befriend _Sentinel. (elements

Re: [PATCH] libstdc++: Fix condition for memoizing reverse_view::begin() [PR100621]

2021-05-17 Thread Jonathan Wakely via Gcc-patches
On 17/05/21 12:17 -0400, Patrick Palka via Libstdc++ wrote: A range being a random access range is not a sufficient condition for ranges::next(iter, sent) to have constant time complexity; the range must also have a sized sentinel. This adjusts the memoization condition for reverse_view accordin

Re: [PATCH][nvptx] Handle memmodel for atomic ops

2021-05-17 Thread Tobias Burnus
On 17.05.21 17:49, Tom de Vries wrote: [ Tobias, can you test this on volta ? ] Unfortunately, it does not seem to help. On a non-Volta system, it still works (run time 0.3s) but on a Volta system it fails after 1.5s (abort). Looking (with an editor) at nvptx-none/lib/mgomp/libgomp.a, I still

Re: [PATCH] libstdc++: Fix up semiregular-box partial specialization [PR100475]

2021-05-17 Thread Jonathan Wakely via Gcc-patches
On 17/05/21 11:43 -0400, Patrick Palka via Libstdc++ wrote: This makes the in-place constructor of our partial specialization of __box for already-semiregular types to use direct-non-list-initialization (in accordance with the specification of the primary template), and additionally makes its dat

Re: [PATCH] libstdc++: Fix wrong thread waking on notify [PR100334]

2021-05-17 Thread Jonathan Wakely via Gcc-patches
On 14/05/21 18:09 +0100, Jonathan Wakely wrote: On 13/05/21 18:54 -0700, Thomas Rodgers wrote: From: Thomas Rodgers Please ignore the previous patch. This one removes the need to carry any extra state in the case of a 'laundered' atomic wait. libstdc++/ChangeLog: * include/bits/atomic

Re: [PATCH] arm: Fix ICE with CMSE nonsecure call on Armv8.1-M [PR100333]

2021-05-17 Thread Richard Earnshaw via Gcc-patches
On 30/04/2021 09:30, Alex Coplan via Gcc-patches wrote: Hi, As the PR shows, we ICE shortly after expanding nonsecure calls for Armv8.1-M. For Armv8.1-M, we have TARGET_HAVE_FPCXT_CMSE. As it stands, the expander (arm.md:nonsecure_call_internal) moves the callee's address to a register (with

RE: [PATCH] arm: Fix ICEs with compare-and-swap and -march=armv8-m.base [PR99977]

2021-05-17 Thread Kyrylo Tkachov via Gcc-patches
> -Original Message- > From: Alex Coplan > Sent: 17 May 2021 17:29 > To: Kyrylo Tkachov > Cc: gcc-patches@gcc.gnu.org; ni...@redhat.com; Richard Earnshaw > ; Ramana Radhakrishnan > > Subject: Re: [PATCH] arm: Fix ICEs with compare-and-swap and - > march=armv8-m.base [PR99977] > > Hi K

Re: [PATCH] arm: Fix ICEs with compare-and-swap and -march=armv8-m.base [PR99977]

2021-05-17 Thread Alex Coplan via Gcc-patches
Hi Kyrill, On 27/04/2021 13:47, Kyrylo Tkachov wrote: > Hi Alex, > > > -Original Message- > > From: Alex Coplan > > Sent: 27 April 2021 14:14 > > To: gcc-patches@gcc.gnu.org > > Cc: ni...@redhat.com; Richard Earnshaw ; > > Ramana Radhakrishnan ; Kyrylo > > Tkachov > > Subject: Re: [PATC

Re: RFA: Add option -fretry-compilation

2021-05-17 Thread Richard Biener via Gcc-patches
On Mon, May 17, 2021 at 5:33 PM Joern Rennecke wrote: > > On Mon, 17 May 2021 at 11:59, Richard Biener > wrote: > > > The plan for reload is to axe it similar to CC0 support. Sooner than > > later, but > > give it's still used exclusively by a lot of target means it might > > take some time. >

[PATCH] libstdc++: Fix condition for memoizing reverse_view::begin() [PR100621]

2021-05-17 Thread Patrick Palka via Gcc-patches
A range being a random access range is not a sufficient condition for ranges::next(iter, sent) to have constant time complexity; the range must also have a sized sentinel. This adjusts the memoization condition for reverse_view accordingly. Tested on x86_64-pc-linxu-gnu, does this look OK for tru

[PATCH] libstdc++: Fix access issues in elements_view::_Sentinel [PR100631]

2021-05-17 Thread Patrick Palka via Gcc-patches
Tested on x86_64-pc-linux-gnu, does this look OK for 10/11/trunk? libstdc++-v3/ChangeLog: PR libstdc++/100631 * include/std/ranges (elements_view::_Iterator): Befriend _Sentinel. (elements_view::_Sentinel::_M_equal): Templatize. (elements_view::_Sentinel::_

Re: [PATCH] openmp: Notify team barrier of pending tasks in, omp_fulfill_event

2021-05-17 Thread Jakub Jelinek via Gcc-patches
On Mon, May 17, 2021 at 04:48:03PM +0100, Kwok Cheung Yeung wrote: > 2021-05-17 Kwok Cheung Yeung > > libgomp/ > * task.c (omp_fulfill_event): Call gomp_team_barrier_set_task_pending > if new tasks generated. > * testsuite/libgomp.c-c++-common/task-detach-13.c: New. > --

[PATCH][nvptx] Handle memmodel for atomic ops

2021-05-17 Thread Tom de Vries
Hi, [ Tobias, can you test this on volta ? ] The atomic ops in nvptx.md have memmodel arguments, which are currently ignored. Handle these, fixing test-case fails libgomp.c-c++-common/reduction-{5,6}.c on volta. Tested libgomp on x86_64-linux with nvptx accelerator. Any comments? Thanks, - To

[PATCH] openmp: Notify team barrier of pending tasks in, omp_fulfill_event

2021-05-17 Thread Kwok Cheung Yeung
Hello This patch fixes the issue where a call to omp_fulfill_event could fail to trigger the execution of tasks that were dependent on the task whose completion event is being fulfilled. This mainly (or can only?) occurs when the thread is external to OpenMP, and all the barrier threads are

[PATCH] libstdc++: Fix up semiregular-box partial specialization [PR100475]

2021-05-17 Thread Patrick Palka via Gcc-patches
This makes the in-place constructor of our partial specialization of __box for already-semiregular types to use direct-non-list-initialization (in accordance with the specification of the primary template), and additionally makes its data() member function use std::__addressof. Tested on x86_64-pc

[PATCH] libstdc++: Fix iterator caching inside range adaptors [PR100479]

2021-05-17 Thread Patrick Palka via Gcc-patches
This fixes two issues with our iterator caching as described in detail in the PR. Since r12-336 added the __non_propagating_cache class template as part of P2328, this patch just rewrites the _CachedPosition partial specialization in terms of this class template. Tested on x86_64-pc-linux-gnu, do

Re: [PATCH] Add a couple of A?CST1:CST2 match and simplify optimizations

2021-05-17 Thread Bernd Edlinger
c -I- -I. -Iada/generated -Iada -Iada/gcc-interface -I../../gcc-trunk-1/gcc/ada -I../../gcc-trunk-1/gcc/ada/gcc-interface -Iada/libgnat -I../../gcc-trunk-1/gcc/ada/libgnat ../../gcc-trunk-1/gcc/ada/libgnat/a-chlat1.ads -o ada/libgnat/a-chlat1.o +===GNAT BUG DET

Re: RFA: Add option -fretry-compilation

2021-05-17 Thread Joern Rennecke
On Mon, 17 May 2021 at 11:59, Richard Biener wrote: > The plan for reload is to axe it similar to CC0 support. Sooner than later, > but > give it's still used exclusively by a lot of target means it might > take some time. > So for you it's always just -fretry-compilation -m[no-]lra? Given -m

Re: [PATCH] Bail in bounds_of_var_in_loop if scev returns NULL.

2021-05-17 Thread Andrew MacLeod via Gcc-patches
On 5/13/21 4:15 PM, Aldy Hernandez via Gcc-patches wrote: Both initial_condition_in_loop_num and evolution_part_in_loop_num can return NULL. This patch exits if either one is NULL. Presumably this didn't happen before, because adjust_range_with_scev was called far less frequently than in ranger

Re: [PATCH 7/7] [og10] WIP GOMP_MAP_ATTACH_ZERO_LENGTH_ARRAY_SECTION changes

2021-05-17 Thread Julian Brown
On Mon, 17 May 2021 21:14:26 +0800 Chung-Lin Tang wrote: > On 2021/5/11 4:57 PM, Julian Brown wrote: > > This work-in-progress patch tries to get > > GOMP_MAP_ATTACH_ZERO_LENGTH_ARRAY_SECTION to behave more like > > GOMP_MAP_ATTACH_DETACH -- in that the mapping is made to form groups > > to be pr

Re: [PATCH] libstdc++: Fix filesystem::path constraints for volatile [PR 100630]

2021-05-17 Thread Jonathan Wakely via Gcc-patches
On 17/05/21 15:02 +0100, Jonathan Wakely wrote: The constraint check for filesystem::path construction uses decltype(__is_path_src(declval())) which mean it considers conversion from an rvalue. When Source is a volatile-qualified type it cannot use is_path_src(const Unknown&) because a const lva

[PATCH] c/100625 - avoid building invalid labels in the GIMPLE FE

2021-05-17 Thread Richard Biener
When duplicate labes are diagnosed, avoid building a GIMPLE_LABEL. Bootstrapped / tested on x86_64-unknown-linux-gnu, pushed. 2021-05-17 Richard Biener PR c/100625 gcc/c/ * gimple-parser.c (c_parser_gimple_label): Avoid building a GIMPLE label with NULL label decl.

Re: [PATCH 5/5] Mapping of components of references to pointers to structs for OpenMP/OpenACC

2021-05-17 Thread Julian Brown
On Mon, 17 May 2021 21:07:19 +0800 Chung-Lin Tang wrote: > Hi Julian, > > On 2021/5/15 5:27 AM, Julian Brown wrote: > > GCC currently raises a parse error for indirect accesses to struct > > members, where the base of the access is a reference to a pointer. > > This patch fixes that case. > >

Re: [PATCH 4/5] Rework indirect struct handling for OpenACC/OpenMP in gimplify.c

2021-05-17 Thread Julian Brown
On Mon, 17 May 2021 14:12:00 +0200 Bernd Edlinger wrote: > > */ @@ -8715,19 +8770,26 @@ static tree > > build_struct_group (struct gimplify_omp_ctx *ctx, > > enum omp_region_type region_type, enum > > tree_code code, tree decl, unsigned int *flags, tree c, > > - ha

Re: [PATCH 1/2] c-family: Copy DECL_USER_ALIGN even if DECL_ALIGN is similar.

2021-05-17 Thread Robin Dapp via Gcc-patches
on s390 a warning test fails: inline int ATTR ((cold, aligned (8))) finline_hot_noret_align (int); inline int ATTR ((warn_unused_result)) finline_hot_noret_align (int); inline int ATTR ((aligned (4))) finline_hot_noret_align (int); /* { dg-warning "ignoring attribute .aligned \\(4\\). beca

[PATCH] libstdc++: Fix filesystem::path constraints for volatile [PR 100630]

2021-05-17 Thread Jonathan Wakely via Gcc-patches
The constraint check for filesystem::path construction uses decltype(__is_path_src(declval())) which mean it considers conversion from an rvalue. When Source is a volatile-qualified type it cannot use is_path_src(const Unknown&) because a const lvalue reference can only bind to a non-volatile rval

[PATCH][v2] c/100547 - reject overly large vector_size attributes

2021-05-17 Thread Richard Biener
This rejects a number of vector components that does not fit an 'int' which is an internal limitation of RTVEC. This requires adjusting gcc.dg/attr-vector_size.c which checks for much larger supported vectors. Note that the RTVEC limitation is a host specific limitation (unless we change this 'in

[PATCH] middle-end/100582 - fix array_at_struct_end_p for vector indexing

2021-05-17 Thread Richard Biener
Vector indexing leaves us with ARRAY_REFs of VIEW_CONVERT_EXPRs, sth which array_at_struct_end_p considers a array-at-struct-end even when there's an underlying decl visible. The following fixes the latter. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. 2021-05-17 Richard Biener

Re: RFA: fix gcc.dg/tree-ssa/popcount4l.c 16 bit failure, improve 64 bit popcount expansion for 32 bit target

2021-05-17 Thread Joern Wolfgang Rennecke
Attached is the updated version of the patch. Bootstrapped and regtested on x86_64-pc-linux-gnu. OK to apply? Recognize popcount also when a double width operation is needed. 2021-01-27 Joern Rennecke gcc/ * match.pd : When generating popcount directly fails, try doing it in t

[PATCH v3 09/12] x86: Also pass -mno-avx to cold-attribute-1.c

2021-05-17 Thread H.J. Lu via Gcc-patches
Also pass -mno-avx to pr72839.c to avoid copying data with YMM or ZMM registers. * gcc.target/i386/cold-attribute-1.c: Also pass -mno-avx. --- gcc/testsuite/gcc.target/i386/cold-attribute-1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/testsuite/gcc.target/i386

[PATCH v3 05/12] x86: Update piecewise move and store

2021-05-17 Thread H.J. Lu via Gcc-patches
We can use TImode/OImode/XImode integers for piecewise move and store. When vector register is used for piecewise move and store, we don't increase stack_alignment_needed since vector register spill isn't required for piecewise move and store. Since stack_realign_needed is set to true by checking

[PATCH v3 12/12] constructor: Check if it is faster to load constant from memory

2021-05-17 Thread H.J. Lu via Gcc-patches
When expanding a constant constructor, don't call expand_constructor if it is more efficient to load the data from the memory via move by pieces. gcc/ PR middle-end/90773 * expr.c (expand_expr_real_1): Don't call expand_constructor if it is more efficient to load the data

[PATCH v3 07/12] x86: Add tests for piecewise move and store

2021-05-17 Thread H.J. Lu via Gcc-patches
* gcc.target/i386/pieces-memcpy-10.c: New test. * gcc.target/i386/pieces-memcpy-11.c: Likewise. * gcc.target/i386/pieces-memcpy-12.c: Likewise. * gcc.target/i386/pieces-memcpy-13.c: Likewise. * gcc.target/i386/pieces-memcpy-14.c: Likewise. * gcc.targe

[PATCH v3 06/12] x86: Add AVX2 tests for PR middle-end/90773

2021-05-17 Thread H.J. Lu via Gcc-patches
PR middle-end/90773 * gcc.target/i386/pr90773-20.c: New test. * gcc.target/i386/pr90773-21.c: Likewise. * gcc.target/i386/pr90773-22.c: Likewise. * gcc.target/i386/pr90773-23.c: Likewise. --- gcc/testsuite/gcc.target/i386/pr90773-20.c | 13 + gcc

[PATCH v3 11/12] x86: Update gcc.target/i386/incoming-11.c

2021-05-17 Thread H.J. Lu via Gcc-patches
Expect no stack realignment since we no longer realign stack when copying data. * gcc.target/i386/incoming-11.c: Expect no stack realignment. --- gcc/testsuite/gcc.target/i386/incoming-11.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/testsuite/gcc.target/i386/i

[PATCH v3 10/12] x86: Also pass -mno-avx to sw-1.c for ia32

2021-05-17 Thread H.J. Lu via Gcc-patches
Also pass -mno-avx to sw-1.c for ia32 since copying data with YMM or ZMM registers disables shrink-wrapping when the second argument is passed on stack. * gcc.target/i386/sw-1.c: Also pass -mno-avx for ia32. --- gcc/testsuite/gcc.target/i386/sw-1.c | 1 + 1 file changed, 1 insertion(+) d

[PATCH v3 08/12] x86: Also pass -mno-avx to pr72839.c

2021-05-17 Thread H.J. Lu via Gcc-patches
Also pass -mno-avx to pr72839.c to avoid copying data with YMM or ZMM registers. * gcc.target/i386/pr72839.c: Also pass -mno-avx. --- gcc/testsuite/gcc.target/i386/pr72839.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/testsuite/gcc.target/i386/pr72839.c b/gcc/

[PATCH v3 02/12] x86: Add TARGET_READ_MEMSET_VALUE/TARGET_GEN_MEMSET_VALUE

2021-05-17 Thread H.J. Lu via Gcc-patches
1. Make ix86_expand_vector_init_duplicate global to duplicate QImode value to TImode/OImode/XImode. 2. Make ix86_minimum_incoming_stack_boundary global and add an argument to ignore stack_alignment_estimated. 3. Define SCRATCH_SSE_REG as a scratch register for ix86_gen_memset_value. 4. Add TARGET_R

[PATCH v3 03/12] x86: Avoid stack realignment when copying data

2021-05-17 Thread H.J. Lu via Gcc-patches
To avoid stack realignment, use SCRATCH_SSE_REG to copy data from one memory location to another. gcc/ * config/i386/i386-expand.c (ix86_expand_vector_move): Use SCRATCH_SSE_REG to copy data from one memory location to another. gcc/testsuite/ * gcc.target/i386/eh

[PATCH v3 01/12] Add TARGET_READ_MEMSET_VALUE/TARGET_GEN_MEMSET_VALUE

2021-05-17 Thread H.J. Lu via Gcc-patches
Add TARGET_READ_MEMSET_VALUE and TARGET_GEN_MEMSET_VALUE to support target instructions to duplicate QImode value to TImode/OImode/XImode value for memmset. PR middle-end/90773 * builtins.c (builtin_memset_read_str): Call targetm.read_memset_value. (builtin_memset_g

[PATCH v3 00/12] Allow TImode/OImode/XImode in op_by_pieces operations

2021-05-17 Thread H.J. Lu via Gcc-patches
Changes in the v3 patches: 1. Split the TARGET_READ_MEMSET_VALUE and TARGET_GEN_MEMSET_VALUE changes into the generic part and the x86 part. 1. Add TARGET_READ_MEMSET_VALUE and TARGET_GEN_MEMSET_VALUE to support target instructions to duplicate QImode value to TImode/OImode/XImode value for memm

[PATCH v3 04/12] Remove MAX_BITSIZE_MODE_ANY_INT

2021-05-17 Thread H.J. Lu via Gcc-patches
It is only defined for i386 and everyone uses the default: #define MAX_BITSIZE_MODE_ANY_INT (64*BITS_PER_UNIT) Whatever problems we had before, they have been fixed now. * config/i386/i386-modes.def (MAX_BITSIZE_MODE_ANY_INT): Removed. --- gcc/config/i386/i386-modes.def | 15 +++---

Re: [PATCH 7/7] [og10] WIP GOMP_MAP_ATTACH_ZERO_LENGTH_ARRAY_SECTION changes

2021-05-17 Thread Chung-Lin Tang
On 2021/5/11 4:57 PM, Julian Brown wrote: This work-in-progress patch tries to get GOMP_MAP_ATTACH_ZERO_LENGTH_ARRAY_SECTION to behave more like GOMP_MAP_ATTACH_DETACH -- in that the mapping is made to form groups to be processed by build_struct_group/build_struct_comp_map. I think that's import

Re: [PATCH 5/5] Mapping of components of references to pointers to structs for OpenMP/OpenACC

2021-05-17 Thread Chung-Lin Tang
Hi Julian, On 2021/5/15 5:27 AM, Julian Brown wrote: GCC currently raises a parse error for indirect accesses to struct members, where the base of the access is a reference to a pointer. This patch fixes that case. gcc/cp/ * semantics.c (finish_omp_clauses): Handle components of refer

Re: [PATCH 6/9] arm: Auto-vectorization for MVE: vcmp

2021-05-17 Thread Christophe Lyon via Gcc-patches
On Mon, 17 May 2021 at 12:35, Kyrylo Tkachov wrote: > > > > > -Original Message- > > From: Gcc-patches On Behalf Of > > Christophe Lyon via Gcc-patches > > Sent: 05 May 2021 15:08 > > To: Andre Simoes Dias Vieira > > Cc: gcc Patches > > Subject: Re: [PATCH 6/9] arm: Auto-vectorization f

Re: [PATCH 4/5] Rework indirect struct handling for OpenACC/OpenMP in gimplify.c

2021-05-17 Thread Bernd Edlinger
On 5/14/21 11:26 PM, Julian Brown wrote: > This patch reworks indirect struct handling in gimplify.c (i.e. for struct > components mapped with "mystruct->a[0:n]", "mystruct->b", etc.), for > both OpenACC and OpenMP. The key observation leading to these changes > was that component mappings of refe

[PATCH] RISC-V: Properly parse the letter 'p' in '-march'.

2021-05-17 Thread Geng Qi via Gcc-patches
gcc/ChangeLog: * common/config/riscv/riscv-common.c (riscv_subset_list::parsing_subset_version): Properly parse the letter 'p' in '-march'. gcc/testsuite/ChangeLog: * gcc.target/riscv/arch-12.c: New. * gcc.target/riscv/attribute-19.c: New. --- gcc/common/co

[PATCH] aix: handle 64bit inodes for include directories

2021-05-17 Thread CHIGOT, CLEMENT via Gcc-patches
On AIX, stat will store inodes in 32bit even when using LARGE_FILES. If the inode is larger, it will return -1 in st_ino. Thus, in incpath.c when comparing include directories, if several of them have 64bit inodes, they will be considered as duplicated. gcc/ChangeLog: 2021-05-06  Clément Chigot  

[PATCH] c++: Fix diagnostic for binding lvalue reference to volatile rvalue [PR 100635]

2021-05-17 Thread Jonathan Wakely via Gcc-patches
The current diagnostic assumes the reference binding fails because the reference is non-const, but it can also fail if the rvalue is volatile. Use the current diagnostic for non-const cases, and a modified diagnostic otherwise. gcc/cp/ChangeLog: PR c++/100635 * call.c (convert_li

[committed] libstdc++: Allow lualatex to be used for Doxygen PDF

2021-05-17 Thread Jonathan Wakely via Gcc-patches
This allows the Doxygen PDF to be built using lualatex instead of pdflatex, which solves a problem with pdflatex running out of memory sometimes. This is done by adding a --latex_cmd option to the run_doxygen script, which then sets the specified command in the generated user.cfg file used by Doxyg

Re: RFA: Add option -fretry-compilation

2021-05-17 Thread Richard Biener via Gcc-patches
On Mon, May 17, 2021 at 10:55 AM Joern Rennecke wrote: > > On Mon, 17 May 2021 at 08:36, Richard Biener > wrote: > > > > On Sun, May 16, 2021 at 8:53 PM Joern Rennecke > > wrote: > > > > > > For architectures with likely spilled register classes, neither > > > register allocator is guaranteed >

[PATCH][DOCS] Remove install-old.texi

2021-05-17 Thread Martin Liška
Hello. As mentioned at the beginning of https://gcc.gnu.org/install/old.html: "Note most of this information is out of date and superseded by the previous chapters of this manual." The installation page is deprecated for 20 years now. Does it make sense to remove it? Thanks, Martin gcc/Change

RE: [PATCH 7/9] arm: Auto-vectorization for MVE: add __fp16 support to VCMP

2021-05-17 Thread Kyrylo Tkachov via Gcc-patches
> -Original Message- > From: Gcc-patches On Behalf Of > Christophe Lyon via Gcc-patches > Sent: 05 May 2021 15:09 > To: Andre Simoes Dias Vieira > Cc: gcc-patches@gcc.gnu.org > Subject: Re: [PATCH 7/9] arm: Auto-vectorization for MVE: add __fp16 > support to VCMP > > On Tue, 4 May 2021

Re: [Patch] OpenMP/Fortran: Reject nonintrinsic assignments in OMP WORKSHARE [PR100633]

2021-05-17 Thread Jakub Jelinek via Gcc-patches
On Mon, May 17, 2021 at 12:27:22PM +0200, Tobias Burnus wrote: > OK for mainline? > It is an ice-on-invalid; does a GCC 11 backport nonetheless make sense? > > Tobias > > - > Mentor Graphics (Deutschland) GmbH, Arnulfstrasse 201, 80634 München > Registergericht München HRB 106955

RE: [PATCH 6/9] arm: Auto-vectorization for MVE: vcmp

2021-05-17 Thread Kyrylo Tkachov via Gcc-patches
> -Original Message- > From: Gcc-patches On Behalf Of > Christophe Lyon via Gcc-patches > Sent: 05 May 2021 15:08 > To: Andre Simoes Dias Vieira > Cc: gcc Patches > Subject: Re: [PATCH 6/9] arm: Auto-vectorization for MVE: vcmp > > On Tue, 4 May 2021 at 15:41, Christophe Lyon > wrote

Re: [OG11] Merge GCC 11 into branch, cherry picks from mainline

2021-05-17 Thread Tobias Burnus
On 14.05.21 10:51, Tobias Burnus wrote: OG11 = devel/omp/gcc-11, a branch with some OpenMP/OpenACC/offload patches which are not yet on mainline. Additionally, patches in this area are cherry-picked from mainline Changes since last email (cherry pick, merge, post-cherry-pick fix): 0b8439a602c

Re: [PATCH] arm: Fix ICE with CMSE nonsecure call on Armv8.1-M [PR100333]

2021-05-17 Thread Alex Coplan via Gcc-patches
On 30/04/2021 09:30, Alex Coplan via Gcc-patches wrote: > Hi, > > As the PR shows, we ICE shortly after expanding nonsecure calls for > Armv8.1-M. For Armv8.1-M, we have TARGET_HAVE_FPCXT_CMSE. As it stands, > the expander (arm.md:nonsecure_call_internal) moves the callee's address > to a registe

RE: [PATCH] testsuite/arm: Add mve-vadd-scalar-1.c test

2021-05-17 Thread Kyrylo Tkachov via Gcc-patches
> -Original Message- > From: Gcc-patches On Behalf Of > Christophe Lyon via Gcc-patches > Sent: 17 May 2021 10:54 > To: gcc Patches > Subject: Re: [PATCH] testsuite/arm: Add mve-vadd-scalar-1.c test > > ping? > > On Mon, 10 May 2021 at 13:22, Christophe Lyon > wrote: > > > > Ping? >

  1   2   >