Commit Graph

88701 Commits

Author SHA1 Message Date
Javier Miranda
9febb58f8c sem_ch4.adb (Valid_First_Argument_Of): Complete its functionality to handle synchronized types.
2008-07-31  Javier Miranda  <miranda@adacore.com>

	* sem_ch4.adb (Valid_First_Argument_Of): Complete its functionality to
	handle synchronized types. Required to handle well the object.operation
	notation applied to synchronized types.

From-SVN: r138404
2008-07-31 15:25:48 +02:00
Arnaud Charlet
37ff8abac0 * gnat.dg/specs/sync_iface_test.ads: New test.
From-SVN: r138402
2008-07-31 14:49:43 +02:00
Arnaud Charlet
f32b9cd128 Resync.
From-SVN: r138401
2008-07-31 14:47:08 +02:00
Javier Miranda
15e4986cda sem_type.adb (Has_Compatible_Type): Complete support for synchronized types when...
2008-07-31  Javier Miranda  <miranda@adacore.com>

	* sem_type.adb (Has_Compatible_Type): Complete support for synchronized
	types when the candidate type is a synchronized type.
	
	* sem_res.adb (Resolve_Actuals): Reorganize code handling synchronized
	types, and complete management of synchronized types adding missing
	code to handle formal that is a synchronized type.
	
	* sem_ch4.adb (Try_Primitive_Operation): Avoid testing attributes that
	are not available and cause the compiler to blowup. Found compiling
	test with switch -gnatc
	
	* sem_ch6.adb (Check_Synchronized_Overriding): Remove local subprogram
	Has_Correct_Formal_Mode plus code cleanup.

From-SVN: r138400
2008-07-31 14:46:35 +02:00
Gary Dismukes
e84e11ba0a checks.ads (Apply_Accessibility_Check): Add parameter Insert_Node.
2008-07-31  Gary Dismukes  <dismukes@adacore.com>

	* checks.ads (Apply_Accessibility_Check): Add parameter Insert_Node.
	
	* checks.adb (Apply_Accessibility_Check): Insert the check on
	Insert_Node.
	
	* exp_attr.adb:
	(Expand_N_Attribute_Refernce, Attribute_Access): Pass attribute node
	to new parameter Insert_Node on call to Apply_Accessibility_Check.
	Necessary to distinguish the insertion node because the dereferenced
	formal may come from a rename, but the check must be inserted in
	front of the attribute.
	
	* exp_ch4.adb:
	(Expand_N_Allocator): Pass actual for new Insert_Node parameter on
	call to Apply_Accessibility_Check.
	(Expand_N_Type_Conversion): Pass actual for new Insert_Node parameter
	on call to Apply_Accessibility_Check.
	Minor reformatting

From-SVN: r138399
2008-07-31 14:46:23 +02:00
Vincent Celier
67d7b0ab5f makeutl.adb (Executable_Prefix_Path): If Locate_Exec_On_Path fails...
2008-07-31  Vincent Celier  <celier@adacore.com>

	* makeutl.adb (Executable_Prefix_Path): If Locate_Exec_On_Path fails,
	return the empty string, instead of raising Constraint_Error.

From-SVN: r138398
2008-07-31 14:46:11 +02:00
H.J. Lu
9cc98b79b1 pr16660-1.c: Include "check.h".
2008-07-31  H.J. Lu  <hongjiu.lu@intel.com>

	* gcc.dg/torture/stackalign/pr16660-1.c: Include "check.h".
	(f): Align to 64 byte.  Use check instead of asm statement.

