Re: Free memory_block pool

2019-11-20 Thread Richard Biener
On Wed, 20 Nov 2019, Jan Hubicka wrote: > Hi, > I have noticed that for Firefox around 1GB of peak memory use goes into > the fact that we never free memory_block_pool::freelist. > > This patch adds memory_block_pool::trim which reduces freelist to a given > size. It is called from ggc_collect w

Re: [PATCH v3] Extend the simd function attribute

2019-11-20 Thread Francesco Petrogalli
On 11/20/19 7:54 AM, Szabolcs Nagy wrote: > On 14/11/2019 20:23, Szabolcs Nagy wrote: >> Sorry v2 had a bug. >> >> v2: added documentation and tests. >> v3: fixed expand_simd_clones so different isa variants are actually >> generated. >> >> GCC currently supports two ways to declare the availa

[PATCH] Fix attribute((section)) with -flto

2019-11-20 Thread Strager Neds
When building an executable with LTO, GCC effectively ignores __attribute__((section)) on C++ inline member functions. Moving such functions into the .text section seems to be intentional, but I think ignoring the section attribute is unintentional: https://gcc.gnu.org/ml/gcc-patches/2010-07/msg00

[PATCH] Simplify testing symbol sections

2019-11-20 Thread Strager Neds
While fixing some bugs in __attribute__((section)), I found it difficult to write tests. Make testing easier: introduce the scan-assembler-symbol-section and scan-symbol-section helpers. See in-line documentation for details. Testing: * Run `make check` on x86_64-linux-gnu with --disable-multilib

PR92608 - ICE: Segmentation fault (in find_loop_guard)

2019-11-20 Thread Prathamesh Kulkarni
Hi, The issue seems to happen with -O1, because header only contains phi: [local count: 118111600]: # iter.12_9 = PHI <0(2), iter.12_10(10)> and thus we hit segfault in following hunk in find_loop_guard: else { cond = dyn_cast (last_stmt (header)); if (! con

Re: C++ PATCH for c++/91363 - P0960R3: Parenthesized initialization of aggregates

2019-11-20 Thread Jason Merrill
On 11/20/19 8:37 PM, Marek Polacek wrote: On Tue, Nov 19, 2019 at 05:33:09PM -0500, Jason Merrill wrote: On 11/19/19 1:44 AM, Marek Polacek wrote: It also looks like you're using the LOOKUP flag to mean two different things: 1) try to treat parenthesized args as an aggregate initializer (build

Re: [PATCH] Fix libgo build (was Re: [PATCH v3] PR85678: Change default to -fno-common)

2019-11-20 Thread Ian Lance Taylor
On Wed, Nov 20, 2019 at 4:18 PM Jakub Jelinek wrote: > > On Tue, Nov 05, 2019 at 05:17:10PM +, Wilco Dijkstra wrote: > > Passes bootstrap and regress on AArch64 and x64. OK for commit? > > This broke bootstrap on x86_64-linux as well as i686-linux (guess all > targets that go supports). > The

libgo patch committed: Declare runtime_usestackmaps in .c file, not .h file

2019-11-20 Thread Ian Lance Taylor
This libgo patch declares runtime_usestackmaps in stack.c, not runtime.h. This fixes https://gcc.gnu.org/PR92605. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian Index: gcc/go/gofrontend/MERGE =

libgo patch committed: Use type aliases for time struct field types

2019-11-20 Thread Ian Lance Taylor
This patch to the libgo mksysinfo script uses type aliases for time struct field types. It also fixes a case where grep wasn't redirecting to /dev/null. This lets some syscall package types be identical to some golang.org/x/sys/unix types, and fixes https://golang.org/issue/35713. Bootstrapped a

Re: [PATCH] Fix libgo build (was Re: [PATCH v3] PR85678: Change default to -fno-common)

2019-11-20 Thread Jakub Jelinek
On Thu, Nov 21, 2019 at 01:41:47AM +0100, Rainer Orth wrote: > Same on sparc-sun-solaris2.11 and i386-pc-solaris2.11. > > There where quite a number of non-Go regressions all over the place. > Many are like this: > > FAIL: gcc.c-torture/execute/complex-6.c -O0 (test for excess errors) > > ld:

Re: [C++ PATCH] c++/92450 - ICE with invalid nested name specifier.

2019-11-20 Thread Jason Merrill
On 11/20/19 8:49 PM, Marek Polacek wrote: On Tue, Nov 19, 2019 at 05:34:45PM -0500, Jason Merrill wrote: On 11/18/19 7:04 PM, Marek Polacek wrote: The newly added diagnostic causes an ICE because the new grokdeclarator call returned error_mark_node and DECL_SOURCE_LOCATION crashes on that. So

Re: [C++ PATCH] Fix concepts vs. PCH (PR c++/92458)

2019-11-20 Thread Jason Merrill
On 11/20/19 7:21 PM, Jakub Jelinek wrote: On Mon, Nov 18, 2019 at 02:41:48PM -0500, Jason Merrill wrote: 2019-11-11 Jakub Jelinek PR c++/92458 * constraint.cc: Include tree-hash-traits.h. (decl_tree_cache_traits): New type. (decl_tree_cache_map): New typedef.

Re: [PATCH] Fix libgo build (was Re: [PATCH v3] PR85678: Change default to -fno-common)

