Re: [patch, libfortran] Fix EXECUTE_COMMAND_LINE error return

2017-10-09 Thread Janne Blomqvist
On Tue, Oct 10, 2017 at 12:34 AM, Thomas Koenig wrote: > Hello world, > > currently, EXECUTE_COMMAND_LINE aborts the program if the called program > is not found, if cmdstat is present, but cmdmsg isn't. This is a 6/7/8 > regression. > > This patch fixes the issue by simply

Re: [PATCH] libstdc++: istreambuf_iterator proxy

2017-10-09 Thread Petr Ovtchenkov
On Sun, 8 Oct 2017 16:59:39 +0200 François Dumont wrote: > ... > >>> We have three issues with istreambuf_iterator: > >>> - debug-dependent behaviour > >> Fixed. > > + __glibcxx_requires_cond(_M_sbuf, > >

Re: [PATCH] Fix ICEs with ss{e,e2,se3} builtins with -mno-mmx (PR target/82483)

2017-10-09 Thread H.J. Lu
On 10/9/17, Jakub Jelinek wrote: > On Mon, Oct 09, 2017 at 09:28:58PM +0200, Uros Bizjak wrote: >> On Mon, Oct 9, 2017 at 9:16 PM, Jakub Jelinek wrote: >> > Hi! >> > >> > The following builtins have {SSE,SSE2,SSSE3} CPUID, yet they have >> > MMX register

Re: [PATCH][mingw] Enable colorized diagnostics

2017-10-09 Thread Liu Hao
On 2017/10/10 6:25, Manuel López-Ibáñez wrote: For what is worth, the color output of GCC comes originally from grep, and grep does have code for colorizing in Windows: http://git.savannah.gnu.org/cgit/grep.git/tree/lib and there are significant differences with this patch. For once,   /*

Re: [PATCH][mingw] Enable colorized diagnostics

2017-10-09 Thread Manuel López-Ibáñez
On 09/10/17 23:25, Manuel López-Ibáñez wrote: Even if the host-specific part is not done, I honestly think it is a good idea to match grep's code as much as possible since we may want to merge bugfixes between the two and eventually this code may end up in gnulib. Moreover, if somebody else

Re: [PATCH, rs6000] fix-up int128 fold vector multiply tests

2017-10-09 Thread Segher Boessenkool
Hi Will, On Mon, Oct 09, 2017 at 04:27:54PM -0500, Will Schmidt wrote: > Fix up a few issues with the tests. > - add -O2 to int128-p8 test, and firm up the -mcpu options > - update the set of expected instructions for the int128-p9 test. > - replace the float128_hw requirement

[PATCH] rs6000: Move processor_costs to header

2017-10-09 Thread Segher Boessenkool
This moves the processor_costs structure declaration to the rs6000.h header file, so that things in other files can use it (not just things in rs6000.c). Tested as usual; committing. 2010-10-09 Segher Boessenkool * config/rs6000/rs6000.c

Re: Restore functional DONT_USE_BUILTIN_SETJMP support

2017-10-09 Thread Eric Botcazou
> You're right, not clear why I didn't spot it on Aarch64. Hunk reverted. The attached patch replaces it with an ad-hoc definition of setjmp, like the ones used for the coverage routines. Tested on Aarch64/Linux with and without --enable-sjlj-exceptions and on IA-64/Linux without

Re: [PATCH] Add a warning for invalid function casts

2017-10-09 Thread Bernd Edlinger
On 10/09/17 20:34, Martin Sebor wrote: > On 10/09/2017 11:50 AM, Bernd Edlinger wrote: >> On 10/09/17 18:44, Martin Sebor wrote: >>> On 10/07/2017 10:48 AM, Bernd Edlinger wrote: Hi! I think I have now something useful, it has a few more heuristics added, to reduce the number

Re: [PATCH][mingw] Enable colorized diagnostics

2017-10-09 Thread Manuel López-Ibáñez
On 08/10/17 12:39, Liu Hao wrote: On 2017/9/28 4:09, Joseph Myers wrote: On Thu, 28 Sep 2017, Liu Hao wrote: Colorized diagnostics used to be disabled for MinGW targets (on which the macro `_WIN32` is defined), and this patch enables it. I'd hope this is all to do with MinGW host, and

Re: [PATCH] Enable ifunc attribute by default for ARM GNU/Linux

2017-10-09 Thread Joseph Myers
On Mon, 9 Oct 2017, Adhemerval Zanella wrote: > *-*-linux*) > case ${target} in > - aarch64*-* | i[34567]86-* | powerpc*-* | s390*-* | sparc*-* | x86_64-*) > + aarch64*-* | i[34567]86-* | powerpc*-* | s390*-* | sparc*-* | x86_64-* > | arm*-*) I think the cases here are meant to

Re: [C++ PATCH] hash-table for extern-c fns.

2017-10-09 Thread Nathan Sidwell
On 10/09/2017 11:57 AM, Jason Merrill wrote: On Fri, Oct 6, 2017 at 10:18 AM, Nathan Sidwell wrote: This patch converts the extern "C" function map to use a hash table, in the same way as I've just changed namespace bindings. Hmm, why do we only check extern "C" conflicts

