[Ada] Increase alternate stack size on hpux

2012-07-12 Thread Arnaud Charlet
To meet MINSIGSTKSZ requirement. Tested on x86_64-pc-linux-gnu, committed on trunk 2012-07-12 Tristan Gingold ging...@adacore.com * s-osinte-hpux.ads: Increase alternate stack size on hpux. Index: s-osinte-hpux.ads ===

[Ada] gnatmake --subdirs without project file, binding and linking

2012-07-12 Thread Arnaud Charlet
When gnatmake is invoked with --subdirs=, but without -P, the binder generated files and the executable are put by default in the specified subdirectory. Tested on x86_64-pc-linux-gnu, committed on trunk 2012-07-12 Vincent Celier cel...@adacore.com * make.adb (Binding_Phase): If

[Ada] Allow the same library project in different project tree

2012-07-12 Thread Arnaud Charlet
It is possible to have the same library project in different aggregated projects, so in different project tree. Tested on x86_64-pc-linux-gnu, committed on trunk 2012-07-12 Pascal Obry o...@adacore.com * prj-nmsc.adb (Check_Library_Attributes): Allow the same library project

[Ada] Fix dependency problems from System.Restrictions

2012-07-12 Thread Arnaud Charlet
This patch completely changes the way restrictions information is generated in the ALI file. Instead of using a positional notation that is sensitive to the addition of new restrictions, it uses a named notation, that avoids this dependency. If a new restriction is added, and an incompatible

[Ada] Add VMS qualifiers for -gnatn1/2 switches.

2012-07-12 Thread Arnaud Charlet
Tested on x86_64-pc-linux-gnu, committed on trunk 2012-07-12 Vasiliy Fofanov fofa...@adacore.com * vms_data.ads: Add VMS qualifiers for -gnatn1/2 switches. Index: vms_data.ads === --- vms_data.ads(revision 189431)

[Ada] Suppress false elaboration warnings -- indirect Elaborate_All

2012-07-16 Thread Arnaud Charlet
This patch suppresses certain false-alarm warnings about elaboration in cases where a pragma Elaborate_All is not present directly, but is found in some indirectly-with'ed unit. The following test should compile silently: gnatmake -q -f -g -gnatwl -gnatE -gnat05 r.adb package P is function F

[Ada] Add support for encoding in Create_Directory and Create_Path.

2012-07-16 Thread Arnaud Charlet
Tested on x86_64-pc-linux-gnu, committed on trunk 2012-07-16 Pascal Obry o...@adacore.com * s-crtl.ads (mkdir): New routine, support encoding. * adaint.h (__gnat_mkdir): Update spec to pass encoding. * mkdir.c (__gnat_mkdir): Add encoding parameter. *

[Ada] Introduce the notion of machine occurrence

2012-07-16 Thread Arnaud Charlet
This is preliminary work to have a better support of foreign exceptions and of Windows 64 SEH. This patch introduce the notion of machine occurrence, which is the system exception propagated. This occurrence is allocated before setting up the Ada occurrence, which slightly speed-up occurrence

[Ada] Improve support of Storage_Error for Windows 64 SEH

2012-07-16 Thread Arnaud Charlet
Work to support Windows 64 SEH: allow to convert an exception code to an Ada exception ID and message; Optimize the propagation of Storage_Error on Windows 64 SEH to avoid requiring a too large stack area. 2012-07-16 Tristan Gingold ging...@adacore.com * seh_init.c (__gnat_map_SEH):

[Ada] Explicitly pass exception occurrence to notifiers

2012-07-16 Thread Arnaud Charlet
This is an internal cleanup and preliminary to removal of useless ada occurrence copy. No functional change. Tested on x86_64-pc-linux-gnu, committed on trunk 2012-07-16 Tristan Gingold ging...@adacore.com * a-exexpr.adb (Propagate_Exception): Adjust call to Exception_Traces

[Ada] Cleanup of selective accept expansion

2012-07-16 Thread Arnaud Charlet
This change reorganizes code generation for selective accept statements so that the expanded tree is well formed. This cleanup is desirable in preparation for further changes related to coverage analysis. No observable change in generated code's behaviour. Tested on x86_64-pc-linux-gnu,

[Ada] Coverage analysis of select statements

2012-07-16 Thread Arnaud Charlet
This change introduces generation of a null statement in alternatives appearing in various forms of select statement, when they do not have trailing statements. The purpose of the additional null statement is to allow a nop to be generated with an appropriate source location indication in debug

[Ada] Ease interface with builtins that returns void *

