Re: [PATCH RESEND 0/1] RFC: P1689R5 support

2022-10-19 Thread Martin Liška
On 10/18/22 14:22, Ben Boeckel wrote: > On Thu, Oct 13, 2022 at 13:08:46 -0400, David Malcolm wrote: >> On Mon, 2022-10-10 at 16:21 -0400, Jason Merrill wrote: >>> David Malcolm would probably know best about JSON wrangling. >> >> Unfortunately our JSON output doesn't make any guarantees about the

Re: Announcement: Porting the Docs to Sphinx - 9. November 2022

2022-10-19 Thread Martin Liška
On 10/17/22 16:16, Paul Iannetta wrote: > Hi Martin, > > Thank you very much for porting the documentation to Sphinx, it is > very convenient to use, especially the menu on the left and the > search bar. Thanks, I also like it! > > However, I also regularly browse and search the documentation t

Re: [PATCH 2/2] c++ modules: always stream TYPE_MIN/MAX_VALUE for enums [PR106848]

2022-10-19 Thread Richard Biener via Gcc-patches
On Tue, Oct 18, 2022 at 8:11 PM Patrick Palka via Gcc-patches wrote: > > We currently stream TYPE_MIN/MAX_VALUE of an enum only if the enum is > defined rather than just declared. But that seems inconsistent with > what start_enum does, which always sets TYPE_MIN/MAX_VALUE on the > ENUMERAL_TYPE

Re: [PATCH] c++ modules: verify_type failure with typedef enum [PR106848]

2022-10-19 Thread Richard Biener via Gcc-patches
On Tue, Oct 18, 2022 at 8:26 PM Patrick Palka wrote: > > On Fri, 14 Oct 2022, Richard Biener wrote: > > > On Thu, Oct 13, 2022 at 5:40 PM Patrick Palka via Gcc-patches > > wrote: > > > > > > Here during stream in we end up having created a type variant for the enum > > > before we read the enum's

Re: [PATCH] vect: Try folding first for shifted value generation [PR107240]

2022-10-19 Thread Richard Biener via Gcc-patches
On Wed, Oct 19, 2022 at 5:18 AM Kewen.Lin wrote: > > Hi, > > As PR107240 shows, when both the value to be shifted and the > count used for shifting are constants, it doesn't actually > requires a target to support vector shift operations. > > This patch is to try fold_build2 for the generation of

[PATCH] c++: Don't shortcut TREE_CONSTANT vector type CONSTRUCTORs in cxx_eval_constant_expression [PR107295]

2022-10-19 Thread Jakub Jelinek via Gcc-patches
Hi! The excess precision support broke building skia (dependency of firefox) on ia32 (it has something like the a constexpr variable), but as the other cases show, it is actually a preexisting problem if one uses casts from constants with wider floating point types. The problem is that cxx_eval_co

[PATCH] expr: Fix ICE on BFmode -> SFmode conversion of constant [PR107262]

2022-10-19 Thread Jakub Jelinek via Gcc-patches
Hi! I forgot to handle the case where lowpart_subreg returns a VOIDmode CONST_INT, in that case convert_mode_scalar obviously doesn't work. The following patch fixes that. Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? 2022-10-19 Jakub Jelinek PR middle-end/107

[PATCH] c++: Fix up mangling ICE with void{} [PR106863]

2022-10-19 Thread Jakub Jelinek via Gcc-patches
Hi! We ICE on the following testcase during mangling, finish_compound_literal returns for void{} void_node and the mangler doesn't handle it. Handling void_node in the mangler seems problematic to me, because we don't know for which case it has been created. The following patch arranges to mangle

[PATCH] match.pd: Add 2 TYPE_OVERFLOW_SANITIZED checks [PR106990]

2022-10-19 Thread Jakub Jelinek via Gcc-patches
Hi! As requested in the PR, this adds 2 TYPE_OVERFLOW_SANITIZED checks and corresponding testcase. Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? 2022-10-19 Jakub Jelinek PR tree-optimization/106990 * match.pd ((~X - ~Y) -> Y - X, -x & 1 -> x & 1): Guard

Re: Announcement: Porting the Docs to Sphinx - 9. November 2022

2022-10-19 Thread Paul Iannetta via Gcc-patches
On Wed, Oct 19, 2022 at 09:24:06AM +0200, Martin Liška wrote: > On 10/17/22 16:16, Paul Iannetta wrote: > > Hi Martin, > > > > Thank you very much for porting the documentation to Sphinx, it is > > very convenient to use, especially the menu on the left and the > > search bar. > > Thanks, I also

Re: [PATCH] match.pd: Add 2 TYPE_OVERFLOW_SANITIZED checks [PR106990]

2022-10-19 Thread Richard Biener via Gcc-patches
> Am 19.10.2022 um 10:02 schrieb Jakub Jelinek : > > Hi! > > As requested in the PR, this adds 2 TYPE_OVERFLOW_SANITIZED checks > and corresponding testcase. > > Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? Ok. Thanks, Richard > 2022-10-19 Jakub Jelinek > >

Re: [PATCH] expr: Fix ICE on BFmode -> SFmode conversion of constant [PR107262]

2022-10-19 Thread Richard Biener via Gcc-patches
> Am 19.10.2022 um 09:55 schrieb Jakub Jelinek via Gcc-patches > : > > Hi! > > I forgot to handle the case where lowpart_subreg returns a VOIDmode > CONST_INT, in that case convert_mode_scalar obviously doesn't work. > > The following patch fixes that. > > Bootstrapped/regtested on x86_64-

