Commit Graph

112470 Commits

Author SHA1 Message Date
Eric Botcazou 83e0724ec7 * gcc.dg/builtins-67.c: Guard iround and irint with HAVE_C99_RUNTIME.
From-SVN: r179920
2011-10-13 12:28:16 +00:00
Richard Guenther 2b3c0885d9 re PR middle-end/50712 (invalid argument to gimple call)
2011-10-13  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/50712
	* ipa-split.c (split_function): Always re-gimplify parameters
	when they are not gimple vals before passing them.  Properly
	check for type compatibility.

	* gcc.target/i386/pr50712.c: New testcase.

From-SVN: r179919
2011-10-13 12:07:44 +00:00
Arnaud Charlet 4c8933bce9 Remove Packages_To_Check parameter.
From-SVN: r179918
2011-10-13 13:12:07 +02:00
Arnaud Charlet 4b8b7784ed Remove default for argument Packages_To_Check.
From-SVN: r179917
2011-10-13 13:11:37 +02:00
Tom de Vries 0626faca27 Fix PR middle-end/50527 ChangeLog entry
From-SVN: r179916
2011-10-13 11:10:01 +00:00
Arnaud Charlet 2fcc44fae4 [multiple changes]
2011-10-13  Robert Dewar  <dewar@adacore.com>

	* sem_ch9.adb, sem_util.adb, sem_util.ads, exp_ch6.adb, sem_ch4.adb,
	sem_ch6.adb, exp_ch3.adb: Minor reformatting.

2011-10-13  Arnaud Charlet  <charlet@adacore.com>

	* Makefile.rtl (GNATRTL_NONTASKING_OBJS): Add a-ngcoar.o.

2011-10-13  Jerome Guitton  <guitton@adacore.com>

	* sysdep.c (__gnat_get_task_options): Re-enable VX_SPE_TASK on vThreads

2011-10-13  Eric Botcazou  <ebotcazou@adacore.com>

	* a-convec.ads (Cursor): Minor reformatting.
	* a-convec.adb (Next): Fix minor inconsistencies.
	(Previous): Likewise.

From-SVN: r179915
2011-10-13 13:09:11 +02:00
Arnaud Charlet 9b62eb3214 [multiple changes]
2011-10-13  Ed Schonberg  <schonberg@adacore.com>

	* sem_util.ads, sem_util.adb (Available_Full_View_Of_Component):
	New predicate to determine whether some operations on an array
	type are available when the full view of its component may differ
	from the view of the point of the array declaration.
	* sem_ch4.adb (Find_Equality_Types): Use
	Available_Full_View_Of_Component.
	* sem_type.adb (Valid_Boolean_Arg, Valid_Comparison_Arg): Ditto

2011-10-13  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch9.adb: Analyze aspects while discriminants of protected
	type are visible.

2011-10-13  Geert Bosch  <bosch@adacore.com>

	* Makefile.rtl (GNATRTL_TASKING_OBJECTS): Add
	a-nlcoar.o, a-nllcar.o, a-nucoar.o and s-gearop.o, as these no
	longer depend on an external library.
	* gcc-interface/Makefile.in (GNATRTL_LINEARALGEBRA_OBJS): Remove
	a-nlcoar.o, a-nllcar.o, a-nucoar.o and s-gearop.o.
	Update dependencies.
	* gcc-interface/Make-lang.in: Update dependencies.

From-SVN: r179914
2011-10-13 13:05:50 +02:00
Arnaud Charlet 1a36a0cd69 [multiple changes]
2011-10-13  Cyrille Comar  <comar@adacore.com>

	* gnat_ugn.texi: Minor editing.

2011-10-13  Vincent Celier  <celier@adacore.com>

	* projects.texi: Add documentation on packages and attributes
	that are inherited from a project being extended into the
	extended project.

2011-10-13  Hristian Kirtchev  <kirtchev@adacore.com>

	* exp_ch3.adb (Build_Master): Rewritten.
	(Expand_N_Full_Type_Declaration): Reformat the declarative
	region. Update the call to Build_Master_Renaming.
	(Expand_Previous_Access_Type): Rewritten.
	* exp_ch6.adb (Add_Task_Actuals_To_Build_In_Place_Call):
	Add local constant Result_Subt and update related usage.
	(Expand_N_Extended_Return_Statement): Add local constant
	Result_Subt and update related usage.
	* exp_ch9.adb (Build_Activation_Chain): Rewritten to use the
	new context detection mechanism.
	(Build_Class_Wide_Master):
	Use Insert_Action to add the renaming into the tree.
	(Build_Master_Entity): Rewritten to use the new context detection
	mechanism.
	(Build_Master_Renaming): Add formal parameter Ins_Nod
	and related usage. Use Insert_Action to add the renaming into the
	tree.
	(Find_Enclosing_Context): New subsidiary routine. Rather
	than relying on enclosing scopes, this routine looks at the
	tree structure to figure out the proper context for a _master
	or a _chain. This approach eliminates the issues with transient
	scopes which have not been converted into blocks.
	* exp_ch9.ads (Build_Master_Entity): Change parameter profile
	to better reflect the new usage. Update the related comment.
	(Build_Master_Renaming): Add formal parameter Ins_Nod. Update
	the comment on usage.
	* sem_ch3.adb (Access_Definition): Update the calls to
	Build_Master_Entity and Build_Master_Renaming.
	* sem_ch6.adb (Create_Extra_Formals): Add local variable
	Full_Subt. Code reformatting.
	* sem_util.adb (Is_Iterator): Alphabetized.
	(Is_LHS): Alphabetized.
	(Is_Limited_Class_Wide_Type): New routine.
	* sem_util.ads (Is_Limited_Class_Wide_Type): New routine.

