Re: [PATCH] PR fortran/65173 -- kill off old_cl_list from gfc_namespace.

2016-12-07 Thread Paul Richard Thomas
Hi Steve, "Accidence" == state of fixing non-deterministic ICEs? :-) OK for trunk. Thanks for dealing with this kind of dead wood. Cheers Paul On 8 December 2016 at 06:10, Steve Kargl wrote: > On Wed, Dec 07, 2016 at 08:51:11PM -0800, Steve Kargl wrote: >> On Wed, Dec 07, 2016 at 07:55:01PM

Re: [C++ PATCH] P0003R5 - removal of dynamic exception specification from C++17

2016-12-07 Thread Jason Merrill
On Wed, Dec 7, 2016 at 2:00 PM, Jakub Jelinek wrote: > I think throw() is still so commonly used that emitting deprecation warning > for it is undesirable (in any mode). Agreed. > + location_t loc = token->location; > >/* Consume the `throw'. */ >cp_lexer_consume_token (parser->lexer);

Re: [PATCH] PR fortran/65173 -- kill off old_cl_list from gfc_namespace.

2016-12-07 Thread Steve Kargl
On Wed, Dec 07, 2016 at 08:51:11PM -0800, Steve Kargl wrote: > On Wed, Dec 07, 2016 at 07:55:01PM -0800, Steve Kargl wrote: > > On Wed, Dec 07, 2016 at 06:14:34PM -0800, Steve Kargl wrote: > > > > > > 2016-12-07 Steven G. Kargl > > > > > > PR fortran/65173 > > > * gfortran.h (gfc_namespace

Re: [PATCH] PR fortran/65173 -- kill off old_cl_list from gfc_namespace.

2016-12-07 Thread Steve Kargl
On Wed, Dec 07, 2016 at 07:55:01PM -0800, Steve Kargl wrote: > On Wed, Dec 07, 2016 at 06:14:34PM -0800, Steve Kargl wrote: > > > > 2016-12-07 Steven G. Kargl > > > > PR fortran/65173 > > * gfortran.h (gfc_namespace): Remove old_cl_list member. > > * parse.c (use_modules, next_stat

Re: [PATCH] PR fortran/65173 -- kill off old_cl_list from gfc_namespace.

2016-12-07 Thread Steve Kargl
On Wed, Dec 07, 2016 at 06:14:34PM -0800, Steve Kargl wrote: > > 2016-12-07 Steven G. Kargl > > PR fortran/65173 > * gfortran.h (gfc_namespace): Remove old_cl_list member. > * parse.c (use_modules, next_statement): old_cl_list is gone. > (clear_default_charlen): Remove

Re: [PATCH] add missing attribute nonnull to stdio functions (PR 78673 and 17308)

2016-12-07 Thread Martin Sebor
+bitmap +get_nonnull_args (const_tree callexpr) +{ + tree fn = CALL_EXPR_FN (callexpr); + if (!fn || TREE_CODE (fn) != ADDR_EXPR) +return NULL; + + tree fndecl = TREE_OPERAND (fn, 0); + tree fntype = TREE_TYPE (fndecl); + tree attrs = TYPE_ATTRIBUTES (fntype); + if (!attrs) +return N

[PATCH, rs6000] Fix 32-bit BE failure for gcc.target/powerpc/fold-vec-add-7.c

2016-12-07 Thread Bill Schmidt
Hi, Andreas Schwab observed that the subject test case fails on 32-bit big-endian because the test is not restricted to targets that support __int128. This patch rectifies that. Tested on powerpc64-unknown-linux-gnu and verified that the test is flagged as unsupported for BE, but runs correctly

[PATCH] Avoid double unread_char (c) in patch 8a of RTL frontend

2016-12-07 Thread David Malcolm
The RTL frontend patch kit failed to build on powerpc-ibm-aix7.1.3.0 (gcc111), with this error: build/genmddeps ../../src/gcc/common.md ../../src/gcc/config/rs6000/rs6000.md > tmp-mddeps ../../src/gcc/config/rs6000/rs6000.md:2255:1: unterminated construct due to the final close paren on line 225

[PATCH] PR fortran/65173 -- kill off old_cl_list from gfc_namespace.

2016-12-07 Thread Steve Kargl
All, The attach patch fixes an ICE from a testcase in PR fortran/65173. First, I draw your attention to the comment in gfortran.h above the definition of gfc_charlen. It is /* Character length structures hold the expression that gives the length of a character variable. We avoid putting the

Re: [libgo] Remove unused declarations in runtime.h

2016-12-07 Thread Ian Lance Taylor
On Wed, Oct 19, 2016 at 3:38 PM, Eric Botcazou wrote: > > linking any Go program on SPARC/Solaris with the GNU assembler and the Sun > linker yields a warning: > > ld: warning: relocation error: R_SPARC_UA32: file > /sydney.a/users/botcazou/gcc-head/sparc-sun- > solaris2.10/./libgo/libgobegin.a(li

Re: [PING] [PATCH] enhance buffer overflow warnings (and c/53562)

2016-12-07 Thread Martin Sebor
+ /* An anti-range implies the original variable is signed and + its lower bound is negative and the upper bound positive. + Since that means that the expression's value could be zero + nothing interesting can be inferred from this. */ I'm not sure I agree with this

Re: Hurd port for gcc go PATCH 1-4(23)

2016-12-07 Thread Ian Lance Taylor
On Wed, Dec 7, 2016 at 2:02 PM, Svante Signell wrote: > > I'm sorry but neither of you or I are in the position to request changes of > already existing file names e.g. replacing linux with glibc in: > os/pipe_linux.go > crypto/x509/root_linux.go > syscall/errstr_linux.go As you know, the name "l

Re: [LRA] Fix ICE on pathological testcase

2016-12-07 Thread Eric Botcazou
> Presumably the MEM isn't a valid memory address, but it's allowed > through due to the use of an "X" constraint? Yes (that was supposed to be more or less clear given the description :-). > ISTM that LRA has to be prepared to handle an arbitrary RTX, so punting > seems appropriate. My opinion

New Spanish PO file for 'gcc' (version 6.2.0)

2016-12-07 Thread Translation Project Robot
Hello, gentle maintainer. This is a message from the Translation Project robot. A revised PO file for textual domain 'gcc' has been submitted by the Spanish team of translators. The file is available at: http://translationproject.org/latest/gcc/es.po (This file, 'gcc-6.2.0.es.po', has just

Re: [PR78365] ICE in determine_value_range, at tree-ssa-loo p-niter.c:413

2016-12-07 Thread kugan
Hi Martin, On 07/12/16 21:08, Martin Jambor wrote: Hello Kugan, sorry, I have lost track of this patch and re-discovered it only now. On Mon, Nov 28, 2016 at 04:25:00PM +1100, kugan wrote: Hi, On 24/11/16 19:48, Richard Biener wrote: On Wed, Nov 23, 2016 at 4:33 PM, Martin Jambor wrote: H

Re: [PATCH] warn on overflow in calls to allocation functions (bugs 77531 and 78284)

2016-12-07 Thread Jeff Law
On 11/19/2016 05:55 PM, Martin Sebor wrote: gcc-78284.diff PR c/77531 - __attribute__((alloc_size(1,2))) could also warn on multiplication overflow PR c/78284 - warn on malloc with very large arguments gcc/c-family/ChangeLog: PR c/77531 PR c/78284 * c.opt (-Walloc-z

Re: [C++ PATCH] P0003R5 - removal of dynamic exception specification from C++17

2016-12-07 Thread Jonathan Wakely
On 07/12/16 20:00 +0100, Jakub Jelinek wrote: Jonathan, there is one hunk in libstdc++ still needed (on top of what you've committed today). Is that ok with you? Yes, sorry I missed that one. Your fix is OK, thanks.

Re: Hurd port for gcc go PATCH 1-4(23)

2016-12-07 Thread Svante Signell
On Wed, 2016-12-07 at 17:25 +0100, Samuel Thibault wrote: > Svante Signell, on Wed 07 Dec 2016 15:32:31 +0100, wrote: > > On Wed, 2016-12-07 at 15:08 +0100, Samuel Thibault wrote: > > > Ok, but then I'd say move the function which change to a separate file, > > > so that the other functions are kep

Re: [PATCH] Enable -fsanitize-address-use-after-scope only if -fsanitize=address is enabled

2016-12-07 Thread Sandra Loosemore
On 12/07/2016 12:30 PM, Dmitry Vyukov wrote: On Wed, Dec 7, 2016 at 8:23 PM, Sandra Loosemore wrote: You need to fix doc/invoke.texi as well to reflect this change. Done. Attached updated patch. The documentation change is OK. -Sandra

Re: [Patch, fortran] PR44265 - Link error with reference to parameter array in specification expression

2016-12-07 Thread Andre Vehreschild
Hi Paul, When you can narrow it down to only failing on Darwin, then filter the testcases not to run on that system. - Andre Am 7. Dezember 2016 22:44:15 MEZ, schrieb Paul Richard Thomas : >Dear Dominique, > >Thanks for the feedback. However, I don't know what to do about it. >Perhaps I should

Re: [Patch, fortran] PR44265 - Link error with reference to parameter array in specification expression

2016-12-07 Thread Paul Richard Thomas
Dear Dominique, Thanks for the feedback. However, I don't know what to do about it. Perhaps I should commit the patch without char_result_[16,17].f90 and pass it on to somebody who is a bit more conversent with these issues? As far as I am concerned, it is fixed on Linux. Any ideas anybody? Paul

Re: [PATCH] Fix up ICEs with TREE_CONSTANT references (PR c++/78373)

2016-12-07 Thread Jakub Jelinek
On Wed, Dec 07, 2016 at 02:42:12PM -0700, Jeff Law wrote: > >2016-11-16 Jakub Jelinek > > > > PR c++/78373 > > * gimplify.c (gimplify_decl_expr): For TREE_CONSTANT reference > > vars with is_gimple_min_invariant initializer after stripping > > useless conversions keep non-NULL DE

Re: [PATCH] Fix up ICEs with TREE_CONSTANT references (PR c++/78373)

2016-12-07 Thread Jeff Law
On 11/16/2016 02:00 PM, Jakub Jelinek wrote: Hi! Jason's recent patch to turn reference vars initialized with invariant addresses broke the first testcase below, because &self->singleton is considered TREE_CONSTANT (because self is TREE_CONSTANT VAR_DECL and singleton field has constant offset),

Re: [PATCH] Fix ICE due to IPA-VRP (PR tree-optimization/78681)

2016-12-07 Thread Jeff Law
On 12/07/2016 02:24 PM, Jakub Jelinek wrote: On Wed, Dec 07, 2016 at 02:18:15PM -0700, Jeff Law wrote: On 12/05/2016 02:14 PM, Jakub Jelinek wrote: Hi! As shown on the testcase, with K&R definitions and fn prototypes with promoted types, we can end up computing caller's value ranges in wider t

Re: [PATCH] Fix ICE due to IPA-VRP (PR tree-optimization/78681)

2016-12-07 Thread Jakub Jelinek
On Wed, Dec 07, 2016 at 02:18:15PM -0700, Jeff Law wrote: > On 12/05/2016 02:14 PM, Jakub Jelinek wrote: > >Hi! > > > >As shown on the testcase, with K&R definitions and fn prototypes with > >promoted types, we can end up computing caller's value ranges in wider > >type than the parameter actually

Re: [LRA] Fix ICE on pathological testcase

2016-12-07 Thread Jeff Law
On 12/06/2016 05:28 AM, Eric Botcazou wrote: Hi, the compiler ICEs for SPARC 64-bit with LRA on the asm-subreg-1.c test: volatile unsigned short _const_32 [4] = {1,2,3,4}; void evas_common_convert_yuv_420p_601_rgba() { __asm__ __volatile__ ("" : : "X" (*_const_32)); } The issue is that combi

Re: [tree-tailcall] Check if function returns it's argument

2016-12-07 Thread Jeff Law
On 12/06/2016 03:16 AM, Richard Biener wrote: On Tue, 6 Dec 2016, Richard Biener wrote: On Mon, 5 Dec 2016, Jeff Law wrote: On 12/02/2016 01:33 AM, Richard Biener wrote: The LHS on the assignment makes it easier to identify when a tail call is possible. It's not needed for correctness. Not

Re: [PATCH] Fix ICE due to IPA-VRP (PR tree-optimization/78681)

2016-12-07 Thread Jeff Law
On 12/05/2016 02:14 PM, Jakub Jelinek wrote: Hi! As shown on the testcase, with K&R definitions and fn prototypes with promoted types, we can end up computing caller's value ranges in wider type than the parameter actually has in the function. The problem with that is that wide_int_storage::from

[PATCH] fix c++/78551 ICE in constexpr

2016-12-07 Thread Nathan Sidwell
This patch fixes 78551. The union was a red herring. The underlying problem is that we first initialize a char array with a string constant, and then zap a random element of that array. That zapping expects to see a CONSTRUCTOR, not a STRING_CST. Fixed by expanding the STRING_CST into a CON

C++ PATCH to reject initializating flexible array members in constructors (PR c++/72775)

2016-12-07 Thread Marek Polacek
We were crashing in finish_expr_stmt here: 676 /* If we ran into a problem, make sure we complained. */ 677 gcc_assert (expr != error_mark_node || seen_error ()); Well, we ran into a problem, but never raised an error. The problem was that we couldn't determine the max index of the

Re: [PATCH PR78684]Check sign bit for index step of data reference.

2016-12-07 Thread Jeff Law
On 12/07/2016 08:10 AM, Bin Cheng wrote: Hi, This patch fixes ICE reported in PR78684, it checks sign bit of integer const thus can handle unsigned types. Bootstrap and test on x86_64, is it OK? Thanks, bin 2016-12-06 Bin Cheng PR middle-end/78684 * tree-vect-loop-manip.c

Re: [PATCH] C FE: implement fix-it hint for -Wmissing-braces

2016-12-07 Thread Jeff Law
On 11/11/2016 06:30 PM, David Malcolm wrote: This patch implements fix-it hints to -Wmissing-braces, showing where to add braces. For example: $ cat test.c int arr_2_3_2[2][3][2] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}; $ ./xgcc -B. -c test.c -Wall -fdiagnostics-generate-patc

Re: [PATCH] Move __builtin_strstr folding from builtins.c to fold-const-call.c + gimple-fold.c; plus a constexpr testcase for strstr

2016-12-07 Thread Jeff Law
On 12/07/2016 10:30 AM, Jakub Jelinek wrote: Hi! As discussed on IRC, this patch adds a constexpr handling testcase for the strstr builtin and moves it over to the desired files (gimple-fold.c and fold-const-call.c). Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? 2016-12-

Re: [PING] [PATCH] enhance buffer overflow warnings (and c/53562)

2016-12-07 Thread Jeff Law
On 11/09/2016 03:49 PM, Martin Sebor wrote: gcc-53562.diff PR c/53562 - Add -Werror= support for -D_FORTIFY_SOURCE / __builtin___memcpy_chk PR middle-end/77784 - duplicate warning for snprintf when n > object size PR middle-end/78149 - missing warning on strncpy buffer overflow due to an ex

Re: [PATCH] Enable -fsanitize-address-use-after-scope only if -fsanitize=address is enabled

2016-12-07 Thread Dmitry Vyukov
On Wed, Dec 7, 2016 at 8:23 PM, Sandra Loosemore wrote: > On 12/07/2016 11:44 AM, Dmitry Vyukov wrote: >> >> Hello, >> >> Revision 241896 added -fsanitize-address-use-after-scope and enabled >> it whenever any sanitizer is enabled. This caused problems for kernel >> which does not have necessary c

Re: [PATCH] Enable -fsanitize-address-use-after-scope only if -fsanitize=address is enabled

2016-12-07 Thread Sandra Loosemore
On 12/07/2016 11:44 AM, Dmitry Vyukov wrote: Hello, Revision 241896 added -fsanitize-address-use-after-scope and enabled it whenever any sanitizer is enabled. This caused problems for kernel which does not have necessary callbacks for -fsanitize-address-use-after-scope. I've added the callbacks

Re: [PATCH] handle integer overflow/wrapping in printf directives (PR 78622)

2016-12-07 Thread Martin Sebor
On 12/07/2016 11:43 AM, Jeff Law wrote: On 12/02/2016 03:54 PM, Martin Sebor wrote: Thanks for looking at this! I realize it's dense code and not easy to make sense out of. + + if (TREE_CODE (*argmin) == INTEGER_CST + && TREE_CODE (*argmax) == INTEGER_CST + && (dirprec >= argprec +

Re: [Patch, fortran] PR44265 - Link error with reference to parameter array in specification expression

2016-12-07 Thread Dominique d'Humières
The tests gfortran.dg/char_result_16.f90 and gfortran.dg/char_result_17.f90 fail with lto1: error: two or more sections for .gnu.lto___get_PROC_names.3e3ee55b08747e7c lto1: internal compiler error: cannot read LTO decls from /var/folders/8q/sh_swgz96r7f5vnn08f7fxr0gn/T//ccEJosbA.o This may

Re: [PATCH] Fix cgraph_edge::redirect_call_stmt_to_callee noreturn call handling (PR c++/78692)

2016-12-07 Thread Jeff Law
On 12/07/2016 10:28 AM, Jakub Jelinek wrote: Hi! The code in this function assumes that lhs is the lhs of new_stmt (it tests that new_stmt is a noreturn call etc.), but that is only the case if new_stmt == e->call_stmt. But in the function it can be set to various other stmts. Nothing tests th

[C++ PATCH] P0003R5 - removal of dynamic exception specification from C++17

2016-12-07 Thread Jakub Jelinek
Hi! This patch attempts to implement the P0003R5 paper (I could find just traces of it in the github repo and the wording in n4618.pdf). I think throw() is still so commonly used that emitting deprecation warning for it is undesirable (in any mode). Bootstrapped/regtested on x86_64-linux and i686

Re: [PATCH] handle integer overflow/wrapping in printf directives (PR 78622)

2016-12-07 Thread Jeff Law
On 12/05/2016 08:43 PM, Martin Sebor wrote: Martin $ cat b.c && /build/gcc-78622/gcc/xgcc -B /build/gcc-78622/gcc -O2 -S -Wall -Wextra -Wpedantic b.c char d[1]; void f (int i) { if (i < 1024 || 1033 < i) i = 1024; __builtin_sprintf (d + 1, "%hhi", i); } void g (int i) { if (i < 1024 ||

Re: [PATCH] Enable -fsanitize-address-use-after-scope only if -fsanitize=address is enabled

2016-12-07 Thread Jakub Jelinek
On Wed, Dec 07, 2016 at 07:44:39PM +0100, Dmitry Vyukov wrote: > OK for trunk? > Index: gcc/ChangeLog > === > --- gcc/ChangeLog (revision 243344) > +++ gcc/ChangeLog (working copy) > @@ -1,3 +1,10 @@ > +2016-12-07 Dmitry Vyuk

[PATCH] Enable -fsanitize-address-use-after-scope only if -fsanitize=address is enabled

2016-12-07 Thread Dmitry Vyukov
Hello, Revision 241896 added -fsanitize-address-use-after-scope and enabled it whenever any sanitizer is enabled. This caused problems for kernel which does not have necessary callbacks for -fsanitize-address-use-after-scope. I've added the callbacks to kernel tip, but older kernel branches still

Re: [PATCH] handle integer overflow/wrapping in printf directives (PR 78622)

2016-12-07 Thread Jeff Law
On 12/02/2016 03:54 PM, Martin Sebor wrote: Thanks for looking at this! I realize it's dense code and not easy to make sense out of. + + if (TREE_CODE (*argmin) == INTEGER_CST + && TREE_CODE (*argmax) == INTEGER_CST + && (dirprec >= argprec + || integer_zerop (int_const_binop (R

[PATCH] Fix c++/78621 generic lambda mangling

2016-12-07 Thread Nathan Sidwell
This patch fixes the generic lambda mangling bug that caused the demangler to infinitely recurse (78252). The generic's auto parms fail the is_auto check because that's testing for the 'auto' identifier, whereas the parms are distinct template type parms named 'auto:$N'. Amending is_auto to do

[arm-embedded] [PATCH, GCC/LRA] Fix PR78617: Fix conflict detection in rematerialization

2016-12-07 Thread Thomas Preudhomme
We decided to also apply this patch to fix a wrong code generation to the ARM embedded 6 branch. 2016-12-07 Thomas Preud'homme Backport from mainline 2016-12-07 Thomas Preud'homme gcc/ PR rtl-optimization/78617 * lra-remat.c (do_remat): Initialize live_hard_regs from

Re: [PATCH, GCC/ARM, gcc-5/6-branch, ping] Fix ICE when compiling empty FIQ interrupt handler in ARM mode

2016-12-07 Thread Thomas Preudhomme
On 06/12/16 11:37, Kyrill Tkachov wrote: On 06/12/16 11:36, Thomas Preudhomme wrote: Ping? Best regards, Ok if bootstrap and testing on those branches doesn't reveal any issues. Both backport bootstrapped fine when configured with: --with-arch=armv7-a --with-mode=arm -with-fpu=neon-vfp

[PATCH] improve string find algorithm

2016-12-07 Thread Aditya Kumar
Here is an improved version of basic_string::find. The idea is to split the string find in two parts: 1. search for the first match by using traits_type::find (this gets converted to memchr for x86) 2. see if there is a match (this gets converted to memcmp for x86) Passes bootstrap on x86-64. Th

[PATCH] Move __builtin_strstr folding from builtins.c to fold-const-call.c + gimple-fold.c; plus a constexpr testcase for strstr

2016-12-07 Thread Jakub Jelinek
Hi! As discussed on IRC, this patch adds a constexpr handling testcase for the strstr builtin and moves it over to the desired files (gimple-fold.c and fold-const-call.c). Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? 2016-12-07 Jakub Jelinek * builtins.c (fold

[PATCH] Fix cgraph_edge::redirect_call_stmt_to_callee noreturn call handling (PR c++/78692)

2016-12-07 Thread Jakub Jelinek
Hi! The code in this function assumes that lhs is the lhs of new_stmt (it tests that new_stmt is a noreturn call etc.), but that is only the case if new_stmt == e->call_stmt. But in the function it can be set to various other stmts. Nothing tests the lhs before this noreturn handling, so this pa

Re: [tree-tailcall] Check if function returns it's argument

2016-12-07 Thread Jeff Law
On 12/06/2016 01:25 AM, Richard Biener wrote: But if the function returns the value from the tail call, then going through an LHS is the right thing to do. Using the magic "argX will be the return value" seems clever, but actually hurts in practice. So we do want the reverse transform (for the

Re: [PATCH v3, rs6000] Add built-in support for vector compare listed in the ABI

2016-12-07 Thread Carl E. Love
On Tue, 2016-12-06 at 15:59 -0600, Segher Boessenkool wrote: > On Tue, Dec 06, 2016 at 01:23:24PM -0800, Carl E. Love wrote: > > Per the feedback I received on the first and second versions of the > > patch I have created the following patch to modify the original commit > > for the vector compare

Re: Hurd port for gcc go PATCH 1-4(23)

2016-12-07 Thread Samuel Thibault
Svante Signell, on Wed 07 Dec 2016 15:32:31 +0100, wrote: > On Wed, 2016-12-07 at 15:08 +0100, Samuel Thibault wrote: > > Ok, but then I'd say move the function which change to a separate file, > > so that the other functions are kept shared. > > Otherwise it'll be tedious to maintain. > > One pro

Re: [PATCH] Tree-level fix for PR 69526

2016-12-07 Thread Robin Dapp
> So we have (uint64_t)(uint32 + -1U) + 1 and using TYPE_SIGN (inner_type) > produces (uint64_t)uint32 + -1U + 1. This simply means that we cannot ignore > overflow of the inner operation and for some reason your change > to extract_range_from_binary_expr didn't catch this. That is _8 + 429496729

[PATCH, testsuite]: Require int128 effective target for gcc.target/i386/pr77761.c

2016-12-07 Thread Uros Bizjak
Also remove unneded functions. 2016-12-07 Uros Bizjak * gcc.target/i386/pr77761.c: Require int128 effective target. (avx512f_test): Delete. (do_main): Rename to avx512f_test. Tested on x86_64-linux-gnu {,-m32} and committed to mainline SVN. Uros. diff --git a/gcc/testsuite/gcc.ta

Re: [PATCH, rs6000] pr65479 Add -fasynchronous-unwind-tables when the -fsanitize=address option is seen

2016-12-07 Thread Peter Bergner
On 12/6/16 3:55 PM, Segher Boessenkool wrote: > On Tue, Dec 06, 2016 at 03:23:06PM -0600, Bill Seurer wrote: >> --- gcc/config/rs6000/rs6000.c (revision 243308) >> +++ gcc/config/rs6000/rs6000.c (working copy) >> @@ -5204,6 +5204,11 @@ rs6000_option_override (void) >> { >>(void) rs

Re: [Patch, fortran] PR44265 - Link error with reference to parameter array in specification expression

2016-12-07 Thread Paul Richard Thomas
Dear Dominique, I will turn to the effect on PR77414 after committing the patch for PR44265. The attached fixes the -flto problem. The chunk in trans-decl.c(gfc_finish_var_decl) did the job. It is quite obvious now and, in fact, I am a bit surprised that the patch worked at all without the DECL_E

Re: [PATCH, GCC/LRA] Fix PR78617: Fix conflict detection in rematerialization

2016-12-07 Thread Vladimir N Makarov
On 12/01/2016 12:40 PM, Thomas Preudhomme wrote: Hi, When considering a candidate for rematerialization, LRA verifies if the candidate clobbers a live register before going forward with the rematerialization (see code starting with comment "Check clobbers do not kill something living."). To

[PATCH 2/2] Replace uses of C++14 remove_cv_t alias in C++11 header

2016-12-07 Thread Jonathan Wakely
Most filesystem tests test fail when run with -std=gnu++11 * include/experimental/bits/fs_path.h (path::_S_convert): * Replace uses of C++14 std::remove_cv_t alias template. Tested x86_64-linux, committed to trunk. commit c5d7518d15c540541a77e997ba4bb6d33703bedd Author: Jonathan Wa

[PATCH 1/2] Replace use of C++14 std::exchange in C++11 testcase

2016-12-07 Thread Jonathan Wakely
This test fails when run with -std=gnu++11 * testsuite/28_regex/traits/char/user_defined.cc: Replace uses of C++14 std::exchange function. Tested x86_64-linux, committed to trunk. commit 897fb3679fda13a8ebda39cf8a60810b03f09e06 Author: Jonathan Wakely Date: Wed Dec 7 14:25:34

[PATCH 3/3] Replace dynamic exception specifications in testsuite

2016-12-07 Thread Jonathan Wakely
This replaces a number of dynamic exeptions spces in the testsuite, for C++17 compatibility. I introduced a new THROW macro for use in the tests, so they are not coupled to our internal _GLIBCXX_THROW macro which is only meant for use internally in the library. * testsuite/util/testsuite_

[PATCH 2/3] Use _GLIBCXX_THROW macro in bitmap_allocator

2016-12-07 Thread Jonathan Wakely
This header should use _GLIBCXX_THROW to make it C++17-friendly. * include/ext/bitmap_allocator.h (bitmap_allocator::_S_refill_pool) (bitmap_allocator::_M_allocate_single_object) (bitmap_allocator::_M_get): Use _GLIBCXX_THROW macro. Tested powerpc64le-linux, committed to tru

[PATCH 1/3] Disable test using std::set_unexcepted for C++17

2016-12-07 Thread Jonathan Wakely
This function has been removed from C++17, along with dynamic exception specifications. We haven't removed the function from the headers yet, but this ensures the test won't start failing once the front end starts giving an error for the exceptions specs. * testsuite/18_support/bad_except

[PATCH] Improve tests for contents of header

2016-12-07 Thread Jonathan Wakely
This test for the contents of the header doesn't get run for C++98 mode and doesn't include the C++14 and C++17 additions. I've split the C++98-only test into a separate file, and added the new parts so they're tested conditionally depending on how the test is run. * testsuite/18_support

[PATCH PR78684]Check sign bit for index step of data reference.

2016-12-07 Thread Bin Cheng
Hi, This patch fixes ICE reported in PR78684, it checks sign bit of integer const thus can handle unsigned types. Bootstrap and test on x86_64, is it OK? Thanks, bin 2016-12-06 Bin Cheng PR middle-end/78684 * tree-vect-loop-manip.c (create_intersect_range_checks_index): Chec

Re: IRA combine_and_move_insns fix, PR78669

2016-12-07 Thread Vladimir N Makarov
On 12/06/2016 01:10 PM, Bernd Schmidt wrote: In this PR, we have two registers with "replace" set for them. When processing the first, we delete its setter, which happens to be the only use of the other register. In the second iteration we then assert that the other register has a use, which

Re: Hurd port for gcc go PATCH 1-4(23)

2016-12-07 Thread Svante Signell
On Wed, 2016-12-07 at 15:08 +0100, Samuel Thibault wrote: > Svante Signell, on Wed 07 Dec 2016 14:52:35 +0100, wrote: > > Since go does not have a preprocessor allowing conditional code paths this > > is > > how it should be done (and as I did): > > http://blog.ralch.com/tutorial/golang-conditional

Re: [LRA] Fix ICE on pathological testcase

2016-12-07 Thread Bernd Edlinger
On 12/07/16 10:44, Richard Sandiford wrote: > Bernd Edlinger writes: >> Hi Eric, >> >> what you got there, looks more or less exactly like what I tried >> to fix with that patch a few months ago, but unfortunately >> we were unable to get a consensus on that approach: >> >> [PATCH] Fix asm X const

Re: Hurd port for gcc go PATCH 1-4(23)

2016-12-07 Thread Samuel Thibault
Svante Signell, on Wed 07 Dec 2016 14:52:35 +0100, wrote: > Since go does not have a preprocessor allowing conditional code paths this is > how it should be done (and as I did): > http://blog.ralch.com/tutorial/golang-conditional-compilation/ Ok, but then I'd say move the function which change to

Re: [patch v2] Get rid of stack trampolines for nested functions (1/4)

2016-12-07 Thread Eric Botcazou
> Yes I rebuilt everything and now it all looks good. The previously > failing testcases are now passing and no new regressions. I must have had > something set incorrectly in my environment on my first try. Thanks for confirming. -- Eric Botcazou

Re: [Patch PR78561 PowerPC] Revert to old behaviour for counting constant pools

2016-12-07 Thread Bernd Schmidt
On 12/07/2016 12:56 PM, Segher Boessenkool wrote: On Wed, Dec 07, 2016 at 10:31:14AM +, James Greenhalgh wrote: We always keep the entries in the constant pool after we first see them, and we figure out what gets used in the constant pool by sweeping through looking for referenced entries. T

Re: Hurd port for gcc go PATCH 1-4(23)

2016-12-07 Thread Svante Signell
On Sun, 2016-11-27 at 18:02 +0100, Samuel Thibault wrote: > Hello, > > Svante Signell, on Sun 27 Nov 2016 17:33:52 +0100, wrote: > > > >  > > > And > > > src_libgo_go_syscall_syscall_gnu_test.go: New file: > > >   Define Type and Whence as 32bit in syscall.Flock_t > > > > > > Again, you'll probab

Re: [patch v2] Get rid of stack trampolines for nested functions (1/4)

2016-12-07 Thread Lynn A. Boger
Yes I rebuilt everything and now it all looks good. The previously failing testcases are now passing and no new regressions. I must have had something set incorrectly in my environment on my first try. Thanks! On 12/06/2016 04:26 PM, Eric Botcazou wrote: I tried this patch applied agains

Re: Fix PR77309, combine eliminates sign bit comparison

2016-12-07 Thread Segher Boessenkool
On Wed, Dec 07, 2016 at 02:02:17PM +0100, Bernd Schmidt wrote: > On 10/28/2016 03:43 PM, Segher Boessenkool wrote: > >On Fri, Oct 28, 2016 at 01:18:19PM +0200, Bernd Schmidt wrote: > >>In this PR, we manage to simplify the code down to > >> > >>(lt (and (reg) (signbit)) (const 0)) > >> > >>simplify

Re: [PATCH] Remove x86 pcommit instruction

2016-12-07 Thread Andrew Senkevich
2016-12-07 15:34 GMT+03:00 Uros Bizjak : > On Wed, Dec 7, 2016 at 1:25 PM, Andrew Senkevich > wrote: > >> But how to update changes for upcoming GCC 6.3 (and future GCC 5.5)? > > There are corresponding documents at [1] and [2], please add a "GCC > 6.3" or "GCC 5.5" entry with "Target Specific Ch

Re: [PATCH][AArch64] Improve SHA1 scheduling

2016-12-07 Thread Wilco Dijkstra
James Greenhalgh wrote: > I haven't seen a follow-up to Andrew's point regarding other > read-modify-write operations. > > Did youi investigate the cost of these? I looked at whether there are other similar cases, but it appears SHA1 is unique due to the odd dataflow, the mismatch in latencies a

Re: config/ sync with binutils vs. removing gcc targets.

2016-12-07 Thread Bernd Schmidt
On 12/06/2016 11:40 PM, Alan Modra wrote: I understand that config/ in the gcc repository is the master source for binutils-gdb config/. If that's the case then people removing gcc support for particular targets need to be careful about their config/ edits. If a target is still supported in bin

Re: Fix PR77309, combine eliminates sign bit comparison

2016-12-07 Thread Bernd Schmidt
On 10/28/2016 03:43 PM, Segher Boessenkool wrote: On Fri, Oct 28, 2016 at 01:18:19PM +0200, Bernd Schmidt wrote: In this PR, we manage to simplify the code down to (lt (and (reg) (signbit)) (const 0)) simplify_comparison then calls make_compound_operation on the AND expression, and that turns

[C++ PATCH] {NON,}TYPE_ARGUMENT_PACK substitution

2016-12-07 Thread Nathan Sidwell
I also noticed argument pack substitution was doing more work than necessary -- we've already tsubst'd TYPE just before the big switch. Took the opportunity to simplify the control flow a bit further too. Committed. nathan -- Nathan Sidwell 2016-12-07 Nathan Sidwell * pt.c (tsubst <{NON,}

[C++ PATCH] cache auto/decltype(auto) identifiers

2016-12-07 Thread Nathan Sidwell
While lookign at generic lambda mangling, I noticed we like to use 'get_identifier ("auto")' a lot. Particularly in is_auto, which is called during tree walking. That's needlessly expensive. Fixed by adding a couple of new global identifiers. Committed. nathan -- Nathan Sidwell 2016-12-07

Re: config/ sync with binutils vs. removing gcc targets.

2016-12-07 Thread Alan Modra
On Wed, Dec 07, 2016 at 08:46:32PM +0900, Oleg Endo wrote: > Hi, > > Yeah, my SH5/SH64 removal procedures might have been a little too > radical, sorry about that. However ... > > On Wed, 2016-12-07 at 09:10 +1030, Alan Modra wrote: > > I understand that config/ in the gcc repository is the mast

Re: [PATCH] Remove x86 pcommit instruction

2016-12-07 Thread Uros Bizjak
On Wed, Dec 7, 2016 at 1:25 PM, Andrew Senkevich wrote: > But how to update changes for upcoming GCC 6.3 (and future GCC 5.5)? There are corresponding documents at [1] and [2], please add a "GCC 6.3" or "GCC 5.5" entry with "Target Specific Changes" at the end of the documents. [1] https://gcc

Re: [PATCH] Remove x86 pcommit instruction

2016-12-07 Thread Andrew Senkevich
2016-10-14 12:23 GMT+03:00 Richard Biener : > On Thu, Oct 13, 2016 at 11:39 PM, H.J. Lu wrote: >> On Thu, Oct 13, 2016 at 5:09 AM, Andrew Senkevich >> wrote: >>> 2016-10-11 20:09 GMT+03:00 H.J. Lu : On Tue, Oct 11, 2016 at 10:04 AM, Andrew Senkevich wrote: > 2016-10-06 1:07 GMT+03:

Re: [Patch, fortran] PR44265 - Link error with reference to parameter array in specification expression

2016-12-07 Thread Dominique d'Humières
Dear Paul, I have found another glitch with all the patches in this thread: they transform an ICE to accept-invalid for the tests z7.f90, z8.f90, and z9.f90 in pr77414. Dominique > Le 10 nov. 2016 à 23:48, Dominique d'Humières a écrit : > > FAIL: gfortran.dg/char_result_16.f90 -g -flto (in

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

2016-12-07 Thread Jakub Jelinek
On Wed, Dec 07, 2016 at 05:02:46PM +0530, Prathamesh Kulkarni wrote: > + if (arg1_len == NULL_TREE) > + { > + gimple_stmt_iterator gsi; > + tree strlen_decl; > + gimple *strle

[Ada] Fix glitch in debug info for renaming

2016-12-07 Thread Eric Botcazou
GDB cannot inspect renamings declared at library level when it relies on the special __XR variable generated as per the GNAT encodings. Tested on x86_64-suse-linux, applied on the mainline. 2016-12-07 Pierre-Marie de Rodat * gcc-interface/decl.c (gnat_to_gnu_entity): When they are g

Re: [Patch PR78561 PowerPC] Revert to old behaviour for counting constant pools

2016-12-07 Thread Segher Boessenkool
Hi James, On Wed, Dec 07, 2016 at 10:31:14AM +, James Greenhalgh wrote: > We always keep the entries in the constant pool after we first see them, and > we figure out what gets used in the constant pool by sweeping through > looking for referenced entries. That means we can always answer the >

[Ada] Translate System.Address into void* for foreign convention

2016-12-07 Thread Eric Botcazou
This was already the case for convention C. Tested on x86_64-suse-linux, applied on the mainline. 2016-12-07 Eric Botcazou * gcc-interface/decl.c (gnat_to_gnu_entity) : Translate System.Address into ptr_type_node for every foreign convention. (gnat_to_gnu_subprog_type

Re: config/ sync with binutils vs. removing gcc targets.

2016-12-07 Thread Oleg Endo
Hi, Yeah, my SH5/SH64 removal procedures might have been a little too radical, sorry about that.  However ... On Wed, 2016-12-07 at 09:10 +1030, Alan Modra wrote: > I understand that config/ in the gcc repository is the master source > for binutils-gdb config/.  If that's the case then people rem

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

2016-12-07 Thread Prathamesh Kulkarni
On 5 December 2016 at 23:47, Jakub Jelinek wrote: > On Mon, Dec 05, 2016 at 11:32:15PM +0530, Prathamesh Kulkarni wrote: >> So I had to check if SSA_NAME_DEF_STMT (rhs2) was call to strstr >> rather than rhs1. > > Then you need to test both whether it is strstr (s, t) == s or > s == strstr (s, t).

[Ada] Fix debug info for character subtypes

2016-12-07 Thread Eric Botcazou
This fixes a regression present on the mainline and 6 branch for the debug info of character subtypes, whose bounds are output as signed instead of unsigned values as per the language. Tested on x86_64-suse-linux, applied on the mainline and 6 branch. 2016-12-07 Eric Botcazou * gcc

Re: [PATCH] Make check_effective_target_c++ work for libstdc++

2016-12-07 Thread Ville Voutilainen
On 7 December 2016 at 13:24, Jonathan Wakely wrote: > I'd like to backport this (r238916) to the gcc-6-branch too. > > It's been very useful on trunk. The only problems are when we backport > new tests from trunk to the branch and forget that the effective > target doesn't work there (which leads

Re: [PATCH] Make check_effective_target_c++ work for libstdc++

2016-12-07 Thread Jonathan Wakely
On 29/07/16 20:43 +0100, Jonathan Wakely wrote: I've been working on some changes to let the libstdc++ testsuite use the same approach as G++ to specify a minimum language dialect for tests. That means instead of hardcoding { dg-options "-std=gnu++11" } we can use { dg-do run { target c++11 } } a

Re: [PATCH], PR target/72717, Fix PowerPC abort in emit_move_insn from rs6000_expand_vector_init

2016-12-07 Thread Segher Boessenkool
Hi Mike, On Wed, Dec 07, 2016 at 12:43:12AM -0500, Michael Meissner wrote: > I did a build on a little endian Power8 system and ran make check. There were > no regressions. Can I check it in the trunk? > > The bug also shows up in GCC 6, and I would like to install it into GCC 6 as > well. > I

Re: [PATCH] [AArch64] Fix PR78382

2016-12-07 Thread James Greenhalgh
On Wed, Dec 07, 2016 at 07:25:29AM +, Hurugalawadi, Naveen wrote: > Hi James, > > Thanks for the review and suggestions regarding the testcase. > > >> Why limit the ABI and endianness here > > Extra options have been dropped and the testcase will check across > all variants and endianness. >

Re: [PATCH] [AArch64] Fix PR71112

2016-12-07 Thread James Greenhalgh
On Wed, Dec 07, 2016 at 07:25:21AM +, Hurugalawadi, Naveen wrote: > Hi James, > > Thanks for the review and suggestions regarding the testcase. > > >> Why limit the ABI and endianness here, and if you do plan to do that > > Extra options have been dropped and the testcase will check across >

[Patch PR78561 PowerPC] Revert to old behaviour for counting constant pools

2016-12-07 Thread James Greenhalgh
Hi, This patch is a bit of a shot in the dark, as I've been unable to reproduce Segher's failures reported in the PR. But, he has confirmed on the PR that this patch fixes the issue he was seeing. Before my patch set, rs6000 was reading the size of the constant pool at several points in compilat

Re: [PR78365] ICE in determine_value_range, at tree-ssa-loo p-niter.c:413

2016-12-07 Thread Martin Jambor
Hello Kugan, sorry, I have lost track of this patch and re-discovered it only now. On Mon, Nov 28, 2016 at 04:25:00PM +1100, kugan wrote: > Hi, > > On 24/11/16 19:48, Richard Biener wrote: > > On Wed, Nov 23, 2016 at 4:33 PM, Martin Jambor wrote: > > > Hi, > > > > > > On Fri, Nov 18, 2016 at 1

Re: [LRA] Fix ICE on pathological testcase

2016-12-07 Thread Richard Sandiford
Bernd Edlinger writes: > Hi Eric, > > what you got there, looks more or less exactly like what I tried > to fix with that patch a few months ago, but unfortunately > we were unable to get a consensus on that approach: > > [PATCH] Fix asm X constraint (PR inline-asm/59155) > https://gcc.gnu.org/ml/

Re: [PATCH 8c/9] Add aarch64-specific selftests for RTL function reader

2016-12-07 Thread James Greenhalgh
On Tue, Dec 06, 2016 at 02:38:45PM -0500, David Malcolm wrote: > On Tue, 2016-12-06 at 17:22 +, James Greenhalgh wrote: > > On Thu, Dec 01, 2016 at 09:00:11PM -0500, David Malcolm wrote: > > > This patch adds more selftests for class function_reader, where > > > the dumps to be read contain aar

  1   2   >