Re: [PATCH, rs6000] testcase coverage for vec_cmp builtins

2017-10-09 Thread Segher Boessenkool
On Mon, Oct 09, 2017 at 03:20:46PM -0500, Will Schmidt wrote: > Add testcase coverage for the vec_cmp builtins. > > Tested on P6 and newer. OK for trunk? That looks fine. Okay. Thanks! Segher > [testsuite] > * gcc.target/powerpc/fold-vec-cmp-char.c: New. > *

Re: [PATCH, rs6000] testcase coverage for vec_splat_uX

2017-10-09 Thread Segher Boessenkool
On Mon, Oct 09, 2017 at 03:18:26PM -0500, Will Schmidt wrote: > Add testcase coverage for vec_splat_{u8,s8,u16,s16,u32,s32} built-ins. > [testsuite] > > |---* gcc.target/powerpc/fold-vec-splat-16.c: New > |---* gcc.target/powerpc/fold-vec-splat-32.c: New. > |---*

Re: [PATCH, rs6000] Testcase coverage for vec_splats

2017-10-09 Thread Segher Boessenkool
Hi Will, On Mon, Oct 09, 2017 at 03:15:56PM -0500, Will Schmidt wrote: > +/* { dg-final { scan-assembler-times "xscvdpspn|xscvdpsp" 1 } } */ > +/* { dg-final { scan-assembler-times "vspltw|xxspltw" 1 } } */ The second of these (xscvdpsp) will match whenever the first (xscvdpspn) does. Maybe you

[patch, libfortran] Fix EXECUTE_COMMAND_LINE error return

2017-10-09 Thread Thomas Koenig
Hello world, currently, EXECUTE_COMMAND_LINE aborts the program if the called program is not found, if cmdstat is present, but cmdmsg isn't. This is a 6/7/8 regression. This patch fixes the issue by simply removing the erronous call to runtime_error. Regression-tested. OK for all affected

[PATCH, rs6000] fix-up int128 fold vector multiply tests

2017-10-09 Thread Will Schmidt
Hi [PATCH, rs6000] fix-up int128 fold vector multiply tests Fix up a few issues with the tests. - add -O2 to int128-p8 test, and firm up the -mcpu options - update the set of expected instructions for the int128-p9 test. - replace the float128_hw requirement with

[Ada] Small optimizations in Sem_Type.Covers

2017-10-09 Thread Pierre-Marie de Rodat
The Sem_Type.Covers predicate is by far the topmost subprogram in the profile of unoptimized compilations in Ada. This change contains a series of small optimizations that save about 2% of the instruction count on x86-64: 1. Inline 3 more predicates from einfo, 2. Simplify a convoluted

[Ada] Missing error on implicit copy of limited value in expression function

2017-10-09 Thread Pierre-Marie de Rodat
This patch corrects an omission on the legality check of an allocator whose expression is of a limited type, when the allocator is the expression of an expression function. Compiling t3.adb must yield: t3.adb:4:13: warning: not dispatching (must be defined in a package spec) t3.adb:5:07:

[Ada] Update the categorization of N_Call_Marker nodes

2017-10-09 Thread Pierre-Marie de Rodat
This patch update the categorization of node N_Call_Marker's fields. No change in behaviour, no need for a test. Tested on x86_64-pc-linux-gnu, committed on trunk 2017-10-09 Hristian Kirtchev * sinfo.ads: Update table Is_Syntactic_Field to reflect the nature of

[Ada] Crash on potential access-before-elaboration in ZFP

2017-10-09 Thread Pierre-Marie de Rodat
This patch update the mechanism which retrieves the enclosing scope of a node to account for blocks produces by exception handler expansion. These blocks are not scoping constructs and should not be considered. As a result, an access- before-elaboration check will no longer cause a crash on ZFP.

[PATCH, rs6000] Correct unaligned_load vector cost for Power9

2017-10-09 Thread Pat Haugen
Power9 has efficient unaligned load insns. The following patch fixes the cost to reflect that. There was no similar code for the unaligned_store case. Bootstrap/regtest on powerpc64le-linux with no new regressions. Ok for trunk? -Pat 2017-10-09 Pat Haugen *

[Ada] Crash on child unit name with -gnatdJ

2017-10-09 Thread Pierre-Marie de Rodat
When the debugging switch -gnatdJ is present, warning messages include the name of the unit within which the warning is generated. This patch fixes a crash in the compiler when a warning appears within a child unit. The command gcc -c -gnatdJ test-a.ads must yield; test-a.ads:6:17: warning:

[Ada] Check elaboration requirement for SPARK in the static model

2017-10-09 Thread Pierre-Marie de Rodat
This patch ensures that the Elaborate[_All] requirement imposed on the context of a unit in SPARK code is verified only when the static model is in effect. -- Source -- -- server.ads package Server with SPARK_Mode is function Read return Integer; end Server; --

[Ada] Support for reverse iteration on formal containers

