Re: [PATCH] adjust "partly out of bounds" warning (PR 98503)

2021-02-11 Thread Richard Biener via Gcc-patches
On Wed, Feb 10, 2021 at 7:03 PM Martin Sebor wrote: > > On 2/10/21 3:39 AM, Richard Biener wrote: > > On Tue, Feb 9, 2021 at 4:37 PM Martin Sebor wrote: > >> > >> On 2/9/21 12:41 AM, Richard Biener wrote: > >>> On Tue, Feb 9, 2021 at 1:04 AM Martin Sebor via Gcc-patches > >>> wrote: > > >>>

[PATCH] c++: Fix zero initialization of flexible array members [PR99033]

2021-02-11 Thread Jakub Jelinek via Gcc-patches
Hi! array_type_nelts returns error_mark_node for type of flexible array members and build_zero_init_1 was placing an error_mark_node into the CONSTRUCTOR, on which e.g. varasm ICEs. I think there is nothing erroneous on zero initialization of flexible array members though, such arrays should simp

Re: [RFC] test builtin ratio for loop distribution

2021-02-11 Thread Alexandre Oliva
On Feb 4, 2021, Jim Wilson wrote: > FYI we have a bug report for this for a coremark regression which sounds > like the same problem. > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94092 Indeed, thanks! -- Alexandre Oliva, happy hacker https://FSFLA.org/blogs/lxo/ Free Software Activ

Re: [RFC] test builtin ratio for loop distribution

2021-02-11 Thread Alexandre Oliva
On Feb 4, 2021, Alexandre Oliva wrote: > On Feb 4, 2021, Richard Biener wrote: >>> > b) if expansion would use BY_PIECES then expand to an unrolled loop >>> >>> Why would that be better than keeping the constant-length memset call, >>> that would be turned into an unrolled loop during expand

[PATCH] tree-optimization/38474 - fix store-merging compile-time regression

2021-02-11 Thread Richard Biener
The following puts a limit on the number of alias tests we do in terminate_all_aliasing_chains which is quadratic in the number of overall stores currentrly tracked. There is already a limit in place on the maximum number of stores in a single chain so the following adds a limit on the number of c

Re: [PATCH] tree-optimization/38474 - fix store-merging compile-time regression

