[COMMITTED] Convert nonzero mask in irange to wide_int.

2022-10-04 Thread Aldy Hernandez via Gcc-patches
The reason the nonzero mask was kept in a tree was basically inertia, as everything in irange is a tree. However, there's no need to keep it in a tree, as the conversions to and from wide ints are very annoying. That, plus special casing NULL masks to be -1 is prone to error. I have not only rew

Re: [COMMITTED] Convert nonzero mask in irange to wide_int.

2022-10-04 Thread Richard Biener via Gcc-patches
Am 04.10.2022 um 09:36 schrieb Aldy Hernandez via Gcc-patches : > > The reason the nonzero mask was kept in a tree was basically inertia, > as everything in irange is a tree. However, there's no need to keep > it in a tree, as the conversions to and from wide ints are very > annoying. That,

Re: Adding a new thread model to GCC

2022-10-04 Thread LIU Hao via Gcc-patches
在 2022-10-03 13:03, Bernhard Reutner-Fischer 写道: No, sorry for my brevity. Using __gthread_t like in your patch is correct. I see. In 'libgfortran/io/async.c' there is ``` async_unit *au = u->au; LOCK (&au->lock); thread_unit = u; au->thread = __gthread_self (); ``` so i

[PATCH] middle-end, c++, i386, libgcc: std::bfloat16_t and __bf16 arithmetic support

