- 23 Jan, 2018 16 commits
-
-
PR c++/82882 PR c++/83978 * g++.dg/cpp0x/pr82882.C: New test. * g++.dg/cpp0x/pr83978.C: New test. From-SVN: r256985
Jakub Jelinek committed -
PR c++/83958 * decl.c (cp_finish_decomp): Diagnose if reference structure binding refers to incomplete type. * g++.dg/cpp1z/decomp35.C: New test. From-SVN: r256984
Jakub Jelinek committed -
2018-01-23 Martin Liska <mliska@suse.cz> * tree-profile.c (tree_profiling): Print function header to aware reader which function we are working on. * value-prof.c (gimple_find_values_to_profile): Do not print not interesting value histograms. From-SVN: r256983
Martin Liska committed -
2018-01-22 Martin Liska <mliska@suse.cz> * profile-count.h (enum profile_quality): Add profile_uninitialized as the first value. Do not number values as they are zero based. (profile_count::verify): Update sanity check. (profile_probability::verify): Likewise. From-SVN: r256982
Martin Liska committed -
https://gcc.gnu.org/ml/gcc-patches/2018-01/msg01940.html gcc/cp/ Deprecate ARM-era for scope handling * decl.c (poplevel): Flag_new_for_scope is a boolean-like. (cxx_init_decl_processing): Deprecate flag_new_for_scope being cleared. * name-lookup.c (check_for_out_of_scope_variable): Deprecate and cleanup handling. * semantics.c (begin_for_scope): Flag_new_for_scope is boolean-like. (finish_for_stmt, begin_range_for_stmt): Likewise. gcc/ * doc/invoke.texi (ffor-scope): Deprecate. gcc/cp/ * g++.dg/cpp0x/range-for10.C: Adjust. * g++.dg/ext/forscope1.C: Adjust. * g++.dg/ext/forscope2.C: Adjust. * g++.dg/template/for1.C: Adjust. From-SVN: r256981
Nathan Sidwell committed -
PR tree-optimization/83510 reports that r255649 (for PR tree-optimization/83312) introduced a false positive for -Warray-bounds for array accesses within certain switch statements: those for which value-ranges allow more than one case to be reachable, but for which one or more of the VR-unreachable cases contain out-of-range array accesses. In the reproducer, after the switch in f is inlined into g, we have 3 cases for the switch (case 9, case 10-19, and default), within a loop that ranges from 0..9. With both the old and new code, vr_values::simplify_switch_using_ranges clears the EDGE_EXECUTABLE flag on the edge to the "case 10-19" block. This happens during the dom walk within the substitute_and_fold_engine. With the old code, the clearing of that EDGE_EXECUTABLE flag led to the /* Skip blocks that were found to be unreachable. */ code in the old implementation of vrp_prop::check_all_array_refs skipping the "case 10-19" block. With the new code, we have a second dom walk, and that dom_walker's ctor sets all edges to be EDGE_EXECUTABLE, losing that information. Then, dom_walker::before_dom_children (here, the subclass' check_array_bounds_dom_walker::before_dom_children) can return one edge, if there's a unique successor edge, and dom_walker::walk filters the dom walk to just that edge. Here we have two VR-valid edges (case 9 and default), and an VR-invalid successor edge (case 10-19). There's no *unique* valid successor edge, and hence taken_edge is NULL, and the filtering in dom_walker::walk doesn't fire. Hence we've lost the filtering of the "case 10-19" BB, hence the false positive. The issue is that we have two dom walks: first within vr_values' substitute_and_fold_dom_walker (which has skip_unreachable_blocks == false), then another within vrp_prop::check_all_array_refs (with skip_unreachable_blocks == true). Each has different "knowledge" about ruling out edges due to value-ranges, but we aren't combining that information. The former "knows" about out-edges at a particular control construct (e.g. at a switch), the latter "knows" about dominance, but only about unique successors (hence the problem when two out of three switch cases are valid). This patch combines the information by preserving the EDGE_EXECUTABLE flags from the first dom walk, and using it in the second dom walk, potentially rejecting additional edges. Doing so fixes the false positive. I attempted an alternative fix, merging the two dom walks into one, but that led to crashes in identify_jump_threads, so I went with this, as a less invasive fix. gcc/ChangeLog: PR tree-optimization/83510 * domwalk.c (set_all_edges_as_executable): New function. (dom_walker::dom_walker): Convert bool param "skip_unreachable_blocks" to enum reachability. Move setup of edge flags to set_all_edges_as_executable and only do it when reachability is REACHABLE_BLOCKS. * domwalk.h (enum dom_walker::reachability): New enum. (dom_walker::dom_walker): Convert bool param "skip_unreachable_blocks" to enum reachability. (set_all_edges_as_executable): New decl. * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert from false for "skip_unreachable_blocks" to ALL_BLOCKS for "reachability". * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise, but converting true to REACHABLE_BLOCKS. * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise. * tree-vrp.c (check_array_bounds_dom_walker::check_array_bounds_dom_walker): Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS. (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to REACHABLE_BLOCKS. (vrp_prop::vrp_finalize): Call set_all_edges_as_executable if check_all_array_refs will be called. gcc/testsuite/ChangeLog: PR tree-optimization/83510 * gcc.c-torture/compile/pr83510.c: New test case. From-SVN: r256980
David Malcolm committed -
gcc/ChangeLog: * tree.c (selftest::test_location_wrappers): Add more test coverage. From-SVN: r256979
David Malcolm committed -
"make selftest-valgrind" shows a few leaks in sbitmap.c's selftests; this patch fixes them. gcc/ChangeLog: * sbitmap.c (selftest::test_set_range): Fix memory leaks. (selftest::test_bit_in_range): Likewise. From-SVN: r256978
David Malcolm committed -
vect_float is true for arm*-*-* targets, but the support is only available when -funsafe-math-optimizations is on. This caused failures in two tests that disable fast-math. The easiest fix seemed to be to add a new target selector for "vect_float without special options". 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org> gcc/ PR testsuite/83888 * doc/sourcebuild.texi (vect_float): Say that the selector only describes the situation when -funsafe-math-optimizations is on. (vect_float_strict): Document. gcc/testsuite/ PR testsuite/83888 * lib/target-supports.exp (check_effective_target_vect_float): Say that the result only holds when -funsafe-math-optimizations is on. (check_effective_target_vect_float_strict): New procedure. * gcc.dg/vect/no-fast-math-vect16.c: Use vect_float_strict instead of vect_float. * gcc.dg/vect/vect-reduc-6.c: Likewise. From-SVN: r256977
Richard Sandiford committed -
In this PR we recognised a PLUS_EXPR as a fold-left reduction, then applied pattern matching to convert it to a WIDEN_SUM_EXPR. We need to keep the original code in this case since we implement the reduction using scalar rather than vector operations. 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org> gcc/ PR tree-optimization/83965 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function. (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it instead of checking only for a reduction. (vect_recog_widen_sum_pattern): Likewise. gcc/testsuite/ PR tree-optimization/83965 * gcc.dg/vect/pr83965.c: New test. From-SVN: r256976
Richard Sandiford committed -
* predict.c (probably_never_executed): Only use precise profile info. (compute_function_frequency): Skip after inlining hack since we now have quality checking. From-SVN: r256975
Jan Hubicka committed -
* profile-count.h (profile_probability::very_unlikely, profile_probability::unlikely, profile_probability::even): Set precision to guessed. From-SVN: r256974
Jan Hubicka committed -
2018-01-23 Richard Biener <rguenther@suse.de> PR tree-optimization/83963 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region): Properly terminate dominator walk when crossing the exit edge not when visiting its source block. * gfortran.dg/graphite/pr83963.f: New testcase. * gcc.dg/graphite/pr83963-2.c: Likewise. From-SVN: r256973
Richard Biener committed -
re PR c++/83918 ([c++17] ICE on constexpr eval of datatype involving function and variadic template) PR c++/83918 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than VIEW_CONVERT_EXPR to wrap CONST_DECLs. * g++.dg/cpp1z/pr83918.C: New test. From-SVN: r256972
Jakub Jelinek committed -
Reviewed-on: https://go-review.googlesource.com/88935 From-SVN: r256971
Ian Lance Taylor committed -
From-SVN: r256970
GCC Administrator committed
-
- 22 Jan, 2018 24 commits
-
-
PR tree-optimization/83957 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove semicolon after for body surrounded by braces. * gcc.dg/autopar/pr83957.c: New test. From-SVN: r256967
Jakub Jelinek committed -
PR tree-optimization/83081 * profile-count.h (profile_probability::split): New method. * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>: Use profile_probability::split. (do_compare_rtx_and_jump): Fix adjustment of probabilities when splitting a single conditional jump into 2. * gcc.dg/predict-8.c: Adjust expected probability. From-SVN: r256966
Jakub Jelinek committed -
* decl2.c (determine_visibility): Fix template_decl handling instead of blocking it. From-SVN: r256965
Jason Merrill committed -
* decl2.c (determine_visibility): Clear template_decl for function-scope decls. Propagate anonymous linkage from containing function. From-SVN: r256964
Jason Merrill committed -
r232820 (aka 2c7b2f8860794cc9b9cf5eeea9d7dc109c0de3be) removed the implementation of class move_computations_dom_walker, but kept the decl. This patch removes the stray decl. gcc/ChangeLog: PR tree-optimization/69452 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove decl. From-SVN: r256963
David Malcolm committed -
2018-01-22 Sebastian Perta <sebastian.perta@renesas.com> * config/rl78/rl78-expand.md: New define_expand "bswaphi2" * config/rl78/rl78-virt.md: New define_insn "*bswaphi2_virt" * config/rl78/rl78-real.md: New define_insn "*bswaphi2_real" From-SVN: r256961
Sebastian Perta committed -
2018-01-22 Sebastian Perta <sebastian.perta@renesas.com> * config/rl78/rl78-protos.h: New function declaration rl78_split_movdi * config/rl78/rl78.md: New define_expand "movdi" * config/rl78/rl78.c: New function definition rl78_split_movdi From-SVN: r256960
Sebastian Perta committed -
[gcc] 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com> PR target/83862 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete, no longer used. * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise. * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE 128-bit to produce an UNSPEC move to get the double word with the signbit and then a shift directly to do signbit. (signbit<mode>2_dm): Replace old IEEE 128-bit signbit implementation with a new version that just does either a direct move or a regular move. Move memory interface to separate insns. Move insns so they are next to the expander. (signbit<mode>2_dm_mem_be): New combiner insns to combine load with signbit move. Split big and little endian case. (signbit<mode>2_dm_mem_le): Likewise. (signbit<mode>2_dm_<su>ext): Delete, no longer used. (signbit<mode>2_dm2): Likewise. [gcc/testsuite] 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com> PR target/83862 * gcc.target/powerpc/pr83862.c: New test. From-SVN: r256959
Michael Meissner committed -
2018-01-22 Sebastian Perta <sebastian.perta@renesas.com> * config/rl78/rl78.md: New define_expand "anddi3". 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com> * config/rl78/anddi3.S: New assembly file. * config/rl78/t-rl78: Added anddi3.S to LIB2ADD. From-SVN: r256958
Sebastian Perta committed -
2018-01-22 Sebastian Perta <sebastian.perta@renesas.com> * config/rl78/rl78.md: New define_expand "umindi3". 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com> * config/rl78/umindi3.S: New assembly file. * config/rl78/t-rl78: Added umindi3.S to LIB2ADD. From-SVN: r256957
Sebastian Perta committed -
From-SVN: r256955
Joseph Myers committed -
2018-01-22 Sebastian Perta <sebastian.perta@renesas.com> * config/rl78/rl78.md: New define_expand "smindi3". 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com> * config/rl78/smindi3.S: New assembly file. * config/rl78/t-rl78: Added smindi3.S to LIB2ADD. From-SVN: r256954
Sebastian Perta committed -
2018-01-22 Sebastian Perta <sebastian.perta@renesas.com> * config/rl78/rl78.md: New define_expand "smaxdi3". 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com> * config/rl78/smaxdi3.S: New assembly file. * config/rl78/t-rl78: Added smaxdi3.S to LIB2ADD. From-SVN: r256953
Sebastian Perta committed -
gcc/ChangeLog: 2018-01-22 Carl Love <cel@us.ibm.com> * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI, LVX_V1TI): Add macro expansion. * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST, VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins. * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p); Change check to determine if the instruction is a byte reversing entry. Fix typo in comment. * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI. Add def_builtin calls for new builtins. * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti): Add define_insn expansion. gcc/testsuite/ChangeLog: 2018-01-22 Carl Love <cel@us.ibm.com> * gcc.target/powerpc/powerpc.exp: Add torture tests for builtins-4-runnable.c, builtins-6-runnable.c, builtins-5-p9-runnable.c, builtins-6-p9-runnable.c. * gcc.target/powerpc/builtins-6-runnable.c: New test file. * gcc.target/powerpc/builtins-4-runnable.c: Add additional tests for signed/unsigned 128-bit and long long int loads. From-SVN: r256952
Carl Love committed -
PR c++/81933 * typeck2.c (split_nonconstant_init_1): Return false if we didn't split out anything. * g++.dg/cpp1y/constexpr-empty4.C: New test. From-SVN: r256951
Marek Polacek committed -
From-SVN: r256949
Sebastian Perta committed -
2017-01-22 Sebastian Perta <sebastian.perta@renesas.com> * config/rl78/rl78.md: New define_expand "umaxdi3". 2017-01-22 Sebastian Perta <sebastian.perta@renesas.com> * config/rl78/umaxdi3.S: New assembly file. * config/rl78/t-rl78: Added umaxdi3.S to LIB2ADD. From-SVN: r256948
Sebastian Perta committed -
[testsuite] 2018-01-19 Will Schmidt <will_schmidt@vnet.ibm.com> * gcc.target/powerpc/fold-vec-abs-short-fwrap.c: Add xxspltib to scan-asembler valid instructions list. * gcc.target/powerpc/fold-vec-abs-short.c: Same. * gcc.target/powerpc/fold-vec-shift-left-longlong.c: Clean up power8-vector requirement and option. * gcc.target/powerpc/fold-vec-shift-left-fwrapv.c: Same. From-SVN: r256947
Will Schmidt committed -
2018-01-12 Sebastian Perta <sebastian.perta@renesas.com> * config/rl78/rl78.c (rl78_note_reg_set): fixed dead reg check for non-QImode registers From-SVN: r256945
Sebastian Perta committed -
This patch fixes various parts of the code to use a larger type than int for the character length. Depending on the situation, HOST_WIDE_INT, size_t, or gfc_charlen_t is appropriate. Regtested on x86_64-pc-linux-gnu and i686-pc-linux-gnu. gcc/fortran/ChangeLog: 2018-01-22 Janne Blomqvist <jb@gcc.gnu.org> PR 78534 PR 83704 * arith.c (gfc_arith_concat): Use size_t for string length. (gfc_compare_string): Likewise. (gfc_compare_with_Cstring): Likewise. * array.c (gfc_resolve_character_array_constructor): Use HOST_WIDE_INT, gfc_mpz_get_hwi. * check.c (gfc_check_fe_runtime_error): Use size_t. * data.c (create_character_initializer): Use HOST_WIDE_INT, gfc_extract_hwi. * decl.c (gfc_set_constant_character_len): Use gfc_charlen_t. (add_init_expr_to_sym): Use HOST_WIDE_INT. * expr.c (gfc_build_init_expr): Use HOST_WIDE_INT, gfc_extract_hwi. (gfc_apply_init): Likewise. * match.h (gfc_set_constant_character_len): Update prototype. * primary.c (match_string_constant): Use size_t. * resolve.c (resolve_ordinary_assign): Use HOST_WIDE_INT, gfc_mpz_get_hwi. * simplify.c (init_result_expr): Likewise. (gfc_simplify_len_trim): Use size_t. * target-memory.c (gfc_encode_character): Use size_t. (gfc_target_encode_expr): Use HOST_WIDE_INT, gfc_mpz_get_hwi. (interpret_array): Use size_t. (gfc_interpret_character): Likewise. * target-memory.h (gfc_encode_character): Update prototype. (gfc_interpret_character): Likewise. (gfc_target_interpret_expr): Likewise. * trans-const.c (gfc_build_string_const): Use size_t for length argument. (gfc_build_wide_string_const): Likewise. * trans-const.h (gfc_build_string_const): Likewise. (gfc_build_wide_string_const): Likewise. 2018-01-22 Janne Blomqvist <jb@gcc.gnu.org> PR 78534 PR 83704 * gfortran.dg/string_1.f90: Remove printing the length. From-SVN: r256944
Janne Blomqvist committed -
2018-01-22 Richard Biener <rguenther@suse.de> PR tree-optimization/83963 * graphite-scop-detection.c (scop_detection::get_sese): Delay including the loop exit block. (scop_detection::merge_sese): Likewise. (scop_detection::add_scop): Do it here instead. * gcc.dg/graphite/pr83963.c: New testcase. From-SVN: r256943
Richard Biener committed -
PR c++/83895 cp/ * decl.c (grokdeclarator): Don't diagnose extra parens on typedefs. testsuite/ * g++.dg/warn/83895.C: New. From-SVN: r256942
Ville Voutilainen committed -
This patch fixes my earlier test case that fails for arm-none-eabi with explicit user option for -mfloat-abi which conflict with the test case options. I have added a guard to skip the test on those cases. ChangeLog entries: *** gcc/testsuite/ChangeLog *** 2018-01-22 Sudakshina Das <sudi.das@arm.com> * gcc.c-torture/compile/pr82096.c: Add dg-skip-if and dg-require-effective-target directives. From-SVN: r256941
Sudakshina Das committed -
This test has needlessly restrictive requirements. It tries to force a soft-float target and tries to run. This makes it unsupportable for any non-soft-float variant. In fact, the test can be a run-time test for any target, and only the scan-assembler tests are specific to -mfloat-abi=soft. So this patch makes the test always runnable and makes the scan-assembler checks predicable on the the new arm_sotftfloat effective target check. * doc/sourcebuild.texi (arm_softfloat): Document. * lib/target-supports.exp (check_effective_target_arm_softfloat): New procedure. * gcc.target/arm/copysign_softfloat_1.c: Allow running everywhere. Adjust scan-assembler checks for soft-float. From-SVN: r256940
Kyrylo Tkachov committed
-