Re: [PATCH] Fix ICEs when -fsanitize={undefined,address,thread} is used during -c -flto but not during the final link (PR sanitizer/78708)

2016-12-09 Thread Richard Biener
On December 9, 2016 8:30:26 PM GMT+01:00, Jakub Jelinek wrote: >Hi! > >If some TUs are compiled with -flto -fsanitize={undefined,address} or >-fsanitize=thread, there might be some internal calls in them which >require >sanopt pass to lower them. If the final link is performed without >the corre

Re: [PATCH] Fix tree-object-size for Fortran ARRAY_REFs (PR fortran/78758)

2016-12-09 Thread Richard Biener
On December 10, 2016 1:39:52 AM GMT+01:00, Jakub Jelinek wrote: >Hi! > >tree-object-size.c has been written with C-family FEs in mind (which is >where it has been solely used for initially), and as the testcases show >it doesn't work well with Fortran or other FE when it started to be >used >ever

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

2016-12-09 Thread Martin Sebor
On 12/09/2016 02:49 PM, Jason Merrill wrote: On Fri, Dec 9, 2016 at 11:33 AM, Martin Sebor wrote: For flexible array members, because they're not in C++, we get to make up the rules that make the most sense to us. IMO, they should fit in well with the rest of the language. I disagree; we sho

Re: [PATCH] Fix A < 0 ? C : 0 optimization (PR tree-optimization/78720)

2016-12-09 Thread Jakub Jelinek
On Sat, Dec 10, 2016 at 12:04:25AM +0100, Marc Glisse wrote: > On Fri, 9 Dec 2016, Jakub Jelinek wrote: > > >This patch fixes the recently added A < 0 ? C : 0 for power of 2 C > >optimization. The if (!TYPE_UNSIGNED (TREE_TYPE (@0))) part is just > >for safety, I'd hope that unsigned < 0 is folde

[PATCH] Fix tree-object-size for Fortran ARRAY_REFs (PR fortran/78758)

2016-12-09 Thread Jakub Jelinek
Hi! tree-object-size.c has been written with C-family FEs in mind (which is where it has been solely used for initially), and as the testcases show it doesn't work well with Fortran or other FE when it started to be used everywhere recently. Fixed thusly, bootstrapped/regtested on x86_64-linux an

Re: [PATCH] Fix A < 0 ? C : 0 optimization (PR tree-optimization/78720)

2016-12-09 Thread Marc Glisse
On Fri, 9 Dec 2016, Jakub Jelinek wrote: This patch fixes the recently added A < 0 ? C : 0 for power of 2 C optimization. The if (!TYPE_UNSIGNED (TREE_TYPE (@0))) part is just for safety, I'd hope that unsigned < 0 is folded into 0 earlier, but just in case this is handled first. The issue whi

Re: [Patch][i386] PR 70118: Fix ubsan warning on SSE2 loadl_epi64 and storel_epi64

2016-12-09 Thread Allan Sandfeld Jensen
On Tuesday 06 December 2016, Uros Bizjak wrote: > Hello! > > > 2016-11-30 Allan Sandfeld Jensen > > > >PR target/70118 > >* gcc/config/i386/mmintrin.h (__m64_u): New type > >* gcc/config/i386/emmintrin.h (_mm_loadl_epi64, _mm_storel_epi64): > >Make the allowed u

Re: libgo patch committed: Copy hash code from Go 1.7 runtime

2016-12-09 Thread Ian Lance Taylor
On Fri, Dec 9, 2016 at 2:09 AM, Sebastian Huber wrote: > On 08/12/16 17:37, Ian Lance Taylor wrote: >> >> +// For gccgo, use go:linkname to rename compiler-called functions to >> +// themselves, so that the compiler will export them. >> +// >> +//go:linkname memhash runtime.memhash >> + >> +const

Re: [C++ Patch] PR 78637 ("ICE on invalid C++ code (internal compiler error: in pop_namespace, at cp/name-lookup.c:3826)")

2016-12-09 Thread Jason Merrill
OK. On Fri, Dec 2, 2016 at 9:20 AM, Paolo Carlini wrote: > Hi, > > this regression is caused by my fix for c++/60385, where I changed > push_namespace to early return (a bool) when pushdecl fails. In the present > testcase, a different push_namespace call in cp_parser_namespace_definition, > for

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

2016-12-09 Thread Jason Merrill
On Fri, Dec 9, 2016 at 11:33 AM, Martin Sebor wrote: > For flexible array members, because they're not in C++, we get to > make up the rules that make the most sense to us. IMO, they should > fit in well with the rest of the language. I disagree; we should support C code, but flexible arrays don

[PATCH] Add ISA 3.0 PowerPC support for VEXTU{B,H,W}{L,R}X instructions

2016-12-09 Thread Michael Meissner
This patch adds support to use the ISA 3.0 VEXTU{B,H,W}{L,R}X byte extract instructions in the PowerPC. These instructions extract a byte, 16-bit half-word, or 32-bit word from a vector register using a variable index in a general purpose register, and put the result in a general purpose register.

Re: [RFC] combine: Improve change_zero_ext, call simplify_set afterwards.

2016-12-09 Thread Segher Boessenkool
On Fri, Dec 09, 2016 at 08:32:01PM +0100, Dominik Vogt wrote: > > > This is a work in progress with the goal of fixing the first > > > problem and similar ones by calling simplify_set after > > > change_zero_ext to get rid of the overly complex code. That > > > works fine in principle, but

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