[PATCH] libstdc++-v3: Implement {,b}float16_t nextafter and some fixes [PR106652]

2022-10-19 Thread Jakub Jelinek via Gcc-patches
Hi! The following patch implements nextafter for std::{,b}float16_t, though right now only without constexpr support, and adds a testcase for it. The testcase unfortunately relevealed I've screwed up testing of my last patch. I've tested earlier version of the patch with --target_board=unix/-std=

[PATCH] libstdc++: Fix wide-character handling in std::filesystem::path [PR95048]

2022-10-19 Thread Ulf Lorenz via Gcc-patches
When using std::filesystem::path under Cygwin or Non-Windows with wide-character strings, there was an implicit conversion to/from ASCII, leading to errors when dealing with Unicode filenames. The attached patch fixes this behavior by using the correct transformations to the internal representatio

[PATCH] i386: Fix up __bf16 handling on ia32

2022-10-19 Thread Jakub Jelinek via Gcc-patches
Hi! Last night's testing of the libstdc++ changes revealed a problem in the __bf16 backend registration (while _Float16 seems ok). The problem is that for both BFmode and HFmode we require TARGET_SSE2, the generic code creates {,b}float16_type_node only if that is true at the start of the TU and t

Re: [PATCH] vect: Try folding first for shifted value generation [PR107240]

2022-10-19 Thread Kewen.Lin via Gcc-patches
Hi Richi, on 2022/10/19 15:43, Richard Biener wrote: > On Wed, Oct 19, 2022 at 5:18 AM Kewen.Lin wrote: >> >> Hi, >> >> As PR107240 shows, when both the value to be shifted and the >> count used for shifting are constants, it doesn't actually >> requires a target to support vector shift operation

[PATCH] tree-optimization/106781 - adjust cgraph lhs removal

2022-10-19 Thread Richard Biener via Gcc-patches
The following matches up the cgraph code removing LHS of a noreturn call with what fixup_noreturn_call does which gets along without inserting a definition, fixing the ICE resulting from having no place to actually insert that new def. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed.

Re: [PATCH] libstdc++-v3: Implement {, b}float16_t nextafter and some fixes [PR106652]

2022-10-19 Thread Jonathan Wakely via Gcc-patches
On Wed, 19 Oct 2022 at 09:23, Jakub Jelinek wrote: > > Hi! > > The following patch implements nextafter for std::{,b}float16_t, > though right now only without constexpr support, and adds a testcase for it. > The testcase unfortunately relevealed I've screwed up testing of my last > patch. I've te

Re: [PATCH] i386: Fix up __bf16 handling on ia32

2022-10-19 Thread Uros Bizjak via Gcc-patches
On Wed, Oct 19, 2022 at 10:50 AM Jakub Jelinek wrote: > > Hi! > > Last night's testing of the libstdc++ changes revealed a problem > in the __bf16 backend registration (while _Float16 seems ok). > The problem is that for both BFmode and HFmode we require TARGET_SSE2, > the generic code creates {,b

Re: Announcement: Porting the Docs to Sphinx - 9. November 2022

2022-10-19 Thread Martin Liška
On 10/19/22 10:13, Paul Iannetta wrote: > On Wed, Oct 19, 2022 at 09:24:06AM +0200, Martin Liška wrote: >> On 10/17/22 16:16, Paul Iannetta wrote: >>> Hi Martin, >>> >>> Thank you very much for porting the documentation to Sphinx, it is >>> very convenient to use, especially the menu on the left an

[PATCH] arm: Allow to override location of .gnu.sgstubs section

2022-10-19 Thread Torbjörn SVENSSON via Gcc-patches
Depending on the DejaGNU board definition, the .gnu.sgstubs section might be placed on different locations in order to suite the target. With this patch, the start location of the section is overrideable from the board definition with the fallback of the previously hardcoded location. gcc/testsuit

Re: [PATCH] arm: Allow to override location of .gnu.sgstubs section

2022-10-19 Thread Christophe Lyon via Gcc-patches
Hi Torbjörn, This looks like a nice improvement to me ;-) On 10/19/22 11:42, Torbjörn SVENSSON via Gcc-patches wrote: Depending on the DejaGNU board definition, the .gnu.sgstubs section might be placed on different locations in order to suite the target. typo: suite -> suit With this patch,

Re: [PATCH] arm: Allow to override location of .gnu.sgstubs section

2022-10-19 Thread Torbjorn SVENSSON via Gcc-patches
Hi Christophe, On 2022-10-19 11:52, Christophe Lyon wrote: Hi Torbjörn, This looks like a nice improvement to me ;-) On 10/19/22 11:42, Torbjörn SVENSSON via Gcc-patches wrote: Depending on the DejaGNU board definition, the .gnu.sgstubs section might be placed on different locations in order

Re: [PATCH 0/6] Add Intel Sierra Forest Instructions

2022-10-19 Thread Iain Sandoe via Gcc-patches
Hi Hongtao > On 17 Oct 2022, at 02:56, Hongtao Liu wrote: > > On Mon, Oct 17, 2022 at 9:30 AM Bernhard Reutner-Fischer > wrote: >> >> On 17 October 2022 03:02:22 CEST, Hongtao Liu via Gcc-patches >> >> Do you have this series as a branch somewhere that I can try on one of >> the

Re: Announcement: Porting the Docs to Sphinx - 9. November 2022

2022-10-19 Thread Martin Liška
On 10/18/22 00:26, Sandra Loosemore wrote: > On 10/17/22 07:28, Martin Liška wrote: >> Hello. >> >> Based on the very positive feedback I was given at the Cauldron Sphinx >> Documentation BoF, >> I'm planning migrating the documentation on 9th November. There are still >> some minor comments >> f

