1. 31 Oct, 2016 17 commits
    • re PR c++/78089 (__builtin_shuffle parsing bug) · c5fed5c6
      	PR c++/78089
      	* parser.c (cp_parser_postfix_expression): Replace return statement in
      	the first switch with setting postfix_expression to the return
      	expression and break;.
      
      	* c-c++-common/builtin-shuffle-1.c: New test.
      	* g++.dg/cpp0x/addressof3.C: New test.
      
      From-SVN: r241710
      Jakub Jelinek committed
    • dwarf2out.h (enum dw_val_class): Add dw_val_class_const_implicit... · f04c1e0a
      	* dwarf2out.h (enum dw_val_class): Add dw_val_class_const_implicit,
      	dw_val_class_unsigned_const_implicit and dw_val_class_file_implicit.
      	(struct dw_val_node): Add val_file_implicit field.
      	* dwarf2out.c (dw_val_equal_p, print_dw_val, attr_checksum,
      	attr_checksum_ordered, same_dw_val_p, size_of_die, value_format,
      	output_die): Handle dw_val_class_const_implicit,
      	dw_val_class_unsigned_const_implicit and dw_val_class_file_implicit.
      	(abbrev_die_table): Change into va_gc vec.
      	(abbrev_die_table_allocated, abbrev_die_table_in_use,
      	ABBREV_DIE_TABLE_INCREMENT): Remove.
      	(AT_int, AT_unsigned, AT_file): Allow dw_val_class_*_implicit.
      	(abbrev_opt_start, abbrev_usage_count, sorted_abbrev_dies): New
      	variables.
      	(build_abbrev_table): Adjust for abbrev_die_table being a va_gc vec.
      	If abbrev_opt_start, fill in abbrev_usage_count and abbrev_dies
      	vectors.
      	(die_abbrev_cmp, optimize_implicit_const, optimize_abbrev_table): New
      	functions.
      	(output_die_abbrevs): For DW_FORM_implicit_const emit sleb128 with
      	the implicit value.
      	(output_abbrev_section): Adjust for abbrev_die_table being a va_gc
      	vec.
      	(output_comp_unit): Initialize abbrev_opt_start if emitting the main
      	unit.  Call optimize_abbrev_table.
      	(dwarf2out_init, dwarf2out_finish, dwarf2out_c_finalize): Adjust for
      	abbrev_die_table being a va_gc vec.
      
      From-SVN: r241709
      Jakub Jelinek committed
    • Add tests for a const member and a reference member for launder. · aee69156
      * g++.dg/cpp1z/launder3.C: New.
      * g++.dg/cpp1z/launder4.C: Likewise.
      * g++.dg/cpp1z/launder5.C: Likewise.
      * g++.dg/cpp1z/launder5.cc: Likewise.
      * g++.dg/cpp1z/launder5.h: Likewise.
      * g++.dg/cpp1z/launder6.C: Likewise.
      * g++.dg/cpp1z/launder6.cc: Likewise.
      * g++.dg/cpp1z/launder6.h: Likewise.
      
      From-SVN: r241708
      Ville Voutilainen committed
    • re PR c++/77948 (Option processing of -std=c++11 -std=gnu++11 doesn't reset ext_numeric_literals) · dcb466ec
      	PR c++/77948
      	* c.opt (fext-numeric-literals): Add Var and Init.
      	* c-opts.c (c_common_handle_option): Don't clear
      	cpp_opts->ext_numeric_literals for -std=c++{11,14,1z}.
      	(c_common_post_options): Clear it here if not set
      	explicitly.
      
      	* g++.dg/cpp0x/pr77948-1.C: New test.
      	* g++.dg/cpp0x/pr77948-2.C: New test.
      	* g++.dg/cpp0x/pr77948-3.C: New test.
      	* g++.dg/cpp0x/pr77948-4.C: New test.
      	* g++.dg/cpp0x/pr77948-5.C: New test.
      	* g++.dg/cpp0x/pr77948-6.C: New test.
      
      From-SVN: r241707
      Jakub Jelinek committed
    • re PR tree-optimization/77860 (ICE in gimple_build_assign_1, at gimple.c:420) · 1e4fa9b1
      	PR tree-optimization/77860
      	* tree-ssa-reassoc.c (eliminate_using_constants): Handle
      	also integral complex and vector constants.
      
      	* gcc.dg/pr77860.c: New test.
      
      From-SVN: r241706
      Jakub Jelinek committed
    • dwarf2out.c (dwarf2out_define, [...]): Replace DW_MACRO_GNU_* constants with… · 520c47e8
      dwarf2out.c (dwarf2out_define, [...]): Replace DW_MACRO_GNU_* constants with corresponding DW_MACRO_* constants.
      
      	* dwarf2out.c (dwarf2out_define, dwarf2out_undef, output_macinfo_op,
      	optimize_macinfo_range, save_macinfo_strings): Replace
      	DW_MACRO_GNU_* constants with corresponding DW_MACRO_* constants.
      	(output_macinfo): Likewise.  Emit .debug_macro* rather than
      	.debug_macinfo* even for -gstrict-dwarf -gdwarf-5.
      	(init_sections_and_labels): Use .debug_macro* labels rather than
      	.debug_macinfo* labels even for -gstrict-dwarf -gdwarf-5.
      	(dwarf2out_finish): Use DW_AT_macros instead of DW_AT_macro_info
      	or DW_AT_GNU_macros for -gdwarf-5.
      
      From-SVN: r241705
      Jakub Jelinek committed
    • linux.h (UCLIBC_DYNAMIC_LINKER): Define. · c667cdd7
      2016-10-31  Waldemar Brodkorb  <wbx@openadk.org>
      
      	* config/microblaze/linux.h (UCLIBC_DYNAMIC_LINKER): Define.
      
      From-SVN: r241704
      Waldemar Brodkorb committed
    • Index... · 457cc672
      Index: ChangeLog
      ===================================================================
      --- ChangeLog	(revision 241702)
      +++ ChangeLog	(working copy)
      @@ -1,5 +1,10 @@
       2016-10-27  Carl Love  <cel@us.ibm.com>
       
      +	* MAINTAINERS (Write After Approval): Fix my entry in the Write After
      +	Approval list to make it alphabetical.
      +
      +2016-10-27  Carl Love  <cel@us.ibm.com>
      +
       	* MAINTAINERS (Write After Approval): Add myself.
       
       2016-10-27  Andrew Burgess  <andrew.burgess@embecosm.com>
      Index: MAINTAINERS
      ===================================================================
      --- MAINTAINERS	(revision 241702)
      +++ MAINTAINERS	(working copy)
      @@ -477,9 +477,9 @@
       Gabor Loki					<loki@inf.u-szeged.hu>
       Sandra Loosemore				<sandra@codesourcery.com>
       Manuel López-Ibáñez				<manu@gcc.gnu.org>
      +Carl Love					<cel@us.ibm.com>
       Martin v. Löwis					<loewis@informatik.hu-berlin.de>
       H.J. Lu						<hjl.tools@gmail.com>
      -Carl Love					<cel@us.ibm.com>
       Christophe Lyon					<christophe.lyon@st.com>
       Luis Machado					<luisgpm@br.ibm.com>
       Ziga Mahkovec					<ziga.mahkovec@klika.si>
      
      From-SVN: r241703
      Carl Love committed
    • alpha-passes.def: Swap pass_convert_to_eh_region_ranges and pass_shorten_branches positions. · 85771f28
      	* config/alpha/alpha-passes.def: Swap pass_convert_to_eh_region_ranges
      	  and pass_shorten_branches positions.
      
      From-SVN: r241702
      Uros Bizjak committed
    • Skip gcc.dg/lto/pr60449_0.c for avr · dd57b05e
      The testcase requires gettimeofday to be available for the target. The avr
      target doesn't have an implementation, so the test always fails with a
      linker error.
      
      gcc/testsuite
      
      2016-10-31  Senthil Kumar Selvaraj  <senthil_kumar.selvaraj@atmel.com>
      
      	* gcc.dg/lto/pr60449_0.c: Skip for avr.
      
      From-SVN: r241701
      Senthil Kumar Selvaraj committed
    • re PR c++/77886 (-Wimplicit-fallthrough: breaks duff's device (in function templates)) · e8d8d3c8
      	PR c++/77886
      	* pt.c (tsubst_expr) <case CASE_LABEL_EXPR> Copy over
      	FALLTHROUGH_LABEL_P flag to the new LABEL_DECL.
      	(tsubst_expr) <case LABEL_EXPR>: Likewise.
      
      	* g++.dg/warn/Wimplicit-fallthrough-2.C: New test.
      
      From-SVN: r241700
      Jakub Jelinek committed
    • Add -Wshadow=global -Wshadow=local and -Wshadow=compatible-local. · 84ff4775
      This patch from Le-Chun Wu adds two new shadow warning flags for
      C and C++:
      
        -Wshadow=local which warns if a local variable shadows another local
        variable or parameter,
      
        -Wshadow=compatible-local which warns if a local variable shadows
        another local variable or parameter whose type is compatible with
        that of the shadowing variable.
      
      It is already on the google/main branch (Google ref 39127) and was
      previously submitted by Diego Novillo and reviewed on
      http://codereview.appspot.com/4452058
      
      I addressed the review comments and made the following changes:
      - Add -Wshadow=global (the default alias for -Wshadow).
      - Make the documented options -Wshadow=global, -Wshadow=local
        and -Wshadow=compatible-local (with hidden undocumented aliases
        -Wshadow-local and -Wshadow-compatible-local for compatibility).
      - The -Wshadow=global, -Wshadow=local and -Wshadow=compatible-local
        relationships are expressed in common.opt instead of in opts.c
        and documented in invoke.texi.
      - The "previous declaration" warnings were turned into notes and use
        the (now) existing infrastructure instead of duplicating the warnings.
        The testcases have been adjusted to expect the notes.
      - The conditional change in name-lookup.c for non-locals (where we
        don't want to change the warnings, but just check the global ones)
        has been dropped.
      - Use warning_at in c-decl.c (warn_if_shadowing).
      
      gcc/ChangeLog:
      2016-10-30  Le-Chun Wu  <lcwu@google.com>
                  Mark Wielaard  <mjw@redhat.com>
      
             * doc/invoke.texi: Document Wshadow-local and Wshadow-compatible-local.
             * common.opt (Wshadow=global): New option. Default for -Wshadow.
             (Wshadow=local): New option.
             (Wshadow-local): Hidden alias for -Wshadow=local.
             (Wshadow=compatible-local): New option.
             (Wshadow-compatible-local): Hidden alias for
             -Wshadow=compatible-local.
             * doc/invoke.texi: Document Wshadow=global, Wshadow=local and
             Wshadow=compatible-local.
      
      gcc/c/ChangeLog:
      2016-10-30  Le-Chun Wu  <lcwu@google.com>
                  Mark Wielaard  <mjw@redhat.com>
      
             * c-decl.c (warn_if_shadowing): Use the warning code corresponding
             to the given -Wshadow= variant. Use warning_at.
      
      gcc/cp/ChangeLog:
      2016-10-30  Le-Chun Wu  <lcwu@google.com>
                  Mark Wielaard  <mjw@redhat.com>
      
             * name-lookup.c (pushdecl_maybe_friend): When emitting a
             shadowing warning, use the code corresponding to the
             given -Wshadow= variant.
      
      gcc/testsuite/ChangeLog
      2016-10-30  Le-Chun Wu  <lcwu@google.com>
                  Mark Wielaard  <mjw@redhat.com>
      
             * gcc.dg/Wshadow-compatible-local-1.c: New test.
             * gcc.dg/Wshadow-local-1.c: Likewise.
             * gcc.dg/Wshadow-local-2.c: Likewise.
             * g++.dg/warn/Wshadow-compatible-local-1.C: Likewise.
             * g++.dg/warn/Wshadow-local-1.C: Likewise.
             * g++.dg/warn/Wshadow-local-2.C: Likewise.
      
      Co-Authored-By: Mark Wielaard <mjw@redhat.com>
      
      From-SVN: r241699
      Le-Chun Wu committed
    • re PR lto/78129 (-Werror=suggest-final-types leads to -ENOSPC.) · 65179585
      2016-10-31  Richard Biener  <rguenther@suse.de>
      
      	PR lto/78129
      	* lto.c (do_whole_program_analysis): Bail out after errors
      	from WPA analysis.
      
      From-SVN: r241698
      Richard Biener committed
    • tree-vect-slp.c (vect_get_and_check_slp_defs): New parameter SWAP. · 4cecd659
      	* tree-vect-slp.c (vect_get_and_check_slp_defs): New parameter SWAP.
      	Check slp defs for COND_EXPR by swapping/inverting operands if the
      	new parameter SWAP indicates so.
      	(vect_build_slp_tree_1): New parameter SWAP.  Check COND_EXPR stmt
      	is isomorphic to the first stmt via swapping/inverting.  Store swap
      	information in the new parameter SWAP.
      	(vect_build_slp_tree): New local array SWAP and pass it to function
      	vect_build_slp_tree_1.  Cleanup result handling code for function
      	call to vect_get_and_check_slp_defs.  Skip operand swapping if the
      	order of operands has been fixed as indicated by SWAP[i].
      
      From-SVN: r241697
      Bin Cheng committed
    • tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Skip unnecessary data… · 2c6a05b1
      tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Skip unnecessary data dependence check after visited store stmt.
      
      	* tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Skip
      	unnecessary data dependence check after visited store stmt.
      
      From-SVN: r241696
      Bin Cheng committed
    • re PR tree-optimization/71915 (A missed opportunity for SLSR) · 0b56e9ad
      [gcc]
      
      2016-10-30  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
      
      	PR tree-optimization/71915
      	PR tree-optimization/71490
      	* gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
      	stride_type field.
      	(find_basis_for_base_expr): Require stride types to match when
      	seeking a basis.
      	(alloc_cand_and_find_basis): Record the stride type.
      	(slsr_process_phi): Pass stride type to alloc_cand_and_find_basis.
      	(backtrace_base_for_ref): Pass types to legal_cast_p_1 rather than
      	the expressions having those types.
      	(slsr_process_ref): Pass stride type to alloc_cand_and_find_basis.
      	(create_mul_ssa_cand): Likewise.
      	(create_mul_imm_cand): Likewise.
      	(create_add_ssa_cand): Likewise.
      	(create_add_imm_cand): Likewise.
      	(legal_cast_p_1): Change interface to accept types rather than the
      	expressions having those types.
      	(legal_cast_p): Pass types to legal_cast_p_1.
      	(slsr_process_cast): Pass stride type to
      	alloc_cand_and_find_basis.
      	(slsr_process_copy): Likewise.
      	(dump_candidate): Display stride type when a cast exists.
      	(create_add_on_incoming_edge): Introduce a cast when necessary for
      	the stride type.
      	(analyze_increments): Change the code checking for invalid casts
      	to rely on the stride type, and update the documentation and
      	example.  Change the code checking for pointer multiplies to rely
      	on the stride type.
      	(insert_initializers): Introduce a cast when necessary for the
      	stride type.  Use the stride type for the type of the initializer.
      
      [gcc/testsuite]
      
      2016-10-30  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
      
      	PR tree-optimization/71915
      	PR tree-optimization/71490
      	* gcc.dg/tree-ssa/pr54245.c: Delete.
      	* gcc.dg/tree-ssa/slsr-8.c: Adjust for new optimization and
      	document why.
      
      From-SVN: r241695
      Bill Schmidt committed
    • Daily bump. · 8972aa33
      From-SVN: r241694
      GCC Administrator committed
  2. 30 Oct, 2016 7 commits
  3. 29 Oct, 2016 7 commits
  4. 28 Oct, 2016 9 commits
    • re PR fortran/71891 (fortran/symbol.c:4864: suspicious if ?) · fdfc9e44
      2016-10-28  Steven G. Kargl <kargl@gcc.gnu.org>
      
      	PR fortran/71891
      	* symbol.c (gfc_type_compatible): Fix typo.
      
      From-SVN: r241668
      Steven G. Kargl committed
    • compiler, runtime: copy slice code from Go 1.7 runtime · 94f56408
          
          Change the compiler handle append as the gc compiler does: call a
          function to grow the slice, but otherwise assign the new elements
          directly to the final slice.
          
          For the current gccgo memory allocator the slice code has to call
          runtime_newarray, not mallocgc directly, so that the allocator sets the
          TypeInfo_Array bit in the type pointer.
          
          Rename the static function cnew to runtime_docnew, so that the stack
          trace ignores it when ignoring runtime functions.  This was needed to
          fix the runtime/pprof tests on 386.
          
          Reviewed-on: https://go-review.googlesource.com/32218
      
      From-SVN: r241667
      Ian Lance Taylor committed
    • target.def (min_arithmetic_precision): New hook. · 894d8b41
      	* target.def (min_arithmetic_precision): New hook.
      	* doc/tm.texi.in (Misc): Add TARGET_MIN_ARITHMETIC_PRECISION.
      	* doc/tm.texi: Regenerate.
      	* internal-fn.c (expand_arith_overflow): Adjust handling of target
      	dependent support by means of TARGET_MIN_ARITHMETIC_PRECISION.
      	* targhooks.c (default_min_arithmetic_precision): New function.
      	* targhooks.h (default_min_arithmetic_precision): Declare.
      	* config/sparc/sparc.c (TARGET_MIN_ARITHMETIC_PRECISION): Define.
      	(sparc_min_arithmetic_precision): New function.
      
      From-SVN: r241665
      Eric Botcazou committed
    • combine: Improve change_zero_ext (fixes PR71847) · 9a5e1efc
      This improves a few things in change_zero_ext.  Firstly, it should use
      the passed in pattern in recog_for_combine, not the pattern of the insn
      (they are not the same if the whole pattern was replaced).  Secondly,
      it handled zero_ext of a subreg, but with hard registers we do not get
      a subreg, instead the mode of the reg is changed.  So this handles that.
      Thirdly, after changing a zero_ext to an AND, the resulting RTL may become
      non-canonical, like (ior (ashift ..) (and ..)); the AND should be first,
      it is commutative.  And lastly, zero_extract as a set_dest wasn't handled
      at all, but now it is.
      
      This fixes the testcase in PR71847, and improves code generation in some
      other edge cases too.
      
      
      	PR target/71847
      	* combine.c (change_zero_ext): Handle zero_ext of hard registers.
      	Swap commutative operands in new RTL if needed.  Handle zero_ext
      	in the set_dest.
      	(recog_for_combine): Pass *pnewpat to change_zero_ext instead of
      	PATTERN (insn).
      
      From-SVN: r241664
      Segher Boessenkool committed
    • re PR go/78144 (FAIL: time on systems with tzdata2016g installed) · a5742b01
      	PR go/78144
          libgo: incorporate fix for timezone test
          
          This brings over the test-only fix for issue 17276 into gccgo/libgo
          (with tzdata-2016g there is a new zone abbreviation).  This is a
          copy of https://golang.org/cl/29995.
          
          Reviewed-on: https://go-review.googlesource.com/32182
      
      From-SVN: r241661
      Ian Lance Taylor committed
    • re PR tree-optimization/43721 (Failure to optimise (a/b) and (a%b) into single… · e72531b9
      re PR tree-optimization/43721 (Failure to optimise (a/b) and (a%b) into single __aeabi_idivmod call)
      
      2016-10-28  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
      	    Kugan Vivekanandarajah  <kuganv@linaro.org>
      	    Jim Wilson  <jim.wilson@linaro.org>
      
      	PR tree-optimization/43721
      	* target.def: New hook expand_divmod_libfunc.
      	* doc/tm.texi.in: Add hook for TARGET_EXPAND_DIVMOD_LIBFUNC
      	* doc/tm.texi: Regenerate.
      	* internal-fn.def: Add new entry for DIVMOD ifn.
      	* internal-fn.c (expand_DIVMOD): New.
      	* tree-ssa-math-opts.c: Include optabs-libfuncs.h, tree-eh.h,
      	targhooks.h.
      	(widen_mul_stats): Add new field divmod_calls_inserted.
      	(target_supports_divmod_p): New.
      	(divmod_candidate_p): Likewise.
      	(convert_to_divmod): Likewise.
      	(pass_optimize_widening_mul::execute): Call
      	calculate_dominance_info(), renumber_gimple_stmt_uids() at
      	beginning of function. Call convert_to_divmod()
      	and record stats for divmod.
      	* config/arm/arm.c (arm_expand_divmod_libfunc): Override hook
      	TARGET_EXPAND_DIVMOD_LIBFUNC.
      	* doc/sourcebuild.texi: Add items for arm_divmod_simode, divmod,
      	divmod_simode.
      
      testsuite/
      	* lib/target-supports.exp (check_effective_target_divmod): New.
      	(check_effective_target_divmod_simode): Likewise.
      	(check_effective_target_arm_divmod_simode): Likewise.
      	* gcc.dg/divmod-1-simode.c: New test.
      	* gcc.dg/divmod-1.c: Likewise.
      	* gcc.dg/divmod-2-simode.c: Likewise.
      	* gcc.dg/divmod-2.c: Likewise.
      	* gcc.dg/divmod-3-simode.c: Likewise.
      	* gcc.dg/divmod-3.c: Likewise.
      	* gcc.dg/divmod-4-simode.c: Likewise.
      	* gcc.dg/divmod-4.c: Likewise.
      	* gcc.dg/divmod-5.c: Likewise.
      	* gcc.dg/divmod-6-simode.c: Likewise.
      	* gcc.dg/divmod-6.c: Likewise.
      	* gcc.dg/divmod-7.c: Likewise.
      
      Co-Authored-By: Jim Wilson <jim.wilson@linaro.org>
      Co-Authored-By: Kugan Vivekanandarajah <kuganv@linaro.org>
      
      From-SVN: r241660
      Prathamesh Kulkarni committed
    • re PR go/78143 (bootstrap broken in libgo on powerpc-linux-gnu) · 0dfeae28
      	PR go/78143
          runtime: build lfstack_32bit.go on ppc
          
          Missed a build tag.  This is GCC PR 78143.
          
          Reviewed-on: https://go-review.googlesource.com/32295
      
      From-SVN: r241659
      Ian Lance Taylor committed
    • Make filesystem::path work with basic_string_view (P0392R0) · f0414b97
      	* include/experimental/bits/fs_path.h (__is_path_src)
      	(_S_range_begin, _S_range_end): Overload to treat string_view as a
      	Source object.
      	(path::operator+=, path::compare): Overload for basic_string_view.
      	* testsuite/experimental/filesystem/path/construct/string_view.cc:
      	New test.
      	* testsuite/experimental/filesystem/path/construct/
      	string_view_cxx17.cc: New test.
      
      From-SVN: r241658
      Jonathan Wakely committed