2019-11-20 Thread Rainer Orth
Hi Jakub, > On Tue, Nov 05, 2019 at 05:17:10PM +, Wilco Dijkstra wrote: >> Passes bootstrap and regress on AArch64 and x64. OK for commit? > > This broke bootstrap on x86_64-linux as well as i686-linux (guess all > targets that go supports). indeed: just saw it on Solaris with the native ld.

[PATCH] Fix libgo build (was Re: [PATCH v3] PR85678: Change default to -fno-common)

2019-11-20 Thread Jakub Jelinek
On Tue, Nov 05, 2019 at 05:17:10PM +, Wilco Dijkstra wrote: > Passes bootstrap and regress on AArch64 and x64. OK for commit? This broke bootstrap on x86_64-linux as well as i686-linux (guess all targets that go supports). The following patch fixes it for me, though not sure which *.c file is

[PATCH] Don't put objects with flexible array members in small data

2019-11-20 Thread Sandra Loosemore
This patch is for PR target/92499, a bug reported by GLIBC maintainers against nios2 target. The initial failure symptom was a linker error resulting from use of GP-relative addressing on an object that wasn't allocated in the small data section. It turns out that the real problem is that the

Re: Make more bad uses of fallthrough attribute into pedwarns

2019-11-20 Thread Marek Polacek
On Wed, Nov 20, 2019 at 11:15:56PM +, Joseph Myers wrote: > Various bad uses of the [[fallthrough]] attribute are constraint > violations in C2x, so need pedwarns rather than warnings. > > This patch duly turns the relevant warnings into pedwarns. The > relevant code is not specific to C, and

[PATCH] rs6000: Don't split FP comparisons at expand time

2019-11-20 Thread Segher Boessenkool
We currently expand various floating point comparisons early, to some sequences with cror insns and the like. This doesn't optimize well. Change that to allow any of the 14 floating point comparisons in the instruction stream, and split them after combine (at split1). Tested on powerpc64-linux {

Make more bad uses of fallthrough attribute into pedwarns

2019-11-20 Thread Joseph Myers
Various bad uses of the [[fallthrough]] attribute are constraint violations in C2x, so need pedwarns rather than warnings. This patch duly turns the relevant warnings into pedwarns. The relevant code is not specific to C, and does not know which form the attribute was given in ([[fallthrough]] or

[committed] Add test for c++/92443

2019-11-20 Thread Marek Polacek
This started crashing with the <=> implementation but has now been fixed by r278465. Tested on x86_64-linux, applying to trunk. 2019-11-20 Marek Polacek PR c++/92443 * g++.dg/cpp0x/constexpr-92443.C: New test. diff --git gcc/testsuite/g++.dg/cpp0x/constexpr-92443.C gcc/tests

Re: [PATCH] Fix slowness in demangler

2019-11-20 Thread Alan Modra
On Tue, Nov 19, 2019 at 08:00:22PM +0100, Tim Rühsen wrote: > Thanks. Where exactly did it go ? Still can't see it in > git://sourceware.org/git/binutils-gdb.git. Is there another repository ? It will appear in the binutils repo when someone syncs libiberty with the master sources in the gcc repo.

Re: [patch, fortran] Load scalar intent-in variables at the beginning of procedures

2019-11-20 Thread Thomas König
Am 20.11.19 um 23:18 schrieb Janne Blomqvist: On Wed, Nov 20, 2019 at 11:35 PM Thomas König wrote: Am 20.11.19 um 21:45 schrieb Janne Blomqvist: BTW, since this is done for the purpose of optimization, have you done testing on some suitable benchmark suite such as polyhedron, whether it a) ge

Re: [patch, fortran] Load scalar intent-in variables at the beginning of procedures

2019-11-20 Thread Tobias Burnus
On 11/20/19 11:18 PM, Janne Blomqvist wrote: Of course, Fortran language rules specify that the call to bar cannot do anything to n Hmm, does it? What about the following modification to your testcase: This code violates (quote from F2018): "15.5.2.13  Restrictions on entities associated wit

Re: [patch, fortran] Load scalar intent-in variables at the beginning of procedures

2019-11-20 Thread Janne Blomqvist
On Thu, Nov 21, 2019 at 12:18 AM Janne Blomqvist wrote: > > On Wed, Nov 20, 2019 at 11:35 PM Thomas König wrote: > > (Why do we zero %eax > > before each call? It should not be a variadic call right?) > > Not sure. Maybe some belt and suspenders thing? I guess someone better > versed in ABI minut

Re: [PATCH] Switch gcc ftp URL's to http

2019-11-20 Thread Joseph Myers
On Wed, 20 Nov 2019, Janne Blomqvist wrote: > On Wed, Nov 20, 2019 at 7:53 PM Joseph Myers wrote: > > > > This patch is OK with http changed to https. (That is, with it changed > > where the patch is already changing the URL. While changing http to https > > makes sense more generally in the do

Re: [patch, fortran] Load scalar intent-in variables at the beginning of procedures

2019-11-20 Thread Tobias Burnus
On 11/20/19 10:35 PM, Thomas König wrote: I haven't run any actual benchmarks. I think it would be interesting – I think there can be quite some advantages in some cases, while in most cases, it is not really noticable. Of course, Fortran language rules specify that the call to bar cannot do a

Re: [patch, fortran] Load scalar intent-in variables at the beginning of procedures

2019-11-20 Thread Janne Blomqvist
On Wed, Nov 20, 2019 at 11:35 PM Thomas König wrote: > > Am 20.11.19 um 21:45 schrieb Janne Blomqvist: > > BTW, since this is done for the purpose of optimization, have you done > > testing on some suitable benchmark suite such as polyhedron, whether > > it a) generates any different code b) does

