Commit Graph

133836 Commits

Author SHA1 Message Date
Richard Biener 625a9766c9 builtins.c (fold_builtin_atomic_always_lock_free): Use CONVERT_EXPR_P, CONVERT_EXPR_CODE_P and CASE_CONVERT where approprate.
2014-10-31  Richard Biener  <rguenther@suse.de>

	* builtins.c (fold_builtin_atomic_always_lock_free): Use
	CONVERT_EXPR_P, CONVERT_EXPR_CODE_P and CASE_CONVERT where
	approprate.
	(fold_builtin_expect): Likewise.
	(integer_valued_real_p): Likewise.
	* cfgexpand.c (expand_debug_expr): Likewise.
	* ipa-inline-analysis.c (eliminated_by_inlining_prob): Likewise.
	(find_foldable_builtin_expect): Likewise.
	* trans-mem.c (thread_private_new_memory): Likewise.
	* tree-affine.c (aff_combination_expand): Likewise.
	* tree-data-ref.c (initialize_matrix_A): Likewise.
	* tree-inline.c (copy_bb): Likewise.
	* tree-pretty-print.c (dump_function_name): Likewise.
	(print_call_name): Likewise.
	* tree-ssa-forwprop.c (constant_pointer_difference): Likewise.
	* tree-ssa-math-opts.c (find_bswap_or_nop_1): Likewise.
	* tree-vect-generic.c (expand_vector_operations_1): Likewise.
	* tree-vect-patterns.c (vect_handle_widen_op_by_const): Likewise.
	(vect_recog_widen_mult_pattern): Likewise.
	(vect_operation_fits_smaller_type): Likewise.
	* tree-vrp.c (find_assert_locations_1): Likewise.
	* tree-ssa-dom.c (initialize_hash_element): Canonicalize
	converts to NOP_EXPR.

