Commit Graph

141310 Commits

Author SHA1 Message Date
Gary Dismukes
e83ed69230 exp_ch9.adb (Build_Simple_Entry_Call): Set_Is_Internal on the temporary object used for a by-copy entry parameter...
2015-10-16  Gary Dismukes  <dismukes@adacore.com>

	* exp_ch9.adb (Build_Simple_Entry_Call): Set_Is_Internal on
	the temporary object used for a by-copy entry parameter, to
	ensure that the object doesn't get its No_Initialization flag
	reset later in Default_Initialize_Object. Also, generate the
	assignment of the actual to the temporary in the additional case
	of a scalar out parameter whose type has a Default_Value aspect.
	* exp_ch3.adb: Fix minor typo in comment.

From-SVN: r228879
2015-10-16 14:22:22 +02:00
Arnaud Charlet
f145ece721 [multiple changes]
2015-10-16  Hristian Kirtchev  <kirtchev@adacore.com>

	* exp_util.adb, sem_util.ads, sem_ch6.adb, sem_ch7.adb, sem_ch8.adb:
	Minor reformatting.
	* sem_ch12.adb (Analyze_Formal_Package_Declaration): Set the
	SPARK_Mode from the context.

2015-10-16  Bob Duff  <duff@adacore.com>

	* sem_util.adb (Requires_Transient_Scope):
	If Typ is a generic formal incomplete type, look at the actual
	type. Otherwise, we don't notice that the actual type is tagged,
	has a variant part, etc, causing a mismatch of calling conventions
	between caller and callee.

2015-10-16  Hristian Kirtchev  <kirtchev@adacore.com>

	* einfo.ads: Move the declaration of enumeration
	literal E_Abstract_State above E_Entry.  Update the upper bound
	of subtype Overloadable_Kind.

2015-10-16  Gary Dismukes  <dismukes@adacore.com>

	* exp_attr.adb: Minor editorial changes.

From-SVN: r228878
2015-10-16 14:21:03 +02:00
Aurelio Remonda
6b6254db8a Shrink std::random_shuffle test to pass on simulators
2015-10-16  Aurelio Remonda  <aurelio.remonda@tallertechnologies.com>

	* testsuite/25_algorithms/random_shuffle/moveable.cc: Change variable
	N from const int N = 200000 to const unsigned int N = 10000.
	Delete useless fill_ascending function call.

From-SVN: r228876
2015-10-16 12:12:15 +01:00
Jan Hubicka
6d244704f7 revert: ipa-icf-gimple.c (func_checker::compare_operand): Compare only empty constructors.
Revert:
	* ipa-icf-gimple.c (func_checker::compare_operand): Compare only
	empty constructors.
	* gcc.c-torture/compile/icfmatch.c: Add testcase

From-SVN: r228875
2015-10-16 11:06:14 +00:00
Arnaud Charlet
535a86378e exp_ch5.adb, [...]: Code clean up: remove special handling for .NET and JVM.
2015-10-16  Arnaud Charlet  <charlet@adacore.com>

	* exp_ch5.adb, sem_ch3.adb, frontend.adb, exp_ch7.adb, exp_ch7.ads,
	sem_ch5.adb, sem_type.adb, exp_util.adb, exp_util.ads, comperr.adb,
	exp_attr.adb, sinfo.ads, exp_ch9.adb, make.adb, usage.adb,
	lib-writ.adb, sem_ch9.adb, bindgen.adb, debug.adb, einfo.adb,
	einfo.ads, types.ads, checks.adb, sem_prag.adb, s-tasini.adb,
	rtsfind.ads, freeze.adb, sem_util.adb, sem_util.ads, exp_dbug.adb,
	gnatlink.adb, gnat1drv.adb, targparm.adb, targparm.ads, exp_ch4.adb,
	exp_ch11.adb, repinfo.adb, s-soflin.adb, s-soflin.ads, exp_ch6.adb,
	exp_ch13.adb, sem_mech.adb, sem_ch6.adb, par-prag.adb, exp_disp.adb,
	sem_ch8.adb, exp_disp.ads, snames.adb-tmpl, exp_aggr.adb, sem_eval.adb,
	exp_intr.adb, sem_ch13.adb, snames.ads-tmpl, sem_disp.adb, exp_ch3.adb:
	Code clean up: remove special handling for .NET and JVM.

