Commit Graph

159877 Commits

Author SHA1 Message Date
GCC Administrator
e5a6b70e88 Daily bump.
From-SVN: r257559
2018-02-11 00:16:13 +00:00
John David Anglin
123eaa4671 pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as function label.
* config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
	function label.

From-SVN: r257554
2018-02-10 23:15:53 +00:00
Paul Thomas
950ab3f141 re PR fortran/84141 (Internal error: type_name(): Bad type)
2018-02-10  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/84141
	PR fortran/84155
	* trans-array.c (gfc_array_init_size): Revert the change made
	in revision 257356 setting the dtype.
	* trans-types.c (gfc_get_dtype): Do not use the cached dtype.
	Call gfc_get_dtype_rank_type every time.

	PR fortran/56691
	* trans-array.c (gfc_conv_expr_descriptor): If the source array
	is a descriptor type, use its offset, removing the condition
	that is be a class expression.

2018-02-10  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/56691
	* gfortran.dg/type_to_class_4.f03: New test.

From-SVN: r257550
2018-02-10 18:16:14 +00:00
Alan Modra
cb2e8560f9 PR84300, ICE in dwarf2cfi on ppc64le with -fsplit-stack -fno-omit-frame-pointer
PR target/84300
gcc/
	* config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
	Specify LR as an input.
gcc/testsuite/
	* gcc.dg/pr84300.c: New.

From-SVN: r257549
2018-02-10 15:19:15 +10:30
GCC Administrator
f99507a70e Daily bump.
From-SVN: r257548
2018-02-10 00:16:12 +00:00
Jakub Jelinek
6724f8a61d re PR sanitizer/83987 (ICE with OpenMP, sanitizer and virtual bases)
PR sanitizer/83987
	* omp-low.c (maybe_remove_omp_member_access_dummy_vars,
	remove_member_access_dummy_vars): New functions.
	(lower_omp_for, lower_omp_taskreg, lower_omp_target,
	lower_omp_1, execute_lower_omp): Use them.

	* tree.c (cp_free_lang_data): Revert 2018-01-23 change.

	* g++.dg/ubsan/pr83987-2.C: New test.

From-SVN: r257545
2018-02-10 00:22:43 +01:00
Jakub Jelinek
5ca8e74464 re PR rtl-optimization/84308 (Memory leak in spread_components)
PR rtl-optimization/84308
	* shrink-wrap.c (spread_components): Release todo vector.

From-SVN: r257544
2018-02-10 00:21:35 +01:00
Peter Bergner
86a568a358 re PR target/83926 (ICE during RTL pass: ira, in elimination_costs_in_insn, at reload1.c:3633)
PR target/83926
	* gcc.target/powerpc/pr83926.c: Filter out gimple folding disabled
	message.

From-SVN: r257543
2018-02-09 16:03:43 -06:00
Jason Merrill
83fe399c27 PR c++/81917 - ICE with void_t and partial specialization.
* pt.c (instantiate_class_template_1): Set TYPE_BEING_DEFINED before
	calling most_specialized_partial_spec.

From-SVN: r257542
2018-02-09 16:01:49 -05:00
Will Schmidt
c028d589e9 vsx-vector-6-le.c: Update CPU target.
[testsuite]

2018-02-07  Will Schmidt  <will_schmidt@vnet.ibm.com>

	* gcc.target/powerpc/vsx-vector-6-le.c:  Update CPU target.
	* gcc.target/powerpc/vsx-vector-6-le.p9.c:  New.

From-SVN: r257541
2018-02-09 20:59:40 +00:00
Ian Lance Taylor
8221fb01d6 compiler: track //go:nointerface in export data
The magic //go:nointerface comment, used for field tracking, was only
    implemented for conversions to interface types in the same package.
    Record it in the export data, so that it works as expected for types
    imported from a different package.
    
    Reviewed-on: https://go-review.googlesource.com/93075

