Commit Graph

95380 Commits

Author SHA1 Message Date
Iain Sandoe
76d29410c7 objc-next-runtime-abi-01.c (objc_eh_personality): Use gcc personality for Objective-C m32.
gcc/obj:

	* objc-next-runtime-abi-01.c (objc_eh_personality): Use gcc personality
	for Objective-C m32.

From-SVN: r181312
2011-11-12 13:54:33 +00:00
Jan Hubicka
c481ae7f87 re PR bootstrap/50822 (Solaris/SPARC bootstrap failure with Sun as: invalid assembler for ios_init.cc)
PR bootstrap/50822
	* cgraphunit.c (output_weakrefs): Output really only weakrefs.

From-SVN: r181311
2011-11-12 13:19:55 +00:00
Nathan Sidwell
eeabee0aac gcov.c (struct name_map): New.
* gcov.c (struct name_map): New.
	(names, n_names, a_names): New global vars.
	(print_usage): Adjust usage.
	(generate_results): Canonicalize main file name.
	(release_structures): Adjust.
	(name_search, name_sort): New callbacks.
	(find_source): Look for and create a canonical name.
	(canonicalize_name): New.
	(make_gcov_file_name): Reimplement and fix mangling.
	(mangle_name): New.
	* doc/gcov.texi: Update documentation about path preservation.

	testsuite/
	* gcc.misc-tests/gcov-15.c: New.

From-SVN: r181309
2011-11-12 11:35:42 +00:00
Eric Botcazou
926706f828 Fix recent entry
From-SVN: r181308
2011-11-12 08:57:49 +00:00
David S. Miller
49db0ca8f6 Fix Linux/sparc build after generic asm output optimizations.
* config/sparc/linux.h (ASM_GENERATE_INTERNAL_LABEL): Delete.
	* config/sparc/linux64.h (ASM_GENERATE_INTERNAL_LABEL): Delete.

From-SVN: r181307
2011-11-11 17:05:07 -08:00
GCC Administrator
daf6d24fd0 Daily bump.
From-SVN: r181306
2011-11-12 00:18:00 +00:00
Jakub Jelinek
292b44341c i386-protos.h (ix86_maybe_emit_epilogue_vzeroupper): New prototype.
* config/i386/i386-protos.h (ix86_maybe_emit_epilogue_vzeroupper):
	New prototype.
	* config/i386/i386.c (ix86_maybe_emit_epilogue_vzeroupper): New
	function.
	(ix86_expand_epilogue): Use it.
	* config/i386/i386.md (return, simple_return): Call it in the
	expanders.

From-SVN: r181300
2011-11-11 20:58:10 +01:00
Jakub Jelinek
bad2545327 re PR tree-optimization/51091 (FAIL: gcc.dg/tree-ssa/stdarg-2.c scan-tree-dump stdarg)
PR tree-optimization/51091
	* tree-stdarg.c (execute_optimize_stdarg): Ignore TREE_CLOBBER_P
	rhs also in the va_list_simple_ptr case.

From-SVN: r181299
2011-11-11 20:57:23 +01:00
Jakub Jelinek
dd34c087ff re PR tree-optimization/51058 (ICE: gimple check: expected gimple_assign(error_mark), have gimple_call() in gimple_assign_rhs_code, at gimple.h:1992)
PR tree-optimization/51058
	* tree-vect-slp.c (vect_remove_slp_scalar_calls): New function.
	(vect_schedule_slp): Call it.
	* tree-vect-stmts.c (vectorizable_call): If slp_node != NULL,
	don't replace scalar calls with setting of their lhs to zero here.

	* gcc.dg/vect/fast-math-vect-call-1.c: Add f4 test.
	* gfortran.dg/vect/pr51058-2.f90: New test.

From-SVN: r181298
2011-11-11 20:56:13 +01:00
Jakub Jelinek
22d8712ac4 re PR tree-optimization/51074 (No constant folding performed for VEC_PERM_EXPR, VEC_INTERLEAVE*EXPR, VEC_EXTRACT*EXPR)
PR tree-optimization/51074
	* fold-const.c (vec_cst_ctor_to_array, fold_vec_perm): New functions.
	(fold_binary_loc): Handle VEC_EXTRACT_EVEN_EXPR,
	VEC_EXTRACT_ODD_EXPR, VEC_INTERLEAVE_HIGH_EXPR and
	VEC_INTERLEAVE_LOW_EXPR with VECTOR_CST or CONSTRUCTOR operands.
	(fold_ternary_loc): Handle VEC_PERM_EXPR with VECTOR_CST or
	CONSTRUCTOR operands.
	* tree-ssa-propagate.c (valid_gimple_rhs_p): Handle ternary
	expressions.
	* tree-vect-generic.c (lower_vec_perm): Mask sel_int elements
	to 0 .. 2 * elements - 1.

From-SVN: r181297
2011-11-11 20:55:23 +01:00
Richard Henderson
0540978881 Implement omp atomic load and store.
* gimple-pretty-print.c (dump_gimple_omp_atomic_load): Dump needed.
	(dump_gimple_omp_atomic_store): Likewise.
	* optabs.c (can_atomic_exchange_p): New.
	* optabs.h (can_atomic_exchange_p): Declare.
	* omp-low.c (expand_omp_atomic_load): Implement.
	(expand_omp_atomic_store): Likewise.
	(expand_omp_atomic): Update for new arguments to load/store.

From-SVN: r181296
2011-11-11 09:52:11 -08:00
Ed Smith-Rowland
f05eec4a0d re PR c++/50976 ([C++0x] literal operator with unsigned long long parameter not accepted)
PR c++/50976
	* typeck.c (check_literal_operator_args): Reorganize test for string
	operators so size_t search depends on finding string first.

From-SVN: r181292
2011-11-11 11:51:41 -05:00
Eric Botcazou
ba5c3b2448 cprop.c: Adjust outdated comments throughout.
* cprop.c: Adjust outdated comments throughout.
	(hash_scan_set): Rename PAT parameter into SET.
	(cprop_pavloc): Rename into...
	(cprop_avloc): ...this.
	(cprop_absaltered): Rename into...
	(cprop_kill): ...this.
	(alloc_cprop_mem): Adjust for above renaming.
	(free_cprop_mem): Likewise.
	(compute_cprop_data): Likewise.
	(compute_local_properties): Rename TRANSP parameter into KILL and
	adjust throughout.  Rework comments.
	(try_replace_reg): Fix long line.
	(cprop_jump): Likewise.
	(constprop_register): Fix prototype and take INSN last.
	(cprop_insn): Adjust calls to above function.  Fix long lines.
	(bypass_block): Likewise.
	(one_cprop_pass): Likewise.

From-SVN: r181289
2011-11-11 16:34:16 +00:00
Uros Bizjak
13ced9bb88 elf.h (ELF_ASCII_ESCAPES): Rename from ESCAPES.
* config/alpha/elf.h (ELF_ASCII_ESCAPES): Rename from ESCAPES.
	(ELF_STRING_LIMIT): Rename from STRING_LIMIT.

From-SVN: r181287
2011-11-11 17:24:55 +01:00
Jason Merrill
9a9933834d varasm.c (default_elf_asm_output_limited_string): #ifdef ELF_ASCII_ESCAPES.
* varasm.c (default_elf_asm_output_limited_string): #ifdef
	ELF_ASCII_ESCAPES.
	(default_elf_asm_output_ascii): Likewise.

From-SVN: r181286
2011-11-11 10:27:02 -05:00
Uros Bizjak
5da6a3837f re PR target/50762 (ICE: in extract_insn, at recog.c:2137 (unrecognizable insn))
PR target/50762
	* config/i386/constraints.md (j): New address constraint.
	* config/i386/predicates.md (lea_address_operand): Redefine as
	special predicate.
	* config/i386/i386.md (*lea_3_zext): Use "j" constraint for operand 1.
	(*lea_4_zext): Ditto.

From-SVN: r181285
2011-11-11 15:56:00 +01:00
David S. Miller
2b38137d3d Revert sparc vec_init improvements as they cause 64-bit regressions.
gcc/

	Revert
	2011-11-05  David S. Miller  <davem@davemloft.net>

From-SVN: r181283
2011-11-11 00:23:34 -08:00
Jakub Jelinek
ca3e7c9ffd opts-common.c (generate_canonical_option): Free opt_text it it has been allocated here and not stored anywhere.
* opts-common.c (generate_canonical_option): Free opt_text
	it it has been allocated here and not stored anywhere.

From-SVN: r181282
2011-11-11 09:15:56 +01:00
Jakub Jelinek
d3cfd39e65 tree-vect-slp.c (vect_free_slp_tree): Also free SLP_TREE_CHILDREN vector.
* tree-vect-slp.c (vect_free_slp_tree): Also free SLP_TREE_CHILDREN
	vector.
	(vect_create_new_slp_node): Don't allocate node before checking stmt
	type.
	(vect_free_oprnd_info): Remove FREE_DEF_STMTS argument, always
	free def_stmts vectors and additionally free oprnd_info.
	(vect_build_slp_tree): Adjust callers.  Call it even if
	stop_recursion.  If vect_create_new_slp_node or
	vect_build_slp_tree fails, properly handle freeing memory.
	If it succeeded, clear def_stmts in oprnd_info.

From-SVN: r181281
2011-11-11 09:10:07 +01:00
Jason Merrill
4774d267d3 re PR c++/50372 ([C++0x] pointers to static functions should be valid template parameters)
PR c++/50372
	* pt.c (convert_nontype_argument_function): Allow decls with
	internal linkage in C++11.
	(convert_nontype_argument): Likewise.

From-SVN: r181280
2011-11-10 23:29:04 -05:00
Dimitrios Apostolou
5e3929ed1b final.c, output.h (fprint_whex, [...]): New functions serving as fast replacements for fprintf() integer to string...
* final.c, output.h (fprint_whex, fprint_w, fprint_ul, sprint_ul):
	New functions serving as fast replacements for fprintf() integer
	to string conversions. They were used in the following changes.
	* final.c (sprint_ul_rev): Internal helper for the above.
	(output_addr_const): case CONST_INT: don't use fprintf().
	* elfos.h (ASM_GENERATE_INTERNAL_LABEL): Don't use sprintf("%u"),
	use sprint_ul() and stpcpy() which are much faster.
	(TARGET_ASM_INTERNAL_LABEL): Define as default_elf_internal_label.
	(ELF_ASCII_ESCAPES, ELF_STRING_LIMIT): Are the old ESCAPES and
	STRING_LIMIT macros.
	(ASM_OUTPUT_LIMITED_STRING, ASM_OUTPUT_ASCII): Macros now just
	call respective functions that provide the same
	functionality. Those are default_elf_asm_output_limited_string()
	and default_elf_asm_output_ascii() in varasm.c.
	* varasm.c: Fixed some whitespace inconsistencies.
	(default_elf_asm_output_limited_string)
	(default_elf_asm_output_ascii): The above macros from elfos.h are
	implemented here as these functions, avoiding superfluous calls to
	fprintf().
	(default_elf_internal_label): Hook for
	targetm.asm_out.internal_label and ASM_OUTPUT_DEBUG_LABEL.
	* i386.c: Don't call fprintf("%u") but fprint_ul() instead.
	* defaults.h (ASM_OUTPUT_LABEL, ASM_OUTPUT_INTERNAL_LABEL):
	Expanded the macros on multiple lines for readability.
	(ASM_OUTPUT_LABELREF): Have two calls to fputs() instead of one to
	asm_fprintf().
	* dwarf2asm.c (dw2_assemble_integer, dw2_asm_output_data)
	(dw2_asm_data_uleb128, dw2_asm_delta_uleb128)
	(dw2_asm_delta_sleb128): Convert fprintf() calls to the new
	faster functions.
	* dwarf2out.c (dwarf2out_source_line): Convert fprintf() calls to
	the new faster functions.

From-SVN: r181279
2011-11-10 23:00:39 -05:00
GCC Administrator
c63ee1b7f0 Daily bump.
From-SVN: r181278
2011-11-11 00:18:44 +00:00
Andrew MacLeod
1aabd05ec0 extend.texi: Document __atomic_test_and_set and __atomic_clear.
2011-11-10  Andrew MacLeod  <amacleod@redhat.com>

	* doc/extend.texi: Document __atomic_test_and_set and __atomic_clear.

From-SVN: r181273
2011-11-10 22:46:25 +00:00
Jason Merrill
99c18869ef re PR c++/50973 ([C++0x] internal compiler error defaulted destructor virtual inheritance)
PR c++/50973
	* decl2.c (mark_used): Defer synthesis of virtual functions.
	* method.c (use_thunk): Make sure the target function has
	DECL_INTERFACE_KNOWN.

From-SVN: r181272
2011-11-10 16:14:42 -05:00
Andrew MacLeod
d660c35ea2 re PR middle-end/51038 (29_atomics/atomic_flag/clear/1.cc test_and_set/explicit.cc implicit.cc)
PR middle-end/51038

	libstdc++-v3
	* include/bits/atomic_base.h (atomic_thread_fence): Call built-in.
	(atomic_signal_fence): Call built-in.
	(test_and_set, clear): Call new atomic built-ins.

	gcc
	* builtins.c (expand_builtin_atomic_clear): New.  Expand atomic_clear.
	(expand_builtin_atomic_test_and_set): New.  Expand atomic test_and_set.
	(expand_builtin): Add cases for test_and_set and clear.
	* sync-builtins.def (BUILT_IN_ATOMIC_TEST_AND_SET): New.
	(BUILT_IN_ATOMIC_CLEAR): New.

	testsuite
	* gcc.dg/atomic-invalid.c: Add test for invalid __atomic_clear models.
	* gcc.dg/atomic-flag.c: New.  Test __atomic_test_and_set and
	__atomic_clear.

From-SVN: r181271
2011-11-10 20:38:33 +00:00
Jason Merrill
49fe93f410 PR c++/51079, DR 495
PR c++/51079, DR 495
	* call.c (joust): Check the second conversion sequence
	before checking templates.

From-SVN: r181270
2011-11-10 15:28:16 -05:00
Jason Merrill
c68b1bc7eb re PR debug/50983 (incorrect DW_LNS_negate_stmt)
PR debug/50983
	* dwarf2out.c (set_cur_line_info_table): Restore the last is_stmt
	value in the current line table.

From-SVN: r181269
2011-11-10 15:28:04 -05:00
Eric Botcazou
033ba5bf9c fe.h (Serious_Errors_Detected): New macro.
* fe.h (Serious_Errors_Detected): New macro.
	* gcc-interface/gigi.h (build_atomic_load): Declare.
	(build_atomic_store): Likewise.
	* gcc-interface/trans.c (atomic_sync_required_p): New predicate.
	(call_to_gnu): Add ATOMIC_SYNC parameter.  Use local variable.
	Build an atomic load for an In or In Out parameter if needed.
	Build an atomic store for the assignment of an Out parameter if needed.
	Build an atomic store to the target if ATOMIC_SYNC is true.
	(present_in_lhs_or_actual_p): New predicate.
	(gnat_to_gnu) <N_Identifier>: Build an atomic load if needed.
	<N_Explicit_Dereference>: Likewise.
	<N_Indexed_Component>: Likewise.
	<N_Selected_Component>: Likewise.
	<N_Assignment_Statement>: Adjust call to call_to_gnu.
	Build an atomic store to the LHS if needed.
	<N_Function_Call>:  Adjust call to call_to_gnu.
	* gcc-interface/utils2.c: Include toplev.h.
	(resolve_atomic_size): New static function.
	(build_atomic_load): New function.
	(build_atomic_store): Likewise.
	* gcc-interface/Make-lang.in (ada/utils2.o): Add toplev.h.

From-SVN: r181267
2011-11-10 19:45:17 +00:00
Nathan Sidwell
1ce1b79265 gcov.c (struct function_info): Make src an index, not a pointer.
* gcov.c (struct function_info): Make src an index, not a pointer.
	(struct source_info): Remove index and next source fields.
	(fn_end): New static var.
	(sources_index): Remove.
	(sources): Now a pointer to an array, not a list.
	(n_sources, a_sources): New.
	(process_file): Adjust for changes to read_graph_file. Insert
	functions into source lists and check line numbers here.
	(generate_results): Only allocate lines for sources with
	contents.  Adjust for source array.
	(release_structures): Likewise.
	(find_source): Return source index, adjust for source array.
	(read_graph_file): Return function list.  Don't insert into source
	lists here.
	(read_count_file): Take list of functions.
	(solve_flow_graph): Reverse the arc lists here.
	(add_line_counts): Adjust for source array.