2016-12-09 Thread Steven G. Kargl
On Fri, Dec 09, 2016 at 01:54:34PM +0200, Janne Blomqvist wrote: > On Fri, Dec 9, 2016 at 1:47 PM, Paul Richard Thomas > wrote: > > I'm seeing the same thing, I guess. Or rather that the ts->type == 81 > which is non-sensical. No idea where that comes from.. > > Backtrace from gdb: > > #0 gfc_c

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

2016-12-09 Thread Jakub Jelinek
On Fri, Dec 09, 2016 at 10:44:17AM -0700, Martin Sebor wrote: > On 12/09/2016 06:26 AM, Andreas Schwab wrote: > >FAIL: gcc.dg/attr-alloc_size-3.c (test for warnings, line 445) > >FAIL: gcc.dg/attr-alloc_size-3.c (test for excess errors) > >Excess errors: > >/daten/

Re: [PATCH] Add support for Fuchsia (OS)

2016-12-09 Thread Josh Conner
Sorry, that should have been: #define CC1_SPEC "%{!fno-pic:%{!fno-PIC:%{!fpic:%{!fPIC:" \ "%{!fno-pie:%{!fno-PIE:%{!fpie:%{!fPIE: -fPIE" (default to PIE, not PIC) On Fri, Dec 9, 2016 at 11:33 AM, Josh Conner wrote: > On 12/9/16 12:26 AM, Andrew Pinski wrote: >> >> On

[PATCH] Fix ppc ICE with and3_imm*_dot (PR target/72742)

2016-12-09 Thread Jakub Jelinek
Hi! rs6000.md has 2 sets of patterns for and with comparison, the non-_mask ones have !rs6000_is_valid_and_mask (operands[2], mode) predicate and have an extra clobber for the case where the destination is not first cc reg, while the second set implicitly assumes the operand is a valid mask operan

Re: [PATCH] Add support for Fuchsia (OS)