From-SVN: r228874
2015-10-16 13:01:53 +02:00
Arnaud Charlet
07fbef62d5 sem_ch12.adb: Minor punctuation fix in comment
2015-10-16  Arnaud Charlet  <charlet@adacore.com>

	* sem_ch12.adb: Minor punctuation fix in comment
	* s-rident.ads: Minor consistency fix in comment
	* exp_attr.adb, g-spipat.ads: punctuation fixes in comments.
	* restrict.ads: Style fix in comments.
	* sem_prag.adb: Minor grammar fix in comment

From-SVN: r228873
2015-10-16 13:00:05 +02:00
Arnaud Charlet
e1d458b026 [multiple changes]
2015-10-16  Gary Dismukes  <dismukes@adacore.com>

	* sem_ch12.adb: Minor reformatting/rewording.

2015-10-16  Arnaud Charlet  <charlet@adacore.com>

	* einfo.ads: Minor fix of duplicate words
	* rident.ads: Minor style fix in comment

From-SVN: r228872
2015-10-16 12:56:54 +02:00
Hristian Kirtchev
1af4455aac exp_ch3.adb (Expand_N_Full_Type_Declaration): Do not capture, set and restore the Ghost mode.
2015-10-16  Hristian Kirtchev  <kirtchev@adacore.com>

	* exp_ch3.adb (Expand_N_Full_Type_Declaration): Do not capture,
	set and restore the Ghost mode.
	(Expand_N_Object_Declaration): Do not capture, set and restore the
	Ghost mode.
	(Freeze_Type): Redo the capture and restore of the Ghost mode.
	(Restore_Globals): Removed.
	* exp_ch5.adb (Expand_N_Assignment_Statement): Redo the capture
	and restore of the Ghost mode.
	(Restore_Globals): Removed.
	* exp_ch6.adb (Expand_N_Procedure_Call_Statement):
	Redo the capture and restore of the Ghost mode.
	(Expand_N_Subprogram_Body): Redo the capture, set and restore
	of the Ghost mode.
	(Expand_N_Subprogram_Declaration): Do not
	capture, set and restore the Ghost mode.
	(Restore_Globals): Removed.
	* exp_ch7.adb (Expand_N_Package_Body): Redo the capture, set
	and restore of the Ghost mode.
	(Expand_N_Package_Declaration): Do not capture, set and restore the
	Ghost mode.
	* exp_ch8.adb (Expand_N_Exception_Renaming_Declaration):
	Redo the capture and restore of the Ghost mode.
	(Expand_N_Object_Renaming_Declaration): Redo
	the capture and restore of the Ghost mode.
	(Expand_N_Package_Renaming_Declaration):
	Redo the capture and restore of the Ghost mode.
	(Expand_N_Subprogram_Renaming_Declaration): Redo the capture
	and restore of the Ghost mode.
	* exp_ch11.adb Remove with and use clauses for Ghost.
	(Expand_N_Exception_Declaration): Do not capture, set and restore
	the Ghost mode.
	* exp_disp.adb (Make_DT): Redo the capture and restore of the
	Ghost mode.
	(Restore_Globals): Removed.
	* exp_prag.adb (Expand_Pragma_Check): Do not capture, set
	and restore the Ghost mode.
	(Expand_Pragma_Contract_Cases):
	Redo the capture and restore of the Ghost mode.  Preserve the
	original context of contract cases by setting / resetting the
	In_Assertion_Expr counter.
	(Expand_Pragma_Initial_Condition):
	Redo the capture and restore of the Ghost mode.
	(Expand_Pragma_Loop_Variant): Redo the capture and restore of
	the Ghost mode.
	(Restore_Globals): Removed.
	* exp_util.adb (Make_Predicate_Call): Redo the capture and
	restore of the Ghost mode.
	(Restore_Globals): Removed.
	* freeze.adb (Freeze_Entity): Redo the capture and restore of
	the Ghost mode.
	(Restore_Globals): Removed.
	* ghost.adb (Check_Ghost_Context): Remove the RM reference from
	the error message.
	(Is_OK_Statement): Account for statements
	that appear in assertion expressions.
	(Is_Subject_To_Ghost):
	Moved from spec.
	* ghost.ads (Is_Subject_To_Ghost): Moved to body.
	* rtsfind.ads (Load_RTU): Redo the capture and restore of the
	Ghost mode.
	* sem.adb Add with and use clauses for Ghost.
	(Analyze): Redo
	the capture and restore of the Ghost mode. Set the Ghost mode
	when analyzing a declaration.
	(Do_Analyze): Redo the capture
	and restore of the Ghost mode.
	* sem_ch3.adb (Analyze_Full_Type_Declaration): Do not capture, set
	and restore the Ghost mode.
	(Analyze_Incomplete_Type_Decl):
	Do not capture, set and restore the Ghost mode.
	(Analyze_Number_Declaration): Do not capture, set and restore the
	Ghost mode.
	(Analyze_Object_Declaration): Do not capture, set and
	restore the Ghost mode.
	(Analyze_Private_Extension_Declaration):
	Do not capture, set and restore the Ghost mode.
	(Analyze_Subtype_Declaration): Do not capture, set and restore
	the Ghost mode.
	(Restore_Globals): Removed.
	* sem_ch5.adb (Analyze_Assignment): Redo the capture and restore
	of the Ghost mode.
	(Restore_Globals): Removed.
	* sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration):
	Do not capture, set and restore the Ghost mode.
	(Analyze_Procedure_Call): Redo the capture and restore of the
	Ghost mode.
	(Analyze_Subprogram_Body_Helper): Redo the capture
	and restore of the Ghost mode.	(Analyze_Subprogram_Declaration):
	Do not capture, set and restore the Ghost mode.
	(Restore_Globals): Removed.
	* sem_ch7.adb (Analyze_Package_Body_Helper): Redo the capture and
	restore of the Ghost mode.
	(Analyze_Package_Declaration):
	Do not capture, set and restore the Ghost mode.
	(Analyze_Private_Type_Declaration): Do not capture, set and
	restore the Ghost mode.
	(Restore_Globals): Removed.
	* sem_ch8.adb (Analyze_Exception_Renaming): Do not capture,
	set and restore the Ghost mode.
	(Analyze_Generic_Renaming): Do not capture, set and restore the Ghost
	mode.
	(Analyze_Object_Renaming): Do not capture, set and restore the
	Ghost mode.
	(Analyze_Package_Renaming): Do not capture, set and restore the Ghost
	mode.
	(Analyze_Subprogram_Renaming): Do not capture, set and restore the
	Ghost mode.
	(Restore_Globals): Removed.
	* sem_ch11.adb (Analyze_Exception_Declaration): Do not capture,
	set and restore the Ghost mode.
	* sem_ch12.adb (Analyze_Generic_Package_Declaration):
	Do not capture, set and restore the Ghost mode.
	(Analyze_Generic_Subprogram_Declaration): Do not capture, set
	and restore the Ghost mode.
	* sem_ch13.adb (Build_Invariant_Procedure_Declaration): Redo
	the capture and restore of the Ghost mode.
	* sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part):
	Redo the capture and restore of the Ghost mode.
	(Analyze_External_Property_In_Decl_Part):
	Redo the capture and restore of the Ghost mode.
	(Analyze_Initial_Condition_In_Decl_Part): Redo the
	capture and restore of the Ghost mode.	(Analyze_Pragma):
	Do not capture, set and restore the Ghost mode for Assert.
	Redo the capture and restore of the Ghost mode for Check. Do
	not capture and restore the Ghost mode for Invariant.
	(Analyze_Pre_Post_Condition_In_Decl_Part): Redo the capture and
	restore of the Ghost mode.
	* sem_res.adb (Resolve): Capture, set and restore the Ghost mode
	when resolving a declaration.
	* sem_util.adb (Build_Default_Init_Cond_Procedure_Body):
	Redo the capture and restore of the Ghost mode.
	(Build_Default_Init_Cond_Procedure_Declaration): Redo the capture
	and restore of the Ghost mode.