From-SVN: r179913
2011-10-13 13:00:13 +02:00
Geert Bosch a5917ffb2c a-ngrear.adb (Solve): Make generic and move to System.Generic_Array_Operations.
2011-10-13  Geert Bosch  <bosch@adacore.com>

	* a-ngrear.adb (Solve): Make generic and move to
	System.Generic_Array_Operations.
	* s-gearop.ads (Matrix_Vector_Solution, Matrix_Matrix_Solution):
	New generic solvers to	compute a vector resp. matrix Y such
	that A * Y = X, approximately.
	* s-gearop.adb (Matrix_Vector_Solution, Matrix_Matrix_Solution):
	Implement using Forward_Eliminate and Back_Substitute
	* a-ngcoar.adb: Reimplement in pure Ada to remove dependencies
	on BLAS and LAPACK.
	* a-ngcoar.ads ("abs"): Fix return type to be real.

From-SVN: r179912
2011-10-13 12:56:08 +02:00
Eric Botcazou 574ec9452d re PR ada/50589 ([4.7] Ada bootstrap failure on sparc-linux)
PR ada/50589
	* s-linux-alpha.ads: Do not "with" Interfaces.C.
	* s-linux-sparc.ads: Likewise.

From-SVN: r179911
2011-10-13 10:54:19 +00:00
Geert Bosch 8668ea361d s-gearop.ads (Forward_Eliminate): Add "abs" formal function returning a Real.
2011-10-13  Geert Bosch  <bosch@adacore.com>

	* s-gearop.ads (Forward_Eliminate): Add "abs" formal function
	returning a Real.
	* s-gearop.adb (Forward_Eliminate): Remove local "abs" function
	and use formal.
	* a-ngrear.adb (Forward_Eliminate): Adjust instantiation for
	new profile.

From-SVN: r179910
2011-10-13 12:52:59 +02:00
Geert Bosch edcf5983b6 a-ngrear.adb, [...] (Sqrt): Make generic and move to System.Generic_Array_Operations.
2011-10-13  Geert Bosch  <bosch@adacore.com>

	* a-ngrear.adb, s-gearop.adb, s-gearop.ads (Sqrt): Make generic and
	move to System.Generic_Array_Operations.

From-SVN: r179909
2011-10-13 12:51:39 +02:00
Geert Bosch a4935dea3f a-ngrear.adb ("abs"): Adjust for modified L2_Norm generic
2011-10-13  Geert Bosch  <bosch@adacore.com>

	* a-ngrear.adb ("abs"): Adjust for modified L2_Norm generic
	* s-gearop.ads (L2_Norm): Change profile to be suitable for
	Complex_Vector
	* s-gearop.adb (L2_Norm): Reimplement using direct definition,
	not inner product

From-SVN: r179908
2011-10-13 12:49:57 +02:00
Arnaud Charlet 3e7302c3cb [multiple changes]
2011-10-13  Robert Dewar  <dewar@adacore.com>

	* exp_ch5.adb, sem_ch3.adb, impunit.adb, impunit.ads, sem_type.adb,
	prj-proc.adb, exp_ch9.adb, s-regpat.adb, sem_ch10.adb, sem_prag.adb,
	sem_ch12.adb, freeze.adb, sem_attr.adb, sem_attr.ads, gnatlink.adb,
	par-ch6.adb, exp_ch6.adb, sem_ch4.adb, sem_ch6.adb, sem_ch8.adb,
	par-util.adb, sem_ch13.adb, lib-xref.adb, g-trasym.adb, g-trasym.ads,
	exp_aggr.adb, s-taprop-posix.adb: Minor reformatting.

2011-10-13  Geert Bosch  <bosch@adacore.com>

	* s-gearop.adb: Minor comment additions.

From-SVN: r179907
2011-10-13 12:47:00 +02:00
Arnaud Charlet 8417f4b28e [multiple changes]
2011-10-13  Fedor Rybin  <frybin@adacore.com>

	* gnat_ugn.texi: Add gnattest section.

2011-10-13  Ed Schonberg  <schonberg@adacore.com>

	* freeze.adb: Do not create body of renaming if declaration has
	errors.

2011-10-13  Olivier Hainque  <hainque@adacore.com>

	* init.c (__gnat_error_handler - vxworks case): Restrict sigtramp calls
	further, to the ppc+kernel case only.

2011-10-13  Hristian Kirtchev  <kirtchev@adacore.com>

	* exp_ch4.adb (Expand_N_Allocator): Comment reformatting.
	* exp_ch6.adb (Add_Unconstrained_Actuals_To_Build_In_Place_Call):
	Do not create a pool formal on .NET/JVM.
	(Expand_N_Extended_Return_Statement): Alphabetize local
	variables. Do not create a renaming of the build-in-place pool
	parameter on .NET/JVM.	(Make_Build_In_Place_Call_In_Allocator):
	Add the user-defined pool only on non-VM targets.
	(Make_Build_In_Place_Call_In_Object_Declaration): Alphabetize
	local variables.  Do not add a pool actual on .NET/JVM.
	* sem_ch6.adb: Add with and use clause for Targparm.
	(Create_Extra_Formals): Add build-in-place pool formal only on
	non-VM targets.
	* rtsfind.ads: Alphabetize entries.