2017-10-09 Thread Pierre-Marie de Rodat
This patch adds support for reverse iterations over formal containers, analogous to what is supported on arrays and predefined containers. Executing: gnatmake -q foo foo must yield; 1 2 3 4 5 6 7 8 9 10 10 9 8 7 6 5 4 3 2 1 10 9 8 7 6 5 4 3 2 1 --- with Ada.Text_IO; use Ada.Text_IO;

[PATCH, rs6000] testcase coverage for vec_cmp builtins

2017-10-09 Thread Will Schmidt
Hi, Add testcase coverage for the vec_cmp builtins. Tested on P6 and newer. OK for trunk? Thanks, -Will [testsuite] * gcc.target/powerpc/fold-vec-cmp-char.c: New. * gcc.target/powerpc/fold-vec-cmp-double.c: New. * gcc.target/powerpc/fold-vec-cmp-float.c:

[Ada] Spurious warnings with dynamic elab checks

2017-10-09 Thread Pierre-Marie de Rodat
This patch classifies 'Access, variable assignments, and variable references as static model-only scenarios because they are graph-dependent and do not produce any checks. No need for a test. Tested on x86_64-pc-linux-gnu, committed on trunk 2017-10-09 Hristian Kirtchev

[PATCH, rs6000] testcase coverage for vec_splat_uX

2017-10-09 Thread Will Schmidt
Hi, Add testcase coverage for vec_splat_{u8,s8,u16,s16,u32,s32} built-ins. Tested on P6 and newer. OK for trunk? Thanks, -Will [testsuite] |---* gcc.target/powerpc/fold-vec-splat-16.c: New |---* gcc.target/powerpc/fold-vec-splat-32.c: New. |---*

[PATCH, rs6000] Testcase coverage for vec_splats

2017-10-09 Thread Will Schmidt
[PATCH, rs6000] Testcase coverage for vec_splats Add testcase coverage for bec_splat built-ins. Tested across power6 and newer. OK for trunk? Thanks, -Will [testsuite] * gcc.target/powerpc/fold-vec-splats-char.c: New. * gcc.target/powerpc/fold-vec-splats-floatdouble.c:

Re: [patch] configure option to override TARGET_LIBC_PROVIDES_SSP

2017-10-09 Thread Sandra Loosemore
On 10/09/2017 09:13 AM, Joseph Myers wrote: The install.texi documentation for --disable-libssp only says "Specify that the run-time libraries for stack smashing protection should not be built.". I think it needs updating to mention these additional effects as well. Oops. :") How about this

[Ada] Internal error on expression function in ghost package

2017-10-09 Thread Pierre-Marie de Rodat
This patch corrects an issue whereby an expression function within a ghost package would cause orphaned freeze nodes. -- Source -- -- p.ads package P with SPARK_Mode is type Rec is record I : Integer; end record; package Inner with Ghost is

[Ada] Rewrite check for SPARK RM 7.1.3(10)

2017-10-09 Thread Pierre-Marie de Rodat
The evolution of SPARK RM 7.1.3(10) rule was not followed by code that implements it. The current wording is: "If a procedure has an in mode parameter of an effectively volatile type, then the Effective_Reads aspect of any corresponding actual parameter shall be False." and the

[Ada] Spurious error in use of homograph of type name in predicate

2017-10-09 Thread Pierre-Marie de Rodat
This patch fixes a spurious error in an expression for a dynamic predicate, when the name of (a homograph of) the type to which the predicate applies is used in a context where the name cannot denote a current occurrence. The following must compile quietly: gcc -c conv.ads --- with Typ; use

[Ada] Spurious error with predicate and class-wide object

2017-10-09 Thread Pierre-Marie de Rodat
This patch removes a spurious error on a call to a function that applies to a predicated tagged type, when the actual in the call is class-wide. The argument must be converted to be type-specific, given that the predicate function is not dispatching and cannot accept a class-wide actual.

[Ada] Suppress generation of ABE checks in GNATprove mode

2017-10-09 Thread Pierre-Marie de Rodat
This patch suppresses the generation of ABE checks when compiling for GNATprove because a) the checks are not needed and b) the checks involve raise statements which are not supported by GNATprove. No need for a test. Tested on x86_64-pc-linux-gnu, committed on trunk 2017-10-09 Hristian

Re: [PATCH] Fix ICEs with ss{e,e2,se3} builtins with -mno-mmx (PR target/82483)

2017-10-09 Thread Jakub Jelinek
On Mon, Oct 09, 2017 at 09:28:58PM +0200, Uros Bizjak wrote: > On Mon, Oct 9, 2017 at 9:16 PM, Jakub Jelinek wrote: > > Hi! > > > > The following builtins have {SSE,SSE2,SSSE3} CPUID, yet they have > > MMX register operands (either input or output or both). > > As -mno-mmx

[PATCH 3/3] Add targetm.insn_cost hook

2017-10-09 Thread Segher Boessenkool
This adds a new hook that the insn_cost function uses if a target has implemented it (it uses the old pattern_cost nee insn_rtx_cost if not). I'll commit this now; it was okayed by Jeff at https://gcc.gnu.org/ml/gcc-patches/2017-08/msg00204.html . Segher 2017-10-09 Segher Boessenkool