From-SVN: r216982
2014-10-31 16:26:43 +00:00
Arnaud Charlet c5cec2fe71 2014-10-31 Hristian Kirtchev <kirtchev@adacore.com>
* aspects.adb Add an entry for aspect Ghost in table
	Canonical_Aspect.
	* aspects.ads Add an entry for aspect Ghost in tables
	Aspect_Argument, Aspect_Delay, Aspect_Id, Aspect_Names and
	Implementation_Defined_Aspect.
	* einfo.adb: Flags 277 and 278 are now in use.
	(Is_Checked_Ghost_Entity): New routine.
	(Is_Ghost_Entity): Removed.
	(Is_Ghost_Subprogram): Removed.
	(Is_Ignored_Ghost_Entity): New routine.
	(Set_Is_Checked_Ghost_Entity): New routine.
	(Set_Is_Ignored_Ghost_Entity): New routine.
	(Write_Entity_Flags): Output flags Is_Checked_Ghost_Entity and
	Is_Ignored_Ghost_Entity.
	* einfo.ads: Add new flags Is_Checked_Ghost_Entity
	and Is_Ignored_Ghost_Entity along with usage in nodes.
	(Is_Checked_Ghost_Entity): New routine and pragma Inline.
	(Is_Ghost_Entity): Removed along with synthesized flag
	description and usage in nodes.
	(Is_Ghost_Subprogram): Removed along with synthesized flag description
	and usage in nodes.
	(Is_Ignored_Ghost_Entity): New routine and pragma Inline.
	(Set_Is_Checked_Ghost_Entity): New routine and pragma Inline.
	(Set_Is_Ignored_Ghost_Entity): New routine and pragma Inline.
	* freeze.adb (Freeze_Entity): A Ghost type cannot be effectively
	volatile.
	* par-prag.adb Pragma Ghost does not need special handling by
	the parser.
	* repinfo.adb (List_Mechanisms): Remove the entry for convention Ghost.
	* sem_attr.adb (Analyze_Access_Attribute): Remove obsolete check.
	* sem_ch3.adb (Analyze_Full_Type_Declaration): Mark
	the type as Ghost when its enclosing context is Ghost.
	(Analyze_Incomplete_Type_Decl): Mark the type as Ghost when
	its enclosing context is Ghost.
	(Analyze_Number_Declaration): Mark the number as Ghost when its
	enclosing context is Ghost.
	(Analyze_Object_Declaration): Mark the object as Ghost when its
	enclosing context is Ghost. Verify the Ghost policy between
	initial declaration and completion of a deferred constant.
	(Analyze_Object_Contract): A Ghost variable cannot be effectively
	volatile, imported or exported.
	(Build_Derived_Record_Type): Mark a type extension as Ghost when it
	implements a Ghost interface.
	(Build_Record_Type): Inherit volatility and "ghostness" from
	the parent type.
	(Check_Completion): A Ghost entity declared
	in a non-Ghost package does not require completion in a body.
	(Implements_Ghost_Interface): New routine.
	(Process_Full_View): Inherit "ghostness" from the partial view. Verify
	the Ghost policy between the partial and full views. Verify the
	completion of a Ghost type extension.
	* sem_ch4.adb (Check_Ghost_Subprogram_Call): Removed.
	* sem_ch5.adb (Analyze_Assignment): Analyze the left hand side first.
	* sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): Mark
	the subprogram as Ghost when its enclosing context is Ghost.
	(Analyze_Generic_Subprogram_Body): Mark the generic body as Ghost
	when its enclosing context is Ghost. Verify the Ghost policy
	between the spec and body.
	(Analyze_Subprogram_Body_Helper): Mark the body as Ghost when its
	enclosing context is Ghost. Verify the Ghost policy between the spec
	and body.
	(Check_Conformance): A Ghost subprogram profile and a non-Ghost
	subprogram profile are not subtype conformant.
	(Convention_Of): Removed.
	* sem_ch7.adb (Analyze_Package_Body_Helper): Inherit the
	"ghostness" from the spec. Verify the Ghost policy between
	the spec and body.
	(Analyze_Private_Type_Declaration): Mark the type as Ghost when its
	enclosing context is Ghost.
	(Requires_Completion_In_Body): New routine.
	(Unit_Requires_Body): Use Requires_Completion_In_Body.
	(Unit_Requires_Body_Info): Rename formal parameter P to Pack_Id, update
	comment on usage and all uses of P in the body. Use
	Requires_Completion_In_Body.
	* sem_ch7.ads (Unit_Requires_Body): Rename formal parameter P
	to Pack_Id, update comment on usage and all uses of P in the body.
	* sem_ch8.adb (Analyze_Exception_Renaming): Inherit the "ghostness"
	from the renamed excention.
	(Analyze_Generic_Renaming): Inherit the "ghostness" from the
	renamed generic subprogram.
	(Analyze_Object_Renaming): Inherit the "ghostness" from the renamed
	object.
	(Analyze_Package_Renaming): Inherit the "ghostness" from the
	renamed package.
	(Analyze_Subprogram_Renaming): Inherit the "ghostness" from the
	renamed subprogram.
	* sem_ch11.adb (Analyze_Exception_Declaration): Mark an exception
	as Ghost when its enclosing context is Ghost.
	* sem_ch12.adb (Analyze_Generic_Package_Declaration,
	Analyze_Generic_Subprogram_Declaration): Mark an exception as
	Ghost when its enclosing context is Ghost.
	(Preanalyze_Actuals): Remove obsolete check.
	* sem_ch13.adb (Analyze_Aspect_Specifications): Add processing
	for aspect Ghost.
	(Check_Aspect_At_Freeze_Point): Aspects
	Depends and Global do no need special checking at freeze point.
	(Insert_After_SPARK_Mode): Update comment on usage.
	* sem_mech.adb (Set_Mechanisms): Remove the entry for convention Ghost.
	* sem_prag.adb Add an entry for pragma Ghost in table Sig_Flags.
	(Analyze_Abstract_State): Update the grammar of the pragma. Add
	formal parameter Pack_Id along with comment on usage. Mark an
	abstract state as Ghost when its enclosing context is Ghost. Add
	processing for option Ghost.
	(Analyze_Constituent): Verify
	that a Ghost abstract state is refined by Ghost constituents.
	(Analyze_Pragma): "Ghost" is now a valid policy. Add checks
	related to the use and placement of Check_Policy Ghost. Add
	processing for pragma Ghost.
	(Check_Ghost_Constituent): New routine.
	(Is_Valid_Assertion_Kind): "Ghost" is now a valid assertion.
	(Process_Convention): Remove obsolete check.
	(Set_Convention_From_Pragma): Remove the processing for convention
	Ghost.
	* sem_res.adb (Check_Ghost_Context): New routine.
	(Resolve_Call): Verify that a reference to a Ghost entity appears in a
	suitable context. Verify the Ghost polity between point of declaration
	and point of use.
	(Resolve_Entity_Name): Verify that a reference to
	a Ghost entity appears in a suitable context. Verify the Ghost
	polity between point of declaration and point of use.
	* sem_util.adb (Check_Ghost_Completion): New routine.
	(Check_Ghost_Derivation): New routine.
	(Incomplete_Or_Partial_View): New routine.
	(Incomplete_Or_Private_View): Removed.
	(Is_Ghost_Entity): New routine.
	(Is_Ghost_Statement_Or_Pragma): New routine.
	(Is_Subject_To_Ghost): New routine.
	(Policy_In_Effect): New routine.
	(Set_Is_Ghost_Entity): New routine.
	(Within_Ghost_Scope): New routine.
	* sem_util.ads (Check_Ghost_Completion): New routine.
	(Check_Ghost_Derivation): New routine.
	(Incomplete_Or_Partial_View): New routine.
	(Incomplete_Or_Private_View): Removed.
	(Is_Ghost_Entity): New routine.
	(Is_Ghost_Statement_Or_Pragma): New routine.
	(Is_Subject_To_Ghost): New routine.
	(Policy_In_Effect): New routine.
	(Set_Is_Ghost_Entity): New routine.
	(Within_Ghost_Scope): New routine.
	* snames.adb-tmpl (Get_Convention_Id): Remove the entry for
	convention Ghost.
	(Get_Convention_Name): Remove the entry for convention Ghost.
	* snames.ads-tmpl Remove the convention id for Ghost. Add a
	pragma id for Ghost.

2014-10-31  Sergey Rybin  <rybin@adacore.com frybin>

	* gnat_ugn.texi: Add description of --RTS option for ASIS tools.

From-SVN: r216981
2014-10-31 15:49:31 +01:00
Olivier Hainque 51a054353d Makefile.in (arm-vxworks): Update target pairs.
2014-10-31  Olivier Hainque  <hainque@adacore.com> 
                                                   
	* gcc-interface/Makefile.in (arm-vxworks): Update target pairs.

From-SVN: r216980
2014-10-31 15:33:16 +01:00
Arnaud Charlet 4528392f3b [multiple changes]
2014-10-31  Vincent Celier  <celier@adacore.com>

	* prj-part.adb (Parse_Single_Project): Call Set_Display_Name_Of.
	* prj-proc.adb (Recursive_Process): Call Display_Name_Of to
	get the project Display_Name.
	* prj-tree.adb (Display_Name_Of): New function
	(Set_Display_Name_Of): New procedure.
	(Create_Project): Call Set_Display_Name_Of.
	* prj-tree.ads (Display_Name_Of): New function.
	(Set_Display_Name_Of): New procedure.
	(Project_Node_Record): New component Display_Name.
	(Project_Name_And_Node): Remove component Display_Name.
	* prj-conf.adb (Parse_Project_And_Apply_Config): Use the full
	Config_File_Path as the Config_File_Name, not just its simple
	name.

2014-10-31  Thomas Quinot  <quinot@adacore.com>

	* get_scos.adb: Minor reformatting.

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

	* exp_ch5.adb (Expand_Formal_Container_Loop): Create block to
	capture declaration for cursor to prevent spurious errors when
	several formal iterators that use the same cursoe name appear
	in the same context.

