Commit Graph

126891 Commits

Author SHA1 Message Date
GCC Administrator
d0da87f378 Daily bump.
From-SVN: r205471
2013-11-28 00:16:30 +00:00
H.J. Lu
362805fc2f Also handle REG_XXX notes in spill_pseudos
PR rtl-optimization/59311
	* dwarf2cfi.c (dwf_regno): Assert reg isn't pseudo register.
	* lra-spills.c (spill_pseudos): Handle REG_XXX notes.

From-SVN: r205468
2013-11-27 15:54:26 -08:00
Jakub Jelinek
e7bd1de1d4 re PR c/59310 (FAIL: gcc.dg/gomp/openmp-simd-1.c (test for excess errors))
PR c/59310
	* c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
	to p_name before calling c_parser_omp_teams instead of after.
	(c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
	argument.  Remove unused p_name variable.

	* parser.c (cp_parser_omp_target): Call keep_next_level only
	if flag_openmp.

From-SVN: r205467
2013-11-28 00:42:48 +01:00
Jakub Jelinek
e1b6062615 re PR middle-end/57393 (error: definition in block 4 follows the use / internal compiler error: verify_ssa failed)
PR middle-end/57393
	PR tree-optimization/58018
	PR tree-optimization/58131
	* gcc.dg/torture/pr57393-1.c: New test.
	* gcc.dg/torture/pr57393-2.c: New test.
	* gcc.dg/torture/pr57393-3.c: New test.
	* gcc.dg/torture/pr58018.c: New test.
	* gcc.dg/torture/pr58131.c: New test.
	* gfortran.dg/pr57393-1.f90: New test.
	* gfortran.dg/pr57393-2.f90: New test.

From-SVN: r205466
2013-11-28 00:41:56 +01:00
Bill Schmidt
64ae6dd6ba nan_7.f90: Disable for little endian PowerPC.
2013-11-27  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

	* gfortran.dg/nan_7.f90: Disable for little endian PowerPC.

From-SVN: r205464
2013-11-27 23:36:22 +00:00
Uros Bizjak
a3458d2231 op-4.h: Update from glibc.
* soft-fp/op-4.h: Update from glibc.

From-SVN: r205462
2013-11-27 22:57:52 +01:00
Eric Botcazou
35af99b462 var-tracking.c (track_expr_p): Do not track declarations for parts of tracked parameters.
* var-tracking.c (track_expr_p): Do not track declarations for parts
	of tracked parameters.
	(add_stores): Do not track values for tracked parameters passed in
	multiple locations.
	(vt_get_decl_and_offset): Handle PARALLEL.
	(vt_add_function_parameter): Handle parameters with incoming PARALLEL.

From-SVN: r205461
2013-11-27 21:16:21 +00:00
Jeff Law
fa788bb403 tree-ssa-threadupdate.c (thread_through_all_blocks): Do not clobber the loop structure thread_block was unsuccessful.
* tree-ssa-threadupdate.c (thread_through_all_blocks): Do not
	clobber the loop structure thread_block was unsuccessful.  If
	thread_block was unsuccessful, cleanup appropriately.

From-SVN: r205459
2013-11-27 11:47:43 -07:00
Uros Bizjak
df7a98a6c1 re PR target/56788 (_mm_frcz_sd and _mm_frcz_ss ignore their second argument)
PR target/56788
	* gcc.target/i386/xop-frczX.c: New test.


Co-Authored-By: Ganesh Gopalasubramanian <Ganesh.Gopalasubramanian@amd.com>

From-SVN: r205458
2013-11-27 19:07:22 +01:00
Jakub Jelinek
30f5fc6a42 re PR tree-optimization/59014 (wrong code at -Os and above on x86_64-linux-gnu)
PR tree-optimization/59014
	* gcc.c-torture/execute/pr59014-2.c: New test.

From-SVN: r205454
2013-11-27 18:03:27 +01:00
Chen Liqin
e18a9b0997 * config/score/score.h (REG_CLASS_FROM_LETTER): Delete.
From-SVN: r205453
2013-11-27 09:49:21 -07:00
Bernd Edlinger
b3ecff82d7 2013-11-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
reverted r205398 on request: Remove parameter keep_aligning from
	get_inner_reference.

From-SVN: r205452
2013-11-27 16:33:01 +00:00
Vladimir Makarov
36db5f3000 re PR rtl-optimization/57410 (ICE: in emit_spill_move, at lra-constraints.c:863 with -fpeel-loops and uninitialised variable)
2013-11-27  Vladimir Makarov  <vmakarov@redhat.com>

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

From-SVN: r205451
2013-11-27 16:30:48 +00:00
Rainer Orth
0fe530b6f0 Fix ext/random/hypergeometric_distribution/operators/values.cc on Solaris 9
* testsuite/ext/random/hypergeometric_distribution/operators/values.cc:
	Use dg-require-cmath instead.

From-SVN: r205450
2013-11-27 16:15:35 +00:00
Paolo Carlini
6f831b6df7 re PR c++/58647 (ICE with function pointer)
/cp
2013-11-27  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/58647
	* semantics.c (cxx_eval_constant_expression, [COMPONENT_REF]):
	Handle function COMPONENT_REFs.

/testsuite
2013-11-27  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/58647
	* g++.dg/parse/crash66.C: New.

From-SVN: r205449
2013-11-27 15:55:18 +00:00
Kenneth Zadeck
2e25208425 c90-const-expr-8.c: Look for overflow on INT_MIN % -1.
2013-11-27  Kenneth Zadeck  <zadeck@naturalbridge.com>

	* gcc.dg/c90-const-expr-8.c: Look for overflow on INT_MIN % -1.
	* gcc.dg/c99-const-expr-8.c: Look for overflow on INT_MIN % -1.

2013-11-27  Kenneth Zadeck  <zadeck@naturalbridge.com>

	* fold-const.c
	(int_const_binop_1): Make INT_MIN % -1 return 0 with the overflow
	bit set.

From-SVN: r205448
2013-11-27 15:42:02 +00:00
Richard Biener
e9287a41df re PR middle-end/58723 (ICE in lto_output_edge, at lto-cgraph.c:300 for OpenMP's simd reduction)
2013-11-27  Richard Biener  <rguenther@suse.de>

	PR middle-end/58723
	* cgraphbuild.c (build_cgraph_edges): Do not build edges
	for internal calls.
	(rebuild_cgraph_edges): Likewise.
	* ipa-inline-analysis.c (estimate_function_body_sizes):
	Skip internal calls.
	* tree-inline.c (estimate_num_insns): Estimate size of internal
	calls as 0.
	(gimple_expand_calls_inline): Do not try inline-expanding
	internal calls.
	* lto-streamer-in.c (input_cfg): Stream loop safelen,
	force_vect and simduid.
	(input_struct_function_base): Stream has_force_vect_loops
	and has_simduid_loops.
	(input_function): Adjust.
	* lto-streamer-out.c (output_cfg): Stream loop safelen,
	force_vect and simduid.
	(output_struct_function_base): Stream has_force_vect_loops
	and has_simduid_loops.

From-SVN: r205447
2013-11-27 15:18:23 +00:00
Rainer Orth
3745a526d6 Fix ext/random/hypergeometric_distribution/operators/values.cc on Solaris 9
* testsuite/ext/random/hypergeometric_distribution/operators/values.cc
	(test01): Wrap in _GLIBCXX_USE_C99_MATH_TR1.

From-SVN: r205446
2013-11-27 15:15:23 +00:00
Kai Tietz
9fc023b767 winnt.c (i386_pe_section_type_flags): Use const pointer cast.
* config/i386/winnt.c (i386_pe_section_type_flags): Use const
	pointer cast.

From-SVN: r205445
2013-11-27 14:25:51 +01:00
Kugan Vivekanandarajah
30b8f78b72 tm.texi.in (TARGET_HAS_NO_HW_DIVIDE): Define.
2013-11-27  Kugan Vivekanandarajah  <kuganv@linaro.org>

	gcc/
	* doc/tm.texi.in (TARGET_HAS_NO_HW_DIVIDE): Define.
	* doc/tm.texi (TARGET_HAS_NO_HW_DIVIDE): Regenerate.

	libgcc/
	* libgcc2.c (__udivmoddi4): Define new implementation when
	TARGET_HAS_NO_HW_DIVIDE is defined, for processors without any
	divide instructions.

From-SVN: r205444
2013-11-27 13:17:05 +01:00
Marek Polacek
536da97c4e re PR sanitizer/59306 (ICE with -fsanitize=null: gimple check: expected gimple_call(error_mark), have gimple_assign(addr_expr) in gimple_call_arg)
PR sanitizer/59306
	* ubsan.c (instrument_null): Use gimple_store_p/gimple_assign_load_p
	instead of walk_gimple_op.
	(ubsan_pass): Adjust.  Call instrument_null only if SANITIZE_NULL.
testsuite/
	* g++.dg/ubsan/pr59306.C: New test.

From-SVN: r205443
2013-11-27 11:40:22 +00:00
Aldy Hernandez
0136f8f03a cgraph.h (enum cgraph_simd_clone_arg_type): New.
* cgraph.h (enum cgraph_simd_clone_arg_type): New.
	(struct cgraph_simd_clone_arg, struct cgraph_simd_clone): New.
	(struct cgraph_node): Add simdclone and simd_clones fields.
	* config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen,
	ix86_simd_clone_adjust, ix86_simd_clone_usable): New functions.
	(TARGET_SIMD_CLONE_COMPUTE_VECSIZE_AND_SIMDLEN,
	TARGET_SIMD_CLONE_ADJUST, TARGET_SIMD_CLONE_USABLE): Define.
	* doc/tm.texi.in (TARGET_SIMD_CLONE_COMPUTE_VECSIZE_AND_SIMDLEN,
	TARGET_SIMD_CLONE_ADJUST, TARGET_SIMD_CLONE_USABLE): Add.
	* doc/tm.texi: Regenerated.
	* ggc.h (ggc_alloc_cleared_simd_clone_stat): New function.
	* ipa-cp.c (determine_versionability): Fail if "omp declare simd"
	attribute is present.
	* omp-low.c: Include pretty-print.h, ipa-prop.h and tree-eh.h.
	(simd_clone_vector_of_formal_parm_types): New function.
	(simd_clone_struct_alloc, simd_clone_struct_copy,
	simd_clone_vector_of_formal_parm_types, simd_clone_clauses_extract,
	simd_clone_compute_base_data_type, simd_clone_mangle,
	simd_clone_create, simd_clone_adjust_return_type,
	create_tmp_simd_array, simd_clone_adjust_argument_types,
	simd_clone_init_simd_arrays): New functions.
	(struct modify_stmt_info): New type.
	(ipa_simd_modify_stmt_ops, ipa_simd_modify_function_body,
	simd_clone_adjust, expand_simd_clones, ipa_omp_simd_clone): New
	functions.
	(pass_data_omp_simd_clone): New variable.
	(pass_omp_simd_clone): New class.
	(make_pass_omp_simd_clone): New function.
	* passes.def (pass_omp_simd_clone): New.
	* target.def (TARGET_SIMD_CLONE_COMPUTE_VECSIZE_AND_SIMDLEN,
	TARGET_SIMD_CLONE_ADJUST, TARGET_SIMD_CLONE_USABLE): New target
	hooks.
	* target.h (struct cgraph_node, struct cgraph_simd_node): Declare.
	* tree-core.h (OMP_CLAUSE_LINEAR_VARIABLE_STRIDE): Document.
	* tree.h (OMP_CLAUSE_LINEAR_VARIABLE_STRIDE): Define.
	* tree-pass.h (make_pass_omp_simd_clone): New prototype.
	* tree-vect-data-refs.c: Include cgraph.h.
	(vect_analyze_data_refs): Inline by hand find_data_references_in_loop
	and find_data_references_in_bb, if find_data_references_in_stmt
	fails, still allow calls to #pragma omp declare simd functions
	in #pragma omp simd loops unless they contain data references among
	the call arguments or in lhs.
	* tree-vect-loop.c (vect_determine_vectorization_factor): Handle
	calls with no lhs.
	(vect_transform_loop): Allow NULL STMT_VINFO_VECTYPE for calls without
	lhs.
	* tree-vectorizer.h (enum stmt_vec_info_type): Add
	call_simd_clone_vec_info_type.
	(struct _stmt_vec_info): Add simd_clone_fndecl field.
	(STMT_VINFO_SIMD_CLONE_FNDECL): Define.
	* tree-vect-stmts.c: Include tree-ssa-loop.h,
	tree-scalar-evolution.h and cgraph.h.
	(vectorizable_call): Handle calls without lhs.  Assert
	!stmt_can_throw_internal instead of failing for it.  Don't update
	EH stuff.
	(struct simd_call_arg_info): New.
	(vectorizable_simd_clone_call): New function.
	(vect_transform_stmt): Call it.
	(vect_analyze_stmt): Likewise.  Allow NULL STMT_VINFO_VECTYPE for
	calls without lhs.
	* ipa-prop.c (ipa_add_new_function): Only call ipa_analyze_node
	if cgraph_function_with_gimple_body_p is true.
c/
	* c-decl.c (c_builtin_function_ext_scope): Avoid binding if
	external_scope is NULL.
cp/
	* semantics.c (finish_omp_clauses): For #pragma omp declare simd
	linear clause step call maybe_constant_value.
testsuite/
	* g++.dg/gomp/declare-simd-1.C (f38): Make sure
	simdlen is a power of two.
	* gcc.dg/gomp/simd-clones-2.c: Compile on all targets.
	Remove -msse2.  Adjust regexps for name mangling changes.
	* gcc.dg/gomp/simd-clones-3.c: Likewise.
	* gcc.dg/vect/vect-simd-clone-1.c: New test.
	* gcc.dg/vect/vect-simd-clone-2.c: New test.
	* gcc.dg/vect/vect-simd-clone-3.c: New test.
	* gcc.dg/vect/vect-simd-clone-4.c: New test.
	* gcc.dg/vect/vect-simd-clone-5.c: New test.
	* gcc.dg/vect/vect-simd-clone-6.c: New test.
	* gcc.dg/vect/vect-simd-clone-7.c: New test.
	* gcc.dg/vect/vect-simd-clone-8.c: New test.
	* gcc.dg/vect/vect-simd-clone-9.c: New test.
	* gcc.dg/vect/vect-simd-clone-10.c: New test.
	* gcc.dg/vect/vect-simd-clone-10.h: New file.
	* gcc.dg/vect/vect-simd-clone-10a.c: New file.
	* gcc.dg/vect/vect-simd-clone-11.c: New test.

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

From-SVN: r205442
2013-11-27 12:20:06 +01:00
Rainer Orth
a7d4a96bf7 Properly set ld_library_path in cilk-plus tests
* gcc.dg/cilk-plus/cilk-plus.exp: Append to ld_library_path.
	Call set_ld_library_path_env_vars.
	* g++.dg/cilk-plus/cilk-plus.exp: Likewise.

From-SVN: r205441
2013-11-27 10:16:43 +00:00
Tom de Vries
241b71bb88 Handle vector increment/decrement in build_unary_op
2013-11-27  Tom de Vries  <tom@codesourcery.com>
	    Marc Glisse  <marc.glisse@inria.fr>

	PR c++/59032
	* c-typeck.c (build_unary_op): Allow vector increment and decrement.

	* typeck.c (cp_build_unary_op): Allow vector increment and decrement.

	* c-c++-common/pr59032.c: New testcase.

Co-Authored-By: Marc Glisse <marc.glisse@inria.fr>

From-SVN: r205439
2013-11-27 10:00:48 +00:00
Tom de Vries
e934916c86 Don't create out-of-bounds BIT_FIELD_REF.
2013-11-27  Tom de Vries  <tom@codesourcery.com>
	    Marc Glisse  <marc.glisse@inria.fr>

	PR middle-end/59037
	* semantics.c (cxx_fold_indirect_ref): Don't create out-of-bounds
	BIT_FIELD_REF.

	* fold-const.c (fold_indirect_ref_1): Don't create out-of-bounds
	BIT_FIELD_REF.
	* gimple-fold.c (gimple_fold_indirect_ref): Same.
	* tree-cfg.c (verify_expr): Give error if BIT_FIELD_REF is
	out-of-bounds.

	* c-c++-common/pr59037.c: New testcase.

Co-Authored-By: Marc Glisse <marc.glisse@inria.fr>

From-SVN: r205438
2013-11-27 10:00:30 +00:00
Eric Botcazou
ca85aa4ae6 re PR middle-end/59138 (possible packed struct miscompile)
PR middle-end/59138
	* expr.c (emit_group_store): Don't write past the end of the structure.
	(store_bit_field): Fix formatting.

From-SVN: r205436
2013-11-27 09:17:23 +00:00
Richard Biener
43ad66aa4a re PR tree-optimization/59288 (ICE in get_initial_def_for_induction)
2013-11-27  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/59288
	* tree-vect-loop.c (get_initial_def_for_induction): Do not
	re-analyze the PHI but use STMT_VINFO_LOOP_PHI_EVOLUTION_PART.

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

From-SVN: r205434
2013-11-27 08:50:15 +00:00
Marek Polacek
14a981b922 ubsan.c (ubsan_type_descriptor): If varpool_get_node returns NULL for a decl, recreate that decl.
2013-11-27  Marek Polacek  <polacek@redhat.com>

	* ubsan.c (ubsan_type_descriptor): If varpool_get_node returns NULL
	for a decl, recreate that decl.  Save into the hash table VAR_DECLs
	rather than ADDR_EXPRs.
testsuite/
	* c-c++-common/ubsan/undefined-1.c: New test.

From-SVN: r205433
2013-11-27 08:02:48 +00:00
Alexander Ivchenko
199299e8e5 hpux.h (TARGET_LIBC_HAS_FUNCTION): Fix typo.
* config/ia64/hpux.h (TARGET_LIBC_HAS_FUNCTION): Fix typo.

From-SVN: r205432
2013-11-27 07:57:04 +00:00
David Malcolm
9b95612ecf Fix checking of gimple types
* gengtype.c (struct seen_tag): New.
	(already_seen_tag): New.
	(mark_tag_as_seen): New.
	(walk_subclasses): Support having multiple subclasses using the
	same tag by tracking which tags have already been seen, and using
	this to avoid adding duplicate cases to the "switch" statement.
	The call to already_seen_tag introduces an O(N^2) when running
	gengtype on N, the number of tags, due to the repeated linear
	search, but currently max(N) is relatively small (the number of
	GSS codes, which is 26).
	(walk_type): Pass in a seen_tag for use by the walk_subclasses
	recursion.

	* gimple.def (GIMPLE_OMP_ATOMIC_STORE, GIMPLE_OMP_RETURN): Rename
	underlying GSS values for these codes (from GSS_OMP_ATOMIC_STORE to
	GSS_OMP_ATOMIC_STORE_LAYOUT) to make clear that although
	GIMPLE_OMP_RETURN happens to share the data layout of
	GIMPLE_OMP_ATOMIC_STORE, they are not otherwise related.
	(GIMPLE_OMP_PARALLEL, GIMPLE_OMP_TARGET): Likewise, rename
	underlying GSS value from GSS_OMP_PARALLEL to
	GSS_OMP_PARALLEL_LAYOUT to make clear that these gimple codes are
	not directly related; they merely share in-memory layout.
	(GIMPLE_OMP_SINGLE, GIMPLE_OMP_TEAMS): Likewise, rename GSS values
	for these two codes from GSS_OMP_SINGLE to GSS_OMP_SINGLE_LAYOUT.

	* gsstruct.def (GSS_OMP_PARALLEL, gimple_statement_omp_parallel):
	Rename to...
	(GSS_OMP_PARALLEL_LAYOUT, gimple_statement_omp_parallel_layout):
	...these.
	(GSS_OMP_SINGLE, gimple_statement_omp_single): Rename to...
	(GSS_OMP_SINGLE_LAYOUT, gimple_statement_omp_single_layout):
	...these.
	(GSS_OMP_ATOMIC_STORE, gimple_statement_omp_atomic_store): Rename
	to...
	(GSS_OMP_ATOMIC_STORE_LAYOUT, gimple_statement_omp_atomic_store):
	...these.

	* gimple.h (gimple_statement_resx): New subclass of
	gimple_statement_eh_ctrl, with the invariant that
	stmt->code == GIMPLE_RESX.
	(gimple_statement_eh_dispatch): New subclass of
	gimple_statement_eh_ctrl, with the invariant that
	stmt->code == GIMPLE_EH_DISPATH.

	(gimple_statement_omp_parallel): The existing class expressed
	a layout (GSS_OMP_PARALLEL), but the codes with that layout
	are not all related, so it makes more sense for this class to
	express a *code* (GIMPLE_OMP_PARALLEL).  GSS_OMP_PARALLEL has
	been renamed to GSS_OMP_PARALLEL_LAYOUT to express this, so
	rename the existing gimple_statement_omp_parallel class to...
	(gimple_statement_omp_parallel_layout): ...this, expressing
	a statement of structure layout GSS_OMP_PARALLEL_LAYOUT.
	(gimple_statement_omp_taskreg): New subclass of
	gimple_statement_omp_parallel_layout, expressing the invariant
	that the code is one of GIMPLE_OMP_PARALLEL or GIMPLE_OMP_TASK,
	as used by the various gimple_omp_taskreg_ accessors.
	(gimple_statement_omp_parallel): Reintroduce this class, this time
	as a subclass of gimple_statement_omp_taskreg to express the
	invariant stmt->code == GIMPLE_OMP_PARALLEL.
	(gimple_statement_omp_target) New class, subclassing
	gimple_statement_omp_parallel_layout, to express the invariant
	stmt->code == GIMPLE_OMP_TARGET.
	(gimple_statement_omp_task): Update to inherit from
	gimple_statement_omp_taskreg rather than
	gimple_statement_omp_parallel.

	(gimple_statement_omp_single): Rename to...
	(gimple_statement_omp_single_layout): ...this, expressing the
	invariant that the layout is GSS_OMP_SINGLE_LAYOUT.
	(gimple_statement_omp_single): ...and reintroduce this name as
	a subclass of gimple_statement_omp_single_layout, expressing
	the invariant that code == GIMPLE_OMP_SINGLE.
	(gimple_statement_omp_teams): New class, subclassing
	gimple_statement_omp_single_layout, for the code GIMPLE_OMP_TEAMS.

	(gimple_statement_omp_atomic_store): Rename to...
	(gimple_statement_omp_atomic_store_layout): ...this, expressing
	the invariant that the layout is GSS_OMP_ATOMIC_STORE_LAYOUT.
	(gimple_statement_omp_atomic_store): ...and reintroduce this
	name as a subclass of gimple_statement_omp_atomic_store_layout
	with code == GIMPLE_OMP_ATOMIC_STORE.
	(gimple_statement_omp_return): New class, subclassing
	gimple_statement_omp_atomic_store_layout for the code
	GIMPLE_OMP_RETURN.

	(is_a_helper <gimple_statement_eh_ctrl>::test): Delete.
	(is_a_helper <gimple_statement_resx>::test): New.
	(is_a_helper <gimple_statement_eh_dispatch>::test): New.
	(is_a_helper <gimple_statement_omp_atomic_store>::test): Only
	check for GIMPLE_OMP_ATOMIC_STORE, not for GIMPLE_OMP_RETURN.
	(is_a_helper <gimple_statement_omp_return>::test): New.
	(is_a_helper <gimple_statement_omp_taskreg>::test): New.
	(is_a_helper <gimple_statement_omp_parallel>::test): Only check
	for GIMPLE_OMP_PARALLEL, not for GIMPLE_OMP_TASK or
	GIMPLE_OMP_TARGET.
	(is_a_helper <gimple_statement_omp_target>::test): New.
	(is_a_helper <gimple_statement_omp_single>::test): Only check
	for GIMPLE_OMP_SINGLE, not for GIMPLE_OMP_TEAMS.
	(is_a_helper <gimple_statement_omp_teams>::test): New.

	(is_a_helper <const gimple_statement_eh_ctrl>::test): Delete.
	(is_a_helper <const gimple_statement_resx>::test): New.
	(is_a_helper <const gimple_statement_eh_dispatch>::test): New.
	(is_a_helper <const gimple_statement_omp_atomic_store>::test): Only
	check for GIMPLE_OMP_ATOMIC_STORE, not for GIMPLE_OMP_RETURN.
	(is_a_helper <const gimple_statement_omp_return>::test): New.
	(is_a_helper <const gimple_statement_omp_taskreg>::test): New.
	(is_a_helper <const gimple_statement_omp_parallel>::test): Only
	check for GIMPLE_OMP_PARALLEL, not for GIMPLE_OMP_TASK or
	GIMPLE_OMP_TARGET.
	(is_a_helper <const gimple_statement_omp_target>::test): New.
	(is_a_helper <const gimple_statement_omp_single>::test): Only
	check for GIMPLE_OMP_SINGLE, not for GIMPLE_OMP_TEAMS.
	(is_a_helper <const gimple_statement_omp_teams>::test): New.

	(gimple_omp_return_set_lhs, gimple_omp_return_lhs,
	gimple_omp_return_lhs_ptr): Replace bogus downcasts to
	gimple_statement_omp_atomic_store with downcasts to
	gimple_statement_omp_return, thus requiring that the code be
	GIMPLE_OMP_RETURN.
	(gimple_resx_region, gimple_resx_set_region): Replace bogus
	downcasts to gimple_statement_eh_ctrl with downcasts to
	gimple_statement_resx, thus requiring that the code be
	GIMPLE_RESX.
	(gimple_eh_dispatch_region, gimple_eh_dispatch_set_region):
	Replace bogus downcasts to const gimple_statement_eh_ctrl with
	downcasts to gimple_statement_eh_dispatch, thus requiring that
	the code be GIMPLE_EH_DISPATCH.
	(gimple_omp_taskreg_clauses, gimple_omp_taskreg_clauses_ptr)
	gimple_omp_taskreg_set_clauses, gimple_omp_taskreg_child_fn,
	gimple_omp_taskreg_child_fn_ptr, gimple_omp_taskreg_set_child_fn,
	gimple_omp_taskreg_data_arg, gimple_omp_taskreg_data_arg_ptr,
	gimple_omp_taskreg_set_data_arg): Replace bogus downcasts to
	gimple_statement_omp_parallel with downcasts to
	gimple_statement_omp_taskreg, thus requiring that the code be
	either GIMPLE_OMP_PARALLEL or GIMPLE_OMP_TASK.
	(gimple_omp_target_clauses, gimple_omp_target_clauses_ptr
	gimple_omp_target_set_clauses, gimple_omp_target_child_fn
	gimple_omp_target_child_fn_ptr, gimple_omp_target_set_child_fn
	gimple_omp_target_data_arg, gimple_omp_target_data_arg_ptr
	gimple_omp_target_set_data_arg): Replace bogus downcasts to
	gimple_statement_omp_parallel with downcasts to
	gimple_statement_omp_target, thus requiring that the code be
	GIMPLE_OMP_TARGET.
	(gimple_omp_teams_clauses, gimple_omp_teams_clauses_ptr
	gimple_omp_teams_set_clauses): Replace bogus downcasts to
	gimple_statement_omp_single with downcasts to
	gimple_statement_omp_teams, thus requiring that the code be
	GIMPLE_OMP_TEAMS.

	* gimple.c (gimple_build_resx): Fix bogus as_a<> to use
	gimple_statement_resx.
	(gimple_build_eh_dispatch): Fix bogus as_a<> to use
	gimple_statement_eh_dispatch.