[PATCH 2/3] combine: Use insn_cost instead of pattern_cost everywhere

2017-10-09 Thread Segher Boessenkool
Committing to trunk. Segher 2017-10-09 Segher Boessenkool * combine.c (combine_validate_cost): Compute the new insn_cost, not just pattern_cost. (try_combine): Adjust comment. --- gcc/combine.c | 31 +-- 1

[PATCH 1/3] Replace insn_rtx_cost with insn_cost and pattern_cost

2017-10-09 Thread Segher Boessenkool
This replaces insn_rtx_cost with insn_cost if an insn is readily available, and with pattern_cost otherwise. Okayed by Jeff in https://gcc.gnu.org/ml/gcc-patches/2017-08/msg00203.html and I'll commit it now. Segher 2017-10-09 Segher Boessenkool *

Re: [PATCH] libstdc++: istreambuf_iterator proxy

2017-10-09 Thread Petr Ovtchenkov
On Sun, 8 Oct 2017 16:59:39 +0200 François Dumont wrote: > ... > >> > >> Consider this code: > >> > >>   std::istringstream inf("abc"); > >>   std::istreambuf_iterator j(inf), eof; > >>   std::istreambuf_iterator i = j++; > >> > >>   assert( *i == 'a' ); > >> > >>

Re: [PATCH] Fix ICEs with ss{e,e2,se3} builtins with -mno-mmx (PR target/82483)

2017-10-09 Thread Uros Bizjak
On Mon, Oct 9, 2017 at 9:16 PM, Jakub Jelinek wrote: > Hi! > > The following builtins have {SSE,SSE2,SSSE3} CPUID, yet they have > MMX register operands (either input or output or both). > As -mno-mmx doesn't imply -mno-sse, we get ICEs on these though, because > with MMX

[PATCH] Improve AVX512* vperm[ti]2* (PR target/82460)

2017-10-09 Thread Jakub Jelinek
Hi! The vpermt2* and vpermi2* instructions are pretty much the same (at least when not using non-{z} masking), so by treating them as something significantly different we generate often very bad code. The following patch attempts to treat them the same (except for non-{z} masking), so that the

[C++ Patch] PR 82307

2017-10-09 Thread Mukesh Kapoor
Hi, This patch fixes https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82307. For an unscoped enum with a fixed underlying type, the function type_promotes_to() does not always return the same type as the underlying type. The fix is to use the underlying type of the enum instead of creating a new

[PATCH] Fix ICEs with ss{e,e2,se3} builtins with -mno-mmx (PR target/82483)

2017-10-09 Thread Jakub Jelinek
Hi! The following builtins have {SSE,SSE2,SSSE3} CPUID, yet they have MMX register operands (either input or output or both). As -mno-mmx doesn't imply -mno-sse, we get ICEs on these though, because with MMX disabled it is not possible to emit them. The following patch cheats and declares these

[PATCH, i386]: Remove reversed jcc insn patterns

2017-10-09 Thread Uros Bizjak
Hello! Similar to Segher's rs6000 patch [1], attached patch removes redundant reversed jcc insn patterns. 2017-10-09 Uros Bizjak * config/i386/i386.md (*jcc_2): Remove insn pattern. (*jcc_0_r_i387): Ditto. (*jccxf_r_i387): Ditto. (*jcc_r_i387): Ditto.

[PATCH] Enable ifunc attribute by default for ARM GNU/Linux