2022-10-04 Thread Jakub Jelinek via Gcc-patches
On Fri, Sep 30, 2022 at 04:08:10PM +0200, Jakub Jelinek via Gcc-patches wrote: > On Fri, Sep 30, 2022 at 09:49:08AM -0400, Jason Merrill wrote: > > The comment from Apple on the ABI mangling proposal suggests to me that we > > might want to delay enabling C++ std::bfloat16_t (i.e. defining > > __ST

Re: [patch] Fix thinko in powerpc default specs for -mabi

2022-10-04 Thread Olivier Hainque via Gcc-patches
Hi Segher, > On 3 Oct 2022, at 18:13, Segher Boessenkool > wrote: > > -mabi= does two separate things, unfortunately. > > First, you can use it to set the base ABI: elfv1, elfv2. But you can > also use it to set ABI variants, ABI options: -mabi={no-,}altivec, > -mabi={ieee,ibm}longdouble, -ma

Re: [PATCH] aarch64: fix off-by-one in reading cpuinfo

2022-10-04 Thread Richard Sandiford via Gcc-patches
Philipp Tomsich writes: > Fixes: 341573406b39 > > Don't subtract one from the result of strnlen() when trying to point > to the first character after the current string. This issue would > cause individual characters (where the 128 byte buffers are stitched > together) to be lost. > > gcc/ChangeL

[PATCH] attribs: Add missing auto_diagnostic_group 3 times

2022-10-04 Thread Jakub Jelinek via Gcc-patches
Hi! In these spots, the error/error_at has some inform afterwards which are explanation part of the same diagnostics, so should be tied with auto_diagnostic_group with it. Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? 2022-10-04 Jakub Jelinek * attribs.cc (hand

Re: [PATCH 1/2] Allow subtarget customization of CC1_SPEC

2022-10-04 Thread Sebastian Huber
On 08/09/2022 07:33, Sebastian Huber wrote: On 04/08/2022 15:02, Sebastian Huber wrote: On 22/07/2022 15:02, Sebastian Huber wrote: gcc/ChangeLog: * gcc.cc (SUBTARGET_CC1_SPEC): Define if not defined. (CC1_SPEC): Define to SUBTARGET_CC1_SPEC. * config/arm/arm.h (CC1_SPEC): Remove.

Re: [patch] install.texi: gcn - update llvm reqirements, gcn/nvptx - newlib use version

2022-10-04 Thread Tobias Burnus
On 30.09.22 10:00, Tobias Burnus wrote: That's for https://gcc.gnu.org/install/specific.html ... * doc/install.texi (Specific): Add missing items to bullet list. (amdgcn): Update LLVM requirements, use version not date for newlib. (nvptx): Use version not git hash

Re: [Patch] Fortran: Add OpenMP's assume(s) directives

2022-10-04 Thread Jakub Jelinek via Gcc-patches
On Sun, Oct 02, 2022 at 07:47:18PM +0200, Tobias Burnus wrote: > gcc/ChangeLog: > > * doc/invoke.texi (-fopenmp-simd): Document that also 'assume' > is enabled. > > libgomp/ChangeLog: > > * libgomp.texi (OpenMP 5.1 Impl. Status): Mark 'assume' as 'Y'. > > gcc/fortran/ChangeLog

Re: [PATCH] c++, c, v2: Implement C++23 P1774R8 - Portable assumptions [PR106654]

2022-10-04 Thread Jakub Jelinek via Gcc-patches
On Mon, Oct 03, 2022 at 09:22:42PM +0200, Jakub Jelinek via Gcc-patches wrote: > Here is a lightly tested updated patch which I'll bootstrap/regtest tonight. Bootstrap/regtest passed on both x86_64-linux and i686-linux. Jakub

Re: [PATCH][AArch64] Implement ACLE Data Intrinsics

2022-10-04 Thread Andre Vieira (lists) via Gcc-patches
Hi all, Can I backport this to gcc-11 branch? Also applies cleanly (with the exception of the file extensions being different: 'aarch64-builtins.cc vs aarch64-builtins.c'). Bootstrapped and regression tested on aarch64-linux-gnu. Kind regards, Andre Vieira

Re: [COMMITTED] Convert nonzero mask in irange to wide_int.

2022-10-04 Thread Aldy Hernandez via Gcc-patches
On Tue, Oct 4, 2022 at 9:55 AM Richard Biener wrote: > > > Am 04.10.2022 um 09:36 schrieb Aldy Hernandez via Gcc-patches > : > > > > The reason the nonzero mask was kept in a tree was basically inertia, > > as everything in irange is a tree. However, there's no need to keep > > it in a tree, as

[PATCH] cselib: Skip BImode while keeping track of subvalue relations [PR107088]

2022-10-04 Thread Stefan Schulze Frielinghaus via Gcc-patches
For BImode get_narrowest_mode evaluates to QImode but BImode < QImode. Thus FOR_EACH_MODE_UNTIL never reaches BImode and iterates until OImode for which no wider mode exists so we end up with VOIDmode and fail. Fixed by adding a size guard so we effectively skip BImode. Bootstrap and regtest are c

Re: [PATCH] libstdc++: Implement ranges::join_with_view from P2441R2

2022-10-04 Thread Jonathan Wakely via Gcc-patches
On Tue, 4 Oct 2022 at 02:11, Patrick Palka via Libstdc++ wrote: > > Tested on x86_64-pc-linux-gnu, does this look OK for trunk? FWIW using OK, thanks. > variant<_PatternIter, _InnerIter> in the implementation means we need to > include from , which increases the preprocessed size > of by 3% (

Re: [COMMITTED] Convert nonzero mask in irange to wide_int.

2022-10-04 Thread Aldy Hernandez via Gcc-patches
On Tue, Oct 4, 2022, 13:28 Aldy Hernandez wrote: > On Tue, Oct 4, 2022 at 9:55 AM Richard Biener > wrote: > > > > > > Am 04.10.2022 um 09:36 schrieb Aldy Hernandez via Gcc-patches < > gcc-patches@gcc.gnu.org>: > > > > > > The reason the nonzero mask was kept in a tree was basically inertia, > >

Re: [Patch] Fortran: Add OpenMP's assume(s) directives

2022-10-04 Thread Tobias Burnus
Hi Jakub, On 04.10.22 12:19, Jakub Jelinek wrote: On Sun, Oct 02, 2022 at 07:47:18PM +0200, Tobias Burnus wrote: --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -2749,9 +2749,9 @@ have support for @option{-pthread}. @option{-fopenmp} implies @opindex fopenmp-simd @cindex OpenMP SIMD @c

Re: [PATCH] attribs: Add missing auto_diagnostic_group 3 times

2022-10-04 Thread David Malcolm via Gcc-patches
On Tue, 2022-10-04 at 11:11 +0200, Jakub Jelinek wrote: > Hi! > > In these spots, the error/error_at has some inform afterwards which > are > explanation part of the same diagnostics, so should be tied with > auto_diagnostic_group with it. > > Bootstrapped/regtested on x86_64-linux and i686-linux

Re: Adding a new thread model to GCC

2022-10-04 Thread LIU Hao via Gcc-patches
Attached are revised patches. These are exported from trunk. There is a change since my last message: * A new Makefile variable `SHLIB_MCFGTHREAD_LIBS` has been introduced, to keep the other thread models from being affected. After applying these patches, configure scripts in these subd

Re: [Patch] Fortran: Add OpenMP's assume(s) directives

2022-10-04 Thread Jakub Jelinek via Gcc-patches
On Tue, Oct 04, 2022 at 02:26:13PM +0200, Tobias Burnus wrote: > Hi Jakub, > > On 04.10.22 12:19, Jakub Jelinek wrote: > > On Sun, Oct 02, 2022 at 07:47:18PM +0200, Tobias Burnus wrote: > > > --- a/gcc/doc/invoke.texi > +++ b/gcc/doc/invoke.texi > @@ -2749,9 +2749,9 @@ have support for @option{

Re: Adding a new thread model to GCC

2022-10-04 Thread Xi Ruoyao via Gcc-patches
I don't really understand MinGW, but some "non-technical" things: On Tue, 2022-10-04 at 20:44 +0800, LIU Hao via Gcc-patches wrote: > After applying these patches, configure scripts in these > subdirectories need to be regenerated: > >    * gcc >    * libgcc >    * libatomic >    * libstdc++-v3

Re: [COMMITTED] Convert nonzero mask in irange to wide_int.

2022-10-04 Thread Andrew MacLeod via Gcc-patches
On 10/4/22 08:13, Aldy Hernandez via Gcc-patches wrote: On Tue, Oct 4, 2022, 13:28 Aldy Hernandez wrote: On Tue, Oct 4, 2022 at 9:55 AM Richard Biener wrote: Am 04.10.2022 um 09:36 schrieb Aldy Hernandez via Gcc-patches < gcc-patches@gcc.gnu.org>: The reason the nonzero mask was kept i

Re: Adding a new thread model to GCC

2022-10-04 Thread LIU Hao via Gcc-patches
在 2022-10-04 21:13, Xi Ruoyao 写道: In GCC development we usually include the configure regeneration in the patch because the scripts are also version controlled. There is a reason for not doing that: Generated contents can't be reviewed. In mingw-w64 we do the opposite: The person who commits

Re: [PATCH] libstdc++: Implement ranges::join_with_view from P2441R2

2022-10-04 Thread Patrick Palka via Gcc-patches
On Tue, 4 Oct 2022, Jonathan Wakely wrote: > On Tue, 4 Oct 2022 at 02:11, Patrick Palka via Libstdc++ > wrote: > > > > Tested on x86_64-pc-linux-gnu, does this look OK for trunk? FWIW using > > OK, thanks. Thanks a lot, patch committed. > > > variant<_PatternIter, _InnerIter> in the implemen

[committed] libstdc++: Enable std::hash> [PR107139]

2022-10-04 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux, and x86_64-linux with -ffreestanding. Pushed to trunk. -- >8 -- Everything that depends on is available for freestanding now. libstdc++-v3/ChangeLog: PR libstdc++/107139 * include/std/coroutine: Remove all _GLIBCXXHOSTED preprocessor conditiona

[committed] libstdc++: Make work freestanding [PR107134]

2022-10-04 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux, and x86_64-linux with -ffreestanding. Pushed to trunk. -- >8 -- When gcc/config.gcc defines use_gcc_stdin=wrap, GCC's tries to use libc's unless -ffreestanding is used. When libstdc++ is configured --disable-hosted-libstdcxx we want to work even without -ffreestandin

[committed] libstdc++: Disable test for freestanding

2022-10-04 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux with -ffreestanding. Pushed to trunk. -- >8 -- This test checks the exception-safety of std::stable_sort if copying a value throws. For freestanding we don't allocate in std::stable_sort anyway, and the exception thrown via __throw_runtime_error terminates, so disable the test

[committed] libstdc++: Define functions for freestanding [PR107135]

2022-10-04 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux, and x86_64-linux with -ffreestanding. Pushed to trunk. -- >8 -- We don't compile src/c++11/functexcept.cc for freestanding, so just define the functions used by freestanding entities as inline calls to std::terminate. libstdc++-v3/ChangeLog: PR libstdc++/107135

Re: [COMMITTED] Convert nonzero mask in irange to wide_int.

2022-10-04 Thread Aldy Hernandez via Gcc-patches
On Tue, Oct 4, 2022 at 3:27 PM Andrew MacLeod wrote: > > > On 10/4/22 08:13, Aldy Hernandez via Gcc-patches wrote: > > On Tue, Oct 4, 2022, 13:28 Aldy Hernandez wrote: > > > >> On Tue, Oct 4, 2022 at 9:55 AM Richard Biener > >> wrote: > >>> > >>> Am 04.10.2022 um 09:36 schrieb Aldy Hernandez via

Re: [COMMITTED] Convert nonzero mask in irange to wide_int.

2022-10-04 Thread Richard Biener via Gcc-patches
> Am 04.10.2022 um 16:30 schrieb Aldy Hernandez : > > On Tue, Oct 4, 2022 at 3:27 PM Andrew MacLeod wrote: >> >> >>> On 10/4/22 08:13, Aldy Hernandez via Gcc-patches wrote: On Tue, Oct 4, 2022, 13:28 Aldy Hernandez wrote: >>> On Tue, Oct 4, 2022 at 9:55 AM Richard Biener w

Re: [PATCH] libstdc++: Implement ranges::join_with_view from P2441R2

2022-10-04 Thread Jonathan Wakely via Gcc-patches
On Tue, 4 Oct 2022 at 15:09, Patrick Palka wrote: > > On Tue, 4 Oct 2022, Jonathan Wakely wrote: > > > On Tue, 4 Oct 2022 at 02:11, Patrick Palka via Libstdc++ > > wrote: > > > > > > Tested on x86_64-pc-linux-gnu, does this look OK for trunk? FWIW using > > > > OK, thanks. > > Thanks a lot, patch

[PATCH RESEND 1/1] p1689r5: initial support

2022-10-04 Thread Ben Boeckel
This patch implements support for [P1689R5][] to communicate to a build system the C++20 module dependencies to build systems so that they may build `.gcm` files in the proper order. Support is communicated through the following three new flags: - `-fdeps-format=` specifies the format for the out

[PATCH RESEND 0/1] RFC: P1689R5 support

2022-10-04 Thread Ben Boeckel
This patch adds initial support for ISO C++'s [P1689R5][], a format for describing C++ module requirements and provisions based on the source code. This is required because compiling C++ with modules is not embarrassingly parallel and need to be ordered to ensure that `import some_module;` can be s

Re: [COMMITTED] Convert nonzero mask in irange to wide_int.

2022-10-04 Thread Aldy Hernandez via Gcc-patches
On Tue, Oct 4, 2022 at 4:34 PM Richard Biener wrote: > > > > > Am 04.10.2022 um 16:30 schrieb Aldy Hernandez : > > > > On Tue, Oct 4, 2022 at 3:27 PM Andrew MacLeod wrote: > >> > >> > >>> On 10/4/22 08:13, Aldy Hernandez via Gcc-patches wrote: > On Tue, Oct 4, 2022, 13:28 Aldy Hernandez wr

[PATCH] Add --without-makeinfo

2022-10-04 Thread Tom de Vries via Gcc-patches
Hi, Currently, we cannot build gdb without makeinfo installed. It would be convenient to work around this by using the configure flag MAKEINFO=/usr/bin/true or some such, but that doesn't work because top-level configure requires a makeinfo of at least version 4.7, and that version check fails fo

[GCC13][Patch][V5][PATCH 1/2] Add a new option -fstrict-flex-arrays[=n] and new attribute strict_flex_array

2022-10-04 Thread Qing Zhao via Gcc-patches
Add the following new option -fstrict-flex-arrays[=n] and a corresponding attribute strict_flex_array to GCC: '-fstrict-flex-arrays' Control when to treat the trailing array of a structure as a flexible array member for the purpose of accessing the elements of such an array. The pos

[PATCH 0/2] [GCC13][Patch][V5][PATCH 0/2] Add a new option -fstrict-flex-arrays[=n] and attribute strict_flex_array(n) and use it in PR101836

2022-10-04 Thread Qing Zhao via Gcc-patches
This is the 5th version of the patch set. Compare to the 4th version, the following are the major change:(Address Martin's comments). 1. change the name of the attribute from "strict_flex_arrays" to "strict_flex_array"; 2. update document to update all mentions of flexible array member with

[GCC13][Patch][V5][PATCH 2/2] Use array_at_struct_end_p in __builtin_object_size [PR101836]

2022-10-04 Thread Qing Zhao via Gcc-patches
Use array_at_struct_end_p to determine whether the trailing array of a structure is flexible array member in __builtin_object_size. gcc/ChangeLog: PR tree-optimization/101836 * tree-object-size.cc (addr_object_size): Use array_at_struct_end_p to determine a flexible array

Re: [COMMITTED] Convert nonzero mask in irange to wide_int.

2022-10-04 Thread Andrew MacLeod via Gcc-patches
On 10/4/22 11:14, Aldy Hernandez wrote: On Tue, Oct 4, 2022 at 4:34 PM Richard Biener wrote: Am 04.10.2022 um 16:30 schrieb Aldy Hernandez : On Tue, Oct 4, 2022 at 3:27 PM Andrew MacLeod wrote: On 10/4/22 08:13, Aldy Hernandez via Gcc-patches wrote: On Tue, Oct 4, 2022, 13:28 Aldy H

Re: [PATCH] c++: install cp-trait.def as part of plugin headers [PR107136]

2022-10-04 Thread Jason Merrill via Gcc-patches
On 10/3/22 20:42, Patrick Palka wrote: This is apparently needed since we include cp-trait.def from cp-tree.h (in order to define the cp_trait_kind enum), as with operators.def. Tested on x86_64-pc-linux-gnu by doing make install and verifying cp-trait.def appears in $prefix/lib/gcc/x86_64-p

Re: [PATCH] middle-end, c++, i386, libgcc: std::bfloat16_t and __bf16 arithmetic support

2022-10-04 Thread Joseph Myers
On Tue, 4 Oct 2022, Jakub Jelinek via Gcc-patches wrote: > Yet another problem is because I've only enabled the bf16/BF16 suffixes in > C++ because for C it might clash with some later extension. Am I right to > fear about that, or do you think C will never standardize suffixes that > would clash

[PATCH] aarch64: Define __ARM_FEATURE_RCPC

2022-10-04 Thread Richard Sandiford via Gcc-patches
https://github.com/ARM-software/acle/pull/199 adds a new feature macro for RCPC, for use in things like inline assembly. This patch adds the associated support to GCC. Also, RCPC is required for Armv8.3-A and later, but the armv8.3-a entry didn't include it. This was probably harmless in practic

Re: [PATCH] aarch64: update Ampere-1 core definition

2022-10-04 Thread Richard Sandiford via Gcc-patches
Philipp Tomsich writes: > This brings the extensions detected by -mcpu=native on Ampere-1 systems > in sync with the defaults generated for -mcpu=ampere1. > > Note that some kernel versions may misreport the presence of PAUTH and > PREDRES (i.e., -mcpu=native will add 'nopauth' and 'nopredres'). >

[committed] libstdc++: Refactor seed sequence constraints in

2022-10-04 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux. Pushed to trunk. -- >8 -- Every use of _If_seed_seq in and uses it with enable_if. We can just move the enable_if into the helper alias instead of repeating it everywhere. libstdc++-v3/ChangeLog: * include/bits/random.h (__is_seed_seq): Replace with ...

[committed] libstdc++: Fix test FAIL for old std::string ABI

2022-10-04 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux. Pushed to trunk. -- >8 -- libstdc++-v3/ChangeLog: * testsuite/std/ranges/adaptors/join_with/1.cc: Remove unused #include -#include -#include +#include #include #include @@ -73,7 +72,10 @@ test03() return true; } -constexpr bool +#if _GL

[committed] libstdc++: Use new built-ins __remove_cv, __remove_reference etc.

2022-10-04 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux. Pushed to trunk. -- >8 -- libstdc++-v3/ChangeLog: * include/std/type_traits (remove_cv): Use __remove_cv built-in. (remove_reference): Use __remove_reference built-in. (remove_cvref): Use __remove_cvref built-in. Remove inheritance for fa

[RFC] libstdc++: Generate error_constants.h from [PR104883]

2022-10-04 Thread Jonathan Wakely via Gcc-patches
Does anybody see any issues with generating the list of error numbers at build time? -- >8 -- Instead of having several very similar target-specific headers with slightly different sets of enumerators, generate the error_constants.h file as part of the build. This ensures that all enumerators ar

Re: [PATCH] fixincludes: Deal also with the _Float128x cases [PR107059]

2022-10-04 Thread will schmidt via Gcc-patches
On Fri, 2022-09-30 at 09:20 +0200, Jakub Jelinek via Gcc-patches wrote: > On Wed, Sep 28, 2022 at 08:19:43PM +0200, Jakub Jelinek via Gcc- > patches wrote: > > Another case are the following 3 snippets: > > # if !__GNUC_PREREQ (7, 0) || defined __cplusplus > > # error "_Float128X supported but n

[PATCH] improved const shifts for AVR targets

2022-10-04 Thread Alexander Binzberger via Gcc-patches
Hi, recently I used some arduino uno for a project and realized some areas which do not output optimal asm code. Especially around shifts and function calls. With this as motivation and hacktoberfest I started patching things. Since patch files do not provide a good overview and I hope for a "hackt

[PATCH][AArch64] Improve immediate expansion [PR106583]

2022-10-04 Thread Wilco Dijkstra via Gcc-patches
Improve immediate expansion of immediates which can be created from a bitmask immediate and 2 MOVKs. This reduces the number of 4-instruction immediates in SPECINT/FP by 10-15%. Passes regress, OK for commit? gcc/ChangeLog: PR target/106583 * config/aarch64/aarch64.cc (aarch64_i

[PATCH] c++ modules: lazy loading from within template [PR99377]

2022-10-04 Thread Patrick Palka via Gcc-patches
Here when lazily loading the binding for f at parse time from the template g, processing_template_decl is set and thus the call to note_vague_linkage_fn from module_state::read_cluster has no effect, and we never push f onto deferred_fns and end up never emitting its definition. ISTM the behavior

Re: [GCC13][Patch][V5][PATCH 1/2] Add a new option -fstrict-flex-arrays[=n] and new attribute strict_flex_array

2022-10-04 Thread Joseph Myers
On Tue, 4 Oct 2022, Qing Zhao via Gcc-patches wrote: > + { "strict_flex_array", 1, 1, false, false, false, false, > + handle_strict_flex_array_attribute, NULL }, You're not requiring that the attribute be applied to a declaration here. > +static tree > +handle_str

[COMMITTED] Remove assert from set_nonzero_bits.

2022-10-04 Thread Aldy Hernandez via Gcc-patches
The assert removed by this patch was there to keep users from passing masks of incompatible types. The self tests are passing host wide ints down (set_nonzero_bits (-1)), which seem to be 32 bits, whereas some embedded targets have integer_type_node's of 16-bits. This is causing problems in m32c-

Re: [RFC] libstdc++: Generate error_constants.h from [PR104883]

2022-10-04 Thread Jonathan Wakely via Gcc-patches
On Tue, 4 Oct 2022 at 17:51, Jonathan Wakely via Libstdc++ wrote: > > Does anybody see any issues with generating the list of error numbers at > build time? > > > -- >8 -- > > Instead of having several very similar target-specific headers with > slightly different sets of enumerators, generate the

Re: [RFC] libstdc++: Generate error_constants.h from [PR104883]

2022-10-04 Thread Jonathan Wakely via Gcc-patches
On Tue, 4 Oct 2022 at 19:05, Jonathan Wakely wrote: > > On Tue, 4 Oct 2022 at 17:51, Jonathan Wakely via Libstdc++ > wrote: > > > > Does anybody see any issues with generating the list of error numbers at > > build time? > > > > > > -- >8 -- > > > > Instead of having several very similar target-sp

Re: [COMMITTED] Remove assert from set_nonzero_bits.

2022-10-04 Thread Jeff Law via Gcc-patches
On 10/4/22 11:52, Aldy Hernandez wrote: The assert removed by this patch was there to keep users from passing masks of incompatible types. The self tests are passing host wide ints down (set_nonzero_bits (-1)), which seem to be 32 bits, whereas some embedded targets have integer_type_node's of

Re: [PATCH RESEND 1/1] p1689r5: initial support

2022-10-04 Thread Harald Anlauf via Gcc-patches
Am 04.10.22 um 17:12 schrieb Ben Boeckel: This patch implements support for [P1689R5][] to communicate to a build system the C++20 module dependencies to build systems so that they may build `.gcm` files in the proper order. Is there a reason that you are touching so many frontends? diff --gi

[PATCH] Fortran: reject procedures and procedure pointers as output item [PR107074]

2022-10-04 Thread Harald Anlauf via Gcc-patches
Dear all, when looking at output item lists we didn't catch procedures and procedure pointers and ran into a gfc_internal_error(). Such items are not allowed by the Fortran standard, e.g. for procedure pointers there is C1233 (R1217) An expression that is an output-item shall not ha

Re: Adding a new thread model to GCC

2022-10-04 Thread Bernhard Reutner-Fischer via Gcc-patches
On 4 October 2022 10:06:00 CEST, LIU Hao wrote: >在 2022-10-03 13:03, Bernhard Reutner-Fischer 写道: >> >> No, sorry for my brevity. >> Using __gthread_t like in your patch is correct. >> > >I see. In 'libgfortran/io/async.c' there is > > ``` >async_unit *au = u->au; >LOCK (&au->lock); >

Re: [PATCH] c++, c, v2: Implement C++23 P1774R8 - Portable assumptions [PR106654]

2022-10-04 Thread Jason Merrill via Gcc-patches
On 10/3/22 15:22, Jakub Jelinek wrote: On Fri, Sep 30, 2022 at 04:39:25PM -0400, Jason Merrill wrote: * fold-const.h (simple_operand_p_2): Declare. This needs a better name if it's going to be a public interface. The usage also needs rationale for why this is the right predicate for a

[PATCH] Fortran: error recovery for invalid types in array constructors [PR107000]

2022-10-04 Thread Harald Anlauf via Gcc-patches
Dear all, we did not recover well from bad expressions in array constructors, especially when there was a typespec and a unary '+' or '-', and when the array constructor was used in an arithmetic expression. The attached patch introduces an ARITH_INVALID_TYPE that is used when we try to recover f

Re: [PATCH] fixincludes: Deal also with the _Float128x cases [PR107059]

2022-10-04 Thread Jason Merrill via Gcc-patches
On 9/30/22 03:20, Jakub Jelinek wrote: On Wed, Sep 28, 2022 at 08:19:43PM +0200, Jakub Jelinek via Gcc-patches wrote: Another case are the following 3 snippets: # if !__GNUC_PREREQ (7, 0) || defined __cplusplus # error "_Float128X supported but no constant suffix" # else # define __f128x(x

PING^1: [PATCH] x86: Check corrupted return address when unwinding stack

2022-10-04 Thread H.J. Lu via Gcc-patches
On Wed, Sep 21, 2022 at 1:42 PM H.J. Lu wrote: > > If shadow stack is enabled, when unwinding stack, we count how many stack > frames we pop to reach the landing pad and adjust shadow stack by the same > amount. When counting the stack frame, we compare the return address on > normal stack agains

Re: [PATCH] middle-end, c++, i386, libgcc: std::bfloat16_t and __bf16 arithmetic support

2022-10-04 Thread Jason Merrill via Gcc-patches
On 10/4/22 05:06, Jakub Jelinek wrote: On Fri, Sep 30, 2022 at 04:08:10PM +0200, Jakub Jelinek via Gcc-patches wrote: On Fri, Sep 30, 2022 at 09:49:08AM -0400, Jason Merrill wrote: The comment from Apple on the ABI mangling proposal suggests to me that we might want to delay enabling C++ std::b

Re: [PATCH] Set discriminators for call stmts on the same line within the same basic block

2022-10-04 Thread Jason Merrill via Gcc-patches
On 10/3/22 02:08, Eugene Rozenfeld wrote: This change is based on commit 1e6c4a7a8fb8e20545bb9f9032d3854f3f794c18 by Dehao Chen in vendors/google/heads/gcc-4_8. Tested on x86_64-pc-linux-gnu. Brief rationale for the change? gcc/ChangeLog: * tree-cfg.cc (assign_discriminators): Set d

[pushed] c++: fix debug info for array temporary [PR107154]

2022-10-04 Thread Jason Merrill via Gcc-patches
Tested x86_64-pc-linux-gnu, applying to trunk. -- >8 -- In the testcase the elaboration of the array init that happens at genericize time was getting the location info for the end of the function; fixed by doing the expansion at the location of the original expression. PR c++/107154 gcc

[PATCH v2] c-family: ICE with [[gnu::nocf_check]] [PR106937]

2022-10-04 Thread Marek Polacek via Gcc-patches
On Fri, Sep 30, 2022 at 09:12:24AM -0400, Jason Merrill wrote: > On 9/29/22 18:49, Marek Polacek wrote: > > When getting the name of an attribute, we ought to use > > get_attribute_name, which handles both [[ ]] and __attribute__(()) > > forms. Failure to do so may result in an ICE, like here. > >

[committed] analyzer: widening_svalues take a function_point rather than a program_point

2022-10-04 Thread David Malcolm via Gcc-patches
Enabling work towrads better call summarization. Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. Pushed to trunk as r13-3074-ge6fe02d8322093. gcc/analyzer/ChangeLog: * region-model-manager.cc (region_model_manager::get_or_create_widening_svalue): Use a funct

[committed] analyzer: fold -(-(VAL)) to VAL

2022-10-04 Thread David Malcolm via Gcc-patches
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. Pushed to trunk as r13-3075-g7f42f7adfa69fe. gcc/analyzer/ChangeLog: * region-model-manager.cc (region_model_manager::maybe_fold_unaryop): Fold -(-(VAL)) to VAL. Signed-off-by: David Malcolm --- gcc/analyzer/region-m

[committed] analyzer: revamp side-effects of call summaries [PR107072]

2022-10-04 Thread David Malcolm via Gcc-patches
With -fanalyzer-call-summaries the analyzer canl attempt to summarize the effects of some function calls at their call site, rather than simulate the call directly, which can avoid big slowdowns during analysis. Previously, this summarization was extremely simplistic: no attempt was made to update

[committed] analyzer: move region_model_manager decl to its own header

2022-10-04 Thread David Malcolm via Gcc-patches
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. Pushed to trunk as r13-3076-g0167154cdd02c9. gcc/analyzer/ChangeLog: * region-model.h: Include "analyzer/region-model-manager.h" (class region_model_manager): Move decl to... * region-model-manager.h: ...this ne

Re: Adding a new thread model to GCC

2022-10-04 Thread Xi Ruoyao via Gcc-patches
On Tue, 2022-10-04 at 21:45 +0800, LIU Hao wrote: > 在 2022-10-04 21:13, Xi Ruoyao 写道: > > > > In GCC development we usually include the configure regeneration in the > > patch because the scripts are also version controlled. > > > > There is a reason for not doing that: Generated contents can't

Re: [PATCH v3] RISC-V: remove deprecate pic code model macro

2022-10-04 Thread Kito Cheng via Gcc-patches
Committed, and added ChangeLog, remember to add that next time :) On Sat, Sep 24, 2022 at 2:08 AM Vineet Gupta wrote: > > On 9/2/22 14:05, Vineet Gupta wrote: > > Came across this deprecated symbol when looking around for > > -mexplicit-relocs handling in code > > > > Signed-off-by: Vineet Gupta

Re: [PATCH v3] RISC-V: remove deprecate pic code model macro

2022-10-04 Thread Vineet Gupta
On 10/4/22 19:24, Kito Cheng wrote: Committed, and added ChangeLog, remember to add that next time:) Oops sorry, I will. Thx, -Vineet

[PATCH] RISC-V: Default to tuning for the thead-c906

2022-10-04 Thread Palmer Dabbelt
The C906 is by far the most widely available RISC-V processor, so let's default to tuning for it. gcc/ChangeLog * config/riscv/riscv.h (RISCV_TUNE_STRING_DEFAULT): Change to thead-c906. * doc/invoke.texi (RISC-V -mtune): Change the default to thead-c906. --- This

Re: [PATCH] RISC-V: Default to tuning for the thead-c906

2022-10-04 Thread Andrew Pinski via Gcc-patches
On Tue, Oct 4, 2022 at 8:55 PM Palmer Dabbelt wrote: > > The C906 is by far the most widely available RISC-V processor, so let's > default to tuning for it. > > gcc/ChangeLog > > * config/riscv/riscv.h (RISCV_TUNE_STRING_DEFAULT): Change to > thead-c906. > * doc/invoke.texi