[PATCH] Add x | 0 -> x pattern

2016-08-19 Thread Richard Biener
For some reason it was missing. Bootstrapped / tested on x86_64-unknown-linux-gnu, applied. Richard. 2016-08-19 Richard Biener * match.pd (x | 0 -> x): Add. Index: gcc/match.pd === --- gcc/match.pd(revision 239

[PATCH] Fix PR77290

2016-08-19 Thread Richard Biener
This fixes PR77290 - my previous patch to PRE to limit insertion for flag_tree_parallelize_loops != 0 was confused because flag_tree_parallelize_loops is the number of threads to parallelize for (thus == 1 is the default and to not parallelize). Fixed as obvious. Richard. 2016-08-19 Richard Bi

Re: [TREE-SSA-CCP] Issue warning when folding condition

2016-08-19 Thread Richard Biener
On Fri, 19 Aug 2016, Kugan Vivekanandarajah wrote: > On 19 August 2016 at 12:09, Kugan Vivekanandarajah > wrote: > > The testcase pr33738.C for warning fails with early-vrp patch. The > > reason is, with early-vrp ccp2 is folding the comparison that used to > > be folded in simplify_stmt_for_jump

Re: [RFC][PR61839]Convert CST BINOP COND_EXPR to COND_EXPR ? (CST BINOP 1) : (CST BINOP 0)

2016-08-19 Thread Kugan Vivekanandarajah
Ping? https://gcc.gnu.org/ml/gcc-patches/2016-08/msg00987.html Thanks, Kugan On 12 August 2016 at 13:19, kugan wrote: > Hi Richard, > > > On 11/08/16 20:04, Richard Biener wrote: >> >> On Thu, Aug 11, 2016 at 6:11 AM, kugan >> wrote: > > > [SNIP] > >> >> +two_valued_val_range_p (tree var, tree

Re: [Patch] Implement std::experimental::variant

2016-08-19 Thread Jonathan Wakely
On 18/08/16 13:32 -0700, Tim Shen wrote: Tested on x86_64-linux-gnu and checked in as r239590. This updates the status at https://gcc.gnu.org/onlinedocs/libstdc++/manual/status.html#status.iso.201z Committed to trunk. commit 6c46b6c04ac234b6443208e922bb3177344e90a8 Author: Jonathan Wakely D

Re: [PR72835] Incorrect arithmetic optimization involving bitfield arguments

2016-08-19 Thread Kugan Vivekanandarajah
Ping? https://gcc.gnu.org/ml/gcc-patches/2016-08/msg00872.html Thanks, Kugan On 11 August 2016 at 09:09, kugan wrote: > Hi, > > > On 10/08/16 20:28, Richard Biener wrote: >> >> On Wed, Aug 10, 2016 at 10:57 AM, Jakub Jelinek wrote: >>> >>> On Wed, Aug 10, 2016 at 08:51:32AM +1000, kugan wrote:

[libcpp] append "evaluates to 0" for Wundef diagnostic

2016-08-19 Thread Prathamesh Kulkarni
Hi David, This trivial patch appends "evaluates to 0", in Wundef diagnostic, similar to clang, which prints the following diagnostic for undefined macro: undef.c:1:5: warning: 'FOO' is not defined, evaluates to 0 [-Wundef] #if FOO ^ Bootstrapped+tested on x86_64-unknown-linux-gnu. OK to commit

Re: [PATCH] Add a TARGET_GEN_MEMSET_VALUE hook

2016-08-19 Thread Richard Biener
On Thu, Aug 18, 2016 at 5:16 PM, H.J. Lu wrote: > On Thu, Aug 18, 2016 at 1:18 AM, Richard Biener > wrote: >> On Wed, Aug 17, 2016 at 10:11 PM, H.J. Lu wrote: >>> builtin_memset_gen_str returns a register used for memset, which only >>> supports integer registers. But a target may use vector re

Re: Fwd: [PATCH] genmultilib: improve error reporting for MULTILIB_REUSE

2016-08-19 Thread Thomas Preudhomme
On 18/08/16 17:39, Jeff Law wrote: On 08/10/2016 09:51 AM, Thomas Preudhomme wrote: *** gcc/ChangeLog *** 2016-08-01 Thomas Preud'homme * doc/fragments.texi (MULTILIB_REUSE): Mention that only options in MULTILIB_OPTIONS should be used. Small wording fixes. * ge

Re: [PATCH] Restrict jump threading statement simplifier to scalar types (PR71077)

2016-08-19 Thread Richard Biener
On Fri, Aug 19, 2016 at 1:06 AM, Patrick Palka wrote: > On Thu, 18 Aug 2016, Richard Biener wrote: > >> On August 18, 2016 8:25:18 PM GMT+02:00, Patrick Palka >> wrote: >> >In comment #5 Yuri reports that r235653 introduces a runtime failure >> >for >> >176.gcc which I guess is caused by the com

Re: [RFC][PR61839]Convert CST BINOP COND_EXPR to COND_EXPR ? (CST BINOP 1) : (CST BINOP 0)

2016-08-19 Thread Richard Biener
On Fri, Aug 19, 2016 at 10:17 AM, Kugan Vivekanandarajah wrote: > Ping? > > https://gcc.gnu.org/ml/gcc-patches/2016-08/msg00987.html Sorry for the delay. + /* ~[TYPE_MIN + 1, TYPE_MAX - 1] */ + if (vr->type == VR_ANTI_RANGE && INTEGRAL_TYPE_P (TREE_TYPE (var)) + && wi::sub (vr->min,

[PATCH] Avoid return in x86 intrins returning void

2016-08-19 Thread Jakub Jelinek
On Fri, Aug 19, 2016 at 03:21:03AM -0500, Segher Boessenkool wrote: > On Fri, Aug 19, 2016 at 08:45:49AM +0200, Jakub Jelinek wrote: > > On Fri, Aug 19, 2016 at 01:50:52PM +0800, lhmouse wrote: > > > Given the `_fxsave()` function returning `void`, it is invalid C but > > > valid C++: > > > > It

Re: [PATCH] Avoid return in x86 intrins returning void

2016-08-19 Thread Uros Bizjak
On Fri, Aug 19, 2016 at 11:41 AM, Jakub Jelinek wrote: > On Fri, Aug 19, 2016 at 03:21:03AM -0500, Segher Boessenkool wrote: >> On Fri, Aug 19, 2016 at 08:45:49AM +0200, Jakub Jelinek wrote: >> > On Fri, Aug 19, 2016 at 01:50:52PM +0800, lhmouse wrote: >> > > Given the `_fxsave()` function returni

Re: [PR tree-optimization/71691] Fix unswitching in presence of maybe-undefined SSA_NAMEs

2016-08-19 Thread Richard Biener
On Thu, Aug 18, 2016 at 7:29 PM, Jeff Law wrote: > > So to recap, the problem with this BZ is we have a maybe-undefined SSA_NAME > in the IL. That maybe-undefined name is used as a condition inside a loop > and we unswitch that condition. > > tree-ssa-loop-unswitch.c already tries to avoid doing

[PATCH] Uglify inline argument and local var names in x86 intrinsics

2016-08-19 Thread Jakub Jelinek
On Fri, Aug 19, 2016 at 11:48:16AM +0200, Uros Bizjak wrote: > > * config/i386/pkuintrin.h (_wrpkru): Likewise. Add space after > > function name. > > (_rdpkru_u32): Add space after function name. > > OK as obvious patch. Thanks. When changing this part, I've noticed the

Re: Implement C _FloatN, _FloatNx types [version 6]

2016-08-19 Thread Joseph Myers
On Fri, 19 Aug 2016, Richard Biener wrote: > Ok if libcpp maintainers do not object. I consider the libcpp changes something I can self-approve - but, any comments? > Can you quickly verify if LTO works with the new types? I don't see anything > that would prevent it but having new global tree

Re: [PATCH] Uglify inline argument and local var names in x86 intrinsics

2016-08-19 Thread Uros Bizjak
On Fri, Aug 19, 2016 at 12:56 PM, Jakub Jelinek wrote: > On Fri, Aug 19, 2016 at 11:48:16AM +0200, Uros Bizjak wrote: >> > * config/i386/pkuintrin.h (_wrpkru): Likewise. Add space after >> > function name. >> > (_rdpkru_u32): Add space after function name. >> >> OK as obvi

Re: Implement C _FloatN, _FloatNx types [version 6]

2016-08-19 Thread Richard Biener
On Fri, Aug 19, 2016 at 1:05 PM, Joseph Myers wrote: > On Fri, 19 Aug 2016, Richard Biener wrote: > >> Ok if libcpp maintainers do not object. > > I consider the libcpp changes something I can self-approve - but, any > comments? No comments on that part. >> Can you quickly verify if LTO works wi

Re: Implement -Wimplicit-fallthrough (take 3)

2016-08-19 Thread Marek Polacek
On Thu, Aug 18, 2016 at 07:31:12PM +0100, Manuel López-Ibáñez wrote: > Does this warning make sense if !(lang_GNU_C() || lang_GNU_CXX()) ? I don't think so, it's meant for C/C++ only. I added a better check. Thanks, Marek

Re: [RFC][IPA-VRP] Early VRP Implementation

2016-08-19 Thread Richard Biener
On Tue, Aug 16, 2016 at 9:45 AM, kugan wrote: > Hi Richard, > > On 12/08/16 20:43, Richard Biener wrote: >> >> On Wed, Aug 3, 2016 at 3:17 AM, kugan >> wrote: > > > [SNIP] > >> >> diff --git a/gcc/common.opt b/gcc/common.opt >> index 8a292ed..7028cd4 100644 >> --- a/gcc/common.opt >> +++ b/gcc/co

[ARM][PR target/77281] Fix an invalid check for vectors of, the same floating-point constants.

2016-08-19 Thread Matthew Wahab
Hello, Test gcc.c-torture/execute/ieee/pr72824-2.c fails for arm targets because the code generated to move a vector of signed and unsigned zeros treats it as a vector of unsigned zeros. That is, an assignment x = { 0.f, -0.f, 0.f, -0.f } is treated as the assignment x = { 0.f, 0.f, 0.f, 0.f }.

Re: [PATCH] Restrict jump threading statement simplifier to scalar types (PR71077)

2016-08-19 Thread Yuri Rumyantsev
Hi, Here is a simple test-case to reproduce 176.gcc failure (I run it on Haswell machine). Using 20160819 compiler build we get: gcc -O3 -m32 -mavx2 test.c -o test.ref.exe /users/ysrumyan/isse_6866$ ./test.ref.exe Aborted (core dumped) If I apply patch proposed by Patrick test runs properly

Re: [Patch] Disable text mode translation in ada for Cygwin

2016-08-19 Thread JonY
On 5/26/2016 20:36, JonY wrote: > Text mode translation should not be done for Cygwin, especially since it does > not > support unicode setmode calls. This also fixes ada builds for Cygwin. > > OK for trunk? Ping? signature.asc Description: OpenPGP digital signature

Re: Implement -Wimplicit-fallthrough (take 3)

2016-08-19 Thread Marek Polacek
On Thu, Aug 18, 2016 at 04:01:42PM +0200, Jakub Jelinek wrote: > On Thu, Aug 18, 2016 at 03:50:07PM +0200, Marek Polacek wrote: > > +case GIMPLE_BIND: > > + { > > + gbind *bind = as_a (stmt); > > + return last_stmt_in_scope ( > > +gimple_seq_last_stmt (gimple_bind_body (bi

Re: Implement -Wimplicit-fallthrough (take 3)

2016-08-19 Thread Marek Polacek
On Fri, Aug 19, 2016 at 01:21:14PM +0200, Marek Polacek wrote: > On Thu, Aug 18, 2016 at 07:31:12PM +0100, Manuel López-Ibáñez wrote: > > Does this warning make sense if !(lang_GNU_C() || lang_GNU_CXX()) ? > > I don't think so, it's meant for C/C++ only. I added a better check. Well, maybe the w

Re: Implement -Wimplicit-fallthrough (take 3)

2016-08-19 Thread Jakub Jelinek
On Fri, Aug 19, 2016 at 02:01:29PM +0200, Marek Polacek wrote: > On Fri, Aug 19, 2016 at 01:21:14PM +0200, Marek Polacek wrote: > > On Thu, Aug 18, 2016 at 07:31:12PM +0100, Manuel López-Ibáñez wrote: > > > Does this warning make sense if !(lang_GNU_C() || lang_GNU_CXX()) ? > > > > I don't think s

Re: Implement -Wimplicit-fallthrough (take 3)

2016-08-19 Thread Marek Polacek
On Thu, Aug 18, 2016 at 01:07:26PM -0400, David Malcolm wrote: > On Thu, 2016-08-18 at 15:50 +0200, Marek Polacek wrote: > > Now that all various switch fallthrough bugfixes and adjustments were > > committed, and this patch has shrunk considerably, I'm presenting the > > latest > > version. The c

Re: [Patch] Disable text mode translation in ada for Cygwin

2016-08-19 Thread Arnaud Charlet
> > Text mode translation should not be done for Cygwin, especially since it > > does not > > support unicode setmode calls. This also fixes ada builds for Cygwin. > > > > OK for trunk? > > Ping? Can you send the link to your original submission for easy retrieval? Arno

Re: Implement -Wimplicit-fallthrough (take 3)

2016-08-19 Thread Arnaud Charlet
> > > > Does this warning make sense if !(lang_GNU_C() || lang_GNU_CXX()) ? > > > > > > I don't think so, it's meant for C/C++ only. I added a better check. > > > > Well, maybe the warning could also work for ObjC and ObjC++, but since I > > haven't included any testcases for these languages so

Re: [libcpp] append "evaluates to 0" for Wundef diagnostic

2016-08-19 Thread David Malcolm
On Fri, 2016-08-19 at 14:15 +0530, Prathamesh Kulkarni wrote: > Hi David, > This trivial patch appends "evaluates to 0", in Wundef diagnostic, > similar to clang, which prints the following diagnostic for undefined > macro: > undef.c:1:5: warning: 'FOO' is not defined, evaluates to 0 [-Wundef] > #i

Re: [libcpp] append "evaluates to 0" for Wundef diagnostic

2016-08-19 Thread Prathamesh Kulkarni
On 19 August 2016 at 18:29, David Malcolm wrote: > On Fri, 2016-08-19 at 14:15 +0530, Prathamesh Kulkarni wrote: >> Hi David, >> This trivial patch appends "evaluates to 0", in Wundef diagnostic, >> similar to clang, which prints the following diagnostic for undefined >> macro: >> undef.c:1:5: war

Re: [ARM][PR target/77281] Fix an invalid check for vectors of, the same floating-point constants.

2016-08-19 Thread Richard Earnshaw (lists)
On 19/08/16 12:48, Matthew Wahab wrote: > Hello, > > Test gcc.c-torture/execute/ieee/pr72824-2.c fails for arm targets > because the code generated to move a vector of signed and unsigned zeros > treats it as a vector of unsigned zeros. > > That is, an assignment x = { 0.f, -0.f, 0.f, -0.f } is t

Re: [ARM][PR target/77281] Fix an invalid check for vectors of, the same floating-point constants.

2016-08-19 Thread Matthew Wahab
On 19/08/16 14:30, Richard Earnshaw (lists) wrote: On 19/08/16 12:48, Matthew Wahab wrote: 2016-08-19 Matthew Wahab PR target/77281 * config/arm/arm.c (neon_valid_immediate): Delete declaration. Use const_vec_duplicate to check for duplicated elements. Ok for trunk? OK. Th

Re: Repeated use of the OpenACC routine directive

2016-08-19 Thread Cesar Philippidis
On 08/16/2016 06:05 PM, Thomas Schwinge wrote: > On Mon, 01 Aug 2016 17:51:24 +0200, I wrote: >> > We found that it's not correct that we currently unconditionally diagnose >> > an error for repeated use of the OpenACC routine directive on one >> > function/declaration. (For reference, it is also

Re: [PATCH] Add a TARGET_GEN_MEMSET_VALUE hook

2016-08-19 Thread H.J. Lu
On Fri, Aug 19, 2016 at 2:21 AM, Richard Biener wrote: > On Thu, Aug 18, 2016 at 5:16 PM, H.J. Lu wrote: >> On Thu, Aug 18, 2016 at 1:18 AM, Richard Biener >> wrote: >>> On Wed, Aug 17, 2016 at 10:11 PM, H.J. Lu wrote: builtin_memset_gen_str returns a register used for memset, which only >

Re: [ARM][PR target/77281] Fix an invalid check for vectors of, the same floating-point constants.

2016-08-19 Thread Richard Earnshaw (lists)
On 19/08/16 15:06, Matthew Wahab wrote: > On 19/08/16 14:30, Richard Earnshaw (lists) wrote: >> On 19/08/16 12:48, Matthew Wahab wrote: >>> 2016-08-19 Matthew Wahab >>> >>> PR target/77281 >>> * config/arm/arm.c (neon_valid_immediate): Delete declaration. >>> Use const_vec_duplica

Re: Implement C _FloatN, _FloatNx types [version 6]

2016-08-19 Thread Joseph Myers
On Fri, 19 Aug 2016, Richard Biener wrote: > >> Can you quickly verify if LTO works with the new types? I don't see > >> anything > >> that would prevent it but having new global trees and backends > >> initializing them > >> might come up with surprises (see tree-streamer.c:preload_common_node

Re: PING: new pass to warn on questionable uses of alloca() and VLAs

2016-08-19 Thread Aldy Hernandez
On 08/19/2016 05:35 AM, Aldy Hernandez wrote: On 08/04/2016 12:37 PM, Jeff Law wrote: On 07/27/2016 03:01 AM, Aldy Hernandez wrote: Just in case this got lost in noise, since I know there was a lot of back and forth between Martin Sebor and I. This is the last iteration. Tested on x86-64 Linu

Re: PING: new pass to warn on questionable uses of alloca() and VLAs

2016-08-19 Thread Aldy Hernandez
On 08/04/2016 12:37 PM, Jeff Law wrote: [ughhh, one more time but with actual content] On 07/27/2016 03:01 AM, Aldy Hernandez wrote: Just in case this got lost in noise, since I know there was a lot of back and forth between Martin Sebor and I. This is the last iteration. Tested on x86-64 Li

Re: Implement C _FloatN, _FloatNx types [version 6]

2016-08-19 Thread Szabolcs Nagy
On 17/08/16 21:17, Joseph Myers wrote: > Although there is HFmode support for ARM and AArch64, use of that for > _Float16 is not enabled. Supporting _Float16 would require additional > work on the excess precision aspects of TS 18661-3: there are new > values of FLT_EVAL_METHOD, which are not curr

Re: [PATCH] - improve sprintf buffer overflow detection (middle-end/49905)

2016-08-19 Thread Martin Sebor
My biggest concern with this iteration is the tight integration between the optimization and warning. We generally avoid that kind of tight integration such that enabling the warning does not affect the optimization and vice-versa. So ISTM you have to do the analysis if the optimization or warni

Re: [PATCH] - improve sprintf buffer overflow detection (middle-end/49905)

2016-08-19 Thread Jeff Law
On 08/19/2016 09:29 AM, Martin Sebor wrote: My biggest concern with this iteration is the tight integration between the optimization and warning. We generally avoid that kind of tight integration such that enabling the warning does not affect the optimization and vice-versa. So ISTM you have to

[committed] Fix OpenMP ICE (PR fortran/69281)

2016-08-19 Thread Jakub Jelinek
Hi! On the following testcase we ICE because the BLOCK that is initially in the BIND_EXPR on the OMP_PARALLEL/TASK/TARGET body contains a VAR_DECL for -fstack-arrays added artificial VLA. Later on for move_sese_* reasons this is the BLOCK used for the moving, which means that a copy of the VAR_DE

[committed] Add testcase (PR fortran/72744)

2016-08-19 Thread Jakub Jelinek
Hi! This got also fixed by PR69281 fix I've just committed, I've added the testcase too. 2016-08-19 Jakub Jelinek PR fortran/72744 * gfortran.dg/gomp/pr72744.f90: New test. --- gcc/testsuite/gfortran.dg/gomp/pr72744.f90.jj 2016-08-19 14:49:18.590105777 +0200 +++ gcc/te

[PATCH] Fix ambiguities in C++17 mode

2016-08-19 Thread Jonathan Wakely
This fixes some more test FAILs when using -std=gnu++17, due to names in std::experimental now also being in std. * include/experimental/tuple (apply): Qualify call to __apply_impl. * include/std/tuple (apply): Likewise. * testsuite/experimental/system_error/value.cc: Fix

[committed] Fix handling of ASSOCIATE in OpenMP resolving (PR fortran/71014)

2016-08-19 Thread Jakub Jelinek
Hi! The saving+clearing and restoring of OpenMP state during gfc_resolve is meant for when during resolving of one subroutine/function etc. we resolve another one, but apparently ASSOCIATE blocks (and BLOCK, though that isn't supported yet - OpenMP 4.5 only supports Fortran 2003, not 2008) add ano

[PATCH] Define std::not_fn for C++17

2016-08-19 Thread Jonathan Wakely
This updates std::experimental::not_fn to match the C++17 semantics (which are a superset of the Library Fundamentals v2 semantics) and then copies it to std::not_fn as well. * doc/xml/manual/status_cxx2017.xml: Update status of not_fn. * doc/html/*: Regenerate. * include/

Re: Implement C _FloatN, _FloatNx types [version 6]

2016-08-19 Thread David Malcolm
On Fri, 2016-08-19 at 14:40 +, Joseph Myers wrote: > On Fri, 19 Aug 2016, Richard Biener wrote: > > > > > Can you quickly verify if LTO works with the new types? I > > > > don't see anything > > > > that would prevent it but having new global trees and backends > > > > initializing them > > >

Re: [PATCH] Define std::not_fn for C++17

2016-08-19 Thread Jonathan Wakely
On 19/08/16 16:46 +0100, Jonathan Wakely wrote: This updates std::experimental::not_fn to match the C++17 semantics (which are a superset of the Library Fundamentals v2 semantics) and then copies it to std::not_fn as well. * doc/xml/manual/status_cxx2017.xml: Update status of not_fn. O

[PATCH] Define std::atomic::is_always_lock_free for C++17

2016-08-19 Thread Jonathan Wakely
Another new C++17 feature. * include/std/atomic (atomic::is_always_lock_free): Define. * testsuite/29_atomics/atomic/60695.cc: Adjust dg-error lineno. * testsuite/29_atomics/atomic/is_always_lock_free.cc: New. * testsuite/29_atomics/atomic_integral/is_always_lock_f

Re: Implement C _FloatN, _FloatNx types [version 6]

2016-08-19 Thread Joseph Myers
On Fri, 19 Aug 2016, Szabolcs Nagy wrote: > On 17/08/16 21:17, Joseph Myers wrote: > > Although there is HFmode support for ARM and AArch64, use of that for > > _Float16 is not enabled. Supporting _Float16 would require additional > > work on the excess precision aspects of TS 18661-3: there are

Re: [PATCH] Simplify dg-options for tests using pthreads

2016-08-19 Thread Jonathan Wakely
On 18/08/16 09:06 +0100, Jonathan Wakely wrote: It's been several years now that Solaris supported -pthread as well as -pthreads, so there's no need to have separate dg-options directives for Solaris. This patch removes all the lines: // { dg-options "... -pthreads" { target *-*-solaris* } } A

Re: Implement C _FloatN, _FloatNx types [version 6]

2016-08-19 Thread Joseph Myers
On Fri, 19 Aug 2016, David Malcolm wrote: > Please could you take this opportunity to add some examples to the > header comment for that function, both for the common cases e.g. "f", > and for the new suffixes; nothing in the patch body appears to document > them. (ideally, referencing the standa

Re: Implement C _FloatN, _FloatNx types [version 6]

2016-08-19 Thread David Malcolm
On Fri, 2016-08-19 at 16:51 +, Joseph Myers wrote: > On Fri, 19 Aug 2016, David Malcolm wrote: > > > Please could you take this opportunity to add some examples to the > > header comment for that function, both for the common cases e.g. > > "f", > > and for the new suffixes; nothing in the pat

[PATCH, i386]: Fix PR77270, Flag -mprftchw is shared with 3dnow for -march=k8

2016-08-19 Thread Uros Bizjak
Hello! There is a problem with -march=native, when -m3dnow and -mno-prfchw are added to the compilation flags. The prefetchw is enabled by -m3dnow, but TARGET_PRFCHW is never enabled, since explicit -mno-prfchw is passed by the driver. Attached patch fixes this by divorcing TARGET_3DNOW from TARG

[PR59319] output friends in debug info

2016-08-19 Thread Alexandre Oliva
This is not a finished patch. There are two issues I'd like feedback on before a final submission. See them below. First, a general description. Handling non-template friends is kind of easy, but it required a bit of infrastructure in dwarf2out to avoid (i) forcing debug info for unused types o

[PATCH] newlib-stdint.h: Remove 32 bit longs

2016-08-19 Thread Andy Ross
We ran into this issue in the Zephyr project with our toolchain (gcc built with --enable-newlib). Basically GCC appears to be honoring a legacy requirement to give newlib a "long" instead of "int" for __INT32_TYPE__, which then leaks out through the current newlib headers as a long-valued int32_t,

Add minimal _FloatN, _FloatNx built-in functions [version 2]

2016-08-19 Thread Joseph Myers
[Version 2 of this patch updates the testcases to use dg-add-options as in the final version of the _FloatN patch that went in; there are no changes of substance outside the testsuite. Version 1 was .] This patch adds a minimal set of

[committed] Reimplement removal fix-it hints in terms of replace

2016-08-19 Thread David Malcolm
This patch eliminates class fixit_remove, reimplementing rich_location::add_fixit_remove in terms of replacement with the empty string. Deleting the removal subclass simplifies fixit-handling code, as we only have two concrete fixit_hint subclasses to deal with, rather than three. The patch also

[PATCH], Patch #5, Improve vector int initialization on PowerPC

2016-08-19 Thread Michael Meissner
This is a rewrite of patch #3 to improve vector int initialization on the PowerPC 64-bit systems wtih direct move (power8, and forthcoming power9). This patch adds full support for doing vector int initialization in the GPR and vector registers, rather than creating a stack temporary, doing 4 stor

[PATCH] tree-optimization/71831 - __builtin_object_size poor results with no optimization

2016-08-19 Thread Martin Sebor
As requested in the review of the following patch https://gcc.gnu.org/ml/gcc-patches/2016-08/msg01363.html attached is the small enhancement to compute_builtin_object_size to make the function usable even without optimization without the full overhead of the tree-object-size pass. The enhance

Re: [Patch] Disable text mode translation in ada for Cygwin

2016-08-19 Thread JonY
On 8/19/2016 20:49, Arnaud Charlet wrote: >>> Text mode translation should not be done for Cygwin, especially since it >>> does not >>> support unicode setmode calls. This also fixes ada builds for Cygwin. >>> >>> OK for trunk? >> >> Ping? > > Can you send the link to your original submission for

Re: [PATCH] Restrict jump threading statement simplifier to scalar types (PR71077)

2016-08-19 Thread Patrick Palka
On Fri, 19 Aug 2016, Yuri Rumyantsev wrote: > Hi, > > Here is a simple test-case to reproduce 176.gcc failure (I run it on > Haswell machine). > Using 20160819 compiler build we get: > gcc -O3 -m32 -mavx2 test.c -o test.ref.exe > /users/ysrumyan/isse_6866$ ./test.ref.exe &

[PATCH] Improve readability of debug_tree() dumps for SSA_NAME and VECTOR_CST

2016-08-19 Thread Patrick Palka
* For SSA_NAME: Print the ssa name's def stmt on its own line. Before: unit size align 32 symtab 0 alias set -1 canonical type 0x7688a888 precision 32 min max context pointer_to_this > unsigned V8SI size unit size ali

[PATCH] Handle VECTOR_CST in integer_nonzerop()

2016-08-19 Thread Patrick Palka
integer_nonzerop() currently unconditionally returns false for a VECTOR_CST argument. This is confusing because one would expect that integer_onep(x) => integer_nonzerop(x) for all x but that is currently not the case. For a VECTOR_CST of all ones i.e. {1,1,1,1}, integer_onep() returns true but i

Re: [PATCH] newlib-stdint.h: Remove 32 bit longs

2016-08-19 Thread Andrew Pinski
On Fri, Aug 19, 2016 at 12:16 PM, Andy Ross wrote: > We ran into this issue in the Zephyr project with our toolchain (gcc > built with --enable-newlib). Basically GCC appears to be honoring a > legacy requirement to give newlib a "long" instead of "int" for > __INT32_TYPE__, which then leaks out

Re: [PATCH] Handle VECTOR_CST in integer_nonzerop()

2016-08-19 Thread Patrick Palka
On Fri, Aug 19, 2016 at 7:30 PM, Patrick Palka wrote: > integer_nonzerop() currently unconditionally returns false for a > VECTOR_CST argument. This is confusing because one would expect that > integer_onep(x) => integer_nonzerop(x) for all x but that is currently > not the case. For a VECTOR_CS

[PATCH], Patch #6, Improve vector short/char splat initialization on PowerPC

2016-08-19 Thread Michael Meissner
This patch is a follow up to patch #5. It adds the support to use the Altivec VSPLTB/VSPLTH instructions if you are creating a vector char or vector short where each element is the same (but not constant) on 64-bit systems with direct move. The patch has been part of the larger set of patches for

[PATCH] selftest.h: add ASSERT_STR_CONTAINS

2016-08-19 Thread David Malcolm
More enabling work for some new selftests I'm working on. Successfully bootstrapped®rtested on x86_64-pc-linux-gnu. OK for trunk? gcc/ChangeLog: * selftest.c (selftest::assert_str_contains): New function. (selftest::test_assertions): Verify ASSERT_STR_CONTAINS. * selftest

Re: [PATCH] Restrict jump threading statement simplifier to scalar types (PR71077)

2016-08-19 Thread David Malcolm
On Fri, 2016-08-19 at 19:25 -0400, Patrick Palka wrote: > On Fri, 19 Aug 2016, Yuri Rumyantsev wrote: > > > Hi, > > > > Here is a simple test-case to reproduce 176.gcc failure (I run it > > on > > Haswell machine). > > Using 20160819 compiler build

Re: [PATCH] Restrict jump threading statement simplifier to scalar types (PR71077)

2016-08-19 Thread Patrick Palka
On Fri, 19 Aug 2016, David Malcolm wrote: > On Fri, 2016-08-19 at 19:25 -0400, Patrick Palka wrote: > > On Fri, 19 Aug 2016, Yuri Rumyantsev wrote: > > > > > Hi, > > > > > > Here is a simple test-case to reproduce 176.gcc failure (I run it > > &

Re: [PATCH] Make clone materialization an IPA pass

2016-08-19 Thread Andrew Pinski
On Thu, Aug 18, 2016 at 1:14 AM, Richard Biener wrote: > > The following patch makes it possible to add statistic counters to > update-ssa. Clone materialization ends up updating SSA form from > a context with current_pass being NULL - wrapping materialize_all_clones > into a pass fixes this. > >

Re: [PATCH] newlib-stdint.h: Remove 32 bit longs

2016-08-19 Thread Joel Sherrill
RTEMS uses the PRI constants and we don't see warnings. Is there a specific test case which would demonstrate this is actually broken. The file newlib-stdint.h will impact more targets than Zephyr and I think they owe a demo case. On August 19, 2016 7:37:22 PM EDT, Andrew Pinski wrote: >On Fri

Re: [Patch, testsuite] Skip tests that expect 4 byte alignment for avr

2016-08-19 Thread Mike Stump
On Aug 11, 2016, at 12:40 AM, Senthil Kumar Selvaraj wrote: > > The below patch adds the AVR target to the list of targets that don't > have natural_alignment_32. It also skips ipa/propalign-*.c > tests (which expect 4 byte alignment), if both > natural_alignment_32 and natural_alignment_64

Re: protected alloca class for malloc fallback

2016-08-19 Thread Mike Stump
On Aug 10, 2016, at 10:03 AM, Oleg Endo wrote: > > Or just wait until people have agreed to switch to C++11 or C++14. I > don't think in practice anybody uses an C++11-incapable GCC to build a > newer GCC these days. I use the system gcc 4.4.7 on RHEL to build a newer cross compiler... I could

Re: [PATCH] - improve sprintf buffer overflow detection (middle-end/49905)

2016-08-19 Thread Trevor Saunders
> > > Patch #5 and beyond: Further optimization work. > > > > As one of the next steps I'd like to make this feature available > > to user-defined sprintf-like functions decorated with attribute > > format. To do that, I'm thinking of adding either a fourth > > (optional) argument to attribute fo

[PATCH] Fix sporadic failure of gcc.dg/cpp/pr66415-1.c

2016-08-19 Thread Bernd Edlinger
Hi, it turns out that in this test case the expected output depends on the COLUMNS setting of the terminal where the test suite is started. With less than 82 columns the multiline output is not as expected. The reason for that seems to be at diagnostic_set_caret_max_width where it is dependent