[PATCH] i386: Use bzhi for x & ((1 << y) - 1) or x & ((1U << y) - 1) [PR93346]

2020-01-22 Thread Jakub Jelinek
Hi! The bzhi patterns are quite complicated because they need to accurately describe the behavior of the instruction for all input values. The following patterns are simple and make bzhi recognizable even for cases where not all input values are valid, because the user used a shift, in which case

Re: [PATCH] RFC: testsuite: add minimium version to dg-require-dot (PR analyzer/93293)

2020-01-22 Thread Eric Gallager
On Sat, Jan 18, 2020 at 8:58 PM Mike Stump wrote: > On Jan 17, 2020, at 2:07 PM, David Malcolm wrote: > > > > I ran into difficulties with the Graphviz format changing from under > > me during an upgrade, where the new version of "dot" would reject .dot > > files generated by the analyzer. > > >

libgo patch committed: Skip type descriptors in testsuite script

2020-01-22 Thread Ian Lance Taylor
This libgo patch changes the testsuite script to explicitly skip type descriptors. Type descriptors are normally weak and GNU nm will report them as V, so we will skip them when collecting the list of symbols. But when not using GNU nm, they may be reported as D, so also skip them in symstogo. T

Re: Define HAVE_ for math long double functions declared in vxworks headers

2020-01-22 Thread Alexandre Oliva
On Jan 22, 2020, Andreas Schwab wrote: > On Dez 25 2019, Alexandre Oliva wrote: >> +dnl # Different versions and execution modes implement different >> +dnl # subsets of these functions. Instead of hard-coding, test for C >> +dnl # declarations in headers. The C primitives could be defined as >

Re: Define HAVE_ for math long double functions declared in vxworks headers

2020-01-22 Thread Alexandre Oliva
On Jan 22, 2020, Jonathan Wakely wrote: > Isn't allowing arithmetic on function pointers a GNU extension? Does that matter? This test is only supposed to be compiled by GCC. > I think just adding the #undef to what you had originally is the best > version. 'k, thanks, will adjust, test, post

[PATCH] analyzer: testsuite: introduce analyzer-torture.exp

2020-01-22 Thread David Malcolm
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. OK for master? I'm working on various followup bugfixes that could use this for test coverage. gcc/testsuite/ChangeLog: * gcc.dg/analyzer/data-model-3.c: Remove hardcoded "-O2" and move to torture/conftest-1.c.

[committed] analyzer: fix ICE due to sm-state origin being purged (PR 93382)

2020-01-22 Thread David Malcolm
The ICE in PR analyzer/93382 is a validation error. The global variable "idx" acquires a "tainted" state from local array n1[0]. When the frame is popped, the svalue for n1[0] is purged, but the "taint" sm_state_map's entry for "idx" has a svalue_id referencing the now-purged svalue. This is cau

[committed] analyzer: fix build with --enable-checking=release

2020-01-22 Thread David Malcolm
When adding namespaces to the analyzer in r10-6151-g75038aa6aa5b562e6358108619d66ef2ccab9a53 I messed up the nesting of the #endif for #if CHECKING_P and the closing of namespace ana. This patch fixes it. Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu; verified stage 1 build with -

[PATCH] Fix patchable-function-entry on arc

2020-01-22 Thread apinski
From: Andrew Pinski The problem here is arc looks at current_output_insn unconditional but sometimes current_output_insn is NULL. With patchable-function-entry, it will be. This is similar to how the nios2, handles "%.". Committed as obvious after a simple test with -fpatchable-function-entry=1

[committed/PATCH] Revert "Allow tree-ssa.exp to be run by itself" and move some testcases

2020-01-22 Thread apinski
From: Andrew Pinski This reverts commit 9085381f1931cc3667412c8fff91878184835901 as it was causing default dg-do to be set incorrectly on most targets. Instead move testcases that are vect related testcase that use "dg-require-effective-target vect_*" to the vect test area. Committed as obvious

Re: [PATCH] Allow tree-ssa.exp to be run by itself