From-SVN: r216978
2014-10-31 15:28:08 +01:00
Richard Biener 32dfd2e033 genmatch.c (expr::gen_transform): Use NOP_EXPRs instead of CONVERT_EXPRs in generated code.
2014-10-31  Richard Biener  <rguenther@suse.de>

	* genmatch.c (expr::gen_transform): Use NOP_EXPRs instead of
	CONVERT_EXPRs in generated code.
	(dt_simplify::gen): Likewise.

From-SVN: r216977
2014-10-31 13:43:53 +00:00
Evgeny Stupachenko 9a2db19920 re PR target/63534 (Bootstrap failure on x86_64/i686-linux)
gcc/

	PR target/63534
	* config/i386/i386.c (ix86_init_pic_reg): Emit SET_GOT to
	REAL_PIC_OFFSET_TABLE_REGNUM for mcount profiling.
	(ix86_save_reg): Save REAL_PIC_OFFSET_TABLE_REGNUM when profiling
	using mcount in 32bit PIC mode.
	(ix86_elim_entry_set_got): New.
	(ix86_expand_prologue): For the mcount profiling emit new SET_GOT
	in PROLOGUE, delete initial if possible.

gcc/testsuite/

	PR target/63534
	* gcc.target/i386/mcount_pic.c: New.

From-SVN: r216975
2014-10-31 13:30:06 +00:00
Evgeny Stupachenko bae83890e2 * gcc.target/i386/pr23098.c: Remove xfail.
From-SVN: r216974
2014-10-31 13:23:46 +00:00
Eric Botcazou 5970b0793c ipa-inline.c (want_inline_small_function_p): Fix typo and formatting.
* ipa-inline.c (want_inline_small_function_p): Fix typo and formatting.
	(want_inline_function_to_all_callers_p): Fix formatting and simplify.

From-SVN: r216973
2014-10-31 12:32:05 +00:00
Eric Botcazou 3012e0ab0b * gnat.dg/opt42.ad[sb]: New test.
From-SVN: r216972
2014-10-31 12:18:30 +00:00
Thomas Preud'homme c6e3a93120 re PR tree-optimization/63259 (Detecting byteswap sequence)
2014-10-31  Thomas Preud'homme  <thomas.preudhomme@arm.com>

    gcc/
    PR tree-optimization/63259
    * tree-ssa-math-opts.c (bswap_replace): Replace expression by a
    rotation left if it is a 16 bit byte swap.
    (pass_optimize_bswap::execute): Also consider bswap in LROTATE_EXPR
    and RROTATE_EXPR statements if it is a byte rotation.

    gcc/testsuite/
    PR tree-optimization/63259
    * optimize-bswapsi-1.c (swap32_f): New bswap pass test.
    * optimize-bswaphi-1.c: Drop useless SIType definition and fix typo in
    following comment.

From-SVN: r216971
2014-10-31 11:55:07 +00:00
Vincent Celier aed24d9d74 prj-proc.adb (Recursive_Process): Make sure that the project display name is never No_Name.
2014-10-31  Vincent Celier  <celier@adacore.com>

	* prj-proc.adb (Recursive_Process): Make sure that the project
	display name is never No_Name.

From-SVN: r216970
2014-10-31 12:47:11 +01:00
Arnaud Charlet 715e529d70 [multiple changes]
2014-10-31  Ed Schonberg  <schonberg@adacore.com>

	* sem_attr.adb (Analyze_Access_Attribute): Do not emit error
	message if reference does not come from source, as in the case
	for the controlling argument of a dispatching call. Error is
	diagnosed when call is resolved.
	* sem_ch4.adb (Complete_Object_Operation); Fix incorrect RM
	reference in error message.
	* sem_res.adb (Check_Prefixed_Call): ditto.

2014-10-31  Yannick Moy  <moy@adacore.com>

	* sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings): Do not
	suppress checks when pragma Restrictions (No_Exception) is used in
	CodePeer or GNATprove mode.

2014-10-31  Yannick Moy  <moy@adacore.com>

	* gnat1drv.adb (Adjust_Global_Switches): Explicitly mark language
	checks as not suppressed in GNATprove mode.

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

	* sem_elab.adb (Check_Elab_Call): Nothing to check if call is
	being pre-analyzed.
	* sem_ch3.adb (Complete_Private_Subtype): If all rep items of full
	view are those of the base, use rep_item chain of partial view,
	which may include aspects.
	* sem_cat.adb (Is_non_Remote_Access_Type): Use underlying type
	of base type, to handle properly declared subtypes.

From-SVN: r216969
2014-10-31 12:43:09 +01:00
Arnaud Charlet 88305f176d [multiple changes]
2014-10-31  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch12.adb (Analyze_Generic_Package_Declaration): If there
	is a default storage pool, add a corresponding aspect to the
	generic unit, to be used at the point of instantiation.
	(Analyze_Package_Instantiation): If generic unit has aspect
	specifications, propagate them to instance. If instance has a
	Default_Storage_Pool aspect, make sure that it overrides the
	one that may be inherited from the generic.

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

	* prj-attr.adb: Minor removal of attributes of package Linker
	that have never been used and never been documented.
	* projects.texi: Add documentation for attribute Runtime.
	* prj-nmsc.adb (Check_Configuration): Do not report a warning
	for unknown compilers when the project is externally built.

From-SVN: r216968
2014-10-31 12:39:37 +01:00
Arnaud Charlet 4a68b7c4d5 [multiple changes]
2014-10-31  Vasiliy Fofanov  <fofanov@adacore.com>

	* prj-conf.adb (Do_Autoconf): Refactor the code so that empty
	Normalized_Pathname doesn't inhibit the custom Selected_Target
	value.
	* prj-conf.adb (Parse_Project_And_Apply_Config): Make sure that
	Automatically_Generated is correctly set after the first call
	to Process_Project_And_Apply_Config and not modified after the
	second call, if any.

2014-10-31  Yannick Moy  <moy@adacore.com>

	* Makefile.rtl, gnat_rm.texi, impunit.adb: Add mention of new library
	files.
	* a-cfinve.adb, a-cfinve.ads: New unit for formal indefinite
	vectors, suitable for use in client SPARK code, also more
	efficient than the standard vectors.
	* a-coboho.adb, a-coboho.ads New unit for bounded holders, that
	are used to define formal indefinite vectors in terms of formal
	definite ones.
	* a-cofove.adb, a-cofove.ads: Simplification of the API of formal
	definite vectors, similar to the API of the new indefinite ones. A
	new formal parameter of the generic unit called Bounded allows
	to define growable vectors that use dynamic allocation.

From-SVN: r216967
2014-10-31 12:37:44 +01:00
Arnaud Charlet 527f5eb67a [multiple changes]
2014-10-31  Vincent Celier  <celier@adacore.com>

	* prj-conf.adb (Look_For_Project_Paths): New procedure
	(Parse_Project_And_Apply_Config): Initially, parse the project
	files ignoring missing withs. If there are missing withs, extend
	the project path with directories rooted at the compiler roots,
	including directories rooted at the runtime roots, if there are
	non default runtimes, in the PATH orser.
	* prj-env.adb (Initialize_Default_Project_Path): Do not add
	any directory from the prefix if the target is "-".
	* prj-part.adb (Parse): Initialize the tables, as Parse may be
	call several times by gprbuild.
	* prj.adb (Update_Ignore_Missing_With): New procedure.

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

	* sem_aux.adb (First_Stored_Discriminant,
	Has_Completely_Hidden_Discriminant): When scanning the list of
	discriminants to locate possibly hidden (inherited) discriminants,
	ignore itypes that may appear in the entity list, when an access
	discriminants is constrained by an access attribute reference.

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

	* freeze.adb (Freeze_Record_Type): Add missing
	check to verify that all the primitives of an interface type
	are abstract or null procedures.

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

	* s-os_lib.adb, s-os_lib.ads: New function Non_Blocking_Spawn that
	redirects standard output and standard error to two different files.

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

	* makeutl.ads: Minor comment fix.

2014-10-31  Arnaud Charlet  <charlet@adacore.com>

	* system-linux-x86_64.ads, system-mingw-x86_64.ads (Word_Size,
	Memory_Size): Use Standard'Word_Size so that the value can be changed
	via a target configuration file.

From-SVN: r216965
2014-10-31 12:22:19 +01:00
Jakub Jelinek 14258928a3 Makefile.def (libcc1): Remove bootstrap=true;.
* Makefile.def (libcc1): Remove bootstrap=true;.
	* Makefile.in: Regenerated.

From-SVN: r216964
2014-10-31 12:19:13 +01:00
Arnaud Charlet 62a64085ba [multiple changes]
2014-10-31  Eric Botcazou  <ebotcazou@adacore.com>

	* exp_ch4.adb: Minor tweak.

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

	* sem_ch12.adb (Analyze_Package_Instantiation): Do not inline with
	back-end inlining.
	(Must_Inline_Subp): Delete.
	* sem_util.ads, sem_util.adb (Must_Inline): Likewise.

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

	* freeze.adb (Freeze_Entity): A default_pool does not apply to
	internal access types generated for 'access references.
	* sem_prag (Analyze_Pragma, case Default_Pool): If the name is
	not null it must designate a variable.

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

	* inline.adb: Minor reformatting.

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

	* sem_ch3.adb (Build_Derived_Private_Type): If the derived
	type has access discriminants, create itype references for their
	anonymous types, so that they are elaborated before the generated
	bodies for the primitive operations of the type.

2014-10-31  Tristan Gingold  <gingold@adacore.com>

	* prj-conf.adb (Locate_Runtime): Remove procedure.

From-SVN: r216963
2014-10-31 12:18:47 +01:00
Jakub Jelinek c288810f69 re PR sanitizer/63697 (-fsanitize=undefined doesn't detect some subtraction overflows)
PR sanitizer/63697
	* tree-vrp.c (simplify_internal_call_using_ranges): For subcode ==
	MINUS_EXPR, check overflow on vr0.min - vr1.max and vr0.max - vr1.min
	instead of vr0.min - vr1.min and vr0.max - vr1.max.

	* c-c++-common/ubsan/overflow-sub-3.c: New test.

From-SVN: r216962
2014-10-31 12:18:13 +01:00
Arnaud Charlet 6fd52b7893 [multiple changes]
2014-10-31  Eric Botcazou  <ebotcazou@adacore.com>

	* inline.adb (Has_Excluded_Declaration): With back-end inlining,
	only return true for nested packages.
	(Cannot_Inline): Issue errors/warnings whatever the optimization level
	for back-end inlining and remove assertion.

2014-10-31  Sergey Rybin  <rybin@adacore.com frybin>

	* table.adb (Tree_Read, Tree_Write): Use parentheses to specify
	the desired order of '*' and '/' operations to avoid overflow.

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

	* exp_ch6.adb (Do_Inline): Remove unreachable code.
	(Do_Inline_Always): Likewise.

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

	* prj-nmsc.adb (Check_Stand_Alone_Library): Change error message
	when library has no Ada interfaces and Library_Standalone is
	declared.

From-SVN: r216961
2014-10-31 12:15:51 +01:00
Arnaud Charlet d99565f84f [multiple changes]
2014-10-31  Arnaud Charlet  <charlet@adacore.com>

	* sem_ch13.adb (Check_Constant_Address_Clause): Disable checks
	on address clauses in CodePeer mode.

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

	* inline.adb (Expand_Inlined_Call): Do not skip
	inlining of calls to subprogram renamings.

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

	* sem_res.adb (Resolve_Entity_Name): Account for
	the case where the immediate parent of a reference to an entity
	is a parameter association.

From-SVN: r216960
2014-10-31 12:12:14 +01:00
Arnaud Charlet 2ef051289c [multiple changes]
2014-10-31  Eric Botcazou  <ebotcazou@adacore.com>

	* inline.adb (Check_And_Split_Unconstrained_Function): Do not
	test for the presence of nested subprograms.

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

	* aspects.ads, aspects.adb: Add aspect Default_Storage_Pool.
	* sem_ch13.adb (Analyze_One_Aspect): Generate pragma for aspect
	Default_Storage_Pool.

From-SVN: r216959
2014-10-31 12:09:39 +01:00
Arnaud Charlet 88f7d2d148 [multiple changes]
2014-10-31  Eric Botcazou  <ebotcazou@adacore.com>

	* sem_ch6.adb: Remove obsolete comment.

2014-10-31  Olivier Hainque  <hainque@adacore.com>

	* g-allein.ads: bind vec_sld for pixels to 8hi vsldoi instead
	of 4si, as pixels are short.

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

	* sem_res.adb (Resolve_Call): Do not reject a call to a protected
	operation in the spec of a protected type, when the call appears
	in a pre/postcondition for another protected operation.

2014-10-31  Tristan Gingold  <gingold@adacore.com>

	* prj-conf.adb: Locate_Runtime: Always search the runtime in
	project path.

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

	* inline.adb (Check_Package_Body_For_Inlining): Adjust previous
	change to use correct idiom for back-end inlining.

From-SVN: r216958
2014-10-31 12:07:40 +01:00
Jan-Benedict Glaw 1335a8caf7 configure.ac: Update comment.
2014-10-31  Jan-Benedict Glaw  <jbglaw@lug-owl.de>

./	* configure.ac: Update comment.
	* configure: Regenerate.

./contrib	* config-list.mk: Don't build Go for certain targets.

From-SVN: r216957
2014-10-31 11:03:57 +00:00
Arnaud Charlet 71ff3d1820 [multiple changes]
2014-10-31  Ed Schonberg  <schonberg@adacore.com>

	* freeze.adb (Freeze_Record_Type): Do not check component size
	if its type is generic.

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

	* gnat_rm.texi: Fix documentation w.r.t -gnatw.w.

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

	* sem_ch4.adb (Try_Container_Indexing): Use Check_Implicit_Dereference.
	* sem_util.adb (Check_Implicit_Dereference): a)	Handle generalized
	indexing as well as function calls.  b)  If the context is a
	selected component and whe are in an instance, remove entity from
	selector name to force resolution of the node, so that explicit
	dereferences can be generated in the instance if they were in
	the generic unit.

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

	* inline.adb (Back_End_Cannot_Inline): Delete.
	(Add_Inlined_Subprogram): Do not call it.

From-SVN: r216956
2014-10-31 12:02:55 +01:00
Arnaud Charlet 26b043e041 [multiple changes]
2014-10-31  Ed Schonberg  <schonberg@adacore.com>

	* exp_ch3.ads (Make_Tag_Assignment): New function, used to
	re-initialize the tag in a tagged object declaration with
	initial value.
	* exp_ch3.adb (Expand_N_Object_Declaration): Use
	Make_Tag_Assignment to simplify code for a tagged object
	declaration.
	* exp_ch13.adb (Expand_Freeze_Entity): Analyze freeze actions
	for the freeze node of an object.
	* freeze.adb (Check_Address_Clause): Use Make_Tag_Assignment when
	needed to extend Freeze_Actions for a tagged object declaration.

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

	* gnat_ugn.texi: Further minor improvement to -flto entry.

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

	* g-dynhta.adb, g-dynhta.ads: Minor typo fixes and reformatting.

From-SVN: r216955
2014-10-31 11:59:56 +01:00
Max Ostapenko e27d328acd re PR ipa/63696 (Alloc-dealloc-mismatch in ipa-icf.c)
gcc/

2014-10-31  Max Ostapenko  <m.ostapenko@partner.samsung.com>

        PR ipa/63696
        * ipa-icf.c (sem_function::~sem_function): Change free to delete to avoid
        alloc-dealloc mismatch with new, called in ipa_icf::sem_function::init.

From-SVN: r216954
2014-10-31 12:53:36 +02:00
Ilya Enkovich cb115cc299 MAINTAINERS (Write After Approval): Add myself.
2014-10-31  Ilya Enkovich  <ilya.enkovich@intel.com>

	* MAINTAINERS (Write After Approval): Add myself.

From-SVN: r216952
2014-10-31 09:19:43 +00:00
GCC Administrator af43148b9a Daily bump.
From-SVN: r216948
2014-10-31 00:16:39 +00:00
Felix Yang 6383386a1b Add zero-cost loops for xtensa port.
2014-10-10  Felix Yang  <felix.yang@huawei.com>

	* config/xtensa/xtensa.h (TARGET_LOOPS): New Macro.
	* config/xtensa/xtensa.c: Include dumpfile.h and hw-doloop.h.
	(xtensa_reorg, xtensa_reorg_loops): New.
	(xtensa_can_use_doloop_p, xtensa_invalid_within_doloop): New.
	(hwloop_optimize, hwloop_fail, hwloop_pattern_reg): New.
	(xtensa_emit_loop_end): Emit the zero-overhead loop end label.
	(xtensa_doloop_hooks): Define.
	* config/xtensa/xtensa.md (doloop_end, loop_end): New
	(zero_cost_loop_start): Rewritten.
	(zero_cost_loop_end): Likewise.

From-SVN: r216945
2014-10-30 21:37:45 +00:00
Steve Ellcey 77893d0b75 config.gcc (mips*-*-linux*): Combine 32 and 64 bit cases.
2014-10-30  Steve Ellcey  <sellcey@imgtec.com>

	* config.gcc (mips*-*-linux*): Combine 32 and 64 bit cases.

From-SVN: r216944
2014-10-30 20:44:53 +00:00
Joseph Myers e610393ca7 Make soft-fp symbols into compat symbols for powerpc*-*-linux*.
Continuing preparations for implementing
TARGET_ATOMIC_ASSIGN_EXPAND_FENV for powerpc*-*-linux* soft-float and
e500, this patch makes soft-fp symbols used for those targets into
compat symbols when building with glibc >= 2.19, so that they are only
in shared libgcc for existing binaries requiring them, not in static
libgcc and not available for new links using shared libgcc.  Instead,
new links will get the symbols from libc, which has exported all of
them since 2.19.  (Actually all the symbols were exported from glibc
since 2.4, but some of them were exported by glibc as compat symbols
only - because of a confusion between deliberately present soft-fp
symbols and old accidental reexports of libgcc functions from glibc
2.0 - until 2.19.)

This allows user floating-point arithmetic to interoperate properly
with the state handled by <fenv.h> functions, whether software state
(for soft-float; TLS variables that don't form a public part of
glibc's ABI, so can only be accessed directly by functions within
glibc) or hardware state (for e500 - the copies of the soft-fp
functions in glibc being built to interoperate with the hardware state
whereas those in libgcc aren't).  Previously only glibc's own
functions, and those operations done in hardware on e500, properly
worked with that state, not direct floating-point arithmetic
operations that were implemented in software.

The intended next step is the actual TARGET_ATOMIC_ASSIGN_EXPAND_FENV
implementation.

The test of glibc >= 2.19 uses the same --with-glibc-version configure
option as in the gcc/ directory (but differently implemented; in gcc/
the fallback is to examine headers to find the version, while in
libgcc/ we can use compile for the target and so use AC_COMPUTE_INT).
The TARGET_ATOMIC_ASSIGN_EXPAND_FENV implementation will also only do
anything for glibc >= 2.19, as it will depend on generating calls to
functions __atomic_feholdexcept __atomic_feclearexcept
__atomic_feupdateenv that were added in 2.19 for that purpose (even
for e500, inline code is not readily possible because of the need to
make prctl syscalls from the implementation of these functions).

In order to make symbols compat symbols, the soft-fp files need
wrapping with generated wrappers including asm .symver directives,
which need to name the symbol version in question.  This is extracted
by an awk script from an intermediate stage of generating the .map
file for linking libgcc (that .map itself depends on the objects that
go into the library, so can't be used for this purpose as that would
mean a circular dependency); the extraction is not fully general
regarding the features available in .map generation, but suffices for
the present purpose.

It would make sense for hardfp.c symbols to be compat symbols as well
(in the cases where hardfp.c gets used, the functions in question
should not be used for new links), but this isn't required for the
present purpose, which is only concerned with ensuring that where
functions that should be affected by rounding modes or exceptions get
used, those functions are actually affected by those rounding modes or
exceptions.

Tested with no regressions with cross to powerpc-linux-gnu
(soft-float); c11-atomic-exec-5.c moves from UNSUPPORTED to FAIL, as
expected, now that floating-point arithmetic in user programs uses the
same state as <fenv.h> functions, so the fenv_exceptions test passes,
but TARGET_ATOMIC_ASSIGN_EXPAND_FENV isn't yet implemented.  (For
e500, c11-atomic-exec-5.c was already FAILing, as enough operations
worked with the hardware state for the fenv_exceptions effective
target test to pass.)  Also verified that the exported symbols and
versions are unchanged, with the expected symbols becoming compat
symbols at the same versions, and that with --with-glibc-version=2.18
the symbols remain normal rather than compat symbols.

	* Makefile.in (libgcc.map.in): New target.
	(libgcc.map): Use libgcc.map.in.
	* config/t-softfp (softfp_compat): New variable to be set by
	users.
	[$(softfp_compat) = y] (softfp_map_dep, softfp_set_symver): New
	variables.
	[$(softfp_compat) = y] (softfp_file_list): Use files in the build
	directory.
	[$(softfp_compat) = y] ($(softfp_file_list)): Generate wrappers
	that use compat symbols and disable all code unless [SHARED].
	* config/t-softfp-compat: New file.
	* find-symver.awk: New file.
	* configure.ac (--with-glibc-version): New configure option.
	(ppc_fp_compat): New variable set for powerpc*-*-linux*.
	* configure: Regenerate.
	* config.host (powerpc*-*-linux*): Use ${ppc_fp_compat} for
	soft-float and e500.

From-SVN: r216942
2014-10-30 17:28:30 +00:00
Marek Polacek 2d51fcef56 c-objc-common.c (c_tree_printer): For a typedef name, print the stripped version as well, if they're not the same.
* c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
	print the stripped version as well, if they're not the same.

	* gcc.dg/diag-aka-1.c: New test.
	* gcc.dg/pr13804-1.c: Adjust dg-error.
	* gcc.dg/redecl-14.c: Likewise.
	* gcc.dg/pr56980.c: Adjust dg-message.

From-SVN: r216941
2014-10-30 17:22:12 +00:00
Richard Biener f1308e4b82 genmatch.c: Remove <map>, <utility> and <string> includes.
2014-10-30  Richard Biener  <rguenther@suse.de>

	* genmatch.c: Remove <map>, <utility> and <string> includes.
	Include ggc.h and hash-map.h.
	(ggc_internal_cleared_alloc): Provide stub definition.
	(ggc_free): Likewise.
	(struct capture_id_map_hasher): New traits for hash_map.
	(cid_map_t): New typedef.
	(everywhere else): Replace std::map use with cid_map_t.
	* hash-map.h (hash_map::elements): New member function.
	* Makefile.in (build/genmatch.o): Add $(HASH_TABLE_H),
	hash-map.h and $(GGC_H) as dependency.

From-SVN: r216940
2014-10-30 15:41:45 +00:00
Richard Biener d822570f73 genmatch.c (capture_info::walk_c_expr): Ignore capture uses inside TREE_TYPE ().
2014-10-30  Richard Biener  <rguenther@suse.de>

	* genmatch.c (capture_info::walk_c_expr): Ignore capture
	uses inside TREE_TYPE ().
	* gimple-ssa-strength-reduction.c (stmt_cost): Use CASE_CONVERT.
	(find_candidates_dom_walker::before_dom_children): Likewise.
	(replace_mult_candidate): Use CONVERT_EXPR_CODE_P.
	(replace_profitable_candidates): Likewise.
	* tree-ssa-dom.c (initialize_hash_element): Canonicalize
	CONVERT_EXPR_CODE_P to CONVERT_EXPR.
	* convert.c (convert_to_integer): Use CASE_CONVERT.