2016-12-09 Thread Josh Conner
On 12/9/16 12:26 AM, Andrew Pinski wrote: On Thu, Dec 8, 2016 at 2:55 PM, Josh Conner wrote: This patch adds support to gcc for the Fuchsia OS (https://fuchsia.googlesource.com/). OK for mainline? A few comments: +/* Build with PIC by default. */ +#undef CC1_SPEC +#define CC1_SPEC "%{!fno-

PR target/78213 revisited (was Re: [PATCH 5/9] Introduce selftest::locate_file (v4))

2016-12-09 Thread David Malcolm
On Fri, 2016-12-09 at 02:48 +0100, Bernd Schmidt wrote: > On 12/08/2016 10:47 PM, David Malcolm wrote: > > > Is (A) OK, or would you prefer (B)? (I prefer (A) fwiw) > > Oh well, just keep it as it is. > > > Bernd Thanks. Unfortunately, applying the "locate_file" patch https://gcc.gnu.org/

Re: [RFC] combine: Improve change_zero_ext, call simplify_set afterwards.

2016-12-09 Thread Dominik Vogt
On Fri, Dec 09, 2016 at 12:25:04PM -0600, Segher Boessenkool wrote: > Hi Dominik, > > On Fri, Dec 09, 2016 at 04:23:44PM +0100, Dominik Vogt wrote: > > 0001-* > > > > Deal with mode expanding zero_extracts in change_zero_ext. The > > patch looks good to me, but not sure whether endianness is

[PATCH] Fix ICEs when -fsanitize={undefined,address,thread} is used during -c -flto but not during the final link (PR sanitizer/78708)

2016-12-09 Thread Jakub Jelinek
Hi! If some TUs are compiled with -flto -fsanitize={undefined,address} or -fsanitize=thread, there might be some internal calls in them which require sanopt pass to lower them. If the final link is performed without the corresponding -fsanitize=* options (user bug), that pass might not be run at

[PATCH] Fix A < 0 ? C : 0 optimization (PR tree-optimization/78720)

2016-12-09 Thread Jakub Jelinek
Hi! This patch fixes the recently added A < 0 ? C : 0 for power of 2 C optimization. The if (!TYPE_UNSIGNED (TREE_TYPE (@0))) part is just for safety, I'd hope that unsigned < 0 is folded into 0 earlier, but just in case this is handled first. The issue which breaks the testcase is that the patc

Re: Fix -Wstringop-overflow ICE with references (PR middle-end/78750)

2016-12-09 Thread Richard Biener
On December 9, 2016 4:27:19 PM GMT+01:00, Marek Polacek wrote: >The attached test crashed because we wound up with an SSA_NAME of >a reference type in get_range_info which has > > gcc_assert (!POINTER_TYPE_P (TREE_TYPE (name))); > >I think this could be fixed by treating "char &" the same as "ch

Re: Fix PR78725

2016-12-09 Thread Richard Biener
On December 9, 2016 4:29:04 PM GMT+01:00, Michael Matz wrote: >Hi, > >if the induction variable on which we want to partition the loop >iterations for loop splitting might overflow we would either need >runtime >tests checking if an overflow in fact does happen, or we can simply not > >split loo

[PATCH] PR78056: Finish fixing build failure on Power7

2016-12-09 Thread Kelvin Nilsen
This patch adds warning messages and test cases to an initial patch already submitted and committed to the trunk on October 26, 2016. The earlier patch disables initialization of built-in functions which depend on assembler capabilities that are not supported by the associated tool chain. The ori

Re: [RFC] combine: Improve change_zero_ext, call simplify_set afterwards.

2016-12-09 Thread Segher Boessenkool
Hi Dominik, On Fri, Dec 09, 2016 at 04:23:44PM +0100, Dominik Vogt wrote: > 0001-* > > Deal with mode expanding zero_extracts in change_zero_ext. The > patch looks good to me, but not sure whether endianness is > handled properly. Is the second argument of gen_rtx_SUBREG > correct? Thi

Re: [0/67] Add wrapper classes for machine_modes

2016-12-09 Thread Sandra Loosemore
On 12/09/2016 05:48 AM, Richard Sandiford wrote: This series includes most of the changes in group C from: https://gcc.gnu.org/ml/gcc/2016-11/msg00033.html The idea is to add wrapper classes around machine_mode_enum for specific groups of modes, such as scalar integers, scalar floats, comp

[PATCH] correct %g handling with unknown arguments in -fprintf-return-value (PR 78696)

2016-12-09 Thread Martin Sebor
Bug 78696 points out a bug in the handling of the %g directive in the gimple-ssa-sprintf pass where precision wasn't being correctly handled. In the process of developing and testing a fix for it I noticed a few other subtle problems in the floating point handling of unknown values. The attached

[arm-embedded] [PATCH, GCC/ARM] Define arm_arch_core_flags in a single file

2016-12-09 Thread Thomas Preudhomme
We have decided to apply the patch proposed for trunk to solve the bloating of arm_arch_core_flags structure in GCC and files compiled by it to ARM embedded-6-branch. ChangeLog.arm entry is as follows: *** gcc/ChangeLog.arm *** 2016-12-09 Thomas Preud'homme gcc/ * config/

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

2016-12-09 Thread Martin Sebor
On 12/09/2016 06:26 AM, Andreas Schwab wrote: FAIL: gcc.dg/attr-alloc_size-3.c (test for warnings, line 445) FAIL: gcc.dg/attr-alloc_size-3.c (test for excess errors) Excess errors: /daten/aranym/gcc/gcc-20161209/gcc/testsuite/gcc.dg/attr-alloc_size-3.c:244:3: warning: product '65535 *

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

2016-12-09 Thread Martin Sebor
On 12/09/2016 02:59 AM, Christophe Lyon wrote: On 9 December 2016 at 00:54, Martin Sebor wrote: +enabled with @option{-Wextra}. So I think we should in the immediate term not enable this in Wextra. However, I think for gcc-8 we should revisit after fixing GCC to be cleaner WRT alloc-zero. So

Re: [PATCH] Fix PR78027

2016-12-09 Thread Alexander Monakov
On Fri, 9 Dec 2016, Cesar Philippidis wrote: > >> if (cgraph_node::get_create (decl)->offloadable > >> && !lookup_attribute ("omp declare target", > >> DECL_ATTRIBUTES (current_function_decl))) > >>{ > >> const char *target_attr = (is_gimple_omp_offloaded (c

Re: [nvptx] propagating conditionals in worker-vector partitioned loops

2016-12-09 Thread Bernd Schmidt
On 10/27/2016 12:29 AM, Cesar Philippidis wrote: Currently, the nvptx backend is only neutering the worker axis when propagating variables used in conditional expressions across the worker and vector axes. That's a problem with the worker-state spill and fill propagation implementation because al

[arm-embedded][committed] PR78255: Make postreload aware of NO_FUNCTION_CSE

2016-12-09 Thread Andre Vieira (lists)
Hi I backported this patch to the embedded-6-branch in revision r243496. Cheers, Andre gcc/ChangeLog.arm: 2016-12-09 Andre Vieira Backport from mainline 2016-12-09 Andre Vieira PR rtl-optimization/78255 * gcc/postreload.c (reload_cse_simplify): Do not CSE

[PATCH, GCC/ARM] Define arm_arch_core_flags in a single file

2016-12-09 Thread Thomas Preudhomme
Hi, This patch moves the definition of arm_arch_core_flags along with the declaration of its structure element type to common/config/arm/arm-common.c so that it is not *defined* in all object files including tm.h. Otherwise, GCC gets bloated with as many copy of that array as there is file inc

Re: [PATCH, GCC/testsuite/ARM] Fix empty_fiq_handler target selector

2016-12-09 Thread Thomas Preudhomme
On 09/12/16 15:39, Kyrill Tkachov wrote: On 09/12/16 15:28, Thomas Preudhomme wrote: Hi, The current target selector for empty_fiq_handler.c testcase skips the test when targeting Thumb mode on a device with ARM execution state. Because it checks Thumb mode by looking for an -mthumb option it

[Ping] [C++ Patch] PR 78637 ("ICE on invalid C++ code (internal compiler error: in pop_namespace, at cp/name-lookup.c:3826)")

2016-12-09 Thread Paolo Carlini
Hi, gently pinging, might be rather straightforward... On 02/12/2016 15:20, Paolo Carlini wrote: Hi, this regression is caused by my fix for c++/60385, where I changed push_namespace to early return (a bool) when pushdecl fails. In the present testcase, a different push_namespace call in cp

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

2016-12-09 Thread Martin Sebor
On 12/09/2016 08:34 AM, Nathan Sidwell wrote: On 12/09/2016 10:18 AM, Martin Sebor wrote: On 12/09/2016 08:09 AM, Jakub Jelinek wrote: On Fri, Dec 09, 2016 at 08:04:11AM -0700, Martin Sebor wrote: then (IMO) so is this: struct Foo { int a; char ary[]; Foo () : ary ("bob") {} };

Re: [PATCH] PR78255: Make postreload aware of NO_FUNCTION_CSE

2016-12-09 Thread Bernd Schmidt
On 12/09/2016 05:16 PM, Andre Vieira (lists) wrote: Regardless, 'reload_cse_simplify' would never perform the opposite transformation. It checks whether it can replace anything within the first argument INSN, with the second argument TESTREG. As the name implies this will always be a register.

Re: [PATCH, rs6000] whitespace fix for p9-dimode tests

2016-12-09 Thread Will Schmidt
On Thu, 2016-12-08 at 20:55 -0600, Segher Boessenkool wrote: > Hello, > > On Thu, Dec 08, 2016 at 10:18:42AM -0600, Will Schmidt wrote: > > I am seeing some failures in the p9-dimode tests. This appears to > > be due to the scan-assembler strings matching comment portions of the > > generated asse

Re: [PATCH] omp-low.c split

2016-12-09 Thread Alexander Monakov
On Fri, 9 Dec 2016, Jakub Jelinek wrote: > Can you post an incremental patch fixing those issues? A few small nits I found while reading the patch. First of all, please use 'git diff --patience' (or --histogram) when generating such patches, without it the changes in omp-low.c look uglier than ne

Re: [PATCH] PR78255: Make postreload aware of NO_FUNCTION_CSE

2016-12-09 Thread Andre Vieira (lists)
On 09/12/16 16:02, Ramana Radhakrishnan wrote: > On Fri, Dec 9, 2016 at 3:58 PM, Bernd Schmidt wrote: >> On 12/09/2016 04:34 PM, Andre Vieira (lists) wrote: >> >>> Regardless, the other testcases I add in this patch show a sub-optimal >>> transformation done by postreload, turning direct calls int

Re: [PATCH] Fix PR78027

2016-12-09 Thread Cesar Philippidis
On 12/09/2016 07:49 AM, Alexander Monakov wrote: > On Fri, 9 Dec 2016, Cesar Philippidis wrote: >>> Normally all offloaded code has either "omp declare target" (most >>> functions) or >>> "omp target entrypoint" (only toplevel offloaded code). This used to >>> include >>> OpenACC functions: they

Re: [PATCH] PR78255: Make postreload aware of NO_FUNCTION_CSE

2016-12-09 Thread Ramana Radhakrishnan
On Fri, Dec 9, 2016 at 3:58 PM, Bernd Schmidt wrote: > On 12/09/2016 04:34 PM, Andre Vieira (lists) wrote: > >> Regardless, the other testcases I add in this patch show a sub-optimal >> transformation done by postreload, turning direct calls into indirect >> calls, for targets which have specifica

Re: [PATCH] PR78255: Make postreload aware of NO_FUNCTION_CSE

2016-12-09 Thread Jeff Law
On 12/09/2016 08:02 AM, Bernd Schmidt wrote: On 12/09/2016 03:03 PM, Andre Vieira (lists) wrote: This patch fixes the issue reported in PR78255 by making postreload aware it should not be performing CSE on functions if NO_FUNCTION_CSE is defined to true. Bootstrap and full regression on arm-non

Re: [PATCH, rs6000] Fix gcc.target/powerpc/pr78691-ppc.c

2016-12-09 Thread Segher Boessenkool
Hi Bill, On Fri, Dec 09, 2016 at 09:39:27AM -0600, Bill Schmidt wrote: > The fix for PR78691 added a new test case for 32-bit PowerPC. However, the > test needs to be restricted to 32-bit targets to avoid a FAIL. This patch > fixes that. > > Tested on powerpc64-unknown-linux-gnu. Ok for trunk?

Re: [PATCH] PR78255: Make postreload aware of NO_FUNCTION_CSE

2016-12-09 Thread Bernd Schmidt
On 12/09/2016 04:34 PM, Andre Vieira (lists) wrote: Regardless, the other testcases I add in this patch show a sub-optimal transformation done by postreload, turning direct calls into indirect calls, for targets which have specifically pointed out that no CSE should be done on functions through

[c++/61636] generic lambda's potential capture of this

2016-12-09 Thread Nathan Sidwell
Jason, looking at 61636 I can't determine what the correct behaviour should be. I've reduced the testcase further to: struct A { void b (); void Foo (int); }; void A::b() { auto lam = [&](auto asdf) { Foo (asdf); }; lam (0); } which avoids nullptr_t. The compiler's confused ab

Re: parallel_algorithm_assert2.cc

2016-12-09 Thread Jonathan Wakely
On 08/12/16 14:41 -0800, David Edelsohn wrote: On Thu, Dec 8, 2016 at 10:03 AM, Jonathan Wakely wrote: On 8 December 2016 at 17:09, David Edelsohn wrote: Jonathan, I'm seeing a new failure on AIX. FAIL: 25_algorithms/headers/algorithm/parallel_algorithm_assert2.cc (test for excess errors) Ex

Re: [PATCH] Fix PR78027

2016-12-09 Thread Alexander Monakov
On Fri, 9 Dec 2016, Cesar Philippidis wrote: > > Normally all offloaded code has either "omp declare target" (most > > functions) or > > "omp target entrypoint" (only toplevel offloaded code). This used to > > include > > OpenACC functions: they would have "oacc fnattrib" _in_ _addition_ to thos

Re: [PATCH] Fix PR78027

2016-12-09 Thread Jakub Jelinek
On Fri, Dec 09, 2016 at 07:37:53AM -0800, Cesar Philippidis wrote: > It was more so to point out that there were cases where OpenACC > offloaded regions may not have omp target attributes. Referring back to > case 2 in the original email: > > 2. Nested offloaded regions inside 'omp declare targe

Re: [PATCH] PR78255: Make postreload aware of NO_FUNCTION_CSE

2016-12-09 Thread Wilco Dijkstra
Bernd wrote: > Hmm, it probably doesn't hurt, but looking at the PR I think the originally > reported problem > suggests you need a different fix: a separate register class to be used for > indirect sibling calls. > I remember seeing similar issues on other targets. The only safe way to bloc

Re: [PATCH, GCC/testsuite/ARM] Fix empty_fiq_handler target selector

2016-12-09 Thread Kyrill Tkachov
On 09/12/16 15:28, Thomas Preudhomme wrote: Hi, The current target selector for empty_fiq_handler.c testcase skips the test when targeting Thumb mode on a device with ARM execution state. Because it checks Thumb mode by looking for an -mthumb option it fails to work when GCC was configured wit

[PATCH, rs6000] Fix gcc.target/powerpc/pr78691-ppc.c

2016-12-09 Thread Bill Schmidt
Hi, The fix for PR78691 added a new test case for 32-bit PowerPC. However, the test needs to be restricted to 32-bit targets to avoid a FAIL. This patch fixes that. Tested on powerpc64-unknown-linux-gnu. Ok for trunk? Thanks, Bill 2016-12-09 Bill Schmidt * gcc.target/powerpc/pr7

Re: [PATCH] Fix PR78027

2016-12-09 Thread Cesar Philippidis
On 12/09/2016 06:56 AM, Alexander Monakov wrote: > On Thu, 8 Dec 2016, Jeff Law wrote: >>> PR fortran/78027 >>> >>> gcc/ >>> * ipa-icf.c (sem_function::parse): Don't process functions with >>> oacc decl attributes, as they may be OpenACC routines. >>> >>> gcc/testsuite/ >>>

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

2016-12-09 Thread Nathan Sidwell
On 12/09/2016 10:18 AM, Martin Sebor wrote: On 12/09/2016 08:09 AM, Jakub Jelinek wrote: On Fri, Dec 09, 2016 at 08:04:11AM -0700, Martin Sebor wrote: then (IMO) so is this: struct Foo { int a; char ary[]; Foo () : ary ("bob") {} }; So what does this mean? Assume that the Foo

Re: [PATCH] PR78255: Make postreload aware of NO_FUNCTION_CSE

2016-12-09 Thread Andre Vieira (lists)
On 09/12/16 15:02, Bernd Schmidt wrote: > On 12/09/2016 03:03 PM, Andre Vieira (lists) wrote: >> This patch fixes the issue reported in PR78255 by making postreload >> aware it should not be performing CSE on functions if NO_FUNCTION_CSE is >> defined to true. >> >> Bootstrap and full regression on

Fix -Wstringop-overflow ICE with references (PR middle-end/78750)

2016-12-09 Thread Marek Polacek
The attached test crashed because we wound up with an SSA_NAME of a reference type in get_range_info which has gcc_assert (!POINTER_TYPE_P (TREE_TYPE (name))); I think this could be fixed by treating "char &" the same as "char *" in check_sizes (the POINTER_TYPE_P macro handles both pointers/re

Re: Pretty printers for versioned namespace

2016-12-09 Thread Jonathan Wakely
On 09/12/16 13:55 +0100, François Dumont wrote: On 02/12/2016 01:41, Jonathan Wakely wrote: On 01/12/16 22:51 +0100, François Dumont wrote: We needed the StdExpVerAnyPrinter just because of the loopkup for 'std::string' which has to be 'std::__7::string'. But I used similar technique exposed p

Fix PR78725

2016-12-09 Thread Michael Matz
Hi, if the induction variable on which we want to partition the loop iterations for loop splitting might overflow we would either need runtime tests checking if an overflow in fact does happen, or we can simply not split loops on such ones. I chose the latter. Fixes the testcase, and regstrap

[PATCH, GCC/testsuite/ARM] Fix empty_fiq_handler target selector

2016-12-09 Thread Thomas Preudhomme
Hi, The current target selector for empty_fiq_handler.c testcase skips the test when targeting Thumb mode on a device with ARM execution state. Because it checks Thumb mode by looking for an -mthumb option it fails to work when GCC was configured with --with-mode=thumb. It is also too restrict

Re: [PATCH, GCC/ARM, gcc-5/6-branch, ping2] Fix PR77933: stack corruption on ARM when using high registers and lr

2016-12-09 Thread Thomas Preudhomme
On 09/12/16 14:30, Kyrill Tkachov wrote: On 09/12/16 14:24, Thomas Preudhomme wrote: [Seeing as an RC for GCC 6.3 was suggested on IRC for mid next week] Ping? backport for 6 bootstraps on Thumb-1 and testsuite shows no regression for either 5 or 6. Bootstrap for 5 is ongoing. Ok. Thanks

[RFC] combine: Improve change_zero_ext, call simplify_set afterwards.

2016-12-09 Thread Dominik Vogt
There are several situations that combine.c:change_zero_ext does not handle well yet. One of them is (and:SI (subreg:SI (zero_extract:DI (reg:DI) ...) ...) (with const_int operands to "and" and "zero_extract") => (and:SI (subreg:SI (and:DI (lshiftrt:DI ...))) with two nested "and"s. Anoth

[PATCH] Fix std::variant for gnu-versioned--namespace build

2016-12-09 Thread Jonathan Wakely
* include/std/variant: Remove misplaced _GLIBCXX_BEGIN_NAMESPACE_VERSION macro. Committed to trunk. commit b110aaffa944b6dda77569fb9b18950993d4e25a Author: Jonathan Wakely Date: Fri Dec 9 15:20:48 2016 + Fix std::variant for gnu-versioned--namespace build

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

2016-12-09 Thread Martin Sebor
On 12/09/2016 08:09 AM, Jakub Jelinek wrote: On Fri, Dec 09, 2016 at 08:04:11AM -0700, Martin Sebor wrote: I'm not sure I understand what you mean. Since the following is valid and meaningful (i.e., initializes the array with the elements of the string): struct Foo { int a; char ary[4

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

2016-12-09 Thread Jakub Jelinek
On Fri, Dec 09, 2016 at 08:04:11AM -0700, Martin Sebor wrote: > I'm not sure I understand what you mean. Since the following is > valid and meaningful (i.e., initializes the array with the elements > of the string): > > struct Foo { >int a; >char ary[4]; >Foo () : ary ("bob") {} >

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

2016-12-09 Thread Martin Sebor
On 12/09/2016 05:34 AM, Nathan Sidwell wrote: On 12/08/2016 03:42 PM, Martin Sebor wrote: On 12/08/2016 01:28 PM, Marek Polacek wrote: On Thu, Dec 08, 2016 at 02:56:56PM -0500, Nathan Sidwell wrote: struct Foo { int a; char ary[]; Foo () : ary ("bob"){} Clang accepts this test case althou

Re: [PATCH] PR78255: Make postreload aware of NO_FUNCTION_CSE

2016-12-09 Thread Bernd Schmidt
On 12/09/2016 03:03 PM, Andre Vieira (lists) wrote: This patch fixes the issue reported in PR78255 by making postreload aware it should not be performing CSE on functions if NO_FUNCTION_CSE is defined to true. Bootstrap and full regression on arm-none-linux-gnueabihf and aarch64-unknown-linux-gn

Re: [PATCH] Fix PR78027

2016-12-09 Thread Alexander Monakov
On Thu, 8 Dec 2016, Jeff Law wrote: > > PR fortran/78027 > > > > gcc/ > > * ipa-icf.c (sem_function::parse): Don't process functions with > > oacc decl attributes, as they may be OpenACC routines. > > > > gcc/testsuite/ > > * c-c++-common/goacc/acc-icf.c: New test. > >

Re: [PATCH] rs6000: clz/ctz/ffs improvement (PR78683)

2016-12-09 Thread David Edelsohn
On Fri, Dec 9, 2016 at 2:37 AM, Segher Boessenkool wrote: > On CPUs that implement popcnt[wd] but not cnttz[wd] we can do better for > the ctz sequences than we do today. > > CL[TZ]_DEFINED_VALUE_AT_ZERO can return 2, since we always return the > same fixed value (only dependent on TARGET_* option

Re: [RFC][PATCH] Sanopt for use-after-scope ASAN_MARK internal functions

2016-12-09 Thread Martin Liška
On 12/09/2016 12:56 PM, Jakub Jelinek wrote: > On Fri, Dec 09, 2016 at 12:39:24PM +0100, Martin Liška wrote: >> + if (is_gimple_call (stmt) && gimple_call_internal_p (stmt)) >> +{ >> + enum internal_fn ifn = gimple_call_internal_fn (stmt); >> + switch (ifn) >> +

Re: [RFC PATCH] avoid printing type suffix with %E (PR c/78165)

2016-12-09 Thread Martin Sebor
The check-in lacked the gcc/testsuite ChangeLog. Besides, the patch caused a testsuite regression on Solaris with /bin/as (sparc and x86, 32 and 64-bit): +FAIL: g++.dg/debug/dwarf2/typedef1.C -std=gnu++11 scan-assembler-times DW_AT_name: "foo<1>"|"foo<1u>.."[^\\n]*DW_AT_name 1 +FAIL: g++.dg/d

Re: [24/67] Replace a != BLKmode check with is_a

2016-12-09 Thread Richard Sandiford
Richard Biener writes: > On Fri, Dec 9, 2016 at 2:08 PM, Richard Sandiford > wrote: >> This patch replaces a check against BLKmode with a check >> of is_a , in a case where scalar integer >> modes were the only useful alternatives left. > > So why's BLKmode no longer sth valid to check against?

Re: [PATCH, GCC/ARM, gcc-5/6-branch, ping2] Fix PR77933: stack corruption on ARM when using high registers and lr

2016-12-09 Thread Kyrill Tkachov
On 09/12/16 14:24, Thomas Preudhomme wrote: [Seeing as an RC for GCC 6.3 was suggested on IRC for mid next week] Ping? backport for 6 bootstraps on Thumb-1 and testsuite shows no regression for either 5 or 6. Bootstrap for 5 is ongoing. Ok. Thanks, Kyrill Best regards, Thomas On 06/12/

Re: [7/67] Add scalar_float_mode

2016-12-09 Thread Richard Sandiford
David Malcolm writes: > On Fri, 2016-12-09 at 12:56 +, Richard Sandiford wrote: >> This patch adds a scalar_float_mode class, which wraps a mode enum >> that is known to satisfy SCALAR_FLOAT_MODE_P. Things like "SFmode" >> now give a scalar_float_mode object instead of a machine_mode. >> This

OpenACC Patch Ping

2016-12-09 Thread Cesar Philippidis
The following patches still need to be reviewed. ACC ROUTINE patches: Re: [PATCH] OpenACC routines -- c++ front end Re: [PATCH] OpenACC routines -- middle end Re: [PATCH] OpenAC

Re: [PATCH, GCC/ARM, gcc-5/6-branch, ping2] Fix PR77933: stack corruption on ARM when using high registers and lr

2016-12-09 Thread Thomas Preudhomme
[Seeing as an RC for GCC 6.3 was suggested on IRC for mid next week] Ping? backport for 6 bootstraps on Thumb-1 and testsuite shows no regression for either 5 or 6. Bootstrap for 5 is ongoing. Best regards, Thomas On 06/12/16 11:37, Thomas Preudhomme wrote: Ping? Best regards, Thomas On

Re: [PATCH] omp-low.c split

2016-12-09 Thread Jakub Jelinek
On Fri, Dec 09, 2016 at 02:53:41PM +0100, Martin Jambor wrote: > Unfortunately no, that file also needs to be changed, even if very > slightly. Specifically, omp-general.h also needs to be included and > calls to get_oacc_fn_attrib need to be changed to call > oacc_get_fn_attrib. omp-low.h has to

Re: [7/67] Add scalar_float_mode

2016-12-09 Thread David Malcolm
On Fri, 2016-12-09 at 12:56 +, Richard Sandiford wrote: > This patch adds a scalar_float_mode class, which wraps a mode enum > that is known to satisfy SCALAR_FLOAT_MODE_P. Things like "SFmode" > now give a scalar_float_mode object instead of a machine_mode. > This in turn needs a change to th

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

2016-12-09 Thread Andreas Schwab
FAIL: gfortran.dg/charlen_03.f90 -O (internal compiler error) FAIL: gfortran.dg/charlen_10.f90 -O (internal compiler error) spawn -ignore SIGHUP /usr/local/gcc/gcc-20161209/Build/gcc/testsuite/gfortran5/../../gfortran -B/usr/local/gcc/gcc-20161209/Build/gcc/testsuite/gfortran5/../../ -B

Re: [nvptx] propagating conditionals in worker-vector partitioned loops

2016-12-09 Thread Cesar Philippidis
Ping. On 10/26/2016 03:29 PM, Cesar Philippidis wrote: > Currently, the nvptx backend is only neutering the worker axis when > propagating variables used in conditional expressions across the worker > and vector axes. That's a problem with the worker-state spill and fill > propagation implementati

Re: [PATCH] DWARF: make signedness explicit for enumerator const values

2016-12-09 Thread Jason Merrill
On Fri, Dec 9, 2016 at 8:38 AM, Pierre-Marie de Rodat wrote: > On 12/09/2016 02:00 PM, Mark Wielaard wrote: >> >> BTW. I think it should also be possible to simply attach a >> DW_AT_encoding directly to the DW_TAG_enumeration_type. It seems a >> simple oversight that option isn't listed in the cur

Re: [PATCH] Fix PR78027

2016-12-09 Thread Cesar Philippidis
On 12/08/2016 04:37 PM, Jeff Law wrote: > On 12/08/2016 04:05 PM, Cesar Philippidis wrote: >> PR78027 was classified as a fortran bug, but the underlying problem >> turned out to be more generic. Basically, the IPA-ICF pass usually >> ignores functions with omp decl attributes as candidates for ali

[PATCH][ARM] PR target/78694: Avoid invalid RTL sharing in minipool code

2016-12-09 Thread Kyrill Tkachov
Hi all, In this ICE GCC reports invalid RTL sharing in the pattern: (insn 955 954 956 (unspec_volatile [ (const:SI (unspec:SI [ (symbol_ref:SI ("a") [flags 0xe8] ) (const_int 4 [0x4]) ] UNSPEC_TLS)) ] VUNSPEC_

[PATCH] PR78255: Make postreload aware of NO_FUNCTION_CSE

2016-12-09 Thread Andre Vieira (lists)
Hi, This patch fixes the issue reported in PR78255 by making postreload aware it should not be performing CSE on functions if NO_FUNCTION_CSE is defined to true. Bootstrap and full regression on arm-none-linux-gnueabihf and aarch64-unknown-linux-gnu. Also checked this fixed the reported issue on

Re: [0/67] Add wrapper classes for machine_modes

2016-12-09 Thread Richard Sandiford
Richard Biener writes: > On Fri, Dec 9, 2016 at 1:48 PM, Richard Sandiford > wrote: >> This series includes most of the changes in group C from: >> >> https://gcc.gnu.org/ml/gcc/2016-11/msg00033.html >> >> The idea is to add wrapper classes around machine_mode_enum >> for specific groups of m

Re: [PATCH] omp-low.c split

2016-12-09 Thread Martin Jambor
Hi, On Fri, Dec 09, 2016 at 04:25:10PM +0300, Alexander Monakov wrote: > Hi Martin, > > Just one quick question -- do you know if config/nvptx/nvptx.c needs changes > with this patch? I see it has an '#include "omp-low.h"', and it seems your > patch is renaming some functions -- is the intention

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

2016-12-09 Thread Andreas Schwab
-finline-functions (internal compiler error) FAIL: gfortran.dg/charlen_15.f90 -O3 -g (internal compiler error) FAIL: gfortran.dg/charlen_15.f90 -Os (internal compiler error) spawn -ignore SIGHUP /opt/gcc/gcc-20161209/Build/gcc/testsuite/gfortran1/../../gfortran -B/opt/gcc/gcc-20161209/Build

[67/67] Add a complex_mode class

2016-12-09 Thread Richard Sandiford
This patch adds another machine_mode_enum wrapper for modes that are known to be COMPLEX_MODE_P. There aren't yet many places that make use of it, but that might change in future. gcc/ 2016-11-24 Richard Sandiford Alan Hayward David Sherwood * coretypes.h (

[66/67] Add a scalar_mode_pod class

2016-12-09 Thread Richard Sandiford
This patch adds a scalar_mode_pod class and uses it for fixed_value, instead of machine_mode_enum. gcc/ 2016-11-24 Richard Sandiford Alan Hayward David Sherwood * coretypes.h (scalar_mode_pod): New typedef. * machmode.h (gt_ggc_mx, gt_pch_nx): New fu

[65/67] Use scalar_mode in the AArch64 port

2016-12-09 Thread Richard Sandiford
Similar to the previous scalar_int_mode patch. gcc/ 2016-11-24 Richard Sandiford Alan Hayward David Sherwood * config/aarch64/aarch64-protos.h (aarch64_gen_adjusted_ldpstp): Take a scalar_mode rather than a machine_mode. (aarch64_operands_adj

[64/67] Add a scalar_mode class

2016-12-09 Thread Richard Sandiford
This patch adds a scalar_mode class that can hold any scalar mode, specifically: - scalar integers - scalar floating-point values - scalar fractional modes - scalar accumulator modes - pointer bounds modes The type is useful in four main situations: - as the mode of a CONST_SCALAR_IN

[63/67] Simplifications after type switch

2016-12-09 Thread Richard Sandiford
This patch makes a few simplifications after the previous mechanical machine_mode->scalar_int_mode change. gcc/ 2016-11-24 Richard Sandiford Alan Hayward David Sherwood * expmed.c (extract_high_half): Use scalar_int_mode and remove assertion.

Re: [PATCH] DWARF: make signedness explicit for enumerator const values

2016-12-09 Thread Pierre-Marie de Rodat
On 12/09/2016 02:00 PM, Mark Wielaard wrote: BTW. I think it should also be possible to simply attach a DW_AT_encoding directly to the DW_TAG_enumeration_type. It seems a simple oversight that option isn't listed in the current DWARF spec. I filed an issue about it: http://dwarfstd.org/ShowIssue

[62/67] Big machine_mode to scalar_int_mode replacement

2016-12-09 Thread Richard Sandiford
This patch changes the types of various things from machine_mode to scalar_int_mode, in cases where (after previous patches) simply changing the type is enough on its own. The patch does nothing other than that. gcc/ 2016-11-24 Richard Sandiford Alan Hayward David She

[61/67] Use scalar_int_mode in the AArch64 port

2016-12-09 Thread Richard Sandiford
This patch makes the AArch64 port use scalar_int_mode in various places. Other ports won't need this kind of change; we only need it for AArch64 because of the polynomial integers that are added by later patches. The only change in functionality is in the rtx_costs handling of CONST_INT. If the c

[60/67] Pass scalar_int_modes to do_jump_by_parts_*

2016-12-09 Thread Richard Sandiford
The callers of do_jump_by_parts_* had already established that the modes were MODE_INTs, so this patch passes the modes down as scalar_int_modes. gcc/ 2016-11-24 Richard Sandiford Alan Hayward David Sherwood * dojump.c (do_jump_by_parts_greater_rtx): Change

[59/67] Add a rtx_jump_table_data::get_data_mode helper

2016-12-09 Thread Richard Sandiford
This patch adds a helper function to get the mode of the addresses or offsets in a jump table. It also changes the final.c code to use rtx_jump_table_data over rtx or rtx_insn in cases where it needed to use the new helper. This in turn meant adding a safe_dyn_cast equivalent of safe_as_a, to cop

[58/67] Use scalar_int_mode in a try_combine optimisation

2016-12-09 Thread Richard Sandiford
This patch uses scalar_int_modes for: /* If I2 is setting a pseudo to a constant and I3 is setting some sub-part of it to another constant, merge them by making a new constant. */ This was already implicit, but the danger with just checking CONST_SCALAR_INT_P is that it can include C

[57/67] Use scalar_int_mode in expand_expr_addr_expr

2016-12-09 Thread Richard Sandiford
This patch rewrites the condition: if (tmode != address_mode && tmode != pointer_mode) tmode = address_mode; to the equivalent: tmode == pointer_mode ? pointer_mode : address_mode The latter has the advantage that the result is naturally a scalar_int_mode. gcc/ 2016-11-24 Richard Sand

[56/67] Use the more specific type when two modes are known to be equal

2016-12-09 Thread Richard Sandiford
This patch adjusts a couple of cases in which we had established that two modes were equal and happened to be using the one with the more general type instead of the one with the more specific type. gcc/ 2016-11-24 Richard Sandiford Alan Hayward David Sherwood

  1   2   3   >