2017-10-09 Thread Adhemerval Zanella
Similar to other architectures with IFUNC binutils/glibc support, this patch enables the ifunc attribute for ARM GNU/Linux. Although not required for build master GLIBC, the intention is to allow refactor its assembly implementation to C [1]. Tested compilation of glibc (in conjunction with a

[Ada] Suppress checks within finalizers

2017-10-09 Thread Pierre-Marie de Rodat
This patch suppresses checks within finalizer routines, because they can't fail. No change in behavior; no test available. This is just an internal cleanup. Tested on x86_64-pc-linux-gnu, committed on trunk 2017-10-09 Bob Duff * exp_ch7.adb (Create_Finalizer):

Re: [PATCH] Add a warning for invalid function casts

2017-10-09 Thread Martin Sebor
On 10/09/2017 11:50 AM, Bernd Edlinger wrote: On 10/09/17 18:44, Martin Sebor wrote: On 10/07/2017 10:48 AM, Bernd Edlinger wrote: Hi! I think I have now something useful, it has a few more heuristics added, to reduce the number of false-positives so that it is able to find real bugs, for

Re: [COMMITTED][testsuite] Fix ssa-dse-26.c

2017-10-09 Thread Jeff Law
On 10/09/2017 05:01 AM, Wilco Dijkstra wrote: > Add missing -fno-short-enums to ensure this test passes on arm-none-eabi > which uses short enums. > > Committed as obvious in r253540. > > ChangeLog: > 2017-10-09 Wilco Dijkstra > > * gcc.dg/tree-ssa/ssa-dse-26.c

Re: [PATCH] Fortran -- Handle BOZ in accordance with F2008/2015.

2017-10-09 Thread Steve Kargl
On Mon, Oct 09, 2017 at 06:48:33PM +0200, Dominique d'Humières wrote: > > > Le 7 oct. 2017 à 17:48, Steve Kargl a > > écrit : > > > > On Sat, Oct 07, 2017 at 12:37:03PM +0200, Dominique d'Humières wrote: > >> (4) Compiling > >> > >> print *,

Re: [PATCH] Add a warning for invalid function casts

2017-10-09 Thread Bernd Edlinger
On 10/09/17 18:44, Martin Sebor wrote: > On 10/07/2017 10:48 AM, Bernd Edlinger wrote: >> Hi! >> >> I think I have now something useful, it has a few more heuristics >> added, to reduce the number of false-positives so that it >> is able to find real bugs, for instance in openssl it triggers >> at

Re: [PATCH], Add PowerPC ISA 3.0 Atomic Memory Operation functions

2017-10-09 Thread Michael Meissner
On Mon, Oct 09, 2017 at 11:03:10AM -0500, Segher Boessenkool wrote: > On Fri, Oct 06, 2017 at 02:30:16PM -0400, Michael Meissner wrote: > > Here is the revised amo.h. I tested the two test files amo1.c and amo2.c, > > and > > they both compile. It is interesting, use %P0 results in fewer addi's

Re: [PATCH] Fix PR80295[aarch64] [7/8 Regression] ICE in __builtin_update_setjmp_buf expander

2017-10-09 Thread Qing Zhao
> On Oct 9, 2017, at 11:27 AM, Qing Zhao wrote: > >> >> On Oct 9, 2017, at 5:33 AM, Richard Earnshaw (lists) >> wrote: >> >> On 06/10/17 20:56, Qing Zhao wrote: >>> Thanks a lot for Wilco’s help on this bug. >>> >>> Yes, Aarch64 does NOT do

Go patch committed to GCC 7 branch: Update MIPS architecture names

2017-10-09 Thread Ian Lance Taylor
I've committed a set of patches by James Cowgill to the GCC 7 branch, backported from trunk. These patches update the MIPS architecture names to the names expected by Go programmers. The backported patches are: https://golang.org/cl/46150 https://golang.org/cl/46151

Re: [committed] s390 vec_xor fix (PR target/82464)

2017-10-09 Thread Andreas Krebbel
On 10/09/2017 01:42 PM, Jakub Jelinek wrote: > Hi! > > I've committed following patch which has been preapproved by Andreas in the > PR. No testcase right now, it will be covered by testsuite later together > with all the other intrinsics. > > 2017-10-09 Jakub Jelinek > >

Re: [PATCH, rs6000] Add Power 8 support to vec_revb

2017-10-09 Thread Segher Boessenkool
Hi Carl, On Mon, Oct 09, 2017 at 08:36:57AM -0700, Carl Love wrote: > *gcc.target/powerpc/builtins-revb-runnable.c: New > runnable test file for the vec_revb builtin. (Missing space after the asterisk). > diff --git a/gcc/config/rs6000/vsx.md b/gcc/config/rs6000/vsx.md > index

Re: [PATCH] Fortran -- Handle BOZ in accordance with F2008/2015.

2017-10-09 Thread Dominique d'Humières
> Le 7 oct. 2017 à 17:48, Steve Kargl a > écrit : > > On Sat, Oct 07, 2017 at 12:37:03PM +0200, Dominique d'Humières wrote: >> (4) Compiling >> >> print *, INT(z'',4) >> end >> >> gives >> >> print *, INT(z'',4) >> 1 >> Error:

Re: [PATCH] Add a warning for invalid function casts

2017-10-09 Thread Martin Sebor
On 10/07/2017 10:48 AM, Bernd Edlinger wrote: Hi! I think I have now something useful, it has a few more heuristics added, to reduce the number of false-positives so that it is able to find real bugs, for instance in openssl it triggers at a function cast which has already a TODO on it. The

Re: [PATCH] Fix PR80295[aarch64] [7/8 Regression] ICE in __builtin_update_setjmp_buf expander

2017-10-09 Thread Qing Zhao
> On Oct 9, 2017, at 5:33 AM, Richard Earnshaw (lists) > wrote: > > On 06/10/17 20:56, Qing Zhao wrote: >> Thanks a lot for Wilco’s help on this bug. >> >> Yes, Aarch64 does NOT do anything wrong. >> >> The implementation of __builtin_update_setjmp_buf is not

Re: [PATCH], Add PowerPC ISA 3.0 Atomic Memory Operation functions

2017-10-09 Thread Segher Boessenkool
On Fri, Oct 06, 2017 at 02:30:16PM -0400, Michael Meissner wrote: > Here is the revised amo.h. I tested the two test files amo1.c and amo2.c, and > they both compile. It is interesting, use %P0 results in fewer addi's than > the > older one (there were redunant addi's in passing the address).

Re: [C++ PATCH] hash-table for extern-c fns.

2017-10-09 Thread Jason Merrill
On Fri, Oct 6, 2017 at 10:18 AM, Nathan Sidwell wrote: > This patch converts the extern "C" function map to use a hash table, in the > same way as I've just changed namespace bindings. > > There's a small wart, in that the c_linkage_bindings user (in c-common) > expects either a

