gcc/gcc/ada/ChangeLog

5363 lines
207 KiB
Plaintext
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

2015-07-24 Micahel Darling <darlingm@gmail.com>
PR other/66259
* prj-nmsc.adb: Reflects renaming of configure.in to configure.ac
* gcc-interface/Makefile.in: Likewise
2015-07-12 Aldy Hernandez <aldyh@redhat.com>
* gcc-interface/utils.c: Fix double word typos.
* gnat_ugn.texi: Same.
* init.c: Same.
* par.adb: Same.
* projects.texi: Same.
* sem_ch4.adb: Same.
* sem_ch6.adb: Same.
* sem_dim.adb: Same.
* sem_eval.adb: Same.
* sem_prag.adb: Same.
* sem_warn.adb: Same.
2015-07-07 Andrew MacLeod <amacleod@redhat.com>
* gcc-interface/cuintp.c: Adjust includes.
* gcc-interface/decl.c: Likewise.
* gcc-interface/misc.c: Likewise.
* gcc-interface/targtyps.c: Likewise.
* gcc-interface/trans.c: Likewise.
* gcc-interface/utils.c: Likewise.
* gcc-interface/utils2.c: Likewise.
2015-07-06 John Marino <gnugcc@marino.st>
* s-oscons-tmplt.c: Add support for DragonFly alongside FreeBSD.
2015-06-29 Eric Botcazou <ebotcazou@adacore.com>
PR ada/63310
* gcc-interface/utils.c (gnat_write_global_declarations): Always
build the dummy global variable if code was generated.
2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR fortran/66605
* gcc-interface/misc.c (gnat_post_options): No need to disable
warn_unused_parameter anymore.
2015-06-26 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/trans.c (Handled_Sequence_Of_Statements_to_gnu): When
not optimizing the CFG, clear the DECL_DECLARED_INLINE_P flag on the
at-end procedures.
2015-06-26 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/gigi.h (note_types_used_by_globals): Delete.
(gnat_write_global_declarations): New prototype.
* gcc-interface/utils.c (type_decls): Rename back to...
(global_decls): ...this.
(gnat_pushdecls): Revert previous change.
(create_var_decl): Do not output global variables.
(note_types_used_by_globals): Rename back to...
(gnat_write_global_declarations): ...this. Output variables on the
global_decls vector.
* gcc-interface/misc.c (gnat_parse_file): Adjust to above renaming.
2015-06-26 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/gigi.h (create_var_decl_1): Rename into...
(create_var_decl): ...this. Add default value for last parameter.
(create_type_stub_decl): Adjust.
(create_type_decl): Likewise.
(create_field_decl): Likewise.
(create_param_decl): Likewise.
(create_label_decl): Likewise.
(create_subprog_decl): Likewise.
* gcc-interface/utils.c (create_var_decl_1): Rename into...
(create_var_decl): ...this. Rename var_name into name and var_init
into init, move const_decl_allowed_p last and adjust accordingly.
(create_type_stub_decl): Rename type_name into name and adjust.
(create_type_decl): Likewise.
(create_field_decl): Likewise for field_name and field_type.
(create_param_decl): Likewise for param_name and param_type.
(create_label_decl): Likewise for label_name.
(create_subprog_decl): Likewise for subprog_name and subprog_type.
* gcc-interface/decl.c (gnat_to_gnu_entity): Adjust couple of calls
to create_var_decl_1.
2015-06-26 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/trans.c (loop_info_d): Add low_bound, high_bound,
artificial, has_checks and warned_aggressive_loop_optimizations.
(gigi): Set warn_aggressive_loop_optimizations to 0.
(inside_loop_p): New inline predicate.
(push_range_check_info): Rename into...
(find_loop_for): ...this and do not push range_check_info_d object.
(Loop_Statement_to_gnu): Set artificial, low_bound and high_bound
fields of gnu_loop_info. Adjust detection of checks enabled by
-funswitch-loops and adds one for -faggressive-loop-optimizations.
(gnat_to_gnu) <N_Indexed_Component>: If aggressive loop optimizations
are enabled, warn for loops overrunning an array of size 1 not at the
end of a record.
2015-06-25 Andrew MacLeod <amacleod@redhat.com>
* gcc-interface/trans.c: Remove ipa-ref.h and plugin-api.h from include
list.
* gcc-interface/utils.c: Likewise.
2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
* gcc-interface/decl.c (value_annotation_hasher): Inherit from
ggc_cache_ptr_hash rather than ggc_cache_hasher.
* gcc-interface/utils.c (pad_type_hasher): Likewise.
2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
* gcc-interface/decl.c (value_annotation_hasher::handle_cache_entry):
Delete.
(value_annotation_hasher::keep_cache_entry): New function.
* gcc-interface/utils.c (pad_type_hasher::handle_cache_entry):
Delete.
(pad_type_hasher::keep_cache_entry): New function.
2015-06-25 Andrew MacLeod <amacleod@redhat.com>
* gcc-interface/misc.c: Include calls.h not function.h.
2015-06-19 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/gigi.h (record_builtin_type): Adjust comment.
(tree create_type_decl): Likewise.
(create_var_decl_1): Add artificial_p and debug_info_p parameters.
(create_var_decl): Likewise.
(create_true_var_decl): Delete.
(create_subprog_decl): Add debug_info_p parameter.
* gcc-interface/decl.c (gnat_to_gnu_entity): Add artificial_p local
variable and use it throughout. Remove DECL_ARTIFICIAL settings.
<E_Variable>: Adjust calls to create_var_decl and create_var_decl_1.
Remove DECL_IGNORED_P settings.
<E_Enumeration_Type>: Likewise.
<E_Record_Type>: Likewise.
<E_Subprogram_Type>: Likewise. Remove artificial_flag local variable.
Adjust call to create_subprog_decl.
(get_minimal_subprog_decl): Likewise.
(elaborate_expression_1): Adjust call to create_var_decl.
* gcc-interface/trans.c (gigi): Adjust calls to create_var_decl and
create_subprog_decl. Remove DECL_ARTIFICIAL & DECL_IGNORED_P settings.
* gcc-interface/utils.c (maybe_pad_type): Likewise.
(record_builtin_type): Adjust comment.
(create_type_stub_decl): Remove obsolete comment.
(create_var_decl_1): Add artificial_p and debug_info_p parameters.
Set DECL_ARTIFICIAL and DECL_IGNORED_P accordingly.
(create_subprog_decl): Add debug_info_p parameter. Set DECL_IGNORED_P
accordingly.
2015-06-19 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/misc.c (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): Define.
2015-06-19 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Make sure
the size of a padding type built around the return type is positive.
* gcc-interface/trans.c (gnat_to_gnu) <N_Simple_Return_Statement>:
Use INIT_EXPR instead of MODIFY_EXPR to assign to the return object.
2015-06-17 Andrew MacLeod <amacleod@redhat.com>
* gcc-interface/cuintp.c: Do not include input.h, line-map.h or is-a.h.
* gcc-interface/decl.c: Likewise.
* gcc-interface/misc.c: Likewise.
* gcc-interface/targtyps.c: Likewise.
* gcc-interface/trans.c: Likewise.
* gcc-interface/utils.c: Likewise.
* gcc-interface/utils2.c: Likewise.
2015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
* gcc-interface/utils.c (get_global_context): Register the main
translation unit through the new debug hook.
2015-06-09 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/misc.c: Remove duplicate include directives.
* gcc-interface/trans.c: Likewise.
* gcc-interface/utils.c: Likewise.
2015-06-08 Andrew MacLeod <amacleod@redhat.com>
* gcc-interface/cuintp.c : Adjust include files.
* gcc-interface/decl.c : Likewise.
* gcc-interface/misc.c : Likewise.
* gcc-interface/targtyps.c : Likewise.
* gcc-interface/trans.c : Likewise.
* gcc-interface/utils.c : Likewise.
* gcc-interface/utils2.c : Likewise.
2015-06-08 John Marino <gnugcc@marino.st>
* a-intnam-dragonfly.ads: New.
* s-osinte-dragonfly.adb: Likewise.
* s-osinte-dragonfly.ads: Likewise.
* system-dragonfly-x86_64.ads: Likewise.
* adaint.c: Add BSD macros.
* cstreams.c: Likewise.
* gsocket.h: Likewise.
* link.c: Likewise.
* socket.c: Likewise.
* env.c: Add __DragonFly__, remove __FreeBSD__ macro.
* init.c: Add __DragonFly__, change __gnat_install_handler
prototype from empty to void.
* initialize.c: Add __DragonFly__.
* sysdep.c: Likewise.
* s-osinte-freebsd.adb: Use __get_errno instead of __error.
* tracebak.c: Set unwinder for i386 BSD.
* gcc-interface/Makefile.in: Add x86_64 DragonFly, tweak
x86_64 FreeBSD and x86 FreeBSD.
2015-06-06 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/utils.c (note_types_used_by_globals): Tweak comment.
* gcc-interface/decl.c (gnat_to_gnu_entity): Likewise.
2015-06-05 Aldy Hernandez <aldyh@redhat.com>
* gcc-interface/gigi.h (note_types_used_by_globals): Rename from
gnat_write_global_declarations.
* gcc-interface/misc.c (gnat_parse_file): Call
note_types_used_by_globals.
Remove LANG_HOOKS_WRITE_GLOBALS.
* gcc-interface/utils.c: Rename global_decls to type_decls.
(gnat_write_global_declarations): Rename
to note_types_used_by_globals.
Remove call to finalize_compilation_unit.
Remove call to debug_hooks->global_decl for globals.
(gnat_pushdecls): Only insert into type_decls if TYPE_DECL.
2015-06-04 Andrew MacLeod <amacleod@redhat.com>
* gcc-interface/cuintp.c: Adjust includes for restructured coretypes.h.
* gcc-interface/decl.c: Likewise.
* gcc-interface/misc.c: Likewise.
* gcc-interface/targtyps.c: Likewise.
* gcc-interface/trans.c: Likewise.
* gcc-interface/utils.c: Likewise.
* gcc-interface/utils2.c: Likewise.
2015-06-04 Pierre-Marie de Rodat <derodat@adacore.com>
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: If
processing a definition, create definitions for padding types
around return types.
2015-06-03 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/utils.c (copy_type): Also set TYPE_CANONICAL.
2015-06-03 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/trans.c (gnat_to_gnu) <N_Simple_Return_Statement>: Fix
typo in latest change.
2015-06-01 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/Makefile.in: Fix ARM/Darwin configuration.
2015-06-01 Pierre-Marie de Rodat <derodat@adacore.com>
* gcc-interface/utils.c (scale_by_factor_of): When handling a function
call expression, process the corresponding function body. Also handle
potential addends.
2015-06-01 Pierre-Marie de Rodat <derodat@adacore.com>
* gcc-interface/decl.c (gnat_to_gnu_entity): Replace pointer types with
references ones for functions that return references.
2015-06-01 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: For a
definition of a type coming from a limited_with, get to the full view
if it is not in the main code unit.
2015-06-01 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/utils.c (create_var_decl_1): If an assembler name is
specified, let the target mangle it before settting.
(create_subprog_decl): Likewise and move this treatment last.
2015-06-01 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/lang-specs.h (TARGET_VXWORKS_RTP): Move substitution to
before first -gnatez switch. Simplify and add trailing space.
2015-06-01 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: If the
record has a parent field and a representation clause, make sure that
it is properly aligned.
2015-06-01 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/trans.c (lvalue_required_p) <N_Indexed_Component>: Deal
with character and enumeration literals as index values.
2015-06-01 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/gigi.h (build_simple_component_ref): Declare.
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Deal with
address clause on aliased object with unconstrained nominal subtype.
Mark the aligning variable as artificial, do not convert the address
expression immediately but mark it as constant instead.
* gcc-interface/utils.c (convert): If the target type contains a
template, be prepared for an empty array.
(maybe_unconstrained_array): Likewise.
* gcc-interface/utils2.c (known_alignment) <POINTER_PLUS_EXPR>: Deal
with the pattern built for aligning types.
<INTEGER_CST>: Do not cap the value at BIGGEST_ALIGNMENT.
(build_simple_component_ref): Make public.
If the base object is a constructor that contains a template, fold the
result field by field.
2015-05-31 Eric Botcazou <ebotcazou@adacore.com>
* s-oscons-tmplt.c: Add explicit tests for Android alongside Linux.
2015-05-30 Eric Botcazou <ebotcazou@adacore.com>
* adaint.c: Test for __linux__ instead of linux and __sun__ instead
of sun. Add missing leading underscore to AIX. Remove #elif 0.
* adaint.h: Likewise.
* cio.c: Likewise.
* cstreams.c: Likewise.
* env.c: Likewise.
* gsocket.h: Likewise.
* init.c: Likewise. Test for __i386__ instead of i386.
* link.c: Likewise.
* s-oscons-tmplt.c: Likewise.
* sysdep.c: Likewise.
* terminals.c: Likewise. Use BSD symbol instead of FREEBSD.
* tracebak.c: Likewise. Test for __sparc__ instead of sparc.
2015-05-28 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/utils.c (max_size) <tcc_binary>: Add special code to
deal with the subtraction of a "negative" value in an unsigned type.
2015-05-28 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Do
not error out on a return type which has a size that overflows if the
return is done by invisible reference.
2015-05-28 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/utils.c (gnat_pushdecl): Reunify the handling of array
and pointer types wrt DECL_ORIGINAL_TYPE and adjust left and right.
2015-05-28 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/gigi.h (gnat_stabilize_reference): Adjust.
(rewrite_fn): Remove third parameter.
(type_is_padding_self_referential): New inline predicate.
(return_type_with_variable_size_p): Likewise.
* gcc-interface/decl.c (allocatable_size_p): More around.
(cannot_be_superflat_p): Rename into...
(cannot_be_superflat ): ...this.
(initial_value_needs_conversion): New predicate.
(gnat_to_gnu_entity): Invoke type_is_padding_self_referential,
initial_value_needs_conversion and adjust to above renaming.
For a renaming, force the materialization if the inner expression
is compound. Adjust calls to elaborate_reference and build a
compound expression if needed.
(struct er_dat): Add N field.
(elaborate_reference_1): Remove N parameter and adjust.
(elaborate_reference): Add INIT parameter and pass it in the call to
gnat_rewrite_reference. Adjust initial expression.
* gcc-interface/trans.c (Call_to_gnu): Treat renamings the same way as
regular object declarations when it comes to creating a temporary.
Adjust call to gnat_stabilize_reference and build a compound expression
if needed. Invoke return_type_with_variable_size_p.
(gnat_to_gnu): Invoke type_is_padding_self_referential. In case #4,
return a call to a function unmodified if it returns with variable size
and is also the initial expression in an object declaration.
* gcc-interface/utils2.c (build_binary_op) <INIT_EXPR>: Use the RHS'
type if it is a call to a function that returns with variable size.
(build_unary_op): Invoke type_is_padding_self_referential.
(gnat_stabilize_reference_1): Remove N parameter and adjust.
(gnat_stabilize_reference): Add INIT parameter and pass it in the call
to gnat_rewrite_reference.
(gnat_rewrite_reference): Remove N, add INIT parameter and adjust.
<COMPOUND_EXPR>: New case.
2015-05-28 Ed Schonberg <schonberg@adacore.com>
* sem_ch3.adb (Is_Visible_Component): Component is visible
in a derived type if inherited through an ancestor that has a
partial view of the original type holding the component, if the
full view of that original type is in scope.
* sem_util.ads (Get_Body_From_Stub): Works for all kinds of stubs.
2015-05-28 Bob Duff <duff@adacore.com>
* sem_util.adb (Requires_Transient_Scope): For definite untagged
subtypes, we should never have to use the secondary stack. This moves
toward that goal. But there are still cases that don't work.
Here, we move the check for Is_Definite first, but add a
special-purpose check for Has_Discrim_Dep_Array.
2015-05-28 Bob Duff <duff@adacore.com>
* sem_util.adb (Requires_Transient_Scope): Avoid returning
function results on the secondary stack in so many cases.
2015-05-28 Ed Schonberg <schonberg@adacore.com>
* sem_util.adb (Wrong_Type): In any instance, do not emit error
if type of expression is the partial view of the expected type.
2015-05-28 Ed Schonberg <schonberg@adacore.com>
* sem_res.adb (Resolve_Actuals): a) The replacement of formal
names in named associations only needs to be done within an
instance, on a call to a primitive of a formal derived type,
where the actual subprogram may have different formal names than
those of the primitive operation of the formal type.
b) Defaulted parameters must be taken into account when obtaining
the names of the formals of the actual subprogram being called.
2015-05-28 Robert Dewar <dewar@adacore.com>
* sem_ch13.adb, sem_disp.ads: Minor reformatting.
2015-05-28 Ed Schonberg <schonberg@adacore.com>
* sem_util.adb (Set_Debug_Info_Needed): For a private type
whose full view is itself a derived private type, set flag on
underlying full view as well, for proper gdb display.
2015-05-28 Bob Duff <duff@adacore.com>
* exp_tss.ads: Minor comment fix.
* exp_ch3.adb (Build_Array_Init_Proc, Build_Record_Init_Proc):
Inline init_procs when the type has controlled parts. Remove
obsolete comments about those init_procs -- init_procs for
such types are no longer complex. A typical init_proc just
initializes the 'Tag field, and calls the parent init_proc
(e.g. for Limited_Controlled), which calls the grandparent
(for Root_Controlled), which does nothing. This all boils down
to one instruction when inlined.
* exp_ch7.adb (Create_Finalizer): Inline the finalizer.
2015-05-28 Ed Schonberg <schonberg@adacore.com>
* sem_ch4.adb (Analyze_Selected_Component): If the type to use
is a derived type and is a generic actual, the selected component
appears within an instance body, and the check over the type
has failed, examine ancestor types for the desired component.
(Find_Component_In_Instance): If record type is a derived type,
examine all ancestors in order to locate desired component.
2015-05-27 H.J. Lu <hongjiu.lu@intel.com>
* gcc-interface/Makefile.in (TOOLS_LIBS): Add @NO_PIE_FLAG@.
2015-05-27 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/trans.c (elaborate_all_entities): Do not elaborate an
incomplete type coming from a limited_with and whose non-limited view
comes from the main unit.
2015-05-27 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Move down
code applying atomic checks to the object.
2015-05-27 Robert Dewar <dewar@adacore.com>
* sem_aux.adb: Minor rewording.
2015-05-27 Bob Duff <duff@adacore.com>
* exp_prag.adb (Expand_Pragma_Abort_Defer): Make
pragma Abort_Defer do nothing if Abort_Allowed is False.
2015-05-27 Arnaud Charlet <charlet@adacore.com>
* exp_ch9.adb, sem_util.adb, sem_util.ads, s-stposu.adb, s-spsufi.ads,
sem_elab.ads, g-comlin.ads, errout.ads, exp_ch6.adb, sem_ch4.adb,
opt.ads, s-bignum.adb, output.ads, sem_ch13.adb, erroutc.ads,
sem_disp.ads, exp_ch3.adb: Minor fixes of duplicate words in comments.
2015-05-27 Doug Rupp <rupp@adacore.com>
* adaint.c (__gnat_tmp_name) [vxworks]: Robustify and use for rtp as
well as kernel.
2015-05-27 Pierre-Marie de Rodat <derodat@adacore.com>
* par_sco.adb (Process_Decision): Store sloc to
condition/pragmas SCOs associations into a temporary table before
moving them to the SCO_Raw_Hash_Table so that we can back them
out just like we do for SCO entries that are simple decisions
in an expression context.
2015-05-27 Ed Schonberg <schonberg@adacore.com>
* sem_ch6.adb (Process_Formals): A non-private formal type that
is a limited view does not have a list of private dependents.
2015-05-27 Ed Schonberg <schonberg@adacore.com>
* exp_ch5.adb (Expand_N_Case_Statement): If the expression in
the case statement is a compile-time known value, we look for a
corresponding alternative to optimize the case statement into a
single case. If the type has a static predicate and the expression
does not satisfy the predicate, there is no legal alternative and
this optimization is not applicable. Excecution is erroneous,
or else if assertions are enabled, an exception will be raised
earlier, at the point the expression is elaborated.
2015-05-27 Robert Dewar <dewar@adacore.com>
* sem_elab.adb (Check_Internal_Call_Continue): Suppress
warning on Finalize, Adjust, or Initialize if type involved has
Warnings_Off set.
2015-05-27 Ed Schonberg <schonberg@adacore.com>
* sem_aux.adb, sem_aux.ads (First_Discriminant): Return empty when
applied to a type with no known discriminants.
2015-05-26 Robert Dewar <dewar@adacore.com>
* errout.ads, sem_ch4.adb, sem_ch6.adb: Minor reformatting.
2015-05-26 Bob Duff <duff@adacore.com>
* sem_elab.adb (Check_A_Call): In the case where we're
calling something in an instance of a generic package that is
within this same unit (as the call), make sure we treat it
as a call to an entity within the same unit. That is, call
Check_Internal_Call, rather than putting "Elaborate_All(X)"
on X, which would necessarily result in an elaboration cycle in
static-elaboration mode.
2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
* freeze.ads (Is_Atomic_VFA_Aggregate): Adjust profile.
* freeze.adb (Is_Atomic_VFA_Aggregate): Change Entity
parameter into Node parameter and remove Type parameter.
Look at Is_Atomic_Or_VFA both on the type and on the object.
(Freeze_Entity): Adjust call to Is_Atomic_VFA_Aggregate.
* exp_aggr.adb (Expand_Record_Aggregate): Likewise.
(Process_Atomic_Independent_Shared_Volatile): Remove code
propagating Atomic or VFA from object to locally-defined type.
2015-05-26 Bob Duff <duff@adacore.com>
* exp_ch7.adb: Minor comment fix.
2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/trans.c (Attribute_to_gnu) <Attr_Min/Attr_Max>: Do not
bother about NaN's if Machine_Overflows is true.
2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/trans.c (gnat_to_gnu) <N_Object_Declaration>: Really
force evaluation of the expression, if any, when the object has its
elaboration delayed. Do not create a variable at global level.
2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/trans.c (Attribute_to_gnu) <Attr_Machine>: Do not apply
extra-precision trick to literals. Build SAVE_EXPR manually.
* gcc-interface/misc.c (enumerate_modes): Add bypass for x86/x86-64.
2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/ada-tree.h (DECL_GLOBAL_NONCONSTANT_RENAMING_P): Delete
(DECL_RENAMED_OBJECT): Adjust comment.
* gcc-interface/gigi.h (record_global_nonconstant_renaming): Delete.
(invalidate_global_nonconstant_renamings): Likewise.
(gnat_constant_reference_p): Likewise.
(rewrite_fn): New function type.
(gnat_rewrite_reference): Declare.
(call_is_atomic_load): New inline predicate.
* gcc-interface/decl.c (elaborate_reference_1): New function.
(elaborate_reference): Likewise.
(gnat_to_gnu_entity): Call elaborate_reference to elaborate renamings
and simplify associated code. Set const_flag to true consistently in
conjunction with used_by_ref.
* gcc-interface/trans.c (Identifier_to_gnu): Always replace renaming
pointers by renamed objects.
(outer_atomic_access_required_p): Deal with renamings.
(Compilation_Unit_to_gnu): Do not call
invalidate_global_nonconstant_renamings.
(gnat_to_gnu) <N_Object_Renaming_Declaration>: Adjust comment.
(gnat_gimplify_expr): Deal with atomic loads.
* gcc-interface/utils.c (global_nonconstant_renamings): Delete.
(destroy_gnat_utils): Do not call
invalidate_global_nonconstant_renamings.
(record_global_nonconstant_renaming): Delete.
(invalidate_global_nonconstant_renamings): Likewise.
* gcc-interface/utils2.c (call_is_atomic_load): Move to gigi.h.
(build_load_modify_store): Build a copy of the destination.
(gnat_stabilize_reference_1): Adjust.
(gnat_stabilize_reference): Call gnat_stabilize_reference_1 through
gnat_rewrite_reference and move bulk of code to...
(gnat_rewrite_reference): ...here. New global function.
(gnat_constant_reference_p): Delete.
2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/gigi.h (gnat_stabilize_reference): Adjust prototype.
* gcc-interface/decl.c (gnat_to_gnu_entity): Do not rely on const_flag
to detect constant renamings. Be prepared for specific pattern of
renamed object based on function calls. Create a constant object
for the renaming of a NULL_EXPR or of a CONSTRUCTOR. Adjust calls
to gnat_stabilize_reference and tidy up. Remove redundant tests.
(elaborate_expression_1): Remove obsolete test and tidy up.
* gcc-interface/trans.c (Call_to_gnu): Do not stabilize In/Out or Out
parameters passed by reference.
(gnat_to_gnu) <N_Selected_Component>: Remove redundant protection again
side-effects.
Use gnat_protect_expr instead of gnat_stabilize_reference for general
protection against side-effects.
* gcc-interface/utils2.c (gnat_stable_expr_p): New predicate.
(gnat_save_expr): Invoke it.
(gnat_protect_expr): Likewise.
(gnat_stabilize_reference_1): Likewise. Remove useless propagation
of TREE_THIS_NOTRAP.
(gnat_stabilize_reference): Remove parameter and adjust throughout.
Delete ADDR_EXDR, COMPOUND_EXPR and CONSTRUCTOR cases.
Restrict CALL_EXPR case to atomic loads and tweak ERROR_MARK case.
2015-05-26 Ed Schonberg <schonberg@adacore.com>
* sinfo.ads: Minor reformatting.
* sem_aux.ads: Clarify use of First_Discriminant.
* sem_ch4.adb (Analyze_Explicit_Dereference): The use of a limited
view is replaced with the non-limited view in an instance body,
where the enclosing unit must have a regular with_clause on the
relevant unit.
* sem_ch12.adb (Install_Body): Freeze instantation after its
body. Remove useless freeze nodes for incomplete actuals to
prevent multiple generation of internal operations.
(Instantiate_Package_Body): Set sloc of body appropriately when
there are incomplete actuals and the instance body is placed in
the body of the enclosing unit.
* errout.ads: Consistent punctuation, better alignment and trivial
typos in comments.
* err_vars.ads: Fix typo.
2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
* sem_ch8.adb (Analyze_Object_Renaming): Lift restriction on
components of Volatile_Full_Access objects.
2015-05-26 Ed Schonberg <schonberg@adacore.com>
* sem_ch6.adb (Is_Non_Overriding_Operation,
Get_Generic_Parent_Type): Handle properly the case of a derived
scalar type by using the first subtype rather than its generated
anonymous base type.
2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
* einfo.adb (Write_Field17_Name): Move E_Incomplete_Subtype
case to...
(Write_Field19_Name): ...here.
2015-05-26 Ed Schonberg <schonberg@adacore.com>
* sem_ch13.adb: sem_ch13.adb (Add_Predicates): Undo analysis
of original expression in ASIS mode: does not solve the ASIS
problem of a usable type information, and crashes the back-end
when performing type annotations.
2015-05-26 Robert Dewar <dewar@adacore.com>
* sem_disp.adb (Inherited_Subprograms): Add One_Only parameter.
(Is_Overriding_Subprogram): Use One_Only_Parameter.
* sem_disp.ads (Inherited_Subprograms): Add One_Only parameter.
2015-05-26 Robert Dewar <dewar@adacore.com>
* exp_prag.adb, sem_ch3.adb, sem_ch5.adb, exp_ch11.adb, ghost.adb,
exp_ch6.adb, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb, sem_ch13.adb,
exp_ch3.adb: Minor reformatting.
2015-05-26 Bob Duff <duff@adacore.com>
* treepr.adb: Minor improvement to debugging routines (pp, pn)
robustness. Rearrange the code so passing a nonexistent Node_Id
prints "No such node" rather than crashing, and causing gdb to
generate confusing messages.
2015-05-26 Gary Dismukes <dismukes@adacore.com>
* sem_util.adb: Minor typo fix.
2015-05-26 Yannick Moy <moy@adacore.com>
* sem_aux.adb (Subprogram_Body_Entity): Deal with subprogram stubs.
2015-05-26 Hristian Kirtchev <kirtchev@adacore.com>
* exp_ch3.adb (Expand_N_Full_Type_Declaration): Capture, set and
restore the Ghost mode.
(Expand_N_Object_Declaration): Capture, set and restore the Ghost mode.
(Freeze_Type): Update the call to Set_Ghost_Mode.
(Restore_Globals): New routine.
* exp_ch5.adb Add with and use clauses for Ghost.
(Expand_N_Assignment_Statement): Capture, set and restore the
Ghost mode.
(Restore_Globals): New routine.
* exp_ch6.adb Add with and use clauses for Ghost.
(Expand_N_Procedure_Call_Statement): Capture, set and
restore the Ghost mode.
(Expand_N_Subprogram_Body):
Code cleanup. Capture, set and restore the Ghost mode.
(Expand_N_Subprogram_Declaration): Capture, set and restore the
Ghost mode.
(Restore_Globals): New routine.
* exp_ch7.adb Add with and use clauses for Ghost.
(Expand_N_Package_Body): Capture, set and restore the Ghost mode.
(Expand_N_Package_Declaration): Capture, set and restore the
Ghost mode.
(Wrap_HSS_In_Block): Create a proper identifier for the block.
* exp_ch8.adb Add with and use clauses for Ghost.
(Expand_N_Exception_Renaming_Declaration): Code
cleanup. Capture, set and restore the Ghost mode.
(Expand_N_Object_Renaming_Declaration): Capture, set and restore
the Ghost mode.
(Expand_N_Package_Renaming_Declaration): Capture, set and restore the
Ghost mode.
(Expand_N_Subprogram_Renaming_Declaration): Capture, set and
restore the Ghost mode.
* exp_ch11.adb (Expand_N_Exception_Declaration): Code
cleanup. Capture, set and restore the Ghost mode.
* exp_disp.adb (Make_DT): Update the call to Set_Ghost_Mode. Do
not initialize the dispatch table slot of a Ghost subprogram.
* exp_prag.adb Add with and use clauses for Ghost.
(Expand_Pragma_Check): Capture, set and restore the Ghost mode.
(Expand_Pragma_Contract_Cases): Capture, set and restore the
Ghost mode.
(Expand_Pragma_Initial_Condition): Capture, set and
restore the Ghost mode.
(Expand_Pragma_Loop_Variant): Capture,
set and restore the Ghost mode.
(Restore_Globals): New routine.
* exp_util.adb Add with and use clauses for Ghost.
(Make_Predicate_Call): Code cleanup. Capture, set and restore
the Ghost mode.
(Restore_Globals): New routine.
* freeze.adb (Freeze_Entity): Code cleanup. Update the call
to Set_Ghost_Mode.
* ghost.adb Add with and use clause for Sem_Prag.
(Check_Ghost_Completion): Code cleanup.
(Check_Ghost_Overriding): New routine.
(Check_Ghost_Policy): Code cleanup.
(Ghost_Entity): New routine.
(Is_Ghost_Declaration): Removed.
(Is_Ghost_Statement_Or_Pragma): Removed.
(Is_OK_Context): Reimplemented.
(Is_OK_Declaration): New routine.
(Is_OK_Pragma): New routine.
(Is_OK_Statement): New routine.
(Mark_Full_View_As_Ghost): New routine.
(Mark_Pragma_As_Ghost): New routine.
(Mark_Renaming_As_Ghost): New routine.
(Propagate_Ignored_Ghost_Code): Update the comment on usage.
(Set_From_Entity): New routine.
(Set_From_Policy): New routine.
(Set_Ghost_Mode): This routine now handles pragmas and freeze nodes.
(Set_Ghost_Mode_For_Freeze): Removed.
(Set_Ghost_Mode_From_Entity): New routine.
(Set_Ghost_Mode_From_Policy): Removed.
* ghost.ads (Check_Ghost_Overriding): New routine.
(Mark_Full_View_As_Ghost): New routine.
(Mark_Pragma_As_Ghost): New routine.
(Mark_Renaming_As_Ghost): New routine.
(Set_Ghost_Mode): Update the parameter profile. Update the
comment on usage.
(Set_Ghost_Mode_For_Freeze): Removed.
(Set_Ghost_Mode_From_Entity): New routine.
* sem_ch3.adb (Analyze_Full_Type_Declaration):
Capture and restore the Ghost mode. Mark a type
as Ghost regardless of whether it comes from source.
(Analyze_Incomplete_Type_Decl): Capture, set and restore the
Ghost mode.
(Analyze_Number_Declaration): Capture and restore the Ghost mode.
(Analyze_Object_Declaration): Capture and restore the Ghost mode.
(Analyze_Private_Extension_Declaration): Capture and
restore the Ghost mode.
(Analyze_Subtype_Declaration): Capture and restore the Ghost mode.
(Process_Full_View): The full view inherits all Ghost-related
attributes from the private view.
(Restore_Globals): New routine.
* sem_ch5.adb (Analyze_Assignment): Capture and restore the
Ghost mode.
(Restore_Globals): New routine.
* sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration):
Code cleanup. Capture and restore the Ghost mode. Mark a
subprogram as Ghost regarless of whether it comes from source.
(Analyze_Procedure_Call): Capture and restore the Ghost mode.
(Analyze_Subprogram_Body_Helper): Capture and restore the Ghost mode.
(Analyze_Subprogram_Declaration): Capture and restore the Ghost mode.
(New_Overloaded_Entity): Ensure that a
parent subprogram and an overriding subprogram have compatible
Ghost policies.
* sem_ch7.adb (Analyze_Package_Body_Helper): Capture and restore
the Ghost mode.
(Analyze_Package_Declaration): Capture and
restore the Ghost mode. Mark a package as Ghost when it is
declared in a Ghost region.
(Analyze_Private_Type_Declaration): Capture and restore the Ghost mode.
(Restore_Globals): New routine.
* sem_ch8.adb (Analyze_Exception_Renaming): Code
reformatting. Capture and restore the Ghost mode. A renaming
becomes Ghost when its name references a Ghost entity.
(Analyze_Generic_Renaming): Capture and restore the Ghost mode. A
renaming becomes Ghost when its name references a Ghost entity.
(Analyze_Object_Renaming): Capture and restore the Ghost mode. A
renaming becomes Ghost when its name references a Ghost entity.
(Analyze_Package_Renaming): Capture and restore the Ghost mode. A
renaming becomes Ghost when its name references a Ghost entity.
(Analyze_Subprogram_Renaming): Capture and restore the Ghost
mode. A renaming becomes Ghost when its name references a
Ghost entity.
* sem_ch11.adb (Analyze_Exception_Declaration): Capture, set
and restore the Ghost mode.
* sem_ch12.adb (Analyze_Generic_Package_Declaration): Capture and
restore the Ghost mode.
(Analyze_Generic_Subprogram_Declaration):
Capture and restore the Ghost mode.
* sem_ch13.adb Add with and use clauses for Ghost.
(Add_Invariant): New routine.
(Add_Invariants): Factor out code.
(Add_Predicate): New routine.
(Add_Predicates): Factor out code.
(Build_Invariant_Procedure_Declaration): Code cleanup. Capture,
set and restore the Ghost mode.
(Build_Invariant_Procedure): Code cleanup.
(Build_Predicate_Functions): Capture, set and
restore the Ghost mode. Mark the generated functions as Ghost.
* sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part):
Capture, set and restore the Ghost mode.
(Analyze_External_Property_In_Decl_Part): Capture, set and restore
the Ghost mode.
(Analyze_Initial_Condition_In_Decl_Part):
Capture, set and restore the Ghost mode.
(Analyze_Pragma):
Code cleanup. Capture, set and restore the Ghost mode. Flag
pragmas Linker_Section, No_Return, Unmodified, Unreferenced and
Unreferenced_Objects as illegal when it applies to both Ghost
and living arguments. Pragma Ghost cannot apply to synchronized
objects.
(Check_Kind): Moved to the spec of Sem_Prag.
(Process_Inline): Flag the pragma as illegal when it applies to
both Ghost and living arguments.
(Restore_Globals): New routine.
* sem_prag.ads Add pragma Default_Initial_Condition
to table Assertion_Expression_Pragma. Add new table
Is_Aspect_Specifying_Pragma.
(Check_Kind): Moved from body of Sem_Prag.
* sem_util.adb Add with and use clauses for Ghost.
(Build_Default_Init_Cond_Procedure_Body): Capture, set and restore
the Ghost mode.
(Build_Default_Init_Cond_Procedure_Declaration):
Capture, set and restore the Ghost mode. Mark the default
initial condition procedure as Ghost when it is declared
in a Ghost region.
(Is_Renaming_Declaration): New routine.
(Policy_In_List): Account for the single argument version of
Check_Pragma.
* sem_util.ads (Is_Renaming_Declaration): New routine.
* sinfo.adb (Is_Ghost_Pragma): New routine.
(Set_Is_Ghost_Pragma): New routine.
* sinfo.ads New attribute Is_Ghost_Pragma.
(Is_Ghost_Pragma): New routine along with pragma Inline.
(Set_Is_Ghost_Pragma): New routine along with pragma Inline.
2015-05-26 Robert Dewar <dewar@adacore.com>
* sem_ch3.adb, sem_aux.adb, sem_aux.ads, exp_ch6.adb, sprint.adb:
Minor reformatting.
2015-05-26 Gary Dismukes <dismukes@adacore.com>
* gnat1drv.adb, targparm.adb, targparm.ads, restrict.adb: Minor
reformatting and typo fixes in comments.
2015-05-26 Ed Schonberg <schonberg@adacore.com>
* sem_ch7.adb (Swap_Private_Dependets): Set visibility of
the two views of a private dependent in two separate steps,
to ensure proper visibility in parent units analyzed for inlining.
2015-05-26 Yannick Moy <moy@adacore.com>
* sem_aux.adb, sem_aux.ads (Get_Low_Bound): Use Type_Low_Bound.
(Package_Body, Package_Spec): New queries moved
here from GNATprove.
(Package_Specification): Simplify query to remove use of loop.
* sem_util.adb, sem_util.ads (Enclosing_Declaration,
Enclosing_Package_Or_Subprogram, Is_Attribute_Update): New
queries moved here from GNATprove.
2015-05-26 Bob Duff <duff@adacore.com>
* einfo.adb, einfo.ads, sprint.adb, lib-xref.ads: Minor cleanup: Remove
obsolete Entity_Kinds E_String_Type and E_String_Subtype. Update
redundant assertions.
2015-05-26 Gary Dismukes <dismukes@adacore.com>
* sem_util.adb, sem_util.ads, sem_ch13.adb: Minor typo fixes.
2015-05-26 Doug Rupp <rupp@adacore.com>
* init.c [vxworks]: Refine previous checkin.
2015-05-26 Robert Dewar <dewar@adacore.com>
* exp_ch4.adb (Wrap_MA): New function.
(Expand_N_Op_Expon): Use Wrap_MA.
2015-05-26 Bob Duff <duff@adacore.com>
* exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
Do not use secondary stack to return limited records with
defaulted discriminants. This is an efficiency improvement.
* exp_ch6.adb, exp_dist.adb, sem_attr.adb, sem_aux.adb, sem_aux.ads,
sem_ch12.adb, sem_ch3.adb, sem_ch4.adb, sem_ch6.adb, sem_ch7.adb,
sem_util.adb: Change the sense of Is_Indefinite_Subtype to be
Is_Definite_Subtype. This is an improvement to readability (the double
negative in "not Is_Indefinite_Subtype" was slightly confusing). Also
disallow passing non-[sub]type entities, an unnecessary and slightly
bug-prone flexibility.
2015-05-26 Robert Dewar <dewar@adacore.com>
* sem_aggr.adb (Resolve_Array_Aggregate): Defend against
bad bounds.
* debug.adb: Document -gnatd.k.
* erroutc.adb (Set_Msg_Insertion_Line_Number): Implement -gnatd.k.
2015-05-26 Robert Dewar <dewar@adacore.com>
* gnat1drv.adb (Gnat1drv): Provide new arguments for
Get_Target_Parameters.
* restrict.adb (Set_Restriction_No_Specification_Of_Aspect):
new procedure.
(Set_Restriction_No_Use_Of_Attribute): new procedure.
* restrict.ads (Set_Restriction_No_Specification_Of_Aspect):
new procedure.
(Set_Restriction_No_Use_Of_Attribute): new procedure.
* s-rident.ads (Integer_Parameter_Restrictions): New subtype.
* targparm.adb (Get_Target_Parameters): Allow new restriction
pragmas No_Specification_Of_Aspect No_Use_Of_Attribute
No_Use_Of_Pragma.
* targparm.ads: New parameters for Get_Target_Parameters.
* tbuild.adb (Set_NOD): New name for Set_RND.
(Set_NSA): New procedure.
(Set_NUA): New procedure.
(Set_NUP): New procedure.
* tbuild.ads (Make_SC): Minor reformatting.
(Set_NOD): New name for Set_RND.
(Set_NSA, Set_NUA, Set_NUP): New procedure.
2015-05-26 Ed Schonberg <schonberg@adacore.com>
* a-stwise.adb (Find_Token): If source'first is not positive,
an exception must be raised, as specified by RM 2005 A.4.3
(68/1). This must be checked explicitly, given that run-time
files are normally compiled without constraint checks.
* a-stzsea.adb (Find_Token): Ditto.
2015-05-26 Ed Schonberg <schonberg@adacore.com>
* sem_util.ads sem_util.adb (Is_Current_Instance): New predicate
to fully implement RM 8.6 (17/3). which earlier only applied
to synchronized types. Used to preanalyze aspects that include
current instances of types, such as Predicate and Invariant.
* sem_res.adb (Resolve_Entity_Name): Use Is_Current_Instance.
* sem_ch13.adb (Add_Predicates): In ASIS mode, preserve original
expression of aspect and analyze it to provide proper type
information.
2015-05-26 Robert Dewar <dewar@adacore.com>
* rtsfind.ads: Add entries for RE_Exn[_Long]_Float.
* s-exnllf.adb (Exn_Float): New function.
(Exn_Long_Float): New function.
(Exn_Long_Long_Float): Rewritten interface.
(Exp): New name for what used to be Exn_Long_Long_Float.
* s-exnllf.ads (Exn_Float): New function.
(Exn_Long_Float): New function.
2015-05-26 Ed Schonberg <schonberg@adacore.com>
* sem_ch8.adb (Find_Selected_Component): Do not emit an error
on a selected component when the prefix is a type name that is
a Current_Instance.
* einfo.ads: Minor grammar fix.
2015-05-26 Doug Rupp <rupp@adacore.com>
* init.c [vxworks] (sysLib.h): Only for x86.
2015-05-26 Doug Rupp <rupp@adacore.com>
* init-vxsim.c (CPU): define as __VXSIM_CPU__
* sigtramp-vxworks-vxsim.c (CPU): Likewise.
sigtramp-vxworks-target.inc: Add check for SIMLINUX.
* sigtramp.h: Likewise.
2015-05-26 Robert Dewar <dewar@adacore.com>
* sem_aux.adb, sem_disp.adb, sem_util.ads: Add comment.
* sem_util.adb: Minor reformatting
2015-05-26 Yannick Moy <moy@adacore.com>
* inline.adb (Has_Initialized_Type): Adapt to new names.
* sem_aux.adb, sem_aux.ads (Get_Low_Bound, Number_Components,
Subprogram_Body, Subprogram_Body_Entity, Subprogram_Spec,
Subprogram_Specification): New query functions used in GNATprove.
* sem_disp.adb, sem_disp.ads (Is_Overriding_Subprogram): New
query functions used in GNATprove.
* sem_util.adb, sem_util.adso (Enclosing_Lib_Unit_Node,
Get_Cursor_Type, Get_Return_Object, Get_User_Defined_Eq,
Is_Double_Precision_Floating_Point_Type,
Is_Single_Precision_Floating_Point_Type): New query functions
used in GNATprove.
2015-05-26 Bob Duff <duff@adacore.com>
* s-rpc.ads (Partition_ID): Increase maximum Partition_ID to
some huge number.
* a-except-2005.adb, a-except-2005.ads, a-except.adb,
a-except.ads, a-exexda.adb, a-exstat.adb: Minor comment fixes.
2015-05-26 Robert Dewar <dewar@adacore.com>
* sinfo.adb: Minor comment addition.
* einfo.adb: Minor whitespace and punctuation fix.
* sem_util.adb: Minor editing of comments.
2015-05-26 Ed Schonberg <schonberg@adacore.com>
* sem_ch7.adb (Install_Private_Declarations,
Swap_Private_Dependents): Ensure that both views of the dependent
subtype are immediately visible if we are within their scope. This
may be needed when a procedure body is both the parent of an
instantiated child unit, and is itself used to inline a local
function.
2015-05-26 Gary Dismukes <dismukes@adacore.com>
* exp_prag.adb, gnat1drv.adb: Minor reformatting.
2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
* exp_ch4.adb (Expand_N_Indexed_Component): In the circuit
detecting exceptions to the rewriting, deal with implicit
dereferences in the selected component case.
2015-05-26 Bob Duff <duff@adacore.com>
* sem_ch13.adb (Analyze_One_Aspect): Do not
require the expression of the Disable_Controlled aspect to be
static in a generic template, because 'Enabled is not known
until the instance.
2015-05-26 Doug Rupp <rupp@adacore.com>
* init-vxsim.c: New file for vxsim ZCX
* sigtramp-vxworks-vxsim.c: Likewise.
* sigtramp-vxworks.c: Factor out target dependent bits into ...
* sigtramp-vxworks-target.inc: ... here.
* sigtramp.h: Add vxsim zcx protos.
* init.c [vxworks...] (sysLib.h): Include.
(__gnat_map_signal): Make global.
[...i386] (__gnat_error_handler): Call __gnat_vxsim_error_handler if
on vxsim.
[...i386] (__gnat_install_handler): Test if on vxsim.
2015-05-26 Ed Schonberg <schonberg@adacore.com>
* sem_ch5.adb (Analyze_Iterator_Specification): For an element
iterator over an array, if the component is aliased, the loop
variable is aliased as well.
2015-05-26 Ed Schonberg <schonberg@adacore.com>
* exp_ch6.adb (Expand_Actuals): For a function call with in-out
parameters that is rewritten as an expression_with_actions,
we preserve the original function call node for further use by
the caller (typically Expand_Call). In the presence of validity
checks, that function call, though it is labelled Analyzed to
prevent an infinite recursion, may be rewritten as a temporary
by Remove_Side_Effects. Ensure that the caller has access to
the original function call to continue expansion.
* atree.ads: Minor typo in comment.
2015-05-26 Javier Miranda <miranda@adacore.com>
* sem_util.adb (Check_Function_Writable_Actuals):
Add missing support to check the violation of writable actuals
in array aggregates that have a nonstatic range.
2015-05-26 Hristian Kirtchev <kirtchev@adacore.com>
* exp_ch6.adb (Process_Contract_Cases_For): Update the call to
Expand_Pragma_Contract_Cases.
* exp_prag.ads, exp_prag.adb (Expand_Contract_Cases): Rename to
Expand_Pragma_Contract_Cases.
* sem_ch13.adb (Add_Invariants): Use the original aspect name
when creating the arguments of pragma Check. This ensures that
'Class is properly recognized and handled.
2015-05-26 Arnaud Charlet <charlet@adacore.com>
* gnat1drv.adb: Minor adjustments.
(Adjust_Global_Switches): Disable some related flags in CodePeer mode.
* sem_ch4.adb (Has_Arbitrary_Evaluation_Order,
Stop_Subtree_Climbind): Code cleanup.
* einfo.ads: Minor comment change.
2015-05-26 Javier Miranda <miranda@adacore.com>
* sem_aggr.adb (Resolve_Aggregate, Resolve_Extension_Aggregate):
Code cleanup.
* sem_ch3.adb (Build_Derived_Record_Type,
Record_Type_Declaration): Code cleanup.
* sem_ch4.adb (Has_Arbitrary_Evaluation_Order,
Stop_Subtree_Climbind): Tables which speed up the identification
of dangerous calls to Ada 2012 functions with writable actuals
(AI05-0144).
(Analyze_Arithmetic_Op, Analyze_Call, Analyze_Comparison_Op,
Analyze_Equality_Op, Analyze_Logical_Op, Analyze_Membership_Op,
Analyze_Range): Code cleanup.
(Is_Arbitrary_Evaluation_Order_Construct): Removed.
(Check_Writable_Actuals): Code cleanup using the added tables.
* sem_util.adb (Check_Function_Writable_Actuals): Return
immediately if the node does not have the flag Check_Actuals
set to True.
2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
* exp_ch6.adb (Add_Call_By_Copy_Code): Remove restrictive
condition in the detection of the effects of Remove_Side_Effects.
* exp_util.ads (Remove_Side_Effects): Add general and historical note.
* exp_util.adb (Is_Name_Reference): New predicate.
(Remove_Side_Effects): Use it in lieu of Is_Object_Reference
in order to decide whether to use the renaming to capture the
side effects of the subexpression.
(Side_Effect_Free): Remove obsolete test.
2015-05-26 Robert Dewar <dewar@adacore.com>
* aspects.ads, aspects.adb: Add aspect Disable_Controlled.
* einfo.ads, einfo.adb (Disable_Controlled): New flag.
(Is_Controlled_Active): New function.
* exp_ch3.adb (Expand_Freeze_Record_Type): Use
Is_Controlled_Active.
* exp_util.adb (Needs_Finalization): Finalization not needed
if Disable_Controlled set.
* freeze.adb (Freeze_Array_Type): Do not set
Has_Controlled_Component if the component has Disable_Controlled.
(Freeze_Record_Type): ditto.
* sem_ch13.adb (Decorate): Minor reformatting.
(Analyze_Aspect_Specifications): Implement Disable_Controlled.
* sem_ch3.adb (Analyze_Object_Declaration): Handle
Disable_Controlled.
(Array_Type_Declaration): ditto.
(Build_Derived_Private_Type): ditto.
(Build_Derived_Type): ditto.
(Record_Type_Definition): ditto.
* snames.ads-tmpl: Add Name_Disable_Controlled.
2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
* exp_ch6.adb (Expand_Actuals): Use a constant declaration instead
of a renaming to capture the return value of a function call.
(Expand_Simple_Function_Return): Call Remove_Side_Effects
instead of removing side effects manually before the call to
_Postconditions.
2015-05-26 Robert Dewar <dewar@adacore.com>
* exp_ch4.adb (Expand_N_Op_Expon): Deal with problem of wrong
order in calling Duplicate_Subexpr.
* einfo.ads: Fix documentation of Object/Value size for scalar types.
2015-05-26 Ed Schonberg <schonberg@adacore.com>
* exp_aggr.adb (Build_Array_Aggr_Code, Gen_Assign):
If a component is default-initialized and its type has an
invariant procedure, insert an invariant test after code for
default-initialization of the component.
2015-05-26 Gary Dismukes <dismukes@adacore.com>
* einfo.ads, sem_util.adb, sem_ch4.adb: Minor reformatting.
2015-05-26 Robert Dewar <dewar@adacore.com>
* exp_unst.adb, exp_unst.ads: Change to using Subps table index for
making AREC entity names unique.
2015-05-26 Ed Schonberg <schonberg@adacore.com>
* sem_cat.adb (Has_Stream_Attribute_Definition): If the type
has aspect specifications, examine the corresponding list of
representation items to determine whether there is a visible
stream operation. The attribute definition clause generated from
the aspect will be inserted at the freeze point of the type,
which may be in the private part and not directly visible,
but the aspect makes the operation available to a client.
2015-05-26 Robert Dewar <dewar@adacore.com>
* sem_util.adb: Minor code reorganization.
* sem_ch6.adb: Minor reformatting.
2015-05-25 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/utils.c (maybe_pad_type): Do not apply adjustment to
original size for elementary types before issuing the size warning.
2015-05-25 Eric Botcazou <ebotcazou@adacore.com>
* get_targ.adb (C_Get_Float_Words_BE): Adjust import name.
(C_Get_Words_BE): Likewise.
(C_Get_Bytes_BE): Likewise.
(C_Get_Bits_BE): Likewise.
(Width_From_Size): Remove superfluous space.
* gcc-interface/targtyps.c (get_float_words_be): Rename into...
(get_target_float_words_be): ...this.
(get_words_be): Rename into...
(get_target_words_be): ...this.
(get_bytes_be): Rename into...
(get_target_bytes_be): ...this.
(get_bits_be): Rename into...
(get_target_bits_be): ...this.
* gcc-interface/gigi.h (standard_datatypes): Remove ADT_ptr_void_type.
(ptr_void_type_node): Delete.
(get_target_float_size): Likewise.
(get_target_double_size): Likewise.
(get_target_long_double_size): Likewise.
(get_float_words_be): Likewise.
(get_words_be): Likewise.
(get_bytes_be): Likewise.
(get_bits_be): Likewise.
(get_target_float_words_be): Declare.
(get_target_words_be): Likewise.
(get_target_bytes_be): Likewise.
(get_target_bits_be): Likewise.
* gcc-interface/decl.c (gnat_to_gnu_entity): Replace ptr_void_type_node
with ptr_type_node.
(intrin_return_compatible_p): Likewise.
* gcc-interface/trans.c (gigi): Likewise.
* gcc-interface/utils2.c (maybe_wrap_malloc): Likewise.
(maybe_wrap_free): Likewise.
* gcc-interface/utils.c (maybe_pad_type): Remove superfluous space.
* gcc-interface/misc.c (gnat_init): Do not set ptr_void_type_node.
2015-05-25 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/decl.c (elaborate_expression): Take a const string
suffix instead of a tree.
(elaborate_expression_1): Likewise.
(elaborate_expression_2): Likewise.
(gnat_to_gnu_entity): Adjust to above changes.
(build_subst_list): Likewise.
(get_entity_char): New static function.
2015-05-25 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Constant>: Move around.
<E_Exception>: Merge with E_Variable case.
<E_Variable>: Remove 'object' label.
2015-05-25 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/decl.c (gnat_to_gnu_entity): Minor tweak.
* gcc-interface/trans.c (finalize_nrv_unc_r): Use CONSTRUCTOR_ELT.
* gcc-interface/utils.c (convert): Likewise and simplify.
(remove_conversions): Likewise.
* gcc-interface/utils2.c (compare_fat_pointers): Likewise.
(build_unary_op): Likewise and simplify.
2015-05-25 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/gigi.h (build_atomic_load): Adjust prototype.
(build_atomic_store): Likewise.
(build_load_modify_store): Declare.
(VECTOR_TYPE_P): Delete.
* gcc-interface/decl.c (gnat_to_gnu_entity): Replace Is_Atomic with
Is_Atomic_Or_VFA throughout.
<E_Array_Type>: Build a variant of the XUA type instead of forcing
TYPE_VOLATILE on it.
<E_Array_Subtype>: Use the main variant of the base type.
Do not force TYPE_VOLATILE on the type being built.
<E_Record_Type>: Likewise.
<E_Array_Subtype>: Likewise.
<E_Subprogram_Type>: Rename local variable.
Add Atomic qualifier in conjunction with Volatile on types if needed.
Force BLKmode for by-ref types only at the end of the processing.
Change qualifiers only after changing the mode of the type. Set
TYPE_UNIVERSAL_ALIASING_P on the type directly.
(check_ok_for_atomic_type): Issue specific error message for VFA.
(gnat_to_gnu_component_type): Replace Is_Atomic with
Is_Atomic_Or_VFA throughout.
* gcc-interface/misc.c (gnat_get_alias_set): Test
TYPE_UNIVERSAL_ALIASING_P on the type directly.
* gcc-interface/trans.c (lvalue_required_p): Replace Is_Atomic with
Is_Atomic_Or_VFA throughout. Add missing guard.
(node_is_atomic): New predicate.
(node_has_volatile_full_access): Likewise.
(gnat_strip_type_conversion): New function.
(outer_atomic_access_required_p): New predicate.
(atomic_sync_required_p): Rename into...
(atomic_access_required_p): ...this. Add SYNC parameter, scan the
parent node first and then look for the atomic setting. Add support
for Volatile_Full_Access.
(Call_to_gnu): Add atomic_access and outer_atomic_access parameters
and adjusts calls to above functions. Use load-modify-store sequence
for updates of In/Out and Out parameters if required, as well as for
moving the result to the target if required. Add couple of missing
guards.
(gnat_to_gnu): Adjust calls to above functions.
<N_Object_Renaming_Declaration>: If the renamed object has side-effects
evaluate only its address.
<N_Assignment_Statement>: Adjust call to Call_to_gnu. Use load-modify
store sequence if required.
<N_Function_Call>: Adjust call to Call_to_gnu.
(extract_values): Adjust comment.
* gcc-interface/utils2.c (build_atomic_load): Add SYNC parameter and
use relaxed memory model if it is not set.
(build_atomic_store): Likewise.
(call_is_atomic_load): New predicate.
(build_load_modify_store): New function.
(build_binary_op) <MODIFY_EXPR>: Accept SAVE_EXPR on the LHS.
(gnat_stabilize_reference) <CALL_EXPR>: Deal with atomic loads.
2015-05-25 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/ada-tree.h (DECL_RENAMING_GLOBAL_P): Rename into...
(DECL_GLOBAL_NONCONSTANT_RENAMING_P): ...this.
* gcc-interface/gigi.h (record_global_renaming_pointer): Delete.
(invalidate_global_renaming_pointers): Likewise.
(record_global_nonconstant_renaming): New.
(invalidate_global_nonconstant_renamings): Likewise.
(get_inner_constant_reference): Likewise.
(gnat_constant_reference_p): Likewise.
* gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Adjust to above
and register the renaming pointer only if the object is non-constant.
(elaborate_expression_1): Call get_inner_constant_reference instead
of get_inner_reference.
* gcc-interface/trans.c (fold_constant_decl_in_expr): Minor tweak.
(Identifier_to_gnu): Adjust to above and do not recheck the renamed
object before substituting it.
(Compilation_Unit_to_gnu): Adjust to above renaming. Minor tweaks.
(gnat_to_gnu) <N_Object_Renaming_Declaration>: Do not return the
result at the global level.
(N_Exception_Renaming_Declaration): Likewise.
* gcc-interface/utils.c (global_renaming_pointers): Rename into...
(global_nonconstant_renamings): ...this.
(destroy_gnat_utils): Adjust to above renaming.
(record_global_renaming_pointer): Rename into...
(record_global_nonconstant_renaming): ...this.
(invalidate_global_renaming_pointers): Rename into...
(invalidate_global_nonconstant_renamings): ...this and do not recheck
the renamed object before invalidating.
* gcc-interface/utils2.c (gnat_stabilize_reference): Minor tweak.
(get_inner_constant_reference): New public function.
(gnat_constant_reference_p): New predicate.
2015-05-25 Javier Miranda <miranda@adacore.com>
* einfo.ads, einfo.adb (Has_Out_Or_In_Out_Parameter): This attribute
is now present in subprograms, generic subprograms, entries and
entry families.
* sem_ch6.adb (Set_Formal_Mode): Set As_Out_Or_In_Out_Parameter
on entries, entry families, subprograms and generic subprograms.
* sem_ch12.adb (Analyze_Generic_Subprogram_Declaration):
Minor code reorganization to ensure that the Ekind attribute
of the subprogram entity is set before its formals are
processed. Required to allow the use of the attribute
Has_Out_Or_In_Out_Parameter on the subprogram entity.
* sem_aggr.adb (Resolve_Aggregate, Resolve_Extension_Aggregate):
Perform the check on writable actuals only if the value of some
component of the aggregate involves calling a function with
out-mode parameters.
(Resolve_Record_Aggregate): Propagate the Check_Actuals flag to the
internally built aggregate.
* sem_ch3.adb (Build_Derived_Record_Type, Record_Type_Declaration):
Perform the check on writable actuals only if the initialization of
some component involves calling a function with out-mode parameters.
* sem_ch4.adb (Analyze_Arithmetic_Op, Analyze_Comparison_Op,
Analyze_Equality_Op, Analyze_Logical_Op, Analyze_Membership_Op,
Analyze_Range): Check writable actuals only if the
subtrees have a call to a function with out-mode parameters
(Analyze_Call.Check_Writable_Actuals): New subprogram. If the call
has out or in-out parameters then mark its outermost enclosing
construct as a node on which the writable actuals check must
be performed.
(Analyze_Call): Check if the flag must be set and if the outermost
enclosing construct.
* sem_util.adb (Check_Function_Writable_Actuals): Code cleanup
and reorganization. We skip processing aggregate discriminants
since their precise analysis involves two phases traversal.
* sem_res.adb (Resolve_Actuals, Resolve_Arithmetic_Op,
Resolve_Logical_Op, Resolve_Membership_Op): Remove call to
check_writable_actuals.
2015-05-22 Ed Schonberg <schonberg@adacore.com>
* sem_ch3.adb (Constrain_Concurrent): If the context is a
type declaration, generate an Itype_Reference for the anonymous
subtype, to force elaboration at this point in gigi.
2015-05-22 Gary Dismukes <dismukes@adacore.com>
* layout.adb, einfo.ads, sem_ch12.adb, freeze.adb, sem_util.ads,
exp_ch4.adb, sem_ch6.adb: Minor reformatting and typo fixes.
2015-05-22 Ed Schonberg <schonberg@adacore.com>
* sem_res.adb (Resolve_Actuals): If the call is to an overridden
operation, replace the names of the actuals in named associations
with the names of the actuals of the subprogram that is eventually
executed. The names of the formals and the defaults can differ
between the two operations when they are operations of a formal
derived type.
2015-05-22 Bob Duff <duff@adacore.com>
* a-convec.ads, a-convec.adb (Append): Check for fast path. Split
out slow path into separate procedure. Inline Append. Fast path
now avoids calling Insert.
(Finalize): Do the busy checking last, so the container gets emptied.
(Insert, Insert_Space): Remove redundancy.
2015-05-22 Robert Dewar <dewar@adacore.com>
* switch-c.adb (Scan_Front_End_Switches): Insist on -gnatc
for -gnatd.V.
2015-05-22 Arnaud Charlet <charlet@adacore.com>
* gnatvsn.ads: Minor code reorg to remember more easily to update
variables.
2015-05-22 Ed Schonberg <schonberg@adacore.com>
* sem_ch10.adb (Analyze_With_Clause): In ASIS_Mode, a
limited_with clause on a predefined unit is not transformed into
a regular with_clause, to preserve the original tree structure.
* sinfo.ads (N_With_Clause): Add comment on handling of
Limited_With.
* sem_ch10.adb: Minor reformatting.
2015-05-22 Ed Schonberg <schonberg@adacore.com>
* sem_ch8.adb (Freeze_Profile): A limited view of a type in
the profile of a subprogram renaming does not require freezing,
because it is declared in a different unit.
2015-05-22 Ed Schonberg <schonberg@adacore.com>
* exp_aggr.adb (Get_Constraint_Association): If type (of ancestor
composite type) is private, go to full view. This was previously
done only in an instance context, but is happen whenever a chain
of private extensions includes one inherited discriminant.
2015-05-22 Robert Dewar <dewar@adacore.com>
* einfo.ads: Minor comment updates.
* exp_unst.adb: Move Subps table to spec Don't remove old entries
from table Add Last field to record last entry used.
* exp_unst.ads: Move Subps table here from body So that Cprint
can access saved values.
2015-05-22 Bob Duff <duff@adacore.com>
* a-cdlili.adb, a-cdlili.ads, a-cohama.adb, a-cohama.ads,
* a-cohase.adb, a-cohase.ads, a-convec.adb, a-convec.ads,
* a-coorma.adb, a-coorma.ads, a-coorse.adb, a-coorse.ads:
(Pseudo_Reference, Element_Access, Get_Element_Access): New
declarations added for use by performance improvements in exp_ch5.adb.
* snames.ads-tmpl: New names referenced by exp_ch5.adb.
* exp_ch5.adb: Speed up "for ... of" loops for predefined containers.
Instead of doing literally what the RM calls for, we do something
equivalent that avoids expensive operations inside the loop. If the
container package has appropriate Next, Pseudo_Reference,
Element_Access, Get_Element_Access declarations, we invoke the
optimization.
* snames.ads-tmpl: Note speed improvement.
2015-05-22 Eric Botcazou <ebotcazou@adacore.com>
* einfo.ads (Is_Atomic_Or_VFA): Move to XEINFO INLINES section.
* xeinfo.adb: Replace a-einfo.h with einfo.h throughout.
Add pattern to translate "or else" into "||".
2015-05-22 Eric Botcazou <ebotcazou@adacore.com>
* einfo.ads (Has_Volatile_Full_Access): Rename into...
(Is_Volatile_Full_Access): ...this.
(Set_Has_Volatile_Full_Access): Rename into...
(Set_Is_Volatile_Full_Access): ...this.
* einfo.adb (Has_Volatile_Full_Access): Rename into...
(Is_Volatile_Full_Access): ...this.
(Set_Has_Volatile_Full_Access): Rename into...
(Set_Is_Volatile_Full_Access): ...this.
(Is_Atomic_Or_VFA): Adjust to above renaming.
* errout.adb (Special_Msg_Delete): Likewise.
* exp_pakd.adb (Install_PAT): Likewise.
* freeze.adb (Freeze_Array_Type): Likewise.
* sem_ch8.adb (Analyze_Object_Renaming): Likewise.
* sem_ch13.adb (Inherit_Delayed_Rep_Aspects): Likewise.
(Inherit_Aspects_At_Freeze_Point): Likewise.
* sem_prag.adb (Set_Atomic_VFA): Likewise.
(Process_Atomic_Independent_Shared_Volatile): Likewise.
* sem_util.adb (Is_Atomic_Or_VFA_Object): Likewise.
2015-05-22 Robert Dewar <dewar@adacore.com>
* exp_ch5.adb, layout.adb, einfo.adb, einfo.ads, sem_prag.adb,
freeze.adb, freeze.ads, sem_util.adb, sem_util.ads, exp_ch2.adb,
exp_ch4.adb, errout.adb, exp_aggr.adb, sem_ch13.adb: This is a general
change that deals with the fact that most of the special coding for
Atomic should also apply to the case of Volatile_Full_Access.
A new attribute Is_Atomic_Or_VFA is introduced, and many of the
references to Is_Atomic now use this new attribute.
2015-05-22 Robert Dewar <dewar@adacore.com>
* exp_ch4.adb (Expand_N_Op_Eq): Introduce 'Machine for 'Result
comparison.
2015-05-22 Eric Botcazou <ebotcazou@adacore.com>
* sprint.adb (Source_Dump): When generating debug files, deal
with the case of a stand-alone package instantiation by dumping
together the spec and the body in the common debug file.
2015-05-22 Robert Dewar <dewar@adacore.com>
* sem_ch13.adb (Minimum_Size): Size is zero for null range
discrete subtype.
2015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
* einfo.adb (Anonymous_Master): This attribute now applies
to package and subprogram bodies.
(Set_Anonymous_Master): This attribute now applies to package and
subprogram bodies.
(Write_Field36_Name): Add output for package and subprogram bodies.
* einfo.ads Update the documentation on attribute Anonymous_Master
along with occurrences in entities.
* exp_ch4.adb (Create_Anonymous_Master): Reimplemented to
handle spec and body anonymous masters of the same unit.
(Current_Anonymous_Master): Reimplemented. Handle a
package instantiation that acts as a compilation unit.
(Insert_And_Analyze): Reimplemented.
2015-05-22 Ed Schonberg <schonberg@adacore.com>
* sem_ch10.adb (Analyze_With_Clause): A limited_with_clause on a
predefined unit is treated as a regular with_clause.
2015-05-22 Robert Dewar <dewar@adacore.com>
* sem_ch12.adb, prj.ads, makeutl.ads, sem_ch6.adb, prj-nmsc.adb,
prj-conf.adb, sem_disp.adb: Minor reformatting.
2015-05-22 Vincent Celier <celier@adacore.com>
* clean.adb (Parse_Cmd_Line): For native gnatclean, check
for switch -P and, if found and gprclean is available, invoke
silently gprclean.
* make.adb (Initialize): For native gnatmake, check for switch -P
and, if found and gprbuild is available, invoke silently gprbuild.
2015-05-22 Eric Botcazou <ebotcazou@adacore.com>
* sem_ch13.adb (Validate_Unchecked_Conversions): Also issue
specific warning for discrete types when the source is larger
than the target.
2015-05-22 Ed Schonberg <schonberg@adacore.com>
* einfo.ads, einfo.adb (Incomplete_Actuals): New attribute of
package instantiations. Holds the list of actuals in the instance
that are incomplete types, to determine where the corresponding
instance body must be placed.
* sem_ch6.adb (Conforming_Types): An incomplete type used as an
actual in an instance matches an incomplete formal.
* sem_disp.adb (Check_Dispatching_Call): Handle missing case of
explicit dereference.
(Inherited_Subprograms): In the presence of a limited view there
are no subprograms to inherit.
* sem_ch12.adb (Preanalyze_Actuals): Build list of incomplete
actuals of instance, for later placement of instance body and
freeze nodes for actuals.
(Install_Body): In the presence of actuals that incomplete types
from a limited view, the instance body cannot be placed after
the declaration because full views have not been seen yet. Any
use of the non-limited views in the instance body requires
the presence of a regular with_clause in the enclosing unit,
and will fail if this with_clause is missing. We place the
instance body at the beginning of the enclosing body, which is
the unit being compiled, and ensure that freeze nodes for the
full views of the incomplete types appear before the instance.
2015-05-22 Pascal Obry <obry@adacore.com>
* makeutl.ads, prj-conf.adb, prj-nmsc.adb, prj.ads
(In_Place_Option): Removed.
(Relocate_Build_Tree_Option): New constant.
(Root_Dir_Option): New constant.
(Obj_Root_Dir): Removed.
(Build_Tree_Dir): New variable.
(Root_Src_Tree): Removed.
(Root_Dir): New variable.
* prj-conf.adb (Get_Or_Create_Configuration_File): Add check
for improper relocation.
* prj-nmsc.adb (Locate_Directory): Add check for improper
relocation.
2015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
* einfo.adb (Default_Init_Cond_Procedure): Code cleanup. The
attribute now applies to the base type.
(Has_Default_Init_Cond): Now applies to the base type.
(Has_Inherited_Default_Init_Cond): Now applies to the base type.
(Set_Default_Init_Cond_Procedure): Code cleanup. The attribute now
applies to the base type.
(Set_Has_Default_Init_Cond): Now applies to the base type.
(Set_Has_Inherited_Default_Init_Cond): Now applies to the base type.
* exp_ch3.adb (Expand_N_Object_Declaration): No need to use the
base type when adding a call to the Default_Initial_Condition.
2015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
* einfo.adb: Node36 is now used as Anonymous_Master. Flag253
is now unused.
(Anonymous_Master): New routine.
(Has_Anonymous_Master): Removed.
(Set_Anonymous_Master): New routine.
(Set_Has_Anonymous_Master): Removed.
(Write_Entity_Flags): Remove the output for Has_Anonymous_Maser.
(Write_Field36_Name): Add output for Anonymous_Master.
* einfo.ads Add new attribute Anonymous_Master along with
occurrences in nodes. Remove attribute Has_Anonymous_Master along
with occurrences in nodes.
(Anonymous_Master): New routine along with pragma Inline.
(Has_Anonymous_Master): Removed along with pragma Inline.
(Set_Anonymous_Master): New routine along with pragma Inline.
(Set_Has_Anonymous_Master): Removed along with pragma Inline.
* exp_ch4.adb (Create_Anonymous_Master): New routine.
(Current_Anonymous_Master): Reimplemented.
2015-05-22 Bob Duff <duff@adacore.com>
* freeze.adb (Freeze_Profile): Suppress warning if imported
subprogram is not at library level.
2015-05-22 Robert Dewar <dewar@adacore.com>
* sem_ch8.adb (Analyze_Object_Renaming): Check for renaming
component of an object to which Volatile_Full_Access applies.
2015-05-22 Jerome Guitton <guitton@adacore.com>
* exp_dbug.ads: Add note about non bit-packed arrays.
2015-05-22 Eric Botcazou <ebotcazou@adacore.com>
* sem_prag.adb: Fix typo.
* einfo.ads: Grammar fixes in comments.
2015-05-22 Bob Duff <duff@adacore.com>
* a-cborma.ads, a-cidlli.ads, a-cimutr.ads, a-ciormu.ads,
* a-cihase.ads, a-cohama.ads, a-coorse.ads, a-cbhama.ads,
* a-cborse.ads, a-comutr.ads, a-ciorma.ads, a-cobove.ads,
* a-coormu.ads, a-convec.ads, a-cohase.ads, a-coinho.ads,
* a-cbdlli.ads, a-cbmutr.ads, a-cbhase.ads, a-cdlili.ads,
* a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
* a-coinho-shared.ads (Constant_Reference_Type, Reference_Type):
Add an initialization expression "raise Program_Error". See,
for example, RM-A.18.2(148.4).
2015-05-22 Robert Dewar <dewar@adacore.com>
* debug.adb: Update documentation.
* einfo.ads, einfo.adb (Needs_Typedef): New flag
* exp_unst.adb (Unnest_Subprogram): Mark AREC types as needing
typedef's in C.
* frontend.adb: Update comments.
* gnat1drv.adb (Adjust_Global_Switches): Set all needed flags
for -gnatd.V
* opt.ads (Generate_C_Code): New switch.
* osint-c.adb (Write_C_File_Info): Removed, not used
(Write_H_File_Info): Removed, not used
* osint-c.ads (Write_C_File_Info): Removed, not used
(Write_H_File_Info): Removed, not used
* osint.ads (Write_Info): Minor comment updates.
(Output_FD): Moved from private part to public part of spec.
* sem.adb (Semantics): Force expansion on if in Generate_C_Code
mode.
* atree.ads: minor typo in comment.
* sem_prag.adb (Process_Atomic_Independent_Shared_Volatile):
Do not allow VFA on composite object with aliased component.
2015-05-22 Arnaud Charlet <charlet@adacore.com>
* osint-c.adb, osint-c.ads (Set_File_Name): Move back to spec.
2015-05-22 Pascal Obry <obry@adacore.com>
* prj-util.adb: Minor comment editing.
2015-05-22 Pascal Obry <obry@adacore.com>
* makeutl.ads (In_Place_Option): New constant.
* prj.ads (Obj_Root_Dir): New variable (absolute path to relocate
objects).
(Root_Src_Tree): New variable (absolute path of root source tree).
* prj-conf.adb (Do_Autoconf): Take into account the object root
directory (if defined) to generate configuration project.
* prj-nmsc.adb (Get_Directories): Handle case where Obj_Root_Dir
is defined.
(Locate_Directory): Likewise.
2015-05-22 Pascal Obry <obry@adacore.com>
* prj-util.ads, prj-util.adb (Relative_Path): New routine.
2015-05-22 Bob Duff <duff@adacore.com>
* exp_utils.ads, exp_utils.adb (Find_Optional_Prim_Op): New
interface to return Empty when not found, so we can avoid handling
Program_Error in that case.
(Find_Prim_Op): Fix latent bug: raise Program_Error when there are no
primitives.
* exp_ch7.adb, sem_util.adb: Use Find_Optional_Prim_Op when the
code is expecting Empty.
* sem_ch8.adb: Use Find_Optional_Prim_Op to avoid handling
Program_Error.
2015-05-22 Robert Dewar <dewar@adacore.com>
* sem_ch3.adb, sem_intr.adb, exp_ch4.adb, s-rannum.adb,
sem_eval.adb, s-fatgen.adb, s-expmod.ads: Remove incorrect hyphen in
non-binary.
* exp_util.adb: Add comment.
* osint-c.ads, osint-c.adb (Set_Library_Info_Name): Move from spec to
body.
(Set_File_Name): New name for the above.
(Create_C_File, Create_H_File, Write_C_File_Info, Write_H_File_Info,
Close_C_File, Close_H_File): New procedure.
* osint.adb: Minor reformatting.
* osint.ads: Minor comment updates.
2015-05-22 Robert Dewar <dewar@adacore.com>
* exp_ch4.adb: Minor rewording.
* exp_util.ads: Clarify that Find_Prim_Op is only for
tagged types.
2015-05-22 Robert Dewar <dewar@adacore.com>
* atree.adb, atree.ads, treepr.adb: Change name Needs_Actuals_Check to
Check_Actuals.
* exp_ch4.adb (Expand_N_Op_Expon): Optimize 2**x in modular
and overflow cases.
2015-05-22 Eric Botcazou <ebotcazou@adacore.com>
* exp_pakd.adb (Install_PAT): Propagate representation aspects
from the original array type to the PAT.
2015-05-22 Robert Dewar <dewar@adacore.com>
* treepr.adb (Print_Node_Header): Add output of Needs_Actuals_Check.
2015-05-22 Robert Dewar <dewar@adacore.com>
* atree.adb, atree.ads (Needs_Actuals_Check): New flag.
2015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
* sem_prag.adb (Analyze_Pragma): Remove the detection
of a useless Part_Of indicator when the related item is a constant.
(Check_Matching_Constituent): Do not emit an error on a constant.
(Check_Missing_Part_Of): Do not check for a missing Part_Of indicator
when the related item is a constant.
(Collect_Body_States): Code cleanup.
(Collect_Visible_States): Code cleanup.
(Report_Unused_States): Do not emit an error on a constant.
* sem_util.ads, sem_util.adb (Has_Variable_Input): Removed.
2015-05-22 Eric Botcazou <ebotcazou@adacore.com>
* sem_ch8.adb (Analyze_Object_Renaming): Copy
Has_Volatile_Full_Access from renamed to renaming entities.
* sem_prag.adb (Process_Atomic_Independent_Shared_Volatile):
Tidy up and remove redundant setting of Has_Volatile_Full_Access.
2015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
* ghost.adb (Check_Ghost_Completion): Update references to SPARK
RM 6.9 rules.
(Check_Ghost_Policy): Update references to SPARK RM 6.9 rules.
* sem_ch3.adb (Analyze_Object_Declaration): Update references
to SPARK RM 6.9 rules.
(Check_Completion): Ghost entities do not require a special form of
completion.
* sem_ch6.adb (Analyze_Generic_Subprogram_Body): Update references
to SPARK RM 6.9 rules.
(Analyze_Subprogram_Body_Helper): Update references to SPARK RM 6.9
rules.
* sem_ch7.adb (Analyze_Package_Body_Helper): Update references
to SPARK RM 6.9 rules.
(Requires_Completion_In_Body): Ghost entities do not require a special
form of completion.
2015-05-22 Robert Dewar <dewar@adacore.com>
* a-csquin.ads: Use Ada 2012 notation.
* sem_ch8.adb: Minor reformatting.
2015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
* sem_ch13.adb (Analyze_Aspect_Specifications): Aspect Import
acts as a completion.
2015-05-22 Ed Schonberg <schonberg@adacore.com>
* sem_ch13.adb: Minor reformatting.
2015-05-22 Jose Ruiz <ruiz@adacore.com>
* a-reatim.adb: Minor change, fix typo.
2015-05-22 Robert Dewar <dewar@adacore.com>
* sem_util.ads: Minor addition of ??? comment.
* sem_prag.adb, sem_util.adb: Minor reformatting.
* sem_ch13.adb: minor reformatting.
2015-05-22 Robert Dewar <dewar@adacore.com>
* a-reatim.ads: Add Compile_Time_Error to ensure Duration
is 64-bits.
* sem_ch13.adb: Improve error message.
* exp_ch4.adb: Minor reformatting.
2015-05-22 Hristian Kirtchev <kirtchev@adacore.com>
* sem_prag.adb (Analyze_Pragma): Constants without variable
input do not require indicator Part_Of.
(Check_Missing_Part_Of): Constants without variable input do not
requrie indicator Part_Of.
(Collect_Visible_States): Constants without variable input are
not part of the hidden state of a package.
* sem_util.ads, sem_util.adb (Has_Variable_Input): New routine.
2015-05-22 Robert Dewar <dewar@adacore.com>
* exp_util.adb (Activate_Atomic_Synchronization): Do not set
Atomic_Sync_Required for an object renaming declaration.
* sem_ch8.adb (Analyze_Object_Renaming): Copy Is_Atomic and
Is_Independent to renaming object.
2015-05-22 Ed Schonberg <schonberg@adacore.com>
* sem_ch5.adb (Analyze_Iterator_Specification): Diagnose
various illegalities in iterators over arrays and containers:
a) New function Get_Cursor_Type, to verify that the cursor is
not a limited type at the point of iteration.
b) If the container is a constant, an element_iterator is illegal
if the container type does not have a Constant_Indexing aspect.
c) If the iterate function has an in-out controlling parameter,
the container cannot be a constant object.
d) Reject additional cases of iterators over a
discriminant-dependent component of a mutable object.
2015-05-21 Hristian Kirtchev <kirtchev@adacore.com>
* einfo.adb (Contract): This attribute now applies to constants.
(Set_Contract): This attribute now applies to constants.
(Write_Field34_Name): Add output for constants.
* einfo.ads Attribute Contract now applies to constants.
* sem_ch3.adb (Analyze_Object_Contract): Constants now have
their Part_Of indicator verified.
* sem_prag.adb (Analyze_Constituent): A constant is now a valid
constituent.
(Analyze_Global_Item): A constant cannot act as an output.
(Analyze_Initialization_Item): Constants are now a valid
initialization item.
(Analyze_Initializes_In_Decl_Part): Rename
global variable States_And_Vars to States_And_Objs and update
all its occurrences.
(Analyze_Input_Item): Constants are now a
valid initialization item. Remove SPARM RM references from error
messages.
(Analyze_Pragma): Indicator Part_Of can now apply to a constant.
(Collect_Body_States): Collect both source constants
and variables.
(Collect_States_And_Objects): Collect both source constants and
variables.
(Collect_States_And_Variables): Rename
to Collect_States_And_Objects and update all its occurrences.
(Collect_Visible_States): Do not collect constants and variables
used to map generic formals to actuals.
(Find_Role): The role of a constant is that of an input. Separate the
role of a variable from that of a constant.
(Report_Unused_Constituents): Add specialized wording for constants.
(Report_Unused_States): Add specialized wording for constants.
* sem_util.adb (Add_Contract_Item): Add processing for constants.
* sem_util.ads (Add_Contract_Item): Update the comment on usage.
(Find_Placement_In_State_Space): Update the comment on usage.
2015-05-21 Ed Schonberg <schonberg@adacore.com>
* sem_ch5.adb: minor reformatting.
2015-05-21 Robert Dewar <dewar@adacore.com>
* freeze.adb (Freeze_Entity): Properly tag -gnatw.z messages.
2015-05-21 Robert Dewar <dewar@adacore.com>
* freeze.adb: Minor reformatting.
* cstand.adb (Print_Standard): Fix bad printing of Duration
low bound.
* a-reatim.adb (Time_Of): Complete rewrite to properly detect
out of range args.
2015-05-21 Ed Schonberg <schonberg@adacore.com>
* sem_ch5.adb: add (useless) initial value.
* sem_ch3.adb (Replace_Anonymous_Access_To_Protected_Subprogram):
Check whether the procedure has parameters before processing
formals in ASIS mode.
2015-05-21 Ed Schonberg <schonberg@adacore.com>
* sem_ch13.adb (Check_Iterator_Functions): Emit error on Iterator
aspect as well when indexing function is illegal.
(Valid_Default_Iterator): Handle properly somme illegal cases
to prevent compilation abandoned messages.
(Check_Primitive_Function): Verify that type and indexing function
are in the same scope.
* freeze.adb (Freeze_Record): Extend patch on the presence of
indexing aspects to aspect Default_Iterator.
2015-05-19 David Malcolm <dmalcolm@redhat.com>
* gcc-interface/trans.c (Sloc_to_locus1): Strenghthen local "map"
from line_map * to line_map_ordinary *.
2015-05-12 Jason Merrill <jason@redhat.com>
* sigtramp-vxworks.c: Add space between string literal and macro
name.
2015-05-12 Arnaud Charlet <charlet@adacore.com>
* gnat_rm.texi, gnat_ugn.texi, doc: Documentation updates and clean ups
2015-05-12 Ed Schonberg <schonberg@adacore.com>
* sem_ch5.adb (Analyze_Iterator_Specifications): Additional
legality checks for array and container iterators:
a) The domain of iteration cannot be a component that depends
on discriminants of a mutable object. The check was recently
added for element iterators.
b) The cursor type cannot be a limited type at the point of the
iteration, because the cursor will be assigned to in the body
of the loop.
2015-05-12 Robert Dewar <dewar@adacore.com>
* freeze.adb (Freeze_Record_Type): Make sure that if we have
aspect Iterator_Element, then we have either Constant_Indexing
or Variable_Indexing.
2015-05-12 Ed Schonberg <schonberg@adacore.com>
* a-coormu.ads, a-coormu.adb: Add Indexing aspect, Reference_Type,
and Reference_Control_Type to support element iterators over
ordered multisets.
* a-ciormu.ads, a-ciormu.adb: Ditto for
indefinite_ordered_multisets.
2015-05-12 Hristian Kirtchev <kirtchev@adacore.com>
* exp_ch4.adb (Expand_N_Expression_With_Actions): Force
the evaluation of the EWA expression. Code cleanup.
(Process_Transient_Object): Code cleanup.
* exp_util.adb (Is_Aliased): Controlled transient objects found
within EWA nodes are not aliased.
(Is_Finalizable_Transient): Iterators are not finalizable transients.
2015-05-12 Robert Dewar <dewar@adacore.com>
* sem_prag.adb (Process_Atomic_Independent_Shared_Volatile):
Don't allow Atomic and Volatile_Full_Access for the same entity.
2015-05-12 Ed Schonberg <schonberg@adacore.com>
* sem_ch5.adb (Analyze_Iterator_Specification): Implement new
semantics and safety checks specified in AI12-0151.
2015-05-12 Pierre-Marie de Rodat <derodat@adacore.com>
* sem_ch10.adb (Sem_Ch10.Analyze_Proper_Body): Generate SCOs
for subunit in generic units.
2015-05-12 Robert Dewar <dewar@adacore.com>
* sem_elab.adb (Check_A_Call): Avoid checking internal call
from Valid_Scalars
2015-05-12 Ed Schonberg <schonberg@adacore.com>
* sem_ch6.adb (Process_Formals): An untagged incomplete type
is legal in the profile of a null procedure.
2015-05-12 Ed Schonberg <schonberg@adacore.com>
* sem_ch12.adb (Validate_Derived_Type_Instance): Handle properly
the checks on a derived formal whose parent type is a previous
formal that is not a derived type.
2015-05-12 Robert Dewar <dewar@adacore.com>
* aspects.ads, aspects.adb: Add entries for aspect Volatile_Full_Access
* einfo.adb (Has_Volatile_Full_Access): New flag.
(Has_Volatile_Full_Access): New flag.
* einfo.ads (Has_Volatile_Full_Access): New flag.
* par-prag.adb: Add dummy entry for Volatile_Full_Access.
* sem_prag.adb (Analyze_Pragma, case Volatile_Full_Access):
Implement new pragma.
* snames.ads-tmpl: Add entries for pragma Volatile_Full_Access.
2015-05-12 Robert Dewar <dewar@adacore.com>
* targparm.ads: Minor reformatting.
2015-05-12 Robert Dewar <dewar@adacore.com>
* a-reatim.adb (Time_Of): Properly detect overflow when TS = 0.0.
* a-reatim.ads: Minor reformatting.
2015-05-12 Hristian Kirtchev <kirtchev@adacore.com>
* einfo.ads: Update the documentation of flags
Has_Inherited_Default_Init_Cond and Has_Default_Init_Cond.
2015-05-12 Robert Dewar <dewar@adacore.com>
* impunit.adb: Add entry for a-dhfina.ads
* a-dhfina.ads: New file.
2015-05-12 Ed Schonberg <schonberg@adacore.com>
* exp_ch5.adb (Expand_Iterator_Loop_Over_Array): if the array
type has convention Fortran, a multidimensional iterator varies
the first dimension fastest.
2015-05-12 Hristian Kirtchev <kirtchev@adacore.com>
* einfo.adb: Node32 is now used as Encapsulating_State.
Node37 is now used as Associated_Entity.
(Associated_Entity): New routine.
(Encapsulating_State): Update the assertion guard to include constants.
(Set_Associated_Entity): New routine.
(Set_Encapsulating_State): Update the assertion guard to
include constants.
(Write_Field10_Name): Remove the output for Encapsulating_State.
(Write_Field32_Name): Add output for Encapsulating_State.
(Write_Field37_Name): Add output for Associated_Entity.
* einfo.ads New attribute Associated_Entity along with placement
in entities. Attribute Encapsulating_State now uses Node32.
(Associated_Entity): New routine along with pragma Inline.
(Set_Associated_Entity): New routine along with pragma Inline.
* inline.ads Code reformatting.
* sem_attr.adb (Analyze_Attribute): Correct the prefix of
attribute 'Result when the context is a generic instantiation.
(Analyze_Attribute_Old_Result): Pragmas Depends and
Refined_Depends are a valid context for attribute 'Result.
(Denote_Same_Function): Allow attribute 'Result to denote
generic functions.
* sem_ch3.adb Add with and use clauses for Sem_Ch12.
(Analyze_Declarations): Capture global references within the
contracts of packages, subprograms and their respective bodies.
* sem_ch6.adb (Analyze_Aspects_On_Body_Or_Stub): Removed.
(Analyze_Completion_Contract): Removed.
(Analyze_Generic_Subprogram_Body): Enchange the aspects after
creating the generic copy. Create a generic contract for the
template. Analyze the aspects of the generic body. Analyze the
contract of the generic body when it is a compilation unit and
capture global references.
(Analyze_Subprogram_Body_Contract): Code cleanup.
(Analyze_Subprogram_Contract): Do not save global references here.
(Save_Global_References_In_List): Removed.
* sem_ch7.adb (Analyze_Package_Body_Contract): Code cleanup.
(Analyze_Package_Body_Helper): Create a generic contract for
the template.
(Analyze_Package_Contract): Code cleanup.
* sem_ch10.adb Add with and use clauses for Sem_Ch12.
(Analyze_Compilation_Unit): Capture global references in a
generic subprogram declaration that acts as a compilation unit.
* sem_ch12.adb Add with and use clauses for Sem_Prag. Illustrate
the implementation of generic contracts. Alphabetize various
subprograms.
(Analyze_Generic_Package_Declaration):
Create a generic contract for the template.
(Analyze_Generic_Subprogram_Declaration): Create a generic
contract for the template.
(Analyze_Subprogram_Instantiation): Instantiate the contract of the
subprogram.
(Copy_Generic_Node): Link defining entities of the generic template
with the corresponding defining entities of the generic copy. Update
the processing of pragmas.
(Instantiate_Contract): Removed.
(Instantiate_Subprogram_Contract): New routine.
(Requires_Delayed_Save): New routine.
(Save_Global_References): Rename formal parameter N to Templ. Various
cleanups.
(Save_Global_References_In_Aspects): Moved from the spec.
(Save_Global_References_In_Contract): New routine.
(Save_References_In_Aggregate): New routine.
(Save_References_In_Char_Lit_Or_Op_Symbol): New routine.
(Save_References_In_Descendants): New routine.
(Save_References_In_Identifier): New routine.
(Save_References_In_Operator): New routine.
(Save_References_In_Pragma): New routine.
* sem_ch12.ads (Save_Global_References): Rename formal
parameter N to Templ. Update the comment on usage.
(Save_Global_References_In_Aspects): Moved to the body.
(Save_Global_References_In_Contract): New routine.
* sem_ch13.adb (Analyze_Aspect_Specifications_On_Body_Or_Stub):
New routine.
* sem_ch13.ads (Analyze_Aspect_Specifications_On_Body_Or_Stub):
New routine.
* sem_prag.adb (Add_Item_To_Name_Buffer): Add support for
generic parameters.
(Analyze_Contract_Cases_In_Decl_Part): Code cleanup.
(Analyze_Depends_Global): New routine.
(Analyze_Depends_In_Decl_Part): Code cleanup.
(Analyze_Global_In_Decl_Part): Code cleanup.
(Analyze_Global_Item): Constants are now valid global items. Do
not perform state-related checks in an instance. Change the way
renamings are handled. (Analyze_Initial_Condition_In_Decl_Part):
Code cleanup.
(Analyze_Initializes_In_Decl_Part): Code cleanup.
(Analyze_Input_Output): The analysis of attribute 'Result in
the context of pragmas Depends or Refined_Depends now reuses
the existing attribute analysis machinery. Constants and
generic parameters are now valid dependency items. Do not
perform state-related checks in an instance. Change the way
renamings are handled. (Analyze_Pragma): Add a "characteristics"
section for pragmas Abstract_State, Contract_Cases, Depends,
Extensions_Visible, Global, Initial_Condition, Initializes,
Post, Post_Class, Postcondition, Pre, Pre_Class, Precondition,
Refined_Depends, Refined_Global, Refined_Post, Refined_State, Test_Case.
(Analyze_Pre_Post_Condition): Do not create a generic
template here.
(Analyze_Pre_Post_Condition_In_Decl_Part): Code cleanup.
(Analyze_Refined_Depends_Global_Post): New routine.
(Analyze_Refined_Depends_In_Decl_Part): Code cleanup.
(Analyze_Refined_Global_In_Decl_Part): Code cleanup.
(Analyze_Refined_Pragma): Removed.
(Analyze_Refined_State_In_Decl_Part): Code cleanup.
(Analyze_Test_Case_In_Decl_Part): Code cleanup.
(Check_Dependency_Clause): Do not perform this check in an instance.
(Check_Function_Return): Add support for generic functions.
(Check_In_Out_States): Do not perform this check in an instance.
(Check_Input_States): Do not perform this check in an instance.
(Check_Mode_Restriction_In_Function): Add support for generic functions.
(Check_Output_States): Do not perform this check in an instance.
(Check_Postcondition_Use_In_Inlined_Subprogram): Rename
parameter Subp_Id to Spec_Id and update comment on usage.
(Check_Proof_In_States): Do not perform this check in an instance.
(Check_Refined_Global_Item): Add support for constants.
(Check_Refined_Global_List): Do not perform this check in an instance.
(Collect_Global_Items): Reimplemented.
(Collect_Subprogram_Inputs_Outputs): Add support for generic parameters.
(Create_Generic_Template): Removed.
(Find_Related_Package_Or_Body): Moved to spec.
(Find_Role): Add support for generic parameters and constants.
(Get_Argument): Moved to spec. Rename parameter Spec_Id to Context_Id.
(Match_Item): Add support for constants.
(Preanalyze_Test_Case_Arg): Reimplemented.
(Report_Extra_Clauses): Do not perform this check in an instance.
(Report_Extra_Constituents): Do not perform this check in an instance.
* sem_prag.ads (Collect_Subprogram_Inputs_Outputs): Update
the comment on usage.
(Find_Related_Package_Or_Body): Moved from body.
(Get_Argument): Moved from body.
* sem_util.adb Add with and use clauses for Sem_Ch12.
(Corresponding_Spec_Of): Add support for packages and package bodies.
(Create_Generic_Contract): New routine.
(Is_Contract_Annotation): Reimplemented.
(Is_Generic_Declaration_Or_Body): New routine.
(Is_Package_Contract_Annotation): New routine.
(Is_Subprogram_Contract_Annotation): New routine.
* sem_util.ads (Corresponding_Spec_Of): Update the comment on usage.
(Create_Generic_Contract): New routine.
(Is_Generic_Declaration_Or_Body): New routine.
(Is_Package_Contract_Annotation): New routine.
(Is_Subprogram_Contract_Annotation): New routine.
* sinfo.adb (Is_Generic_Contract_Pragma): New routine.
(Set_Is_Generic_Contract_Pragma): New routine.
* sinfo.ads Add new attribute Is_Generic_Contract_Pragma along
with occurrences in nodes.
(Is_Generic_Contract_Pragma): New routine along with pragma Inline.
(Set_Is_Generic_Contract_Pragma): New routine along with pragma Inline.
* treepr.adb (Print_Entity_Info): Output fields 36 to 41.
2015-05-12 Robert Dewar <dewar@adacore.com>
* a-taster.ads: Minor comment fix: fix bad header, this is a
pure RM unit.
2015-05-12 Robert Dewar <dewar@adacore.com>
* sem_intr.adb: (Check_Shift): Diagnose bad modulus value.
2015-05-12 Robert Dewar <dewar@adacore.com>
* gnat1drv.adb (Adjust_Global_Switches): Default to suppressing
Alignment_Checks on non-strict alignment machine.
* sem_ch13.adb (Validate_Address_Clauses): Don't give
compile-time alignment warnings if run time Alignment_Check
is suppressed.
2015-05-12 Thomas Quinot <quinot@adacore.com>
* g-sercom.ads, g-sercom-linux.adb (GNAT.Serial_Communications.
Data_Rate): New literals B75, B110, B150, B300, B600.
2015-05-12 Doug Rupp <rupp@adacore.com>
* init.c (__gnat_init_float) [vxworks]: For e500v2,
do nothing and leave the responsibility to install the handler
and enable the exceptions to the BSP.
2015-05-12 Robert Dewar <dewar@adacore.com>
* sem_ch9.adb, einfo.ads, exp_intr.adb: Minor reformatting.
* sem_disp.adb: Minor code reorganization (remove junk redundant
null statement).
* exp_unst.adb (Unnest_Subprogram.Uplev_Refs): Ignore uplevel
references to bounds of types coming from original type reference.
* checks.ads: Minor reformatting.
* checks.adb: Minor reformatting.
* sem_prag.adb (Analyze_Pragma, case Check): If in ignored
assertion, then make sure we do not drag in bignum stuff.
2015-05-12 Ed Schonberg <schonberg@adacore.com>
* sem_ch9.adb (Collect_Interfaces): Initialize
Direct_Primitive_Operations for a tagged synchronized type,
so it can used in ASIS mode.
* sem_disp.adb (Check_Dispatching_Operation): If expansion is
disabled, attach subprogram to list of Direct_Primitive_Operations
of synchronized type itself, for ASIS use, because in this case
Corresponding_Record_Type is not built.
* einfo.ads: Indicate use of Direct_Primitive_Operations on
synchronized type.
2015-05-12 Pierre-Marie de Rodat <derodat@adacore.com>
* exp_pakd.adb: Make clearer the comment in exp_pakd.adb about
___XP suffixes.
2015-05-12 Robert Dewar <dewar@adacore.com>
* sem_ch3.adb, sem_util.adb, sem_ch6.adb: Minor reformatting.
2015-05-12 Robert Dewar <dewar@adacore.com>
* exp_unst.adb (Visit_Node): Deal with subprogram and package stubs.
2015-05-12 Ed Schonberg <schonberg@adacore.com>
* exp_intr.adb (Expand_Dispatching_Constructor_Call): The
tag to be retrieved for the generated call is the first entry
in the dispatch table for the return type of the instantiated
constructor.
2015-05-12 Bob Duff <duff@adacore.com>
* exp_ch7.adb, exp_ch7.ads, exp_intr.adb, exp_util.adb,
exp_util.ads: Update comments.
2015-05-12 Ed Schonberg <schonberg@adacore.com>
* sem_ch3.adb (Add_Internal_Interface_Entities): Do no generate
freeze nodes for these in ASIS mode, because they lead to
elaoration order issues in gigi.
2015-05-12 Hristian Kirtchev <kirtchev@adacore.com>
* sem_ch6.adb (Analyze_Expression_Function): Code
cleanup. Use Copy_Subprogram_Spec to create a proper spec.
(Analyze_Subprogram_Body_Helper): Code cleanup. Do not
prepare a stand alone body for inlining in GNATprove mode
when inside a generic. (Body_Has_Contract): Reimplemented.
(Build_Subprogram_Declaration): New routine.
* sem_ch10.adb (Analyze_Compilation_Unit): Capture global
references within generic bodies by loading them.
* sem_util.adb (Copy_Parameter_List): Code cleanup.
(Copy_Subprogram_Spec): New routine.
(Is_Contract_Annotation): New routine.
* sem_util.ads (Copy_Subprogram_Spec): New routine.
(Is_Contract_Annotation): New routine.
2015-05-12 Hristian Kirtchev <kirtchev@adacore.com>
* sem_attr.adb (Resolve_Attribute): Do not analyze the generated
body of an expression function when the prefix of attribute
'Access is the body.
2015-05-12 Ed Schonberg <schonberg@adacore.com>
* sem_ch3.adb (Build_Derived_Enumeration_Type): The anonymous base
created for a derived enumeration type is not a first subtype,
even though it is defined through a full type declaration.
* sem_ch13.adb (Analyze_Aspects_At_Freeze_Point): Do not process
aspects for the anonymous base type constructed for a derived
scalar type, because they will be set when the first subtype
is frozen.
(Inherit_Aspects_At_Freeze_Point): Fix typos on handling of
Default_Value and Default_Component_Value, that prevented the
proper inheritance of these aspects.
2015-05-12 Gary Dismukes <dismukes@adacore.com>
* exp_ch6.adb, exp_unst.adb: Minor typo fixes.
2015-05-12 Robert Dewar <dewar@adacore.com>
* sem_ch3.adb: Minor reformatting.
2015-05-12 Vincent Celier <celier@adacore.com>
* gnatcmd.adb: If we want to invoke gnatmake (gnatclean) with
-P, then check if gprbuild (gprclean) is available; if it is,
use gprbuild (gprclean) instead of gnatmake (gnatclean).
2015-05-12 Robert Dewar <dewar@adacore.com>
* debug.adb: Add flag -gnatd.3 to output diagnostic info from
Exp_Unst.
* einfo.ad, einfo.adb: Reorganize (and remove most of) flags used by
Exp_Unst.
* exp_ch6.adb (Unest_Bodies): Table for delayed calls to
Unnest_Subprogram (Expand_N_Subprogram_Body): Add entry to table
for later call instead of calling Unnest_Subprogram directly
(Initialize): New procedure (Unnest_Subprograms): New procedure
* exp_ch6.ads (Add_Extra_Actual_To_Call): Move into proper
alpha order.
(Initialize): New procedure.
(Unnest_Subprograms): New procedure.
* exp_unst.adb (Unnest_Subprogram): Major rewrite, moving
all processing to this routine which is now called late
after instantiating bodies. Fully handles the case of generic
instantiations now.
* exp_unst.ads: Major rewrite, moving all processing to
Unnest_Subprogram.
* frontend.adb (Frontend): Add call to Exp_Ch6.Initialize.
(Frontend): Add call to Unnest_Subprograms.
* sem_ch8.adb (Find_Direct_Name): Back to old calling sequence
for Check_Nested_Access.
* sem_util.adb (Build_Default_Subtype): Minor reformatting
(Check_Nested_Access): Back to original VM-only form (we
now do all the processing for Unnest_Subprogram at the time
it is called.
(Denotes_Same_Object): Minor reformatting
(Note_Possible_Modification): Old calling sequence for
Check_Nested_Access.
* sem_util.ads (Check_Nested_Access): Back to original VM-only
form (we now do all the processing for Unnest_Subprogram at the
time it is called.
2015-05-12 Robert Dewar <dewar@adacore.com>
* sem_ch3.adb, freeze.adb, sem_ch6.adb: Minor reformatting.
2015-05-12 Ed Schonberg <schonberg@adacore.com>
* sem_ch3.adb (Analyze_Object_Declaration): New function
Has_Delayed_Aspect, used to defer resolution of an aggregate
expression when the object declaration carries aspects Address
and/or Alignment.
* freeze.adb (Freeze_Object_Declaration): New subsidiary procedure
to Freeze_Entity. In addition to the previous processing steps
at the freeze point of an object, this procedure also handles
aggregates in object declarations, when the declaration carries
delayed aspects that require that the initialization of the
object be attached to its freeze actions.
2015-05-12 Ed Schonberg <schonberg@adacore.com>
* sem_ch6.adb (Analyze_Subprogram_Declaration): Following
AI12-0147, null procedures and expression functions are allowed
in protected bodies.
2015-05-12 Tristan Gingold <gingold@adacore.com>
* i-cpoint.adb (Copy_Terminated_Array): Copy nothing if Length is 0.
2015-05-12 Ed Schonberg <schonberg@adacore.com>
* sem_ch3.adb (Complete_Private_Subtype): Propagate
Has_Delayed_Aspects flag from private to full view, to ensure
that predicate functions are constructed.
2015-05-12 Ed Schonberg <schonberg@adacore.com>
* sem_ch6.adb (Process_Formals): If a tagged formal is an
incomplete class-wide type, the subprogram must have a delayed
freeze even though the opertation is not a primitive of the
type. THis ensures that the backend can recover the full view
when elaborating the subprogram declaration.
2015-05-12 Ed Schonberg <schonberg@adacore.com>
* exp_util.adb (Get_Current_Value_Condition): Nothing to be
done if an elsif part has been rewritten so that it is not part
of an enclosing if_statement.
2015-05-12 Robert Dewar <dewar@adacore.com>
* sem_type.adb, sem_ch10.adb, freeze.adb, sem_ch6.adb, exp_disp.adb:
Minor reformatting.
2015-05-12 Bob Duff <duff@adacore.com>
* exp_attr.adb (Size): Remove unnecessary check for types with
unknown discriminants. That was causing the compiler to build
a function call _size(T), where T is a type, not an object.
2015-05-12 Ed Schonberg <schonberg@adacore.com>
* sem_ch4.adb (Extended_Primitive_Ops): Exclude overriding
primitive operations of a type extension declared in the package
body, to prevent duplicates in extended list.
2015-05-12 Ed Schonberg <schonberg@adacore.com>
* sem_ch3.adb (Analyze_Component_Declaration): If the component is
an unconstrained synchronized type with discriminants, create a
constrained default subtype for it, so that the enclosing record
can be given the proper size.
* sem_util.adb (Build_Default_Subtype): If the subtype is created
for a record discriminant, do not analyze the declarztion at
once because it is added to the freezing actions of the enclosing
record type.
2015-05-12 Robert Dewar <dewar@adacore.com>
* exp_prag.adb (Expand_N_Pragma): Rewrite ignored pragma as
Null statements.
* namet.ads (Boolean3): Document this flag used for Ignore_Pragma.
* par-prag.adb (Prag): Implement Ignore_Pragma.
* sem_prag.adb: Implement Ignore_Pragma.
* snames.ads-tmpl: Add entries for pragma Ignore_Pragma.
2015-05-12 Javier Miranda <miranda@adacore.com>
* sem_ch10.adb (Build_Shadow_Entity): Link the class-wide shadow
entity with its corresponding real entity.
(Decorate_Type): Unconditionally build the class-wide shadow entity of
tagged types.
* einfo.ads, einfo.adb (Has_Non_Limited_View): New synthesized
attribute.
(Non_Limited_View): Moved from field 17 to field 19 be available
in class-wide entities.
* exp_attr.adb (Access_Cases): Code cleanup.
* exp_disp.adb (Expand_Interface_Actuals): Ditto.
* exp_util.adb (Non_Limited_Designated_Type): Ditto.
* freeze.adb (Build_Renamed_Bdody): Ditto.
* sem_aux.adb (Available_View): Ditto.
* sem_ch4.adb (Analyze_Selected_Component): Ditto.
(Try_One_Prefix_Interpretation): Ditto.
* sem_ch5.adb (Analyze_Assignment): Ditto.
* sem_ch6.adb (Detect_And_Exchange): Ditto.
* sem_ch8.adb (Find_Expanded_Name): Ditto.
* sem_disp.adb (Check_Controlling_Type): Ditto.
* sem_res.adb (Resolve_Type_Conversion): Ditto.
(Full_Designated_Type): Ditto.
* sem_type.adb (Covers): Ditto.
* sem_util.adb: Fix typo in comment.
2015-05-12 Robert Dewar <dewar@adacore.com>
* exp_unst.adb (Get_Real_Subp): New subprogram.
(Unnest_Subprogram): Use Get_Real_Subp.
(Uplev_Refs_For_One_Subp): Skip if no ARECnU entity.
(Uplev_Refs_For_One_Subp): Use actual subtype in unconstrained case.
2015-05-12 Robert Dewar <dewar@adacore.com>
* a-reatim.adb ("/"): Add explicit check for Time_Span_First / -1.
2015-05-12 Ed Schonberg <schonberg@adacore.com>
* sem_ch4.adb (Extended_Primitive_Ops): New subprogram,
auxiliary to Try_Primitive_Operation to handle properly prefixed
calls where the operation is not a primitive of the type, but
is declared in the package body that is in the immediate scope
of the type.
2015-05-12 Robert Dewar <dewar@adacore.com>
* sem_util.adb (Is_Variable): Allow X'Deref(Y) as a variable.
2015-05-12 Ed Schonberg <schonberg@adacore.com>
* sem_ch8.adb (Find_Expanded_Name): Handle properly a fully
qualified name for an instance of a generic grand-child unit in
the body its parent.
2015-05-12 Robert Dewar <dewar@adacore.com>
* exp_unst.adb (Upref_Name): New subprogram.
(Unnest_Subprogram): Use Upref_Name.
(Unnest_Subprogram): Use new Deref attribute.
* exp_unst.ads: Doc updates.
2015-05-12 Thomas Quinot <quinot@adacore.com>
* adaint.c: Enable Large File Support in adaint so that __gnat_readdir
can access files on filesystems mounted from servers that use large
NFS file handles.
2015-05-09 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/utils.c (gnat_write_global_declarations): Use type_decl
method instead of global_decl for TYPE_DECLs.
2015-04-27 Jim Wilson <jim.wilson@linaro.org>
* gcc-interface/Makefile-lan.in (ada.mostlyclean): Remove gnatbind
and gnat1.
2015-04-13 Eric Botcazou <ebotcazou@adacore.com>
* gnatvsn.ads (Library_Version): Bump to 6.
2015-04-09 Iain Sandoe <iain@codesourcery.com>
* gcc-interface/Makefile.in (darwin, powerpc): Enable atomics.
2015-04-08 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Do not make
a function returning an unconstrained type 'const' for the middle-end.
* gcc-interface/trans.c (Pragma_to_gnu) <case Pragma_Warning>: Use
exact condition to detect Reason => "..." pattern.
2015-03-31 Tom de Vries <tom@codesourcery.com>
PR ada/65490
* terminals.c (child_setup_tty): Fix warning 'argument to sizeof in
bzero call is the same expression as the destination'.
2015-03-26 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/trans.c (Attribute_to_gnu) <Attr_Deref>: New case.
2015-03-24 Gary Dismukes <dismukes@adacore.com>
* sem_ch3.adb: Minor typo fix (missing paren).
2015-03-24 Robert Dewar <dewar@adacore.com>
* sinfo.ads: Update comment.
2015-03-24 Robert Dewar <dewar@adacore.com>
* exp_attr.adb: Add entry for typ'Deref.
* sem_attr.adb (Deref): New GNAT attribute.
* sem_attr.ads: Add entry for new GNAT attribute Deref.
* snames.ads-tmpl: Add entries for new attribute Deref.
2015-03-24 Ed Schonberg <schonberg@adacore.com>
* sem_ch13.adb (Rep_Item_Too_Early): allow pragma Convention
on generic type.
2015-03-24 Gary Dismukes <dismukes@adacore.com>
* inline.adb: Minor typo fix.
2015-03-24 Arnaud Charlet <charlet@adacore.com>
* doc/gnat_ugn/building_executable_programs_with_gnat.rst,
doc/gnat_ugn/gnat_utility_programs.rst
doc/gnat_rm/implementation_defined_attributes.rst
doc/gnat_rm/implementation_defined_pragmas.rst
doc/gnat_rm/representation_clauses_and_pragmas.rst
doc/gnat_rm/about_this_guide.rst
doc/gnat_rm/implementation_of_ada_2012_features.rst: Doc improvements.
* gnat_rm.texi, gnat_ugn.texi: Regenerate.
2015-03-23 Jakub Jelinek <jakub@redhat.com>
PR bootstrap/65522
* adadecode.c (ada_demangle): Guard with IN_RTS instead of IN_GCC.
2015-03-20 Eric Botcazou <ebotcazou@adacore.com>
PR ada/65451
* gcc-interface/utils.c (gnat_pushdecl): Tidy up and improve comment.
Make sure to chain only main variants through TYPE_NEXT_PTR_TO.
* gcc-interface/trans.c (Attribute_to_gnu): Revert latest change.
2015-03-16 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/utils2.c (gnat_invariant_expr): Return null if the type
of the expression ends up being composite.
2015-03-16 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/decl.c (is_from_limited_with_of_main): New predicate.
(gnat_to_gnu_entity) <E_Subprogram_Type>: Invoke it on return and
parameter types to detect circularities in ASIS mode.
* gcc-interface/trans.c (Attribute_to_gnu): Mention AI05-0151.
2015-03-16 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Abstract_State>: Do not
short-circuit the regular handling.
2015-03-13 Robert Dewar <dewar@adacore.com>
* exp_unst.adb (Note_Uplevel_Reference): Eliminate duplicate
references.
(Actual_Ref): New function.
(AREC_String): Minor reformatting.
(Unnest_Subprogram): Use Actual_Ref.
* frontend.adb (Frontend): Turn off Unnest_Subprogram_Mode
before call to Instantiate_Bodies.
2015-03-13 Ed Schonberg <schonberg@adacore.com>
* freeze.adb (Freeze_Profile): If the return type of a function
being frozen is an untagged limited view and the function is
abstract, mark the type as frozen because there is no later
point at which the profile of the subprogram will be elaborated.
2015-03-13 Robert Dewar <dewar@adacore.com>
* einfo.adb, einfo.ads, atree.adb, atree.ads, atree.h: Add seventh
component to entities. Add new fields Field36-41 and Node36-41.
2015-03-13 Claire Dross <dross@adacore.com>
* inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Rewrite after review.
2015-03-13 Robert Dewar <dewar@adacore.com>
* exp_util.adb (Is_Volatile_Reference): Compile time known
value is never considered to be a volatile reference.
2015-03-13 Robert Dewar <dewar@adacore.com>
* sem_ch3.adb (Analyze_Object_Contract): Suppress "constant
cannot be volatile" for internally generated object (such as
FIRST and LAST constants).
2015-03-13 Ed Schonberg <schonberg@adacore.com>
* sem_ch12.adb (Validate_Access_Subprogram_Instance): If a
convention is specified for the formal parameter, verify that
the actual has the same convention.
* sem_prag.adb (Set_Convention_From_Pragma): Allow convention
pragma to be set on a generic formal type.
* sem_util.adb (Set_Convention): Ignore within an instance,
as it has already been verified in the generic unit.
2015-03-13 Claire Dross <dross@adacore.com>
* inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Do not inline
subprograms with unconstrained record parameters containing
Itype declarations.
* sinfo.ads Document GNATprove assumption that type should match
in the AST.
* sem_ch6.adb (Analyze_Subprogram_Body_Contract):
Do not check for Refined_Depends and Refined_Globals contracts
as they are optional.
2015-03-13 Ed Schonberg <schonberg@adacore.com>
* sem_ch12.adb (Instantiate_Type): For a floating-point type,
capture dimension info if any, because the generated subtype
declaration does not come from source and will not process dimensions.
* sem_dim,adb (Analyze_Dimension_Extension_Or_Record_Aggregate):
Do not analyze expressions with an initialization procedure
because aggregates will have been checked at the point of record
declaration.
2015-03-13 Robert Dewar <dewar@adacore.com>
* aspects.ads, aspects.adb: Add entries for aspect Unimplemented.
* einfo.ads, einfo.adb (Is_Unimplemented): New flag.
* sem_ch13.adb: Add dummy entry for aspect Unimplemented.
* snames.ads-tmpl: Add entry for Name_Unimplemented.
2015-03-13 Gary Dismukes <dismukes@adacore.com>
* style.adb (Missing_Overriding): Apply the
Comes_From_Source test to the Original_Node of the subprogram
node, to handle the case of a null procedure declaration that
has been rewritten as an empty procedure body.
2015-03-13 Robert Dewar <dewar@adacore.com>
* exp_util.ads: Minor fix to comment.
* sem_ch3.adb (Constrain_Index): Correct pasto from previous
change.
2015-03-13 Robert Dewar <dewar@adacore.com>
* exp_util.ads, exp_util.adb (Force_Evaluation): Add Related_Id and
Is_Low/High_Bound params.
* sem_ch3.adb (Constrain_Index): Use new Force_Evaluation calling
sequence to simplify generation of FIRST/LAST temps for bounds.
2015-03-12 Olivier Hainque <hainque@adacore.com>
* gcc-interface/trans.c (Attribute_to_gnu) <Code_Address case>:
On targets where a function symbol designates a function descriptor,
fetch the function code address from the descriptor.
(USE_RUNTIME_DESCRIPTORS): Provide a default definition.
2015-03-04 Robert Dewar <dewar@adacore.com>
* sem_warn.adb: Minor reformatting.
* init.c: Minor tweaks.
2015-03-04 Dmitriy Anisimko <anisimko@adacore.com>
* a-coinho-shared.adb: Fix clear of already empty holder.
2015-03-04 Robert Dewar <dewar@adacore.com>
* exp_unst.adb (Check_Dynamic_Type): Ignore library level types.
(Check_Uplevel_Reference_To_Type): Ignore call inside generic.
(Note_Uplevel_Reference): Ignore call inside generic.
(Note_Uplevel_Reference): Fix check for no entity field.
(Unnest_Subprogram): Ignore call inside generic.
(Find_Current_Subprogram): Use Defining_Entity, not Defining_Unit_Name.
(Visit_Node): Ignore calls to Imported subprograms.
(Visit_Node): Fix problem in finding subprogram body in some cases.
(Add_Form_To_Spec): Use Defining_Entity, not Defining_Unit_Name.
2015-03-04 Robert Dewar <dewar@adacore.com>
* einfo.adb (Is_ARECnF_Entity): Removed.
(Last_Formal): Remove special handling of Is_ARECnF_Entity.
(Next_Formal): Remove special handling of Is_ARECnF_Entity.
(Next_Formal_With_Extras): Remove special handling of Is_ARECnF_Entity.
(Number_Entries): Minor reformatting.
* einfo.ads (Is_ARECnF_Entity): Removed.
* exp_unst.adb (Unnest_Subprogram): Remove setting of
Is_ARECnF_Entity.
(Add_Extra_Formal): Use normal Extra_Formal circuit.
* sprint.adb (Write_Param_Specs): Properly handle case where
there are no source formals, but we have at least one Extra_Formal
present.
2015-03-04 Ed Schonberg <schonberg@adacore.com>
* sem_aggr.adb (Resolve_Record_Aggregate,
Add_Discriminant_Values): If the value is a reference to the
current instance of an enclosing type, use its base type to check
against prefix of attribute reference, because the target type
may be otherwise constrained.
2015-03-04 Robert Dewar <dewar@adacore.com>
* atree.h: Add entries for Flag287-Flag309.
* einfo.adb: Add (unused) flags Flag287-Flag309.
2015-03-04 Ed Schonberg <schonberg@adacore.com>
* sem_util.adb (Collect_Interfaces, Collect): When gathering
interfaces of ancestors, handle properly a subtype of a private
extension.
2015-03-04 Robert Dewar <dewar@adacore.com>
* einfo.adb (Is_ARECnF_Entity): New flag (ARECnF is an extra formal).
(Next_Formal): Don't return ARECnF formal.
(Last_Formal): Don't consider ARECnF formal.
(Next_Formal_With_Extras): Do consider ARECnF formal.
* einfo.ads (Is_ARECnF_Entity): New flag (ARECnF is an extra formal).
* exp_unst.adb (Create_Entities): Set Is_ARECnF_Entity flag.
2015-03-04 Javier Miranda <miranda@adacore.com>
* exp_ch6.adb (Expand_Simple_Function_Return): When the returned
object is a class-wide interface object and we generate the
accessibility described in RM 6.5(8/3) then displace the pointer
to the object to reference the base of the object (to get access
to the TSD of the object).
2015-03-04 Hristian Kirtchev <kirtchev@adacore.com>
* sem_prag.adb (Analyze_Abstract_State): Use routine
Malformed_State_Error to issue general errors.
(Analyze_Pragma): Diagnose a syntax error related to a state
declaration with a simple option.
(Malformed_State_Error): New routine.
2015-03-04 Robert Dewar <dewar@adacore.com>
* a-strsup.adb (Super_Slice): Deal with super flat case.
* einfo.ads: Minor reformatting.
* s-imgdec.adb (Set_Decimal_Digits): Add comment about possibly
redundant code.
2015-03-04 Claire Dross <dross@adacore.com>
* a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
a-cforse.ads, a-cofove.ads: Use Default_Initial_Condition on formal
containers.
2015-03-04 Ed Schonberg <schonberg@adacore.com>
* sem_warn.adb (Check_References): When checking for an unused
in-out parameter of a class- wide type, use its type to determine
whether it is private, in order to avoid a spurious warning when
subprogram spec and body are in different units.
2015-03-04 Yannick Moy <moy@adacore.com>
* sem_attr.adb: Improve warning messages.
2015-03-04 Robert Dewar <dewar@adacore.com>
* exp_ch6.adb (Expand_N_Subprogram_Body): Avoid trying to unnest
generic subprograms.
* exp_unst.adb (Check_Dynamic_Type): Handle record types properly
(Note_Uplevel_Reference): Ignore uplevel references to non-types
(Get_Level): Consider only subprograms, not blocks.
(Visit_Node): Set proper condition for generating ARECnF entity.
Ignore indirect calls. Ignore calls to subprograms
outside our nest.
(Unnest_Subprogram): Minor changes in dealing with ARECnF entity.
(Add_Form_To_Spec): Properly set Last_Entity field.
(Unnest_Subprogram): Set current subprogram scope for analyze calls.
Handle case of no uplevel refs in outer subprogram
Don't mark uplevel entities as aliased.
Don't deal with calls with no ARECnF requirement.
2015-03-04 Robert Dewar <dewar@adacore.com>
* s-valrea.adb (Scan_Real): Remove redundant tests from scaling loops.
* s-imgdec.adb (Set_Decimal_Digits): Remove redundant Max
operation in computing LZ.
* sem_attr.adb: Minor typo fix
2015-03-04 Robert Dewar <dewar@adacore.com>
* exp_ch7.adb: Minor reformatting.
* exp_unst.adb (Build_Tables): Fix minor glitch for no separate
spec case.
* erroutc.adb (Delete_Msg): add missing decrement of info msg counter.
2015-03-04 Hristian Kirtchev <kirtchev@adacore.com>
* exp_ch6.adb (Build_Pragma_Check_Equivalent): Suppress
references to formal parameters subject to pragma Unreferenced.
(Suppress_Reference): New routine.
* sem_attr.adb (Analyze_Attribute): Reimplement the analysis
of attribute 'Old. Attributes 'Old and 'Result now share
common processing.
(Analyze_Old_Result_Attribute): New routine.
(Check_Placement_In_Check): Removed.
(Check_Placement_In_Contract_Cases): Removed.
(Check_Placement_In_Test_Case): Removed.
(Check_Use_In_Contract_Cases): Removed.
(Check_Use_In_Test_Case): Removed.
(In_Refined_Post): Removed.
(Is_Within): Removed.
* sem_warn.adb (Check_Low_Bound_Tested): Code cleanup.
(Check_Low_Bound_Tested_For): New routine.
2015-03-04 Hristian Kirtchev <kirtchev@adacore.com>
* exp_ch3.adb (Expand_N_Object_Declaration):
Generate a runtime check to test the expression of pragma
Default_Initial_Condition when the object is default initialized.
2015-03-02 Robert Dewar <dewar@adacore.com>
* scng.adb (Scan): Ignore illegal character in relaxed
semantics mode.
2015-03-02 Ed Schonberg <schonberg@adacore.com>
* sem_ch4.adb (Analyze_Set_Membership); Retain Overloaded flag
on left operand, so it can be properly resolved with type of
alternatives of right operand.
* sem_res.adb (Resolve_Set_Membership): Handle properly an
overloaded left-hand side when the alternatives on the right
hand side are literals of some universal type. Use first
non-overloaded alternative to find expected type.
2015-03-02 Ed Schonberg <schonberg@adacore.com>
* exp_ch7.adb (Make_Set_Finalize_Address_Call): Use underlying
type to retrieve designated type, because the purported access
type may be a partial (private) view, when it is declared in
the private part of a nested package, and finalization actions
are generated when completing compilation of enclosing unit.
2015-03-02 Robert Dewar <dewar@adacore.com>
* back_end.adb (Call_Back_End): Remove previous patch,
the back end now gets to see the result of -gnatd.1
(Unnest_Subprogram_Mode) processing.
* elists.ads, elists.adb (List_Length): New function.
* exp_unst.ads, exp_unst.adb: Major changes, first complete version.
* sem_util.adb (Check_Nested_Access): Handle formals in
Unnest_Subprogram_Mode.
(Adjust_Named_Associations): Minor reformatting.
* sprint.adb (Sprint_Node_Actual): Fix failure to print aliased
for parameters.
2015-03-02 Robert Dewar <dewar@adacore.com>
* atree.ads, atree.adb (Uint24): New function
(Set_Uint24): New procedure.
* atree.h (Uint24): New macro for field access.
* back_end.adb (Call_Back_End): For now, don't call back end
if unnesting subprogs.
* einfo.adb (Activation_Record_Component): New field
(Subps_Index): New field.
* einfo.ads (Activation_Record_Component): New field
(Subps_Index): New field Minor reordering of comments into alpha order.
* exp_unst.ads, exp_unst.adb: Continued development.
2015-03-02 Gary Dismukes <dismukes@adacore.com>
* exp_disp.ads: Minor reformatting.
2015-03-02 Ed Schonberg <schonberg@adacore.com>
* sem_ch8.adb (Chain_Use_Clause): Do not chain use clause from
ancestor to list of use clauses active in descendant unit if we
are within the private part of an intervening parent, to prevent
circularities in use clause list.
2015-03-02 Javier Miranda <miranda@adacore.com>
* exp_ch9.adb (Build_Corresponding_Record): Propagate type
invariants to the corresponding record type.
* exp_disp.ad[sb] (Set_DT_Position_Value): New subprogram
which sets the value of the DTC_Entity associated with a given
primitive of a tagged type and propagates the value to the
wrapped subprogram.
(Set_DTC_Entity_Value): Propagate the DTC
value to the wrapped entity.
* sem_ch13.adb (Build_Invariant_Procedure): Append the code
associated with invariants of progenitors.
* sem_ch3.adb (Build_Derived_Record_Type): Inherit type invariants
of parents and progenitors.
(Process_Full_View): Check hidden inheritance of class-wide type
invariants.
* sem_ch7.adb (Analyze_Package_Specification): Do not generate
the invariant procedure for interface types; build the invariant
procedure for tagged types inheriting invariants from their
progenitors.
* sem_prag.adb (Pragma_Invariant) Allow invariants in interface
types but do not build their invariant procedure since their
invariants will be propagated to the invariant procedure of
types covering the interface.
* exp_ch6.adb, exp_disp.adb, sem_ch3.adb, sem_ch7.adb,
sem_ch8.adb, sem_disp.adb: Replace all calls to Set_DT_Position
by calls to Set_DT_Position_Value.
2015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
* sem_attr.adb (Analyze_Attribute): Factor out heavily indented
code in Denote_Same_Function. Do not analyze attribute 'Result
when it is inside procedure _Postconditions. Remove a misplaced
warning diagnostic. Code cleanup.
(Denote_Same_Function): New routine.
* sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part): Code
cleanup. Warn on pre/postconditions on an inlined subprogram.
(Analyze_Pragma, Refined_Post case): Warn on pre/postconditions on
an inlined subprogram.
(Analyze_Pre_Post_Condition_In_Decl_Part): Code cleanup. Warn on
pre/post condition on an inlined subprogram.
(Analyze_Test_Case_In_Decl_Part): Code cleanup. Warn on
pre/postconditions on an inlined subprogram.
(Check_Postcondition_Use_In_Inlined_Subprogram): New routine.
2015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
* sem_prag.adb (Ensure_Aggregate_Form):
Ensure that the name denoted by the Chars of a pragma argument
association has the proper Sloc when converted into an aggregate.
2015-03-02 Bob Duff <duff@adacore.com>
* sem_ch6.adb (Check_Private_Overriding): Capture
Incomplete_Or_Partial_View in a constant. This is cleaner and
more efficient.
2015-03-02 Gary Dismukes <dismukes@adacore.com>
* einfo.ads, exp_unst.ads: Minor reformatting.
2015-03-02 Ed Schonberg <schonberg@adacore.com>
* a-strsea.adb (Find_Token): Ensure that the range of iteration
does not perform any improper character access. This prevents
erroneous access in the unusual case of an empty string target
and a From parameter less than Source'First.
2015-03-02 Robert Dewar <dewar@adacore.com>
* elists.adb (List_Length): Fix incorrect result.
2015-03-02 Bob Duff <duff@adacore.com>
* sem_ch6.adb (Check_Private_Overriding): Refine the legality
checks here. It used to check that the function is merely
overriding SOMEthing. Now it checks that the function is
overriding a corresponding public operation. This is a correction
to the implementation of the rule in RM-3.9.3(10).
2015-03-02 Robert Dewar <dewar@adacore.com>
* debug.adb: Document new debug flag -gnatd.1.
* einfo.ads, einfo.adb (Has_Nested_Subprogram): New flag.
(Has_Uplevel_Reference): New flag (Is_Static_Type): New flag.
(Uplevel_Reference_Noted):New flag (Uplevel_References): New field.
* elists.ads elists.adb (List_Length): New function.
* exp_ch6.adb (Expand_N_Subprogram_Body): Call Unnest_Subprogram
when appropriate (Process_Preconditions): Minor code
reorganization and reformatting
* exp_unst.ads, exp_unst.adb: New files.
* gnat1drv.adb (Adjust_Global_Switches): Set
Unnest_Subprogram_Mode if -gnatd.1
* namet.ads, namet.adb (Name_Find_Str): New version of Name_Find with
string argument.
* opt.ads (Unnest_Subprogram_Mode): New flag.
* par-ch3.adb (P_Identifier_Declarations): Fixes to -gnatd.2 handling.
* sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set
Has_Nested_Subprogram flag.
* sem_ch8.adb (Find_Direct_Name): New calling sequence for
Check_Nested_Access.
(Find_Selected_Component): Minor comment addition.
* sem_util.adb (Check_Nested_Access): New version for use with Exp_Unst.
(Note_Possible_Modification): New calling sequence for
Check_Nested_Access.
* sem_util.ads (Check_Nested_Access): New version for use with Exp_Unst.
* gcc-interface/Make-lang.in (GNAT1_OBJS): Add exp_unst.o
2015-03-02 Pierre-Marie de Rodat <derodat@adacore.com>
* gcc-interface/utils.c (gnat_pushdecl): For non-artificial pointer
types, preserve the original type and create copies just like the C
front-end does. For artificial ones, do not define a name for
the original type.
(create_type_decl): When gnat_pushdecl made the input type the
original type for the new declaration, do not define a stub
declaration for it.
* gcc-interface/utils2.c (build_binary_op): Accept two different
pointer types when they point to the same type.
2015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
* exp_util.adb (Possible_Bit_Aligned_Component): Do not process
an unanalyzed node.
* sem_util.adb (Kill_Current_Values): Do not invalidate and
de-null a constant.
2015-03-02 Robert Dewar <dewar@adacore.com>
* sem_ch3.adb, exp_attr.adb, checks.adb, exp_aggr.adb: Minor
reformatting.
2015-03-02 Ed Schonberg <schonberg@adacore.com>
* sem_ch8.adb: extend use of Available_Subtype.
2015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
* sem_prag.adb (Duplication_Error): Remove the special handling
of 'Class or _Class in the context of pre/postconditions.
(Process_Class_Wide_Condition): Remove the special handling of
'Class or _Class in the context of pre/postconditions.
* sem_util.adb (Original_Aspect_Pragma_Name): Names Pre_Class
and Post_Class no longer need to be converted to _Pre and _Post.
* sem_util.ads (Original_Aspect_Pragma_Name): Update the comment
on usage.
2015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
* exp_ch6.adb (Process_Preconditions): Modify the
mechanism that find the first source declaration to correct exit
the loop once it has been found.
2015-03-02 Gary Dismukes <dismukes@adacore.com>
* a-strsea.adb: Minor typo fix.
2015-03-02 Bob Duff <duff@adacore.com>
* einfo.ads: Minor comment fixes.
2015-03-02 Gary Dismukes <dismukes@adacore.com>
* einfo.adb, checks.adb: Minor reformatting and typo fixes.
2015-03-02 Ed Schonberg <schonberg@adacore.com>
* exp_aggr.adb (Get_Assoc_Expr): If the Default_Component_Value
is defined for the array type, use it instead of a Default_Value
specified for the component type itself.
2015-03-02 Thomas Quinot <quinot@adacore.com>
* exp_attr.adb (Expand_N_Attribute_Reference, case Input): When
expanding a 'Input attribute reference for a class-wide type,
do not generate a separate object declaration for the controlling
tag dummy object; instead, generate the expression inline in the
dispatching call. Otherwise, the declaration (which involves a
call to String'Input, returning a dynamically sized value on the
secondary stack) will be expanded outside of proper secondary
stack mark/release operations, and will thus cause a secondary
stack leak.
2015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
* checks.adb (Add_Validity_Check): Change the names of all
formal parameters to better illustrate their purpose. Update
the subprogram documentation. Update all occurrences of the
formal parameters. Generate a pre/postcondition pragma by
calling Build_Pre_Post_Condition.
(Build_PPC_Pragma): Removed.
(Build_Pre_Post_Condition): New routine.
* einfo.adb Node8 is no longer used as Postcondition_Proc. Node14
is now used as Postconditions_Proc. Flag240 is now renamed to
Has_Expanded_Contract. (First_Formal): The routine can now
operate on generic subprograms.
(First_Formal_With_Extras): The routine can now operate on generic
subprograms.
(Has_Expanded_Contract): New routine.
(Has_Postconditions): Removed.
(Postcondition_Proc): Removed.
(Postconditions_Proc): New routine.
(Set_Has_Expanded_Contract): New routine.
(Set_Has_Postconditions): Removed.
(Set_Postcondition_Proc): Removed.
(Set_Postconditions_Proc): New routine.
(Write_Entity_Flags): Remove the output of Has_Postconditions. Add
the output of Has_Expanded_Contract.
(Write_Field8_Name): Remove the output of Postcondition_Proc.
(Write_Field14_Name): Add the output of Postconditions_Proc.
* einfo.ads New attributes Has_Expanded_Contract and
Postconditions_Proc along with occurrences in entities.
Remove attributes Has_Postconditions and Postcondition_Proc
along with occurrences in entities.
(Has_Expanded_Contract): New routine along with pragma Inline.
(Has_Postconditions): Removed along with pragma Inline.
(Postcondition_Proc): Removed along with pragma Inline.
(Postconditions_Proc): New routine along with pragma Inline.
(Set_Has_Expanded_Contract): New routine along with pragma Inline.
(Set_Has_Postconditions): Removed along with pragma Inline.
(Set_Postcondition_Proc): Removed along with pragma Inline.
(Set_Postconditions_Proc): New routine along with pragma Inline.
* exp_ch6.adb (Add_Return): Code cleanup. Update the
generation of the call to the _Postconditions routine of
the procedure. (Expand_Non_Function_Return): Reformat the
comment on usage. Code cleanup. Update the generation of
the call to the _Postconditions routine of the procedure or
entry [family].
(Expand_Simple_Function_Return): Update the
generation of the _Postconditions routine of the function.
(Expand_Subprogram_Contract): Reimplemented.
* exp_ch6.ads (Expand_Subprogram_Contract): Update the parameter
profile along the comment on usage.
* exp_ch9.adb (Build_PPC_Wrapper): Code cleanup.
(Expand_N_Task_Type_Declaration): Generate pre/postconditions
wrapper when the entry [family] has a contract with
pre/postconditions.
* exp_prag.adb (Expand_Attributes_In_Consequence): New routine.
(Expand_Contract_Cases): This routine and its subsidiaries now
analyze all generated code.
(Expand_Old_In_Consequence): Removed.
* sem_attr.adb Add with and use clause for Sem_Prag.
(Analyze_Attribute): Reimplment the analysis of attribute 'Result.
(Check_Use_In_Test_Case): Use routine Test_Case_Arg to obtain
"Ensures".
* sem_ch3.adb (Analyze_Declarations): Analyze the contract of
a generic subprogram.
(Analyze_Object_Declaration): Do not create a contract node.
(Derive_Subprogram): Do not create a contract node.
* sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): Do
not create a contract node.
(Analyze_Completion_Contract): New routine.
(Analyze_Function_Return): Alphabetize.
(Analyze_Generic_Subprogram_Body): Alphabetize. Do not create a
contract node. Do not copy pre/postconditions to the original
generic template.
(Analyze_Null_Procedure): Do not create a contract node.
(Analyze_Subprogram_Body_Contract): Reimplemented.
(Analyze_Subprogram_Body_Helper): Do not mark the enclosing scope
as having postconditions. Do not create a contract node. Analyze
the subprogram body contract of a body that acts as a compilation
unit. Expand the subprogram contract after the declarations have
been analyzed.
(Analyze_Subprogram_Contract): Reimplemented.
(Analyze_Subprogram_Specification): Do not create a contract node.
(List_Inherited_Pre_Post_Aspects): Code cleanup.
* sem_ch6.adb (Analyze_Subprogram_Body_Contract): Update the
comment on usage.
(Analyze_Subprogram_Contract): Update the
parameter profile and the comment on usage.
* sem_ch7.adb (Analyze_Package_Body_Helper): Do not create a
contract node.
(Analyze_Package_Declaration): Do not create a
contract node.
(Is_Subp_Or_Const_Ref): Ensure that the prefix has an entity.
* sem_ch8.adb (Analyze_Subprogram_Renaming): Do not create a
contract node.
* sem_ch9.adb (Analyze_Entry_Declaration): Do not create a
contract node.
* sem_ch10.adb (Analyze_Compilation_Unit): Move local variables to
their proper section and alphabetize them. Analyze the contract of
a [generic] subprogram after all Pragmas_After have been analyzed.
(Analyze_Subprogram_Body_Stub_Contract): Alphabetize.
* sem_ch12.adb (Analyze_Generic_Package_Declaration): Do not
create a contract node.
(Analyze_Generic_Subprogram_Declaration):
Alphabetize local variables. Do not create a contract
node. Do not generate aspects out of pragmas for ASIS.
(Analyze_Subprogram_Instantiation): Instantiate
the contract of the subprogram. Do not create a
contract node. (Instantiate_Contract): New routine.
(Instantiate_Subprogram_Body): Alphabetize local variables.
(Save_Global_References_In_Aspects): New routine.
(Save_References): Do not save the global references found within
the aspects of a generic subprogram.
* sem_ch12.ads (Save_Global_References_In_Aspects): New routine.
* sem_ch13.adb (Analyze_Aspect_Specifications): Do not use
Original_Node for establishing linkages.
(Insert_Pragma): Insertion in a subprogram body takes precedence over
the case where the subprogram body is also a compilation unit.
* sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part): Use
Get_Argument to obtain the proper expression. Install the generic
formals when the related context is a generic subprogram.
(Analyze_Depends_In_Decl_Part): Use Get_Argument to obtain
the proper expression. Use Corresponding_Spec_Of to obtain
the spec. Install the generic formal when the related context
is a generic subprogram.
(Analyze_Global_In_Decl_Part): Use Get_Argument to obtain the proper
expression. Use Corresponding_Spec_Of to obtain the spec. Install the
generic formal when the related context is a generic subprogram.
(Analyze_Initial_Condition_In_Decl_Part): Use Get_Argument
to obtain the proper expression. Remove the call to
Check_SPARK_Aspect_For_ASIS as the analysis is now done
automatically.
(Analyze_Pragma): Update all occurrences
to Original_Aspect_Name. Pragmas Contract_Cases, Depends,
Extensions_Visible, Global, Postcondition, Precondition and
Test_Case now carry generic templates when the related context
is a generic subprogram. The same pragmas are no longer
forcefully fully analyzed when the context is a subprogram
that acts as a compilation unit. Pragmas Abstract_State,
Initial_Condition, Initializes and Refined_State have been clean
up. Pragmas Post, Post_Class, Postcondition, Pre, Pre_Class
and Precondition now use the same routine for analysis. Pragma
Refined_Post does not need to check the use of 'Result or
the lack of a post-state in its expression. Reimplement the
analysis of pragma Test_Case.
(Analyze_Pre_Post_Condition): New routine.
(Analyze_Pre_Post_Condition_In_Decl_Part):
Reimplemented.
(Analyze_Refined_Depends_In_Decl_Part): Use Get_Argument to obtain the
proper expression.
(Analyze_Refined_Global_In_Decl_Part): Use Get_Argument to obtain
the proper expression.
(Analyze_Test_Case_In_Decl_Part): Reimplemented.
(Check_Pre_Post): Removed.
(Check_Precondition_Postcondition): Removed.
(Check_SPARK_Aspect_For_ASIS): Removed.
(Check_Test_Case): Removed.
(Collect_Subprogram_Inputs_Outputs): Use Get_Argument
to obtain the proper expression. Use Corresponding_Spec_Of to
find the proper spec.
(Create_Generic_Template): New routine.
(Duplication_Error): New routine.
(Expression_Function_Error): New routine.
(Find_Related_Subprogram_Or_Body): Moved to the spec
of Sem_Prag. Emit precise error messages. Account for cases of
rewritten expression functions, generic instantiations, handled
sequence of statements and pragmas from aspects.
(Get_Argument): New routine.
(Make_Aspect_For_PPC_In_Gen_Sub_Decl): Removed.
(Preanalyze_CTC_Args): Removed.
(Process_Class_Wide_Condition): New routine.
* sem_prag.ads (Analyze_Test_Case_In_Decl_Part): Update
the parameter profile along with the comment on usage.
(Find_Related_Subprogram_Or_Body): Moved from the body of Sem_Prag.
(Make_Aspect_For_PPC_In_Gen_Sub_Decl): Removed.
(Test_Case_Arg): New routine.
* sem_util.adb Add with and use clauses for Sem_Ch6.
(Add_Contract_Item): This routine now creates a contract
node the first time an item is added. Remove the duplicate
aspect/pragma checks.
(Check_Result_And_Post_State): Reimplemented.
(Corresponding_Spec_Of): New routine.
(Get_Ensures_From_CTC_Pragma): Removed.
(Get_Requires_From_CTC_Pragma): Removed.
(Has_Significant_Contract): New routine.
(Inherit_Subprogram_Contract): Inherit only if the source
has a contract.
(Install_Generic_Formals): New routine.
(Original_Aspect_Name): Removed.
(Original_Aspect_Pragma_Name): New routine.
* sem_util.ads (Check_Result_And_Post_State): Reimplemented.
(Corresponding_Spec_Of): New routine.
(Get_Ensures_From_CTC_Pragma): Removed.
(Get_Requires_From_CTC_Pragma): Removed.
(Has_Significant_Contract): New routine.
(Install_Generic_Formals): New routine.
(Original_Aspect_Name): Removed.
(Original_Aspect_Pragma_Name): New routine.
* sem_warn.adb Add with and use clauses for Sem_Prag.
(Within_Postcondition): Use Test_Case_Arg to extract "Ensures".
2015-03-02 Ed Schonberg <schonberg@adacore.com>
* sem_ch8.adb (Available_Subtype): Optimization in
Find_Selected_Component: when safe, use existing subtype of
array component, possibly discriminant-dependent, rather than
creating new subtype declaration for it. In this fashion different
occurrences of the component have the same subtype, rather than
just equivalent ones. Simplifies value tracing in GNATProve.
2015-03-01 Arnaud Charlet <charlet@adacore.com>
PR ada/65259
* doc/gnat_ugn/gnat_project_manager.rst,
doc/gnat_ugn/platform_specific_information.rst: Remove reference to
image, too troublesome with texi format.
* gnat_ugn.texi: Regenerate.
2015-02-24 Thomas Schwinge <thomas@codesourcery.com>
PR libgomp/64625
* gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_8): Remove.
(DEF_FUNCTION_TYPE_VAR_12): Likewise.
(DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
2015-02-23 Thomas Schwinge <thomas@codesourcery.com>
* gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_8): Fix number of
arguments parameter.
(DEF_FUNCTION_TYPE_VAR_12): Likewise.
2015-02-22 Arnaud Charlet <charlet@adacore.com>
* doc/Makefile: postprocess texinfo files to update @dircategory
and update texi files under gcc/ada.
* gnat_ugn.texi, gnat_rm.texi: Regenerated.
2015-02-22 Arnaud Charlet <charlet@adacore.com>
* doc/gnat_ugn/project-manager-figure.png,
doc/gnat_ugn/rtlibrary-structure.png: New.
2015-02-22 Tom de Vries <tom@codesourcery.com>
PR ada/65100
* gnat-style.texi (@subsection Loop Statements): Replace @noindent by
@item, and fix warning '@itemize has text but no @item'.
2015-02-20 Ed Schonberg <schonberg@adacore.com>
* sem_prag.adb (Analyze_Pragma, case Obsolescent): Pragma
legally applies to an abstract subprogram declaration.
* freeze.adb: Minor comment addition.
2015-02-20 Robert Dewar <dewar@adacore.com>
* errout.ads: Document replacement of Name_uPre/Post/Type_Invariant.
* erroutc.adb (Set_Msg_Str): Replace _xxx.
(Pre/Post/Type_Invariant) by xxx'Class.
* erroutc.ads (Set_Msg_Str): Replace _xxx.
(Pre/Post/Type_Invariant) by xxx'Class.
* sem_prag.adb (Fix_Error): Remove special casing of
Name_uType_Invariant.
(Analyze_Pre_Post_Condition_In_Decl_Part): Remove special casing of
Name_uPre and Name_uPost in aspect case (done in Errout now).
2015-02-20 Robert Dewar <dewar@adacore.com>
* g-alveop.adb: Minor style fixes.
2015-02-20 Robert Dewar <dewar@adacore.com>
* freeze.adb (Warn_Overlay): Guard against blow up with address
clause.
2015-02-20 Bob Duff <duff@adacore.com>
* exp_attr.adb (May_Be_External_Call): Remove this. There is no need
for the compiler to guess whether the call is internal or external --
it is always external.
(Expand_Access_To_Protected_Op): For P'Access, where P
is a protected subprogram, always create a pointer to the
External_Subprogram.
2015-02-20 Robert Dewar <dewar@adacore.com>
* a-dispat.adb, a-stcoed.ads: Minor reformatting.
2015-02-20 Robert Dewar <dewar@adacore.com>
* sem_ch13.adb (Build_Discrete_Static_Predicate): Allow static
predicate for non-static subtype.
(Build_Predicate_Functions): Do not assume subtype associated with a
static predicate must be static.
2015-02-20 Robert Dewar <dewar@adacore.com>
* errout.adb (Set_Msg_Node): Better handling of internal names
(Set_Msg_Node): Kill message when we cannot eliminate internal name.
* errout.ads: Document additional case of message deletion.
* namet.adb (Is_Internal_Name): Refined to consider wide
strings in brackets notation and character literals not to be
internal names.
* sem_ch8.adb (Find_Selected_Component): Give additional error
when selector name is a subprogram whose first parameter has
the same type as the prefix, but that type is untagged.
2015-02-20 Robert Dewar <dewar@adacore.com>
* g-allein.ads, g-alveop.adb, g-alveop.ads, opt.ads: Minor reformatting
2015-02-20 Tristan Gingold <gingold@adacore.com>
* opt.ads (GNAT_Mode_Config): New variable.
* opt.adb (Set_Opt_Config_Switches): Consider GNAT_Mode_Config
to set Assertions_Enabled.
* switch-c.adb (Scan_Front_End_Switches): Set GNAT_Mode_Config
for -gnatg.
2015-02-20 Robert Dewar <dewar@adacore.com>
* s-valllu.ads (Scan_Raw_Long_Long_Unsigned): Add an additional
comment regarding the handling of unterminated fixed-point
constants.
* s-valuns.ads (Scan_Raw_Unsigned): Add comments
corresponding to those previously added for
System.Val_LLU.Scan_Raw_Long_Long_Unsigned.
2015-02-20 Olivier Hainque <hainque@adacore.com>
* g-allein.ads, g-alveop.ads, g-alveop.adb: Code clean ups.
2015-02-20 Robert Dewar <dewar@adacore.com>
* sem_prag.adb: Minor comment clarification.
2015-02-20 Olivier Hainque <hainque@adacore.com>
* g-allein.ads (vec_ctf, vec_vcsfx, vec_vcfux): Remove.
* g-alleve.ads, g-alleva.adb (vcfux): Likewise.
* g-alveop.ads (vec_vcfsx, vec_vcfux): Just rename the ll versions.
(vec_ctf): Now renamings as well.
2015-02-20 Robert Dewar <dewar@adacore.com>
* switch-c.adb, bindgen.adb: Minor reformatting.
2015-02-20 Ed Schonberg <schonberg@adacore.com>
* sem_prag.adb (Analyze_Pragma, case Type_Invariant):
Invariant'class is allowed on an abstract type.
2015-02-20 Ed Schonberg <schonberg@adacore.com>
* sem_ch3.adb (Access_Definition): If the access definition is
for a protected component and defines an access to protected
subprogram, do not create an itype reference for it because a
full type declaration will be built in order to generate the
proper equivalent type.
(Analyze_Subtype_Declaration): Add information of incomplete
subtypes, for Ada 2012 extended uses of incomplete types.
2015-02-20 Gary Dismukes <dismukes@adacore.com>
* sem_res.adb: Minor reformatting.
2015-02-20 Vincent Celier <celier@adacore.com>
* switch-c.adb (Scan_Front_End_Switches): When comparing runtime
path name for several switches --RTS, use the normalized path
names.
2015-02-20 Vincent Celier <celier@adacore.com>
* bindgen.adb: Minor reformatting and code reorganization.
2015-02-20 Jose Ruiz <ruiz@adacore.com>
* a-stcoed.ads: Add spec for this package (Unimplemented_Unit).
* impunit.adb (Non_Imp_File_Names_12): Mark unit a-stcoed.ads as
defined by Ada 2012.
2015-02-20 Arnaud Charlet <charlet@adacore.com>
* sysdep.c, expect.c, s-oscons-tmplt.c, gsocket.h, adaint.c: Remove
obsolete references to RTX, nucleus, VMS.
2015-02-20 Ed Schonberg <schonberg@adacore.com>
* sem_prag.adb (Fix_Error): For an illegal Type_Invariant'Class
aspect, use name that mentions Class explicitly, rather than
compiler-internal name.
2015-02-20 Robert Dewar <dewar@adacore.com>
* debug.adb: Add documentation for -gnatd.2 (allow statements
in decl sequences).
* par-ch3.adb (P_Identifier_Declarations): Handle
statement appearing where declaration expected more cleanly.
(Statement_When_Declaration_Expected): Implement debug flag
-gnatd.2.
2015-02-20 Jose Ruiz <ruiz@adacore.com>
* a-dinopr.ads: Add spec for this package (Unimplemented_Unit).
* a-dispat.ads (Yield): Include procedure added in Ada 2012.
* a-dispat.adb (Yield): Implement procedure added in Ada 2012.
* impunit.adb (Non_Imp_File_Names_05): Mark unit a-dinopr.ads as
defined by Ada 2005.
* snames.ads-tmpl (Name_Non_Preemptive_FIFO_Within_Priorities):
This is the correct name for the dispatching policy (FIFO was
missing).
2015-02-20 Javier Miranda <miranda@adacore.com>
* sem_res.adb (Resolve_Type_Conversion): If the type of the
operand is the limited-view of a class-wide type then recover
the class-wide type of the non-limited view.
2015-02-20 Arnaud Charlet <charlet@adacore.com>
* gcc-interface/Makefile.in: Remove references to nucleus.
* gcc-interface/decl.c (gnat_to_gnu_entity, case E_Procedure): Set
extern_flag to true for Inline_Always subprograms with
Intrinsic convention.
2015-02-20 Yannick Moy <moy@adacore.com>
* sem_prag.ads: Minor typo in comment.
2015-02-20 Pascal Obry <obry@adacore.com>
* s-osprim-mingw.adb: Fix Get_Base_Time parameter mode.
2015-02-20 Vincent Celier <celier@adacore.com>
* makeutl.adb (Get_Directories.Add_Dir): Add a directory only
if it exists.
2015-02-20 Robert Dewar <dewar@adacore.com>
* sem_eval.ads: Minor reformatting.
2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
* freeze.adb (Size_Known): Do not set the packed size for
independent type or component.
(Freeze_Array_Type): Check for Independent[_Components] with packing
or explicit component size clause.
* gnat1drv.adb (Post_Compilation_Validation_Checks): Do the validation
of independence pragmas only for non-GCC back-ends.
* sem_ch13.adb (Initialize): Likewise for the initialization.
* sem_prag.adb (Record_Independence_Check): New procedure to record an
independence check in the table.
(Analyze_Pragma): Use it throughout instead of doing it manually.
* gcc-interface/decl.c (gnat_to_gnu_field): Add support for
independent type or component.
2015-02-20 Thomas Quinot <quinot@adacore.com>
* adaint.c (__gnat_readdir): For Solaris, use 64 bit variants of
struct direct and readdir. This is required for NFS filesystems
mounted from servers that use 64-bit cookies.
2015-02-20 Ed Schonberg <schonberg@adacore.com>
* sem_ch12.adb (Analyze_Subprogram_Instantiaion): New subprogram
Build_Subprogram_Renaming, to create renaming of subprogram
instance in the the declaration of the wrapper package rather
than in its body, so that it is available for analysis of aspects
propagated from generic to instantiation.
(Check_Mismatch): An actual for a formal package that is an
incomplete type matches a formal type that is incomplete.
(Instantiate_Package_Body): Move code that builds subprogram
renaming to Analyze_Subprogram_Instantiation.
(Instantiate_Type): The generated subtype is a limited view if
the actual is a limited view.
(Load_Parent_Of_Generic): Retrieve instance declaration from
its new position within wrapper package.
2015-02-20 Arnaud Charlet <charlet@adacore.com>
* s-parame-vxworks.adb, s-os_lib.ads: Update comments.
2015-02-20 Robert Dewar <dewar@adacore.com>
* s-osinte-vxworks.ads (To_Timespec): Add comment about the
issue of negative arguments.
2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
* gnat1drv.adb: Minor consistency fix.
2015-02-20 Pascal Obry <obry@adacore.com>
* s-osprim-mingw.adb (Get_Base_Time): Properly release lock in all
paths.
2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
* inline.adb (Expand_Inlined_Call): Skip again calls to subprogram
renamings.
* exp_ch6.adb (Expand_Call): Use back-end inlining
instead of expansion for simple subprogram renamings.
2015-02-20 Robert Dewar <dewar@adacore.com>
* exp_util.adb: Minor reformatting.
2015-02-20 Vincent Celier <celier@adacore.com>
* switch-c.adb (Scan_Front_End_Switches): Do not fail when --RTS=
is specified several times with different values that indicates
the same runtime directory.
2015-02-20 Ed Schonberg <schonberg@adacore.com>
* sem_attr.adb (Check_Not_Incomplete_Type): Clean up code to
handle properly illegal uses of attributes on prefixes on an
incomplete type, both when the type of the prefix is locally
incomplete, and when it is a limited view of a type whose
non-limited view is not available.
(Analyze_Attribute): Add calls to Check_Not_Incomplete_Type for
'Address and others.
2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
* exp_ch6.adb: Fix minor typo in comment.
2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
* sinfo.ads: Add comment.
2015-02-20 Olivier Hainque <hainque@adacore.com>
* opt.ads: Replace Opt.Suppress_All_Inlining by two separate
flags controlling the actual FE inlining out of pragma Inline
and pragma Inline_Always.
* adabkend.adb (Scan_Compiler_Arguments): Set both flags to True
on -fno-inline, which disables all inlining in compilers with
an Ada back-end and without back-end inlining support.
* back_end.adb (Scan_Back_End_Switches): Set the Inline related
flag to True on -fno-inline and leave Inline_Always alone for
gcc back-ends.
* back_end.ads (Scan_Compiler_Arguments): Adjust spec wrt the
names of the Opt flags it sets.
* gnat1drv.adb (Adjust_Global_Switches): Remove test on
Opt.Suppress_All_Inlining in the Back_End_Inlining computation.
* sem_prag.adb (Make_Inline): Remove early return conditioned
on Opt.Suppress_All_Inlining.
* sem_ch6.adb (Analyze_Subprogram_Body_Helper): Use the flags to
disable the calls to Build_Body_To_Inline otherwise triggered
by pragma Inline or Inline_Always. This will prevent actual
front-end inlining of the subprogram on calls.
2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
* exp_ch3.adb (Default_Initialize_Object): Call Add_Inlined_Body on the
Abort_Undefer_Direct function.
* exp_ch5.adb (Expand_N_Assignment_Statement): Likewise.
* exp_intr.adb (Expand_Unc_Deallocation): Likewise.
* exp_prag.adb (Expand_Pragma_Abort_Defer): Likewise.
* exp_ch4.adb (Expand_N_Selected_Component): Adjust call to
Add_Inlined_Body.
* exp_ch6.adb (Expand_Call): Adjust calls to Add_Inlined_Body.
Remove call to Register_Backend_Call and move code resetting
Needs_Debug_Info on inlined subprograms to...
* inline.ads (Add_Inlined_Body): Add N parameter.
(Register_Backend_Call): Delete.
* inline.adb (Add_Inlined_Body): ...here and simplify.
Register the call with Backend_Calls directly.
(Register_Backend_Call): Delete.
* s-stalib.ads (Abort_Undefer_Direct): Restore pragma Inline.
2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
* s-stalib.ads: Fix typo.
2015-02-20 Ed Schonberg <schonberg@adacore.com>
* exp_ch3.adb (Default_Initialize_Object): If the object has a
delayed freeze, the actions associated with default initialization
must be part of the freeze actions, rather that being inserted
directly after the object declaration.
2015-02-20 Robert Dewar <dewar@adacore.com>
* lib-load.adb: Minor comment update.
2015-02-20 Vincent Celier <celier@adacore.com>
* prj-proc.adb (Process_Case_Construction): When there are
incomplete withed projects and the case variable is unknown,
skip the case construction.
2015-02-20 Ed Schonberg <schonberg@adacore.com>
* exp_ch6.adb (Expand_Actuals): Add caller-side invariant checks
when an actual is a view conversion, either because the call is
to an inherited operation, or because the actual is an explicit
type conversion to an ancestor type. Fixes ACATS 4.0D: C732001
2015-02-20 Robert Dewar <dewar@adacore.com>
* einfo.ads: Minor comment updates Fix missing pragma Inline
for Set_Partial_View_Has_Unknown_Discr.
* einfo.adb (Write_Entity_Flags): Add missing entry for
Partial_View_Has_Unknown_Discr.
* sem_ch3.adb: Minor reformatting.
2015-02-20 Vincent Celier <celier@adacore.com>
* opt.ads: Minor cleanup: remove mention of gprmake.
* s-stalib.ads (Abort_Undefer_Direct): Do not inline.
* s-tataat.adb: Do not call System.Tasking.Self but directly
System.Task_Primitives.Operations.Self.
2015-02-20 Arnaud Charlet <charlet@adacore.com>
* gnat_rm.texi, gnat_ugn.texi: Now automatically generated from
sphinx in the doc directory.
* doc: New directory containing sphinx versions of gnat_rm and gnat_ugn
2015-02-20 Robert Dewar <dewar@adacore.com>
* sem_res.adb: Minor reformatting.
* exp_ch9.adb (Build_Protected_Spec): Copy Aliased setting when
building spec.
* sem_ch13.adb (Analyze_Aspect_Specifications): Exclude Boolean
aspects from circuitry setting delay required to false if the
argument is an integer literal.
2015-02-20 Ed Schonberg <schonberg@adacore.com>
* einfo.ads. einfo.adb (Partial_View_Has_Unknown_Discr): New flag
on type entities, to enforce AI12-0133: default initialization
of types whose partial view has unknown discriminants does not
get an invariant check, because clients of the unit can never
declare objects of such types.
* sem_ch3.adb (Find_Type_Name); Set new flag
Partial_View_Has_Unknown_Discr when needed.
* exp_ch3.adb (Expand_N_Object_Declaration): Use flag to suppress
generation of invariant call on default-initialized object.
2015-02-08 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/decl.c (gnat_to_gnu_param): Do not strip the padding
if the parameter either is passed by reference or if the alignment
would be lowered.
2015-02-08 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/decl.c (is_cplusplus_method): Use Is_Primitive flag to
detect primitive operations of tagged and untagged types.
2015-02-08 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/decl.c (gnat_to_gnu_entity): Do not bother about alias
sets in presence of derivation for subprogram types.
2015-02-08 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/utils.c (begin_subprog_body): Assert that the body is
present in the same context as the declaration.
2015-02-07 Jakub Jelinek <jakub@redhat.com>
PR middle-end/64340
* gcc-interface/trans.c (gigi): Recreate optimization_default_node
and optimization_current_node after tweaking global_options.
2015-02-05 Robert Dewar <dewar@adacore.com>
* prj-proc.adb, sem_aux.adb, exp_ch9.adb, errout.adb, prj-dect.adb,
prj-nmsc.adb: Minor reformatting.
2015-02-05 Ed Schonberg <schonberg@adacore.com>
* sem_type.adb (Covers): In ASIS_Mode the Corresponding_Record
of a protected type may not be available, so to check conformance
with an interface type, examine the interface list in the type
declaration directly.
(Write_Overloads): Improve information for indirect calls,
for debugger use.
2015-02-05 Ed Schonberg <schonberg@adacore.com>
* exp_ch3.adb (Make_Tag_Assignment): Do not perform this
expansion activity in ASIS mode.
2015-02-05 Javier Miranda <miranda@adacore.com>
* errout.adb (Error_Msg_PT): Add missing error.
* sem_ch6.adb (Check_Synchronized_Overriding): Check the missing
RM rule. Code cleanup.
* exp_ch9.adb (Build_Wrapper_Spec): Propagate "constant" in
anonymous access types. Found working on the tests. Code cleanup.
2015-02-05 Vincent Celier <celier@adacore.com>
* prj-dect.adb (Parse_Attribute_Declaration): Continue scanning
when there are incomplete withs.
* prj-nmsc.adb (Process_Naming): Do not try to get the value
of an element when it is nil.
(Check_Naming): Do not check a nil suffix for illegality
* prj-proc.adb (Expression): Do not process an empty term.
* prj-strt.adb (Attribute_Reference): If attribute cannot be
found, parse a possible index to avoid cascading errors.
2015-02-05 Ed Schonberg <schonberg@adacore.com>
* sem_aux.adb (Is_Derived_Type): A subprogram_type generated
for an access_to_subprogram declaration is not a derived type.
2015-02-05 Robert Dewar <dewar@adacore.com>
* errout.adb (Error_Msg_Internal): For non-serious error set
Fatal_Error to Ignored.
* lib-load.adb (Load_Unit): Minor comment updates.
* sem_ch10.adb (Analyze_With_Clause): Propagate Fatal_Error
setting from with'ed unit to with'ing unit.
* sem_prag.adb (Analyze_Pragma, case Warnings): Document handling
of ambiguity.
2015-02-05 Yannick Moy <moy@adacore.com>
* sem_prag.adb, par-prag.adb: Minor code clean up.
2015-02-05 Yannick Moy <moy@adacore.com>
* par-prag.adb (Pragma_Warnings): Update for extended form
of pragma Warnings. The "one" argument case may now have 2 or
3 arguments.
* sem_prag.adb (Analyze_Pragma/Pragma_Warnings): Update for
extended form of pragma Warnings. Pragma with tool name is either
rewritten as null or as an equivalent form without tool name,
before reanalysis.
* snames.ads-tmpl (Name_Gnatprove): New name.
2015-02-05 Robert Dewar <dewar@adacore.com>
* sem_ch13.adb (Add_Invariants): Don't assume invariant is
standard Boolean.
* sem_prag.adb (Analyze_Pragma, case Check): Don't assume
condition is standard Boolean, it can be non-standard derived
Boolean.
2015-02-05 Robert Dewar <dewar@adacore.com>
* checks.adb (Enable_Range_Check): Disconnect attempted
optimization for the case of range check for subscript of
unconstrained array.
2015-02-05 Robert Dewar <dewar@adacore.com>
* par-ch13.adb (With_Present): New function
(Aspect_Specifications_Present): Handle WHEN in place of WITH
(Get_Aspect_Specifications): Comment update.
* par.adb: Comment updates.
2015-02-05 Robert Dewar <dewar@adacore.com>
* errout.adb (Handle_Serious_Error): New setting of Fatal_Error.
* frontend.adb (Frontend): New setting of Fatal_Error.
* lib-load.adb (Create_Dummy_Package_Unit): New setting of
Fatal_Error.
(Load_Main_Source): New setting of Fatal_Error
(Load_Unit): New setting of Fatal_Error.
* lib-writ.adb (Add_Preprocessing_Dependency): New setting of
Fatal_Error.
(Ensure_System_Dependency): New setting of Fatal_Error.
* lib.adb (Fatal_Error): New setting of Fatal_Error
(Set_Fatal_Error): New setting of Fatal_Error.
* lib.ads: New definition of Fatal_Error and associated routines.
* par-ch10.adb (P_Compilation_Unit): New setting of Fatal_Error.
* par-load.adb (Load): New setting of Fatal_Error.
* rtsfind.adb (Load_RTU): New setting of Fatal_Error.
* sem_ch10.adb (Analyze_Compilation_Unit): New setting of
Fatal_Error.
(Optional_Subunit): New setting of Fatal_Error.
(Analyze_Proper_Body): New setting of Fatal_Error.
(Load_Needed_Body): New setting of Fatal_Error.
2015-02-05 Ed Schonberg <schonberg@adacore.com>
* sem_res.adb (Resolve_Call): If the function being called has
out parameters do not check for language version if the function
comes from a predefined unit, as those are always compiled in
Ada 2012 mode.
2015-02-05 Ed Schonberg <schonberg@adacore.com>
* sem_ch3.adb (Process_Full_View): Verify that the full view
of a type extension must carry an explicit limited keyword if
the partial view does (RM 7.3 (10.1)).
2015-02-05 Robert Dewar <dewar@adacore.com>
* g-rannum.adb, g-rannum.ads, s-rannum.adb, s-rannum.ads,
sem_warn.ads: Minor reformatting.
* exp_ch13.adb (Expand_N_Freeze_Entity): Add guard for aspect
deleted by -gnatI.
* sem_prag.adb (Analyze_Pragma, case Type_Invariant): Give
error for abstract type.
2015-02-05 Yannick Moy <moy@adacore.com>
* opt.ads (Warn_On_Suspicious_Contract): Update comment
describing use.
* sem_attr.adb (Analyze_Attribute/Attribute_Update): Warn on
suspicious uses of 'Update.
* sem_warn.adb, sem_warn.ads (Warn_On_Suspicious_Update): New
function issues warning on suspicious uses of 'Update.
* g-rannum.adb, g-rannum.ads, s-rannum.adb, s-rannum.ads: Mark
package spec and body as SPARK_Mode Off.
2015-02-05 Robert Dewar <dewar@adacore.com>
* sem_prag.adb (Set_Elab_Unit_Name): New name for Set_Unit_Name
(Analyze_Pragma): Change Set_Unit_Name to Set_Elab_Unit_Name
(Set_Elab_Unit_Name): Generate reference for Elaborate[_All]
* sem_warn.adb (Warn_On_Unreferenced_Entity): Suppress warning
for exported entity.
2015-02-05 Hristian Kirtchev <kirtchev@adacore.com>
* sem_prag.adb (Check_Pragma_Conformance): Add
local variable Arg. Ensure that all errors are associated with
the pragma if it appears without an argument. Add comments on
various cases.
2015-02-05 Robert Dewar <dewar@adacore.com>
* lib-xref.adb: Minor reformatting.
2015-02-05 Tristan Gingold <gingold@adacore.com>
PR ada/64349
* env.c: Fix thinko: handle Darwin case before default one.
2015-01-30 Robert Dewar <dewar@adacore.com>
* a-assert.adb: Minor reformatting.
* sem_ch13.adb: Minor comment clarification.
* types.ads: Minor comment update.
* sem_eval.adb (Real_Or_String_Static_Predicate_Matches): Avoid blow up
when we have a predicate that is nothing but an inherited dynamic
predicate.
2015-01-30 Jerome Guitton <guitton@adacore.com>
* gcc-interface/Makefile.in (x86-vxworks): Update GCC_SPEC_FILES to
include cert link spec.
2015-01-30 Robert Dewar <dewar@adacore.com>
* einfo.ads: Minor comment fix.
* freeze.adb (Freeze_Profile): Add test for suspicious import
in pure unit.
* sem_prag.adb (Process_Import_Or_Interface): Test for suspicious
use in Pure unit is now moved to Freeze (to properly catch
Pure_Function exemption).
2015-01-30 Bob Duff <duff@adacore.com>
* sem_res.ads: Minor comment fix.
* sem_type.adb: sem_type.adb (Remove_Conversions): Need to
check both operands of an operator.
2015-01-30 Yannick Moy <moy@adacore.com>
* a-assert.ads, a-assert.adb: Mark package spec in SPARK. Set assertion
policy for Pre to Ignore.
(Assert): Add precondition.
2015-01-30 Robert Dewar <dewar@adacore.com>
* sem_prag.adb (Process_Import_Or_Interface): Warn if used in
Pure unit.
* s-valllu.ads (Scan_Raw_Long_Long_Unsigned): Clarify
documentation for some special cases of invalid attempts at
based integers.
2015-01-30 Gary Dismukes <dismukes@adacore.com>
* errout.ads: Minor reformatting.
2015-01-30 Yannick Moy <moy@adacore.com>
* inline.adb (Process_Formals): Use the sloc of
the inlined node instead of the sloc of the actual parameter,
when replacing formal parameters by the actual one.
2015-01-30 Arnaud Charlet <charlet@adacore.com>
* g-expect.adb (Get_Command_Output): Use infinite timeout when
calling Expect.
2015-01-30 Ed Schonberg <schonberg@adacore.com>
* sem_ch12.adb (Analyze_Associations): If an in-parameter is
defaulted in an instantiation, add an entry in the list of actuals
to indicate the default value of the formal (as is already done
for defaulted subprograms).
2015-01-30 Javier Miranda <miranda@adacore.com>
* errout.adb (Error_Msg_PT): Minor error phrasing update.
2015-01-30 Robert Dewar <dewar@adacore.com>
* sem_warn.adb (Warn_On_Known_Condition): Improve error message
for object case.
2015-01-30 Pierre-Marie de Rodat <derodat@adacore.com>
* exp_dbug.adb (Get_Encoded_Name): When
-fgnat-encodings=minimal, do not generate names for biased types.
2015-01-30 Tristan Gingold <gingold@adacore.com>
PR ada/64349
* env.c: Move vxworks and darwin includes out of #ifdef IN_RTS.
2015-01-30 Gary Dismukes <dismukes@adacore.com>
* freeze.adb: Minor reformatting.
2015-01-30 Javier Miranda <miranda@adacore.com>
* errout.ads (Error_Msg_PT): Replace Node_Id by Entity_Id and
improve its documentation.
* errout.adb (Error_Msg_PT): Improve the error message.
* sem_ch6.adb (Check_Conformance): Update call to Error_Msg_PT.
(Check_Synchronized_Overriding): Update call to Error_Msg_PT.
* sem_ch3.adb (Check_Abstract_Overriding): Code cleanup.
2015-01-30 Robert Dewar <dewar@adacore.com>
* sem_warn.adb (Warn_On_Known_Condition): Do special casing of
message for False case.
2015-01-30 Doug Rupp <rupp@adacore.com>
* s-vxwext-kernel.ads (Task_Cont): Remove imported subprogram body.
* s-vxwext-kernel.adb (Task_Cont): New subpprogram body specialized for
kernel.
2015-01-30 Gary Dismukes <dismukes@adacore.com>
* sem_attr.adb (Declared_Within_Generic_Unit):
New function to test whether an entity is declared within the
declarative region of a given generic unit.
(Resolve_Attribute): For checking legality of subprogram'Access within
a generic unit, call new Boolean function Declared_Within_Generic_Unit
instead of simply comparing the results of Enclosing_Generic_Unit on
the prefix and access type. Correct minor comment typos.
2015-01-30 Robert Dewar <dewar@adacore.com>
* freeze.adb, exp_util.ads: Update comment.
* exp_util.adb, exp_ch3.adb: Minor code reorganization and reformatting.
* sem_util.adb: Minor: fix typo.
2015-01-30 Hristian Kirtchev <kirtchev@adacore.com>
* sem_attr.adb (Analyze_Attribute): Ensure that
the check concerning Refined_Post takes precedence over the
other cases.
2015-01-30 Gary Dismukes <dismukes@adacore.com>
* sem_prag.adb: Minor typo fixes and reformatting.
2015-01-30 Yannick Moy <moy@adacore.com>
* sem_attr.adb: Code clean up.
2015-01-30 Robert Dewar <dewar@adacore.com>
* ali.adb (Scan_ALI): Set Serious_Errors flag in Unit record.
* ali.ads (Unit_Record): Add new field Serious_Errors.
* lib-writ.adb (Write_Unit_Information): Set SE (serious errors)
attribute in U line.
* lib-writ.ads: New attribute SE (serious erors) in unit line.
2015-01-30 Hristian Kirtchev <kirtchev@adacore.com>
* einfo.adb Update the usage of attributes Entry_Bodies_Array,
Lit_Indexes, Scale_Value, Storage_Size_Variable,
String_Literal_Low_Bound along associated routines and
Write_FieldX_Name.
(Pending_Access_Types): New routine.
(Set_Pending_Access_Types): New routine.
(Write_Field15_Name): Add an entry for Pending_Access_Types.
* einfo.ads Add new attribute Pending_Access_Types along
with usage in nodes. Update the usage of attributes
Entry_Bodies_Array, Lit_Indexes, Scale_Value,
Storage_Size_Variable, String_Literal_Low_Bound.
(Pending_Access_Types): New routine along with pragma Inline.
(Set_Pending_Access_Types): New routine along with pragma Inline.
* exp_ch3.adb (Expand_Freeze_Array_Type): Add new local variable
Ins_Node. Determine the insertion node for anonynous access type
that acts as a component type of an array. Update the call to
Build_Finalization_Master.
(Expand_Freeze_Record_Type): Update
the calls to Build_Finalization_Master.
(Freeze_Type): Remove
local variable RACW_Seen. Factor out the code that deals with
remote access-to-class-wide types. Create a finalization master
when the designated type contains a private component. Fully
initialize all pending access types.
(Process_RACW_Types): New routine.
(Process_Pending_Access_Types): New routine.
* exp_ch4.adb (Expand_Allocator_Expression): Allocation no longer
needs to set primitive Finalize_Address.
(Expand_N_Allocator): Allocation no longer sets primitive
Finalize_Address.
* exp_ch6.adb (Add_Finalization_Master_Actual_To_Build_In_Place_Call):
Update the call to Build_Finalization_Master.
(Make_Build_In_Place_Call_In_Allocator): Allocation no longer
needs to set primitive Finalize_Address.
* exp_ch7.adb (Add_Pending_Access_Type): New routine.
(Build_Finalization_Master): New parameter profile. Associate
primitive Finalize_Address with the finalization master if the
designated type has been frozen, otherwise treat the access
type as pending. Simplify the insertion of the master and
related initialization code.
(Make_Finalize_Address_Body): Allow Finalize_Address for class-wide
abstract types.
(Make_Set_Finalize_Address_Call): Remove forlam parameter Typ.
Simplify the implementation.
* exp_ch7.ads (Build_Finalization_Master): New parameter profile
along with comment on usage.
(Make_Set_Finalize_Address_Call): Remove formal parameter Typ. Update
the comment on usage.
* exp_util.adb (Build_Allocate_Deallocate_Proc): Use routine
Finalize_Address to retrieve the primitive.
(Finalize_Address): New routine.
(Find_Finalize_Address): Removed.
* exp_util.ads (Finalize_Address): New routine.
* freeze.adb (Freeze_All): Remove the generation of finalization
masters.
* sem_ch3.adb (Analyze_Full_Type_Declaration): Propagate any
pending access types from the partial to the full view.
2015-01-30 Robert Dewar <dewar@adacore.com>
* sem_disp.adb: Minor reformatting.
* sem_disp.ads: Documentation update.
2015-01-30 Ed Schonberg <schonberg@adacore.com>
* sem_disp.adb (Is_Dynamically_Tagged): when applied to an entity
or a function call, return True if type is class-wide.
* sem_res.adb (Resolve_Case_Expression, Resolve_If_Expression);
Apply RM 4.5.7 (17/3): all or none of the dependent expression
of a conditional expression must be dynamically tagged.
2015-01-30 Ed Schonberg <schonberg@adacore.com>
* sem_ch6.adb (Analyze_Function_Return): In an extended return
statement, apply accessibility check to result object when there
is no initializing expression (Ada 2012 RM 6.5 (5.4/3))
2015-01-30 Robert Dewar <dewar@adacore.com>
* sem_ch4.adb (Analyze_If_Expression): Allow for non-standard
Boolean for case where ELSE is omitted.
* sem_res.adb: Minor reformatting.
2015-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
Fix build under cygwin/64.
* adaint.h: Add check for __CYGWIN__.
* mingw32.h: Prevent windows.h from including x86intrin.h in GCC.
2015-01-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
PR ada/64640
* adaint.c: Handle __CYGWIN__ like __MINGW32__ here.
* mingw32.h: Don't include <tchar.h> under cygwin.
(_O_U8TEXT, _O_U16TEXT, _O_WTEXT): Set to _O_TEXT if not yet defined.
2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
* gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_8)
(DEF_FUNCTION_TYPE_VAR_12): New macros.
2015-01-09 Michael Collison <michael.collison@linaro.org>
* gcc-interface/cuintp.c: Include hash-set.h, machmode.h,
vec.h, double-int.h, input.h, alias.h, symtab.h,
fold-const.h, wide-int.h, and inchash.h due to
flattening of tree.h.
* gcc-interface/decl.c: Ditto.
* gcc-interface/misc.c: Ditto.
* gcc-interface/targtyps.c: Include hash-set.h, machmode.h,
vec.h, double-int.h, input.h, alias.h, symtab.h, options.h,
fold-const.h, wide-int.h, and inchash.h due to
flattening of tree.h.
* gcc-interface/trans.c: Include hash-set.h, machmode.h,
vec.h, double-int.h, input.h, alias.h, symtab.h, real.h,
fold-const.h, wide-int.h, inchash.h due to
flattening of tree.h.
* gcc-interface/utils.c: Include hash-set.h, machmode.h,
vec.h, double-int.h, input.h, alias.h, symtab.h,
fold-const.h, wide-int.h, and inchash.h due to
flattening of tree.h.
* gcc-interface/utils2.c: Ditto.
2015-01-07 Robert Dewar <dewar@adacore.com>
* sem_warn.adb (Check_One_Unit): Don't give unused entities
warning for a package which is used as a generic parameter.
2015-01-07 Bob Duff <duff@adacore.com>
* usage.adb (Usage): Correct documentation of
-gnatw.f switches.
2015-01-07 Robert Dewar <dewar@adacore.com>
* s-fileio.adb: Minor reformatting.
2015-01-07 Ed Schonberg <schonberg@adacore.com>
* sem_ch12.adb (Instantiate_Object): If formal is an anonymous
access to subprogram, replace its formals with new entities when
building the object declaration, both if actual is present and
when it is defaulted.
2015-01-07 Ed Schonberg <schonberg@adacore.com>
* sem_ch5.adb (Analyze_Assignment): If left-hand side is a view
conversion and type of expression has invariant, apply invariant
check on expression.
2015-01-07 Ed Schonberg <schonberg@adacore.com>
* sem_ch3.adb (Create_Constrained_Components): A call to
Gather_Components may detect an error if an inherited discriminant
that controls a variant is non-static.
* sem_aggr.adb (Resolve_Record_Aggregate, Step 5): The call to
Gather_Components may report an error if an inherited discriminant
in a variant in non-static.
* sem_util.adb (Gather_Components): If a non-static discriminant
is inherited do not report error here, but let caller handle it.
(Find_Actual): Small optimization.
2015-01-07 Bob Duff <duff@adacore.com>
* usage.adb (Usage): Document -gnatw.f switch.
2015-01-07 Ed Schonberg <schonberg@adacore.com>
* sem_ch12.adb: Code clean up and minor reformatting.
2015-01-07 Robert Dewar <dewar@adacore.com>
* exp_ch4.adb (Expand_N_Type_Conversion): Add guard for
Raise_Accessibility_Error call.
* s-valllu.ads (Scan_Raw_Long_Long_Unsigned): Add documentation
on handling of invalid digits in based constants.
* s-fatgen.ads: Minor reformatting.
* sem_attr.adb (Analyze_Attribute, case Unrestricted_Access):
Avoid noting bogus modification for Valid test.
* snames.ads-tmpl (Name_Attr_Long_Float): New Name.
* einfo.ads: Minor reformatting.
* sem_warn.adb: Minor comment clarification.
* sem_ch12.adb: Minor reformatting.
2015-01-07 Ed Schonberg <schonberg@adacore.com>
* exp_ch5.adb (Expand_Predicated_Loop): Handle properly loops
over static predicates when the loop parameter specification
carries a Reverse indicator.
2015-01-07 Ed Schonberg <schonberg@adacore.com>
* sem_ch12.adb (Instantiate_Object): If formal has a default,
actual is missing and formal has an anonymous access type, copy
access definition in full so that tree for instance is properly
formatted for ASIS use.
2015-01-07 Bob Duff <duff@adacore.com>
* sem_elab.adb (Check_Internal_Call_Continue): Give a warning
for P'Access, where P is a subprogram in the same package as
the P'Access, and the P'Access is evaluated at elaboration
time, and occurs before the body of P. For example, "X : T :=
P'Access;" would allow a subsequent call to X.all to be an
access-before-elaboration error; hence the warning. This warning
is enabled by the -gnatw.f switch.
* opt.ads (Warn_On_Elab_Access): New flag for warning switch.
* warnsw.adb (Set_Dot_Warning_Switch): Set Warn_On_Elab_Access.
* gnat_ugn.texi: Document the new warning.
2015-01-07 Johannes Kanig <kanig@adacore.com>
* lib-xref-spark_specific.adb (Collect_SPARK_Xrefs): Skip unneeded
cross ref files.
2015-01-07 Robert Dewar <dewar@adacore.com>
* s-taprop-linux.adb, clean.adb: Minor reformatting.
2015-01-07 Arnaud Charlet <charlet@adacore.com>
* s-tassta.adb: Relax some overzealous assertions.
2015-01-07 Ed Schonberg <schonberg@adacore.com>
* sem_ch6.adb (Analyze_Return_Type): An call that returns a limited
view of a type is legal when context is a thunk generated for
operation inherited from an interface.
* exp_ch6.adb (Expand_Simple_Function_Return): If context is
a thunk and return type is an incomplete type do not continue
expansion; thunk will be fully elaborated when generating code.
2015-01-07 Doug Rupp <rupp@adacore.com>
* s-osinte-mingw.ads (LARGE_INTEGR): New subtype.
(QueryPerformanceFrequency): New imported procedure.
* s-taprop-mingw.adb (RT_Resolution): Call above and return
resolution vice a hardcoded value.
* s-taprop-solaris.adb (RT_Resolution): Call clock_getres and return
resolution vice a hardcoded value.
* s-linux-android.ads (clockid_t): New subtype.
* s-osinte-aix.ads (clock_getres): New imported subprogram.
* s-osinte-android.ads (clock_getres): Likewise.
* s-osinte-freebsd.ads (clock_getres): Likewise.
* s-osinte-solaris-posix.ads (clock_getres): Likewise.
* s-osinte-darwin.ads (clock_getres): New subprogram.
* s-osinte-darwin.adb (clock_getres): New subprogram.
* thread.c (__gnat_clock_get_res) [__APPLE__]: New function.
* s-taprop-posix.adb (RT_Resolution): Call clock_getres to
calculate resolution vice hard coded value.
2015-01-07 Ed Schonberg <schonberg@adacore.com>
* exp_util.adb (Make_CW_Equivalent_Type): If root type is a
limited view, use non-limited view when available to create
equivalent record type.
2015-01-07 Vincent Celier <celier@adacore.com>
* gnatcmd.adb: Remove command Sync and any data and processing
related to this command. Remove project processing for gnatstack.
* prj-attr.adb: Remove package Synchonize and its attributes.
2015-01-07 Vincent Celier <celier@adacore.com>
* clean.adb: Minor error message change.
2015-01-07 Tristan Gingold <gingold@adacore.com>
PR ada/64349
* env.c (__gnat_environ): Adjust for darwin9/darwin10.
2015-01-07 Javier Miranda <miranda@adacore.com>
* sem_ch10.adb (Analyze_With_Clause): Compiling under -gnatq
protect the frontend against never ending recursion caused by
circularities in the sources.
2015-01-07 Robert Dewar <dewar@adacore.com>
* a-reatim.adb, make.adb, exp_pakd.adb, i-cpoint.adb, sem_ch8.adb,
exp_ch3.adb: Minor reformatting.
2015-01-07 Doug Rupp <rupp@adacore.com>
* s-linux.ads (clockid_t): New subtype.
* s-osinte-linux.ads (pragma Linker Options): Add -lrt.
(clockid_t): New subtype.
(clock_getres): Import system call.
* s-taprop-linux.adb (System.OS_Constants): With and rename.
(RT_Resolution): Remove
hardcoded value and call clock_getres.
* s-linux-sparc.ads, s-linux-mipsel.ads, s-linux-hppa.ads,
s-linux-alpha.ads, s-linux-x32.ads (clockid_t): Add new subtype.
2015-01-07 Robert Dewar <dewar@adacore.com>
* sem_warn.adb (Check_One_Unit): Guard against context item
with no Entity field.
2015-01-07 Vincent Celier <celier@adacore.com>
* clean.adb (Gnatclean): Warn that 'gnatclean -P' is obsolete.
* make.adb (Initialize): Warn that 'gnatmake -P' is obsolete.
2015-01-07 Vincent Celier <celier@adacore.com>
* prj-conf.adb (Parse_Project_And_Apply_Config): Always finalize
errors/warnings in the first parsing of the project files,
to display the warnings when there is no errors.
2015-01-07 Tristan Gingold <gingold@adacore.com>
* i-cpoint.adb (Copy_Terminated_Array): Nicely handle null target.
2015-01-07 Doug Rupp <rupp@adacore.com>
* s-taprop-vxworks.adb (Stop_All_Tasks): Pass return
value from Int_Lock as parameter to Int_Unlock.
* s-osinte-vxworks.ads (Int_Unlock): Add parameter.
* s-vxwext.ads (Int_Unlock): Likewise.
* s-vxwext-kernel.adb (intUnlock, Int_Unlock): Likewise.
* s-vxwext-kernel.ads (Int_Unlock): Likewise.
* s-vxwext-rtp.adb (Int_Unlock): Likewise.
* s-vxwext-rtp.ads (Int_Unlock): Likewise.
2015-01-07 Pierre-Marie de Rodat <derodat@adacore.com>
* exp_pakd.adb: Add a comment in exp_pakd.adb to explain why we
keep ___XP suffixes
2015-01-07 Tristan Gingold <gingold@adacore.com>
* i-cpoint.adb (Copy_Terminated_Array): Use Copy_Array to
handle overlap.
2015-01-07 Eric Botcazou <ebotcazou@adacore.com>
* sem_ch3.adb (Analyze_Full_Type_Declaration): Do not
automatically set No_Strict_Aliasing on access types.
* fe.h (No_Strict_Aliasing_CP): Declare.
* gcc-interface/trans.c (gigi): Force flag_strict_aliasing to 0 if
No_Strict_Aliasing_CP is set.
2015-01-07 Johannes Kanig <kanig@adacore.com>
* sem_ch8.adb (Analyze_Subprogram_Renaming) do
not build function wrapper in gnatprove mode when the package
is externally axiomatized.
2015-01-07 Jose Ruiz <ruiz@adacore.com>
* a-reatim.adb (Time_Of): Reduce the number of spurious overflows in
intermediate computations when the parameters have different signs.
2015-01-07 Javier Miranda <miranda@adacore.com>
* exp_ch3.adb (Build_Init_Procedure): For derived types,
improve the code which takes care of identifying and moving to
the beginning of the init-proc the call to the init-proc of the
parent type.
2015-01-07 Olivier Hainque <hainque@adacore.com>
* gcc-interface/trans.c (gnat_to_gnu, <N_Expression_With_Action>):
Elaborate the expression as part of the same stmt group as the actions.
2015-01-07 Robert Dewar <dewar@adacore.com>
* sem_ch3.adb: Minor error message change.
2015-01-07 Ed Schonberg <schonberg@adacore.com>
* sem_prag.adb (Analyze_Pragma, case Preelaborable_Initialization):
Following AI05-028, the pragam applies legally to any composite type.
2015-01-07 Arnaud Charlet <charlet@adacore.com>
* s-osinte-vxworks.adb, s-osinte-vxworks.ads
(sigwait, sigwaitinfo): Removed, not needed after all on any
VxWorks configurations.
2015-01-07 Robert Dewar <dewar@adacore.com>
* sem_ch3.adb, freeze.adb, exp_disp.adb: Minor reformatting.
2015-01-07 Javier Miranda <miranda@adacore.com>
* exp_disp.adb (Expand_Interface_Conversion): Adding missing
generation of accessibility check.
2015-01-07 Ed Schonberg <schonberg@adacore.com>
* sem_ch3.adb (Derived_Type_Declaration): In the case of an
illegal completion from a class- wide type, set etype of the
derived type properly to prevent cascaded errors.
2015-01-07 Robert Dewar <dewar@adacore.com>
* prj.ads, i-cpoint.adb, freeze.adb, ghost.adb, prj-err.adb: Minor
reformatting.
2015-01-07 Robert Dewar <dewar@adacore.com>
* restrict.adb (Check_Restriction_No_Use_Of_Attribute):
New procedure.
(OK_No_Use_Of_Entity_Name): New function.
(Set_Restriction_No_Use_Of_Entity): New procedure.
* restrict.ads (Check_Restriction_No_Use_Of_Attribute):
New procedure.
(OK_No_Use_Of_Entity_Name): New function.
(Set_Restriction_No_Use_Of_Entity): New procedure.
* sem_ch8.adb (Find_Direct_Name): Add check for violation of
No_Use_Of_Entity.
* sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
Add processing for new restriction No_Use_Of_Entity.
2015-01-07 Eric Botcazou <ebotcazou@adacore.com>
* freeze.adb (Freeze_Array_Type): Apply same handling to Is_Atomic
component type as to Has_Atomic_Components type. Remove useless
test on Is_Aliased component type.
2015-01-07 Hristian Kirtchev <kirtchev@adacore.com>
* alloc.ads Alphabetize several declarations. Add constants
Ignored_Ghost_Units_Initial and Ignored_Ghost_Units_Increment.
* atree.adb Add with and use clauses for Opt.
(Allocate_Initialize_Node): Mark a node as ignored Ghost
if it is created in an ignored Ghost region.
(Ekind_In): New variant.
(Is_Ignored_Ghost_Node): New routine.
(Set_Is_Ignored_Ghost_Node): New routine.
* atree.adb Aplhabetize several subprograms declarations. Flag
Spare0 is now known as Is_Ignored_Ghost_Node.
(Ekind_In): New variant.
(Is_Ignored_Ghost_Node): New routine.
(Set_Is_Ignored_Ghost_Node): New routine.
* einfo.adb: Flag 279 is now known as Contains_Ignored_Ghost_Code.
(Contains_Ignored_Ghost_Code): New routine.
(Set_Contains_Ignored_Ghost_Code): New routine.
(Set_Is_Checked_Ghost_Entity, Set_Is_Ignored_Ghost_Entity):
It is now possible to set this property on an unanalyzed entity.
(Write_Entity_Flags): Output the status of flag
Contains_Ignored_Ghost_Code.
* einfo.ads New attribute Contains_Ignored_Ghost_Code along with
usage in nodes.
(Contains_Ignored_Ghost_Code): New routine
along with pragma Inline.
(Set_Contains_Ignored_Ghost_Code): New routine along with pragma Inline.
* exp_ch3.adb Add with and use clauses for Ghost.
(Freeze_Type): Capture/restore the value of Ghost_Mode on entry/exit.
Set the Ghost_Mode in effect.
(Restore_Globals): New routine.
* exp_ch7.adb (Process_Declarations): Do not process a context
that invoves an ignored Ghost entity.
* exp_dbug.adb (Qualify_All_Entity_Names): Skip an ignored Ghost
construct that has been rewritten as a null statement.
* exp_disp.adb Add with and use clauses for Ghost.
(Make_DT): Capture/restore the value of Ghost_Mode on entry/exit. Set
the Ghost_Mode in effect.
(Restore_Globals): New routine.
* exp_util.adb (Requires_Cleanup_Actions): An ignored Ghost entity
does not require any clean up. Add two missing cases that deal
with block statements.
* freeze.adb Add with and use clauses for Ghost.
(Freeze_Entity): Capture/restore the value of Ghost_Mode on entry/exit.
Set the Ghost_Mode in effect.
(Restore_Globals): New routine.
* frontend.adb Add with and use clauses for Ghost. Remove any
ignored Ghost code from all units that qualify.
* ghost.adb New unit.
* ghost.ads New unit.
* gnat1drv.adb Add with clause for Ghost. Initialize and lock
the table in package Ghost.
* lib.ads: Alphabetize several subprogram declarations.
* lib-xref.adb (Output_References): Do not generate reference
information for ignored Ghost entities.
* opt.ads Add new type Ghost_Mode_Type and new global variable
Ghost_Mode.
* rtsfind.adb (Load_RTU): Provide a clean environment when
loading a runtime unit.
* sem.adb (Analyze): Capture/restore the value of Ghost_Mode on
entry/exit as the node may set a different mode.
(Do_Analyze):
Capture/restore the value of Ghost_Mode on entry/exit as the
unit may be withed from a unit with a different Ghost mode.
* sem_ch3.adb Add with and use clauses for Ghost.
(Analyze_Full_Type_Declaration, Analyze_Incomplete_Type_Decl,
Analyze_Number_Declaration, Analyze_Private_Extension_Declaration,
Analyze_Subtype_Declaration): Set the Ghost_Mode in effect. Mark
the entity as Ghost when there is a Ghost_Mode in effect.
(Array_Type_Declaration): The implicit base type inherits the
"ghostness" from the array type.
(Derive_Subprogram): The
alias inherits the "ghostness" from the parent subprogram.
(Make_Implicit_Base): The implicit base type inherits the
"ghostness" from the parent type.
* sem_ch5.adb Add with and use clauses for Ghost.
(Analyze_Assignment): Set the Ghost_Mode in effect.
* sem_ch6.adb Add with and use clauses for Ghost.
(Analyze_Abstract_Subprogram_Declaration, Analyze_Procedure_Call,
Analyze_Subprogram_Body_Helper, Analyze_Subprogram_Declaration):
Set the Ghost_Mode in effect. Mark the entity as Ghost when
there is a Ghost_Mode in effect.
* sem_ch7.adb Add with and use clauses for Ghost.
(Analyze_Package_Body_Helper, Analyze_Package_Declaration,
Analyze_Private_Type_Declaration): Set the Ghost_Mode in
effect. Mark the entity as Ghost when there is a Ghost_Mode
in effect.
* sem_ch8.adb Add with and use clauses for Ghost.
(Analyze_Exception_Renaming, Analyze_Generic_Renaming,
Analyze_Object_Renaming, Analyze_Package_Renaming,
Analyze_Subprogram_Renaming): Set the Ghost_Mode in effect. Mark
the entity as Ghost when there is a Ghost_Mode in effect.
(Find_Type): Check the Ghost context of a type.
* sem_ch11.adb Add with and use clauses for Ghost.
(Analyze_Exception_Declaration): Set the Ghost_Mode in
effect. Mark the entity as Ghost when there is a Ghost_Mode
in effect.
* sem_ch12.adb Add with and use clauses for Ghost.
(Analyze_Generic_Package_Declaration,
Analyze_Generic_Subprogram_Declaration): Set the Ghost_Mode in effect.
Mark the entity as Ghost when there is a Ghost_Mode in effect.
* sem_prag.adb Add with and use clauses for Ghost.
(Analyze_Pragma): Ghost-related checks are triggered when there
is a Ghost mode in effect.
(Create_Abstract_State): Mark the
entity as Ghost when there is a Ghost_Mode in effect.
* sem_res.adb Add with and use clauses for Ghost.
(Check_Ghost_Context): Removed.
* sem_util.adb (Check_Ghost_Completion): Removed.
(Check_Ghost_Derivation): Removed.
(Incomplete_Or_Partial_View):
Add a guard in case the entity has not been analyzed yet
and does carry a scope.
(Is_Declaration): New routine.
(Is_Ghost_Entity): Removed.
(Is_Ghost_Statement_Or_Pragma):
Removed.
(Is_Subject_To_Ghost): Removed.
(Set_Is_Ghost_Entity):
Removed.
(Within_Ghost_Scope): Removed.
* sem_util.adb (Check_Ghost_Completion): Removed.
(Check_Ghost_Derivation): Removed.
(Is_Declaration): New routine.
(Is_Ghost_Entity): Removed.
(Is_Ghost_Statement_Or_Pragma): Removed.
(Is_Subject_To_Ghost): Removed.
(Set_Is_Ghost_Entity): Removed.
(Within_Ghost_Scope): Removed.
* sinfo.ads Add a section on Ghost mode.
* treepr.adb (Print_Header_Flag): New routine.
(Print_Node_Header): Factor out code. Output flag
Is_Ignored_Ghost_Node.
* gcc-interface/Make-lang.in: Add dependency for unit Ghost.
2015-01-06 Eric Botcazou <ebotcazou@adacore.com>
* freeze.adb (Freeze_Array_Type) <Complain_CS>: Remove always
true test and unreachable 'else' arm.
2015-01-06 Vincent Celier <celier@adacore.com>
* prj-conf.adb (Check_Target): Improve error message when
there are mismatched targets between the on in the configuration
project file and the specified one, either in the main project
file or in the --target= switch.
2015-01-06 Pascal Obry <obry@adacore.com>
* prj-attr.adb, projects.texi, snames.ads-tmpl: Add Mode and
Install_Name attribute definitions.
2015-01-06 Ed Schonberg <schonberg@adacore.com>
* freeze.adb (Wrap_Imported_Subprogram): Indicate that the
generated Import pragma for the internal imported procedure does
not come from an aspect, so that Is_Imported can be properly
set for it.
2015-01-06 Gary Dismukes <dismukes@adacore.com>
* sem_ch12.adb (Might_Inline_Subp): Record whether
any subprograms in the generic package are marked with
pragma Inline_Always (setting flag Has_Inline_Always).
(Analyze_Package_Instantiation): Add test of Has_Inline_Always
alongside existing test of Front_End_Inlining as alternative
conditions for setting Inline_Now. Also add test of
Has_Inline_Always along with Front_End_Inlining test as an
alternative condition for setting Needs_Body to False.
2015-01-06 Tristan Gingold <gingold@adacore.com>
* i-cpoint.adb (Copy_Array): Handle overlap.
2015-01-06 Pascal Obry <obry@adacore.com>
* bindgen.adb: Minor style fix.
2015-01-06 Robert Dewar <dewar@adacore.com>
* sem_util.ads, sem_util.adb: Minor reformatting.
2015-01-06 Vincent Celier <celier@adacore.com>
* prj-conf.adb (Parse_Project_And_Apply_Config): Reset incomplete
with flags before parsing the projects.
* prj-err.adb (Error_Msg): Do nothing if there are incomplete withs.
* prj-part.adb (Post_Parse_Context_Clause): Set Incomplete_Withs
to True in the flags, when Ignore_Missing_With is True and an
imported project cannot be found.
* prj-proc.adb (Expression): When there are incomplete withs and
a variable or attribute is not found, set the variable/attribute
to unknown.
* prj.ads (Processing_Flags): New flag Incomplete_Withs,
defaulted to False.
2015-01-06 Vasiliy Fofanov <fofanov@adacore.com>
* prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-conf.adb,
prj-err.adb: Add new switch --no-command-line.
2015-01-06 Ed Schonberg <schonberg@adacore.com>
* sem_ch12.adb: Sloc of wrapper is that of instantiation.
2015-01-06 Robert Dewar <dewar@adacore.com>
* sem_ch11.adb: Minor reformatting.
2015-01-06 Ed Schonberg <schonberg@adacore.com>
* exp_aggr.adb (Get_Assoc_Expr): New routine internal to
Build_Array_Aggr_Code, used to initialized components covered
by a box association. If the component type is scalar and has
a default aspect, use it to initialize such components.
2015-01-06 Pascal Obry <obry@adacore.com>
* rtinit.c (__gnat_runtime_initialize): Add a parameter to
control the setup of the exception handler.
* initialize.c: Remove unused declaration.
* bindgen.adb: Always call __gnat_runtime_initialize and pass
whether the exeception handler must be set or not.
2015-01-06 Thomas Quinot <quinot@adacore.com>
* freeze.adb (Set_SSO_From_Defaults): When setting scalar storage
order to native from default, make sure to also adjust bit order.
* exp_aggr.adb: Minor reformatting.
2015-01-06 Robert Dewar <dewar@adacore.com>
* s-valllu.adb, s-valllu.ads, s-valuti.ads, s-valuns.adb, s-valuns.ads,
s-valrea.adb, s-valrea.ads: Add some additional guards for
Str'Last = Positive'Last.
2015-01-06 Ed Schonberg <schonberg@adacore.com>
* sem_ch12.adb, sem_ch8.adb: Ongoing work for wrappers for actual
subprograms.
2015-01-06 Javier Miranda <miranda@adacore.com>
* exp_disp.adb (Expand_Interface_Conversion): Reapply patch.
2015-01-06 Thomas Quinot <quinot@adacore.com>
* sem_util.ads: Minor reformatting.
* sem_cat.adb (In_RCI_Visible_Declarations): Change back to...
(In_RCI_Declaration) Return to old name, as proper checking of
entity being in the visible part depends on entity kind and must
be done by the caller.
2015-01-06 Ed Schonberg <schonberg@adacore.com>
* sem_ch12.adb, sem_ch12.ads, sem_ch8.adb: Ongoing work for wrappers
for operators in SPARK.
2015-01-06 Ed Schonberg <schonberg@adacore.com>
* sem_aggr.adb (Get_Value): In ASIS mode, preanalyze the
expression in an others association before making copies for
separate resolution and accessibility checks. This ensures that
the type of the expression is available to ASIS in all cases,
in particular if the expression is itself an aggregate.
2015-01-06 Eric Botcazou <ebotcazou@adacore.com>
* einfo.ads (Has_Independent_Components): Document extended
usage.
* einfo.adb (Has_Independent_Components): Remove obsolete assertion.
(Set_Has_Independent_Components): Adjust assertion.
* sem_prag.adb (Analyze_Pragma): Also set Has_Independent_Components
for pragma Atomic_Components. Set Has_Independent_Components
on the object instead of the type for an object declaration with
pragma Independent_Components.
2015-01-06 Olivier Hainque <hainque@adacore.com>
* set_targ.adb (Read_Target_Dependent_Values): Set
Long_Double_Index when "long double" is read.
(elaboration code): Register_Back_End_Types only when not reading from
config files. Doing otherwise is pointless and error prone.
2015-01-06 Robert Dewar <dewar@adacore.com>
* s-valrea.adb (Value_Real): Check for Str'Last = Positive'Last
2015-01-06 Robert Dewar <dewar@adacore.com>
* a-wtgeau.adb, a-ztgeau.adb, a-tigeau.adb (String_Skip): Raise PE if
Str'Last = Positive'Last.
2015-01-06 Ed Schonberg <schonberg@adacore.com>
* sem_ch6.adb (Matches_Limited_View): Handle properly the case
where the non-limited type is a generic actual and appears as
a subtype of the non-limited view of the other.
* freeze.adb (Build_Renamed_Body): If the return type of the
declaration that is being completed is a limited view and the
non-limited view is available, use it in the specification of
the generated body.
2015-01-06 Ed Schonberg <schonberg@adacore.com>
* sem_ch3.adb (Find_Type_Name): If there is a previous tagged
incomplete view, the type of the classwide type common to both
views is the type being declared.
2015-01-06 Eric Botcazou <ebotcazou@adacore.com>
* einfo.ads (Is_Independent): Further document extended usage.
2015-01-06 Eric Botcazou <ebotcazou@adacore.com>
* einfo.ads (Is_Independent): Document extended usage.
* einfo.adb (Is_Independent): Remove obsolete assertion.
(Set_Is_Independent): Likewise.
* sem_prag.adb (Process_Atomic_Shared_Volatile): Rename into...
(Process_Atomic_Independent_Shared_Volatile): ...this.
Deal with pragma Independent here.
(Analyze_Pragma): Adjust
to above renaming and also invoke it for pragma Independent.
Adjust comment for Independent_Components.
2015-01-06 Robert Dewar <dewar@adacore.com>
* snames.ads-tmpl: Remove entries for attribute Enum_Image.
* exp_attr.adb: Remove reference to Attribute_Enum_Image.
2015-01-06 Robert Dewar <dewar@adacore.com>
* s-vallli.adb (Value_Long_Long_Integer): Handle case of Str'Last
= Positive'Last.
* s-valllu.adb (Value_Long_Long_Unsigned): Handle case of
Str'Last = Positive'Last.
2015-01-06 Robert Dewar <dewar@adacore.com>
* sem_prag.adb (Process_Inline): Remove redundant construct
warning (-gnatw.r) for an ineffective pragma Inline.
2015-01-06 Robert Dewar <dewar@adacore.com>
* s-valint.adb: Fix typo in last checkin.
* s-valuns.adb (Value_Unsigned): More efficient fix for
Positive'Last case.
* sem_attr.adb (Analyze_Attribute): Minor reformatting
(Eval_Attribute): Static ervaluation of 'Img for enumeration types.
2015-01-06 Robert Dewar <dewar@adacore.com>
* s-valint.adb, s-valuns.adb (Value_Integer): Deal with case where
Str'Last = Positive'Last
2015-01-06 Thomas Quinot <quinot@adacore.com>
* xoscons.adb: Display exception information and return non-zero
exit status in top level exception handler.
2015-01-06 Ed Schonberg <schonberg@adacore.com>
* sem_ch8.adb: Code clean up.
2015-01-06 Tristan Gingold <gingold@adacore.com>
* targparm.ads: Remove obsolete comment.
2015-01-06 Olivier Hainque <hainque@adacore.com>
* gcc-interface/decl.c (gnat_to_gnu_entity, case E_Variable): When
constructing a ref to variable, update inner_const_flag from the
variable TREE_READONLY attribute.
* gcc-interface/targtyps.c (WIDEST_HARDWARE_FP_SIZE): Remove default
definition.
(get_target_float_size): Remove.
(get_target_double_size): Remove.
(get_target_long_double_size): Remove.
2015-01-06 Pascal Obry <obry@adacore.com>
* adaint.c (ProcListEvt): Set to NULL.
* rtinit.c: New file.
(__gnat_rt_init_count): New reference counter set to 0.
(__gnat_runtime_initialize): Move code here from __gnat_initialize when
this code is actually needed for the runtime initialization. This
routine returns immediately if the initialization has already been done.
* final.c: Revert previous change.
* rtfinal.c: New file.
(__gnat_runtime_finalize)[Win32]: Add finalization of the critical
section and event. The default version of this routine is empty (except
for the reference counting code). This routine returns immediately if
some others libraries are referencing the runtime.
* bindgen.adb (Gen_Adainit): Generate call to Runtime_Initialize
remove circuitry to initialize the signal handler as this is
now done by the runtime initialization routine.
(Gen_Adafinal): Generate call to Runtime_Finalize.
* gnat_ugn.texi: Update documentation about concurrency and
initialization/finalization of the run-time.
* gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Add
references to rtfinal.o and rtinit.o
2015-01-06 Robert Dewar <dewar@adacore.com>
* exp_attr.adb (Expand_N_Attribute_Reference): Add dummy entry
for Enum_Image.
* sem_attr.adb: Implement Enum_Image attribute.
* snames.ads-tmpl: Add entries for Enum_Image attribute.
2015-01-06 Robert Dewar <dewar@adacore.com>
* namet.ads: Document use of Boolean2 for No_Use_Of_Entity.
* restrict.ads (No_Use_Of_Entity): New table.
* sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
Ignore No_Use_Of_Entity (will be processed in parser).
* snames.ads-tmpl: Add entry for Name_No_Use_Of_Entity.
2015-01-06 Vincent Celier <celier@adacore.com>
* prj-tree.adb (Imported_Or_Extended_Project_Of): Do not try
to check for an extended project, if a project does not have
yet a project declaration.
2015-01-06 Pierre-Marie Derodat <derodat@adacore.com>
* scos.ads: Update documentation about the SCO table build
process and about table records format.
* par_sco.ads (SCO_Record): Rename to SCO_Record_Raw.
(SCO_Record_Filtered): New procedure.
(Set_SCO_Logical_Operator): New procedure.
(dsco): Update documentation.
* par_sco.adb: Update library-level comments.
(SCO_Generation_State_Type): New type.
(SCO_Generation_State): New variable.
(SCO_Raw_Table): New package instanciation.
(Condition_Pragma_Hash_Table): Rename to SCO_Raw_Hash_Table.
("<"): New.
(Tristate): New type.
(Is_Logical_Operator): Return Tristate and update documentation.
(Has_Decision): Update call to Is_Logical_Operator and complete
documentation.
(Set_Table_Entry): Rename to Set_Raw_Table_Entry, update
comment, add an assertion for state checking and change
references to SCO_Table into SCO_Raw_Table.
(dsco): Refactor to dump the raw and the filtered tables.
(Process_Decisions.Output_Decision_Operand): Handle putative
short-circuit operators.
(Process_Decisions.Output_Element): Update references
to Set_Table_Entry and to Condition_Pragma_Hash_Table.
(Process_Decisions.Process_Decision_Operand): Update call
to Is_Logical_Operator.
(Process_Decisions.Process_Node): Handle putative short-circuit
operators and change references to
SCO_Table into SCO_Raw_Table.
(SCO_Output): Add an assertion
for state checking and remove code that used to stamp out SCO entries.
(SCO_Pragma_Disabled): Change reference to SCO_Table
into SCO_Raw_Table.
(SCO_Record): Rename to SCO_Record_Raw,
add an assertion for state checking and change references
to SCO_Table into SCO_Raw_Table.
(Set_SCO_Condition): Add an assertion for state checking, update
references to Condition_Pragma_Hash_Table and change references to
SCO_Table into SCO_Raw_Table.
(Set_SCO_Pragma_Enabled): Add an assertion for state checking and
change references to SCO_Table into SCO_Raw_Table.
(Set_SCO_Logical_Operator): New procedure.
(Traverse_Declarations_Or_Statements.Set_Statement_Entry): Update
references to Set_Table_Entry and to Condition_Pragma_Hash_Table.
(SCO_Record_Fildered): New procedure.
* gnat1drv.adb (Gnat1drv): Invoke the SCO filtering pass.
* lib-writ.adb (Write_ALI): Invoke the SCO filtering pass and
output SCOs.
* par-load.adb (Load): Update reference to SCO_Record.
* par.adb (Par): Update reference to SCO_Record.
* put_scos.adb (Put_SCOs): Add an assertion to check that no
putative SCO condition reaches this end.
* sem_ch10.adb (Analyze_Proper_Body): Update reference to SCO_Record.
* sem_res.adb (Resolve_Logical_Op): Validate putative SCOs
when corresponding to an "and"/"or" operator affected by the
Short_Circuit_And_Or pragma.
2015-01-06 Robert Dewar <dewar@adacore.com>
* sem_ch8.adb (Analyze_Use_Package): Give more specific error
msg for attempted USE of generic subprogram or subprogram.
2015-01-06 Robert Dewar <dewar@adacore.com>
* s-valllu.adb, a-tiinau.adb, a-timoau.adb, a-ztinau.adb, a-ztmoau.adb,
s-valuns.adb, s-valrea.adb, a-wtflau.adb, a-tiflau.adb, a-ztflau.adb,
a-wtinau.adb, a-wtmoau.adb: Document recognition of : in place of #.
2015-01-06 Ed Schonberg <schonberg@adacore.com>
* sem_ch13.adb (Analyze_Aspect_Specifications): For aspects
that specify stream subprograms, if the prefix is a class-wide
type then the generated attribute definition clause must apply
to the same class-wide type.
(Default_Iterator): An iterator defined by an aspect of some
container type T must have a first parameter of type T, T'class,
or an access to such (from code reading RM 5.5.1 (2/3)).
2015-01-06 Arnaud Charlet <charlet@adacore.com>
* gnat1drv.adb: Minor: complete previous change.
2015-01-06 Olivier Hainque <hainque@adacore.com>
* set_targ.ads (C_Type_For): New function. Return the name of
a C type supported by the back-end and suitable as a basis to
construct the standard Ada floating point type identified by
the T parameter. This is used as a common ground to feed both
ttypes values and the GNAT tree nodes for the standard floating
point types.
* set_targ.adb (Long_Double_Index): The index at which "long
double" gets registered in the FPT_Mode_Table. This is useful to
know whether we have a "long double" available at all and get at
it's characteristics without having to search the FPT_Mode_Table
when we need to decide which C type should be used as the
basis for Long_Long_Float in Ada.
(Register_Float_Type): Fill Long_Double_Index.
(FPT_Mode_Index_For): New function. Return the index in
FPT_Mode_Table that designates the entry corresponding to the
provided C type name.
(FPT_Mode_Index_For): New function. Return the index in
FPT_Mode_Table that designates the entry for a back-end type
suitable as a basis to construct the standard Ada floating point
type identified by the input T parameter.
(elaboration code): Register_Back_End_Types unconditionally,
so C_Type_For can operate regardless of -gnateT. Do it
early so we can query it for the floating point sizes, via
FPT_Mode_Index_For. Initialize Float_Size, Double_Size and
Long_Double_Size from the FPT_Mode_Table, as cstand will do.
* cstand.adb (Create_Float_Types): Use C_Type_For to determine
which C type should be used as the basis for the construction
of the Standard Ada floating point types.
* get_targ.ads (Get_Float_Size, Get_Double_Size,
Get_Long_Double_Size): Remove.
* get_targ.adb: Likewise.
2015-01-06 Thomas Quinot <quinot@adacore.com>
* sem_cat.adb (In_RCI_Declaration): Remove unnecessary
parameter and rename to...
(In_RCI_Visible_Declarations): Fix handling of private part of nested
package.
(Validate_RCI_Subprogram_Declaration): Reject illegal function
returning anonymous access in RCI unit.
2015-01-06 Ed Schonberg <schonberg@adacore.com>
* sem_ch6.adb (New_Overloaded_Entity): In GNATprove mode, a
function wrapper may be a homonym of another local declaration.
* sem_ch8.adb (Analyze_Subprogram_Renaming): In GNATprove mode,
build function and operator wrappers after the actual subprogram
has been resolved, and replace the standard renaming declaration
with the declaration of wrapper.
* sem_ch12.ads (Build_Function_Wrapper, Build_Operator_Wraooer):
make public for use elsewhere.
* sem_ch12.adb (Build_Function_Wrapper, Build_Operator_Wraooer):
rewrite, now that actual is fully resolved when wrapper is
constructed.
2015-01-06 Javier Miranda <miranda@adacore.com>
* exp_disp.adb: Revert previous change.
2015-01-06 Robert Dewar <dewar@adacore.com>
* exp_util.adb: Change name Name_Table_Boolean to
Name_Table_Boolean1.
* namet.adb: Change name Name_Table_Boolean to Name_Table_Boolean1
Introduce Name_Table_Boolean2/3.
* namet.ads: Change name Name_Table_Boolean to Name_Table_Boolean1
Introduce Name_Table_Boolean2/3.
* par-ch13.adb: Change name Name_Table_Boolean to
Name_Table_Boolean1.
2015-01-06 Bob Duff <duff@adacore.com>
* gnat_rm.texi: Improve documentation regarding No_Task_Termination.
2015-01-06 Ed Schonberg <schonberg@adacore.com>
* sem_aggr.adb (Resolve_Record_Aggregte, Get_Value): For an
others choice that covers multiple components, analyze each
copy with the type of the component even in compile-only mode,
to detect potential accessibility errors.
2015-01-06 Hristian Kirtchev <kirtchev@adacore.com>
* sem_res.adb (Is_Assignment_Or_Object_Expression): New routine.
(Resolve_Actuals): An effectively volatile out
parameter cannot act as an in or in out actual in a call.
(Resolve_Entity_Name): An effectively volatile out parameter
cannot be read.
2015-01-06 Ed Schonberg <schonberg@adacore.com>
* sem_ch6.adb (Analyze_Subprogram_Body_Helper): If the body is
the expansion of an expression function it may be pre-analyzed
if a 'access attribute is applied to the function, in which case
last_entity may have been assigned already.
2015-01-06 Ed Schonberg <schonberg@adacore.com>
* sem_ch4.adb (Analyze_One_Call): If formal has an incomplete
type and actual has the corresponding full view, there is no
error, but a case of use of incomplete type in a predicate or
invariant expression.
2015-01-06 Vincent Celier <celier@adacore.com>
* makeutl.adb (Insert_No_Roots): Make sure that the same source
in two different project tree is checked in both trees, if they
are sources of two different projects, extended or not.
2015-01-06 Arnaud Charlet <charlet@adacore.com>
* gnat1drv.adb: Minor code clean up.
(Adjust_Global_Switches): Ignore gnatprove_mode in codepeer_mode.
2015-01-06 Bob Duff <duff@adacore.com>
* osint.adb (Read_Source_File): Don't print out
file name unless T = Source.
2015-01-06 Ed Schonberg <schonberg@adacore.com>
* sem_util.adb (Is_Variable, Is_OK_Variable_For_Out_Formal):
recognize improper uses of constant_reference types as actuals
for in-out parameters.
(Check_Function_Call): Do not collect identifiers if function
name is missing because of previous error.
2015-01-06 Robert Dewar <dewar@adacore.com>
* ali-util.adb, sem_prag.adb, rtsfind.adb, sem_util.adb, sem_res.adb,
ali.adb, binde.adb, namet.adb, namet.ads, gnatls.adb, bcheck.adb:
Minor change of name Name_Table_Info => Name_Table_Int.
2015-01-06 Robert Dewar <dewar@adacore.com>
* exp_strm.adb (Build_Elementary_Input_Call): Clarify comments
in previous checkin.
* freeze.adb (Freeze_Fixed_Point_Type): Add warning for shaving
of bounds.
* sem_prag.adb, sem_ch10.adb, sem_ch6.adb: Minor reformatting.
2015-01-06 Vincent Celier <celier@adacore.com>
* a-strsup.adb (Times (Natural;String;Positive)): Raise
Length_Error, not Index_Error, when the result is too long.
2015-01-06 Thomas Quinot <quinot@adacore.com>
* a-direct.adb (Create_Path): Minor error handling and
performance improvement.
2015-01-06 Robert Dewar <dewar@adacore.com>
* checks.ads, sem_ch12.adb: Minor reformatting.
* exp_ch4.adb (Expand_N_Op_Divide): Generate explicit divide by
zero check for fixed-point case if Backend_Divide_Checks_On_Target
is False.
2015-01-06 Robert Dewar <dewar@adacore.com>
* sem_prag.adb (Analyze_Pragma, case No_Elaboration_Code_All):
Do not set restriction No_Elaboration_Code unless the pragma
appears in the main unit).
2015-01-06 Ed Schonberg <schonberg@adacore.com>
* sem_ch10.adb (Is_Regular_With_Clause): Add guard to verify
that with clause has already been analyzed before checking kind
of with_clause.
2015-01-06 Robert Dewar <dewar@adacore.com>
* exp_strm.adb (Build_Elementary_Input_Call): Return base type
(as required by RM).
2015-01-06 Arnaud Charlet <charlet@adacore.com>
* a-reatim.adb ("/"): Add explicit pragma Unsuppress (Division_Check).
2015-01-06 Robert Dewar <dewar@adacore.com>
* sem_prag.adb (Process_Suppress_Unsuppress): Add extra warning
for ignoring pragma Suppress (Elaboration_Check) in SPARK mode.
2015-01-06 Javier Miranda <miranda@adacore.com>
* exp_disp.adb (Expand_Interface_Conversion): No displacement
of the pointer to the object needed when the type of the operand
is not an interface type and the interface is one of its parent
types (since they share the primary dispatch table).
2015-01-06 Vincent Celier <celier@adacore.com>
* prj-env.adb: Minor comment update.
2015-01-06 Javier Miranda <miranda@adacore.com>
* sem_res.adb (Valid_Conversion): Restrict the checks on anonymous
access types whose target type is an interface type to operands
that are access types; required to report an error when the
operand is not an access type.
2015-01-06 Bob Duff <duff@adacore.com>
* a-cfinve.adb (Copy): Set the discriminant to the Length when
Capacity = 0.
* a-cofove.ads (Capacity): Add a postcondition.
* a-cfinve.ads (Capacity): Add a postcondition.
(Reserve_Capacity): Correct the postcondition in the case where
Capacity = 0; that means "Capacity => Length (Container)".
* a-cofove.adb (Elems[c]): Add a comment
explaining the dangers and how to avoid them.
2015-01-06 Ed Schonberg <schonberg@adacore.com>
* sem_ch12.adb: Code clean up.
2015-01-06 Arnaud Charlet <charlet@adacore.com>
* gnatvsn.ads: Bump copyright year.
2015-01-06 Robert Dewar <dewar@adacore.com>
* s-taskin.ads, s-traces.ads: Minor reformatting.
* exp_util.adb: Minor typo fix.
2015-01-06 Vincent Celier <celier@adacore.com>
* gnatls.adb (Search_RTS): Invoke Initialize_Default_Project_Path
with the runtime name.
* prj-env.adb (Initialize_Default_Project_Path): When both
Target_Name and Runtime_Name are not empty string, add to the
project path the two directories .../lib/gnat and .../share/gpr
related to the runtime.
* prj-env.ads (Initialize_Default_Project_Path): New String
parameter Runtime_Name, defaulted to the empty string.
2015-01-06 Hristian Kirtchev <kirtchev@adacore.com>
* frontend.adb: Guard against the case where a configuration
pragma may be split into multiple pragmas and the original
rewritten as a null statement.
* sem_prag.adb (Analyze_Pragma): Insert a brand new Check_Policy
pragma using Insert_Before rather than Insert_Action. This
takes care of the configuration pragma case where Insert_Action
would fail.
2015-01-06 Bob Duff <duff@adacore.com>
* a-coboho.ads (Element_Access): Add "pragma
No_Strict_Aliasing (Element_Access);". This is needed because
we are unchecked-converting from Address to Element_Access.
* a-cofove.ads, a-cofove.adb (Elems,Elemsc): Fix bounds of the
result to be 1.
2015-01-06 Hristian Kirtchev <kirtchev@adacore.com>
* sem_res.adb (Resolve_Actuals): Remove the
restriction which prohibits volatile actual parameters with
enabled external propery Async_Writers to act appear in procedure
calls where the corresponding formal is of mode OUT.
2015-01-05 Jakub Jelinek <jakub@redhat.com>
* gnat_ugn.texi: Bump @copying's copyright year.
2015-01-05 Eric Botcazou <ebotcazou@adacore.com>
PR ada/64492
* gcc-interface/Makefile.in (../stamp-tools): Reinstate dropped code.
2015-01-04 Uros Bizjak <ubizjak@gmail.com>
* gcc-interface/misc.c (internal_error_function): Use xasprintf instead
of unchecked asprintf.
Copyright (C) 2015 Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved.