2014-07-31  Richard Biener  <rguenther@suse.de>

	* data-streamer.h (streamer_write_data_stream): Declare here,
	renamed from ...
	* lto-streamer.h (lto_output_data_stream): ... this.  Remove.
	* lto-cgraph.c (lto_output_node): Adjust.
	(lto_output_varpool_node): Likewise.
	* data-streamer-out.c (streamer_string_index): Likewise.
	(streamer_write_data_stream, lto_append_block): Move from ...
	* lto-section-out.c (lto_output_data_stream,
	lto_append_block): ... here.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@213317 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/
	* ira.c (insn_contains_asm_1, insn_contains_asm): Delete.
	(compute_regs_asm_clobbered): Use extract_asm_operands instead.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@213318 138bc75d-0d04-0410-961f-82ee72b054a4
Remove dead code in pass_tree_loop_init::execute

2014-07-31  Tom de Vries  <tom@codesourcery.com>

	* tree-ssa-loop.c (pass_tree_loop_init::execute): Remove dead code.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@213319 138bc75d-0d04-0410-961f-82ee72b054a4
2014-07-31  Bingfeng Mei <bmei@broadcom.com>

	PR lto/61868
	* toplev.c (init_random_seed): Move piece of code never called to
	set_random_seed.
	(set_random_seed): see above.
	
	* gcc.dg/pr61868.c: New test.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@213321 138bc75d-0d04-0410-961f-82ee72b054a4
2014-07-31  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch13.adb (Build_Invariant_Procedure): If body of procedure
	is already present, nothing to do.
	* exp_ch3.adb (Build_Component_Invariant_Call): For an access
	component, check whether the access type has an invariant before
	checking the designated type.
	(Build_Record_Invariant_Proc): Change suffix of generated
	name to prevent ambiguity when record type has invariants
	in addition to those of components, and two subprograms are
	constructed. Consistent with handling of array types.
	(Insert_Component_Invariant_Checks): Build invariant procedure
	body when one has not been created yet, in the case of composite
	types that are completions and whose full declarations carry
	invariants.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@213322 138bc75d-0d04-0410-961f-82ee72b054a4
2014-07-31  Marc Glisse  <marc.glisse@inria.fr>

	PR c++/60517
gcc/c/
	* c-typeck.c (c_finish_return): Return 0 instead of the address of
	a local variable.
gcc/cp/
	* typeck.c (maybe_warn_about_returning_address_of_local): Return
	whether it is returning the address of a local variable.
	(check_return_expr): Return 0 instead of the address of a local
	variable.
gcc/c-family/
	* c.opt (-Wreturn-local-addr): Move to common.opt.
gcc/
	* common.opt (-Wreturn-local-addr): Moved from c.opt.
	* gimple-ssa-isolate-paths.c: Include diagnostic-core.h and intl.h.
	(isolate_path): New argument to avoid inserting a trap.
	(find_implicit_erroneous_behaviour): Handle returning the address
	of a local variable.
	(find_explicit_erroneous_behaviour): Likewise.
gcc/testsuite/
	* c-c++-common/addrtmp.c: New file.
	* c-c++-common/uninit-G.c: Adapt.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@213323 138bc75d-0d04-0410-961f-82ee72b054a4
2014-07-31  Robert Dewar  <dewar@adacore.com>

	* sem_ch13.adb: Minor reformatting.

2014-07-31  Ed Schonberg  <schonberg@adacore.com>

	* exp_ch3.adb (Build_Invariant_Checks): If the enclosing record
	is an unchecked_union, warn that invariants will not be checked
	on components that have them.

2014-07-31  Robert Dewar  <dewar@adacore.com>

	* freeze.adb (Freeze_Entity): Check for error of
	Type_Invariant'Class applied to a untagged type.
	* sem_ch6.adb (Analyze_Null_Procedure): Unconditionally rewrite
	as null body, so that we perform error checks even if expansion
	is off.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@213324 138bc75d-0d04-0410-961f-82ee72b054a4
2014-07-31  Robert Dewar  <dewar@adacore.com>

	* exp_ch5.adb, sem_ch3.adb, exp_ch7.adb, exp_util.adb, exp_ch9.adb,
	sem_ch7.adb, checks.adb, s-exctra.adb, exp_ch6.adb, exp_disp.adb,
	exp_dist.adb, sem_ch13.adb, exp_strm.adb, exp_ch3.adb: Minor
	reformatting.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@213325 138bc75d-0d04-0410-961f-82ee72b054a4
2014-07-31  Ed Schonberg  <schonberg@adacore.com>

	* exp_ch3.adb (Expand_Freeze_Record_Type): Do not build an
	invariant procedure for an internally generated subtype that is
	created for an object of a class-wide type.

2014-07-31  Vincent Celier  <celier@adacore.com>

	* prj-nmsc.adb, errutil.adb: Make code similar to Errout.

2014-07-31  Gary Dismukes  <dismukes@adacore.com>

	* gnat_rm.texi, sem_aux.ads, einfo.ads, sem_util.ads, sem_ch6.adb,
	exp_disp.adb: Minor reformatting.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@213326 138bc75d-0d04-0410-961f-82ee72b054a4
2014-07-31  Robert Dewar  <dewar@adacore.com>

	* exp_ch5.adb, freeze.adb, exp_ch3.adb: Minor comment correction.
	* s-arit64.adb: Minor reformatting.

2014-07-31  Robert Dewar  <dewar@adacore.com>

	* gnat1drv.adb (Adjust_Global_Switches): Default for overflow
	checking is enabled except in GNAT_Mode.
	* switch-c.adb (Scan_Front_End_Switches): Implement -gnato0
	(suppress overflow checks).



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@213327 138bc75d-0d04-0410-961f-82ee72b054a4
2014-07-31  Robert Dewar  <dewar@adacore.com>

	* gnat_ugn.texi: Document new switch -gnato0.
	* sem_ch3.ads: Minor reformatting.
	* gnatlink.adb (Process_Args): Compile bind file with -gnato0
	(we do not want overflow checks when incrementing elaboration
	counters).
	* einfo.ads: Minor reformatting.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@213328 138bc75d-0d04-0410-961f-82ee72b054a4
2014-07-31  Robert Dewar  <dewar@adacore.com>

	* bindgen.adb (Gen_Output_File_Ada): Generate pragma Suppress
	(Overflow_Check).
	* gnatlink.adb (Process_Args): Remove generation of -gnato0,
	no longer needed.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@213329 138bc75d-0d04-0410-961f-82ee72b054a4
2014-07-31  Ed Schonberg  <schonberg@adacore.com>

	* sem_util.adb (Has_Preelaborable_Initialization): Check that
	type is tagged before checking whether a user-defined Initialize
	procedure is present.

2014-07-31  Gary Dismukes  <dismukes@adacore.com>

	* a-ngelfu.ads (Sqrt): Augment postcondition.

2014-07-31  Pascal Obry  <obry@adacore.com>

	* prj-nmsc.adb (Check_Library_Attributes): An aggegate library
	directory and ALI directory must be different than all object
	and library directories of aggregated projects.

2014-07-31  Vincent Celier  <celier@adacore.com>

	* prj-pars.adb, prj-conf.ads, prj-conf.adb (Locate_Runtime): Move spec
	to package body, as it is not called from outside. Remove argument
	Project_Tree, no longer used. When runtime cannot be found,
	call Raise_Invalid_Config instead of failing the program.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@213330 138bc75d-0d04-0410-961f-82ee72b054a4
2014-07-31  Pascal Obry  <obry@adacore.com>

	* prj-nmsc.adb: Minor reformatting.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@213331 138bc75d-0d04-0410-961f-82ee72b054a4