From-SVN: r179906
2011-10-13 12:43:52 +02:00
Arnaud Charlet 4674dd2104 [multiple changes]
2011-10-13  Sergey Rybin  <rybin@adacore.com>

	* gnat_ugn.texi: Minor correction.

2011-10-13  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch8.adb: Minor error message improvement.

2011-10-13  Robert Dewar  <dewar@adacore.com>

	* a-cbprqu.adb, a-ciorma.adb, exp_ch3.adb: Minor reformatting.

From-SVN: r179905
2011-10-13 12:40:53 +02:00
Gary Dismukes 95aeda7948 exp_ch5.adb (Expand_N_Loop_Statement): For the transformation of a for loop for an enumeration type with an...
2011-10-13  Gary Dismukes  <dismukes@adacore.com>

	* exp_ch5.adb (Expand_N_Loop_Statement): For the transformation
	of a for loop for an enumeration type with an enumeration rep
	clause, which involves moving the original loop parameter into
	a nested block, the loop parameter's entity must be removed from
	the entity list of the loop scope.

From-SVN: r179904
2011-10-13 12:39:15 +02:00
Bob Duff 200b7162a5 exp_ch6.ads (BIP_Storage_Pool): New "extra implicit parameter" that gets passed in the same cases where...
2011-10-13  Bob Duff  <duff@adacore.com>

	* exp_ch6.ads (BIP_Storage_Pool): New "extra implicit parameter"
	that gets passed in the same cases where BIP_Alloc_Form is passed
	(caller-unknown-size results). BIP_Storage_Pool is used when
	BIP_Alloc_Form = User_Storage_Pool.  In that case, a pointer
	to the user-defined storage pool is passed at the call site,
	and this pool is used in callee to allocate the result.
	* exp_ch6.adb (Add_Unconstrained_Actuals_To_Build_In_Place_Call): New
	version of Add_Alloc_Form_Actual_To_Build_In_Place_Call. Passes
	the additional BIP_Storage_Pool actual.
	(Expand_N_Extended_Return_Statement): Allocate the function
	result using the user-defined storage pool, if BIP_Alloc_Form =
	User_Storage_Pool.
	* sem_ch6.adb: Add the "extra formal" for BIP_Storage_Pool.
	* exp_ch4.adb: Don't overwrite storage pool set by
	Expand_N_Extended_Return_Statement.
	* s-stopoo.ads, rtsfind.ads (Root_Storage_Pool_Ptr): New type,
	for use in build-in-place function calls within allocators
	where the access type has a user-defined storage pool.

From-SVN: r179903
2011-10-13 12:37:33 +02:00
Arnaud Charlet 9f8d1e5ca5 [multiple changes]
2011-10-13  Sergey Rybin  <rybin@adacore.com>

	* gnat_ugn.texi, vms_data.ads: Add an option to control enumeration
	literal casing.

2011-10-13  Nicolas Roche  <roche@adacore.com>

	* gnatlink.adb: Ensure that -mrtp is passed when
	runtime name ends with 'rtp'.

2011-10-13  Ed Schonberg  <schonberg@adacore.com>

	* sem_prag.adb (Analyze_Pragma, case Unchecked_Union): an
	unchecked union type can be limited.

2011-10-13  Olivier Hainque  <hainque@adacore.com>

	* init.c (__gnat_error_handler) <VxWorks version>: Add comments on
	the use of the signal trampoline for PPC in the sjlj case as well.
	Add legitimate casts, preventing compile time warnings on the
	(sighandler *) profile.

2011-10-13  Yannick Moy  <moy@adacore.com>

	* sem_aggr.adb (Resolve_Aggr_Expr): Always perform semantic
	analysis in Alfa mode.

2011-10-13  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch3.adb (OK_For_Limited_Init_In_05): Conditional and case
	expressions are legal limited return values if each one of their
	dependent expressions are legal.

2011-10-13  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch6.adb (Analyze_Procedure_Call_Statement): In Ada 2012 mode,
	if the prefix of the call is a qualified expression, rewrite as
	a code statement.
	* sem_ch13.adb (Analyze_Code_Statement): In Ada 2012 mode, the
	code statement is legal if it is a rewriting of a procedure call.

2011-10-13  Ed Schonberg  <schonberg@adacore.com>

	* exp_aggr.adb (Flatten): If a component association has a box,
	assume that aggregate is not static.
	(Safe_Aggregate): If a component association in a non-limited
	aggregate has a box, assume that it cannot be expanded in place.

2011-10-13  Vincent Celier  <celier@adacore.com>

	* prj-conf.adb (Get_Or_Create_Configuration_File): Call
	Process_Project_Tree_Phase_1 with Packages_To_Check.
	(Process_Project_And_Apply_Config): Ditto
	* prj-part.ads, prj-part.adb, prj-pars.ads, prj-pars.adb (Parse):
	Remove default for argument Packages_To_Check.
	* prj-proc.adb (Recursive_Process): New argument
	Packages_To_Check.
	(Process): Ditto.
	(Process_Project_Tree_Phase_1): Ditto.
	(Recursive_Project.Process_Aggregated_Projects): Call
	Prj.Part.Parse and Process_Project_Tree_Phase_1 with
	Packages_To_Check.
	* prj-proc.ads (Process): New argument Packages_To_Check
	(Process_Project_Tree_Phase_1): Ditto