2012-07-16 Thread Arnaud Charlet
The natural way to import a builtin that returns void * is to use System.Address in Ada, which is in fact an integral type. Addressed by this patch, which makes it possible to e.g. compile: with System; procedure Btins1 is function Frame_Address (Level : Integer) return System.Address;

Re: [Ada] Optimization of the Lock-free implementation of protected object

2012-07-16 Thread Arnaud Charlet
http://gcc.gnu.org/ml/gcc-cvs/2012-07/msg00341.html This breaks ada bootstrap on powerpc-darwin9 with : Undefined symbols: ___sync_val_compare_and_swap_8, referenced from: _system__atomic_primitives__lock_free_try_write_64 in s-atopri.o ___atomic_load_8, referenced from:

[Ada] Add new debug procedure psloc

2012-07-17 Thread Arnaud Charlet
Add a new debug procedure psloc, to display a source location. Tested on x86_64-pc-linux-gnu, committed on trunk 2012-07-17 Tristan Gingold ging...@adacore.com * treepr.ads (psloc): Declare. * treepr.adb (psloc): New debug procedure to print a sloc. (Print_Sloc): New

[Ada] Consistent tree decoration to import C++ classes

2012-07-17 Thread Arnaud Charlet
For consistency, entity Ada.Tags.Prim_Ptr must be decorated with attribute Is_Dispatch_Table_Entity to help the backend generating code for dispatching calls. This decoration was missing in CPP_Types thus causing problems in some architectures (for example, IA-64/Linux). Tested on

[Ada] Fix potential access violation in Adjust routine

2012-07-17 Thread Arnaud Charlet
Tested on x86_64-pc-linux-gnu, committed on trunk 2012-07-17 Pascal Obry o...@adacore.com * s-regexp.adb (Adjust): Fix access violation in Adjust. Index: s-regexp.adb === --- s-regexp.adb(revision 189565) +++

[Ada] Contracts on imported subprograms

2012-07-17 Thread Arnaud Charlet
Currently pre/postconditions are enforced by means of expansions in the body of the corresponding subprogram. If the subprogram is imported there is no available body on which to insert the checking code, and thr user should be warned that the contracts will not be enforced. THe command: gcc

[Ada] Minor tweak to expanded code for transient objects

2012-07-17 Thread Arnaud Charlet
This change makes it so that the finalization blocks generated for controlled transient objects, as well the final raise statement, are all wrapped into a block, so as to make it easier for the back-end to understand the construct. No functional changes. Tested on x86_64-pc-linux-gnu, committed

[Ada] Fix to 64-bit atomic operation failures on ppc-linux

2012-07-17 Thread Arnaud Charlet
This patch fixes failures due to the use of 64-bit atomic operations on ppc-linux. Undo of the previous patch for 64-bit atomic operations only. Note: this does NOT address the failure on ppc-darwin, which will be addressed by another patch soon. Tested on x86_64-pc-linux-gnu, committed on trunk

[Ada] gnatmake -s -gnatn1 always recompiles

2012-07-17 Thread Arnaud Charlet
This patch ensures that when -gnatn1 is used gnatmake -s will not always recompile. Tested on x86_64-pc-linux-gnu, committed on trunk 2012-07-17 Vincent Celier cel...@adacore.com * switch-m.adb (Normalize_Compiler_Switches): Recognize new switches -gnatn1 and -gnatn2. Index:

[Ada] Fix nit in raise-gcc.c

2012-07-17 Thread Arnaud Charlet
In some cases, a cleanup action was missed. No reduced testcase found. Tested on x86_64-pc-linux-gnu, committed on trunk 2012-07-17 Tristan Gingold ging...@adacore.com * raise-gcc.c (get_call_site_action_for): Remove useless init expression for p.

Re: PING 2 : [Patch Darwin/PR49992 2/2] remove ranlib special-casing from the darwin port.

2011-11-01 Thread Arnaud Charlet
Le 28/10/2011 17:41, Iain Sandoe a écrit : This is unreviewed for 2 weeks. I am sure that this issue will be affecting Ada on Darwin10/11 with the latest toolchains. It's actually under discussion and is pretty subtle, so delicate. Thanks for your patience. Arno

[Ada] Add new Assign and Copy operations to unbounded containers

2011-11-04 Thread Arnaud Charlet
The new operations Assign and Copy have been added to the (already-existing) unbounded containers, to achieve parity with the same operations in the newer bounded forms, described in AI05-0001. This facilitates changing one container form to the other during program maintenance. The text of

