Commit Graph

146524 Commits

Author SHA1 Message Date
Paolo Carlini
c381174498 diagnostic.c (diagnostic_impl, [...]): New.
2016-06-07  Paolo Carlini  <paolo.carlini@oracle.com>

	* diagnostic.c (diagnostic_impl, diagnostic_n_impl): New.
	(inform, inform_at_rich_loc, inform_n, warning, warning_at,
	warning_at_rich_loc, warning_n, pedwarn, permerror,
	permerror_at_rich_loc, error, error_n, error_at, error_at_rich_loc,
	sorry, fatal_error, internal_error, internal_error_no_backtrace):
	Use the above.

From-SVN: r237168
2016-06-07 07:36:02 +00:00
Richard Biener
6b80d6fa72 re PR tree-optimization/71428 (wrong code with -Os -fno-tree-forwprop (breaks in the .bswap dump))
2016-06-07  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/71428
	* tree-ssa-math-opts.c (perform_symbolic_merge): Properly distinguish
	BIT_FIELD_REF op vs. load.

	* gcc.dg/torture/pr71428.c: New testcase.

From-SVN: r237167
2016-06-07 07:31:40 +00:00
Richard Biener
0f3f94375a re PR tree-optimization/71423 (wrong code at -Os and above on x86_64-linux-gnu)
2016-06-07  Richard Biener  <rguenther@suse.de>

	PR middle-end/71423
	* match.pd ((X | ~Y) -> Y <= X): Properly invert the comparison
	for signed ops.

	* gcc.dg/torture/pr71423.c: New testcase.

From-SVN: r237166
2016-06-07 07:30:47 +00:00
John David Anglin
df32c0b335 pa.md (call): Generate indirect long calls to non-local functions on TARGET_64BIT.
* config/pa/pa.md (call): Generate indirect long calls to non-local
	functions on TARGET_64BIT.
	(call_value): Likewise.

From-SVN: r237164
2016-06-07 01:56:01 +00:00
John David Anglin
6552d0dd54 pa.md (call_val_reg_64bit): Remove "reg: DI " clobber from pattern and subsequent splitters.
* config/pa/pa.md (call_val_reg_64bit): Remove "reg: DI " clobber from
	pattern and subsequent splitters.
	(call_val_reg_64bit_post_reload): Likewise.

From-SVN: r237163
2016-06-07 01:43:14 +00:00
GCC Administrator
6965374210 Daily bump.
From-SVN: r237162
2016-06-07 00:16:21 +00:00
Kugan Vivekanandarajah
ec963f2ae5 re PR tree-optimization/71408 (wrong code at -Os and above on x86_64-linux-gnu)
gcc/ChangeLog:

2016-06-07  Kugan Vivekanandarajah  <kuganv@linaro.org>

	PR middle-end/71408
	* tree-ssa-reassoc.c (zero_one_operation): Fix NEGATE_EXPR operand for
	propagate_op_to_single_use.


gcc/testsuite/ChangeLog:

2016-06-07  Kugan Vivekanandarajah  <kuganv@linaro.org>

	PR middle-end/71408
	* gcc.dg/tree-ssa/pr71408.c: New test.

From-SVN: r237158
2016-06-06 23:46:11 +00:00
Kugan Vivekanandarajah
46ab5b6ede re PR target/71281 (ICE on gcc trunk on knl, wsm, ivb and bdw targets (tree-ssa-reassoc))
gcc/ChangeLog:

2016-06-07  Kugan Vivekanandarajah  <kuganv@linaro.org>

	PR middle-end/71281
	* tree-ssa-reassoc.c (reassociate_bb): Set uid for negate stmt.


gcc/testsuite/ChangeLog:

2016-06-07  Kugan Vivekanandarajah  <kuganv@linaro.org>

	PR middle-end/71281
	* g++.dg/torture/pr71281.C: New test.