From-SVN: r181265
2011-11-10 19:17:13 +00:00
Jakub Jelinek
ea17de23b7 re PR middle-end/51077 (Endless recursion with __builtin_object_size)
PR middle-end/51077
	* tree-object-size.c (addr_object_size): Check TREE_CODE of
	MEM_REF's operand rather than code of the MEM_REF itself.

	* gcc.c-torture/compile/pr51077.c: New test.

From-SVN: r181263
2011-11-10 20:02:30 +01:00
Andrew MacLeod
154b68db9b re PR rtl-optimization/51040 (ICE: RTL check: access of elt 1 of 'not' with last elt 0 in gen_rtx_fmt_ee_stat, at ./genrtl.h:33 with __atomic_nand_fetch())
PR rtl-optimization/51040
	* optabs.c (expand_atomic_fetch_op): Patchup code for NAND should be AND
	followed by NOT.
	* builtins.c (expand_builtin_atomic_fetch_op): Patchup code for NAND
	should be AND followed by NOT.
	* testsuite/gcc.dg/atomic-noinline[-aux].c: Test no-inline NAND and
	patchup code.

From-SVN: r181259
2011-11-10 16:39:32 +00:00
Jakub Jelinek
c8bf99b4e8 vec.h (VEC_BASE): If base is at offset 0 in the structure, use &(P)->base even if P is NULL.
* vec.h (VEC_BASE): If base is at offset 0 in the structure,
	use &(P)->base even if P is NULL.

From-SVN: r181258
2011-11-10 16:40:34 +01:00
Jakub Jelinek
03989f5595 re PR rtl-optimization/51023 (likely integer wrong code bug)
PR rtl-optimization/51023
	* combine.c (simplify_comparison) <case SIGN_EXTEND>: Don't use
	val_signbit_known_clear_p for signed comparison narrowing
	optimization.  Don't check for non-VOIDmode, use
	HWI_COMPUTABLE_MODE_P macro.
	<case ZERO_EXTEND>: Don't check for non-VOIDmode.
	Optimize even when const_op is equal to GET_MODE_MASK (mode),
	don't optimize if const_op is negative.

	* gcc.c-torture/execute/pr51023.c: New test.

From-SVN: r181257
2011-11-10 16:36:48 +01:00
Richard Guenther
4da80bfb5d re PR tree-optimization/51042 (endless recursion in phi_translate)
2011-11-10  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/51042
	* tree-ssa-pre.c (phi_translate_1): Avoid recursing on
	self-referential expressions.  Refactor code to avoid duplication.

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

From-SVN: r181256
2011-11-10 15:28:57 +00:00
Richard Guenther
c07a8cb3c9 re PR tree-optimization/51070 (ICE verify_gimple failed)
2011-11-10  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/51070
	* tree-loop-distribution.c (generate_builtin): Do not replace
	the loop with a builtin if the partition contains statements which
	results are used outside of the loop.
	(pass_loop_distribution): Verify and collect.

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

From-SVN: r181255
2011-11-10 13:46:27 +00:00
Richard Guenther
98dd3b733f re PR tree-optimization/51030 (PHI opt does not handle value-replacement with a transfer function)
2011-11-10  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/51030
	* tree-ssa-phiopt.c (jump_function_from_stmt): New function.
	(value_replacement): Use it to handle trivial non-empty
	intermediate blocks.

	* gcc.dg/tree-ssa/phi-opt-6.c: New testcase.

From-SVN: r181254
2011-11-10 12:24:52 +00:00
Richard Guenther
723afc4436 re PR middle-end/51071 (ICE in gimple_has_side_effects, at gimple.c:2513)
2011-11-10  Richard Guenther  <rguenther@suse.de>

	PR middle-end/51071
	* gimple.c (gimple_has_side_effects): Remove checking code
	that doesn't belong here.

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

From-SVN: r181253
2011-11-10 12:22:46 +00:00
Eric Botcazou
08d603d6ed * gnat.dg/loop_optimization9.ad[sb]: New test.
From-SVN: r181252
2011-11-10 10:48:11 +00:00
Ira Rosen
bac430c92e re PR tree-optimization/51058 (ICE: gimple check: expected gimple_assign(error_mark), have gimple_call() in gimple_assign_rhs_code, at gimple.h:1992)
PR tree-optimization/51058
        * tree-vect-slp.c (vect_get_constant_vectors): Handle CALL_EXPR.

From-SVN: r181251
2011-11-10 10:14:24 +00:00
Jakub Jelinek
78048b1c66 re PR tree-optimization/51000 (ICE: in vect_get_store_cost, at tree-vect-stmts.c:923 on powerpc-apple-darwin9)
PR tree-optimization/51000
	* tree-vect-patterns.c (vect_recog_bool_pattern): If adding
	a pattern stmt for a bool store, adjust DR_STMT too.
	Don't handle bool conversions to single bit precision lhs.
	* tree-vect-stmts.c (vect_remove_stores): If next is a pattern
	stmt, remove its related stmt and free its stmt_vinfo.
	(free_stmt_vec_info): Free also pattern stmt's vinfo and
	pattern def stmt's vinfo.
	* tree-vect-loop.c (destroy_loop_vec_info): Don't try to
	free pattern stmt's vinfo here.
	(vect_transform_loop): When calling vect_remove_stores,
	do gsi_next first and don't call gsi_remove.  If not strided
	store, free stmt vinfo for gsi_stmt (si) rather than stmt.

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

From-SVN: r181250
2011-11-10 09:29:52 +01:00
Paolo Carlini
136a1c15d7 re PR c++/50837 ([c++0x] static_assert and constexpr in template class)
/cp
2011-11-09  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/50837
	* pt.c (tsubst_copy_and_build) [IDENTIFIER_NODE]: In C++11 mode
	pass allow_non_integral_constant_expression_p = true to
	finish_id_expression.

/testsuite
2011-11-09  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/50837
	* g++.dg/cpp0x/static_assert5.C: New.
	* g++.dg/template/nontype13.C: Tweak.

From-SVN: r181248
2011-11-10 02:27:16 +00:00
GCC Administrator
41582ffe43 Daily bump.
From-SVN: r181245
2011-11-10 00:18:57 +00:00
Jason Merrill
cb8010f922 re PR c++/50972 ([C++0x] ICE on undeclared identifier)
PR c++/50972
	* pt.c (maybe_instantiate_noexcept): Check the return value of
	push_tinst_level.

From-SVN: r181240
2011-11-09 17:25:25 -05:00
Jason Merrill
59276295d6 re PR c++/51046 ([C++0x] ICE by unexpanded template param pack in range-based for)
PR c++/51046
	* parser.c (cp_parser_range_for): check_for_bare_parameter_packs.

From-SVN: r181239
2011-11-09 17:25:12 -05:00
Jakub Jelinek
d3e472a32e re PR target/50911 (assertion failure in expand_vec_perm_interleave2 with -msse)
PR target/50911
	* config/i386/i386.c (expand_vec_perm_interleave2): If d->vmode is
	V4SImode, !TARGET_SSE2 and punpck[lh]* is needed, change dremap.vmode
	to V4SFmode.

	* gcc.dg/torture/vshuf-16.inc: Add interleave low and high
	permutations.
	* gcc.dg/torture/vshuf-32.inc: Likewise.
	* gcc.dg/torture/vshuf-4.inc: Likewise.
	* gcc.dg/torture/vshuf-8.inc: Likewise.

From-SVN: r181238
2011-11-09 22:37:27 +01:00
Jakub Jelinek
94158d7d26 * gcc.dg/tm/memopt-1.c: Fix up regexp.
From-SVN: r181237
2011-11-09 22:36:13 +01:00
Jakub Jelinek
0ff0609d03 function.h (requires_stack_frame_p): New prototype.
* function.h (requires_stack_frame_p): New prototype.
	* function.c (requires_stack_frame_p): No longer static.
	* config/i386/i386.c (ix86_finalize_stack_realign_flags): If
	stack_realign_fp was just a conservative guess for a function
	which doesn't use sp/fp/argp at all, clear frame_pointer_needed
	and stack realignment.

From-SVN: r181236
2011-11-09 22:28:57 +01:00
Ian Lance Taylor
e14304eff5 generic-morestack.c: Include <string.h>.
libgcc/:
	* generic-morestack.c: Include <string.h>.
	(uintptr_type): Define.
	(struct initial_sp): Add dont_block_signals field.  Reduce size of
	extra array by 1.
	(allocate_segment): Set prev field to NULL.  Don't set
	__morestack_current_segment or __morestack_segments.
	(__generic_morestack): Update current->prev and *pp after calling
	allocate_segment.
	(__morestack_block_signals): Don't do anything if
	dont_block_signals is set.
	(__morestack_unblock_signals): Likewise.
	(__generic_findstack): Check for initial_sp == NULL.  Add casts to
	uintptr_type.
	(__splitstack_block_signals): New function.
	(enum __splitstack_content_offsets): Define.
	(__splitstack_getcontext, __splitstack_setcontext): New functions.
	(__splitstack_makecontext): New function.
	(__splitstack_block_signals_context): New function.
	(__splitstack_find_context): New function.
	* config/i386/morestack.S (__morestack_get_guard): New function.
	(__morestack_set_guard, __morestack_make_guard): New functions.
	* libgcc-std.ver.in: Add new functions to GCC_4.7.0.

gcc/testsuite/:
	* lib/target-supports.exp (check_effective_target_ucontext_h): New
	procedure.
	* gcc.dg/split-5.c: New test.

From-SVN: r181234
2011-11-09 20:06:31 +00:00
Tobias Burnus
a5b3d713cc symbol.c (clear_sym_mark, [...]): Remove functions.
2011-11-09  Tobias Burnus  <burnus@net-b.de>

        * symbol.c (clear_sym_mark, traverse_ns): Remove functions.
        (count_st_nodes, do_traverse_symtree, fill_st_vector): New functions.
        (gfc_traverse_symtree, gfc_traverse_ns): Call do_traverse_symtree.

From-SVN: r181232
2011-11-09 20:36:54 +01:00
Dodji Seketeli
5cc66776c4 PR c++/51043 - ICE in LTO
* cp-tree.h (TYPE_ALIAS_P, TYPE_TEMPLATE_INFO): Don't crash on
	NULL TYPE_NAME.

From-SVN: r181231
2011-11-09 20:25:01 +01:00
Patrick Marlier
4b6245331e * gcc.dg/tm/memopt-1.c: Adjust regexp.
From-SVN: r181226
2011-11-09 10:14:32 -08:00
Jason Merrill
816d91522e re PR c++/51029 ([C++0x] [4.7 Regression] ICE with -std=c++0x)
PR c++/51029
	* class.c (build_base_path): Don't ICE in fold_non_dependent_expr.

From-SVN: r181225
2011-11-09 13:13:09 -05:00
Jason Merrill
e399136a6a Run most tests in both C++98 and C++11 modes.
gcc/testsuite/
	* lib/target-supports.exp (check_effective_target_c++11): New.
	(check_effective_target_c++98): New.
	* lib/g++-dg.exp (g++-dg-runtest): New.
	* [various.exp]: Use g++-dg-runtest.
	* [various.C]: Fix for C++11 mode.
gcc/cp/
	* Make-lang.in (check_g++_parallelize): Add dg-torture.exp.
	(check-c++0x): Obsolete.
/
	* Makefile.def (language=c++): Remove check-c++0x.
	* Makefile.in (check-gcc-c++): Regenerate.

From-SVN: r181222
2011-11-09 12:53:53 -05:00
Jason Merrill
754ca64333 * [various.C]: Adjust for C++11 mode.
From-SVN: r181221
2011-11-09 12:53:37 -05:00
Jason Merrill
bc3e284b71 * pt.c (invalid_nontype_parm_type_p): Avoid printing "<type error>".
From-SVN: r181220
2011-11-09 12:53:24 -05:00
Jason Merrill
ecf658592b pt.c (convert_nontype_argument): Only integral arguments get early folding.
* pt.c (convert_nontype_argument): Only integral arguments
	get early folding.

From-SVN: r181219
2011-11-09 12:53:12 -05:00
Jason Merrill
78d16361e1 parser.c (cp_parser_alias_declaration): Don't do semantic processing if parsing failed.
* parser.c (cp_parser_alias_declaration): Don't do semantic
	processing if parsing failed.

From-SVN: r181218
2011-11-09 12:52:57 -05:00
Paolo Carlini
9b5e84de9d re PR preprocessor/51061 (Deprecated -I- option causes segfault)
2011-11-09  Paolo Carlini  <paolo.carlini@oracle.com>

	PR preprocessor/51061
	* incpath.c (merge_include_chains): Make sure to not pass null
	pointers to free_path.

From-SVN: r181216
2011-11-09 17:26:37 +00:00
Paolo Carlini
e8089b4a9d re PR c++/51045 (erroneous zero as null pointer constant warning at delete)
/cp
2011-11-09  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/51045
	* init.c (build_new_1, build_vec_delete_1, build_delete):
	Use nullptr_node.

/testsuite
2011-11-09  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/51045
	* g++.dg/warn/Wzero-as-null-pointer-constant-2.C: New.


2011-11-09  Paolo Carlini  <paolo.carlini@oracle.com>

	* doc/invoke.texi ([Option Summary, C++ Language Options]):
	Add -Wzero-as-null-pointer-constant.

From-SVN: r181215
2011-11-09 17:22:22 +00:00
Paolo Carlini
6d96d7ff5e re PR c++/51045 (erroneous zero as null pointer constant warning at delete)
/cp
2011-11-09  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/51045
	* init.c (build_new_1, build_vec_delete_1, build_delete):
	Use nullptr_node.

/testsuite
2011-11-09  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/51045
	* g++.dg/warn/Wzero-as-null-pointer-constant-2.C: New.


2011-11-09  Paolo Carlini  <paolo.carlini@oracle.com>

	* doc/invoke.texi ([Option Summary, C++ Language Options]):
	Add -Wzero-as-null-pointer-constant.

From-SVN: r181214
2011-11-09 17:21:19 +00:00
Paolo Carlini
db422ace3f re PR c++/51047 ([C++0x] SFINAE does not handle errors of ambiguous base members)
/cp
2011-11-09  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/51047
	* search.c (lookup_member): Change to take also a tsubst_flags_t
	parameter.
	(lookup_field, lookup_fnfields): Adjust calls.
	* typeck.c (lookup_destructor, finish_class_member_access_expr,
	build_ptrmemfunc_access_expr): Likewise.
	* class.c (handle_using_decl, maybe_note_name_used_in_class):
	Likewise.
	* pt.c (resolve_typename_type): Likewise.
	* semantics.c (lambda_function): Likewise.
	* parser.c (cp_parser_perform_range_for_lookup,
	cp_parser_lookup_name): Likewise.
	* friend.c (make_friend_class): Likewise.
	* name-lookup.c (pushdecl_maybe_friend_1, get_class_binding,
	do_class_using_decl, lookup_qualified_name): Likewise.
	* cp-tree.h (lookup_member): Adjust declaration.

/testsuite
2011-11-09  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/51047
	* g++.dg/cpp0x/sfinae29.C: New.

From-SVN: r181213
2011-11-09 17:19:12 +00:00
Eric Botcazou
68126bad7b sparc.c (output_v8plus_shift): Take INSN parameter first and adjust head comment.
* config/sparc/sparc.c (output_v8plus_shift): Take INSN parameter first
	and adjust head comment.
	(output_v8plus_mult): Change NAME into OPCODE and adjust throughout.
	(vector_init_bshuffle): Add head comment.
	(vector_init_move_words): Likewise.
	(vector_init_prepare_elts): Likewise.  Take LOCS parameter first.
	(sparc_expand_vector_init): Likewise.  Adjust call to above function.
	(sparc_expand_vector_init_vis2): Likewise.
	(sparc_expand_vector_init_vis1): Likewise.
	(sparc_expand_conditional_move): Likewise.
	(sparc_expand_vcond): Likewise.
	* config/sparc/sparc-protos.h (output_v8plus_shift): Adjust.
	* config/sparc/sparc.md (ashldi3_v8plus): Adjust call to
	output_v8plus_shift.
	(ashrdi3_v8plus): Likewise.
	(lshrdi3_v8plus): Likewise.

