Re: [libcc1] add support for C++

2017-01-23 Thread Alexandre Oliva
On Jan 23, 2017, Jason Merrill wrote: > Better to fix an inconsistent API now than leave it to confuse future > developers, I would think. Here's an incremental patch to the API, with all the proposed name changes to make the whole thing more consistent (the conventions are made explicit at the

Re: GCC 6 RFA: Go patch: call determine_types even for constant expressions

2017-01-23 Thread Ian Lance Taylor
On Thu, Dec 15, 2016 at 4:25 PM, Ian Lance Taylor wrote: > On Thu, Dec 15, 2016 at 2:47 PM, Ian Lance Taylor wrote: >> The Go frontend needs to call determine_types even for constant >> expressions, which it was not doing. The problem is that a constant >> expression may include code like unsafe

Re: [libcc1] add support for C++

2017-01-23 Thread Alexandre Oliva
On Jan 22, 2017, Alexandre Oliva wrote: > On Jan 13, 2017, Jason Merrill wrote: >> On 09/23/2016 08:41 PM, Alexandre Oliva wrote: >>> +/* Create a modified version of a function type that has default >>> + values for some of its arguments. The returned type should ONLY be >>> + used to defi

Re: [PATCH 3/5] simply handling of -Wformat-overflow/truncation options (PR 78703)

2017-01-23 Thread Martin Sebor
2017-01-20 Martin Sebor * gimple-ssa-sprintf.c (warn_level): New global. (format_integer): Use it here and throughout the rest of the file. Use the same switch to compute sign as base. (maybe_warn): New function. (format_directive): Factor out warnings

Re: [PATCH] Enable -fsanitize=thread and =leak support on ppc64{,le}

2017-01-23 Thread David Edelsohn
On Mon, Jan 23, 2017 at 7:20 PM, Jakub Jelinek wrote: > Hi! > > On Mon, Jan 23, 2017 at 03:32:46PM +0100, Jakub Jelinek wrote: >> I think it should be enabled if it works, even this late. >> I bet we need something like the following patch on top of >> the PR79168 patch. >> >> I'll test both patch

Re: [libcc1] add support for C++

2017-01-23 Thread Alexandre Oliva
On Jan 23, 2017, Jason Merrill wrote: > On Sun, Jan 22, 2017 at 6:06 PM, Alexandre Oliva wrote: >> On Jan 13, 2017, Jason Merrill wrote: >> >>> On 09/23/2016 08:41 PM, Alexandre Oliva wrote: +static tree global_friend_list; >> >>> This should be a hash_set rather than a TREE_LIST. >> >>

[PATCH] Enable -fsanitize=thread and =leak support on ppc64{,le}

2017-01-23 Thread Jakub Jelinek
Hi! On Mon, Jan 23, 2017 at 03:32:46PM +0100, Jakub Jelinek wrote: > I think it should be enabled if it works, even this late. > I bet we need something like the following patch on top of > the PR79168 patch. > > I'll test both patches on both ppc64le and ppc64. > > Another question is, it seems

Re: A + B CMP A -> A CMP' CST' match.pd patterns [was [PATCH] avoid calling memset et al. with excessively large sizes (PR 79095)]

2017-01-23 Thread Jeff Law
On 01/21/2017 01:00 AM, Marc Glisse wrote: On Fri, 20 Jan 2017, Jeff Law wrote: On 01/20/2017 04:30 PM, Jeff Law wrote: Going to work from the self-contained test... Here's a test case that's closer to the one from the bug. It also ends up with the out of bounds memset even at -O1, during

Re: [PATCH] PR libstdc++/79195 fix make_array type deduction

2017-01-23 Thread Jonathan Wakely
On 23/01/17 18:40 -0500, David Edelsohn wrote: FAIL: experimental/array/make_array.cc (test for excess errors) Excess errors: /nasfarm/edelsohn/src/src/libstdc++v3/testsuite/experimental/array/make_array.cc:38: error: 'ref' is not a member of 'std' I wonder why I didn't see that fail, probabl

Re: [PATCH/AARCH64] Improve ThunderX2 T99 address cost model

2017-01-23 Thread Richard Earnshaw
On 23/01/17 23:35, Andrew Pinski wrote: > Hi, > On ThunderX 2, the logical shifts that are part of the address cause > a 1 cycle extra and this is not modeled correctly. For induction > variables we don't want to do the shift. When I change the cost for > the shift of the addresses, I get a 12%

Re: [PATCH, v2] (9e) Update "startwith" logic for pass-skipping to handle __RTL functions

2017-01-23 Thread Jeff Law
On 01/19/2017 10:22 AM, David Malcolm wrote: ...the problem being that into_cfglayout's execute vfunc calls cfg_layout_initialize, which does a lot more that just cfg_layout_rtl_register_cfg_hooks (the skip hack does just the latter). + /* Don't skip df init; later RTL passes need it. */ +

Re: [PATCH] Fix libsanitizer merge (PR sanitizer/79168)

2017-01-23 Thread Jeff Law
On 01/23/2017 03:28 PM, Jakub Jelinek wrote: Hi! The merge.sh script seems to remove lines 2 and 3 regardless of what they contain. If they contain the The LLVM Compiler Infrastructure comment, we do want that, but a couple of files (mostly *.S) don't contain that. The following patch ought to