From-SVN: r257540
2018-02-09 19:39:14 +00:00
Nathan Sidwell
0444aa9c0a [PR c/84293] Unexpected strict-alias warning
https://gcc.gnu.org/ml/gcc-patches/2018-02/msg00510.html
	PR c/84293
	gcc/c/
	* c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
	to strict_aliasing_warning.

	gcc/c-family/
	* c-common.h (strict_aliasing_warning): Drop OTYPE arg, insert LOC
	arg.
	* c-warn.c (strict_aliasing_warning): Drop OTYPE arg, require LOC
	arg.  Adjust.

	gcc/cp/
	* typeck.c (cp_build_indirect_ref_1, build_reinterpret_cast_1):
	Pass expr location to strict_aliasing_warning.

	gcc/testsuite/
	* c-c++-common/pr84293.h: New.
	* c-c++-common/pr84293.c: New.

From-SVN: r257539
2018-02-09 19:31:10 +00:00
Jason Merrill
dd2799cc22 PR c++/84296 - ICE with qualified-id in template.
PR c++/83714
	* pt.c (unknown_base_ref_p): New.
	(instantiation_dependent_scope_ref_p): Use it instead of
	any_dependent_bases_p.

From-SVN: r257538
2018-02-09 14:10:42 -05:00
Vladimir Makarov
8c67920556 re PR rtl-optimization/57193 (suboptimal register allocation for SSE registers)
2018-02-09  Vladimir Makarov  <vmakarov@redhat.com>

	PR rtl-optimization/57193
	* ira-color.c (struct allocno_color_data): Add member
	conflict_allocno_hard_prefs.
	(update_conflict_allocno_hard_prefs): New.
	(bucket_allocno_compare_func): Add a preference based on
	conflict_allocno_hard_prefs.
	(push_allocno_to_stack): Update conflict_allocno_hard_prefs.
	(color_allocnos): Remove a dead code.  Initiate
	conflict_allocno_hard_prefs.  Call update_costs_from_prefs.

2018-02-09  Vladimir Makarov  <vmakarov@redhat.com>

	PR rtl-optimization/57193
	* gcc.target/i386/57193.c: New.