[Ada] Detect more cases of Long_Float inconsistencies at compile time

2011-11-04 Thread Arnaud Charlet
This patch causes more cases of inconsistent use of pragma Long_Float to be caught at compile time. This gives better messages earlier, and also avoids some blowups due to inconsistent usage. The following is pkg1.adb compiled with -gnatdm -gnatld7 -gnatj60 Compiling: pkg1.adb 1. package

[Ada] Add case-insensitive string operations

2011-11-04 Thread Arnaud Charlet
Ada 2012 added case-insensitive string operations for hashing (Hash_Case_Insensitive), tests for equality (Equal_Case_Insensitive), and tests for lexicographical order (Less_Case_Insensitive), per AI05-0001. The text of AI05-0001 can be found here:

[Ada] Atomic_Synchronization applies to types as well as variables

2011-11-04 Thread Arnaud Charlet
This patch corrects an oversight in the previous checkin for handling Atomic_Synchronization. This applies to types as well as to variables. 1. pragma Disable_Atomic_Synchronization; 2. procedure AtSyncT is 3.type Int is new Integer; 4.pragma Atomic (Int); 5.X

[Ada] Extend atomic synchronization handling to selections

2011-11-04 Thread Arnaud Charlet
This patch extends atomic synchronization to selected components and explicit dereferences when the result is a type for which atomic sync is enabled. Also it handles the case of an indexed selection from an array with atomic components. Tested on x86_64-pc-linux-gnu, committed on trunk

[Ada] Semantically analyze source aspect in ASIS mode

2011-11-04 Thread Arnaud Charlet
In ASIS mode, the source aspect for Pre/Post/Test_Case should be semantically analyzed, as this is the node that is read by ASIS tools. This does not occur in normal compilation mode, as the source aspect is first rewritten in a pragma, and the pragma is analyzed instead. Now, the source aspect is

[Ada] Create the Find_Name_In_Path helper

2011-11-04 Thread Arnaud Charlet
This is a preliminary work. Add a subprogram in the Prj.Env package so that it is possible to search in a project path. No functional change. Tested on x86_64-pc-linux-gnu, committed on trunk 2011-11-04 Tristan Gingold ging...@adacore.com * prj-env.adb, prj-env.ads

[Ada] Add Generic_Sort operation to standard library

2011-11-04 Thread Arnaud Charlet
Ada 2012 added a generic operation for sorting an anonymous array (or array-like container), named Ada.Containers.Generic_Sort, per AI05-0001. The text of AI05-0001 can be found here: http://www.ada-auth.org/cgi-bin/cvsweb.cgi/ai05s/ai05-0001-1.txt Tested on x86_64-pc-linux-gnu, committed on

[Ada] Further refinement to Atomic_Synchronization handling

2011-11-04 Thread Arnaud Charlet
This patch cleans up and reorganizes the handling of atomic sync, and fixes some inconsistencies, e.g. an attribute reference was properly excluded for an identifier, but not for a selected component. Also the flag Atomic_Sync_Required is now on the selected component node itself not the selector

[Ada] Change semantics of Merge

2011-11-04 Thread Arnaud Charlet
The semantics of Merge changed slightly per AI05-0021. It was originally the case that if Target and Source denoted the same container object, then the GNAT implementation of Merge did nothing. However, it was argued that RM05 did not precisely specify the semantics for this corner case. The

[Ada] Message on rewriting loops is now an info message

2011-11-04 Thread Arnaud Charlet
This patch changes the message for rewriting loops into an info message (really no reason to give a warning!). The following test was compiled with -gnatld7 -gnatj60 1. procedure SCOGoto is 2.X : Integer; 3. begin 4.X := 1; 5.LUPE | info:

[Ada] Cleanup -gnatG output for machine code

2011-11-04 Thread Arnaud Charlet
This patch cleans up a minor glitch of outputting an extra semicolon after the code statement appearing as the expression of an Asm construct when using machine code. The following is compiled on an x86 with -gnatG 1. with system.machine_code; use system.machine_code; 2. procedure

[Ada] Inhibit exception push/pop when not needed

2011-11-04 Thread Arnaud Charlet
This patch inhibits the generation of exception push/pop nodes if restriction No_Exception_Handlers is active (when they are always useless), or in CodePeer mode (where they are never needed and can intefere with the analysis). The following program 1. pragma Restrictions

Re: [Ada] Inhibit exception push/pop when not needed

2011-11-04 Thread Arnaud Charlet
This patch inhibits the generation of exception push/pop nodes if restriction No_Exception_Handlers is active (when they are always useless), or in CodePeer mode (where they are never needed and can intefere with the analysis). this latest series breaks bootstrap on at least i686-darwin9.