From-SVN: r237157
2016-06-06 23:41:26 +00:00
Uros Bizjak
c7ca8ef875 i386.h (enum ix86_enitity): Add X86_DIRFLAG.
* config/i386/i386.h (enum ix86_enitity): Add X86_DIRFLAG.
	(enum x86_dirflag_state): New enum.
	(NUM_MODES_FOR_MODE_SWITCHING): Add X86_DIRFLAG_ANY.
	(machine_function): Remove needs_cld.
	(ix86_current_function_needs_cld): Remove.
	* config/i386/i386.c (ix86_set_func_type): Set
	ix86_optimize_mode_switching[X86_DIRFLAG] to 1.
	(ix86_expand_prologue): Do not emit CLD here.
	(ix86_dirflag_mode_needed): New function.
	(ix86_dirflag_mode_entry): Ditto.
	(ix86_mode_needed): Handle X86_DIRFLAG entity.
	(ix86_mode_after): Ditto.
	(ix86_mode_entry): Ditto.
	(ix86_mode_exit): Ditto.
	(ix86_emit_mode_set): Ditto.
	* config/i386/i386.md (strmov_singleop): Set
	ix86_optimize_mode_switching[X86_DIRFLAG] to 1 for TARGET_CLD.
	Do not set ix86_current_function_needs_cld.
	(rep_mov): Ditto.
	(strset_singleop): Ditto.
	(rep_stos): Ditto.
	(cmpstrnqi_nz_1): Ditto.
	(cmpstrnqi_1): Ditto.
	(strlenqi_1): Ditto.

From-SVN: r237156
2016-06-07 00:35:18 +02:00
Marek Polacek
1f40cff379 re PR c/71362 (Wrong position for "error: size of unnamed array is negative")
PR c/71362
	* c-parser.c (c_parser_direct_declarator): Set location.

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

From-SVN: r237155
2016-06-06 21:15:07 +00:00
Jakub Jelinek
6f5bcd2400 re PR c++/70847 (exponential time in cp_fold for chained virtual function calls)
PR c++/70847
	PR c++/71330
	PR c++/71393
	* cp-gimplify.c (cp_fold_r): Set *walk_subtrees = 0 and return NULL
	right after cp_fold call if cp_fold has returned the same stmt
	already in some earlier cp_fold_r call.
	(cp_fold_function): Add pset automatic variable, pass its address
	to cp_walk_tree.

	* g++.dg/opt/pr70847.C: New test.
	* g++.dg/ubsan/pr70847.C: New test.
	* g++.dg/ubsan/pr71393.C: New test.

Co-Authored-By: Patrick Palka <ppalka@gcc.gnu.org>

From-SVN: r237151
2016-06-06 21:48:22 +02:00
Jakub Jelinek
158beb4ab3 re PR tree-optimization/71259 (GCC trunk emits wrong code)
PR tree-optimization/71259
	* tree-vect-slp.c (vect_get_constant_vectors): For
	VECTOR_BOOLEAN_TYPE_P, return all ones constant instead of
	one for constant op, and use COND_EXPR for non-constant.

	* gcc.dg/vect/pr71259.c: New test.

