platform/upstream/gcc.git
17 years agoDaily bump.
GCC Administrator [Thu, 7 Jun 2007 00:16:54 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r125514

17 years ago* config.sub, config.guess: Update from upstream sources.
Ben Elliston [Wed, 6 Jun 2007 23:23:20 +0000 (23:23 +0000)]
* config.sub, config.guess: Update from upstream sources.

From-SVN: r125511

17 years ago* gfortran.dg/integer_exponentiation_3.F90: Use approx. check.
Steve Ellcey [Wed, 6 Jun 2007 23:11:06 +0000 (23:11 +0000)]
* gfortran.dg/integer_exponentiation_3.F90: Use approx. check.

From-SVN: r125510

17 years agoMakefile.tpl: Fix spelling error.
Ben Elliston [Wed, 6 Jun 2007 23:02:22 +0000 (23:02 +0000)]
Makefile.tpl: Fix spelling error.

* Makefile.tpl: Fix spelling error.
* Makefile.in: Regenerate.

From-SVN: r125509

17 years agoconfig.gcc (i?86-*-darwin*): Remove arch parameter.
Eric Christopher [Wed, 6 Jun 2007 22:43:49 +0000 (22:43 +0000)]
config.gcc (i?86-*-darwin*): Remove arch parameter.

2007-06-06  Eric Christopher  <echristo@apple.com>

    * config.gcc (i?86-*-darwin*): Remove arch parameter.
    (x86_64-*-darwin*): Ditto.
    * config/i386/darwin.h (TARGET_SUBTARGET32_ISA_DEFAULT): Define.
    (TARGET_SUBTARGET64_ISA_DEFAULT): Ditto.

From-SVN: r125508

17 years agore PR testsuite/25241 ([C++] DejaGNU does not distinguish between errors and warnings)
Manuel López-Ibáñez [Wed, 6 Jun 2007 20:49:09 +0000 (20:49 +0000)]
re PR testsuite/25241 ([C++] DejaGNU does not distinguish between errors and warnings)

2007-06-06  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>

PR testsuite/25241

testsuite/
* gcc.dg/simd-5.c: Mark output as a note.
* gcc.dg/simd-6.c: Mark output as a note. Fix incorrect use of
dg-message.
* gcc.dg/simd-1.c: Likewise.
* gcc.dg/always_inline.c: Mark output as a sorry.
* gcc.dg/always_inline2.c: Likewise.
* gcc.dg/always_inline3.c: Likewise.

From-SVN: r125505

17 years agotree-ssa-alias-warnings.c (maybe_add_match): Cast according to the coding conventions.
Thomas Neumann [Wed, 6 Jun 2007 20:18:47 +0000 (20:18 +0000)]
tree-ssa-alias-warnings.c (maybe_add_match): Cast according to the coding conventions.

* tree-ssa-alias-warnings.c (maybe_add_match): Cast according to the
coding conventions.
(add_key): Likewise.
* tree-ssa.c (init_tree_ssa): Use type safe memory macros.
* tree-ssa-ccp.c (ccp_fold_builtin): Avoid using C++ keywords as
variable names.
* tree-ssa-coalesce.c (find_coalesce_pair): Use type safe memory macros.
(add_cost_one_coalesce): Likewise.
* tree-ssa-copy.c (merge_alias_info): Avoid using C++ keywords as
variable names. Rename orig to orig_name for consistency.
* tree-ssa-dom.c (dom_thread_across_edge): Cast according to the coding
conventions.
(cprop_into_successor_phis): Avoid using C++ keywords as variable names.
(record_equivalences_from_stmt): Likewise.
* tree-ssa-dse.c (dse_initialize_block_local_data): Cast according to
the coding conventions.
(memory_ssa_name_same): Likewise.
(dse_optimize_stmt): Likewise.
(dse_record_phis): Likewise.
(dse_finalize_block): Likewise.
* tree-ssa-loop-im.c (outermost_invariant_loop_expr): Avoid using C++
keywords as variable names.
(may_move_till): Cast according to the coding conventions.
(force_move_till_expr): Avoid using C++ keywords as variable names.
(force_move_till): Cast according to the coding conventions.
(memref_hash): Likewise.
(memref_eq): Likewise.
(gather_mem_refs_stmt): Likewise.
* tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Avoid using C++
keywords as variable names.
(idx_find_step): Cast according to the coding conventions.
(idx_record_use): Likewise.
(find_depends): Likewise.
(prepare_decl_rtl): Likewise.
(mbc_entry_hash): Likewise.
(mbc_entry_eq): Likewise.
* tree-ssa-loop-niter.c (SWAP): Use the correct the type for tmp.
(simplify_replace_tree): Avoid using C++ keywords as variable names.
(idx_infer_loop_bounds): Cast according to the coding conventions.
* tree-ssa-loop-prefetch.c (idx_analyze_ref): Likewise.
* tree-ssa-math-opts.c (occ_new ): Likwise.
* tree-ssanames.c (duplicate_ssa_name_ptr_info): Use type safe memory
macros.
* tree-ssa-operands.c (add_def_op): Avoid using C++ keywords as variable
names.
(add_use_op): Likewise.
(add_vop): Likewise.
(add_vuse_op): Likewise.
(add_vdef_op): Likewise.
(get_expr_operands): Likewise.
(push_stmt_changes): Use type safe memory macros.
* tree-ssa-phiopt.c (replace_phi_edge_with_variable): Avoid using C++
keywords as variable names.
(conditional_replacement): Likewise.
(minmax_replacement): Likewise.
(abs_replacement): Likewise.
* tree-ssa-pre.c (create_expression_by_pieces): Cast according to the
coding conventions.
(insert_fake_stores): Avoid using C++ keywords as variable names.
* tree-ssa-reassoc.c (add_to_ops_vec): Cast according to the coding
conventions.
* tree-ssa-structalias.c (heapvar_lookup): Likewise.
(heapvar_insert): Use type safe memory macros.
(new_var_info): Cast according to the coding conventions.
(new_constraint): Likewise.
(remove_preds_and_fake_succs): Use type safe memory macros.
* tree-ssa-threadupdate.c (thread_block): Cast according to the coding
conventions.
(thread_single_edge): Likewise.

From-SVN: r125504

17 years agore PR libstdc++/32233 (warning in stl_vector.h:832)
Paolo Carlini [Wed, 6 Jun 2007 18:44:02 +0000 (18:44 +0000)]
re PR libstdc++/32233 (warning in stl_vector.h:832)

2007-06-06  Paolo Carlini  <pcarlini@suse.de>

PR libstdc++/32233
* include/bits/stl_vector.h (_M_fill_initialize): Fix return type.
* testsuite/23_containers/vector/requirements/dr438/assign_neg.cc:
Adjust dg-error line.
* testsuite/23_containers/vector/requirements/dr438/insert_neg.cc:
Likewise.

From-SVN: r125499

17 years agoi386.c (override_options): Move handling of TARGET_SUBTARGET* earlier.
Eric Christopher [Wed, 6 Jun 2007 18:39:25 +0000 (18:39 +0000)]
i386.c (override_options): Move handling of TARGET_SUBTARGET* earlier.

2007-06-06  Eric Christopher  <echristo@apple.com>

        * config/i386/i386.c (override_options): Move handling
        of TARGET_SUBTARGET* earlier.

From-SVN: r125497

17 years agore PR testsuite/31828 (FAIL: gcc.dg/float-range-[3-5].c (test for excess errors))
Steve Ellcey [Wed, 6 Jun 2007 17:48:03 +0000 (17:48 +0000)]
re PR testsuite/31828 (FAIL: gcc.dg/float-range-[3-5].c (test for excess errors))

PR testsuite/31828
* inclhack.def (hppa_hpux_fp_macros): New.
* fixincl.x: Regenerate.
* * tests/base/math.h: Update.

From-SVN: r125496

17 years agogenmodes.c (tagged_printf, [...]): Don't use %n on printf.
Paolo Bonzini [Wed, 6 Jun 2007 15:43:29 +0000 (15:43 +0000)]
genmodes.c (tagged_printf, [...]): Don't use %n on printf.

2007-06-06  Paolo Bonzini  <bonzini@gnu.org>

* genmodes.c (tagged_printf, emit_insn_modes_h): Don't
use %n on printf.

From-SVN: r125494

17 years agohaifa-sched.c (restore_bb_notes): Clear bb field of the notes emited outside of basic...
Zdenek Dvorak [Wed, 6 Jun 2007 14:46:34 +0000 (16:46 +0200)]
haifa-sched.c (restore_bb_notes): Clear bb field of the notes emited outside of basic block.

* haifa-sched.c (restore_bb_notes): Clear bb field of the notes
emited outside of basic block.
* cfgbuild.c (find_bb_boundaries): Clear bb field for insns between
the created blocks.
* rtl.h (delete_insn_chain): Declaration changed.
* cfgrtl.c (delete_insn_chain): Add option to clear bb field for
non-removed insns.
(rtl_delete_block, rtl_merge_blocks): Pass true to delete_insn_chain.
(delete_insn_chain_and_edges, try_redirect_by_replacing_jump,
rtl_tidy_fallthru_edge, cfg_layout_merge_blocks): Pass false
to delete_insn_chain.
(rtl_verify_flow_info_1): Verify that the insns in header and footer
do not have bb field set.
(rtl_verify_flow_info): Verify that insns between basic blocks do not
have bb field set.
* recog.c (peephole2_optimize): Add argument to delete_insn_chain call.
* cfgcleanup.c (try_optimize_cfg): Ditto.

From-SVN: r125492

17 years agolambda-code.c (struct lambda_lattice_s): Add a name to the struct.
Thomas Neumann [Wed, 6 Jun 2007 14:33:57 +0000 (14:33 +0000)]
lambda-code.c (struct lambda_lattice_s): Add a name to the struct.

* lambda-code.c (struct lambda_lattice_s): Add a name to the struct.
(lambda_body_vector_new): Use type safe memory macros.
(lambda_linear_expression_new): Likewise.
(lambda_loopnest_new): Likewise.
(lambda_lattice_new): Likewise.
(replace_uses_equiv_to_x_with_y): Cast according to the coding
conventions. Use type safe memory macros.
* lambda.h (struct lambda_trans_matrix_s): Add a name to the struct.
(lambda_body_vector_s): Likewise.
* lambda-mat.c (lambda_matrix_new): Use type safe memory macros.
* lambda-trans.c (lambda_trans_matrix_new): Likewise.

From-SVN: r125491

17 years agotree-ssa-forwprop.c (forward_propagate_into_cond): Return 2 if we need to schedule...
Richard Biener [Wed, 6 Jun 2007 13:58:41 +0000 (13:58 +0000)]
tree-ssa-forwprop.c (forward_propagate_into_cond): Return 2 if we need to schedule cfg_cleanup.

2007-06-06  Richard Guenther  <rguenther@suse.de>

* tree-ssa-forwprop.c (forward_propagate_into_cond): Return 2
if we need to schedule cfg_cleanup.
(tree_ssa_forward_propagate_single_use_vars): Do so.

From-SVN: r125490

17 years agodebug.html: Correct link.
Benjamin Kosnik [Wed, 6 Jun 2007 13:57:00 +0000 (13:57 +0000)]
debug.html: Correct link.

2007-06-06  Benjamin Kosnik  <bkoz@redhat.com>
    Frank Mori Hess  <frank.hess@nist.gov>

    * docs/html/debug.html: Correct link.

From-SVN: r125488

17 years agofold-const.c (merge_ranges): If range_successor or range_predecessor fail, just return 0.
Ian Lance Taylor [Wed, 6 Jun 2007 13:56:00 +0000 (13:56 +0000)]
fold-const.c (merge_ranges): If range_successor or range_predecessor fail, just return 0.

./: * fold-const.c (merge_ranges): If range_successor or
range_predecessor fail, just return 0.
testsuite/:
* g++.dg/conversion/enum1.C: New test.

From-SVN: r125486

17 years ago2007-06-06 Benjamin Kosnik <bkoz@redhat.com>
Benjamin Kosnik [Wed, 6 Jun 2007 13:54:44 +0000 (13:54 +0000)]
2007-06-06  Benjamin Kosnik  <bkoz@redhat.com>
    Frank Mori Hess  <frank.hess@nist.gov>

Co-Authored-By: Frank Mori Hess <frank.hess@nist.gov>
From-SVN: r125485

17 years agoconfigure.ac: Update TOOLS_TARGET_PAIRS configuration to match gcc/ada/Makefile.in.
Arnaud Charlet [Wed, 6 Jun 2007 13:18:52 +0000 (13:18 +0000)]
configure.ac: Update TOOLS_TARGET_PAIRS configuration to match gcc/ada/Makefile.in.

        * configure.ac: Update TOOLS_TARGET_PAIRS configuration to match
        gcc/ada/Makefile.in.

        * configure: Regenerated.

From-SVN: r125484

17 years agore PR tree-optimization/32216 (ICE: verify_stmts failed (invalid reference prefix...
Uros Bizjak [Wed, 6 Jun 2007 12:12:32 +0000 (14:12 +0200)]
re PR tree-optimization/32216 (ICE: verify_stmts failed (invalid reference prefix) with -ftree-vectorize)

PR tree-optimization/32216
* tree-vectorizer.c (supportable_widening_operation): Determine
signedness of FIX_TRUNC_EXPR from output operand.
(supportable_narrowing_operation): Ditto.
* tree-vect-generic.c (expand_vector_operations_1): Determine
signedness of VEC_UNPACK_FLOAT_HI_EXPR and VEC_UNPACK_FLOAT_LO_EXPR
from input operand.

testsuite/ChangeLog:

PR tree-optimization/32216
* gcc.dg/vect/pr32216.c: New test.

From-SVN: r125482

17 years agoResync
Arnaud Charlet [Wed, 6 Jun 2007 11:07:47 +0000 (13:07 +0200)]
Resync

From-SVN: r125481

17 years agoAdd new tests
Arnaud Charlet [Wed, 6 Jun 2007 10:54:25 +0000 (12:54 +0200)]
Add new tests

From-SVN: r125480

17 years agoMinor editing.
Arnaud Charlet [Wed, 6 Jun 2007 10:54:04 +0000 (12:54 +0200)]
Minor editing.

Update constants.
Update copyright notice.

From-SVN: r125479

17 years agoa-reatim.adb: Documentation addition
Robert Dewar [Wed, 6 Jun 2007 10:52:32 +0000 (12:52 +0200)]
a-reatim.adb: Documentation addition

2007-04-20  Robert Dewar  <dewar@adacore.com>

* a-reatim.adb: Documentation addition

* g-cgideb.adb: Minor code reorganization

* tree_io.adb, treepr.adb, cstand.adb, krunch.adb, par.adb,
mdll-utl.adb, par-ch5.adb, par-tchk.adb, s-exctab.ads, s-memory.ads,
s-osprim.ads, s-restri.ads, s-soflin.ads: Minor reformatting.

* debug.ads, debug.adb (Get_Debug_Flag_K): Remove unused obsolete
function.  Change name New_Scope to Push_Scope
(Get_Debug_Flag_K): Remove unused obsolete function.

* exp_ch8.adb, inline.adb, sem_ch8.ads: Change name New_Scope to
Push_Scope.

* makeusg.adb: Update Copyright notice
Add line for switch -aP

* makeusg.adb: Fix wording of some usage messages

* s-assert.adb (Raise_Assert_Failure): Add call to
Debug_Raise_Assert_Failure.

* s-unstyp.ads (type Packed_Bytes2): Change alignment to use 'Min
(2, Standard'Alignment) for compatibility with AAMP (where alignment
is restricted to 1).

* s-wchjis.adb: Remove use of System.Pure_Exceptions

* tbuild.ads, tbuild.adb (Make_Implicit_Exception_Handler): Set the
node location to No_Location when we're not debugging the expanded
code.

From-SVN: r125478

17 years agoa-cidlli.ads, [...] (Empty_Vector, [...]): Move this object declaration after freezin...
Javier Miranda [Wed, 6 Jun 2007 10:52:10 +0000 (12:52 +0200)]
a-cidlli.ads, [...] (Empty_Vector, [...]): Move this object declaration after freezing point of all its associated tagged...

2007-04-20  Javier Miranda  <miranda@adacore.com>

* a-cidlli.ads, a-cdlili.ads, a-cohama.ads, a-coinve.ads,
a-convec.ads (Empty_Vector, Empty_Map, Empty_List): Move this object
declaration after freezing point of all its associated tagged types;
otherwise such types are frozen too early.

From-SVN: r125477

17 years agomakegpr.adb (Add_Archive_Path): Use untouched object and library dirs and library...
Pascal Obry [Wed, 6 Jun 2007 10:51:56 +0000 (12:51 +0200)]
makegpr.adb (Add_Archive_Path): Use untouched object and library dirs and library name.

2007-04-20  Pascal Obry  <obry@adacore.com>
    Vincent Celier  <celier@adacore.com>

* makegpr.adb (Add_Archive_Path): Use untouched object and library
dirs and library name.
(Build_Global_Archive): Idem. Minor code clean-up. Removes duplicate
comments.
(Build_Library): Idem.
(Compile_Individual_Sources): Idem.
(Compile_Link_With_Gnatmake): Idem.
(Compile_Sources): Idem.
(Get_Imported_Directories): Idem.
(Link_Executables): Idem. Same change for the executable dir.
(Check_Compilation_Needed): C_Source_Path new variable containing
the canonical form of Source_Path to check against the source names
in the dependency file.
(Build_Global_Archive, Compile_Individual_Sources, Compile_Sources): In
verbose mode, display the name of the object directory we're changing
to.
(Saved_Switches): New name of table X_Switches
(Scan_Arg): Recognize new switch -aP and save in table Saved_Switches
(Usage): New line for switch -aP
(Get_Imported_Directories.Add): Make sure that Add_Arg is True before
testing if a directory should be added to the search path.

From-SVN: r125476

17 years agoxgnatugn.adb: Allow dots to be used in ug_words (-gnatw.c and -gnatw.C)
Vincent Celier [Wed, 6 Jun 2007 10:51:44 +0000 (12:51 +0200)]
xgnatugn.adb: Allow dots to be used in ug_words (-gnatw.c and -gnatw.C)

2007-04-20  Vincent Celier  <celier@adacore.com>
    Robert Dewar  <dewar@adacore.com>

* xgnatugn.adb: Allow dots to be used in ug_words (-gnatw.c and
-gnatw.C)

* gnat_ugn.texi: Fix ordering of -g switch for gnatmake
Document gnatbind switch -a
(case Constructions): Document that variables declarations are allowed
for previously declared variables.
Fix external lib project example
-gnatg: Indicate new VMS qualifier /GNAT_INTERNAL
Indicate that "#if not X or Y then" is not allowed in input files to
gnatprep.
Document gnatw.x and gnatw.X warning flags
Mention -Winline switch to activate warnings when back-end inlining is
ineffective.
Add gnatcheck rule descriptions
Describe how to use the GNAT driver to call a tool on a closure.
Describe how to run project-wide checks or metrics.
Document gnatbind's -R option
Updated to account for Ada 2005 support

* gnat_rm.texi (Case Construction): Allow variable declarations for
previously declared variables.
(Representation Clauses and Pragmas): Lift restriction on alignment
clauses for record types.
(Ada.Characters.*): Fix typo in reference to A.3.3(27).
Document No_Exception_Propagation restriction
Document No_Body pragma
Updated to account for Ada 2005 support; corrected some typos
(Implementation Defined Pragmas): Document pragma Universal_Aliasing.

* gnat-style.texi: Make it clear that we never use mode IN for
procedures or functions

* ug_words: Add entries for -gnatw.x and -gnatw.X
Add entries for -gnatw.c/.C

From-SVN: r125475

17 years agovms_conv.adb (Process_Argument): Keep arguments starting with '+' as is.
Vincent Celier [Wed, 6 Jun 2007 10:51:19 +0000 (12:51 +0200)]
vms_conv.adb (Process_Argument): Keep arguments starting with '+' as is.

2007-04-20  Vincent Celier  <celier@adacore.com>

* vms_conv.adb (Process_Argument): Keep arguments starting with '+' as
is.

* vms_data.ads: Add entries for -gnatw.x and -gnatw.X
/STYLE_CHECKS=GNAT: Change meaning to -gnatyg
/GNAT_INTERNAL: New compiler qualifier corresponding to -gnatg
Add missing comment for /OPTIMIZE=SPACE
Add entry for OPTIMIZE=SPACE
Add new qualifier /ALL_PROJECTS (= -U) for GNAT LIST
Add documentation for new qualifiers corresponding to -gnatw.c/.C

From-SVN: r125474

17 years agotypes.h, types.ads: Rename PE_Illegal_CW_Actual_E_4_18 to PE_Non_Transportable_Actual.
Thomas Quinot [Wed, 6 Jun 2007 10:50:59 +0000 (12:50 +0200)]
types.h, types.ads: Rename PE_Illegal_CW_Actual_E_4_18 to PE_Non_Transportable_Actual.

2007-04-20  Thomas Quinot  <quinot@adacore.com>

* types.h, types.ads: Rename PE_Illegal_CW_Actual_E_4_18 to
PE_Non_Transportable_Actual.
(By_Descriptor_Last): New constant.
(By_Copy_Return): Likewise.

From-SVN: r125473

17 years agotracebak.c (FRAME_OFFSET): Add parameter FP.
Eric Botcazou [Wed, 6 Jun 2007 10:50:46 +0000 (12:50 +0200)]
tracebak.c (FRAME_OFFSET): Add parameter FP.

2007-04-20  Eric Botcazou  <ebotcazou@adacore.com>

* tracebak.c (FRAME_OFFSET): Add parameter FP. On SPARC/Solaris, do not
add the stack bias if the offset is computed from a frame address.
(__gnat_backtrace): Adjust for above change.

From-SVN: r125472

17 years agos-stchop-vxworks.adb (Set_Stack_Info): Instead of trying to map the VxWorks task...
Matthew Gingell [Wed, 6 Jun 2007 10:50:30 +0000 (12:50 +0200)]
s-stchop-vxworks.adb (Set_Stack_Info): Instead of trying to map the VxWorks task descriptor in the Ada run time...

2007-04-20  Matthew Gingell  <gingell@adacore.com>
    Jose Ruiz  <ruiz@adacore.com>

* s-stchop-vxworks.adb (Set_Stack_Info): Instead of trying to map the
VxWorks task descriptor in the Ada run time, call a C subprogram
(__gnat_get_stack_info) that extracts the required information.

* sysdep.c: Back out temporary lynxos workaround.
(__gnat_get_stack_info): Add this procedure that passes to the Ada run
time the stack information associated to the currently executing task.
Only VxWorks systems require this function.

From-SVN: r125471

17 years agoswitch-b.adb (Scan_Binder_Switches): Add processing for new switches -R and -Z
Vincent Celier [Wed, 6 Jun 2007 10:50:04 +0000 (12:50 +0200)]
switch-b.adb (Scan_Binder_Switches): Add processing for new switches -R and -Z

2007-04-20  Vincent Celier  <celier@adacore.com>

* switch-b.adb (Scan_Binder_Switches): Add processing for new
switches -R and -Z

* switch-m.adb (Normalize_Compiler_Switches): Do not record switch -E
(Scan_Make_Switches): Recognize new switch -aP

From-SVN: r125470

17 years agostylesw.ads, [...] (Set_GNAT_Style_Check): New procedure
Robert Dewar [Wed, 6 Jun 2007 10:49:42 +0000 (12:49 +0200)]
stylesw.ads, [...] (Set_GNAT_Style_Check): New procedure

2007-04-20  Robert Dewar  <dewar@adacore.com>

* stylesw.ads, stylesw.adb (Set_GNAT_Style_Check): New procedure
(Set_Style_Check_Options): Recognize new -gnatyg style switch

* switch-c.adb (Scan_Front_End_Switches, case -gnatg): Set
Warn_On_Non_Local_Exception to False, to turn off warnings for
No_Exception_Propagation in ZFP runtime.
(Scan_Front_End_Switches): Fix handling of --RTS switch for non GCC
back-ends.
(Scan_Front_End_Switches): For 'g', call Set_GNAT_Style_Checks

From-SVN: r125469

17 years agoa-dirval-vms.adb, [...] (Windows): New Boolean function.
Vincent Celier [Wed, 6 Jun 2007 10:49:20 +0000 (12:49 +0200)]
a-dirval-vms.adb, [...] (Windows): New Boolean function.

2007-04-20  Vincent Celier  <celier@adacore.com>

* a-dirval-vms.adb, a-dirval.ads, a-dirval.adb (Windows): New Boolean
function.

* a-dirval-mingw.adb (Is_Valid_Path_Name): Forbid a path with a drive
letter if it is not followed by a '/' or a '\'.
(Windows): New Boolean function

* a-direct.ads, a-direct.adb: Remove unnecessary and misplaced pragma
Ada 2005.
(Containing_Directory): On Windows, keep at least one '/' or '\' after a
drive letter.
(Containing_Directory): Raise Use_Error when the directory is a root
directory.
(Extension): When returning the result, use a conversion to Result_Type,
not a qualification.

From-SVN: r125468

17 years agos-stoele.ads, [...]: Move inline_always subprograms earlier than their first call.
Eric Botcazou [Wed, 6 Jun 2007 10:49:08 +0000 (12:49 +0200)]
s-stoele.ads, [...]: Move inline_always subprograms earlier than their first call.

2007-04-20  Eric Botcazou  <ebotcazou@adacore.com>

* s-stoele.ads, s-stoele.adb: Move inline_always subprograms earlier
than their first call.
Add type Dummy_Communication_Block used in the generation of the pre-
defined dispatching primitive _disp_asynchronous_select.
(Storage_Element): Put Pragma Universal_Aliasing on it.

From-SVN: r125467

17 years agog-soccon-darwin.ads, [...]: Add new constant Thread_Blocking_IO...
Thomas Quinot [Wed, 6 Jun 2007 10:48:51 +0000 (12:48 +0200)]
g-soccon-darwin.ads, [...]: Add new constant Thread_Blocking_IO...

2007-04-20  Thomas Quinot  <quinot@adacore.com>

* g-soccon-darwin.ads, gen-soccon.c: Add new constant
Thread_Blocking_IO, always True by default, set False on a per-runtime
basis.
Add Windows-specific constants
Add new constant Need_Netdb_Buffer.
Add new macros to indicate whether getXXXbyYYY is thread safe and, if
not, whether to use getXXXbyYYY_r.

* gsocket.h: Add new constant Need_Netdb_Buffer.
Add new macros to indicate whether getXXXbyYYY is thread safe and, if
not, whether to use getXXXbyYYY_r.

From-SVN: r125466

17 years agos-stausa.ads, [...] (Initialize_Analyzer): Added parameter "Overflow_Guard".
Quentin Ochem [Wed, 6 Jun 2007 10:48:27 +0000 (12:48 +0200)]
s-stausa.ads, [...] (Initialize_Analyzer): Added parameter "Overflow_Guard".

2007-04-20  Quentin Ochem  <ochem@adacore.com>

* s-stausa.ads, s-stausa.adb (Initialize_Analyzer): Added parameter
"Overflow_Guard".
(Stack_Analyzer): Added field "Overflow_Guard"
(Task_Result): Added field "Overflow_Guard".
(Index_Str): New constant.
(Task_Name_Str): New constant.
(Actual_Size_Str): New constant.
(Pattern_Array_Element_Size): New constant.
(Get_Usage_Range): New subprogram.
(Output_Result): Added parameter Max_Size_Len and Max_Actual_Use_Len.
Now align the output.
Added comments.
(Initialize): Added value for Overflow_Guard.
(Fill_Stack): Use constant Pattern_Array_Elem_Size when relevant.
Update the value of the overflow guard according to the actual
beginning of the pattern array.
(Initialize_Analyzer): Added parameter Overflow_Guard.
Take this parameter into accound when computing the max size.
(Compute_Result): Use constant Pattern_Array_Elem_Size when relevant.
(Report_Result): Removed extra useless procedure.
Updated call to Output_Result.
Moved full computation of the Task_Result here.

From-SVN: r125465

17 years agos-secsta.adb (Chunk): Ensure this object has a static size known at compile time...
Arnaud Charlet [Wed, 6 Jun 2007 10:48:07 +0000 (12:48 +0200)]
s-secsta.adb (Chunk): Ensure this object has a static size known at compile time...

2007-04-20  Arnaud Charlet  <charlet@adacore.com>

* s-secsta.adb (Chunk): Ensure this object has a static size known at
compile time, to avoid dynamic memory allocation
(Elaboration code): Only use dynamic memory allocation when needed.

From-SVN: r125464

17 years agosprint.ads, sprint.adb (Sprint_Node_Actual): Output aggregate for exceptions.
Ed Schonberg [Wed, 6 Jun 2007 10:47:54 +0000 (12:47 +0200)]
sprint.ads, sprint.adb (Sprint_Node_Actual): Output aggregate for exceptions.

2007-04-20  Ed Schonberg  <schonberg@adacore.com>
    Robert Dewar  <dewar@adacore.com>

* sprint.ads, sprint.adb (Sprint_Node_Actual): Output aggregate for
exceptions.
(Write_Itype): Handle case of string literal subtype, which
comes up in this context.
(Update_Itype): when debugging expanded code, update sloc of itypes
associated with defining_identifiers and ranges, for gdb use.
(Sprint_Node_Actual): Add static keyword to object or exception
declaration output if Is_Statically_Allocated is True.
(Sprint_End_Label): Set entity of end marker for a subprogram, package,
or task body, so that the tree carries the proper Sloc information for
debugging use.
(Write_Indent): In Dump_Source_Text mode, ignore implicit label nodes

From-SVN: r125463

17 years agosinput-l.ads, [...]: implement a new pragma No_Body
Robert Dewar [Wed, 6 Jun 2007 10:47:30 +0000 (12:47 +0200)]
sinput-l.ads, [...]: implement a new pragma No_Body

2007-04-20  Robert Dewar  <dewar@adacore.com>

* sinput-l.ads, sinput-l.adb: implement a new pragma No_Body

From-SVN: r125462

17 years agosem_smem.adb (Check_Shared_Var): Check explicitly for as task object, to prevent...
Ed Schonberg [Wed, 6 Jun 2007 10:47:17 +0000 (12:47 +0200)]
sem_smem.adb (Check_Shared_Var): Check explicitly for as task object, to prevent subsequent expansion.

2007-04-20  Ed Schonberg  <schonberg@adacore.com>

* sem_smem.adb (Check_Shared_Var): Check explicitly for as task object,
to prevent subsequent expansion.

From-SVN: r125461

17 years agosem_eval.adb (Eval_Relational_Op): nothing to do if an operand is an illegal aggregat...
Robert Dewar [Wed, 6 Jun 2007 10:47:02 +0000 (12:47 +0200)]
sem_eval.adb (Eval_Relational_Op): nothing to do if an operand is an illegal aggregate and the type is still...

2007-04-20  Robert Dewar  <dewar@adacore.com>

* sem_eval.adb (Eval_Relational_Op): nothing to do if an operand is an
illegal aggregate and the type is still Any_Composite.
(Subtypes_Statically_Match): Fix problem of empty discriminant list

From-SVN: r125460

17 years agos-finroo.ads, [...] (Read, Write): Use null procedure declarations instead of an...
Thomas Quinot [Wed, 6 Jun 2007 10:46:39 +0000 (12:46 +0200)]
s-finroo.ads, [...] (Read, Write): Use null procedure declarations instead of an explicit null body, for conciseness.

2007-04-20  Thomas Quinot  <quinot@adacore.com>

* s-finroo.ads, s-finroo.adb (Read, Write): Use null procedure
declarations instead of an explicit null body, for conciseness.

From-SVN: r125459

17 years agos-taprob.adb (Unlock): Change the ceiling priority of the underlying lock, if needed.
Jose Ruiz [Wed, 6 Jun 2007 10:46:22 +0000 (12:46 +0200)]
s-taprob.adb (Unlock): Change the ceiling priority of the underlying lock, if needed.

2007-04-20  Jose Ruiz  <ruiz@adacore.com>
    Arnaud Charlet  <charlet@adacore.com>

* s-taprob.adb (Unlock): Change the ceiling priority of the underlying
lock, if needed.

* s-taprop.ads (Set_Ceiling): Add this procedure to change the ceiling
priority associated to a lock.

* s-tpoben.adb ([Vulnerable_]Complete_Task, Lock_Entries): Relax
assertion to take into account case of no abort restriction.
(Initialize_Protection_Entries): Add initialization for the field
New_Ceiling associated to the protected object.
(Unlock_Entries): Change the ceiling priority of the underlying lock, if
needed.

* s-solita.adb (Get_Current_Excep): Moved back to s-tasini/s-tarest,
since this function needs to be set consistently with Update_Exception.

* s-tarest.adb (Get_Current_Excep): Moved back to s-tasini/s-tarest,
since this function needs to be set consistently with Update_Exception.

* s-taskin.ads: Update comments on
Interrupt_Server_Blocked_On_Event_Flag.
(Unbind_Handler): Fix handling of server_task wakeup
(Server_Task): Set self's state so that Unbind_Handler can take
appropriate actions.
(Common_ATCB): Now use a constant from System.Parameters to determine
the max size of the Task_Image field.

* s-tassta.adb (Task_Wrapper): Now pass the overflow guard to the
Initialize_Analyzer function.
([Vulnerable_]Complete_Task, Lock_Entries): Relax assertion to
take into account case of no abort restriction.
([Vulnerable_]Complete_Master): Modify assertion.

* s-tataat.adb (Finalize): Use the nestable versions of
Defer/Undefer_Abort.

* s-tpobop.adb (Protected_Entry_Call): Relax assertion.

* s-tpobop.ads: Update comments.

* s-tposen.adb (Protected_Single_Entry_Call): Call Lock_Entry instead
of locking the object manually, to avoid inconsistencies between
Lock/Unlock_Entry assertions.

* s-interr.ads, s-interr.adb (Server_Task): Fix race condition when
terminating
application and System.Parameters.No_Abort is True.
Update comments on Interrupt_Server_Blocked_On_Event_Flag.
(Unbind_Handler): Fix handling of server_task wakeup
(Server_Task): Set self's state so that Unbind_Handler can take
appropriate actions.

From-SVN: r125458

17 years ago2007-04-20 Thomas Quinot <quinot@adacore.com>
Thomas Quinot [Wed, 6 Jun 2007 10:46:09 +0000 (12:46 +0200)]
2007-04-20  Thomas Quinot  <quinot@adacore.com>
    Olivier Hainque  <hainque@adacore.com>

* a-except-2005.ads, a-except-2005.adb
(Raise_From_Controlled_Operation): New procedure in
(private part of) Ada.Exceptions (standard runtime version). Used to
provide informational exception message when Program_Error is raised as
a result of an Adjust or Finalize operation propagating an exception.
(Rmsg_28): Fix description for E.4(18) check.
(Raise_Current_Excep): Call Debug_Raise_Exception just before
propagation starts, to let debuggers know about the event in a reliable
fashion.
Take the address of E and dereference to make sure it is homed on stack
and prevent the stores from being deleted, necessary for proper
debugger behavior on "break exception" hits.
(Local_Raise): Moved to System.Exceptions

* s-finimp.adb (Raise_From_Finalize): Code to construct an appropriate
exception message from the current occurrence and raise Program_Error
has been moved to Ada.Exceptions.Raise_From_Controlled_Operation.

From-SVN: r125457

17 years agosocket.c (__gnat_close_signalling_fd): New function.
Thomas Quinot [Wed, 6 Jun 2007 10:45:42 +0000 (12:45 +0200)]
socket.c (__gnat_close_signalling_fd): New function.

2007-04-20  Thomas Quinot  <quinot@adacore.com>

* socket.c (__gnat_close_signalling_fd): New function.
(__gnat_safe_gethostbyaddr, __gnat_safe_gethostbyname,
__gnat_safe_getservbyname, __gnat_safe_getservbyport):
New supporting functions for task safe Netdb operations.

From-SVN: r125456

17 years agoraise-gcc.c (__gnat_eh_personality): Tweak the signature and add special code on...
Olivier Hainque [Wed, 6 Jun 2007 10:45:25 +0000 (12:45 +0200)]
raise-gcc.c (__gnat_eh_personality): Tweak the signature and add special code on ia64-vms to handle major...

2007-04-20  Olivier Hainque  <hainque@adacore.com>

* raise-gcc.c (__gnat_eh_personality): Tweak the signature and add
special code on ia64-vms to handle major incompatibilities between the
GCC unwinding ABI and the VMS Condition Handling Facility, both calling
this routine with a very different set of arguments and expectations on
the return value.

From-SVN: r125455

17 years agosem_elab.adb (Check_A_Call): Specialize elaboration warnings on elaboration model
Robert Dewar [Wed, 6 Jun 2007 10:45:10 +0000 (12:45 +0200)]
sem_elab.adb (Check_A_Call): Specialize elaboration warnings on elaboration model

2007-04-20  Robert Dewar  <dewar@adacore.com>

* sem_elab.adb (Check_A_Call): Specialize elaboration warnings on
elaboration model
(Check_A_Call): Add check for entry call which was causing blowup

From-SVN: r125454

17 years agosem_util.ads, [...] (May_Be_Lvalue): A prefix of an attribute reference acts as an...
Hristian Kirtchev [Wed, 6 Jun 2007 10:44:43 +0000 (12:44 +0200)]
sem_util.ads, [...] (May_Be_Lvalue): A prefix of an attribute reference acts as an lvalue when...

2007-04-20  Hristian Kirtchev  <kirtchev@adacore.com>
    Gary Dismukes  <dismukes@adacore.com>
    Robert Dewar  <dewar@adacore.com>
    Javier Miranda  <miranda@adacore.com>

* sem_util.ads, sem_util.adb (May_Be_Lvalue): A prefix of an attribute
reference acts as an lvalue when the attribute name modifies the prefix
(Is_Coextension_Root): New routine.
(Mark_Static_Coextensions): New routine.
(Type_Access_Level): Revise code for checking the level of the
anonymous access type of a return object.
(Safe_To_Capture_Value): Not safe to capture if Address_Taken
(Matches_Prefixed_View_Profile): Remove the no longer necessary
retrieval of the corresponding controlling record type.
(Find_Overridden_Synchronized_Primitive): Code cleanup. Add handling of
concurrent types declared within a generic as well as class wide types.
Emit a mode incompatibility error whenever a protected entry or routine
override an interface routine whose first parameter is not of mode
"out", "in out" or access to variable.
(Overrides_Synchronized_Primitive): Rename to
Find_Overridden_Synchronized_Primitive.
(Collect_Interface_Components): New subprogram that collects all the
components of a tagged record containing tags of secondary dispatch
tables.
(Add_Global_Declaration): New procedure
(Abstract_Interface_List): Handle properly the case of a subtype of a
private extension.
(Type_Access_Level): In the case of a type whose parent scope is a
return statement, call Type_Access_Level recursively on the enclosing
function's result type to determine the level of the return object's
type.
(Build_Elaboration_Entity): Build name of elaboration entity from the
scope chain of the entity, rather than the unit name of the file name.
(Check_Nested_Access): New procedure.
(Has_Up_Level_Access, Set_Has_Up_Level_Access): New procedures.
(Find_Direct_Name, Note_Possible_Modification): Use Check_Nested_Access.
(Get_Renamed_Entity): Utility routine for performing common operation
of chasing the Renamed_Entity field of an entity.

From-SVN: r125453

17 years agosem_ch7.adb (Check_Anonymous_Access_Types): Fix error for null body
Robert Dewar [Wed, 6 Jun 2007 10:44:24 +0000 (12:44 +0200)]
sem_ch7.adb (Check_Anonymous_Access_Types): Fix error for null body

2007-04-20  Robert Dewar  <dewar@adacore.com>
    Javier Miranda  <miranda@adacore.com>

* sem_ch7.adb (Check_Anonymous_Access_Types): Fix error for null body
(Derive_Inherited_Private_Subprogram): Code cleanup. In case of explicit
overriding of an inherited private subprogram now there is no need to
inherit its dispatching slot and reduce the size of the dispatch table.
Set_All_DT_Position now ensures that the same slot is now assigned to
both entities. This is required to statically build the dispatch table.
(Declare_Inherited_Private_Subprograms): Rewriten to avoid the need
of calling Set_All_DT_Position to re-evaluate the position of the
entries in the dispatch table. Such reevaluation is not desired if
the tagged type is already frozen.

From-SVN: r125452

17 years agosem_res.ads, [...] (Process_Allocator): Do not propagate the chain of coextensions...
Hristian Kirtchev [Wed, 6 Jun 2007 10:43:57 +0000 (12:43 +0200)]
sem_res.ads, [...] (Process_Allocator): Do not propagate the chain of coextensions when...

2007-04-20  Hristian Kirtchev  <kirtchev@adacore.com>
    Ed Schonberg  <schonberg@adacore.com>
    Robert Dewar  <dewar@adacore.com>
    Javier Miranda  <miranda@adacore.com>

* sem_res.ads, sem_res.adb (Process_Allocator): Do not propagate the
chain of coextensions when an allocator serves as the root of such a
chain.
(Propagate_Coextensions): Remove the test for the root being an
allocator.
(Resolve_Allocator): Add condition to ensure that all future decoration
occurs on an allocator node. Add processing and cleanup for static
coextensions.
(Valid_Conversion): If the operand type is the limited view of a
class-wide type, use the non-limited view is available to determine
legality of operation.
(Ambiguous_Character): move to spec, for use elsewhere.
(Ambiguous_Character): Handle Wide_Wide_Character in Ada 2005 mode
(Resolve_Range): Diagnose properly an ambiguous range whose bounds are
character literals.
(Resolve_Arithmetic_Op): Call Activate_Division_Check instead of setting
Do_Division_Check flag explicitly.
(Resolve_Actuals): If the actual is of a synchronized type, and the
formal is of the corresponding record type, this is a call to a
primitive operation of the type, that is declared outside of the type;
the actual must be unchecked-converted to the type of the actual
(Resolve_Call): Kill all current values for any subprogram call if
flag Suppress_Value_Tracking_On_Call is set.
(Resolve_Type_Conversion): Generate error message the the operand
or target of interface conversions come from a limited view.
(Check_Infinite_Recursion): Ignore generated calls
(Check_Allocator_Discrim_Accessibility): New procedure for checking
that an expression that constrains an access discriminant in an
allocator does not denote an object with a deeper level than the
allocator's access type.
(Resolve_Allocator): In the case of an allocator initialized by an
aggregate of a discriminated type, check that associations for any
access discriminants satisfy accessibility requirements by calling
Check_Allocator_Discrim_Accessibility.
(Resolve_Equality_Op): Handle comparisons of anonymous access to
subprogram types in the same fashion as other anonymous access types.
(Resolve_Concatenation_Arg): Remove initial character '\' in an error
message that is not a continuation message.
(Resolve_Type_Conversion): Add missing support for conversion to
interface type.
(Resolve_Actuals): Introduce a transient scope around the call if an
actual is a call to a function returning a limited type, because the
resulting value must be finalized after the call.
(Resolve_Actuals): If the call was given in prefix notations, check
whether an implicit 'Access reference or implicit dereference must be
added to make the actual conform to the controlling formal.

From-SVN: r125451

17 years ago2007-04-20 Robert Dewar <dewar@adacore.com>
Robert Dewar [Wed, 6 Jun 2007 10:43:37 +0000 (12:43 +0200)]
2007-04-20  Robert Dewar  <dewar@adacore.com>
    Ed Schonberg  <schonberg@adacore.com>

* sem_ch5.adb
(Find_Var): Do not consider function call in test for infinite loop
warning if warnings set off for function entity.
(One_Bound): Do not create a temporary for a loop bound if it is a
character literal.
(Analyze_Assignment): Traverse the right hand side of an assignment and
mark all allocators as static coextensions.
(Analyze_Assignment): Exempt assignments involving a dispatching call
to a function with a controlling access result from the check requiring
the target to be class-wide.

From-SVN: r125450

17 years agosem_ch13.adb (Analyze_Attribute_Definition_Clause, [...]): Check for restriction...
Robert Dewar [Wed, 6 Jun 2007 10:43:09 +0000 (12:43 +0200)]
sem_ch13.adb (Analyze_Attribute_Definition_Clause, [...]): Check for restriction No_Implementation_Attributes if in Ada 95 mode.

2007-04-20  Robert Dewar  <dewar@adacore.com>
    Arnaud Charlet  <charlet@adacore.com>

* sem_ch13.adb (Analyze_Attribute_Definition_Clause, case Stream_Size):
Check for restriction No_Implementation_Attributes if in Ada 95 mode.
(Storage_Pool): Do not crash when RE_Stack_Bounded_Pool is not available
(Analyze_Attribute_Definition_Clause [External_Tag]): Generate error
message when using a VM, since this attribute is not supported.
(Analyze_Record_Representation_Clause): Give unrepped component warnings

* usage.adb: Add new warning for renaming of function return objects
Indicate that -gnatwp and -gnatwP concern front-end inlining
Add line for -gnatyg
Add usage information for -gnatw.c/C

From-SVN: r125449

17 years agosem_ch11.adb (Analyze_Exception_Handlers): Add barrier to avoid the use of entity...
Javier Miranda [Wed, 6 Jun 2007 10:42:51 +0000 (12:42 +0200)]
sem_ch11.adb (Analyze_Exception_Handlers): Add barrier to avoid the use of entity Exception_Occurrence if...

2007-04-20  Javier Miranda  <miranda@adacore.com>
    Hristian Kirtchev  <kirtchev@adacore.com>
    Gary Dismukes  <dismukes@adacore.com>

* sem_ch11.adb (Analyze_Exception_Handlers): Add barrier to avoid the
use of entity Exception_Occurrence if it is not available in the
target run-time.

* sem_ch9.adb (Analyze_Protected_Type, Analyze_Task_Type): When
concurrent types are declared within an Ada 2005 generic, build their
corresponding record types since they are needed for overriding-related
semantic checks.
(Analyze_Protected_Type): Rearrange and simplify code for testing that a
protected type does not implement a task interface or a nonlimited
interface.
(Analyze_Task_Type): Rearrange and simplify code for testing that a task
type does not implement a protected interface or a nonlimited interface.
(Single_Task_Declaration, Single_Protected_Declaration): use original
entity for variable declaration, to ensure that debugging information
is correcty generated.
(Analyze_Protected_Type, Analyze_Task_Type): Do not call expander
routines if the expander is not active.
(Analyze_Task_Body): Mark all handlers to stop optimization of local
raise, since special things happen for task exception handlers.

* sem_disp.adb (Check_Controlling_Formals): Add type retrieval for
concurrent types declared within a generic.
(Check_Dispatching_Operation): Do not emit warning about late interface
operations in the context of an instance.
(Check_Dispatching_Call): Remove restriction against calling a
dispatching operation with a limited controlling result.
(Check_Dispatching_Operation): Replace calls to Fill_DT_Entry and
Register_Interface_DT_Entry by calls to Register_Primitive.
(Check_Dispatching_Formals): Handle properly a function with a
controlling access result.

From-SVN: r125448

17 years agosem_ch10.ads, [...] (Analyze_Compilation_Unit): Disable check on obsolescent withed...
Javier Miranda [Wed, 6 Jun 2007 10:42:36 +0000 (12:42 +0200)]
sem_ch10.ads, [...] (Analyze_Compilation_Unit): Disable check on obsolescent withed unit in case of limited-withed units.

2007-04-20  Javier Miranda  <miranda@adacore.com>
    Ed Schonberg  <schonberg@adacore.com>
    Robert Dewar  <dewar@adacore.com>

* sem_ch10.ads, sem_ch10.adb (Analyze_Compilation_Unit): Disable check
on obsolescent withed unit in case of limited-withed units.
(Analyze_Compilation_Unit): Add guard to code that removed an
instantiation from visibility, to prevent compiler aborts when
instantiation is abandoned early on.
(Install_Limited_Withed_Unit): Recognize a limited-with clause on the
current unit being analyzed, and Distinguish local incomplete types
from limited views of types declared elsewhere.
(Build_Limited_Views.Decorate_Tagged_Type): Add documentation
to state that the class-wide entity is shared by the limited-view
and the full-view.
(Analyze_With_Clause): Improve placement of flag for case of
unimplemented unit.
(Analyze_With_Clause): Recognize use of GNAT.Exception_Traces in a
manner similar to GNAT.Current_Exception. This is a violation of
restriction (No_Exception_Propagation), and also inhibits the
optimization of local raise to goto.
(Analyze_With_Clause): Check for Most_Recent_Exception being with'ed,
and if so set Most_Recent_Exception_Used flag in Opt, and also check
for violation of restriction No_Exception_Propagation.

From-SVN: r125447

17 years agosem.ads, sem.adb (Semantics): Save and restore Global_Discard_Names Remove no longer...
Robert Dewar [Wed, 6 Jun 2007 10:42:10 +0000 (12:42 +0200)]
sem.ads, sem.adb (Semantics): Save and restore Global_Discard_Names Remove no longer used nodes.

2007-04-20  Robert Dewar  <dewar@adacore.com>

* sem.ads, sem.adb (Semantics): Save and restore Global_Discard_Names
Remove no longer used nodes.

From-SVN: r125446

17 years agoscng.adb: (Check_End_Of_Line): Deal with very long lines
Robert Dewar [Wed, 6 Jun 2007 10:41:57 +0000 (12:41 +0200)]
scng.adb: (Check_End_Of_Line): Deal with very long lines

2007-04-20  Robert Dewar  <dewar@adacore.com>

* scng.adb: (Check_End_Of_Line): Deal with very long lines

From-SVN: r125445

17 years agos-bitops.adb: Get rid of System.Pure_Exceptions.
Arnaud Charlet [Wed, 6 Jun 2007 10:41:35 +0000 (12:41 +0200)]
s-bitops.adb: Get rid of System.Pure_Exceptions.

2007-04-20  Arnaud Charlet  <charlet@adacore.com>

* s-bitops.adb: Get rid of System.Pure_Exceptions.
Replace UC by Ada.UC

From-SVN: r125444

17 years agorestrict.ads, [...] (No_Exception_Handlers_Set): Only return true if configurable...
Arnaud Charlet [Wed, 6 Jun 2007 10:41:12 +0000 (12:41 +0200)]
restrict.ads, [...] (No_Exception_Handlers_Set): Only return true if configurable run-time or No_Run_Time is set.

2007-04-20  Arnaud Charlet  <charlet@adacore.com>

* restrict.ads, restrict.adb (No_Exception_Handlers_Set): Only return
true if configurable run-time or No_Run_Time is set.
(Set_Restriction): Avoid setting restriction No_Elaboration_Code when
processing an unit which is not the one being compiled.

From-SVN: r125443

17 years agoprj.adb (Project_Empty): Gives default value for new component Libgnarl_Needed
Vincent Celier [Wed, 6 Jun 2007 10:40:57 +0000 (12:40 +0200)]
prj.adb (Project_Empty): Gives default value for new component Libgnarl_Needed

2007-04-20  Vincent Celier  <celier@adacore.com>

* prj.adb (Project_Empty): Gives default value for new component
Libgnarl_Needed

* prj-attr.ads: Minor reformatting

* prj-env.ads, prj-env.adb (For_All_Object_Dirs): Register object
directory using the untouched casing.
(For_All_Source_Dirs): Idem.

* prj-ext.ads, prj-ext.adb (Search_Directories): New table to record
directories specified with switches -aP.
(Add_Search_Project_Directory): New procedure
(Initialize_Project_Path): Put the directories in table
Search_Directories in the project search path.
(Initialize_Project_Path): For VMS, transform into canonical form the
project path.

From-SVN: r125442

17 years agoprep.ads, prep.adb (Expression): New Boolean parameter Complemented, defaulted to...
Vincent Celier [Wed, 6 Jun 2007 10:40:36 +0000 (12:40 +0200)]
prep.ads, prep.adb (Expression): New Boolean parameter Complemented, defaulted to False.

2007-04-20  Vincent Celier  <celier@adacore.com>

* prep.ads, prep.adb (Expression): New Boolean parameter Complemented,
defaulted to False.
In the "not" case, recursive call with Complemented set to True.
Do not allow "or" or "and" operators when Complemented is True.

From-SVN: r125441

17 years agopar-ch4.adb: (P_Name): Recover from literal used as name
Robert Dewar [Wed, 6 Jun 2007 10:40:24 +0000 (12:40 +0200)]
par-ch4.adb: (P_Name): Recover from literal used as name

2007-04-20  Robert Dewar  <dewar@adacore.com>

* par-ch4.adb: (P_Name): Recover from literal used as name

From-SVN: r125440

17 years agopar-ch12.adb (P_Generic_Associations): The source position of an Others association...
Ed Schonberg [Wed, 6 Jun 2007 10:40:12 +0000 (12:40 +0200)]
par-ch12.adb (P_Generic_Associations): The source position of an Others association is that of the others keyword...

2007-04-20  Ed Schonberg  <schonberg@adacore.com>
    Robert Dewar  <dewar@adacore.com>

* par-ch12.adb (P_Generic_Associations): The source position of an
Others association is that of the others keyword, not that of the token
that follows the box.
(P_Formal_Type_Definition): Handle formal access types that carry a
not null indicator.

* par-ch3.adb (P_Known_Discriminant_Part_Opt, P_Component_Items): If
multiple identifier are present, save Scan_State before scanning the
colon, to ensure that separate trees are constructed for each
declaration.
(P_Identifier_Declarations): For object declaration, set new flag
Has_Init_Expression if initialization expression present.
(P_Null_Exclusion): Properly diagnose NOT NULL coming before NULL
Improve NOT NULL error messages

From-SVN: r125439

17 years agosem_aggr.adb (Resolve_Record_Aggregate): Ignore internal components of the type that...
Ed Schonberg [Wed, 6 Jun 2007 10:39:47 +0000 (12:39 +0200)]
sem_aggr.adb (Resolve_Record_Aggregate): Ignore internal components of the type that specify the position of interface...

2007-04-20  Ed Schonberg  <schonberg@adacore.com>

* sem_aggr.adb (Resolve_Record_Aggregate): Ignore internal components
of the type that specify the position of interface tags when the type
inherits discriminated array components from the parent type.
If a component is initialized with a box, check for the presence of a
default expression in its declaration before using its default
initialization procedure.
(Resolve_Record_Aggregate): If a component is box-initialized, and the
component type has a discriminants, create a partial aggregate for it
by copying the discriminants of the component subtype.
Reject attempt to initialize a discriminant with a box.
(Array_Aggr_Subtype): Indicate to the backend that the size of arrays
associated with dispatch tables is known at compile time.
(Get_Value): If an association in a record aggregate has a box
association, and the corresponding record component has a default
expression, always copy the default expression, even when the
association has a single choice, in order to create a proper
association for the expanded aggregate.

From-SVN: r125438

17 years agosem_ch3.adb (Process_Full_View): Propagate the CPP_Class attribute to the full type...
Javier Miranda [Wed, 6 Jun 2007 10:39:14 +0000 (12:39 +0200)]
sem_ch3.adb (Process_Full_View): Propagate the CPP_Class attribute to the full type declaration.

2007-04-20  Javier Miranda  <miranda@adacore.com>
    Hristian Kirtchev  <kirtchev@adacore.com>
    Ed Schonberg  <schonberg@adacore.com>

* sem_ch3.adb (Process_Full_View): Propagate the CPP_Class attribute to
the full type declaration.
(Analyze_Component_Declaration): Add local variable E to capture the
initialization expression of the declaration. Replace the occurences of
Expression (N) with E.
(OK_For_Limited_Init_In_05): Allow initialization of class-wide
limited interface object with a function call.
(Array_Type_Declaration): If the declaration lacks subtype marks for
indices, create a simple index list to prevent cascaded errors.
(Is_Null_Extension): Ignore internal components created for secondary
tags when checking whether a record extension is a null extension.
(Check_Abstract_Interfaces): Add missing support for interface subtypes
and generic formals.
(Derived_Type_Declaration): Add missing support for interface subtypes
and generic formals.
(Analyze_Object_Declaration): If an initialization expression is
present, traverse its subtree and mark all allocators as static
coextensions.
(Add_Interface_Tag_Component): When looking for components that may be
secondary tags, ignore pragmas that can appear within a record
declaration.
(Check_Abstract_Overriding): an inherited function that dispatches on
result does not need to be overriden if the controlling type is a null
extension.
(Mentions_T): Handle properly a 'class attribute in an anonymous access
component declaration, when the prefix is an expanded name.
(Inherit_Component): If the derivation is for a private extension,
inherited components remain visible and their ekind should not be set
to Void.
(Find_Type_Of_Object): In the case of an access definition, always set
Is_Local_Anonymous_Access. We were previously not marking the anonymous
access type of a return object as a local anonymous type.
(Make_Index): Use Ambiguous_Character to report ambiguity on a discrete
range with character literal bounds.
(Constrain_Array): Initialize the Packed_Array_Type field to Empty.
(Access_Subprogram_Declaration): Indicate that the type declaration
depends on an incomplete type only if the incomplete type is declared
in an open scope.
(Analyze_Subtype_Declaration): Handle properly subtypes of
synchronized types that are tagged, and that may appear as generic
actuals.
(Access_Subprogram_Declaration): An anonymous access to subprogram can
appear as an access discriminant in a private type declaration.
(Add_Interface_Tag_Components): Complete decoration of the component
containing the tag of a secondary dispatch table and the component
containing the offset to the base of the object (this latter component
is only generated when the parent type has discriminants --as documented
in this routine).
(Inherit_Components): Use the new decoration of the tag components to
improve the condition that avoids inheriting the components associated
with secondary tags of the parent.
(Build_Discriminanted_Subtype): Indicate to the backend that the
size of record types associated with dispatch tables is known at
compile time.
(Analyze_Subtype_Declaration): Propagate Is_Interface flag when needed.
(Analyze_Interface_Declaration): Change setting of Is_Limited_Interface
to include task, protected, and synchronized interfaces as limited
interfaces.
(Process_Discriminants): Remove the setting of
Is_Local_Anonymous_Access on the type of (anonymous) access
discriminants of nonlimited types.
(Analyze_Interface_Type_Declaration): Complete the decoration of the
class-wide entity it is is already present. This situation occurs if
the limited-view has been previously built.
(Enumeration_Type_Declaration): Initialize properly the Enum_Pos_To_Rep
field.
(Add_Interface_Tag_Components.Add_Tag): Set the value of the attribute
Related_Interface.

From-SVN: r125437

17 years agoosinte-c.ads, [...] (Set_Library_Info_Name): Fail if base name of specified object...
Vincent Celier [Wed, 6 Jun 2007 10:38:46 +0000 (12:38 +0200)]
osinte-c.ads, [...] (Set_Library_Info_Name): Fail if base name of specified object file is not equal to base name of source.

2007-04-20  Vincent Celier  <celier@adacore.com>

* osinte-c.ads, osint-c.adb (Set_Library_Info_Name): Fail if base name
of specified object file is not equal to base name of source.

From-SVN: r125436

17 years agomlib.ads, mlib.adb (Build_Library): Do not use hard-coded directory separator...
Vincent Celier [Wed, 6 Jun 2007 10:38:29 +0000 (12:38 +0200)]
mlib.ads, mlib.adb (Build_Library): Do not use hard-coded directory separator...

2007-04-20  Vincent Celier  <celier@adacore.com>

* mlib.ads, mlib.adb (Build_Library): Do not use hard-coded directory
separator, use instead the proper host directory separator.
(Copy_ALI_Files): Make sure that an already existing ALI file in the
ALI copy dir is writable, before doing the copy.

* mlib-utl.ads, mlib-utl.adb:
(Gcc): If length of command line is too long, put the list of object
files in a response file, if this is supported by the platform.
(Ar): If invocation of the archive builder is allowed to be done in
chunks and building it in one shot would go above an OS dependent
limit on the number of characters on the command line, build the archive
in chunks.

From-SVN: r125435

17 years agomkdir.c (__gnat_mkdir): Add support for UTF-8.
Pascal Obry [Wed, 6 Jun 2007 10:38:07 +0000 (12:38 +0200)]
mkdir.c (__gnat_mkdir): Add support for UTF-8.

2007-04-20  Pascal Obry  <obry@adacore.com>

* mkdir.c (__gnat_mkdir): Add support for UTF-8.

From-SVN: r125434

17 years agoMakefile.in (LIBGNAT_TARGET_PAIRS for VxWorks 6): For the RTP run time...
Jose Ruiz [Wed, 6 Jun 2007 10:37:53 +0000 (12:37 +0200)]
Makefile.in (LIBGNAT_TARGET_PAIRS for VxWorks 6): For the RTP run time...

2007-04-20  Jose Ruiz  <ruiz@adacore.com>
    Arnaud Charlet  <charlet@adacore.com>

* Makefile.in (LIBGNAT_TARGET_PAIRS for VxWorks 6): For the RTP run
time, use the default s-interr body that provides interrupt support
based on signals.
(LIBGNAT_TARGET_PAIRS for x86-linux): Use specialized versions of
a-exetim.ad{s,b}, a-extiti.ad{s,b}, a-rttiev.ad{s,b}, s-osinte.ad{s,b},
g-soccon.ads, and s-taprop.adb for the marte run time.
(EXTRA_GNATRTL_TASKING_OBJS for x86-linux): Execution time clocks and
timers are supported on marte.
(EH_MECHANISM for marte): Do not use ZCX.
(THREADSLIB for marte): Use -lmarte.
Add mlib-tgt-vms.o to the list of objects for gnatmake for VMS
Add mlib-tgt-specific.o to gnatmake objects
mlib-tgt-<platforms>.adb is now the body of MLib.Tgt.Specific, no
longer of MLib.Tgt.
(LIBGNAT_TARGET_PAIRS for vxworks): When building a run time for VxWorks
6, either kernel or rtp, use a specialized version of s-osinte.ads.

From-SVN: r125433

17 years agolib-writ.adb: Handle Convention_CIL in addition to Convention_Java, since both are...
Arnaud Charlet [Wed, 6 Jun 2007 10:37:41 +0000 (12:37 +0200)]
lib-writ.adb: Handle Convention_CIL in addition to Convention_Java, since both are separated.

2007-04-20  Arnaud Charlet  <charlet@adacore.com>
    Vincent Celier  <celier@adacore.com>

* lib-writ.adb: Handle Convention_CIL in addition to Convention_Java,
since both are separated.
Add support for imported CIL packages.
Add further special handling of "value_type" for CIL.
Add special handling of pragma Import for CIL.

* make.ads, make.adb: When switch -eS is used, direct all outputs to
standard output instead of standard error, except errors.
(Absolute_Path): Use untouched casing for the parent directory.
(Add_Library_Search_Dir): Use the untouched directory name.
(Add_Source_Search_Dir): Idem.
(Change_To_Object_Directory): Update output to use proper casing.
(Create_Binder_Mapping_File): Use the untouched filename to set
ALI_Name.
(Gnatmake): Use untouched library and executable directory names.
(Insert_Project_Sources): Use untouched filename for spec and body.
(Is_In_Object_Directory): Use untouched object directory.
(Mark_Directory): Idem.
(Collect_Arguments_And_Compile): Ensure that Full_Source_File always
contains the non-canonical filename in all cases.
(Change_To_Object_Directory): In verbose mode, display the name of the
object directory we're changing to.
(Compile_Sources): Make sure, when a project file is used, to compile
the body of the unit, when there is one, even when only the spec is
recorded in an ALI file.
(Gcc_Switches, Binder_Switches, Linker_Switches): Tables moved from the
spec to the body.
(Report_Compilation_Failed): New procedure
(Bind, Display_Commands, Compile_Sources, Initialize, Scan_Make_Arg):
procedures moved from the spec to the body.
(Extract_Failure): Removed, not used
Replace explicit raises of exception Bind_Failed and Link_Failed with
calls to Make_Failed with the proper message.
Replace explicit raises of exception Compilation_Failed with calls to
procedure Report_Compilation_Failed.
(Initialize): Create mapping files unconditionally when using project
files.

* sem_mech.adb: (Name_CIL, Name_CIL_Constructor, Convention_CIL,
Pragma_CIL_Constructor): New names.

* targparm.ads, targparm.adb
(Compiler_System_Version): Removed, no longer used.
(Get_Target_Parameters): Relax checks on system.ads validity. Add
handling of two new system flags: JVM and CLI.

From-SVN: r125432

17 years agosem_ch12.adb (Analyze_Associations): Diagnose use of an others association in an...
Ed Schonberg [Wed, 6 Jun 2007 10:37:16 +0000 (12:37 +0200)]
sem_ch12.adb (Analyze_Associations): Diagnose use of an others association in an instance.

2007-04-20  Ed Schonberg  <schonberg@adacore.com>
    Javier Miranda  <miranda@adacore.com>

* sem_ch12.adb (Analyze_Associations): Diagnose use of an others
association in an instance.
(Copy_Generic_Node): If the node is a string literal, no need to copy
its descendants.
(Is_Generic_Formal): For a formal subprogram, the declaration is the
grandparent of the entity.
(Analyze_Formal_Interface_Type): Transform into a full type declaration,
to simplify handling of formal interfaces that derive from other formal
interfaces.
(Instantiate_Subprogram_Body): The defining unit name of the body of
the instance should be a defining identifier.
(Install_Formal_Packages): make global to the package, for use in
instantiations of child units.
(Analyze_Package_Instantiation): Do not attempt to set information on an
enclosing master of an entry when expansion is disabled.
(Instantiate_Type): If the actual is a tagged synchronized type and the
generic ancestor is an interface, create a generic actual for the
corresponding record.
(Analyze_Formal_Derived_Interface_Type): Rewrite as a derived type
declaration, to ensure that the interface list is processed correctly.
(Inline_Instance_Body): If enclosing scope is an instance body, remove
its entities from visibiility as well.
(Pre_Analyze_Actuals): if the actual is an allocator with  constraints
given with a named association, analyze the expression only, not the
discriminant association itself.
(Reset_Entity): If the analysis of a selected component is transformed
into an expanded name in the prefix of a call with parameters, do not
transform the original node into an expanded name, to prevent visibility
errors in the case of nested generics.
(Check_Private_View): For an array type, check whether the index types
may need exchanging.

From-SVN: r125431

17 years agolayout.ads, layout.adb (Adjust_Esize_Alignment): Move spec to package spec from body
Robert Dewar [Wed, 6 Jun 2007 10:36:48 +0000 (12:36 +0200)]
layout.ads, layout.adb (Adjust_Esize_Alignment): Move spec to package spec from body

2007-04-20  Robert Dewar  <dewar@adacore.com>

* layout.ads, layout.adb (Adjust_Esize_Alignment): Move spec to package
spec from body
(Layout_Type): Fix recomputation of size from alignment.

From-SVN: r125430

17 years agoinitialize.c (__gnat_initialize for vxworks): Update documentation on the ZCX support...
Olivier Hainque [Wed, 6 Jun 2007 10:36:28 +0000 (12:36 +0200)]
initialize.c (__gnat_initialize for vxworks): Update documentation on the ZCX support...

2007-04-20  Olivier Hainque  <hainque@adacore.com>

* initialize.c (__gnat_initialize for vxworks):  Update documentation
on the ZCX support, using different sets of crtstuff objects than with
GCC 3.4.

From-SVN: r125429

17 years agoinit.c: Do not adjust IP of an imported VMS exception of ia64.
Tristan Gingold [Wed, 6 Jun 2007 10:36:17 +0000 (12:36 +0200)]
init.c: Do not adjust IP of an imported VMS exception of ia64.

2007-04-20  Tristan Gingold  <gingold@adacore.com>
    Olivier Hainque  <hainque@adacore.com>

* init.c: Do not adjust IP of an imported VMS exception of ia64.
LIB$STOP is called to raise an exception and the IP of the exception
is the instruction right after the call.
(__gnat_adjust_context_for_raise, AIX): Implement.
(__gnat_error_handler, AIX): Accept SIGINFO related arguments and call
 adjust_context_for_raise before Raise_From_Signal_Hanler.
(__gnat_install_handler, AIX): Add SA_SIGINFO to the sa_flags, to ensure
siginfo is passed to the handler, necessary to let the zcx propagation
engine unwind past it.

From-SVN: r125428

17 years agoa-clrefi.adb, [...]: New files
Vincent Celier [Wed, 6 Jun 2007 10:35:54 +0000 (12:35 +0200)]
a-clrefi.adb, [...]: New files

2007-04-20  Vincent Celier  <celier@adacore.com>
    Arnaud Charlet  <charlet@adacore.com>

* a-clrefi.adb, a-clrefi.ads: New files

* impunit.adb: Add s-os_lib in the list of user visible units.
(Non_Imp_File_Names_95): Add a-clrefi to this list
Remove obsolete run-time entries.
(Non_Imp_File_Names_05): Add Ada 2005 entries for:
 "a-exetim" -- Ada.Execution_Time
 "a-extiti" -- Ada.Execution_Time.Timers

* mlib-prj.ads, mlib-prj.adb
(Build_Library): Use untouched object dir and library dir. At the
same time makes sure that the checks are done using the canonical
form. Removes hard-coded directory separator and use the proper host
one instead.
(Process_Project): Do not look in object directory to check if libgnarl
is needed for a library, if there is no object directory.
(Build_Library): Scan the ALI files to decide if libgnarl is needed for
linking.
(Build_Library): When invoking gnatbind, use a response file if the
total size of the arguments is too large.

* Makefile.rtl: (g-sttsne): New object file.
Add entry for a-clrefi, s-utf_32, System.Exceptions

* Make-lang.in: Remove bogus dependency of s-memory.o on memtrack.o.
(GNAT_ADA_OBJS, GNATBIND_OBJS): Add s-except.o.
(GNATBIND_OBJS): Add new objects a-clrefi.o and a-comlin.o
Change g-string to s-string, g-os_lib to s-os_lib
Change all g-utf_32 references to s-utf_32

From-SVN: r125427

17 years agohostparm.ads (Normalized_CWD): Use the host directory separator instead of the hardco...
Pascal Obry [Wed, 6 Jun 2007 10:31:39 +0000 (12:31 +0200)]
hostparm.ads (Normalized_CWD): Use the host directory separator instead of the hardcoded forward slash which...

2007-04-20  Pascal Obry  <obry@adacore.com>

* hostparm.ads (Normalized_CWD): Use the host directory separator
instead of the hardcoded forward slash which is not the proper
character on Windows for example.
(Java_VM): Removed.

From-SVN: r125426

17 years agog-trasym.ads, [...]: Update list of supported targets Add note about symbolic traceback
Robert Dewar [Wed, 6 Jun 2007 10:31:28 +0000 (12:31 +0200)]
g-trasym.ads, [...]: Update list of supported targets Add note about symbolic traceback

2007-04-20  Robert Dewar  <dewar@adacore.com>

* g-trasym.ads, g-traceb.ads: Update list of supported targets
Add note about symbolic traceback

From-SVN: r125425

17 years agog-soccon.ads: Add new constant Thread_Blocking_IO...
Thomas Quinot [Wed, 6 Jun 2007 10:31:06 +0000 (12:31 +0200)]
g-soccon.ads: Add new constant Thread_Blocking_IO...

2007-04-20  Thomas Quinot  <quinot@adacore.com>

* g-soccon.ads: Add new constant Thread_Blocking_IO, always True by
default, set False on a per-runtime basis.
(Need_Netdb_Buffer): New constant.

* g-socket.ads, g-socket.adb: Import new package
GNAT.Sockets.Thin.Task_Safe_NetDB.
(Raise_Host_Error): Use Host_Error_Message from platform-specific thin
binding to obtain proper message.
(Close_Selector): Use GNAT.Sockets.Thin.Signalling_Fds.Close.
Replace various occurrences of Arry (Arry'First)'Address with the
equivalent Arry'Address (GNAT always follows implementation advice from
13.3(14)).
(Get_Host_By_Address, Get_Host_By_Name,
Get_Service_By_Name, Get_Service_By_Port): Do not use GNAT.Task_Lock;
instead, rely on platform-specific task safe netdb operations provided
by g-socthi.

* g-socthi.ads, g-socthi.adb (Initialize): Remove obsolete formal
parameter Process_Blocking_IO.
(Host_Error_Messages): Add stub body.
(GNAT.Sockets.Thin.Signalling_Fds): New procedure Close.
(Safe_Gethostbyname, Safe_Gethostbyaddr, Safe_Getservbyname,
Safe_Getservbyport): Move functions into new child package
Task_Safe_NetDB.
(Nonreentrant_Gethostbyname, Nonreentrant_Gethostbyaddr,
Nonreentrant_Getservbyname, Nonreentrant_Getservbyport): New routines.
(In_Addr): Add alignment clause.

From-SVN: r125424

17 years agog-regpat.adb (Quote): Fix improper quoting of '.'
Emmanuel Briot [Wed, 6 Jun 2007 10:30:52 +0000 (12:30 +0200)]
g-regpat.adb (Quote): Fix improper quoting of '.'

2007-04-20  Emmanuel Briot  <briot@adacore.com>

* g-regpat.adb (Quote): Fix improper quoting of '.'

From-SVN: r125423

17 years agog-pehage.adb (Produce): Open output files in Binary mode...
Thomas Quinot [Wed, 6 Jun 2007 10:30:40 +0000 (12:30 +0200)]
g-pehage.adb (Produce): Open output files in Binary mode...

2007-04-20  Thomas Quinot  <quinot@adacore.com>

* g-pehage.adb (Produce): Open output files in Binary mode, so that
they have UNIX line endings (LF only) even on Windows, and thus pass
all GNAT style checks.

From-SVN: r125422

17 years agog-os_lib.ads, [...] (Normalize_Pathname.Get_Directory): Correct obvious bug (return...
Vincent Celier [Wed, 6 Jun 2007 10:30:30 +0000 (12:30 +0200)]
g-os_lib.ads, [...] (Normalize_Pathname.Get_Directory): Correct obvious bug (return Dir; instead of return Directory;).

2007-04-20  Vincent Celier  <celier@adacore.com>

* g-os_lib.ads, g-os_lib.adb (Normalize_Pathname.Get_Directory):
Correct obvious bug (return Dir; instead of return Directory;).
(Normalize_Pathname): Use Reference_Dir'Length, not Reference_Dir'Last

From-SVN: r125421

17 years agognatsym.adb: Update Copyright notice
Vincent Celier [Wed, 6 Jun 2007 10:30:19 +0000 (12:30 +0200)]
gnatsym.adb: Update Copyright notice

2007-04-20  Vincent Celier  <celier@adacore.com>

* gnatsym.adb: Update Copyright notice
(Parse_Cmd_Line): Accept new switch -D
(Gnatsym): In Direct policy (switch -D) copy reference file to symbol
 file.

* prj.ads (Policy): New policy Direct
(Yes_No_Unknown): New enumeration type
(Project_Data): New component Libgnarl_Needed

* prj-nmsc.adb (Check_For_Source): When recording a source file make
use the untouched pathname casing.
(Get_Directories): Ensure that the Display_Exec_Directory is using the
proper casing on non case-sensitive platforms like Windows.
(Get_Unit): Accept file names x__... and x~... (where x = a, g, i or s)
on all platforms, as it is not possible to know which one is allowed
before processing the project files.
(Check_Stand_Alone_Library): Check that Library_Reference_Symbol_File is
specified when symbol policy is Direct. Check that when there is a
symbol file defined (either by default or with attribute
Library_Symbol_File) it is not the same as the reference symbol file.
(Check_Stand_Alone_Library): Recognize new symbol policy Direct.
(Look_For_Sources): Allow Locally_Removed_Files to be declare in non
extending projects.
(Record_Ada_Source): Record a source that has been locally removed in an
imported project.

* symbols.ads (Policy): New policy Direct

* symbols-vms.adb (Initialize): Take new policy Direct in case
statement

From-SVN: r125420

17 years agogmem.c: Add support for timestamps on memory operations.
Vasiliy Fofanov [Wed, 6 Jun 2007 10:30:04 +0000 (12:30 +0200)]
gmem.c: Add support for timestamps on memory operations.

2007-04-20  Vasiliy Fofanov  <fofanov@adacore.com>

* gmem.c: Add support for timestamps on memory operations.

* memtrack.adb, gnatmem.adb: Add support for timestamps on memory
operations (not used currently, just foundation for future
enhancements). Add possibility to perform full dump of gmem.out file.
(Print_Back_Traces): Declare accesses to root arrays constants since
they aren't modified.
(Print_Back_Traces): allocate root arrays on the heap rather than stack.

From-SVN: r125419

17 years agognatls.adb: Add 3 spaces before the default project directory when...
Vincent Celier [Wed, 6 Jun 2007 10:29:53 +0000 (12:29 +0200)]
gnatls.adb: Add 3 spaces before the default project directory when...

2007-04-20  Vincent Celier  <celier@adacore.com>

* gnatls.adb:
Add 3 spaces before the default project directory when displaying
the project search path.
Add new command line switch '-l' to display license information.

From-SVN: r125418

17 years agognatlink.adb (Gnatlink): Do not specify -static-libgcc when --LINK= has been specifie...
Vincent Celier [Wed, 6 Jun 2007 10:29:41 +0000 (12:29 +0200)]
gnatlink.adb (Gnatlink): Do not specify -static-libgcc when --LINK= has been specified Correct error...

2007-04-20  Vincent Celier  <celier@adacore.com>

* gnatlink.adb (Gnatlink): Do not specify -static-libgcc when --LINK=
has been specified
Correct error message when invocation of the linker fails
Add explicit size clause for the C imported variables
Object_List_File_Supported and Using_GNU_Linker to emphasize that
we expect char size.
Read target parameters earlier, since this is needed to set
Target_VM properly. Also do not use -static/shared-libgcc for non GCC
targets.

From-SVN: r125417

17 years agognatcmd.adb (GNATCmd): Accept switch -aP for commands that accept switch -P
Vincent Celier [Wed, 6 Jun 2007 10:29:31 +0000 (12:29 +0200)]
gnatcmd.adb (GNATCmd): Accept switch -aP for commands that accept switch -P

2007-04-20  Vincent Celier  <celier@adacore.com>

* gnatcmd.adb (GNATCmd): Accept switch -aP for commands that accept
switch -P
(ASIS_Main): New global variable
(Get_Closure): New procedure
(GNATCmd): Set ASIS_Main when -P and -U with a main is used for gnat
check, metric or pretty. Call Get_Closure in this case.
(Check_Files): For GNAT LIST, check all sources of all projects when
All_Projects is True.
(GNATCmd): Accept -U for GNAT LIST

From-SVN: r125416

17 years agog-debpoo.ads, [...] (Free_Physically.Free_Blocks): Use the absolute value of Header...
Vincent Celier [Wed, 6 Jun 2007 10:29:21 +0000 (12:29 +0200)]
g-debpoo.ads, [...] (Free_Physically.Free_Blocks): Use the absolute value of Header.Block_Size when...

2007-04-20  Vincent Celier  <celier@adacore.com>
    Emmanuel Briot  <briot@adacore.com>
    Olivier Hainque  <hainque@adacore.com>

* g-debpoo.ads, g-debpoo.adb (Free_Physically.Free_Blocks): Use the
absolute value of Header.Block_Size when displaying the freed physical
memory in traces.
(Allocate): Compute Storage_Address using Integer_Address, not
Storage_Offset, because the range of Storage_Offset may not be large
enough.
(Configure): New parameter Low_Level_Traces
(Allocate, Deallocation, Free_Physically): Added low-level traces
(Configure): new parameter Errors_To_Stdout.
(Output_File): new subprogram
(Deallocate, Dereference): Send error messages to the proper stream
(Print_Pool, Print_Info_Stdout): Make sure the output goes to stdout, as
documented. Previous code would send it to the current output file
defined in GNAT.IO, which might not be stdout
(Is_Valid): Adjust comment to mention that a positive reply means that
Header_Of may be used to retrieve the allocation header associated with
the subprogram Storage address argument. Return False early if this
address argument is misaligned.

From-SVN: r125415

17 years agog-comlin.ads, [...]: Add new warning for renaming of function return objects
Robert Dewar [Wed, 6 Jun 2007 10:29:05 +0000 (12:29 +0200)]
g-comlin.ads, [...]: Add new warning for renaming of function return objects

2007-04-20  Robert Dewar  <dewar@adacore.com>
    Ed Schonberg  <schonberg@adacore.com>

* g-comlin.ads, g-comlin.adb:
Add new warning for renaming of function return objects

* opt.adb (Tree_Write, Tree_Read): Use proper expressions for size
(Tree_Read): Use size of object instead of type'object_size, since the
latter is incorrect for packed array types.
(Tree_Write): Same fix

* opt.ads: Add new warning for renaming of function return objects
(Generating_Code): New boolean variable used to indicate that the
frontend as finished its work and has called the backend to process
the tree and generate the object file.
(GCC_Version): Is now private
(Static_Dispatch_Tables): New constant declaration.
(Overflow_Checks_Unsuppressed): New flag.
(Process_Suppress_Unsuppress): Set Overflow_Checks_Unsuppressed.
(List_Closure): New flag for gnatbind (-R)
Zero_Formatting: New flag for gnatbind (-Z)
(Special_Exception_Package_Used): New flag.
(Warn_On_Unrepped_Components): New flag.

* sem_ch8.adb (Check_Library_Unit_Renaming): Check that the renamed
unit is a compilation unit, rather than relying on its scope, so that
Standard can be renamed.
(Analyze_Object_Renaming): Add new warning for renaming of function
return objects.
Also reject attempt to rename function return object in Ada 83 mode.
(Attribute_Renaming): In case of tagged types, add the body of the
generated function to the freezing actions of the type.
(Find_Type): A protected type is visible right after the reserved word
"is" is encountered in its type declaration. Set the entity and type
rather than emitting an error message.
(New_Scope): Properly propagate Discard_Names to inner scopes
(Check_Nested_Access): New procedure.
(Has_Nested_Access, Set_Has_Nested_Access): New procedures.
(Find_Direct_Name, Note_Possible_Modification): Use Check_Nested_Access.

* sem_warn.ads, sem_warn.adb: Improvements to infinite loop warning
Add new warning for renaming of function return objects
(Check_References): Suppress warnings for objects whose type or
base type has Warnings suppressed.
(Set_Dot_Warning_Switch): Add processing for -gnatw.c/C
(Set_Warning_Switch): Include new -gnatwc in -gnatwa

From-SVN: r125414

17 years agog-catiio.ads, [...] (Image): Check for null picture string
Robert Dewar [Wed, 6 Jun 2007 10:28:45 +0000 (12:28 +0200)]
g-catiio.ads, [...] (Image): Check for null picture string

2007-04-20  Robert Dewar  <dewar@adacore.com>

* g-catiio.ads, g-catiio.adb (Image): Check for null picture string

From-SVN: r125413

17 years agog-hesorg.ads, [...]: Update documentation GNAT.Heap/Bubble_Sort_G is now pure
Robert Dewar [Wed, 6 Jun 2007 10:28:31 +0000 (12:28 +0200)]
g-hesorg.ads, [...]: Update documentation GNAT.Heap/Bubble_Sort_G is now pure

2007-04-20  Robert Dewar  <dewar@adacore.com>

* g-hesorg.ads, g-heasor.ads,
g-busorg.ads, g-bubsor.ads: Update documentation
GNAT.Heap/Bubble_Sort_G is now pure

From-SVN: r125412

17 years agofrontend.adb (Frontend): Return immediately if the main source could not be parsed...
Vincent Celier [Wed, 6 Jun 2007 10:28:20 +0000 (12:28 +0200)]
frontend.adb (Frontend): Return immediately if the main source could not be parsed...

2007-04-20  Vincent Celier  <celier@adacore.com>
    Robert Dewar  <dewar@adacore.com>

* frontend.adb (Frontend): Return immediately if the main source could
not be parsed, because of preprocessing errors.

* gnat1drv.adb (gnat1drv): Handle RE_Not_Available gracefully.
(Gnat1drv): Exit with errors if the main source could not be parsed,
because of preprocessing errors.
(Check_Rep_Info): New procedure

From-SVN: r125411

17 years agoexp_util.ads, [...] (Expand_Subtype_From_Expr): In Ada2005...
Ed Schonberg [Wed, 6 Jun 2007 10:28:07 +0000 (12:28 +0200)]
exp_util.ads, [...] (Expand_Subtype_From_Expr): In Ada2005...

2007-04-20  Ed Schonberg  <schonberg@adacore.com>

* exp_util.ads, exp_util.adb (Expand_Subtype_From_Expr): In Ada2005, an
object of a limited type can be initialized with a call to a function
that returns in place. If the limited type has unknown discriminants,
and the underlying type is a constrained composite type, build an actual
subtype from the function call, as is done for private types.
(Side_Effect_Free): An expression that is the renaming of an object or
whose prefix is the renaming of a object, is not side-effect free
because it may be assigned through the renaming and its value must be
captured in a temporary.
(Has_Controlled_Coextensions): New routine.
(Expand_Subtype_From_Expr): Do nothing if type is a limited interface,
as is done for other limited types.
(Non_Limited_Designated_Type): new predicate.
(Make_CW_Equivalent_Type): Modified to handle class-wide interface
objects.
Remove all handling of with_type clauses.

        * par-ch10.adb: Remove all handling of with_type clauses.

* lib-load.ads, lib-load.adb (Load_Main_Source): Do not get the
checksum if the main source could not be parsed.
(Loat_Unit): When processing a child unit, determine properly whether
the parent unit is a renaming when the parent is itself a child unit.
Remove handling of with_type clauses.

* sinfo.ads, sinfo.adb (Is_Static_Coextension): New function.
(Set_Is_Static_Coextension): New procedure.
(Has_Local_Raise): New function
(Set_Has_Local_Raise): New procedure
(Renaming_Exception): New field
(Has_Init_Expression): New flag
(Delay_Finalize_Attach): Remove because flag is obsolete.
(Set_Delay_Finalize_Attach): Remove because flag is obsolete.
Remove all handling of with_type clauses.
(Exception_Junk): Can now be set in N_Block_Statement

From-SVN: r125410

17 years agoexp_strm.adb (Make_Field_Attributes): Avoid _Parent components that are interface...
Robert Dewar [Wed, 6 Jun 2007 10:27:53 +0000 (12:27 +0200)]
exp_strm.adb (Make_Field_Attributes): Avoid _Parent components that are interface type.

2007-04-20  Robert Dewar  <dewar@adacore.com>

* exp_strm.adb (Make_Field_Attributes): Avoid _Parent components that
are interface type.
(Build_Elementary_Input_Call): For floating-point use right type in the
absence of strange size or stream size clauses.
(Build_Elementary_Write_Call): Same fix
(Has_Stream_Standard_Rep): Returns False if Stream_Size attribute
set to value that does not match base type size.

From-SVN: r125409

17 years agoexp_prag.adb (Expand_Pragma_Import_Or_Interface): Remove properly a default initializ...
Ed Schonberg [Wed, 6 Jun 2007 10:27:41 +0000 (12:27 +0200)]
exp_prag.adb (Expand_Pragma_Import_Or_Interface): Remove properly a default initialization on an imported object...

2007-04-20  Ed Schonberg  <schonberg@adacore.com>
    Arnaud Charlet  <charlet@adacore.com>
    Robert Dewar  <dewar@adacore.com>
    Gary Dismukes  <dismukes@adacore.com>

* exp_prag.adb (Expand_Pragma_Import_Or_Interface): Remove properly a
default initialization on an imported object, when there is no
initialization call generated for it.
(Expand_Pragma_Assert): Add handling of No_Exception_Propagation
restriction

* snames.h, snames.ads, snames.adb, par-prag.adb: New pragma
Static_Elaboration_Desired.
Remove pragma Thread_Body.
Implement a new pragma No_Body
Removes the Explicit_Overriding pragma
Remove Optional_Overriding pragma
(Prag): Deal with Universal_Aliasing.
(Name_CIL, Name_CIL_Constructor, Convention_CIL,
Pragma_CIL_Constructor): New names.

* sem_cat.adb (Validate_Object_Declaration): An initialization that
uses the equivalent aggregate of a type must be treated as an implicit
initialization.
(Get_Categorization): Check a unit for pragma Preelaborate only if it
has none of the other categories.
(Process_Import_Or_Interface_Pragma): Report an error for an attempt
to apply Import to an object renaming declaration.

* sem_prag.adb (Process_Import_Or_Interface): Warn that a type imported
from a C++ class should be declared as limited and that it will be
considererd limited.
(Analyze_Pragma): Warn that a type specified with pragma CPP_Class
should be declared as limited and that it will be considererd limited.
(Ada_2005_Pragma): New procedure, used to deal with Ada 2005 pragmas
(Analyze_Pragma, case Export): Diagnose export of enumeration literal
(Analyze_Pragma): Deal with Universal_Aliasing.
(Sig_Flags): Likewise.
(Set_Encoded_Interface_Name): Suppress encoding when compiling for AAMP.
(Overflow_Checks_Unsuppressed): New flag.
(Process_Suppress_Unsuppress): Set Overflow_Checks_Unsuppressed.
(Analyze_Pragma [case Pack]): Ignore pragma Pack and post warning in
case of JVM or .NET targets, and compiling user code.
Add debugging convenience routine rv

From-SVN: r125408

17 years agoexp_pakd.adb (Expand_Packed_Not): Use RM_Size rather than ESize to compute masking...
Robert Dewar [Wed, 6 Jun 2007 10:27:26 +0000 (12:27 +0200)]
exp_pakd.adb (Expand_Packed_Not): Use RM_Size rather than ESize to compute masking constant...

2007-04-20  Robert Dewar  <dewar@adacore.com>
    Ed Schonberg  <schonberg@adacore.com>

* exp_pakd.adb (Expand_Packed_Not): Use RM_Size rather than ESize to
compute masking constant, since we now set Esize properly to the
underlying size.
(Create_Packed_Array_Type): Set proper Esize value adjusted as required
to match the alignment.
(Create_Packed_Array_Type): Use Short_Short_Unsigned as base type for
packed arrays of 8 bits or less.

* freeze.adb (Freeze_Entity): When freezing the formals of a
subprogram, freeze the designated type of a parameter of an access type
only if it is an access parameter.
Increase size of C convention enumeration object
(Freeze_Entity, array type case): Make sure Esize value is properly
adjusted for the alignment if it is known.
(Freeze_Entity, array type case): When checking bit packed arrays for
the size being incorrect, check RM_Size, not Esize.
(Freeze_Record_Type): Check for bad discriminated record convention
(In_Exp_Body): Return true if the body is generated for a subprogram
renaming, either an attribute renaming or a renaming as body.
(Check_Itype): If the designated type of an anonymous access component
is a non-protected subprogram type, indicate that it is frozen, to
prevent out-of-scope freeze node at some subsequent call.
(Freeze_Subprogram): On OpenVMS, reject descriptor passing mechanism
only if the subprogram is neither imported nor exported, as well as the
NCA descriptor class if the subprogram is exported.

From-SVN: r125407

17 years agoexp_intr.adb (Expand_Unc_Deallocation): Add missing support for deallocation of class...
Javier Miranda [Wed, 6 Jun 2007 10:27:12 +0000 (12:27 +0200)]
exp_intr.adb (Expand_Unc_Deallocation): Add missing support for deallocation of class-wide interface objects.

2007-04-20  Javier Miranda  <miranda@adacore.com>

* exp_intr.adb (Expand_Unc_Deallocation): Add missing support for
deallocation of class-wide interface objects.
(Expand_Dispatching_Constructor_Call): Take into account that if the
result of the dispatching constructor is an interface type, the
function returns a class-wide interface type; otherwise the returned
object would be actual. The frontend previously accepted returning
interface types because Expand_Interface_Actuals silently performed
the management of the returned type "as if" it were a class-wide
interface type.
(Expand_Dispatching_Constructor_Call): Replace call to
Make_DT_Access_Action by direct call to Make_Function_Call.

From-SVN: r125406

17 years agoexp_imgv.adb (Expand_Value_Attribute): Disable compilation of this attribute compilin...
Javier Miranda [Wed, 6 Jun 2007 10:27:01 +0000 (12:27 +0200)]
exp_imgv.adb (Expand_Value_Attribute): Disable compilation of this attribute compiling package Ada.Tags under...

2007-04-20  Javier Miranda  <miranda@adacore.com>

* exp_imgv.adb (Expand_Value_Attribute): Disable compilation of this
attribute compiling package Ada.Tags under No_Run_Time_Mode.

From-SVN: r125405

17 years agoexp_fixd.adb (Integer_Literal): Add optional argument to construct a negative literal
Geert Bosch [Wed, 6 Jun 2007 10:26:49 +0000 (12:26 +0200)]
exp_fixd.adb (Integer_Literal): Add optional argument to construct a negative literal

2007-04-20  Geert Bosch  <bosch@adacore.com>

* exp_fixd.adb (Integer_Literal): Add optional argument to construct a
negative literal
(Do_Divide_Fixed_Fixed): Add comments to indicate Frac is always
positive
(Do_Divide_Fixed_Universal): Handle case of negative Frac.
(Do_Multiply_Fixed_Fixed): Add coments to indicate Frac is always
positive
(Do_Multiply_Fixed_Universal): Handle case of negative Frac.

From-SVN: r125404

17 years agoexp_dist.ads, [...] (Make_Transportable_Check): New subprogram (GARLIC_Support.Build_...
Thomas Quinot [Wed, 6 Jun 2007 10:26:39 +0000 (12:26 +0200)]
exp_dist.ads, [...] (Make_Transportable_Check): New subprogram (GARLIC_Support.Build_Subprogram_Receiving_Stubs...

2007-04-20  Thomas Quinot  <quinot@adacore.com>

* exp_dist.ads, exp_dist.adb (Make_Transportable_Check): New subprogram
(GARLIC_Support.Build_Subprogram_Receiving_Stubs,
PolyORB_Support.Build_Subprogram_Receiving_Stubs):
For a remote call to a function with a classwide return type, apply an
E.4(18) check to the returned value.
(Add_RACW_Primitive_Declarations_And_Bodies): Do not generate stubs for
stream attributes of the designated type of an RACW, as they are not
dispatching primitive operations.

From-SVN: r125403

17 years agoexp_dbug.adb (Get_Encoded_Name): Modified to continue providing its functionality...
Javier Miranda [Wed, 6 Jun 2007 10:26:28 +0000 (12:26 +0200)]
exp_dbug.adb (Get_Encoded_Name): Modified to continue providing its functionality when...

2007-04-20  Javier Miranda  <miranda@adacore.com>
    Nicolas Setton  <setton@adacore.com>

* exp_dbug.adb (Get_Encoded_Name): Modified to continue providing its
functionality when the backend is generating code.
Otherwise any serious error
reported by the backend calling the frontend routine Error_Msg
changes the Compilation_Mode to Check_Semantics, disables the
functionality of this routine and causes the generation of
spureous additional errors.

* exp_dbug.ads (Pointers to Unconstrained Arrays): Document the
debugging information now generated by the compiler for fat-pointer
types.
Document the contents of DW_AT_producer in the GNAT Vendor extensions to
DWARF2/3.
Document GNAT Vendor extensions to DWARF 2/3 and the "-gdwarf+" switch.

From-SVN: r125402

17 years agoexp_ch9.ads, [...] (Build_Protected_Entry): Set sloc of generated exception handler...
Ed Schonberg [Wed, 6 Jun 2007 10:26:18 +0000 (12:26 +0200)]
exp_ch9.ads, [...] (Build_Protected_Entry): Set sloc of generated exception handler appropriately when debugging generated code.

2007-04-20  Ed Schonberg  <schonberg@adacore.com>
    Robert Dewar  <dewar@adacore.com>
    Hristian Kirtchev  <kirtchev@adacore.com>

* exp_ch9.ads, exp_ch9.adb (Build_Protected_Entry): Set sloc of
generated exception handler appropriately when debugging generated code.
Deal properly with No_Exception_Propagation restriction mode.
(Expand_N_Abort_Statement): Add an unchecked type conversion from
System.Address to System.Tasking.Task_Id when processing the result of
the predefined primitive _disp_get_task_id.
(Expand_N_Asynchronous_Select): Clarify comment.
(Expand_N_Protected_Type_Declaration): Minor code cleanup.
(Find_Parameter_Type): New routine inside Type_Conformant_Parameters.
(Type_Conformant_Parameters): New parameter Prim_Op_Typ. Code cleanup.
(Add_Private_Declarations, Build_Protected_Body): Use proper slocs for
privals and for generated call to Complete_Entry_Body, for better gdb
behavior.
(Copy_Result_Type): Utility to construct a parameter and result profile
for protected functions whose return type is an anonymous access to
subprogram.
(Build_Protected_Sub_Spec and Expand_Access_Protected_Subprogram_Type):
call the above.
(Build_Task_Activation_Call): Insert Activate_Tasks call at proper
point when the local-raise-to-goto transformation has taken place.

From-SVN: r125401