2021-02-11 Thread Jakub Jelinek via Gcc-patches
On Thu, Feb 11, 2021 at 11:55:30AM +0100, Richard Biener wrote: > 2021-02-11 Richard Biener > > PR tree-optimization/38474 > * params.opt (-param=max-store-chains-to-track=): New param. > (-param=max-stores-to-track=): Likewise. > * doc/invoke.texi (max-store-chains-to-t

Re: [PATCH] reduce sparseset memory requirement

2021-02-11 Thread Richard Biener via Gcc-patches
On Tue, Feb 9, 2021 at 12:38 PM Richard Biener wrote: > > Currently we use HOST_WIDEST_FAST_INT for the sparseset element > type which maps to a 64bit type on 64bit hosts. That's excessive > for the only current sparseset users which are LRA and IRA and > which store register numbers in it which

Re: [RFC] test builtin ratio for loop distribution

2021-02-11 Thread Alexandre Oliva
On Feb 11, 2021, Alexandre Oliva wrote: > How does this look? > for gcc/ChangeLog > PR tree-optimization/94092 > * builtins.c (try_store_by_multiple_pieces): New. > (expand_builtin_memset_args): Use it. If target_char_cast > fails, proceed as for non-constant val. Pa

Re: [aarch64][vect] Support V8QI->V8HI WIDEN_ patterns

2021-02-11 Thread Joel Hutton via Gcc-patches
Hi Richard, I've revised the patch, sorry about sloppy formatting in the previous one. Full bootstrap/regression tests are still running, but the changes are pretty trivial. Ok for trunk assuming tests finish clean? >Joel Hutton writes: >> @@ -277,6 +277,81 @@ optab_for_tree_code (enum tree_c

Re: [aarch64][vect] Support V8QI->V8HI WIDEN_ patterns

2021-02-11 Thread Richard Sandiford via Gcc-patches
One more formatting nit, sorry: Joel Hutton writes: > +bool > +supportable_half_widening_operation (enum tree_code code, > +tree vectype_out, tree vectype_in, > +enum tree_code *code1) The arguments need reindenting for the new function nam

[Paatch, fortran] PR99060 - [9/10/11 Regression] ICE in gfc_match_varspec, at fortran/primary.c:2411

2021-02-11 Thread Paul Richard Thomas via Gcc-patches
Thanks to Steve for an 'obvious' patch for this one. It is fixed on all three branches. Paul

Re: [PATCH v3] arm: Low overhead loop handle long range branches [PR98931]

2021-02-11 Thread Richard Earnshaw (lists) via Gcc-patches
On 10/02/2021 17:44, Andrea Corallo via Gcc-patches wrote: > Andrea Corallo via Gcc-patches writes: > >> "Richard Earnshaw (lists)" writes: >> >>> On 09/02/2021 16:27, Andrea Corallo via Gcc-patches wrote: Jakub Jelinek writes: > On Tue, Feb 09, 2021 at 03:09:43PM +0100, Jakub Jel

[PATCH] df: Record all definitions in DF_LR_BB_INFO->def [PR98863]

2021-02-11 Thread Richard Sandiford via Gcc-patches
df_lr_bb_local_compute has: FOR_EACH_INSN_INFO_DEF (def, insn_info) /* If the def is to only part of the reg, it does not kill the other defs that reach here. */ if (!(DF_REF_FLAGS (def) & (DF_REF_PARTIAL | DF_REF_CONDITIONAL))) However, as noted in the comment i

Re: [PATCH] Fix version namespace build

2021-02-11 Thread Jonathan Wakely via Gcc-patches
On 09/02/21 22:05 +0100, François Dumont via Libstdc++ wrote:     libstdc++: Fix versioned namespace build     libstdc++-v3/ChangeLog:     * libsupc++/eh_ptr.cc (exception_ptr(__safe_bool)): Define if     _GLIBCXX_EH_PTR_COMPAT is defined.     (exception_ptr::_M_safe_boo

Re: [PATCH v3] arm: Low overhead loop handle long range branches [PR98931]

2021-02-11 Thread Andrea Corallo via Gcc-patches
"Richard Earnshaw (lists)" writes: [...] > + [(set (attr "length") > +(if_then_else > +(lt (minus (pc) (match_dup 0)) (const_int 1024)) > + (const_int 4) > + (const_int 6))) > + (set_attr "type" "branch")]) > > Shouldn't that be using "ltu" rather than "lt"

Re: [PATCH] c++: ICE with unexpanded pack in do-while [PR99063]

2021-02-11 Thread Jason Merrill via Gcc-patches
On 2/10/21 11:47 PM, Marek Polacek wrote: Here an unexpanded parameter pack snuck into prep_operand which doesn't expect to see an operand without a type, and since r247842 NONTYPE_ARGUMENT_PACK doesn't have a type anymore. This only happens with the do-while loop whose condition may not contain

Re: [PATCH] c++: Fix zero initialization of flexible array members [PR99033]

2021-02-11 Thread Jason Merrill via Gcc-patches
On 2/11/21 3:50 AM, Jakub Jelinek wrote: Hi! array_type_nelts returns error_mark_node for type of flexible array members and build_zero_init_1 was placing an error_mark_node into the CONSTRUCTOR, on which e.g. varasm ICEs. I think there is nothing erroneous on zero initialization of flexible ar

Re: [PATCH 4/4] c++: dependent constraint on placeholder 'auto' [PR96443]

2021-02-11 Thread Jason Merrill via Gcc-patches
On 2/8/21 2:03 PM, Patrick Palka wrote: This fixes the way we check satisfaction of constraints on placeholder types in various contexts, and in particular when the constraint is dependent. Firstly, when evaluating the return type requirement of a compound requirement, we currently substitute th

Re: [PATCH] c++: Endless loop with targ deduction in member tmpl [PR95888]

2021-02-11 Thread Jason Merrill via Gcc-patches
On 2/9/21 5:41 PM, Marek Polacek wrote: My r10-7007 patch tweaked tsubst not to reduce the template level of template parameters when tf_partial. That caused infinite looping in is_specialization_of: we ended up with a class template specialization whose TREE_TYPE (CLASSTYPE_TI_TEMPLATE (t)) ==

[PATCH] c++: Fix endless errors on invalid requirement seq [PR97742]

2021-02-11 Thread Jakub Jelinek via Gcc-patches
Hi! As the testcase shows, if we reach CPP_EOF during parsing of requirement sequence, we end up with endless loop where we always report invalid requirement expression, don't consume any token (as we are at eof) and repeat. This patch stops the loop when we reach CPP_EOF. Ok for trunk if it pas

Re: [PATCH] c++: Fix endless errors on invalid requirement seq [PR97742]

2021-02-11 Thread Marek Polacek via Gcc-patches
On Thu, Feb 11, 2021 at 05:30:24PM +0100, Jakub Jelinek via Gcc-patches wrote: > Hi! > > As the testcase shows, if we reach CPP_EOF during parsing of requirement > sequence, we end up with endless loop where we always report invalid > requirement expression, don't consume any token (as we are at e

[PATCH] Fix producer string memory leaks

2021-02-11 Thread Martin Liška
Hello. This fixes 2 memory leaks I noticed. Patch can bootstrap on x86_64-linux-gnu and survives regression tests. Ready to be installed? Thanks, Martin gcc/ChangeLog: * opts-common.c (decode_cmdline_option): Release werror_arg. * opts.c (gen_producer_string): Release output o

Re: [PATCH] c++: Fix endless errors on invalid requirement seq [PR97742]

2021-02-11 Thread Jason Merrill via Gcc-patches
On 2/11/21 11:35 AM, Marek Polacek wrote: On Thu, Feb 11, 2021 at 05:30:24PM +0100, Jakub Jelinek via Gcc-patches wrote: Hi! As the testcase shows, if we reach CPP_EOF during parsing of requirement sequence, we end up with endless loop where we always report invalid requirement expression, don'

[committed] libstdc++: Document when C++11/14/17 support became stable [PR 99058]

2021-02-11 Thread Jonathan Wakely via Gcc-patches
libstdc++-v3/ChangeLog: PR libstdc++/99058 * doc/xml/manual/status_cxx2011.xml: Document when support became stable. * doc/xml/manual/status_cxx2014.xml: Likewise. * doc/xml/manual/status_cxx2017.xml: Likewise. * doc/html/manual/status.html: Regenera

Re: [PATCH] Fix version namespace build

2021-02-11 Thread Jonathan Wakely via Gcc-patches
On 11/02/21 15:23 +, Jonathan Wakely wrote: On 09/02/21 22:05 +0100, François Dumont via Libstdc++ wrote:     libstdc++: Fix versioned namespace build     libstdc++-v3/ChangeLog:     * libsupc++/eh_ptr.cc (exception_ptr(__safe_bool)): Define if     _GLIBCXX_EH_PTR_COMPAT is

[PATCH][AArch64] Leveraging the use of STP instruction for vec_duplicate

2021-02-11 Thread Victor Do Nascimento via Gcc-patches
Dear GCC community, The backend pattern for storing a pair of identical values in 32 and 64-bit modes with the machine instruction STP was missing, and multiple instructions were needed to reproduce this behavior as a result of failed RTL pattern match in combine pass. For the test case : ty

[Patch] Fortran: Fix rank of assumed-rank array [PR99043]

2021-02-11 Thread Tobias Burnus
In the Fortran standard, I think it is best explained in the description of the RANK intrinsic: "Example. If X is an assumed-rank dummy argument and its associated effective argument is an array of rank, RANK(X) has the value 3." That's already well tested in assumed_rank_16.f90; however, as the

Fwd: Re: [PATCH] plug memory leaks in warn_parm_array_mismatch (PR 99055)

2021-02-11 Thread Martin Sebor via Gcc-patches
On 2/11/21 12:59 AM, Richard Biener wrote: On Wed, Feb 10, 2021 at 6:16 PM Martin Sebor wrote: The attached patch replaces calls to print_generic_expr_to_str() with a helper function that returns a std::string and releases the caller from the responsibility to explicitly free memory. I don't

[PATCH] libgomp/i386: Move syscall asms to static inline wrapper.

2021-02-11 Thread Uros Bizjak via Gcc-patches
Move syscall asms to static inline wrapper functions to improve #ifdeffery. Also correct output type to int and timeout type to void *. No functional changes. Bootstrapped and regression tested on x86_64-linux-gnu {,-m32}. OK for mainline? 2021-02-11 Uroš Bizjak libgomp/ * config/linux/

Re: [PATCH] libgomp/i386: Move syscall asms to static inline wrapper.

2021-02-11 Thread Jakub Jelinek via Gcc-patches
On Thu, Feb 11, 2021 at 07:44:53PM +0100, Uros Bizjak wrote: > 2021-02-11 Uroš Bizjak > > libgomp/ > * config/linux/x86/futex.h (__futex_wait): New static inline > wrapper function. Correct output type to int and > timeout type to void *. > (__futex_wake): New static inline wra

Re: [PATCH v2] c++: Endless loop with targ deduction in member tmpl [PR95888]

2021-02-11 Thread Marek Polacek via Gcc-patches
On Thu, Feb 11, 2021 at 11:30:07AM -0500, Jason Merrill via Gcc-patches wrote: > On 2/9/21 5:41 PM, Marek Polacek wrote: > > My r10-7007 patch tweaked tsubst not to reduce the template level of > > template parameters when tf_partial. That caused infinite looping in > > is_specialization_of: we en

Re: [PATCH v2] c++: Endless loop with targ deduction in member tmpl [PR95888]

2021-02-11 Thread Marek Polacek via Gcc-patches
On Thu, Feb 11, 2021 at 02:24:22PM -0500, Marek Polacek via Gcc-patches wrote: > On Thu, Feb 11, 2021 at 11:30:07AM -0500, Jason Merrill via Gcc-patches wrote: > > On 2/9/21 5:41 PM, Marek Polacek wrote: > > > My r10-7007 patch tweaked tsubst not to reduce the template level of > > > template param

[PATCH, pushed] rs6000: Fix invalid address used in MMA built-in function

2021-02-11 Thread Peter Bergner via Gcc-patches
The mma_assemble_input_operand predicate is too lenient on the memory operands it will accept, leading to an ICE when illegitimate addresses are passed in. The solution is to only accept memory operands with addresses that are valid for quad word memory accesses. The test case is a minimized test

Contents of PO file 'cpplib-11.1-b20210207.sv.po'

2021-02-11 Thread Translation Project Robot
cpplib-11.1-b20210207.sv.po.gz Description: Binary data The Translation Project robot, in the name of your translation coordinator.

New Swedish PO file for 'cpplib' (version 11.1-b20210207)

2021-02-11 Thread Translation Project Robot
Hello, gentle maintainer. This is a message from the Translation Project robot. A revised PO file for textual domain 'cpplib' has been submitted by the Swedish team of translators. The file is available at: https://translationproject.org/latest/cpplib/sv.po (This file, 'cpplib-11.1-b202102

Re: [PATCH v2] c++: Endless loop with targ deduction in member tmpl [PR95888]

2021-02-11 Thread Jason Merrill via Gcc-patches
On 2/11/21 3:06 PM, Marek Polacek wrote: On Thu, Feb 11, 2021 at 02:24:22PM -0500, Marek Polacek via Gcc-patches wrote: On Thu, Feb 11, 2021 at 11:30:07AM -0500, Jason Merrill via Gcc-patches wrote: On 2/9/21 5:41 PM, Marek Polacek wrote: My r10-7007 patch tweaked tsubst not to reduce the temp

Re: [PATCH 4/4] c++: dependent constraint on placeholder 'auto' [PR96443]

2021-02-11 Thread Patrick Palka via Gcc-patches
On Thu, 11 Feb 2021, Jason Merrill wrote: > On 2/8/21 2:03 PM, Patrick Palka wrote: > > This fixes the way we check satisfaction of constraints on placeholder > > types in various contexts, and in particular when the constraint is > > dependent. > > > > Firstly, when evaluating the return type re

Re: [PATCH] adjust "partly out of bounds" warning (PR 98503)

2021-02-11 Thread Martin Sebor via Gcc-patches
On 2/11/21 1:09 AM, Richard Biener wrote: On Wed, Feb 10, 2021 at 7:03 PM Martin Sebor wrote: On 2/10/21 3:39 AM, Richard Biener wrote: On Tue, Feb 9, 2021 at 4:37 PM Martin Sebor wrote: On 2/9/21 12:41 AM, Richard Biener wrote: On Tue, Feb 9, 2021 at 1:04 AM Martin Sebor via Gcc-patches

[PATCH] libgomp/i386: Revert the type of syscall wrappers output back to long.

2021-02-11 Thread Uros Bizjak via Gcc-patches
Linux man-pages 5.07 wrongly declares syscall output type as int. This error was fixed in release 5.10, so this patch reverts my recent change. Bootstrapped and regression tested on x86_64-linux-gnu {,-m32}. Committed to mainline as partial revert. 2021-02-11 Uroš Bizjak libgomp/ * conf

[x86] Fix -freorder-blocks-and-partition glitch with Windows SEH

2021-02-11 Thread Eric Botcazou
Since GCC 8, the -freorder-blocks-and-partition pass can split a function into hot and cold parts, thus generating 2 CIEs for a single function in DWARF for exception purposes and doing an equivalent trick for Windows SEH on x86-64. Now the Windows system unwinder is picky when it comes to the b

Re: [PATCH,rs6000] Optimize pcrel access of globals [ping]

2021-02-11 Thread Segher Boessenkool
Hi! On Wed, Dec 09, 2020 at 11:04:44AM -0600, acsaw...@linux.ibm.com wrote: > This patch implements a RTL pass that looks for pc-relative loads of the > address of an external variable using the PCREL_GOT relocation and a > single load or store that uses that external address. > --- a/gcc/config.

[PATCH] libstdc++: ifdef rtti specific function __throw_ios_failure() by __cpp_rtti

2021-02-11 Thread Mirko Vogt
Hello, ran into the following when building libstdc++ without rtti support: libstdc++-v3/src/c++11/cxx11-ios_failure.cc:174:54: error: no matching function for call to 'std::ios_base::failure::failure(const char*&, int&)' Attached patch does as follows: ifdef rtti specific function __throw_i

[stage 1 patch] remove unreachable code in expand_expr_real_1 (PR 21433)

2021-02-11 Thread Martin Sebor via Gcc-patches
While trawling through old bugs I came across one from 2005: PR 21433 - The COMPONENT_REF case of expand_expr_real_1 is probably wrong. The report looks correct in that argument 0 in COMPONENT_REF cannot be a CONSTRUCTOR. In my tests it's only been one of the following codes: array_ref comp

[committed] analyzer: fix ICE in print_mem_ref [PR98969]

2021-02-11 Thread David Malcolm via Gcc-patches
PR analyzer/98969 and PR analyzer/99064 describes ICEs, in both cases within print_mem_ref, when falsely reporting memory leaks - though it is possible to generate the ICE on other diagnostics (which I added in one of the test cases). This patch fixes the ICE, leaving the fix for the leak false po

libbacktrace patch committed: Use objcopy --help to check for option

2021-02-11 Thread Ian Lance Taylor via Gcc-patches
This patch changes the libbacktrace configure script to check for whether objcopy supports --add-gnu-debuglink (a test that only affects the libbacktrace testsuite) to look at the objcopy --help option rather than trying to apply --add-gnu-debuglink to /bin/ls. The latter can trigger a warning if

[pushed] c++: variadic lambda template and empty pack [PR97246]

2021-02-11 Thread Jason Merrill via Gcc-patches
In get<0>, Is is empty, so the first parameter pack of the lambda is empty, but after the fix for PR94546 we were wrongly associating it with the partial instantiation of 'v'. Tested x86_64-pc-linux-gnu, applying to trunk. gcc/cp/ChangeLog: PR c++/97246 PR c++/94546 * pt.

[patch, libfortran] PR95647 operator(.eq.) and operator(==) treated differently

2021-02-11 Thread Jerry DeLisle
The attached patch is another provided from Steve Kargle in the PR report. I have created a test case and regression tested the result. OK for trunk? Regards, Jerry libgfortran: Fix PR95647 by changing the interfaces of operators .eq. and .ne. The FE converts the old school .eq. to ==, and

Re: [PATCH v7] Practical improvement to libgcc complex divide

2021-02-11 Thread Patrick McGehearty via Gcc-patches
Ping - Submitted Feb 2, 2021 I believe this version fixes all issues raised in previous submissions. - Patrick McGehearty On 2/2/2021 4:25 PM, Patrick McGehearty via Gcc-patches wrote: Changes in this version from Version 6: Updated copyrights for following three files to -2021.

[PATCH RFA] cgraph: flatten and same_body aliases [PR96078]

2021-02-11 Thread Jason Merrill via Gcc-patches
The patch for PR92372 made us start warning about a flatten attribute on an alias. But in the case of C++ 'tor base/complete variants, the user didn't create the alias, so we shouldn't warn. I could also remove the attribute in maybe_clone_body, but here seems a bit better. Tested x86_64-pc-linu

[PING, PATCH V2] Add conversions between _Float128 and Decimal.

2021-02-11 Thread Michael Meissner via Gcc-patches
Ping patch | Subject: [PATCH, V2] Add conversions between _Float128 and Decimal. | Message-ID: <20210209073505.ga11...@ibm-toto.the-meissners.org> https://gcc.gnu.org/pipermail/gcc-patches/2021-February/565009.html I was asked to resubmit the patch with the copyright dates fixed, and Will's comme

Re: Re: [PATCH] plug memory leaks in warn_parm_array_mismatch (PR 99055)

2021-02-11 Thread Richard Biener via Gcc-patches
On Thu, Feb 11, 2021 at 7:35 PM Martin Sebor wrote: > > On 2/11/21 12:59 AM, Richard Biener wrote: > > On Wed, Feb 10, 2021 at 6:16 PM Martin Sebor wrote: > >> > >> The attached patch replaces calls to print_generic_expr_to_str() with > >> a helper function that returns a std::string and releases

Re: [patch, libfortran] PR95647 operator(.eq.) and operator(==) treated differently

2021-02-11 Thread Tobias Burnus
Hi Jerry, On 12.02.21 04:02, Jerry DeLisle wrote: The attached patch is another provided from Steve Kargle in the PR report. I have created a test case and regression tested the result. OK for trunk? LGTM except: libgfortran/ChangeLog: PR libfortran 95647 Syntax is "PR / * ieee/iee