From-SVN: r237147
2016-06-06 20:35:03 +02:00
Joseph Myers
8af8321074 * fr.po: Update.
From-SVN: r237145
2016-06-06 18:39:12 +01:00
David Malcolm
d9b950dd44 Selftest framework
gcc/ChangeLog:
	* Makefile.in (OBJS): Add function-tests.o,
	hash-map-tests.o, hash-set-tests.o, rtl-tests.o,
	selftest-run-tests.o.
	(OBJS-libcommon): Add selftest.o.
	(OBJS-libcommon-target): Add selftest.o.
	(all.internal): Add "selftest".
	(all.cross): Likewise.
	(selftest): New phony target.
	(s-selftest): New target.
	(selftest-gdb): New phony target.
	(COLLECT2_OBJS): Add selftest.o.
	* bitmap.c: Include "selftest.h".
	(selftest::test_gc_alloc): New function.
	(selftest::test_set_range): New function.
	(selftest::test_clear_bit_in_middle): New function.
	(selftest::test_copying): New function.
	(selftest::test_bitmap_single_bit_set_p): New function.
	(selftest::bitmap_c_tests): New function.
	* common.opt (fself-test): New.
	* diagnostic-show-locus.c: Include "selftest.h".
	(make_range): New function.
	(test_range_contains_point_for_single_point): New function.
	(test_range_contains_point_for_single_line): New function.
	(test_range_contains_point_for_multiple_lines): New function.
	(assert_eq): New function.
	(test_get_line_width_without_trailing_whitespace): New function.
	(selftest::diagnostic_show_locus_c_tests): New function.
	* et-forest.c: Include "selftest.h".
	(selftest::test_single_node): New function.
	(selftest::test_simple_tree): New function.
	(selftest::test_disconnected_nodes): New function.
	(selftest::et_forest_c_tests): New function.
	* fold-const.c: Include "selftest.h".
	(selftest::assert_binop_folds_to_const): New function.
	(selftest::assert_binop_folds_to_nonlvalue): New function.
	(selftest::test_arithmetic_folding): New function.
	(selftest::fold_const_c_tests): New function.
	* function-tests.c: New file.
	* gimple.c: Include "selftest.h".
	Include "gimple-pretty-print.h".
	(selftest::verify_gimple_pp): New function.
	(selftest::test_assign_single): New function.
	(selftest::test_assign_binop): New function.
	(selftest::test_nop_stmt): New function.
	(selftest::test_return_stmt): New function.
	(selftest::test_return_without_value): New function.
	(selftest::gimple_c_tests): New function.
	* hash-map-tests.c: New file.
	* hash-set-tests.c: New file.
	* input.c: Include "selftest.h".
	(selftest::assert_loceq): New function.
	(selftest::test_accessing_ordinary_linemaps): New function.
	(selftest::test_unknown_location): New function.
	(selftest::test_builtins): New function.
	(selftest::test_reading_source_line): New function.
	(selftest::input_c_tests): New function.
	* rtl-tests.c: New file.
	* selftest-run-tests.c: New file.
	* selftest.c: New file.
	* selftest.h: New file.
	* spellcheck.c: Include "selftest.h".
	(selftest::levenshtein_distance_unit_test_oneway): New function,
	adapted from testsuite/gcc.dg/plugin/levenshtein_plugin.c.
	(selftest::levenshtein_distance_unit_test): Likewise.
	(selftest::spellcheck_c_tests): Likewise.
	* toplev.c: Include selftest.h.
	(toplev::run_self_tests): New.
	(toplev::main): Handle -fself-test.
	* toplev.h (toplev::run_self_tests): New.
	* tree.c: Include "selftest.h".
	(selftest::test_integer_constants): New function.
	(selftest::test_identifiers): New function.
	(selftest::test_labels): New function.
	(selftest::tree_c_tests): New function.
	* tree-cfg.c: Include "selftest.h".
	(selftest::push_fndecl): New function.
	(selftest::test_linear_chain): New function.
	(selftest::test_diamond): New function.
	(selftest::test_fully_connected): New function.
	(selftest::tree_cfg_c_tests): New function.
	* vec.c: Include "selftest.h".
	(selftest::safe_push_range): New function.
	(selftest::test_quick_push): New function.
	(selftest::test_safe_push): New function.
	(selftest::test_truncate): New function.
	(selftest::test_safe_grow_cleared): New function.
	(selftest::test_pop): New function.
	(selftest::test_safe_insert): New function.
	(selftest::test_ordered_remove): New function.
	(selftest::test_unordered_remove): New function.
	(selftest::test_block_remove): New function.
	(selftest::reverse_cmp): New function.
	(selftest::test_qsort): New function.
	(selftest::vec_c_tests): New function.c.
	* wide-int.cc: Include selftest.h and wide-int-print.h.
	(selftest::from_int <wide_int>): New function.
	(selftest::from_int <offset_int>): New function.
	(selftest::from_int <widest_int>): New function.
	(selftest::assert_deceq): New function.
	(selftest::assert_hexeq): New function.
	(selftest::test_printing <VALUE_TYPE>): New function template.
	(selftest::test_ops <VALUE_TYPE>): New function template.
	(selftest::test_comparisons <VALUE_TYPE>): New function template.
	(selftest::run_all_wide_int_tests <VALUE_TYPE>): New function
	template.
	(selftest::wide_int_cc_tests): New function.

gcc/testsuite/ChangeLog:
	* gcc.dg/plugin/levenshtein-test-1.c: Delete.
	* gcc.dg/plugin/levenshtein_plugin.c: Delete.
	* gcc.dg/plugin/plugin.exp (plugin_test_list): Remove the
	above.

From-SVN: r237144
2016-06-06 17:11:30 +00:00
Ville Voutilainen
dbc6221fe5 Support allocators in tuples of zero size.
* include/std/tuple (tuple<>::tuple(),
	tuple<>::tuple(allocator_arg_t, const _Alloc&),
	tuple<>::tuple(allocator_arg_t, const _Alloc&, const tuple&)): New.
	* testsuite/20_util/tuple/cons/allocators.cc: Adjust.