Re: [PATCH] PR libstdc++/79195 fix make_array type deduction

2017-01-23 Thread David Edelsohn
FAIL: experimental/array/make_array.cc (test for excess errors) Excess errors: /nasfarm/edelsohn/src/src/libstdc++v3/testsuite/experimental/array/make_array.cc:38: error: 'ref' is not a member of 'std'

Re: [PATCH][doc] Correct optimisation levels documentation for -fstore-merging

2017-01-23 Thread Jeff Law
On 01/23/2017 10:28 AM, Kyrill Tkachov wrote: Hi all, I had forgotten to update the -fstore-merging documentation from a previous iteration of the pass and it says that it's enabled at -O and higher. The option is in fact enabled at -O2 and higher, as well as -Os. This patch clarifies that. Is

[PATCH/AARCH64] Improve ThunderX2 T99 address cost model

2017-01-23 Thread Andrew Pinski
Hi, On ThunderX 2, the logical shifts that are part of the address cause a 1 cycle extra and this is not modeled correctly. For induction variables we don't want to do the shift. When I change the cost for the shift of the addresses, I get a 12% improvement on HMMER; all over benchmarks in SPEC

Re: [patch] update zlib to the 1.2.10 release.

2017-01-23 Thread Iain Buclaw
On 22 January 2017 at 19:42, Matthias Klose wrote: > On 22.01.2017 19:12, NightStrike wrote: >> On Sun, Jan 22, 2017 at 1:00 PM, Matthias Klose wrote: >>> NightStrike proposed to revert to the 1.2.8 release until zlib stabilizes >>> again; >>> I'm open for that, but didn't want to stay with the

[committed] neeeded -> needed

2017-01-23 Thread Jakub Jelinek
Hi! WHen looking at PR79176, I've noticed too many eees in a function name. Fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux, committed to trunk as obvious. 2017-01-23 Jakub Jelinek * tree.h (assign_assembler_name_if_neeeded): Rename to ... (assign_assemble

[PATCH] Fix libsanitizer merge (PR sanitizer/79168)

2017-01-23 Thread Jakub Jelinek
Hi! The merge.sh script seems to remove lines 2 and 3 regardless of what they contain. If they contain the The LLVM Compiler Infrastructure comment, we do want that, but a couple of files (mostly *.S) don't contain that. The following patch ought to fix that. Bootstrapped/regtested on x86_64-lin

Re: [PR middle-end/79123] cast false positive in -Walloca-larger-than=

2017-01-23 Thread Jeff Law
On 01/19/2017 05:17 AM, Aldy Hernandez wrote: In the attached testcase, we have a clearly bounded case of alloca which is being incorrectly reported: void g (int *p, int *q) { size_t n = (size_t)(p - q); if (n < 10) f (__builtin_alloca (n)); } The problem is that VRP gives us an ant

Re: [PR middle-end/79123] cast false positive in -Walloca-larger-than=

2017-01-23 Thread Jeff Law
On 01/19/2017 05:17 AM, Aldy Hernandez wrote: In the attached testcase, we have a clearly bounded case of alloca which is being incorrectly reported: void g (int *p, int *q) { size_t n = (size_t)(p - q); if (n < 10) f (__builtin_alloca (n)); } The problem is that VRP gives us an ant

libgo patch committed: Update to go1.8rc2

2017-01-23 Thread Ian Lance Taylor
I have committed a patch to libgo to update to the go1.8rc2 release candidate. This uncovered a bug in the calculation of the hash code for reflect.FuncOf, which is fixed by this patch. I noticed while doing the merge that somewhere along the way a bunch of testdata files were dropped. I added t

Re: [PATCH] Fix false positive for -Walloc-size-larger-than (PR, bootstrap/79132).

2017-01-23 Thread Jeff Law
On 01/19/2017 04:46 AM, Martin Liška wrote: Hello. Following patch fixes asan bootstrap, as mentioned in the PR. Ready to be installed? Thanks, Martin 0001-Fix-false-positive-for-Walloc-size-larger-than-PR-bo.patch From 6a3d1b85e124751fdb804ae86596d30ea98b54af Mon Sep 17 00:00:00 2001 From:

Re: [PR 79108] Put ipa_node_params to GC memory

2017-01-23 Thread Rainer Orth
Hi Martin, > when I fixed PR 78365 by streaming types of parameters that might not > have been anywhere else, I forgot that I was holding them in non-GC > memory and so I caused PR 79108. The following patch fixes it by > putting ipa_param_descriptor and ipa_node_params structures into GC > memor

Re: [PR c++/78469] default ctor makes dtor required

2017-01-23 Thread Jason Merrill
On Wed, Jan 18, 2017 at 1:25 PM, Nathan Sidwell wrote: > I've figured out what's happening here. Just not sure of the most prudent > way to fix it. > > struct no_destr { > no_destr() = default; > > protected: > ~no_destr() = default; > }; > > void *Foo () > { > return new no_destr (); > } >

Re: [C++ PATCH] 79118 bitfields & constexpr