From-SVN: r179902
2011-10-13 12:32:13 +02:00
Tom de Vries c28f4b5c26 function.c (gimplify_parameters): Set number of arguments of call to BUILT_IN_ALLOCA_WITH_ALIGN to 2.
2011-10-13  Tom de Vries  <tom@codesourcery.com>

	* function.c (gimplify_parameters): Set number of arguments of call to
	BUILT_IN_ALLOCA_WITH_ALIGN to 2.

From-SVN: r179901
2011-10-13 10:24:47 +00:00
Arnaud Charlet 46f8e1ac8c * gcc-interface/Makefile.in: Fix typo.
From-SVN: r179900
2011-10-13 12:23:36 +02:00
Arnaud Charlet 8097203fc3 [multiple changes]
2011-10-13  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch12.adb (Analyze_Formal_{Floating_Type,
	Signed_Integer_Type,  Decimal_Fixed_Point_Type, Discrete_Type}):
	Use sloc of defining identifier of farmal type declaration,
	as sloc of generated internal entity, to prevent misplaced
	references in ali.

2011-10-13  Ed Schonberg  <schonberg@adacore.com>

	* sem_intr.adb (Check_Intrinsic_Operator): Check that type
	is fully defined before checking that it is a numeric type.

2011-10-13  Ed Schonberg  <schonberg@adacore.com>

	* sem_aggr.adb (Resolve_Record_Aggregate): If a component
	association for component X has a box, then X is covered in the
	aggregate even if there is not default value for X in the type
	declaration, and X has to be default-initialized.