From-SVN: r237143
2016-06-06 19:28:59 +03:00
Kyrylo Tkachov
36f9ad6933 [3/3][RTL ifcvt] PR middle-end/37780: Conditional expression with __builtin_clz() should be optimized out
PR middle-end/37780
	* ifcvt.c (noce_try_ifelse_collapse): New function.
	Declare prototype.
	(noce_process_if_block): Call noce_try_ifelse_collapse.
	* simplify-rtx.c (simplify_cond_clz_ctz): New function.
	(simplify_ternary_operation): Use the above to simplify
	conditional CLZ/CTZ expressions.

	* gcc.c-torture/execute/pr37780.c: New test.
	* gcc.target/aarch64/pr37780_1.c: Likewise.
	* gcc.target/arm/pr37780_1.c: Likewise.

From-SVN: r237141
2016-06-06 16:06:05 +00:00
Kyrylo Tkachov
e8536e2b9f [2/3][AArch64] Keep CTZ components together until after reload
PR middle-end/37780
	* config/aarch64/aarch64.md (ctz<mode>2): Convert to
	define_insn_and_split.

From-SVN: r237139
2016-06-06 16:01:47 +00:00
Kyrylo Tkachov
3295b529d2 [1/3][ARM] Keep ctz expressions together until after reload
PR middle-end/37780
	* config/arm/arm.md (ctzsi2): Convert to define_insn_and_split.

From-SVN: r237138
2016-06-06 15:59:48 +00:00
Marek Polacek
5545a90715 c-typeck.c (comptypes_internal): Handle comparisons of INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes.
* c-typeck.c (comptypes_internal): Handle comparisons of
	INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes.  Don't check
	TYPE_REF_CAN_ALIAS_ALL.

	* c-c++-common/attr-may-alias-1.c: New test.
	* c-c++-common/attr-may-alias-2.c: New test.
	* gcc.dg/pr39464.c: Turn dg-warning into dg-bogus.

From-SVN: r237137
2016-06-06 15:50:23 +00:00
Jonathan Wakely
94229fb6dc libstdc++/71320 Add or remove file permissions correctly
PR libstdc++/71320
	* src/filesystem/ops.cc (permissions(const path&, perms, error_code&)):
	Add or remove permissions according to perms argument.
	* testsuite/experimental/filesystem/operations/permissions.cc: New
	test.

From-SVN: r237136
2016-06-06 16:50:01 +01:00
Aaron Conole
0a0ec53d12 re PR bootstrap/71400 (profiledbootstrap failed)
PR libgcc/71400
	* libgcov-driver-system.c (__gcov_error_file): Disable if IN_GCOV_TOOL.
	(get_gcov_error_file): Check __gcov_error_file before trying to
	initialize it.
	(gcov_error): Always use get_gcov_error_file.

Co-Authored-By: Nathan Sidwell <nathan@acm.org>