[Ada] Update dependencies

2011-11-04 Thread Arnaud Charlet
Fixes the build failure reported by Iain Sandoe on parallel builds. * gcc-interface/Make-lang.in: Update dependencies. Index: gcc-interface/Make-lang.in === --- gcc-interface/Make-lang.in (revision 180935) +++

[Ada] In Alfa mode, record also modifications not coming from source

2011-11-07 Thread Arnaud Charlet
Alfa mode is meant for formal verification, in which we must gather all modifications to variables, even those not coming from source. This is in particular the case for rewritings of renamings in Alfa mode. Tested on x86_64-pc-linux-gnu, committed on trunk 2011-11-07 Yannick Moy

[Ada] Improve error msg for passing volatile to non-volatile

2011-11-07 Thread Arnaud Charlet
This patch provides a minor improvement to an error message. This is compiled with -gnatld7 -gnatws -gnatj60: 1. procedure VolNVol is 2.type R is tagged null record; 3.procedure Q (A : R) is 4.begin 5. null; 6.end; 7.V : R; 8.

Re: PING 1 [Patch Ada RFA] make sure that multilibs are built with correct s-oscons.ads

2011-11-09 Thread Arnaud Charlet
* Iain Sandoe, 2011-11-07 : Subject: PING 1 [Patch Ada RFA] make sure that multilibs are built with correct s-oscons.ads Patch looks fine to me. It's an official 'OK' then.

Re: PING 1 [Patch Ada RFA] make sure that multilibs are built with correct s-oscons.ads

2011-11-12 Thread Arnaud Charlet
May I repeat my question re. 4.6? Since this is a wrong-code situation, I would have thought it eligible for a back-port? Well, it's not a wrong-code as in wrong code generated by the back-end, and it's not a regression. In any case, backporting to 4.6 is fine with me. Arno

Re: PING * : [Patch Darwin/PR49992 2/2] remove ranlib special-casing from the darwin port.

2011-11-17 Thread Arnaud Charlet
The new version of the patch as suggested by Tristan is OK to commit, thanks. Arno

[Ada] Get rid of superfluous access checks

2011-11-20 Thread Arnaud Charlet
This change is aimed at eliminating some access checks that are superfluous because the access object that is subject to the check can never be null. The 1st part makes it so that no access check is generated for the dereference of a temporary created to hold the 'Reference of some object:

[Ada] Satisfy representation invariants in operation Move

2011-11-20 Thread Arnaud Charlet
The list container maintains a pair of array index components, First and Last, to keep track of the first and last nodes of the linked list. For an empty list, the First and Last values should be 0. Operation Move empties the Source container as it copies elements from the Source to the Target.

[Ada] Constraint checks on exit from function calls with out parameters

2011-11-21 Thread Arnaud Charlet
In Ada 2012, a function call with out parameters may generate assignments to force constraint checks. These checks must be properly placed in the code after the declaration or statement that contains the call. Tested on x86_64-pc-linux-gnu, committed on trunk 2011-11-21 Ed Schonberg

[Ada] Conformance checks on partially parametrized formal packages

2011-11-21 Thread Arnaud Charlet
A formal subprogram of the formal package can be specified with a box default, or can be covered by an others association with a box initialization. In either case there is no need to check its conformance with the actual subprogram that appears in the instantiation of the formal package. This

[Ada] Invariants must only apply to public subprograms

