Re: [PATCH] Enable ICE-after-error with -fchecking

2019-12-08 Thread Richard Biener
On Fri, 6 Dec 2019, Segher Boessenkool wrote: > On Wed, Dec 04, 2019 at 05:26:25PM +0100, Jakub Jelinek wrote: > > I'd fear people will use -fchecking and feel error-recovery bugs are then > > more important because they no longer get the more user friendly message. > > Can't we arrange for the

Re: [PATCH 01/49] analyzer: user-facing documentation

2019-12-08 Thread Sandra Loosemore
On 11/15/19 6:22 PM, David Malcolm wrote: gcc/ChangeLog: * doc/invoke.texi ("Static Analyzer Options"): New list and new section. ("Warning Options"): Add static analysis warnings to the list. (-Wno-analyzer-double-fclose): New option. (-Wno-analyzer-double-free):

Re: [PATCH] Enable mask operation for 128/256-bit vector VCOND_EXPR under avx512f (PR92686)

2019-12-08 Thread Hongtao Liu
On Thu, Dec 5, 2019 at 4:03 PM Jakub Jelinek wrote: > > On Thu, Dec 05, 2019 at 09:56:46AM +0800, Hongtao Liu wrote: > > --- a/gcc/config/i386/i386-expand.c > > +++ b/gcc/config/i386/i386-expand.c > > + /* Using vector move with mask register. */ > > + cmp = force_reg (cmpmode, cmp); >

libgo patch committed: Hurd fix

2019-12-08 Thread Ian Lance Taylor
I've committed this Hurd fix by Samuel Thibault for GCC PR 92861. Ian Index: gcc/go/gofrontend/MERGE === --- gcc/go/gofrontend/MERGE (revision 279063) +++ gcc/go/gofrontend/MERGE (working copy) @@ -1,4 +1,4 @@

Re: [PATCH 32/49] analyzer: new files: pending-diagnostic.{cc|h}