From-SVN: r138397
2008-07-31 05:43:34 -07:00
Arnaud Charlet
ee5d727239 Resync.
From-SVN: r138396
2008-07-31 14:41:23 +02:00
Arnaud Charlet
e92c92b2e2 Resync.
From-SVN: r138395
2008-07-31 14:40:15 +02:00
Vincent Celier
ca311c9fa5 prj-part.adb, [...]: Move back spec of Parse_Single_Project to body...
2008-07-31  Vincent Celier  <celier@adacore.com>

	* prj-part.adb, prj-part.ads, prj.adb, prj.ads, prj-env.adb:
	Move back spec of Parse_Single_Project to body, as it is not called
	outside of package Prj.Part.
	(Project_Data): Remove components Linker_Name, Linker_Path and
	Minimum_Linker_Options as they are no longer set.
	Remove function There_Are_Ada_Sources from package Prj and move code
	in the only place it was used, in Prj.Env.Set_Ada_Paths.

From-SVN: r138394
2008-07-31 14:37:42 +02:00
Ed Schonberg
58fda84daa exp_aggr.adb (Aggr_Size_OK): If the aggregate has a single component and the context is an object...
2008-07-31  Ed Schonberg  <schonberg@adacore.com>

	* exp_aggr.adb (Aggr_Size_OK): If the aggregate has a single component
	and the context is an object declaration with non-static bounds, treat
	the aggregate as non-static.

From-SVN: r138393
2008-07-31 14:37:33 +02:00
Thomas Quinot
13342fb00a tbuild.ads: Fix several occurrences of incorrectly referring to Name_Find as Find_Name.
2008-07-31  Thomas Quinot  <quinot@adacore.com>

	* tbuild.ads: Fix several occurrences of incorrectly referring to
	Name_Find as Find_Name.

From-SVN: r138392
2008-07-31 14:37:24 +02:00
Thomas Quinot
e102a1002e exp_ch9.adb: Minor reformatting
2008-07-31  Thomas Quinot  <quinot@adacore.com>

	* exp_ch9.adb: Minor reformatting

From-SVN: r138391
2008-07-31 14:37:14 +02:00
Bob Duff
23bcc1909d sinput.adb (Skip_Line_Terminators): Fix handling of LF/CR -- it was recognized as two end-of-lines...
2008-07-31  Bob Duff  <duff@adacore.com>

	* sinput.adb (Skip_Line_Terminators): Fix handling of LF/CR -- it was
	recognized as two end-of-lines, but it should be just one.

From-SVN: r138390
2008-07-31 14:37:04 +02:00
Arnaud Charlet
2f62e83f53 * gnat.dg/missing_acc_check.adb: New test.
From-SVN: r138389
2008-07-31 14:31:12 +02:00
Gary Dismukes
01aef5ad76 exp_attr.adb (Enclosing_Object): New function local to handling of access attributes...
2008-07-31  Gary Dismukes  <dismukes@adacore.com>

	* exp_attr.adb (Enclosing_Object): New function local to handling of
	access attributes,
	for retrieving the innermost enclosing object prefix of a compound name.
	(Expand_N_Attribute_Reference, N_Attribute_Access): In the case where an
	Access attribute has a prefix that is a dereference of an access
	parameter (or the prefix is a subcomponent selected from such a
	dereference), apply an accessibility check to the access parameter.
	Replaces code that rewrote the prefix as a type conversion (and that
	didn't handle subcomponent cases).
	Also, this is now only applied in the case of 'Access.
	
	* exp_ch6.adb (Expand_Call): Add handling for the case of an access
	discriminant passed as an actual to an access formal, passing the
	Object_Access_Level of the object containing the access discriminant.

From-SVN: r138388
2008-07-31 13:04:10 +02:00
Vincent Celier
1d06f67ee2 2008-07-31 Vincent Celier <celier@adacore.com>
* prj-nmsc.adb:
	(Record_Ada_Source): Do not set Data.Sources, component has been removed
	
	* prj.adb: Remove component Sources in record Project_Data
	
	* prj.ads: Remove component Sources in record Project_Data
	
	* sinput.ads, prj-util.ads: Minor reformatting

From-SVN: r138387
2008-07-31 13:04:00 +02:00
Ed Schonberg
4f6e2c2422 exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration): Use Insert_Actions to place the pointer declaration in the code...
2008-07-31  Ed Schonberg  <schonberg@adacore.com>

	* exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration): Use
	Insert_Actions to place the pointer declaration in the code, rather
	than Insert_Before_And_Analyze, so that insertions of temporaries are
	kept in the proper order when transient scopes are present.

