Re: [PATCH] -fopt-info: add indentation via DUMP_VECT_SCOPE

2018-07-05 Thread Christophe Lyon
On Tue, 3 Jul 2018 at 15:53, Richard Biener wrote: > > On Tue, Jul 3, 2018 at 3:52 PM David Malcolm wrote: > > > > On Tue, 2018-07-03 at 09:37 +0200, Richard Biener wrote: > > > On Mon, Jul 2, 2018 at 7:00 PM David Malcolm > > > wrote: > > > > > > > > On Mon, 2018-07-02 at 14:23 +0200,

Re: [PATCH 1/3][POPCOUNT] Handle COND_EXPR in expression_expensive_p

2018-07-05 Thread Kugan Vivekanandarajah
Hi Richard, Thanks for the review. On 28 June 2018 at 21:26, Richard Biener wrote: > On Wed, Jun 27, 2018 at 7:00 AM Kugan Vivekanandarajah > wrote: >> >> Hi Richard, >> >> Thanks for the review. >> >> On 25 June 2018 at 20:01, Richard Biener wrote: >> > On Fri, Jun 22, 2018 at 11:13 AM Kugan

calculate overflow type in wide int arithmetic

2018-07-05 Thread Aldy Hernandez
The reason for this patch are the changes showcased in tree-vrp.c. Basically I'd like to discourage rolling our own overflow and underflow calculation when doing wide int arithmetic. We should have a centralized place for this, that is-- in the wide int code itself ;-). The only cases I care

Re: [PATCH] Add experimental::sample and experimental::shuffle from N4531

2018-07-05 Thread Christophe Lyon
On Wed, 4 Jul 2018 at 18:56, Jonathan Wakely wrote: > > On 29/06/18 10:45 +0100, Jonathan Wakely wrote: > >On 29/06/18 09:39 +0200, Christophe Lyon wrote: > >>On Fri, 29 Jun 2018 at 09:21, Jonathan Wakely wrote: > >>> > >>>On 29/06/18 08:55 +0200, Christophe Lyon wrote: > On Mon, 25 Jun 2018

Re: [PATCH][PR sanitizer/84250] Avoid global symbols collision when using both ASan and UBSan