2019-12-08 Thread Jeff Law
On Sun, 2019-12-08 at 09:43 -0500, David Malcolm wrote: > On Sat, 2019-12-07 at 08:05 -0700, Jeff Law wrote: > > On Fri, 2019-11-15 at 20:23 -0500, David Malcolm wrote: > > > This patch adds classes used by the analyzer for handling its > > > diagnostics > > > (queueing them, deduplicating them,

[committed] Add a bswap testcase

2019-12-08 Thread Andrew Pinski
Hi, While testing a GCC patch (which I am not ready to submit yet), I wrote a testcase which had produced wrong code (with an earlier version of the patch). There was no other testcase for it in the testsuite so I adding one. This is a reduced testcase from the uboot PCIe code. Thanks, Andrew

Re: Fix overflows in -fprofile-reorder-functions

2019-12-08 Thread Jan Hubicka
> 2On Sun, 8 Dec 2019, Jan Hubicka wrote: > > > Other explanation would be that our new qsort with broken comparator due to > > overflow can actualy remove some entries in the array, but that sounds bit > > crazy. > > gcc_qsort only reorders elements, making it possible for gcc_qsort_chk (that >

Re: Fix overflows in -fprofile-reorder-functions

2019-12-08 Thread Andreas Schwab
On Dez 08 2019, Jan Hubicka wrote: > Index: cgraphunit.c > === > --- cgraphunit.c (revision 279076) > +++ cgraphunit.c (working copy) > @@ -2359,19 +2359,33 @@ cgraph_node::expand (void) > /* Node comparator that is

Re: Fix overflows in -fprofile-reorder-functions

2019-12-08 Thread Alexander Monakov
2On Sun, 8 Dec 2019, Jan Hubicka wrote: > Other explanation would be that our new qsort with broken comparator due to > overflow can actualy remove some entries in the array, but that sounds bit > crazy. gcc_qsort only reorders elements, making it possible for gcc_qsort_chk (that runs

Re: Fix overflows in -fprofile-reorder-functions

2019-12-08 Thread Jan Hubicka
> Hi, > this patch fixes three sissues with -fprofile-reorder-functions: > 1) First is that tp_first_run is stored as 32bit integer while it can easily >overflow (and does so during Firefox profiling). Actually the overflow problem is possible only with mismatched profiles (which does happen

Re: [C++ Patch] Improve build_*_cast locations

2019-12-08 Thread Jason Merrill
On 12/6/19 4:36 PM, Paolo Carlini wrote: Hi, On 06/12/19 18:53, Jason Merrill wrote: On 12/6/19 11:14 AM, Paolo Carlini wrote: Hi, as promised, the below takes care of the various remaining casts. It's mostly mechanical, follows the same approach used for build_functional_cast. Tested

Re: [nios2, committed] Disable --eh-frame-hdr with -pie or -shared on nios2-linux-gnu

2019-12-08 Thread Sandra Loosemore
On 12/5/19 2:47 PM, Sandra Loosemore wrote: I've checked in this patch to fix a long-standing bug on nios2-linux-gnu that resulted in linker errors like ../nios2-linux-gnu/bin/ld: FDE encoding in /tmp/cccfpQ2l.o(.eh_frame) prevents .eh_frame_hdr table being created when linking with -pie or

Fix overflows in -fprofile-reorder-functions

2019-12-08 Thread Jan Hubicka
Hi, this patch fixes three sissues with -fprofile-reorder-functions: 1) First is that tp_first_run is stored as 32bit integer while it can easily overflow (and does so during Firefox profiling). 2) Second problem is that flag_profile_functions can not be tested w/o function context. The

Fix tp_first_run update in split_function

2019-12-08 Thread Jan Hubicka
Hi, the value 0 in tp_first_run is special meaing that profile is unknown. We should not set it to 1. Bootstrapped/regtested x86_64-linux, comitted. * ipa-split.c (split_function): Preserve 0 tp_first_run. Index: ipa-split.c

Re: [PATCH 32/49] analyzer: new files: pending-diagnostic.{cc|h}

2019-12-08 Thread David Malcolm
On Sat, 2019-12-07 at 08:05 -0700, Jeff Law wrote: > On Fri, 2019-11-15 at 20:23 -0500, David Malcolm wrote: > > This patch adds classes used by the analyzer for handling its > > diagnostics > > (queueing them, deduplicating them, precision-of-wording hooks). > > > > gcc/ChangeLog: > > *

Re: [PATCH 24/49] analyzer: new file: analyzer-pass.cc

2019-12-08 Thread David Malcolm
On Sat, 2019-12-07 at 07:51 -0700, Jeff Law wrote: > On Fri, 2019-11-15 at 20:23 -0500, David Malcolm wrote: > > This patch adds the IPA pass boilerplate for the analyzer. > > > > gcc/ChangeLog: > > * analyzer/analyzer-pass.cc: New file. > Nothing I see controversial here. But obviously will

Re: [PATCH 22/49] analyzer: params.def: new parameters

2019-12-08 Thread David Malcolm
On Sun, 2019-12-08 at 00:42 -0500, Eric Gallager wrote: > On 12/7/19, Jeff Law wrote: > > On Fri, 2019-11-15 at 20:23 -0500, David Malcolm wrote: > > > gcc/ChangeLog: > > > * params.def (PARAM_ANALYZER_BB_EXPLOSION_FACTOR): New param. > > > (PARAM_ANALYZER_MAX_ENODES_PER_PROGRAM_POINT): New

Re: [PATCH 16/49] Add support for in-tree plugins

2019-12-08 Thread David Malcolm
On Sat, 2019-12-07 at 07:39 -0700, Jeff Law wrote: > On Fri, 2019-11-15 at 20:23 -0500, David Malcolm wrote: > > This patch adds support for "in-tree" plugins i.e. GCC plugins that > > live > > in the GCC source tree and are shipped as part of the GCC tarball. > > > > The patch adds

Re: [PATCH 06/49] timevar.h: add auto_client_timevar class

2019-12-08 Thread David Malcolm
On Sat, 2019-12-07 at 07:29 -0700, Jeff Law wrote: > On Fri, 2019-11-15 at 20:22 -0500, David Malcolm wrote: > > This patch adds a class "auto_client_timevar", similar to > > auto_timevar, > > but for plugins to use on their own timing items that aren't in > > timevar.def > > > > gcc/ChangeLog: >

[PATCH 1/2] Fixup for rebase: c-format.c: get_pointer_to_named_type -> get_named_type

2019-12-08 Thread David Malcolm
r278634 changed this, so need to apply this when rebasing gcc/c-family/ChangeLog: * c-format.c (init_dynamic_diag_info): Use get_named_type rather than get_pointer_to_named_type, reflecting r278634. --- gcc/c-family/c-format.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[PATCH 2/2] Rework as a non-plugin

2019-12-08 Thread David Malcolm
gcc/ChangeLog: * Makefile.in (lang_opt_files): Add analyzer.opt. (ANALYZER_OBJS): New. (OBJS): Add ANALYZER_OBJS. * analyzer/Make-plugin.in: Delete file. * analyzer/analysis-plan.cc: Rework headers. Guard with #if ENABLE_ANALYZER.

[PATCH 0/2] v3 of analyzer patch kit (unsquashed)

2019-12-08 Thread David Malcolm
I've most of the way through a v3 of the patch kit, but given the ongoing discussion/review on this mailing list, I thought I'd post what I have so far. I'm going to work on squashing the changes, to produce a v3 relative to trunk. This drops the "in-tree plugin" idea, and the

Silence overactive sanity check with -fpartial-profile-training

2019-12-08 Thread Jan Hubicka
Hi, do_estimate_edge_time tests that cached and real values matches. This test is not working precisely for global profiles because of roundoff issues when profile of clones is subtracted from profile of offline body. This is checked by presence of ipa counter. This breaks with partial profile

Fix flag_toplevel_reorder wrt optimize attribute

2019-12-08 Thread Jan Hubicka
Hi, this is (very likely partial) fix for PR92860 where optimize attribute incorrectly rewrites flag_toplevel_reorder which we handle as global flag. In fact we support per-symbol toplevel reordering for a while so we only need to add the annotation. However we need to inspect all other flags

[patch, fortran, committed] Error on Associate with a program

2019-12-08 Thread Thomas König
Hello world, yet another obvious and simple fix: You cannot really associate the main program with a variable. Committed as r279088 after regression-testing. Regards Thomas 2018-12-08 Thomas Koenig PR fortran/92780 * resolve.c (resolve_assoc_var): Issue error if

[patch, fortran] Add NULL check before checking interfaces

2019-12-08 Thread Thomas Koenig
Hello world, the attached patch fixes an ICE where a NULL check was missing. Committed as obvious and simple after regression-testing as r279087. Since this is an ICE after an error has already been emitted, I don't see any particular need to backport. Regards Thomas 2018-12-08

[patch, fortran] Fix PR 92755

2019-12-08 Thread Thomas Koenig
Hello world, In the fix for PR 91783, I had not considered the case that the _data ref could also be somewhere inside. The solution was obvious and simple: Move the check into the loop over the refs. Committed as r279086 after regression-testing. Regards Thomas 2019-12-08 Thomas