From-SVN: r205428
2013-11-27 02:26:25 +00:00
Ian Lance Taylor
815ca4d336 libgo: Update to current Go library.
From-SVN: r205426
2013-11-27 01:05:38 +00:00
GCC Administrator
40a373f1d5 Daily bump.
From-SVN: r205425
2013-11-27 00:17:09 +00:00
Ian Lance Taylor
763d87526f runtime: Fix handling of surrogate pairs in string([]rune).
From-SVN: r205422
2013-11-26 23:27:29 +00:00
Jakub Jelinek
b168a8dfcc re PR tree-optimization/59014 (wrong code at -Os and above on x86_64-linux-gnu)
PR tree-optimization/59014
	* tree-vrp.c (register_edge_assert_for_1): Don't look
	through conversions from non-integral types or through
	narrowing conversions.

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

From-SVN: r205417
2013-11-26 22:29:30 +01:00
Jakub Jelinek
70ec86ee18 re PR target/59229 (ICE in ix86_expand_set_or_movmem)
PR target/59229
	* config/i386/i386.c (device_alg): Fix up formatting.
	(ix86_expand_set_or_movmem): Handle max_size < epilogue_size_needed
	similarly to count && count < epilogue_size_needed.  Fix up
	comment typo.
	* builtins.c (determine_block_size): Fix comment typo.

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