2011-11-21 Thread Arnaud Charlet
Previously, invariants were applied for IN OUT parameters and return values on all subprograms. This is wrong, they should only be applied for private subprograms. In the following test program, only the exception marked OK should be raised, not the other two (before all three exceptions were

[Ada] As we use the default behavior, no need to allocate a mutex attribute

2011-11-21 Thread Arnaud Charlet
Passing a null pointer to pthread_mutex_init for the attribute specify that the default attribute should be used. This is exactly what was done previously by using a mutex attribute with default value. This is just a code clean-up, no change in behavior but we avoid some system calls and

[Ada] A dispatching call cannot have a stdcall calling convention

2011-11-21 Thread Arnaud Charlet
Issue an error if a pragma convention stdcall is applied to a dispatching subprogram. Such subprogram cannot be used to interface to the Win32 API, so in fact this check does not impose any new restrictions. Tested on x86_64-pc-linux-gnu, committed on trunk 2011-11-21 Pascal Obry

[Ada] As we use the default behavior, no need to allocate a cond attribute

2011-11-21 Thread Arnaud Charlet
Passing a null pointer to pthread_cond_init for the attribute specify that the default attribute should be used. This is exactly what was done previously by using a cond attribute with default value. This is just a code clean-up, no change in behavior but we avoid some system calls and

[Ada] Implement pragma Pure_12 and use it in Ada.Finalization

2011-11-21 Thread Arnaud Charlet
Ada_Finalization is Pure in Ada 2012, but not in earlier versions. This is in accordance with AI05-0212. This patch implements a pragma and apsect Pure_12, which is like Pure but effective only in Ada 2012 mode (analogous to Pure_05 in Ada 2005 mode) The following two test programs show the

[Ada] Fix handling of local Restrictions pragmas

2011-11-21 Thread Arnaud Charlet
This patch completely redoes the handling of Restrictions pragmas that occur locally to a unit as a configuration pragma (rather than as an entrhy in a configuration pragma file). The new handling is much more consistent, and fixes a number of problems with inheriting restrictions from with'ed

[Ada] Properly recognize NEL as end of line in UTF-8 encoding mode

2011-11-21 Thread Arnaud Charlet
The NEL (NEXT LINE) control code (16#85#) is now properly recognized as a line terminator, and hence can be used to terminate a source line when the source program is encoded in UTF-8 mode. Note that NEL is not recognized as a line terminator in normal 8-bit mode. For an extensive explanation of

[Ada] Fix handling of position attributes in Ada 2005 mode

2011-11-21 Thread Arnaud Charlet
A special rule was introduced in Ada 2005 (RM 13.5.2(2/2-4/2)) that specifies that if Position, First_Bit or Last_Bit are applied to a component with a component clause, and the default record bit ordering applies, then the results correspond to the exact values given in the component clause, not

[Ada] Properly detect passing volatile A.B to non-volatile formal

2011-11-21 Thread Arnaud Charlet
This patch provides proper detection of the error of passing pointer to volatile to pointer to non-volatile in the case of a component reference A.B. The following test program (compiled with -gnatld7 -gnatj60 -gnat2005) shows detection of this error 1. procedure Atomic_Test is 2.

[Ada] Adjustments to setting alignment when size is set

2011-11-21 Thread Arnaud Charlet
This patch reworks the handling when the alignment is not set but the size is set. Basically in this case, we always set a reasonable alignment from the size. This is true even if the size is confirming (we really have no way of telling if a size clause is or is not confirming in the general

[Ada] Do not expand checks in Alfa mode

2011-11-21 Thread Arnaud Charlet
In Alfa mode, formal verification backend takes care of checks, hence there is no need for the frontend to insert checks. Tested on x86_64-pc-linux-gnu, committed on trunk 2011-11-21 Yannick Moy m...@adacore.com * checks.adb (Apply_Access_Check, Apply_Arithmetic_Overflow_Check,

[Ada] Access subprogram definitions as return types of access to subprograms

2011-11-21 Thread Arnaud Charlet
Ada 2005 allows the declaration of an access to function whose return type is itself an access to function, etc. Each anonymous access type generated for this pathological construct has a scope which is the scope of the current declaration. The following must compile quietly in Ada 2005 mode,

[Ada] In Alfa mode, do not force evaluation of expressions for checks

2011-11-21 Thread Arnaud Charlet
In Alfa mode, checks are not generated by the frontend, hence there is no need to force the evaluation of expressions for checks. This avoids inserting useless actions in expressions. Tested on x86_64-pc-linux-gnu, committed on trunk 2011-11-21 Yannick Moy m...@adacore.com *

[Ada] Special case dup2() on Windows

2011-11-21 Thread Arnaud Charlet
Special case when oldfd and newfd are identical and are the standard input, output or error as this makes Windows XP hangs. Tested on x86_64-pc-linux-gnu, committed on trunk 2011-11-21 Pascal Obry o...@adacore.com * adaint.c (__gnat_dup2): When fd are stdout, stdin or stderr and

[Ada] Cleanup in sysdep.c: remove unused declaration

2011-11-21 Thread Arnaud Charlet
Tested on x86_64-pc-linux-gnu, committed on trunk 2011-11-21 Tristan Gingold ging...@adacore.com * sysdep.c (mode_read_text, mode_write_text, mode_append_text, mode_read_binary, mode_write_binary, mode_append_binary, mode_read_text_plus, mode_write_text_plus,

[Ada] Locate error message on the first character of an assertion

2011-11-21 Thread Arnaud Charlet
The source location of an expression may not be the best place to put a message, in the case of a failed assertion. For example, it gets located on the last and keyword in a chain of boolean expressiond and'ed together. It is best to put the message on the first character of an assertion, which is

[Ada] In Alfa mode, do not remove side-effects from expression

2011-11-21 Thread Arnaud Charlet
Formal verification constraints already ensure that expressions are free from side-effects, so no need for removal of side-effects in Alfa mode. Tested on x86_64-pc-linux-gnu, committed on trunk 2011-11-21 Yannick Moy m...@adacore.com * exp_util.adb (Remove_Side_Effects): Do nothing

[Ada] Attribute 'Max_Size_In_Storage_Elements and controlled types

2011-11-21 Thread Arnaud Charlet
This patch modifies the way Max_Size_In_Storage_Elements operates when applied to a controlled type. The attribute returns the size of the prefix plus the size of the two hidden pointer which are added by the runtime support for controlled objects on the heap. Tested on x86_64-pc-linux-gnu,

[Ada] Locate error message on the first line of a pre/post/invariant aspect

2011-11-23 Thread Arnaud Charlet
The source location of an expression may not be the best place to put a mess in the case of a failed precondition/postcondition/invariant. For example, it gets located on the last and keyword in a chain of boolean expressiond and'ed together. It is best put the message on the first character of an

[Ada] Wrong dispatching call in returned class-wide interface object

2011-11-23 Thread Arnaud Charlet
If a function returns a class-wide interface object then the compiler generates code that leaves the interface object not well initialized. This causes wrong dispatching calls at runtime. The following test must compile and execute without run-time errors. package Pkg is type Iface is

[Ada] Change semantics of partial iteration

2011-11-23 Thread Arnaud Charlet
There were several issues with the implementation of the map iterator. (1) Ordered maps support reverse iteration, so the type returned by the iterator factory function was changed from Forward_Iterator'Class to Reversible_Iterator'Class. (2) The concrete type Iterator was declared as limited,

[Ada] Fix check for entry family bounds out of range

2011-11-23 Thread Arnaud Charlet
This patch adds code to the semantic analyzer to properly check that entry family bounds are in range. Previously this check was done during code expansion, leading to messages posted at the wrong point, omission of the check in -gnatc mode, and in the case of task entry families a blow up in the

[Ada] Remove unnecessary node component from hashed map iterator

2011-11-23 Thread Arnaud Charlet
The concrete type Iterator is declared as limited, because there is no need for assignment for iterator objects. Hashed maps also do not support partial iteration, so the unnecessary node component is also removed from that type. The Next operation vets the cursor parameter to ensure that it

[Ada] Remove hard-coded clock ids

2011-11-23 Thread Arnaud Charlet
Remove hard-coded clock ids in s-taprop*.adb; instead, generate them in System.OS_Constants. Tested on x86_64-pc-linux-gnu, committed on trunk 2011-11-23 Thomas Quinot qui...@adacore.com * s-osinte-hpux.ads, s-taprop-vxworks.adb, s-taprop-tru64.adb, s-osinte-vxworks.ads,

Re: [ada] Fix bootstrap error in s-taprop-tru64.adb

2011-11-23 Thread Arnaud Charlet
Tru64 UNIX Ada bootstrap recently got broken: s-taprop.adb:892:12: access to volatile object cannot yield access-to-non-volatile type make[6]: *** [s-taprop.o] Error 1 s-taprop-tru64.adb missed a patch already applied to s-taprop-{irix, solaris}.adb. With that change, the bootstrap

[Ada] Fixed bugs in iterators for set containers

2011-11-23 Thread Arnaud Charlet
There were several issues with the implementation of the set iterators. The concrete type Iterator is declared as limited, because there is no need for assignment for iterator objects. For the ordered forms (which support specifying the start position when iterating), the First and Last selector

[Ada] Deallocation of a class-wide object with unknown discriminants

2011-11-23 Thread Arnaud Charlet
This patch corrects the creation of equivalent class-wide types for records with unknown discriminants. Equivalent class-wide types are used by the back end to determine the size of an object. As a result it is now possible to deallocate a class-wide object whose root base type has unknown

[Ada] Taft-amendment types and Ada 2012 type invariants

2011-11-23 Thread Arnaud Charlet
The presence of a body freezes all entities previously declared in the current list of declarations, but this does not apply if the body does not come from source. A type invariant is transformed into a subprogram body which is placed at the end of the private part of the current package, but this

[Ada] Aspect specifications on subprogram renaming declarations

2011-11-23 Thread Arnaud Charlet
The syntax of Ada 2012 accepts aspect specifications on renaming declarations, but no language-defined aspects exist for them, so that pre- and postconditions on these declarations must be rejected. Compiling db.ads in Ada 2012 mode must yield: db.ads:9:07: incorrect placement of aspect PRE

[Ada] Consistent target names

2011-11-23 Thread Arnaud Charlet
This change makes the target names used by various tools consistent across the whole tool chain. In particular, Standard'Target_Name and the default search path for projects are changed to match the GCC target name. Tested on x86_64-pc-linux-gnu, committed on trunk 2011-11-23 Thomas Quinot

[Ada] Dependencies of virtual extending projects

2011-11-23 Thread Arnaud Charlet
This change ensures that virtual extending projects generated when processing an EXTENDS ALL project have a closure that is consistent with that of the extending project. This is required to build DSA applications with the gnatdist partitioning tool when RCI units come from some imported project.

Re: [PATCH] Avoid messages about non-existent gnatls command (PR bootstrap/51201)

2011-12-01 Thread Arnaud Charlet
:= assigned variable gets evaluated right away, including the case when host doesn't have any Ada compiler installed. In that case we remove ada from enabled languages, but still RTS_DIR is sometimes computed. Can you elaborate here? When is RTS_DIR computed if Ada is not enabled? That seems

Re: [PATCH] Avoid messages about non-existent gnatls command (PR bootstrap/51201)

2011-12-01 Thread Arnaud Charlet
when you have lots of cross-compilers around. If LANG_MAKEFRAGS would be limited only to the chosen languages, this would suddenly not work at all. http://gcc.gnu.org/ml/gcc-patches/2006-01/msg02100.html is the change that went into 4.2. OK well, maybe the above patch is partly OBE

[Ada] Implement iterator for multiset containers

2011-12-02 Thread Arnaud Charlet
This change implements a reversible iterator for multiset containers. An iterator can either be partial, visiting only some of the items in the container (in which case the start position is specified), or complete, visiting all of them. The iterator caches the start position during its

[Ada] Ada 2012: Derived types and partial views

2011-12-02 Thread Arnaud Charlet
This patch incorporates the support for AI95-0041. For the purposes of the rules for allowing allocated unconstrained objects, any ancestor that has a constrained partial view causes the rules to apply. In addition, in a generic body, 3.10.2(27.2/2) is checked assuming that any untagged

[Ada] Check preconditions for child iterator of multiway tree container

2011-12-02 Thread Arnaud Charlet
The iterator for visiting children of a node in a multiway tree must check the value of the Parent parameter to ensure that it is non-null, and that it actually designates a node in the tree. There were also several instances where cursor values returned by iterator operations were not

[Ada] Remove spurious warning in Alfa mode

2011-12-02 Thread Arnaud Charlet
The side effect removal machinery may generate illegal Ada code to avoid the usage of access types and 'reference in Alfa mode. Since this is legal code with respect to theorem proving, do not emit the warning. Tested on x86_64-pc-linux-gnu, committed on trunk 2011-12-02 Yannick Moy

[Ada] Minor code reorganization

2011-12-02 Thread Arnaud Charlet
This patch does not modify the functionality of the compiler. It moves semantic routines from Sem_Util to Sem_Aux to have them available in ASIS. Tested on x86_64-pc-linux-gnu, committed on trunk 2011-12-02 Javier Miranda mira...@adacore.com * sem_util.ads, sem_util.adb, sem_aux.ads,

[Ada] Generation of external and fully qualified names

2011-12-02 Thread Arnaud Charlet
This patch corrects a buffer issue which may lead to bogus expanded names at link time. The problem is initiated while creating the external name of a tagged type whose scope is an overloaded name. This places useless data in the Homonym_Numbers buffer which is then reused when building the

[Ada] Implement concrete iterators as a type hierarchy for multiway trees

2011-12-02 Thread Arnaud Charlet
The iterators for the multiway trees are now implemented as a type hierarchy. Iterating over a tree is the same as iterating over a subtree starting from the root, and so the tree iterator forwards the request to the subtree iterator. Tested on x86_64-pc-linux-gnu, committed on trunk 2011-12-02

Re: [doc] Adjust reference to ACATS in sourcebuild.texi

2011-05-02 Thread Arnaud Charlet
* doc/sourcebuild.texi (Ada Tests): Adjust reference to ACATS testsuite and make it version agnostic. I doubt this is a good idea: while you can find out what version of ACATS is included in GCC, the information is somewhat hard to find (gcc/testsuite/ada/acats/support/acats25.lst)

Re: [build] More --enable-threads cleanup

2011-05-02 Thread Arnaud Charlet
In my last --enable-threads cleanup patch [build, doc] Cleanup --enable-threads support http://gcc.gnu.org/ml/gcc-patches/2011-04/msg00735.html I missed another opportunity, handled by this patch. BTW, feel free to also remove any trace of --enable-threads=gnat. This is a

Re: [build, ada, doc] Remove --enable-threads=gnat support

2011-05-23 Thread Arnaud Charlet
As Arnaud suggested with one of my --enable-threads cleanup patches, --enable-threads=gnat is unused and can go. The following patch implements this. Bootstrapped without regressions on i386-pc-solaris2.11. While I didn't test the other affected configurations, I hope the changes are

Re: [patch ada]: Fix bootstrap for Ada

2011-05-24 Thread Arnaud Charlet
this patch fixes an obvious bootstrap issue caused by trying to assign a constant pointer to an none-constant. Index: adaint.c === --- adaint.c(revision 174060) +++ adaint.c(working copy) @@ -3367,8 +3367,8 @@

Re: [patch ada]: Fix bootstrap for Ada

2011-05-24 Thread Arnaud Charlet
I'm confused. The above looks wrong to me: it does not return an empty string, it returns a pointer to an uninitialized string, which cannot be right (and should generate a warning :-) No, static vars are implicitly zero initialized when not explicitly initialized. Hmm I see. Still,

Re: RFC: [build, ada] Centralize PICFLAG configuration

2011-08-16 Thread Arnaud Charlet
That's the simplest alternative. It would need however a pass through the config/ directory for targets that are never used as hosts for GCC (and thus libiberty). Alternatively, the libtool code could be extracted to config/picflag.m4. Alternatively, one could think about using

Re: RFC: [build, ada] Centralize PICFLAG configuration

2011-08-16 Thread Arnaud Charlet
Ok, I see. Perhaps gcc/ada could be disentangled and those files exclusively or primarily used for libgnat/libgnarl moved over to libada, and referenced from there for the host build? That would require some delicate work on AdaCore's side, so wouldn't be helpful in the short term (rather

Re: RFC: [build, ada] Centralize PICFLAG configuration

2011-08-16 Thread Arnaud Charlet
Sure, I was rather asking how make gnatlib (or whatever) is supposed to be invoked? From gcc/ada, any special needs? From obj dir/gcc typically. It would be good to contribute them, perhaps for close scrutiny by a well, it's not a matter of contributing: it's more a matter of undoing what

Re: RFC: [build, ada] Centralize PICFLAG configuration

2011-08-16 Thread Arnaud Charlet
Please post them. OK, here they are. FWIW, I have no idea how these changes will play with libada (in particular the stamp-tools handling), so I suspect these changes may require a bit of adjustment to be suitable. Arno --- gcc-interface/Make-lang.in 2011-08-05 17:48:26.0 +0200 +++

Re: RFC: [build, ada] Centralize PICFLAG configuration

2011-08-17 Thread Arnaud Charlet
Wouldn't you use these targets with --disable-target-libada --disable-gnattools? Yes (or rather --disable-libada. I believe also disable-libada implies --disable-gnattols), that's the primary use (manual debugging is a secondary use). Arno

Re: [Ada] Expansion of Ada2012 predicate checks for type conversions

2011-08-18 Thread Arnaud Charlet
2011-08-05 Ed Schonberg schonb...@adacore.com * exp_ch4.adb (Expand_N_Type_Conversion): When expanding a predicate check, indicate that the copy of the original node does not come from source, to prevent an infinite recursion of the expansion. For ChangeLog

[Ada] Analyze pre/post expression for correctness in formal verification mode

2011-08-29 Thread Arnaud Charlet
Since expansion of pre/post is skipped in formal verification mode, the analysis of pre/post expressions for correctness, and to complete nodes with their types, was missing. Now corrected. Tested on x86_64-pc-linux-gnu, committed on trunk 2011-08-29 Yannick Moy m...@adacore.com *

[Ada] Prevent expansion of array aggregates in formal verification mode

2011-08-29 Thread Arnaud Charlet
The backend for formal verification handles much more easily aggregates that are not expanded into loops, as this happens with array aggregates, so prevent expansion in this mode. Tested on x86_64-pc-linux-gnu, committed on trunk 2011-08-29 Yannick Moy m...@adacore.com * exp_aggr.adb

<    3   4   5   6   7   8   9   10   11   12   >