From-SVN: r181211
2011-11-09 16:41:22 +00:00
Matthew Gretton-Dann
f5024b4a87 Matthew Gretton-Dann <matthew.gretton-dann@arm.com>
* config/arm/arm-cores.def: Add -mcpu=cortex-a7.
	* config/arm/arm-tables.opt: Regenerate.
	* config/arm/arm-tune.md: Likewise.
	* config/arm/bpabi.h (BE8_LINK_SPEC): Add Cortex A-7.
	* doc/invoke.texi: Document -mcpu=cortex-a7.

From-SVN: r181210
2011-11-09 16:23:15 +00:00
Janus Weil
560bb0136f re PR fortran/50960 ([OOP] vtables not marked as constant)
2011-11-09  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/50960
	* gfortran.dg/typebound_call_22.f03: New test case.

From-SVN: r181208
2011-11-09 16:56:53 +01:00
Janne Blomqvist
ed10039e8b PR 50016 Slow I/O on MingW due to _commit
frontend ChangeLog:

2011-11-09  Janne Blomqvist  <jb@gcc.gnu.org>

	PR libfortran/50016
	* gfortran.texi (Data consistency and durability): New section.


testsuite ChangeLog:

2011-11-09  Janne Blomqvist  <jb@gcc.gnu.org>

	PR libfortran/50016
	* gfortran.dg/inquire_size.f90: Don't flush the unit.

libgfortran ChangeLog:

2011-11-09  Janne Blomqvist  <jb@gcc.gnu.org>

	PR libfortran/50016
	* io/inquire.c (inquire_via_unit): Flush the unit and use ssize.
	* io/unix.c (buf_flush): Don't call _commit.

From-SVN: r181207
2011-11-09 17:46:15 +02:00
Richard Guenther
26833b3de7 revert: tree-cfg.c (verify_gimple_call): Verify that gimple_call_cannot_inline_p is returning a conservative correct...
2011-11-09  Richard Guenther  <rguenther@suse.de>

	Revert
	2011-11-09  Richard Guenther  <rguenther@suse.de>

	* tree-cfg.c (verify_gimple_call): Verify that
	gimple_call_cannot_inline_p is returning a conservative
	correct result according to gimple_check_call_matching_types.

From-SVN: r181206
2011-11-09 15:05:20 +00:00
Richard Guenther
03cb5f3988 re PR tree-optimization/51039 (ICE: in estimate_function_body_sizes, at ipa-inline-analysis.c:1977 with -finline-small-functions -fno-ipa-pure-const and passing incompatible function ptr)
2011-11-09  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/51039
	* tree-cfg.c (verify_gimple_call): Verify that
	gimple_call_cannot_inline_p is returning a conservative
	correct result according to gimple_check_call_matching_types.
	* ipa-inline-analysis.c (estimate_function_body_sizes): Remove
	code dealing with un-inlinablility.
	* gimple-streamer-in.c (input_gimple_stmt): Update the
	non-inlinable flag.

	* gcc.dg/pr51039.c: New testcase.

From-SVN: r181205
2011-11-09 13:43:02 +00:00
Richard Guenther
c4ac6e9400 re PR tree-optimization/51039 (ICE: in estimate_function_body_sizes, at ipa-inline-analysis.c:1977 with -finline-small-functions -fno-ipa-pure-const and passing incompatible function ptr)
2011-11-09  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/51039
	* gimple-low.c (gimple_check_call_args): Remove.
	(gimple_check_call_matching_types): Always return true.
	* tree-inline.c (setup_one_parameter): Always perform a
	valid gimple type change.
	(declare_return_variable): Likewise.

From-SVN: r181204
2011-11-09 13:25:17 +00:00
Jakub Jelinek
69d3d9571b vector.md (vcondv4sfv4si, [...]): New patterns.
* config/rs6000/vector.md (vcondv4sfv4si, vcondv4siv4sf,
	vconduv4sfv4si): New patterns.
	* config/rs6000/rs6000.c (rs6000_emit_vector_cond_expr): Handle
	different dest_mode from comparison mode.

	* lib/target-supports.exp (check_effective_target_vect_cond_mixed):
	Enable also for powerpc*-*-*.

