[PATCH] Fix for mklog

2014-11-06 Thread Marat Zakirov
Hi all, Current mklog in some cases do not checks whether function have real changes or not. I fixed it by removing $doubtfunc and adding protection against EOF. Example: diff --git a/gcc/cfg.c b/gcc/cfg.c index 6070d9e..cb3dfd9 100644 --- a/gcc/cfg.c +++ b/gcc/cfg.c @@ -555,10 +555,10 @@

Re: [PATCH, ifcvt] Allow CC mode if HAVE_cbranchcc4 (fix s390 build)

2014-11-06 Thread Richard Henderson
On 11/06/2014 08:44 AM, Zhenqiang Chen wrote: Hi, The patch add runtime check to fix s390 build fail (https://gcc.gnu.org/ml/gcc-patches/2014-11/msg00050.html). And there is additional code to workaround s390 cstorecc4 issue. Bootstrap and no make check regression on X86-64. Build

Re: [PATCH, PR63742][ARM] Fix arm *movhi_insn_arch4 pattern for big-endian

2014-11-06 Thread Yangfei (Felix)
The idea is simple: Use movw for certain const source operand instead of ldrh. And exclude the const values which cannot be handled by mov/mvn/movw. I am doing regression test for this patch. Assuming no issue pops up, OK for trunk? So, doesn't that makes the bug latent

RE: [Ping] [PATCH, 9/10] aarch64: generate conditional compare instructions

2014-11-06 Thread Zhenqiang Chen
-Original Message- From: Richard Henderson [mailto:r...@redhat.com] Sent: Wednesday, November 05, 2014 9:42 PM To: Zhenqiang Chen Cc: gcc-patches@gcc.gnu.org Subject: Re: [Ping] [PATCH, 9/10] aarch64: generate conditional compare instructions On 11/05/2014 10:05 AM, Zhenqiang

[PATCH][11/n] Merge from match-and-simplify, bit patterns from forwprop

2014-11-06 Thread Richard Biener
This merges patterns implementing the bitwise patterns from tree-ssa-forwprop.c. I've removed duplicate functionality from fold-const.c as I found them, some may be still lurking in the depths. This also fixes a bug in genmatch which made user-defined predicates matching anything, thus (match

Re: [PATCH 3/5] IPA ICF pass

2014-11-06 Thread Jan Hubicka
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63747 is likely caused by this patch. compare_gimple_switch does not check CASE_LOW and CASE_HIGH, resulting merging functions not identical. Interestingly in the first a few versions of this patch CASE_LOW/HIGH were checked. But last versions

[PATCH, i386, MPX] Add target filter for MPX tests

2014-11-06 Thread Ilya Enkovich
Hi, This patch adds target filter for recently added MPX tests. I put check function into a new file because I'm going to also add there some MPX runtime tests related functions and use in it another exp file. Since there is no change in compiler I just checked I get no fails for modified

Re: [PATCH] Fix for mklog

2014-11-06 Thread Yury Gribov
On 11/06/2014 11:00 AM, Marat Zakirov wrote: - if ($doubtfunc) { - $idx = $line_idx; + $idx = $line_idx; # Skip line info in context diffs. - while ($is_context_diff $diff_lines[$idx + 1] =~ /^[-\*]{3} [0-9]/) { - ++$idx; -

Re: [gomp4] Move libgomp plugins into subdirectory

2014-11-06 Thread Thomas Schwinge
Hi Julian! On Wed, 5 Nov 2014 17:57:10 +, Julian Brown jul...@codesourcery.com wrote: This patch moves plugin-nvptx.c and plugin-host.c (from oacc-host.c) into a new plugin subdirectory, as requested by Jakub, and to match more closely the layout of the Intel MIC pieces. This also moves

Re: [PATCH][11/n] Merge from match-and-simplify, bit patterns from forwprop

2014-11-06 Thread pinskia
On Nov 6, 2014, at 12:55 AM, Richard Biener rguent...@suse.de wrote: This merges patterns implementing the bitwise patterns from tree-ssa-forwprop.c. I've removed duplicate functionality from fold-const.c as I found them, some may be still lurking in the depths. This also fixes a

Re: [Ping] [PATCH, 9/10] aarch64: generate conditional compare instructions

2014-11-06 Thread Richard Henderson
+ /* Generate insn to match ccmp_and/ccmp_ior. */ + target = gen_rtx_REG (mode, CC_REGNUM); + emit_insn (gen_rtx_SET (VOIDmode, target, + gen_rtx_fmt_ee (COMPARE, VOIDmode, + bit_op, const0_rtx))); Invalid mode for the

Re: [AArch64] [BE] Fix vector load/stores to not use ld1/st1

2014-11-06 Thread Yangfei (Felix)
On 10 October 2014 16:19, Alan Hayward alan.hayw...@arm.com wrote: This patch is dependant on [AArch64] [BE] [1/2] Make large opaque integer modes endianness-safe.” It fixes up movoi/ci/xi for Big Endian, so that we end up with the lsb of a big-endian integer to be in the low byte of

Re: [PATCH] Fix for mklog

2014-11-06 Thread Yury Gribov
On 11/06/2014 12:07 PM, Yury Gribov wrote: On 11/06/2014 11:00 AM, Marat Zakirov wrote: -if ($doubtfunc) { -$idx = $line_idx; +$idx = $line_idx; # Skip line info in context diffs. -while ($is_context_diff $diff_lines[$idx + 1] =~ /^[-\*]{3} [0-9]/) { -

Re: [AArch64] [BE] Fix vector load/stores to not use ld1/st1

2014-11-06 Thread Alan Hayward
On 06/11/2014 09:09, Yangfei (Felix) felix.y...@huawei.com wrote: On 10 October 2014 16:19, Alan Hayward alan.hayw...@arm.com wrote: This patch is dependant on [AArch64] [BE] [1/2] Make large opaque integer modes endianness-safe.” It fixes up movoi/ci/xi for Big Endian, so that we end

Re: [PATCH, i386, MPX] Add target filter for MPX tests

2014-11-06 Thread Uros Bizjak
Hello! 2014-11-06 Ilya Enkovich ilya.enkov...@intel.com * lib/mpx-dg.exp: New. * gcc.target/i386/i386.exp: Load mpx-dg.exp. * gcc.target/i386/chkp-builtins-1.c: Require mpx target. * gcc.target/i386/chkp-builtins-2.c: Likewise. * gcc.target/i386/chkp-builtins-3.c: Likewise. *

Re: [AArch64] [BE] Fix vector load/stores to not use ld1/st1

2014-11-06 Thread Yangfei (Felix)
Hello, It seems that this patch breaks the compile of some testcases under big-endian. On example: testsuite/gcc.target/aarch64/advsimd-intrinsics/ vldX.c Any thing I missed? Please confirm. Thanks. $ aarch64_be-linux-gnu-gcc vldX.c vldX.c: In function 'exec_vldX':

Re: [gomp4] Move libgomp plugins into subdirectory

2014-11-06 Thread Julian Brown
On Thu, 6 Nov 2014 10:06:00 +0100 Thomas Schwinge tho...@codesourcery.com wrote: Hi Julian! On Wed, 5 Nov 2014 17:57:10 +, Julian Brown jul...@codesourcery.com wrote: This patch moves plugin-nvptx.c and plugin-host.c (from oacc-host.c) into a new plugin subdirectory, as requested by

Re: [PATCH] Limit removal of UBSAN_NULL checks

2014-11-06 Thread Marek Polacek
On Wed, Nov 05, 2014 at 11:08:27PM +0100, Jakub Jelinek wrote: I wonder if for the case where you don't remove, gimple_bb (g) == gimple_bb (stmt) and tree_int_cst_compare (cur_align, align) == 0 it wouldn't be worthwhile to v.pop (); so that the vector doesn't grow up unnecessarily too Good

Re: [gomp4] acc reductions with multiple variables

2014-11-06 Thread Thomas Schwinge
Hi! On Fri, 31 Oct 2014 16:35:27 -0700, Cesar Philippidis ce...@codesourcery.com wrote: This patch does the following: [...] gcc/ * omp-low.c (oacc_max_threads): New function. (lower_reduction_clauses): Use the GOACC thread builtin functions to determine the thread

[PATCH, testsuite, obvious] Do not produce optimized dump in devirt-4[45].C

2014-11-06 Thread Martin Jambor
Hi, g++.dg/ipa/devirt-44.C and g++.dg/ipa/devirt-45.C leave behind an optimized dump which they don't even use. Fixed thusly, tested by runing make -k check RUNTESTFLAGS=dg.exp=ipa/*.C, will commit shortly as obvious. Thanks, Martin 2014-11-06 Martin Jambor mjam...@suse.cz *

Re: [PATCH] Limit removal of UBSAN_NULL checks

2014-11-06 Thread Jakub Jelinek
On Thu, Nov 06, 2014 at 10:56:17AM +0100, Marek Polacek wrote: --- gcc/sanopt.c +++ gcc/sanopt.c @@ -130,7 +130,30 @@ sanopt_optimize_walker (basic_block bb, struct sanopt_ctx *ctx) /* At this point we shouldn't have any statements that

Re: [gomp4] Move libgomp plugins into subdirectory

2014-11-06 Thread Jakub Jelinek
On Thu, Nov 06, 2014 at 10:06:00AM +0100, Thomas Schwinge wrote: Hi Julian! On Wed, 5 Nov 2014 17:57:10 +, Julian Brown jul...@codesourcery.com wrote: This patch moves plugin-nvptx.c and plugin-host.c (from oacc-host.c) into a new plugin subdirectory, as requested by Jakub, and to

Re: [AArch64] [BE] Fix vector load/stores to not use ld1/st1

2014-11-06 Thread Christophe Lyon
On 6 November 2014 10:28, Alan Hayward alan.hayw...@arm.com wrote: On 06/11/2014 09:09, Yangfei (Felix) felix.y...@huawei.com wrote: On 10 October 2014 16:19, Alan Hayward alan.hayw...@arm.com wrote: This patch is dependant on [AArch64] [BE] [1/2] Make large opaque integer modes

[PATCH][AArch64] Add bounds checking to vqdm*_lane intrinsics via a qualifier that also flips endianness

2014-11-06 Thread Alan Lawrence
This generates out-of-range errors at compile- (rather than assemble-)time for the vqdm*_lane intrinsics, and also provides a single place to do bigendian lane-swapping for all those intrinsics (and others to follow in later patches). This allows us to remove many define_expands that just do a

[PATCHv5][PING^3] Vimrc config with GNU formatting

2014-11-06 Thread Yury Gribov
On 10/21/2014 07:24 PM, Yury Gribov wrote: On 10/13/2014 02:26 PM, Yury Gribov wrote: On 10/02/2014 09:14 PM, Yury Gribov wrote: On 09/17/2014 09:08 PM, Yury Gribov wrote: On 09/16/2014 08:38 PM, Yury Gribov wrote: Hi all, This is the third version of the patch. A list of changes since

Fix ICE with thunks taking argument passed by reference

2014-11-06 Thread Jan Hubicka
Hi, PR63573 is about ICE when expanding thunk call for function taking as a parameter structure passed by reference. This structure in fact contains only one integer and thus it is promoted to register by argument setup in function.c (as an optimization). This is an sensible optimization, but

Re: [PATCH, libfortran] PR 47007, 61847 Locale failures in libgfortran

2014-11-06 Thread Janne Blomqvist
On Wed, Nov 5, 2014 at 12:48 PM, Janne Blomqvist blomqvist.ja...@gmail.com wrote: Hi, the attached patch fixes a few locale related failures in libgfortran, in the case where the POSIX 2008 extended locale functionality and extensions strto{f,d,ld}_l are present. These failures typically

Re: [PATCH, testsuite, obvious] Do not produce optimized dump in devirt-4[45].C

2014-11-06 Thread Uros Bizjak
Hello! g++.dg/ipa/devirt-44.C and g++.dg/ipa/devirt-45.C leave behind an optimized dump which they don't even use. Fixed thusly, tested by runing make -k check RUNTESTFLAGS=dg.exp=ipa/*.C, will commit shortly as obvious. 2014-11-06 Martin Jambor mjam...@suse.cz *

Re: [PATCH] Limit removal of UBSAN_NULL checks

2014-11-06 Thread Marek Polacek
On Thu, Nov 06, 2014 at 11:10:37AM +0100, Jakub Jelinek wrote: Sorry for being slow on this, but in the current algorithm you are using the latest vector element from each bb only anyway, so the tree_int_cst_compare (cur_align, align) == 0 is unnecessary, even if the condition isn't true, and

Re: Fix ICE with thunks taking argument passed by reference

2014-11-06 Thread Richard Biener
On Thu, 6 Nov 2014, Jan Hubicka wrote: Hi, PR63573 is about ICE when expanding thunk call for function taking as a parameter structure passed by reference. This structure in fact contains only one integer and thus it is promoted to register by argument setup in function.c (as an

RE: [PATCH, C++] Fix PR63366: __complex not equivalent to __complex double in C++

2014-11-06 Thread Thomas Preud'homme
From: Jason Merrill [mailto:ja...@redhat.com] Sent: Wednesday, October 29, 2014 4:43 PM Since this is a GNU extension, I think we want to be compatible with the C front end, which has else if (specs-complex_p) { specs-typespec_word = cts_double;

Re: [libcc1, build] Enable libcc1 on Solaris

2014-11-06 Thread Rainer Orth
Hi Phil, The configure change is fine. Also the include. (From a libcc authorship point of view). I am not aware of the history of AF_UNIX over AF_LOCAL so I have no comment on that. Please await permission the glibc manual states AF_UNIX This is a synonym for AF_LOCAL. Although

Re: [libcc1, build] Enable libcc1 on Solaris

2014-11-06 Thread Phil Muldoon
On 06/11/14 11:33, Rainer Orth wrote: Hi Phil, The configure change is fine. Also the include. (From a libcc authorship point of view). I am not aware of the history of AF_UNIX over AF_LOCAL so I have no comment on that. Please await permission the glibc manual states AF_UNIX

[PATCH, Pointer Bounds Checker, Builtins instrumentation 1/5] Builtin codes and decls

2014-11-06 Thread Ilya Enkovich
Hi, This is the first patch in a series to enable builtin function calls instrumentation by Poitner Bounds Checker. Previously builtins instrumentation was disabled in checker because it allowed two function calls with the same function code have different set of arguments. Here I try

[Patchv3] Control SRA and IPA-SRA by a param rather than MOVE_RATIO

2014-11-06 Thread James Greenhalgh
On Fri, Oct 31, 2014 at 10:46:12AM +, Richard Biener wrote: On Wed, Oct 29, 2014 at 3:39 PM, James Greenhalgh wrote: I suppose I could port any target with a definition of MOVE_RATIO to override the default parameter value in their option overriding code, but that makes this a very

Re: [gofrontend-dev] [PATCH 4/4] Gccgo port to s390[x] -- part II

2014-11-06 Thread Dominik Vogt
On Tue, Nov 04, 2014 at 08:16:51PM -0800, Ian Taylor wrote: The way to do it is not by copying the test. If the test needs to be customized, add additional files that use // +build lines to pick which files is built. Move them into a directory, like method4.go or other tests that use

[PATCH, Pointer Bounds Checker, Builtins instrumentation 2/5] Instrument builtin calls

2014-11-06 Thread Ilya Enkovich
Hi, This patch enables instrumentation of chosen builtin calls. Thanks, Ilya -- 2014-11-06 Ilya Enkovich ilya.enkov...@intel.com * ipa-chkp.c (chkp_versioning): Clone builtin functions. (chkp_instrument_normal_builtin): New. (chkp_add_bounds_to_call_stmt): Support

Re: [PATCH][11/n] Merge from match-and-simplify, bit patterns from forwprop

2014-11-06 Thread Marc Glisse
On Thu, 6 Nov 2014, Richard Biener wrote: +/* Simplify (A B) OP0 (C B) to (A OP0 C) B. */ +/* (x | CST1) CST2 - (x CST2) | (CST1 CST2) */ As soon as there are 2+ operations in the result, this comment in fwprop_ssa_val becomes outdated, no? /* We continue matching along SSA

[PATCH, Pointer Bounds Checker, Builtins instrumentation 3/5] Expand instrumented builtin calls

2014-11-06 Thread Ilya Enkovich
Hi, This patch adds support of instrumented builtin calls in expand. Calls are mostly expanded as calls. But some of them reuse existing string function calls expand functions (memcpy expand was slightly refactored for that). This is the last enabling patch in this series. Remaining two

Re: [PATCH] Correctly check dg-require-effective-target in avx512 tests.

2014-11-06 Thread Ilya Tocar
On 05 Nov 17:17, Uros Bizjak wrote: On Wed, Nov 5, 2014 at 5:14 PM, Ilya Tocar tocarip.in...@gmail.com wrote: Hi, Currently we only check for dg-require-effective-target avx512vl in avx512vl tests. We should also check for avx512dq/avx512bw. Patch bwllow does this. Ok for trunk?

Re: [PING^3][PATCH] Warn about unclosed pragma omp declare target.

2014-11-06 Thread Ilya Tocar
Ping. On 30 Oct 18:31, Ilya Tocar wrote: Ping. On 20 Oct 19:26, Ilya Tocar wrote: Ping. On 02 Oct 17:38, Ilya Tocar wrote: Ping. On 15 Aug 16:26, Ilya Tocar wrote: Ping. On 29 Jul 18:45, Ilya Tocar wrote: Hi, As discussed here in

Re: [PATCH][11/n] Merge from match-and-simplify, bit patterns from forwprop

2014-11-06 Thread Marc Glisse
On Thu, 6 Nov 2014, Richard Biener wrote: +/* Try simple folding for X op !X, and X op X with the help + of the truth_valued_p and logical_inverted_value predicates. */ +(match truth_valued_p + @0 + (if (INTEGRAL_TYPE_P (type) TYPE_PRECISION (type) == 1))) +(for op (lt le eq ne ge gt

[PATCH, Pointer Bounds Checker, Builtins instrumentation 4/5] Use alternative instrumented string function calls

2014-11-06 Thread Ilya Enkovich
Hi, This patch adds instrumentation optimization to use string function with no checks and/or bounds copy. Thanks, Ilya -- gcc/ 2014-11-06 Ilya Enkovich ilya.enkov...@intel.com * tree-chkp-opt.c (chkp_get_nobnd_fndecl): New. (chkp_get_nochk_fndecl): New.

Re: [PATCH] PR36312

2014-11-06 Thread Anthony Brandon
It looks like -soname, and libgnat-5.0.so both end up in the infiles array. I'm not sure if that's supposed to happen or not. On Wed, Nov 5, 2014 at 9:57 PM, Eric Botcazou ebotca...@adacore.com wrote: 2014-10-25 Anthony Brandon anthony.bran...@gmail.com PR driver/36312 *

[PATCH, Pointer Bounds Checker, Builtins instrumentation 5/5] Support instrumented calls in strlen pass

2014-11-06 Thread Ilya Enkovich
Hi, This patch adds support of instrumented function calls into strlen pass. Whole series pass bootstrap and check on linux-x86_64. OK for trunk? Thanks, Ilya -- gcc/ 2014-11-06 Ilya Enkovich ilya.enkov...@intel.com * tree-ssa-strlen.c: include ipa-chkp.h.

Re: [PATCH 00/13] Go closures, libffi, and the static chain

2014-11-06 Thread Alan Modra
On Thu, Nov 06, 2014 at 07:59:16AM +0100, Richard Henderson wrote: I haven't done powerpc yet. If you'd like to help, I'd be delighted. I was going to say that it doesn't look too difficult, but then I noticed we have a problem. PowerPC uses r11 as the static chain, a register that is allowed

Re: [PATCH 4/n] OpenMP 4.0 offloading infrastructure: lto-wrapper

2014-11-06 Thread Ilya Verbin
On 16 Oct 13:22, Jakub Jelinek wrote: Can you please extract the configure{,.ac}, langhooks.c and varasm.c bits into a separate patch? That is preapproved for trunk right now, that isn't dependent on anything else. Done. The rest LGTM, but please run it through LTO review (Richard/Honza)

Re: [PARCH 1/2, x86, PR63534] Fix darwin bootstrap

2014-11-06 Thread Evgeny Stupachenko
Now I see that equiv reload could be special for PIC register. Let's apply more conservative patch. Darwin bootstrap passed with the patch applied on r216304 (along with already committed to trunk patches from PR63618 and PR63620). 2014-11-06 Evgeny Stupachenko evstu...@gmail.com PR

Re: [PATCH 00/13] Go closures, libffi, and the static chain

2014-11-06 Thread Richard Henderson
On 11/06/2014 01:48 PM, Alan Modra wrote: On Thu, Nov 06, 2014 at 07:59:16AM +0100, Richard Henderson wrote: I haven't done powerpc yet. If you'd like to help, I'd be delighted. I was going to say that it doesn't look too difficult, but then I noticed we have a problem. PowerPC uses r11 as

Re: Add uniform_inside_sphere_distribution

2014-11-06 Thread Ed Smith-Rowland
On 11/06/2014 02:23 AM, Marc Glisse wrote: On Wed, 5 Nov 2014, Ed Smith-Rowland wrote: On 11/05/2014 04:25 PM, Marc Glisse wrote: On Wed, 5 Nov 2014, Ed Smith-Rowland wrote: Like the uniform_on_sphere_distribution which is used inside, the 2-dimensional case uses rejection Could you point

Re: [PATCH 00/13] Go closures, libffi, and the static chain

2014-11-06 Thread Lynn A. Boger
Aren't there cases where the static chain register is needed? How does that work if it could be trashed on a plt call? On 11/06/2014 06:48 AM, Alan Modra wrote: On Thu, Nov 06, 2014 at 07:59:16AM +0100, Richard Henderson wrote: I haven't done powerpc yet. If you'd like to help, I'd be

Re: FW: [AArch64] [BE] [1/2] Make large opaque integer modes endianness-safe.

2014-11-06 Thread Christophe Lyon
On 10 October 2014 16:58, David Sherwood david.sherw...@arm.com wrote: Hi, I forgot to mention that this patch needs was tested in combination with another patch by Alan Hayward (coming soon) and observed the following: x86_64: No regressions. aarch64: No regressions. aarch64_be: Lots of

Re: [PATCH 00/13] Go closures, libffi, and the static chain

2014-11-06 Thread Richard Henderson
On 11/06/2014 02:10 PM, Lynn A. Boger wrote: Aren't there cases where the static chain register is needed? How does that work if it could be trashed on a plt call? No. At the moment the static chain is only used for nested functions, which are local to the translation unit, and are therefore

Re: [PATCH][11/n] Merge from match-and-simplify, bit patterns from forwprop

2014-11-06 Thread Richard Biener
On Thu, 6 Nov 2014, Marc Glisse wrote: On Thu, 6 Nov 2014, Richard Biener wrote: +/* Simplify (A B) OP0 (C B) to (A OP0 C) B. */ +/* (x | CST1) CST2 - (x CST2) | (CST1 CST2) */ As soon as there are 2+ operations in the result, this comment in fwprop_ssa_val becomes outdated,

Re: [PATCH][11/n] Merge from match-and-simplify, bit patterns from forwprop

2014-11-06 Thread Richard Biener
On Thu, 6 Nov 2014, Marc Glisse wrote: On Thu, 6 Nov 2014, Richard Biener wrote: +/* Try simple folding for X op !X, and X op X with the help + of the truth_valued_p and logical_inverted_value predicates. */ +(match truth_valued_p + @0 + (if (INTEGRAL_TYPE_P (type) TYPE_PRECISION

[patch] Fix ACATS c65003a

2014-11-06 Thread Eric Botcazou
Hi, the compiler started to segfault on this ACATS test very recently, probably when the large Pointer Bounds Checker patch went in, although the issue had been latent. For the attached reduced testcase, the backtrace is: Starting program: /home/eric/build/gcc/native/stage1-gcc/gnat1 -quiet

Re: [PATCH][11/n] Merge from match-and-simplify, bit patterns from forwprop

2014-11-06 Thread Marc Glisse
On Thu, 6 Nov 2014, Richard Biener wrote: On Thu, 6 Nov 2014, Marc Glisse wrote: On Thu, 6 Nov 2014, Richard Biener wrote: +/* Try simple folding for X op !X, and X op X with the help + of the truth_valued_p and logical_inverted_value predicates. */ +(match truth_valued_p + @0 + (if

Re: [Patchv3] Control SRA and IPA-SRA by a param rather than MOVE_RATIO

2014-11-06 Thread Richard Biener
On Thu, Nov 6, 2014 at 12:53 PM, James Greenhalgh james.greenha...@arm.com wrote: On Fri, Oct 31, 2014 at 10:46:12AM +, Richard Biener wrote: On Wed, Oct 29, 2014 at 3:39 PM, James Greenhalgh wrote: I suppose I could port any target with a definition of MOVE_RATIO to override the

Re: [patch] Fix ACATS c65003a

2014-11-06 Thread Richard Biener
On Thu, Nov 6, 2014 at 2:58 PM, Eric Botcazou ebotca...@adacore.com wrote: Hi, the compiler started to segfault on this ACATS test very recently, probably when the large Pointer Bounds Checker patch went in, although the issue had been latent. For the attached reduced testcase, the backtrace

Re: [PATCH] OpenACC for C++ front end

2014-11-06 Thread Thomas Schwinge
Hi! On Wed, 5 Nov 2014 21:41:02 +, Joseph Myers jos...@codesourcery.com wrote: I think the TODO: XXX FIX -2 and TODO XXX: FIX -1 comments need, at least, more explanation of what the issue is and where the constants come from, even if something is left until later to be fixed. Such

Re: [PATCH][11/n] Merge from match-and-simplify, bit patterns from forwprop

2014-11-06 Thread Richard Biener
On Thu, 6 Nov 2014, Marc Glisse wrote: On Thu, 6 Nov 2014, Richard Biener wrote: On Thu, 6 Nov 2014, Marc Glisse wrote: On Thu, 6 Nov 2014, Richard Biener wrote: +/* Try simple folding for X op !X, and X op X with the help + of the truth_valued_p and

[gimple-classes, committed 06/44] Yet more gcall *

2014-11-06 Thread David Malcolm
gcc/ChangeLog.gimple-classes: * tree-ssa-forwprop.c (simplify_builtin_call): Strengthen local stmt2 from gimple to gcall * via a checked cast. Replace is_gimple_call with a dyn_cast, introducing local call_stmt1, and using the latter in place of stmt1 for

[gimple-classes, committed 02/44] Make replace_call_with_call_and_fold work on a gcall *

2014-11-06 Thread David Malcolm
gcc/ChangeLog.gimple-classes: * gimple-fold.c (replace_call_with_call_and_fold): Strengthen param repl from gimple to gcall *. (gimple_fold_builtin_strcpy): Likewise for local repl. (gimple_fold_builtin_strncpy): Likewise. (gimple_fold_builtin_strcat):

[gimple-classes, committed 00/44] Yet more accessor typesafety

2014-11-06 Thread David Malcolm
I've pushed the following 44 patches to the git branch dmalcolm/gimple-classes. This is a work-in-progress towards making the rest of the gimple_assign_* accessors require a gassign * (or a const gassign *). Successfully bootstrappedregrtested the combination of the 44 patches upon the branch on

[gimple-classes, committed 03/44] gimple-low.c: Use gcall * in a few places

2014-11-06 Thread David Malcolm
gcc/ChangeLog.gimple-classes: * gimple-low.c (lower_builtin_setjmp): Strengthen local stmt from gimple to gcall *, via a checked cast. (lower_builtin_posix_memalign): Likewise for local call. Strengthen local cond from gimple to gcond *. Split local gimple

[gimple-classes, committed 07/44] Add casting variants of various gimple_assign_*_p functions

2014-11-06 Thread David Malcolm
Use them to provide various gimple_assign_ accessors with gassign * rather than plain gimple. gcc/ChangeLog.gimple-classes: * gimple.h (is_a_helper const gassign *::test): New. (gimple_assign_copy_p): Update return type from bool to gassign *, returning GS if the predicate

[gimple-classes, committed 01/44] Use gassign * rather than gimple in various places

2014-11-06 Thread David Malcolm
Use gassign * everywhere that a stmt is built from a gimple_build_assign_* call, to ease making the gimple_assign_ accessors typesafe (and to better document the code). gcc/ChangeLog.gimple-classes: * asan.c (build_shadow_mem_access): Strengthen local g from gimple to gassign *.

[gimple-classes, committed 12/44] gimple-fold.c: Use gassign

2014-11-06 Thread David Malcolm
gcc/ChangeLog.gimple-classes: * gimple-fold.c (fold_gimple_assign): Strengthen local stmt from gimple to gassign * via a checked cast. (gsi_replace_with_seq_vops): Add a checked cast within region guarded by gimple_assign_single_p. (get_maxval_strlen):

[gimple-classes, committed 08/44] tree-ssa-forwprop.c: Use gassign * in various places

2014-11-06 Thread David Malcolm
gcc/ChangeLog.gimple-classes: * tree-ssa-forwprop.c (get_prop_source_stmt): Strengthen return type and local def_stmt from gimple to gassign *, using a dyn_cast in place of an is_gimple_assign. (can_propagate_from): Strengthen param from gimple to gassign *.

[gimple-classes, committed 05/44] More gcall *

2014-11-06 Thread David Malcolm
gcc/ChangeLog.gimple-classes: * gimple.c (gimple_set_lhs): Add checked casts to gassign * and gcall * as appropriate. * tree-cfg.c (execute_fixup_cfg): Introduce local call_stmt via a dyn_cast and use it in place of stmt where appropriate * tree-cfgcleanup.c

[gimple-classes, committed 21/44] tree-eh.c: Use gassign

2014-11-06 Thread David Malcolm
gcc/ChangeLog.gimple-classes: * tree-eh.c (stmt_could_throw_1_p): Add checked casts. (sink_clobbers): Add checked cast. --- gcc/ChangeLog.gimple-classes | 5 + gcc/tree-eh.c| 8 +--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git

[gimple-classes, committed 10/44] gimplify-me.c: Use gassign

2014-11-06 Thread David Malcolm
gcc/ChangeLog.gimple-classes: * gimplify-me.c (gimple_regimplify_operands): Replace a couple of is_gimple_assign calls with dyn_cast, introducing locals assign_stmt and using them in place of stmt for typesafety. --- gcc/ChangeLog.gimple-classes | 6 ++

[gimple-classes, committed 04/44] Use gcall * in more places

2014-11-06 Thread David Malcolm
gcc/ChangeLog.gimple-classes: * config/i386/i386.c (add_condition_to_bb): Strengthen local call_cond_stmt from gimple to gcall *. * gimple-fold.c (gimple_build): Likewise for local stmt. * gimple-match-head.c (maybe_push_res_to_seq): Likewise for local

[gimple-classes, committed 25/44] tree-ssa-coalesce.c: Use gassign

2014-11-06 Thread David Malcolm
gcc/ChangeLog.gimple-classes: * tree-ssa-coalesce.c (build_ssa_conflict_graph): Replace is_gimple_assign with dyn_cast, introducing local assign_stmt, using it in place of stmt for typesafety. (create_outofssa_var_map): Within case GIMPLE_ASSIGN introduce

[gimple-classes, committed 24/44] tree-ssa-ccp.c: Use gassign

2014-11-06 Thread David Malcolm
gcc/ChangeLog.gimple-classes: * tree-ssa-ccp.c (get_default_value): Replace is_gimple_assign with a dyn_cast, introducing local assign_stmt, using it in place of stmt for typesafety. (likely_value): Add a checked cast. (evaluate_stmt): Replace checks against

[gimple-classes, committed 26/44] tree-ssa-copy.c: Use gassign

2014-11-06 Thread David Malcolm
gcc/ChangeLog.gimple-classes: * tree-ssa-copy.c (stmt_may_generate_copy): Replace check against GIMPLE_ASSIGN with a dyn_cast, introducing local gassign * assign_stmt, using it in place of stmt for typesafety. (copy_prop_visit_assignment): Strengthen param stmt from

[gimple-classes, committed 14/44] gimple-match-head.c: Use gassign

2014-11-06 Thread David Malcolm
gcc/ChangeLog.gimple-classes: * gimple-match-head.c (gimple_simplify): Within case GIMPLE_ASSIGN, introduce local assign_stmt via a checked cast and use it in place of stmt for typesafety. --- gcc/ChangeLog.gimple-classes | 6 ++ gcc/gimple-match-head.c | 25

[gimple-classes, committed 09/44] auto-profile.c: Use gassign

2014-11-06 Thread David Malcolm
gcc/ChangeLog.gimple-classes: * auto-profile.c (afdo_propagate_circuit): Replace a check for GIMPLE_ASSIGN within the while loop with a dyn_cast, introducing a local def_assign, using it in place of stmt for typesafety. This involves replacing the series of while

[gimple-classes, committed 28/44] tree-ssa-dom.c: Use gassign

2014-11-06 Thread David Malcolm
gcc/ChangeLog.gimple-classes: * tree-ssa-dom.c (initialize_hash_element): Replace check for GIMPLE_ASSIGN with a dyn_cast, introducing local assign_stmt, using it in place of stmt for typesafety. (record_equivalences_from_incoming_edge): Replace is_gimple_assign

[gimple-classes, committed 31/44] ipa-polymorphic-call.c: Use gassign

2014-11-06 Thread David Malcolm
gcc/ChangeLog.gimple-classes: * ipa-polymorphic-call.c (walk_ssa_copies): Add checked cast. (ipa_polymorphic_call_context::ipa_polymorphic_call_context): Introduce local gassign * def_assign from result of gimple_assign_single_p, using it in place of

[gimple-classes, committed 35/44] gimple_assign_rhs_to_tree takes a const gassign *

2014-11-06 Thread David Malcolm
gcc/ChangeLog.gimple-classes: * cfgexpand.c (gimple_assign_rhs_to_tree): Strengthen param from gimple to const gassign *. (expand_debug_expr): Add checked cast. (expand_gimple_basic_block): Likewise. * cfgexpand.h (gimple_assign_rhs_to_tree): Strengthen

[gimple-classes, committed 40/44] ipa-icf-gimple.c: Use gassign

2014-11-06 Thread David Malcolm
gcc/ChangeLog.gimple-classes: * ipa-icf-gimple.c (func_checker::compare_bb): Add checked casts. (func_checker::compare_gimple_assign): Strengthen params from gimple to const gassign *. * ipa-icf-gimple.h (func_checker::compare_gimple_assign): Likewise. ---

[gimple-classes, committed 43/44] sese.c: Use gassign

2014-11-06 Thread David Malcolm
gcc/ChangeLog.gimple-classes: * sese.c (rename_uses): Add checked cast to gassign within region guarded by is_gimple_assign. (graphite_copy_stmts_from_block): Likewise. --- gcc/ChangeLog.gimple-classes | 6 ++ gcc/sese.c | 4 ++-- 2 files changed, 8

[gimple-classes, committed 39/44] ipa-prop.c: Use gassign

2014-11-06 Thread David Malcolm
gcc/ChangeLog.gimple-classes: * ipa-prop.c (stmt_may_be_vtbl_ptr_store): Replace is_gimple_assign with dyn_cast, introducing local gassign * assign_stmt and using it in place of stmt for typesafety. (load_from_unmodified_param): Use assign rather than stmt for

[gimple-classes, committed 42/44] predict.c: Use gassign

2014-11-06 Thread David Malcolm
gcc/ChangeLog.gimple-classes: * predict.c (expr_expected_value_1): Replace is_gimple_assign with a dyn_cast, introducing local def_assign and using it in place of def for typesafety. --- gcc/ChangeLog.gimple-classes | 6 ++ gcc/predict.c| 13

[gimple-classes, committed 37/44] ipa-split.c: Use gassign

2014-11-06 Thread David Malcolm
gcc/ChangeLog.gimple-classes: * ipa-split.c (find_return_bb): Eliminate check for GIMPLE_ASSIGN since this is covered by gimple_assign_single_p, using the latter to introduce local gassign * assign_stmt, using it in place of stmt for typesafety.

[gimple-classes, committed 32/44] Fix issues with gimple_assign_single_p and gimple_assign_load_p

2014-11-06 Thread David Malcolm
gcc/ChangeLog.gimple-classes: * asan.c (get_mem_ref_of_assignment): Weaken param assignment from const gassign * to gassign *. * gimple.h (gimple_assign_single_p): Eliminate const_gimple variant, since this could call itself, leading to an infinite recursion.

[gimple-classes, committed 38/44] ipa-inline-analysis.c: Use gassign

2014-11-06 Thread David Malcolm
gcc/ChangeLog.gimple-classes: * ipa-inline-analysis.c (unmodified_parm): Capture result of gimple_assign_single_p as a new local gassign * def_assign and use in place of SSA_NAME_DEF_STMT (op) for typesafety. (unmodified_parm_or_parm_agg_item): Likewise.

[gimple-classes, committed 41/44] omp-low.c: Use gassign

2014-11-06 Thread David Malcolm
gcc/ChangeLog.gimple-classes: * omp-low.c (expand_omp_taskreg): Strengthen locals parcopy_stmt and stmt from gimple to gassign *, replacing a check against GIMPLE_ASSIGN with a dyn_cast. (expand_omp_atomic_fetch_op): Likewise for local stmt.

[gimple-classes, committed 34/44] build_assign and build_type_cast take const gassign *

2014-11-06 Thread David Malcolm
gcc/ChangeLog.gimple-classes: * asan.c (asan_expand_check_ifn): Strengthen local shadow_test from gimple to gassign *. Introduce gassign * locals add_7, cast, t_ge_shadow, and_expr, using them in place of gimple_seq_last_stmt (seq) for typesafety. *

[gimple-classes, committed 30/44] gimple-walk.c: Use gassign

2014-11-06 Thread David Malcolm
gcc/ChangeLog.gimple-classes: * gimple-walk.c (walk_gimple_op): Within case GIMPLE_ASSIGN, introduce local gassign * assign_stmt and use it in place of stmt for typesafety. --- gcc/ChangeLog.gimple-classes | 6 gcc/gimple-walk.c| 74

[gimple-classes, committed 36/44] cfgexpand.c: Use gassign *

2014-11-06 Thread David Malcolm
gcc/ChangeLog.gimple-classes: * cfgexpand.c (add_scope_conflicts_1): Add checked cast. (expand_gimple_cond): Replace check for GIMPLE_ASSIGN with a dyn_cast, introducing local second_assign, using it in place of assign for typesafety. (expand_call_stmt): Add

Re: [PATCH][11/n] Merge from match-and-simplify, bit patterns from forwprop

2014-11-06 Thread Marc Glisse
On Thu, 6 Nov 2014, Richard Biener wrote: On Thu, 6 Nov 2014, Marc Glisse wrote: On Thu, 6 Nov 2014, Richard Biener wrote: On Thu, 6 Nov 2014, Marc Glisse wrote: On Thu, 6 Nov 2014, Richard Biener wrote: +/* Try simple folding for X op !X, and X op X with the help + of the

[gimple-classes, committed 11/44] gimple-ssa-isolate-paths.c: Use gassign

2014-11-06 Thread David Malcolm
gcc/ChangeLog.gimple-classes: * gimple-ssa-isolate-paths.c (insert_trap_and_remove_trailing_statements): Replace a call to is_gimple_assign with a dyn_cast, introducing a local assign_stmt, and using it in place of stmt for typesafety. ---

[gimple-classes, committed 23/44] tree-ssa-alias.c: Use gassign

2014-11-06 Thread David Malcolm
gcc/ChangeLog.gimple-classes: * tree-ssa-alias.c (stmt_may_clobber_global_p): Within case GIMPLE_ASSIGN, add a checked cast. (ao_ref_init_from_ptr_and_size): Both the gimple_assign_single_p and is_gimple_assign conditionals require a GIMPLE_ASSIGN, so begin

[gimple-classes, committed 15/44] graphite-sese-to-poly.c: Use gasssign

2014-11-06 Thread David Malcolm
gcc/ChangeLog.gimple-classes: * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_deps): Add checked cast. (is_reduction_operation_p): Strengthen param from gimple to gassign *. (follow_ssa_with_commutative_ops): Replace is_gimple_assign with a

[gimple-classes, committed 27/44] tree-ssa-dce.c: Use gassign

2014-11-06 Thread David Malcolm
gcc/ChangeLog.gimple-classes: * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Within case GIMPLE_ASSIGN, introduce local assign_stmt and use in place of stmt for typesafety. (mark_all_reaching_defs_necessary_1): Add a checked cast.

[gimple-classes, committed 29/44] tree-ssa-dse.c: Use gassign

2014-11-06 Thread David Malcolm
gcc/ChangeLog.gimple-classes: * tree-ssa-dse.c (dse_optimize_stmt): Add checked cast. Replace is_gimple_assign with dyn_cast, introducing local gassign * assign_stmt, using it in place of stmt for typesafety. --- gcc/ChangeLog.gimple-classes | 6 ++

[gimple-classes, committed 18/44] tree-call-cdce.c: Use gassign

2014-11-06 Thread David Malcolm
gcc/ChangeLog.gimple-classes: * tree-call-cdce.c (check_pow): Replace check against GIMPLE_ASSIGN with a dyn_cast, strengthening local base_def from gimple to gassign *. (gen_conditions_for_pow_int_base): Add a checked cast. --- gcc/ChangeLog.gimple-classes | 7

[gimple-classes, committed 33/44] Use gassign within gimple_expr_type

2014-11-06 Thread David Malcolm
gcc/ChangeLog.gimple-classes: * gimple.h (gimple_expr_type): Split out if clause handling GIMPLE_ASSIGN and GIMPLE_CALL with an inner if GIMPLE_CALL into a pair of if clauses, first for GIMPLE_CALL, then for GIMPLE_ASSIGN. Replace them with dyn_casts, introducing

  1   2   >