aboutsummaryrefslogtreecommitdiff
path: root/gcc
AgeCommit message (Collapse)AuthorFilesLines
2016-08-19re PR fortran/69281 (gfortran ICE on temporary array in function call with ↵Jakub Jelinek4-1/+84
-fstack-arrays -fopenmp) PR fortran/69281 * trans-openmp.c (gfc_trans_omp_parallel, gfc_trans_omp_task, gfc_trans_omp_target): Wrap gfc_trans_omp_code result in an extra BIND_EXPR with its own forced BLOCK. * gfortran.dg/gomp/pr69281.f90: New test. From-SVN: r239618
2016-08-19rdseedintrin.h (_rdseed16_step, [...]): Uglify argument names and/or local ↵Jakub Jelinek12-412/+466
variable names in inline functions. * config/i386/rdseedintrin.h (_rdseed16_step, _rdseed32_step, _rdseed64_step): Uglify argument names and/or local variable names in inline functions. * config/i386/rtmintrin.h (_xabort): Likewise. * config/i386/avx512vlintrin.h (_mm256_ternarylogic_epi64, _mm256_mask_ternarylogic_epi64, _mm256_maskz_ternarylogic_epi64, _mm256_ternarylogic_epi32, _mm256_mask_ternarylogic_epi32, _mm256_maskz_ternarylogic_epi32, _mm_ternarylogic_epi64, _mm_mask_ternarylogic_epi64, _mm_maskz_ternarylogic_epi64, _mm_ternarylogic_epi32, _mm_mask_ternarylogic_epi32, _mm_maskz_ternarylogic_epi32): Likewise. * config/i386/lwpintrin.h (__llwpcb, __lwpval32, __lwpval64, __lwpins32, __lwpins64): Likewise. * config/i386/avx2intrin.h (_mm_i32gather_pd, _mm_mask_i32gather_pd, _mm256_i32gather_pd, _mm256_mask_i32gather_pd, _mm_i64gather_pd, _mm_mask_i64gather_pd, _mm256_i64gather_pd, _mm256_mask_i64gather_pd, _mm_i32gather_ps, _mm_mask_i32gather_ps, _mm256_i32gather_ps, _mm256_mask_i32gather_ps, _mm_i64gather_ps, _mm_mask_i64gather_ps, _mm256_i64gather_ps, _mm256_mask_i64gather_ps, _mm_i32gather_epi64, _mm_mask_i32gather_epi64, _mm256_i32gather_epi64, _mm256_mask_i32gather_epi64, _mm_i64gather_epi64, _mm_mask_i64gather_epi64, _mm256_i64gather_epi64, _mm256_mask_i64gather_epi64, _mm_i32gather_epi32, _mm_mask_i32gather_epi32, _mm256_i32gather_epi32, _mm256_mask_i32gather_epi32, _mm_i64gather_epi32, _mm_mask_i64gather_epi32, _mm256_i64gather_epi32, _mm256_mask_i64gather_epi32): Likewise. * config/i386/pmm_malloc.h (_mm_malloc, _mm_free): Likewise. * config/i386/ia32intrin.h (__writeeflags): Likewise. * config/i386/pkuintrin.h (_wrpkru): Likewise. * config/i386/avx512pfintrin.h (_mm512_mask_prefetch_i32gather_pd, _mm512_mask_prefetch_i32gather_ps, _mm512_mask_prefetch_i64gather_pd, _mm512_mask_prefetch_i64gather_ps, _mm512_prefetch_i32scatter_pd, _mm512_prefetch_i32scatter_ps, _mm512_mask_prefetch_i32scatter_pd, _mm512_mask_prefetch_i32scatter_ps, _mm512_prefetch_i64scatter_pd, _mm512_prefetch_i64scatter_ps, _mm512_mask_prefetch_i64scatter_pd, _mm512_mask_prefetch_i64scatter_ps): Likewise. * config/i386/gmm_malloc.h (_mm_malloc, _mm_free): Likewise. * config/i386/avx512fintrin.h (_mm512_ternarylogic_epi64, _mm512_mask_ternarylogic_epi64, _mm512_maskz_ternarylogic_epi64, _mm512_ternarylogic_epi32, _mm512_mask_ternarylogic_epi32, _mm512_maskz_ternarylogic_epi32, _mm512_i32gather_ps, _mm512_mask_i32gather_ps, _mm512_i32gather_pd, _mm512_i64gather_ps, _mm512_i64gather_pd, _mm512_i32gather_epi32, _mm512_i32gather_epi64, _mm512_i64gather_epi32, _mm512_i64gather_epi64): Likewise. From-SVN: r239617
2016-08-19fxsrintrin.h (_fxsave): Remove return keyword in inlines returning void.Jakub Jelinek5-13/+23
* config/i386/fxsrintrin.h (_fxsave): Remove return keyword in inlines returning void. (_fxrstor, _fxsave64, _fxrstor64): Likewise. * config/i386/xsaveintrin.h (_xsave, _xrstor, _xsave64, _xrstor64): Likewise. * config/i386/xsaveoptintrin.h (_xsaveopt, _xsaveopt64): Likewise. * config/i386/pkuintrin.h (_wrpkru): Likewise. Add space after function name. (_rdpkru_u32): Add space after function name. From-SVN: r239616
2016-08-19t-i386 (i386-c.o): Don't depend on i386-builtin-types.inc.Jakub Jelinek2-1/+9
* config/i386/t-i386 (i386-c.o): Don't depend on i386-builtin-types.inc. (i386.o): Depend on i386-builtin-types.inc. From-SVN: r239615
2016-08-19Use a XOR cipher instead of byte shuffling to protect against bad seeds.Janne Blomqvist2-4/+6
libgfortran: 2016-08-19 Janne Blomqvist <jb@gcc.gnu.org> * intrinsics/random.c (xor_keys): New array with "secret" keys. (scramble_seed): XOR given seed with xor_keys array rather than shuffling bytes. (unscramble_seed): Remove function. (random_seed_i4): Use new scramble_seed. (random_seed_i8): Likewise. frontend: 2016-08-19 Janne Blomqvist <jb@gcc.gnu.org> * intrinsics.texi (RANDOM_NUMBER): Remove reference to init_random_seed in example. (RANDOM_SEED): Remove warning to not set all seed values to 0. From-SVN: r239613
2016-08-19Always initialize PRNG using random data from the OS.Janne Blomqvist3-2/+13
libgfortran: 2016-08-16 Janne Blomqvist <jb@gcc.gnu.org> * intrinsics/random.c (master_init): New variable. (init_rand_state): Move below getosrandom (), maybe initialize master_state. (random_seed_i4): If called with no arguments, set master_init to false, and reinitialize. If called with PUT=, set master_init to true. (random_seed_i8): Likewise. testsuite: 2016-08-16 Janne Blomqvist <jb@gcc.gnu.org> * gfortran.dg/random_4.f90: Initialize seed before using, handle the last special seed value. * gfortran.dg/random_7.f90: Use size for last array member instead of hardcoded value. From-SVN: r239611
2016-08-19[ARM] Fix an invalid check for vectors of the same floating-point constants.Matthew Wahab2-9/+10
2016-08-19 Matthew Wahab <matthew.wahab@arm.com> PR target/77281 * config/arm/arm.c (neon_valid_immediate): Delete declaration. Use const_vec_duplicate to check for duplicated elements. From-SVN: r239610
2016-08-19expr.c (eval_token): Append "evaluates to 0" to Wundef diagnostic.Prathamesh Kulkarni3-2/+7
2016-08-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org> libcpp/ * expr.c (eval_token): Append "evaluates to 0" to Wundef diagnostic. testsuite/ * gcc.dg/cpp/warn-undef.c: Append "evaluates to 0" to dg-error. * gcc.dg/cpp/warn-undef-2.c: Likewise. From-SVN: r239609
2016-08-19re PR tree-optimization/77290 (test case gcc.dg/tree-ssa/pr71347.c fails ↵Richard Biener2-1/+7
starting with r239565) 2016-08-19 Richard Biener <rguenther@suse.de> PR tree-optimization/77290 * tree-ssa-pre.c (eliminate_dom_walker::before_dom_children): Fix flag_tree_parallelize_loops check. From-SVN: r239607
2016-08-19match.pd (x | 0 -> x): Add.Richard Biener2-4/+13
2016-08-19 Richard Biener <rguenther@suse.de> * match.pd (x | 0 -> x): Add. From-SVN: r239606
2016-08-19re PR tree-optimization/77286 (ICE in fold_convert_loc, at fold-const.c:2248 ↵Richard Biener4-7/+72
building 435.gromacs) 2016-08-19 Richard Biener <rguenther@suse.de> PR tree-optimization/77286 * tree-vect-loop-manip.c (slpeel_duplicate_current_defs_from_edges): Deal with virtual PHIs being out-of-order. * gcc.dg/torture/pr77286.c: New testcase. From-SVN: r239605
2016-08-19Add source information to -fverbose-asmDavid Malcolm5-2/+135
gcc/ChangeLog: * doc/invoke.texi (fverbose-asm): Note that source code lines are emitted, and provide an example. * final.c (asm_show_source): New function. (final_scan_insn): Call asm_show_source. From-SVN: r239604
2016-08-19Daily bump.GCC Administrator1-1/+1
From-SVN: r239603
2016-08-18Allow calling diagnostic_show_locus without a diagnostic_infoDavid Malcolm10-24/+285
Much of diagnostic-show-locus.c currently expects a diagnostic_info *, but it only uses the rich_location and the diagnostic_t. Change the signature of diagnostic_show_locus from: void diagnostic_show_locus (diagnostic_context *, const diagnostic_info *); to: void diagnostic_show_locus (diagnostic_context *, rich_location *richloc, diagnostic_t diagnostic_kind); so that it can be used for things other than diagnostics. Use this flexibility to add selftests for diagnostic_show_locus. gcc/c-family/ChangeLog: * c-opts.c (c_diagnostic_finalizer): Update for change to diagnostic_show_locus. gcc/ChangeLog: * diagnostic-show-locus.c (colorizer::colorizer): Replace diagnostic param with diagnostic_kind. (class colorizer): Similarly replace field m_diagnostic with m_diagnostic_kind. (colorizer::colorizer): Replace diagnostic param with diagnostic_kind. (colorizer::begin_state): Update for above field change. (layout::layout): Replace diagnostic param with rich_location * and diagnostic_kind. (diagnostic_show_locus): Replace diagnostic param with richloc and diagnostic_kind. (class selftest::test_diagnostic_context): New class. (selftest::test_diagnostic_show_locus_unknown_location): New function. (selftest::test_one_liner_simple_caret): New function. (selftest::test_one_liner_caret_and_range): New function. (selftest::test_one_liner_multiple_carets_and_ranges): New function. (selftest::test_one_liner_fixit_remove): New function. (selftest::test_one_liner_fixit_replace): New function. (selftest::test_diagnostic_show_locus_one_liner): New function. (selftest::diagnostic_show_locus_c_tests): Call the new test functions. * diagnostic.c (diagnostic_initialize): Initialize colorize_source_p, show_ruler_p and parseable_fixits_p. (default_diagnostic_finalizer): Update for change to diagnostic_show_locus. (diagnostic_append_note): Likewise. * diagnostic.h (diagnostic_show_locus): Replace const diagnostic_info * param with location * and diagnostic_t. gcc/fortran/ChangeLog: * error.c (gfc_diagnostic_starter): Update for change to diagnostic_show_locus. gcc/testsuite/ChangeLog: * gcc.dg/plugin/diagnostic_plugin_test_show_locus.c (custom_diagnostic_finalizer): Update for change to diagnostic_show_locus. From-SVN: r239586
2016-08-18Spelling suggestions for misspelled preprocessor directivesDavid Malcolm7-0/+69
This patch allows the preprocessor to offer suggestions for misspelled directives, taking us from e.g.: test.c:5:2: error: invalid preprocessing directive #endfi #endfi ^~~~~ to: test.c:5:2: error: invalid preprocessing directive #endfi; did you mean #endif? #endfi ^~~~~ endif gcc/c-family/ChangeLog: * c-common.c: Include "spellcheck.h". (cb_get_suggestion): New function. * c-common.h (cb_get_suggestion): New decl. * c-lex.c (init_c_lex): Initialize cb->get_suggestion to cb_get_suggestion. gcc/testsuite/ChangeLog: * gcc.dg/cpp/misspelled-directive-1.c: New testcase. * gcc.dg/cpp/misspelled-directive-2.c: New testcase. libcpp/ChangeLog: * directives.c (directive_names): New array. (_cpp_handle_directive): Offer spelling suggestions for misspelled directives. * errors.c (cpp_diagnostic_at_richloc): New function. (cpp_error_at_richloc): New function. * include/cpplib.h (struct cpp_callbacks): Add field "get_suggestion". (cpp_error_at_richloc): New decl. From-SVN: r239585
2016-08-18re PR c/71514 (ICE on C11 code with atomic exchange at -O1 and above on ↵Marek Polacek4-0/+48
x86_64-linux-gnu: in copy_reference_ops_from_ref, at tree-ssa-sccvn.c:879) PR c/71514 * c-common.c (get_atomic_generic_size): Disallow pointer-to-function and pointer-to-VLA. * gcc.dg/pr71514.c: New test. From-SVN: r239581
2016-08-18selftest.h: add class line_table_testDavid Malcolm4-52/+144
input.c has a fixture class for running each selftest with a fresh line_table, and logic for looping over various interesting line_table test cases. This patch exposes the above in selftest.h so that such location-handling tests can be written in other files, renaming the class from temp_line_table to line_table_test. Also, the patch moves the stored line table ptr from being a member of the test class to being a global GC-root, to avoid it being collected if the GC runs during such a test. gcc/ChangeLog: * input.c (saved_line_table): New global. (class selftest::temp_line_table): Rename to line_table_test and move declaration to selftest.h, and drop field m_old_line_table. (selftest::temp_line_table::temp_line_table): Rename ctor to... (selftest::line_table_test::line_table_test): ...this. Add a default ctor. Store current value of line_table within saved_line_table. (selftest::temp_line_table::~temp_line_table): Rename dtor to... (selftest::line_table_test::~line_table_test): ...this, and restore line_table from the saved_line_table, rather than m_old_line_table. (selftest::test_accessing_ordinary_linemaps): Update for above renaming. (selftest::test_lexer): Likewise. (struct selftest::lexer_test): Likewise. (selftest::lexer_test::lexer_test): Likewise. (selftest::input_c_tests): Move the looping over test cases from here into... (selftest::for_each_line_table_case): New function. * input.h (saved_line_table): New decl. * selftest.h (struct selftest::line_table_case): New forward decl. (class selftest::line_table_test): New class, moved here from selftest::temp_line_table in input.c, and renamed. (selftest::for_each_line_table_case): New decl. From-SVN: r239580
2016-08-18Increase MOVE_RATIO to 17 for LakemontH.J. Lu4-1/+28
Larger MOVE_RATIO will always make code faster. 17 is the number with smaller code sizes for Lakemont. gcc/ PR target/72839 * config/i386/i386.c (lakemont_cost): Set MOVE_RATIO to 17. gcc/testsuite/ PR target/72839 * gcc.target/i386/pr72839.c: New test. From-SVN: r239578
2016-08-18re PR middle-end/70895 (OpenACC: loop reduction does not work. Output is zero.)Chung-Lin Tang8-1/+77
2016-08-18 Chung-Lin Tang <cltang@codesourcery.com> PR middle-end/70895 gcc/ * gimplify.c (omp_add_variable): Adjust/add variable mapping on enclosing parallel construct for reduction variables on OpenACC loop directives. gcc/testsuite/ * gfortran.dg/goacc/loop-tree-1.f90: Add gimple scan-tree-dump test. * c-c++-common/goacc/reduction-1.c: Likewise. * c-c++-common/goacc/reduction-2.c: Likewise. * c-c++-common/goacc/reduction-3.c: Likewise. * c-c++-common/goacc/reduction-4.c: Likewise. libgomp/ * testsuite/libgomp.oacc-fortran/reduction-7.f90: Add explicit firstprivate clauses. * testsuite/libgomp.oacc-fortran/reduction-6.f90: Remove explicit copy clauses. * testsuite/libgomp.oacc-c-c++-common/reduction-7.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/reduction-cplx-flt.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/reduction-flt.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/collapse-2.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/loop-red-wv-1.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/collapse-4.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/loop-red-v-1.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/reduction-cplx-dbl.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/loop-red-g-1.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/loop-red-gwv-1.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/loop-red-w-1.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/reduction-dbl.c: Likewise. From-SVN: r239576
2016-08-18DWARF: do not emit DW_TAG_variable to materialize DWARF proceduresPierre-Marie de Rodat2-14/+9
Hello, For -gdwarf-3 and newer, the DWARF back-end sometimes generates DWARF procedures to factorize complex location descriptions. DWARF procedures can be materialized as DW_TAG_dwarf_procedure DIEs, but actually any DIE that can hold a DW_AT_location attribute is also accepted. Unlike what I thought at some point, the DW_TAG_dwarf_procedure tag was introduced in the DWARFv3 standard, not the DWARFv4 one, so the back-end can always emit DW_TAG_dwarf_procedure DIEs, as this simplifies code and prevents the types pruning pass from missing a DWARF procedure. Boostrapped and regtested on x86_64-linux: no regression. Ok to commit? Thank you in advance! gcc/ * dwarf2out.c (copy_dwarf_procedure): Remove obsolete comment. (new_dwarf_proc_die): Emit DW_TAG_dwarf_procedure DIEs even for -gdwarf-3. (function_to_dwarf_procedure): Update comment. From-SVN: r239575
2016-08-18Evict selftest tempfiles from the diagnostics file cacheDavid Malcolm4-0/+38
Selftests can use class selftest::temp_source_file to write out files for testing input-handling, and the files are unlinked in the dtor. This leads to stale entries in input.c's cache of file content, which could lead to errors if a temporary filename gets reused during a run of the selftests. We don't normally expect files to be "deleted from under us", so special-case this by adding a special way for temp_source_file's dtor to purge any cache entries referring to it. gcc/ChangeLog: * input.c (diagnostics_file_cache_forcibly_evict_file): New function. * input.h (diagnostics_file_cache_forcibly_evict_file): New declaration. * selftest.c (selftest::temp_source_file::~temp_source_file): Evict m_filename from the diagnostic file cache. From-SVN: r239570
2016-08-18tree-pass.h (make_pass_materialize_all_clones): Declare.Richard Biener6-1/+63
2016-08-18 Richard Biener <rguenther@suse.de> * tree-pass.h (make_pass_materialize_all_clones): Declare. * ipa.c (pass_data_materialize_all_clones, pass_materialize_all_clones, make_pass_materialize_all_clones): New simple IPA pass encapsulating clone materialization. * passes.def (all_late_ipa_passes): Start with pass_materialize_all_clones. * cgraphunit.c (symbol_table::compile): Remove call to materialize_all_clones. * tree-into-ssa.c: Include statistics.h. (update_ssa): Count number of times we do incremental/rewrite SSA update. From-SVN: r239567
2016-08-18re PR c/7652 (-Wswitch-break : Warn if a switch case falls through)Marek Polacek4-0/+16
PR c/7652 gcc/cp/ * call.c (add_builtin_candidate): Add gcc_fallthrough. * cxx-pretty-print.c (pp_cxx_unqualified_id): Likewise. * parser.c (cp_parser_skip_to_end_of_statement): Likewise. (cp_parser_cache_defarg): Likewise. libcpp/ * pch.c (write_macdef): Add CPP_FALLTHRU. From-SVN: r239566
2016-08-18re PR tree-optimization/77282 (test case gcc.dg/autopar/pr46193.c fails ↵Richard Biener2-1/+8
starting with r239414) 2016-08-18 Richard Biener <rguenther@suse.de> PR tree-optimization/77282 * tree-ssa-pre.c (eliminate_dom_walker::before_dom_children): When doing auto-parallelizing also prevent use of PHIs that carry dependences across loop backedges. From-SVN: r239565
2016-08-18[PATCH] [GCC] Don't use section anchors for declarations that don't fit in a ↵Tamar Christina2-0/+14
single anchor range On behalf of Tamar Christina  <tamar.christina@arm.com>. gcc/ * varasm.c (default_use_anchors_for_symbol_p): Reject too large decls. Co-Authored-By: Ramana Radhakrishnan <ramana.radhakrishnan@arm.com> From-SVN: r239561
2016-08-18ssa-iterators.h (ssa_vuse_operand): New inline.Richard Biener5-16/+106
2016-08-18 Richard Biener <rguenther@suse.de> * ssa-iterators.h (ssa_vuse_operand): New inline. * tree-if-conv.c (ifc_temp_var): Update virtual operand. (predicate_all_scalar_phis): Use remove_phi_node to remove phi nodes predicated. Delay removing virtual PHIs. (predicate_mem_writes): Update virtual operands. (combine_blocks): Likewise. Propagate out remaining virtual PHIs. (tree_if_conversion): Do not rewrite virtual SSA form. * tree-phinodes.c (release_phi_node): Make static. * tree-phinodes.h (release_phi_node): Remove. From-SVN: r239560
2016-08-18i386.c (enum ix86_builtins): Remove IX86_BUILTIN_* codes that appear in ↵Jakub Jelinek3-5070/+2730
bdesc_* arrays... * config/i386/i386.c (enum ix86_builtins): Remove IX86_BUILTIN_* codes that appear in bdesc_* arrays, instead include i386-builtin.def twice to define those. (bdesc_comi, bdesc_pcmpestr, bdesc_pcmpistr, bdesc_special_args, bdesc_args, bdesc_round_args, bdesc_mpx, bdesc_mpx_const, bdesc_multi_arg): Define by including i386-builtin.def the third time. * config/i386/i386-builtin.def: New file. From-SVN: r239559
2016-08-18Daily bump.GCC Administrator1-1/+1
From-SVN: r239553
2016-08-18input.c: move test functions within #CHECKING_P and into selftest::David Malcolm2-6/+19
gcc/ChangeLog: * input.c (get_source_range_for_char): Rename to... (selftest::get_source_range_for_char): ...this, and move within the #if CHECKING_P guard. (get_num_source_ranges_for_substring): Rename to... (selftest::get_num_source_ranges_for_substring): ...this, move within the #if CHECKING_P guard, and make static. (selftest::assert_num_substring_ranges): Initialize actual_num_ranges. From-SVN: r239550
2016-08-18[RELOAD] Don't assume subreg mem address is okAlan Modra4-3/+43
This patch fixes a case where reload blindly assumes a subreg mem is OK if its address has been partially reloaded by legitimize_reload_address. PR rtl-optimization/72771 * reload.c (find_reloads): Don't assume that a subreg mem is OK when find_reloads_toplev returns address_reloaded==-1. (alternative_allows_const_pool_ref): Update comment. testsuite/ * gcc.c-torture/compile/pr72771.c: New. From-SVN: r239549
2016-08-17re PR fortran/67496 (trans-array.c sanitizer runtime error: load of value ↵Jakub Jelinek4-11/+35
124, which is not a valid value for type 'bool') PR fortran/67496 * trans-array.c (trans_array_constructor): Load expr->ts.u.cl->length_from_typespec only if expr->ts.type is BT_CHARACTER. * gfortran.dg/pr67496.f90: New test. From-SVN: r239544
2016-08-17re PR tree-optimization/71752 (ICE in compute_live_loop_exits, at ↵Alan Hayward5-40/+82
tree-ssa-loop-manip.c:229 w/ -O1 -ftree-vectorize) 2015-08-17 Alan Hayward <alan.hayward@arm.com> PR tree-optimization/71752 * tree-vect-loop.c (vectorizable_reduction): Keep SLP operand ordering. * tree-vect-slp.c (vect_get_slp_defs): Handle null operands. PR tree-optimization/71752 * gcc.dg/vect/pr71752.c: New From-SVN: r239542
2016-08-17dec_init_2.f90: Use dg-add-options ieee.Uros Bizjak2-0/+5
* gfortran.dg/dec_init_2.f90: Use dg-add-options ieee. From-SVN: r239540
2016-08-17gimple-fold.c (gimple_fold_call): Use gimple_call_noreturn_p instead of ↵Jakub Jelinek5-6/+11
testing ECF_NORETURN bit in gimple_call_flags. * gimple-fold.c (gimple_fold_call): Use gimple_call_noreturn_p instead of testing ECF_NORETURN bit in gimple_call_flags. * tree-cfg.c (make_edges_bb, execute_fixup_cfg): Likewise. * predict.c (tree_bb_level_predictions): Likewise. * gimple-low.c (gimple_stmt_may_fallthru): Likewise. From-SVN: r239539
2016-08-17re PR middle-end/77259 (ICE in emit_move_insn since r232167)Jakub Jelinek5-2/+86
PR middle-end/77259 * tree-ssa-pre.c (eliminate_dom_walker::before_dom_children): If turning a call into __builtin_unreachable-like noreturn call, adjust gimple_call_set_fntype. * tree-cfgcleanup.c (fixup_noreturn_call): Remove lhs also if gimple_call_fntype has void return type. * g++.dg/ipa/devirt-52.C: New test. From-SVN: r239537
2016-08-17omp-low.c (lower_oacc_reductions): Adjust variable lookup to use ↵Chung-Lin Tang4-3/+79
maybe_lookup_decl... 2016-08-17 Chung-Lin Tang <cltang@codesourcery.com> * omp-low.c (lower_oacc_reductions): Adjust variable lookup to use maybe_lookup_decl, to handle nested acc loop directives. testsuite/ * c-c++-common/goacc/reduction-6.c: New testcase. From-SVN: r239530
2016-08-17re PR tree-optimization/76490 (when use -O2 -fcheck-founds compiler appears ↵Richard Biener5-17/+75
to hang and consumes all memory) 2016-08-17 Richard Biener <rguenther@suse.de> PR tree-optimization/76490 * tree-vrp.c (update_value_range): Preserve overflow infinities when intersecting with ranges from get_range_info. (operand_less_p): Handle overflow infinities correctly. (value_range_constant_singleton): Use vrp_operand_equal_p to handle overflow max/min correctly. (vrp_valueize): Likewise. (union_ranges): Likewise. (intersect_ranges): Likewise. (vrp_visit_phi_node): Improve iteration limitation to only apply when we'll possibly re-visit the PHI via a changed argument on the backedge. * gfortran.fortran-torture/compile/pr76490.f90: New testcase. * gcc.dg/pr52904.c: XFAIL. From-SVN: r239529
2016-08-17t-aprofile (MULTILIB_EXCEPTIONS): Rewrite into ...Thomas Preud'homme2-27/+27
2016-08-17 Thomas Preud'homme <thomas.preudhomme@arm.com> gcc/ * config/arm/t-aprofile (MULTILIB_EXCEPTIONS): Rewrite into ... (MULTILIB_REQUIRED): This by specifying multilib needing to be built rather than those that should not be built. From-SVN: r239528
2016-08-17016-08-17 Stanislaw Halik <sthalik@misaki.pl>Stanislaw Halik2-0/+9
PR target/66488 * config/i386/xm-mingw32.h (HOST_BITS_PER_PTR): Define if __x86_64__. From-SVN: r239525
2016-08-17tree-ssa.c: Include tree-cfg.h and tree-dfa.h.Richard Biener6-0/+143
2016-08-17 Richard Biener <rguenther@suse.de> * tree-ssa.c: Include tree-cfg.h and tree-dfa.h. (verify_vssa): New function verifying virtual SSA form. (verify_ssa): Call it. * tree-ssa-loop-manip.c (slpeel_update_phi_nodes_for_guard2): Do not apply loop-closed SSA handling to virtuals. * ssa-iterators.h (op_iter_init): Handle GIMPLE_TRANSACTION. * tree-into-ssa.c (prepare_use_sites_for): Skip virtual SSA names when rewriting their symbol. (prepare_def_site_for): Likewise. * tree-chkp-opt.c (chkp_reduce_bounds_lifetime): Clear virtual operands of moved stmts. From-SVN: r239524
2016-08-17re PR tree-optimization/23855 (loop header should also be pulled out of the ↵Richard Biener4-16/+46
inner loop too) 2016-08-17 Richard Biener <rguenther@suse.de> PR tree-optimization/23855 * tree-ssa-loop-unswitch.c: Include tree-ssa-loop-manip.h. (tree_unswitch_outer_loop): Iterate find_loop_guard as long as we find guards to hoist. Do not update SSA form but rewrite virtuals into loop closed SSA. (find_loop_guard): Adjust to skip already hoisted guards. Do not mark virtuals for renaming or update SSA form. * gcc.dg/loop-unswitch-2.c: Adjust. From-SVN: r239523
2016-08-17Do not use LONG_LONG_TYPE_SIZE in #if macro conditionMartin Liska4-16/+17
* coverage.c (get_gcov_type): Replace GCOV_TYPE_SIZE with a LONG_LONG_TYPE_SIZE comparison. * gcov-io.h: Remove macro definitions. * tree-profile.c (gimple_gen_edge_profiler): Replace usage of GCOV_TYPE_ATOMIC_FETCH_ADD with a LONG_LONG_TYPE_SIZE comparison. From-SVN: r239522
2016-08-17Daily bump.GCC Administrator1-1/+1
From-SVN: r239518
2016-08-17re PR tree-optimization/72817 (wrong code at -O3 on x86_64-linux-gnu (in ↵Jakub Jelinek2-1/+6
both 32-bit and 64-bit modes)) PR tree-optimization/72817 * gcc.dg/tree-ssa/pr72817.c (a): Change type from char to signed char. From-SVN: r239514
2016-08-16Update soft-fp from glibc (PR libgcc/77265).Joseph Myers2-0/+45
This patch updates soft-fp from glibc, bringing in the fix for PR libgcc/77265, XFmode extension to TFmode wrongly turning an infinity into a NaN. A test for that bug is added. Bootstrapped with no regressions on x86_64-pc-linux-gnu. PR libgcc/77265 gcc/testsuite: * gcc.dg/torture/float128-extend-inf.c: New test. libgcc: * soft-fp/adddf3.c: Update from glibc. * soft-fp/addsf3.c: Likewise. * soft-fp/addtf3.c: Likewise. * soft-fp/divdf3.c: Likewise. * soft-fp/divsf3.c: Likewise. * soft-fp/divtf3.c: Likewise. * soft-fp/double.h: Likewise. * soft-fp/eqdf2.c: Likewise. * soft-fp/eqsf2.c: Likewise. * soft-fp/eqtf2.c: Likewise. * soft-fp/extenddftf2.c: Likewise. * soft-fp/extended.h: Likewise. * soft-fp/extendsfdf2.c: Likewise. * soft-fp/extendsftf2.c: Likewise. * soft-fp/extendxftf2.c: Likewise. * soft-fp/fixdfdi.c: Likewise. * soft-fp/fixdfsi.c: Likewise. * soft-fp/fixdfti.c: Likewise. * soft-fp/fixsfdi.c: Likewise. * soft-fp/fixsfsi.c: Likewise. * soft-fp/fixsfti.c: Likewise. * soft-fp/fixtfdi.c: Likewise. * soft-fp/fixtfsi.c: Likewise. * soft-fp/fixtfti.c: Likewise. * soft-fp/fixunsdfdi.c: Likewise. * soft-fp/fixunsdfsi.c: Likewise. * soft-fp/fixunsdfti.c: Likewise. * soft-fp/fixunssfdi.c: Likewise. * soft-fp/fixunssfsi.c: Likewise. * soft-fp/fixunssfti.c: Likewise. * soft-fp/fixunstfdi.c: Likewise. * soft-fp/fixunstfsi.c: Likewise. * soft-fp/fixunstfti.c: Likewise. * soft-fp/floatdidf.c: Likewise. * soft-fp/floatdisf.c: Likewise. * soft-fp/floatditf.c: Likewise. * soft-fp/floatsidf.c: Likewise. * soft-fp/floatsisf.c: Likewise. * soft-fp/floatsitf.c: Likewise. * soft-fp/floattidf.c: Likewise. * soft-fp/floattisf.c: Likewise. * soft-fp/floattitf.c: Likewise. * soft-fp/floatundidf.c: Likewise. * soft-fp/floatundisf.c: Likewise. * soft-fp/floatunditf.c: Likewise. * soft-fp/floatunsidf.c: Likewise. * soft-fp/floatunsisf.c: Likewise. * soft-fp/floatunsitf.c: Likewise. * soft-fp/floatuntidf.c: Likewise. * soft-fp/floatuntisf.c: Likewise. * soft-fp/floatuntitf.c: Likewise. * soft-fp/gedf2.c: Likewise. * soft-fp/gesf2.c: Likewise. * soft-fp/getf2.c: Likewise. * soft-fp/ledf2.c: Likewise. * soft-fp/lesf2.c: Likewise. * soft-fp/letf2.c: Likewise. * soft-fp/muldf3.c: Likewise. * soft-fp/mulsf3.c: Likewise. * soft-fp/multf3.c: Likewise. * soft-fp/negdf2.c: Likewise. * soft-fp/negsf2.c: Likewise. * soft-fp/negtf2.c: Likewise. * soft-fp/op-1.h: Likewise. * soft-fp/op-2.h: Likewise. * soft-fp/op-4.h: Likewise. * soft-fp/op-8.h: Likewise. * soft-fp/op-common.h: Likewise. * soft-fp/quad.h: Likewise. * soft-fp/single.h: Likewise. * soft-fp/soft-fp.h: Likewise. * soft-fp/subdf3.c: Likewise. * soft-fp/subsf3.c: Likewise. * soft-fp/subtf3.c: Likewise. * soft-fp/truncdfsf2.c: Likewise. * soft-fp/trunctfdf2.c: Likewise. * soft-fp/trunctfsf2.c: Likewise. * soft-fp/trunctfxf2.c: Likewise. * soft-fp/unorddf2.c: Likewise. * soft-fp/unordsf2.c: Likewise. * soft-fp/unordtf2.c: Likewise. From-SVN: r239513
2016-08-16i386.c (enum ix86_builtins): Reorder enumerators...Jakub Jelinek2-1175/+1089
* config/i386/i386.c (enum ix86_builtins): Reorder enumerators, so that builtins not mentioned in bdesc_* arrays come first, then the ones mentioned in bdesc_* arrays in the order they appear in the arrays in between IX86_BUILTIN__BDESC_*_FIRST and IX86_BUILTIN__BDESC_*_LAST enumerator. (bdesc_mpx): Fix up a comment typo. (bdesc_multi_arg): Remove __builtin_ia32_vpcomne[bwdq] and __builtin_ia32_vpcomneu[bwdq] builtins. (BDESC_VERIFY, BDESC_VERIFYS): Define. (ix86_init_mmx_sse_builtins, ix86_init_mpx_builtins): Verify enum ix86_builtins ordering. (ix86_expand_builtin): Use enum ix86_builtins ordering assumption for direct bdesc_* array member access instead of searching all the arrays until an fcode match is found. From-SVN: r239512
2016-08-16i386.md (*ashl<mode>3_mask): Rewrite define_insn pattern as ↵Uros Bizjak2-35/+57
define_insn_and_split. * config/i386/i386.md (*ashl<mode>3_mask): Rewrite define_insn pattern as define_insn_and_split. Split insn before reload to ashl<mode>3_1. (*<shift_insn><mode>3_mask): Ditto. Split insn before reload to <shift_insn><mode>3_1. (*<rotate_insn><mode>3_mask): Ditto. Split insn before reload to <rotate_insn><mode>3_1. From-SVN: r239511
2016-08-16Fix caret locations in format_type_warning (PR c/72857)David Malcolm14-123/+305
gcc/c-family/ChangeLog: PR c/72857 * c-common.c (substring_loc::get_range): Rename to... (substring_loc::get_location): ...this, converting param from a source_range * to a location_t *. Call get_source_location_for_substring rather than get_source_range_for_substring, and pass in m_caret_idx. * c-common.h (substring_loc::substring_loc): Add param "caret_idx". (substring_loc::get_range): Replace with... (substring_loc::get_location): ...this. (substring_loc::set_caret_index): New method. (substring_loc): Add field m_caret_idx. * c-format.c (format_warning_va): Update for above changes. Rename local "substring_loc" to "fmt_substring_loc" to avoid clashing with type name. (format_warning_at_char): Add caret_idx param to substring_loc ctor. (check_argument_type): Likewise. (format_type_warning): Rename param "fmt_loc" to "whole_fmt_loc" Use a copy when emitting warnings, setting the caret index from TYPE. gcc/ChangeLog: PR c/72857 * input.c (get_source_range_for_substring): Rename to... (get_source_location_for_substring): ...this, adding param "caret_idx", and converting output param from source_range * to location_t *. (get_source_range_for_char): New function. (get_num_source_ranges_for_substring): Update comment to reflect above renaming. (assert_char_at_range): Update to use get_source_range_for_char rather than get_source_range_for_substring. (test_lexer_string_locations_concatenation_2): Likewise. * substring-locations.h (get_source_range_for_substring): Rename to... (get_source_location_for_substring): ...this, and adding param "caret_idx", and converting output param from source_range * to location_t *. gcc/testsuite/ChangeLog: PR c/72857 * gcc.dg/format/asm_fprintf-1.c: Restore column numbers for embedded NUL. * gcc.dg/format/c90-printf-1.c: Restore column numbers. * gcc.dg/format/diagnostic-ranges.c (test_hex): Update expected caret placement. (test_oct): Likewise. (test_multiple): Likewise. (test_field_width_specifier): Likewise. (test_field_width_specifier_2): New function. (test_field_precision_specifier): New function. (test_embedded_nul): Update expected caret placement. (test_non_contiguous_strings): Update line number. * gcc.dg/plugin/diagnostic-test-string-literals-1.c (__emit_string_literal_range): Add "caret_idx" param. (test_simple_string_literal): Add value for new param, updating expected output.. (test_concatenated_string_literal): Likewise. (test_multiline_string_literal): Likewise. (test_hex): Likewise. (test_oct): Likewise. (test_multiple): Likewise. (test_ucn4): Likewise. (test_ucn8): Likewise. (test_u8): Likewise. (test_u): Likewise; update expected message, from "range" to "location". (test_U): Likewise. (test_L): Likewise. (test_macro): Add value for new param. * gcc.dg/plugin/diagnostic-test-string-literals-2.c (__emit_string_literal_range): Add "caret_idx" param. (test_stringified_token_1): Add value for new param. Update expected message, from "range" to "location". (test_stringized_token_2): Likewise, adding param to macro. (test_stringified_token_3): Likewise. * gcc.dg/plugin/diagnostic_plugin_test_string_literals.c (emit_warning): Convert param from source_range to location_t. (test_string_literals): Add caret_idx param, and use it when constructing a substring_loc. Update error message, from "range" to "location". From-SVN: r239510
2016-08-16Move class temp_source_file from input.c to selftest.c/hDavid Malcolm4-42/+55
gcc/ChangeLog: * input.c (class selftest::temp_source_file): Move to selftest.h. (selftest::temp_source_file::temp_source_file): Move to selftest.c. (selftest::temp_source_file::~temp_source_file): Likewise. * selftest.c (selftest::temp_source_file::temp_source_file): Move here from input.c. (selftest::temp_source_file::~temp_source_file): Likewise. * selftest.h (class selftest::temp_source_file): Move here from input.c From-SVN: r239509
2016-08-16re PR target/71910 (ICE on valid OpenMP code)Jakub Jelinek4-9/+36
PR target/71910 * tree-cfg.c (execute_fixup_cfg): Add node variable, use it. Before inlining, add cgraph edge for the added __builtin_unreachable call. * g++.dg/gomp/pr71910.C: New test. From-SVN: r239508