Re: [PATCH] fortran: use fpu-glibc on powerpc*-unknown-freebsd

2022-04-14 Thread FX via Gcc-patches
Hi, > can you check the following patch? Why restrict it to powerpc-freebsd only, and not all freebsd? Do they differ? Otherwise it looks ok to me, but probably should be tested on a glibc non-x86 target. In any case, this will be for the new branch, when stage 1 reopens. FX

Re: GCC 11.2.1 Status Report (2022-04-13), branch frozen for release

2022-04-14 Thread Andreas Krebbel via Gcc-patches
On 4/13/22 09:30, Richard Biener via Gcc wrote: > > Status > == > > The gcc-11 branch is now frozen in preparation for a GCC 11.3 release > candidate and the GCC 11.3 release next week. All changes now require > release manager approval. Hi, I would like to push: https://gcc.gnu.org/piper

Re: [PATCH] i386: Disable stv under optimize_size [PR 105034]

2022-04-14 Thread Hongyu Wang via Gcc-patches
> > optimize_function_for_speed ()? > Yes, updated patch with optimize_function_for_speed_p() gcc/ChangeLog: PR target/105034 * config/i386/i386-features.cc (pass_stv::gate()): Add optimize_function_for_speed_p (). gcc/testsuite/ChangeLog: PR target/105034 * gcc.target/i386/pr105034.c: New t

Re: GCC 11.2.1 Status Report (2022-04-13), branch frozen for release

2022-04-14 Thread Richard Biener via Gcc-patches
On Thu, 14 Apr 2022, Andreas Krebbel wrote: > On 4/13/22 09:30, Richard Biener via Gcc wrote: > > > > Status > > == > > > > The gcc-11 branch is now frozen in preparation for a GCC 11.3 release > > candidate and the GCC 11.3 release next week. All changes now require > > release manager app

Re: [PATCH] i386: Disable stv under optimize_size [PR 105034]

2022-04-14 Thread Richard Biener via Gcc-patches
On Thu, Apr 14, 2022 at 9:55 AM Hongyu Wang wrote: > > > > > optimize_function_for_speed ()? > > > > Yes, updated patch with optimize_function_for_speed_p() > > gcc/ChangeLog: > > PR target/105034 > * config/i386/i386-features.cc (pass_stv::gate()): Add > optimize_function_for_speed_p (). > > gc

Re: [PATCH] i386: Disable stv under optimize_size [PR 105034]