2011-10-13  Ed Schonberg  <schonberg@adacore.com>

	* sem_attr.adb (Check_Enum_Image, Analyze_Attribute case
	'Value): Mark literals as referenced only if reference is in
	current source unit.

2011-10-13  Matthew Heaney  <heaney@adacore.com>

	* a-csquin.ads (Enque, Dequeue): Mark interface operations as entries.

2011-10-13  Olivier Hainque  <hainque@adacore.com>

	* sigtramp.h: New file.  Prototype and spec of the signal
	trampoline to be called by an established handler to provide
	dwarf call frame info before the real signal processing code.
	* sigtramp-ppcvxw.c: New file.	Implementation of the signal
	trampoline for ppc-vxworks.
	* init.c (vxworks section): Use it for ppc.

From-SVN: r179899
2011-10-13 12:22:28 +02:00
Arnaud Charlet e192a2cd62 [multiple changes]
2011-10-13  Thomas Quinot  <quinot@adacore.com>

	* par-ch2.adb, par.adb, par-util.adb, par-ch3.adb
	(Check_Future_Identifier): New subprogram,
	factors duplicated code from Par.Ch2.P_Identifier and
	Par.Ch3.P_Defining_Identifier.

2011-10-13  Thomas Quinot  <quinot@adacore.com>

	* s-taprop-posix.adb (Initialize): Always raise Storage_Error
	if we fail to initialize CV attributes or CV.

2011-10-13  Thomas Quinot  <quinot@adacore.com>

	* s-tasren.adb (Timed_Selective_Wait, case
	Accept_Alternative_Selected): Use Defer_Abort_Nestable, since
	we know abortion is already deferred.

2011-10-13  Hristian Kirtchev  <kirtchev@adacore.com>

	* exp_ch3.adb (Build_Class_Wide_Master): Moved to exp_ch9.
	(Build_Master_Renaming (function)): Removed.
	(Build_Master_Renaming (procedure)): Moved to exp_ch9.
	(Expand_Full_Type_Declaration): Alphabetize
	variables. Reformatting of code and comments. Rewrite the
	section on processing of anonymous access-to-task types in
	record components.
	* exp_ch3.ads (Build_Class_Wide_Master): Moved to exp_ch9.
	(Build_Master_Renaming): Moved to exp_ch9.
	* exp_ch9.adb (Build_Class_Wide_Master): Moved from exp_ch3.
	(Build_Master_Entity): Add formal parameter
	Use_Current. Reformatting of code and comments.
	(Build_Master_Renaming): Moved from exp_ch3.
	* exp_ch9.ads (Build_Class_Wide_Master): Moved from
	exp_ch3. Update comment on usage.
	(Build_Master_Entity):
	Add formal parameter Use_Current. Update comment on usage.
	(Build_Master_Renaming): Moved from exp_ch3.
	* sem_ch3.adb (Access_Definition): Remove redundant code to
	create a _master and a renaming.

2011-10-13  Ed Schonberg  <schonberg@adacore.com>

	* lib-xref.adb: Do no emit reference to overridden operation,
	if it is internally generated.

2011-10-13  Vincent Celier  <celier@adacore.com>

	* bindgen.adb: Remove any processing related to g-trasym
	* Makefile.rtl: Add g-trasym.o to GNATRTL_NONTASKING_OBJS
	* mlib-prj.adb: Remove any processing related to g-trasym.

From-SVN: r179898
2011-10-13 12:13:36 +02:00
Tom de Vries 54c42edf79 memcpy-4.c: New test.
2011-10-13  Tom de Vries  <tom@codesourcery.com>

	* gcc.dg/memcpy-4.c: New test.

From-SVN: r179897
2011-10-13 09:54:58 +00:00
Tom de Vries ba30e50da2 emit-rtl.c (set_mem_attributes_minus_bitpos): Set MEM_READONLY_P for static const strings.
2011-10-13  Tom de Vries  <tom@codesourcery.com>

	* emit-rtl.c (set_mem_attributes_minus_bitpos): Set MEM_READONLY_P
	for static const strings.
	* varasm.c (build_constant_desc): Generate the memory location of the
	constant using gen_const_mem.

From-SVN: r179896
2011-10-13 09:54:50 +00:00
Richard Guenther 6c9fbfa72e re PR tree-optimization/50698 (pretending to create versioning for alias when not required)
2011-10-13  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/50698
	* tree-data-ref.c (split_constant_offset_1): Also process
	offsets of &MEM.

	* g++.dg/vect/pr50698.cc: New testcase.

From-SVN: r179895
2011-10-13 09:00:01 +00:00
GCC Administrator ee9488e6a2 Daily bump.
From-SVN: r179885
2011-10-13 00:18:35 +00:00
Eric Botcazou 0cfaf83fd2 Makefile.in (LOOSE_WARN): Delete.
gnattools/
	* Makefile.in (LOOSE_WARN): Delete.
	(GCC_WARN_CFLAGS): Set to -W -Wall.
	(TOOLS_FLAGS_TO_PASS_1): Delete.
	(TOOLS_FLAGS_TO_PASS_1re): Rename into...
	(TOOLS_FLAGS_TO_PASS_RE): ...this.
	(gnattools-native): Use TOOLS_FLAGS_TO_PASS_NATIVE.
	(regnattools): Use TOOLS_FLAGS_TO_PASS_RE.
libada/
	* Makefile.in (LOOSE_WARN): Delete.
	(GCC_WARN_CFLAGS): Likewise.
	(WARN_CFLAGS): Likewise.
	(GNATLIBFLAGS): Add -nostdinc.
	(GNATLIBCFLAGS_FOR_C): Add -W -Wall.
 	(LIBADA_FLAGS_TO_PASS): Remove WARN_CFLAGS.
	* configure.ac (warn_cflags): Delete.
	* configure: Regenerate.
gcc/ada/
	* sem_util.adb (Denotes_Same_Prefix): Fix fatal warning.
	* gcc-interface/Make-lang.in (WARN_ADAFLAGS): New.
	(ALL_ADAFLAGS): Include WARN_ADAFLAGS.
	(ADA_FLAGS_TO_PASS): Likewise.
	(COMMON_FLAGS_TO_PASS): New.
	(ADA_TOOLS_FLAGS_TO_PASS): Use COMMON_FLAGS_TO_PASS.  In the regular
	native case, also use FLAGS_TO_PASS and ADA_FLAGS_TO_PASS.
	(gnatlib): Use COMMON_FLAGS_TO_PASS.
	(ada.install-common): Likewise.
	(install-gnatlib): Likewise.
	(install-gnatlib-obj): Likewise.
	(gnattools): Use ADA_TOOLS_FLAGS_TO_PASS for gnattools1 as well.
	(gnat-cross): Delete.
	(gnatboot): Likewise.
	(gnatboot2): Likewise.
	(gnatboot3): Likewise.
	(gnatstage1): Likewise.
	(gnatstage2): Likewise.
	* gcc-interface/Makefile.in (SOME_ADAFLAGS): Likewise.
	(MOST_ADAFLAGS): Likewise.
	(LOOSE_CFLAGS): Likewise.
 	(gnat-cross): Likewise.
	(GNATLIBFLAGS): Add -W -Wall.
	(GNATLIBCFLAGS_FOR_C): Likewise.
	* gcc-interface/lang.opt: Remove C-specific warnings.  Add doc lines.
	* gcc-interface/misc.c (gnat_handle_option): Remove obsolete cases.

From-SVN: r179878
2011-10-12 22:41:57 +00:00
Janis Johnson 53778c2d88 warn-1.c: Skip if not powerpc_vsx_ok.
* gcc.target/powerpc/warn-1.c: Skip if not powerpc_vsx_ok.
	* gcc.target/powerpc/warn-2.c: Ditto.

From-SVN: r179877
2011-10-12 22:41:18 +00:00
Janis Johnson 5239de8faf ppc-fma-3.c: Require powerpc_fprs.
* gcc.target/powerpc/ppc-fma-3.c: Require powerpc_fprs.
	* gcc.target/powerpc/ppc-fma-4.c: Likewise.
	* gcc.target/powerpc/ppc-fma-5.c: Likewise.
	* gcc.target/powerpc/ppc-fma-7.c: Likewise.
	* gcc.target/powerpc/ppc-fpconv-11.c: Likewise.
	* gcc.target/powerpc/ppc-fpconv-3.c: Likewise.
	* gcc.target/powerpc/ppc-fpconv-7.c: Likewise.
	* gcc.target/powerpc/ppc-fpconv-8.c: Likewise.
	* gcc.target/powerpc/ppc-pow.c: Likewise.
	* gcc.target/powerpc/recip-1.c: Likewise.
	* gcc.target/powerpc/recip-2.c: Likewise.
	* gcc.target/powerpc/recip-3.c: Likewise.
	* gcc.target/powerpc/recip-4.c: Likewise.
	* gcc.target/powerpc/recip-5.c: Likewise.

From-SVN: r179876
2011-10-12 22:38:57 +00:00
David S. Miller fad034a760 Fix sparc when assembler lacks support for vis3/fmaf instructions.
gcc/

	* config/sparc/sparc.h: Do not force TARGET_VIS3 and TARGET_FMAF
	to zero when assembler lacks support for such instructions.
	* config/sparc/sparc.c (sparc_option_override): Clear MASK_VIS3
	and MASK_FMAF in defaults when assembler lacks necessary support.

gcc/testsuite/

	* gcc.target/sparc/cmask.c: Remove 'vis3' target check and specify
	'-mvis3' instead of 'mcpu=niagara3' in options.
	* gcc.target/sparc/fhalve.c: Likewise.
	* gcc.target/sparc/fnegop.c: Likewise.
	* gcc.target/sparc/fpadds.c: Likewise.
	* gcc.target/sparc/fshift.c: Likewise.
	* gcc.target/sparc/fucmp.c: Likewise.
	* gcc.target/sparc/lzd.c: Likewise.
	* gcc.target/sparc/vis3misc.c: Likewise.
	* gcc.target/sparc/xmul.c: Likewise.

From-SVN: r179875
2011-10-12 15:32:23 -07:00
Eric Botcazou 722356ce27 trans.c (Attribute_to_gnu): Use remove_conversions.
* gcc-interface/trans.c (Attribute_to_gnu): Use remove_conversions.
	(push_range_check_info): Likewise.
	(gnat_to_gnu) <N_Code_Statement>: Likewise.
	* gcc-interface/utils2.c (build_unary_op) <INDIRECT_REF>: Likewise.
	(gnat_invariant_expr): Likewise.
	* gcc-interface/utils.c (compute_related_constant): Likewise.
	(max_size): Fix handling of SAVE_EXPR.
	(remove_conversions): Fix formatting.

From-SVN: r179873
2011-10-12 22:09:21 +00:00
Jakub Jelinek 4eb20b036e sse.md (vec_unpacks_lo_<mode>, [...]): Change VI124_128 mode to VI124_AVX2.
* config/i386/sse.md (vec_unpacks_lo_<mode>,
	vec_unpacks_hi_<mode>, vec_unpacku_lo_<mode>,
	vec_unpacku_hi_<mode>): Change VI124_128 mode to
	VI124_AVX2.
	* config/i386/i386.c (ix86_expand_sse_unpack): Handle
	V32QImode, V16HImode and V8SImode for TARGET_AVX2.

From-SVN: r179872
2011-10-13 00:07:24 +02:00
Jakub Jelinek f228967232 sse.md (vec_avx2): New mode_attr.
* config/i386/sse.md (vec_avx2): New mode_attr.
	(mulv16qi3): Macroize to cover also mulv32qi3 for
	TARGET_AVX2 into ...
	(mul<mode>3): ... this.

From-SVN: r179871
2011-10-13 00:06:45 +02:00
Jakub Jelinek 0c7189ae2d i386.md (UNSPEC_VPERMDI): Remove.
* config/i386/i386.md (UNSPEC_VPERMDI): Remove.
	* config/i386/i386.c (ix86_expand_vec_perm): Handle
	V16QImode and V32QImode for TARGET_AVX2.
	(MAX_VECT_LEN): Increase to 32.
	(expand_vec_perm_blend): Add support for 32-byte integer
	vectors with TARGET_AVX2.
	(valid_perm_using_mode_p): New function.
	(expand_vec_perm_pshufb): Add support for 32-byte integer
	vectors with TARGET_AVX2.
	(expand_vec_perm_vpshufb2_vpermq): New function.
	(expand_vec_perm_vpshufb2_vpermq_even_odd): New function.
	(expand_vec_perm_even_odd_1): Handle 32-byte integer vectors
	with TARGET_AVX2.
	(ix86_expand_vec_perm_builtin_1): Try expand_vec_perm_vpshufb2_vpermq
	and expand_vec_perm_vpshufb2_vpermq_even_odd.
	* config/i386/sse.md (VEC_EXTRACT_EVENODD_MODE): Add for TARGET_AVX2
	32-byte integer vector modes.
	(vec_pack_trunc_<mode>): Use VI248_AVX2 instead of VI248_128.
	(avx2_interleave_highv32qi, avx2_interleave_lowv32qi): Remove pasto.
	(avx2_pshufdv3, avx2_pshuflwv3, avx2_pshufhwv3): Generate
	4 new operands.
	(avx2_pshufd_1, avx2_pshuflw_1, avx2_pshufhw_1): Don't use
	match_dup, instead add 4 new operands and require they have
	right cross-lane values.
	(avx2_permv4di): Change into define_expand.
	(avx2_permv4di_1): New instruction.
	(avx2_permv2ti): Use nonimmediate_operand instead of register_operand
	for "xm" constrained operand.
	(VEC_PERM_AVX2): Add V32QI and V16QI for TARGET_AVX2.

From-SVN: r179870
2011-10-13 00:05:58 +02:00
Jakub Jelinek 9d901b0e8f sse.md (avx2_gathersi<mode>, [...]): Add clobber of match_scratch...
* config/i386/sse.md (avx2_gathersi<mode>,
	avx2_gatherdi<mode>, avx2_gatherdi<mode>256): Add clobber of
	match_scratch, change memory_operand to register_operand,
	add (mem:BLK (scratch)) use.
	(*avx2_gathersi<mode>, *avx2_gatherdi<mode>,
	*avx2_gatherdi<mode>256): Add clobber of match_scratch,
	add earlyclobber to the output operand and match_scratch,
	add (mem:BLK (scratch)) use, change the other mem to match_operand.
	Use %p6 instead of %c6 in the pattern.
	* config/i386/i386.c (ix86_expand_builtin): Adjust for
	operand 2 being a Pmode register_operand instead of memory_operand.

From-SVN: r179869
2011-10-13 00:05:00 +02:00
Eric Botcazou 15bf7d19d4 ada-tree.h (DECL_LOOP_PARM_P): New flag.
* gcc-interface/ada-tree.h (DECL_LOOP_PARM_P): New flag.
	(DECL_INDUCTION_VAR): New macro.
	(SET_DECL_INDUCTION_VAR): Likewise.
	* gcc-interface/gigi.h (convert_to_index_type): Declare.
	(gnat_invariant_expr): Likewise.
	* gcc-interface/decl.c (gnat_to_gnu_entity) <object>: If this is a loop
	parameter, set DECL_LOOP_PARM_P on it.
	* gcc-interface/misc.c (gnat_print_decl) <VAR_DECL>: If DECL_LOOP_PARM_P
	is set, print DECL_INDUCTION_VAR instead of DECL_RENAMED_OBJECT.
	* gcc-interface/trans.c (gnu_loop_label_stack): Delete.
	(struct range_check_info_d): New type.
	(struct loop_info_d): Likewise.
	(gnu_loop_stack): New stack.
	(Identifier_to_gnu): Set TREE_READONLY flag on the first dereference
	built for a by-double-ref read-only parameter.  If DECL_LOOP_PARM_P
	is set, do not test DECL_RENAMED_OBJECT.
	(push_range_check_info): New function.
	(Loop_Statement_to_gnu): Push a new struct loop_info_d instead of just
	the label.  Reference the label and the iteration variable from it.
	Build the special induction variable in the unsigned version of the
	size type, if it is larger than the base type.  And attach it to the
	iteration variable if the latter isn't by-ref.  In the iteration scheme
	case, initialize the invariant conditions in front of the loop if
	deemed profitable.  Use gnu_loop_stack.
	(gnat_to_gnu) <N_Exit_Statement>: Use gnu_loop_stack.
	<N_Raise_Constraint_Error>: Always process the reason.  In the range
	check and related cases, and if loop unswitching is enabled, compute
	invariant conditions and push this information onto the stack.
	Do not translate again the condition if it has been already translated.
	* gcc-interface/utils.c (record_global_renaming_pointer): Assert that
	DECL_LOOP_PARM_P isn't set.
	(convert_to_index_type): New function.
	* gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Use it in order
	to convert the index from the base index type to sizetype.
	(gnat_invariant_expr): New function.

From-SVN: r179868
2011-10-12 22:00:14 +00:00
Paolo Carlini 578f023490 re PR c++/50594 (Option -fwhole-program discards replaced new operator for std::string)
2011-10-12  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/50594
	* decl.c (cxx_init_decl_processing): Add
	__attribute__((externally_visible)) to operator new and
	operator delete library fn.

2011-10-12  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/50594
	* libsupc++/new (operator new, operator delete): Decorate with
	__attribute__((__externally_visible__)).
	* include/bits/c++config: Add _GLIBCXX_THROW.
	* libsupc++/del_op.cc: Adjust.
	* libsupc++/del_opv.cc: Likewise.
	* libsupc++/del_opnt.cc: Likewise.
	* libsupc++/del_opvnt.cc: Likewise.
	* libsupc++/new_op.cc: Likewise.
	* libsupc++/new_opv.cc: Likewise.
	* libsupc++/new_opnt.cc: Likewise.
	* libsupc++/new_opvnt.cc: Likewise.
	* testsuite/18_support/50594.cc: New.
	* testsuite/ext/profile/mutex_extensions_neg.cc: Adjust dg-error
	line number.

From-SVN: r179863
2011-10-12 18:40:58 +00:00
H.J. Lu 0a6fa37645 Add -mfpmath=sse/-mtune=generic to FMA tests.
2011-10-12  H.J. Lu  <hongjiu.lu@intel.com>

	* gcc.target/i386/fma_run_double_1.c: Add -mfpmath=sse.
	* gcc.target/i386/fma_run_double_2.c: Likewise.
	* gcc.target/i386/fma_run_double_3.c: Likewise.
	* gcc.target/i386/fma_run_double_4.c: Likewise.
	* gcc.target/i386/fma_run_double_5.c: Likewise.
	* gcc.target/i386/fma_run_double_6.c: Likewise.
	* gcc.target/i386/fma_run_float_1.c: Likewise.
	* gcc.target/i386/fma_run_float_2.c: Likewise.
	* gcc.target/i386/fma_run_float_3.c: Likewise.
	* gcc.target/i386/fma_run_float_4.c: Likewise.
	* gcc.target/i386/fma_run_float_5.c: Likewise.
	* gcc.target/i386/fma_run_float_6.c: Likewise.

	* gcc.target/i386/l_fma_double_1.c: Add -mtune=generic and
	remove the extra dg-options.
	* gcc.target/i386/l_fma_double_2.c: Likewise.
	* gcc.target/i386/l_fma_double_3.c: Likewise.
	* gcc.target/i386/l_fma_double_4.c: Likewise.
	* gcc.target/i386/l_fma_double_5.c: Likewise.
	* gcc.target/i386/l_fma_double_6.c: Likewise.
	* gcc.target/i386/l_fma_float_1.c: Likewise.
	* gcc.target/i386/l_fma_float_2.c: Likewise.
	* gcc.target/i386/l_fma_float_3.c: Likewise.
	* gcc.target/i386/l_fma_float_4.c: Likewise.
	* gcc.target/i386/l_fma_float_5.c: Likewise.
	* gcc.target/i386/l_fma_float_6.c: Likewise.

From-SVN: r179861
2011-10-12 10:39:11 -07:00
Kai Tietz c482a6511d i386.md (simple_return): Disable if TARGET_SEH is active.
* config/i386/i386.md (simple_return): Disable
        if TARGET_SEH is active.

From-SVN: r179860
2011-10-12 19:05:07 +02:00
Steve Ellcey ccea4a2787 ia64.c (ia64_init_builtins): Fix unbalanced parentheses.
2011-10-12  Steve Ellcey  <sje@cup.hp.com>

	* config/ia64/ia64.c (ia64_init_builtins): Fix unbalanced parentheses.

From-SVN: r179859
2011-10-12 16:04:59 +00:00
Richard Guenther d660a3db5c tree-ssa-alias.c (maybe_skip_until): Cache also at the point of the first store we visit in a basic-block.
2011-10-12  Richard Guenther  <rguenther@suse.de>

	* tree-ssa-alias.c (maybe_skip_until): Cache also at the point
	of the first store we visit in a basic-block.
	(get_continuation_for_phi): Search for a candidate VUSE that
	might dominates all others.  Do pairwise disambiguation against
	that candidate.

From-SVN: r179858
2011-10-12 15:28:48 +00:00
Paul Koning ebbcd0c6ea re PR middle-end/50189 (Wrong code error in -O2 [-fstrict-enums] compile, target independent)
2011-10-12  Paul Koning  <pkoning@gcc.gnu.org>

	PR tree-optimization/50189
	* tree-vrp.c (extract_range_from_assert): Use the type of
	the variable, not the limit.

	* g++.dg/torture/pr50189.C: New testcase.

From-SVN: r179857
2011-10-12 15:16:14 +00:00
Tobias Burnus 7e19152238 invoke.texi (-fwhole-file): Update wording since -fwhole-file is now enabled by default.
2011-10-11  Tobias Burnus  <burnus@net-b.de>
            Janus Weil  <janus@gcc.gnu.org>

        * invoke.texi (-fwhole-file): Update wording since -fwhole-file
        is now enabled by default.


Co-Authored-By: Janus Weil <janus@gcc.gnu.org>

From-SVN: r179854
2011-10-12 16:11:20 +02:00
Richard Guenther d837d73d05 re PR middle-end/50700 (__builtin_object_size computed wrong)
2011-10-12  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/50700
	* tree-object-size.c (addr_object_size): Simplify and treat
	MEM_REF bases consistently.

	* gcc.dg/builtin-object-size-12.c: New testcase.

From-SVN: r179850
2011-10-12 13:19:34 +00:00
Bernd Schmidt 39d52ae5c1 function.c (prepare_shrink_wrap, [...]): New function.
* function.c (prepare_shrink_wrap, bb_active_p): New function.
	(thread_prologue_and_epilogue_insns): Use bb_active_p.
	Call prepare_shrink_wrap, then recompute bb_active_p for the
	last block.

From-SVN: r179848
2011-10-12 12:04:04 +00:00
Joseph Myers a2d5091a51 re PR c/50565 (initializer element is not computable at load time)
PR c/50565
	* convert.c (convert_to_integer): Do not narrow operands of
	pointer subtraction.

testsuite:
	* gcc.c-torture/compile/pr50565-1.c,
	gcc.c-torture/compile/pr50565-2.c: New tests.

From-SVN: r179845
2011-10-12 12:56:03 +01:00
Nick Clifton 58e9ddb14d arm.h (EMIT_EABI_ATTRIBUTE): New macro.
* config/arm/arm.h (EMIT_EABI_ATTRIBUTE): New macro.  Used to
	emit a .eabi_attribute assembler directive, possibly with a
	comment attached.
	* config/arm/arm.c (arm_file_start): Use the new macro.
	* config/arm/arm-c.c (arm_output_c_attributes): Likewise.

From-SVN: r179844
2011-10-12 10:18:17 +00:00
Georg-Johann Lay 9bc9ee6799 re PR target/49939 ([avr] Skip 2-word instructions if applicable)
PR target/49939
	* config/avr/avr.md (*movqi): Rename to movqi_insn.
	(*call_insn): Rename to call_insn.
	(*call_value_insn): Rename to call_value_insn.
	* config/avr/avr.c (avr_2word_insn_p): New static function.
	(jump_over_one_insn_p): Use it.

From-SVN: r179843
2011-10-12 09:59:30 +00:00
Richard Sandiford 2ba87a294f expr.h (copy_blkmode_to_reg): Declare.
gcc/
	* expr.h (copy_blkmode_to_reg): Declare.
	* expr.c (copy_blkmode_to_reg): New function.
	(expand_assignment): Don't expand register RESULT_DECLs before
	the lhs.  Use copy_blkmode_to_reg to copy BLKmode values into a
	RESULT_DECL register.
	(expand_expr_real_1): Handle BLKmode decls when looking for promotion.
	* stmt.c (expand_return): Move BLKmode-to-register code into
	copy_blkmode_to_reg.

From-SVN: r179839
2011-10-12 07:46:58 +00:00