From-SVN: r205416
2013-11-26 22:28:26 +01:00
Jakub Jelinek
13a5b41c7d re PR sanitizer/59258 (ubsan: ICE(segfault): stack-buffer-overflow with -fsanitize=undefined)
PR sanitizer/59258
	* ubsan.c (ubsan_source_location): Don't add any location
	to ADDR_EXPR in the ctor.  Revert 2013-11-22 change.
	(ubsan_create_data): Strip block info from LOC.

From-SVN: r205415
2013-11-26 22:27:19 +01:00
Jakub Jelinek
1f2541577e re PR middle-end/59273 (ICE in expand_expr_real_2, at expr.c:9188 on alpha)
PR middle-end/59273
	* tree-vect-generic.c (optimize_vector_constructor): Don't optimize
	if there isn't optab handler for the corresponding vector PLUS_EXPR.

From-SVN: r205414
2013-11-26 21:55:39 +01:00
Jakub Jelinek
9e3de74cdf re PR rtl-optimization/59166 (ICE in simplify_subreg, at simplify-rtx.c:5901 on valid code (at -O1 and above with -g enabled))
PR rtl-optimization/59166
	* ira.c (find_moveable_pseudos): Use DF_REF_REAL_LOC instead of
	DF_REF_LOC in validate_change call.
	(split_live_ranges_for_shrink_wrap): Likewise.

	* gcc.dg/torture/pr59166.c: New test.

