1. 28 Jan, 2017 3 commits
  2. 27 Jan, 2017 25 commits
  3. 26 Jan, 2017 12 commits
    • gimple-ssa-sprintf.c (format_floating): Test HAVE_XFmode and HAVE_DFmode before… · 9976a810
      gimple-ssa-sprintf.c (format_floating): Test HAVE_XFmode and HAVE_DFmode before using XFmode or DFmode.
      
      gcc/ChangeLog:
      	* gimple-ssa-sprintf.c (format_floating): Test HAVE_XFmode and
      	HAVE_DFmode before using XFmode or DFmode.
      	(parse_directive): Avoid using the z length modifier to avoid
      	the ISO C++98 does not support the ‘z’ gnu_printf length modifier.
      
      From-SVN: r244957
      Martin Sebor committed
    • PR middle-end/78703 - fprintf-return-value floating point handling incorrect in… · 31c87a43
      PR middle-end/78703 - fprintf-return-value floating point handling incorrect in locales with a mulltibyte decimal point
      
      gcc/ChangeLog:
              PR middle-end/78703
              * gimple-ssa-sprintf.c (adjust_for_width_or_precision): Change
              to accept adjustment as an array.
              (get_int_range): New function.
              (struct directive): Make width and prec arrays.
              (directive::set_width, directive::set_precision): Call get_int_range.
              (format_integer, format_floating): Handle width and precision ranges.
              (format_string, parse_directive): Same.
      
      gcc/testsuite/ChangeLog:
              PR middle-end/78703
              * gcc.dg/tree-ssa/builtin-snprintf-warn-1.c: Update
              * gcc.dg/tree-ssa/builtin-sprintf-warn-9.c: Rename...
              * gcc.dg/tree-ssa/builtin-sprintf-warn-10.c: ...to this.
              * gcc.dg/tree-ssa/builtin-sprintf-warn-9.c: New test.
      
      From-SVN: r244956
      Martin Sebor committed
    • re PR c++/79129 (ICE with -fdebug-types-section starting with r240578) · b0670cc0
      	PR debug/79129
      	* dwarf2out.c (generate_skeleton_bottom_up): For children with
      	comdat_type_p set, just clone them, but keep the children in the
      	original DIE.
      
      	* g++.dg/debug/dwarf2/pr79129.C: New test.
      
      From-SVN: r244955
      Jakub Jelinek committed
    • re PR debug/78835 (ICE with -fdebug-types-section and member function) · f7c06c0f
      	PR debug/78835
      	* dwarf2out.c (prune_unused_types): Mark all functions with DIEs
      	which have direct callers with -fvar-tracking-assignments enabled
      	in the current TU.
      	(resolve_addr): Avoid adding skeleton DIEs for DW_AT_call_origin
      	inside of type units.
      
      	* g++.dg/debug/dwarf2/pr78835.C: New test.
      
      From-SVN: r244954
      Jakub Jelinek committed
    • PR middle-end/78703 -fprintf-return-value floating point handling incorrect in… · 5d93da1d
      PR middle-end/78703 -fprintf-return-value floating point handling incorrect in locales with a mulltibyte decimal point
      
      gcc/ChangeLog:
      	PR middle-end/78703
      	* gimple-ssa-sprintf.c (struct result_range): Add likely and
      	unlikely counters.
      	(struct format_result): Replace number_chars, number_chars_min,
      	and number_chars_max with a single member of struct result_range.
      	Remove bounded.
      	(format_result::operator+=): Adjust.
      	(struct fmtresult): Remove bounded.  Handle likely and unlikely
      	counters.
      	(fmtresult::adjust_for_width_or_precision): New function.
      	(fmtresult:type_max_digits): New function.
      	(bytes_remaining): Handle likely and unlikely counters.
      	(min_bytes_remaining): Remove.
      	(format_percent): Simplify.
      	(format_integer, format_floating): Set likely and unlikely counters.
      	(get_string_length, format_character, format_string): Same.
      	(format_plain, should_warn_p): New function.
      	(maybe_warn): Call should_warn_p.  Update diagnostic messages
      	and handle those for all directives, including plain strings.
      	(format_directive): Handle likely and unlikely counters.
      	Remove unnecessary quoting from diagnostics.  Add an informational
      	note.
      	(add_bytes): Remove.
      	(pass_sprintf_length::compute_format_length): Simplify.
      	(try_substitute_return_value): Handle likely and unlikely counters.
      
      gcc/testsuite/ChangeLog:
      
      	PR middle-end/78703
      	* gcc.dg/format/pr78569.c: Adjust.
      	* gcc.dg/tree-ssa/builtin-snprintf-warn-2.c: Same.
      	* gcc.dg/tree-ssa/builtin-sprintf-2.c: Same.
      	* gcc.dg/tree-ssa/builtin-sprintf-5.c: Same.
      	* gcc.dg/tree-ssa/builtin-sprintf-warn-1.c: Same.
      	* gcc.dg/tree-ssa/builtin-sprintf-warn-2.c: Same.
      	* gcc.dg/tree-ssa/builtin-sprintf-warn-3.c: Same.
      	* gcc.dg/tree-ssa/builtin-sprintf-warn-4.c: Same.
      	* gcc.dg/tree-ssa/builtin-sprintf-warn-6.c: Same.
      	* gcc.dg/tree-ssa/builtin-sprintf-warn-7.c: Same.
      	* gcc.dg/tree-ssa/builtin-sprintf-warn-9.c: Same.
      	* gcc.dg/tree-ssa/builtin-sprintf.c: Same.
      
      From-SVN: r244953
      Martin Sebor committed
    • PR libstdc++/70607 revert recent changes to <tr1/complex> · c8699672
      	PR libstdc++/70607
      	* include/tr1/complex (conj): Remove using-declaration and restore
      	overloads, reverting previous change.
      
      From-SVN: r244951
      Jonathan Wakely committed
    • Fix libstdc++ testsuite failures in C++98 and C++11 mode · 881191e8
      	* testsuite/23_containers/list/operations/78389.cc: Fix for C++11
      	mode.
      	* testsuite/23_containers/priority_queue/requirements/constructible.cc:
      	Mark as unsupported in C++98 mode.
      	* testsuite/23_containers/queue/requirements/constructible.cc:
      	Likewise.
      	* testsuite/23_containers/stack/requirements/constructible.cc:
      	Likewise.
      	* testsuite/25_algorithms/make_heap/movable.cc: Fix for C++11 mode.
      
      From-SVN: r244950
      Jonathan Wakely committed
    • re PR c++/68727 (invalid offsetof expressions accepted) · 905d2812
      	PR c++/68727
      	* cp-tree.def (OFFSETOF_EXPR): Bump number of operands to 2.
      	* cp-tree.h (finish_offsetof): Add OBJECT_PTR argument.
      	* parser.c (cp_parser_builtin_offsetof): Pass result of
      	build_static_cast of null_pointer_node to finish_offsetof.
      	* semantics.c (finish_offsetof): Add OBJECT_PTR argument, use
      	it for -Winvalid-offsetof pedwarn instead of trying to guess
      	original offsetof type from EXPR.  Save OBJECT_PTR as a new
      	second operand to OFFSETOF_EXPR.
      	* pt.c (tsubst_copy_and_build) <case OFFSETOF_EXPR>: Adjust
      	finish_offsetof caller, pass the second operand of OFFSETOF_EXPR
      	as OBJECT_PTR.
      
      	* g++.dg/other/offsetof8.C: Add expected error.
      	* g++.dg/other/offsetof9.C: New test.
      
      From-SVN: r244949
      Jakub Jelinek committed
    • * testsuite/lib/libgomp.exp · c1cadde1
      	(check_effective_target_hsa_offloading_selected_nocache): Fix up
      	check_compile invocation.  Fix up removal of executable.  Drop
      	bogus "2>&1" argument.
      
      From-SVN: r244948
      Jakub Jelinek committed
    • runtime: fix setting of isarchive · 41d3d0ac
          
          When I updated to Go 1.8, the initsig function moved from
          signal1_unix.go to signal_unix.go, and lost a gccgo-specific change in
          the move.  Add it back.
          
          This would have been caught by the misc/cgo/testcarchive tests in the
          gc repository, but we don't run those in the gccgo repository.  We
          should fix that, somehow.
          
          Reviewed-on: https://go-review.googlesource.com/35839
      
      From-SVN: r244947
      Ian Lance Taylor committed
    • runtime: fix context used by getTraceback · fda6ee70
          
          I typoed the argument passed to getcontext in getTraceback, and the
          error was hidden by ucontext_arg.  This would have been caught by some
          of the runtime package tests, but we don't run most of them because
          they rely on `go build`, and the go tool is not available while
          running the libgo testsuite.  We should fix the libgo testsuite,
          somehow, so that they run.
          
          Reviewed-on: https://go-review.googlesource.com/35837
      
      From-SVN: r244946
      Ian Lance Taylor committed
    • Fix namespace versioning and remove __detail::__identity helpers · 3e5fb20f
      	PR libstdc++/79243
      	* include/bits/c++config (literals::string_view_literals::__7): Add.
      	Only declare versioned namespaces for the relevant C++ dialects.
      	* include/experimental/bits/erase_if.h (fundamentals_v2::__detail):
      	Add versioning macros.
      	* include/experimental/bits/lfts_config.h:
      	(fundamentals_v1::__detail::__7, fundamentals_v2::__detail::__7): Add.
      	* include/experimental/string_view (fundamentals_v2::__detail):
      	Add versioning macros.
      	(fundamentals_v2::__detail::__identity): Remove.
      	(fundamentals_v2::__detail::__idt): Use common_type instead of
      	__detail::__identity.
      	* include/std/string_view (__detail::__identity, __detail::__idt):
      	Likewise.
      	(literals::string_view_literals): Fix nesting of versioning macros.
      
      From-SVN: r244945
      Jonathan Wakely committed