[PATCH 03/16] spellcheck.c: convert Levenshtein test from a plugin to a selftest

2016-06-02 Thread David Malcolm
This is an example of converting one of our existing plugin-based tests to run within -fself-test instead. gcc/ChangeLog: * spellcheck.c: Include "selftest.h". (levenshtein_distance_unit_test_oneway): New function, adapted from testsuite/gcc.dg/plugin/levenshtein_plugin.c.

[PATCH 04/16] bitmap.c: add selftests

2016-06-02 Thread David Malcolm
Jeff pre-approved the plugin version of this (as a new file unittests/test-bitmap.c): https://gcc.gnu.org/ml/gcc-patches/2015-10/msg03284.html with: > OK if/when prereqs are approved. Minor twiddling if we end up moving it > elsewhere or standardizing/reducing header files is pre-approved. This v

[PATCH 10/16] Add hash-map-tests.c

2016-06-02 Thread David Malcolm
Jeff approved an earlier version of this (as unittests/test-hash-map.c): https://gcc.gnu.org/ml/gcc-patches/2015-10/msg03301.html > OK if/when prereqs are approved. Minor twiddling if we end up > moving it elsewhere or standardizing/reducing header files is > pre-approved. This version moves the

[PATCH 05/16] tree-cfg.c: add selftests

2016-06-02 Thread David Malcolm
Jeff approved an older version of this: https://gcc.gnu.org/ml/gcc-patches/2015-10/msg03285.html with: > Unless there's a good reason, drop the presumably redundant tests > and this is OK. Save preapprovald for these changes as the bitmap > patch. This version removes the redundant tests, moves th

[PATCH 02/16] diagnostic-show-locus.c: add selftests