[Patch] Fortran: Fix non_negative_strides_array_p

2022-10-19 Thread Tobias Burnus
First, I am woefully aware that there several patches pending. I hope to do a couple of reviews later today or in the next days. Otherwise, I did run into another issue in existing code which was exposed by the delinearization patch on the OG12 branch, but could potentially lead to wrong code on

Re: [PATCH v3] xtensa: Prepare the transition from Reload to LRA

2022-10-19 Thread Max Filippov via Gcc-patches
On Wed, Oct 19, 2022 at 1:16 AM Takayuki 'January June' Suwa wrote: > This patch provides the first step in the transition from Reload to LRA > in Xtensa. > > gcc/ChangeLog: > > * config/xtensa/xtensa-proto.h > (xtensa_split1_finished_p, xtensa_split_DI_reg_imm): New prototypes. >

Re: [PATCH] pch: Fix streaming of strings with embedded null bytes

2022-10-19 Thread Richard Sandiford via Gcc-patches
Lewis Hyatt via Gcc-patches writes: > When a GTY'ed struct is streamed to PCH, any plain char* pointers it contains > (whether they live in GC-controlled memory or not) will be marked for PCH > output by the routine gt_pch_note_object in ggc-common.cc. This routine > special-cases plain char* stri

Re: [PATCH] pch: Fix streaming of strings with embedded null bytes

2022-10-19 Thread Jakub Jelinek via Gcc-patches
On Wed, Oct 19, 2022 at 12:54:11PM +0100, Richard Sandiford via Gcc-patches wrote: > Lewis Hyatt via Gcc-patches writes: > > When a GTY'ed struct is streamed to PCH, any plain char* pointers it > > contains > > (whether they live in GC-controlled memory or not) will be marked for PCH > > output

Re: [PATCH] pch: Fix streaming of strings with embedded null bytes

2022-10-19 Thread Richard Sandiford via Gcc-patches
Jakub Jelinek writes: > On Wed, Oct 19, 2022 at 12:54:11PM +0100, Richard Sandiford via Gcc-patches > wrote: >> Lewis Hyatt via Gcc-patches writes: >> > When a GTY'ed struct is streamed to PCH, any plain char* pointers it >> > contains >> > (whether they live in GC-controlled memory or not) wil

Re: [PATCH] pch: Fix streaming of strings with embedded null bytes

2022-10-19 Thread Jakub Jelinek via Gcc-patches
On Wed, Oct 19, 2022 at 01:17:02PM +0100, Richard Sandiford wrote: > Jakub Jelinek writes: > > On Wed, Oct 19, 2022 at 12:54:11PM +0100, Richard Sandiford via Gcc-patches > > wrote: > >> Lewis Hyatt via Gcc-patches writes: > >> > When a GTY'ed struct is streamed to PCH, any plain char* pointers

Re: Announcement: Porting the Docs to Sphinx - 9. November 2022

2022-10-19 Thread Martin Liška
On 10/19/22 13:09, Martin Liška wrote: > There ePUB would be likely better output format. What do you think? I've just included ePUB books: https://splichal.eu/scripts/sphinx/#epub Martin

Re: [PATCH] pch: Fix streaming of strings with embedded null bytes

2022-10-19 Thread Lewis Hyatt via Gcc-patches
On Wed, Oct 19, 2022 at 8:23 AM Jakub Jelinek wrote: > > On Wed, Oct 19, 2022 at 01:17:02PM +0100, Richard Sandiford wrote: > > Jakub Jelinek writes: > > > On Wed, Oct 19, 2022 at 12:54:11PM +0100, Richard Sandiford via > > > Gcc-patches wrote: > > >> Lewis Hyatt via Gcc-patches writes: > > >>

[PATCH] libstdc++-v3: Some std::*float*_t charconv and i/ostream overloads

2022-10-19 Thread Jakub Jelinek via Gcc-patches
Hi! The following patch adds the easy part of , and changes for extended floats. In particular, for the first one only overloads where the _Float* has the same format as float/double/long double and for the latter two everything but the _GLIBCXX_HAVE_FLOAT128_MATH case. For charconv, I'm not rea

[PATCH (pushed)] avr: remove useless @tie{} directives

2022-10-19 Thread Martin Liška
gcc/ChangeLog: * doc/extend.texi: Remove useless @tie{} directives. --- gcc/doc/extend.texi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi index cfbe32afce9..04af0584d82 100644 --- a/gcc/doc/extend.texi +++ b/gcc/doc/ext

Re: [PATCH] c++: Mitigate -Wuseless-cast with classes [PR85043]

