1. 13 Feb, 2018 27 commits
    • * fr.po: Update. · 8edd275b
      From-SVN: r257639
      Joseph Myers committed
    • re PR c++/84333 (ICE with ternary operator in template function) · 3a9ad4c1
      /cp
      2018-02-13  Paolo Carlini  <paolo.carlini@oracle.com>
      
      	PR c++/84333
      	* call.c (build_conditional_expr_1): Use cp_save_expr instead of
      	save_expr for the G++ extension.
      
      /testsuite
      2018-02-13  Paolo Carlini  <paolo.carlini@oracle.com>
      
      	PR c++/84333
      	* g++.dg/template/sizeof16.C: New.
      	* g++.dg/template/sizeof17.C: Likewise.
      
      From-SVN: r257638
      Paolo Carlini committed
    • compiler: don't export function descriptors for unexported names · a2f5a782
          
          They aren't needed, and could potentially cause unlikely symbol name
          collisions.  Also, the runtime package's reference to main could cause
          the runtime package to define main.main..f, which could also be
          defined in the main package if it does something like fmt.Print(main).
          That will normally work but will fail with a multiple symbol
          definition error when using -static-libgo.
          
          Reviewed-on: https://go-review.googlesource.com/93656
      
      From-SVN: r257637
      Ian Lance Taylor committed
    • re PR fortran/84313 ([F08] reject procedure pointers in COMMON blocks) · 4155fafc
      2018-02-13  Janus Weil  <janus@gcc.gnu.org>
      
      	PR fortran/84313
      	* symbol.c (check_conflict): Reject procedure pointers in common blocks.
      
      
      2018-02-13  Janus Weil  <janus@gcc.gnu.org>
      
      	PR fortran/84313
      	* gfortran.dg/proc_ptr_common_1.f90: Fix invalid test case,
      	add necessary compiler options.
      	* gfortran.dg/proc_ptr_common_2.f90: Add missing error message.
      
      From-SVN: r257636
      Janus Weil committed
    • re PR c/82210 (Having _Alignas in a struct with VLAs causes writing to one array… · 201d17c0
      re PR c/82210 (Having _Alignas in a struct with VLAs causes writing to one array to overwrite another)
      
      	PR c/82210
      	* stor-layout.c (place_field): For variable length fields, adjust
      	offset_align afterwards not just based on the field's alignment,
      	but also on the size.
      
      	* gcc.c-torture/execute/pr82210.c: New test.
      
      From-SVN: r257635
      Jakub Jelinek committed
    • re PR middle-end/84309 (Wrong-code with -ffast-math) · 9aa484f5
      	PR middle-end/84309
      	* match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
      	of exps and logs in the use_exp2 case.
      
      	* gcc.dg/pr84309-2.c: New test.
      
      From-SVN: r257634
      Jakub Jelinek committed
    • rl78.c (rl78_attribute_table): Fix terminator and entry for "vector". · 43edc4f5
      2018-02-13  Jeff Law  <law@redhat.com>
      
       	* config/rl/rl78.c (rl78_attribute_table): Fix terminator and
      	entry for "vector".
      
      From-SVN: r257633
      Jeff Law committed
    • rl78.c (rl78_handle_func_attribute): Mark ARGS as unused. · cd82490a
      	* config/rl78/rl78.c (rl78_handle_func_attribute): Mark
      	ARGS as unused.
      
      From-SVN: r257632
      Jeff Law committed
    • common.opt (gas-loc-support, [...]): New. · 924c9e3e
      	* common.opt (gas-loc-support, gas-locview-support): New.
      	(ginline-points, ginternal-reset-location-views): New.
      	* doc/invoke.texi: Document them.  Use @itemx where intended.
      	(gvariable-location-views): Adjust.
      	* target.def (reset_location_view): New.
      	* doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
      	(TARGET_RESET_LOCATION_VIEW): New.
      	* doc/tm.texi: Rebuilt.
      	* dwarf2out.c (dwarf2out_default_as_loc_support): New.
      	(dwarf2out_default_as_locview_support): New.
      	(output_asm_line_debug_info): Use option variables.
      	(dwarf2out_maybe_output_loclist_view_pair): Likewise.
      	(output_loc_list): Likewise.
      	(add_high_low_attributes): Check option variables.
      	Don't output entry view attribute in strict mode.
      	(gen_inlined_subroutine_die): Check option variables.
      	(dwarf2out_inline_entry): Likewise.
      	(init_sections_and_labels): Likewise.
      	(dwarf2out_early_finish): Likewise.
      	(maybe_reset_location_view): New, from...
      	(dwarf2out_var_location): ... here.  Call it.
      	* debug.h (dwarf2out_default_as_loc_support): Declare.
      	(dwarf2out_default_as_locview_support): Declare.
      	* hooks.c (hook_int_rtx_insn_0): New.
      	* hooks.h (hook_int_rtx_insn_0): Declare.
      	* toplev.c (process_options): Take -gas-loc-support and
      	-gas-locview-support from dwarf2out.  Enable
      	-gvariable-location-views by default only with locview
      	assembler support.  Enable -ginternal-reset-location-views by
      	default only if the target defines the corresponding hook.
      	Enable -ginline-points by default if location views are
      	enabled; force it disabled if statement frontiers are
      	disabled.
      	* tree-inline.c (expand_call_inline): Check option variables.
      	* tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
      
      From-SVN: r257631
      Alexandre Oliva committed
    • PR c++/84080 - ICE with return type deduction and specialization. · 9ef86762
      	* pt.c (determine_specialization): Check uses_template_parms.
      
      From-SVN: r257630
      Jason Merrill committed
    • re PR tree-optimization/84321 (ice in intersect_range_with_nonzero_bits, at tree-vrp.c:213) · ff67aff4
      2018-02-12  Richard Sandiford  <richard.sandiford@linaro.org>
      
      gcc/
      	PR tree-optimization/84321
      	* tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
      	handling.  Also check whether the anti-range contains any values
      	that satisfy the mask; switch to a VR_RANGE if not.
      
      gcc/testsuite/
      	PR tree-optimization/84321
      	* gcc.dg/pr84321.c: New test.
      
      From-SVN: r257629
      Richard Sandiford committed
    • re PR target/84359 (gcc.target/i386/pr57193.c fail) · 62e12268
      2018-02-13  Vladimir Makarov  <vmakarov@redhat.com>
      
      	PR target/84359
      	* gcc.target/i386/57193.c: Add -march=x86-64.
      
      From-SVN: r257628
      Vladimir Makarov committed
    • Fix more variadic capture issues. · 29e10a68
      	* pt.c (find_parameter_packs_r): Also look at explicit captures.
      	(check_for_bare_parameter_packs): Check current_class_type for
      	lambda context.
      	(extract_locals_r): Handle seeing a full instantiation of a pack.
      	(tsubst_pack_expansion): Likewise.  Force lambda capture.
      	* parser.c (cp_parser_lambda_introducer): Don't
      	check_for_bare_parameter_packs.
      
      From-SVN: r257627
      Jason Merrill committed
    • PR c++/84338 - wrong variadic sizeof. · 812c0795
      	* pt.c (argument_pack_select_arg): Like the macro, but look through
      	a pack expansion.
      	(tsubst, tsubst_copy, dependent_template_arg_p): Use it.
      	(extract_fnparm_pack): Do make_pack_expansion.
      	(extract_locals_r): Do strip a pack expansion.
      	* cp-tree.h (ARGUMENT_PACK_SELECT_ARG): Remove.
      
      From-SVN: r257626
      Jason Merrill committed
    • re PR sanitizer/84340 (g++.dg/asan/use-after-scope-types-1.C (and others) fails after r257585) · 1bbae651
      gcc:
      2018-02-13  Paolo Bonzini <bonzini@gnu.org>
      
      	PR sanitizer/84340
      	* internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
      
      gcc/testsuite:
      2018-02-13  Paolo Bonzini  <bonzini@gnu.org>
      
      	PR sanitizer/84307
      	* gcc.dg/asan/pr84307.c: Remove test.
      
      From-SVN: r257625
      Paolo Bonzini committed
    • WebAssembly: Disable subdirectory configuration for unsupported LD · 1fc1d82e
      Remove an LD subdirectory configuration error:
      
      *** ld does not support target wasm32-unknown-none
      *** see ld/configure.tgt for supported targets
      make[1]: *** [configure-ld] Error 1
      
      which prevents binutils for the WebAssembly target from being built
      unless an explicit `--disable-ld' configuration option has been given.
      Users must not have to disable features selected by default to get a
      working configuration.
      
      	/
      	* configure.ac <wasm32-*-*> (noconfigdirs): Add `ld'.
      	* configure: Regenerate.
      
      From-SVN: r257624
      Maciej W. Rozycki committed
    • [PR 83990] Fix location handling in ipa_modify_call_arguments · b607e474
      2018-02-13  Martin Jambor  <mjambor@suse.cz>
      
      	PR c++/83990
      	* ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
      	of call statements, also set location of a load to a temporary.
      
      From-SVN: r257623
      Martin Jambor committed
    • rl78.c (add_vector_labels): New function. · e4c1b7e3
      2018-02-13  Sebastian Perta  <sebastian.perta@renesas.com>
      
      	* config/rl78/rl78.c (add_vector_labels): New function.
      	* config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
      	* config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
      	* config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert 
      	which checks that no arguments are passed.
      	* config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
      	* doc/extend.texi: Documentation for the new attribute.
      
      2018-02-13  Sebastian Perta  <sebastian.perta@renesas.com>
      
      	* gcc.target/rl78/test_auto_vector.c: New test.
      
      From-SVN: r257622
      Sebastian Perta committed
    • RISC-V: define _REENTRANT with -pthread · 9bc5ecf3
      This is expected by the AX_PTHREAD autoconf macro from
      <http://www.gnu.org/software/autoconf-archive/ax_pthread.html>.
      
      	* config/riscv/linux.h (CPP_SPEC): Define.
      
      From-SVN: r257621
      Andreas Schwab committed
    • Add a DECL_EXPR for VLA pointer casts (PR 84305) · d74641bd
      This PR was about a case in which we ended up with a MULT_EXPR
      that was shared between an ungimplified VLA type and a pointer
      calculation.  The SSA names used in the pointer calculation were
      later freed, but they were still there in the VLA, and caused an
      ICE when remapping the types during inlinling.
      
      The fix is to add a DECL_EXPR that forces the VLA type sizes to be
      gimplified too, but the tricky part is deciding where.  As the comment
      in grokdeclarator says, we can't just add it to the statement list,
      since the size might only be conditionally evaluated.  It might also
      end up being evaluated out of sequence.
      
      The patch gets around that by putting the DECL_EXPR in a BIND_EXPR
      and adding the BIND_EXPR to the list of things that need to be
      evaluated for the declarator.
      
      2018-02-13  Richard Sandiford  <richard.sandiford@linaro.org>
      
      gcc/c/
      	PR c/84305
      	* c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
      	in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
      	and include the BIND_EXPR in the list of things that need to be
      	pre-evaluated.
      
      gcc/testsuite/
      	PR c/84305
      	* gcc.c-torture/compile/pr84305.c: New test.
      
      From-SVN: r257620
      Richard Sandiford committed
    • re PR target/84335 (ICE on invalid code in copy_to_mode_reg, at explow.c:612) · 5cd1af49
      	PR target/84335
      	* config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
      	OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
      	OPTION_MASK_ISA_AES as first argument to def_builtin_const
      	for AES builtins.  Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
      	instead of OPTION_MASK_ISA_PCLMUL as first argument to
      	def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
      	* config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
      	temporarily for AES and PCLMUL builtins.
      
      	* gcc.target/i386/pr84335.c: New test.
      
      From-SVN: r257619
      Jakub Jelinek committed
    • re PR tree-optimization/84339 (Wrong-code with optimizing strlen) · 204a7ecb
      	PR tree-optimization/84339
      	* gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
      	ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
      	Formatting fixes.
      
      	* gcc.c-torture/execute/pr84339.c: New test.
      
      From-SVN: r257618
      Jakub Jelinek committed
    • re PR middle-end/84309 (Wrong-code with -ffast-math) · 848bb6fc
      	PR middle-end/84309
      	* match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
      	exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
      	* generic-match-head.c (canonicalize_math_after_vectorization_p): New
      	inline function.
      	* gimple-match-head.c (canonicalize_math_after_vectorization_p): New
      	inline function.
      	* omp-simd-clone.h: New file.
      	* omp-simd-clone.c: Include omp-simd-clone.h.
      	(expand_simd_clones): No longer static.
      	* tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
      	cgraph.h and omp-simd-clone.h.
      	(vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
      	(vect_recog_widen_shift_pattern): Formatting fix.
      	(vect_pattern_recog_1): Don't check optab for calls.
      
      	* gcc.dg/pr84309.c: New test.
      	* gcc.target/i386/pr84309.c: New test.
      
      From-SVN: r257617
      Jakub Jelinek committed
    • re PR target/84336 (ICE in extract_insn, at recog.c:2304) · f4b29321
      	PR target/84336
      	* config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
      	operands[2] into a REG before using gen_lowpart on it.
      
      	* gcc.target/i386/pr84336.c: New test.
      
      From-SVN: r257616
      Jakub Jelinek committed
    • Make module files reproducible · 7b47686d
      Using lbasename ensures that the build path does not end up in the
      module file.
      
      Regtested on x86_64-pc-linux-gnu, committed to trunk. Will shortly
      backport to the 6 and 7 branches as well.
      
      2018-02-13  Alastair McKinstry  <alastair.mckinstry@sceal.ie>
      	    Janne Blomqvist  <jb@gcc.gnu.org>
      
      	* module.c (dump_module): Use lbasename to ensure that module
      	files are reproducible.
      
      Co-Authored-By: Janne Blomqvist <jb@gcc.gnu.org>
      
      From-SVN: r257613
      Alastair McKinstry committed
    • re PR target/83760 ([SH] ICE in maybe_record_trace_start building glibc tst-copy_file_range.c) · 8df1868d
      	PR target/83760
      	* config/sh/sh.c (find_barrier): Consider a sibling call
      	a barrier as well.
      
      From-SVN: r257611
      Jeff Law committed
    • Daily bump. · a4f197f5
      From-SVN: r257610
      GCC Administrator committed
  2. 12 Feb, 2018 13 commits
    • re PR c++/84341 (ICE with #pragma omp atomic) · d69aeeee
      	PR c++/84341
      	* parser.c (cp_parser_binary_expression): Use build_min instead of
      	build2_loc to build the no_toplevel_fold_p toplevel binary expression.
      
      	* c-c++-common/gomp/pr84341.c: New test.
      
      From-SVN: r257607
      Jakub Jelinek committed
    • * sv.po: Update. · 2b0dfc84
      From-SVN: r257606
      Joseph Myers committed
    • re PR fortran/68746 (FAIL: gfortran.dg/read_dir.f90 -O0 execution test) · badf04f3
      2018-02-12  Thomas Koenig  <tkoenig@gcc.gnu.org>
      
      	PR fortran/68746
      	* gfortran.dg/read_dir.f90: Re-add dg-do run.
      
      From-SVN: r257605
      Thomas Koenig committed
    • re PR fortran/68746 (FAIL: gfortran.dg/read_dir.f90 -O0 execution test) · 02e694ef
      2018-02-12  Thomas Koenig  <tkoenig@gcc.gnu.org>
      
      	PR fortran/68746
      	* gfortran.dg/read_dir.f90: Remove xfails. Also allow iostat
      	of zero for read.
      
      From-SVN: r257604
      Thomas Koenig committed
    • libgfortran.h (GFC_ARRAY_DESCRIPTOR): Remove dimension of descriptor to use… · e9bfdf18
      libgfortran.h (GFC_ARRAY_DESCRIPTOR): Remove dimension of descriptor to use vaiable members for dim.
      
      2018-02-12  Thomas Koenig  <tkoenig@gcc.gnu.org>
      
      	* libgfortran.h (GFC_ARRAY_DESCRIPTOR): Remove dimension
      	of descriptor to use vaiable members for dim.
      	Change usage of GFC_ARRAY_DESCRIPTOR accordingly.
      	(GFC_FILL_ARRAY_DESCRIPTOR): New macro.
      	(gfc_full_array_i4): New type.
      	* intrinsics/date_and_time.c (secnds): Use sizeof
      	(gfc_array_i4) + sizeof (descriptor_dimension) for memory
      	allocation.
      	* intrinsics/reshape_generic.c: Use GFC_FULL_ARRAY_DESCRIPTOR.
      	* io/format.c: Use sizeof (gfc_array_i4) + sizeof
      	(descriptor_dimension) for memoy allocation.
      	* io/list_read.c (list_formatted_read_scalar): Use
      	gfc_full_array_i4 for variable.
      	(nml_read_obj): Likewise.
      	* io/write.c (list_formatted_write_scalar): Likewise.
      	(nml_write_obj): Likewise.
      	* m4/reshape.m4: Use GFC_FULL_ARRAY_DESCRIPTOR.
      	* generated/reshape_c10.c: Regenerated.
      	* generated/reshape_c16.c: Regenerated.
      	* generated/reshape_c4.c: Regenerated.
      	* generated/reshape_c8.c: Regenerated.
      	* generated/reshape_i16.c: Regenerated.
      	* generated/reshape_i4.c: Regenerated.
      	* generated/reshape_i8.c: Regenerated.
      	* generated/reshape_r10.c: Regenerated.
      	* generated/reshape_r16.c: Regenerated.
      	* generated/reshape_r4.c: Regenerated.
      	* generated/reshape_r8.c: Regenerated.
      
      From-SVN: r257601
      Thomas Koenig committed
    • compiler: error on func declaration/definition · 52eb4ab4
          
          Long long long ago Go permitted writing
              func F()
          in one file and writing
              func F() {}
          in another file.  This was removed from the language, and that is now
          considered to be a multiple definition error.  Gccgo never caught up
          to that, and it has been permitting this invalid code for some time.
          
          Stop permitting it, so that we give correct errors.  Since we've
          supported it for a long time, the compiler uses it in a couple of
          cases: it predeclares the hash/equal methods if it decides to create
          them while compiling another function, and it predeclares main.main as
          a mechanism for getting the right warning if a program uses the wrong
          signature for main.  For simplicity, keep those existing uses.
          
          This required a few minor changes in libgo which were relying,
          unnecessarily, on the current behavior.
          
          Reviewed-on: https://go-review.googlesource.com/93083
      
      From-SVN: r257600
      Ian Lance Taylor committed
    • re PR go/84215 (Random results in go/libgo tests) · 86ff1853
      	PR go/84215
          runtime, sync/atomic: use write barrier for atomic pointer functions
          
          This copies atomic_pointer.go from 1.10rc2.  It was omitted during the
          transition of the runtime from C to Go, and I forgot about it.
          
          This may help with https://gcc.gnu.org/PR84215.
          
          Reviewed-on: https://go-review.googlesource.com/93197
      
      From-SVN: r257599
      Ian Lance Taylor committed
    • cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when successfully… · 966a140d
      cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when successfully back substituting a reg.
      
      	* cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
      	successfully back substituting a reg.
      
      	* gcc.c-torture/compile/reg-args-size.c: New test.
      
      From-SVN: r257598
      Jeff Law committed
    • builtins-4-runnable.c (main): Move int128 and uint128 tests to new testfile. · fa2faaa8
      gcc/testsuite/ChangeLog:
      
      2018-02-12  Carl Love  <cel@us.ibm.com>
      
      	* gcc.target/powerpc/builtins-4-runnable.c (main): Move int128 and
      	uint128 tests to new testfile.
      	* gcc.target/powerpc/builtins-4-int128-runnable.c: New testfile for
      	int128 and uint128 tests.
      	* gcc.target/powerpc/powerpc.exp: Add builtins-4-int128-runnable.c to
      	list of torture tests.
      
      From-SVN: r257591
      Carl Love committed
    • re PR fortran/84273 ([F03] Reject allocatable passed-object dummy argument (proc_ptr_47.f90)) · 24abcc44
      2018-02-12  Janus Weil  <janus@gcc.gnu.org>
      
      	PR fortran/84273
      	* resolve.c (resolve_component): Fix checks of passed argument in
      	procedure-pointer components.
      
      
      2018-02-12  Janus Weil  <janus@gcc.gnu.org>
      
      	PR fortran/84273
      	* gfortran.dg/proc_ptr_47.f90: Fix invalid test case.
      	* gfortran.dg/proc_ptr_comp_pass_4.f90: Fix and extend test case.
      
      From-SVN: r257590
      Janus Weil committed
    • re PR tree-optimization/84037 (Speed regression of polyhedron benchmark since r256644) · 78604de0
      2018-02-12  Richard Biener  <rguenther@suse.de>
      
      	PR tree-optimization/84037
      	* tree-vect-slp.c (vect_analyze_slp_cost): Add visited
      	parameter, move visited init to caller.
      	(vect_slp_analyze_operations): Separate cost from validity
      	check, initialize visited once for all instances.
      	(vect_schedule_slp): Analyze map to CSE vectorized nodes once
      	for all instances.
      	* tree-vect-stmts.c (vect_model_simple_cost): Make early
      	out an assert.
      	(vect_model_promotion_demotion_cost): Likewise.
      	(vectorizable_bswap): Guard cost modeling with !slp_node
      	instead of !PURE_SLP_STMT to avoid double-counting on hybrid
      	SLP stmts.
      	(vectorizable_call): Likewise.
      	(vectorizable_conversion): Likewise.
      	(vectorizable_assignment): Likewise.
      	(vectorizable_shift): Likewise.
      	(vectorizable_operation): Likewise.
      	(vectorizable_store): Likewise.
      	(vectorizable_load): Likewise.
      	(vectorizable_condition): Likewise.
      	(vectorizable_comparison): Likewise.
      
      From-SVN: r257588
      Richard Biener committed
    • Corrected mistakes in ChangeLog spotted by Jakub Jelinek. · e1f30526
      From-SVN: r257587
      Sebastian Perta committed
    • re PR target/82641 (Unable to enable crc32 for a certain function with target… · c8cc0b65
      re PR target/82641 (Unable to enable crc32 for a certain function with target attribute on ARM (aarch32))
      
      2018-02-12  Tamar Christina  <tamar.christina@arm.com>
      
      	PR target/82641
      	* gcc.target/arm/pragma_arch_switch_2.c: Use armv5te.
      
      From-SVN: r257586
      Tamar Christina committed