Re: [PATCH 0/4] Eliminate cc0 from m68k

2019-11-20 Thread Richard Earnshaw
On 20/11/2019 20:48, Bernd Schmidt wrote: > On 11/20/19 8:27 PM, Mikael Pettersson wrote: >> On Wed, Nov 20, 2019 at 3:16 PM Bernd Schmidt wrote: >>> Probably best to just run tests on stage1 and hope something shows up. >> >> Ok, how do I did that? I've always just done 'make -k check' after >>

Re: [patch, fortran] Load scalar intent-in variables at the beginning of procedures

2019-11-20 Thread Thomas König
Am 20.11.19 um 21:45 schrieb Janne Blomqvist: BTW, since this is done for the purpose of optimization, have you done testing on some suitable benchmark suite such as polyhedron, whether it a) generates any different code b) does it make it go faster? I haven't run any actual benchmarks. Howeve

Re: [patch, fortran] Load scalar intent-in variables at the beginning of procedures

2019-11-20 Thread Bernhard Reutner-Fischer
On Wed, 20 Nov 2019 22:38:30 +0200 Janne Blomqvist wrote: > On Wed, Nov 20, 2019 at 8:00 PM Bernhard Reutner-Fischer > wrote: > > > > On 19 November 2019 23:54:55 CET, Thomas Koenig > > wrote: > > >Am 19.11.19 um 11:39 schrieb Bernhard Reutner-Fischer: > > >> + char name[GFC_MAX_SYMBO

Re: [PATCH 2/7] Include new generated gcc/params.opt file.

2019-11-20 Thread David Malcolm
On Wed, 2019-11-20 at 16:07 +0100, Martin Liška wrote: > On 11/20/19 4:02 PM, David Malcolm wrote: > > On Wed, 2019-11-20 at 15:51 +0100, Martin Liška wrote: > > > On 11/20/19 3:49 PM, David Malcolm wrote: > > > > On Wed, 2019-11-06 at 11:30 +0100, Martin Liska wrote: > > > > > gcc/ChangeLog: > > >

[PATCH 11/11] [analyzer] Updates to internal documentation

2019-11-20 Thread David Malcolm
gcc/ChangeLog: * doc/analyzer.texi (Analyzer Paths): Add path pruning and precision-of-wording vfuncs. (Debugging the Analyzer): Consolidate duplicated material. --- gcc/doc/analyzer.texi | 47 +-- 1 file changed, 37 insertions(+)

[PATCH 10/11] [analyzer] Fix issues in diagnostic_manager::prune_path

2019-11-20 Thread David Malcolm
There was a bad upper limit in diagnostic_manager::prune_path's test for pruning redundant interprocedural pass information, leading to an ICE. Additional, the test for pruning [..., call, function-entry, return, ...] triples doesn't work for -fanalyzer-verbosity=0, which doesn't generate functi

[PATCH 08/11] [analyzer] Show rewind destination for leaks due to longjmp

2019-11-20 Thread David Malcolm
This patch adds some special-case logic to how paths are generated so that leaks due to longjmp rewinding past a frame now show where the longjmp rewinds to (longjmp and setjmp are already something of a special-case so this seems reasonable). A colorized LTO example of the output can be seen at:

[PATCH 09/11] [analyzer] Add checker_path::debug

2019-11-20 Thread David Malcolm
This patch adds a new debugging function. gcc/ChangeLog: * analyzer/checker-path.cc (checker_path::debug): New member function. * analyzer/checker-path.h (checker_path::debug): New decl. --- gcc/analyzer/checker-path.cc | 19 +++ gcc/analyzer/checker-path.h

[PATCH 06/11] [analyzer] More LTO test coverage

2019-11-20 Thread David Malcolm
gcc/testsuite/ChangeLog: * gcc.dg/analyzer/malloc-ipa-8-lto-a.c: New test. * gcc.dg/analyzer/malloc-ipa-8-lto-b.c: New test. * gcc.dg/analyzer/malloc-ipa-8-lto-c.c: New test. * gcc.dg/analyzer/malloc-ipa-8-lto.h: New test. --- gcc/testsuite/gcc.dg/analyzer/malloc-ip

[PATCH 04/11] [analyzer] Add params to plugin.opt

2019-11-20 Thread David Malcolm
Various commits on 2019-11-12 including r278083 through r278087 reimplemented parameter-handling in terms of options, so that params are defined in params.opt rather than params.def. This patch adds the params for the analyzer to plugin.opt, replacing the patch: [PATCH 22/49] analyzer: params.d

[PATCH 07/11] [analyzer] Fix missing leak on longjmp past a free

2019-11-20 Thread David Malcolm
This patch fixes the missing leak report in setjmp-7.c, which failed to report on an unchecked "malloc" result leaking due to a longjmp skipping past its frame to a setjmp in its caller. The root cause issue is that impl_region_model_context::on_state_leak would call the state machine's on_leak vf

[PATCH 03/11] [analyzer] Fixup diagnostic_path for "json::number" to "json::integer_number"

2019-11-20 Thread David Malcolm
r277284 eliminated json::number in favor of json::float_number and json::integer_number. Update the diagnostic_path code accordingly. gcc/ChangeLog: * tree-diagnostic-path.cc (default_tree_make_json_for_path): Fix overlong line. Use json::integer_number. --- gcc/tree-diagnostic-

[PATCH 05/11] [analyzer] Avoid using "convert"

2019-11-20 Thread David Malcolm
"convert" is not implemented in lto1, leading to an ICE when used. This patch implements a build_cast function for the analyzer and uses it to replace the call to "convert" when handling casts in region_model. This fixes numerous ICEs when running the analyzer from LTO. gcc/ChangeLog: *

[PATCH 02/11] [analyzer] Fixup metadata-handling for "json::number" to "json::integer_number"

2019-11-20 Thread David Malcolm
r277284 eliminated json::number in favor of json::float_number and json::integer_number. Update the diagnostic metadata code accordingly. gcc/ChangeLog: * diagnostic-format-json.cc (json_from_metadata): Use json::integer_number. --- gcc/diagnostic-format-json.cc | 3 ++- 1 file c

[PATCH 00/11] Static analysis v2

2019-11-20 Thread David Malcolm
I've rebased my static analysis work (from r276961 to r278495) This patch kit contains the changes that were needed (patches 1-4), along with various followups (patches 5-11). These patches fix the worst of the issues with LTO compatibility; an example LTO diagnostic is: https://dmalcolm.fedorap

[PATCH 01/11] [analyzer] Fix up for params refactoring

2019-11-20 Thread David Malcolm
gcc/ChangeLog: * analyzer/analysis-plan.cc: Remove include of "params.h". (analysis_plan::use_summary_p): Update for conversion of params to options. * analyzer/engine.cc: Remove include of "params.h". (exploded_graph::get_or_create_node): Update for conversi

Re: [patch, fortran] Load scalar intent-in variables at the beginning of procedures

2019-11-20 Thread Steve Kargl
On Wed, Nov 20, 2019 at 10:38:30PM +0200, Janne Blomqvist wrote: > On Wed, Nov 20, 2019 at 8:00 PM Bernhard Reutner-Fischer > wrote: > > > > On 19 November 2019 23:54:55 CET, Thomas Koenig > > wrote: > > >Am 19.11.19 um 11:39 schrieb Bernhard Reutner-Fischer: > > >> + char name[GFC_MAX_SYMB

Re: [PATCH, rs6000][committed] Fix PR92090: Allow MODE_PARTIAL_INT modes for integer constant input operands.

2019-11-20 Thread Peter Bergner
On 11/7/19 1:06 PM, Peter Bergner wrote: > Before, LRA, we have an insn that sets a TImode pseudo with an integer > constant and a following insn that copies that TImode pseudo to a PTImode > pseudo. During LRA spilling, we generate a new insn that sets a PTImode > pseudo to that constant directly

Re: [C++ PATCH] c++/92450 - ICE with invalid nested name specifier.

2019-11-20 Thread Marek Polacek
On Tue, Nov 19, 2019 at 05:34:45PM -0500, Jason Merrill wrote: > On 11/18/19 7:04 PM, Marek Polacek wrote: > > The newly added diagnostic causes an ICE because the new grokdeclarator call > > returned error_mark_node and DECL_SOURCE_LOCATION crashes on that. So don't > > attempt to print the new d

Re: [PATCH 0/4] Eliminate cc0 from m68k

2019-11-20 Thread Bernd Schmidt
On 11/20/19 8:27 PM, Mikael Pettersson wrote: > On Wed, Nov 20, 2019 at 3:16 PM Bernd Schmidt wrote: >> Probably best to just run tests on stage1 and hope something shows up. > > Ok, how do I did that? I've always just done 'make -k check' after > full bootstraps. > I assume the stage 1 artifact

Re: Add a new combine pass

2019-11-20 Thread Segher Boessenkool
On Wed, Nov 20, 2019 at 06:20:34PM +, Richard Sandiford wrote: > Segher Boessenkool writes: > > So this would work if you had pseudos here, instead of the hard reg? > > Because it is a hard reg it is the same number in both places, making it > > hard to move. > > Yeah, probably. But the hard

Re: [patch, fortran] Load scalar intent-in variables at the beginning of procedures

2019-11-20 Thread Janne Blomqvist
On Sat, Nov 16, 2019 at 10:34 PM Thomas Koenig wrote: > > Hello world, > > here is an update to the patch. > > I have now included variables where the user did not specify INTENT(IN) > by checking that the dummy variables to be replaced by temporaries > are not, indeed, assigned a value. This also

Re: [patch, fortran] Load scalar intent-in variables at the beginning of procedures

2019-11-20 Thread Janne Blomqvist
On Wed, Nov 20, 2019 at 8:00 PM Bernhard Reutner-Fischer wrote: > > On 19 November 2019 23:54:55 CET, Thomas Koenig wrote: > >Am 19.11.19 um 11:39 schrieb Bernhard Reutner-Fischer: > >> + char name[GFC_MAX_SYMBOL_LEN + 1]; > >> + snprintf (name, GFC_MAX_SYMBOL_LEN, "__dummy_%d_%s", var_

Re: C++ PATCH for c++/91363 - P0960R3: Parenthesized initialization of aggregates

2019-11-20 Thread Marek Polacek
On Tue, Nov 19, 2019 at 05:33:09PM -0500, Jason Merrill wrote: > On 11/19/19 1:44 AM, Marek Polacek wrote: > > > It also looks like you're using the LOOKUP flag to mean two different > > > things: > > > > > > 1) try to treat parenthesized args as an aggregate initializer > > > (build_new_method_ca

Re: [PATCH] Switch gcc ftp URL's to http

2019-11-20 Thread Janne Blomqvist
On Wed, Nov 20, 2019 at 7:53 PM Joseph Myers wrote: > > This patch is OK with http changed to https. (That is, with it changed > where the patch is already changing the URL. While changing http to https > makes sense more generally in the documentation whenever a site supports > https, that's pr

Re: [PATCH 0/4] Eliminate cc0 from m68k

2019-11-20 Thread Jeff Law
On 11/20/19 12:27 PM, Mikael Pettersson wrote: > On Wed, Nov 20, 2019 at 3:16 PM Bernd Schmidt > wrote: >> >> On 11/20/19 2:50 PM, Mikael Pettersson wrote: >>> On Mon, Nov 18, 2019 at 9:57 PM Mikael Pettersson >>> wrote: On Mon, Nov 18, 2019 at 8:31 PM Bernd Schmidt wrote: >

Re: [PATCH 1/2] PR 92463 MPFR modernization in GFortran

2019-11-20 Thread Janne Blomqvist
On Wed, Nov 20, 2019 at 5:46 PM Tobias Burnus wrote: > > Hi Janne, > > On 11/18/19 9:34 PM, Janne Blomqvist wrote: > > Now that we require a minimum of MPFR 3.1.0+ to build GCC, we can do > > some modernization of the MPFR usage in the GFortran frontend. > > OK – thanks for the cleanup. > > [For r

Re: [PATCH 0/4] Eliminate cc0 from m68k

2019-11-20 Thread Mikael Pettersson
On Wed, Nov 20, 2019 at 3:16 PM Bernd Schmidt wrote: > > On 11/20/19 2:50 PM, Mikael Pettersson wrote: > > On Mon, Nov 18, 2019 at 9:57 PM Mikael Pettersson > > wrote: > >> > >> On Mon, Nov 18, 2019 at 8:31 PM Bernd Schmidt > >> wrote: > >>> > >>> Hi Mikael, > >>> > This fixed the problem

Re: [C++ PATCH] Fix concepts vs. PCH (PR c++/92458)

2019-11-20 Thread Jakub Jelinek
On Mon, Nov 18, 2019 at 02:41:48PM -0500, Jason Merrill wrote: > > 2019-11-11 Jakub Jelinek > > > > PR c++/92458 > > * constraint.cc: Include tree-hash-traits.h. > > (decl_tree_cache_traits): New type. > > (decl_tree_cache_map): New typedef. > > (decl_constraints): Change ty

Re: [C++ PATCH] Fix weird addr_expr not supported by dump_expr messages (PR c++/90767)

2019-11-20 Thread Jason Merrill
On 11/20/19 10:54 AM, David Malcolm wrote: On Wed, 2019-11-20 at 00:38 +0100, Jakub Jelinek wrote: Hi! The following patch is a minimal fix to avoid cannot convert ‘‘addr_expr’ not supported by dump_type’ to ‘X*’ and similar messages. The recently added complain_about_bad_argument function exp

Re: [C++ Patch] Avoid redundant error messages from build_x_arrow

2019-11-20 Thread Jason Merrill
On 11/20/19 4:40 PM, Paolo Carlini wrote: Hi, while working on improving the locations of cp_build_indirect_ref_1 & co, I noticed this nit which seems a separate issue. In a nutshell, at variance with many other cases, in build_x_arrow we don't immediately check for error_mark_node the retur

Re: [C/C++ PATCH] Fix up build of GCC 4.6 and earlier with GCC 9+ (PR c/90677)

2019-11-20 Thread Jason Merrill
On 11/19/19 11:29 PM, Jakub Jelinek wrote: Hi! The following patch fixes build of older GCC releases with newer ones. In GCC 4.6 and earlier, we had: struct cgraph_node; struct cgraph_node *cgraph_node (tree); and that is something on which GCC 9+ code errors on if it sees any __gcc_diag__ and s

Re: [C++ PATCH] Fix up lambda decl specifier parsing ICE (PR c++/90842)

2019-11-20 Thread Jason Merrill
On 11/20/19 9:16 AM, Jakub Jelinek wrote: On Tue, Nov 19, 2019 at 11:35:02PM -0500, Jason Merrill wrote: It would seem better to break after consuming the token, so we just skip the extra processing and still give the same error. And instead of this, maybe set CP_PARSER_FLAGS_NO_TYPE_DEFINITION

[AArch64] [mid-end] [__RTL] Allow backends to set state when skipping passes.

2019-11-20 Thread Matthew Malcomson
When compiling __RTL functions with a start pass, `skip_pass` needs to set global state when skipping a pass that would have marked something for future passes to see. Existing examples are setting `reload_completed` and `epilogue_completed` when skipping the reload and pro_and_epilogue passes res

Re: Add a new combine pass

2019-11-20 Thread Richard Sandiford
Segher Boessenkool writes: >> /* Make sure that the value that is to be substituted for the register >> does not use any registers whose values alter in between. However, >> If the insns are adjacent, a use can't cross a set even though we >> think it might (this can happe

Re: Reverting r278411

2019-11-20 Thread Joseph Myers
On Wed, 20 Nov 2019, Jakub Jelinek wrote: > On Wed, Nov 20, 2019 at 10:17:38AM -0600, Segher Boessenkool wrote: > > On Wed, Nov 20, 2019 at 03:46:29PM +, Richard Sandiford wrote: > > > Segher Boessenkool writes: > > > > UNLT & ORDERED is always LT. When would it not be true? > > > > > > LT

Re: [PATCH 5/X] [libsanitizer][mid-end] Introduce stack variable handling for HWASAN

2019-11-20 Thread Joseph Myers
On Wed, 20 Nov 2019, Matthew Malcomson wrote: > I don't have much of a plan. > > The most promising lead I have is that libiberty/alloca.c has a similar > functionality but with macros to account for a special case. The comment in libiberty/aclocal.m4 is: # We always want a C version of alloca

[COMMITTED][AArch64] Fix vrbit_1.c test failure

2019-11-20 Thread Wilco Dijkstra
The vrbit_1 test was missing a flag to disable code sharing. Committed as obvious. ChangeLog: 2019-11-20 Wilco Dijkstra testsuite/ * gcc.target/aarch64/simd/vrbit_1.c: Add -fno-ipa-icf. -- diff --git a/gcc/testsuite/gcc.target/aarch64/simd/vrbit_1.c b/gcc/testsuite/gcc.target/aar

Re: [patch, fortran] Load scalar intent-in variables at the beginning of procedures

2019-11-20 Thread Bernhard Reutner-Fischer
On 19 November 2019 23:54:55 CET, Thomas Koenig wrote: >Am 19.11.19 um 11:39 schrieb Bernhard Reutner-Fischer: >> + char name[GFC_MAX_SYMBOL_LEN + 1]; >> + snprintf (name, GFC_MAX_SYMBOL_LEN, "__dummy_%d_%s", var_num++, >> +f->sym->name); >> + >> + if (gfc_get_sym_tr

Re: [PATCH] Fix PR92462

2019-11-20 Thread Jeff Law
On 11/19/19 12:42 AM, Richard Biener wrote: > On Mon, 18 Nov 2019, Jeff Law wrote: > >> On 11/18/19 3:37 AM, Richard Biener wrote: >>> On Mon, 18 Nov 2019, Jakub Jelinek wrote: >>> On Mon, Nov 18, 2019 at 11:07:22AM +0100, Richard Biener wrote: > On Mon, 18 Nov 2019, Jakub Jelinek wrote:

[committed] jit: fix ICE with GCC_JIT_BOOL_OPTION_SELFCHECK_GC since r278084 (PR jit/92483)

2019-11-20 Thread David Malcolm
Since r278084 (part of the params refactoring), most of libgccjit's test suite has been ICEing. The root cause is that jit-playback.c injects params to its fake_args here: /* Aggressively garbage-collect, to shake out bugs: */ if (get_bool_option (GCC_JIT_BOOL_OPTION_SELFCHECK_GC)) {

Re: [PATCH] Switch gcc ftp URL's to http

2019-11-20 Thread Joseph Myers
This patch is OK with http changed to https. (That is, with it changed where the patch is already changing the URL. While changing http to https makes sense more generally in the documentation whenever a site supports https, that's probably best not mixed with the move from ftp.) -- Joseph S

Re: [PATCH] include size and offset in -Wstringop-overflow

2019-11-20 Thread Jeff Law
On 11/18/19 9:15 AM, Martin Sebor wrote: > On 11/17/19 12:03 PM, Jeff Law wrote: >> On 11/12/19 12:55 PM, Martin Sebor wrote: >>> On 11/12/19 10:54 AM, Jeff Law wrote: On 11/12/19 1:15 AM, Richard Biener wrote: > On Tue, Nov 12, 2019 at 6:10 AM Jeff Law wrote: >> >> On 11/6/19 3:3

Re: [PATCH v2] Add `--with-install-sysroot=' configuration option

2019-11-20 Thread Joseph Myers
On Wed, 20 Nov 2019, Maciej W. Rozycki wrote: > > But even then, if you configure GCC using "--with-sysroot" or > > "--with-build-sysroot", both of those paths are the top-level sysroot, to > > which the sysroot suffix gets appended before GCC uses it for any purpose, > > unless you explicitly

Re: [PATCH 1/3] [ARC] Fix failing pr77309 for ARC700

2019-11-20 Thread Jeff Law
On 11/19/19 2:02 AM, Claudiu Zissulescu wrote: > The patterns neg_scc_insn and not_scc_insn are not correct, leading to > failing pr77309 test for ARC700. Add two new bic compare with zero > patterns to improve output code. > > gcc/ > -xx-xx Claudiu Zissulescu > > * config/arc/arc.md

Re: v2 [PATCH 0/X] Introduce HWASAN sanitizer to GCC

2019-11-20 Thread Matthew Malcomson
On 20/11/2019 14:29, Martin Liška wrote: > On 11/7/19 7:37 PM, Matthew Malcomson wrote: >> I have rebased this series onto Martin Liska's patches that take the most >> recent libhwasan from upstream LLVM. >> https://gcc.gnu.org/ml/gcc-patches/2019-11/msg00340.html >> >> I've also cleared up some no

Re: [PATCH] Update comment in libsanitizer/*/libtool-version files.

2019-11-20 Thread Jeff Law
On 11/20/19 4:02 AM, Martin Liška wrote: > Hi. > > The patch is about removal of an unused libtool-version file, > and comments in other libtool-version files are legacy. > > Patch can bootstrap on x86_64-linux-gnu and survives regression tests. > I'm going to install the patch if there are no ob

Re: Adjust expected output for bb-slp-21.c (PR 92527)

2019-11-20 Thread Jeff Law
On 11/20/19 5:46 AM, Richard Sandiford wrote: > After r278246, we can try building the out[] store value from scalars > if the target has no multiplication support. That's not necessarily > a good thing, but like most of vect/, this test is run with the cost > model disabled. > > Tested on aarch6

Re: Restrict bb-slp-40.c to targets with VnQI addition (PR 92366)

2019-11-20 Thread Jeff Law
On 11/20/19 8:15 AM, Richard Sandiford wrote: > bb-slp-40.c fails on SPARC targets without VIS4 because it > requires addition on vectors of bytes. There doesn't seem to be > an existing target selector for this, so I added vect_char_add. > (Wasn't sure whether to use vect_char_add, for consistenc

Re: Reverting r278411

2019-11-20 Thread Segher Boessenkool
On Wed, Nov 20, 2019 at 04:59:49PM +, Richard Sandiford wrote: > Segher Boessenkool writes: > > On Wed, Nov 20, 2019 at 05:30:48PM +0100, Jakub Jelinek wrote: > >> On Wed, Nov 20, 2019 at 10:17:38AM -0600, Segher Boessenkool wrote: > >> > On Wed, Nov 20, 2019 at 03:46:29PM +, Richard Sandi

Re: Reverting r278411

2019-11-20 Thread Segher Boessenkool
On Wed, Nov 20, 2019 at 04:35:24PM +, Richard Sandiford wrote: > Actually, this doesn't work because *_operators want rtxes rather > than codes. I can get around that by passing op0 and op1 for > the existing rtxes. For the conversion at the end, I can do: > > machine_mode compared_mode =

Re: Reverting r278411

2019-11-20 Thread Richard Sandiford
Segher Boessenkool writes: > On Wed, Nov 20, 2019 at 05:30:48PM +0100, Jakub Jelinek wrote: >> On Wed, Nov 20, 2019 at 10:17:38AM -0600, Segher Boessenkool wrote: >> > On Wed, Nov 20, 2019 at 03:46:29PM +, Richard Sandiford wrote: >> > > Segher Boessenkool writes: >> > > > UNLT & ORDERED is a

Re: [PATCH 0/4] Eliminate cc0 from m68k

2019-11-20 Thread Jeff Law
On 11/20/19 7:16 AM, Bernd Schmidt wrote: > On 11/20/19 2:50 PM, Mikael Pettersson wrote: >> On Mon, Nov 18, 2019 at 9:57 PM Mikael Pettersson >> wrote: >>> >>> On Mon, Nov 18, 2019 at 8:31 PM Bernd Schmidt >>> wrote: Hi Mikael, > This fixed the problem, thanks. Cou

Re: Reverting r278411

2019-11-20 Thread Segher Boessenkool
On Wed, Nov 20, 2019 at 05:30:48PM +0100, Jakub Jelinek wrote: > On Wed, Nov 20, 2019 at 10:17:38AM -0600, Segher Boessenkool wrote: > > On Wed, Nov 20, 2019 at 03:46:29PM +, Richard Sandiford wrote: > > > Segher Boessenkool writes: > > > > UNLT & ORDERED is always LT. When would it not be tr

Fix (most of) nonlinearity in update_callee_keys

2019-11-20 Thread Jan Hubicka
Hi, this patch makes inliner to update callee keys only in function within newly inlined clone rather than in the whole function it is inlined to. This is possible only when the remaining edges are not becoming more hot for inlining and on this I rely on monotonocity of the badness function: if cal

[C++ Patch] Avoid redundant error messages from build_x_arrow

2019-11-20 Thread Paolo Carlini
Hi, while working on improving the locations of cp_build_indirect_ref_1 & co, I noticed this nit which seems a separate issue. In a nutshell, at variance with many other cases, in build_x_arrow we don't immediately check for error_mark_node the return value of decay_conversion. Then, for the

Document -Wc11-c2x-compat

2019-11-20 Thread Joseph Myers
My patch that added initial C2X support and associated command-line options missed documenting -Wc11-c2x-compat although the other options were properly documented. This patch adds the missing documentation. Tested with "make info" and "make pdf". Applied to mainline. Will apply to GCC 9 branc

Re: RFA; patch to fix PR90007

2019-11-20 Thread Alexander Monakov
On Wed, 20 Nov 2019, Alexander Monakov wrote: > On Wed, 20 Nov 2019, Richard Biener wrote: > > > On Tue, Nov 19, 2019 at 5:07 PM Vladimir Makarov > > wrote: > > > > > > The following patch fixes > > > > > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90007 > > > > > > Sometime ago a code which

Re: Reverting r278411

2019-11-20 Thread Richard Sandiford
Richard Sandiford writes: >>> I'd actually considered converting to signed and back instead of adding >>> extra cases, but I thought that would be rejected as too inefficient. >>> (That was a concern with my patch above.) It seemed like one of the selling >>> points of doing it your way was that

Re: Reverting r278411

2019-11-20 Thread Jakub Jelinek
On Wed, Nov 20, 2019 at 10:17:38AM -0600, Segher Boessenkool wrote: > On Wed, Nov 20, 2019 at 03:46:29PM +, Richard Sandiford wrote: > > Segher Boessenkool writes: > > > UNLT & ORDERED is always LT. When would it not be true? > > > > LT traps on quiet NaNs for -ftrapping-math, UNLT and ORDER

Optimize allocations for evaluate_properties_for_edges

2019-11-20 Thread Jan Hubicka
Hi, this patch avoids malloc traffic in evaluate_properties_for_edge which allocates vectors holding known values, aggregates and polyorphic contextes. I made the vector allocated by a caller who can place them at stack using auto_vec. The patch also adds logic to avoid calculation and clearing of

Re: Reverting r278411

2019-11-20 Thread Segher Boessenkool
On Wed, Nov 20, 2019 at 03:46:29PM +, Richard Sandiford wrote: > Segher Boessenkool writes: > > UNLT & ORDERED is always LT. When would it not be true? > > LT traps on quiet NaNs for -ftrapping-math, UNLT and ORDERED don't. No? -ftrapping-math makes nothing trap. The only thing it does is

Fix nonlinearity in estimate_edge_growth

2019-11-20 Thread Jan Hubicka
Hi, this patch treads ages old problem that compile time needed to estimate call size is not constant, but a function of a number of calls of the callee. If there is a function with many callers and many callees this triggers quadratic behaviour. This patch adds summary info for all callees of a n

[PATCH] doc: Correct `--enable-version-specific-runtime-libs' support information

2019-11-20 Thread Maciej W. Rozycki
The `--enable-version-specific-runtime-libs' configuration option is now supported throughout all of our target library subdirectories, so update installation documentation accordingly and also mention that the default for the option is `yes' for libada and `no' for the remaining libraries.

Re: [PATCH 2/2] PR 92463 MPFR modernization: Revert r269139

2019-11-20 Thread Tobias Burnus
LGTM. Thanks, Tobias PS: For reference, mpfr_regular_p was added in MPFR 3.0.0 (as stated); acting as follows: mpfr_number_p = returns nonzero if ordinary number (i.e., neither NaN nor an infinity), mpfr_regular_p = returns nonzero if regular number (i.e., neither NaN, nor an infinity nor ze

Re: [PATCH v3] libgomp/test: Add flags to find libatomic in build-tree testing

2019-11-20 Thread Maciej W. Rozycki
On Wed, 20 Nov 2019, Jakub Jelinek wrote: > Ok with appropriate ChangeLog entry. I've used one included with the submission. Change applied now, thanks for your review. Maciej

Re: Reverting r278411

2019-11-20 Thread Richard Sandiford
Segher Boessenkool writes: > Hi! > > On Wed, Nov 20, 2019 at 09:42:46AM +, Richard Sandiford wrote: >> Segher Boessenkool writes: >> >> Before I resubmit, why is the simplify-rtx.c part all wrong? >> > >> > It was nice and simple, and it isn't anymore. 8 4 2 1 for the four of >> > lt gt eq u

[PATCH] PR c++/92236: Improve static assertions of concepts

2019-11-20 Thread Andrew Sutton
This patch builds on https://gcc.gnu.org/ml/gcc-patches/2019-11/msg01034.html. Tie static assertion diagnostics into constraint diagnostic. For example, this program: template concept iterator = requires (I i) { ++i; *i; }; static_assert(iterator); Yields these errors: x.cpp:11:1

Re: [PATCH 1/2] PR 92463 MPFR modernization in GFortran

2019-11-20 Thread Tobias Burnus
Hi Janne, On 11/18/19 9:34 PM, Janne Blomqvist wrote: Now that we require a minimum of MPFR 3.1.0+ to build GCC, we can do some modernization of the MPFR usage in the GFortran frontend. OK – thanks for the cleanup. [For reference, those changes were introduced in MPFR 3.0.0, cf. https://www.

Re: [PATCH 3/X] [libsanitizer] Add option to bootstrap using HWASAN

2019-11-20 Thread Matthew Malcomson
On 20/11/2019 14:33, Martin Liška wrote: > On 11/13/19 4:24 PM, Matthew Malcomson wrote: >> On 12/11/2019 12:08, Martin Liška wrote: >>> On 11/11/19 5:03 PM, Matthew Malcomson wrote: Ah! My apologies -- I sent up a series with a few documentation mistakes. > >> >> b) Marking 'ptr' and 'm

Re: Optimize fibonacci heap allocations

2019-11-20 Thread Jan Hubicka
Hi, sadly this patch seems to trigger false positive ../../gcc/vec.h:311:10: error: attempt to free a non-heap object �@Xa�@Y [-Werror=free-nonheap-object] which is about vec destructor freeing heap allocated memory if the vector was ever resized from hits stack allocated place. In this case it

Reject versioning for alignment with different masks (PR 92526)

2019-11-20 Thread Richard Sandiford
Allowing mixed vector sizes broke the assumption in the following assert, since it's now possible for different accesses to require different levels of alignment: /* FORNOW: use the same mask to test all potentially unaligned references in the loop. The vectorizer c

Re: Reverting r278411

2019-11-20 Thread Segher Boessenkool
Hi! On Wed, Nov 20, 2019 at 09:42:46AM +, Richard Sandiford wrote: > Segher Boessenkool writes: > >> Before I resubmit, why is the simplify-rtx.c part all wrong? > > > > It was nice and simple, and it isn't anymore. 8 4 2 1 for the four of > > lt gt eq un are hardly worth documenting or maki

Restrict bb-slp-40.c to targets with VnQI addition (PR 92366)

2019-11-20 Thread Richard Sandiford
bb-slp-40.c fails on SPARC targets without VIS4 because it requires addition on vectors of bytes. There doesn't seem to be an existing target selector for this, so I added vect_char_add. (Wasn't sure whether to use vect_char_add, for consistency with vect_no_int_add/vect_int_mult etc., or vect_add

  1   2   >