From-SVN: r138386
2008-07-31 12:27:42 +02:00
Vincent Celier
23ed6584d6 prj-nmsc.adb (Check_Library_Attributes): Check if Linker'Switches or Linker'Default_Switches are declared.
2008-07-31  Vincent Celier  <celier@adacore.com>

	* prj-nmsc.adb (Check_Library_Attributes): Check if Linker'Switches or
	Linker'Default_Switches are declared. Warn if they are declared.

From-SVN: r138385
2008-07-31 12:27:30 +02:00
Geert Bosch
b666e56815 arit64.c: New file implementing __gnat_mulv64 signed integer multiplication with overflow...
2008-07-31  Geert Bosch  <bosch@adacore.com>

	* arit64.c:
	New file implementing __gnat_mulv64 signed integer multiplication with
	overflow checking

	* fe.h (Backend_Overflow_Checks_On_Target): Define for use by Gigi

	* gcc-interface/gigi.h:
	(standard_types): Add ADT_mulv64_decl
	(mulv64_decl): Define subprogram declaration for __gnat_mulv64

	* gcc-interface/utils.c:
	(init_gigi_decls): Add initialization of mulv64_decl

	* gcc-interface/trans.c:
	(build_unary_op_trapv): New function
	(build_binary_op_trapv): New function
	(gnat_to_gnu): Use the above functions instead of
	build_{unary,binary}_op

	* gcc-interface/Makefile.in
	(LIBGNAT_SRCS): Add arit64.c
	(LIBGNAT_OBJS): Add arit64.o

From-SVN: r138384
2008-07-31 12:27:20 +02:00
Hristian Kirtchev
b2c6b35f24 exp_attr.adb (Find_Stream_Subprogram): Check the base type instead of the type when...
2008-07-31  Hristian Kirtchev  <kirtchev@adacore.com>

	* exp_attr.adb (Find_Stream_Subprogram): Check the base type instead
	of the type when looking for stream subprograms for type String,
	Wide_String and Wide_Wide_String.
	
	* s-ststop.adb: Change the initialization expression of constant
	Use_Block_IO.

From-SVN: r138383
2008-07-31 12:27:04 +02:00
Arnaud Charlet
a66495761c s-direio.adb (Reset): Replace pragma Unmodified by Warnings (Off)...
* s-direio.adb (Reset): Replace pragma Unmodified by Warnings (Off),
	so that we can compile this file successfully with -gnatc.

From-SVN: r138382
2008-07-31 12:26:43 +02:00
Vincent Celier
5b960d3635 s-regexp.ads: Minor comment fix
2008-07-31  Vincent Celier  <celier@adacore.com>

	* s-regexp.ads: Minor comment fix

From-SVN: r138381
2008-07-31 12:26:12 +02:00
Pascal Obry
049e74a7a6 s-finimp.ads: Minor reformatting.
2008-07-31  Pascal Obry  <obry@adacore.com>

	* s-finimp.ads: Minor reformatting.

From-SVN: r138380
2008-07-31 12:26:05 +02:00
Thomas Quinot
c969c5cac3 g-pehage.adb: Minor reformatting
2008-07-31  Thomas Quinot  <quinot@adacore.com>

	* g-pehage.adb: Minor reformatting

From-SVN: r138379
2008-07-31 12:25:50 +02:00
Sergey Rybin
b4205ab59d gnat_ugn.texi: Change the description of the Overly_Nested_Control_Structures...
2008-07-31  Sergey Rybin  <rybin@adacore.com>

	* gnat_ugn.texi: Change the description of the
	Overly_Nested_Control_Structures: now the rule always requires a
	positive parameter for '+R' option

