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
* 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 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 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 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 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 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 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 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 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 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 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
* 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 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 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 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 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 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 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 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 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 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 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
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
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
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