From-SVN: r216939
2014-10-30 15:36:05 +00:00
Ian Lance Taylor 665c06cec2 * gcc.misc-tests/godump-1.c: Skip if ! lp64.
From-SVN: r216938
2014-10-30 15:19:45 +00:00
Dominik Vogt d8f8ea0034 godump-1.c: Skip -fdump-go-spec tests for all platforms except s390[x] and x86_64.
* gcc.misc-tests/godump-1.c: Skip -fdump-go-spec tests for all
	platforms except s390[x] and x86_64.

From-SVN: r216936
2014-10-30 14:51:30 +00:00
David Edelsohn 020bd6f43f configure.host (aix5+): New stanza.
* configure.host (aix5+): New stanza.
        (aix4.3+): Do not use -G in link command.

From-SVN: r216935
2014-10-30 10:20:50 -04:00
Richard Biener 36a60e48f4 match.pd: Implement more patterns that simplify to a single value.
2014-10-30  Richard Biener  <rguenther@suse.de>

	* match.pd: Implement more patterns that simplify to a single value.
	* fold-const.c (fold_binary_loc): Remove them here.
	* tree-ssa-forwprop.c (simplify_bitwise_binary): Likewise.
	(fwprop_ssa_val): Remove restriction on single uses.

From-SVN: r216933
2014-10-30 13:13:35 +00:00
Jan-Benedict Glaw 6327f612fd driver-avr.c (avr_set_current_device): Remove.
2014-10-30  Jan-Benedict Glaw  <jbglaw@lug-owl.de>

	* config/avr/driver-avr.c (avr_set_current_device): Remove.

From-SVN: r216932
2014-10-30 12:44:23 +00:00
Arnaud Charlet cc9b1e1ca0 [multiple changes]
2014-10-30  Ed Schonberg  <schonberg@adacore.com>

	* exp_ch3.adb (Expand_N_Object_Declaration): Code cleanup.

2014-10-30  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch5.adb (Analyze_Iterator_Specification): If a subtype
	indication is provided, check properly that it covers the element
	type of of the container type.

2014-10-30  Hristian Kirtchev  <kirtchev@adacore.com>

	* g-dynhta.ads, g-dynhta.adb: Add the implementation of a load facto
	-based hash table.

From-SVN: r216926
2014-10-30 12:53:39 +01:00
Arnaud Charlet 35fdafcdda Recommit wrongly reverted change.
From-SVN: r216924
2014-10-30 12:46:20 +01:00
Arnaud Charlet f11ac8e701 Recommit wrongly reverted change.
From-SVN: r216923
2014-10-30 12:45:47 +01:00
Arnaud Charlet 1572e2c327 Re-commit wrongly reverted previous change.
From-SVN: r216922
2014-10-30 12:45:03 +01:00
Arnaud Charlet cd2c602730 [multiple changes]
2014-10-30  Ed Schonberg  <schonberg@adacore.com>

	* exp_util.ads, exp_util.adb (Following_Address_Clause): Modify
	Has_Following_Address_Clause so that it returns the address
	clause if present, rather than a boolean value.
	* sem_ch3.adb (Analyze_Object_Declaration): use
	Following_Address_Clause.
	* exp_ch3.adb (Expand_N_Object_Declaration): When a tagged object
	is initialized, insert tag assignment after object is frozen,
	which may be after an address clause that follows the declaration.

2014-10-30  Tristan Gingold  <gingold@adacore.com>

	* system-darwin-x86.ads, system-linux-s390x.ads, system-linux-alpha.ads,
	system-vxworks-arm.ads, system-freebsd-x86_64.ads,
	system-linux-hppa.ads, system-linux-s390.ads,
	system-solaris-sparcv9.ads, system-mingw.ads, system-linux-ia64.ads,
	system-vxworks-sparcv9.ads, system-linux-ppc.ads, system-aix64.ads,
	system-linux-sh4.ads, system-solaris-x86.ads, system-linux-x86_64.ads,
	system-linux-x86.ads, system-vxworks-ppc.ads, system-hpux.ads,
	system-linux-armel.ads, system-darwin-ppc.ads, system-solaris-sparc.ads,
	system-vxworks-m68k.ads, system-hpux-ia64.ads, system.ads,
	system-solaris-x86_64.ads, system-mingw-x86_64.ads,
	system-vxworks-mips.ads, system-linux-sparc.ads, system-freebsd-x86.ads,
	system-aix.ads, system-darwin-x86_64.ads, system-vxworks-x86.ads: Add
	pragma No_Elaboration_Code_All.

2014-10-30  Eric Botcazou  <ebotcazou@adacore.com>

	* gnat_ugn.texi: Minor improvement to -flto entry.

From-SVN: r216921
2014-10-30 12:44:20 +01:00
Arnaud Charlet b3407ce0ca [multiple changes]
2014-10-30  Hristian Kirtchev  <kirtchev@adacore.com>

	* sem_util.adb (Inherit_Subprogram_Contract):
	Add a guard to protect against enumeration literal overriding.
	* sem_ch3.adb, sem_ch4.adb, sem_res.adb, sem_util.adb:
	Minor reformatting (add SPARK RM references).

2014-10-30  Robert Dewar  <dewar@adacore.com>

	* exp_dbug.adb, opt.ads: Minor reformatting.

From-SVN: r216920
2014-10-30 12:37:06 +01:00
Arnaud Charlet 039538bc35 [multiple changes]
2014-10-30  Yannick Moy  <moy@adacore.com>

	* inline.adb (Has_Single_Return_In_GNATprove_Mode):
	Return False when return statement is inside one or more blocks.