From-SVN: r228871
2015-10-16 12:54:13 +02:00
Eric Botcazou
f7bad97d63 tree.c (recompute_tree_invariant_for_addr_expr): Assert that the argument is an ADDR_EXPR.
* tree.c (recompute_tree_invariant_for_addr_expr): Assert that the
	argument is an ADDR_EXPR.

From-SVN: r228870
2015-10-16 10:52:46 +00:00
Arnaud Charlet
872dae48e2 [multiple changes]
2015-10-16  Bob Duff  <duff@adacore.com>

	* debug.adb: Document -gnatdQ switch.

2015-10-16  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch12.adb (Analyze_Formal_Subprogram): Implement rule that
	a formal abstract subprogram cannot have a null default: RM 12.6
	(4 1.2).

From-SVN: r228869
2015-10-16 12:51:32 +02:00
Bob Duff
1bc619ef94 sem_util.ads, [...]: Minor comment fixes.
2015-10-16  Bob Duff  <duff@adacore.com>

	* sem_util.ads, sinput.ads, bcheck.adb: Minor comment fixes.

From-SVN: r228868
2015-10-16 12:50:42 +02:00
Arnaud Charlet
dec6b7f1de * MAINTAINERS: Update list of Ada maintainers and email addresses.
From-SVN: r228867
2015-10-16 12:48:32 +02:00
Arnaud Charlet
113522092b [multiple changes]
2015-10-16  Javier Miranda  <miranda@adacore.com>

	* inline.adb (Add_Inlined_Body): Ensure that
	Analyze_Inlined_Bodies will be invoked after completing the
	analysis of the current unit.