2017-01-23 Thread Jason Merrill
On Mon, Jan 23, 2017 at 4:13 PM, Jakub Jelinek wrote: > On Mon, Jan 23, 2017 at 04:06:22PM -0500, Jason Merrill wrote: >> > The right solution is to fix the IR. In the C++ FE have BITFIELD_REF (or a >> > new node) look much more like COMPONENT_REF (or even be COMPONENT_REF, but >> > I >> > suspe

Re: A + B CMP A -> A CMP' CST' match.pd patterns [was [PATCH] avoid calling memset et al. with excessively large sizes (PR 79095)]

2017-01-23 Thread Jeff Law
On 01/23/2017 02:10 AM, Richard Biener wrote: I think it was added for the reason stated in the comment: /* When one argument is a constant, overflow detection can be simplified. Currently restricted to single use so as not to interfere too much with ADD_OVERFLOW detection in tree-ssa-mat

Re: [C++ PATCH] 79118 bitfields & constexpr

2017-01-23 Thread Jakub Jelinek
On Mon, Jan 23, 2017 at 04:06:22PM -0500, Jason Merrill wrote: > > The right solution is to fix the IR. In the C++ FE have BITFIELD_REF (or a > > new node) look much more like COMPONENT_REF (or even be COMPONENT_REF, but I > > suspect lots of places think ADDR (COMPONENT_REF (...)) is legit). And

Re: [C++ PATCH] 79118 bitfields & constexpr

2017-01-23 Thread Jason Merrill
On Mon, Jan 23, 2017 at 8:49 AM, Nathan Sidwell wrote: > This patch addresses 79118, where we ICE on a constexpr involving bitfields > in an unnamed struct (unnamed struct members are a g++ extension). > > This is really a band-aid, because our internal representation BITFIELD_REF > and the (prema

Re: [PATCH] Fix PR79088/79188

2017-01-23 Thread Jeff Law
On 01/23/2017 06:17 AM, Richard Biener wrote: The following is a fix for jump-threading loop-assumption clearing which was done only on the first header/irreducible crossing rather than the one at the destination of the threading path. Bootstrapped and tested on x86_64-unknown-linux-gnu, ok for

Re: [PATCH 5/5] add support for width and precision ranges (PR 78703)

2017-01-23 Thread Jeff Law
On 01/22/2017 04:53 PM, Martin Sebor wrote: This is the last patch in the series. It adds logic to handle non-constant width and precision with range information to help reduce both false positives false negatives. The patch replaces the scalar width and precision with two element arrays throug

[PATCH] -fsanitize=address,undefined support on s390x

2017-01-23 Thread Jakub Jelinek
On Mon, Jan 23, 2017 at 04:10:01PM +0100, Ulrich Weigand wrote: > Bill Schmidt wrote: > > On Jan 23, 2017, at 8:32 AM, Jakub Jelinek wrote: > > > > > > Another question is, it seems upstream has s390{,x}-*-linux* support for > > > asan/ubsan, does that work? In that case we should add it to > >

Re: [C++ Patch/RFC] PR 72764

2017-01-23 Thread Jason Merrill
On Mon, Jan 23, 2017 at 11:15 AM, Paolo Carlini wrote: > in this relatively serious ICE on invalid regression (we don't emit any > message before ICEing) make_typename_type, called by strip_typedefs, returns > error_mark_node which then isn't handled by typedef_variant_p. Indeed, Jakub > noticed t

Re: [c== pATCH] 71710 dependent FIELD_DECL

2017-01-23 Thread Jason Merrill
On Mon, Jan 23, 2017 at 12:09 PM, Nathan Sidwell wrote: > Jason, > Bug 71710 is a crash on 'decltype (a)', where 'a' is a FIELD_DECL wth > dependent type. finish_class_member_access_expr barfs on that. The earlier > sequence of if..elses has a check for FIELD_DECL, but that's in the shadow > of

Re: [C++ PATCH] 71406, 77508 scoped template_ids

2017-01-23 Thread Jason Merrill
OK. On Mon, Jan 23, 2017 at 1:53 PM, Nathan Sidwell wrote: > This patch fixes 71406 and 77508, which are both ICEs dealing with > 'X::Foo<...>'. finish_class_member_access_expr wasn't prepared to handle > SCOPE_REF (TEMPLATE_ID_EXPR (...)), which is what it was being fed. Fixed > by moving the

Re: [libcc1] add support for C++

2017-01-23 Thread Jason Merrill
On Sun, Jan 22, 2017 at 6:06 PM, Alexandre Oliva wrote: > On Jan 13, 2017, Jason Merrill wrote: > >> On 09/23/2016 08:41 PM, Alexandre Oliva wrote: >>> +static tree global_friend_list; > >> This should be a hash_set rather than a TREE_LIST. > > You sure? At least in the libcc1 use scenario, this

Re: [PATCH 3/5] simply handling of -Wformat-overflow/truncation options (PR 78703)

2017-01-23 Thread Jeff Law
On 01/22/2017 04:53 PM, Martin Sebor wrote: The attached patch is the last of the refactoring/restructuring series. It consists of the following changes: 1) Introduce a single global variable, warn_level, that the pass uses to test the level of the warning that applies to the function currently

Re: [PATCH 2/5] remove unused member (PR 78703)

2017-01-23 Thread Jeff Law
On 01/22/2017 04:52 PM, Martin Sebor wrote: The attached simple patch removes the format_result::constant member that is not used except in debugging dumps. Removing it makes the handling of non-constant arguments simpler. Since this handling increases in the substantive changes that follow thi

Re: [patch, fortran] Warn about integer**(negative integer)

2017-01-23 Thread Thomas Koenig
Hi FX, The idea seems reasonable, but I am not sure about the wording (“truncated” in particular). “Integer exponentiation truncated to constant 0”? Why not “Negative integer exponent has result value zero”? Other than that, OK to commit. You're right, the error message was a bit strange.

Re: [PATCH] Fix PR78189

2017-01-23 Thread Christophe Lyon
Hi Nick, On 23 January 2017 at 10:04, Richard Biener wrote: > On Fri, 20 Jan 2017, Nick Clifton wrote: > >> Hi Guys, >> >> [I have been asked to look at this PR in the hopes that it can be >> fixed soon and so no longer act as a blocker for the gcc 7 branch]. >> >> It seems to me that Richa

New Danish PO file for 'cpplib' (version 7.1-b20170101)

2017-01-23 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 Danish team of translators. The file is available at: http://translationproject.org/latest/cpplib/da.po (This file, 'cpplib-7.1-b20170101.

Contents of PO file 'cpplib-7.1-b20170101.da.po'

2017-01-23 Thread Translation Project Robot
cpplib-7.1-b20170101.da.po.gz Description: Binary data The Translation Project robot, in the name of your translation coordinator.

Re: [RFC] fix bootstrap on aarch64-*-freebsd and probably others

2017-01-23 Thread Richard Earnshaw (lists)
On 23/01/17 18:00, Andreas Tobler wrote: > On 23.01.17 18:48, Jakub Jelinek wrote: >> On Mon, Jan 23, 2017 at 06:42:15PM +0100, Andreas Tobler wrote: >>> Something like below? >>> >>> If ok, I can commit, right? >>> >>> Thanks, >>> >>> Andreas >>> >>> 2017-01-23 Andreas Tobler >>> >>> * conf

[C++ PATCH] 71406, 77508 scoped template_ids

2017-01-23 Thread Nathan Sidwell
This patch fixes 71406 and 77508, which are both ICEs dealing with 'X::Foo<...>'. finish_class_member_access_expr wasn't prepared to handle SCOPE_REF (TEMPLATE_ID_EXPR (...)), which is what it was being fed. Fixed by moving the SCOPE_REF splitting to before the TEMPLATE_ID_EXPR handling, but

Re: [PATCH 1/5] consolidate handling of directives (PR 78703)

2017-01-23 Thread Jeff Law
On 01/22/2017 04:52 PM, Martin Sebor wrote: The substance of the attached change set is to lay the groundwork of consolidating the handling of format directives and conversion specifications. 1) Extend (and rename) struct conversion_spec used thus far to represent a format conversion specificati

Re: [PATCH][doc] Correct optimisation levels documentation for -fstore-merging

2017-01-23 Thread Sandra Loosemore
On 01/23/2017 10:28 AM, Kyrill Tkachov wrote: Hi all, I had forgotten to update the -fstore-merging documentation from a previous iteration of the pass and it says that it's enabled at -O and higher. The option is in fact enabled at -O2 and higher, as well as -Os. This patch clarifies that. Is

Go patch committed: Fixes for m68k

2017-01-23 Thread Ian Lance Taylor
I committed a patch to the Go frontend and libgo to fix alignment issues on m68k. This fixes PR 79037. Bootstrapped and ran Go tests on x86_64-pc-linux-gnu. Tested by John Paul Adrian Glaubitz on m68k-linux-gnu. Committed to mainline. Ian Index: gcc/go/gofrontend/MERGE

Re: libgo patch committed: Update to Go1.8rc1

2017-01-23 Thread Ian Lance Taylor
On Tue, Jan 17, 2017 at 8:44 AM, Lynn A. Boger wrote: > In the past, the libgo version number has always matched the Go version, not > the gcc release. > > The libgo for Go 1.7 and Go 1.8 are not the same. If someone wanted to > build gccgo for Go 1.7 using an old commit > > maybe for testing or

Re: [RFC] fix bootstrap on aarch64-*-freebsd and probably others

2017-01-23 Thread Andreas Tobler
On 23.01.17 18:48, Jakub Jelinek wrote: On Mon, Jan 23, 2017 at 06:42:15PM +0100, Andreas Tobler wrote: Something like below? If ok, I can commit, right? Thanks, Andreas 2017-01-23 Andreas Tobler * config/aarch64/aarch64.c (aarch64_elf_asm_constructor): Increase size of b

Re: [RFC] fix bootstrap on aarch64-*-freebsd and probably others

2017-01-23 Thread Jakub Jelinek
On Mon, Jan 23, 2017 at 06:42:15PM +0100, Andreas Tobler wrote: > Something like below? > > If ok, I can commit, right? > > Thanks, > > Andreas > > 2017-01-23 Andreas Tobler > > * config/aarch64/aarch64.c (aarch64_elf_asm_constructor): Increase > size of buf. > (aarch64_el

Re: [RFC] fix bootstrap on aarch64-*-freebsd and probably others

2017-01-23 Thread Andreas Tobler
On 23.01.17 11:07, Richard Earnshaw (lists) wrote: On 21/01/17 20:15, Andreas Tobler wrote: On 21.01.17 00:42, Jakub Jelinek wrote: On Fri, Jan 20, 2017 at 01:37:13PM -0700, Jeff Law wrote: Which is best will depend on what the front/mid ends might have done to apply the documented limit. He

Re: [PR tree-optimization/71691] Fix unswitching in presence of maybe-undef SSA_NAMEs (take 2)

2017-01-23 Thread Aldy Hernandez
On 01/18/2017 10:10 AM, Richard Biener wrote: On Fri, Jan 13, 2017 at 7:48 PM, Aldy Hernandez wrote: Hi Richard. I'd be happy to provide a patch, but could you please elaborate, as I'm afraid I'm not following. We could go back to my original, no caching version (with the other suggestion

[PATCH][doc] Correct optimisation levels documentation for -fstore-merging

2017-01-23 Thread Kyrill Tkachov
Hi all, I had forgotten to update the -fstore-merging documentation from a previous iteration of the pass and it says that it's enabled at -O and higher. The option is in fact enabled at -O2 and higher, as well as -Os. This patch clarifies that. Is this ok? Or is there a more preferred style o

[PATCH, libstdc++-v3] Fix 69301.cc FAIL: require atomic builtins

2017-01-23 Thread Thomas Preudhomme
Hi, 69301.cc C++ test uses atomic features but fail to require atomic builtins. This causes the test to fail on ARMv6-M instead of being skipped. Fixed as obvious. ChangeLog entry is as follows: *** libstdc++-v3/ChangeLog *** 2017-01-23 Thomas Preud'homme * testsuite/29_atomics/a

[c== pATCH] 71710 dependent FIELD_DECL

2017-01-23 Thread Nathan Sidwell
Jason, Bug 71710 is a crash on 'decltype (a)', where 'a' is a FIELD_DECL wth dependent type. finish_class_member_access_expr barfs on that. The earlier sequence of if..elses has a check for FIELD_DECL, but that's in the shadow of a type_dependent_expression_p (object) check. The field's typ

Re: [PATCH] Fix -Wformat-security warnings in dwarf2out.c

2017-01-23 Thread Jeff Law
On 01/20/2017 04:24 PM, Jakub Jelinek wrote: Hi! When building gcc with -Wformat -Werror=format-security, there are various warnings->errors. This set has been introduced by me :( in the DWARF5 work, thus it is a 7 Regression. Fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux

Re: [PATCH] PR66669: Fix failure of gcc.dg/loop-8.c on Power

2017-01-23 Thread Jeff Law
On 01/23/2017 09:59 AM, Kelvin Nilsen wrote: The test gcc.dg/loop-8.c makes assumptions that are not valid on Power architecture (and on certain other architectures for which this issue has already been addressed). The test case assumes that a single loop-invariant statement will be moved outsi

[PATCH] PR66669: Fix failure of gcc.dg/loop-8.c on Power

2017-01-23 Thread Kelvin Nilsen
The test gcc.dg/loop-8.c makes assumptions that are not valid on Power architecture (and on certain other architectures for which this issue has already been addressed). The test case assumes that a single loop-invariant statement will be moved outside the loop. On Power, a constant is copy-prop

Re: [PATCH][wwwdocs] Mention new store merging pass for GCC 7

2017-01-23 Thread Gerald Pfeifer
Hi Kyrill, On Mon, 23 Jan 2017, Kyrill Tkachov wrote: This patch adds a short entry for the store merging pass in GCC 7 to the "General Optimizer Improvements" section. + A new store merging pass has been added. It will attempt to merge + constant stores to adjacent memory locations into fe

Re: [libcc1] add support for C++

2017-01-23 Thread Joseph Myers
On Sun, 22 Jan 2017, Alexandre Oliva wrote: > On Jan 13, 2017, Jason Merrill wrote: > > > On 09/23/2016 08:41 PM, Alexandre Oliva wrote: > >> +static tree global_friend_list; > > > This should be a hash_set rather than a TREE_LIST. > > You sure? At least in the libcc1 use scenario, this is go

Re: [PATCH v5] add -fprolog-pad=N,M option

2017-01-23 Thread Bernd Schmidt
There's still a a few details that need addressing, and some questions I have. Also Ccing Jakub to have another pair of eyes on the name of the section - I don't know if we want some sort of .gnu.something name. On 01/13/2017 01:19 PM, Torsten Duwe wrote: 2017-01-13 Torsten Duwe :

Re: [PATCH][GCC][PATCHv3] Improve fpclassify w.r.t IEEE like numbers in GIMPLE.

2017-01-23 Thread Joseph Myers
On Mon, 23 Jan 2017, Tamar Christina wrote: > In the testcase I've also had to remove `-funsafe-math-optimizations` > because at least on AArch64 this sets the LZ bit in the FPCR which > causes the fcmp to collapse small subnormal numbers to 0 and so iszero > would fail. That's not an appropri

Re: [PATCH] Do not declare artificial variables in tree-profile.c to have a definition (PR lto/69188).

2017-01-23 Thread Jeff Law
On 01/23/2017 03:05 AM, Kyrill Tkachov wrote: On 23/01/17 09:58, Christophe Lyon wrote: On 13 January 2017 at 18:21, Jeff Law wrote: On 01/13/2017 08:08 AM, Martin Liška wrote: Hello. Nice example provided in the PR causes ICE as we have an artificial symbol created in tree-profile.c once b

[C++ Patch/RFC] PR 72764

2017-01-23 Thread Paolo Carlini
Hi, in this relatively serious ICE on invalid regression (we don't emit any message before ICEing) make_typename_type, called by strip_typedefs, returns error_mark_node which then isn't handled by typedef_variant_p. Indeed, Jakub noticed that the same in principle can happen when strip_typede

Re: [PATCH][wwwdocs] Mention new store merging pass for GCC 7

2017-01-23 Thread Jeff Law
On 01/23/2017 05:26 AM, Kyrill Tkachov wrote: Hi all, This patch adds a short entry for the store merging pass in GCC 7 to the "General Optimizer Improvements" section. Eyeballed the result in Firefox. Ok to commit? OK. jeff

Re: [PR middle-end/79123] cast false positive in -Walloca-larger-than=

2017-01-23 Thread Jeff Law
On 01/23/2017 02:50 AM, Richard Biener wrote: So ideally DOM and EVRP would merge and CCP, copyprop and VRP would merge. It's probably not possible (or wise) to merge their lattices (maybe to some extent) DOM's equivalency tables could be easily superceded by other implementations. It's just

Re: [Ada] Ada2020 feature: partial aggregate notation (Delta aggregates).

2017-01-23 Thread Arnaud Charlet
> Please note that the trunk is in stage4, only regression bugfixes and > documentation fixes are allowed. It is possible to seek exceptions, > but committing dozens of changes that do not fix regressions or > documentation is not desirable right now. Yes I understand, although Ada isn't consider

Re: [PR middle-end/79123] cast false positive in -Walloca-larger-than=

2017-01-23 Thread Martin Sebor
Yes, I see that. But when I change size_t to unsigned int (in LP64) like so: void g (int *p, int *q) { unsigned n = (unsigned)(p - q); if (n < 10) f (__builtin_alloca (n)); } -Walloca-larger-than=100 still complains: warning: argument to ‘alloca’ may be too large note:

[PATCH] PR libstdc++/79195 fix make_array type deduction

2017-01-23 Thread Jonathan Wakely
This adds indirection through a class template partial specialization so we don't instantiate common_type<_Types...>::type unless we need it. PR libstdc++/79195 * include/experimental/array (__make_array_elem): New class template and partial specialization. (__is_r

Re: [PATCH][GCC][PATCHv3] Improve fpclassify w.r.t IEEE like numbers in GIMPLE.

2017-01-23 Thread Tamar Christina
Hi Jeff, Joseph, Thank you for the reviews. This is hopefully the final version of the patch. I was doing some extra testing on the FP fallback case and noticed that the builtins Joseph told me about before were emitting GENERIC and not GIMPLE code, particularly the TRUTH_NOT_EXPR expression was

Re: [Ada] Ada2020 feature: partial aggregate notation (Delta aggregates).

2017-01-23 Thread Jakub Jelinek
On Mon, Jan 23, 2017 at 07:07:40AM -0500, Arnaud Charlet wrote: > This patch implements AI12-0127, which describes a new constructor for > aggregate in terms of an existing record or array aggregate and a series > of component-wise modifications of its value. Please note that the trunk is in stage

Re: [PATCH] Delete GCJ

2017-01-23 Thread Andrew Haley
On 23/01/17 13:41, Jakub Jelinek wrote: > On Mon, Jan 23, 2017 at 04:51:44AM -0800, Per Bothner wrote: >> The last part is moot, as we should strive to not move pages and thus break >> links. > > I meant updating URLs in the pages when they refer to external web pages > which move over time (or

Re: [PATCH] Fix strstr folding (PR tree-optimization/79196).

2017-01-23 Thread Jakub Jelinek
On Mon, Jan 23, 2017 at 02:58:05PM +0100, Martin Liška wrote: > As mentioned in the PR, it should be valid to use strncmp instead of memcmp > because first argument of a strstr can be shorter than a second (known) > argument. > > Patch can bootstrap on ppc64le-redhat-linux and survives regression

Re: [PATCH v5] add -fprolog-pad=N,M option

2017-01-23 Thread Torsten Duwe
And what's next now? Maxim mentioned in this thread you should sort of formally approve(?) a global feature, have you had a look at it yet? I should emphasize that this code can substitute the -fentry for arm64 for the purpose of kernel live patching that was discussed in the beginning, as well a

[PATCH] Fix strstr folding (PR tree-optimization/79196).

2017-01-23 Thread Martin Liška
As mentioned in the PR, it should be valid to use strncmp instead of memcmp because first argument of a strstr can be shorter than a second (known) argument. Patch can bootstrap on ppc64le-redhat-linux and survives regression tests. Ready to be installed? Martin >From 4a9dcb24d82ce1793a281710ce1

Re: Fix PR78384: ICE in loop splitting

2017-01-23 Thread Richard Biener
On Mon, Jan 23, 2017 at 2:38 PM, Michael Matz wrote: > Hi, > > the loop structure in the testcase is funny enough to confuse loop > splitting (it essentially would have been an irreducable region if it > weren't for the fact that one entry edge is stopped with a builtin_trap; > and so it transform

Re: [PR c++/78469] default ctor makes dtor required

2017-01-23 Thread Nathan Sidwell
ping? On 01/18/2017 01:25 PM, Nathan Sidwell wrote: Jason, I've figured out what's happening here. Just not sure of the most prudent way to fix it. struct no_destr { no_destr() = default; protected: ~no_destr() = default; }; void *Foo () { return new no_destr (); } no_destr is a type

[C++ PATCH] 79118 bitfields & constexpr

2017-01-23 Thread Nathan Sidwell
This patch addresses 79118, where we ICE on a constexpr involving bitfields in an unnamed struct (unnamed struct members are a g++ extension). This is really a band-aid, because our internal representation BITFIELD_REF and the (premature) optimizations it encourages is incompatible with conste

Re: [PATCH] Delete GCJ

2017-01-23 Thread Jakub Jelinek
On Mon, Jan 23, 2017 at 04:51:44AM -0800, Per Bothner wrote: > On 01/23/2017 01:05 AM, Jakub Jelinek wrote: > > On Mon, Jan 23, 2017 at 09:01:24AM +, Andrew Haley wrote: > > > On 22/01/17 18:41, Per Bothner wrote: > > > > In my opinion, all/most of these should be restored. > > > > > > Because

Fix PR78384: ICE in loop splitting

2017-01-23 Thread Michael Matz
Hi, the loop structure in the testcase is funny enough to confuse loop splitting (it essentially would have been an irreducable region if it weren't for the fact that one entry edge is stopped with a builtin_trap; and so it transforms into a strangely rotated loop where latch and header aren't

[Ada] Wrong dispatching call through class-wide interface subtype

2017-01-23 Thread Arnaud Charlet
When the type of the controlling formal of a dispatching call is an interface subtype the compiler can generate code that dispatch to the wrong operation or crash the program. After this patch the following test compiles and executes well. package Small_Types is type I_Dummy is limited interfa

[Ada] Crash on illegally terminated extended return statement

2017-01-23 Thread Arnaud Charlet
This patch modifies the construct scope stack of the parser to ensure that an extended return statement cannot have an optional end label. -- Source -- -- main.adb function Main return Boolean is begin return Result : Boolean do null; end loop; end Main; -

[Ada] Aliasing checks on subprograms may cause side effects

2017-01-23 Thread Arnaud Charlet
Compiling with aliasing checks on subprograms parameters (-gnateA), if the actual of a subprogram parameter is a function call the compiler may generate a runtime check that invokes the function more than once. After this patch the following test compiles and executes well. with Ada.Text_IO; use

[PATCH] Fix PR79088/79188

2017-01-23 Thread Richard Biener
The following is a fix for jump-threading loop-assumption clearing which was done only on the first header/irreducible crossing rather than the one at the destination of the threading path. Bootstrapped and tested on x86_64-unknown-linux-gnu, ok for trunk? Thanks, Richard. 2017-01-23 Richard B

Re: [PATCH] BRIG frontend: request for a global review

2017-01-23 Thread Richard Biener
On Mon, Jan 23, 2017 at 1:02 PM, Martin Jambor wrote: > Hi, > > > On Mon, Jan 23, 2017 at 12:56:13PM +0100, Richard Biener wrote: >> On Fri, Jan 20, 2017 at 6:25 PM, Pekka Jääskeläinen >> wrote: >> > Hi Richard, >> > >> > On Fri, Jan 20, 2017 at 10:26 AM, Richard Biener >> > wrote: >> >> So the

[PATCH] Fix PR79186

2017-01-23 Thread Richard Biener
Bootstrapped / tested on x86_64-unknown-linux-gnu, applied. Richard. 2017-01-23 Richard Biener PR tree-optimization/79186 * tree-vrp.c (register_new_assert_for): Make sure we've seen both incoming edges before moving an assert. * gcc.dg/torture/pr79186.c: New

Re: [PATCH] Delete GCJ

2017-01-23 Thread Per Bothner
On 01/23/2017 01:05 AM, Jakub Jelinek wrote: On Mon, Jan 23, 2017 at 09:01:24AM +, Andrew Haley wrote: On 22/01/17 18:41, Per Bothner wrote: In my opinion, all/most of these should be restored. Because of the historical interest? That's a good point, and perhaps I was too hasty. Sorry.

[PATCH][wwwdocs] Mention new store merging pass for GCC 7

2017-01-23 Thread Kyrill Tkachov
Hi all, This patch adds a short entry for the store merging pass in GCC 7 to the "General Optimizer Improvements" section. Eyeballed the result in Firefox. Ok to commit? Thanks, Kyrill Index: htdocs/gcc-7/changes.html === RCS fil

[Ada] Ada2020 feature: partial aggregate notation (Delta aggregates).

2017-01-23 Thread Arnaud Charlet
This patch implements AI12-0127, which describes a new constructor for aggregate in terms of an existing record or array aggregate and a series of component-wise modifications of its value. Executing: gnatmake -gnat2020 -q a2020 a2020 must yield: 1 2 9 16 25 --- with Text_IO; use T

[Ada] Missing detection of illegally placed pragma Assert

2017-01-23 Thread Arnaud Charlet
This patch modifies the parsing of protected and task definitions to detect illegal placement of pragmas Assert and Debug within the protected or task item lists. -- Source -- -- synch_pragmas.ads package Synch_Pragmas is protected PO is pragma Assert (PO'Size

[Ada] Pragma Discard_Names and exception declarations

2017-01-23 Thread Arnaud Charlet
This patch extends the functionality of pragma Discard_Names to suppress the generation of the String names of exception declarations. As a result, these names do not appear in the final binary. A side effect of this functionality is that routine Ada.Exceptions.Exception_Name will return an empty S

Re: [PATCH] Speed-up use-after-scope (re-writing to SSA) (version 2)

2017-01-23 Thread Martin Liška
On 01/23/2017 10:38 AM, Jakub Jelinek wrote: > On Mon, Jan 23, 2017 at 10:19:33AM +0100, Martin Liška wrote: >> diff --git a/gcc/gimplify.c b/gcc/gimplify.c >> index 2777a23eb93..1b076fdf45c 100644 >> --- a/gcc/gimplify.c >> +++ b/gcc/gimplify.c >> @@ -1206,8 +1206,19 @@ asan_poison_variables (hash

[Ada] Validity checks prevent copy back of scalar IN OUT parameter

2017-01-23 Thread Arnaud Charlet
This patch modifies the generation of validity checks to generate a renaming of the expression being verified when the expression denotes a name. For all other kinds of expressions, the validity check machinery creates a constant to store the value of the expression. The use of renaming prevents th

[Ada] Crash on class-wide 'Attribute clause

2017-01-23 Thread Arnaud Charlet
This patch adds an extra restriction to the placement of an 'Address attribute definition clause where a prefix of a class-wide type cannot be subject to the clause. -- Source -- -- types.ads with Ada.Finalization; use Ada.Finalization; package Types is type Arr_Ty

[Ada] Missing range check on if expression

2017-01-23 Thread Arnaud Charlet
This patch removes an optimization when evaluating integer literals within qualified expressions that caused checks on if and case expressions to not be generated properly. -- Source -- -- call_do_smth.adb with Test; use Test; with Ada.Text_IO; procedure Call_Do_Smth

Re: [PATCH] BRIG frontend: request for a global review

2017-01-23 Thread Martin Jambor
Hi, On Mon, Jan 23, 2017 at 12:56:13PM +0100, Richard Biener wrote: > On Fri, Jan 20, 2017 at 6:25 PM, Pekka Jääskeläinen > wrote: > > Hi Richard, > > > > On Fri, Jan 20, 2017 at 10:26 AM, Richard Biener > > wrote: > >> So the #ifdef ENABLE_BRIG_FE shouldn't be needed anymore (nor the > >> con

Re: [PATCH] BRIG frontend: request for a global review

2017-01-23 Thread Richard Biener
On Fri, Jan 20, 2017 at 6:25 PM, Pekka Jääskeläinen wrote: > Hi Richard, > > On Fri, Jan 20, 2017 at 10:26 AM, Richard Biener > wrote: >> So the #ifdef ENABLE_BRIG_FE shouldn't be needed anymore (nor the >> configury for it). >> >> Otherwise this looks ok to me then. > > Attached is a patch set w

[Ada] Update SPARK rules for checking volatile flavors of protected objects

2017-01-23 Thread Arnaud Charlet
Implement new rule SPARK RM 7.1.2(16) that only assigns the Async_Readers and Async_Writers flavors of volatility to protected objects by default, and makes protected objects inherit the Effective_Reads and Effective_Writes flavors of volatility from their Part_Of components. Tested on x86_64-pc-l

Re: Fold strstr (s, t) eq/ne s to strcmp (s, t) eq/ne 0 if strlen (t) is known

2017-01-23 Thread Martin Liška
On 12/14/2016 09:03 AM, Jakub Jelinek wrote: > On Wed, Dec 14, 2016 at 01:27:44PM +0530, Prathamesh Kulkarni wrote: >> 2016-12-14 Jakub Jelinek >> Prathamesh Kulkarni >> >> * tree-ssa-strlen.c (fold_strstr_to_memcmp): New function. >> (strlen_optimize_stmt): Call fold_strstr

[Ada] Implement AI95-0133 in Ada 95 (and Ada 83) mode

2017-01-23 Thread Arnaud Charlet
The original interpretation of record representation clauses with reverse bit order from Ada 95 was modified by a Binding Interpretation (AI95-0133). Apply it by default even in running in -gnat95 mode (as is already unconditionally done in Ada 2005 move and above), since the original behaviour is

Re: [PATCH] Add AVX512 k-mask intrinsics

2017-01-23 Thread Kirill Yukhin
On 20 Jan 23:03, Andrew Senkevich wrote: > 2017-01-20 20:08 GMT+03:00 Kirill Yukhin : > > Hi, > > On 20 Jan 14:46, Uros Bizjak wrote: > >> On Fri, Jan 20, 2017 at 2:32 PM, Andrew Senkevich > >> wrote: > >> > >> > here is intrinsics for ktest{b,w,d,q} and kortest{b,w,d,q}. Is it Ok? > >> > > >> > g

  1   2   >