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
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-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
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-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-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
* 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-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-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
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
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
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
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
* acinclude.m4 (GLIBCXX_CONFIGURE_TESTSUITE): Check for presence of
setrlimit on both native and cross targets.
* configure: Regenerate.
From-SVN: r239955
gcc/c-family/ChangeLog:
* c-ada-spec.c (dump_ada_function_declaration): Increase buffer
size to guarantee it fits the output of the formatted function
regardless of its arguments.
gcc/cp/ChangeLog:
* mangle.c: Increase buffer size to guarantee it fits the output
of the formatted function regardless of its arguments.
gcc/go/ChangeLog:
* gofrontend/expressions.cc: Increase buffer size to guarantee
it fits the output of the formatted function regardless of its
arguments.
gcc/java/ChangeLog:
* decl.c (give_name_to_locals): Increase buffer size to guarantee
it fits the output of the formatted function regardless of its
arguments.
* mangle_name.c (append_unicode_mangled_name): Same.
gcc/ChangeLog:
* genmatch.c (parser::parse_expr): Increase buffer size to guarantee
it fits the output of the formatted function regardless of its
arguments.
* gcc/genmodes.c (parser::parse_expr): Same.
* gimplify.c (gimplify_asm_expr): Same.
* passes.c (pass_manager::register_one_dump_file): Same.
* print-tree.c (print_node): Same.
From-SVN: r239949
Various patterns use "register_operand" "l" (or "=l") although those
patterns are only created refering to LR_REGNO directly. This patch
changes those patterns to use the hard regs as well.
* config/rs6000/rs6000.md (*restore_gpregs_<mode>_r11,
*restore_gpregs_<mode>_r12, *restore_gpregs_<mode>_r1,
*return_and_restore_gpregs_<mode>_r11,
*return_and_restore_gpregs_<mode>_r12,
*return_and_restore_gpregs_<mode>_r1,
*return_and_restore_fpregs_<mode>_r11,
*return_and_restore_fpregs_<mode>_r12,
*return_and_restore_fpregs_<mode>_r1): Use the hard register LR_REGNO
directly instead of via the "l" constraint. Renumber operands.
Fix whitespace.
From-SVN: r239942
Many places still use 65 instead of the symbolic constant LR_REGNO. This
fixes them all (I looked for the string "65" only, in config/rs6000/ only,
I didn't read all code :-) )
I left it in *restore_world because Iain will remove it there soon.
* config/rs6000/altivec.md (*save_world, *save_vregs_<mode>_r11,
save_vregs_<mode>_r12, *restore_vregs_<mode>_r11,
*restore_vregs_<mode>_r12): Use LR_REGNO instead of 65.
* config/rs6000/darwin.md (load_macho_picbase, load_macho_picbase_si,
load_macho_picbase_di, *call_indirect_nonlocal_darwin64,
*call_nonlocal_darwin64, *call_value_indirect_nonlocal_darwin64,
*call_value_nonlocal_darwin64, reload_macho_picbase,
reload_macho_picbase_si, reload_macho_picbase_di): Ditto.
* config/rs6000/rs6000.h (RETURN_ADDR_IN_PREVIOUS_FRAME): Ditto.
* config/rs6000/rs6000.md (*save_gpregs_<mode>_r11,
*save_gpregs_<mode>_r12, *save_gpregs_<mode>_r1,
*save_fpregs_<mode>_r11, *save_fpregs_<mode>_r12,
*save_fpregs_<mode>_r1): Ditto.
* config/rs6000/spe.md (*save_gpregs_spe, *restore_gpregs_spe,
*return_and_restore_gpregs_spe): Ditto.
From-SVN: r239941