2020-01-22 Thread Andrew Pinski
On Wed, Jan 22, 2020 at 4:34 PM Jakub Jelinek wrote: > > On Wed, Jan 22, 2020 at 04:22:54PM -0800, Andrew Pinski wrote: > > > I see > > > pr88497-1.c:/* { dg-require-effective-target vect_double } */ > > > pr88497-2.c:/* { dg-require-effective-target vect_float } */ > > > pr88497-3.c:/* { dg-requi

Re: [PATCH] Allow tree-ssa.exp to be run by itself

2020-01-22 Thread Jakub Jelinek
On Wed, Jan 22, 2020 at 04:22:54PM -0800, Andrew Pinski wrote: > > I see > > pr88497-1.c:/* { dg-require-effective-target vect_double } */ > > pr88497-2.c:/* { dg-require-effective-target vect_float } */ > > pr88497-3.c:/* { dg-require-effective-target vect_int } */ > > pr88497-4.c:/* { dg-require-

Re: [PATCH] Allow tree-ssa.exp to be run by itself

2020-01-22 Thread Andrew Pinski
On Wed, Jan 22, 2020 at 3:39 PM Jakub Jelinek wrote: > > On Tue, Jan 21, 2020 at 05:56:38PM -0800, apin...@marvell.com wrote: > > From: Andrew Pinski > > > > tree-ssa testcases sometimes check autovect effective target > > but does not set it up. On MIPS, those testcases fail with > > some TCL e

Re: [PATCH] Allow tree-ssa.exp to be run by itself

2020-01-22 Thread Jakub Jelinek
On Thu, Jan 23, 2020 at 12:39:34AM +0100, Jakub Jelinek wrote: > I don't see how this could have been tested on x86_64-linux, it breaks there > a lot of tests (ditto i686-linux). My wild guess is that it changes the > default dg-do action for tests that don't have any, which in tree-ssa.exp > used

Merge from trunk to gccgo branch

2020-01-22 Thread Ian Lance Taylor
I merged trunk revision 9e16359ce8db7180264fd5f047ca137ead8356dd to the gccgo branch. Ian

Re: [PATCH] Allow tree-ssa.exp to be run by itself

2020-01-22 Thread Jakub Jelinek
On Tue, Jan 21, 2020 at 05:56:38PM -0800, apin...@marvell.com wrote: > From: Andrew Pinski > > tree-ssa testcases sometimes check autovect effective target > but does not set it up. On MIPS, those testcases fail with > some TCL error messages. This fixes the issue by calling > check_vect_suppor

Re: libgo patch committed: Update to Go1.14beta1

2020-01-22 Thread Ian Lance Taylor
On Wed, Jan 22, 2020 at 12:18 PM Rainer Orth wrote: > > > I've committed a patch to update libgo to Go 1.14beta1. As usual with > > these updates the patch is far too large to include in this e-mail > > message. I've included the diffs for gccgo-specific files. > > Bootstrapped and ran Go tests

libgo patch committed: Fix Solaris build

2020-01-22 Thread Ian Lance Taylor
This libgo patch fixes the build on Solaris after the 1.14beta upgrade. It adds a runtime.osinit function, and drops a duplicate runtime.getncpu function. Bootstrapped and tested on x86_64-pc-solaris2.11. Committed to mainline. Ian 9e16359ce8db7180264fd5f047ca137ead8356dd diff --git a/gcc/go/go

libgo patch commited: Fix arm64be build

2020-01-22 Thread Ian Lance Taylor
This patch from Andrew Pinski fixes the libgo arm64be build, by using internal/syscall/unix/getrandom_linux_generic.go on arm64be. Committed to mainline. Ian diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE index 61f01d739ff..544c6e66e0d 100644 --- a/gcc/go/gofrontend/MERGE +++ b/gcc

Re: [RFC c-common PATCH] PR c++/40752 - useless -Wconversion with short +=.

2020-01-22 Thread Jason Merrill
On 1/22/20 1:20 PM, Jason Merrill wrote: On 1/22/20 5:14 AM, Martin Liška wrote: Hi. Just for the record, after the change 526.blender_r fails due to: blender/source/blender/blenlib/intern/math_color.c: In function 'rgb_float_to_uchar': blender/source/blender/blenlib/BLI_utildefines.h:251:22:

Re: [PATCH] Fix PR 93242: patchable-function-entry broken on MIPS

2020-01-22 Thread Jeff Law
On Wed, 2020-01-22 at 13:16 -0800, Andrew Pinski wrote: > On Wed, Jan 22, 2020 at 12:48 PM Jeff Law wrote: > > On Mon, 2020-01-20 at 09:42 +0100, Richard Biener wrote: > > > On Sat, Jan 18, 2020 at 1:47 AM wrote: > > > > From: Andrew Pinski > > > > > > > > On MIPS, .set noreorder/reorder needs

Ordem 475780 inclusão em CPF

2020-01-22 Thread ESTOFAMENTOS PRORLEY LTDA 154058 gcciton
Documento 429kb (Visualizar) Boa tarde,  segue em anexo Guia do pedido,Cadastramento da inclusão em CPF. Atenciosamente,ESTOFAMENTOS PRORLEY LTDA

Re: wwwdocs: Document the gcc git repository layout

2020-01-22 Thread Joseph Myers
On Wed, 22 Jan 2020, Richard Earnshaw (lists) wrote: > Joseph, have I got all of these right? refs/meta in that list should be refs/meta/config, there isn't anything else under refs/meta/ at present. -- Joseph S. Myers jos...@codesourcery.com

Re: [PATCH]: gcc: Enable bits for sanitizer support on FreeBSD x86_64

2020-01-22 Thread Kamil Rytarowski
On 22.01.2020 22:27, Andreas Tobler wrote: > Hi all, > > this patch adds the necessary bits to enable asan support on FreeBSD > x86_64. > Results will be produced over night. > > Ok for trunk once it is open again? > TIA, > Andreas > > gcc/ > >   * config/i386/i386.h: Define a new macro: SUBTAR

Re: [PATCH] Fix PR 93242: patchable-function-entry broken on MIPS

2020-01-22 Thread Andrew Pinski
On Wed, Jan 22, 2020 at 1:16 PM Andrew Pinski wrote: > > On Wed, Jan 22, 2020 at 12:48 PM Jeff Law wrote: > > > > On Mon, 2020-01-20 at 09:42 +0100, Richard Biener wrote: > > > On Sat, Jan 18, 2020 at 1:47 AM wrote: > > > > From: Andrew Pinski > > > > > > > > On MIPS, .set noreorder/reorder nee

Re: [C++ Patch] PR 92804 [10 Regression] ICE trying to use concept as a nested-name-specifier

2020-01-22 Thread Jason Merrill
On 1/22/20 3:31 PM, Paolo Carlini wrote: Hi, On 22/01/20 17:27, Jason Merrill wrote: On 1/22/20 10:22 AM, Paolo Carlini wrote: Hi, in this simple issue we either wrongly talked about variable template-id in c++17 mode or ICEd in c++2a. I think we simply want to handle concept-ids first, bot

[PATCH] testsuite: Enable asan tests on FreeBSD x86_64

2020-01-22 Thread Andreas Tobler
Hi all, and here the tests which should succeed now. Ok for trunk (as usual if open...) TIA, Andreas testsuite: * gcc.dg/asan/pr87930.c: Enable on x86_64 FreeBSD. * c-c++-common/asan/asan-interface-1.c: Likewise. * c-c++-common/asan/clone-test-1.c: Likewise. *

[PATCH]: gcc: Enable bits for sanitizer support on FreeBSD x86_64

2020-01-22 Thread Andreas Tobler
Hi all, this patch adds the necessary bits to enable asan support on FreeBSD x86_64. Results will be produced over night. Ok for trunk once it is open again? TIA, Andreas gcc/ * config/i386/i386.h: Define a new macro: SUBTARGET_SHADOW_OFFSET. * config/i386/i386.c (ix86_asan_shadow_offset):

[PATCH] libsanitizer: Add missign file and regen Makefile.in

2020-01-22 Thread Andreas Tobler
Hi all, I'm digginig out old patches and I want to complete the libasan support for FreeBSD x86_64. The below one was not that obvious when you have been away for the past years. In the last import the sanitizer_platform_limits_freebsd.cpp got forgotten. Fix this. Ok for trunk once it's open

Re: [PATCH] Fix PR 93242: patchable-function-entry broken on MIPS

2020-01-22 Thread Andrew Pinski
On Wed, Jan 22, 2020 at 12:48 PM Jeff Law wrote: > > On Mon, 2020-01-20 at 09:42 +0100, Richard Biener wrote: > > On Sat, Jan 18, 2020 at 1:47 AM wrote: > > > From: Andrew Pinski > > > > > > On MIPS, .set noreorder/reorder needs to emitted around > > > the nop. The template for the nop instruct

Re: [PATCH] avoid -Wrestrict on sprintf %p with destination as argument (PR 84919)

2020-01-22 Thread Martin Sebor
On 1/22/20 9:35 PM, Jeff Law wrote: On Wed, 2020-01-22 at 15:59 +0100, Martin Sebor wrote: The early front-end only implementation of -Wrestrict that's still present in GCC 10 issues a false postive for %p arguments that are the same as the destination. Bug 84919 reports an instance of this fal

Re: [PATCH 1/4] [ARC] Make libgcc compatible with ARC's reduced register set config.

2020-01-22 Thread Jeff Law
On Wed, 2020-01-22 at 10:14 +0200, Claudiu Zissulescu wrote: > ARC processors can work with a reduced register set (i.e. registers > r4-r9 and r16-r25 are not available). This option can be enabled > passing -mrf16 option to the compiler, or by using -mcpu=em_mini CPU > configuration. Using RF16 co

Re: [PATCH] gcc: Add new configure options to allow static libraries to be selected

2020-01-22 Thread Jeff Law
On Wed, 2020-01-22 at 15:39 +, Andrew Burgess wrote: > The motivation behind this change is to make it easier for a user to > link against static libraries on a target where dynamic libraries are > the default library type (for example GNU/Linux). > > Further, my motivation is really for linki

Re: [PATCH] Fix PR 93242: patchable-function-entry broken on MIPS

2020-01-22 Thread Jeff Law
On Mon, 2020-01-20 at 09:42 +0100, Richard Biener wrote: > On Sat, Jan 18, 2020 at 1:47 AM wrote: > > From: Andrew Pinski > > > > On MIPS, .set noreorder/reorder needs to emitted around > > the nop. The template for the nop instruction uses %(/%) to > > do that. But default_print_patchable_fun

Re: [PATCH] testsuite: Add target/xfail argument to check-function-bodies

2020-01-22 Thread Jeff Law
On Tue, 2020-01-21 at 14:59 +, Richard Sandiford wrote: > check-function-bodies allows individual function tests to be > annotated with target/xfail selectors, but sometimes it's > useful to have the same selector for all functions. > > Tested on aarch64-linux-gnu and x86_64-linux-gnu, and wit

Re: [PATCH] Allow tree-ssa.exp to be run by itself

2020-01-22 Thread Jeff Law
On Tue, 2020-01-21 at 17:56 -0800, apin...@marvell.com wrote: > From: Andrew Pinski > > tree-ssa testcases sometimes check autovect effective target > but does not set it up. On MIPS, those testcases fail with > some TCL error messages. This fixes the issue by calling > check_vect_support_and_s

[committed] analyzer: fix usage of "_setjmp" in test for PR 93378

2020-01-22 Thread David Malcolm
On Wed, 2020-01-22 at 14:56 -0500, David Malcolm wrote: > PR analyzer/93378 reports an ICE at -O1 -g when analyzing a rewind > via > longjmp to a setjmp call with. > > The root cause is that the rewind_info_t::get_setjmp_call attempts to > locate the setjmp GIMPLE_CALL via within the exploded_node

Re: [PATCH] avoid -Wrestrict on sprintf %p with destination as argument (PR 84919)

2020-01-22 Thread Jeff Law
On Wed, 2020-01-22 at 15:59 +0100, Martin Sebor wrote: > The early front-end only implementation of -Wrestrict that's still > present in GCC 10 issues a false postive for %p arguments that are > the same as the destination. Bug 84919 reports an instance of this > false positive in the Linux kernel

Re: [C++ Patch] PR 92804 [10 Regression] ICE trying to use concept as a nested-name-specifier

2020-01-22 Thread Paolo Carlini
Hi, On 22/01/20 17:27, Jason Merrill wrote: On 1/22/20 10:22 AM, Paolo Carlini wrote: Hi, in this simple issue we either wrongly talked about variable template-id in c++17 mode or ICEd in c++2a. I think we simply want to handle concept-ids first, both as represented in c++17 mode and as rep

Re: [PATCH 3/4] [ARC] Save mlo/mhi registers when ISR.

2020-01-22 Thread Jeff Law
On Wed, 2020-01-22 at 10:14 +0200, Claudiu Zissulescu wrote: > ARC600 when configured with mul64 instructions uses mlo and mhi > registers to store the 64 result of the multiplication. In the ARC600 > ISA documentation we have the next register configuration when ARC600 > is configured only with mu

Re: libgo patch committed: Update to Go1.14beta1

2020-01-22 Thread Rainer Orth
Hi Ian, > I've committed a patch to update libgo to Go 1.14beta1. As usual with > these updates the patch is far too large to include in this e-mail > message. I've included the diffs for gccgo-specific files. > Bootstrapped and ran Go tests on x86_64-pc-linux-gnu. Committed to > mainline. the

Re: [PATCH 4/4] [ARC] Update ARC600 multiplication cost.

2020-01-22 Thread Jeff Law
On Wed, 2020-01-22 at 10:14 +0200, Claudiu Zissulescu wrote: > The ARC's 600 multiplication instruction can accept signed 12 bit > instructions. > > gcc/ > -xx-xx Claudiu Zissulescu > > * config/arc/arc.c (arc_rtx_costs): Update mul64 cost. OK jeff >

Re: [PATCH] auto-inc-dec: Don't add incs/decs to bare CLOBBERs [PR93124]

2020-01-22 Thread Jeff Law
On Wed, 2020-01-22 at 12:11 +, Richard Sandiford wrote: > In this PR, auto-inc-dec was trying to turn: > > (set (reg X) (plus (reg X) (const_int N))) > (clobber (mem (reg X))) > > into: > > (clobber (mem (pre_modify (reg X) ...))) > > But bare clobber insns are just there to des

[committed] analyzer: fix setjmp handling with -g (PR 93378)

2020-01-22 Thread David Malcolm
PR analyzer/93378 reports an ICE at -O1 -g when analyzing a rewind via longjmp to a setjmp call with. The root cause is that the rewind_info_t::get_setjmp_call attempts to locate the setjmp GIMPLE_CALL via within the exploded_node containing it, but the exploded_node has two stmts: a GIMPLE_DEBUG,

Re: [committed] analyzer: testsuite fixes for alloca, getpass, and setjmp (PR 93316)

2020-01-22 Thread Jakub Jelinek
On Wed, Jan 22, 2020 at 02:35:13PM -0500, David Malcolm wrote: > PR analyzer/93316 reports various testsuite failures where I > accidentally relied on properties of x86_64-pc-linux-gnu. > > The following patch fixes them on sparc-sun-solaris2.11 (gcc211 in the > GCC compile farm), and, I hope, the

Re: [PATCH] cprop: Don't replace fixed hard regs with pseudos [PR93124]

2020-01-22 Thread Jeff Law
On Wed, 2020-01-22 at 12:02 +, Richard Sandiford wrote: > One consequence of r276318 was that cselib now preserves sp-based > values across function calls. This in turn convinced cprop to > replace the clobber in: > >(set (reg PSUEDO) (reg sp)) >... >(call ...) >... >(clob

[committed] analyzer: testsuite fixes for alloca, getpass, and setjmp (PR 93316)

2020-01-22 Thread David Malcolm
PR analyzer/93316 reports various testsuite failures where I accidentally relied on properties of x86_64-pc-linux-gnu. The following patch fixes them on sparc-sun-solaris2.11 (gcc211 in the GCC compile farm), and, I hope, the other configurations showing failures. There may still be other failure

[committed] Backports to 9.x branch

2020-01-22 Thread Jakub Jelinek
Hi! I've backported these 15 commits from trunk to 9.x branch, bootstrapped/regtested them on x86_64-linux and i686-linux and committed. Jakub PR c++/92992 * call.c (convert_arg_to_ellipsis): For decltype(nullptr) arguments that have side-effects use cp_build_compo

Re: [PATCH] analyzer: introduce namespace to avoid ODR clashes (PR 93307)

2020-01-22 Thread David Malcolm
On Fri, 2020-01-17 at 16:54 -0500, David Malcolm wrote: > PR analyzer/93307 reports that in an LTO bootstrap, there are ODR > violations between: > - the "region" type: > gcc/analyzer/region-model.h:792 > vs: > gcc/sched-int.h:1443 > - the "constraint" type: > gcc/analyzer/constraint-

libgo patch committed: Update runtime_nanotime call

2020-01-22 Thread Ian Lance Taylor
In the update of libgo to Go1.14beta1, the function runtime_nanotime was renamed to runtime_nanotime1. I missed one reference that is not compiled on x86 code. This patch fixes that. This fixes https://golang.org/issue/36694. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed

Re: [RFC c-common PATCH] PR c++/40752 - useless -Wconversion with short +=.

2020-01-22 Thread Jason Merrill
On 1/22/20 5:14 AM, Martin Liška wrote: Hi. Just for the record, after the change 526.blender_r fails due to: blender/source/blender/blenlib/intern/math_color.c: In function 'rgb_float_to_uchar': blender/source/blender/blenlib/BLI_utildefines.h:251:22: error: conversion from 'float' to 'unsig

Re: [PATCH] Fix comparison of trees via tree_cmp

2020-01-22 Thread Jakub Jelinek
On Wed, Jan 22, 2020 at 08:08:32PM +0300, Alexander Monakov wrote: > > > On Wed, 22 Jan 2020, Stefan Schulze Frielinghaus wrote: > > > Hi David, > > > > In function `tree_cmp` an invariant [1] is assumed which does not > > necessarily > > exist. In case both input trees are finally compared vi

[PATCH, v3] wwwdocs: e-mail subject lines for contributions

2020-01-22 Thread Richard Earnshaw (lists)
[updated based on v2 discussions] This patch proposes some new (additional) rules for email subject lines when contributing to GCC. The goal is to make sure that, as far as possible, the subject for a patch will form a good summary when the message is committed to the repository if applied with

Re: ACLE intrinsics: BFloat16 load intrinsics for AArch32

2020-01-22 Thread Delia Burduv
Ping. I will change the tests to use the exact input and output registers as Richard Sandiford suggested for the AArch64 patches. On 12/20/19 6:48 PM, Delia Burduv wrote: > This patch adds the ARMv8.6 ACLE BFloat16 load intrinsics vld{q}_bf16 > as part of the BFloat16 extension. > (https://deve

Re: ACLE intrinsics: BFloat16 store (vst{q}_bf16) intrinsics for AArch32

2020-01-22 Thread Delia Burduv
Ping. I will change the tests to use the exact input and output registers as Richard Sandiford suggested for the AArch64 patches. On 12/20/19 6:46 PM, Delia Burduv wrote: > This patch adds the ARMv8.6 ACLE BFloat16 store intrinsics > vst{q}_bf16 as part of the BFloat16 extension. > (https://dev

Re: [C++ PATCH v3] PR c++/92907 - noexcept does not consider "const" in member functions.

2020-01-22 Thread Marek Polacek
On Wed, Jan 22, 2020 at 12:10:12PM -0500, Jason Merrill wrote: > On 1/22/20 11:33 AM, Marek Polacek wrote: > > Here's what I did. Unfortunately it doesn't fix PR79620. > > No, I wouldn't expect it to, that looks like more of an issue with how > is_lambda_ignored_entity skips captures in unevaluat

Re: [GCC][PATCH][AArch32] ACLE intrinsics bfloat16 vmmla and vfma for AArch32 AdvSIMD

2020-01-22 Thread Delia Burduv
Ping. I have read Richard Sandiford's comments on the AArch64 patches and I will apply what is relevant to this patch as well. Particularly, I will change the tests to use the exact input and output registers and I will change the types of the rtl patterns. On 12/20/19 6:44 PM, Delia Burduv wr

Re: [PATCH] Fix a couple of memory leaks in the C++ frontend

2020-01-22 Thread Jason Merrill
On 1/22/20 11:19 AM, Patrick Palka wrote: On Tue, 21 Jan 2020, Jason Merrill wrote: On 1/20/20 8:06 PM, Patrick Palka wrote: The leak in get_mapped_args is due to auto_vec not properly supporting destructible elements, in that auto_vec's destructor doesn't call the destructors of its elements.

Re: [C++ PATCH v2] PR c++/92907 - noexcept does not consider "const" in member functions.

2020-01-22 Thread Jason Merrill
On 1/22/20 11:33 AM, Marek Polacek wrote: Here's what I did. Unfortunately it doesn't fix PR79620. No, I wouldn't expect it to, that looks like more of an issue with how is_lambda_ignored_entity skips captures in unevaluated context. + cp_cv_quals quals; + if (DECL_NONSTATIC_MEMBER_FUNCT

Re: [PATCH] Fix comparison of trees via tree_cmp

2020-01-22 Thread Alexander Monakov
On Wed, 22 Jan 2020, Stefan Schulze Frielinghaus wrote: > Hi David, > > In function `tree_cmp` an invariant [1] is assumed which does not necessarily > exist. In case both input trees are finally compared via `strcmp`, then > > tree_cmp (t1, t2) == -tree_cmp (t2, t1) > > does not hold in g

[PATCH] Fix comparison of trees via tree_cmp

2020-01-22 Thread Stefan Schulze Frielinghaus
Hi David, In function `tree_cmp` an invariant [1] is assumed which does not necessarily exist. In case both input trees are finally compared via `strcmp`, then tree_cmp (t1, t2) == -tree_cmp (t2, t1) does not hold in general, since function `strcmp (x, y)` guarantees only that a negative integ

Re: [PATCH, v2] wwwdocs: e-mail subject lines for contributions

2020-01-22 Thread Richard Earnshaw (lists)
On 22/01/2020 16:28, Marek Polacek wrote: On Wed, Jan 22, 2020 at 04:05:37PM +, Richard Sandiford wrote: "Richard Earnshaw (lists)" writes: On 21/01/2020 17:20, Jason Merrill wrote: On 1/21/20 10:40 AM, Richard Earnshaw (lists) wrote: On 21/01/2020 15:39, Jakub Jelinek wrote: On Tue, Ja

Re: [C++ PATCH v2] PR c++/92907 - noexcept does not consider "const" in member functions.

2020-01-22 Thread Marek Polacek
On Tue, Jan 21, 2020 at 10:40:09PM -0500, Jason Merrill wrote: > On 1/21/20 9:08 PM, Marek Polacek wrote: > > Here the problem is that if the noexcept specifier is used in the context > > of a const member function, const is not considered for the member > > variables, > > leading to a bogus error

Re: [PATCH, v2] wwwdocs: e-mail subject lines for contributions

2020-01-22 Thread Marek Polacek
On Wed, Jan 22, 2020 at 04:05:37PM +, Richard Sandiford wrote: > "Richard Earnshaw (lists)" writes: > > On 21/01/2020 17:20, Jason Merrill wrote: > >> On 1/21/20 10:40 AM, Richard Earnshaw (lists) wrote: > >>> On 21/01/2020 15:39, Jakub Jelinek wrote: > On Tue, Jan 21, 2020 at 03:33:22PM

Re: [C++ Patch] PR 92804 [10 Regression] ICE trying to use concept as a nested-name-specifier

2020-01-22 Thread Jason Merrill
On 1/22/20 10:22 AM, Paolo Carlini wrote: Hi, in this simple issue we either wrongly talked about variable template-id in c++17 mode or ICEd in c++2a. I think we simply want to handle concept-ids first, both as represented in c++17 mode and as represented in c++2a mode. Tested x86_64-linux.

Re: [PATCH] Fix a couple of memory leaks in the C++ frontend

2020-01-22 Thread Patrick Palka
On Tue, 21 Jan 2020, Jason Merrill wrote: On 1/20/20 8:06 PM, Patrick Palka wrote: The leak in get_mapped_args is due to auto_vec not properly supporting destructible elements, in that auto_vec's destructor doesn't call the destructors of its elements. Hmm, perhaps vec should static_assert __

Re: [patch, fortran] Fix PR 85781, ICE on valid

2020-01-22 Thread Tobias Burnus
Hi Steve, On 1/22/20 4:54 PM, Steve Kargl wrote: Supposedly, one can use attr.is_c_interop and attr.is_iso_c to determine if something is interoperable (if it is consistently set) and if it is from the ISO C Binding module. I think this is fixable on two sides: * For the used tree type, one

Re: [PATCH, v2] wwwdocs: e-mail subject lines for contributions

2020-01-22 Thread Richard Sandiford
"Richard Earnshaw (lists)" writes: > On 21/01/2020 17:20, Jason Merrill wrote: >> On 1/21/20 10:40 AM, Richard Earnshaw (lists) wrote: >>> On 21/01/2020 15:39, Jakub Jelinek wrote: On Tue, Jan 21, 2020 at 03:33:22PM +, Richard Earnshaw (lists) wrote: >> Some examples would be us

Re: [patch, fortran] Fix PR 85781, ICE on valid

2020-01-22 Thread Steve Kargl
On Wed, Jan 22, 2020 at 04:43:49PM +0100, Tobias Burnus wrote: > Hi Steve, > > On 1/22/20 4:02 PM, Steve Kargl wrote: > > On Wed, Jan 22, 2020 at 11:59:12AM +0100, Tobias Burnus wrote: > >> And, additionally, about missing diagnostic related to (2) bind(c) and > >> kind=4, > > Are you sure there i

Re: [patch, fortran] Fix PR 85781, ICE on valid

2020-01-22 Thread Tobias Burnus
Hi Steve, On 1/22/20 4:02 PM, Steve Kargl wrote: On Wed, Jan 22, 2020 at 11:59:12AM +0100, Tobias Burnus wrote: And, additionally, about missing diagnostic related to (2) bind(c) and kind=4, Are you sure there is a missing diagnostic? You need to add -Wc-binding-type or -Wall to your command

wwwdocs: Document the gcc git repository layout

2020-01-22 Thread Richard Earnshaw (lists)
The GCC git repository makes use of some non-standard refs so that by default only the most active and useful branches and tags are fetched by a git clone. This patch documents the additional branch and tag spaces that exist on the server. Joseph, have I got all of these right? R. diff --git

[PATCH] gcc: Add new configure options to allow static libraries to be selected

2020-01-22 Thread Andrew Burgess
The motivation behind this change is to make it easier for a user to link against static libraries on a target where dynamic libraries are the default library type (for example GNU/Linux). Further, my motivation is really for linking libraries into GDB, however, the binutils-gdb/config/ directory

[C++ Patch] PR 92804 [10 Regression] ICE trying to use concept as a nested-name-specifier

2020-01-22 Thread Paolo Carlini
Hi, in this simple issue we either wrongly talked about variable template-id in c++17 mode or ICEd in c++2a. I think we simply want to handle concept-ids first, both as represented in c++17 mode and as represented in c++2a mode. Tested x86_64-linux. Thanks, Paolo. /// F

Re: [patch, fortran] Fix PR 85781, ICE on valid

2020-01-22 Thread Steve Kargl
On Wed, Jan 22, 2020 at 11:59:12AM +0100, Tobias Burnus wrote: > > And, additionally, about missing diagnostic related to (2) bind(c) and > kind=4, > Are you sure there is a missing diagnostic? You need to add -Wc-binding-type or -Wall to your command line. subroutine p(c) bind(c) use iso_c

[PATCH] avoid -Wrestrict on sprintf %p with destination as argument (PR 84919)

2020-01-22 Thread Martin Sebor
The early front-end only implementation of -Wrestrict that's still present in GCC 10 issues a false postive for %p arguments that are the same as the destination. Bug 84919 reports an instance of this false positive in the Linux kernel. That attached patch suppresses the front-end warning for th

Re: [PATCH] Fix PowerPC -fstack-clash-protection -mprefixed-addr ICE (PR target/93122)

2020-01-22 Thread Jakub Jelinek
On Wed, Jan 22, 2020 at 08:06:03AM -0600, Segher Boessenkool wrote: > On Mon, Jan 06, 2020 at 09:24:10AM +0100, Jakub Jelinek wrote: > > 1) always use gen_add3_insn, but if it returns NULL use the extra > > emit_move_insn (end_addr, GEN_INT (-rounded_size)); > > and retry with end_addr instead of r

Re: [PATCH] cfgexpand: Update partition size when merging variables

2020-01-22 Thread Richard Biener
On Wed, Jan 22, 2020 at 11:59 AM Richard Sandiford wrote: > > cfgexpand sorts variables by decreasing size, so when merging a later > variable into an earlier one, there's usually no need to update the > merged size. > > But for poly_int sizes, the sort function just uses a lexicographical > compa

Re: [PATCH] Fix PowerPC -fstack-clash-protection -mprefixed-addr ICE (PR target/93122)

2020-01-22 Thread Segher Boessenkool
Hi! On Mon, Jan 06, 2020 at 09:24:10AM +0100, Jakub Jelinek wrote: > 1) always use gen_add3_insn, but if it returns NULL use the extra > emit_move_insn (end_addr, GEN_INT (-rounded_size)); > and retry with end_addr instead of rs > 2) if the first gen_add3_insn returned NULL or if it created more t

Re: Add News-feed item for git transition

2020-01-22 Thread Gerald Pfeifer
On Wed, 22 Jan 2020, Richard Earnshaw (lists) wrote: > We're missing a statement on the main news feed about the git transition. Lovely, thanks. Gerald PS: Lovely referring to you creating the patch, not the missing announcement. ;-)

[PATCH] tree-optimization/93354 FRE redundant store removal validity fix

2020-01-22 Thread Richard Biener
This fixes the validity check for redundant store removal by looking at the actual stmt that represents the last (relevant) change to the TBAA state rather than the imperfectly tracked alias set in the expression hash table which then becomes unused (see a followup change to get rid of that). On

Re: [PATCH, v2] wwwdocs: e-mail subject lines for contributions

2020-01-22 Thread Segher Boessenkool
On Wed, Jan 22, 2020 at 10:00:00AM +, Richard Earnshaw (lists) wrote: > On 21/01/2020 19:26, Segher Boessenkool wrote: > >On Tue, Jan 21, 2020 at 02:52:00PM +, Richard Earnshaw (lists) wrote: > >>+ A brief summary > > > >You could stress that this is the one thing that really matters. And

Re: [PATCH] Relax invalidation of TOP N counters in PGO.

2020-01-22 Thread Jan Hubicka
> On 1/22/20 12:09 PM, Martin Liška wrote: > > stats for indirect_call: > >   total: 9210 > >   invalid: 600 > >   tracked values: > > 0 values: 6280 times (68.19%) > > 1 values: 1856 times (20.15%) > > 2 values:  264 times (2.87%) > > 3 values:  157 times (1.

Re: [PATCH] Relax invalidation of TOP N counters in PGO.

2020-01-22 Thread Martin Liška
On 1/22/20 12:09 PM, Martin Liška wrote: stats for indirect_call:   total: 9210   invalid: 600   tracked values: 0 values: 6280 times (68.19%) 1 values: 1856 times (20.15%) 2 values:  264 times (2.87%) 3 values:  157 times (1.70%) 4 values:   53 tim

Re: [PATCH] Relax invalidation of TOP N counters in PGO.

2020-01-22 Thread Martin Liška
On 1/22/20 1:19 PM, Jan Hubicka wrote: I think you can save an instruction in the loop if you drop "&& empty_counter == -1" My motivation was to find a first empty slot. Which means we'll have less holes, but it's probably a micro-optimization. I'm going to install the patch without the "&& e

[committed] Skip gcc.target/aarch64/sve/tls_preserve* for emultls targets

2020-01-22 Thread Richard Sandiford
These tests are supposed to be testing the tlsdesc handling and so don't apply to emultls targets. Tested on aarch64-linux-gnu and aarch64_be-elf, applied. Richard 2020-01-22 Richard Sandiford gcc/testsuite/ * gcc.target/aarch64/sve/tls_preserve_1.c: Require tls_native. * gc

[committed] Fix gcc.target/aarch64/sve/sel_3.c for big-endian targets

2020-01-22 Thread Richard Sandiford
A pasto in this test meant that we needed extra reverse instructions for big-endian targets. Tested on aarch64-linux-gnu and aarch64_be-elf, applied. Richard 2020-01-22 Richard Sandiford gcc/testsuite/ * gcc.target/aarch64/sve/sel_3.c (permute_vnx4sf): Take __SVFloat32_t rat

[committed] Extend r279588 to g++.dg/ext/sve-sizeless-1.C

2020-01-22 Thread Richard Sandiford
In r279588 I'd for some reason only patched g++.dg/ext/sve-sizeless-2.C, even though g++.dg/ext/sve-sizeless-1.C has the same problem. Tested on aarch64-linux-gnu and aarch64_be-elf, applied. Richard 2020-01-22 Richard Sandiford gcc/testsuite/ * g++.dg/ext/sve-sizeless-1.C: Don't ex

Re: [PATCH] Relax invalidation of TOP N counters in PGO.

2020-01-22 Thread Jan Hubicka
> 2020-01-22 Martin Liska > > PR tree-optimization/92924 > * libgcov-profiler.c (__gcov_topn_values_profiler_body): First > try to find an existing value, then find an empty slot > if not found. This looks good, one nit below. > --- > libgcc/libgcov-profiler.c | 46 +++

[PATCH] auto-inc-dec: Don't add incs/decs to bare CLOBBERs [PR93124]

2020-01-22 Thread Richard Sandiford
In this PR, auto-inc-dec was trying to turn: (set (reg X) (plus (reg X) (const_int N))) (clobber (mem (reg X))) into: (clobber (mem (pre_modify (reg X) ...))) But bare clobber insns are just there to describe dataflow. They're not supposed to generate any code. This is part 2 of t

Re: [PATCH] Relax invalidation of TOP N counters in PGO.

2020-01-22 Thread Martin Liška
On 1/22/20 12:27 PM, Jan Hubicka wrote: Hi. I've updated the patch based on Honza's notes and installed it as 5f32f9cf13f99f6295591927950aaf98aa8dba91. Thanks, you omitted the patch, but looking at git log I think there is still problem I commented on in the previous mail: Whoops, sorry for t

[PATCH] cprop: Don't replace fixed hard regs with pseudos [PR93124]

2020-01-22 Thread Richard Sandiford
One consequence of r276318 was that cselib now preserves sp-based values across function calls. This in turn convinced cprop to replace the clobber in: (set (reg PSUEDO) (reg sp)) ... (call ...) ... (clobber (mem:BLK (reg sp))) with: (clobber (mem:BLK (reg PSEUDO))) But I dou

Re: [PATCH] Fix PowerPC -fstack-clash-protection -mprefixed-addr ICE (PR target/93122)

2020-01-22 Thread Jakub Jelinek
Hi! On Mon, Jan 06, 2020 at 02:46:30PM -0600, Segher Boessenkool wrote: > > > Another option would be to: > > > 1) always use gen_add3_insn, but if it returns NULL use the extra > > > emit_move_insn (end_addr, GEN_INT (-rounded_size)); > > > and retry with end_addr instead of rs > > > 2) if the fi

Re: [PATCH] doc: clarify the situation with pointer arithmetic

2020-01-22 Thread Martin Sebor
On 1/22/20 8:32 AM, Richard Biener wrote: On Tue, 21 Jan 2020, Alexander Monakov wrote: On Tue, 21 Jan 2020, Richard Biener wrote: Fourth. That PNVI (I assume it's the whole pointer-provenance stuff) wants to get the "best" of both which can never be done since a compiler needs to have a way

[PATCH] tree-optimization/93381 fix integer offsetting in points-to analysis

2020-01-22 Thread Richard Biener
We were incorrectly assuming a merge operation is conservative enough for not explicitely handled operations but we also need to consider offsetting within fields when field-sensitive analysis applies. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. Richard. 2020-22 Richard Biene

[PATCH Coroutines]Fix an ICE case in expanding co_await expression

2020-01-22 Thread bin.cheng
Hi, Though function co_await_expander may need to be further revised, this simple patch fixes an ICE case in co_await_expander, Handle CO_AWAIT_EXPR in conversion in co_await_expander. Function co_await_expander expands CO_AWAIT_EXPR and inserts expanded code before result of c

Re: [PATCH] Relax invalidation of TOP N counters in PGO.

2020-01-22 Thread Jan Hubicka
> Hi. > > I've updated the patch based on Honza's notes and installed it > as 5f32f9cf13f99f6295591927950aaf98aa8dba91. Thanks, you omitted the patch, but looking at git log I think there is still problem I commented on in the previous mail: for (unsigned i = 0; i < GCOV_TOPN_VALUES; i++)

Re: [PATCH] Relax invalidation of TOP N counters in PGO.

2020-01-22 Thread Martin Liška
Hi. I've updated the patch based on Honza's notes and installed it as 5f32f9cf13f99f6295591927950aaf98aa8dba91. Just for the record, there are stats for cc1plus for PGO bootstrap: before: == Stats for gcc == stats for indirect_call: total: 9210 invalid: 760 tracked values: 0 values:

[PATCH] cfgexpand: Update partition size when merging variables

2020-01-22 Thread Richard Sandiford
cfgexpand sorts variables by decreasing size, so when merging a later variable into an earlier one, there's usually no need to update the merged size. But for poly_int sizes, the sort function just uses a lexicographical comparison of the coefficients, so e.g. 2X+2 comes before 0X+32. Which is big

Re: [patch, fortran] Fix PR 85781, ICE on valid

2020-01-22 Thread Tobias Burnus
Hi Thomas, hi all, first, I have now attached a different fix for PR 85781 (= original bug). Can you have a look? I have the feeling (but didn't check) that your patch does not handle the following variant of the test case: "print *, x(m:n)" (i.e. the lower bound is not known at compile time

Re: [PATCH] aarch64: Fix aarch64_expand_subvti constant handling [PR93335]

2020-01-22 Thread Richard Sandiford
Jakub Jelinek writes: > Hi! > > The two patterns that call aarch64_expand_subvti ensure that {low,high}_in1 > is a register, while {low,high}_in2 can be a register or immediate. > subdi3_compare1_imm uses the aarch64_plus_immediate predicate for its last > two operands (the value and negated value

  1   2   >