From-SVN: r257537
2018-02-09 18:23:58 +00:00
Jakub Jelinek
d6126f8b82 re PR target/84226 (ICE in simplify_const_unary_operation, at simplify-rtx.c:1974 on ppc64le)
PR target/84226
	* config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
	constraint from =wa to wa.  Avoid a subreg on the output operand,
	instead use a pseudo and subreg it in a move.
	(p9_xxbrd_<mode>): Changed to ...
	(p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
	(p9_xxbrd_v2df): New expander.
	(p9_xxbrw_<mode>): Changed to ...
	(p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
	(p9_xxbrw_v4sf): New expander.

	* gcc.target/powerpc/pr84226.c: New test.

From-SVN: r257536
2018-02-09 19:19:08 +01:00
Peter Bergner
e3056dd850 builtins-1-be.c: Rename duplicate test from this to...
* gcc.target/powerpc/builtins-1-be.c <vclzb>: Rename duplicate test
	from this to...
	<vclzd>: ...this.

From-SVN: r257535
2018-02-09 12:02:15 -06:00
Martin Sebor
cea71f0a97 PR lto/84212 - -Wno-* does not disable warnings from -flto link stage
gcc/c-family/ChangeLog:

	PR lto/84212
	* c.opt (-Wstringop-overflow, -Warray-bounds): Add LTO.
	(-Walloc-size-larger-than, -Wformat-truncation=): Same.
	(-Wmaybe-uninitialized, -Wnonnull, -Wrestrict): Same.
	(-Wstrict-overflow, -Wsuggest-attribute): Same.
	(-Wuninitialized): Same.

gcc/testsuite/ChangeLog:

	PR lto/84212
	* gcc.dg/lto/pr84212_0.c: New test file.
	* gcc.dg/lto/pr84212_1.c: Same.

From-SVN: r257534
2018-02-09 10:58:54 -07:00
Sebastian Perta
cad5b07905 rx.md: updated "movsicc" expand to be matched by GCC
2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>

	*config/rx.md: updated "movsicc" expand to be matched by GCC
	*testsuite/gcc.target/rx/movsicc.c: new test case

From-SVN: r257533
2018-02-09 17:43:11 +00:00
Peter Bergner
da86c81e65 re PR target/83926 (ICE during RTL pass: ira, in elimination_costs_in_insn, at reload1.c:3633)
gcc/
	PR target/83926
	* config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
	multiply in 32-bit mode.
	(vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
	(vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
	mode.

gcc/testsuite/
	PR target/83926
	* gcc.target/powerpc/pr83926.c: New test.
	* gcc.target/powerpc/builtins-1-be.c: Filter out gimple folding disabled
	message.  Fix test for running in 32-bit mode.

From-SVN: r257531
2018-02-09 10:32:37 -06:00
Sebastian Perta
cc60cad615 constraints.md: added new constraint CALL_OP_SYMBOL_REF to allow or block "symbol_ref"...
2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>

	* config/rx/constraints.md: added new constraint CALL_OP_SYMBOL_REF 
	to allow or block "symbol_ref" depending on value of TARGET_JSR
	* config/rx/rx.md: use CALL_OP_SYMBOL_REF in call_internal and 
	call_value_internal insns

From-SVN: r257529
2018-02-09 16:17:13 +00:00
Ian Lance Taylor
a51ca83b31 * Makefile.am (GOTOOLS_TEST_TIMEOUT): Double value.
From-SVN: r257527
2018-02-09 15:05:17 +00:00
Pierre-Marie de Rodat
7b5925a816 DWARF: no location for non-definition DECLs with non-trivial DECL_VALUE_EXPR
This patch restricts the set of cases in which we allow the generation of
location attributes for variables that are not defined in the current unit.
For such variables with complex DECL_VALUE_EXPR trees, generating a location
attribute can end up creating relocations to text symbols in the debug section
of LTO object files, which is not valid.

gcc/
	PR lto/84213
	* dwarf2out.c (is_trivial_indirect_ref): New function.
	(dwarf2out_late_global_decl): Do not generate a location
	attribute for variables that have a non-trivial DECL_VALUE_EXPR
	and that are not defined in the current unit.

From-SVN: r257526
2018-02-09 14:02:37 +00:00
Eric Botcazou
183187053d optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison instead of a libcall for UNORDERED.
* optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
	instead of a libcall for UNORDERED.

From-SVN: r257525
2018-02-09 12:33:40 +00:00
Tamar Christina
0079ae8877 re PR target/82641 (Unable to enable crc32 for a certain function with target attribute on ARM (aarch32))
2018-02-09  Tamar Christina  <tamar.christina@arm.com>

	PR target/82641
	* config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
	__ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.

gcc/testsuite
2018-02-09  Tamar Christina  <tamar.christina@arm.com>

	PR target/82641
	* gcc.target/arm/pragma_arch_switch_2.c: Use armv6 and armv5t.

From-SVN: r257524
2018-02-09 12:23:46 +00:00
Andreas Krebbel
c704706201 S/390: Fix PR84295
gcc/ChangeLog:

2018-02-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>

	PR target/PR84295
	* config/s390/s390.c (s390_set_current_function): Invoke
	s390_indirect_branch_settings also if fndecl didn't change.

gcc/testsuite/ChangeLog:

2018-02-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>

	PR target/PR84295
	* gcc.target/s390/pr84295.c: New test.

From-SVN: r257522
2018-02-09 11:42:34 +00:00
Paolo Carlini
0805a34d5f re PR c++/77522 (ICE on invalid code C++14 code: in tsubst_decl, at cp/pt.c:12447)
2018-02-09  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/77522
	* g++.dg/cpp1y/lambda-init16.C: New.

From-SVN: r257521
2018-02-09 11:37:14 +00:00
Alexandre Oliva
c29529aa3d [LVU] set ppc64 blockage's length to zero
LVU requires the zero-length (pseudo) insns's length to reflect
reality.  If they don't, it may assume there's a PC change where there
isn't any, and then a view-aware assembler will detect the problem and
complain about out-of-sync views.

ppc blockage pseudo-insns did not have the length attribute explicitly
set in them, so they inherited the attribute's default value, and that
was nonzero.

for  gcc/ChangeLog

	* config/rs6000/rs6000.md (blockage): Set length to zero.

From-SVN: r257520
2018-02-09 10:39:28 +00:00
Eric Botcazou
8ed6f54304 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
From-SVN: r257519
2018-02-09 09:50:14 +00:00
Richard Biener
cc17f33826 re PR target/84278 (claims initv4sfv2sf is available but inits through stack)
2018-02-09  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/84278
	* gcc.target/i386/pr84278.c: Adjust regex.

From-SVN: r257518
2018-02-09 09:19:34 +00:00
Eric Botcazou
8c8b7be5da c-ada-spec.c (dump_ada_declaration): Do not generate the 'constant' keyword for components.
* c-ada-spec.c (dump_ada_declaration): Do not generate the 'constant'
	keyword for components.

From-SVN: r257517
2018-02-09 08:54:54 +00:00
Jakub Jelinek
91eb884d75 re PR tree-optimization/84232 (gcc.dg/tree-ssa/ssa-dom-cse-2.c fail with -march=silvermont)
PR tree-optimization/84232
	* gcc.dg/tree-ssa/ssa-dom-cse-2.c: Add -mtune-generic on x86.

From-SVN: r257516
2018-02-09 07:44:43 +01:00
Jakub Jelinek
9abed7fa75 re PR sanitizer/84285 (Fail to statically link with -fsanitize=undefined)
PR sanitizer/84285
	* gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
	STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
	-static-lib*san.

From-SVN: r257515
2018-02-09 07:44:06 +01:00
Jakub Jelinek
e47aebb33f re PR debug/84252 (ICE in get_tracked_reg_offset when building libvpx for aarch64)
PR debug/84252
	* var-tracking.c (vt_add_function_parameter): Punt for non-onepart
	PARALLEL incoming that failed vt_get_decl_and_offset check.

	* gcc.target/aarch64/pr84252.c: New test.

From-SVN: r257514
2018-02-09 06:48:33 +01:00
Jakub Jelinek
ebd06e5ca7 re PR middle-end/84237 (xen build faiulre only zero initializers are allowed in section '.bss.page_aligned.const')
PR middle-end/84237
	* output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
	* varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
	TREE_READONLY bit.
	(get_variable_section): For decls in named .bss* sections pass true as
	second argument to bss_initializer_p.

	* gcc.dg/pr84237.c: New test.

From-SVN: r257513
2018-02-09 06:47:24 +01:00
Marek Polacek
ebe4bf41d2 re PR c++/83659 (ICE on compilable C++ code: in tree_to_shwi, at tree.c:6821)
PR c++/83659
	* fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
	Formatting fixes.  Verify first that tree_fits_poly_int64_p (op01).
	Sync some changes from cxx_fold_indirect_ref.

	* constexpr.c (cxx_fold_indirect_ref): Sync some changes from
	fold_indirect_ref_1, including poly_*int64.  Verify first that
	tree_fits_poly_int64_p (op01).  Formatting fixes.

	* g++.dg/torture/pr83659.C: New test.

Co-Authored-By: Jakub Jelinek <jakub@redhat.com>

From-SVN: r257512
2018-02-09 06:46:18 +01:00
Alexandre Oliva
5800666390 [IEPM] Introduce inline entry point markers
Output DW_AT_entry_pc based on markers.

Introduce DW_AT_GNU_entry_view as a DWARF extension.

If views are enabled are we're not in strict compliance mode, output
DW_AT_GNU_entry_view if it might be nonzero.

This patch depends on SFN and LVU patchsets, and on the IEPM patch that
introduces the inline_entry debug hook.

for  include/ChangeLog

	* dwarf2.def (DW_AT_GNU_entry_view): New.

for  gcc/ChangeLog

	* cfgexpand.c (expand_gimple_basic_block): Handle inline entry
	markers.
	* dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
	(BLOCK_INLINE_ENTRY_LABEL): New.
	(dwarf2out_var_location): Disregard inline entry markers.
	(inline_entry_data): New struct.
	(inline_entry_data_hasher): New hashtable type.
	(inline_entry_data_hasher::hash): New.
	(inline_entry_data_hasher::equal): New.
	(inline_entry_data_table): New variable.
	(add_high_low_attributes): Add DW_AT_entry_pc and
	DW_AT_GNU_entry_view attributes if a pending entry is found
	in inline_entry_data_table.  Add old entry_pc attribute only
	if debug nonbinding markers are disabled.
	(gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
	markers are enabled.
	(block_within_block_p, dwarf2out_inline_entry): New.
	(dwarf2out_finish): Check that no entries remained in
	inline_entry_data_table.
	* final.c (reemit_insn_block_notes): Handle inline entry notes.
	(final_scan_insn, notice_source_line): Likewise.
	(rest_of_clean_state): Skip inline entry markers.
	* gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
	markers.
	* gimple.c (gimple_build_debug_inline_entry): New.
	* gimple.h (enum gimple_debug_subcode): Add
	GIMPLE_DEBUG_INLINE_ENTRY.
	(gimple_build_debug_inline_entry): Declare.
	(gimple_debug_inline_entry_p): New.
	(gimple_debug_nonbind_marker_p): Adjust.
	* insn-notes.def (INLINE_ENTRY): New.
	* print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
	inline entry marker notes.
	(print_insn): Likewise.
	* rtl.h	(NOTE_MARKER_P): Add INLINE_ENTRY support.
	(INSN_DEBUG_MARKER_KIND): Likewise.
	(GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
	* tree-inline.c	(expand_call_inline): Build and insert
	debug_inline_entry stmt.
	* tree-ssa-live.c (remove_unused_scope_block_p): Preserve
	inline entry blocks early, if nonbind markers are enabled.
	(dump_scope_block): Dump fragment info.
	* var-tracking.c (reemit_marker_as_note): Handle inline entry note.
	* doc/gimple.texi (gimple_debug_inline_entry_p): New.
	(gimple_build_debug_inline_entry): New.
	* doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
	Enable/disable inline entry points too.
	* doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
	(DEBUG_INSN): Describe inline entry markers.

From-SVN: r257511
2018-02-09 02:22:11 +00:00
Alexandre Oliva
bd2b9f1e2d [LVU] Introduce location views
This patch introduces an option to enable the generation of location
views along with location lists.  The exact format depends on the
DWARF version: it can be a separate attribute (DW_AT_GNU_locviews) or
(DW_LLE_view_pair) entries in DWARF5+ loclists.

Line number tables are also affected.  If the assembler is found, at
compiler build time, to support .loc views, we use them and
assembler-computed view labels, otherwise we output compiler-generated
line number programs with conservatively-computed view labels.  In
either case, we output view information next to line number changes
when verbose assembly output is requested.

This patch requires an LVU patch that modifies the exported API of
final_scan_insn.  It also expects the entire SFN patchset to be
installed first, although SFN is not a requirement for LVU.

for  include/ChangeLog

	* dwarf2.def (DW_AT_GNU_locviews): New.
	* dwarf2.h (enum dwarf_location_list_entry_type): Add
	DW_LLE_GNU_view_pair.
	(DW_LLE_view_pair): Define.

for  gcc/ChangeLog

	* common.opt (gvariable-location-views): New.
	(gvariable-location-views=incompat5): New.
	* config.in: Rebuilt.
	* configure: Rebuilt.
	* configure.ac: Test assembler for view support.
	* dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
	* dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
	* dwarf2out.c (var_loc_view): New typedef.
	(struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
	(dwarf2out_locviews_in_attribute): New.
	(dwarf2out_locviews_in_loclist): New.
	(dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
	(enum dw_line_info_opcode): Add LI_adv_address.
	(struct dw_line_info_table): Add view.
	(RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
	(DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
	(zero_view_p): New variable.
	(ZERO_VIEW_P): New macro.
	(output_asm_line_debug_info): New.
	(struct var_loc_node): Add view.
	(add_AT_view_list, AT_loc_list): New.
	(add_var_loc_to_decl): Add view param.  Test it against last.
	(new_loc_list): Add view params.  Record them.
	(AT_loc_list_ptr): Handle loc and view lists.
	(view_list_to_loc_list_val_node): New.
	(print_dw_val): Handle dw_val_class_view_list.
	(size_of_die): Likewise.
	(value_format): Likewise.
	(loc_list_has_views): New.
	(gen_llsym): Set vl_symbol too.
	(maybe_gen_llsym, skip_loc_list_entry): New.
	(dwarf2out_maybe_output_loclist_view_pair): New.
	(output_loc_list): Output view list or entries too.
	(output_view_list_offset): New.
	(output_die): Handle dw_val_class_view_list.
	(output_dwarf_version): New.
	(output_compilation_unit_header): Use it.
	(output_skeleton_debug_sections): Likewise.
	(output_rnglists, output_line_info): Likewise.
	(output_pubnames, output_aranges): Update version comments.
	(output_one_line_info_table): Output view numbers in asm comments.
	(dw_loc_list): Determine current endview, pass it to new_loc_list.
	Call maybe_gen_llsym.
	(loc_list_from_tree_1): Adjust.
	(add_AT_location_description): Create view list attribute if
	needed, check it's absent otherwise.
	(convert_cfa_to_fb_loc_list): Adjust.
	(maybe_emit_file): Call output_asm_line_debug_info for test.
	(dwarf2out_var_location): Reset views as needed.  Precompute
	add_var_loc_to_decl args.  Call get_attr_min_length only if we have the
	attribute.  Set view.
	(new_line_info_table): Reset next view.
	(set_cur_line_info_table): Call output_asm_line_debug_info for test.
	(dwarf2out_source_line): Likewise.  Output view resets and labels to
	the assembler, or select appropriate line info opcodes.
	(prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
	(optimize_string_length): Catch it.  Adjust.
	(resolve_addr): Copy vl_symbol along with ll_symbol.  Handle
	dw_val_class_view_list, and remove it if no longer needed.
	(hash_loc_list): Hash view numbers.
	(loc_list_hasher::equal): Compare them.
	(optimize_location_lists): Check whether a view list symbol is
	needed, and whether the locview attribute is present, and
	whether they match.  Remove the locview attribute if no longer
	needed.
	(index_location_lists): Call skip_loc_list_entry for test.
	(dwarf2out_finish): Call output_asm_line_debug_info for test.
	Use output_dwarf_version.
	* dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
	(struct dw_val_node): Add val_view_list.
	* final.c (SEEN_NEXT_VIEW): New.
	(set_next_view_needed): New.
	(clear_next_view_needed): New.
	(maybe_output_next_view): New.
	(final_start_function): Rename to...
	(final_start_function_1): ... this.  Take pointer to FIRST,
	add SEEN parameter.  Emit param bindings in the initial view.
	(final_start_function): Reintroduce SEEN-less interface.
	(final): Rename to...
	(final_1): ... this.  Take SEEN parameter.  Output final pending
	next view at the end.
	(final): Reintroduce seen-less interface.
	(final_scan_insn): Output pending next view before switching
	sections or ending a block.  Mark the next view as needed when
	outputting variable locations.  Notify debug backend of section
	changes, and of location view changes.
	(rest_of_handle_final): Adjust.
	* toplev.c (process_options): Autodetect value for debug variable
	location views option.  Warn on incompat5 without -gdwarf-5.
	* doc/invoke.texi (gvariable-location-views): New.
	(gvariable-location-views=incompat5): New.
	(gno-variable-location-views): New.

From-SVN: r257510
2018-02-09 02:21:57 +00:00
David Malcolm
6d3aa24cd6 Fix ICE in find_taken_edge_computed_goto (PR 84136)
PR 84136 reports an ICE within sccvn_dom_walker when handling a
C/C++ source file that overuses the labels-as-values extension.
The code in question stores a jump label into a global, and then
jumps to it from another function, which ICEs after inlining:

void* a;

void foo() {
  if ((a = &&l))
      return;

  l:;
}

int main() {
  foo();
  goto *a;

  return 0;
}

This appears to be far beyond what we claim to support in this
extension - but we shouldn't ICE.

What's happening is that, after inlining, we have usage of a *copy*
of the label, which optimizes away the if-return logic, turning it
into an infinite loop.

On entry to the sccvn_dom_walker we have this gimple:

main ()
{
  void * a.0_1;

  <bb 2> [count: 0]:
  a = &l;

  <bb 3> [count: 0]:
l:
  a.0_1 = a;
  goto a.0_1;
}

and:
  edge taken = find_taken_edge (bb, vn_valueize (val));
reasonably valueizes the:
  goto a.0_1;
after the:
  a = &l;
  a.0_1 = a;
as if it were:
  goto *&l;

find_taken_edge_computed_goto then has:

2380	  dest = label_to_block (val);
2381	  if (dest)
2382	    {
2383	      e = find_edge (bb, dest);
2384	      gcc_assert (e != NULL);
2385	    }

which locates dest as a self-jump from block 3 back to itself.

However, the find_edge call returns NULL - it has a predecessor edge
from block 2, but no successor edges.

Hence the assertion fails and we ICE.

A successor edge from the computed goto could have been created by
make_edges if the label stmt had been in the function, but make_edges
only looks in the current function when handling computed gotos, and
the label only appeared after inlining.

The following patch removes the assertion, fixing the ICE.

gcc/testsuite/ChangeLog:
	PR tree-optimization/84136
	* gcc.c-torture/compile/pr84136.c: New test.

gcc/ChangeLog:
	PR tree-optimization/84136
	* tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
	that the result of find_edge is non-NULL.

From-SVN: r257509
2018-02-09 01:07:11 +00:00
GCC Administrator
7e64287b36 Daily bump.
From-SVN: r257508
2018-02-09 00:16:14 +00:00
Sergey Shalnov
001e73373e re PR target/83008 ([performance] Is it better to avoid extra instructions in data passing between loops?)
PR target/83008
	* config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
	storing integer register in SImode.  Fix cost of 256 and 512
	byte aligned SSE register store.

	* config/i386/i386.c (ix86_multiplication_cost): Fix
	multiplication cost for TARGET_AVX512DQ.

testsuite/ChangeLog:	

	PR target/83008
	* gcc.target/i386/pr83008.c: New test.

From-SVN: r257505
2018-02-08 23:31:15 +01:00
Peter Bergner
2318f3b46e re PR target/81143 (New test case gcc.target/powerpc/pr79799-2.c fails on powerpc BE)
PR target/81143
	* gcc.target/powerpc/pr79799-2.c: Use __LITTLE_ENDIAN__.

From-SVN: r257504
2018-02-08 14:40:32 -06:00
Paolo Carlini
a7f8415c05 constexpr.c (cxx_eval_component_reference): Use INDIRECT_REF_P.
2018-02-08  Paolo Carlini  <paolo.carlini@oracle.com>

	* constexpr.c (cxx_eval_component_reference): Use INDIRECT_REF_P.
	* lambda.c (build_capture_proxy): Likewise.
	* search.c (field_access_p): Likewise.
	* semantics.c (omp_clause_decl, omp_privatize_field,
	finish_omp_clauses): Likewise.

From-SVN: r257503
2018-02-08 18:56:17 +00:00
Paolo Carlini
739745618a re PR c++/83806 (Spurious -Wunused-but-set-parameter with nullptr)
/cp
2018-02-08  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/83806
	* typeck.c (decay_conversion): Use mark_rvalue_use for the special
	case of nullptr too.

/testsuite
2018-02-08  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/83806
	* g++.dg/warn/Wunused-parm-11.C: New.

From-SVN: r257502
2018-02-08 18:54:39 +00:00
Mike Stump
b00dcb136e Mark previous change with:
PR target/84113

From-SVN: r257500
2018-02-08 18:39:43 +00:00
Marek Polacek
c6ba596b58 re PR tree-optimization/84238 (ICE tree check: expected integer_cst, have plus_expr in to_wide, at tree.h:5527)
PR tree-optimization/84238
	* tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
	get_range_strlen.

	* gcc.dg/Wstringop-overflow-3.c: New test.

From-SVN: r257497
2018-02-08 16:18:04 +00:00
Nathan Sidwell
a429699832 [C++ PATCH] initializer_list diagnostic
https://gcc.gnu.org/ml/gcc-patches/2018-02/msg00434.html
	* class.c (finish_struct): Fix std:initializer_list diagnostic
	formatting.

	* g++.dg/cpp0x/initlist93.C: Adjust diagnostic.

From-SVN: r257496
2018-02-08 16:11:39 +00:00
Ian Lance Taylor
74e6f14adb runtime: get missing function name from symbol table
If we trace back through code that has no debug info, as when calling
    through C code compiled with -g0, we won't have a function name.
    Try to fetch the function name using the symbol table.
    
    Adding the test case revealed that gotest failed to use the gccgo tag
    when matching files, so add that.
    
    Reviewed-on: https://go-review.googlesource.com/92756

From-SVN: r257495
2018-02-08 15:37:43 +00:00
Ian Lance Taylor
080eaf7a88 Makefile.am (check-gccgo, check-gcc): Add options to pick up target libstdc++, to permit tests that use C++.
* Makefile.am (check-gccgo, check-gcc): Add options to pick up
	target libstdc++, to permit tests that use C++.
	* Makefile.in: Rebuild.

From-SVN: r257494
2018-02-08 15:34:42 +00:00
Ian Lance Taylor
9adab5dd16 libgo: update to Go1.10rc2
Reviewed-on: https://go-review.googlesource.com/92736

From-SVN: r257493
2018-02-08 15:30:22 +00:00
Richard Sandiford
b5ec4de777 Another fix for single-element permutes (PR 84265)
PR83753 was about a case in which we ended up trying to "vectorise"
a group of loads ore stores using single-element vectors.  The problem
was that we were classifying the load or store as VMAT_CONTIGUOUS_PERMUTE
rather than VMAT_CONTIGUOUS, even though it doesn't make sense to permute
a single-element vector.

In that PR it was enough to change get_group_load_store_type,
because vectorisation ended up being unprofitable and so we didn't
take things further.  But when vectorisation is profitable, the same
fix is needed in vectorizable_load and vectorizable_store.

2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>

gcc/
	PR tree-optimization/84265
	* tree-vect-stmts.c (vectorizable_store): Don't treat
	VMAT_CONTIGUOUS accesses as grouped.
	(vectorizable_load): Likewise.

gcc/testsuite/
	PR tree-optimization/84265
	* gcc.dg/vect/pr84265.c: New test.

From-SVN: r257492
2018-02-08 15:17:20 +00:00