2014-10-30  Hristian Kirtchev  <kirtchev@adacore.com>

	* exp_ch7.adb (Is_Subprogram_Call): Account for the case where an
	object declaration initialized by a function call that returns
	an unconstrained result may be rewritted as a renaming of the
	secondary stack result.

2014-10-30  Hristian Kirtchev  <kirtchev@adacore.com>

	* aspects.adb: Add an entry for aspect Extensions_Visible in
	table Canonical_Aspect.
	* aspects.ads: Add entry for aspect Extensions_Visible in
	tables Aspect_Argument, Aspect_Delay, Aspect_Id, Aspect_Names,
	Implementation_Defined_Aspect.
	* einfo.adb (Get_Pragma): Include pragma Extensions_Visible in
	the list of contract pragmas.
	* par-prag.adb Pragma Extensions_Visible does not require special
	processing from the parser.
	* sem_ch3.adb (Analyze_Object_Declaration): Prevent an
	implicit class-wide conversion of a formal parameter
	of a specific tagged type whose related subprogram is
	subject to pragma Extensions_Visible with value "False".
	(Check_Abstract_Overriding): Add various overriding checks
	related to pragma Extensions_Visible.
	(Derive_Subprogram):
	A subprogram subject to pragma Extensions_Visible with value
	False requires overriding if the subprogram has at least one
	controlling OUT parameter.
	(Is_EVF_Procedure): New routine.
	* sem_ch4.adb (Analyze_Type_Conversion): A formal parameter of
	a specific tagged type whose related subprogram is subject to
	pragma Extensions_Visible with value "False" cannot appear in
	a class-wide conversion.
	* sem_ch6.adb (Analyze_Subprogram_Contract): Remove
	the assertion to account for pragma Extensions_Visible.
	(Check_Overriding_Indicator): An overriding subprogram
	inherits the contact of the overridden subprogram.
	(New_Overloaded_Entity): An overriding subprogram inherits the
	contact of the overridden subprogram.
	* sem_ch13.adb (Analyze_Aspect_Specifications): Add processing
	for aspect Extensions_Visible.
	(Check_Aspect_At_Freeze_Point): Aspect Extensions_Visible does not
	require special processing at the freeze point.
	* sem_prag.adb Add an entry for pragma Extensions_Visible in
	table Sig_Flags.
	(Analyze_Pragma): Ensure that various SPARK
	pragmas lack identifiers in their arguments. Add processing for
	pragma Extensions_Visible.
	(Chain_CTC): Code reformatting.
	* sem_res.adb (Resolve_Actuals): A formal parameter of a
	specific tagged type whose related subprogram is subject to
	pragma Extensions_Visible with value "False" cannot act as an
	actual in a subprogram with value "True".
	* sem_util.adb (Add_Classification): New routine.
	(Add_Contract_Item): Account for pragma Extensions_Visible. Code
	reformatting.
	(Add_Contract_Test_Case): New routine.
	(Add_Pre_Post_Condition): New routine.
	(Extensions_Visible_Status): New routine.
	(Inherit_Subprogram_Contract): New routine.
	(Is_EVF_Expression): New routine.
	(Is_Specific_Tagged_Type): New routine.
	* sem_util.ads Add type Extensions_Visible_Mode and document all values.
	(Add_Contract_Item): Add pragma Extensions_Visible to the
	comment on usage.
	(Inherit_Subprogram_Contract): New routine.
	(Is_EVF_Expression): New routine.
	(Is_Specific_Tagged_Type): New routine.
	* sinfo.adb (Is_Inherited): New routine.
	(Set_Is_Inherited): New routine.
	* sinfo.ads Add flag Is_Inherited along with its usage in
	nodes.
	(Is_Inherited): New routine along with pragma Inline.
	(Set_Is_Inherited): New routine along with pragma Inline.
	* snames.ads-tmpl: Add predefined name "Extensions_Visible"
	and a new Pragma_Id for the pragma.

From-SVN: r216919
2014-10-30 12:34:41 +01:00
Jakub Jelinek 67848724e5 Add svn:executable property for generate_libstdcxx_web_docs.
From-SVN: r216914
2014-10-30 11:11:38 +01:00
Martin Liska 47a668cd26 re PR tree-optimization/63574 (ICE building libjava (segfault) on arm-linux-gnueabihf)
PR ipa/63574
	PR ipa/63664
	* g++.dg/ipa/pr63574.C: New test.
	* ipa-icf-gimple.c (func_checker::parse_labels): Missing comment added.
	(func_checker::compare_gimple_label): Simlified comparison introduced.
	* ipa-icf-gimple.h: Missing comment added.

From-SVN: r216913
2014-10-30 10:10:58 +00:00
Thomas Schwinge fca380479c Build a shared host libiberty also for libcc1's benefit.
* configure.ac (extra_host_libiberty_configure_flags): Add
	--enable-shared also for libcc1's benefit.
	* configure: Regenerate.

From-SVN: r216912
2014-10-30 11:06:37 +01:00
Jeff Law e0d80a586d pa-protos.h (pa_output_arg_descriptor): Strengthen argument from rtx to rtx_insn *.
* config/pa/pa-protos.h (pa_output_arg_descriptor): Strengthen
	argument from rtx to rtx_insn *.
	(compute_movmem_length, compute_clrmem_length): Likewise.
	(copy_fp_args, length_fp_args): Likewise.
	* config/pa/pa.c (legitimize_pic_address): Promote local variable
	"insn" from rtx to rtx_insn *.
	(legitimize_tls_address, pa_emit_move_sequence): Likewise.
	(pa_output_block_move, store_reg, store_reg_modify): Likewise.
	(set_reg_plus_d, pa_expand_prologue, hppa_profile_hook): Likewise.
	(branch_to_delay_slot_p, branch_needs_nop_p, use_skip_p): Likewise.
	(pa_output_arg_descriptor): Strengthen argument to an rtx_insn *.
	(compute_movmem_length, compute_clrmem_length): Likewise.
	(copy_fp-args, length_fp_args): Likewise.

From-SVN: r216859
2014-10-29 23:14:13 -06:00