2022-10-19 Thread Jason Merrill via Gcc-patches
On 10/18/22 13:38, Marek Polacek wrote: -Wuseless-cast (not part of -Wall/-Wextra) warns here: struct S { }; void g (S&&); void f (S&& arg) { g (S(arg)); // warning: useless cast to type 'struct S' } which is wrong: the code will not compile without the cast because "arg" is

Re: [PATCH] libgomp: fix hang on fatal error

2022-10-19 Thread Jakub Jelinek via Gcc-patches
On Fri, Oct 14, 2022 at 06:04:06PM +0100, Andrew Stubbs wrote: > This patch fixes a problem in which fatal errors inside mutex-locked regions > (i.e. basically anything in the plugin) will cause it to hang up trying to > take the lock to clean everything up. > > Using abort() instead of exit(1) by

[r13-3356 Regression] FAIL: libgomp.c++/loop-14.C (internal compiler error: verify_ssa failed) on Linux/x86_64

2022-10-19 Thread haochen.jiang via Gcc-patches
On Linux/x86_64, 92ef7822bfd4ea3393e0a1dd40b4abef9fce027f is the first bad commit commit 92ef7822bfd4ea3393e0a1dd40b4abef9fce027f Author: Richard Biener Date: Tue Oct 18 10:01:45 2022 +0200 tree-optimization/107302 - fix vec_perm placement for recurrence vect caused FAIL: libgomp.c++/loo

Re: Adding a new thread model to GCC

2022-10-19 Thread Jonathan Yong via Gcc-patches
On 10/14/22 09:39, Jonathan Yong wrote: On 10/11/22 13:22, LIU Hao wrote: 在 2022-10-10 23:56, LIU Hao 写道: 在 2022-10-04 20:44, LIU Hao 写道: Attached are revised patches. These are exported from trunk. Revised further. The patch for libgfortran has been committed to trunk today, so I include

Re: [PATCH] c++ modules: verify_type failure with typedef enum [PR106848]

2022-10-19 Thread Patrick Palka via Gcc-patches
On Wed, 19 Oct 2022, Richard Biener wrote: > On Tue, Oct 18, 2022 at 8:26 PM Patrick Palka wrote: > > > > On Fri, 14 Oct 2022, Richard Biener wrote: > > > > > On Thu, Oct 13, 2022 at 5:40 PM Patrick Palka via Gcc-patches > > > wrote: > > > > > > > > Here during stream in we end up having created

[COMMITTED] [PR tree-optimization/107312] Make range_true_and_false work with 1-bit signed types.

2022-10-19 Thread Aldy Hernandez via Gcc-patches
range_true_and_false() returns a range of [0,1], which for a 1-bit signed integer gets passed to the irange setter as [0, -1]. These endpoints are out of order and cause an ICE. Through some dumb luck, the legacy code swaps out of order endpoints, because old VRP would sometimes pass endpoints re

[committed] wwwdocs: codingconventions: Fix two typos

2022-10-19 Thread Gerald Pfeifer
I looked for some typos to test whether updating individual pages now works smoothly again after my mass update a few days ago ran into a problem on the server side and left the system in "twilight zone". Pushed. Gerald --- htdocs/codingconventions.html | 4 ++-- 1 file changed, 2 insertions(+

[OG12][committed] Fortran: Fix delinearization regression

2022-10-19 Thread Tobias Burnus
As mentioned in the patch submission for "Fortran: Fix non_negative_strides_array_p", there were some issues on OG12 which uses Sandra's delinearization patch (and was forward ported from OG11) This patch fixes one issue, caused by a GCC 12 change. At some point, we could think of using the deli

[PATCH v4] testsuite: Sanitize fails for SP FPU on Arm

2022-10-19 Thread Torbjörn SVENSSON via Gcc-patches
This patch stops reporting fails for Arm targets with single precision floating point unit for types wider than 32 bits (the width of float on arm-none-eabi). As reported in PR102017, fenv is reported as supported in recent versions of newlib. At the same time, for some Arm targets, the implementa

[PATCH] libstdc++: Fix typo in stride_view's operator- [PR107313]

2022-10-19 Thread Patrick Palka via Gcc-patches
PR libstdc++/107313 libstdc++-v3/ChangeLog: * include/std/ranges (stride_view::_Iterator::operator-): Fix typo. * testsuite/std/ranges/adaptors/stride/1.cc (test03): New test. --- libstdc++-v3/include/std/ranges | 2 +- .../testsuite/std/ranges/adaptors/str

Re: [committed] c: C2x enums wider than int [PR36113]

2022-10-19 Thread Joseph Myers
On Wed, 19 Oct 2022, Jakub Jelinek wrote: > > +/* Likewise, for overflow from long to long long. */ > > +#if __LONG_LONG_MAX__ > __LONG_MAX__ > > +enum e5 { e5a = __LONG_MAX__, > > + e5b, e5c, e5d = ((typeof (e5b)) -1) < 0, > > + e5e = (unsigned long) -1, > > + e5f, e5g = ((typeof (e5

[PATCH] testsuite: Default make check-g++ vs. tests for newest C++ standard

2022-10-19 Thread Jakub Jelinek via Gcc-patches
Hi! On Wed, Oct 19, 2022 at 09:10:48AM -0400, Jason Merrill wrote: > > The screw-up on my side with libstdc++ testing (tested normally rather > > than in C++23 mode) makes me wonder if we couldn't tweak the default > > testing. > > Dunno what libstdc++ testing normally does (just C++17?), make che

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

2022-10-19 Thread Wilco Dijkstra via Gcc-patches
ping Hi Richard, >>> Sounds good, but could you put it before the mode version, >>> to avoid the forward declaration? >> >> I can swap them around but the forward declaration is still required as >> aarch64_check_bitmask is 5000 lines before aarch64_bitmask_imm. > > OK, how about moving them bo

[OG12][committed] Fix omp-expand.cc's expand_omp_target for OpenACC

2022-10-19 Thread Tobias Burnus
Fallout of my Fortran deep-mapping patch, which I somehow missed – probably because being inundated by the OG11 OpenACC fails back then. Tobias - Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäf

Re: [PATCH] testsuite: Default make check-g++ vs. tests for newest C++ standard

2022-10-19 Thread Jason Merrill via Gcc-patches
On 10/19/22 11:27, Jakub Jelinek wrote: Hi! On Wed, Oct 19, 2022 at 09:10:48AM -0400, Jason Merrill wrote: The screw-up on my side with libstdc++ testing (tested normally rather than in C++23 mode) makes me wonder if we couldn't tweak the default testing. Dunno what libstdc++ testing normally d

Re: [Patch][v5] libgomp/nvptx: Prepare for reverse-offload callback handling

2022-10-19 Thread Alexander Monakov
On Wed, 12 Oct 2022, Tobias Burnus wrote: > On 11.10.22 13:12, Alexander Monakov wrote: > > My understanding is such trickery should not be necessary with > > the barrier-based approach, i.e. the sequence of PTX instructions > > > >st % plain store > >membar.sys > >st.volatile > > >

[COMMITTED] Use Value_Range when applying inferred ranges.

2022-10-19 Thread Andrew MacLeod via Gcc-patches
Apply a non-integral inferred range could trap because I was using an int_range_max as the temp.  doh.   Fortunately there are no inferred floating points at this point in time. Bootstrapped on x86_64-pc-linux-gnu with no regressions.  Pushed. Andrew commit 69a233610f6b27cd4283561569d8ce0f3504

Re: [PATCH] middle-end, v4: IFN_ASSUME support [PR106654]

2022-10-19 Thread Jakub Jelinek via Gcc-patches
Hi! On Tue, Oct 18, 2022 at 05:31:58PM -0400, Andrew MacLeod wrote: > Anyway, gives you something to experiement with.   If you would find a > different interface useful, let me know, or if there are limitations or > other expansions we might need.   This seems like something reasonable for > you

Re: [PATCH] libgomp: fix hang on fatal error

2022-10-19 Thread Jakub Jelinek via Gcc-patches
On Wed, Oct 19, 2022 at 03:27:52PM +0200, Jakub Jelinek via Gcc-patches wrote: > > --- a/libgomp/error.c > > +++ b/libgomp/error.c > > @@ -77,7 +77,7 @@ void > > gomp_vfatal (const char *fmt, va_list list) > > { > >gomp_verror (fmt, list); > > - exit (EXIT_FAILURE); > > + abort (); > > } >

[PATCH] testsuite: Fix up c2x-enum-1.c for 32-bit arches [PR107311]

2022-10-19 Thread Jakub Jelinek via Gcc-patches
Hi! On Wed, Oct 19, 2022 at 02:57:59PM +, Joseph Myers wrote: > I think the type checked for e5a should be conditional on __LONG_MAX__ > > __INT_MAX__; everything else there should be OK regardless. So like this? Tested on x86_64-linux with -m32 and -m64, ok for trunk? 2022-10-19 Jakub Jel

Re: [PATCH] testsuite: Fix up c2x-enum-1.c for 32-bit arches [PR107311]

2022-10-19 Thread Joseph Myers
On Wed, 19 Oct 2022, Jakub Jelinek wrote: > Hi! > > On Wed, Oct 19, 2022 at 02:57:59PM +, Joseph Myers wrote: > > I think the type checked for e5a should be conditional on __LONG_MAX__ > > > __INT_MAX__; everything else there should be OK regardless. > > So like this? > Tested on x86_64-lin

Re: Announcement: Porting the Docs to Sphinx - 9. November 2022

2022-10-19 Thread Sandra Loosemore
On 10/19/22 05:09, Martin Liška wrote: On 10/18/22 00:26, Sandra Loosemore wrote: On 10/17/22 07:28, Martin Liška wrote: Hello. Based on the very positive feedback I was given at the Cauldron Sphinx Documentation BoF, I'm planning migrating the documentation on 9th November. There are still s

[PATCH v2] c++: Mitigate -Wuseless-cast with classes [PR85043]

2022-10-19 Thread Marek Polacek via Gcc-patches
On Wed, Oct 19, 2022 at 09:27:27AM -0400, Jason Merrill wrote: > On 10/18/22 13:38, Marek Polacek wrote: > > -Wuseless-cast (not part of -Wall/-Wextra) warns here: > > > >struct S { }; > >void g (S&&); > >void f (S&& arg) > >{ > > g (S(arg)); // warning: useless cast to type '

Re: Announcement: Porting the Docs to Sphinx - 9. November 2022

2022-10-19 Thread Joseph Myers
On Wed, 19 Oct 2022, Martin Liška wrote: > > Currently, there is a tarball with texinfo sources for all the manuals > > for each version. > > Well, then equivalent would be packaging all .rst files together with the > corresponding > conf.py, logo.* and other files. But I don't see it much usefu

[PATCH] libstdc++: Implement P2474R2 changes to views::take/drop

2022-10-19 Thread Patrick Palka via Gcc-patches
Tested on x86_64-pc-linux-gnu, does this look OK for trunk? libstdc++-v3/ChangeLog: * include/std/ranges (views::__detail::__is_repeat_view): Define and later define a partial specialization. (views::__detail::__take_of_repeat_view): Declare and later define. (view

Re: [PATCH] libstdc++: Fix typo in stride_view's operator- [PR107313]

2022-10-19 Thread Jonathan Wakely via Gcc-patches
On Wed, 19 Oct 2022 at 15:33, Patrick Palka via Libstdc++ wrote: > > PR libstdc++/107313 OK > > libstdc++-v3/ChangeLog: > > * include/std/ranges (stride_view::_Iterator::operator-): Fix typo. > * testsuite/std/ranges/adaptors/stride/1.cc (test03): New test. > --- > libs

Re: [PATCH] middle-end, v4: IFN_ASSUME support [PR106654]

2022-10-19 Thread Andrew MacLeod via Gcc-patches
On 10/19/22 12:06, Jakub Jelinek wrote: Hi! On Tue, Oct 18, 2022 at 05:31:58PM -0400, Andrew MacLeod wrote: Anyway, gives you something to experiement with.   If you would find a different interface useful, let me know, or if there are limitations or other expansions we might need.   This seem

Re: [PATCH] middle-end, v4: IFN_ASSUME support [PR106654]

2022-10-19 Thread Andrew MacLeod via Gcc-patches
On 10/19/22 12:06, Jakub Jelinek wrote: I have expected (but tell me if that isn't possible) this could be something done in the new pass_assumptions::execute () rather than vrp and you'd create the assume_query there (i.e. just for assume_functions) and then query it solely for ssa_default_de

Re: [PATCH 1/2] Add a parameter for the builtin function of prefetch to align with LLVM

2022-10-19 Thread Andrew Pinski via Gcc-patches
On Fri, Oct 14, 2022 at 1:40 AM Haochen Jiang via Gcc-patches wrote: > > gcc/ChangeLog: > > * builtins.cc (expand_builtin_prefetch): Handle the fourth parameter > in > expand function. > * config/aarch64/aarch64-sve.md: Add default parameter value. > * config/aarch

Re: [PATCH] Enable shrink wrapping for the RISC-V target.

2022-10-19 Thread Jeff Law via Gcc-patches
On 10/18/22 11:35, Palmer Dabbelt wrote: I would have expected things to work fine with libcalls, perhaps with the exception of the save/restore libcalls.  So that needs deeper investigation. The save/restore libcalls only support saving/restoring a handful of register configurations (just

Re: [PATCH] middle-end, v4: IFN_ASSUME support [PR106654]

2022-10-19 Thread Jakub Jelinek via Gcc-patches
On Wed, Oct 19, 2022 at 12:55:12PM -0400, Andrew MacLeod via Gcc-patches wrote: > > Not sure I understand this part. op is whatever we pass as the ith > > argument to IFN_ASSUME. I'd expect that at this point one needs to > > remap that to the (i-1)th PARM_DECL of assume_id (so e.g. when you > >

Re: [PATCH] middle-end, v4: IFN_ASSUME support [PR106654]

2022-10-19 Thread Jakub Jelinek via Gcc-patches
On Wed, Oct 19, 2022 at 07:39:05PM +0200, Jakub Jelinek via Gcc-patches wrote: > On Wed, Oct 19, 2022 at 12:55:12PM -0400, Andrew MacLeod via Gcc-patches > wrote: > > > Not sure I understand this part. op is whatever we pass as the ith > > > argument to IFN_ASSUME. I'd expect that at this point

Re: [PATCH] middle-end, v4: IFN_ASSUME support [PR106654]

2022-10-19 Thread Andrew MacLeod via Gcc-patches
On 10/19/22 13:41, Jakub Jelinek wrote: On Wed, Oct 19, 2022 at 07:39:05PM +0200, Jakub Jelinek via Gcc-patches wrote: On Wed, Oct 19, 2022 at 12:55:12PM -0400, Andrew MacLeod via Gcc-patches wrote: Not sure I understand this part. op is whatever we pass as the ith argument to IFN_ASSUME. I'

Re: [PATCH] libstdc++: Implement P2474R2 changes to views::take/drop

2022-10-19 Thread Jonathan Wakely via Gcc-patches
On Wed, 19 Oct 2022, 17:47 Patrick Palka via Libstdc++, < libstd...@gcc.gnu.org> wrote: > Tested on x86_64-pc-linux-gnu, does this look OK for trunk? > OK > libstdc++-v3/ChangeLog: > > * include/std/ranges (views::__detail::__is_repeat_view): Define > and later define a partial

Re: [PATCH v2] c++: Mitigate -Wuseless-cast with classes [PR85043]

2022-10-19 Thread Jason Merrill via Gcc-patches
On 10/19/22 12:38, Marek Polacek wrote: On Wed, Oct 19, 2022 at 09:27:27AM -0400, Jason Merrill wrote: On 10/18/22 13:38, Marek Polacek wrote: -Wuseless-cast (not part of -Wall/-Wextra) warns here: struct S { }; void g (S&&); void f (S&& arg) { g (S(arg)); // warning: use

[r13-3360 Regression] FAIL: gcc.dg/c2x-enum-1.c (test for excess errors) on Linux/x86_64

2022-10-19 Thread haochen.jiang via Gcc-patches
On Linux/x86_64, 3b3083a598ca3f4b6203284e01ed39ab6ff0844f is the first bad commit commit 3b3083a598ca3f4b6203284e01ed39ab6ff0844f Author: Joseph Myers Date: Tue Oct 18 14:07:27 2022 + c: C2x enums wider than int [PR36113] caused FAIL: gcc.dg/c2x-enum-1.c (test for excess errors) wit

Re: [PATCH v3] c++: parser - Support for target address spaces in C++

2022-10-19 Thread Jason Merrill via Gcc-patches
On 10/18/22 13:01, Paul Iannetta wrote: Thank you very much for the detailed review. On Tue, Oct 18, 2022 at 10:24:23AM -0400, Jason Merrill wrote: On 10/18/22 03:37, Paul Iannetta wrote: On Fri, Oct 14, 2022 at 11:19:50AM -0400, Jason Merrill wrote: On 10/13/22 17:57, Paul Iannetta wrote: O

Re: [PATCH] introduce C++ API data base and generator for C++ hints

2022-10-19 Thread Jason Merrill via Gcc-patches
On 10/18/22 11:06, Ulrich Drepper wrote: I updated the patch based on the feedback from Jason and Martin.  It keeps the CSV file and the python script in the cp/ directory.  There also is still only one Python script. If there is agreement that either of those should change despite the argume

[PATCH] libstdc++: Enable _GLIBCXX_WEAK_DEFINITION on more platforms

2022-10-19 Thread Arsen Arsenović via Gcc-patches
This should permit redefining `operator new' where-ever that is possible, and should allow libsupc++ to be more broadly useful in freestanding. libstdc++-v3/ChangeLog: * acinclude.m4: Add link test for __attribute__ ((weak)). * config.h.in: Regenerate. * config/os/bsd/darw

Re: [PATCH v2] c++: Mitigate -Wuseless-cast with classes [PR85043]

2022-10-19 Thread Marek Polacek via Gcc-patches
On Wed, Oct 19, 2022 at 02:37:23PM -0400, Jason Merrill wrote: > On 10/19/22 12:38, Marek Polacek wrote: > > On Wed, Oct 19, 2022 at 09:27:27AM -0400, Jason Merrill wrote: > > > On 10/18/22 13:38, Marek Polacek wrote: > > > > -Wuseless-cast (not part of -Wall/-Wextra) warns here: > > > > > > > >

Re: Adding a new thread model to GCC

2022-10-19 Thread Bernhard Reutner-Fischer via Gcc-patches
On Wed, 19 Oct 2022 at 15:56, Jonathan Yong via Gcc-patches wrote: > Just pushed to master branch. Wouldn't you want to cut down on the libs respectively refine the order of the libs, though? You've now got: +#define MCFGTHREAD_SPEC " -lmcfgthread -lkernel32 -lntdll " +#else +#define MCFGTHREAD

[PATCH] Fortran: error recovery with references of bad array constructors [PR105633]

2022-10-19 Thread Harald Anlauf via Gcc-patches
Dear Fortranners, here's another patch that improves error receovery with references of bad array constructors leading to an ICE after a NULL pointer dereference. Original patch by Steve, which I amended with a logic cleanup. Regtested on x86_64-pc-linux-gnu. OK for mainline? Thanks, Harald F

Re: [PATCH 0/2] Add a Fourth parameter for prefetch and Support Intel PREFETCHI

2022-10-19 Thread Segher Boessenkool
On Fri, Oct 14, 2022 at 04:34:04PM +0800, Haochen Jiang wrote: > Sorry for the previous cover-letter stucking and disturbance and this > is the right cover letter. Hi! Nothing in this cover letter tells me why you sent it to me? Maybe you shouldn't have at all, just one patch touches Power code,

[committed] analyzer: fix ICE on __builtin_ms_va_copy [PR105765]

2022-10-19 Thread David Malcolm via Gcc-patches
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. Pushed to trunk as r13-3390-gebe87edadc4a3f. gcc/analyzer/ChangeLog: PR analyzer/105765 * varargs.cc (get_BT_VALIST_ARG): Rename to... (get_va_copy_arg): ...this, and update logic for determining level o

Re: [PATCH 1/2] Add a parameter for the builtin function of prefetch to align with LLVM

2022-10-19 Thread Segher Boessenkool
On Fri, Oct 14, 2022 at 04:34:05PM +0800, Haochen Jiang wrote: > * config/s390/s390.cc (s390_expand_cpymem): Generate fourth parameter > for (Many too long lines here, this is the first one. Changelog lines are max. 80 positions; a tab is eight). > + /* Argument 3 must be either zero or

Re: [PATCH 1/2] Add a parameter for the builtin function of prefetch to align with LLVM

2022-10-19 Thread Segher Boessenkool
On Wed, Oct 19, 2022 at 10:14:28AM -0700, Andrew Pinski wrote: > Do the testcases really need to be changed rather than adding new testcases? > Usually it is better if the testcases not change unless really needed > to be. That is do these testcases pass without being changed? If not > this seems n

[COMMITTED] Always check result from build_ in range-op-float.cc

2022-10-19 Thread Aldy Hernandez via Gcc-patches
A result of false from build_ in range-ops means the result is final and needs no further adjustments. This patch documents this, and changes all uses to check the result. There should be no change in functionality. gcc/ChangeLog: * range-op-float.cc (build_le): Document result.

[committed] c: C2x %wN, %wfN format checking

2022-10-19 Thread Joseph Myers
C2x adds printf and scanf wN and wfN length modifiers (wN for int_leastN_t / uint_leastN_t, also usable for intN_t and uintN_t which are now required to be the same type as the "least" versions when both are supported; wfN for int_fastN_t / uint_fastN_t). Add corresponding format checking support

[PATCH] bpf: add preserve_field_info builtin

2022-10-19 Thread David Faust via Gcc-patches
Add BPF __builtin_preserve_field_info. This builtin is used to extract information to facilitate struct and union relocations performed by the BPF loader, especially for bitfields. The builtin has the following signature: unsigned int __builtin_preserve_field_info (EXPR, unsigned int KIND); Wh

[PATCH] diagnostics: Allow FEs to keep customizations for middle end [PR101551, PR106274]

2022-10-19 Thread Lewis Hyatt via Gcc-patches
Currently, the ipa-free-lang-data pass resets most of the frontend's diagnostic customizations, such as the diagnostic_finalizer that prints macro expansion information, which is the subject of the two PRs. In most cases, however, there is no need to reset these customizations; they still work just

[PATCH] libstdc++: Refactor implementation of operator+ for std::string

2022-10-19 Thread Will Hawkins
Sorry for the delay. Tested on x86-64 Linux. -->8-- After consultation with Jonathan, it seemed like a good idea to create a single function that performed one-allocation string concatenation that could be used by various different version of operator+. This patch adds such a function and calls i

[COMMITTED] PR c++/106654 - Add assume support to VRP.

2022-10-19 Thread Andrew MacLeod via Gcc-patches
This patch adds basic support for ASSUME functions to VRP. Based on the previous set of patches, Ive cleaned them up, and this provides the basic support from rangers generalized model. It does not support non-ssa name parameters, I think you might be on your own for that. I modified Jakubs a

Re: [PATCH 0/6] Add Intel Sierra Forest Instructions

2022-10-19 Thread Hongtao Liu via Gcc-patches
On Wed, Oct 19, 2022 at 7:09 PM Iain Sandoe wrote: > > Hi Hongtao > > > On 17 Oct 2022, at 02:56, Hongtao Liu wrote: > > > > On Mon, Oct 17, 2022 at 9:30 AM Bernhard Reutner-Fischer > > wrote: > >> > >> On 17 October 2022 03:02:22 CEST, Hongtao Liu via Gcc-patches > >> > >> Do you have this

Re: Adding a new thread model to GCC

2022-10-19 Thread LIU Hao via Gcc-patches
在 2022/10/20 03:53, Bernhard Reutner-Fischer 写道: which has kernel32 twice, which might not be ideal for the speed of linking? I'm not familiar with the content of ntdll so cannot judge if you'd put that in MCFGTHREAD_SPEC and drop kernel32 there, though, and put the whole MCFG spec simply before

Re: [PATCH 1/2] Add a parameter for the builtin function of prefetch to align with LLVM

2022-10-19 Thread Hongtao Liu via Gcc-patches
On Thu, Oct 20, 2022 at 5:15 AM Segher Boessenkool wrote: > > On Wed, Oct 19, 2022 at 10:14:28AM -0700, Andrew Pinski wrote: > > Do the testcases really need to be changed rather than adding new testcases? > > Usually it is better if the testcases not change unless really needed > > to be. That is

Re: [PATCH 1/2] Add a parameter for the builtin function of prefetch to align with LLVM

2022-10-19 Thread Hongtao Liu via Gcc-patches
On Thu, Oct 20, 2022 at 5:08 AM Segher Boessenkool wrote: > > On Fri, Oct 14, 2022 at 04:34:05PM +0800, Haochen Jiang wrote: > > * config/s390/s390.cc (s390_expand_cpymem): Generate fourth parameter > > for > > (Many too long lines here, this is the first one. Changelog lines are > max. 80

RE: [PATCH 1/2] Add a parameter for the builtin function of prefetch to align with LLVM

2022-10-19 Thread Jiang, Haochen via Gcc-patches
> -Original Message- > From: Segher Boessenkool > Sent: Thursday, October 20, 2022 5:14 AM > To: Andrew Pinski > Cc: Jiang, Haochen ; gcc-patches@gcc.gnu.org; > aol...@gcc.gnu.org; richard.sandif...@arm.com; uweig...@de.ibm.com; > li...@gcc.gnu.org; g...@amylaar.uk; dje@gmail.com; > o

[PATCH v4] btf: Add support to BTF_KIND_ENUM64 type

2022-10-19 Thread Guillermo E. Martinez via Gcc-patches
Hello, The following is patch v4 to update BTF/CTF backend supporting BTF_KIND_ENUM64 type. Changes from v3: + Remove `ctf_enum_binfo' structure. + Remove -m{little,big}-endian from dg-options in testcase. Comments will be welcomed and appreciated!, Kind regards, guillermo -- BTF supports

Re: Announcement: Porting the Docs to Sphinx - 9. November 2022

2022-10-19 Thread Xi Ruoyao via Gcc-patches
On Mon, 2022-10-17 at 15:28 +0200, Martin Liška wrote: > Hello. > > Based on the very positive feedback I was given at the Cauldron Sphinx > Documentation BoF, > I'm planning migrating the documentation on 9th November. There are still > some minor comments > from Sandra when it comes to the PDF

Re: [PATCH 1/2] Add a parameter for the builtin function of prefetch to align with LLVM

2022-10-19 Thread Hongtao Liu via Gcc-patches
On Thu, Oct 20, 2022 at 9:39 AM Hongtao Liu wrote: > > On Thu, Oct 20, 2022 at 5:08 AM Segher Boessenkool > wrote: > > > > On Fri, Oct 14, 2022 at 04:34:05PM +0800, Haochen Jiang wrote: > > > * config/s390/s390.cc (s390_expand_cpymem): Generate fourth > > > parameter for > > > > (Many too

Re: [PATCH 2/2] Support Intel prefetchit0/t1

2022-10-19 Thread H.J. Lu via Gcc-patches
On Fri, Oct 14, 2022 at 1:38 AM Haochen Jiang via Gcc-patches wrote: > > gcc/ChangeLog: > > * common/config/i386/cpuinfo.h (get_available_features): > Detect PREFETCHI. > * common/config/i386/i386-common.cc > (OPTION_MASK_ISA2_PREFETCHI_SET, > OPTION_MASK_IS

Re: [PATCH 2/2] Support Intel prefetchit0/t1

2022-10-19 Thread Hongtao Liu via Gcc-patches
On Thu, Oct 20, 2022 at 11:46 AM H.J. Lu via Gcc-patches wrote: > > On Fri, Oct 14, 2022 at 1:38 AM Haochen Jiang via Gcc-patches > wrote: > > > > gcc/ChangeLog: > > > > * common/config/i386/cpuinfo.h (get_available_features): > > Detect PREFETCHI. > > * common/config/i386