2014-07-31  Robert Dewar  <dewar@adacore.com>

	* sem_util.adb, a-ngelfu.ads, prj-nmsc.adb, prj-conf.adb: Minor
	reformatting.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@213332 138bc75d-0d04-0410-961f-82ee72b054a4
2014-07-31  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch5.adb (Analyze_Iterator_Specification): If the domain of
	iteration is an array component that depends on discriminants,
	create an actual subtype for it, because the preanalysis of the
	iterator name does not create actual subtypes of components.

2014-07-31  Hristian Kirtchev  <kirtchev@adacore.com>

	* freeze.adb (Freeze_Expression): Update the loop in charge
	of finding a proper insertion place for freeze nodes to handle
	N_Expression_With_Actions nodes.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@213333 138bc75d-0d04-0410-961f-82ee72b054a4
2014-07-31  Robert Dewar  <dewar@adacore.com>

	* prj-nmsc.adb: Minor reformatting.

2014-07-31  Bob Duff  <duff@adacore.com>

	* s-tasdeb.adb (System.Tasking.Debug): Remove
	all usage of the secondary stack from this package.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@213334 138bc75d-0d04-0410-961f-82ee72b054a4
2014-07-31  Robert Dewar  <dewar@adacore.com>

	* checks.adb (Enable_Overflow_Check): More precise setting of
	Do_Overflow_Check flag for division.

2014-07-31  Eric Botcazou  <ebotcazou@adacore.com>

	* exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Reject packed
	array types with implementation type.

2014-07-31  Hristian Kirtchev  <kirtchev@adacore.com>

	* sem_ch10.adb (Process_State): Remove local variable Name. Add
	local variable Decl. Partially declare an abstract state by
	generating an entity and storing it in the state declaration.
	* sem_prag.adb (Create_Abstract_State): Fully declare a
	semi-declared abstract state.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@213335 138bc75d-0d04-0410-961f-82ee72b054a4
2014-07-31  Robert Dewar  <dewar@adacore.com>

	* par-ch13.adb (Get_Aspect_Specifications): Set Inside_Depends.
	* par-ch2.adb (P_Pragma): Set Inside_Depends.
	* par-ch4.adb (P_Simple_Expression): Pass Inside_Depends to
	Check_Unary_Plus_Or_Minus.
	* scans.ads (Inside_Depends): New flag.
	* scng.adb (Scan): Pass Inside_Depends to Check_Arrow.
	* style.ads: Add Inside_Depends parameter to Check_Arrow Add
	Inside_Depends parameter to Check_Unary_Plus_Or_Minus.
	* styleg.adb (Check_Arrow): Handle Inside_Depends case.
	(Check_Unary_Plus_Or_Minus): Handle Inside_Depends case.
	* styleg.ads: Add Inside_Depends parameter to Check_Arrow Add.
	Inside_Depends parameter to Check_Unary_Plus_Or_Minus.

2014-07-31  Javier Miranda  <miranda@adacore.com>

	* s-vaflop.adb Move the body of function T_To_G before
	T_To_D. Required for frontend inlining.
	* inline.adb (Has_Excluded_Contract): New subprogram used to
	check if a subprogram inlined by the frontend has contracts
	which cannot be inlined.

2014-07-31  Bob Duff  <duff@adacore.com>

	* s-traceb.adb, s-traceb-hpux.adb, s-traceb-mastop.adb:
	(Call_Chain): Add 1 to number of frames to skip, to account for
	the fact that there's one more frame on the stack.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@213336 138bc75d-0d04-0410-961f-82ee72b054a4
2014-07-31  Robert Dewar  <dewar@adacore.com>

	* inline.adb, s-traceb.adb, s-traceb-hpux.adb, memtrack.adb,
	s-traceb-mastop.adb: Minor reformatting.

2014-07-31  Ed Schonberg  <schonberg@adacore.com>

	* exp_ch3.adb (Expand_Record_Extension): In ASIS_Mode perform
	expansion, to handle properly visibility of selected components
	in instance bodies.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@213337 138bc75d-0d04-0410-961f-82ee72b054a4