2016-06-02 Thread David Malcolm
gcc/ChangeLog: * diagnostic-show-locus.c: Include "selftest.h". (make_range): New function. (test_range_contains_point_for_single_point): New function. (test_range_contains_point_test_for_single_line): New function. (test_range_contains_point_for_multiple_lin

[PATCH, rs6000] Fix PR70957 (skip vsx-elemrev-[24].c tests for a downlevel assembler)

2016-06-02 Thread Bill Schmidt
Hi, PR70957 reports that the two subject tests fail on an older P7 machine. These tests rely on built-ins that exploit POWER9 vector support. It turns out that the failure occurs because the configured assembler is downlevel, and does not support even POWER8 instructions. This causes TARGET

[PATCH, RS6000] Add RS6000_BTM_MODULO to set of RS6000_BTM_COMMON flags

2016-06-02 Thread Kelvin Nilsen
This patch adds the RS6000_BTM_MODULO flag to to the set of flags associated with the RS6000_BTM_COMMON variable. This patch has bootstrapped with the trunk and the gcc-6-branch on powerpc64le-unknown-linux-gnu and there were no regressions. Is it ok to merge this with the trunk? Can I merge w

[PATCH 08/16] Add function-tests.c

2016-06-02 Thread David Malcolm
Jeff approved an earlier version of this (as unittests/test-functions.c): https://gcc.gnu.org/ml/gcc-patches/2015-10/msg03310.html with: > OK if/when prereqs are approved. Minor twiddling if we end up moving > it elsewhere or standardizing/reducing header files is pre-approved. gcc/ChangeLog:

[PATCH 14/16] tree.c: add selftests

2016-06-02 Thread David Malcolm
Jeff approved an earlier version of this (as unittests/test-tree.c): https://gcc.gnu.org/ml/gcc-patches/2015-10/msg03303.html > OK if/when prereqs are approved. Minor twiddling if we end up > moving it elsewhere or standardizing/reducing header files is > pre-approved. gcc/ChangeLog: * tre

tuple code simplification patch

2016-06-02 Thread François Dumont
Hi I was trying to play with tuple implementation and was annoyed by repetition of _Head type when instantiating _Head_base so I thought about this patch. How do you like it ? I still need to run tests, will do before commit, ok ? François Index: include/std/tuple ==

[PATCH 12/16] input.c: add selftests

2016-06-02 Thread David Malcolm
Jeff conditionally approved an earlier version of this (as unittests/test-locations.c): https://gcc.gnu.org/ml/gcc-patches/2015-10/msg03307.html > OK if/when prereqs are approved. Minor twiddling if we end up > moving it elsewhere or standardizing/reducing header files is > pre-approved. gcc/Chang

[PATCH 13/16] Add rtl-tests.c

2016-06-02 Thread David Malcolm
Jeff approved an earlier version of this (as unittests/test-rtl.c): https://gcc.gnu.org/ml/gcc-patches/2015-10/msg03302.html > OK if/when prereqs are approved. Minor twiddling if we end up > moving it elsewhere or standardizing/reducing header files is >pre-approved. gcc/ChangeLog: * rtl-t

[PATCH 16/16] wide-int.cc: add selftests

2016-06-02 Thread David Malcolm
Jeff approved an early version of this: https://gcc.gnu.org/ml/gcc-patches/2015-10/msg03309.html > OK if/when prereqs are approved. Minor twiddling if we end up > moving it elsewhere or standardizing/reducing header files is > pre-approved. This version moves it to wide-int.cc and converts it to t

[PATCH 15/16] vec.c: add selftests

2016-06-02 Thread David Malcolm
Jeff approved an earlier version of this (as unittests/test-vec.c): https://gcc.gnu.org/ml/gcc-patches/2015-10/msg03308.html > OK if/when prereqs are approved. Minor twiddling if we end up > moving it elsewhere or standardizing/reducing header files is > pre-approved. gcc/ChangeLog: * vec.

[PATCH 07/16] fold-const.c: add selftests

2016-06-02 Thread David Malcolm
Jeff approved an older version of this (as a separate unittests/test-folding.c): https://gcc.gnu.org/ml/gcc-patches/2015-10/msg03305.html > OK if/when prereqs are approved. Minor twiddling if we end up > moving it elsewhere or standardizing/reducing header files > is pre-approved. gcc/ChangeLog:

[PATCH 06/16] et-forest.c: add selftests

2016-06-02 Thread David Malcolm
Jeff approved an earlier version of this: https://gcc.gnu.org/ml/gcc-patches/2015-10/msg03295.html > OK if/when prereqs are approved. Minor twiddling if we end up > moving it elsewhere or standardizing/reducing header files > is pre-approved. This version has been updated to the new style. gcc/Ch

[PATCH 11/16] Add hash-set-tests.c

2016-06-02 Thread David Malcolm
Jeff approved an earlier version of this (as unittests/test-hash-set.c): https://gcc.gnu.org/ml/gcc-patches/2015-10/msg03300.html > OK if/when prereqs are approved. Minor twiddling if we end up > moving it elsewhere or standardizing/reducing header files is > pre-approved. This version moves the

Re: [PATCH] nvptx per-warp compiler-defined stacks (-msoft-stack)

2016-06-02 Thread Alexander Monakov
On Wed, 25 May 2016, Nathan Sidwell wrote: > > > It seems like we should reject the combination of -msoft-stack -fopenacc? > > > > Possibly; the doc text makes it explicit that the option is exposed only for > > the purpose of testing the compiler, anyway. > > It is always best to prevent the user

Re: [C++ Patch] Change a few error + error to error + inform

2016-06-02 Thread Jason Merrill
OK. Jason

[C++ Patch] Change a few error + error to error + inform

2016-06-02 Thread Paolo Carlini
Hi, while working on c++/70202, I noticed a few more of those pairs for errors which we changed in the past to error + inform. Tested x86_64-linux. Thanks, Paolo. / /cp 2016-06-02 Paolo Carlini * decl.c (xref_tag_1): Change pairs of errors to error + inform

[PATCH v2] gcc/config/tilegx/tilegx.c (tilegx_function_profiler): Save r10 to stack before call mcount

2016-06-02 Thread chengang
From: Chen Gang r10 may also be as parameter stack pointer for the nested function, so need save it before call mcount. 2016-06-03 Chen Gang gcc/ PR target/71331 * config/tilegx/tilegx.c (tilegx_function_profiler): Save r10 to stack before call mcount. --- gc

Re: [PATCH 01/16] Core of selftest framework (v6)

2016-06-02 Thread Bernd Schmidt
On 06/02/2016 11:06 PM, David Malcolm wrote: gcc/ChangeLog: * Makefile.in (OBJS): Add function-tests.o, hash-map-tests.o, hash-set-tests.o, rtl-tests.o, selftest-run-tests.o. (OBJS-libcommon): Add selftest.o. (OBJS-libcommon-target): Add selftest.o.

Re: [PATCH] integer overflow checking builtins in constant expressions

2016-06-02 Thread Martin Sebor
+ /* For the "generic" overloads, the first two arguments can have different + types and the last argument determines the target type to use to check + for overflow. The arguments of the other overloads all have the same + type. */ + tree type = TREE_TYPE (TREE_TYPE (arg2)); + boo

[PATCH] c/71392 - SEGV calling integer overflow built-ins with a null pointer

2016-06-02 Thread Martin Sebor
In a discussion of a patch in a this area (c/68120 and c++/70507) Jakub noticed that the integer arithmetic built-ins with overflow checking that expect a pointer to an integer as the last argument silently (i.e., without a warning) accept a null pointer. As the test case in the bug referenced in

Re: [PATCH] integer overflow checking builtins in constant expressions

2016-06-02 Thread Martin Sebor
+{ + /* Perform the computation in the target type and check for overflow. */ + arg0 = fold_convert (type, arg0); + arg1 = fold_convert (type, arg1); + + if (tree result = size_binop_loc (loc, opcode, arg0, arg1)) +return TREE_OVERFLOW (result) ? build_one_cst (boolean

Re: [PATCH v2] gcc/config/tilegx/tilegx.c (tilegx_function_profiler): Save r10 to stack before call mcount

2016-06-02 Thread Richard Henderson
On 06/02/2016 03:23 PM, cheng...@emindsoft.com.cn wrote: fprintf (file, + "\t{\n" + "\taddi\tsp, sp, -8\n" + "\tst\tsp, r10\n" + "\t}\n" "\t{\n" You need only do this if cfun->static_chain_decl is set. r~

[PR tree-optimization/71328] Fix off-by-one error in CFG/SSA updates for backward threading

2016-06-02 Thread Jeff Law
This bug has actually been around since the introduction of the FSM/backwards threader a few years ago. It was just latent. Essentially we need to look at the copied path for branches back into the path -- due to an off-by-one error, we missed the case where the last block in the path bran

<    1   2