1. 29 Sep, 2016 14 commits
  2. 28 Sep, 2016 26 commits
    • Disable .gnu.attributes tags in compatibility-ldbl.o · 6d49b790
      compatibility-ldbl.o is compiled with -mlong-double-64.  When
      long double .gnu.attributes tags are checked by the linker, it
      complains about the mismatch between this file and others in
      libstdc++.
      
      	* configure.ac (LONG_DOUBLE_COMPAT_FLAGS): New ACSUBST.
      	* src/Makefile.am (compatibility-ldbl.o, compatibility-ldbl.lo):
      	Use LONG_DOUBLE_COMPAT_FLAGS.
      	* Makefile.in: Regenerate.
      	* configure: Regenerate.
      	* doc/Makefile.in: Regenerate.
      	* include/Makefile.in: Regenerate.
      	* libsupc++/Makefile.in: Regenerate.
      	* po/Makefile.in: Regenerate.
      	* python/Makefile.in: Regenerate.
      	* src/Makefile.in: Regenerate.
      	* src/c++11/Makefile.in: Regenerate.
      	* src/c++98/Makefile.in: Regenerate.
      	* src/filesystem/Makefile.in: Regenerate.
      	* testsuite/Makefile.in: Regenerate.
      
      From-SVN: r240602
      Alan Modra committed
    • [RS6000] .gnu.attributes Tag_GNU_Power_ABI_FP · e9dda04f
      Extend this attribute to cover long double ABIs, for 64-bit too.
      
      This patch also corrects an error that crept in to code setting
      rs6000_passes_float.  See the added comment.  Passing IEEE128 values
      in vsx regs ought to set both Tag_GNU_Power_ABI_FP and
      Tag_GNU_Power_ABI_Vector.  Also adds a new option, default on, that
      disables output of .gnu_attribute assembly directives.
      
      	* config/rs6000/sysv4.opt (mgnu-attribute): New option.
      	* doc/invoke.texi: Document it.
      	* config/rs6000/rs6000.c (HAVE_LD_PPC_GNU_ATTR_LONG_DOUBLE): Define.
      	(rs6000_passes_float): Comment.
      	(rs6000_passes_long_double): New static var.
      	(call_ABI_of_interest): Return false unless rs6000_gnu_attr is set.
      	(init_cumulative_args): Set up to emit fp .gnu_attribute for
      	ELF 64-bit ABIs as well as 32-bit ELF.  Correct rs6000_passes_float
      	to include fp values returned in vectors.
      	Set rs6000_passes_long_double.
      	(rs6000_function_arg_advance_1): Likewise for function args.
      	(rs6000_elf_file_end): Emit fp .gnu_attribute for ELF 64-bit ABIs,
      	and SPE.  Emit long double tag value too.
      	(rs6000_opt_vars): Add gnu-attr.
      	* configure.ac (HAVE_LD_PPC_GNU_ATTR_LONG_DOUBLE): New ppc32 test.
      	* configure: Regenerate.
      	* config.in: Regenerate.
      
      From-SVN: r240601
      Alan Modra committed
    • gimple-ssa-sprintf.c (pass_sprintf_length::gate): Use x > 0 instead of 0 < x. · 91eaca5e
      	* gimple-ssa-sprintf.c (pass_sprintf_length::gate): Use x > 0 instead
      	of 0 < x.
      	(format_floating, format_string, format_directive,
      	get_destination_size, pass_sprintf_length::handle_gimple_call):
      	Likewise.
      
      From-SVN: r240600
      Jakub Jelinek committed
    • re PR target/77756 (__get_cpuid() returns wrong values for level 7 (extended features)) · 12a813c1
      	PR target/77756
      	* config/i386/cpuid.h (__get_cpuid): Handle CPUID level >= 7.
      
      testsuite/ChangeLog:
      
      	PR target/77756
      	* gcc.target/i386/pr77756.c: New test.
      
      From-SVN: r240597
      Uros Bizjak committed
    • PR middle-end/77721 - -Wformat-length not uses arg range for converted vars · 88000fd1
      gcc/testsuite/ChangeLog:
      	PR middle-end/77721
      	* gcc.dg/tree-ssa/builtin-sprintf-warn-6.c: New test.
      
      From-SVN: r240595
      Martin Sebor committed
    • gimple-ssa-sprintf.c: Fix comment formatting. · 5fe39ec0
      	* gimple-ssa-sprintf.c: Fix comment formatting.
      	(format_integer): Use is_gimple_assign.
      	(pass_sprintf_length::handle_gimple_call): Use gimple_call_builtin_p
      	and gimple_call_fndecl.  Reorder case BUILT_IN_SPRINTF_CHK.  Fix up
      	BUILT_IN_SNPRINTF_CHK comment.  Replace "to to" with "to" in comment.
      	(pass_sprintf_length::execute): Use is_gimple_call.
      
      From-SVN: r240594
      Jakub Jelinek committed
    • re PR fortran/77707 (formatted direct access: nextrec off by one) · 0c172974
      2016-09-28  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
      
      	PR libgfortran/77707
      	* gfortran.dg/inquire_17.f90: New test.
      
      From-SVN: r240593
      Jerry DeLisle committed
    • re PR fortran/77707 (formatted direct access: nextrec off by one) · b89f743d
      2016-09-28  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
      
      	PR libgfortran/77707
      	io/transfer.c (next_record): Flush before calculating next_record.
      	Correctly calculate.
      
      From-SVN: r240592
      Jerry DeLisle committed
    • re PR c++/77467 (Segmentation fault with switch statement in constexpr function) · 4b390698
      	PR c++/77467
      	* constexpr.c (enum constexpr_switch_state): New.
      	(struct constexpr_ctx): Add css_state field.
      	(label_matches): Add CTX and STMT arguments, remove I and
      	DEFAULT_LABEL.  For CASE_LABEL_EXPR assert ctx->css_state != NULL,
      	handle default labels according to css_state.
      	(cxx_eval_statement_list): Remove statement skipping, label_matches
      	and default_label handling code.
      	(cxx_eval_loop_expr): Exit after first iteration even if
      	switches (jump_target).
      	(cxx_eval_switch_expr): Set up css_state field in ctx, if default
      	label has been seen in the body, but no cases matched, evaluate
      	the body second time.
      	(cxx_eval_constant_expression): Handle stmt skipping and label_matches
      	here.  Handle PREDICT_EXPR.  For MODIFY_EXPR or INIT_EXPR, assert
      	statement is not skipped.  For COND_EXPR during skipping, don't
      	evaluate condition, just the then block and if still skipping at the
      	end also the else block.
      	(cxx_eval_outermost_constant_expr): Adjust constexpr_ctx initializer.
      	(is_sub_constant_expr): Likewise.
      
      	* g++.dg/cpp1y/constexpr-77467.C: New test.
      
      From-SVN: r240591
      Jakub Jelinek committed
    • cpuinfo.c (__get_cpuid_output): Remove. · e0ab3753
      	* config/i386/cpuinfo.c (__get_cpuid_output): Remove.
      	(__cpu_indicator_init): Call __get_cpuid, not __get_cpuid_output.
      
      From-SVN: r240590
      Uros Bizjak committed
    • * include/std/chrono (system_clock): Fix typo in comment. · b236debd
      From-SVN: r240589
      Jonathan Wakely committed
    • libgo: fix for runtime/check failure with "-O0 -g" · 58920998
          
          Tweak the makefile rules for the runtime/check test to
          insure that the runtime package is compiled with
          "-fgo-compiling-runtime". This resolves a test failure
          (unsat on runtime.getcallerpc) when in a build directory where the
          compiler flags have been configured to disable optimization.
          
          Reviewed-on: https://go-review.googlesource.com/30010
      
      From-SVN: r240588
      Ian Lance Taylor committed
    • Check for overflow in filesystem::last_write_time · fd5effb1
      	* include/experimental/bits/fs_fwd.h (file_time_type): Simplify
      	definition.
      	* src/filesystem/ops.cc (file_time): Take error_code parameter and
      	check for overflow.
      	(do_copy_file, last_write_time): Pass error_code in file_time calls.
      	* testsuite/experimental/filesystem/operations/last_write_time.cc:
      	New.
      	* testsuite/util/testsuite_fs.h (scoped_file): Define RAII helper.
      
      From-SVN: r240587
      Jonathan Wakely committed
    • If strchr can't be folded in gimple-fold... · 93c9b105
      If strchr can't be folded in gimple-fold, we still need to fall into
      the generic code so the folding code in builtins.c is also called.
      
          gcc/
      	* gimple-fold.c (gimple_fold_builtin): After failing to fold
      	strchr, also try the generic folding.
      
      From-SVN: r240585
      Wilco Dijkstra committed
    • PR c/77762 - Incorrect destination buffer length in -Wformat-length warning · 2b1b5938
      gcc/testsuite/ChangeLog:
      
      	PR c/77762
      	* gcc.dg/tree-ssa/builtin-sprintf-warn-1.c (test_vsnprintf_chk_s):
      	Call __builtin___vsnprintf_chk, not __builtin___snprintf_chk.
      	(test_sprintf_p_const): Adjust line numbers to avoid failures
      	introduced in r240503.
      
      gcc/ChangeLog:
      
      	PR c/77762
      	* gimple-ssa-sprintf.c (pass_sprintf_length::handle_gimple_call):
      	Fix typos.
      
      From-SVN: r240584
      Martin Sebor committed
    • PR middle-end/77683 - ICE on %lf directive in format_floating in · 30dc6ee9
      gcc/testsuite/ChangeLog:
      
      	PR middle-end/77683
      	* gcc.dg/tree-ssa/builtin-sprintf-warn-1.c: Add test cases.
      
      gcc/ChangeLog:
      
      	PR middle-end/77683
      	* gimple-ssa-sprintf.c (format_integer): Fail gracefully when
      	length modifier is not expected.
      	(format_floating): Ignore l length modifier and fail gracefuly
      	when it isn't one of the other expected ones.
      
      From-SVN: r240583
      Martin Sebor committed
    • PR bootstrap/77753 - [7 Regression] broken profiledbootstrap due to · c5a13998
      gcc/ChangeLog:
      
      	PR bootstrap/77753
      	* varasm.c (assemble_addr_to_section): Increase local buffer size.
      
      From-SVN: r240581
      Martin Sebor committed
    • dwarf2out.c (cu_die_list): New global. · b23d063b
      2016-09-27  Richard Biener  <rguenther@suse.de>
      
      	* dwarf2out.c (cu_die_list): New global.
      	(dwarf2out_finish): Walk cu_die_list instead of limbo DIEs.  Add
      	main_comp_unit_die to cu_die_list if we created it.
      	Move break_out_includes ...
      	(dwarf2out_early_finish): ... here.  Push created CU DIEs onto
      	the cu_die_list.
      
      From-SVN: r240579
      Richard Biener committed
    • dwarf2out.c (struct die_struct): Add removed flag. · 8fd57d04
      2016-09-28  Richard Biener  <rguenther@suse.de>
      
      	* dwarf2out.c (struct die_struct): Add removed flag.
      	(lookup_type_die): If the DIE is marked as removed, clear
      	TYPE_SYMTAB_DIE and return NULL.
      	(lookup_decl_die): If the DIE is marked as removed, remove it
      	from the hash and return NULL.
      	(mark_removed): New helper.
      	(prune_unused_types_prune): Call it for removed DIEs.
      	(gen_subprogram_die): Move the premark_used_types call to after
      	DIEs for the functions scopes are generated.
      	(process_scope_var): Do not re-create pruned types or type decls.
      	Make sure to also re-parent type decls.
      	(dwarf2out_finish): Move unused type pruning and debug_types
      	handling ...
      	(dwarf2out_early_finish): ... here.
      
      From-SVN: r240578
      Richard Biener committed
    • [ARC] New CPU C-define handler. · cf07c3de
      gcc/
      2016-09-29  Claudiu Zissulescu  <claziss@synopsys.com>
      
      	* config/arc/arc-c.c: New file.
      	* config/arc/arc-c.def: Likewise.
      	* config/arc/t-arc: Likewise.
      	* config.gcc: Include arc-c.o as c and cpp object.
      	* config/arc/arc-protos.h (arc_cpu_cpp_builtins): Add prototype.
      	* config/arc/arc.h (TARGET_CPU_CPP_BUILTINS): Use
      	arc_cpu_cpp_builtins.
      
      From-SVN: r240577
      Claudiu Zissulescu committed
    • [ARC] Add simple shift/rotate ops. · c6d66e90
      2016-09-29  Claudiu Zissulescu  <claziss@synopsys.com>
      
      	* config/arc/arc.md (*rotrsi3_cnt1): New pattern,
      	(*ashlsi2_cnt1, *lshrsi3_cnt1, *ashrsi3_cnt1): Likewise.
      
      From-SVN: r240576
      Claudiu Zissulescu committed
    • re PR c++/77748 (pr77550.C fails on arm-none-eabi) · fcf32bad
      2016-09-28  Bernd Edlinger  <bernd.edlinger@hotmail.de>
      
              PR c++/77748
              * g++.dg/pr77550.C: Avoid undefined behavior.
      
      From-SVN: r240573
      Bernd Edlinger committed
    • pr68198.c: Fix dg-final. · 7d290e93
      2016-09-28  Bernd Edlinger  <bernd.edlinger@hotmail.de>
      
              * gcc.dg/tree-ssa/pr68198.c: Fix dg-final.
      
      From-SVN: r240572
      Bernd Edlinger committed
    • gimple-pretty-print.c (dump_gimple_call_args): Simplify "' " printing. · bc43e0ec
      	* gimple-pretty-print.c (dump_gimple_call_args): Simplify "' "
      	printing.
      
      From-SVN: r240570
      Nathan Sidwell committed
    • [ARC COMMITTED] MAINTAINERS (Reviewers): Add myself. · a29b7214
      2016-09-28  Claudiu Zissulescu  <claziss@synopsys.com>
      
      	* MAINTAINERS (Reviewers): Add myself.
      
      From-SVN: r240569
      Claudiu Zissulescu committed
    • Optimize strchr (s, 0) to s + strlen (s). · 912d9ec3
      Optimize strchr (s, 0) to s + strlen (s).  strchr (s, 0) appears a common
      idiom for finding the end of a string, however it is not a very efficient
      way of doing so.  Strlen is a much simpler operation which is significantly
      faster (eg. on x86 strlen is 50% faster for strings of 8 bytes and about
      twice as fast as strchr on strings of 1KB).
      
          gcc/
      	* gimple-fold.c (gimple_fold_builtin_strchr):
      	New function to optimize strchr (s, 0) to strlen.
      	(gimple_fold_builtin): Add BUILT_IN_STRCHR case.
      
          testsuite/
      	* gcc.dg/strlenopt-20.c: Update test.
      	* gcc.dg/strlenopt-21.c: Likewise.
      	* gcc.dg/strlenopt-22.c: Likewise.
      	* gcc.dg/strlenopt-22g.c: Likewise.
      	* gcc.dg/strlenopt-26.c: Likewise.
      	* gcc.dg/strlenopt-5.c: Likewise.
      	* gcc.dg/strlenopt-7.c: Likewise.
      	* gcc.dg/strlenopt-9.c: Likewise.
      
      From-SVN: r240568
      Wilco Dijkstra committed