Commit Graph

162454 Commits

Author SHA1 Message Date
GCC Administrator 6662eec399 Daily bump.
From-SVN: r262266
2018-06-30 00:16:35 +00:00
Jeff Law bc5e6ab695 v850.c (v850_legitimate_address_p): Handle large displacements for TARGET_V850E2V3 and newer.
* config/v850/v850.c (v850_legitimate_address_p): Handle large
	displacements for TARGET_V850E2V3 and newer.
	(TARGET_LRA_P): Remove.  Defaults to LRA now.
	* config/v850/v850.md (sign23byte_load): Remove.
	(unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
	(23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.

From-SVN: r262257
2018-06-29 12:42:35 -06:00
Martin Sebor 0bcf7e67ab strlenopt-46.c: Define strnlen for targets like Solaris 10 that don't define the function.
gcc/testsuite/ChangeLog:

	* gcc.dg/strlenopt-46.c: Define strnlen for targets like Solaris 10
	that don't define the function.

From-SVN: r262255
2018-06-29 10:37:54 -06:00
Marek Polacek dd2a449867 re PR c++/86184 (Conditional expression with omitted operand cannot use rvalue of type convertible to bool)
PR c++/86184
	* tree.c (cp_save_expr): Don't call save_expr for TARGET_EXPRs.

	* g++.dg/ext/cond3.C: New test.

From-SVN: r262254
2018-06-29 15:25:14 +00:00
Martin Liska 1f2bb38a85 When using -fprofile-generate=/some/path mangle absolute path of file (PR lto/85759).
2018-06-29  Martin Liska  <mliska@suse.cz>

	PR lto/85759
	* coverage.c (coverage_init): Mangle full path name.
	* doc/invoke.texi: Document the change.
	* gcov-io.c (mangle_path): New.
	* gcov-io.h (mangle_path): Likewise.
	* gcov.c (mangle_name): Use mangle_path for path mangling.

From-SVN: r262251
2018-06-29 14:03:36 +00:00
Kyrylo Tkachov 52057dc4ac [arm] Avoid STRD with odd register for TARGET_ARM in output_move_double
In this testcase the user forces an odd register as the starting reg for a DFmode value.
The output_move_double function tries to store that using an STRD instruction.
But for TARGET_ARM the starting register of an STRD must be an even one.
This is always the case with compiler-allocated registers for DFmode values, but the
inline assembly forced our hand here.

This patch  restricts the STRD-emitting logic in output_move_double to not avoid
odd-numbered source registers in STRD.
I'm not a fan of the whole function, we should be exposing a lot of the logic in there
to RTL rather than at the final output stage, but that would need to be fixed separately.

	* config/arm/arm.c (output_move_double): Don't allow STRD instructions
	if starting source register is not even.

	* gcc.target/arm/arm-soft-strd-even.c: New test.

From-SVN: r262250
2018-06-29 13:36:35 +00:00
Alexander Monakov b33aa7209e contrib: introduce Vim addon directory, add match.pd syntax plugin
* vim-gcc-dev/README: New file.
	* vim-gcc-dev/ftdetect/gcc-dev.vim: New file.
	* vim-gcc-dev/syntax/gcc-match.vim: New file.
	* gimple.vim: Move under vim-gcc-dev/syntax/.
	* gcc-rtl.vim: Likewise.

From-SVN: r262249
2018-06-29 16:14:46 +03:00
Tom de Vries 8864590b7c [testsuite/guality] Use line number vars in gdb-test
2018-06-29  Tom de Vries  <tdevries@suse.de>

	* gcc.dg/guality/pr45882.c (foo): Add line number var for breakpoint
	line, and use it.
	* lib/gcc-dg.exp (get-absolute-line): Factor out of ...
	(process-message): ... here.
	* lib/gcc-gdb-test.exp (gdb-test): Use get-absolute-line.

From-SVN: r262248
2018-06-29 11:25:49 +00:00
Martin Liska 3f10efd4ee Fix bit-test expansion for single cluster (PR tree-optimization/86263).
2018-06-29  Martin Liska  <mliska@suse.cz>

        PR tree-optimization/86263
	* tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
        Make edge redirection.
2018-06-29  Martin Liska  <mliska@suse.cz>

        PR tree-optimization/86263
	* gcc.dg/tree-ssa/pr86263.c: New test.

From-SVN: r262247
2018-06-29 10:57:00 +00:00
David Malcolm 6475e077a0 dumpfile.c: add indentation via DUMP_VECT_SCOPE
This patch adds a concept of nested "scopes" to dumpfile.c's dump_*_loc
calls, and wires it up to the DUMP_VECT_SCOPE macro in tree-vectorizer.h,
so that the nested structure is shown in -fopt-info by indentation.

For example, this converts -fopt-info-all e.g. from:

test.c:8:3: note: === analyzing loop ===
test.c:8:3: note: === analyze_loop_nest ===
test.c:8:3: note: === vect_analyze_loop_form ===
test.c:8:3: note: === get_loop_niters ===
test.c:8:3: note: symbolic number of iterations is (unsigned int) n_9(D)
test.c:8:3: note: not vectorized: loop contains function calls or data references that cannot be analyzed
test.c:8:3: note: vectorized 0 loops in function

to:

test.c:8:3: note: === analyzing loop ===
test.c:8:3: note:  === analyze_loop_nest ===
test.c:8:3: note:   === vect_analyze_loop_form ===
test.c:8:3: note:    === get_loop_niters ===
test.c:8:3: note:   symbolic number of iterations is (unsigned int) n_9(D)
test.c:8:3: note:   not vectorized: loop contains function calls or data references that cannot be analyzed
test.c:8:3: note: vectorized 0 loops in function

showing that the "symbolic number of iterations" message is within
the "=== analyze_loop_nest ===" (and not within the
"=== vect_analyze_loop_form ===").

This is also enabling work for followups involving optimization records
(allowing the records to directly capture the nested structure of the
dump messages).

gcc/ChangeLog:
	* dumpfile.c (dump_loc): Add indentation based on scope depth.
	(dump_scope_depth): New variable.
	(get_dump_scope_depth): New function.
	(dump_begin_scope): New function.
	(dump_end_scope): New function.
	* dumpfile.h (get_dump_scope_depth): New declaration.
	(dump_begin_scope): New declaration.
	(dump_end_scope): New declaration.
	(class auto_dump_scope): New class.
	(AUTO_DUMP_SCOPE): New macro.
	* tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
	AUTO_DUMP_SCOPE.

From-SVN: r262246
2018-06-29 09:56:40 +00:00
Jonathan Wakely 6fdce073fc Add whitespace to some dejagnu directives in libstdc++ tests
* testsuite/20_util/add_rvalue_reference/requirements/alias_decl.cc:
	Add whitespace to dejagnu directive.
	* testsuite/23_containers/array/element_access/at_neg.cc: Likewise.

From-SVN: r262245
2018-06-29 10:54:07 +01:00
Richard Biener c2fd033cdf tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert compute_all_dependences succeeds.
2018-06-29  Richard Biener  <rguenther@suse.de>

	* tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
	compute_all_dependences succeeds.
	* tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
	exceed --param loop-max-datarefs-for-datadeps.

From-SVN: r262244
2018-06-29 09:49:14 +00:00
Jakub Jelinek 135101526e * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
From-SVN: r262241
2018-06-29 09:38:59 +02:00
GCC Administrator d0c1b377fb Daily bump.
From-SVN: r262240
2018-06-29 00:16:42 +00:00
Ian Lance Taylor 94e12bd4d9 runtime: don't stat a NULL filename
Noticed in https://gcc.gnu.org/PR86331.
    
    Reviewed-on: https://go-review.googlesource.com/121417

From-SVN: r262234
2018-06-28 20:54:04 +00:00
David Malcolm eacb16dc79 C++: less verbose error-recovery for version conflict markers
gcc/cp/ChangeLog:
	* parser.c (cp_parser_error_1): After issuing a conflict marker
	error, consume tokens until the end of the source line.

gcc/testsuite/ChangeLog:
	* g++.dg/conflict-markers-2.C: New test.

From-SVN: r262232
2018-06-28 20:24:49 +00:00
Jason Merrill b8be145128 PR c++/86342 - -Wdeprecated-copy and system headers.
* decl2.c (cp_warn_deprecated_use): Don't warn about declarations
	in system headers.

From-SVN: r262231
2018-06-28 16:22:21 -04:00
Carl Love 02fa47a905 p9-extract-1.c: Add test case.
gcc/testsuite/ChangeLog:

2018-06-28  Carl Love  <cel@us.ibm.com>

	* gcc.target/p9-extract-1.c: Add test case.
	* gcc.target/builtins-3-p9-runnable.c: Add test case to match
	name in ABI.

From-SVN: r262230
2018-06-28 19:45:07 +00:00
Uros Bizjak 81c8283fb6 re PR target/86348 (ICE: in curr_insn_transform, at lra-constraints.c:3919: unable to generate reloads for: vec_extractv4si_0_zext_sse4)
PR target/86348
	* config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
	alternative 0 in preferred_for_speed attribute.

testsuite/ChangeLog:

	PR target/86348
	* gcc.target/i386/pr86348.c: New test.

From-SVN: r262228
2018-06-28 21:02:02 +02:00
Paul Koning 9cd1665b99 Fix insn length for pdp11 shift patterns.
* config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
	* config/pdp11/pdp11.c (pdp11_shift_length): New function.
	* config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
	* config/pdp11/pdp11.md: Correct "length" attribute calculation
	for shift insn patterns.

From-SVN: r262227
2018-06-28 14:50:12 -04:00
Ian Lance Taylor a0e8e6308f re PR go/86343 (types built by GO share TYPE_FIELDS in unsupported way)
PR go/86343
	* go-gcc.cc (Gcc_backend::set_placeholder_struct_type): Call
	build_variant_type_copy rather than build_distinct_type_copy.

From-SVN: r262225
2018-06-28 17:46:36 +00:00
Wilco Dijkstra 42c5d1212f [testsuite] Fix f16_mov_immediate_3.c
Fix and simplify the testcase so it generates dup even on latest trunk.

    testsuite/
	* gcc.target/aarch64/f16_mov_immediate_3.c: Fix testcase.

From-SVN: r262222
2018-06-28 16:09:39 +00:00
Fritz Reese 58b9de9ef5 re PR fortran/82865 (Option -fdec collides with PDT)
2018-06-28  Fritz Reese  <fritzoreese@gmail.com>

    gcc/fortran/ChangeLog:

	PR fortran/82865
	* decl.c (gfc_match_type): Refactor and check for PDT declarations.

    gcc/testsuite/ChangeLog:

	PR fortran/82865
	* gfortran.dg/dec_type_print_2.f03: New testcase.

From-SVN: r262221
2018-06-28 15:31:24 +00:00
David Malcolm 29b54a9d2d Hide alt_dump_file within dumpfile.c
This patch removes alt_dump_file from dumpfile.h, making it static
within dumpfile.c.  This allows for changing how -fopt-info is
implemented, and potentially adding other kinds of dump target, such
as remarks or optimization records.

Doing so requires changing the implementation of dump_enabled_p, so
the patch changes this to a simple lookup of a boolean global, which
is updated any time dump_file or alt_dump_file change.

gcc/ChangeLog:
	* cgraph.c (cgraph_node::get_body): Replace assignments to
	"dump_file" with calls to set_dump_file.
	* dumpfile.c (alt_dump_file): Make static, and group with...
	(alt_flags): ...this definition.
	(dumps_are_enabled): New variable.
	(refresh_dumps_are_enabled): New function.
	(set_dump_file): New function.
	(set_alt_dump_file): New function.
	(gcc::dump_manager::dump_start): Replace assignments to
	"dump_file" and "alt_dump_file" with calls to set_dump_file and
	set_alt_dump_file.
	(gcc::dump_manager::dump_finish): Likewise.
	* dumpfile.h (alt_dump_file): Delete decl.
	(dumps_are_enabled): New variable decl.
	(set_dump_file): New function decl.
	(dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
	global.
	* tree-nested.c (lower_nested_functions): Replace assignments to
	"dump_file" with calls to set_dump_file.

From-SVN: r262220
2018-06-28 14:55:42 +00:00
Eric Botcazou f601629c61 tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the goto_locus of each outgoing edge of each basic block.
* tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
	goto_locus of each outgoing edge of each basic block.

From-SVN: r262219
2018-06-28 14:49:15 +00:00
Richard Biener 291d3f4d26 dwarf2out.c (decl_scope_table): Remove.
2018-06-28  Richard Biener  <rguenther@suse.de>

	* dwarf2out.c (decl_scope_table): Remove.
	(push_decl_scope): Likewise.
	(pop_decl_scope): Likewise.
	(gen_type_die_for_member): Do not call push/pop_decl_scope.
	(gen_struct_or_union_type_die): Likewise.
	(gen_tagged_type_die): Likewise.
	(dwarf2out_init): Do not initialize decl_scope_table.
	(dwarf2out_c_finalize): Do not free it.

From-SVN: r262218
2018-06-28 10:22:38 +00:00
Richard Biener 4ece5af359 dwarf2out.c (gen_subprogram_die): Use is_unit_die when deciding whether to not re-use a DIE.
2018-06-28  Richard Biener  <rguenther@suse.de>

	* dwarf2out.c (gen_subprogram_die): Use is_unit_die when
	deciding whether to not re-use a DIE.

From-SVN: r262217
2018-06-28 10:18:27 +00:00
Jackson Woodruff 8e236ddde7 * MAINTAINERS (write after approval): Add myself.
From-SVN: r262216
2018-06-28 10:17:39 +00:00
David Pagan b62dc9ca3c re PR c/55976 (-Werror=return-type should error on returning a value from a void function)
2018-06-28  David Pagan  <dave.pagan@oracle.com>

	PR c/55976
	* gcc.dg/noncompile/pr55976-1.c: Add dg-prune-output for extraneous
	message causing unexpected test FAIL.

From-SVN: r262215
2018-06-28 08:42:17 +00:00
Martin Liska 62bb4a4b25 Add missing header file inclusion.
2018-06-28  Martin Liska  <mliska@suse.cz>

	* brigspec.c: Add missing header file inclusion.

From-SVN: r262214
2018-06-28 08:18:01 +00:00
Richard Biener 8a731f44bf dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an DW_AT_abstract_origin attribute.
2018-06-28  Richard Biener  <rguenther@suse.de>

	* dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
	DW_AT_abstract_origin attribute.

From-SVN: r262213
2018-06-28 07:43:36 +00:00
Martin Liska 1aabb71d13 Come up with jump_table ratio constants used in jump_table_cluster.
2018-06-28  Martin Liska  <mliska@suse.cz>

	* tree-switch-conversion.c (jump_table_cluster::can_be_handled):
        Use newly introduced constants.
	* tree-switch-conversion.h (struct jump_table_cluster):
        Define max_ratio_for_size and max_ratio_for_speed.

From-SVN: r262212
2018-06-28 07:15:55 +00:00
Martin Liska df7c79742a Fix clustering algorithm in switch expansion.
2018-06-28  Martin Liska  <mliska@suse.cz>

	* tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
        Add new checking assert to catch invalid state.
	(jump_table_cluster::can_be_handled): Handle single case
        clusters.
	(jump_table_cluster::is_beneficial): Bail out for such case.
	(bit_test_cluster::find_bit_tests):
        Add new checking assert to catch invalid state.
	(bit_test_cluster::can_be_handled): Handle single case
        clusters.
	(bit_test_cluster::is_beneficial): Bail out for such case.
	(switch_decision_tree::analyze_switch_statement):
        Fix comment.
2018-06-28  Martin Liska  <mliska@suse.cz>

	* gcc.dg/tree-ssa/switch-1.c: New test.

From-SVN: r262211
2018-06-28 07:14:57 +00:00
Martin Liska d86c7648fb Come up with new --completion option.
2018-06-28  Martin Liska  <mliska@suse.cz>

	* common.opt: Introduce -completion option.
	* gcc.c (driver_handle_option): Handle it.
	(driver::main): Print completions if completion
        is set.
	* opt-suggestions.c (option_proposer::get_completions):
        New function.
	(option_proposer::suggest_completion): Likewise.
	(option_proposer::find_param_completions): Likewise.
	(verify_autocompletions): Likewise.
	(test_completion_valid_options): Likewise.
	(test_completion_valid_params): Likewise.
	(in_completion_p): Likewise.
	(empty_completion_p): Likewise.
	(test_completion_partial_match): Likewise.
	(test_completion_garbage): Likewise.
	(opt_proposer_c_tests): Likewise.
	* opt-suggestions.h: Declare new functions.
	* opts.c (common_handle_option): Handle OPT__completion_.
	* selftest-run-tests.c (selftest::run_tests): Add
        opt_proposer_c_tests.
	* selftest.c (assert_str_startswith): New.
	* selftest.h (assert_str_startswith): Likewise.
	(opt_proposer_c_tests): New.
	(ASSERT_STR_STARTSWITH): Likewise.

From-SVN: r262210
2018-06-28 07:11:16 +00:00
Martin Liska 98086b2ba2 Makefile.in: Add opt-suggestions.o.
.
2018-06-28  Martin Liska  <mliska@suse.cz>

	* Makefile.in: Add opt-suggestions.o.
	* gcc-main.c: Include opt-suggestions.h.
	* gcc.c (driver::driver): Likewise.
	(driver::~driver): Remove m_option_suggestions.
	(driver::build_option_suggestions): Moved to option_proposer.
	(driver::suggest_option): Likewise.
	(driver::handle_unrecognized_options): Use option_proposer.
	* gcc.h (class driver): Add new memver m_option_proposer.
	* opt-suggestions.c: New file.
	* opt-suggestions.h: New file.
2018-06-28  Martin Liska  <mliska@suse.cz>

	* cppspec.c: Include opt-suggestions.h.
2018-06-28  Martin Liska  <mliska@suse.cz>

	* gfortranspec.c: Include opt-suggestions.h.
2018-06-28  Martin Liska  <mliska@suse.cz>

	* jit-playback.c: Include opt-suggestions.h.

From-SVN: r262209
2018-06-28 07:08:01 +00:00
Martin Liska 3de37a5d22 Introduce auto_string_vec class.
2018-06-28  Martin Liska  <mliska@suse.cz>

	* vec.h (class auto_string_vec): New (moved from auto_argvec).
	(auto_string_vec::~auto_string_vec): Likewise.
2018-06-28  Martin Liska  <mliska@suse.cz>

	* jit-playback.c (class auto_argvec): Moved to vec.h.
	(auto_argvec::~auto_argvec): Likewise.
	(compile): Use the renamed name.
	(invoke_driver): Likewise.

From-SVN: r262208
2018-06-28 07:07:40 +00:00
Eric Botcazou fb18c0c9fe tree-inline.c (remap_gimple_stmt): Force input_location on the new statement if id->reset_location is true.
* tree-inline.c (remap_gimple_stmt): Force input_location on the new
	statement if id->reset_location is true.
	(copy_edges_for_bb): Do not set goto_locus on the new edges if
	id->reset_location is true.
	(copy_phis_for_bb): Force input_location on the arguments if
	id->reset_location is true.
	(expand_call_inline): Set id->reset_location if DECL_IGNORED_P
	is set on the function to be inlined.
	* tree-inline.h (struct copy_body_data): Move remapping_type_depth and
	prevent_decl_creation_for_types fields up and add reset_location field.

From-SVN: r262207
2018-06-28 06:21:13 +00:00
Stephan Bergmann 09e1386fd0 * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
From-SVN: r262206
2018-06-27 21:48:57 -06:00
Dimitar Dimitrov 764df76cb2 lra-eliminations.c (update_reg_eliminate): Mark all spanning hard registers for Pmode.
2018-06-23  Dimitar Dimitrov  <dimitar@dinux.eu>

	* lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
	registers for Pmode.
	* lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
	hard registers for the clobbered pseudo.

From-SVN: r262205
2018-06-27 21:43:48 -06:00
GCC Administrator 3d09a8abd3 Daily bump.
From-SVN: r262203
2018-06-28 00:16:28 +00:00
David Malcolm 5da1234bb7 C++: don't offer bogus "._0" suggestions (PR c++/86329)
PR c++/86329 reports that the C++ frontend can offer bogus suggestions like:

#include <string>

int compare()
{
  return __n1 - __n2;
}

suggested.cc: In function 'int compare()':
suggested.cc:5:10: error: '__n1' was not declared in this scope
   return __n1 - __n2;
          ^~~~
suggested.cc:5:10: note: suggested alternative: '._61'
   return __n1 - __n2;
          ^~~~
          ._61
suggested.cc:5:17: error: '__n2' was not declared in this scope
   return __n1 - __n2;
                 ^~~~
suggested.cc:5:17: note: suggested alternative: '._72'
   return __n1 - __n2;
                 ^~~~
                 ._72

The dot-prefixed names are an implementation detail of how we implement
anonymous enums found in the header files, generated via
anon_aggrname_format in make_anon_name.

This patch uses anon_aggrname_p to filter them out when considering
which names to suggest.

gcc/cp/ChangeLog:
	PR c++/86329
	* name-lookup.c (consider_binding_level): Filter out names that
	match anon_aggrname_p.

gcc/testsuite/ChangeLog:
	PR c++/86329
	* g++.dg/lookup/pr86329.C: New test.

From-SVN: r262199
2018-06-27 23:21:46 +00:00
Paul Koning b4324a144b Convert pdp11 back end to CCmode.
* common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
	mutually exclusive options.
	* config/pdp11/constraints.md (h): New constraint.
	(O): Update definition to match shift code generation.
	(D): New constraint.
	* config/pdp11/pdp11-modes.def (CCNZ): Define mode.
	(CCFP): Remove.
	* config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
	function.
	(output_jump): Change arguments.
	(pdp11_fixed_cc_regs): New function.
	(pdp11_cc_mode): Ditto.
	(pdp11_expand_shift): Ditto.
	(pdp11_assemble_shift): Ditto.
	(pdp11_small_shift): Ditto.
	(pdp11_branch_cost): Remove.
	* config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
	from output.
	(pdp11_register_move_cost): Update for CC registers.
	(pdp11_rtx_costs): Add case for LSHIFTRT.
	(pdp11_output_jump): Add CCNZ mode conditional branches.
	(notice_update_cc_on_set): Remove.
	(pdp11_cc_mode): New function.
	(simple_memory_operand): Correct pre/post decrement case.
	(no_side_effect_operand): New function.
	(pdp11_regno_reg_class): Add CC_REGS class.
	(pdp11_fixed_cc_regs): New function.
	(pdp11_small_shift): New function.
	(pdp11_expand_shift): New function to expand shift insns.
	(pdp11_assemble_shift): New function to output shifts.
	(pdp11_branch_cost): Remove.
	(pdp11_modes_tieable_p): Make QI/HI modes tieable.
	* config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
	(WCHAR_TYPE): Ditto.
	(PTRDIFF_TYPE): Ditto.
	(ADJUST_INSN_LENGTH): New macro.
	(FIXED_REGISTERS): Add CC registers.
	(CALL_USED_REGISTERS): Ditto.
	(reg_class): Ditto.
	(REG_CLASS_NAMES): Ditto.
	(REG_CLASS_CONTENTS): Ditto.
	(SELECT_CC_MODE): Use new function.
	(TARGET_FLAGS_REGNUM): New macro.
	(TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
	(cc0_reg_rtx): Remove.
	(CC_STATUS_MDEP): Remove.
	(CC_STATUS_MDEFP_INIT): Remove.
	(CC_IN_FPU): Remove.
	(NOTICE_UPDATE_CC): Remove.
	(REGISTER_NAMES): Add CC registers.
	(BRANCH_COST): Change to constant 1.
	* config/pdp11/pdp11.md: Rewrite for CCmode condition code
	handling.
	* config/pdp11/pdp11.opt (mbcopy): Remove.
	(mbcopy-builtin): Remove.
	(mbranch-cheap): Remove.
	(mbranch-expensive): Remove.
	* config/pdp11/predicates.md (expand_shift_operand): Update to
	match shift code generation.
	(ccnz_operator): New predicate.
	* doc/invoke.texi (PDP-11 Options): Remove deleted options
	-mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
	Remove non-existent option -mabshi, -mno-abshi.  Document mutually
	exclusive options.
	* doc/md.texi (PDP-11): Document new D and h constraints.  Update
	description of O constraint.

From-SVN: r262198
2018-06-27 17:58:24 -04:00
Carl Love 356d53635f Add test case that was supposed to be added in commit 255556 on 2017-12-11.
gcc/testsuite/ChangeLog:

2018-06-27  Carl Love  <cel@us.ibm.com>

Add test case that was supposed to be added in commit 255556 on 2017-12-11.

	* gcc.target/vsx-vector-abss.c: New file to test vec_abss.

From-SVN: r262196
2018-06-27 21:50:01 +00:00
Rainer Orth b61c9b997c Fix typo in libgcc/Makefile.in
* Makefile.in (install_leaf): Use enable_gcov instead of
	enable_libgcov.

From-SVN: r262195
2018-06-27 20:32:27 +00:00
François Dumont e6cad9872b stl_vector.h (struct _Vector_base<>::_Vector_impl_data): New.
2018-06-27  François Dumont  <fdumont@gcc.gnu.org>

	* include/bits/stl_vector.h
	(struct _Vector_base<>::_Vector_impl_data): New.
	(struct _Vector_base<>::_Vector_impl): Inherit from latter.
	(_Vector_base<>::_Vector_impl::_M_swap_data): Move...
	(_Vector_base<>::_Vector_impl_data::_M_swap_data): ...here.
	(_Vector_base<>::_Vector_impl()): Add noexcept qualification.
	(_Vector_base<>::_Vector_impl(_Vector_impl&&)): New.
	(_Vector_base<>::_Vector_impl(_Tp_alloc_type&&, _Vector_impl&&)): New.
	(_Vector_base(const allocator_type&, _Vector_base&&)): New, use latter.
	(_Vector_base()): Default.
	(_Vector_base(_Vector_base&&)): Default.
	(_Vector_base(size_t)) [_GLIBCXX_INLINE_VERSION]: Delete.
	(_Vector_base(_Tp_alloc_type&&)) [_GLIBCXX_INLINE_VERSION]: Delete.
	(_Vector_base::_M_create_storage(size_t)): Make protected.
	(vector()): Default.
	(vector(vector&&)): Default.
	(vector(vector&&, const allocator_type&, true_type)): New.
	(vector(vector&&, const allocator_type&, false_type)): New.
	(vector(vector&&, const allocator_type&)): Use latters.
	(vector(_InputIte, _InputIte, const allocator_type&)): Call
	_M_range_initialize directly.
	* include/debug/vector
	(vector(vector&&, const allocator_type&)): Add noexcept qualification.
	* testsuite/23_containers/vector/allocator/default_init.cc: New.
	* testsuite/23_containers/vector/cons/noexcept_move_construct.cc: Add
	static assertions.

From-SVN: r262194
2018-06-27 20:23:20 +00:00
Jeff Law f8dc0f2bf4 v850.md (addsi3_set_flags): New pattern.
* config/v850/v850.md (addsi3_set_flags): New pattern.
	(subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
	(iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
	(zero_extendhisi2_v850_set_flags): Likewise.
	(zero_extendqisi2_v850_set_flags): Likewise.
	(ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
	(lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
	(ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.

Co-Authored-By: Austin Law <austinklaw@gmail.com>

From-SVN: r262192
2018-06-27 12:32:48 -06:00
Jeff Law 1ec0eb08ce v850-protos.h (notice_update_cc): Remove.
* config/v850/v850-protos.h (notice_update_cc): Remove.
	* config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
	(v850_print_operand): Handle 'D' and "d".
	(v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
	Add handling of arithmetic/logical operations compared against zero.
	(v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
	Do not look at v850_compare_op, instead get mode from last argument.
	(v850_gen_compare): Remove
	(increment_stack): Use addsi3_clobber_flags to avoid splitting failure
	after reload for prologue insns.
	(expand_prologue): Account for CLOBBER of CC_REGNUM in various
	patterns.
	(construct_save_jarl): Likewise.
	(TARGET_FLAGS_REGNUM): Define.
	* config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
	(NOTICE_UPDATE_CC): Remove.
	* config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
	than cc0.  Conditionalize on reload_completed.
	(cmpsi_insn, setfcc_insn): Likewise.
	(tst1 splitter): Turn into define_and_split which sets the flags
	after reload.
	(cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
	(cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
	(cstoresf4, cstoredf4): Clobber the flags.
	(cmpsi, cmpsf, cmpdf): Remove expanders.
	(setf_insn): Remove pattern.
	(addsi3): Turn into define_and_split which clobbers the flags after
	reload and a suitable pattern (addsi3_clobber_flags) for use after
	reload.
	(subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
	(ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
	(ashrsi3, ashrsi3_v850e2): Likewise.
	(bins): Clobber the flags.
	(movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
	(movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
	(fix_loop_counter, call_internal_short, call_internal_long): Likewise.
	(call_value_internal_short, call_value_internal_long): Likewise.
	(callt_save_interrupt, callt_return_interrupt): Likewise.
	(save_interrupt, return_interrupt): Likewise.
	(callt_save_all_interrupt, save_all_interrupt): Likewise.
	(_save_all_interrupt, callt_restore_all_interrupt): Likewise.
	(restore_all_interrupt, _restore_all_interrupt): Likewise.
	(All FP comparisons): Only allow after reload has completed.
	(trfsr): Likewise.
	(divh, divhu): Tweak output template.
	(branch_z_normal, branch_z_invert): Remove
	(branch_nz_normal, branch_nz_invert): Likewise.
	(extendhisi_insn, extendqisi_insn): Do not clobber flags.

Co-Authored-By: Austin Law <austinklaw@gmail.com>

From-SVN: r262190
2018-06-27 12:31:10 -06:00
Jeff Law 03e32fb748 v850-modes.def (CCZ, CCNZ): Add new modes.
* config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
	* config/v850/v850.c (notice_update_cc): Remove.
	* config/v850/v850.h  (CC_OVERFLOW_UNUSABLE): Remove
	(CC_NO_CARRY): Likewise.
	(NOTICE_UPDATE_CC): Define to nothing.
	* config/v850/v850.md: Remove block comment on cc0 handling
	Remove "cc" attribute from all patterns.  Remove cc_status handling
	from all patterns.  Minor formatting fixes.

Co-Authored-By: Austin Law <austinklaw@gmail.com>

From-SVN: r262189
2018-06-27 12:30:06 -06:00
Jason Merrill 8945521a50 Avoid crash on friend in nested class template.
* name-lookup.c (do_pushtag): If we skip a class level, also skip
	its template level.

From-SVN: r262188
2018-06-27 13:29:51 -04:00
Kyrylo Tkachov 25846b5089 [AArch64] Add support for Arm Cortex-A76
The Cortex-A76 is an Armv8.2-A processor with dotproduct and FP16 support.
It can be paired with the Cortex-A55 and hence the option
-mcpu/-mtune=cortex-a76.cortex-a55 is also introduced.

Bootstrapped and tested on aarch64-none-linux-gnu. 

	* config/aarch64/aarch64-cores.def (cortex-a76): New entry.
	(cortex-a76.cortex-a55): Likewise.
	* config/aarch64/aarch64-tune.md: Regenerate.
	* doc/invoke.texi (AArch64 Options): Document cortex-a76 and
	cortex-a76.cortex-a55.

From-SVN: r262186
2018-06-27 14:33:16 +00:00