Re: [PATCH] Special case clzl like builtins in factor_out_conditional_conversion (PR tree-optimization/71016)

2017-01-05 Thread Richard Biener
On Wed, 4 Jan 2017, Jeff Law wrote: > On 01/04/2017 11:01 AM, Jakub Jelinek wrote: > > On Wed, Jan 04, 2017 at 11:19:46AM +0100, Richard Biener wrote: > > > For the SSA_NAME + INTEGER_CST case restrict it to the case > > > > > > if (x_1 > 5) > > > tem_2 = (char) x_1; > > > # tem_3 = PHI

Re: [bootstrap-O1] change value type to avoid sprintf buffer size warning

2017-01-05 Thread Andreas Schwab
On Jan 05 2017, Alexandre Oliva wrote: > diff --git a/gcc/c-family/c-pretty-print.c b/gcc/c-family/c-pretty-print.c > index 90428ca..07fdbae 100644 > --- a/gcc/c-family/c-pretty-print.c > +++ b/gcc/c-family/c-pretty-print.c > @@ -2400,7 +2400,7 @@ pp_c_tree_decl_identifier (c_pretty_printer *pp,

Re: [PR tree-optimization/67955] Exploit PTA in DSE

2017-01-05 Thread Richard Biener
On Wed, Jan 4, 2017 at 8:24 PM, Jeff Law wrote: > On 01/04/2017 11:55 AM, Jeff Law wrote: >> >> On 12/09/2016 01:28 AM, Richard Biener wrote: >>> >>> On Wed, Dec 7, 2016 at 12:18 AM, Jeff Law wrote: So I was going through the various DSE related bugs as stumbled across 67

Re: [PATCH] Do not sanitize in lower_omp_target context (PR, sanitizer/78815).

2017-01-05 Thread Martin Liška
On 01/04/2017 10:31 AM, Jakub Jelinek wrote: > On Wed, Jan 04, 2017 at 10:19:28AM +0100, Martin Liška wrote: >> PING^1 >> >> On 12/16/2016 01:04 PM, Martin Liška wrote: >>> Currently, use-after-scope relies on fact that entry point of >>> gimplify_decl_expr >>> is gimplify_function_tree. Fixed by

Re: [PATCH] vimrc: fix TAB settings

2017-01-05 Thread Martin Liška
On 01/04/2017 10:14 PM, Gerald Pfeifer wrote: > On Mon, 14 Nov 2016, Martin Liška wrote: >> Following patch adds TAB settings to contrib/vimrc file. >> Hope it looks reasonable? > > This does not appear applied, are you waiting for approval? If > so, for something like this in contrib we don't ne

Re: [-fcompare-debug] var tracking options are not optimization options

2017-01-05 Thread Jakub Jelinek
On Thu, Jan 05, 2017 at 02:06:09AM -0200, Alexandre Oliva wrote: > If we include them in the ICF hash, they may cause congruence_groups to > be processed in a different order due to different hashes, which in turn > causes different funcdef_nos to be assigned to functions. Since these > numbers ar

[PATCH] Fix precompiled header for '-' being input file (PR, pch/78970)

2017-01-05 Thread Martin Liška
Having '-' used as indication that input should be taken from standard input is unfriendly to pch which calculates md5sum of all input file descriptors. With that fdopen fails for STDIN_FILENO. To be honest my patch is just a workaround for the ICE. Is there a better solution for that? Patch can

Re: [PATCH] Do not sanitize in lower_omp_target context (PR, sanitizer/78815).

2017-01-05 Thread Jakub Jelinek
On Thu, Jan 05, 2017 at 09:42:54AM +0100, Martin Liška wrote: > I like your approach, I'm sending updated patch which bootstraps and survives > regression tests. > > Ready to be installed? > Martin > >From 42887cf5fe7d94709ee5356fb6534c7a4fc26bff Mon Sep 17 00:00:00 2001 > From: marxin > Date: W

[PING**4] [PATCH, ARM] Further improve stack usage on sha512 (PR 77308)

2017-01-05 Thread Bernd Edlinger
Ping... On 12/27/16 15:12, Bernd Edlinger wrote: > Ping... > > On 12/19/16 06:49, Bernd Edlinger wrote: >> Ping... >> >> On 12/12/16 06:59, Bernd Edlinger wrote: >>> Ping... >>> >>> On 12/05/16 14:41, Bernd Edlinger wrote: Hi, this was the latest version of my patch: https://gc

Re: [PATCH] Fix precompiled header for '-' being input file (PR, pch/78970)

2017-01-05 Thread Jakub Jelinek
On Thu, Jan 05, 2017 at 10:00:33AM +0100, Martin Liška wrote: > Having '-' used as indication that input should be taken from standard input > is unfriendly to pch which calculates md5sum of all input file descriptors. > With that fdopen fails for STDIN_FILENO. To be honest my patch is just a > wo

[build, libgo, libstdc++] Build libgo with -Wa,-nH if possible (PR go/78978)

2017-01-05 Thread Rainer Orth
As could have been expected, the static libgo.a causes the same problem with hardware capabilities on Solaris/x86 as was solved for libgo.so with https://gcc.gnu.org/ml/gcc-patches/2016-12/msg00726.html Instead of trying to pass -mclear-hwcap with -static-libgo, it was deemed easier to so

Require C11 for C++17 on Solaris

2017-01-05 Thread Rainer Orth
While investigating PR libstdc++/78979, it turned out that g++ on Solaris should define the C11 value for __STDC_VERSION__ instead of the C99 one when compiling for C++17. That's what this patch does. It seemed safer to use the C99 value only where we know it's needed, and default to the C11 one

Re: PING Re: [PATCH] Add x86_64-specific selftests for RTL function reader (v2)

2017-01-05 Thread Uros Bizjak
On Tue, Jan 3, 2017 at 5:47 PM, David Malcolm wrote: > Ping: > https://gcc.gnu.org/ml/gcc-patches/2016-12/msg01616.html > > (the patch has been successfully bootstrap®rtested on > x86_64-pc-linux-gnu, and also tested on i686-pc-linux-gnu). I consider this part of testing ifrastructure, not part

[fixincludes] Only declare gets for C++ < 2014 on Solaris (PR libstdc++/78979)

2017-01-05 Thread Rainer Orth
While investigating PR libstdc++/78979, it turns out that Solaris incorrectly declares std::gets even for C++14 where it's been removed. This patch fixes that by adding an additional __cplusplus < 201402L guard via fixincludes. This works for Solaris 12 (and 11), but Solaris 10 declares the func

Re: [PATCH] Fix precompiled header for '-' being input file (PR, pch/78970)

2017-01-05 Thread Martin Liška
On 01/05/2017 10:11 AM, Jakub Jelinek wrote: > On Thu, Jan 05, 2017 at 10:00:33AM +0100, Martin Liška wrote: >> Having '-' used as indication that input should be taken from standard input >> is unfriendly to pch which calculates md5sum of all input file descriptors. >> With that fdopen fails for S

Re: [PATCH] Fix precompiled header for '-' being input file (PR, pch/78970)

2017-01-05 Thread Jakub Jelinek
On Thu, Jan 05, 2017 at 11:01:37AM +0100, Martin Liška wrote: > >From 0e14f21128c7aa67ed0eaa10877323a0b2011b63 Mon Sep 17 00:00:00 2001 > From: marxin > Date: Wed, 4 Jan 2017 16:04:44 +0100 > Subject: [PATCH] Error for '-' as filename of a precompiled header (PR > pch/78970) > > gcc/ChangeLog: >

Re: [PATCH 1/6][ARM] Refactor NEON builtin framework to work for other builtins

2017-01-05 Thread Kyrill Tkachov
Hi Andre, On 01/12/16 17:25, Andre Vieira (lists) wrote: On 17/11/16 10:42, Kyrill Tkachov wrote: Hi Andre, On 09/11/16 10:11, Andre Vieira (lists) wrote: Hi, Refactor NEON builtin framework such that it can be used to implement other builtins. Is this OK for trunk? Regards, Andre gcc/Cha

Re: [PATCH 2/6][ARM] Move CRC builtins to refactored framework

2017-01-05 Thread Kyrill Tkachov
On 05/12/16 15:05, Andre Vieira (lists) wrote: On 01/12/16 17:25, Andre Vieira (lists) wrote: On 09/11/16 10:11, Andre Vieira (lists) wrote: Hi, This patch refactors the implementation of the ARM ACLE CRC builtins to use the builtin framework. Is this OK for trunk? Regards, Andre gcc/Chang

Re: [PATCH 3/6][ARM] Implement support for ACLE Coprocessor CDP intrinsics

2017-01-05 Thread Kyrill Tkachov
Hi Andre, On 09/11/16 10:11, Andre Vieira (lists) wrote: Hi, This patch implements support for the ARM ACLE Coprocessor CDP intrinsics. See below a table mapping the intrinsics to their respective instructions: ++-

Re: [PATCH 4/6][ARM] Implement support for ACLE Coprocessor LDC and STC intrinsics

2017-01-05 Thread Kyrill Tkachov
Hi Andre, On 09/11/16 10:12, Andre Vieira (lists) wrote: Hi, This patch implements support for the ARM ACLE Coprocessor LDC and STC intrinsics. See below a table mapping the intrinsics to their respective instructions: ++-

Re: [PATCH 5/6][ARM] Implement support for ACLE Coprocessor MCR and MRC intrinsics

2017-01-05 Thread Kyrill Tkachov
On 09/11/16 10:12, Andre Vieira (lists) wrote: Hi, This patch implements support for the ARM ACLE Coprocessor MCR and MRC intrinsics. See below a table mapping the intrinsics to their respective instructions: +---+

Re: [PATCH 6/6][ARM] Implement support for ACLE Coprocessor MCRR and MRRC intrinsics

2017-01-05 Thread Kyrill Tkachov
Hi Andre, On 09/11/16 10:12, Andre Vieira (lists) wrote: Hi, This patch implements support for the ARM ACLE Coprocessor MCR and MRC intrinsics. See below a table mapping the intrinsics to their respective instructions: +---+--

[PATCH] Tweak factor_out_conditional_conversion (PR tree-optimization/71016, take 2)

2017-01-05 Thread Jakub Jelinek
Hi! On Thu, Jan 05, 2017 at 09:09:06AM +0100, Richard Biener wrote: > I think that would be premature. Consider a modified > gcc.dg/tree-ssa/pr66726.c: > > extern unsigned short mode_size[]; > > int > oof (int mode) > { > int tem; > if (64 < mode_size[mode]) > tem = 64; > else >

Re: [build, libgo, libstdc++] Build libgo with -Wa,-nH if possible (PR go/78978)

2017-01-05 Thread Jonathan Wakely
On 05/01/17 10:20 +0100, Rainer Orth wrote: As could have been expected, the static libgo.a causes the same problem with hardware capabilities on Solaris/x86 as was solved for libgo.so with https://gcc.gnu.org/ml/gcc-patches/2016-12/msg00726.html Instead of trying to pass -mclear-hwcap

RE: Make MIPS soft-fp preserve NaN payloads for NAN2008

2017-01-05 Thread Matthew Fortune
Joseph Myers writes: > On Wed, 4 Jan 2017, Maciej W. Rozycki wrote: > > > AFAIR we deliberately decided not to define a 2008-NaN soft-float > > ABI, and chose to require all soft-float binaries to use the legacy > encoding. > > Soft-float and 2008-NaN are naturally completely orthogonal and the

Re: [PATCH][tree-ssa-address] Use simplify_gen_binary in gen_addr_rtx

2017-01-05 Thread Richard Biener
On Wed, Jan 4, 2017 at 4:07 PM, Kyrill Tkachov wrote: > > On 04/01/17 14:19, Richard Biener wrote: >> >> On Wed, Dec 21, 2016 at 10:40 AM, Kyrill Tkachov >> wrote: >>> >>> On 20/12/16 17:30, Richard Biener wrote: On December 20, 2016 5:01:19 PM GMT+01:00, Kyrill Tkachov wrote: >>>

Re: [PATCH] Fix precompiled header for '-' being input file (PR, pch/78970)

2017-01-05 Thread Andreas Schwab
On Jan 05 2017, Jakub Jelinek wrote: > On Thu, Jan 05, 2017 at 11:01:37AM +0100, Martin Liška wrote: >> diff --git a/gcc/gcc.c b/gcc/gcc.c >> index 8154953eb1d..ea4af119e73 100644 >> --- a/gcc/gcc.c >> +++ b/gcc/gcc.c >> @@ -8325,7 +8325,19 @@ lookup_compiler (const char *name, size_t length, >>

Re: [PATCH] Fix late dwarf generated early from optimized out globals

2017-01-05 Thread Richard Biener
On Wed, 4 Jan 2017, Andreas Tobler wrote: > On 04.01.17 10:21, Richard Biener wrote: > > On Wed, 28 Dec 2016, Andreas Tobler wrote: > > > > > On 28.12.16 19:24, Richard Biener wrote: > > > > On December 27, 2016 11:17:00 PM GMT+01:00, Andreas Tobler > > > > wrote: > > > > > On 16.09.16 13:30, Ri

Re: [PATCH] Tweak factor_out_conditional_conversion (PR tree-optimization/71016, take 2)

2017-01-05 Thread Richard Biener
On Thu, 5 Jan 2017, Jakub Jelinek wrote: > Hi! > > On Thu, Jan 05, 2017 at 09:09:06AM +0100, Richard Biener wrote: > > I think that would be premature. Consider a modified > > gcc.dg/tree-ssa/pr66726.c: > > > > extern unsigned short mode_size[]; > > > > int > > oof (int mode) > > { > > int

Re: [PATCH] Improve -f{,no}-vect-cost-model

2017-01-05 Thread Richard Biener
On Wed, Jan 4, 2017 at 10:15 PM, Jakub Jelinek wrote: > On Wed, Jan 04, 2017 at 01:31:28PM +0100, Richard Biener wrote: >> > And not sure why this actually >> > is RejectNegative, wouldn't >> > Common Alias(fvect-cost-model=,dynamic,unlimited) >> > work just on fvect-cost-model (can test that)? >

Re: [PATCH][tree-ssa-address] Use simplify_gen_binary in gen_addr_rtx

2017-01-05 Thread Kyrill Tkachov
On 05/01/17 12:01, Richard Biener wrote: On Wed, Jan 4, 2017 at 4:07 PM, Kyrill Tkachov wrote: On 04/01/17 14:19, Richard Biener wrote: On Wed, Dec 21, 2016 at 10:40 AM, Kyrill Tkachov wrote: On 20/12/16 17:30, Richard Biener wrote: On December 20, 2016 5:01:19 PM GMT+01:00, Kyrill Tkachov

Re: [bootstrap-O3,fortran] silence warning in simplify_transformation_to_array

2017-01-05 Thread Richard Biener
On Thu, Jan 5, 2017 at 5:06 AM, Alexandre Oliva wrote: > On Jan 4, 2017, Alexandre Oliva wrote: > >> I'll prepare and post a patch anyway, but do we want to make it >> standard practice? > > Here it is. > > simplify_transformation_to_array had the nested loop unrolled 7 times, > which is reasona

Re: [PATCH] Fix precompiled header for '-' being input file (PR, pch/78970)

2017-01-05 Thread Martin Liška
On 01/05/2017 11:09 AM, Jakub Jelinek wrote: > On Thu, Jan 05, 2017 at 11:01:37AM +0100, Martin Liška wrote: >> >From 0e14f21128c7aa67ed0eaa10877323a0b2011b63 Mon Sep 17 00:00:00 2001 >> From: marxin >> Date: Wed, 4 Jan 2017 16:04:44 +0100 >> Subject: [PATCH] Error for '-' as filename of a precomp

[PATCH][dwarf2out] Fix PR79000

2017-01-05 Thread Richard Biener
The following fixes a LTO dwarf2out ICE when mixing C and C++ TUs. is_cxx then claims we're C++ but we are not happy to see a C typedef handled by gen_typedef_die (tree decl, dw_die_ref context_die) { ... if (is_naming_typedef_decl (TYPE_NAME (type))) { /* Here

Re: [PATCH] Fix precompiled header for '-' being input file (PR, pch/78970)

2017-01-05 Thread Jakub Jelinek
On Thu, Jan 05, 2017 at 02:08:40PM +0100, Martin Liška wrote: > diff --git a/gcc/c-family/c-opts.c b/gcc/c-family/c-opts.c > index 14e038c02b3..49df9e19157 100644 > --- a/gcc/c-family/c-opts.c > +++ b/gcc/c-family/c-opts.c > @@ -744,7 +744,12 @@ c_common_post_options (const char **pfilename) >

Re: Make MicroBlaze support DWARF EH (old Xilinx patch, needed for glibc build)

2017-01-05 Thread Michael Eager
On 01/02/2017 03:45 PM, Joseph Myers wrote: This patch, taken from and with a few formatting cleanups and an update for the removal of gen_rtx_raw_REG, enables DWARF EH support for MicroBlaze.

Re: [PATCH] Fix precompiled header for '-' being input file (PR, pch/78970)

2017-01-05 Thread Martin Liška
On 01/05/2017 02:30 PM, Jakub Jelinek wrote: > On Thu, Jan 05, 2017 at 02:08:40PM +0100, Martin Liška wrote: >> diff --git a/gcc/c-family/c-opts.c b/gcc/c-family/c-opts.c >> index 14e038c02b3..49df9e19157 100644 >> --- a/gcc/c-family/c-opts.c >> +++ b/gcc/c-family/c-opts.c >> @@ -744,7 +744,12 @@ c

[PATCH] [HSA] Implement DIVMOD internal function call

2017-01-05 Thread Martin Liška
As DIVMOD has started to be used on x86_64, HSA targets needs to understand the internal function call. It's implemented by tuple of division and remainder or arguments. It's pre-approved by Martin Jambor for both hsa branch and trunk. Patch can bootstrap on x86_64-linux-gnu and survives regressio

[patch] update zlib to the 1.2.10 release.

2017-01-05 Thread Matthias Klose
These are the changes updating zlib from 1.2.8 to 1.2.10. It is only used when building without a system zlib. The new release includes fixes for security issues CVE-2016-9840, CVE-2016-9841, CVE-2016-9842, CVE-2016-9843. Checked with a build with disabled system-zlib. Ok for the trunk? Matthias

[PATCH] Fix PR78997

2017-01-05 Thread Richard Biener
I am testing the following to fix PR78997. Bootstrap / regtest running on x86_64-unknown-linux-gnu. Richard. 2016-01-05 Richard Biener PR tree-optimization/78997 * tree-vect-slp.c (vect_mask_constant_operand_p): Handle SSA name condition properly. * gcc.dg/t

Re: Implement -Wduplicated-branches (PR c/64279) (v3)

2017-01-05 Thread Marek Polacek
Coming back to this... On Thu, Nov 03, 2016 at 02:38:50PM +0100, Jakub Jelinek wrote: > On Thu, Nov 03, 2016 at 09:27:55AM -0400, Jason Merrill wrote: > > On Thu, Nov 3, 2016 at 7:24 AM, Marek Polacek wrote: > > > On Tue, Nov 01, 2016 at 02:53:58PM +0100, Jakub Jelinek wrote: > > >> On Tue, Nov 0

Re: Implement -Wduplicated-branches (PR c/64279) (v3)

2017-01-05 Thread Jakub Jelinek
On Thu, Jan 05, 2017 at 04:39:40PM +0100, Marek Polacek wrote: > Coming back to this... > > Right, after h0 == h1 is missing && operand_equal_p (thenb, elseb, 0) > > or so (the exact last operand needs to be figured out). > > OEP_ONLY_CONST is certainly wrong, we want the same VAR_DECLs to mean th

Re: Implement -Wduplicated-branches (PR c/64279) (v3)

2017-01-05 Thread Richard Biener
On January 5, 2017 4:41:28 PM GMT+01:00, Jakub Jelinek wrote: >On Thu, Jan 05, 2017 at 04:39:40PM +0100, Marek Polacek wrote: >> Coming back to this... > >> > Right, after h0 == h1 is missing && operand_equal_p (thenb, elseb, >0) >> > or so (the exact last operand needs to be figured out). >> > OE

[RFC] combine: Handle zero_extend without subreg in change_zero_ext.

2017-01-05 Thread Dominik Vogt
The attached patch deals with another type of zero_extend that is not yet handled in change_zero_ext, i.e. (zero_extend (pseudoreg)), without a "subreg" in between. What do you think? (Mostly untested yet.) Ciao Dominik ^_^ ^_^ -- Dominik Vogt IBM Germany >From 36be099953903aa16ec1f307f0018a

[PATCH] Remove unnecessary typedef from std::function

2017-01-05 Thread Jonathan Wakely
TThis typedef is only used once, in a function body, so it doesn't need to be defined at class scope. It doesn't need to be defined at all. * include/bits/std_function.h (function::_Signature_type): Remove. (function::function(_Functor)): Adjust. Tested powerpc64le-linux, committ

Re: [bootstrap-O3,fortran] silence warning in simplify_transformation_to_array

2017-01-05 Thread Jeff Law
On 01/05/2017 05:15 AM, Richard Biener wrote: On Thu, Jan 5, 2017 at 5:06 AM, Alexandre Oliva wrote: On Jan 4, 2017, Alexandre Oliva wrote: I'll prepare and post a patch anyway, but do we want to make it standard practice? Here it is. simplify_transformation_to_array had the nested loop

Re: Make MicroBlaze support DWARF EH (old Xilinx patch, needed for glibc build)

2017-01-05 Thread Joseph Myers
On Thu, 5 Jan 2017, Michael Eager wrote: > On multiple occasions, I have asked Xilinx to submit patches such > as this one directly to the GCC/Binutils projects (assuming that > they have a current FSF Copyright Assignment), or to give me > explicit permission to do so on their beh

Re: [PATCH] avoid infinite recursion in maybe_warn_alloc_args_overflow (pr 78775)

2017-01-05 Thread Jeff Law
On 12/12/2016 06:36 PM, Martin Sebor wrote: The attached patch avoids infinite recursion when traversing phi nodes in maybe_warn_alloc_args_overflow by using a bitmap to keep track of those already visited and breaking out. Thanks Martin gcc-78775.diff PR tree-optimization/78775 - ICE in mayb

Re: [PATCH] Add testcases to test builtin-expansion of memcmp and strncmp

2017-01-05 Thread Jeff Law
On 12/19/2016 08:02 PM, Aaron Sawdey wrote: This patch adds tests gcc.dg/memcmp-1.c and gcc.dg/strncmp-1.c that test builtin expansion of memcmp and strncmp for short strings and also varying alignment of one arg. The strncmp test checks that things work when one of the strings crosses a 4k bound

Re: [PATCH] correct off-by-one error in handling of precision of negative numbers (PR 78910)

2017-01-05 Thread Jeff Law
On 01/04/2017 02:43 PM, Martin Sebor wrote: The attached patch corrects an off-by-one mistake in handling non-zero precisions in signed conversions (%d and %i) with negative arguments, such as in sprintf(d, "%.2", -1). The call which results in the three bytes "-01" on output, not 2. I.e., the

Re: [bootstrap-O1] change value type to avoid sprintf buffer size warning

2017-01-05 Thread Jeff Law
On 01/04/2017 09:05 PM, Alexandre Oliva wrote: On Jan 4, 2017, Martin Sebor wrote: The manual recommends to use a length modifier to constrain the length of output to that of a narrower type: sprintf (xname, "", ((unsigned short)((uintptr_t)(t) & 0x))); This should work even witho

[PATCH][ARM] Backport - Avoid partial overlaps in DImode shifts *

2017-01-05 Thread Wilco Dijkstra
With -fpu=neon DI mode shifts are expanded after reload. DI mode registers can either fully or partially overlap on both ARM and Thumb-2. However the shift expansion code can only deal with the full overlap case, and generates incorrect code for partial overlaps. The fix is to add new variants

Re: [PATCH] avoid infinite recursion in maybe_warn_alloc_args_overflow (pr 78775)

2017-01-05 Thread Martin Sebor
On 01/05/2017 11:03 AM, Jeff Law wrote: On 12/12/2016 06:36 PM, Martin Sebor wrote: The attached patch avoids infinite recursion when traversing phi nodes in maybe_warn_alloc_args_overflow by using a bitmap to keep track of those already visited and breaking out. Thanks Martin gcc-78775.diff

Partitioned LTO bug with cdtor aliases

2017-01-05 Thread Nathan Sidwell
Jan, I think I've located a bug in LTO handling. I'm working on a gcc 5 source base, but AFAICT the findings are still current. Except that on trunk the fix for 68881 hides this problem (not confirmed). I have a large source base, invoke LTO in partitioned wpa mode, and end up with a local

Fwd: [PATCH, i386]: Remove special handling of memory operands from *testqi_ext_3

2017-01-05 Thread Uros Bizjak
Hello! It turned out that recent changes made special handling of memory operands in *testqi_ext_3 obsolete. Combine now always pass correct width of memory operands for the extraction, as assured by added assert. 2017-01-05 Uros Bizjak * config/i386/i386.md (*testqi_ext_3): No need to ha

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

2017-01-05 Thread Bill Seurer
[PATCH, rs6000] pr65479 Add -fasynchronous-unwind-tables when the -fsanitize=address option is seen. (backport from trunk to gcc 6) This patch adds the -fasynchronous-unwind-tables option to compilations when the -fsanitize=address option is seen but not if any -fasynchronous-unwind-tables optio

Re: Partitioned LTO bug with cdtor aliases

2017-01-05 Thread Jan Hubicka
> Jan, > I think I've located a bug in LTO handling. I'm working on a gcc 5 source > base, but AFAICT the findings are still current. Except that on trunk the > fix for 68881 hides this problem (not confirmed). > > I have a large source base, invoke LTO in partitioned wpa mode, and end up > with

[committed] Introduce RTL function reader

2017-01-05 Thread David Malcolm
On Thu, 2017-01-05 at 10:43 +0100, Uros Bizjak wrote: > On Tue, Jan 3, 2017 at 5:47 PM, David Malcolm > wrote: > > Ping: > > https://gcc.gnu.org/ml/gcc-patches/2016-12/msg01616.html > > > > (the patch has been successfully bootstrap®rtested on > > x86_64-pc-linux-gnu, and also tested on i686-pc

Re: [PATCH] Fix ICE with -fno-sso-struct=none (PR driver/78957)

2017-01-05 Thread Eric Botcazou
> In this case there is no -fsso-struct option (what would it mean), so > -fno-sso-struct isn't there either (again, what would that mean). > The only thing that would make sense IMHO would be to allow > not just big-endian and little-endian, but also native, so one can > cancel earlier -fsso-struc

Re: [C++ PATCH] Fix decomp handling of fields with reference type (PR c++/78931)

2017-01-05 Thread Jason Merrill
OK. On Wed, Jan 4, 2017 at 5:06 PM, Jakub Jelinek wrote: > On Wed, Jan 04, 2017 at 04:27:42PM -0500, Jason Merrill wrote: >> On Thu, Dec 29, 2016 at 10:11 AM, Jakub Jelinek wrote: >> > probe = TREE_OPERAND (probe, 0); >> > TREE_TYPE (v[i]) = TREE_TYPE (probe); >> >

Re: [C++ PATCH] Reject invalid reference type non-static data members in unions (PR c++/78890)

2017-01-05 Thread Jason Merrill
OK. On Wed, Jan 4, 2017 at 5:07 PM, Jakub Jelinek wrote: > On Wed, Jan 04, 2017 at 04:24:55PM -0500, Jason Merrill wrote: >> On Mon, Jan 2, 2017 at 2:32 PM, Jakub Jelinek wrote: >> > if (TREE_CODE (type) == REFERENCE_TYPE) >> > { >> > - error ("in C++98 %q+D may

Re: [bootstrap-O1] change value type to avoid sprintf buffer size warning

2017-01-05 Thread Alexandre Oliva
On Jan 5, 2017, Andreas Schwab wrote: > On Jan 05 2017, Alexandre Oliva wrote: >> - sprintf (xname, "", ((unsigned)((uintptr_t)(t) & 0x))); >> + sprintf (xname, "", ((unsigned short)((uintptr_t)(t) & >> 0x))); > Please fix the spacing while you are at it. Err... I sure wou

Re: [bootstrap-O1] change value type to avoid sprintf buffer size warning

2017-01-05 Thread Andreas Schwab
On Jan 05 2017, Alexandre Oliva wrote: > On Jan 5, 2017, Andreas Schwab wrote: > >> On Jan 05 2017, Alexandre Oliva wrote: >>> - sprintf (xname, "", ((unsigned)((uintptr_t)(t) & 0x))); >>> + sprintf (xname, "", ((unsigned short)((uintptr_t)(t) & >>> 0x))); > >> Please fix th

Re: [PATCH] Fix ICE with -fno-sso-struct=none (PR driver/78957)

2017-01-05 Thread Jakub Jelinek
On Thu, Jan 05, 2017 at 08:53:49PM +0100, Eric Botcazou wrote: > > In this case there is no -fsso-struct option (what would it mean), so > > -fno-sso-struct isn't there either (again, what would that mean). > > The only thing that would make sense IMHO would be to allow > > not just big-endian and

Re: [-fcompare-debug] var tracking options are not optimization options

2017-01-05 Thread Alexandre Oliva
On Jan 5, 2017, Jakub Jelinek wrote: > OPTIMIZATION_NODE is created by saving options, computing hash > (cl_option_hasher::hash apparently for OPTIMIZATION_NODE does not > use cl_optimization_hash, why?), comparing (no cl_optimization_eq, > just memcmp for equality) and if there is a match, use

[PATCH] Fix up vectorizable_condition for comparisons of 2 booleans (PR tree-optimization/78938)

2017-01-05 Thread Jakub Jelinek
Hi! As mentioned in the PR, while vectorizable_comparison has code to deal with comparison of 2 booleans by transorming those into one or two BIT_*_EXPR operations that work equally well on normal vectors as well as the AVX512 bitset masks, vectorizable_comparison lacks that and we ICE during expa

Re: [PATCH] Fix late dwarf generated early from optimized out globals

2017-01-05 Thread Andreas Tobler
On 05.01.17 13:05, Richard Biener wrote: On Wed, 4 Jan 2017, Andreas Tobler wrote: On 04.01.17 10:21, Richard Biener wrote: On Wed, 28 Dec 2016, Andreas Tobler wrote: On 28.12.16 19:24, Richard Biener wrote: On December 27, 2016 11:17:00 PM GMT+01:00, Andreas Tobler wrote: On 16.09.16 13:

[PATCH] avoid false positives due to signed to unsigned conversion (PR 78973)

2017-01-05 Thread Martin Sebor
When the size passed to a call to a function like memcpy is a signed integer whose range has a negative lower bound and a positive upper bound the lower bound of the range of the argument after conversion to size_t may be in excess of the maximum object size (PTRDIFF_MAX by default). This results

Re: [-fcompare-debug] var tracking options are not optimization options

2017-01-05 Thread Jakub Jelinek
On Thu, Jan 05, 2017 at 07:13:50PM -0200, Alexandre Oliva wrote: > > OPTIMIZATION_NODE is created by saving options, computing hash > > (cl_option_hasher::hash apparently for OPTIMIZATION_NODE does not > > use cl_optimization_hash, why?), comparing (no cl_optimization_eq, > > just memcmp for equali

Re: [PATCH][dwarf2out] Fix PR79000

2017-01-05 Thread Jason Merrill
OK. On Thu, Jan 5, 2017 at 8:19 AM, Richard Biener wrote: > > The following fixes a LTO dwarf2out ICE when mixing C and C++ TUs. > is_cxx then claims we're C++ but we are not happy to see a C typedef > handled by > > gen_typedef_die (tree decl, dw_die_ref context_die) > { > ... > if (is

Re: [PATCH] avoid infinite recursion in maybe_warn_alloc_args_overflow (pr 78775)

2017-01-05 Thread Jeff Law
On 01/05/2017 11:49 AM, Martin Sebor wrote: On 01/05/2017 11:03 AM, Jeff Law wrote: On 12/12/2016 06:36 PM, Martin Sebor wrote: The attached patch avoids infinite recursion when traversing phi nodes in maybe_warn_alloc_args_overflow by using a bitmap to keep track of those already visited and b

[PATCH, gimplefe] passes.c: split out pass-skipping logic into subroutines

2017-01-05 Thread David Malcolm
The GIMPLE frontend's pass-skipping logic in execute_one_pass is somewhat awkward. This patch splits it out into two subroutines to simplify things. No functional change intended (and this may make it easier to update the logic so that it can be shared with the RTL frontend). Successfully bootst

Re: [-fcompare-debug] var tracking options are not optimization options

2017-01-05 Thread Alexandre Oliva
On Jan 5, 2017, Jakub Jelinek wrote: > You've just changed the hash function and my mail was about the fact that > it is not enough. Sorry, it wasn't clear 'enough for what'. It's enough to fix the bug/symptom I had observed and intended to fix, but yes, there is another latent -fcompare-debug

Re: [bootstrap-O1] change value type to avoid sprintf buffer size warning

2017-01-05 Thread Alexandre Oliva
On Jan 5, 2017, Andreas Schwab wrote: > On Jan 05 2017, Alexandre Oliva wrote: >> On Jan 5, 2017, Andreas Schwab wrote: >> >>> On Jan 05 2017, Alexandre Oliva wrote: - sprintf (xname, "", ((unsigned)((uintptr_t)(t) & 0x))); + sprintf (xname, "", ((unsigned short)((ui

Re: [bootstrap-O3,fortran] silence warning in simplify_transformation_to_array

2017-01-05 Thread Alexandre Oliva
On Jan 5, 2017, Jeff Law wrote: > On 01/05/2017 05:15 AM, Richard Biener wrote: >> Reasonable -- I'll leave it for others to comment on that "standard >> practice" part (it'll be the first case of using this IIRC). > It's a fair amount of clutter. But I won't object. I'll take these as a tent

Re: [PATCH] avoid infinite recursion in maybe_warn_alloc_args_overflow (pr 78775)

2017-01-05 Thread Martin Sebor
So Richi asked for removal of the VR_ANTI_RANGE handling, which would imply removal of operand_signed_p. What are the implications if we do that? I just got back to this yesterday. The implications of the removal of the anti-range handling are a number of false negatives in the test suite: I

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

2017-01-05 Thread Segher Boessenkool
On Thu, Jan 05, 2017 at 01:21:40PM -0600, Bill Seurer wrote: > (backport from trunk to gcc 6) > > This patch adds the -fasynchronous-unwind-tables option to compilations when > the -fsanitize=address option is seen but not if any > -fasynchronous-unwind-tables options were already specified. > -fa