Re: [PATCH] bootstrap/97666 - fix array of bool allocation

2020-11-03 Thread Richard Biener
On Wed, 4 Nov 2020, Iain Sandoe wrote: > Martin Sebor via Gcc-patches wrote: > > >On 11/3/20 4:13 AM, Richard Biener wrote: > >>This fixes the bad assumption that sizeof (bool) == 1 > >>Bootstrap / regtest running on x86_64-unknown-linux-gnu. > >>2020-11-03 Richard Biener > >> PR

c: Implement C2x nodiscard attribute

2020-11-03 Thread Joseph Myers
C2x adds the nodiscard standard attribute, with an optional string argument, as in C++; implement it for C. Bootstrapped with no regressions for x86_64-pc-linux-gnu. Applied to mainline. gcc/c/ 2020-11-04 Joseph Myers * c-decl.c (handle_nodiscard_attribute): New.

RE: [PATCH 1/5] [PR target/96342] Change field "simdlen" into poly_uint64

2020-11-03 Thread yangyang (ET)
Hi, > -Original Message- > From: Richard Sandiford [mailto:richard.sandif...@arm.com] > Sent: Wednesday, November 4, 2020 12:15 AM > To: yangyang (ET) > Cc: gcc-patches@gcc.gnu.org > Subject: Re: [PATCH 1/5] [PR target/96342] Change field "simdlen" into > poly_uint64 > > "yangyang

Re: [PATCH][PR target/97540] Don't extract memory from operand for normal memory constraint.

2020-11-03 Thread Hongtao Liu via Gcc-patches
On Tue, Nov 3, 2020 at 9:51 PM Richard Sandiford wrote: > > Vladimir Makarov via Gcc-patches writes: > > On 2020-10-27 2:53 a.m., Hongtao Liu wrote: > >> Hi: > >>For inline asm, there could be an operand like (not (mem:)), it's > >> not a valid operand for normal memory constraint. > >>

Re: [PATCH] PowerPC: PR libgcc/97543, build libgcc with -mno-gnu-attribute

2020-11-03 Thread Michael Meissner via Gcc-patches
On Sat, Oct 31, 2020 at 11:39:23PM +1030, Alan Modra wrote: > Hi Mike, > On Wed, Oct 28, 2020 at 08:42:04PM -0400, Michael Meissner via Gcc-patches > wrote: > > PowerPC: PR libgcc/97543, fix 64-bit long double issues > > > > There are two issues in PR libgcc/97543 which shows up if you build a

Re: [00/32] C++ 20 Modules

2020-11-03 Thread Hans-Peter Nilsson
On Tue, 3 Nov 2020, Nathan Sidwell wrote: > Here is the implementation of C++20 modules that I have been developing on the > devel/c++-modules branch over the last few years. Ow. > I have bootstrapped and tested on: > x86_64-linux > aarch64-linux > powerpc8le-linux > powerpc8-aix > > Iain

Re: [PATCH v7] genemit.c (main): split insn-emit.c for compiling parallelly

2020-11-03 Thread Jojo R
Jojo 在 2020年10月30日 +0800 PM11:29,Richard Sandiford ,写道: > Jojo R writes: > > Jojo > > 在 2020年10月27日 +0800 PM10:14,Richard Sandiford > > ,写道: > > > Jojo R writes: > > > > gcc/ChangeLog: > > > > > > > > * genemit.c (main): Print 'split line'. > > > > * Makefile.in (insn-emit.c): Define split

[PATCH v9] genemit.c (main): split insn-emit.c for compiling parallelly

2020-11-03 Thread Jojo R
gcc/ChangeLog: * genemit.c (main): Print 'split line'. * Makefile.in (insn-emit.c): Define split count and file --- gcc/Makefile.in | 35 +++- gcc/genemit.c | 104 +--- 2 files changed, 90 insertions(+), 49 deletions(-)

[r11-4664 Regression] FAIL: gcc.dg/guality/pr54519-4.c -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects -DPREVENT_OPTIMIZATION line 22 y == 68 on Linux/x86_64

2020-11-03 Thread sunil.k.pandey via Gcc-patches
On Linux/x86_64, 104ca9cfa60aa1d5ddd3574bed012d394e8c is the first bad commit commit 104ca9cfa60aa1d5ddd3574bed012d394e8c Author: Richard Biener Date: Tue Nov 3 12:28:03 2020 +0100 Save some memory at debug stream-in time caused FAIL: gcc.dg/guality/pr54519-4.c -O2 -flto

Re: [PATCH] bootstrap/97666 - fix array of bool allocation

2020-11-03 Thread Iain Sandoe via Gcc-patches
Martin Sebor via Gcc-patches wrote: On 11/3/20 4:13 AM, Richard Biener wrote: This fixes the bad assumption that sizeof (bool) == 1 Bootstrap / regtest running on x86_64-unknown-linux-gnu. 2020-11-03 Richard Biener PR bootstrap/97666 * tree-vect-slp.c

Re: [PATCH] bootstrap/97666 - fix array of bool allocation

2020-11-03 Thread Martin Sebor via Gcc-patches
On 11/3/20 4:13 AM, Richard Biener wrote: This fixes the bad assumption that sizeof (bool) == 1 Bootstrap / regtest running on x86_64-unknown-linux-gnu. 2020-11-03 Richard Biener PR bootstrap/97666 * tree-vect-slp.c (vect_build_slp_tree_2): Scale allocation of