[Ada] Spurious error with expression function returning anonymous access

2017-10-09 Thread Pierre-Marie de Rodat
This patch fixes a spurious error on an expression function that is a completion, when the expression is a function call that returns an anonymous access type. The preanalysis of the expression to freeze referenced types requires the proper computation of the access level of the function call, at

[Ada] Static allocation of secondary dispatch tables

2017-10-09 Thread Pierre-Marie de Rodat
This patch enhances the compiler to statically allocate secondary dispatch tables. No test available because it would require the analysis of the generated assembly code (thus depending on the target architecture). Tested on x86_64-pc-linux-gnu, committed on trunk 2017-10-09 Javier Miranda

[Ada] Improve nnd debugging hooks

2017-10-09 Thread Pierre-Marie de Rodat
This patch improves and simplifies the debugging hooks. Now you just have to break on nnd to find all "interesting" creations/modifications of node ids. No change in functionality; no test available. Tested on x86_64-pc-linux-gnu, committed on trunk 2017-10-09 Bob Duff

[Add] Spurious ambiguity in prefixed call to classwide operation

2017-10-09 Thread Pierre-Marie de Rodat
This patch suppresses a spurious ambiguity error on a prefixed call to an inherited class-wide operation, when the operation also has other visible homonyms in the context. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ 2017-10-09 Ed Schonberg *

[PATCH, rs6000] Add Power 8 support to vec_revb

2017-10-09 Thread Carl Love
GCC maintainers: The following patch add Power8 vec_revb() builtin support to the existing Power 9 support. The Power ISA specification says the vec_revb() builtin is to be supported on both Power 8 and Power 9. There are new instructions in Power 9 that support the vec_revb() functionality. So

Re: [RFA] Implement __VA_OPT__

2017-10-09 Thread Tom Tromey
> "Tom" == Tom Tromey writes: [ __VA_OPT__ ] Tom> Here's v3. Ping. Tom

[Ada] Detect protected types as program units

2017-10-09 Thread Pierre-Marie de Rodat
Routine Unit_Declaration_Node now recognizes protected types as program units and returns their declaration nodes; previously it returned declaration nodes of the enclosing program units. This was an oversight. -- Source -- -- illegal.ads package Illegal with

[Ada] Warnings for ineffective use clauses unclear