2022-04-14 Thread Hongyu Wang via Gcc-patches
> >virtual bool gate (function *) > > please name the parameter ... > > > { > >return ((!timode_p || TARGET_64BIT) > > - && TARGET_STV && TARGET_SSE2 && optimize > 1); > > + && TARGET_STV && TARGET_SSE2 && optimize > 1 > > + && optimize_function_for_speed_p (cfun)

Re: [PATCH] i386: Disable stv under optimize_size [PR 105034]

2022-04-14 Thread Richard Biener via Gcc-patches
On Thu, Apr 14, 2022 at 10:31 AM Hongyu Wang wrote: > > > >virtual bool gate (function *) > > > > please name the parameter ... > > > > > { > > >return ((!timode_p || TARGET_64BIT) > > > - && TARGET_STV && TARGET_SSE2 && optimize > 1); > > > + && TARGET_STV && TARGET_S

Re: [PATCH] i386: Disable stv under optimize_size [PR 105034]

2022-04-14 Thread Hongyu Wang via Gcc-patches
> As a general comment it would be nicer if the cost metric itself would focus > on size costs when optimizing for size and speed costs when optimizing for > speed so that individual STV opportunities can be enabled/disabled based > on it. Agreed. I think the cost computation should consider insn

[PATCH] libstdc++: Update incorrect statement about mainline in docs

2022-04-14 Thread Jonathan Wakely via Gcc-patches
This fixes some misleading text in the libstdc++ manual that says the docs for the gcc-11 branch refer to mainline. Richi, is this OK for the gcc-11 branch now? It's been wrong for 11.1 and 11.2, but it would still be nice to fix. -- >8 -- libstdc++-v3/ChangeLog: * doc/xml/manual/status

Re: [PATCH] libstdc++: Update incorrect statement about mainline in docs

2022-04-14 Thread Richard Biener via Gcc-patches
On Thu, 14 Apr 2022, Jonathan Wakely wrote: > This fixes some misleading text in the libstdc++ manual that says the > docs for the gcc-11 branch refer to mainline. > > Richi, is this OK for the gcc-11 branch now? It's been wrong for 11.1 > and 11.2, but it would still be nice to fix. Yes, it's O

Re: [PATCH] libstdc++: Update incorrect statement about mainline in docs

2022-04-14 Thread Jonathan Wakely via Gcc-patches
On Thu, 14 Apr 2022 at 11:36, Richard Biener wrote: > > On Thu, 14 Apr 2022, Jonathan Wakely wrote: > > > This fixes some misleading text in the libstdc++ manual that says the > > docs for the gcc-11 branch refer to mainline. > > > > Richi, is this OK for the gcc-11 branch now? It's been wrong for

[committed] libstdc++: Add new headers to PCH

2022-04-14 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux, pushed to trunk. -- >8 -- libstdc++-v3/ChangeLog: * include/precompiled/stdc++.h: Include and for C++23. --- libstdc++-v3/include/precompiled/stdc++.h | 4 1 file changed, 4 insertions(+) diff --git a/libstdc++-v3/include/precompiled/stdc++.h b

[committed] libstdc++: Fix missing and incorrect feature test macros [PR105269]

2022-04-14 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux, pushed to trunk. -- >8 -- libstdc++-v3/ChangeLog: PR libstdc++/105269 * include/bits/stl_vector.h (__cpp_lib_constexpr_vector): Define. * include/c_compatibility/stdatomic.h (__cpp_lib_stdatomic_h): Define. * include/std/o

Re: [PATCH] libstdc++: Update incorrect statement about mainline in docs

2022-04-14 Thread Richard Biener via Gcc-patches
On Thu, 14 Apr 2022, Jonathan Wakely wrote: > On Thu, 14 Apr 2022 at 11:36, Richard Biener wrote: > > > > On Thu, 14 Apr 2022, Jonathan Wakely wrote: > > > > > This fixes some misleading text in the libstdc++ manual that says the > > > docs for the gcc-11 branch refer to mainline. > > > > > > Ric

Re: [PATCH] simplify-rtx: Don't assume shift count has the same mode as the shift [PR105247]

2022-04-14 Thread Eric Botcazou via Gcc-patches
> 2022-04-13 Jakub Jelinek > > PR target/105247 > * simplify-rtx.cc (simplify_const_binary_operation): For shifts > or rotates by VOIDmode constant integer shift count use word_mode > for the operand if int_mode is narrower than word. > > * gcc.c-torture/compile/p

[PATCH] libstdc++: Optimize integer std::from_chars

2022-04-14 Thread Patrick Palka via Gcc-patches
This applies the following optimizations to the integer std::from_chars implementation: 1. Use a lookup table for converting an alphanumeric digit to its base-36 value instead of using a range test (for 0-9) and switch (for a-z and A-Z). The table is constructed using a C++14 con

RE: [PATCH] libstdc++: Optimize integer std::from_chars

2022-04-14 Thread Kyrylo Tkachov via Gcc-patches
> -Original Message- > From: Gcc-patches bounces+kyrylo.tkachov=arm@gcc.gnu.org> On Behalf Of Patrick Palka > via Gcc-patches > Sent: Thursday, April 14, 2022 1:31 PM > To: gcc-patches@gcc.gnu.org > Cc: libstd...@gcc.gnu.org > Subject: [PATCH] libstdc++: Optimize integer std::from_c

Re: [PATCH] libstdc++: Optimize integer std::from_chars

2022-04-14 Thread Patrick Palka via Gcc-patches
On Thu, 14 Apr 2022, Patrick Palka wrote: > This applies the following optimizations to the integer std::from_chars > implementation: > > 1. Use a lookup table for converting an alphanumeric digit to its > base-36 value instead of using a range test (for 0-9) and switch > (for a-z and

Re: [PATCH] tree-optimization/104010 - fix SLP scalar costing with patterns

2022-04-14 Thread Richard Sandiford via Gcc-patches
Richard Biener writes: > When doing BB vectorization the scalar cost compute is derailed > by patterns, causing lanes to be considered live and thus not > costed on the scalar side. For the testcase in PR104010 this > prevents vectorization which was done by GCC 11. PR103941 > shows similar case

Re: [PATCH] tree-optimization/104010 - fix SLP scalar costing with patterns

2022-04-14 Thread Richard Biener via Gcc-patches
On Thu, 14 Apr 2022, Richard Sandiford wrote: > Richard Biener writes: > > When doing BB vectorization the scalar cost compute is derailed > > by patterns, causing lanes to be considered live and thus not > > costed on the scalar side. For the testcase in PR104010 this > > prevents vectorization

[committed] analyzer: fix ICE comparing VECTOR_CSTs [PR105252]

2022-04-14 Thread David Malcolm via Gcc-patches
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. Pushed to trunk as r12-8159-gb209a349268d24. gcc/analyzer/ChangeLog: PR analyzer/105252 * svalue.cc (cmp_cst): When comparing VECTOR_CSTs, compare the types of the encoded elements before calling cmp_cst on them

[PATCH] gimple-fold: fix further missing stmt locations [PR104308]

2022-04-14 Thread David Malcolm via Gcc-patches
PR analyzer/104308 initially reported about a -Wanalyzer-use-of-uninitialized-value diagnostic using UNKNOWN_LOCATION when complaining about certain memmove operations where the source is uninitialized. In r12-7856-g875342766d4298 I fixed the missing location for a stmt generated by gimple_fold_bu

[PATCH] rtl-optimization/105231 - distribute_notes and REG_EH_REGION

2022-04-14 Thread Richard Biener via Gcc-patches
The following mitigates a problem in combine distribute_notes which places an original REG_EH_REGION based on only may_trap_p which is good to test whether a non-call insn can possibly throw but not if actually it does or we care. That's something we decided at RTL expansion time where we possibly

Re: [PATCH] tree-optimization/104010 - fix SLP scalar costing with patterns

2022-04-14 Thread Richard Sandiford via Gcc-patches
Richard Biener writes: > On Thu, 14 Apr 2022, Richard Sandiford wrote: > >> Richard Biener writes: >> > When doing BB vectorization the scalar cost compute is derailed >> > by patterns, causing lanes to be considered live and thus not >> > costed on the scalar side. For the testcase in PR104010

Re: [PATCH] fortran: use fpu-glibc on powerpc*-unknown-freebsd

2022-04-14 Thread Piotr Kubaj via Gcc-patches
On 22-04-14 09:05:17, FX wrote: > Hi, > > > can you check the following patch? > > Why restrict it to powerpc-freebsd only, and not all freebsd? Do they differ? amd64 and i386 on all systems use a different setting and are not affected. For FreeBSD-supported architectures that are not amd64, i386

Re: [wwwdocs] Add Ada's changelog entry

2022-04-14 Thread Jonathan Wakely via Gcc-patches
On 05/04/22 06:05 +, Arnaud Charlet wrote: Thank you for the feedback. Should I remove it and resuply the patch or can you/GCC maintainers do the modification before merging? Can you please resubmit it? I'll let others comment on the need to sign a contributor agreement, my understanding i

Re: [PATCH v1] libstdc++: Default to mutex-based atomics on RISC-V

2022-04-14 Thread Jonathan Wakely via Gcc-patches
On 07/04/22 11:46 -0700, Palmer Dabbelt wrote: The RISC-V port requires libatomic to be linked in order to resolve various atomic functions, which results in builds that have "--with-libstdcxx-lock-policy=auto" defaulting to mutex-based locks. Changing this to direct atomics breaks the ABI, this

Re: [PATCH] libstdc++: Optimize integer std::from_chars

2022-04-14 Thread Jonathan Wakely via Gcc-patches
On Thu, 14 Apr 2022 at 13:32, Patrick Palka via Libstdc++ wrote: > > This applies the following optimizations to the integer std::from_chars > implementation: > > 1. Use a lookup table for converting an alphanumeric digit to its > base-36 value instead of using a range test (for 0-9) and sw

Re: [PATCH v1] libstdc++: Default to mutex-based atomics on RISC-V

2022-04-14 Thread Palmer Dabbelt
On Thu, 14 Apr 2022 08:08:17 PDT (-0700), jwak...@redhat.com wrote: On 07/04/22 11:46 -0700, Palmer Dabbelt wrote: The RISC-V port requires libatomic to be linked in order to resolve various atomic functions, which results in builds that have "--with-libstdcxx-lock-policy=auto" defaulting to mut

[PATCH] libstdc++: Avoid double-deref of __first in ranges::minmax [PR104858]

2022-04-14 Thread Patrick Palka via Gcc-patches
Tested on x86_64-pc-linux-gnu, does this look OK for trunk and 11/10 once the branch is unfrozen? PR libstdc++/104858 libstdc++-v3/ChangeLog: * include/bits/ranges_algo.h (__minmax_fn): Avoid dereferencing __first twice at the start. * testsuite/25_algorithms/minm

Re: [PATCH v1] libstdc++: Default to mutex-based atomics on RISC-V

2022-04-14 Thread Jonathan Wakely via Gcc-patches
On Thu, 14 Apr 2022 at 16:18, Palmer Dabbelt wrote: > > On Thu, 14 Apr 2022 08:08:17 PDT (-0700), jwak...@redhat.com wrote: > > On 07/04/22 11:46 -0700, Palmer Dabbelt wrote: > >>The RISC-V port requires libatomic to be linked in order to resolve > >>various atomic functions, which results in build

Re: [PATCH v1] libstdc++: Default to mutex-based atomics on RISC-V

2022-04-14 Thread Palmer Dabbelt
On Thu, 14 Apr 2022 08:22:05 PDT (-0700), jwak...@redhat.com wrote: On Thu, 14 Apr 2022 at 16:18, Palmer Dabbelt wrote: On Thu, 14 Apr 2022 08:08:17 PDT (-0700), jwak...@redhat.com wrote: > On 07/04/22 11:46 -0700, Palmer Dabbelt wrote: >>The RISC-V port requires libatomic to be linked in order

Re: [PATCH] libstdc++: Avoid double-deref of __first in ranges::minmax [PR104858]

2022-04-14 Thread Jonathan Wakely via Gcc-patches
On Thu, 14 Apr 2022 at 16:21, Patrick Palka via Libstdc++ wrote: > > Tested on x86_64-pc-linux-gnu, does this look OK for trunk and 11/10 > once the branch is unfrozen? > > PR libstdc++/104858 > > libstdc++-v3/ChangeLog: > > * include/bits/ranges_algo.h (__minmax_fn): Avoid derefer

[PATCH] ppc: testsuite: pr79004 needs -mlong-double-128 (was: Re: ppc: testsuite: prune float128 partial support warnings)

2022-04-14 Thread Alexandre Oliva via Gcc-patches
On Apr 13, 2022, Alexandre Oliva wrote: > * gcc.target/powerpc/pr79004.c: Prune the -mfloat128 warning. I failed to mention that this fixed a problem in the test, but that was not enough for this test to pass; here's an incremental patch that is. Some of the asm opcodes expected by pr790

Re: [PATCH] libstdc++: Add pretty printer for std::span

2022-04-14 Thread Jonathan Wakely via Gcc-patches
On Mon, 4 Apr 2022 at 11:54, Philipp Fent via Libstdc++ wrote: > > This improves the debug output for C++20 spans. > Before: > {static extent = 18446744073709551615, _M_ptr = 0x7fffb9a8, > _M_extent = {_M_extent_value = 2}} > Now with StdSpanPrinter: > std::span of length 2 = {1, 2}

Re: enable __ieee128 for p9vector tests

2022-04-14 Thread Segher Boessenkool
Hi! On Sat, Apr 17, 2021 at 06:19:02AM -0300, Alexandre Oliva wrote: > On Apr 12, 2021, Segher Boessenkool wrote: > > On Fri, Apr 02, 2021 at 01:52:59PM -0300, Alexandre Oliva wrote: > >> Several compile tests that use the __ieee128 type do not ensure it is > >> defined. This patch adds -mfloat1

[Patch] OpenMP, libgomp, gimple: omp_get_max_teams, omp_set_num_teams, and omp_{gs}et_teams_thread_limit on offload devices

2022-04-14 Thread Marcel Vollweiler
Hi, This patch adds support for omp_get_max_teams, omp_set_num_teams, and omp_{gs}et_teams_thread_limit on offload devices. The patch builds on the following patches which are submitted, but not yet approved/committed: - [PATCH] OpenMP, libgomp: Environment variable syntax extension. https://gcc

Re: enable __ieee128 for p9vector tests

2022-04-14 Thread Segher Boessenkool
On Wed, Apr 13, 2022 at 08:37:40PM -0300, Alexandre Oliva wrote: > On Apr 17, 2021, Alexandre Oliva wrote: > > On Apr 12, 2021, Segher Boessenkool wrote: > My supposition was wrong. It turned out to be just because in > vxworks.h, for TARGET_VXWORKS7, there's: > > #define TARGET_FLOAT128_ENABLE

Re: [PATCH] libstdc++: Update incorrect statement about mainline in docs

2022-04-14 Thread Jonathan Wakely via Gcc-patches
On Thu, 14 Apr 2022 at 11:55, Richard Biener wrote: > > On Thu, 14 Apr 2022, Jonathan Wakely wrote: > > > On Thu, 14 Apr 2022 at 11:36, Richard Biener wrote: > > > > > > On Thu, 14 Apr 2022, Jonathan Wakely wrote: > > > > > > > This fixes some misleading text in the libstdc++ manual that says the

Re: ppc: testsuite: bfp: enable float128 for __ieee128

2022-04-14 Thread Segher Boessenkool
On Wed, Apr 13, 2022 at 08:58:18PM -0300, Alexandre Oliva wrote: > > Multiple bfp tests expect -mcpu=power[89] to enable the __ieee128 > type, but on targets that #define TARGET_FLOAT128_ENABLE_TYPE 0, that > is not the case. Since they are compile-time tests and effective > target support for po

[committed] libstdc++: Fix incorrect IS number in doc comment

2022-04-14 Thread Jonathan Wakely via Gcc-patches
libstdc++-v3/ChangeLog: * doc/xml/manual/intro.xml: Fix comment. --- libstdc++-v3/doc/xml/manual/intro.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libstdc++-v3/doc/xml/manual/intro.xml b/libstdc++-v3/doc/xml/manual/intro.xml index 86ed6964b6a..548b632b6e4 1006

Re: [PATCH v1] libstdc++: Default to mutex-based atomics on RISC-V

2022-04-14 Thread Jonathan Wakely via Gcc-patches
On Thu, 14 Apr 2022 at 16:24, Palmer Dabbelt wrote: > > On Thu, 14 Apr 2022 08:22:05 PDT (-0700), jwak...@redhat.com wrote: > > On Thu, 14 Apr 2022 at 16:18, Palmer Dabbelt wrote: > >> > >> On Thu, 14 Apr 2022 08:08:17 PDT (-0700), jwak...@redhat.com wrote: > >> > On 07/04/22 11:46 -0700, Palmer D

Re: enable __ieee128 for p9vector tests

2022-04-14 Thread Alexandre Oliva via Gcc-patches
On Apr 14, 2022, Segher Boessenkool wrote: > Hi! > On Sat, Apr 17, 2021 at 06:19:02AM -0300, Alexandre Oliva wrote: >> On Apr 12, 2021, Segher Boessenkool wrote: >> > On Fri, Apr 02, 2021 at 01:52:59PM -0300, Alexandre Oliva wrote: >> >> Several compile tests that use the __ieee128 type do not e

Re: enable __ieee128 for p9vector tests

2022-04-14 Thread Segher Boessenkool
On Thu, Apr 14, 2022 at 01:56:39PM -0300, Alexandre Oliva wrote: > On Apr 14, 2022, Segher Boessenkool wrote: > > On Sat, Apr 17, 2021 at 06:19:02AM -0300, Alexandre Oliva wrote: > >> On Apr 12, 2021, Segher Boessenkool wrote: > >> > On Fri, Apr 02, 2021 at 01:52:59PM -0300, Alexandre Oliva wrote

[PATCH] libstdc++: Optimize std::has_single_bit

2022-04-14 Thread Patrick Palka via Gcc-patches
This reimplements std::has_single_bit using the well-known bit-twiddilng trick[1], which is much faster than popcount on x86_64. Note that when __x is signed and maximally negative then this implementation invokes UB due to signed overflow, whereas the previous implementation would return true. T

Re: enable __ieee128 for p9vector tests

2022-04-14 Thread Alexandre Oliva via Gcc-patches
On Apr 14, 2022, Segher Boessenkool wrote: > Lol, the dates line up very well, I didn't realise it was from 2021 :-) Heh, indeed. Same testsuite results cleanup season, too ;-) >> The relevant fact, described in yesterday's message, is that -mfloat128 >> is not enabled by default, even with -m

[pushed] c++: lambda and the current instantiation [PR82980]

2022-04-14 Thread Jason Merrill via Gcc-patches
When a captured variable is type-dependent, we've expressed the type of the capture field and proxy with a decltype variant. But if the type is "the current instantiation", we need to be able to see that so that we can do lookup inside it just like we could with the captured variable itself. I al

Re: [PATCH] libstdc++: Optimize std::has_single_bit

2022-04-14 Thread Jonathan Wakely via Gcc-patches
On Thu, 14 Apr 2022 at 19:17, Patrick Palka via Libstdc++ wrote: > > This reimplements std::has_single_bit using the well-known bit-twiddilng > trick[1], which is much faster than popcount on x86_64. Is that always true for all microarchitectures? We have https://gcc.gnu.org/PR97759 on this topic

[pushed] libgccjit: Fix a bootstrap break for some targets.

2022-04-14 Thread Iain Sandoe via Gcc-patches
Some targets use 'long long unsigned int' for unsigned HW int, and this leads to a Werror=format= fail for two print cases in jit-playback.cc introduced in r12-8117-g30f7c83e9cfe (Add support for bitcasts [PR104071]) As discussed on IRC, casting to (long) seems entirely reasonable for the values (

Re: [PATCH] libstdc++: Optimize std::has_single_bit

2022-04-14 Thread Patrick Palka via Gcc-patches
On Thu, Apr 14, 2022 at 2:59 PM Jonathan Wakely wrote: > > On Thu, 14 Apr 2022 at 19:17, Patrick Palka via Libstdc++ > wrote: > > > > This reimplements std::has_single_bit using the well-known bit-twiddilng > > trick[1], which is much faster than popcount on x86_64. > > Is that always true for al

[PATCH] libstdc++: Stop defining _GLIBCXX_ASSERTIONS in floating_to_chars.cc

2022-04-14 Thread Patrick Palka via Gcc-patches
Assertions were originally enabled in the compiled-in floating-point std::to_chars implementation to help shake out any bugs, but they apparently impose a significant performance penalty, in particular for the hex formatting which is around 25% slower with assertions enabled. This seems too high of

[PATCH] c++: wrong error with variadic concept [PR105268]

2022-04-14 Thread Marek Polacek via Gcc-patches
Here we issue a wrong error for the template>> void g(); line in the testcase. I surmise that's because we mistakenly parse C_many as a placeholder-type-specifier, and things go wrong from there. We are in a default argument so we should reject parsing C_many as a placeholder-type-specifier,

[PATCH] PR105169 Fix references to discarded sections

2022-04-14 Thread Giuliano Belinassi via Gcc-patches
When -fpatchable-function-entry= is enabled, certain C++ codes fails to link because of generated references to discarded sections in __patchable_function_entry section. This commit fixes this problem by puting those references in a COMDAT section. Boostrapped and regtested on x86_64 linux. OK fo

[pushed] c++: constexpr trivial -fno-elide-ctors [PR104646]

2022-04-14 Thread Jason Merrill via Gcc-patches
The constexpr constructor checking code got confused by the expansion of a trivial copy constructor; we don't need to do that checking for defaulted ctors, anyway. Tested x86_64-pc-linux-gnu, applying to trunk. PR c++/104646 gcc/cp/ChangeLog: * constexpr.cc (maybe_save_constexpr

Re: [PATCH v4] libgo: Don't use pt_regs member in mcontext_t

2022-04-14 Thread Ian Lance Taylor via Gcc-patches
On Mon, Apr 11, 2022 at 11:28 AM Sören Tempel wrote: > > Ian Lance Taylor wrote: > > What I was hoping from my earlier question was that you could tell me > > the exact lines to write in the current sources that will compile on > > MUSL. Don't include , don't refer to earlier patches as > > that

[PATCH] ppc: testsuite: p9-vec-length: add -mno-strict-align and -misel (was: Re: enable __ieee128 for p9vector tests)

2022-04-14 Thread Alexandre Oliva via Gcc-patches
On Apr 14, 2022, Segher Boessenkool wrote: > Yes, that is a problem. None of our testcases are set up for compilers > with weird defaults (and this is not specific to rs6000). > I do not want to change many thousands of test cases to not use defaults > anymore, to specify everything everywhere

[committed] analyzer: fix escaping of pointer arithmetic [PR105264]

2022-04-14 Thread David Malcolm via Gcc-patches
PR analyzer/105264 reports that the analyzer can fail to treat (PTR + IDX) and PTR[IDX] as referring to the same memory under some situations. There are various ways in which this can happen when IDX is a symbolic value, due to having several ways in which such memory regions can be referred to sy

[pushed] c++: using in diagnostics [PR102987]

2022-04-14 Thread Jason Merrill via Gcc-patches
The expression pretty-printing code crashed on a location wrapper with no type, and didn't know what to do with a USING_DECL. Tested x86_64-pc-linux-gnu, applying to trunk. PR c++/102987 gcc/cp/ChangeLog: * error.cc (dump_expr): Handle USING_DECL. [VIEW_CONVERT_EXPR]: Ju

[pushed] c++: unsigned int32_t enum promotion [PR102804]

2022-04-14 Thread Jason Merrill via Gcc-patches
There's been an extension for a long time to allow applying 'unsigned' to an int typedef, but that was confusing the integer promotion code. Fixed by forgetting about the typedef in that case. I'm going to make this an unconditional pedwarn in stage 1. Tested x86_64-pc-linux-gnu, applying to tru

Re: [PATCH] c++: wrong error with variadic concept [PR105268]

2022-04-14 Thread Jason Merrill via Gcc-patches
On 4/14/22 16:24, Marek Polacek wrote: Here we issue a wrong error for the template>> void g(); line in the testcase. I surmise that's because we mistakenly parse C_many as a placeholder-type-specifier, and things go wrong from there. We are in a default argument so we should reject parsin

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

2022-04-14 Thread Jason Merrill via Gcc-patches
On 4/13/22 19:17, Marek Polacek wrote: On Tue, Apr 12, 2022 at 04:01:14PM -0400, Jason Merrill wrote: On 4/12/22 14:38, Marek Polacek wrote: On Mon, Apr 11, 2022 at 04:39:22PM -0400, Jason Merrill wrote: On 4/8/22 15:21, Marek Polacek wrote: On Wed, Apr 06, 2022 at 04:55:54PM -0400, Jason Mer

[PATCH] i386: Correct target attribute for crc32 intrinsics

2022-04-14 Thread Hongyu Wang via Gcc-patches
Hi, Complile _mm_crc32_u8/16/32/64 intrinsics with -mcrc32 would meet target specific option mismatch. Correct target pragma to fix. Bootstrapped/regtest on x86_64-pc-linux-gnu{-m32,}. Ok for master and backport to GCC 11? gcc/ChangeLog: * config/i386/smmintrin.h: Correct target pragma