Re: [32/32] fixinclude

2020-11-03 Thread David Edelsohn via Gcc-patches
On Tue, Nov 3, 2020 at 4:18 PM Nathan Sidwell wrote: > > AIX needed a fixinclude. It contained > > typedef struct {...} *ptr; > > that's an ODR landmine. Fixed by giving the struct a name Okay. Thanks, David

[PATCH] add -Wmismatched-new-delete to middle end (PR 90629)

2020-11-03 Thread Martin Sebor via Gcc-patches
Attached is a simple middle end implementation of detection of mismatched pairs of calls to C++ new and delete, along with a substantially enhanced implementation of -Wfree-nonheap-object. The latter option has been in place since 2011 but detected only the most trivial bugs. Unlike the Clang

Fix copying of clone_info while reshaping clone tree

2020-11-03 Thread Jan Hubicka
Hi, this patch fixes somewhat ugly issue with clone info getting lost when root of clone tree is removed. That code is quite old and probably should go away - i will look on that incrementally. Honza 2020-11-04 Jan Hubicka PR ipa/97695 * cgraph.c

Re: [04/32] cpp lexer

2020-11-03 Thread Nathan Sidwell
On 11/3/20 6:08 PM, Joseph Myers wrote: On Tue, 3 Nov 2020, Nathan Sidwell wrote: @@ -888,9 +915,9 @@ struct GTY(()) cpp_hashnode { unsigned int directive_index : 7; /* If is_directive, then index into directive table.

[PATCH v5] rtl: builtins: (not just) rs6000: Add builtins for fegetround, feclearexcept and feraiseexcept [PR94193]

2020-11-03 Thread Raoni Fassina Firmino via Gcc-patches
I am repeating the "changelog" from v3 and v4 here because v4 and v5 have just minor changes since v3. Changes since v4[1]: - Fixed more spelling and code style. - Add more clarification on comments for feraiseexcept and feclearexcept expands; Changes since v3[2]: - Fixed fegetround

Re: [04/32] cpp lexer

2020-11-03 Thread Joseph Myers
On Tue, 3 Nov 2020, Nathan Sidwell wrote: > @@ -888,9 +915,9 @@ struct GTY(()) cpp_hashnode { >unsigned int directive_index : 7; /* If is_directive, > then index into directive table. > Otherwise, a

[r11-4614 Regression] FAIL: libgomp.oacc-fortran/multidim-slice.f95 -DACC_DEVICE_TYPE_host=1 -DACC_MEM_SHARED=1 -foffload=disable -O3 -g execution test on Linux/x86_64

2020-11-03 Thread sunil.k.pandey via Gcc-patches
On Linux/x86_64, e881774d0dda6d5127eb8f0642f6edc16dc0b1e7 is the first bad commit commit e881774d0dda6d5127eb8f0642f6edc16dc0b1e7 Author: Richard Biener Date: Mon Nov 2 12:38:04 2020 +0100 Rewrite SLP induction vectorization caused FAIL: gcc.dg/vect/costmodel/x86_64/costmodel-pr30843.c

Re: [committed] libstdc++: Allow Lemire's algorithm to be used in more cases

2020-11-03 Thread Jonathan Wakely via Gcc-patches
On 03/11/20 22:28 +0100, Stephan Bergmann via Libstdc++ wrote: On 29/10/2020 15:59, Jonathan Wakely via Gcc-patches wrote: This extends the fast path to also work when the URBG's range of possible values is not the entire range of its result_type. Previously, the slow path would be used for

Re: Avoid char[] array in tree_def

2020-11-03 Thread Jason Merrill via Gcc-patches
On Sat, Oct 31, 2020 at 6:35 PM Jan Hubicka wrote: > > On 10/29/20 1:40 PM, Richard Biener wrote: > > > On Thu, 29 Oct 2020, Jakub Jelinek wrote: > > > > > > > On Thu, Oct 29, 2020 at 05:00:40PM +0100, Jan Hubicka wrote: > > > > > > > > > > > > That's ugly and will for sure defeat warning /

Re: [PATCH] PowerPC: PR libgcc/97543, build libgcc with -mno-gnu-attribute

2020-11-03 Thread Segher Boessenkool
Self-ping. Mike, can you reply to Alan's mail please? He makes a lot of points, not all of them bad certainly! Segher On Wed, Oct 28, 2020 at 08:42:04PM -0400, Michael Meissner wrote: > PowerPC: PR libgcc/97543, fix 64-bit long double issues > > There are two issues in PR libgcc/97543 which

[PATCH] c++: Not all character types are byte-access types.

2020-11-03 Thread Jason Merrill via Gcc-patches
The patch for 94923 that introduced is_byte_access_type mistakenly changed build_cplus_array_type to treat even arrays of char16_t as typeless storage, which is wrong; only arrays of char and unsigned char have the special alias semantics in C++. G++ used to treat signed char the same way, as C

Re: PowerPC: Map IEEE 128-bit long double built-in functions

2020-11-03 Thread Segher Boessenkool
I'll ping it myself then! Segher On Thu, Oct 22, 2020 at 06:03:46PM -0400, Michael Meissner wrote: > PowerPC: Map IEEE 128-bit long double built-in functions > > This patch is revised from the first and second versions of the patch posted. > It now uses the names that are not in the user's

Re: [PATCH] libgccjit: add some reflection functions in the jit C api

2020-11-03 Thread Antoni Boucher via Gcc-patches
I was missing a check in gcc_jit_struct_get_field, I added it in this new patch. On Thu, Oct 15, 2020 at 05:52:33PM -0400, David Malcolm wrote: On Thu, 2020-10-15 at 13:39 -0400, Antoni Boucher wrote: Thanks. I updated the patch with these changes. Thanks for patch; review below. Sorry if

Re: [PATCH] "used" attribute saves decl from linker garbage collection

2020-11-03 Thread H.J. Lu via Gcc-patches
On Tue, Nov 3, 2020 at 1:57 PM Jozef Lawrynowicz wrote: > > On Tue, Nov 03, 2020 at 01:09:43PM -0800, H.J. Lu via Gcc-patches wrote: > > On Tue, Nov 3, 2020 at 1:00 PM H.J. Lu wrote: > > > > > > On Tue, Nov 3, 2020 at 12:46 PM Jozef Lawrynowicz > > > wrote: > > > > > > > > On Tue, Nov 03, 2020

Re: [PATCH] libstdc++: Add c++2a

2020-11-03 Thread Jonathan Wakely via Gcc-patches
On 03/11/20 22:22 +0100, Christophe Lyon via Libstdc++ wrote: On Mon, 2 Nov 2020 at 19:43, Thomas Rodgers via Gcc-patches wrote: Testsed x86_64-pc-linux-gnu, committed to master. Hi, I can see the new tests failing on bare-metal targets using newlib (arm-eabi, aarch64-elf):

Re: [PATCH] "used" attribute saves decl from linker garbage collection

2020-11-03 Thread Jozef Lawrynowicz
On Tue, Nov 03, 2020 at 01:09:43PM -0800, H.J. Lu via Gcc-patches wrote: > On Tue, Nov 3, 2020 at 1:00 PM H.J. Lu wrote: > > > > On Tue, Nov 3, 2020 at 12:46 PM Jozef Lawrynowicz > > wrote: > > > > > > On Tue, Nov 03, 2020 at 11:58:04AM -0800, H.J. Lu via Gcc-patches wrote: > > > > On Tue, Nov

[PATCH 4/4] IBM Z: Test long doubles in vector registers

2020-11-03 Thread Ilya Leoshkevich via Gcc-patches
gcc/testsuite/ChangeLog: 2020-11-03 Ilya Leoshkevich * gcc.target/s390/zvector/long-double-callee-abi-scan.c: New test. * gcc.target/s390/zvector/long-double-caller-abi-run.c: New test. * gcc.target/s390/zvector/long-double-caller-abi-scan.c: New test. *

[PATCH 3/4] IBM Z: Store long doubles in vector registers when possible

2020-11-03 Thread Ilya Leoshkevich via Gcc-patches
On z14+, there are instructions for working with 128-bit floats (long doubles) in vector registers. It's beneficial to use them instead of instructions that operate on floating point register pairs, because it allows to store 4 times more data in registers at a time, relieveing register pressure.

[PATCH 2/4] IBM Z: Unhardcode NR_C_MODES

2020-11-03 Thread Ilya Leoshkevich via Gcc-patches
gcc/ChangeLog: 2020-11-03 Ilya Leoshkevich * config/s390/s390.c (NR_C_MODES): Unhardcode. (s390_alloc_pool): Use size_t for iterating from 0 to NR_C_MODES. (s390_add_constant): Likewise. (s390_find_constant): Likewise. (s390_dump_pool):

[PATCH 1/4] IBM Z: Remove unused RRe and RXe mode_attrs

2020-11-03 Thread Ilya Leoshkevich via Gcc-patches
gcc/ChangeLog: 2020-11-03 Ilya Leoshkevich * config/s390/s390.md (RRe): Remove. (RXe): Remove. --- gcc/config/s390/s390.md | 5 - 1 file changed, 5 deletions(-) diff --git a/gcc/config/s390/s390.md b/gcc/config/s390/s390.md index 18edea1ce47..050374980ae 100644 ---

[PATCH 0/4] IBM Z: Store long doubles in vector registers when possible

2020-11-03 Thread Ilya Leoshkevich via Gcc-patches
Bootstrapped and regtested on s390x-redhat-linux with --with-mode=zarch --with-arch=z14. Ok for master? This patch series implements storing long doubles in vector registers on z14+. Patches 1 and 2 are initial cleanups. Patch 3 is the actual implementation, patch 4 adds tests. Ilya

Re: [PATCH 0/2] Add tests to verify OpenACC clause locations

2020-11-03 Thread Thomas Schwinge
Hi! On 2020-11-03T09:17:49+0100, I wrote: > I've just pushed "[OpenACC] More precise diagnostics for 'gang', > 'worker', 'vector' clauses with arguments on 'loop' only allowed in > 'kernels' regions" to master branch in commit > beddd1762ad2bbe84dd776c54489153f83f21e56, and backported to >

Re: [committed] libstdc++: Allow Lemire's algorithm to be used in more cases

2020-11-03 Thread Stephan Bergmann via Gcc-patches
On 29/10/2020 15:59, Jonathan Wakely via Gcc-patches wrote: This extends the fast path to also work when the URBG's range of possible values is not the entire range of its result_type. Previously, the slow path would be used for engines with a uint_fast32_t result type if that type is actually a

Re: [PATCH] libstdc++: Add c++2a

2020-11-03 Thread Christophe Lyon via Gcc-patches
On Mon, 2 Nov 2020 at 19:43, Thomas Rodgers via Gcc-patches wrote: > > > Testsed x86_64-pc-linux-gnu, committed to master. > Hi, I can see the new tests failing on bare-metal targets using newlib (arm-eabi, aarch64-elf): 27_io/basic_syncbuf/1.cc (test for excess errors)

[31/32] test suite

2020-11-03 Thread Nathan Sidwell
Here's the testsuite, a new g++.dg/modules directory I don't think this'll work with cross-testing -- Nathan Sidwell 31-testsuite.diff.gz Description: application/gzip

[32/32] fixinclude

2020-11-03 Thread Nathan Sidwell
AIX needed a fixinclude. It contained typedef struct {...} *ptr; that's an ODR landmine. Fixed by giving the struct a name nathan -- Nathan Sidwell diff --git c/fixincludes/fixincl.x w/fixincludes/fixincl.x index 758d5620641..21439652bce 100644 --- c/fixincludes/fixincl.x +++

[30/32] test harness

2020-11-03 Thread Nathan Sidwell
Here's the test harness change, adding a few more prune cases. -- Nathan Sidwell diff --git c/gcc/testsuite/lib/prune.exp w/gcc/testsuite/lib/prune.exp index 190367c44e0..5d051b99def 100644 --- c/gcc/testsuite/lib/prune.exp +++ w/gcc/testsuite/lib/prune.exp @@ -48,7 +48,11 @@ proc

[29/32] make-lang.in

2020-11-03 Thread Nathan Sidwell
Here is the change to cp/Make-lang.in In addition to adding new object files, it sets MODULE_VERSION to the current date, when DEVPHASE is experimental. I also wedge that version into the REVISION variable. for releases the MODULE_VERSION is the MAJOR.MINOR pair. It'll refuse to load

[27/32] parser

2020-11-03 Thread Nathan Sidwell
the parser changes are two-fold a) call out to the token inspector added to lex, so that module control lines are processed during tokenization b) adding parser support for module and import declarations. As mentioned in the introduction, I do not handle the case of textually parsing a

[28/32] lang hook implementation

2020-11-03 Thread Nathan Sidwell
This implements the C++ overides of the langhooks I introduced. -- Nathan Sidwell diff --git c/gcc/cp/cp-lang.c w/gcc/cp/cp-lang.c index 9e980bc6de9..d75fa8ab708 100644 --- c/gcc/cp/cp-lang.c +++ w/gcc/cp/cp-lang.c @@ -77,6 +77,16 @@ static tree cxx_enum_underlying_base_type (const_tree);

[26/33] name-lookup

2020-11-03 Thread Nathan Sidwell
This is the name-lookup changes. Namespace-scope name-lookup now has to contend with merging the bindings from multiple visible modules, and ensuring said bindings are loaded (we load them lazily) nathan -- Nathan Sidwell diff --git c/gcc/cp/name-lookup.c w/gcc/cp/name-lookup.c index

[24/32] module mapper

2020-11-03 Thread Nathan Sidwell
this is the module mapper client and server pieces. It features a default resolver that can read a text file, or generate default mappings from module name to cmi name. By default the compiler will use an in-process resolved, but with suitable options can be instructed to communicate with a

[20/32] global constructor

2020-11-03 Thread Nathan Sidwell
the order of global construction is well defined in a module import graph. Each module has a globally callable idempotent constructor function. Every importer calls the ctors of its imports (I optimize that graph walk to avoid calling functions known to be called indirectly.) These are the

[22/32] miscelaneous c++ bits

2020-11-03 Thread Nathan Sidwell
This is probably the messiest diff. It's the remaining diff of cp-tree.h. 1) a new tree type MODULE_VECTOR. This is a sparse array used for name lookup. A namespace symbol table entry may contain one of these, which holds the bindings for each loaded module. If a module doesn't bind that

[21/32] miscelaneous

2020-11-03 Thread Nathan Sidwell
These are changes to gcc/tree.h adding some raw accessors to nodes, which seemed preferable to direct field access. I also needed access to the integral constant cache -- Nathan Sidwell diff --git c/gcc/tree.h w/gcc/tree.h index 7f0aa5b8d1d..13062f52919 100644 --- c/gcc/tree.h +++

[19/32] global trees

2020-11-03 Thread Nathan Sidwell
We directly reference global trees, and expect them to be immutable. This reorders the global tree arrays, moving the mutable ones after a High Water Mark. Those after the HWM are not directly accessed in the module machinery (we'll reference by name or equivalent). -- Nathan Sidwell diff

[15/32] new C++ lexer

2020-11-03 Thread Nathan Sidwell
Importation of header-units requires the tokenizer to recognize such imports during tokenization so that their macros become available. The C++ parser currently (and continues to) tokenize the entire file before beginning c++ parsing. This implements an explicit coroutine to manage that

[17/32] new C++ constexpr bits

2020-11-03 Thread Nathan Sidwell
We need to load and save constexpr bodies. This exposes that hash table from constexpr -- Nathan Sidwell diff --git c/gcc/cp/cp-tree.h w/gcc/cp/cp-tree.h index fdb8ee57f0b..e8e4d0af2d8 100644 --- c/gcc/cp/cp-tree.h +++ w/gcc/cp/cp-tree.h @@ -7862,9 +8177,20 @@ extern void

[13/32] new options

2020-11-03 Thread Nathan Sidwell
Here are the new options, along with the C++ lang-spec changes. Modules is enabled by -fmodules-ts, it is not implicitly enabled by -std=c++20. Usually that's the only option you need to add for a module-aware build. to build a header unit you can either add -fmodule-header to a c++ build,

[18/32] new C++ template bits

2020-11-03 Thread Nathan Sidwell
We also need to manipulate the instantiation tables. This exposes that bit of the template machinery. (other patches address instantiations themselves) -- Nathan Sidwell diff --git c/gcc/cp/cp-tree.h w/gcc/cp/cp-tree.h index fdb8ee57f0b..e8e4d0af2d8 100644 --- c/gcc/cp/cp-tree.h +++

[12/32] user documentation

2020-11-03 Thread Nathan Sidwell
This is the user documentation. -- Nathan Sidwell diff --git c/gcc/doc/invoke.texi w/gcc/doc/invoke.texi index 492b7dcdf10..3fdee8bbd3b 100644 --- c/gcc/doc/invoke.texi +++ w/gcc/doc/invoke.texi @@ -97,7 +97,7 @@ The usual way to run GCC is to run the executable called @command{gcc}, or When

[16/32] new C++ infrastructure

2020-11-03 Thread Nathan Sidwell
We have to expose a few entry points in the c++ handling. when loading a module we need to do template argument comparisons and not resolve typenames. I added a comparing_typenames global flag that;ll end up doing a but more than the 'comparing_specializations' flag we already have. Some of

[14/32] new keywords

2020-11-03 Thread Nathan Sidwell
We have 3 new keywords. As I mentioned in the preprocessor lexing, the keywords are context-sensitive, and we create internal ones. These internal ones have an 'invisible' space at the end of them. This has the advantage of making them return to normal identifiers in preprocessor output.

[08/32] cpp mkdeps

2020-11-03 Thread Nathan Sidwell
The final bit of preprocessor change is that to mkdeps. We have a new kind of thing to be dependent upon -- a compiled module interface. That's also an additional target. This adds the logic to mkdeps to keep those dependencies separate from include file dependencies. I made use of this

[11/32] instrumentation

2020-11-03 Thread Nathan Sidwell
I add one new parameter -- the number of concurrently open module files, and 3 instrumentation timers. -- Nathan Sidwell diff --git c/gcc/params.opt w/gcc/params.opt index 7bac39a9d58..0366584f94e 100644 --- c/gcc/params.opt +++ w/gcc/params.opt @@ -349,6 +349,10 @@ Maximal stack frame growth

[09/32] core diagnostics

2020-11-03 Thread Nathan Sidwell
The 'included from ...' chain that one gets at the start of a diagnostic needs extending to include importing. There are a few combinations to handle, but nothing particularly exciting. -- Nathan Sidwell diff --git c/gcc/diagnostic.c w/gcc/diagnostic.c index 1b6c9845892..52bf5e0da1f 100644

[06/32] cpp macros

2020-11-03 Thread Nathan Sidwell
Header units can provide macros to an importer. For efficiency that is done lazily. When we import a header unit we mark the identifers it defines as significant. It's only when we need the macro definition (including in #ifdef &| defined (X) processing) that we resolve the macro. We

[07/32] cpp main

2020-11-03 Thread Nathan Sidwell
Here's the changes to starting the main file. I have added the ability to search the user or system include paths for the main file. That's real helpful to users attempting to build header-units. I'll discuss the CLI with the options patch. Also recording the location at which the main file

[03/32] cpp-callbacks

2020-11-03 Thread Nathan Sidwell
Here are the callbacks in the preprocessor itself. a) one to handle deferred macros b) one to handle include translation. For every '#include ', there is the possibility of replacing that with 'import '. This hook determines if that happens. -- Nathan Sidwell diff --git

[04/32] cpp lexer

2020-11-03 Thread Nathan Sidwell
c++ modules creates 2 new kinds of preprocessor lines [export] module ... [export] import ... To all intents and purposes these are cppdirectives spelt without a leading '#'. module and import are context-sensitive keywords. Thus preprocessor tokenizing needs a bit of token peeking. This is

[01/32] langhooks

2020-11-03 Thread Nathan Sidwell
I needed a set of hook interfacing the preprocessor to the language. they get called from pieces in c-family. preprocess_main_file: we need to know when any forced headers have been parsed in order to deal with linemaps and macro visibility preprocess_options: A way for the language to

[05/32] cpp files

2020-11-03 Thread Nathan Sidwell
As I mentioned in patch 03, include translation is a thing. This amends the file handling to determine that, and for resolving explicit imports of header-units The logic for locating a header unit is the same as locating a header-file. Except there's a final step of mapping the header-file

[02/32] linemaps

2020-11-03 Thread Nathan Sidwell
Location handling needs to add 2 things 1) a new kind of inclusion -- namely a module. We add LC_MODULE as a map kind, 2) the ability to allocate blocks of line-maps for both ordinary locations and macro locations, that are then filled in by the module loader. -- Nathan Sidwell diff

[00/32] C++ 20 Modules

2020-11-03 Thread Nathan Sidwell
Here is the implementation of C++20 modules that I have been developing on the devel/c++-modules branch over the last few years. It is not a complete implementation. The major missing pieces are: 1) Private Module Fragment The syntax is recognized and a sorry emitted 2) textually parsing a

Re: [PATCH] "used" attribute saves decl from linker garbage collection

2020-11-03 Thread H.J. Lu via Gcc-patches
On Tue, Nov 3, 2020 at 1:00 PM H.J. Lu wrote: > > On Tue, Nov 3, 2020 at 12:46 PM Jozef Lawrynowicz > wrote: > > > > On Tue, Nov 03, 2020 at 11:58:04AM -0800, H.J. Lu via Gcc-patches wrote: > > > On Tue, Nov 3, 2020 at 10:22 AM Jozef Lawrynowicz > > > wrote: > > > > > > > > On Tue, Nov 03, 2020

Re: [PATCH] "used" attribute saves decl from linker garbage collection

2020-11-03 Thread H.J. Lu via Gcc-patches
On Tue, Nov 3, 2020 at 12:46 PM Jozef Lawrynowicz wrote: > > On Tue, Nov 03, 2020 at 11:58:04AM -0800, H.J. Lu via Gcc-patches wrote: > > On Tue, Nov 3, 2020 at 10:22 AM Jozef Lawrynowicz > > wrote: > > > > > > On Tue, Nov 03, 2020 at 09:57:58AM -0800, H.J. Lu via Gcc-patches wrote: > > > > On

Re: [PATCH] "used" attribute saves decl from linker garbage collection

2020-11-03 Thread Jozef Lawrynowicz
On Tue, Nov 03, 2020 at 11:58:04AM -0800, H.J. Lu via Gcc-patches wrote: > On Tue, Nov 3, 2020 at 10:22 AM Jozef Lawrynowicz > wrote: > > > > On Tue, Nov 03, 2020 at 09:57:58AM -0800, H.J. Lu via Gcc-patches wrote: > > > On Tue, Nov 3, 2020 at 9:41 AM Jozef Lawrynowicz > > > wrote: > > > > > > >

[PATCH] c++: Reuse identical ATOMIC_CONSTRs during normalization

2020-11-03 Thread Patrick Palka via Gcc-patches
Profiling revealed that sat_hasher::equal accounts for nearly 40% of compile time in some cmcstl2 tests. This patch eliminates this bottleneck by caching the ATOMIC_CONSTRs returned by normalize_atom. This in turn allows us to replace the expensive atomic_constraints_identical_p check in

Re: [committed] libstdc++: Rewrite std::call_once to use futexes [PR 66146]

2020-11-03 Thread Jonathan Wakely via Gcc-patches
On 03/11/20 18:45 +, Jonathan Wakely wrote: The current implementation of std::call_once uses pthread_once, which only meets the C++ requirements when compiled with support for exceptions. For most glibc targets and all non-glibc targets, pthread_once does not work correctly if the

Re: [committed] libstdc++: Rewrite std::call_once to use futexes [PR 66146]

2020-11-03 Thread Jonathan Wakely via Gcc-patches
This is a minor refactoring for readability. Tested x86_64-linux and powerpc-aix. Committed to trunk. commit 9f925f3b198e210e0d124a3c69fae034f429942f Author: Jonathan Wakely Date: Tue Nov 3 19:42:07 2020 libstdc++: Refactor std::call_once internals This separates the

Re: [09/33] core diagnostics

2020-11-03 Thread Nathan Sidwell
Here are the changes for gcc/configure.ac (config.h.in and configure get rebuilt). This is adding smarts to check for networking features, so that a network-aware module mapper can be built. -- Nathan Sidwell diff --git c/gcc/configure.ac w/gcc/configure.ac index 73034bb902b..168a3bc3625

Re: [PATCH] "used" attribute saves decl from linker garbage collection

2020-11-03 Thread H.J. Lu via Gcc-patches
On Tue, Nov 3, 2020 at 10:22 AM Jozef Lawrynowicz wrote: > > On Tue, Nov 03, 2020 at 09:57:58AM -0800, H.J. Lu via Gcc-patches wrote: > > On Tue, Nov 3, 2020 at 9:41 AM Jozef Lawrynowicz > > wrote: > > > > > > The attached patch implements TARGET_ASM_MARK_DECL_PRESERVED for ELF GNU > > > OSABI

Re: [PATCH] c++: Implement DR2303 [PR97453]

2020-11-03 Thread Jason Merrill via Gcc-patches
On 11/3/20 3:11 AM, kamlesh kumar wrote: Here is the copyright assignment under which i will be contributing. Ah, great. I've now committed the patch. On Mon, Nov 2, 2020 at 10:50 PM kamlesh kumar wrote: Do you see a reason this wouldn't work? No, I do not see any.This is good. so

Re: [PATCH] c++: Don't try to parse a function declaration as deduction guide [PR97663]

2020-11-03 Thread Jason Merrill via Gcc-patches
On 11/2/20 2:13 PM, Jakub Jelinek wrote: Hi! While these function declarations have NULL decl_specifiers->type, they have still type specifiers specified from which the default int in the return type is added, so we shouldn't try to parse those as deduction guides. Bootstrapped/regtested on

Re: [02/33] linemaps

2020-11-03 Thread Nathan Sidwell
Location handling needs to add 2 things 1) a new kind of inclusion -- namely a module. We add LC_MODULE as a map kind, 2) the ability to allocate blocks of line-maps for both ordinary locations and macro locations, that are then filled in by the module loader. -- Nathan Sidwell diff --git

Add missing non-NULL check in cgraphclones

2020-11-03 Thread Jan Hubicka
Hi, this patch adds check that info is non-NULL. This happens when we duplicate thunk with no param adjustments. Boottrapped/regtested x86_64, comitted. gcc/ChangeLog: 2020-11-03 Jan Hubicka PR ipa/97698 * cgraphclones.c (duplicate_thunk_for_node): Check that info is

Re: [Patch + RFC][contrib] gcc-changelog/git_commit.py: Check for missing description

2020-11-03 Thread Tobias Burnus
On 03.11.20 17:28, Martin Liška wrote: I really think the check should support situations where a description is provided on the next line (first after '\t', so not '\t*') as you see in the failing test: That was supposed to happen, but obviously didn't (first condition wrong). Now done more

[committed] libstdc++: Rewrite std::call_once to use futexes [PR 66146]

2020-11-03 Thread Jonathan Wakely via Gcc-patches
The current implementation of std::call_once uses pthread_once, which only meets the C++ requirements when compiled with support for exceptions. For most glibc targets and all non-glibc targets, pthread_once does not work correctly if the init_routine exits via an exception. The pthread_once_t

Re: [PATCH v2] c++: Prevent warnings for value-dependent exprs [PR96742]

2020-11-03 Thread Marek Polacek via Gcc-patches
On Sat, Oct 31, 2020 at 10:09:32AM +, Iain Sandoe wrote: > Hi Marek, > > Marek Polacek via Gcc-patches wrote: > > > On Wed, Oct 28, 2020 at 02:46:36PM -0400, Jason Merrill wrote: > >> On 10/28/20 2:00 PM, Marek Polacek wrote: > >>> On Tue, Oct 27, 2020 at 01:36:30PM -0400, Jason Merrill

[patch] Add dg-require-effective-target fpic to an aarch64 specific test in gcc.dg

2020-11-03 Thread Olivier Hainque
Hello, This patch adds dg-require-effective-target fpic to an aarch64 specific gcc.dg test using -fPIC, which helps circumvent a failure we observed while testing the aarch64 port for VxWorks. ok to commit ? Thanks in advance, Best Regards, Olivier 2020-11-03 Olivier Hainque

[PATCH][AArch64] Use intrinsics for upper saturating shift right

2020-11-03 Thread David Candler via Gcc-patches
The use of vqshrn_high_n_s32 was triggering an unneeded register move, because sqshrn2 is destructive but was declared as inline assembly in arm_neon.h. This patch implements sqshrn2 and uqshrn2 as actual intrinsics which do not trigger the unnecessary move, along with new tests to cover them.

c++: using-decl instantiation

2020-11-03 Thread Nathan Sidwell
Jason, I suspect the invariants this encodes will be broken by the using enum patches. That's fine, but at least this'll shout at someone if they change and we don't address it. In streaming using decls I needed to check some assumptions. This adds those checks to the instantiation

Re: [PATCH] "used" attribute saves decl from linker garbage collection

2020-11-03 Thread Jozef Lawrynowicz
On Tue, Nov 03, 2020 at 09:57:58AM -0800, H.J. Lu via Gcc-patches wrote: > On Tue, Nov 3, 2020 at 9:41 AM Jozef Lawrynowicz > wrote: > > > > The attached patch implements TARGET_ASM_MARK_DECL_PRESERVED for ELF GNU > > OSABI targets, so that declarations that have the "used" attribute > > applied

c++: Refactor clone copying

2020-11-03 Thread Nathan Sidwell
This patch sets copy_fndecl_with_name to always inform rest_of_decl_compilation that it is not a top-level decl (it's a member function). I also refactor build_cdtor_clones to conditionally do the method vector updating. That happens to be a better interface for modules to use.

[PATCH] i386: Fix ix86_function_arg_regno_p to return correct SSE regno for 32bit TARGET_MACHO

2020-11-03 Thread Uros Bizjak via Gcc-patches
Use up to SSE_REGPARM_MAX registers to pass function parameters for 32bit Mach-O targets. Also, define X86_32_MMX_REGPARM_MAX to return 0 for 32bit Mach-O targets. 2020-11-03 Uroš Bizjak gcc/ * config/i386/i386.c (ix86_function_arg_regno_p): Use up to SSE_REGPARM_MAX registers to

c++: Small pt.c cleanups

2020-11-03 Thread Nathan Sidwell
Now I know about VAR_OR_FUNCTION_DECL_P I found a place to use it. Also positively checking for a function_decl is clearer than negatively checking for things that are not. gcc/cp/ * pt.c (primary_template_specialization_p): Use VAR_OR_FUNCTION_DECL_P.

Re: [PATCH, 3/3, OpenMP] Target mapping changes for OpenMP 5.0, libgomp parts [resend]

2020-11-03 Thread Chung-Lin Tang
On 2020/10/28 6:33 PM, Chung-Lin Tang wrote: On 2020/9/1 9:37 PM, Chung-Lin Tang wrote: his patch is the changes to libgomp and testcases. There is now (again) a need to indicate OpenACC/OpenMP and an 'enter data' style directive, so the associated changes to 'enum gomp_map_vars_kind'. There 

Re: [PATCH, 2/3, OpenMP] Target mapping changes for OpenMP 5.0, middle-end parts and compiler testcases

2020-11-03 Thread Chung-Lin Tang
On 2020/10/29 7:49 PM, Jakub Jelinek wrote: On Wed, Oct 28, 2020 at 06:32:21PM +0800, Chung-Lin Tang wrote: @@ -8958,25 +9083,20 @@ gimplify_scan_omp_clauses (tree *list_p, gimple_seq *pre_p, /* An "attach/detach" operation on an update directive should behave as

Re: [PATCH, 1/3, OpenMP] Target mapping changes for OpenMP 5.0, front-end parts

2020-11-03 Thread Chung-Lin Tang
Hi Jakub, here is v3 of this patch set. On 2020/10/29 7:44 PM, Jakub Jelinek wrote: +extern void c_omp_adjust_clauses (tree, bool); So, can you please rename the function to either c_omp_adjust_target_clauses or c_omp_adjust_mapping_clauses or c_omp_adjust_map_clauses? I've renamed it to

Re: [PATCH] "used" attribute saves decl from linker garbage collection

2020-11-03 Thread H.J. Lu via Gcc-patches
On Tue, Nov 3, 2020 at 9:41 AM Jozef Lawrynowicz wrote: > > The attached patch implements TARGET_ASM_MARK_DECL_PRESERVED for ELF GNU > OSABI targets, so that declarations that have the "used" attribute > applied will be saved from linker garbage collection. > > TARGET_ASM_MARK_DECL_PRESERVED will

[PATCH] "used" attribute saves decl from linker garbage collection

2020-11-03 Thread Jozef Lawrynowicz
The attached patch implements TARGET_ASM_MARK_DECL_PRESERVED for ELF GNU OSABI targets, so that declarations that have the "used" attribute applied will be saved from linker garbage collection. TARGET_ASM_MARK_DECL_PRESERVED will emit an assembler ".retain" directive for the decl, and the

Re: [patch] Add dg-require-effective-target fpic to gcc.target/powerpc tests

2020-11-03 Thread Olivier Hainque
Hi Segher, > On 3 Nov 2020, at 18:00, Segher Boessenkool > wrote: > >> /* { dg-require-effective-target fpic } */ >> >> to a few tests in gcc.target/powerpc that do use >> -fpic or -fPIC but don't currently query the target >> support. > This is fine for trunk, thanks! Great :-) >> ---

[patch] g++ tests: Add dg-require-effective-target fpic to a few g++ tests

2020-11-03 Thread Olivier Hainque
Hello, This change is a proposal to add /* { dg-require-effective-target fpic } */ to a few tests in g++.dg that use -fpic or -fPIC but don't currently query the target support. This corresponds to what most other fpic tests do (typically, unless this is implied by some other test such as

cpplib: EOF in pragmas

2020-11-03 Thread Nathan Sidwell
This patch moves the generation of PRAGMA_EOF earlier, to when we set need_line, rather than when we try and get the next line. It also prevents peeking past a PRAGMA token. libcpp/ * lex.c (cpp_peek_token): Do not peek past CPP_PRAGMA. (_cpp_lex_direct): Handle EOF

Re: [patch] Add dg-require-effective-target fpic to gcc.target/powerpc tests

2020-11-03 Thread Segher Boessenkool
Hi! On Tue, Nov 03, 2020 at 10:12:54AM +0100, Olivier Hainque wrote: > This change is a proposal to add > > /* { dg-require-effective-target fpic } */ > > to a few tests in gcc.target/powerpc that do use > -fpic or -fPIC but don't currently query the target > support. > > This corresponds to

Re: [PATCH][AArch64] ACLE intrinsics: get low/high half from BFloat16 vector

2020-11-03 Thread Dennis Zhang via Gcc-patches
On 11/3/20 2:05 PM, Richard Sandiford wrote: Dennis Zhang writes: Hi Richard, On 10/30/20 2:07 PM, Richard Sandiford wrote: Dennis Zhang writes: diff --git a/gcc/config/aarch64/aarch64-simd-builtins.def b/gcc/config/aarch64/aarch64-simd-builtins.def index 332a0b6b1ea..39ebb776d1d 100644

Re: [PATCH] c++: Don't try to parse a function declaration as deduction guide [PR97663]

2020-11-03 Thread Marek Polacek via Gcc-patches
On Mon, Nov 02, 2020 at 08:13:09PM +0100, Jakub Jelinek via Gcc-patches wrote: > Hi! > > While these function declarations have NULL decl_specifiers->type, > they have still type specifiers specified from which the default int > in the return type is added, so we shouldn't try to parse those as >

c++: Directly fixup deferred eh-specs

2020-11-03 Thread Nathan Sidwell
eh-specifiers in a class definition are complete-definition contexts, and we sometimes need to deferr their parsing. We create a deferred eh specifier, which can end up persisting in the type system due to variants being created before the deferred parse. This causes problems in modules

Re: [PATCH v3] rs6000: Use direct move for char/short vector CTOR [PR96933]

2020-11-03 Thread Segher Boessenkool
Hi! On Tue, Nov 03, 2020 at 03:25:19PM +0800, Kewen.Lin wrote: > > I'm trying to be stricter about the test cases. > > > > +++ b/gcc/testsuite/gcc.target/powerpc/pr96933-1.c > > @@ -0,0 +1,14 @@ > > +/* { dg-do compile { target { lp64 && has_arch_pwr9 } } } */ > > +/* {

  1   2   >