2015-10-16  Arnaud Charlet  <charlet@adacore.com>

	* sem_ch13.adb (Adjust_Record_For_Reverse_Bit_Order): Fix error
	message for bad last bit position.
	* sem_ch3.adb, sem_util.adb, sem_util.ads: Minor reformatting.

2015-10-16  Ed Schonberg  <schonberg@adacore.com>

	* exp_ch5.adb (Expand_N_Case_Statement): If expression is
	compile-time known but does not obey a static predicate on
	its type, replace the case statement with a raise statement,
	as with other statically detected constraint violations.

2015-10-16  Bob Duff  <duff@adacore.com>

	* s-traceb.adb, s-traceb.ads, s-traceb-hpux.adb, s-traceb-mastop.adb:
	Reinstate code.
	* opt.ads: Minor typo.

From-SVN: r228866
2015-10-16 12:44:09 +02:00
Ed Schonberg
251b6a477e sem_util.adb (Gather_Components): When gathering components of a nested variant...
2015-10-16  Ed Schonberg  <schonberg@adacore.com>

	* sem_util.adb (Gather_Components): When gathering components
	of a nested variant, the record type used in legality checks is
	the enclosing record type.

From-SVN: r228865
2015-10-16 12:28:37 +02:00
Richard Biener
74e3c26262 gimple-fold.c (gimple_fold_builtin_memory_op): Use gimple_build and get rid of force_gimple_operand_gsi.
2015-10-16  Richard Biener  <rguenther@suse.de>

	* gimple-fold.c (gimple_fold_builtin_memory_op): Use gimple_build
	and get rid of force_gimple_operand_gsi.
	(gimple_fold_builtin_memory_chk): Likewise.
	(gimple_fold_builtin_stxcpy_chk): Likewise.
	(rewrite_to_defined_overflow): Likewise.
	(gimple_convert_to_ptrofftype): New function.
	* gimple-fold.h (gimple_convert_to_ptrofftype): New overload,
	declare.

From-SVN: r228863
2015-10-16 07:52:32 +00:00
Richard Biener
aa00059cff tree-nested.h (build_addr): Adjust prototype.
2015-10-16  Richard Biener  <rguenther@suse.de>

	* tree-nested.h (build_addr): Adjust prototype.
	* tree-nested.c (build_addr): Remove context argument and use
	mark_addressable.
	(get_static_chain): Adjust calls to build_addr.
	(convert_nl_goto_reference): Likewise.
	(convert_tramp_reference_op): Likewise.
	(finalize_nesting_tree_1): Likewise.
	* value-prof.c (gimple_ic): Likewise.
	* gimple-low.c (lower_builtin_setjmp): Likewise.
	* tree-parloops.c (take_address_of): Likewise.
	(create_call_for_reduction_1): Likewise.
	* tree-profile.c (gimple_gen_interval_profiler): Likewise.
	(gimple_gen_ic_func_profiler): Likewise.

	fortran/
	* trans-intrinsic.c (gfc_conv_intrinsic_lib_function): Adjust
	calls to build_addr.
	(gfc_conv_intrinsic_mod): Likewise.
	(gfc_conv_intrinsic_ctime): Likewise.
	(gfc_conv_intrinsic_fdate): Likewise.
	(gfc_conv_intrinsic_ttynam): Likewise.
	(gfc_conv_intrinsic_minmax_char): Likewise.
	(gfc_conv_intrinsic_index_scan_verify): Likewise.
	(gfc_conv_intrinsic_trim): Likewise.