2018-07-05 Thread Maxim Ostapenko
On 07/05/2018 12:01 PM, Jakub Jelinek wrote: > On Wed, Jul 04, 2018 at 08:20:47PM +0300, Maxim Ostapenko wrote: >> On 07/04/2018 05:45 AM, Jeff Law wrote: >>> On 05/23/2018 11:15 AM, Maxim Ostapenko wrote: as described in PR, when using both ASan and UBSan (-fsanitize=address,undefined

Re: [PATCH] use TYPE_SIZE instead of TYPE_DOMAIN to compute array size (PR 86400)

2018-07-05 Thread Richard Biener
On Thu, Jul 5, 2018 at 4:17 AM Martin Sebor wrote: > > A change of mine to the strlen pass assumes that the strlen > argument points to an object of the correct type and does > not correctly handle GIMPLE where the argument has the wrong > type such as in: > >extern char a[1][2]; >n =

[testsuite] Simplify dg-final

2018-07-05 Thread Tom de Vries
[ was: [PATCH, testsuite/guality] Use line number vars in gdb-test ] On Wed, Jul 04, 2018 at 08:32:49PM +0100, Richard Sandiford wrote: > Tom de Vries writes: > > +proc dg-final { args } { > > +upvar dg-final-code final-code > > + > > +if { [llength $args] > 2 } { > > + error "[lindex

Re: [PATCH] -fopt-info: add indentation via DUMP_VECT_SCOPE

2018-07-05 Thread Richard Biener
On Thu, Jul 5, 2018 at 10:42 AM Christophe Lyon wrote: > > On Tue, 3 Jul 2018 at 15:53, Richard Biener > wrote: > > > > On Tue, Jul 3, 2018 at 3:52 PM David Malcolm wrote: > > > > > > On Tue, 2018-07-03 at 09:37 +0200, Richard Biener wrote: > > > > On Mon, Jul 2, 2018 at 7:00 PM David Malcolm

Re: calculate overflow type in wide int arithmetic

2018-07-05 Thread Richard Biener
On Thu, Jul 5, 2018 at 9:35 AM Aldy Hernandez wrote: > > The reason for this patch are the changes showcased in tree-vrp.c. > Basically I'd like to discourage rolling our own overflow and underflow > calculation when doing wide int arithmetic. We should have a > centralized place for this, that

Re: Enhance __gnu_debug::string debug assertion

2018-07-05 Thread Jonathan Wakely
On 05/07/18 07:28 +0200, François Dumont wrote:     This patch improves the assertion message generated in 2 __gnu_debug::string constructors giving the assertion context thanks to the __FUNCTION__ macro. Was: /home/fdt/dev/gcc/build/x86_64-pc-linux-gnu/libstdc++-v3/include/debug/string:56:

[Patch, fortran] PR66679 - [OOP] ICE with class(*) and transfer

2018-07-05 Thread Paul Richard Thomas
The comment in the patch says it all. Bootstrapped and regtested on FC28/x86_64 - OK for trunk? Paul 2018-07-05 Paul Thomas PR fortran/66679 * trans-intrinsic.c (gfc_conv_intrinsic_transfer): Class array elements are returned as references to the data element. Get the class

[PATCH] Move ((A & N) + B) & M -> (A + B) & M etc. optimization from fold-const.c to match.pd (PR tree-optimization/86401)

2018-07-05 Thread Jakub Jelinek
Hi! I've encountered this while testing the rotate patterns in discussion with Jonathan for the std::__rot{l,r}, in the rotate-9.c test without this patch f1 is optimized into a rotate, but f2 is not. Fixed by moving the optimization from fold-const.c to match.pd (well, leaving a helper in

Re: [PATCH][PR sanitizer/84250] Avoid global symbols collision when using both ASan and UBSan

2018-07-05 Thread Jakub Jelinek
On Wed, Jul 04, 2018 at 08:20:47PM +0300, Maxim Ostapenko wrote: > On 07/04/2018 05:45 AM, Jeff Law wrote: > > On 05/23/2018 11:15 AM, Maxim Ostapenko wrote: > >> as described in PR, when using both ASan and UBSan > >> (-fsanitize=address,undefined ), we have symbols collision for global > >>

[PATCH, S390] Avoid LA with base and index on z13

2018-07-05 Thread Robin Dapp
Hi, this patch avoids emitting LA on z13 and later when the address has both an index and a base since a regular add is faster in that case. Regtested on s390x. Regards Robin -- gcc/ChangeLog: 2018-07-05 Robin Dapp * config/s390/s390.c (preferred_la_operand_p): Do not use

Re: [PATCH, S390] Avoid LA with base and index on z13

2018-07-05 Thread Ulrich Weigand
Robin Dapp wrote: > * config/s390/s390.c (preferred_la_operand_p): Do not use > LA with base and index on z13 or later. The code just before your change reads: /* Avoid LA instructions with index register on z196; it is preferable to use regular add instructions when

Re: [PATCH][debug] Handle references to skipped params in remap_ssa_name

2018-07-05 Thread Richard Biener
On Thu, Jul 5, 2018 at 1:25 PM Tom de Vries wrote: > > [ was: Re: [testsuite/guality, committed] Prevent optimization of local in > vla-1.c ] > > On Wed, Jul 04, 2018 at 02:32:27PM +0200, Tom de Vries wrote: > > On 07/03/2018 11:05 AM, Tom de Vries wrote: > > > On 07/02/2018 10:16 AM, Jakub

[PATCH] Update config.guess and config.sub

2018-07-05 Thread Sebastian Huber
* config.guess: Sync with upstream version 2018-06-26. * config.sub: Sync with upstream version 2018-07-02. --- config.guess | 6 +++--- config.sub | 8 +++- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/config.guess b/config.guess index

Re: [PATCH] Update config.guess and config.sub

2018-07-05 Thread Sebastian Huber
On 05/07/18 14:00, Sebastian Huber wrote: * config.guess: Sync with upstream version 2018-06-26. * config.sub: Sync with upstream version 2018-07-02. I would like to back port this also to GCC 8. -- Sebastian Huber, embedded brains GmbH Address : Dornierstr. 4, D-82178

Re: [patch, fortran] Asynchronous I/O, take 3

2018-07-05 Thread Dominique d'Humières
I have done a full regression testing with the patch at https://gcc.gnu.org/ml/fortran/2018-07/msg4.html + Rainer’s patch at https://gcc.gnu.org/ml/fortran/2018-07/msg7.html I am currently testing the patch at https://gcc.gnu.org/ml/fortran/2018-07/msg8.html so far, so good! IMO

Re: [PATCH][debug] Handle references to skipped params in remap_ssa_name

2018-07-05 Thread Tom de Vries
On 07/05/2018 01:39 PM, Richard Biener wrote: > On Thu, Jul 5, 2018 at 1:25 PM Tom de Vries wrote: >> >> [ was: Re: [testsuite/guality, committed] Prevent optimization of local in >> vla-1.c ] >> >> On Wed, Jul 04, 2018 at 02:32:27PM +0200, Tom de Vries wrote: >>> On 07/03/2018 11:05 AM, Tom de

Re: [PATCH 1/3][POPCOUNT] Handle COND_EXPR in expression_expensive_p

2018-07-05 Thread Richard Biener
On Thu, Jul 5, 2018 at 1:29 PM Richard Biener wrote: > > On Thu, Jul 5, 2018 at 1:02 PM Kugan Vivekanandarajah > wrote: > > > > Hi Richard, > > > > Thanks for the review. > > > > On 28 June 2018 at 21:26, Richard Biener wrote: > > > On Wed, Jun 27, 2018 at 7:00 AM Kugan Vivekanandarajah > > >

Re: [PATCH,rs6000] Fix implementation of vec_unpackh, vec_unpackl builtins

2018-07-05 Thread Segher Boessenkool
Hi Carl, On Tue, Jul 03, 2018 at 02:36:22PM -0700, Carl Love wrote: > Please let me know if the patch looks OK for GCC mainline. The patch > also needs to be backported to GCC 8. Looks great, thanks! Okay for trunk, and also for 8. Segher > 2018-07-03 Carl Love > > *

[PATCH, ARM] PR85434: Prevent spilling of stack protector guard's address on ARM

2018-07-05 Thread Thomas Preudhomme
In case of high register pressure in PIC mode, address of the stack protector's guard can be spilled on ARM targets as shown in PR85434, thus allowing an attacker to control what the canary would be compared against. ARM does lack stack_protect_set and stack_protect_test insn patterns, defining

[PATCH][debug] Handle references to skipped params in remap_ssa_name

2018-07-05 Thread Tom de Vries
[ was: Re: [testsuite/guality, committed] Prevent optimization of local in vla-1.c ] On Wed, Jul 04, 2018 at 02:32:27PM +0200, Tom de Vries wrote: > On 07/03/2018 11:05 AM, Tom de Vries wrote: > > On 07/02/2018 10:16 AM, Jakub Jelinek wrote: > >> On Mon, Jul 02, 2018 at 09:44:04AM +0200, Richard

Re: [PATCH] libtool: Sort output of 'find' to enable deterministic builds.

2018-07-05 Thread Bernhard M. Wiedemann
On 2018-06-29 17:09, Jeff Law wrote: > In the immediate term, applying the patch to both instances seems wise. > > Bernhard, do you have commit privs? no, and I dont really want privs, since I expect to be doing only a few patches for gcc. Can you (or someone else) please commit the patch?

Re: [PATCH 1/3][POPCOUNT] Handle COND_EXPR in expression_expensive_p

2018-07-05 Thread Richard Biener
On Thu, Jul 5, 2018 at 1:02 PM Kugan Vivekanandarajah wrote: > > Hi Richard, > > Thanks for the review. > > On 28 June 2018 at 21:26, Richard Biener wrote: > > On Wed, Jun 27, 2018 at 7:00 AM Kugan Vivekanandarajah > > wrote: > >> > >> Hi Richard, > >> > >> Thanks for the review. > >> > >> On

[PATCH] PR libstdc++/58265 implement LWG 2063 for COW strings

2018-07-05 Thread Jonathan Wakely
For COW strings the default constructor does not allocate when _GLIBCXX_FULLY_DYNAMIC_STRING == 0, so can be noexcept. The move constructor and swap do not allocate when the allocators are equal, so add conditional noexcept using allocator_traits::is_always_equal. PR libstdc++/58265

Re: [PATCH] Update config.guess and config.sub

2018-07-05 Thread Palmer Dabbelt
On Thu, 05 Jul 2018 05:00:20 PDT (-0700), sebastian.hu...@embedded-brains.de wrote: * config.guess: Sync with upstream version 2018-06-26. * config.sub: Sync with upstream version 2018-07-02. --- config.guess | 6 +++--- config.sub | 8 +++- 2 files changed, 10

Re: [PATCH] Update config.guess and config.sub

2018-07-05 Thread Jeff Law
On 07/05/2018 06:00 AM, Sebastian Huber wrote: > * config.guess: Sync with upstream version 2018-06-26. > * config.sub: Sync with upstream version 2018-07-02. OK. And I think in general syncing to the latest version from upstream ought not require explicit approval. Richi/Jakub have

Re: [PATCH] PR libstdc++/58265 implement LWG 2063 for COW strings

2018-07-05 Thread Jonathan Wakely
On 05/07/18 16:55 +0100, Jonathan Wakely wrote: For COW strings the default constructor does not allocate when _GLIBCXX_FULLY_DYNAMIC_STRING == 0, so can be noexcept. The move constructor and swap do not allocate when the allocators are equal, so add conditional noexcept using

Re: [PATCH][Middle-end]3rd patch of PR78809

2018-07-05 Thread Qing Zhao
Hi, I have sent two emails with the updated patches on 7/3: https://gcc.gnu.org/ml/gcc-patches/2018-07/msg00065.html https://gcc.gnu.org/ml/gcc-patches/2018-07/msg00070.html however, these 2 emails were not successfully forwarded to the gcc-patches@gcc.gnu.org mailing list. So, I am sending

Re: [PATCH][Middle-end]3rd patch of PR78809

2018-07-05 Thread Martin Sebor
On 07/05/2018 09:46 AM, Qing Zhao wrote: Hi, I have sent two emails with the updated patches on 7/3: https://gcc.gnu.org/ml/gcc-patches/2018-07/msg00065.html https://gcc.gnu.org/ml/gcc-patches/2018-07/msg00070.html however, these 2 emails were not successfully forwarded to the

Re: [PATCH] Update config.guess and config.sub

2018-07-05 Thread Liviu Ionescu
> On 5 Jul 2018, at 19:51, Palmer Dabbelt wrote: > > ... When I try to build it I see "Unsupported RISC-V target > riscv-unknown-elf", I guess configure is fine, you need to allow for the `riscv-` prefix in gcc/config.gcc, around line 3982 > so there's at least some extra autoconf wizadry

[PATCH] Fix several AVX512 intrinsic mask arguments.

2018-07-05 Thread Grazvydas Ignotas
gcc/ChangeLog: 2018-07-05 Grazvydas Ignotas * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask, _mm512_mask_cmp_epu8_mask): Fix mask arguments. --- gcc/config/i386/avx512bwintrin.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH] Add xfail-if to some tests that fail with COW strings

2018-07-05 Thread Jonathan Wakely
These tests fail when run with -D_GLIBCXX_USE_CXX11_ABI=0 * testsuite/21_strings/basic_string/cons/char/deduction.cc: XFAIL for COW strings. * testsuite/21_strings/basic_string/cons/wchar_t/deduction.cc: Likewise. *

Re: [PATCH] Update config.guess and config.sub

2018-07-05 Thread Jeff Law
On 07/05/2018 10:51 AM, Palmer Dabbelt wrote: > On Thu, 05 Jul 2018 05:00:20 PDT (-0700), > sebastian.hu...@embedded-brains.de wrote: >> * config.guess: Sync with upstream version 2018-06-26. >> * config.sub: Sync with upstream version 2018-07-02. >> --- >>  config.guess | 6 +++--- >>  

Re: [PATCH] libtool: Sort output of 'find' to enable deterministic builds.

2018-07-05 Thread Jeff Law
On 07/05/2018 08:53 AM, Bernhard M. Wiedemann wrote: > On 2018-06-29 17:09, Jeff Law wrote: >> In the immediate term, applying the patch to both instances seems wise. >> >> Bernhard, do you have commit privs? > > no, and I dont really want privs, since I expect to be doing only a few > patches

Re: [PATCH] Update config.guess and config.sub

2018-07-05 Thread Liviu Ionescu
> On 5 Jul 2018, at 22:17, Jim Wilson wrote: > > ... I can fix the gcc config.sub to make it work. Or you can edit `gcc/config.gcc` and trigger an error for `riscv-linux*`. Regards, Liviu

Re: [PATCH] Enable decimal float on x86_64 kFreeBSD and Hurd

2018-07-05 Thread Jeff Law
On 07/04/2018 03:24 PM, James Clarke wrote: > config/ > * dfp.m4 (enable_decimal_float): Enable for x86_64*-*-gnu* to > catch x86_64 kFreeBSD and Hurd. > > gcc/ > * configure: Regenerate. > > libdecnumber/ > * configure: Regenerate. > > libgcc/ > * configure:

Re: [PATCH][Middle-end]3rd patch of PR78809

2018-07-05 Thread Jeff Law
On 07/05/2018 09:35 AM, Qing Zhao wrote: > Hi, > > I have sent two emails with the updated patches on 7/3: > > https://gcc.gnu.org/ml/gcc-patches/2018-07/msg00065.html > https://gcc.gnu.org/ml/gcc-patches/2018-07/msg00070.html > > however, these 2 emails  were not successfully forwarded to the

Re: [RFC PATCH] diagnose built-in declarations without prototype (PR 83656)

2018-07-05 Thread Jeff Law
On 07/04/2018 11:32 AM, Martin Sebor wrote: > On 07/03/2018 08:33 PM, Jeff Law wrote: >> >>> >>> But since the number of warnings here hasn't changed, the ones >>> in GCC logs predate my changes.  So updating the tests seems >>> like an improvement to consider independently of the patch. >>

Re: [PATCH] tighten up -Wbuiltin-declaration-mismatch (PR 86125)

2018-07-05 Thread Jeff Law
On 06/28/2018 09:14 AM, Martin Sebor wrote: > On 06/27/2018 11:20 PM, Jeff Law wrote: >> On 06/26/2018 05:32 PM, Martin Sebor wrote: >>> Attached is an updated patch to tighten up the warning and also >>> prevent ICEs in the middle-end like in PR 86308 or PR 86202. >>> >>> I took Richard's

Re: [patch] Improve specs processing to allow %* in function arguments

2018-07-05 Thread Jeff Law
On 06/05/2018 08:13 AM, Olivier Hainque wrote: > Hello, > > The attached patch is a proposal to improve specs processing > so %* works in spec function arguments (it doesn't as of today). > > The immediate motivation is to allow a cleaner implementation of > the -mmacosx-version-min support on

Re: [PATCH] Update config.guess and config.sub

2018-07-05 Thread Jim Wilson
On 07/05/2018 09:51 AM, Palmer Dabbelt wrote: When I try to build it I see "Unsupported RISC-V target riscv-unknown-elf", so there's at least some extra autoconf wizadry that needs to happen in here.  I'm actually not sure what the "riscv-*" tuples are supposed to do so I've added Liviu as I

Re: [PATCH] Prefer mempcpy to memcpy on x86_64 target (PR middle-end/81657).

2018-07-05 Thread Jeff Law
On 04/10/2018 06:27 AM, Martin Liška wrote: > On 04/10/2018 11:19 AM, Jakub Jelinek wrote: >> On Mon, Apr 09, 2018 at 02:31:04PM +0200, Martin Liška wrote: >>> gcc/testsuite/ChangeLog: >>> >>> 2018-03-28 Martin Liska >>> >>> * gcc.dg/string-opt-1.c: >> I guess you really didn't mean to keep

Re: [PATCH] Fix several AVX512 intrinsic mask arguments.

2018-07-05 Thread Jakub Jelinek
On Thu, Jul 05, 2018 at 08:30:27PM +0300, Grazvydas Ignotas wrote: > gcc/ChangeLog: > > 2018-07-05 Grazvydas Ignotas > > * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask, > _mm512_mask_cmp_epu8_mask): Fix mask arguments. LGTM, but 1) I think it would be nice to add a

Re: [PATCH] Update config.guess and config.sub

2018-07-05 Thread Liviu Ionescu
> On 5 Jul 2018, at 21:26, Jim Wilson wrote: > > because it adds riscv-linux as a valid configure tuple, and we never wanted > that If this is really a problem I guess you can blacklist it somehow. But this proves once again that Linux native compilers and cross embedded toolchains should

Re: [patch] jump threading multiple paths that start from the same BB

2018-07-05 Thread Jeff Law
On 07/04/2018 02:12 AM, Aldy Hernandez wrote: > > > On 07/03/2018 08:16 PM, Jeff Law wrote: >> On 07/03/2018 03:31 AM, Aldy Hernandez wrote: >>> On 07/02/2018 07:08 AM, Christophe Lyon wrote: >>> >> On 11/07/2017 10:33 AM, Aldy Hernandez wrote: >>> While poking around in the backwards 

Re: [PATCH] Update config.guess and config.sub

2018-07-05 Thread Jim Wilson
On Thu, Jul 5, 2018 at 11:31 AM, Liviu Ionescu wrote: > If this is really a problem I guess you can blacklist it somehow. > But this proves once again that Linux native compilers and cross embedded > toolchains should be processed differently. It isn't a major problem. There is the issue that

Re: [PING][PATCH, rs6000, C/C++] Fix PR target/86324: divkc3-1.c FAILs when compiling with -mabi=ieeelongdouble

2018-07-05 Thread Jeff Law
On 07/02/2018 03:50 PM, Peter Bergner wrote: > I'd like to PING: > > https://gcc.gnu.org/ml/gcc-patches/2018-06/msg01713.html > > I've included the entire patch below, since I missed the test cases in > the original submission and Segher asked for some updated text for the > hook documentation

Re: [PATCH 0/3][POPCOUNT]

2018-07-05 Thread Jeff Law
On 06/24/2018 08:41 PM, Kugan Vivekanandarajah wrote: > Hi Jeff, > > Thanks for the comments. > > On 23 June 2018 at 02:06, Jeff Law wrote: >> On 06/22/2018 03:11 AM, Kugan Vivekanandarajah wrote: >>> When we set niter with maybe_zero, currently final_value_relacement >>> will not happen due to

[PATCH, Ada] RISC-V: Initial riscv linux Ada port.

2018-07-05 Thread Jim Wilson
I was asked about Ada support, so I tried cross building a native RISC-V Linux Ada compiler, and it turned out to be possible with a little bit of work. I just started with the MIPS support, and then fixed everything that was obviously wrong: endianness, error numbers, signal numbers,

[PATCH, Ada] Makefile patches from initial RISC-V cross/native build.

2018-07-05 Thread Jim Wilson
These are some patches I needed to complete my cross build of a native riscv linux Ada compiler. Some paths were different on the build machine and host machine. I needed to pass options into gnatmake to work around this, and that required fixing some makefile rules to use $(GNATMAKE) instead of

[PATCH] PR libstdc++/85831 define move constructors and operators for exceptions

2018-07-05 Thread Jonathan Wakely
PR libstdc++/85831 * config/abi/pre/gnu.ver: Export move constructors and move assignment operators for std::logic_error and std::runtime_error. * include/std/stdexcept: Use _GLIBCXX_NOTHROW instead of _GLIBCXX_USE_NOEXCEPT. (logic_error,

Re: [PATCH] Fix several AVX512 intrinsic mask arguments.

2018-07-05 Thread Grazvydas Ignotas
On Thu, Jul 5, 2018 at 9:28 PM, Jakub Jelinek wrote: > On Thu, Jul 05, 2018 at 08:30:27PM +0300, Grazvydas Ignotas wrote: >> gcc/ChangeLog: >> >> 2018-07-05 Grazvydas Ignotas >> >> * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask, >> _mm512_mask_cmp_epu8_mask): Fix mask

[PATCH] doc clarification: DONE and FAIL in define_split and define_peephole2

2018-07-05 Thread Paul Koning
Currently DONE and FAIL are documented only for define_expand, but they also work in essentially the same way for define_split and define_peephole2. If FAIL is used in a define_insn_and_split, the output pattern cannot be the usual "#" dummy value. This patch updates the doc to describe those

[PATCH] fold strlen() of aggregate members (PR 77357)

2018-07-05 Thread Martin Sebor
GCC folds accesses to members of constant aggregates except for character arrays/strings. For example, the strlen() call below is not folded: const char a[][4] = { "1", "12" }; int f (void) { retturn strlen (a[1]); } The attached change set enhances the string_constant() function to make

[PATCH] fold strlen() of substrings within strings (PR 86415)

2018-07-05 Thread Martin Sebor
GCC folds strlen() calls to empty substrings within arrays whose elements are explicitly initialized with NULs but fails to do the same for elements that are zeroed out implicitly. For example: const char a[7] = "123\000\000\000"; int f (void) { return strlen (a + 5); // folded }

[PATCH] RISC-V: Add support for riscv-*-*.

2018-07-05 Thread Jim Wilson
Support for riscv-* was added to config.sub upstream, so we need to handle it in gcc configure. Just one place needs to be fixed for now to make this work. Tested with riscv{32,64}-{elf,linux} and riscv-elf cross builds. Committed. Jim gcc/ * config.gcc (riscv*-*-*): When

Re: [PATCH] Update config.guess and config.sub

2018-07-05 Thread Jeff Law
On 07/05/2018 09:18 PM, Jim Wilson wrote: > On Thu, Jul 5, 2018 at 12:22 PM, Liviu Ionescu wrote: >>> On 5 Jul 2018, at 22:17, Jim Wilson wrote: >>> ... I can fix the gcc config.sub to make it work. >> Or you can edit `gcc/config.gcc` and trigger an error for `riscv-linux*`. > > I added patches

Re: [PATCH 0/3][POPCOUNT]

2018-07-05 Thread Richard Biener
On July 6, 2018 12:03:11 AM GMT+02:00, Jeff Law wrote: >On 06/24/2018 08:41 PM, Kugan Vivekanandarajah wrote: >> Hi Jeff, >> >> Thanks for the comments. >> >> On 23 June 2018 at 02:06, Jeff Law wrote: >>> On 06/22/2018 03:11 AM, Kugan Vivekanandarajah wrote: When we set niter with

Re: [PATCH] Update config.guess and config.sub

2018-07-05 Thread Jim Wilson
On Thu, Jul 5, 2018 at 12:22 PM, Liviu Ionescu wrote: >> On 5 Jul 2018, at 22:17, Jim Wilson wrote: >> ... I can fix the gcc config.sub to make it work. > Or you can edit `gcc/config.gcc` and trigger an error for `riscv-linux*`. I added patches to binutils and gcc to make riscv-elf work.

[committed] [PR tree-optimization/86010] More aggressively trim partially dead mem* and str* calls

2018-07-05 Thread Jeff Law
As noted in BZ 86010 we can be more aggressive when trimming tails of mem* or str* calls in gimple DSE since trimming a tail doesn't affect alignment and residuals are usually handled pretty efficiently in libc. Additionally, if the total number of live bytes left is smaller than a word, then

Re: [PATCH] fold strlen() of substrings within strings (PR 86415)

2018-07-05 Thread Jeff Law
On 07/05/2018 05:54 PM, Martin Sebor wrote: > GCC folds strlen() calls to empty substrings within arrays > whose elements are explicitly initialized with NULs but > fails to do the same for elements that are zeroed out > implicitly.  For example: > >   const char a[7] = "123\000\000\000"; >   int 

[committed] Fix tree-ssa/asm-2.c on the v850

2018-07-05 Thread Jeff Law
r0 on the v850 is a hardwired 0 value. For reasons unknown I exposed it in the register file. This runs afoul of tree-ssa/asm-2.c which has a local variable explicitly assigned to register 0. This naturally blows up. The fix is trivial, use a different register like other ports do.

[PATCH], Add configuration checks to PowerPC --with-long-double-format=ieee

2018-07-05 Thread Michael Meissner
This patch adds a simple check of whether the GLIBC should be capable of switching the long double format on the PowerPC to IEEE 128-bit floating point. At the moment, library work is not yet finished, but I'm assuming that the patches will be in place when GLIBC 2.28 is released. If it turns out

Re: [PATCH 0/3][POPCOUNT]

2018-07-05 Thread Jeff Law
On 07/05/2018 11:39 PM, Richard Biener wrote: > On July 6, 2018 12:03:11 AM GMT+02:00, Jeff Law wrote: >> On 06/24/2018 08:41 PM, Kugan Vivekanandarajah wrote: >>> Hi Jeff, >>> >>> Thanks for the comments. >>> >>> On 23 June 2018 at 02:06, Jeff Law wrote: On 06/22/2018 03:11 AM, Kugan