From-SVN: r205413
2013-11-26 21:54:37 +01:00
Jakub Jelinek
5999f07fba re PR c++/58874 ([c++11] ICE with OpenMP reduction declaration and -std=c++11)
PR c++/58874
	* parser.c (cp_parser_late_parsing_for_member): For OpenMP UDRs
	pass 2 instead of 0 to finish_function.

	* g++.dg/gomp/pr58874.C: New test.

From-SVN: r205412
2013-11-26 21:39:56 +01:00
Jakub Jelinek
4ceffa27ee re PR middle-end/59150 (ICE: in expand_one_var, at cfgexpand.c:1242 with -fopenmp)
PR middle-end/59150
	* omp-low.c (lower_rec_input_clause): For reduction with placeholder
	of references to constant size types in simd loops, defer emitting
	initializer for the new_var, emit it later on only if not using
	SIMD arrays for it.

	* g++.dg/gomp/pr59150.C: New test.

From-SVN: r205411
2013-11-26 21:38:59 +01:00
Jakub Jelinek
01dde9b0e9 re PR middle-end/59152 (ICE: loop 2's latch does not have an edge to its header with -fopenmp -fipa-pure-const)
PR middle-end/59152
	* omp-low.c (expand_omp_for_static_chunk): Don't set loop->latch
	for the inner loop if collapse_bb is non-NULL.
	(expand_omp_simd): Use cont_bb rather than e->dest as latch.

	* c-c++-common/gomp/pr59152.c: New test.

From-SVN: r205410
2013-11-26 21:38:10 +01:00
Uros Bizjak
da719a9f8e openmp-simd-1.c: Cleanup original tree dump.
* gcc.dg/gomp/openmp-simd-1.c: Cleanup original tree dump.
	* gcc.dg/gomp/openmp-simd-2.c: Ditto.
	* g++.dg/gomp/openmp-simd-1.C: Ditto.
	* g++.dg/gomp/openmp-simd-2.C: Ditto.
	* gfortran.dg/c_loc_test_22.f90: Ditto.
	* gcc.dg/tree-ssa/attr-alias-2.c: Cleanup optimized tree dump.
	* gcc.dg/tree-ssa/isolate-5.c: Ditto.
	* gcc.dg/tree-ssa/pr57361.c: Cleanup dse1 tree dump.
	* gcc.dg/vect/vect-124.c: Cleanup vect tree dump.
	* gcc.dg/pr57518.c: Cleanup ira rtl dump.
	* gcc.dg/tree-prof/cold_partition_label.c: Cleanup saved temps.

From-SVN: r205408
2013-11-26 20:37:01 +01:00
Bernd Edlinger
4f01bee519 2013-11-26 Bernd Edlinger <bernd.edlinger@hotmail.de>
revised the ChangeLog from r205398:
	moved ada changes from gcc/ChangeLog to gcc/ada/Changelog

From-SVN: r205407
2013-11-26 19:00:51 +00:00
Ian Lance Taylor
304cfd9a7b compiler: If type defined as type, forward hash/equal functions.
Fixes http://golang.org/issue/6789 .

From-SVN: r205404
2013-11-26 18:09:09 +00:00
Bernd Edlinger
08af82b017 Remove parameter keep_aligning from get_inner_reference.
2013-11-26  Bernd Edlinger  <bernd.edlinger@hotmail.de>

        Remove parameter keep_aligning from get_inner_reference.
        * tree.h (get_inner_reference): Adjust header.
        * expr.c (get_inner_reference): Remove parameter keep_aligning.
        (get_bit_range, expand_assignment,
        expand_expr_addr_expr_1, expand_expr_real_1): Adjust.
        * asan.c (instrument_derefs): Adjust.
        * builtins.c (get_object_alignment_2): Adjust. Remove handling of
        VIEW_CONVERT_EXPR.
        * cfgexpand.c (expand_debug_expr): Adjust.
        * dbxout.c (dbxout_expand_expr): Adjust.
        * dwarf2out.c (loc_list_for_address_of_addr_expr_of_indirect_ref,
        loc_list_from_tree, fortran_common): Adjust.
        * fold-const.c (optimize_bit_field_compare,
        decode_field_reference, fold_unary_loc, fold_comparison,
        split_address_to_core_and_offset): Adjust.
        * gimple-ssa-strength-reduction.c (slsr_process_ref): Adjust.
        * simplifx-rtx.c (delegitimize_mem_from_attrs): Adjust.
        * tree-affine.c (tree_to_aff_combination,
        get_inner_reference_aff): Adjust.
        * tree-data-ref.c (split_constant_offset_1,
        dr_analyze_innermost): Adjust.
        * tree-vect-data-refs.c (vect_check_gather,
        vect_analyze_data_refs): Adjust.
        * tree-scalar-evolution.c (interpret_rhs_expr): Adjust.
        * tree-ssa-loop-ivopts.c (may_be_unaligned_p,
        split_address_cost): Adjust.
        * tsan.c (instrument_expr): Adjust.
        * ada/gcc-interface/decl.c (elaborate_expression_1): Adjust.
        * ada/gcc-interface/trans.c (Attribute_to_gnu): Adjust.
        * ada/gcc-interface/utils2.c (build_unary_op): Adjust.
        * config/mips/mips.c (r10k_safe_mem_expr_p): Adjust.

From-SVN: r205398
2013-11-26 16:58:40 +00:00
Yufeng Zhang
97c34bdbe2 arm.c (arm_legitimize_address): Check xop1 is not a constant immediate before force_reg.
gcc/

	* config/arm/arm.c (arm_legitimize_address): Check xop1 is not
	a constant immediate before force_reg.

gcc/testsuite/

	* gcc.target/arm/20131120.c: New test.

From-SVN: r205397
2013-11-26 16:36:14 +00:00
Richard Biener
635bfae029 re PR tree-optimization/59245 (ICE on valid code at -O3 on x86_64-linux-gnu in set_value_range, at tree-vrp.c:443)
2013-11-26  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/59245
	* tree-vrp.c (set_value_range): Assert that we don't have
	overflowed constants (but our infinities).
	(set_value_range_to_value): Drop all overflow flags.
	(vrp_visit_phi_node): Likewise.
	(vrp_visit_assignment_or_call): Use set_value_range_to_value
	to set a constant range.

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

From-SVN: r205395
2013-11-26 15:14:52 +00:00
Kyrylo Tkachov
a866fa46ea re PR target/59290 ([ARM] regression on negdi-2.c (big-endian))
[gcc/]
2013-11-26  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

	PR target/59290
	* config/arm/arm.md (*zextendsidi_negsi): New pattern.
	* config/arm/arm.c (arm_new_rtx_costs): Initialise cost correctly
	for zero_extend case.

[gcc/testsuite/]
2013-11-26  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

	PR target/59290
	* gcc.target/arm/negdi-2.c: Scan more general register names.

From-SVN: r205394
2013-11-26 15:06:06 +00:00
H.J. Lu
40f213e6f5 Add -fuse-ld=bfd/-fuse-ld=gold support to exec-tool.in
PR bootstrap/55552
	* configure.ac (install_gold_as_default): New.  Set to yes for
	--disable-ld or --enable-gold=default.
	(gcc_cv_ld_gold_srcdir): New.
	(gcc_cv_ld): Also check in-tree gold if install_gold_as_default
	is yes.
	(ORIGINAL_LD_BFD_FOR_TARGET): New AC_SUBST.
	(ORIGINAL_LD_GOLD_FOR_TARGET): Likewise.
	* configure: Regenerated.

	* exec-tool.in (ORIGINAL_LD_BFD_FOR_TARGET): New variable.
	(ORIGINAL_LD_GOLD_FOR_TARGET): Likewise.
	(original) [collect-ld && -fuse-ld=bfd]: Set to
	$ORIGINAL_LD_BFD_FOR_TARGET.
	(original) [collect-ld && -fuse-ld=gold]: Set to
	$ORIGINAL_LD_GOLD_FOR_TARGET.
	(dir) [collect-ld && ../gold/ld-new]: Set to gold.
	(fast_install) [collect-ld && ../gold/ld-new]: Set to yes.

From-SVN: r205392
2013-11-26 05:31:25 -08:00
Terry Guo
84c44566f3 arm.c (require_pic_register): Handle high pic base register for thumb-1.
gcc/ChangeLog
2013-11-26  Terry Guo  <terry.guo@arm.com>

	* config/arm/arm.c (require_pic_register): Handle high pic base
	register for thumb-1.
	(arm_load_pic_register): Also initialize high pic base register.
	* doc/invoke.texi: Update documentation for option -mpic-register.

gcc/testsuite/ChangeLog
2013-11-26  Terry Guo  <terry.guo@arm.com>

	* gcc.target/arm/thumb1-pic-high-reg.c: New case.
	* gcc.target/arm/thumb1-pic-single-base.c: New case.

From-SVN: r205391
2013-11-26 11:58:37 +00:00