aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2016-09-07Improve aarch64_legitimize_address - avoid splitting the offset if it is ↵Wilco Dijkstra2-2/+17
supported. Improve aarch64_legitimize_address - avoid splitting the offset if it is supported. When we do split, take the mode size into account. BLKmode falls into the unaligned case but should be treated like LDP/STP. This improves codesize slightly due to fewer base address calculations: int f(int *p) { return p[5000] + p[7000]; } Now generates: f: add x0, x0, 16384 ldr w1, [x0, 3616] ldr w0, [x0, 11616] add w0, w1, w0 ret instead of: f: add x1, x0, 16384 add x0, x0, 24576 ldr w1, [x1, 3616] ldr w0, [x0, 3424] add w0, w1, w0 ret gcc/ * config/aarch64/aarch64.c (aarch64_legitimize_address): Avoid use of base_offset if offset already in range. From-SVN: r240026
2016-09-07re PR tree-optimization/77450 (ICE: in verify_ssa, at tree-ssa.c:1016 on ↵Richard Biener2-0/+7
very simple code with vectors) 2016-09-07 Richard Biener <rguenther@suse.de> PR c/77450 * c-c++-common/vector-subscript-8.c: Move .. * gcc.dg/pr77450.c: ... here. From-SVN: r240025
2016-09-07[SH] Move definitions for atomic models to sh.h from sh-protos.h.Kaz Kojima3-53/+69
From-SVN: r240023
2016-09-07Daily bump.GCC Administrator1-1/+1
From-SVN: r240022
2016-09-06Fix dates on changelogJerry DeLisle2-2/+2
From-SVN: r240019
2016-09-06re PR libfortran/77393 (Revision r237735 changed the behavior of F0.0)Jerry DeLisle5-4/+43
2016-09-06 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR libgfortran/77393 * io/write_float.def (build_float_string): Recognize when the result will not fit in the user provided, star fill, and exit early. * gfortran.dg/fmt_f0_2.f90: Update test. * gfortran.dg/fmt_f0_3.f90: New test. From-SVN: r240018
2016-09-07re PR debug/77389 (FAIL: g++.dg/debug/dwarf2/template-params-12f.C ↵Dominique d'Humieres3-2/+11
-std=gnu++11 scan-assembler-times DIE \\\\([^\\n]*\\\\) DW_TAG_template_value_param ...) 2016-09-07 Dominique d'Humieres <dominiq@lps.ens.fr> PR debug/77389 * g++.dg/debug/dwarf2/template-params-12g.C: Pass -gno-strict-dwarf in dg-options. PR debug/57519 * g++.dg/debug/dwarf2/imported-decl-2.C: Likewise. From-SVN: r240015
2016-09-06re PR target/69255 (ICE on x86_64-linux-gnu in "emit_move_insn")Jakub Jelinek6-2/+66
PR target/69255 * config/i386/i386.c (ix86_expand_builtin): For builtin with unsupported or unknown ISA, use expand_call. * gcc.target/i386/pr69255-1.c: New test. * gcc.target/i386/pr69255-2.c: New test. * gcc.target/i386/pr69255-3.c: New test. From-SVN: r240014
2016-09-06PR c/77336 - -Wsuggest-attribute=format warning overly simplisticMartin Sebor4-3/+61
gcc/c-family/ChangeLog: PR c/77336 * c-format.c (check_function_format): Avoid issuing warnings for functions unless they call format functions with non-constant format strings. gcc/testsuite/ChangeLog: PR c/77336 * gcc.dg/format/miss-7.c: New test. From-SVN: r240013
2016-09-06c_by_val_1.f: Correct the call to c_to_c and c_to_c8.Uros Bizjak2-4/+8
* gfortran.dg/c_by_val_1.f: Correct the call to c_to_c and c_to_c8. From-SVN: r240009
2016-09-06Detect whether target can use -fprofile-update=atomicMartin Liska6-5/+80
PR gcov-profile/77378 PR gcov-profile/77466 * libgcov-profiler.c: Use __GCC_HAVE_SYNC_COMPARE_AND_SWAP_{4,8} to conditionaly enable/disable *_atomic functions. PR gcov-profile/77378 PR gcov-profile/77466 * tree-profile.c (tree_profiling): Detect whether target can use -fprofile-update=atomic. PR gcov-profile/77378 PR gcov-profile/77466 * gcc.dg/profile-update-warning.c: New test. From-SVN: r240008
2016-09-06re PR tree-optimization/77479 (Compile time hog w/ -O2 (-Os))Richard Biener4-13/+55
2016-09-06 Richard Biener <rguenther@suse.de> PR tree-optimization/77479 * tree-vrp.c (update_value_range): Extend overflow handling to VARYING. * gcc.dg/torture/pr77479.c: New testcase. From-SVN: r240007
2016-09-06re PR tree-optimization/77450 (ICE: in verify_ssa, at tree-ssa.c:1016 on ↵Richard Biener5-3/+26
very simple code with vectors) 2016-09-06 Richard Biener <rguenther@suse.de> PR c/77450 c-family/ * c-common.c (c_common_mark_addressable_vec): Handle COMPOUND_LITERAL_EXPR. * c-c++-common/vector-subscript-7.c: Adjust. * c-c++-common/vector-subscript-8.c: New testcase. From-SVN: r240006
2016-09-06Skip Wno-frame-address test for avrSenthil Kumar Selvaraj2-1/+5
The avr backend supports __builtin_return_address only for the current stack frame. The test expects it to work for caller frames as well and therefore fails for avr. Add avr to the list of targets already excluded with dg-skip-if. gcc/testsuite/ChangeLog: 2016-09-06 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com> * gcc.dg/Wno-frame-address.c: Skip for avr-*-*. From-SVN: r240005
2016-09-06Daily bump.GCC Administrator1-1/+1
From-SVN: r240004
2016-09-05variant: include bits/move.h for std::addressof.Tim Shen2-0/+5
2016-09-05 Tim Shen <timshen@google.com> * include/std/variant: include bits/move.h for std::addressof. From-SVN: r240001
2016-09-05re PR target/77476 ([AVX-512] illegal kmovb instruction on KNL)Jakub Jelinek6-4/+123
PR target/77476 * config/i386/i386.md (isa): Add x64_avx512bw. (*zero_extendsidi2): For alternative 11 use x64_avx512bw isa. (kmov_isa): New mode attr. (zero_extend<mode>di2): Use <kmov_isa> isa for the last alternative. (*zero_extend<mode>si2): Likewise. (*zero_extendqihi2): Use avx512dq isa for the last alternative. * gcc.target/i386/avx512f-pr77476.c: New test. * gcc.target/i386/avx512bw-pr77476.c: New test. * gcc.target/i386/avx512dq-pr77476.c: New test. From-SVN: r240000
2016-09-05target-supports.exp (check_effective_target_vect_simd_clones): Update ↵Jakub Jelinek2-4/+7
comment to mention also avx512f. * lib/target-supports.exp (check_effective_target_vect_simd_clones): Update comment to mention also avx512f. From-SVN: r239999
2016-09-05re PR sanitizer/77396 (address sanitizer crashes if all static global ↵Jakub Jelinek4-3/+26
variables are optimized) PR sanitizer/77396 * asan/asan_globals.cc: Cherry-pick upstream r280657. * g++.dg/asan/pr77396-2.C: New test. From-SVN: r239998
2016-09-05ChangeLog formatting fixes.Jakub Jelinek12-166/+166
From-SVN: r239997
2016-09-05variant (_Variant_storage::_M_storage()): Use std::addressof instead of ↵Mikhail Strelnikov2-1/+6
operator& to take address. 2016-09-05 Mikhail Strelnikov <mikhail.strelnikov@gmail.com> * include/std/variant (_Variant_storage::_M_storage()): Use std::addressof instead of operator& to take address. From-SVN: r239996
2016-09-05invoke.texi (SPU Options): nops -> NOPs.Gerald Pfeifer2-5/+10
* doc/invoke.texi (SPU Options): nops -> NOPs. (x86 Options): Ditto. From-SVN: r239995
2016-09-05re PR middle-end/77475 (unnecessary or misleading context in reporting ↵Jakub Jelinek2-0/+9
command line problems) PR middle-end/77475 * toplev.c (process_options): Temporarily set input_location to UNKNOWN_LOCATION around targetm.target_option.override () call. From-SVN: r239994
2016-09-05* sv.po: Update.Joseph Myers2-172/+103
From-SVN: r239992
2016-09-05re PR target/77452 (ICE: in plus_constant, at explow.c:87 with ↵Uros Bizjak4-1/+33
-fno-split-wide-types -mavx512f --param=max-combine-insns=2) PR rtl-optimization/77452 * explow.c (plus_constant) <case MEM>: Extract scalar constant from inner-mode reference to a CONST_VECTOR constant in the constant pool. testsuite/ChangeLog: PR rtl-optimization/77452 * gcc.target/i386/pr77452.c: New test. From-SVN: r239989
2016-09-05re PR c/77423 (-Wlogical-not-parentheses false positive for bitwise ↵Marek Polacek6-5/+86
expression with _Bool operands) PR c/77423 * doc/invoke.texi: Update -Wlogical-not-parentheses documentation. * c-common.c (bool_promoted_to_int_p): New function. (expr_has_boolean_operands_p): New function. (warn_logical_not_parentheses): Return if expr_has_boolean_operands_p. (maybe_warn_bool_compare): Use bool_promoted_to_int_p. * c-c++-common/Wlogical-not-parentheses-3.c: New test. From-SVN: r239988
2016-09-05re PR other/77421 (Bugs found in GCC with the help of PVS-Studio)Jakub Jelinek2-16/+18
PR other/77421 * gensupport.c (alter_output_for_subst_insn): Remove redundant *insn_out == '*' test. Don't copy unnecessary to yet another memory buffer, and don't leak it. From-SVN: r239987
2016-09-05re PR rtl-optimization/77425 (Pointer test follows dereference in sched-int.h)Jakub Jelinek2-2/+6
PR rtl-optimization/77425 * ipa-devirt.c (get_odr_type): Set val->id unconditionally. From-SVN: r239986
2016-09-05Daily bump.GCC Administrator1-1/+1
From-SVN: r239985
2016-09-04re PR fortran/77391 (gfortran allows CHARACTER(LEN=:),PARAMETER:: ↵Steven G. Kargl4-11/+45
STRING='constant' buts does not report it as an extension) 2016-09-04 Steven G. Kargl <kargl@gcc.gnu.org> PR fortran/77391 * resolve.c (deferred_requirements): New function to check F2008:C402. (resolve_fl_variable,resolve_fl_parameter): Use it. 2016-09-04 Steven G. Kargl <kargl@gcc.gnu.org> PR fortran/77391 * gfortran.dg/pr77391.f90: New test. From-SVN: r239982
2016-09-04re PR web/50642 (onlinedocs formated text too small to read)Gerald Pfeifer1-0/+1
PR documentation/50642 * update_web_docs_svn (CSS): Introduce. Have generated files refer to it. From-SVN: r239981
2016-09-04update_web_docs_svn (CSS): Introduce.Gerald Pfeifer2-1/+8
* update_web_docs_svn (CSS): Introduce. Have generated files refer to it. From-SVN: r239980
2016-09-04re PR fortran/77460 (ICE when summing an overflowing array)Steven G. Kargl4-0/+20
2016-09-04 Steven G. Kargl <kargl@gcc.gnu.org> PR fortran/77460 * simplify.c (simplify_transformation_to_scalar): On error, result may be NULL, simply return. 2016-09-04 Steven G. Kargl <kargl@gcc.gnu.org> PR fortran/77460 * gfortran.dg/pr77460.f90: New test. From-SVN: r239979
2016-09-04ffi.c (ffi_struct_type): Put type declaration on separate line.John David Anglin6-93/+224
* src/pa/ffi.c (ffi_struct_type): Put type declaration on separate line. (ffi_prep_args_pa32): Likewise. (ffi_size_stack_pa32): Likewise. (ffi_prep_cif_machdep): Likewise. (ffi_call): Likewise. Rename to ffi_call_int. Add closure argument and update call to ffi_call_pa32. (ffi_call, ffi_call_go, ffi_prep_go_closure): New. (ffi_closure_inner_pa32): Update to handle go closures. * src/pa/ffitarget.h (FFI_GO_CLOSURES): Define. * src/pa/hpux32.S (ffi_call_pa32): Pass go closure argument in static chain register (%ret1). (ffi_closure_pa32): Set closure type argument to zero. (ffi_go_closure_pa32): New function. Add unwind data for it. * src/pa/linux.S: Likewise. Use cfi directives for unwind data. * testsuite/libffi.go/static-chain.h (STATIC_CHAIN_REG): Define for hppa. From-SVN: r239978
2016-09-04re PR fortran/71902 (Unneeded temporary on reallocatable character assignment)Thomas Koenig3-2/+45
2016-09-04 Thomas Koenig <tkoenig@gcc.gnu.org> PR fortran/71902 * frontend-passes.c (realloc_string_callback): Also check for the lhs being deferred. Name temporary variable "realloc_string". 2016-09-04 Thomas Koenig <tkoenig@gcc.gnu.org> PR fortran/71902 * gfortran.dg/dependency_47.f90: New test. * gfortran.dg/dependency_49.f90: New test. From-SVN: r239977
2016-09-04inclhack.def (hpux_longjmp): Adjust select regular expression.John David Anglin3-4/+9
* inclhack.def (hpux_longjmp): Adjust select regular expression. * fixincl.x: Regenerate. From-SVN: r239976
2016-09-04Revert "Replace error_at with assert in build_va_arg"Tom de Vries2-2/+20
2016-09-04 Tom de Vries <tom@codesourcery.com> revert: 2016-08-29 Tom de Vries <tom@codesourcery.com> * c-common.c (build_va_arg): Replace first argument type error with assert. From-SVN: r239975
2016-09-04Daily bump.GCC Administrator1-1/+1
From-SVN: r239974
2016-09-03ubsan.c (ubsan_use_new_style_p): Fix check for empty string.Kirill Yukhin2-1/+5
gcc/ * ubsan.c (ubsan_use_new_style_p): Fix check for empty string. From-SVN: r239971
2016-09-03re PR c/65467 ([libgomp] sorry, unimplemented: '_Atomic' with OpenMP)Jakub Jelinek2-0/+6
PR c/65467 * gcc.dg/gomp/_Atomic-4.c: Require vect_simd_clones effective target. From-SVN: r239970
2016-09-03Daily bump.GCC Administrator1-1/+1
From-SVN: r239969
2016-09-02avx512f-klogic-2.c: Fix operand calculation order.Kirill Yukhin2-1/+5
gcc/testsuite/ * gcc.target/i386/avx512f-klogic-2.c: Fix operand calculation order. From-SVN: r239966
2016-09-02Add -fdiagnostics-generate-patchDavid Malcolm9-2/+163
gcc/ChangeLog: * common.opt (fdiagnostics-generate-patch): New option. * diagnostic.c: Include "edit-context.h". (diagnostic_initialize): Initialize context->edit_context_ptr. (diagnostic_finish): Delete context->edit_context_ptr. (diagnostic_report_diagnostic): Add fix-it hints from the diagnostic to context->edit_context_ptr, if any. * diagnostic.h (class edit_context): Add forward decl. (struct diagnostic_context): Add field "edit_context_ptr". * doc/invoke.texi (Diagnostic Message Formatting Options): Add -fdiagnostics-generate-patch. (-fdiagnostics-generate-patch): New item. * toplev.c: Include "edit-context.h". (process_options): Set global_dc->edit_context_ptr to a new edit_context if the options need one. (toplev::main): Handle -fdiagnostics-generate-patch by using global_dc->edit_context_ptr. gcc/testsuite/ChangeLog: * gcc.dg/plugin/diagnostic-test-show-locus-generate-patch.c: New test case. * gcc.dg/plugin/plugin.exp (plugin_test_list): Add diagnostic-test-show-locus-generate-patch.c to the sources for diagnostic_plugin_test_show_locus.c. From-SVN: r239965
2016-09-02re PR c/65467 ([libgomp] sorry, unimplemented: '_Atomic' with OpenMP)Jakub Jelinek17-59/+670
PR c/65467 * gimplify.c (gimplify_adjust_omp_clauses_1): Diagnose implicit map and firstprivate clauses on target construct for _Atomic qualified decls. (gimplify_adjust_omp_clauses): Diagnose explicit firstprivate clauses on target construct for _Atomic qualified decls. * omp-low.c (use_pointer_for_field): Return true for _Atomic qualified decls. * omp-simd-clone.c (simd_clone_clauses_extract): Warn and give up for _Atomic qualified arguments not mentioned in uniform clause. c/ * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if flag_openmp. (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue instead of mark_exp_read on low_bound/length expression. (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads, c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize, c_parser_omp_clause_priority, c_parser_omp_clause_hint, c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause, c_parser_oacc_clause_tile, c_parser_omp_clause_schedule, c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned, c_parser_omp_clause_linear, c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen, c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue instead of mark_expr_read. (c_parser_omp_declare_reduction): Reject _Atomic qualified types. * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR, LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine. * c-tree.h (c_omp_clause_copy_ctor): New prototype. * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified array section bases outside of depend clause, for depend clause use convert_lvalue_to_rvalue on the base. (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction, linear, aligned, map, to and from clauses. (c_omp_clause_copy_ctor): New function. c-family/ * c-omp.c (c_finish_omp_atomic): Reject _Atomic qualified expressions. (c_finish_omp_for): Reject _Atomic qualified iterators. testsuite/ * gcc.dg/gomp/_Atomic-1.c: New test. * gcc.dg/gomp/_Atomic-2.c: New test. * gcc.dg/gomp/_Atomic-3.c: New test. * gcc.dg/gomp/_Atomic-4.c: New test. * gcc.dg/gomp/_Atomic-5.c: New test. From-SVN: r239964
2016-09-02Introduce class edit_contextDavid Malcolm12-11/+1675
gcc/ChangeLog: * Makefile.in (OBJS-libcommon): Add edit-context.o. * diagnostic-color.c (color_dict): Add "diff-filename", "diff-hunk", "diff-delete", and "diff-insert". (parse_gcc_colors): Update default value of GCC_COLORS in comment to reflect above changes. * doc/invoke.texi (-fdiagnostics-color): Update description of default GCC_COLORS, and of the supported capabilities. * edit-context.c: New file. * edit-context.h: New file. * input.c (struct fcache): Add field "missing_trailing_newline". (diagnostics_file_cache_forcibly_evict_file): Initialize it to true. (add_file_to_cache_tab): Likewise. (fcache::fcache): Likewise. (get_next_line): Update c->missing_trailing_newline. (location_missing_trailing_newline): New function. * input.h (location_missing_trailing_newline): New decl. * selftest-run-tests.c (selftest::run_tests): Call edit_context_c_tests. * selftest.h (edit_context_c_tests): New decl. libcpp/ChangeLog: * include/line-map.h (rich_location::seen_impossible_fixit_p): New accessor. From-SVN: r239963
2016-09-02re PR tree-optimization/77444 (Bogus assignments in cand_value_at)Jakub Jelinek2-2/+10
PR tree-optimization/77444 * tree-ssa-loop-ivopts.c (cand_value_at): For pointers use sizetype as steptype, remove redundant initialization. Co-Authored-By: Richard Biener <rguenther@suse.de> From-SVN: r239962
2016-09-02re PR sanitizer/77396 (address sanitizer crashes if all static global ↵Jakub Jelinek7-13/+74
variables are optimized) PR sanitizer/77396 * sanopt.c: Include gimple-ssa.h, tree-phinodes.h and ssa-iterators.h. (sanopt_optimize_walker): Optimize away __asan_before_dynamic_init (...) followed by __asan_after_dynamic_init () without intervening memory loads/stores. * ipa-pure-const.c (special_builtin_state): Handle BUILT_IN_ASAN_BEFORE_DYNAMIC_INIT and BUILT_IN_ASAN_AFTER_DYNAMIC_INIT. * decl2.c (do_static_initialization_or_destruction): Only call asan_dynamic_init_call if INITP is true. * g++.dg/asan/pr77396.C: New test. From-SVN: r239961
2016-09-02cfg.c (free_original_copy_tables): Replace second assignment of bb_copy = ↵Prathamesh Kulkarni2-1/+6
NULL by bb_original = NULL. 2016-09-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org> * cfg.c (free_original_copy_tables): Replace second assignment of bb_copy = NULL by bb_original = NULL. From-SVN: r239960
2016-09-02re PR other/77421 (Bugs found in GCC with the help of PVS-Studio)Jakub Jelinek2-1/+6
PR other/77421 * config/i386/i386.c (ix86_expanded_args_builtin): Remove redundant assignment added in r216794. From-SVN: r239959
2016-09-02Improvements to typed_splay_treeDavid Malcolm6-0/+158
This patch adds foreach, max and min methods to class typed_splay_tree, along with the start of a selftest suite. gcc/ChangeLog: * Makefile.in (OBJS): Add typed-splay-tree.o. * selftest-run-tests.c (selftest::run_tests): Call typed_splay_tree_c_tests. * selftest.h (typed_splay_tree_c_tests): New decl. * typed-splay-tree.c: New file. * typed-splay-tree.h (typed_splay_tree::foreach_fn): New typedef. (typed_splay_tree::max): New method. (typed_splay_tree::min): New method. (typed_splay_tree::foreach): New method. (typed_splay_tree::closure): New struct. (typed_splay_tree::inner_foreach_fn): New function. From-SVN: r239958