From-SVN: r228862
2015-10-16 07:45:09 +00:00
Paolo Carlini
4856a1f0a1 re PR c++/67926 (Using folding expressions in a constexpr context ice's)
/cp
2015-10-16  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/67926
	* constexpr.c (potential_constant_expression_1): Handle
	UNARY_LEFT_FOLD_EXPR, UNARY_RIGHT_FOLD_EXPR, BINARY_LEFT_FOLD_EXPR,
	BINARY_RIGHT_FOLD_EXPR.

/testsuite
2015-10-16  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/67926
	* g++.dg/cpp1z/fold-ice1.C: New.

From-SVN: r228861
2015-10-16 07:06:11 +00:00
Jan Hubicka
08a7f38fab ipa-icf-gimple.c (func_checker::compare_operand): Compare only empty constructors.
* ipa-icf-gimple.c (func_checker::compare_operand): Compare only
	empty constructors.

From-SVN: r228860
2015-10-16 03:10:27 +00:00
GCC Administrator
498a904fed Daily bump.
From-SVN: r228858
2015-10-16 00:16:12 +00:00
Michael Collison
4f7a569265 2015-09-30 Michael Collison <michael.collison@linaro.org>
Andrew Pinski <andrew.pinski@caviumnetworks.com>

	* match.pd ((x < y) && (x < z) -> x < min (y,z),
	(x > y) and (x > z) -> x > max (y,z))
	* testsuite/gcc.dg/tree-ssa/minmax-loopend.c: New test.


Co-Authored-By: Andrew Pinski <andrew.pinski@caviumnetworks.com>

From-SVN: r228854
2015-10-15 22:21:22 +00:00
Gregor Richards
9418279db6 microblaze musl support
* config/microblaze/linux.h (MUSL_DYNAMIC_LINKER): Define.
	(DYNAMIC_LINKER): Renamed to ...
	(GLIBC_DYNAMIC_LINKER): This.
	(SUBTARGET_EXTRA_SPECS): Use GNU_USER_DYNAMIC_LINKER.


Co-Authored-By: Szabolcs Nagy <szabolcs.nagy@arm.com>

From-SVN: r228850
2015-10-15 19:12:15 +00:00
Peter Bergner
17a44a82ed Fixup ChangeLog entry
From-SVN: r228845
2015-10-15 11:35:40 -05:00
Szabolcs Nagy
750002e0ee mark libstdc++ tests unsupported if they fail with "relocation truncated"
* testsuite/lib/libstdc++.exp (libstdc++-dg-test): Check for
	unsupported compiler output.

From-SVN: r228844
2015-10-15 15:15:37 +00:00
Marek Polacek
261e8f066b tree-ssa-reassoc.c (attempt_builtin_copysign): Call gimple_call_builtin instead of is_gimple_call.
* tree-ssa-reassoc.c (attempt_builtin_copysign): Call
	gimple_call_builtin instead of is_gimple_call.

	* gcc.dg/tree-ssa/reassoc-42.c: New test.

From-SVN: r228843
2015-10-15 13:22:47 +00:00
Richard Biener
7701fc20a0 tree-vect-stmts.c (vect_init_vector): Remove unused vars.
2015-10-15  Richard Biener  <rguenther@suse.de>

	* tree-vect-stmts.c (vect_init_vector): Remove unused vars.

From-SVN: r228842
2015-10-15 12:14:23 +00:00
Richard Biener
0e22bb5ad3 tree-vectorizer.h (vect_get_new_ssa_name): Declare.
2015-10-15  Richard Biener  <rguenther@suse.de>

	* tree-vectorizer.h (vect_get_new_ssa_name): Declare.
	* tree-vect-data-refs.c (vect_get_new_ssa_name): New helper.
	* tree-vect-loop.c (get_initial_def_for_induction): Drop
	use of force_gimple_operand in favor of gimple_build.
	Use vect_get_new_ssa_name.
	* tree-vect-stmts.c (vect_init_vector): Use vect_get_new_ssa_name.
	(vectorizable_mask_load_store): Likewise.
	(vectorizable_call): Likewise.
	(vectorizable_store): Likewise.
	(vectorizable_load): Likewise.
	(vect_get_vec_def_for_stmt_copy): Remove redundant stmt.

From-SVN: r228841
2015-10-15 11:39:09 +00:00
Richard Sandiford
53f3cd25de PR67945: Fix oscillation between pow representations
This patch fixes some fallout from my patch to move the sqrt and cbrt
folding rules to match.pd.  The rules included canonicalisations like:

       sqrt(sqrt(x))->pow(x,1/4)

which in the original code was only ever done at the generic level.
My patch meant that we'd do it whenever we tried to fold a gimple
statement, and eventually it would win over the sincos optimisation
that replaces pow(x,1/4) with sqrt(sqrt(x)).

Following a suggestion from Richard B, the patch adds a new
PROP_gimple_* flag to say whether fp routines have been optimised
for the target.  If so, match.pd should only transform calls to math
functions if the result is actually an optimisation, not just an
IL simplification or canonicalisation.  The question then of course
is: which rules are which?  I've added block comments that describe
the criteria I was using.

A slight wart is that we need to use the cfun global to access
the PROP_gimple_* flag; there's no local function pointer available.

Bootstrapped & regression-tested on x86_64-linux-gnu.  Also tested
on powerc64-linux-gnu.

gcc/
	PR tree-optimization/67945
	* tree-pass.h (PROP_gimple_opt_math): New property flag.
	* generic-match-head.c (canonicalize_math_p): New function.
	* gimple-match-head.c: Include tree-pass.h.
	(canonicalize_math_p): New function.
	* match.pd: Group math built-in rules into simplifications
	and canonicalizations.  Guard the latter with canonicalize_math_p.
	* tree-ssa-math-opts.c (pass_data_cse_sincos): Provide the
	PROP_gimple_opt_math property.

From-SVN: r228840
2015-10-15 09:50:07 +00:00
Marek Polacek
64da3a9a3f re PR tree-optimization/67953 (match.pd: X - (X / Y) * Y wrong on change of sign)
PR tree-optimization/67953
	* match.pd (X - (X / Y) * Y): Don't change signedness of @0.

	* gcc.dg/fold-minus-6.c (fn4): Change the type of A to
	unsigned.
	* gcc.dg/torture/pr67953.c: New test.

From-SVN: r228839
2015-10-15 09:39:35 +00:00
Ilya Enkovich
269ca76f4b re PR other/66887 (trunk/libmpx/mpxrt/mpxrt.c:158: possible performance problem)
libmpx/

	PR other/66887
	* mpxrt/mpxrt.c (read_mpx_status_sig): Remove useless code.

From-SVN: r228838
2015-10-15 09:26:39 +00:00
Jiong Wang
1140d42f76 [AArch64] --with-arch in config.gcc support "."
* config.gcc: Recognize "." in architecture base name for AArch64.

From-SVN: r228837
2015-10-15 09:19:42 +00:00
GCC Administrator
a803b9b30f Daily bump.
From-SVN: r228834
2015-10-15 00:16:12 +00:00
Uros Bizjak
3a1d601a2a mips.h (MIPS_STACK_ALIGN): Implement using ROUND_UP macro.
* config/mips/mips.h (MIPS_STACK_ALIGN): Implement using
	ROUND_UP macro.
	* config/mips/mips.c (mips_setup_incoming_varargs): Use
	ROUND_DOWN to calculate off.
	(mips_gimplify_va_arg_expr): Use ROUND_UP to calculate rsize.
	(mips_emit_probe_stack_range): Use ROUND_DOWN to calculate
	rounded_size.

From-SVN: r228829
2015-10-14 23:52:37 +02:00
Eric Botcazou
903eccd1d5 * gimplify.c (gimplify_addr_expr) <MEM_REF>: New case.
From-SVN: r228828
2015-10-14 21:32:04 +00:00
Peter Bergner
4c1f41e152 htm.md (UNSPEC_HTM_FENCE): New.
* config/rs6000/htm.md (UNSPEC_HTM_FENCE): New.
	(tabort, tabort<wd>c, tabort<wd>ci, tbegin, tcheck, tend,
	trechkpt, treclaim, tsr, ttest): Rename define_insns from this...
	(*tabort, *tabort<wd>c, *tabort<wd>ci, *tbegin, *tcheck, *tend,
	*trechkpt, *treclaim, *tsr, *ttest): ...to this.  Add memory barrier.
	(tabort, tabort<wd>c, tabort<wd>ci, tbegin, tcheck, tend,
	trechkpt, treclaim, tsr, ttest): New define_expands.
	* config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Define
	__TM_FENCE__ for htm.
	* doc/extend.texi: Update documentation for htm builtins.

Co-Authored-By: Torvald Riegel <triegel@redhat.com>

From-SVN: r228827
2015-10-14 16:28:06 -05:00
Uros Bizjak
a409ca75d6 re PR target/67967 (ICE in i386_pe_seh_unwind_emit)
PR target/67967
	* config/i386/i386.c (ix86_emit_save_reg_using_mov): Do not add
	REG_CFA_EXPRESSION to aligned SSE stores.

From-SVN: r228826
2015-10-14 23:18:19 +02:00
Ilya Verbin
3837c6d66f target.c (gomp_map_vars): Initialize tgt->tgt_start and tgt->tgt_end to 0 when mapnum is 0.
libgomp/
	* target.c (gomp_map_vars): Initialize tgt->tgt_start and tgt->tgt_end
	to 0 when mapnum is 0.

Co-Authored-By: Aleksander Ivanushenko <aleksander.ivanushenko@intel.com>

From-SVN: r228825
2015-10-14 18:37:10 +00:00
Jeff Law
41fd0dc650 [PATCH] Fix accounting for num_threaded_edges
* tree-ssa-threadupdate.c (thread_through_all_blocks): Bump
	num_threaded_edges for successful FSM threads too.

From-SVN: r228822
2015-10-14 11:53:46 -06:00
Jeff Law
bb1125df53 [PATCH] Split ssa-dom-thread-2.c into separate files/tests
* gcc.dg/tree-ssa/ssa-dom-thread-2.c: Deleted.  The six functions
	contained within have their own file/test now.
	* gcc.dg/tree-ssa/ssa-dom-thread-2a.c: New test extracted from
	ssa-dom-thread-2.c.  Tighten expected output slightly and comment
	expectations a bit more.
	* gcc.dg/tree-ssa/ssa-dom-thread-2b.c: Likewise.
	* gcc.dg/tree-ssa/ssa-dom-thread-2c.c: Likewise.
	* gcc.dg/tree-ssa/ssa-dom-thread-2d.c: Likewise.
	* gcc.dg/tree-ssa/ssa-dom-thread-2e.c: Likewise.
	* gcc.dg/tree-ssa/ssa-dom-thread-2f.c: Likewise.

From-SVN: r228821
2015-10-14 11:12:40 -06:00
Jeff Law
cb62081c07 [PATCH] [PR testsuite/67959]Minor cleanup for ssa-thread-13.c
PR testsuite/67959
        * gcc.dg/tree-ssa/ssa-thread-13.c: Avoid bitfield assumptions.

From-SVN: r228819
2015-10-14 11:04:04 -06:00
Marek Polacek
0796dee86b reassoc-39.c: Use -g.
* gcc.dg/tree-ssa/reassoc-39.c: Use -g.  Adjust dg-final.
	(f6): New.
	(f7): New.
	(f8): New.
	(f9): New.
	(f10): New.
	(f11): New.
	(f12): New.
	(f13): New.

From-SVN: r228812
2015-10-14 14:08:51 +00:00
Richard Biener
81c4024185 tree-vectorizer.h (vect_is_simple_use): Remove unused parameters.
2015-10-14  Richard Biener  <rguenther@suse.de>

	* tree-vectorizer.h (vect_is_simple_use): Remove unused parameters.
	(vect_is_simple_use_1): Likewise.  Make overload of vect_is_simple_use.
	(vect_get_vec_def_for_operand): Remove unused parameter.
	* tree-vect-loop.c (get_initial_def_for_induction): Adjust.
	(vect_create_epilog_for_reduction): Likewise.
	(vectorizable_reduction): Likewise.
	(vectorizable_live_operation): Likewise.
	* tree-vect-patterns.c (type_conversion_p): Likewise.
	(vect_recog_vector_vector_shift_pattern): Likewise.
	(check_bool_pattern): Likewise.
	* tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
	(vect_analyze_slp_cost_1): Likewise.
	* tree-vect-stmts.c (process_use): Likewise.
	(vect_get_vec_def_for_operand): Do not handle reductions.
	(vect_get_vec_defs): Adjust.
	(vectorizable_mask_load_store): Likewise.
	(vectorizable_call): Likewise.
	(vectorizable_simd_clone_call): Likewise.
	(vect_get_loop_based_defs): Likewise.
	(vectorizable_conversion): Likewise.
	(vectorizable_assignment): Likewise.
	(vectorizable_shift): Likewise.
	(vectorizable_operation): Likewise.
	(vectorizable_store): Likewise.
	(vectorizable_load): Likewise.
	(vect_is_simple_cond): Likewise.
	(vectorizable_condition): Likewise.
	(vect_is_simple_use): Remove unused parameters.
	(vect_is_simple_use_1): Adjust and rename.

From-SVN: r228811
2015-10-14 13:57:09 +00:00
Richard Biener
c3bea07622 re PR tree-optimization/67915 (ICE on valid code at -O2 and -O3 on x86_64-linux-gnu)
2015-10-14  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/67915
	* match.pd: Handle comparisons of addresses of STRING_CSTs.
	* gimplify.c (gimplify_cond_expr): Fold the GIMPLE conds we build.
	* tree-cfgcleanup.c (cleanup_control_expr_graph): Remove GENERIC
	stmt folding in favor of GIMPLE one.

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

From-SVN: r228810
2015-10-14 12:59:15 +00:00
Marek Polacek
0155ad4011 re PR tree-optimization/67815 (Optimize const1 * copysign (const2, y) into copysign (const1 * const2, y) if const1 > 0 or -copysign (const1 * const2, y) if const1 < 0)
PR tree-optimization/67815
	* tree-ssa-reassoc.c (attempt_builtin_copysign): New function.
	(reassociate_bb): Call it.

	* gcc.dg/tree-ssa/reassoc-39.c: New test.
	* gcc.dg/tree-ssa/reassoc-40.c: New test.
	* gcc.dg/tree-ssa/reassoc-41.c: New test.

From-SVN: r228809
2015-10-14 12:54:03 +00:00
Max Ostapenko
d5efd4498a parse.c (decode_statement): Initialize M to MATCH_NO.
2015-10-14  Maxim Ostapenko  <m.ostapenko@partner.samsung.com>

	* parse.c (decode_statement): Initialize M to MATCH_NO.

From-SVN: r228807
2015-10-14 15:06:29 +03:00
Richard Biener
ddf56386c1 tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Reset info at start.
2015-10-14  Richard Biener  <rguenther@suse.de>

	* tree-vect-data-refs.c (vect_enhance_data_refs_alignment):
	Reset info at start.
	(vect_analyze_group_access_1): Add debug print.
	* tree-vect-loop.c (vect_get_single_scalar_iteration_cost): Rename ...
	(vect_compute_single_scalar_iteration_cost): ... to this.
	(vect_analyze_loop_2): Adjust.
	* tree-vect-slp.c (struct _slp_oprnd_info): Move from ...
	* tree-vectorizer.h: ... here.
	(add_stmt_info_to_vec): Remove.
	* tree-vect-stmts.c (record_stmt_cost): Inline add_stmt_info_to_vec.

From-SVN: r228806
2015-10-14 08:32:25 +00:00
Sebastian Huber
ac8a196536 [gomp] Fix build for 32-bit targets with int != int32_t
libgomp/
2015-10-14  Sebastian Huber  <sebastian.huber@embedded-brains.de>

	* fortran.c (omp_get_place_proc_ids_, omp_get_partition_place_nums_):
	Cast to int from int32_t.

From-SVN: r228805
2015-10-14 08:30:52 +00:00
Dominik Vogt
1aa5ba4e22 Fix "#pragma GCC pop_options"
gcc/ChangeLog

	* targhooks.c (default_target_option_pragma_parse): Do not warn if
	called on behalf of "#pragma GCC pop_options".

gcc/testsuite/ChangeLog

	* gcc.dg/pragma-pop_options-1.c: New test.

From-SVN: r228794
2015-10-14 06:53:54 +00:00
GCC Administrator
168d732e0c Daily bump.
From-SVN: r228793
2015-10-14 00:16:12 +00:00
Tom de Vries
a352b71027 Check no unreachable blocks in inverted_post_order_compute
2015-10-14  Tom de Vries  <tom@codesourcery.com>

	* cfganal.c (verify_no_unreachable_blocks): New function.
	(inverted_post_order_compute) [ENABLE_CHECKING]: Call
	verify_no_unreachable_blocks.
	cfganal.h (verify_no_unreachable_blocks): Declare.

From-SVN: r228789
2015-10-13 22:10:45 +00:00
Mikhail Maltsev
179b8d05e9 [PATCH 1/9] ENABLE_CHECKING refactoring
[PATCH 1/9] ENABLE_CHECKING refactoring
gcc/ChangeLog:

2015-10-05  Mikhail Maltsev  <maltsevm@gmail.com>

	* common.opt: Add flag_checking.
	* system.h (CHECKING_P): Define.

libcpp/ChangeLog:

2015-10-05  Mikhail Maltsev  <maltsevm@gmail.com>

	* system.h (CHECKING_P, gcc_checking_assert): Define.

From-SVN: r228787
2015-10-13 15:31:48 -06:00