From-SVN: r181202
2011-11-09 13:22:17 +01:00
Francois-Xavier Coudert
7298eef346 re PR fortran/50540 (Internal Error: Can't convert UNKNOWN to INTEGER(4) (r178939))
PR fortran/50540
	* resolve.c (resolve_forall_iterators): Transform internal errors
	to normal errors.
	* gfortran.dg/forall_16.f90: New test.

From-SVN: r181200
2011-11-09 09:51:49 +00:00
Janus Weil
9c63ca5a1d re PR fortran/50960 ([OOP] vtables not marked as constant)
2011-11-09  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/50960
	* class.c (gfc_find_derived_vtab): Make the vtab symbols FL_PARAMETER.
	* expr.c (gfc_simplify_expr): Prevent vtabs from being replaced with
	their value.
	* resolve.c (resolve_values): Use-associated symbols do not need to
	be resolved again.
	(resolve_fl_parameter): Make sure the symbol has a value.

From-SVN: r181199
2011-11-09 10:45:36 +01:00
Francois-Xavier Coudert
02c74373cf re PR fortran/38718 (some simplifiers for elemental intrinsics missing; required for init expressions)
PR fortran/38718

	* intrinsic.c (add_functions): Add gfc_simplify_dreal.
	* intrinsic.h (gfc_simplify_dreal): New proto.
	* simplify.c (gfc_simplify_dreal): New function.

	* gfortran.dg/initialization_29.f90: Expand test.

From-SVN: r181198
2011-11-09 09:41:17 +00:00
Richard Guenther
c5bdb340d6 gimple-fold.c (canonicalize_constructor_val): Mark address-taken variables addressable.
2011-11-09  Richard Guenther  <rguenther@suse.de>

	* gimple-fold.c (canonicalize_constructor_val): Mark
	address-taken variables addressable.

From-SVN: r181197
2011-11-09 08:32:26 +00:00
Dodji Seketeli
bd0424fa93 PR c++/51027 - accepts alias-declaration without ';'
gcc/cp/

	* parser.c (cp_parser_alias_declaration): Require ';' at the end
	of the declaration.

libstdc++-v3/

	* include/ext/pointer.h (rebind): Append missing ';'.

gcc/testsuite

	* g++.dg/cpp0x/alias-decl-12.C: New test.
	* g++.dg/ext/alias-decl-attr4.C: Append missing ';'.

From-SVN: r181195
2011-11-09 09:00:58 +01:00
Eric Botcazou
c2b32b0fd4 Fix entry
From-SVN: r181194
2011-11-09 07:58:34 +00:00
Dodji Seketeli
acfdadb47b PR debug/51032 - ICE in dbxout_type, at dbxout.c:2372
gcc/cp/

	* decl2.c (check_member_template): Accept alias templates and ...
	* parser.c (cp_parser_alias_declaration): ... use it here.

gcc/testsuite/

	* g++.dg/cpp0x/alias-decl-debug-0.C: New test.

From-SVN: r181193
2011-11-09 08:51:12 +01:00
Francois-Xavier Coudert
f354bf1d8c re PR fortran/21881 (ICE instead of error for large arrays in derived types)
PR fortran/21881
	* trans-types.c (gfc_get_dtype): Issue a fatal error instead of
	an internal error.

From-SVN: r181192
2011-11-09 06:57:10 +00:00
Ira Rosen
9b858c880b re PR tree-optimization/51015 (ice in vect_determine_vectorization_factor with -O3)
PR tree-optimization/51015
        * tree-vect-loop.c (vect_determine_vectorization_factor): Expect
        vectype to be set for pattern def stmts.

From-SVN: r181191
2011-11-09 06:41:59 +00:00
David S. Miller
65c5ced37b Implement vect_cmdline_needed properly on sparc.
* lib/target-supports.exp (check_effective_target_sparc_vis): New.
	(check_effective_target_vect_cmdline_needed): Use it when sparc*-*-*

From-SVN: r181190
2011-11-08 21:23:02 -08:00
Alan Modra
ffe1468659 function.c (bb_active_p): Delete.
* function.c (bb_active_p): Delete.
	(dup_block_and_redirect, active_insn_between): New functions.
	(convert_jumps_to_returns, emit_return_for_exit): New functions,
	split out from..
	(thread_prologue_and_epilogue_insns): ..here.  Delete
	shadowing variables.  Don't do prologue register clobber tests
	when shrink wrapping already failed.  Delete all last_bb_active
	code.  Instead compute tail block candidates for duplicating
	exit path.  Remove these from antic set.  Duplicate tails when
	reached from both blocks needing a prologue/epilogue and
	blocks not needing such.
	* ifcvt.c (dead_or_predicable): Test both flag_shrink_wrap and
	HAVE_simple_return.
	* bb-reorder.c (get_uncond_jump_length): Make global.
	* bb-reorder.h (get_uncond_jump_length): Declare.
	* cfgrtl.c (rtl_create_basic_block): Comment typo fix.
	(rtl_split_edge): Likewise.  Warning fix.
	(rtl_duplicate_bb): New function.
	(rtl_cfg_hooks): Enable can_duplicate_block_p and duplicate_block.
	* Makefile.in (function.o): Update dependencies.

From-SVN: r181188
2011-11-09 11:50:14 +10:30
GCC Administrator
dce5eb107d Daily bump.
From-SVN: r181187
2011-11-09 00:18:19 +00:00
Francois-Xavier Coudert
b35f6a97ab re PR fortran/50404 (SIGSEGV in gfc_resolve_close)
PR fortran/50404
	* io.c (gfc_resolve_close): CLOSE requires a UNIT.
	* gfortran.dg/io_constraints_3.f90: Improve testcase.

From-SVN: r181183
2011-11-08 23:54:43 +00:00
Francois-Xavier Coudert
b8bc0ff76b re PR fortran/50409 (SIGSEGV in gfc_simplify_expr)
PR fortran/50409
	* expr.c (gfc_simplify_expr): Substrings can't have negative
	length.
	* gcc/testsuite/gfortran.dg/string_5.f90: Improve testcase.

From-SVN: r181181
2011-11-08 23:15:11 +00:00
Ulrich Weigand
86fc3d06b0 tm.texi.in (MODE_CODE_BASE_REG_CLASS): Add address space argument.
* doc/tm.texi.in (MODE_CODE_BASE_REG_CLASS): Add address space
	argument.
	(REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise.
	* doc/tm.texi: Regenerate.

	* config/cris/cris.h (MODE_CODE_BASE_REG_CLASS): Add address
	space argument.
	(REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise.
	* config/bfin/bfin.h (MODE_CODE_BASE_REG_CLASS): Likewise.
	(REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise.
	* config/avr/avr.h (MODE_CODE_BASE_REG_CLASS): Add address space
	argument.
	(REGNO_MODE_CODE_OK_FOR_BASE_P): Ditto.
	* config/avr/avr-protos.h (avr_mode_code_base_reg_class): Ditto.
	(avr_regno_mode_code_ok_for_base_p): Ditto.
	* config/avr/avr.c (avr_mode_code_base_reg_class): Ditto.
	(avr_regno_mode_code_ok_for_base_p): Ditto.
	(avr_reg_ok_for_addr_p): Pass AS down to
	avr_regno_mode_code_ok_for_base_p.

	* addresses.h (base_reg_class): Add address space argument.
	Pass to MODE_CODE_BASE_REG_CLASS.
	(ok_for_base_p_1): Add address space argument.  Pass to
	REGNO_MODE_CODE_OK_FOR_BASE_P.
	(regno_ok_for_base_p): Add address space argument.  Pass to
	ok_for_base_p_1.

	* regrename.c (scan_rtx_address): Add address space argument.
	Pass address space to regno_ok_for_base_p and base_reg_class.
	Update recursive calls.
	(scan_rtx): Pass address space to scan_rtx_address.
	(build_def_use): Likewise.
	* regcprop.c (replace_oldest_value_addr): Add address space
	argument.  Pass to regno_ok_for_base_p and base_reg_class.
	Update recursive calls.
	(replace_oldest_value_mem): Pass address space to
	replace_oldest_value_addr.
	(copyprop_hardreg_forward_1): Likewise.

	* reload.c (find_reloads_address_1): Add address space argument.
	Pass address space to base_reg_class and regno_ok_for_base_p.
	Update recursive calls.
	(find_reloads_address): Pass address space to base_reg_class,
	regno_ok_for_base_p, and find_reloads_address_1.
	(find_reloads): Pass address space to base_reg_class.
	(find_reloads_subreg_address): Likewise.

	* ira-costs.c (record_reg_classes): Update calls to base_reg_class.
	(ok_for_base_p_nonstrict): Add address space argument.  Pass to
	ok_for_base_p_1.
	(record_address_regs): Add address space argument.  Pass to
	base_reg_class and ok_for_base_p_nonstrict.  Update recursive calls.
	(record_operand_costs): Pass address space to record_address_regs.
	(scan_one_insn): Likewise.

	* caller-save.c (init_caller_save): Update call to base_reg_class.
	* ira-conflicts.c (ira_build_conflicts): Likewise.
	* reload1.c (maybe_fix_stack_asms): Likewise.

Co-Authored-By: Georg-Johann Lay <avr@gjlay.de>

From-SVN: r181175
2011-11-08 17:36:45 +00:00
Jason Merrill
ca8dc27473 re PR c++/50835 (Lvalue-ness of conditional operator results is incorrect in a function template)
PR c++/50835
	* typeck.c (build_x_conditional_expr): Preserve lvalue/xvalueness.
	* tree.c (lvalue_kind) [NON_DEPENDENT_EXPR]: Return clk_ordinary
	in C++98.

From-SVN: r181174
2011-11-08 12:10:09 -05:00
Michael Matz
47598145be gengtype.c (write_field_root): Avoid out-of-scope access of newv.
* gengtype.c (write_field_root): Avoid out-of-scope access of newv.

	* tree-stdarg.c (execute_optimize_stdarg): Accept clobbers.

	* tree.h (TREE_CLOBBER_P): New macro.
	* gimple.h (gimple_clobber_p): New inline function.
	* gimplify.c (gimplify_bind_expr): Add clobbers for all variables
	that go out of scope and live in memory.
	* tree-ssa-operands.c (get_expr_operands): Transfer volatility also
	for constructors.
	* cfgexpand.c (decl_to_stack_part): New static variable.
	(add_stack_var): Allocate it, and remember mapping.
	(fini_vars_expansion): Deallocate it.
	(stack_var_conflict_p): Add early outs.
	(visit_op, visit_conflict, add_scope_conflicts_1,
	add_scope_conflicts): New static functions.
	(expand_used_vars_for_block): Don't call add_stack_var_conflict, tidy.
	(expand_used_vars): Add scope conflicts.
	(expand_gimple_stmt_1): Expand clobbers to nothing.
	(expand_debug_expr): Ditto.

	* tree-pretty-print.c (dump_generic_node): Dump clobbers nicely.
	* tree-ssa-live.c (remove_unused_locals): Remove clobbers that
	refer to otherwise unused locals.
	* tree-sra.c (build_accesses_from_assign): Ignore clobbers.
	* tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Clobbers of
	SSA names aren't necessary.
	(propagate_necessity): Accept and ignore constructors on the rhs,
	tidy.
	* gimple.c (walk_gimple_op): Accept constructors like mem_rhs.
	* tree-ssa-structalias.c (find_func_aliases): Clobbers don't store
	any known value.
	* tree-ssa-sccvn.c (vn_reference_lookup_3): Ditto, in particular they
	don't zero-initialize something.
	* tree-ssa-phiopt.c (cond_if_else_store_replacement_1): Ignore
	clobber RHS, we don't want PHI nodes with those.

testsuite/
	* gcc.dg/tree-ssa/20031015-1.c: Adjust.
	* g++.dg/tree-ssa/ehcleanup-1.C: Ditto.
	* g++.dg/eh/builtin1.C: Rewrite to not use local variables.
	* g++.dg/eh/builtin2.C: Ditto.
	* g++.dg/eh/builtin3.C: Ditto.

From-SVN: r181172
2011-11-08 16:47:16 +00:00
Jakub Jelinek
8ebe5133dc i386.c (ix86_preferred_simd_mode): Even for TARGET_AVX if not TARGET_PREFER_AVX128 return 32-byte integer vectors.
* config/i386/i386.c (ix86_preferred_simd_mode): Even for TARGET_AVX
	if not TARGET_PREFER_AVX128 return 32-byte integer vectors.

	* gcc.target/i386/avx-cvt-2.c: Adjust for 32-byte integer vectors
	being prefered even for -mavx.
	* gcc.target/i386/avx-cvt-3.c: New test.

From-SVN: r181170
2011-11-08 17:29:51 +01:00
Richard Guenther
f2906a8e9e re PR tree-optimization/51012 (ICE: in fold_convert_loc, at fold-const.c:1897 with -fno-early-inlining and passing incompatible function ptr)
2011-11-08  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/51012
	* ipa-prop.c (update_indirect_edges_after_inlining): Fixup
	non-inlinable state.
	* cgraph.c (cgraph_make_edge_direct): Likewise.

	* gcc.dg/pr51012-1.c: New testcase.
	* gcc.dg/pr51012-2.c: Likewise.

From-SVN: r181166
2011-11-08 15:16:22 +00:00
Richard Guenther
a59526334d re PR middle-end/51010 (bad diagnostics: #'ssa_name' not supported by pp_c_expression#]')
2011-11-08  Richard Guenther  <rguenther@suse.de>

	PR middle-end/51010
	c-family/
	* c-pretty-print.c (pp_c_expression): Handle SSA_NAMEs.

	cp/
	* error.c (dump_expr): Handle SSA_NAMEs.

	* c-c++-common/uninit-pr51010.c: New testcase.

From-SVN: r181165
2011-11-08 15:14:21 +00:00
Eric Botcazou
fabe6a9a7a re PR rtl-optimization/47698 (CMOV accessing volatile memory with read side effect)
PR rtl-optimization/47698
	* ifcvt.c (noce_operand_ok): Move around comment.

From-SVN: r181161
2011-11-08 13:44:11 +00:00
Richard Guenther
a456676fbc re PR regression/50999 (g++.dg/lto/20081109 execute -O2 -flto -flto-partition=1to1 -fno-use-linker-plugin)
2011-11-08  Richard Guenther  <rguenther@suse.de>

	PR lto/50999
	* lto-opts.c (append_to_collect_gcc_options): Split out from...
	(lto_write_options): ... here.  Prepend frontend specific flags.

From-SVN: r181160
2011-11-08 13:41:57 +00:00
Jakub Jelinek
5d54daace2 sse.md (*avx_vperm2f128<mode>3_nozero): Emit mask 0x12 and 0x20 as vinsert[fi]128 instead of vperm2[fi]128.
* config/i386/sse.md (*avx_vperm2f128<mode>3_nozero): Emit mask
	0x12 and 0x20 as vinsert[fi]128 instead of vperm2[fi]128.

From-SVN: r181158
2011-11-08 13:11:27 +01:00
Jakub Jelinek
190c22366d tree-vect-stmts.c (vectorizable_call): Add SLP_NODE argument.
* tree-vect-stmts.c (vectorizable_call): Add SLP_NODE argument.
	Handle vectorization of SLP calls.
	(vect_analyze_stmt): Adjust caller, add call to it for SLP too.
	(vect_transform_stmt): Adjust vectorizable_call caller, remove
	assertion.
	* tree-vect-slp.c (vect_get_and_check_slp_defs): For calls start
	with op_idx 3.
	(vect_build_slp_tree): Allow CALL_EXPR.

	* lib/target-supports.exp (check_effective_target_vect_call_sqrtf,
	check_effective_target_vect_call_copysignf,
	check_effective_target_vect_call_lrint): New procedures.
	* gcc.dg/vect/vect.exp: Run fast-math-bb-slp* tests using
	$VECT_SLP_CFLAGS with -ffast-math.
	* gcc.dg/vect/fast-math-vect-call-1.c: New test.
	* gcc.dg/vect/fast-math-vect-call-2.c: New test.
	* gcc.dg/vect/fast-math-bb-slp-call-1.c: New test.
	* gcc.dg/vect/fast-math-bb-slp-call-2.c: New test.

From-SVN: r181157
2011-11-08 13:09:57 +01:00
Richard Guenther
4835617e59 gimple-fold.c (canonicalize_constructor_val): Make sure we have referenced vars setup before adding to them.
2011-11-08  Richard Guenther  <rguenther@suse.de>

	* gimple-fold.c (canonicalize_constructor_val): Make sure
	we have referenced vars setup before adding to them.

From-SVN: r181155
2011-11-08 11:23:11 +00:00
Aldy Hernandez
0a35513e4e Merge from transactional-memory branch.
From-SVN: r181154
2011-11-08 11:13:41 +00:00
Dodji Seketeli
7d29c953af Fix context handling of alias-declaration
gcc/cp/

	* decl.c (start_decl): Update comment.
	* error.c (dump_alias_template_specialization): Dump the context
	of the specialization.
	* parser.c (cp_parser_alias_declaration): Call pop_scope on the
	pushed scope yielded by start_decl.

gcc/testsuite

	* g++.dg/cpp0x/alias-decl-11.C: New test.

From-SVN: r181152
2011-11-08 11:27:34 +01:00
Paolo Carlini
7fcefa5525 re PR c++/50864 (ICE with decltype and "declval" from another namespace)
/cp
2011-11-08  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/50864
	* parser.c (cp_parser_postfix_dot_deref_expression): Reject invalid
	uses of '->' and '.' as postfix-expression in namespace scope.

/testsuite
2011-11-08  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/50864
	* g++.dg/parse/template26.C: New.
	* g++.dg/template/crash45.C: Adjust dg-error string.

From-SVN: r181151
2011-11-08 10:23:53 +00:00
Francois-Xavier Coudert
295258228b re PR fortran/50334 (interaction between -Wuninitialized and -finit-*)
PR fortran/50334
	* invoke.texi (-finit-*): Document interaction with
	-Wuninitialized.

From-SVN: r181150
2011-11-08 08:11:10 +00:00
Jason Merrill
7e72c65d18 re PR c++/50848 (ICE in derived template class missing using for member of template base class)
PR c++/50848
	* pt.c (tsubst_copy_and_build) [CALL_EXPR]: Don't crash
	if lookup finds a non-function.

From-SVN: r181143
2011-11-07 20:10:43 -05:00
GCC Administrator
e23de0edd9 Daily bump.
From-SVN: r181138
2011-11-08 00:18:52 +00:00
Richard Henderson
cedb4a1ad0 Allow libcalls to be installed for legacy __sync optabs.
This allows a target which implements the __sync interfaces
in libgcc to continue to use them transparently with the
new __atomic builtins.

It is assumed that these libgcc routines DO NOT use spinlocks.
This is true of all extant libgcc instances.

        * optabs.h (OTI_sync_compare_and_swap, OTI_sync_lock_test_and_set,
        OTI_sync_old_add, OTI_sync_old_sub, OTI_sync_old_ior,
        OTI_sync_old_and, OTI_sync_old_xor, OTI_sync_old_nand,
        OTI_sync_new_add, OTI_sync_new_sub, OTI_sync_new_ior,
        OTI_sync_new_and, OTI_sync_new_xor, OTI_sync_new_nand): Move and
        rename from the direct_optab_index enum.
        (sync_compare_and_swap_optab, sync_lock_test_and_set_optab,
        sync_old_add_optab, sync_old_sub_optab, sync_old_ior_optab,
        sync_old_and_optab, sync_old_xor_optab, sync_old_nand_optab,
        sync_new_add_optab, sync_new_sub_optab, sync_new_ior_optab,
        sync_new_and_optab, sync_new_xor_optab, sync_new_nand_optab): Read
        from the optab_table, not the direct_optab_table.
        (init_sync_libfuncs): Declare.
        (can_compare_and_swap_p): Update parameters.
        * optabs.c (init_sync_libfuncs_1, init_sync_libfuncs): New.
        (can_compare_and_swap_p): Add allow_libcall parameter; if true,
        test for the legacy compare-and-swap libcall.
        (expand_atomic_exchange): Use the legacy test-and-set libcall.
        (expand_atomic_compare_and_swap): Use the legacy CAS libcall.
        (struct atomic_op_functions): Update for optab type changes.
        (maybe_emit_op): Likewise.
        (expand_atomic_fetch_op): Use the legacy fetch-op libcalls.
        * builtins.c (fold_builtin_atomic_always_lock_free): Update call
        to can_compare_and_swap_p.
        * omp-low.c (expand_omp_atomic_fetch_op): Likewise.
        (expand_omp_atomic_pipeline): Likewise.
        * genopinit.c (optabs): Make sync_old_*_optab, sync_new_*_optab,
        sync_compare_and_swap_optab, sync_lock_test_and_set_optab regular
        optabs.

From-SVN: r181134
2011-11-07 15:11:55 -08:00
Jason Merrill
13fc31c2c4 re PR c++/50863 ([C++0x] list-initialization with lambda fails to deduce constructor argument)
PR c++/50863
	* parser.c (cp_parser_initializer_list): Parse C99
	array designators tentatively.

From-SVN: r181132
2011-11-07 17:52:32 -05:00
Jason Merrill
b2b5f337dc re PR c++/50870 ([C++0x] [4.6/4.7 Regression] ICE with decltype, operator->, and default template arguments)
PR c++/50870
	* pt.c (tsubst_copy): Handle NAMESPACE_DECL.
	(tsubst_copy_and_build) [COMPONENT_REF]: Handle a still-dependent
	object.

From-SVN: r181131
2011-11-07 17:52:23 -05:00
Francois-Xavier Coudert
c5a0818e68 re PR libfortran/49188 (Mismatch between -fsign-zero documentation and formatted output)
PR libfortran/49188
	PR libfortran/49336
	* invoke.texi: Fix documentation of fsign-zero option. Remove
	contractions.
	* intrinsic.texi: Fix ATAN2 documentation for signed zeros.
	Remove contractions.
	* gfortran.texi: Remove contractions.

From-SVN: r181127
2011-11-07 22:21:54 +00:00
Paolo Carlini
5a0626d162 pt.c (tsubst_copy_and_build): Fix qualified_name_lookup_error call in case COMPONENT_REF.
2011-11-07  Paolo Carlini  <paolo.carlini@oracle.com>

	* pt.c (tsubst_copy_and_build): Fix qualified_name_lookup_error
	call in case COMPONENT_REF.

From-SVN: r181124
2011-11-07 22:03:27 +00:00
Jakub Jelinek
c8694a801c i386-bultin-types.def (V8SI_FTYPE_V4DF_V4DF): Add.
* config/i386/i386-bultin-types.def (V8SI_FTYPE_V4DF_V4DF): Add.
	* config/i386/i386.c (enum ix86_builtins): Add
	IX86_BUILTIN_VEC_PACK_SFIX256.
	(bdesc_args): Add __builtin_ia32_vec_pack_sfix256.
	(ix86_expand_args_builtin): Handle V8SI_FTYPE_V4DF_V4DF.
	(ix86_builtin_vectorized_function): Also vectorize lrint using
	256-bit vectors for -mavx.

From-SVN: r181122
2011-11-07 22:37:37 +01:00
Anatoly Sokolov
06cadf6320 constraints.md: New file.
* config/cris/constraints.md: New file.
	* config/cris/cris.h (REG_CLASS_FROM_LETTER, CONSTRAINT_LEN,
	CRIS_CONST_OK_FOR_LETTER_P, CONST_OK_FOR_CONSTRAINT_P,
	CONST_DOUBLE_OK_FOR_LETTER_P, EXTRA_MEMORY_CONSTRAINT,
	EXTRA_CONSTRAINT, EXTRA_CONSTRAINT_Q, EXTRA_CONSTRAINT_R,
	EXTRA_CONSTRAINT_T, EXTRA_CONSTRAINT_S, EXTRA_CONSTRAINT_U): Remove.
	* config/cris/cris.c: Incule "tm-constrs.h".
	(cris_print_operand): Use satisfies_constraint_O.
	(cris_normal_notice_update_cc, cris_rtx_costs): Use
	satisfies_constraint_I.
	(cris_address_cost): Use satisfies_constraint_L.
	* config/cris/cris.md: Include "constraints.md".
	(*mov_side<mode>, *mov_sidesisf, *mov_side<mode>_mem,
	*mov_sidesisf_mem, *clear_side<mode>, *ext_sideqihi,
	*ext_side<mode>si, *op_side<mode>, *op_swap_side<mode>,
	*extopqihi_side, *extop<mode>si_side, *extopqihi_swap_side,
	*extop<mode>si_swap_side): Use satisfies_constraint_N and
	satisfies_constraint_J.
	(moversideqi movemsideqi mover2side peephole2): Use
	satisfies_constraint_N and satisfies_constraint_J.
	(andu peephole2): Use satisfies_constraint_I and
	satisfies_constraint_O.

From-SVN: r181120
2011-11-08 01:33:24 +04:00
Dodji Seketeli
2870428932 PR c++/45114 - Support C++11 alias-declaration
gcc/cp/

	* cp-tree.h (TYPE_DECL_ALIAS_P, TYPE_ALIAS_P)
	(DECL_TYPE_TEMPLATE_P, DECL_ALIAS_TEMPLATE_P): New accessor
	macros.
	(TYPE_TEMPLATE_INFO): Get template info of an alias template
	specializations from its TYPE_DECL.
	(SET_TYPE_TEMPLATE_INFO): Set template info of alias template
	specializations into its TYPE_DECL.
	(DECL_CLASS_TEMPLATE_P): Re-write using the new
	DECL_TYPE_TEMPLATE_P.
	(enum cp_decl_spec): Add new ds_alias enumerator.
	(alias_type_or_template_p, alias_template_specialization_p):
	Declare new functions.
	* parser.c (cp_parser_alias_declaration): New static function.
	(cp_parser_check_decl_spec): Add "using" name for the `alias'
	declspec.
	(cp_parser_type_name): Update comment.  Support simple-template-id
	representing alias template specializations in c++0x mode.
	(cp_parser_qualifying_entity): Update comment.  Use
	cp_parser_type_name.
	(cp_parser_block_declaration): Handle alias-declaration in c++11.
	Update comment.
	(cp_parser_template_id): Handle specializations of alias
	templates.
	(cp_parser_member_declaration): Add alias-declaration production
	to comment.  Support alias-declarations.
	(cp_parser_template_declaration_after_export): Handle alias
	templates in c++11.
	* decl.c (make_typename_type, make_unbound_class_template): Accept
	alias templates.
	(grokdeclarator): Set TYPE_DECL_ALIAS_P on alias
	declarations.
	* decl2.c (grokfield): Move template creation after setting up the
	TYPE_DECL of the alias, so that the TEMPLATE_DECL of the alias
	template actually carries the right type-id of the alias
	declaration.
	* pt.c (alias_type_or_template_p)
	(alias_template_specialization_p): Define new public functions.
	(maybe_process_partial_specialization): Reject partial
	specializations of alias templates.
	(primary_template_instantiation_p): Consider alias template
	instantiations.
	(push_template_decl_real): Assert that TYPE_DECLs of alias
	templates are different from those of class template.  Store
	template info onto the TYPE_DECL of the alias template.
	(convert_template_argument): Strip aliases from template
	arguments.
	(lookup_template_class_1): Handle the creation of the
	specialization of an alias template.
	(tsubst_decl): Create a substituted copy of the TYPE_DECL of an
	member alias template.
	(tsubst): Handle substituting into the type of an alias template.
	Handle substituting UNBOUND_CLASS_TEMPLATE into
	BOUND_TEMPLATE_TEMPLATE_PARM.
	(do_type_instantiation): Better diagnostics when trying to
	explicitely instantiate a non-class template.
	* search.c (lookup_field_1, lookup_field_r): Support looking up
	alias templates.
	* semantics.c (finish_template_type): For instantiations of alias
	templates, return the TYPE_DECL of the actual alias and not the
	one of the aliased type.
	* error.c (dump_alias_template_specialization): New static
	function.
	(dump_type): Handle printing of alias templates and their
	specializations.  templates.
	(dump_aggr_type): For specialization of alias templates, fetch
	arguments from the right place.
	(dump_decl): Print an alias-declaration like `using decl = type;'
	(dump_template_decl):  Support printing of alias templates.

gcc/testsuite/

	* g++.dg/cpp0x/alias-decl-0.C: New test case.
	* g++.dg/cpp0x/alias-decl-1.C: Likewise.
	* g++.dg/cpp0x/alias-decl-3.C: Likewise.
	* g++.dg/cpp0x/alias-decl-4.C: Likewise.
	* g++.dg/cpp0x/alias-decl-6.C: Likewise.
	* g++.dg/cpp0x/alias-decl-7.C: Likewise.
	* g++.dg/cpp0x/alias-decl-8.C: Likewise.
	* g++.dg/cpp0x/alias-decl-9.C: Likewise.
	* g++.dg/cpp0x/alias-decl-10.C: Likewise.
	* g++.dg/ext/alias-decl-attr1.C: Likewise.
	* g++.dg/ext/alias-decl-attr2.C: Likewise.
	* g++.dg/ext/alias-decl-attr3.C: Likewise.
	* g++.dg/ext/alias-decl-attr4.C: Likewise.

From-SVN: r181118
2011-11-07 22:28:50 +01:00
Uros Bizjak
bfd08c8902 i386.c (ix86_builtin_vectorized_function): Handle BUILT_IN_IRINT, BUILT_IN_IRINTF, BUILT_IN_LLRINT and BUILT_IN_LLRINTF.
* config/i386/i386.c (ix86_builtin_vectorized_function): Handle
	BUILT_IN_IRINT, BUILT_IN_IRINTF, BUILT_IN_LLRINT and BUILT_IN_LLRINTF.

From-SVN: r181116
2011-11-07 22:27:01 +01:00
Eric Botcazou
805eaf4ab3 * gcc.dg/pragma-align-2.c: Compile with -std=gnu99.
From-SVN: r181114
2011-11-07 21:02:57 +00:00
Andrew MacLeod
6ff336b4aa optabs.c (get_atomic_op_for_code): Fill in optab table at runtime so SWITCHABLE_TARGET can change the valuies...
2011-11-07  Andrew MacLeod  <amacleod@redhat.com>

	* optabs.c (get_atomic_op_for_code): Fill in optab table at runtime so
	SWITCHABLE_TARGET can change the valuies during compilation.
	(expand_atomic_fetch_op): handle parameter changes ripples for 
	get_atomic_op_for_code call.

From-SVN: r181112
2011-11-07 20:10:03 +00:00
Andrew MacLeod
0669295b1e atomic_base.h (atomic_thread_fence): Call builtin.
2011-11-07  Andrew MacLeod  <amacleod@redhat.com>

	libstdc++-v3
	* include/bits/atomic_base.h (atomic_thread_fence): Call builtin.
	(atomic_signal_fence): Call builtin.
	(atomic_flag::test_and_set): Call __atomic_exchange when it is lockfree,
	otherwise fall back to call __sync_lock_test_and_set.
	(atomic_flag::clear): Call __atomic_store when it is lockfree,
	otherwise fall back to call __sync_lock_release.

	gcc
	* doc/extend.texi: Docuemnt behaviour change for __atomic_exchange and
	__atomic_store.
	* optabs.c (expand_atomic_exchange): Expand to __sync_lock_test_and_set
	only when originated from that builtin.
	(expand_atomic_store): Expand to __sync_lock_release when originated
	from that builtin.
	* builtins.c (expand_builtin_sync_lock_test_and_set): Add flag that
	expand_atomic_exchange call originated from here.
	(expand_builtin_sync_lock_release): Add flag that expand_atomic_store
	call originated from here.
	(expand_builtin_atomic_exchange): Add origination flag.
	(expand_builtin_atomic_store): Add origination flag.
	* expr.h (expand_atomic_exchange, expand_atomic_store): Add boolean 
	parameters to indicate implementation fall back options.

From-SVN: r181111
2011-11-07 20:06:39 +00:00
Janus Weil
fd83db3d51 re PR fortran/50919 ([OOP] Don't use vtable for NON_OVERRIDABLE TBP)
2011-11-07  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/50919
	* class.c (add_proc_comp): Don't add non-overridable procedures to the
	vtable.
	* resolve.c (resolve_typebound_function,resolve_typebound_subroutine):
	Don't generate a dynamic _vptr call for non-overridable procedures.

2011-11-07  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/50919
	* gfortran.dg/typebound_call_21.f03: New.

From-SVN: r181107
2011-11-07 19:41:12 +01:00
Georg-Johann Lay
0098895f4e avr.c (output_reload_in_const): Can handle CONSTANT_P now, not only CONST_INT and CONST_DOUBLE.
* config/avr/avr.c (output_reload_in_const): Can handle CONSTANT_P
	now, not only CONST_INT and CONST_DOUBLE.
	(output_movqi): Use output_reload_in_const.
	(output_reload_inhi): Ditto.
	(output_reload_insisf): Move assertion to output_reload_in_const.
	(avr_out_reload_inpsi): Ditto.

From-SVN: r181106
2011-11-07 18:22:59 +00:00
Nathan Sidwell
5366b18679 libgcov.c (struct gcov_fn_buffer): New struct.
libgcc/
	* libgcov.c (struct gcov_fn_buffer): New struct.
	(buffer_fn_data): New helper.
	(gcov_exit): Rework for new gcov data structures.

	gcc/
	* gcov.c (object_summary): Replace with ...
	(object_runs): ... this.
	(process_file): Remove functions with no data.
	(generate_results): Ignore files with no lines.
	(release_function): New helper, broken out of ...
	(release_structures): ... here.  Use it.
	(read_count_file): Adjust for new data file format.
	(output_lines): Use object_runs.
	* gcov-io.h (GCOV_TAG_OBJECT_SUMMARY): Obsolete.
	(struct gcov_ctr_info): Move definition.
	(struct gcov_fn_info): Add key field, use gcov_ctr_info for
	trailing array.
	(struct gcov_info): Add merge function array, remove mask and
	counts.  Trailing array is array of pointers to function info.
	* coverage.c (struct function_list): Replace counter numbers with
	counter arrays.  Add fndecl field.  GTYify.
	(counts_entry): Remove chain workspace.
	(functions_head): GTYify.
	(prg_n_ctrs): Remove.
	(fn_v_ctrs): New.
	(tree_ctr_tables): Remove.
	(read_counts_file): Cope with blank entries and expect program
	summaries before functions.  Don't warn on missing entries.
	(coverage_counter_alloc): Allocate individual function arrays.
	(tree_coverage_counter_ref, tree_coverage_counter_addr): Adjust
	for individual function arrays.
	(coverage_end_function): GTYify function list object. Finalize
	function's counter arrays.
	(build_var): New.  Create a counter-related variable with
	appropriate linkage.
	(build_fn_info_type): Adjust for new runtime structure.
	(build_fn_info_value): Rename to ...
	(build_fn_info): ... here.  Build new format data.
	(build_ctr_info_type, build_ctr_info_value): Remove.
	(build_info_type): New. Build new format data structure.
	(build_info): Adjust for new format data.
	(create_coverage): Likewise.
	* gcov-dump.c (tag_function): Recognize placeholders.

	gcc/testsuite/
	* gcc.dg/profile-dir-1.c: Adjust final scan.
	* gcc.dg/profile-dir-2.c: Adjust final scan.
	* gcc.dg/profile-dir-3.c: Adjust final scan.
	* gcc.misc-tests/gcov.exp: Adjust regexp.
	* gcc.misc-tests/gcov-12.c: New.
	* gcc.misc-tests/gcov-13.c: New.
	* gcc.misc-tests/gcovpart-13b.c: New.
	* gcc.misc-tests/gcov-14.c: New.

From-SVN: r181105
2011-11-07 18:14:46 +00:00
Georg-Johann Lay
8b42d3defd constraints.md (Cm2): New constraint for int -2.
* config/avr/constraints.md (Cm2): New constraint for int -2.
	* config/avr/avr.md (addqi3): Use it. New alternatives for +/-2.
	(*negqihi2): New insn.

From-SVN: r181103
2011-11-07 18:07:56 +00:00
Jason Merrill
6d87092d19 re PR c++/35688 (template visibility not overridden by template arguments)
PR c++/35688
	* decl2.c (constrain_visibility): Return void.  Add tmpl parm
	which gives the constraint priority over an attribute.
	(constrain_visibility_for_template, determine_visibility): Adjust.
	* pt.c (instantiate_class_template_1): Call determine_visibility.

From-SVN: r181102
2011-11-07 12:51:40 -05:00
Jason Merrill
c7e6757f2a add PR tag
From-SVN: r181101
2011-11-07 12:51:32 -05:00
Jason Merrill
4c627087f5 re PR c++/33255 (A warning for "unused" typedefs?)
PR c++/33255
	* decl.c (save_function_data): Clear local_typedefs.

From-SVN: r181100
2011-11-07 12:51:24 -05:00
Jason Merrill
b12e4c4292 decl.c (cp_finish_decl): Only make_tree_vector if we're calling check_initializer.
* decl.c (cp_finish_decl): Only make_tree_vector if we're calling
	check_initializer.

From-SVN: r181099
2011-11-07 12:51:16 -05:00
H.J. Lu
7b4d559576 Check HARD_FRAME_POINTER_REGNUM.
2011-11-07  H.J. Lu  <hongjiu.lu@intel.com>

	* dwarf2cfi.c (dwarf2out_frame_debug_expr): Check
	HARD_FRAME_POINTER_REGNUM instead of hard_frame_pointer_rtx
	in Rule 18.

From-SVN: r181096
2011-11-07 08:38:24 -08:00
Arnaud Charlet
b5bf33351a [multiple changes]
2011-11-07  Olivier Hainque  <hainque@adacore.com>

	* sigtramp-ppcvxw.c: Add general comments.
	(CFI_COMMON_REGS): Remove rule for r1, as in other unwinders. Add
	rules for r2 to r13, plus CTR and XER.
	(CFA_REG): New, register number used to hold the local CFA.
	(CFI_DEF_CFA, SIGTRAMP_BODY): Use it.
	Make that 15, not 14, with documentation.
	(TCR): Undef before definition, preventing conflict with reg number in
	VxWorks headers.

2011-11-07  Robert Dewar  <dewar@adacore.com>

	* exp_util.ads, exp_alfa.adb, a-cohama.adb, a-cohama.ads, sem_ch4.adb,
	aspects.ads, exp_ch8.adb, exp_ch8.ads, atree.ads: Minor reformatting.
	* gcc-interface/Make-lang.in: Update dependencies. 

2011-11-07  Ed Schonberg  <schonberg@adacore.com>

	* exp_ch6.adb: A tagged type is a legal actual for an aliased
	formal.

2011-11-07  Pascal Obry  <obry@adacore.com>

	* g-socket.adb, g-socket.ads: Minor reformatting.

2011-11-07  Robert Dewar  <dewar@adacore.com>

	* sem_res.adb (Resolve_Actuals): Minor error message improvement.

2011-11-07  Robert Dewar  <dewar@adacore.com>

	* gnat_ugn.texi: Add discussion of default mode handling of
	source representation with no -gnatW option given, in particular
	noting that NEL (next line) is not recognized in this context.

From-SVN: r181094
2011-11-07 17:30:55 +01:00
Arnaud Charlet
9ee76313c4 [multiple changes]
2011-11-07  Yannick Moy  <moy@adacore.com>

	* sem_util.adb (Note_Possible_Modification): In Alfa mode,
	generate a reference for a modification even when the modification
	does not come from source.

2011-11-07  Ed Schonberg  <schonberg@adacore.com>

	* exp_ch5.adb (Expand_Iterator_Loop): For the "of" iterator form,
	use the indexing attributes rather than the Element function,
	to obtain variable references.
	* sem_ch4.adb (Try_Container_Indexing): Code cleanup. Use
	Find_Aspect rather than iterating over representation
	items. Improve error message.
	* a-cohama.adb, a-cohama.ads Update to latest RM, with two versions
	of Reference functions.

From-SVN: r181093
2011-11-07 17:25:32 +01:00
Arnaud Charlet
7b7a0c2bdd [multiple changes]
2011-11-07  Yannick Moy  <moy@adacore.com>

	* sem_util.adb (Unique_Entity): For a parameter on a subprogram
	body that has a corresponding parameter on the subprogram
	declaration, define the unique entity as being the declaration
	one.

2011-11-07  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch6.adb (Analyze_Return_Type): In Ada 2012 mode, if the
	return type of a function is the class-wide type of an incomplete
	type T, T can be a Taft-amendment type and does not have to be
	completed in the current private part.

2011-11-07  Ed Schonberg  <schonberg@adacore.com>

	* aspects.ads (Inherited_Aspect): Map that indicates type aspects
	that are inherited by default, and apply to the class-wide type
	as well.
	* aspects.adb (Find_Aspect): If the entity is class-wide and the
	aspect is inherited, use the aspect of the specific type.

From-SVN: r181092
2011-11-07 17:22:28 +01:00
Arnaud Charlet
cc570be693 [multiple changes]
2011-11-07  Hristian Kirtchev  <kirtchev@adacore.com>

	* exp_alfa.adb: Remove with and use clause for
	Exp_Ch8. Add with and use clause for Exp_Util.
	Remove local constant Disable_Processing_Of_Renamings.
	(Expand_Alfa_N_Object_Renaming_Declaration): The expansion of
	object renamings has been reenabled.
	(Expand_Possible_Renaming):
	The expansion of identifier and expanded names has been
	reenabled. Perform the substitutions only for entities that
	denote an object.
	* exp_ch8.ads, exp_ch8.adb (Evaluate_Name): Moved to Exp_Util.
	* exp_util.adb (Evaluate_Name): Moved from Exp_Ch8.
	(Remove_Side_Effects): Alphabetize local variables. Add a guard
	to avoid the infinite expansion of an expression in Alfa mode. Add
	processing for function calls in Alfa mode.
	* exp_util.ads (Evaliate_Name): Moved from Exp_Ch8.

2011-11-07  Ed Schonberg  <schonberg@adacore.com>

	* freeze.adb (Freeze_Entity): If the entity is an access to
	subprogram whose designated type is itself a subprogram type,
	its own return type must be decorated with size information.

From-SVN: r181091
2011-11-07 17:20:14 +01:00
Jakub Jelinek
da80a6464e i386.c (ix86_expand_builtin): If gather mask argument is known to have all high bits set...
* config/i386/i386.c (ix86_expand_builtin): If gather mask
	argument is known to have all high bits set, pass pc_rtx as
	second argument to the expander instead of op0.
	* config/i386/sse.md (*avx2_gathersi<mode>_2,
	*avx2_gatherdi<mode>_2): New patterns.
	* config/i386/avx2intrin.h (_mm256_i32gather_pd,
	_mm256_i64gather_pd, _mm256_i32gather_ps): Set mask using
	_mm256_cmp_pd with zero vector arguments and _CMP_EQ_OQ instead of
	_mm256_set1_pd.

From-SVN: r181090
2011-11-07 17:00:08 +01:00
Jakub Jelinek
aec7ae7dea re PR tree-optimization/50789 (Gather vectorization)
PR tree-optimization/50789
	* tree-vect-stmts.c (process_use): Add force argument, avoid
	exist_non_indexing_operands_for_use_p check if true.
	(vect_mark_stmts_to_be_vectorized): Adjust callers.  Handle
	STMT_VINFO_GATHER_P.
	(gen_perm_mask): New function.
	(perm_mask_for_reverse): Use it.
	(reverse_vec_element): Rename to...
	(permute_vec_elements): ... this.  Add Y and MASK_VEC arguments,
	generalize for any permutations.
	(vectorizable_load): Adjust caller.  Handle STMT_VINFO_GATHER_P.
	* target.def (TARGET_VECTORIZE_BUILTIN_GATHER): New hook.
	* doc/tm.texi.in (TARGET_VECTORIZE_BUILTIN_GATHER): Document it.
	* doc/tm.texi: Regenerate.
	* tree-data-ref.c (initialize_data_dependence_relation,
	compute_self_dependence): No longer static.
	* tree-data-ref.h (initialize_data_dependence_relation,
	compute_self_dependence): New prototypes.
	* tree-vect-data-refs.c (vect_check_gather): New function.
	(vect_analyze_data_refs): Detect possible gather load data
	refs.
	* tree-vectorizer.h (struct _stmt_vec_info): Add gather_p field.
	(STMT_VINFO_GATHER_P): Define.
	(vect_check_gather): New prototype.
	* config/i386/i386-builtin-types.def: Add types for alternate
	gather builtins.
	* config/i386/sse.md (AVXMODE48P_DI): Remove.
	(VEC_GATHER_MODE): Rename mode_attr to...
	(VEC_GATHER_IDXSI): ... this.
	(VEC_GATHER_IDXDI, VEC_GATHER_SRCDI): New mode_attrs.
	(avx2_gathersi<mode>, *avx2_gathersi<mode>): Use <VEC_GATHER_IDXSI>
	instead of <VEC_GATHER_MODE>.
	(avx2_gatherdi<mode>): Use <VEC_GATHER_IDXDI> instead of
	<<AVXMODE48P_DI> and <VEC_GATHER_SRCDI> instead of VEC_GATHER_MODE
	on src and mask operands.
	(*avx2_gatherdi<mode>): Likewise.  Use VEC_GATHER_MODE iterator
	instead of AVXMODE48P_DI.
	(avx2_gatherdi<mode>256, *avx2_gatherdi<mode>256): Removed.
	* config/i386/i386.c (enum ix86_builtins): Add
	IX86_BUILTIN_GATHERALTSIV4DF, IX86_BUILTIN_GATHERALTDIV8SF,
	IX86_BUILTIN_GATHERALTSIV4DI and IX86_BUILTIN_GATHERALTDIV8SI.
	(ix86_init_mmx_sse_builtins): Create those builtins.
	(ix86_expand_builtin): Handle those builtins and adjust expansions
	of other gather builtins.
	(ix86_vectorize_builtin_gather): New function.
	(TARGET_VECTORIZE_BUILTIN_GATHER): Define.

	* gcc.target/i386/avx2-gather-1.c: New test.
	* gcc.target/i386/avx2-gather-2.c: New test.
	* gcc.target/i386/avx2-gather-3.c: New test.
	* gcc.target/i386/avx2-gather-4.c: New test.

From-SVN: r181089
2011-11-07 16:59:07 +01:00
Janne Blomqvist
571b34b25e clock and time are part of the C standard library.
2011-11-07  Janne Blomqvist  <jb@gcc.gnu.org>

	* intrinsic.texi (MCLOCK, MCLOCK8, TIME, TIME8): Functions clock
	and time are part of the C standard library.

From-SVN: r181087
2011-11-07 17:31:31 +02:00
Uros Bizjak
ed377f02a6 pr49781-1.c (dg-options): Add -mtune=generic.
* gcc.target/i386/pr49781-1.c (dg-options): Add -mtune=generic.

From-SVN: r181086
2011-11-07 16:21:35 +01:00
Janne Blomqvist
0948d15384 Revert previous fix for PR 45723.
libgfortran ChangeLog:

2011-11-07  Janne Blomqvist  <jb@gcc.gnu.org>

        PR libfortran/45723
        * io/open.c (new_unit): Don't check file size before attempting
        seek.


testsuite ChangeLog:

2011-11-07  Janne Blomqvist  <jb@gcc.gnu.org>

        PR libfortran/45723
        * gfortran.dg/open_dev_null.F90: Remove testcase.

From-SVN: r181085
2011-11-07 16:32:50 +02:00
Uros Bizjak
51e674b7f1 target-supports.exp (check_effective_target_sync_int_128): Don't cache the result.
* lib/target-supports.exp (check_effective_target_sync_int_128):
	Don't cache the result.
	(check_effective_target_sync_long_long): Ditto.

From-SVN: r181082
2011-11-07 14:09:09 +01:00
Uros Bizjak
6f2cc91cc4 f16cintrin: Remove extra _X86INTRIN_H_INCLUDED check.
* config/i386/f16cintrin: Remove extra _X86INTRIN_H_INCLUDED check.

From-SVN: r181080
2011-11-07 11:23:56 +01:00
Tristan Gingold
c750e76857 config.gcc (*-*-*vms*): Set c_target_objs, cxx_target_objs.
2011-11-07  Tristan Gingold  <gingold@adacore.com>

	* config.gcc (*-*-*vms*): Set c_target_objs, cxx_target_objs.
	* config/vms/t-vms: Add vms-c.o rule.
	* config/vms/vms-c.c: New file.
	* config/vms/vms-protos.h (vms_c_register_pragma): New prototype.
	* config/vms/vms.h (REGISTER_TARGET_PRAGMAS): Define.

From-SVN: r181079
2011-11-07 10:17:44 +00:00
Tristan Gingold
ba89fcb672 vms.h (TARGET_OBJECT_SUFFIX, [...]): Move to config/vms/vms.h
2011-11-07  Tristan Gingold  <gingold@adacore.com>

	* config/alpha/vms.h (TARGET_OBJECT_SUFFIX,
	TARGET_EXECUTABLE_SUFFIX, TARGET_OS_CPP_BUILTINS,
	TARGET_ABI_OPEN_VMS, LONG_TYPE_SIZE, ADA_LONG_TYPE_SIZE,
	POINTER_SIZE, POINTERS_EXTEND_UNSIGNED): Move to config/vms/vms.h
	(SUBTARGET_OS_CPP_BUILTINS): Define.
	(TARGET_DEFAULT): Tune according to POINTER_SIZE.
	(MASK_RETURN_ADDR): Define in 64 bit mode.
	* config/ia64/vms.h: Likewise.
	* config/vms/vms.h: New file.
	* config/vms/vms64.h: New file.
	* config/alpha/vms64.h: Removed.
	* config/ia64/vms64.h: Removed.
	* config.gcc (alpha64-dec-*vms*, alpha*-dec-*vms*, ia64-hp-*vms*):
	Adjust for above change.

From-SVN: r181078
2011-11-07 09:03:20 +00:00
Enkovich Ilya
f3b61b784d re PR target/50962 (Additional opportunity for AGU stall avoidance optimization for Atom processor)
gcc/
	PR target/50962
	* config/i386/i386-protos.h (ix86_use_lea_for_mov): New.
	* config/i386/i386.c (ix86_use_lea_for_mov): Likewise.
	* config/i386/i386.md (movsi_internal): Emit lea if profitable.
	(movdi_internal_rex64): Likewise.

From-SVN: r181077
2011-11-07 08:47:15 +00:00
Sergey Ostanevich
b3242a4c75 re PR rtl-optimization/47698 (CMOV accessing volatile memory with read side effect)
gcc/
	PR rtl-optimization/47698
	* ifconv.c (noce_operand_ok): prevent CMOV generation
	for volatile mem.

gcc/testsuite/
	PR rtl-optimization/47698
	* gcc.target/i386/47698.c: New test.

From-SVN: r181075
2011-11-07 08:41:55 +00:00
Tristan Gingold
f7a57cdc35 alpha-common.c (alpha_option_init_struct): New function.
2011-11-07  Tristan Gingold  <gingold@adacore.com>

	* common/config/alpha/alpha-common.c (alpha_option_init_struct):
	New function.
	(TARGET_OPTION_INIT_STRUCT): Define.
	* config/alpha/alpha.c (TARGET_MIN_ANCHOR_OFFSET)
	(TARGET_MAX_ANCHOR_OFFSET)
	(TARGET_USE_BLOCKS_FOR_CONSTANT_P): Redefine.

From-SVN: r181074
2011-11-07 08:33:14 +00:00
Quentin Neill
e97764b893 Fix r180999, update ChangeLog
2011-11-06  Quentin Neill  <quentin.neill@amd.com>

	Fix r180999, update ChangeLog
	* config.gcc: Add f16cintrin.h.
	* f16cintrin.h: Add missing endif.

From-SVN: r181070
2011-11-07 04:59:47 +00:00
Jason Merrill
8e7860a17b re PR c++/35688 (template visibility not overridden by template arguments)
PR c++/35688
gcc/c-common/
	* c-common.c (decl_has_visibility_attr): Split out from...
	(c_determine_visibility): ...here.
	* c-common.h: Declare it.
gcc/cp/
	* decl2.c (constrain_visibility): Check decl_has_visibility_attr
	rather than DECL_VISIBILITY_SPECIFIED.

From-SVN: r181069
2011-11-06 23:40:14 -05:00
Quentin Neill
c0baa6dc73 Fix r180999.
2011-11-05  Quentin Neill  <quentin.neill@amd.com>

	Fix r180999.
	* config.gcc: Add f16cintrin.h.

From-SVN: r181068
2011-11-07 04:22:14 +00:00
Sebastian Huber
e36c5271e3 config.gcc (arm*-*-rtemseabi*): New target.
2011-11-06  Sebastian Huber  <sebastian.huber@embedded-brains.de>

	* config.gcc (arm*-*-rtemseabi*): New target.
	* config/arm/rtems-eabi.h: New.
	* config/arm/t-rtems-eabi: New.

From-SVN: r181064
2011-11-07 04:21:19 +01:00
David S. Miller
6e25d659c1 Get rid of sparc's UNSPEC_SHORT_LOAD.
* config/sparc/sparc.md (UNSPEC_SHORT_LOAD): Delete.
	(zero_extend_v8qi_vis, zero_extend_v4hi_vis,
	*zero_extend_v8qi_<P:mode>_insn,
	*zero_extend_v4hi_<P:mode>_insn): Express using vec_merge
	and vec_duplicate instead of using an UNSPEC.

From-SVN: r181063
2011-11-06 18:22:40 -08:00
Terry Guo
2805cc271b wmul-1.c: Adjust optimization level.
2011-11-07  Terry Guo  <terry.guo@arm.com>

        * gcc.target/arm/wmul-1.c: Adjust optimization level.
        * gcc.target/arm/wmul-2.c: Ditto.
        * gcc.target/arm/wmul-3.c: Ditto.
        * gcc.target/arm/wmul-4.c: Ditto.

From-SVN: r181062
2011-11-07 02:20:35 +00:00
Alan Modra
d85087f6a0 re PR target/30282 (Optimization flag -O1 -fschedule-insns2 cause red zone to be used when there is none)
PR target/30282
	* config/rs6000/rs6000.c (rs6000_emit_stack_reset): Always emit
	blockage for ABI_V4.

From-SVN: r181056
2011-11-07 11:44:33 +10:30
Dave Korn
c5219bb0ec cygwin.h (LIBGCJ_SONAME): Updated to match recent libgcj version bump.
* config/i386/cygwin.h (LIBGCJ_SONAME): Updated to match recent
	libgcj version bump.
	* config/i386/mingw32.h (LIBGCJ_SONAME): Likewise.

From-SVN: r181055
2011-11-07 00:30:29 +00:00
Eric Botcazou
43c8a04391 gcse.c: Adjust outdated comments throughout.
* gcse.c: Adjust outdated comments throughout.
	(struct mem_conflict_info): New structure.
	(mems_conflict_for_gcse_p): Use it to communicate with caller.
	(load_killed_in_block_p): Pass it to note_stores.
	(hash_expr): Remove superfluous line break.
	(hash_scan_set): Rename PAT parameter into SET.
	(hash_scan_insn): Reorder cases.
	(canon_list_insert): Fix long line.
	(edge_list): Delete.
	(prune_expressions): Rename E local variable into EXPR.
	(compute_pre_data): Return struct edge_list * object.
	(pre_expr_reaches_here_p_work): Fix formatting.
	(process_insert_insn): Move around comment.
	(pre_edge_insert): Fix long line.
	(pre_insert_copies): Likewise.
	(gcse_emit_move_after): Swap SRC and DEST parameters.
	(pre_delete): Adjust call to gcse_emit_move_after.
	(pre_gcse): Take struct edge_list * parameter.  Fix long line.
	(one_pre_gcse_pass): Use flag_gcse_lm condition for all routines.
	Use a local list of edges.
	(hoist_code): Fix long line.  Adjust call to gcse_emit_move_after.
	(pre_ldst_expr_hash): Fix long line.
	(free_ldst_mems): Rename into...
	(free_ld_motion_mems): ...this.
	(first_ls_expr): Delete.
	(next_ls_expr): Likewise.
	(print_ldst_list): Do not use above two functions.
	(simple_mem): Adjust interface.
	(compute_ld_motion_mems): Fix formatting.
	(update_ld_motion_stores): Reuse local variable.

From-SVN: r181054
2011-11-07 00:22:18 +00:00
GCC Administrator
c8772697e1 Daily bump.
From-SVN: r181053
2011-11-07 00:18:36 +00:00
Joseph Myers
d19fa6b5f1 c-decl.c (shadow_tag_warned, [...]): Handle _Alignas specifiers.
* c-decl.c (shadow_tag_warned, grokdeclarator): Handle _Alignas
	specifiers.
	(build_null_declspecs): Initialize align_log and alignas_p fields.
	(declspecs_add_alignas): New.
	* c-parser.c (c_token_starts_declspecs): Handle RID_ALIGNAS.
	(c_parser_declspecs): Handle _Alignas specifiers.
	(c_parser_alignas_specifier): New.
	(c_parser_alignof_expression): Diagnose alignof use for non-C1X.
	Diagnose _Alignof (expression).
	* c-tree.h (struct c_declspecs): Add align_log and alignas_p
	fields.
	(declspecs_add_alignas): Declare.
	* ginclude/stddef.h (max_align_t): Define for C1X and C++11.
	* ginclude/stdalign.h: New.
	* Makefile.in (USER_H): Add stdalign.h.

c-family:
	* c-common.c (c_common_reswords): Add _Alignas and _Alignof.
	(c_sizeof_or_alignof_type): Diagnose alignof applied to a function
	type.
	(check_user_alignment): New.  Split out of
	handle_aligned_attribute.  Disallow integer constants with
	noninteger types.  Conditionally allow zero.
	(handle_aligned_attribute): Use check_user_alignment.
	* c-common.h (RID_ALIGNAS, check_user_alignment): New.

testsuite:
	* g++.dg/cpp0x/alignof3.C, gcc.dg/c1x-align-1.c,
	gcc.dg/c1x-align-2.c, gcc.dg/c1x-align-3.c, gcc.dg/c1x-align-4.c,
	gcc.dg/c90-align-1.c, gcc.dg/c99-align-1.c: New tests.
	* gcc.dg/gnu89-const-expr-1.c, gcc.dg/gnu90-const-expr-1.c,
	gcc.dg/gnu99-const-expr-1.c, gcc.dg/gnu99-static-1.c: Update
	expected diagnostics.

From-SVN: r181048
2011-11-06 23:51:19 +00:00
Joern Rennecke
9e582b1da0 regset.h (fixed_reg_set_regset): Declare.
* regset.h (fixed_reg_set_regset): Declare.
        * dse.c: Include regset.h .
        (struct insn_info): Add member fixed_regs_live.
        (note_add_store_info): New typedef.
        (note_add_store): New function.
        (emit_inc_dec_insn_before): Expect arg to be of type insn_info_t .
        Use gen_add3_insn / gen_move_insn.
        Check new insn for unwanted clobbers before emitting it.
        (check_for_inc_dec): Rename to...
        (check_for_inc_dec_1:) ... this.  Return bool.  Take insn_info
        parameter.  Changed all callers in file.
        (check_for_inc_dec, copy_fixed_regs): New functions.
        (scan_insn): Set fixed_regs_live field of insn_info.
        * rtl.h (check_for_inc_dec): Update prototype.
        * postreload.c (reload_cse_simplify): Take new signature of
        check_ind_dec into account.
        * reginfo.c (fixed_reg_set_regset): New variable.
        (init_reg_sets_1): Initialize it.

Co-Authored-By: Eric Botcazou <ebotcazou@adacore.com>

From-SVN: r181046
2011-11-06 22:58:54 +00:00
Janus Weil
eaee02a520 gfortran.h (gfc_extend_expr): Modified prototype.
2011-11-06  Janus Weil  <janus@gcc.gnu.org>

	* gfortran.h (gfc_extend_expr): Modified prototype.
	* interface.c (gfc_extend_expr): Return 'match' instead of 'gfc_try'.
	Remove argument 'real_error'.
	* resolve.c (resolve_operator): Modified call to 'gfc_extend_expr'.

From-SVN: r181044
2011-11-06 22:36:54 +01:00
Paolo Carlini
9965f21f9c re PR c++/47695 ([C++0X] Calling a deleted function fails twice)
2011-11-06  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/47695
	* decl2.c (mark_used): Early return false after error or sorry.
	* cp-tree.h (mark_used): Adjust declaration.
	* semantics.c (finish_id_expression): Check mark_used return value.

From-SVN: r181042
2011-11-06 21:05:44 +00:00
Jakub Jelinek
4a7ab00c25 tree-cfg.c (gimple_can_merge_blocks_p): For -O0 don't remove any user labels.
* tree-cfg.c (gimple_can_merge_blocks_p): For -O0 don't remove
	any user labels.

From-SVN: r181040
2011-11-06 20:43:32 +01:00
John David Anglin
50bbeefb4c pa.c (pa_hpux_init_libfuncs): Rename to pa_init_libfuncs.
* config/pa/pa.c (pa_hpux_init_libfuncs): Rename to pa_init_libfuncs.
	Remove dependence of declaration and target define on definition of
	HPUX_LONG_DOUBLE_LIBRARY.  Update implementation.

From-SVN: r181038
2011-11-06 19:12:54 +00:00
Andrew Macleod
86951993f8 Check in patch/merge from cxx-mem-model Branch
From-SVN: r181031
2011-11-06 14:55:48 +00:00
Joern Rennecke
a8a058f652 Remove unwanted svn:executable properties that svn add had decided to add.
From-SVN: r181030
2011-11-06 14:43:20 +00:00
Richard Guenther
a7a296abd3 2011-11-6 Richard Guenther <rguenther@suse.de>
* ipa-prop.c (ipa_modify_call_arguments): Re-compute
	inlinable flag.

From-SVN: r181027
2011-11-06 13:02:15 +00:00
Ira Rosen
f7e531cf98 tree-vectorizer.h (vectorizable_condition): Add argument.
* tree-vectorizer.h (vectorizable_condition): Add argument.
        * tree-vect-loop.c (vectorizable_reduction): Fail for condition
        in SLP.  Update calls to vectorizable_condition.
        * tree-vect-stmts.c (vect_is_simple_cond): Add basic block info
        to the arguments.  Pass it to vect_is_simple_use_1.
        (vectorizable_condition): Add slp_node to the arguments.
        Support vectorization of basic blocks.  Fail for reduction in
        SLP.  Update calls to vect_is_simple_cond and
        vect_is_simple_use.  Support SLP: call vect_get_slp_defs to get
        vector operands.
        (vect_analyze_stmt): Update calls to vectorizable_condition.
        (vect_transform_stmt): Likewise.
        * tree-vect-slp.c (vect_create_new_slp_node): Handle COND_EXPR.
        (vect_get_and_check_slp_defs): Handle COND_EXPR.  Allow pattern
        def stmts.
        (vect_build_slp_tree): Handle COND_EXPR.
        (vect_analyze_slp_instance): Push pattern statements to root
        node.
        (vect_get_constant_vectors): Fix comments.  Handle COND_EXPR.

From-SVN: r181026
2011-11-06 09:01:45 +00:00
David S. Miller
79cad86dca More improvements to sparc VIS vec_init code generation.
gcc/

	* config/sparc/sparc.md (UNSPEC_SHORT_LOAD): New unspec.
	(zero-extend_v8qi_vis, zero_extend_v4hi_vis): New expanders.
	(*zero_extend_v8qi_<P:mode>_insn,
	*zero_extend_v4hi_<P:mode>_insn): New insns.
	* config/sparc/sparc.c (vector_init_move_words,
	vector_init_prepare_elts, sparc_expand_vector_init_vis2,
	sparc_expand_vector_init_vis1): New functions.
	(vector_init_bshuffle): Rewrite to handle more cases and make use
	of locs[] array prepared by vector_init_prepare_elts.
	(vector_init_fpmerge, vector_init_faligndata): Delete.
	(sparc_expand_vector_init): Rewrite using new infrastructure.

gcc/testsuite/

	* lib/test-supports.exp
	(check_effective_target_ultrasparc_vis2_hw): New proc.
	(check_effective_target_ultrasparc_vis3_hw): New proc.
	* gcc.target/sparc/vec-init-1.inc: New vector init common code.
	* gcc.target/sparc/vec-init-2.inc: Likewise.
	* gcc.target/sparc/vec-init-3.inc: Likewise.
	* gcc.target/sparc/vec-init-1-vis1.c: New test.
	* gcc.target/sparc/vec-init-1-vis2.c: New test.
	* gcc.target/sparc/vec-init-1-vis3.c: New test.
	* gcc.target/sparc/vec-init-2-vis1.c: New test.
	* gcc.target/sparc/vec-init-2-vis2.c: New test.
	* gcc.target/sparc/vec-init-2-vis3.c: New test.
	* gcc.target/sparc/vec-init-3-vis1.c: New test.
	* gcc.target/sparc/vec-init-3-vis2.c: New test.
	* gcc.target/sparc/vec-init-3-vis3.c: New test.

From-SVN: r181024
2011-11-05 19:39:03 -07:00
GCC Administrator
0d70aaa72e Daily bump.
From-SVN: r181021
2011-11-06 00:18:23 +00:00
Jason Merrill
90dba8f44e * decl.c (cp_finish_decl): Mostly revert previous change.
From-SVN: r181017
2011-11-05 17:06:34 -04:00
Joern Rennecke
feeeff5cfe config.gcc (epiphany-*-*): New architecture.
gcc:
        * config.gcc (epiphany-*-*): New architecture.
        (epiphany-*-elf): New configuration.
        * config/epiphany, common/config/epiphany : New directories.
        * doc/extend.texi (disinterrupt attribute): Add Epiphany.
        (interrupt attribute): Add Epiphany.
        (long_call, short_call attribute): Add Epiphany.
        * doc/invoke.texi (Options): Add Epiphany options.
        * doc/md.texi (Machine Constraints): Add Epiphany constraints.
        * doc/install.texi (Options specification):
        Add --with-stack-offset=@var{num} description.
        (host/target specific issues): Add epiphany-*-elf.
        * doc/contrib.texi (Contributors): Mention Epiphany port.
gcc/testsuite:
        * gcc.c-torture/execute/ieee/mul-subnormal-single-1.x:
        Disable test on Epiphany.
        * gcc.c-torture/execute/20101011-1.c: Disable test on Epiphany.
        * gcc.dg/stack-usage-1.c [__epiphany__] (SIZE): Define.
        * gcc.dg/pragma-pack-3.c: Disable test on Epiphany.
        * g++.dg/parse/pragma3.C: Likewise.
        * stackalign/builtin-apply-2.c (STACK_ARGUMENTS_SIZE): Define.
        (bar): Use it.
        * gcc.dg/weak/typeof-2.c [epiphany-*-*]: Add option -mshort-calls.
        * gcc.dg/tls/thr-cse-1.c: Likewise.
        * g++.dg/opt/devirt2.C: Likewise.
        * gcc.dg/20020312-2.c [epiphany-*-*] (PIC_REG): Define.
        * gcc.dg/builtin-apply2.c [__epiphany__]: (STACK_ARGUMENTS_SIZE): 20.
        * gcc.target/epiphany: New directory.
libgcc:
        * config.host (epiphany-*-elf*): New configuration.
        * config/epiphany: New Directory.
contrib:
        * contrib-list.mk: Add Epiphany configurations.

From-SVN: r181016
2011-11-05 20:48:23 +00:00
Tobias Burnus
12ca92d4f0 quad_2.f90: New.
2011-11-05  Tobias Burnus  <burnus@net-b.de>

        * gfortran.dg/quad_2.f90: New.

From-SVN: r181015
2011-11-05 21:43:44 +01:00
Jakub Jelinek
5619e52cfb re PR tree-optimization/50693 (Loop optimization restricted by GOTOs)
PR tree-optimization/50693
	* tree-cfg.c (gimple_can_merge_blocks_p): Allow merging with
	non-forced user labels.
	(gimple_merge_blocks): Turn non-forced user labels into
	debug bind stmt with the label as first operand and reset value.
	(gimple_duplicate_bb): Don't duplicate label debug stmts.
	* dwarf2out.c (gen_label_die): Handle NOTE_INSN_DELETED_DEBUG_LABEL.
	* final.c (final_scan_insn): Likewise.
	(rest_of_clean_state): Don't dump NOTE_INSN_DELETED_DEBUG_LABEL.
	* var-tracking.c (debug_label_num): New variable.
	(delete_debug_insns): Don't delete DEBUG_INSNs for LABEL_DECLs,
	instead turn them into NOTE_INSN_DELETED_DEBUG_LABEL notes.
	* cfglayout.c (skip_insns_after_block, duplicate_insn_chain): Handle
	NOTE_INSN_DELETED_DEBUG_LABEL.
	(duplicate_insn_chain): Don't duplicate LABEL_DECL DEBUG_INSNs.
	* insn-notes.def (DELETED_DEBUG_LABEL): New note kind.
	* print-rtl.c (print_rtx): Handle NOTE_INSN_DELETED_DEBUG_LABEL.
	* gengtype.c (adjust_field_rtx_def): Likewise.
	* config/i386/i386.c (ix86_output_function_epilogue): For MachO
	clear CODE_LABEL_NUMBER of NOTE_INSN_DELETED_DEBUG_LABEL
	if their are at the end of function and nop hasn't been emitted.
	* config/rs6000/rs6000.c (rs6000_output_function_epilogue): Likewise.

From-SVN: r181014
2011-11-05 20:58:37 +01:00
Georg-Johann Lay
267e970765 Fix typo in entry for r180962.
From-SVN: r181012
2011-11-05 13:15:57 +00:00
Georg-Johann Lay
8eee318f0a re PR rtl-optimization/50448 (Missed optimization accessing struct component with integer address)
PR rtl-optimization/50448
	* cprop.c (try_replace_reg): Also try to replace uses of FROM that
	appear in SET_DEST.

From-SVN: r181011
2011-11-05 13:08:54 +00:00
Eric Botcazou
69e596afa4 Tweak previous commit
From-SVN: r181010
2011-11-05 11:30:23 +00:00
Eric Botcazou
42cbaf8361 strlenopt-22g.c: New wrapper around...
* gcc.dg/strlenopt-22g.c: New wrapper around...
	* gcc.dg/strlenopt-22.c: ...this.  Do not define USE_GNU and adjust.

From-SVN: r181009
2011-11-05 10:44:45 +00:00
Ralf Corsepius
08f2c4dba0 Fix malformated ChangeLog entries.
From-SVN: r181007
2011-11-05 07:25:16 +01:00
Peter Dufault
da103f5aaf rtems.h (SUBSUBTARGET_OVERRIDE_OPTIONS): Extend rs6000_spe handling.
2011-11-05  Peter Dufault  <dufault@hda.com>,
	    Sebastian Huber <sebastian.huber@embedded-brains.de>

	* config/rs6000/rtems.h (SUBSUBTARGET_OVERRIDE_OPTIONS):
	Extend rs6000_spe handling.


Co-Authored-By: Sebastian Huber <sebastian.huber@embedded-brains.de>

From-SVN: r181006
2011-11-05 07:18:08 +01:00
Ralf Corsepius
bce15ee846 t-rtems: Add -mcpu=8540/-mfloat-gprs=double multilib.
2011-11-05  Ralf Corsépius  <ralf.corsepius@rtems.org>

	* config/rs6000/t-rtems: Add -mcpu=8540/-mfloat-gprs=double multilib.
	Remove -mcpu=601 multilib.
	Remove -Dmpc8260 multilib.
	* config/rs6000/rtems.h: Allow --float-gprs=... to override grps
	on E500 targets.

From-SVN: r181005
2011-11-05 07:09:09 +01:00
Jason Merrill
e2df21bfc6 re PR c++/26714 (violation of [class.temporary]/5)
PR c++/26714
	* init.c (perform_member_init): Strip TARGET_EXPR around NSDMI.
	Do temporary lifetime extension.

From-SVN: r181002
2011-11-04 23:28:14 -04:00
Jason Merrill
8dc1dc7975 re PR c++/48370 (G++ fails to extend reference temporary lifetime in some situations)
PR c++/48370
	* decl.c (cp_finish_decl): Run cleanups in the right order.

From-SVN: r181001
2011-11-04 23:28:05 -04:00
Quentin Neill
87ca01b7be Piledriver f16cintrin.h fix.
2011-11-04  Quentin Neill  <quentin.neill@amd.com>

	Piledriver f16cintrin.h fix.
	* config/i386/f16cintrin.h: Contents moved from immintrin.h.
	* config/config.gcc: Add f16cintrin.h.

From-SVN: r180999
2011-11-05 02:31:29 +00:00
GCC Administrator
a73c1a724d Daily bump.
From-SVN: r180996
2011-11-05 00:18:34 +00:00
Ian Lance Taylor
95ac3b7ad0 Fix select { case v, ok := <-c: }.
From-SVN: r180992
2011-11-04 23:03:37 +00:00
Eric Botcazou
cf9e9959d1 re PR c++/50608 (cannot apply 'offsetof' to a non-constant address)
2011-11-04  Eric Botcazou  <ebotcazou@adacore.com>

	PR c++/50608
	* c-parser.c (c_parser_postfix_expression) <RID_OFFSETOF>: Adjust call
	to fold_offsetof.
	* c-typeck.c (build_unary_op) <ADDR_EXPR>: Call fold_offsetof_1.
c-family/
	* c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Call fold_offsetof_1.
	(fold_offsetof_1): Make global.  Remove STOP_REF argument and adjust.
	<INDIRECT_REF>: Return the argument.
	<ARRAY_REF>: Remove special code for negative offset.
	Call fold_build_pointer_plus instead of size_binop.
	(fold_offsetof): Remove STOP_REF argument and adjust.
	* c-common.h (fold_offsetof_1): Declare.
	(fold_offsetof): Remove STOP_REF argument.
cp/
	* semantics.c (finish_offsetof): Adjust call to fold_offsetof.
	* typeck.c (cp_build_addr_expr_1): Call fold_offsetof_1.

From-SVN: r180986
2011-11-04 21:46:07 +00:00
Alan Modra
c62c54419c reload1.c (gen_reload): Don't use REGNO on SUBREGs.
* reload1.c (gen_reload): Don't use REGNO on SUBREGs.
	* print-rtl.c (print_rtx): Don't segfault on negative regno.

From-SVN: r180983
2011-11-05 07:35:46 +10:30
David S. Miller
7a83e5bc55 Fix sparc regression due to recent movcc pattern changes.
PR target/49965
	* config/sparc/sparc.c (sparc_expand_conditional_move): Handle the
	fact that sparc_emit_float_lib_cmp modifies the comparison in
	operands[1].

From-SVN: r180982
2011-11-04 13:25:59 -07:00
Ralf Corsepius
4ce7e3a98e config.gcc (bfin*-rtems*): Add newlib-stdint.h.
2010-10-09  Ralf Corsépius <ralf.corsepius@rtems.org>

	* config.gcc (bfin*-rtems*): Add newlib-stdint.h.
	* config.gcc (lm32*-rtems*): Add newlib-stdint.h.

From-SVN: r180974
2011-11-04 19:16:31 +01:00
Hans-Peter Nilsson
e03af9c4b7 gcc-dg.exp (gcc_force_conventional_output): New global variable, default empty, -ffat-lto-objects for effective_target_lto.
* lib/gcc-dg.exp (gcc_force_conventional_output): New global
	variable, default empty, -ffat-lto-objects for effective_target_lto.
	(gcc-dg-test-1): Add options from dg-final methods.
	* lib/scanasm.exp (scan-assembler_required_options)
	(scan-assembler-not_required_options): New procs.

From-SVN: r180972
2011-11-04 18:06:43 +00:00
Paolo Carlini
d269f788e8 typeck.c (build_indirect_ref): Use ATTRIBUTE_UNUSED.
2011-11-04  Paolo Carlini  <paolo.carlini@oracle.com>

	* typeck.c (build_indirect_ref): Use ATTRIBUTE_UNUSED.
	* mangle.c (write_unnamed_type_name): Likewise.

From-SVN: r180970
2011-11-04 17:51:20 +00:00
Magnus Fromreide
669cc68c37 parser.c (cp_parser_enumerator_list): Do not warn about trailing commas in C++0x mode.
* parser.c (cp_parser_enumerator_list): Do not warn about
        trailing commas in C++0x mode.

From-SVN: r180967
2011-11-04 13:38:16 -04:00
Eric Botcazou
a5c037e263 re PR target/50979 (architecture mismatch: "mul32" not enabled for "smul" or "umul")
PR target/50979
	* config/sparc/sparc.h (ASM_CPU_SPEC): Pass -Av8 if -mcpu=v8.

From-SVN: r180966
2011-11-04 17:37:03 +00:00
Olivier Goffart
ec3ebf4556 re PR c++/50965 (C++11 Non static member initializer are not run when class is initialized with {})
PR c++/50965
	* class.c (check_field_decls): NSDMI makes a class non-aggregate.

Co-Authored-By: Jason Merrill <jason@redhat.com>

From-SVN: r180965
2011-11-04 13:15:02 -04:00
Jiangning Liu
e98925f693 re PR rtl-optimization/38644 (Optimization flag -O1 -fschedule-insns2 causes wrong code)
2011-11-04  Jiangning Liu  <jiangning.liu@arm.com>

	PR rtl-optimization/38644
	* config/arm/arm.c (thumb1_expand_epilogue): Add memory barrier
	for epilogue having stack adjustment.

	testcase:
	* gcc.target/arm/stack-red-zone.c: New.

From-SVN: r180964
2011-11-04 16:50:04 +00:00
Paolo Carlini
92b4d64cd4 re PR c++/48420 (Missed -Wconversion-null warning when passing const bool to T*)
/cp
2011-11-04  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/48420
	* call.c (conversion_null_warnings): For 'false' to NULL pointer,
	just check that TREE_TYPE (expr) is a BOOLEAN_TYPE.

/testsuite
2011-11-04  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/48420
	* g++.dg/warn/Wconversion-null-3.C: New.

From-SVN: r180963
2011-11-04 16:31:18 +00:00
Georg-Johann Lay
e4fe948a6e re PR target/50931 ([avr] Support a 24-bit scalar integer mode)
gcc/
	PR target/50931
	* config/avr/avr-modes.def: New file defining PSImode.
	* config/avr/avr-c.c (__INT24_MAX__, __INT24_MIN__,
	__UINT24_MAX__): New built-in defines.
	* config/avr/avr.md (adjust_len): Add tstpsi, mov24,  reload_in24,
	ashlpsi, ashrpsi, lshrpsi.
	(QISO, QIDI, HISI, HIDI, MPUSH, rotx, rotsmode): Add PSI.
	(MOVMODE): New mode iterator.
	(movpsi): New expander.
	(movqi, movhi, movsi, movsf, movpsi): Write as one using MOVMODE.
	(*reload_inpsi, *movpsi): New insns.
	(*reload_inpsi): New RTL peephole.
	(addpsi3, *addpsi3_zero_extend.qi, *addpsi3_zero_extend.hi,
	*addpsi3_sign_extend.hi): New insns.
	(subpsi3, *subpsi3_zero_extend.qi, *subpsi3_zero_extend.hi,
	*subpsi3_sign_extend.hi): New insns.
	(divmodpsi4, udivmodpsi4): New define insn-and-split.
	(*divmodpsi4_call, *udivmodpsi4_call): New insns.
	(andpsi3, iorpsi3, xorpsi3): New insns.
	(*rotlpsi2.1, *rotlpsi2.23): New insns.
	(*rotw<mode>): Insn condition only allow even-sized modes.
	(*rotb<mode>): Insn condition allows odd-sized modes.
	(ashlpsi3, ashrpsi3, lshrpsi3, *addpsi3.lt0): New insns.
	(negpsi2, one_cmplpsi2): New insns.
	(extendqipsi2, extendhipsi2, extendpsisi2): New insns.
	(zero_extendqipsi2, zero_extendhipsi2, zero_extendpsisi2): New
	insn-and-splits.
	(*cmppsi, *negated_tstpsi, *reversed_tstpsi): New insns.
	(cbranchpsi4): New expander.
	* config/avr/constraints.md (Ca3, Co3, Cx3): New constraints.
	* config/avr/avr-protos.h (avr_out_tstpsi, avr_out_movpsi,
	avr_out_ashlpsi3, avr_out_ashrpsi3, avr_out_lshrpsi3,
	avr_out_reload_inpsi): New prototypes.

	* config/avr/avr.c (TARGET_SCALAR_MODE_SUPPORTED_P): Define to...
	(avr_scalar_mode_supported_p): ...this new static function.
	(avr_asm_len): Always return "".
	(avr_out_load_psi, avr_out_store_psi): New static functions.
	(avr_out_movpsi, avr_out_reload_inpsi): New functions.
	(avr_out_tstpsi): New function.
	(avr_out_ashlpsi3, avr_out_ashrpsi3, avr_out_lshrpsi3): New functions.
	(avr_out_plus_1, output_reload_in_const): Handle 3-byte types.
	(avr_simplify_comparison_p): Ditto.
	(adjust_insn_length): Handle ADJUST_LEN_RELOAD_IN24,
	ADJUST_LEN_MOV24, ADJUST_LEN_TSTPSI, ADJUST_LEN_ASHLPSI,
	ADJUST_LEN_ASHRPSI, ADJUST_LEN_LSHRPSI.
	(avr_rtx_costs_1): Report PSI costs.
	(avr_libcall_value): Handle odd-sized parameters.
	(avr_init_builtin_int24): New static function to define built-in
	24-bit types __int24 and __uint24.
	(avr_init_builtins): Use it.

libgcc/
	PR target/50931
	* config/t-avr (LIB1ASMFUNCS): Add _divmodpsi4, _udivmodpsi4.
	* config/lib1funcs.S (__udivmodpsi4, __divmodpsi4): New functions.

From-SVN: r180962
2011-11-04 16:20:18 +00:00
Ed Smith-Rowland
2fcc5e6474 re PR c++/50941 ([C++0x] user-defined string literals provide incorrect length for wchar_t, char16_t, and char32_t)
PR c++/50941
	* parser.c (cp_parser_userdef_string_literal): Fix string length.

From-SVN: r180961
2011-11-04 12:16:09 -04:00
Arnaud Charlet
b6d185a56c * gcc-interface/Make-lang.in: Update dependencies.
From-SVN: r180960
2011-11-04 16:32:18 +01:00
Thomas Doerfler
7959812782 re PR target/50980 (arm-rtems multilib not matching for -mfpu=vfp -mfloat-abi=soft)
2011-11-04	Thomas Doerfler <thomas.doerfler@embedded-brains.de>

	PR target/50980
	* config/arm/rtems-elf.h, config/arm/t-rtems: Add optional
	support for VFP floating point model.

From-SVN: r180959
2011-11-04 15:22:06 +00:00
Arnaud Charlet
288f28c87e Minor reformatting.
From-SVN: r180957
2011-11-04 15:10:21 +01:00
Eric Botcazou
8daa1407f2 gnat_ugn.texi (Performance Considerations): New sub-section.
2011-11-04  Eric Botcazou  <ebotcazou@adacore.com>

	* gnat_ugn.texi (Performance Considerations) <Vectorization
	of loops>: New sub-section.  <Other Optimization Switches>:
	Minor tweak.

From-SVN: r180956
2011-11-04 15:10:01 +01:00
Arnaud Charlet
1adaea169e [multiple changes]
2011-11-04  Robert Dewar  <dewar@adacore.com>

	* sprint.adb (Sprint_Node_Actual, case Qualified_Expression):
	Avoid junk semicolon after argument of machine code Asm operand.

2011-11-04  Robert Dewar  <dewar@adacore.com>

	* exp_ch11.adb (Generate_Push_Pop): Inhibit push/pop nodes in
	CodePeer mode or if restriction No_Exception_Handlers is present.
	* exp_ch6.adb (Expand_N_Subprogram_Body): (Inhibit push/pop
	nodes in CodePeer mode or if restriction No_Exception_Handlers
	is present.

2011-11-04  Robert Dewar  <dewar@adacore.com>

	* s-tassta.adb, atree.ads, errout.adb, sinput.adb: Minor reformatting.

2011-11-04  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch6.adb (Analyze_Subprogram_Specification): The
	specification is legal if it is a function that returns an
	abstract type, if it comes from an attribute renaming of a stream
	attribute of an abstract type.

2011-11-04  Gary Dismukes  <dismukes@adacore.com>

	* exp_util.adb (Is_Possibly_Unaligned_Object): In case of indexed
	components, check whether recursively check whether the prefix
	denotes an unaligned object.

2011-11-04  Ed Schonberg  <schonberg@adacore.com>

	* sem_prag.adb (Analyze_Pragma, case Debug): The argument of
	the pragma is legal if it is an expanded name that denotes a
	procedure that be can called without parameters.

2011-11-04  Eric Botcazou  <ebotcazou@adacore.com>

	* gnat_ugn.texi (Performance Considerations) <Vectorization
	of loops>: New sub-section.  <Other Optimization Switches>:
	Minor tweak.

From-SVN: r180955
2011-11-04 15:09:05 +01:00
Arnaud Charlet
4c9fe6c749 [multiple changes]
2011-11-04  Robert Dewar  <dewar@adacore.com>

	* gnat_rm.texi: Minor reformatting.

2011-11-04  Matthew Heaney  <heaney@adacore.com>

	* a-convec.adb, a-coinve.adb, a-cobove.adb (Merge): Raise PE
	when Target and Source denote same non-empty object
	* a-cdlili.adb, a-cidlli.adb, a-cbdlli.adb (Merge): Ditto

2011-11-04  Robert Dewar  <dewar@adacore.com>

	* exp_attr.adb: Minor reformatting.

2011-11-04  Ed Schonberg  <schonberg@adacore.com>

	* exp_ch5.adb (Expand_Assign_Record): Do not generate a
	discriminant assignment within an initialization proc if the
	record is an unchecked union, as it can only come from the
	initialization of an unchecked union component.

2011-11-04  Robert Dewar  <dewar@adacore.com>

	* gnat_ugn.texi: Minor reformatting.

2011-11-04  Robert Dewar  <dewar@adacore.com>

	* par-labl.adb (Rewrite_As_Loop): Generate info msg rather than
	warning message.

2011-11-04  Robert Dewar  <dewar@adacore.com>

	* exp_ch4.adb: Minor code reorganization (remove junk obsolete
	var Save_Space).

From-SVN: r180954
2011-11-04 15:00:29 +01:00
Hristian Kirtchev
6ec084f387 exp_alfa.adb: Add local constant Disable_Processing_Of_Renamings;
2011-11-04  Hristian Kirtchev  <kirtchev@adacore.com>

	* exp_alfa.adb: Add local constant
	Disable_Processing_Of_Renamings;
	(Expand_Alfa_N_Object_Renaming_Declaration): Disable
	the name evaluation of object renamings for now.
	(Expand_Potential_Renaming): Do not perform the substitution
	for now.
	* exp_util.adb (Remove_Side_Effects): Remove processing for
        functions with side effects in Alfa mode.

From-SVN: r180953
2011-11-04 14:57:31 +01:00
Arnaud Charlet
73fe16797b [multiple changes]
2011-11-04  Gary Dismukes  <dismukes@adacore.com>

	* bindgen.adb (Gen_Elab_Calls): In the case
	of the AAMP target, set elaboration entities to 1 rather than
	incrementing.

2011-11-04  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch10.adb (Install_Limited_With_Unit): To establish the
	proper entities on the ancestors of a child unit that appear
	in a limited_with clause, follow the unit links because the
	units are not analyzed and scope information is incomplete.

2011-11-04  Eric Botcazou  <ebotcazou@adacore.com>

	* exp_ch4.adb (Expand_N_Selected_Component): Refine code
	setting the Atomic_Sync_Required flag to detect one more case.
	* exp_util.adb (Activate_Atomic_Synchronization): Refine code
	setting the Atomic_Sync_Required flag to exclude more cases,
	depending on the parent of the node to be examined.

2011-11-04  Bob Duff  <duff@adacore.com>

	* g-excact.adb: Minor: use named notation.

2011-11-04  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch5.adb: Improve error messages for illegal iterators.

From-SVN: r180952
2011-11-04 14:55:34 +01:00
Arnaud Charlet
b2ab8c33ed [multiple changes]
2011-11-04  Hristian Kirtchev  <kirtchev@adacore.com>

	* exp_alfa.adb: Add with and use clauses for Exp_Ch8 and
	Sem_Util.
	(Expand_Alfa): Alphabetize cases on first choice. Add
	processing for object renaming declarations, identifiers and
	expanded names.
	(Expand_Alfa_N_In): Remove useless return.
	(Expand_Alfa_N_Object_Renaming_Declaration): New routine.
	(Expand_Potential_Renaming): New routine.
	* exp_ch8.adb (Evaluate_Name): Moved to the top level.
	(Expand_N_Object_Declaration): Alphabetize local variables. Move
	Evaluate_Name out to the top level.
	* exp_ch8.ads (Evaluate_Name): Moved from body to package spec.
	* exp_util.adb (Remove_Side_Effects): Add processing for
	functions with side effects in Alfa mode.

2011-11-04  Hristian Kirtchev  <kirtchev@adacore.com>

	* gnat_rm.texi: Add entries for
	restrictions No_Relative_Delay, No_Requeue_Statements and
	No_Stream_Optimizations.

2011-11-04  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch4.adb: Set type of entity in prefixed call, for
	completeness in a generic context.

From-SVN: r180951
2011-11-04 14:52:11 +01:00
Arnaud Charlet
4c31825389 [multiple changes]
2011-11-04  Yannick Moy  <moy@adacore.com>

	* sem_prag.adb: Minor refactoring (renaming of a parameter).

2011-11-04  Robert Dewar  <dewar@adacore.com>

	* atree.ads: Minor reformatting.

2011-11-04  Robert Dewar  <dewar@adacore.com>

	* checks.adb (Atomic_Synchronization_Disabled): Check -gnatd.d
	and -gnatd.e here
	* exp_ch2.adb (Expand_Entity_Reference): Use
	Activate_Atomic_Synchronization
	* exp_ch4.adb (Expand_N_Explicit_Dereference): Use
	Activate_Atomic_Synchronization (Expand_N_Indexed_Compoonent):
	Activate_Atomic_Synchronization (Expand_N_Selected_Component):
	Use Activate_Atomic_Synchronization
	* exp_util.ads, exp_util.adb (Activate_Atomic_Synchronization): New
	procedure.
	* sinfo.ads, sinfo.adb (Atomic_Sync_Required): Can now apply to
	N_Selected_Component node

From-SVN: r180950
2011-11-04 14:48:52 +01:00
Robert Dewar
37765e95f1 sem_prag.adb, [...]: Minor reformatting.
2011-11-04  Robert Dewar  <dewar@adacore.com>

	* sem_prag.adb, atree.ads, prj-env.adb, prj-env.ads: Minor reformatting.

From-SVN: r180949
2011-11-04 14:46:55 +01:00
Arnaud Charlet
8c18a165e2 [multiple changes]
2011-11-04  Yannick Moy  <moy@adacore.com>

	* atree.adb, atree.ads (Set_Original_Node): New set procedure.
	* sem_ch13.adb (Analyze_Aspect_Specifications/Pre_Post_Aspects):
	In ASIS mode, no splitting of aspects between conjuncts.
	(Analyze_Aspect_Specifications/Aspect_Test_Case): Make pragma
	expressions refer to the original aspect expressions through
	the Original_Node link. This is used in semantic analysis for
	ASIS mode, so that the original expression also gets analyzed.
	* sem_prag.adb (Preanalyze_TC_Args,
	Check_Precondition_Postcondition,
	Analyze_Pragma/Pragma_Test_Case): In ASIS mode, for a pragma
	generated from a source aspect, also analyze the original aspect
	expression.
	(Check_Expr_Is_Static_Expression): New procedure
	similar to existing procedure Check_Arg_Is_Static_Expression,
	except called on expression inside pragma.

2011-11-04  Tristan Gingold  <gingold@adacore.com>

	* prj-env.adb, prj-env.ads (Find_Name_In_Path): New function, from
	Find_Project.Try_Path_Name.
	(Find_Project): Use Find_Name_In_Path to implement Try_Path_Name.

2011-11-04  Eric Botcazou  <ebotcazou@adacore.com>

	* s-atocou.ads (Atomic_Counter): Remove redundant pragma Volatile.

2011-11-04  Pascal Obry  <obry@adacore.com>

	* projects.texi: Add short description for qualifiers aggregate
	and aggregate library.

2011-11-04  Matthew Heaney  <heaney@adacore.com>

	* Makefile.rtl, impunit.adb: Added a-cogeso.ad[sb]
	* a-cgaaso.adb: Replaced implementation with instantiation
	of Generic_Sort.
	* a-cogeso.ad[sb] This is the new Ada 2012 unit
	Ada.Containers.Generic_Sort

From-SVN: r180948
2011-11-04 14:45:01 +01:00