Commit Graph

88727 Commits

Author SHA1 Message Date
Chris Fairles
9d4e8554de chrono (duration): Use explicitly defaulted ctor, cctor, dtor and assignment.
2008-07-31  Chris Fairles <chris.fairles@gmail.com>

        * include/std/chrono (duration): Use explicitly defaulted ctor, cctor,
	 dtor and assignment. Add diagnostics as per 20.8.3 paragraphs 2, 3 
	 and 4 in WD. Other minor tweaks.
        * testsuite/20_util/duration/cons/1_neg.cc: Adjust line numbers.
	* testsuite/20_util/duration/requirements/typedefs_neg1.cc: New.
	* testsuite/20_util/duration/requirements/typedefs_neg2.cc: Likewise.
	* testsuite/20_util/duration/requirements/typedefs_neg3.cc: Likewise.

From-SVN: r138434
2008-07-31 19:37:21 +00:00
Jakub Jelinek
affa55c67f re PR preprocessor/36649 (-H option doesn't work as expected)
PR preprocessor/36649
	* files.c (struct report_missing_guard_data): New type.
	(report_missing_guard): Put paths into an array instead of printing
	them right away.  Return 1 rather than 0.
	(report_missing_guard_cmp): New function.
	(_cpp_report_missing_guards): Sort and print paths gathered by
	report_missing_guard callback.

	* gcc.dg/pch/cpp-3.hs: Add include guards.
	* gcc.dg/pch/cpp-3a.h: Likewise.
	* gcc.dg/pch/cpp-3b.h: Likewise.
	* gcc.dg/cpp/mi8.c: New test.
	* gcc.dg/cpp/mi8a.h: New file.
	* gcc.dg/cpp/mi8b.h: New file.
	* gcc.dg/cpp/mi8c.h: New file.
	* gcc.dg/cpp/mi8d.h: New file.

From-SVN: r138432
2008-07-31 21:12:14 +02:00
Denys Vlasenko
a23eb008dc mkstemps.c (mkstemps): If open failed with errno other than EEXIST, return immediately.
* mkstemps.c (mkstemps): If open failed with errno other than
	EEXIST, return immediately.
	* make-temp-file.c: Include errno.h.
	(make_temp_file): If mkstemps failed, print an error message
	before aborting.

From-SVN: r138429
2008-07-31 20:56:35 +02:00
Paolo Carlini
93cc82d1f3 libstdc++.exp (libstdc++_init): Set v3-libgomp.
2008-07-31  Paolo Carlini  <paolo.carlini@oracle.com>

	* testsuite/lib/libstdc++.exp (libstdc++_init): Set v3-libgomp.
	(check_v3_target_parallel_mode): Robustify, just follow the
	structure of testsuite/Makefile.am.

From-SVN: r138428
2008-07-31 18:43:08 +00:00
Jakub Jelinek
88e2c8107b re PR rtl-optimization/36419 (Wrong unwind info with -Os -fasynchronous-unwind-tables)
PR rtl-optimization/36419
	* dwarf2out.c (barrier_args_size): New variable.
	(compute_barrier_args_size, compute_barrier_args_size_1): New
	functions.
	(dwarf2out_stack_adjust): For BARRIERs call compute_barrier_args_size
	if not called yet in the current function, use barrier_args_size
	array to find the new args_size value.
	(dwarf2out_frame_debug): Free and clear barrier_args_size.

	* g++.dg/eh/async-unwind2.C: New test.

From-SVN: r138427
2008-07-31 20:08:36 +02:00
Jakub Jelinek
41b059f3d8 re PR c++/36405 (ICE with typeid of member function)
PR c++/36405
	* rtti.c (get_tinfo_decl_dynamic, get_typeid): Call
	complete_type_or_else even for UNKNOWN_TYPE to get diagnostics.

	* g++.dg/rtti/typeid8.C: New test.

From-SVN: r138426
2008-07-31 20:07:20 +02:00
Jason Merrill
10ee5386ad re PR middle-end/36633 (warning "array subscript is below array bounds" on delete [] with -O2, -Wall)
PR c++/36633
        * init.c (build_new_1): Don't convert pointer to the data type
        until we're actually going to treat it as that type.

From-SVN: r138425
2008-07-31 13:38:08 -04:00
H.J. Lu
fc74cbc4bd re PR debug/36980 (Bootstrap broken with RTL checking on i586)
2008-07-31  H.J. Lu  <hongjiu.lu@intel.com>

	PR debug/36980
	* dwarf2out.c (dwarf2out_frame_debug_expr): Move rule 17 before
	rule 19.

From-SVN: r138424
2008-07-31 08:32:51 -07:00
Arnaud Charlet
964771d9e9 Resync.
From-SVN: r138422
2008-07-31 16:46:14 +02:00
Robert Dewar
1efe143b3e prj-env.adb: Minor reformatting
2008-07-31  Robert Dewar  <dewar@adacore.com>

	* prj-env.adb: Minor reformatting

From-SVN: r138421
2008-07-31 16:41:32 +02:00
Robert Dewar
eddab7cd5e makeutl.adb: Minor reformatting
2008-07-31  Robert Dewar  <dewar@adacore.com>

	* makeutl.adb: Minor reformatting

From-SVN: r138420
2008-07-31 16:41:22 +02:00
Robert Dewar
86038a882f exp_aggr.adb: Minor reformatting
2008-07-31  Robert Dewar  <dewar@adacore.com>

	* exp_aggr.adb: Minor reformatting

From-SVN: r138419
2008-07-31 16:41:10 +02:00
Jose Ruiz
d59214bd1c 2008-07-31 Jose Ruiz <ruiz@adacore.com>
* s-parame-vxworks.adb
	Document that this body is used for RTX in RTSS (kernel) mode.

	* gcc-interface/Makefile.in
	(LIBGNAT_TARGET_PAIRS for the rtx_rtss run time): Use the
	s-parame-vxworks.adb body in order to have reasonable stack sizes in
	RTX RTSS kernel mode. Virtual memory is not used in that case, so we
	cannot ask for too big values.

From-SVN: r138418
2008-07-31 16:41:01 +02:00
Pascal Obry
289176c9bd prj-nmsc.adb: Keep Object and Exec directory casing.
2008-07-31  Pascal Obry  <obry@adacore.com>

	* prj-nmsc.adb: Keep Object and Exec directory casing.

From-SVN: r138417
2008-07-31 16:40:48 +02:00
H.J. Lu
d7831fdb1e re PR debug/36976 (FAIL: g++.dg/torture/stackalign/unwind-2.C)
2008-07-31  H.J. Lu  <hongjiu.lu@intel.com>

	PR debug/36976
	* dwarf2out.c (dwarf2out_args_size_adjust): New.
	(dwarf2out_stack_adjust): Use it.
	(dwarf2out_frame_debug_expr): Likewise.

From-SVN: r138416
2008-07-31 07:33:43 -07:00
Richard Guenther
12aea97a8d re PR tree-optimization/36978 (ICE in gimple_cond_set_lhs for -O2 -funswitch-loops after tuples merge)
2008-07-31  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/36978
	* tree-ssa-loop-unswitch.c (tree_may_unswitch_on): Do not fold
	the generated condition.

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

From-SVN: r138415
2008-07-31 14:12:24 +00:00
Arnaud Charlet
1e0f7ffb43 Resync.
From-SVN: r138414
2008-07-31 15:58:21 +02:00
Arnaud Charlet
e116fd0cdf * gnat.dg/specs/null_aggr_bug.ads: New test.
From-SVN: r138413
2008-07-31 15:55:12 +02:00
Gary Dismukes
eff332d9a5 2008-07-31 Gary Dismukes <dismukes@adacore.com>
* sem_aggr.adb:
	(Resolve_Record_Aggregate): Bypass error that a type without
	components must have a "null record" aggregate when compiling for Ada
	2005, since it's legal to give an aggregate of form (others => <>)
	for such a type.

From-SVN: r138412
2008-07-31 15:53:55 +02:00
Hristian Kirtchev
2653cbda9e exp_disp.adb (Prim_Op_Kind): Retrieve the full view when a private tagged type is completed by a concurrent type.
2008-07-31  Hristian Kirtchev  <kirtchev@adacore.com>

	* exp_disp.adb (Prim_Op_Kind): Retrieve the full view when a private
	tagged type is completed by a concurrent type.

From-SVN: r138411
2008-07-31 15:53:45 +02:00
Arnaud Charlet
9780576277 * gnat.dg/sync_iface_test.ad[s,b]: New test.
From-SVN: r138410
2008-07-31 15:45:32 +02:00
Arnaud Charlet
fa4bc5ab59 Resync.
From-SVN: r138409
2008-07-31 15:42:37 +02:00
Ed Schonberg
21619cc613 sem_ch10.adb (Build_Unit_Name): If the unit name in a with_clause has the form A.B.C and B is a unit renaming...
2008-07-31  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch10.adb (Build_Unit_Name): If the unit name in a with_clause
	has the form A.B.C and B is a unit renaming, analyze its compilation
	unit and add a with_clause on A.b to the context.

From-SVN: r138408
2008-07-31 15:31:37 +02:00
Hristian Kirtchev
fb59381ec6 2008-07-31 Hristian Kirtchev <kirtchev@adacore.com>
* bindgen.adb Comment reformatting. Update the list of run-time globals.
	(Gen_Adainit_Ada): Add the declaration, import and value set for
	configuration flag Canonical_Streams.
	(Gen_Adainit_C): Add the declaration and initial value of external
	symbol __gl_canonical_streams.
	
	* init.c: Update the list of global values computed by the binder.
	
	* opt.ads: Add flag Canonical_Streams.
	
	* par-prag.adb (Prag): Include Pragma_Canonical_Streams to the list of
	semantically handled pragmas.
	
	* sem_prag.adb: Add an entry into enumeration type Sig_Flags.
	(Analyze_Pragma): Add case for pragma Canonical_Streams.
	
	* snames.adb: Add character value for name Canonical_Streams.
	
	* snames.ads:
	Add Name_Canonical_Streams to the list of configuration pragmas.
	Add Pragma_Canonical_Streams to enumeration type Pragma_Id.
	
	* snames.h: Add a definition for Pragma_Canonical_Streams.
	
	* s-ststop.adb:
	Add a flag and import to seize the value of external symbol
	__gl_canonical_streams. Update comment and initial value of constant
	Use_Block_IO.
	
	* gnat_rm.texi: Add section of pragma Canonical_Streams.
	
	* gnat_ugn.texi:
	Add pragma Canonical_Streams to the list of configuration pragmas.

From-SVN: r138407
2008-07-31 15:27:47 +02:00
Hristian Kirtchev
8198b93da5 sem_ch6.adb (Disambiguate_Spec): Continue the disambiguation if the corresponding spec is a primitive wrapper.
2008-07-31  Hristian Kirtchev  <kirtchev@adacore.com>

	* sem_ch6.adb (Disambiguate_Spec): Continue the disambiguation if the
	corresponding spec is a primitive wrapper. Update comment.

From-SVN: r138406
2008-07-31 15:26:40 +02:00
Quentin Ochem
b8f2b5d9ac 2008-07-31 Quentin Ochem <ochem@adacore.com>
* s-stausa.ad? (Fill_Stack): Stack_Used_When_Filling is now stored
	anymore - just used internally.
	Added handling of very small tasks - when the theoretical size is
	already full at the point of the call.
	(Report_Result): Fixed result computation, Stack_Used_When_Filling does
	not need to be added to the result.

From-SVN: r138405
2008-07-31 15:26:20 +02:00
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