Re: [PATCH] tree-optimization/105276 - Retain existing range knowledge when prefilling statements.

2022-04-21 Thread Richard Biener via Gcc-patches
On Thu, Apr 21, 2022 at 5:59 PM Andrew MacLeod wrote: > > When range_of_stmt was adjusted to avoid large recursion depth, I added > code to precalculate the dependencies without recursion. > > This patch adjusted that pre-fill code to intersect the current known > range with the newly calculated o

Re: [PATCH] Add condition coverage profiling

2022-04-21 Thread Sebastian Huber
On 17/04/2022 13:27, Jørgen Kvalsvik wrote: In theory, would it be possible to print the state of the truth table with the information available in the gcda and gcno files? For example: Truth table for: a && (b || c)) && d 0 | 1 | 2 | 3 || covered --+---+---+---++ 0 | X | X | X || Y

[PATCH 3/3] rs6000/testsuite: xfail bswap-brw.c

2022-04-21 Thread Segher Boessenkool
This testcase does not generate anywhere near optimal code for 32-bit code. For p10 it actually now fails this testcase, after the previous patch. Let's xfail it. 2022-04-21 Segher Boessenkool gcc/testsuite/ PR target/103197 PR target/102146 * gcc.target/powerpc/bswap

[PATCH 2/3] rs6000: Disparage lfiwzx and similar

2022-04-21 Thread Segher Boessenkool
RA now chooses GEN_OR_VSX_REGS in most cases. This is great in most cases, but we often (or always?) use {l,st}{f,xs}iwzx now, which is problematic because the integer load and store insns can use cheaper addressing modes. We can fix that by putting a small penalty on the instruction alternatives

[PATCH 1/3] rs6000: Add effective target has_arch_ppc64

2022-04-21 Thread Segher Boessenkool
This is true if we have -mpowerpc64. 2022-04-21 Segher Boessenkool gcc/testsuite/ * lib/target-supports.exp (check_effective_target_has_arch_ppc64): New. --- gcc/testsuite/lib/target-supports.exp | 10 ++ 1 file changed, 10 insertions(+) diff --git a/gcc/testsuite/lib/target-

[PATCH 0/3] rs6000: Disparage lfiwzx and similar

2022-04-21 Thread Segher Boessenkool
This series adds "?" on the "Z" for lfiwzx and similar, so that we preferably choose some D-form storage insn, instead of the X-form insn. The D-form insns work on GPRs only, but it is still much preferred. Committing to trunk. Segher Segher Boessenkool (3): rs6000: Add effective target has_

[PATCH] fortran: Detect duplicate unlimited polymorphic types [PR103662]

2022-04-21 Thread Mikael Morin
Hello, this is a fix for PR103662, a TBAA issue with unlimited polymorphic types. I attached a draft patch to the PR which was accumulating all unlimited polymorphic symbols to a single namespace, avoiding duplicate symbols and thus eliminating the problem. After reviewing the code more in deta

[PATCH v3] c, c++: attribute format on a ctor with a vbase [PR101833, PR47634]