2017-10-09 Thread Pierre-Marie de Rodat
This patch modifies the warnings denoting ineffective use-clauses to be more explicit and user-friendly. -- Source -- -- unused_a.adb with Ada.Text_IO; with Interfaces; procedure Unused_A is use type Interfaces.Unsigned_8; begin Ada.Text_IO.Put_Line ("Hello,

[Ada] Crash on validity check on actual with type conversion

2017-10-09 Thread Pierre-Marie de Rodat
This patch fixes a compiler crash on a function call when validity checks on actuals are enabled (-gnatVi) and the target type is a scalar type. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ 2017-10-09 Ed Schonberg * exp_attr.adb

[Ada] Crash on actual that is an instance of a generic child unit

2017-10-09 Thread Pierre-Marie de Rodat
This patch fixes a compiler abort on an instantiation where the actual for a formal package is an instantiation of a generic child unit. An instantiation freezes its actuals, and in the case of formal packages whose instance includes a body the back-end needs an explicit freeze node for the

Re: [patch] configure option to override TARGET_LIBC_PROVIDES_SSP

2017-10-09 Thread Joseph Myers
The install.texi documentation for --disable-libssp only says "Specify that the run-time libraries for stack smashing protection should not be built.". I think it needs updating to mention these additional effects as well. -- Joseph S. Myers jos...@codesourcery.com

Re: [PATCH][mingw] Enable colorized diagnostics

2017-10-09 Thread Liu Hao
On 2017/10/9 22:16, David Malcolm wrote: I have some concerns about adding non-trivial host-specific code to the diagnostics subsystem. I occasionally make changes to the files you're touching, but I don't have access to the host in question, so I can't test that I don't break things on MinGW.

Re: [PATCH][mingw] Enable colorized diagnostics

2017-10-09 Thread David Malcolm
On Mon, 2017-10-09 at 11:01 +, JonY wrote: > On 10/08/2017 11:39 AM, Liu Hao wrote: > > On 2017/9/28 4:09, Joseph Myers wrote: > > > On Thu, 28 Sep 2017, Liu Hao wrote: > > > > > > > Colorized diagnostics used to be disabled for MinGW targets (on > > > > which > > > > the macro `_WIN32` is

Re: [PATCH] Fix PR82397

2017-10-09 Thread Richard Biener
On Mon, 9 Oct 2017, Richard Biener wrote: > On Sat, 7 Oct 2017, Richard Sandiford wrote: > > > Richard Biener writes: > > > I am testing the following patch to fix the qsort intransitiveness > > > of dr_group_sort_cmp. The patch removes the overly powerful > > >

Re: tree-complex.c: fix some_nonzerop test over reals (and a bug fix)

2017-10-09 Thread Richard Biener
On Mon, Oct 9, 2017 at 3:30 PM, Laurent Thevenoux wrote: > > > - Mail original - >> De: "Richard Biener" >> À: "Laurent Thevenoux" >> Cc: "GCC Patches" >> Envoyé: Lundi 9

Re: [PATCH][GRAPHITE] Fix PR82449

2017-10-09 Thread Richard Biener
On Mon, 9 Oct 2017, Richard Biener wrote: > On Fri, 6 Oct 2017, Sebastian Pop wrote: > > > On Fri, Oct 6, 2017 at 8:33 AM, Richard Biener wrote: > > > > > On Fri, 6 Oct 2017, Sebastian Pop wrote: > > > > > > > On Fri, Oct 6, 2017 at 6:56 AM, Richard Biener

Re: [PATCH GCC][5/7]Extend loop distribution for two-level innermost loop nest

2017-10-09 Thread Richard Biener
On Thu, Oct 5, 2017 at 3:17 PM, Bin Cheng wrote: > Hi, > For now distribution pass only handles the innermost loop. This patch > extends the pass > to cover two-level innermost loop nest. It also refactors code in > pass_loop_distribution::execute > for better reading.

Re: [C PATCH] Fix -Wtautological-compare (PR c/82437; #2)

2017-10-09 Thread Marek Polacek
On Fri, Oct 06, 2017 at 02:21:41PM +0200, Jakub Jelinek wrote: > On Thu, Oct 05, 2017 at 11:05:57PM +0200, Marek Polacek wrote: > > On Thu, Oct 05, 2017 at 10:34:26PM +0200, Jakub Jelinek wrote: > > > Hi! > > > > > > In warn_tautological_bitwise_comparison, there is even a comment > > >

Re: [PATCH GCC][4/7]Choose exit edge/path when removing inner loop's exit statement

2017-10-09 Thread Richard Biener
On Thu, Oct 5, 2017 at 3:16 PM, Bin Cheng wrote: > Hi, > Function generate_loops_for_partition chooses arbitrary path when removing > exit > condition not in partition. This is fine for now because it's impossible to > have > loop exit condition in case of innermost

Re: [PATCH GCC][3/7]Don't skip renaming PHIs in loop nest with only one inner loop

2017-10-09 Thread Richard Biener
On Thu, Oct 5, 2017 at 3:16 PM, Bin Cheng wrote: > Hi, > Function rename_variables_in_bb skips renaming PHI nodes in loop nest if the > outer loop has only one inner loop. This breaks loop nest distribution when > inner loop has PHI node initialized from outer loop's variable.

Re: tree-complex.c: fix some_nonzerop test over reals (and a bug fix)

2017-10-09 Thread Laurent Thevenoux
- Mail original - > De: "Richard Biener" > À: "Laurent Thevenoux" > Cc: "GCC Patches" > Envoyé: Lundi 9 Octobre 2017 14:04:49 > Objet: Re: tree-complex.c: fix some_nonzerop test over reals (and a bug fix)

Re: [PATCH GCC][2/7]Don't rename variables for deleted new preheader

2017-10-09 Thread Richard Biener
On Thu, Oct 5, 2017 at 3:15 PM, Bin Cheng wrote: > Hi, > I noticed that new_preheader basic block could be deleted if the copied > loop is added at entry in function slpeel_tree_duplicate_loop_to_edge_cfg. > This simple patch skips new_preheader during variable renaming if it

Re: [PATCH GCC][1/7]Delete unused field of struct partition in loop distribution

2017-10-09 Thread Richard Biener
On Thu, Oct 5, 2017 at 3:15 PM, Bin Cheng wrote: > Hi, > This patch set implements distribution and builtin pattern distribution for > loop nest. It consists of below patches: > Patches [1~4]: Cleanup and (latent) bug fixes. > Patch [5]: Loop nest distribution of two-level

Re: Require wi::to_wide for trees

2017-10-09 Thread Richard Biener
On Tue, Oct 3, 2017 at 9:14 PM, Richard Sandiford wrote: > One of the original requirements for getting wide-int.h accepted > was that it should work efficiently on trees. Through a process > that I no longer recall exactly, this ended up meaning that we can > use

Re: [PATCH][PING][PR 81376] Remove unnecessary float casts in comparisons

2017-10-09 Thread Richard Biener
On Mon, Oct 9, 2017 at 11:12 AM, Yuri Gribov wrote: > Hi all, > > This patch gets rid of float casts in comparisons when all values of > casted integral type are exactly representable by the float type > (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81376). > > Bootstrapped

Re: [PATCH 1/9] [SFN] adjust RTL insn-walking API

2017-10-09 Thread Richard Biener
On Sat, Sep 30, 2017 at 11:08 AM, Alexandre Oliva wrote: > This patch removes unused RTL functions, introduces alternate ones for > use in a later SFN patch, and regroups other related functions so that > they appear in a more consistent order. Ok. Thanks, Richard. > for

Re: [PATCH 5/9] [SFN] Introduce -gstatement-frontiers option, enable debug markers

2017-10-09 Thread Richard Biener
On Sat, Sep 30, 2017 at 11:08 AM, Alexandre Oliva wrote: > Introduce a command line option to enable statement frontiers, enabled > by default in optimized builds with DWARF2+ debug information. > > This patch depends on an earlier patch that completed the > infrastructure for

Re: [PATCH 4/9] [SFN] introduce statement frontier notes, still disabled

2017-10-09 Thread Richard Biener
On Sat, Sep 30, 2017 at 11:08 AM, Alexandre Oliva wrote: > This patch completes the infrastructure for the introduction of > statement frontiers in C-family languages. > > It brings in all the code remaining code needed to introduce and > transform begin stmt trees, gimple

Re: [PATCH][mingw] Enable colorized diagnostics

2017-10-09 Thread Liu Hao
On 2017/10/9 19:01, JonY wrote: On 10/08/2017 11:39 AM, Liu Hao wrote: I'm not sure if it should be enabled by default due to the interleaving problem, but seeing as the user has to go out to set GCC_COLORS to use this feature, I suppose it is OK. I will commit soon if there are no more

Re: [PATCH 3/9] [SFN] not-quite-boilerplate changes in preparation to introduce nonbind markers

2017-10-09 Thread Richard Biener
On Sat, Sep 30, 2017 at 11:08 AM, Alexandre Oliva wrote: > This patch adjusts numerous parts of the compiler that would > malfunction should they find debug markers at points where they may be > introduced. The changes purport to allow the compiler to pass >

Re: [PATCH][GCC] Simplification of 1U << (31 - x)

2017-10-09 Thread Wilco Dijkstra
Richard Biener wrote: > I think the patch is ok with these changes but obviously we should try > to address > the code-generation issue on x86 at RTL expansion time.  They are sort-of > existing missing optimizations. Note the only x64 specific issue is the backend expansion of 64-bit immediates

Re: [PATCH, ARM] correctly encode the CC reg data flow

2017-10-09 Thread Richard Earnshaw (lists)
On 06/09/17 14:17, Bernd Edlinger wrote: > On 09/06/17 14:51, Richard Earnshaw (lists) wrote: >> On 06/09/17 13:44, Bernd Edlinger wrote: >>> On 09/04/17 21:54, Bernd Edlinger wrote: Hi Kyrill, Thanks for your review! On 09/04/17 15:55, Kyrill Tkachov wrote: > Hi

Re: [PATCH 2/9] [SFN] boilerplate changes in preparation to introduce nonbind markers

2017-10-09 Thread Richard Biener
On Sat, Sep 30, 2017 at 11:08 AM, Alexandre Oliva wrote: > This patch introduces a number of new macros and functions that will > be used to distinguish between different kinds of debug stmts, insns > and notes, namely, preexisting debug bind ones and to-be-introduced > nonbind

Re: X+Y < X iff Y<0 moved to match.pd

2017-10-09 Thread Richard Biener
On Sun, Oct 8, 2017 at 1:22 PM, Marc Glisse wrote: > Hello, > > this moves (and extends a bit) one more transformation from fold-const.c to > match.pd. The single_use restriction is necessary for consistency with the > existing X+CST1 CMP CST2 transformation (if we do only

Re: tree-complex.c: fix some_nonzerop test over reals (and a bug fix)

2017-10-09 Thread Richard Biener
On Fri, Oct 6, 2017 at 8:58 PM, Laurent Thevenoux wrote: > Hi Richard, thanks for your quick reply. > > - Mail original - >> De: "Richard Biener" >> À: "Laurent Thevenoux" >> Cc: "GCC Patches"

Re: [PATCH][GCC] Simplification of 1U << (31 - x)

2017-10-09 Thread Richard Biener
On Tue, Sep 26, 2017 at 2:44 PM, Sudi Das wrote: > > Still waiting on Jakub's comment on whether there are more things needed at > the backend. But I have updated the patch according to Richard's comments. + (if (TYPE_UNSIGNED(type)) space before '(type)'. + (rshift

[committed] s390 vec_xor fix (PR target/82464)

2017-10-09 Thread Jakub Jelinek
Hi! I've committed following patch which has been preapproved by Andreas in the PR. No testcase right now, it will be covered by testsuite later together with all the other intrinsics. 2017-10-09 Jakub Jelinek PR target/82464 * config/s390/s390-builtins.def

Re: Add -Wsuggest-attribute=cold

2017-10-09 Thread Tom de Vries
On 07/24/2017 08:56 PM, Jan Hubicka wrote: * gcc.dg/cold-1.c: New testcase. Index: testsuite/gcc.dg/cold-1.c === --- testsuite/gcc.dg/cold-1.c (revision 0) +++ testsuite/gcc.dg/cold-1.c (working copy) @@ -0,0 +1,21 @@

Re: [RFA] [PATCH 4/4] Ignore reads of "dead" memory locations in DSE

2017-10-09 Thread Christophe Lyon
On 5 October 2017 at 21:40, Christophe Lyon wrote: > Hi Jeff, > > > On 7 September 2017 at 00:18, Jeff Law wrote: >> Another old patch getting resurrected... >> >> > > This patch (r253305) introduces a new FAIL on arm-none-eabi (as > opposed

  1   2   >