From-SVN: r138378
2008-07-31 12:25:35 +02:00
Robert Dewar
c40840b202 sem_ch12.adb: Minor reformatting
2008-07-31  Robert Dewar  <dewar@adacore.com>

	* sem_ch12.adb: Minor reformatting

From-SVN: r138377
2008-07-31 12:25:14 +02:00
Richard Guenther
2dc740101e passes.c (init_optimization_passes): Always call pass_early_warn_uninitialized.
2008-07-31  Richard Guenther  <rguenther@suse.de>

	* passes.c (init_optimization_passes): Always call
	pass_early_warn_uninitialized.
	* opts.c (decode_options): Do not warn about -Wuninitialized
	at -O0.
	* doc/invoke.texi (-Wuninitialized): Correct for enabling at -O0.
	* doc/passes.texi (Warn for uninitialized variables): Adjust.

	* gcc.dg/uninit-1-O0.c: New testcase.
	* gcc.dg/uninit-2-O0.c: Likewise.
	* gcc.dg/uninit-3-O0.c: Likewise.
	* gcc.dg/uninit-4-O0.c: Likewise.
	* gcc.dg/uninit-5-O0.c: Likewise.
	* gcc.dg/uninit-6-O0.c: Likewise.
	* gcc.dg/uninit-8-O0.c: Likewise.
	* gcc.dg/uninit-9-O0.c: Likewise.
	* gcc.dg/uninit-A-O0.c: Likewise.
	* gcc.dg/uninit-B-O0.c: Likewise.
	* gcc.dg/uninit-C-O0.c: Likewise.
	* gcc.dg/uninit-D-O0.c: Likewise.
	* gcc.dg/uninit-E-O0.c: Likewise.
	* gcc.dg/uninit-F-O0.c: Likewise.
	* gcc.dg/uninit-G-O0.c: Likewise.
	* gcc.dg/uninit-H-O0.c: Likewise.
	* gcc.dg/uninit-I-O0.c: Likewise.
	* gcc.dg/uninit-10-O0.c: Likewise.
	* gcc.dg/uninit-11-O0.c: Likewise.
	* gcc.dg/uninit-12-O0.c: Likewise.
	* gcc.dg/uninit-13-O0.c: Likewise.
	* gcc.dg/uninit-14-O0.c: Likewise.
	* gcc.dg/uninit-15-O0.c: Likewise.
	* gcc.dg/Wall.c: Avoid uninitialized warning.
	* gcc.dg/Wno-all.c: Likewise.
	* gcc.dg/pr3074-1.c: Likewise.

From-SVN: r138376
2008-07-31 10:25:11 +00:00
Arnaud Charlet
4d7b9a27a8 * mlib-utl.ads: Fix typo.
From-SVN: r138375
2008-07-31 12:25:05 +02:00
Arnaud Charlet
ad4cb23c94 * gnat.dg/specs/genericppc.ads: New test
From-SVN: r138374
2008-07-31 11:46:03 +02:00
Arnaud Charlet
b38c3c9e46 Resync
From-SVN: r138373
2008-07-31 11:43:09 +02:00
Ed Schonberg
0dabde3a62 sem_ch6.adb (Analyze_Generic_Subprogram_Body): After analysis...
2008-07-31  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch6.adb (Analyze_Generic_Subprogram_Body): After analysis,
	transfer pre/postconditions from generic copy to original tree, so that
	they will appear in each instance.
	(Process_PPCs): Do not transform postconditions into a procedure in a
	generic context, to prevent double expansion of check pragmas.
	
	* sem_attr.adb: In an instance, the prefix of the 'result attribute
	can be the renaming of the
	current instance, so check validity of the name accordingly.