2022-04-21 Thread Marek Polacek via Gcc-patches
On Thu, Apr 14, 2022 at 11:55:10PM -0400, Jason Merrill wrote: > On 4/13/22 19:17, Marek Polacek wrote: > > -static tree > > -get_constant (const_tree fntype, const_tree atname, tree expr, int argno, > > + N.B. This function modifies EXPR. */ > > + > > +static bool > > +get_constant (const_tree

[committed] d: Merge upstream dmd eb7bee331, druntime 27834edb, phobos ac296f80c.

2022-04-21 Thread Iain Buclaw via Gcc-patches
Hi, This patch merges the D front-end with upstream dmd eb7bee331, and the standard library with druntime 27834edb and phobos ac296f80c. D front-end changes: - Import dmd v2.100.0-beta.1. - Print deprecation messages for scope violations unless `-frevert=dip1000' is used. - Fix

Re: [x86_64 PATCH] PR middle-end/105135: Catch more cmov idioms in combine.

2022-04-21 Thread Uros Bizjak via Gcc-patches
On Thu, Apr 21, 2022 at 6:41 PM Roger Sayle wrote: > > > Hi Uros, > > Many thanks for the review, feedback and suggestions. > Here's a revised patch incorporating all of the requested > changes. Bootstrapped and regression tested on > x86_64-pc-linux-gnu, both -m64 and -m32, with no > new failur

RE: [x86_64 PATCH] PR middle-end/105135: Catch more cmov idioms in combine.

2022-04-21 Thread Roger Sayle
Hi Uros, Many thanks for the review, feedback and suggestions. Here's a revised patch incorporating all of the requested changes. Bootstrapped and regression tested on x86_64-pc-linux-gnu, both -m64 and -m32, with no new failures. Ok for mainline? 2022-04-21 Roger Sayle Uroš B

Re: [PATCH] PR fortran/105310 - ICE when UNION is after the 8th field in a DEC STRUCTURE with -finit-derived -finit-local-zero

2022-04-21 Thread Fritz Reese via Gcc-patches
On Wed, Apr 20, 2022, 16:27 Harald Anlauf wrote: > > Hi Fritz, > > Am 20.04.22 um 20:03 schrieb Fritz Reese via Fortran: > > See the bug report at gcc dot gnu dot org/bugzilla/show_bug.cgi?id=105310 . > > OK if you add a/the testcase. .. > > As this affects all branches, you may backport the patch

[PATCH v2] cpp: new built-in __EXP_COUNTER__

2022-04-21 Thread Kaz Kylheku via Gcc-patches
libcpp/ChangeLog 2022-04-21 Kaz Kylheku This change introduces a pair of related macros __EXP_COUNTER__ and __UEXP_COUNTER__. These macros access integer values which enumerate macro expansions. They can be used for the purposes of obtaining, unique iden

[PATCH] tree-optimization/105276 - Retain existing range knowledge when prefilling statements.

2022-04-21 Thread Andrew MacLeod via Gcc-patches
When range_of_stmt was adjusted to avoid large recursion depth, I added code to precalculate the dependencies without recursion. This patch adjusted that pre-fill code to intersect the current known range with the newly calculated one before setting the global range.  this Is what range_of_stm

Re: [PATCH][PUSHED] Support --compress-debug-sections for ld.mold.

2022-04-21 Thread Bernhard Reutner-Fischer via Gcc-patches
On 21 April 2022 10:18:48 CEST, "Martin Liška" wrote: >Pushed to master. >- if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" >-ge 19 -o "$gcc_cv_gld_major_version" -gt 2 \ >+ if test $ld_is_mold = yes; then >+gcc_cv_ld_compress_debug=3 >+gcc_cv_ld_compress_debug

Re: [PATCH] Asan changes for RISC-V.

2022-04-21 Thread Palmer Dabbelt
On Wed, 20 Apr 2022 18:41:08 PDT (-0700), gcc-patches@gcc.gnu.org wrote: Hi Joshua: [from the other thread: Thanks, no idea how I missed all those 32-bit ports...] Does Asan work for RISC-V currently? It seems that '-fsanitize=address' is still unsupported for RISC-V. If I add '--enable-

Re: [PATCH] libstdc++: Avoid ASCII assumptions in floating_from_chars.cc

2022-04-21 Thread Jonathan Wakely via Gcc-patches
On Thu, 21 Apr 2022 at 15:38, Patrick Palka via Libstdc++ wrote: > > In starts_with_ci and in __floating_from_chars_hex's inf/nan handling, > we were assuming that the letters are contiguous and that 'A' + 32 == 'a' > which is true for ASCII but not for other character encodings. This > patch fix

[PATCH] libstdc++: Avoid ASCII assumptions in floating_from_chars.cc

2022-04-21 Thread Patrick Palka via Gcc-patches
In starts_with_ci and in __floating_from_chars_hex's inf/nan handling, we were assuming that the letters are contiguous and that 'A' + 32 == 'a' which is true for ASCII but not for other character encodings. This patch fixes starts_with_ci by using a constexpr lookup table that maps uppercase lett

Re: [PATCH v2] c++: wrong error with constexpr COMPOUND_EXPR [PR105321]

2022-04-21 Thread Marek Polacek via Gcc-patches
On Thu, Apr 21, 2022 at 04:22:03PM +0200, Jakub Jelinek wrote: > On Thu, Apr 21, 2022 at 09:20:48AM -0400, Marek Polacek via Gcc-patches wrote: > > --- a/gcc/cp/constexpr.cc > > +++ b/gcc/cp/constexpr.cc > > @@ -4566,19 +4566,18 @@ cxx_eval_bit_cast (const constexpr_ctx *ctx, tree > > t, bool *non

Re: [PATCH v2] c++: wrong error with constexpr COMPOUND_EXPR [PR105321]

2022-04-21 Thread Jason Merrill via Gcc-patches
Yes, also ok with that change. On Thu, Apr 21, 2022, 10:22 AM Jakub Jelinek wrote: > On Thu, Apr 21, 2022 at 09:20:48AM -0400, Marek Polacek via Gcc-patches > wrote: > > --- a/gcc/cp/constexpr.cc > > +++ b/gcc/cp/constexpr.cc > > @@ -4566,19 +4566,18 @@ cxx_eval_bit_cast (const constexpr_ctx *ct

Re: [PATCH v2] c++: wrong error with constexpr COMPOUND_EXPR [PR105321]

2022-04-21 Thread Jakub Jelinek via Gcc-patches
On Thu, Apr 21, 2022 at 09:20:48AM -0400, Marek Polacek via Gcc-patches wrote: > --- a/gcc/cp/constexpr.cc > +++ b/gcc/cp/constexpr.cc > @@ -4566,19 +4566,18 @@ cxx_eval_bit_cast (const constexpr_ctx *ctx, tree t, > bool *non_constant_p, > static tree > cxx_eval_logical_expression (const constex

Re: [PATCH v2] c++: wrong error with constexpr COMPOUND_EXPR [PR105321]

2022-04-21 Thread Jason Merrill via Gcc-patches
Ok. On Thu, Apr 21, 2022, 9:20 AM Marek Polacek wrote: > On Thu, Apr 21, 2022 at 08:56:23AM -0400, Jason Merrill wrote: > > On 4/20/22 18:40, Marek Polacek wrote: > > > Here we issue a bogus error for the first assert in the test. Therein > > > we have > > > > > > = (void) (VIEW_CONVERT_EXPR(y

[PATCH v2] c++: wrong error with constexpr COMPOUND_EXPR [PR105321]

2022-04-21 Thread Marek Polacek via Gcc-patches
On Thu, Apr 21, 2022 at 08:56:23AM -0400, Jason Merrill wrote: > On 4/20/22 18:40, Marek Polacek wrote: > > Here we issue a bogus error for the first assert in the test. Therein > > we have > > > > = (void) (VIEW_CONVERT_EXPR(yes) || handle_error ());, > > VIEW_CONVERT_EXPR(value); > > > > whi

Re: [PATCH] c++: wrong error with constexpr COMPOUND_EXPR [PR105321]

2022-04-21 Thread Jason Merrill via Gcc-patches
On 4/20/22 18:40, Marek Polacek wrote: Here we issue a bogus error for the first assert in the test. Therein we have = (void) (VIEW_CONVERT_EXPR(yes) || handle_error ());, VIEW_CONVERT_EXPR(value); which has a COMPOUND_EXPR, so we get to cxx_eval_constant_expression . The problem here is th

Re: [PATCH v2] c++: Fall through for arrays of T vs T cv [PR104996]

2022-04-21 Thread Jason Merrill via Gcc-patches
On 4/18/22 18:09, Ed Catmur wrote: If two arrays do not have the exact same element type including qualification, this could be e.g. f(int (&&)[]) vs. f(int const (&)[]), which can still be distinguished by the lvalue-rvalue tiebreaker. By tightening this branch (in accordance with the letter

[PATCH] cpp: new built-in __EXP_COUNTER__

2022-04-21 Thread Kaz Kylheku via Gcc-patches
libcpp/ChangeLog 2022-04-21 Kaz Kylheku This change introduces a pair of related macros __EXP_COUNTER__ and __UEXP_COUNTER__. These macros access integer values which enumerate macro expansions. They can be used for the purposes of obtaining, unique ide

Re: [PATCH][v3] rtl-optimization/105231 - distribute_notes and REG_EH_REGION

2022-04-21 Thread Richard Biener via Gcc-patches
On Thu, 21 Apr 2022, Richard Biener wrote: > On Thu, 21 Apr 2022, Richard Biener wrote: > > > On Wed, 20 Apr 2022, Segher Boessenkool wrote: > > > > > Hi! > > > > > > This looks great :-) > > > > > > On Wed, Apr 20, 2022 at 03:52:33PM +0200, Richard Biener wrote: > > > > The following mitigate

[committed] libstdc++: Remove bogus assertion in std::from_chars [PR105324]

2022-04-21 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux, pushed to trunk. Backport to gcc-11 to follow. -- >8 -- I'm not sure what I was thinking when I added this assertion, maybe it was supposed to be alignment == 1 (which is what the pmr::string actually uses). The simplest fix is to just remove the assertion. The assertion is

Re: [PATCH] libstdc++: Use LTLIBICONV when linking libstdc++.so [PR93602]

2022-04-21 Thread Jonathan Wakely via Gcc-patches
On Thu, 21 Apr 2022 at 11:14, Yubin Ruan wrote: > > Hi, > > Will this be in GCC12? Unless the patch gets reverted, yes. GCC 12 hasn't branched from trunk yet, so everything on trunk will be in GCC 12. > > -- > Yubin > > On Wed, Apr 20, 2022 at 8:58 PM Jonathan Wakely via Libstdc++ > wrote: > > >

Re: [PATCH] libstdc++: Use LTLIBICONV when linking libstdc++.so [PR93602]

2022-04-21 Thread Yubin Ruan via Gcc-patches
Hi, Will this be in GCC12? -- Yubin On Wed, Apr 20, 2022 at 8:58 PM Jonathan Wakely via Libstdc++ wrote: > > Pushed to trunk now. > > On Wed, 13 Apr 2022 at 15:24, Jonathan Wakely via Libstdc++ > wrote: > > > > Tested x86_64-linux, without libiconv installed, with libiconv installed, > > with

Re: [PATCH][v3] rtl-optimization/105231 - distribute_notes and REG_EH_REGION

2022-04-21 Thread Richard Biener via Gcc-patches
On Thu, 21 Apr 2022, Richard Biener wrote: > On Wed, 20 Apr 2022, Segher Boessenkool wrote: > > > Hi! > > > > This looks great :-) > > > > On Wed, Apr 20, 2022 at 03:52:33PM +0200, Richard Biener wrote: > > > The following mitigates a problem in combine distribute_notes which > > > places an or

Re: [x86 PATCH] Improved V1TI (and V2DI) mode equality/inequality.

2022-04-21 Thread Uros Bizjak via Gcc-patches
On Wed, Apr 20, 2022 at 8:28 PM Roger Sayle wrote: > > > Doh! ENOPATCH. > > > -Original Message- > > From: Roger Sayle > > Sent: 20 April 2022 18:50 > > To: 'gcc-patches@gcc.gnu.org' > > Subject: [x86 PATCH] Improved V1TI (and V2DI) mode equality/inequality. > > > > > > This patch (for w

GCC 11.3.1 Status Report (2022-04-21)

2022-04-21 Thread Richard Biener via Gcc-patches
Status == The gcc-11 branch is again open for regression and documentation fixes. Quality Data Priority # Change from last report --- --- P1 0 P2 428 + 6 P3 55 P4

Re: [PATCH] libstdc++: Work around modules ICE in [PR105297]

2022-04-21 Thread Jonathan Wakely via Gcc-patches
On Thu, 21 Apr 2022 at 04:38, Patrick Palka via Libstdc++ wrote: > > This makes the initializer for __table in __from_chars_alnum_to_val > dependent in an artificial way, which works around the modules testsuite > ICE reported in PR105297 by preventing the initializer from getting > evaluated at p

[PATCH] doc: use gibi binary prefix instead of gigi

2022-04-21 Thread Dieter Dobbelaere via Gcc-patches
Hi, I propose to use the official binary prefix "gibi", established by International Electrotechnical Commission (IEC) and several other standards and trade organizations. Weirdly enough, the term gigibyte is used in three places, whereas gibibyte is the only correct term. See also https://e

[PATCH][PUSHED] Support --compress-debug-sections for ld.mold.

2022-04-21 Thread Martin Liška
Pushed to master. Cheers, Martin gcc/ChangeLog: * configure.ac: Enable compressed debug sections for mold linker. * configure: Regenerate. --- gcc/configure| 10 -- gcc/configure.ac | 10 -- 2 files changed, 16 insertions(+), 4 deletions(-) diff --gi

Re: [PATCH][v3] rtl-optimization/105231 - distribute_notes and REG_EH_REGION

2022-04-21 Thread Richard Biener via Gcc-patches
On Wed, 20 Apr 2022, Segher Boessenkool wrote: > Hi! > > This looks great :-) > > On Wed, Apr 20, 2022 at 03:52:33PM +0200, Richard Biener wrote: > > The following mitigates a problem in combine distribute_notes which > > places an original REG_EH_REGION based on only may_trap_p which is > > goo

Re: [PATCH] fold, simplify-rtx: Punt on non-representable floating point constants [PR104522]

2022-04-21 Thread Richard Biener via Gcc-patches
On Wed, Apr 20, 2022 at 6:02 PM Qing Zhao wrote: > > > > > On Apr 20, 2022, at 5:38 AM, Richard Biener > > wrote: > > > > On Tue, Apr 19, 2022 at 11:36 PM Qing Zhao wrote: > >> > >> > >> > >>> On Apr 14, 2022, at 1:53 AM, Richard Biener > >>> wrote: > >>> > >>> On Wed, Apr 13, 2022 at 5:22 PM