From-SVN: r237135
2016-06-06 15:24:24 +00:00
Bernd Edlinger
93671519e2 re PR c/24414 (Old-style asms don't clobber memory)
gcc/
2016-06-06  Bernd Edlinger  <bernd.edlinger@hotmail.de>

        PR c/24414
        * cfgexpand.c (expand_asm_loc): Remove handling for ADDR_EXPR.
        Implicitly clobber memory for basic asm with non-empty assembler
        string.  Use targetm.md_asm_adjust also here.
        * compare-elim.c (arithmetic_flags_clobber_p): Use asm_noperands here.
        * final.c (final_scan_insn): Handle basic asm in PARALLEL block.
        * gimple.c (gimple_asm_clobbers_memory_p): Handle basic asm with
        non-empty assembler string.
        * ira.c (compute_regs_asm_clobbered): Use asm_noperands here.
        * recog.c (asm_noperands): Handle basic asm in PARALLEL block.
        (decode_asm_operands): Handle basic asm in PARALLEL block.
        (extract_insn): Handle basic asm in PARALLEL block.
        * doc/extend.texi: Mention new behavior of basic asm.
        * config/ia64/ia64 (rtx_needs_barrier): Handle ASM_INPUT here.
        * config/pa/pa.c (branch_to_delay_slot_p, branch_needs_nop_p,
        branch_needs_nop_p): Use asm_noperands.

gcc/testsuite/
2016-06-06  Bernd Edlinger  <bernd.edlinger@hotmail.de>

        PR c/24414
        * gcc.target/i386/pr24414.c: New test.

From-SVN: r237133
2016-06-06 12:31:59 +00:00
Jose E. Marchesi
690f24b775 sparc: support for the SPARC M7 and VIS 4.0
gcc/ChangeLog:
    
2016-06-06  Jose E. Marchesi  <jose.marchesi@oracle.com>
    
    	* config/sparc/sparc.md (cpu): Add niagara7 cpu type.
    	Include the M7 SPARC DFA scheduler.
    	New attribute v3pipe.
    	Annotate insns with v3pipe where appropriate.
    	Define cpu_feature vis4.
    	Add lzd instruction type and set it on clzdi_sp64 and clzsi_sp64.
    	Add (V8QI "8") to vbits.
    	Add insns {add,sub}v8qi3
    	Add insns ss{add,sub}v8qi3
    	Add insns us{add,sub}{v8qi,v4hi}3
    	Add insns {min,max}{v8qi,v4hi,v2si}3
    	Add insns {minu,maxu}{v8qi,v4hi,v2si}3
    	Add insns fpcmp{le,gt,ule,ug,ule,ugt}{8,16,32}_vis.
    	* config/sparc/niagara4.md: Add a comment explaining the
    	discrepancy between the documented latenty numbers and the
    	implemented ones.
    	* config/sparc/niagara7.md: New file.
    	* configure.ac (HAVE_AS_SPARC5_VIS4): Define if the assembler
    	supports SPARC5 and VIS 4.0 instructions.
    	* configure: Regenerate.
    	* config.in: Likewise.
    	* config.gcc: niagara7 is a supported cpu in sparc*-*-* targets.
    	* config/sparc/sol2.h (ASM_CPU32_DEFAUILT_SPEC): Set for
    	TARGET_CPU_niagara7.
    	(ASM_CPU64_DEFAULT_SPEC): Likewise.
    	(CPP_CPU_SPEC): Handle niagara7.
    	(ASM_CPU_SPEC): Likewise.
    	* config/sparc/sparc-opts.h (processor_type): Add
    	PROCESSOR_NIAGARA7.
    	(mvis4): New option.
    	* config/sparc/sparc.h (TARGET_CPU_niagara7): Define.
    	(AS_NIAGARA7_FLAG): Define.
    	(ASM_CPU64_DEFAULT_SPEC): Set for niagara7.
    	(CPP_CPU64_DEFAULT_SPEC): Likewise.
    	(CPP_CPU_SPEC): Handle niagara7.
    	(ASM_CPU_SPEC): Likewise.
    	* config/sparc/sparc.c (niagara7_costs): Define.
    	(sparc_option_override): Handle niagara7 and adjust cache-related
    	parameters with better values for niagara cpus.  Also support VIS4.
    	(sparc32_initialize_trampoline): Likewise.
    	(sparc_use_sched_lookahead): Likewise.
    	(sparc_issue_rate): Likewise.
    	(sparc_register_move_cost): Likewise.
    	(dump_target_flag_bits): Support VIS4.
    	(sparc_vis_init_builtins): Likewise.
    	(sparc_builtins): Likewise.
    	* config/sparc/sparc-c.c (sparc_target_macros): Define __VIS__ for
    	VIS4 4.0.
    	* config/sparc/driver-sparc.c (cpu_names): Add SPARC-M7 and
    	UltraSparc M7.
    	* config/sparc/sparc.opt (sparc_processor_type): New value
    	niagara7.
    	* config/sparc/visintrin.h (__attribute__): Prototypes for the
    	VIS4 builtins.
    	* doc/invoke.texi (SPARC Options): Document -mcpu=niagara7 and
    	-mvis4.
    	* doc/extend.texi (SPARC VIS Built-in Functions): Document the
    	VIS4 builtins.
    
gcc/testsuite/ChangeLog:
    
2016-06-06  Jose E. Marchesi  <jose.marchesi@oracle.com>
    
    	* gcc.target/sparc/vis4misc.c: New file.
    	* gcc.target/sparc/fpcmp.c: Likewise.
    	* gcc.target/sparc/fpcmpu.c: Likewise.

From-SVN: r237132
2016-06-06 13:40:02 +02:00
Jonathan Wakely
8964d5aaaf * doc/sourcebuild.texi (Directives): Remove extra closing braces.
From-SVN: r237131
2016-06-06 11:14:43 +01:00
Eric Botcazou
42a5e4106a decl.c (Gigi_Equivalent_Type): Make sure equivalent types are present before returning them.
* gcc-interface/decl.c (Gigi_Equivalent_Type): Make sure equivalent
	types are present before returning them.  Remove final assertion.
	(gnat_to_gnu_entity) <E_Access_Protected_Subprogram_Type>: Adjust to
	above change.
	<E_Protected_Type>: Likewise.

From-SVN: r237130
2016-06-06 10:03:14 +00:00
Eric Botcazou
f8a9b81f10 trans.c (elaborate_all_entities_for_package): Also do not elaborate Itypes.
* gcc-interface/trans.c (elaborate_all_entities_for_package): Also do
	not elaborate Itypes.

From-SVN: r237129
2016-06-06 09:55:44 +00:00
Eric Botcazou
1f0b1322e0 utils.c (gnat_internal_attribute_table): Add support for noinline and noclone attributes.
* gcc-interface/utils.c (gnat_internal_attribute_table): Add support
	for noinline and noclone attributes.
	(handle_noinline_attribute): New handler.
	(handle_noclone_attribute): Likewise.

From-SVN: r237127
2016-06-06 09:51:33 +00:00
Eric Botcazou
5a4916beb8 * gcc-interface/trans.c (process_type): Beef up comment.
From-SVN: r237126
2016-06-06 09:47:17 +00:00
Eric Botcazou
62801a777a utils2.c (build_call_alloc_dealloc): Do not substitute placeholder expressions here but...
* gcc-interface/utils2.c (build_call_alloc_dealloc): Do not substitute
	placeholder expressions here but...
	* gcc-interface/trans.c (gnat_to_gnu) <N_Free_Statement>: ...here.
	Make an exception to the protection of a CALL_EXPR result with an
	unconstrained type only in the same cases as Call_to_gnu.

From-SVN: r237125
2016-06-06 09:44:11 +00:00
Eric Botcazou
f1ff07ec09 trans.c (gnat_to_gnu): Rework special code dealing with boolean rvalues and set the location directly.
* gcc-interface/trans.c (gnat_to_gnu): Rework special code dealing
	with boolean rvalues and set the location directly.  Do not set the
	location in the other cases for a simple name.
	(gnat_to_gnu_external): Clear the location on the expression.

From-SVN: r237123
2016-06-06 09:31:13 +00:00
Eric Botcazou
d5ebeb8c1b decl.c (gnat_to_gnu_entity): Remove useless 'else' statements and tidy up.
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Component>: Remove
	useless 'else' statements and tidy up.
	<E_Array_Subtype>: Fully deal with the declaration here.
	<E_Incomplete_Type>: Use properly-typed constant.
	Assert that we don't apply the special type treatment to dummy types.
	Separate this treatment from the final back-annotation and simplify
	the condition for the RM size.
	(gnat_to_gnu_param): Add GNU_PARAM_TYPE parameter and adjust.
	(gnat_to_gnu_subprog_type): Ajust call to gnat_to_gnu_param.
	* gcc-interface/trans.c (gnat_to_gnu) <N_Subprogram_Declaration>: Add
	comment.
	(process_freeze_entity): Remove obsolete code.
	(process_type): Minor tweaks.

From-SVN: r237122
2016-06-06 09:26:07 +00:00
Eric Botcazou
4d9446f9c0 einfo.ads (Returns_Limited_View): Remove.
* einfo.ads (Returns_Limited_View): Remove.
	(Set_Returns_Limited_View ): Likewise.
	* einfo.adb (Returns_Limited_View): Likewise.
	(Set_Returns_Limited_View ): Likewise.
	* freeze.adb (Late_Freeze_Subprogram): Remove.
	(Freeze_Entity): Do not defer the freezing of functions returning an
	incomplete type coming from a limited context.

From-SVN: r237121
2016-06-06 09:18:41 +00:00
Alan Hayward
31ce615743 vect-live-1.c: Use additional-options.
2016-06-06  Alan Hayward  <alan.hayward@arm.com>

testsuite/
	* gcc.dg/vect/vect-live-1.c: Use additional-options.
	* gcc.dg/vect/vect-live-3.c: Likewise.

From-SVN: r237120
2016-06-06 09:15:23 +00:00
Eric Botcazou
7414a3c340 gigi.h (finish_subprog_decl): Add ASM_NAME parameter.
* gcc-interface/gigi.h (finish_subprog_decl): Add ASM_NAME parameter.
	* gcc-interface/decl.c (gnu_ext_name_for_subprog): New function.
	(gnat_to_gnu_entity) <E_Subprogram_Type>: Do not check compatibility
	of profiles for builtins here...  Call gnu_ext_name_for_subprog.
	Also update profiles if pointers to limited_with'ed types are
	updated.
	(gnat_to_gnu_param): Restore the correct source location information
	for vector ABI warnings.
	(associate_subprog_with_dummy_type): Add comment about AI05-019.
	Set TYPE_DUMMY_IN_PROFILE_P flag unconditionally.
	(update_profile): Deal with builtin declarations.
	Call gnu_ext_name_for_subprog.  Adjust call to finish_subprog_decl.
	(update_profiles_with): Add comment.
	(gnat_to_gnu_subprog_type): Reuse the return type if it is complete.
	Likewise for parameter declarations in most cases.  Do not change
	the return type for the CICO mechanism if the profile is incomplete.
	...but here instead.  Always reset the slot for the parameters.
	* gcc-interface/utils.c (create_subprog_decl): Call
	gnu_ext_name_for_subprog.  Do not set the assembler name here but...
	(finish_subprog_decl): ...but here instead.  Add ASM_NAME parameter.

From-SVN: r237119
2016-06-06 09:08:56 +00:00
Eric Botcazou
128a98eace exp_ch9.adb (Expand_N_Protected_Type_Declaration): Insert the declaration of the corresponding record type before that of the...
* exp_ch9.adb (Expand_N_Protected_Type_Declaration): Insert the
	declaration of the corresponding record type before that of the
	unprotected version of the subprograms that operate on it.
	(Expand_Access_Protected_Subprogram_Type): Declare the Equivalent_Type
	just before the original type.
	* sem_ch3.adb (Handle_Late_Controlled_Primitive): Point the current
	declaration to the newly created declaration for the primitive.
	(Analyze_Subtype_Declaration): Remove obsolete code forcing the
	freezing of the subtype before its declaration.
	(Replace_Anonymous_Access_To_Protected_Subprogram): Insert the new
	declaration in the nearest enclosing scope for formal parameters too.
	(Build_Derived_Access_Type): Restore the status of the created Itype
	after it is erased by Copy_Node.
	* sem_ch6.adb (Exchange_Limited_Views): Remove guard on entry.
	(Analyze_Subprogram_Body_Helper): Call Exchange_Limited_Views only if
	the specification is present.
	Move around the code changing the designated view of the return type
	and save the original view.  Restore it on exit.
	* sem_ch13.adb (Build_Predicate_Function_Declaration): Always insert
	the declaration right after that of the type.

From-SVN: r237118
2016-06-06 08:46:33 +00:00
Richard Biener
9fcebb5aa8 re PR tree-optimization/71398 (ICE at -O3 in 32-bit and 64-bit mode on x86_64-linux-gnu (Segmentation fault, find_edge))
2016-06-06  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/71398
	* tree-ssa-loop-ivcanon.c (unloop_loops): First unloop, then
	remove edges.

	* gcc.dg/torture/pr71398.c: New testcase.

From-SVN: r237117
2016-06-06 06:55:19 +00:00
James Bowman
d48ab0103a ft32.c (ft32_setup_incoming_varargs, [...]): Handle pretend_args.
[gcc]
   * config/ft32/ft32.c (ft32_setup_incoming_varargs,
   ft32_expand_prolog, ft32_expand_epilogue):
   Handle pretend_args.
   * config/ft32/ft32.h: Remove OUTGOING_REG_PARM_STACK_SPACE.
   * config/ft32/ft32.md: Add pretend_returner.

From-SVN: r237116
2016-06-06 02:31:42 +00:00
GCC Administrator
24673d5598 Daily bump.
From-SVN: r237115
2016-06-06 00:16:25 +00:00
Uros Bizjak
903ca97bc4 re PR target/71389 (ICE on trunk gcc on ivybridge target (df_refs_verify))
PR target/71389
	* config/i386/i386.c (ix86_avx256_split_vector_move_misalign):
	Copy op1 RTX to avoid invalid sharing.
	(ix86_expand_vector_move_misalign): Ditto.

testsuite/ChangeLog:

	PR target/71389
	* g++.dg/pr71389.C: New test.

From-SVN: r237111
2016-06-06 00:55:35 +02:00
John David Anglin
603e5a828b expr.c (move_by_pieces_d::generate): Mark mode parameter with ATTRIBUTE_UNUSED.
* expr.c (move_by_pieces_d::generate): Mark mode parameter with
	ATTRIBUTE_UNUSED.

From-SVN: r237110
2016-06-05 20:42:40 +00:00
Jerry DeLisle
9c1eb332b0 re PR fortran/71404 (416.gamess in SPEC CPU 2006 failed to build)
2016-06-05  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR fortran/71404
	* gfortran.dg/fmt_read_5.f: New test.

From-SVN: r237109
2016-06-05 19:58:38 +00:00
Jerry DeLisle
bc72093756 re PR fortran/71404 (416.gamess in SPEC CPU 2006 failed to build)
2016-06-05  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR fortran/71404
	* io.c (match_io): For READ, commit in pending symbols in the
	current statement before trying to match an expression so that
	if the match fails and we undo symbols we dont toss good symbols.

From-SVN: r237108
2016-06-05 19:49:59 +00:00
Ville Voutilainen
7a66745357 Protect allocator-overloads of tuple-from-tuple constructors from cases that would create dangling references.
Protect allocator-overloads of tuple-from-tuple constructors
	from cases that would create dangling references.
	* include/std/tuple (tuple(allocator_arg_t, const _Alloc&,
 	const tuple<_UElements...>&), tuple(allocator_arg_t, const _Alloc&,
 	tuple<_UElements...>&&)): Add a check for _NonNestedTuple.
	* testsuite/20_util/tuple/cons/nested_tuple_construct.cc: Adjust.

From-SVN: r237106
2016-06-05 20:39:10 +03:00
Andre Vehreschild
b2d83bd2c7 re PR fortran/69659 (ICE on using option -frepack-arrays, in gfc_conv_descriptor_data_get)
gcc/testsuite/ChangeLog:

2016-06-05  Andre Vehreschild  <vehre@gcc.gnu.org>

	PR fortran/69659
	* gfortran.dg/class_array_22.f03: New test.


gcc/fortran/ChangeLog:

2016-06-05  Andre Vehreschild  <vehre@gcc.gnu.org>

	PR fortran/69659
	* trans-array.c (gfc_trans_dummy_array_bias): For class arrays use
	the address of the _data component to reference the arrays data
	component.

From-SVN: r237105
2016-06-05 19:20:54 +02:00
Jan Hubicka
ec81960e85 * gcc.dg/tree-prof/peel-1.c: Fix testcase.
From-SVN: r237104
2016-06-05 16:46:38 +00:00
Jan Hubicka
429d2750bf predict.c (predicted_by_loop_heuristics_p): New function.
* predict.c (predicted_by_loop_heuristics_p): New function.
	(predict_iv_comparison): Use it.
	(predict_loops): Walk from innermost loops; do not predict edges
	leaving multiple loops multiple times; implement
	PRED_LOOP_ITERATIONS_MAX heuristics.
	* predict.def (PRED_LOOP_ITERATIONS_MAX): New predictor.
	* gcc.dg/predict-9.c: Update template.

From-SVN: r237103
2016-06-05 16:43:19 +00:00
Jan Hubicka
46f1f3c1c2 cfg.c (check_bb_profile): Do not report mismatched profiles when only edges out of BB are EH edges.
* cfg.c (check_bb_profile): Do not report mismatched profiles when
	only edges out of BB are EH edges.

From-SVN: r237102
2016-06-05 16:38:12 +00:00
Paolo Carlini
c1c009833d re PR c++/49377 (Template specialization attributes cause type mismatches when used)
2016-06-05  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/49377
	* g++.dg/template/pr49377.C: New.

From-SVN: r237098
2016-06-05 15:08:22 +00:00
GCC Administrator
16e396885a Daily bump.
From-SVN: r237097
2016-06-05 00:16:18 +00:00
Martin Sebor
58bfcc6615 PR c/48116 - -Wreturn-type does not work as advertised
gcc/ChangeLog:
2016-06-04  Martin Sebor  <msebor@redhat.com>
	    Marcin Baczyński <marbacz@gmail.com>

	PR c/48116
	* doc/invoke.texi (-Wreturn-type): Mention not warning on return with
	a void expression in a void function.

Co-Authored-By: Marcin Baczyński <marbacz@gmail.com>

From-SVN: r237093
2016-06-04 14:50:50 -06:00