From-SVN: r138372
2008-07-31 11:42:51 +02:00
Vincent Celier
44527de3a6 s-os_lib.adb: Minor comment fix
2008-07-31  Vincent Celier  <celier@adacore.com>

	* s-os_lib.adb: Minor comment fix

From-SVN: r138371
2008-07-31 11:42:39 +02:00
Robert Dewar
393e63ce0f einfo.adb (Spec_PPC): Now defined for generic subprograms
2008-07-31  Robert Dewar  <dewar@adacore.com>

	* einfo.adb (Spec_PPC): Now defined for generic subprograms
	
	* einfo.ads (Spec_PPC): Now defined for generic subprograms
	
	* sem_prag.adb (Check_Precondition_Postcondition): Handle generic
	subprogram case

From-SVN: r138370
2008-07-31 11:42:14 +02:00
Arnaud Charlet
024238a2bf Resync
From-SVN: r138367
2008-07-31 10:30:58 +02:00
Robert Dewar
d47f523225 gnat_ugn.texi: Update -gnatN documentation.
2008-07-31  Robert Dewar  <dewar@adacore.com>

	* gnat_ugn.texi: Update -gnatN documentation.

	* gnat_rm.texi: Add note about pre/postcondition
	pragmas not checked in conjunction with front-end inlining.

From-SVN: r138366
2008-07-31 10:19:24 +02:00
Vincent Celier
c116b98064 prj.adb, [...]: Remove declarations that were for gprmake only
2008-07-31  Vincent Celier  <celier@adacore.com>

	* prj.adb, clean.adb, prj-nmsc.adb, prj.ads: Remove declarations that
	were for gprmake only

From-SVN: r138365
2008-07-31 10:18:53 +02:00
Ed Schonberg
3023ce4262 sem_attr.adb: 'Result can have an ambiguous prefix, and is resolved from context.
2008-07-31  Ed Schonberg  <schonberg@adacore.com>

	sem_attr.adb: 'Result can have an ambiguous prefix, and is resolved
	from context. This attribute must be usable in Ada95 mode.
	The attribute can appear in the body of a function marked
	Inline_Always, but in this case the postocondition is not enforced.
	
	sem_prag.adb (Check_Precondition_Postcondition): within the expansion
	of an inlined call pre- and postconditions are legal

From-SVN: r138364
2008-07-31 10:17:31 +02:00
Robert Dewar
aaf891732c mlib-utl.ads: Minor reformatting
2008-07-31  Robert Dewar  <dewar@adacore.com>

	* mlib-utl.ads: Minor reformatting

From-SVN: r138363
2008-07-31 10:17:03 +02:00
Jakub Jelinek
f9555f402c re PR c/36970 (GCC should display a warning when trying to free a static array)
PR c/36970
	* builtins.c (maybe_emit_free_warning): New function.
	(expand_builtin): Process BUILT_IN_FREE even at -O0.  Call
	maybe_emit_free_warning for BUILT_IN_FREE.

	* gcc.dg/free-1.c: New test.
	* gcc.dg/free-2.c: New test.

From-SVN: r138362
2008-07-31 10:02:49 +02:00
Jakub Jelinek
1e1d38871b re PR debug/36278 (ICE with typedef void in namespace and using the defined type in another when compiling with "-g")
PR debug/36278
	* dwarf2out.c (get_context_die): New function.
	(force_decl_die, force_type_die): Use it.
	(dwarf2out_imported_module_or_decl): Likewise.  If base_type_die
	returns NULL, force generation of DW_TAG_typedef and put that into
	DW_AT_import.

	* g++.dg/debug/namespace2.C: New test.

From-SVN: r138361
2008-07-31 10:01:25 +02:00
Jakub Jelinek
b3e200e135 re PR preprocessor/36649 (-H option doesn't work as expected)
PR preprocessor/36649
	* c-pch.c (c_common_read_pch): Save and restore
	line_table->trace_includes across PCH restore.

	* gcc.dg/pch/cpp-3.c: New test.
	* gcc.dg/pch/cpp-3.hs: New file.
	* gcc.dg/pch/cpp-3a.h: New file.
	* gcc.dg/pch/cpp-3b.h: New file.

From-SVN: r138360
2008-07-31 09:59:18 +02:00
Arnaud Charlet
035b2a7777 Resync
From-SVN: r138358
2008-07-31 09:52:12 +02:00
Arnaud Charlet
216597225a * mlib-utl.ads, prj-makr.ads: Add comments.
From-SVN: r138357
2008-07-31 09:51:44 +02:00
Robert Dewar
5b2a132a13 g-pehage.adb, [...]: Minor reformatting
2008-07-31  Robert Dewar  <dewar@adacore.com>

	* g-pehage.adb, g-pehage.ads: Minor reformatting

From-SVN: r138356
2008-07-31 09:51:32 +02:00
Jason Merrill
844ae01db8 re PR c++/11309 (Testsuite failures in g++.dg/expr/anew1.C (and anew2.C anew3.C anew4.c))
PR c++/11309
        * tree.c (build_aggr_init_expr): Split out...
        (build_cplus_new): ...from here.
        (stabilize_init): Don't mess with AGGR_INIT_EXPR either.
        * init.c (build_new_1): new T() means value-initialization,
        not default-initialization.
        (build_vec_init): Likewise.
        (build_value_init_1): Use build_aggr_init_expr.

From-SVN: r138355
2008-07-31 01:07:10 -04:00
Aaron W. LaFramboise
636b71b99c Makefile.in (EXTRA_GNATRTL_NONTASKING_OBJS): Add s-winext.o.
2008-07-30  Aaron W. LaFramboise  <aaronavay62@aaronwl.com>

	* Makefile.in (EXTRA_GNATRTL_NONTASKING_OBJS) [WINDOWS]: Add 
	s-winext.o.

From-SVN: r138353
2008-07-30 18:18:07 -06:00
GCC Administrator
7c07130ee8 Daily bump.
From-SVN: r138351
2008-07-31 00:16:40 +00:00
Eric Botcazou
01ddebf208 re PR ada/36554 (verify_flow_info ICE can not throw but has EH edges)
PR ada/36554
        * dwarf2out.c (is_subrange_type): Deal with BOOLEAN_TYPE.
ada/
        * back_end.adb (Call_Back_End): Pass Standard_Boolean to gigi.
        * gcc-interface/gigi.h (gigi): Take new standard_boolean parameter.
        * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Enumeration_Subtype>:
        Set precision to 1 for subtype of BOOLEAN_TYPE.
        (set_rm_size): Set TYPE_RM_SIZE_NUM for BOOLEAN_TYPE.
        (make_type_from_size): Deal with BOOLEAN_TYPE.
        * gcc-interface/misc.c (gnat_print_type): Likewise.
        * gcc-interface/trans.c (gigi): Take new standard_boolean parameter.
        Set boolean_type_node as its translation in the table, as well
        as boolean_false_node for False and boolean_true_node for True.
        * gcc-interface/utils.c (gnat_init_decl_processing): Create custom
        8-bit boolean_type_node and set its TYPE_RM_SIZE_NUM.
        (create_param_decl): Deal with BOOLEAN_TYPE.
        (build_vms_descriptor): Likewise.
        (build_vms_descriptor64): Likewise.
        (convert): Deal with BOOLEAN_TYPE like with ENUMERAL_TYPE.

From-SVN: r138348
2008-07-30 23:54:56 +00:00
Rafael Avila de Espindola
b8c71e40e0 re PR bootstrap/36974 (Gcc failed to bootstrap)
2008-07-30  Rafael Avila de Espindola  <espindola@google.com>

	PR 36974
	* final.c (call_from_call_insn): Handle COND_EXEC

From-SVN: r138347
2008-07-30 23:23:33 +00:00