Re: RFC: Experimental use of Sphinx for GCC documentation

2015-11-09 Thread Arnaud Charlet
> > > We do have also a texi2rst script which handles 90% of the work, the > > > rest requiring manual adaptations. I can send the script we've used if > > > this can help. > > > > I'm interested in seeing your script. Can you post/upload it somewhere? > > Yes I will. Let me get the latest versi

Re: RFC: Experimental use of Sphinx for GCC documentation

2015-11-09 Thread Arnaud Charlet
> > We do have also a texi2rst script which handles 90% of the work, the > > rest requiring manual adaptations. I can send the script we've used if > > this can help. > > I'm interested in seeing your script. Can you post/upload it somewhere? Yes I will. Let me get the latest version we've used

Re: RFC: Experimental use of Sphinx for GCC documentation

2015-11-08 Thread Arnaud Charlet
We've switched the Ada doc to sphinx indeed, so can only be in favor of this change for the rest of GCC. We do have also a texi2rst script which handles 90% of the work, the rest requiring manual adaptations. I can send the script we've used if this can help. Arno

Re: [PATCH] Fix declaration of pthread-structs in s-osinte-rtems.ads

2015-11-04 Thread Arnaud Charlet
> > > > Your ChangeLog entry is not in the proper format, see sections 6.8.1 > > > > and > > > > 6.8.2 from http://www.gnu.org/prep/standards/standards.html > > > > > > > > The diff itself is OK. > > > > > > Ok, fixed this. See the new diff below. > > > > This is now OK, you can go ahead and com

Re: [PATCH] Fix declaration of pthread-structs in s-osinte-rtems.ads

2015-11-03 Thread Arnaud Charlet
> > Your ChangeLog entry is not in the proper format, see sections 6.8.1 and > > 6.8.2 from http://www.gnu.org/prep/standards/standards.html > > > > The diff itself is OK. > > Ok, fixed this. See the new diff below. This is now OK, you can go ahead and commit it. > > You can use svn merge to me

Re: [PATCH] Fix declaration of pthread-structs in s-osinte-rtems.ads

2015-11-03 Thread Arnaud Charlet
> Let's try again. This time I made the diff against trunk with the changes > Sebastian recommended, included a ChangeLog and used svn-diff. > If this patch goes through, please let me know how the backporting works. Your ChangeLog entry is not in the proper format, see sections 6.8.1 and 6.8.2 fr

Re: [PATCH] Fix declaration of pthread-structs in s-osinte-rtems.ads

2015-11-02 Thread Arnaud Charlet
> Ok, I don't have time today. I will make a patch against trunk and will try > again with the correct format tomorrow. > How does the backporting work? > It's my first contribution to gcc, so bare with me ;-) See https://gcc.gnu.org/contribute.html for details. Arno

Re: [PATCH] Fix declaration of pthread-structs in s-osinte-rtems.ads

2015-10-31 Thread Arnaud Charlet
> > This patch changes the Ada-declaration of the pthread-related structs > > such as pthread_attr_t from a field-equivalent declaration to just > > reserving the right amount of memory. > > It is only rtems related and essentially copies the way how the types are > > defined in s-osinte-linux.ads.

[Ada] Spurious error on legal use of abstract state constituent

2015-10-27 Thread Arnaud Charlet
This patch modifies the analysis of pragma Refined_Global to treat objects and states as constituents only when their encapsulating state appears in pragma Global. -- Source -- -- pack.ads package Pack with Abstract_State => (State1, State2), Initializes=>

[Ada] Legality checks on initialization of limited objects

2015-10-27 Thread Arnaud Charlet
This patch corrects an omission on the legality check for allocators with a qualified expression when the expression is of a limited type. The check must be performed after the expression is fully resolved, to handle properly complex overloading cases such as indexings of parameterless functions th

[Ada] Delete response file even when link failed

2015-10-27 Thread Arnaud Charlet
When a response file was created and the link failed, the response file was not deleted. It is deleted now. Tested on x86_64-pc-linux-gnu, committed on trunk 2015-10-27 Vincent Celier * gnatlink.adb: Always delete the response file, even when the invocation of gcc to link fail

[Ada] Pragma SPARK_Mode and expression functions

2015-10-27 Thread Arnaud Charlet
This patch ensures that an internally generated subprogram body that completes an expression function inherits the SPARK_Mode from the expression function spec. -- Source -- -- expr_funcs.ads package Expr_Funcs with SPARK_Mode is function F1 return Boolean is (True)

[Ada] Renamings of volatile objects

2015-10-26 Thread Arnaud Charlet
This patch implements the following SPARK RM 7.1.3(12) rule: Contrary to the general SPARK 2014 rule that expression evaluation cannot have side effects, a read of an effectively volatile object with the properties Async_Writers or Effective_Reads set to True is considered to have an e

[Ada] Single protected declaration transformation guarantee

2015-10-26 Thread Arnaud Charlet
This patch adds a check to ensure that there is no attempt to expand a single protected declaration as the declaration should have been transformed into a protected type along with an anonymous object. No change in behavior, no test needed. Tested on x86_64-pc-linux-gnu, committed on trunk 2015-1

[Ada] Ghost types, objects and synchronization

2015-10-26 Thread Arnaud Charlet
This patch implements the following SPARK RM 6.9(19) rule: A ghost type shall not have a task or protected part. A ghost object shall not be of a type which yields synchronized objects. A ghost object shall not have a volatile part. A synchronized state abstraction shall not be a ghost

[Ada] References to task and protected types in aspects/pragmas

2015-10-26 Thread Arnaud Charlet
This patch implements the following rules from SPARK RM 6.1.4: For purposes of the rules concerning the Global, Depends, Refined_Global, and Refined_Depends aspects, when any of these aspects are specified for a task unit the task unit's body is considered to be the body of a procedure

[Ada] Restriction No_Dynamic_Sized_Objects

2015-10-26 Thread Arnaud Charlet
This patch implements a new restriction No_Dynamic_Sized_Objects, which is intended to prevent the creation of composite objects of non-static size. The following test should get an error. gcc -c dynamic_string.adb -gnatws dynamic_string.adb:4:18: violation of restriction "No_Dynamic_Sized_Object

[Ada] Extraction of components/discriminants of concurrent types

2015-10-26 Thread Arnaud Charlet
This patch allows First_Component and First_Component_Or_Discriminant to apply to protected and task types. No change in behavior, no test needed. The patch is aimed at clients of the compiler front-end. Tested on x86_64-pc-linux-gnu, committed on trunk 2015-10-26 Hristian Kirtchev *

[Ada] In an element iterator, the element is constant if the container is.

2015-10-26 Thread Arnaud Charlet
This patch adds a legality check to element iterators over containers: the element is a constant if the container object is a constant, even if the container type has a Variable_Indexing aspect. Compiling the following must be rejected with: strange_behavior.adb:12:07: left hand side of assignme

[Ada] Overloaded indexing operations of a derived type

2015-10-26 Thread Arnaud Charlet
This patch fixes the handling of overloaded indexing operations that are inherited by a type derived from one that carries an indexing aspect. Source: --- with Ada.Text_Io; use Ada.Text_Io; with References; procedure Main is A : aliased References.Iterated; begin A (1) := 42; Put_Line ("A

[Ada] Clean up in s-osinte

2015-10-26 Thread Arnaud Charlet
This patch cleans the way getpagesize() is imported and removes an inconsistency wrt the underlying C routine. No change in functionality. Tested on x86_64-pc-linux-gnu, committed on trunk 2015-10-26 Arnaud Charlet * s-osinte-hpux.ads, s-osinte-aix.ads, s-osinte-solaris-posix.ads

[Ada] Spurious errors with -gnatE and -gnatwl

2015-10-26 Thread Arnaud Charlet
This patch removes spurious errors triggered by the switches -gnatE (Dynamic elaboration) and -gnatwl (list elaboration warnings) when the elaboration call is appears in the prefix of an access attribute. Compiling gcc -c dds-translator.adb -gnatE -gnatwl must yield: dds-translator-genera

[Ada] Spawning processes with no PATH

2015-10-26 Thread Arnaud Charlet
This patch fixes a bug in which GNAT.Expect.Non_Blocking_Spawn fails to find an executable when the PATH environment variable is not set. The executable should be found if it contains a directory name. The following test should execute quietly. gnatmake -q do_nothing.adb gnatmake -q spawn.adb uns

[Ada] Contracts on protected entries and task units

2015-10-26 Thread Arnaud Charlet
This patch implements pragmas [Refined_]Depends and [Refined_]Global on protected entries and task units. As a prerequisite, the patch implements aspect specifications on entry bodies as specified in Ada 2012 (AI12-0169): ENTRY_BODY ::= entry DEFINING_IDENTIFIER ENTRY_BODY_FORMAL_PART

[Ada] Front-end inlining and predicates

2015-10-26 Thread Arnaud Charlet
The front-end cannot inline subprograms that contain certain declarations, such as nested subprograms. If the the subprogram to inline includes a subtype declaration with predicates, it cannot be inlined because the analysis of the predicate will generate (nested) predicate functions. Source: --

[Ada] Pragma Volatile_Function has no effect on subprogram body

2015-10-26 Thread Arnaud Charlet
This patch modifies the analysis of pragmas that appear on package specs and and subprogram bodies. The new model of analysis allows for pragmas to appear out of order, but they are still analyzed according to internal precedence. The patch removes the restrictions concerning the declarations order

[Ada] Local name hides global item

2015-10-26 Thread Arnaud Charlet
This patch modifies the analysis of pragmas Depends, Global, Refined_Depends and Refined_Global when they appear in a subprogram body. The pragmas are now analyzed immediately and in pairs. This preserves the inherent dependency of [Refined_]Depends on [Refined_]Global and prevents a visibility iss

[Ada] SPARK_Mode on synchronized units and entry declarations

2015-10-26 Thread Arnaud Charlet
This patch implements the following semantic rules: The SPARK_Mode aspect can be used in the following places in the code: * on a library-level subprogram spec or body (which now includes entry declarations) * on a library-level task spec or body * on a library-level protected

[Ada] Missing error on conflicting declarations

2015-10-26 Thread Arnaud Charlet
With This patch the compiler properly rejects a subprogram body whose signature is type conformant with a previous expression function in the same scope. Compiling same_signature,adb must yield: same_signature.adb:8:04: body conflicts with expression function at line 5 --- with Ada.Text_IO; us

[Ada] Expression functions, internal bodies and freezing of contracts

2015-10-26 Thread Arnaud Charlet
This patch ensures that only source package and subprogram bodies "freeze" the contract of the nearest enclosing package body. -- Source -- -- expr_funcs.ads package Expr_Funcs with SPARK_Mode, Abstract_State => State is Var_1 : Integer := 1; function I

[Ada] Spurious duplicate Default_Iterator error

2015-10-26 Thread Arnaud Charlet
This patch fixes a bug that caused the compiler to issue the error "default iterator must be unique" when one of the alleged "duplicates" is overridden by another. This can happen in cases involving types derived from types declared in generic formal packages. The error message (when it is correct)

[Ada] Implement stack-checking on arm64-darwin.

2015-10-23 Thread Arnaud Charlet
Tested on x86_64-pc-linux-gnu, committed on trunk 2015-10-23 Tristan Gingold * init.c (__gnat_sigtramp): New assembly function for arm64-darwin. (__gnat_error_handler): Use trampoline for arm64. Index: init.c ===

[Ada] Iterator subtypes

2015-10-23 Thread Arnaud Charlet
THis patch fixes an omission in the handling of iterators over containers. The code now handles properly an iterator type that is a subtype of the type obtained from an instantiation of the predefined iterator interfaces. Compiling and executing main.adb must yield: Element_T.F: 42 Element_T.F: 4

[Ada] Instances of Ada.Unchecked_Conversion as volatile functions

2015-10-23 Thread Arnaud Charlet
This patch implements the following rule from the SPARK RM: 7.1.2 - (A protected function is also defined to be a volatile function,) as is an instance of Unchecked_Conversion where one or both of the actual Source and Target types are effectively volatile types. - -- Source

[Ada] Consistent setting of Pure flag on function with address parameters.

2015-10-23 Thread Arnaud Charlet
A subprogram that has an Address parameter and is declared in a Pure package is not considered Pure, because the parameter may be used as a pointer and the referenced data may change even if the address value itself does not. This check was previously performed only on the subprogram body, leading

[Ada] Unconstrained build-in-place return in block statement

2015-10-23 Thread Arnaud Charlet
For a build-in-place return of an unconstrained limited type (for example, a limited class-wide type), the result is returned on the secondary stack. This patch fixes a bug in the case where the return statement is inside a block statement nested inside the function, and that block uses the seconda

[Ada] Detection of lingering ignored Ghost code

2015-10-23 Thread Arnaud Charlet
This patch updates the generation of external symbol names to add a special prefix for ignored Ghost entities. The prefix aids in the detection of leaking ignored Ghost code in object/binary files. The reproducer showcases the usage. -- Source -- -- pack_pre.ads packag

[Ada] Crash on address clause involving controlled objects.

2015-10-20 Thread Arnaud Charlet
An address clause that overlays an object with a controlled object of a component of a controlled object is erroneous, and the compiler replaces the address clause with the corresponding raise statement. However, the analysis of the address clause must not terminate prematurely, so that the back-en

[Ada] Debug information for limited class-wide objects

2015-10-20 Thread Arnaud Charlet
This patch modifies the expansion of a build-in-place function call that initializes a class-wide limited object to generate the necessary debug information for the object. -- Source -- -- types.ads package Types is type Root_Type is tagged limited record I :

[Ada] Remove UET_Address attribute

2015-10-20 Thread Arnaud Charlet
This was an unused and internal-use only attribute. No testcase. Tested on x86_64-pc-linux-gnu, committed on trunk 2015-10-20 Tristan Gingold * sem_util.adb (Is_Protected_Self_Reference): Remove reference to UET_Address in comment. * sem_attr.adb (Check_Unit_Name): Adj

[Ada] Friendlier behavior for "=" and ":="

2015-10-20 Thread Arnaud Charlet
This patch avoids race conditions in certain cases. This is not necessary, because these cases are technically erroneous, but it seems friendlier to avoid races. Furthermore, previous versions of the containers avoided some of these races. No test available; no change in behavior for correct progr

[Ada] Discriminants and protected units

2015-10-20 Thread Arnaud Charlet
This patch implements the following SPARK RM rule: 7.1.3(5) - An effectively volatile type other than a protected type shall not have a discriminated part. -- Source -- -- discrims.ads package Discrims with SPARK_Mode is type Vol_1 (Discr : Natural) is null r

[Ada] Abort while processing "of" container loop

2015-10-20 Thread Arnaud Charlet
This patch classifies an "of" loop parameter as never needing finalization actions. -- Source -- -- vectors.ads with Ada.Unchecked_Deallocation; with Ada.Unchecked_Conversion; with System; generic type Element_Type is private; Small_Vector_Capacity : Natural :=

[Ada] Better recovery for misplaced keyword in discriminant specification

2015-10-20 Thread Arnaud Charlet
This patch improves the handling of an error in a discriminant specification for an access discriminant. Compiling b.ads must yield: b.ads:3:43: "constant" must appear after "access" --- package B is type Constant_Reference (D : constant access Integer) is null record with Implici

[Ada] Abort in front end client due to locked scope table

2015-10-20 Thread Arnaud Charlet
This patch reimplements the way the front end detects whether a type is a descendant of Ada.Synchronous_Task_Control.Suspension_Object to avoid using the RTSfind mechanism. This ensures that external clients of the front end will not fail due to a locked scope table accessed during analysis perform

[Ada] Uninitialized variable on illegal placement of aspect specification

2015-10-20 Thread Arnaud Charlet
This patch improves the handling of programs with illegal placement of aspect specifications, ensuring that the flag that controls the parsing of a list of declarations is properly set in the presence of errors. No simple test available. Tested on x86_64-pc-linux-gnu, committed on trunk 2015-10-

[Ada] Volatile functions

2015-10-20 Thread Arnaud Charlet
This patch implements SPARK volatile functions described by the following rules: A type is said to be effectively volatile if it is either a volatile type, an array type whose Volatile_Component aspect is True, or an array type whose component type is effectively volatile, a protected

[Ada] Crash in compile-only mode with dynamic predicates.

2015-10-20 Thread Arnaud Charlet
This patch fixes a compiler abort on a program with a type that has defined dynamic predicate and a call to a procedure with a parameter of that type, when the program is compiled with -gnatc. The following must compile quietly: gcc -c -gnatc p-q.adb --- with Unchecked_Conversion; package P is

[Ada] Spurious error in instantiation of formal package with attribute

2015-10-20 Thread Arnaud Charlet
When verifying that a function that is an actual of a formal package matches the corresponding function in the corresponding actual package, functions given by attributes must be handled specially because each of them ends up renaming a different generated body, and we must check that the attribute

[Ada] Improve error message for missing dependency item

2015-10-20 Thread Arnaud Charlet
This patch modifies the analysis of pragma Depends to emit a clearer message concerning a missing dependency item. -- Source -- -- message.ads package Message with Abstract_State => State, Initializes=> State, SPARK_Mode is procedure Proc (X : in

[Ada] Support for recording bind time environment info

2015-10-20 Thread Arnaud Charlet
This change adds support for recording a set of key=value pairs at the time an application is built (or more precisely at bind time), and making this information available at run time. Typical use case is to record a build timestamp: $ gnatmake record_build_time -bargs -VBUILD_TIME="`LANG=C date`"

[Ada] Do not inline No_Return procedures in GNATprove mode

2015-10-20 Thread Arnaud Charlet
Inlining in GNATprove mode is made to improve results of formal verification in GNATprove. It should not be done on procedures marked No_Return, which are handled specially in GNATprove. Tested on x86_64-pc-linux-gnu, committed on trunk 2015-10-20 Yannick Moy * inline.adb (Can_Be_Inli

[Ada] Avoid overflow in Write_Int

2015-10-20 Thread Arnaud Charlet
This patch avoids an overflow on the most-negative number in Output.Write_Int. No simple test available. Tested on x86_64-pc-linux-gnu, committed on trunk 2015-10-20 Bob Duff * output.adb (Write_Int): Work with negative numbers in order to avoid negating Int'First and thereby

[Ada] Pragma Constant_After_Elaboration

2015-10-20 Thread Arnaud Charlet
This patch allows for external tools that utilize the front end abstract syntax tree to querry for pragma Constant_After_Elaboration in the N_Contract node of a variable. No change in behavior, no need for a test. Tested on x86_64-pc-linux-gnu, committed on trunk 2015-10-20 Hristian Kirtchev

[Ada] Pragma Constant_After_Elaboration

2015-10-16 Thread Arnaud Charlet
This patch implements the legality rules of pragma Constant_After_Elaboration: The Boolean aspect Constant_After_Elaboration may be specified as part of the declaration of a library level variable. The semantic checks of this annotation cannot be performed by the compiler as this requires f

[Ada] Spurious error on SPARK_Mode in generic package instantiation

2015-10-16 Thread Arnaud Charlet
This patch modifies the generic instantiation to ensure that a context with a missing SPARK_Mode annotation is treated as having SPARK_Mode set to Off. This ensures that the following SPARK UG rule 9.4.1 Code where SPARK_Mode is Off shall not enclose code where Spark_Mode is On. However, if

[Ada] Check suppression in Ada.Containers

2015-10-16 Thread Arnaud Charlet
This patch implements two new check names (Container_Checks and Tampering_Check) that may be used with pragma Suppress. Suppressing Tampering_Check suppresses checks for "tampering with cursors" and "tampering with elements". If pragma Suppress(Tampering_Check) is in force at the point of instantia

[Ada] Minor cleanup in finalization support of the runtime

2015-10-16 Thread Arnaud Charlet
This removes a couple of redundant/unused things. No functional changes. Tested on x86_64-pc-linux-gnu, committed on trunk 2015-10-16 Eric Botcazou * a-tags.ads (Parent_Size): Remove obsolete pragma Export. * s-finmas.ads (Header_Offset): Delete. * s-finmas.adb (Heade

[Ada] Cleanups in inter-unit inlining engine

2015-10-16 Thread Arnaud Charlet
This removes a component in the record attached to every subprogram considered for inter-unit inlining, which doesn't serve any useful purpose. In addition, this fixes a small inconsistency in the code driving inter-unit inlining from the front-end. The code was at the same time discarding the su

[Ada] Optization of predicate checks

2015-10-16 Thread Arnaud Charlet
This patch marks the generated predicate functions as Pure, so that the back-end can optimize redundant calls to these functions when inlining and high level of optimization are requested. This is a performance enhancement, no change in behavior. Tested on x86_64-pc-linux-gnu, committed on trunk

[Ada] Crash on illegal program with -gnatf.

2015-10-16 Thread Arnaud Charlet
This patch fixes a crash in the compiler when reporting an error on an illegal prefixed call whose prefix is overloaded, one of its interpretations has an untagged type, and All_Errors_Mode is set. No short example available. Tested on x86_64-pc-linux-gnu, committed on trunk 2015-10-16 Ed Schon

[Ada] Premature finalization leads to wrong short circuit result

2015-10-16 Thread Arnaud Charlet
This patch modifies the expansion of expression_with_actions nodes to force the evaluation of the expression when its type is Boolean. This prevents "leaks" of dependencies on transient controlled objects which lead to incorrect results in short circuit operators. -- Source -- ---

[Ada] Improper initialization of elementary parameters in entry calls

2015-10-16 Thread Arnaud Charlet
The compiler was incorrectly default initializing entry call parameters in cases where the parameter is of an access type or of a scalar type whose Default_Value aspect is set. The access type case caused a problem for CodePeer in the case where the formal parameter is a null-excluding access type,

[Ada] Minimize the save/restore of Ghost_Mode

2015-10-16 Thread Arnaud Charlet
This patch minimizes the stack-like handling of global variable Ghost_Mode when processing Ghost code. The patch addresses references to Ghost entities within the expanded code for pragma Contract_Cases. Tested on x86_64-pc-linux-gnu, committed on trunk 2015-10-16 Hristian Kirtchev *

update in Ada maintainers

2015-10-16 Thread Arnaud Charlet
front end Geert Bosch -Ada front end Robert Dewar -Ada front end Arnaud Charlet +Ada front end Arnaud Charlet Ada front end Eric Botcazou c++Jason Merrill

[Ada] Missing inlining of init_proc

2015-10-16 Thread Arnaud Charlet
The compiler may eventually silently skip inlining a non-tagged record type init proc because internally the frontend forgets to processing it. This issue generally does not occur since as soon as the frontend processes some unit that has pragma Inline the internal machinery which takes care of suc

Re: [PING][PATCH] Fix warnings from including fdl.texi into gnat-style.texi

2015-08-24 Thread Arnaud Charlet
The Ada part is ok. Arno > On 24 Aug 2015, at 11:16, Tom de Vries wrote: > >> On 14-06-15 16:07, Tom de Vries wrote: >>> On 23/03/15 16:00, Gerald Pfeifer wrote: >>> On Fri, 20 Mar 2015, Tom de Vries wrote: > The gnat-style.texi part is OK. I cannot approve the fdl part though. Gerald,

Re: [PATCH] [Ada] Make the stack non-executable in GNAT tools

2015-08-17 Thread Arnaud Charlet
> Due to PR67205, the deeply nested instantiations require trampolines, > which in turn requires an executable stack for the GNAT tools on > architectures such as x86_64. > > Bootstrapped on x86_64-redhat-linux-gnu, and make check-ada > reports no unexpected failures. > > Okay for trunk? Yes. A

Re: [PATCH] PR ada/66242 Front-end error if exception propagation disabled

2015-06-15 Thread Arnaud Charlet
Simon, As discussed privately, your patch is interesting but isn't complete enough so cannot be integrated as is since we also want to avoid not only the generation of the initialization/finalization exception handlers, but also to eliminate the creation of the various variables that keep track of

Re: [patch] Implement Ada support for DragonFly, improve it for FreeBSD

2015-06-05 Thread Arnaud Charlet
Patch is OK. Arno >>> Is a new submission necessary or can this be handled by committer? >> Preferably yes. >>> A new submission will take me a few days because I'm traveling ATM. > > There was a significant amount of bitrot. Apparently right after I > submitted the patch, many macros were adj

Re: [patch] Implement Ada support for DragonFly, improve it for FreeBSD

2015-06-04 Thread Arnaud Charlet
> There was a significant amount of bitrot. Apparently right after I > submitted the patch, many macros were adjusted by Adacore hitting the > same files and copyrights as I did. I updated the patch set by hand and > tested it against the 31 may snapshot. I also fixed the > TOOLS_TARGET_PAIRS is

Re: [patch] Implement Ada support for DragonFly, improve it for FreeBSD

2015-06-03 Thread Arnaud Charlet
> Okay, so that means the Makefile.in patch needs changing in two ways: > 1. Don't remove TOOL_TARGET_PAIRS lines from two FreeBSD targets > 2. Add TOOL_TARGET_PAIRS line to new DragonFly target. Right. > Is a new submission necessary or can this be handled by committer? Preferably yes. > A n

Re: [patch] Implement Ada support for DragonFly, improve it for FreeBSD

2015-06-03 Thread Arnaud Charlet
> > Note 1) All TOOL_TARGET_PAIRS in gcc/ada/gcc-interface/Makefile.in > > should be removed for most (if not all) platforms as they were moved to > > gnattools/configure and are now no-ops. However, for this patch set I > > only removed them for FreeBSD. > > They are actually used if you config

[Ada] Avoid use of secondary stack

2015-05-28 Thread Arnaud Charlet
This patch avoids the use of the secondary stack, and the corresponding cleanup handlers, in many cases. For example, access discriminants no longer force functions to return on the secondary stack. This is a speed improvement. It is particularly relevant to the Ada.Containers. Tested on x86_64-pc

[Ada] Avoid use of secondary stack

2015-05-28 Thread Arnaud Charlet
This patch avoids the use of the secondary stack, and the corresponding cleanup handlers, in many cases. For example, access discriminants no longer force functions to return on the secondary stack. This is a speed improvement. It is particularly relevant to the Ada.Containers. Tested on x86_64-pc

[Ada] Visibility error of selected component in instance body

2015-05-28 Thread Arnaud Charlet
This patch fixes a spurious visibility error on a selected component in an instance body, when the type of the prefix of the selected component is an actual of the instance, and the desired component is inherited through one or more derivations The package derived.ads below must compile quietly:

[Ada] Speed improvements for controlled types

2015-05-28 Thread Arnaud Charlet
This patch changes the implementation of controlled types so that in simple cases, they are just as efficient as noncontrolled types where initialization and cleanup is done by hand. Tested on x86_64-pc-linux-gnu, committed on trunk 2015-05-27 Bob Duff * exp_ch3.adb (Build_Array_Init_

[Ada] Remove propagation of atomicity from object to type

2015-05-27 Thread Arnaud Charlet
This change removes an old trick which was propagating the Atomic (and now Volatile_Full_Access) setting from an object to a locally-defined type, in order to coax gigi into accepting more atomic objects. This trick is now obsolete since gigi should be able to rewrite the type of the objects to me

[Ada] Move generally useful utility subprograms to GNAT frontend

2015-05-26 Thread Arnaud Charlet
Some utility subprograms used in GNATprove were generally useful, and thus are better located in GNAT frontend than in GNATprove code. Tested on x86_64-pc-linux-gnu, committed on trunk 2015-05-26 Yannick Moy * inline.adb (Has_Initialized_Type): Adapt to new names. * sem_aux.ad

[Ada] Lift restriction on renaming with Volatile_Full_Access

2015-05-26 Thread Arnaud Charlet
An arbitrary restriction was imposed on renaming in conjunction with the new Aspect/Pragma Volatile_Full_Access for implementation reasons: the compiler was rejecting renamings of components of Volatile_Full_Access objects. It is lifted by this change and the following package must now be accepted

[Ada] Check violation of 6.20/3 in aggregates

2015-05-26 Thread Arnaud Charlet
This patch extends the machinery which detects dangerous order dependencies caused by out-mode parameters of Ada 2012 functions (AI-0144) to detect the error in array aggregates that have a nonstatic range (RM 6.20/3). The compiler now catches the error in the following sources: pragma Ada_2012;

[Ada] Spurious visiblity error on private subtype and inlined constructs

2015-05-26 Thread Arnaud Charlet
This patch fixes a visibility error on a subtype of a derived private type, when the enclosing unit is both the parent of an instantiated generic child unit, and contains an expression function that is automatically inlined. The following must compile and execute quietly: gnatmake -q main

[Ada] Ensure consistency of fpt exponentiation results

2015-05-26 Thread Arnaud Charlet
This change ensures on all targets that A**B = A**C when B is a small static constant in the range 0 .. 4 and C is a variable with the same value. Previously for Float and Long_Float on some targets, this was not the case. The results given were both within the error bounds that are allowed by the

[Ada] Implement -gnatd.k to suppress internal line numbers

2015-05-26 Thread Arnaud Charlet
The new debug switch -gnatd.k suppresses occurrences of line numbers within error messages referring to a location in an internal file. The following test normally compiles as follows (with -gnatj55) 1. with Ada.Text_IO; use Ada.Text_IO; 2. with Ada.Containers.Vectors; 3. procedure

[Ada] Preparatory work for solving exponentiation problem

2015-05-26 Thread Arnaud Charlet
Previously, A**B could give different results for float and long float depending on whether B was a small static constant in the range 2..4 or a variable with the same value. Although both values are valid, this discrepancy is undesirable, both for general use and in particular for formal analysis

[Ada] Allow new restriction pragmas in package System

2015-05-26 Thread Arnaud Charlet
This update allows the use of the following restrictions pragmas in package System: No_Specification_Of_Aspect No_Use_Of_Attribute No_Use_Of_Pragma Given a system.ads file containing the lines: pragma Restrictions (No_Use_Of_Pragma => Attach_Handler); pragma Restrictions (No_Specification_

[Ada] New aspect Disable_Controlled

2015-05-26 Thread Arnaud Charlet
This implements a new aspect Disable_Controlled which can only be used for controlled record types. It causes suppression of related calls to Initialize, Adjust, Finalize (for conditional compilation purposes). The following test: 1. with Ada.Finalization; use Ada.Finalization; 2. with

[Ada] Assertion expressions and policy Ignore

2015-05-26 Thread Arnaud Charlet
This patch ensures that assertion policy Ignore interacts properly with aspect Type_Invariant'Class. -- Source -- -- pack_type_invariant_class.ads pragma Assertion_Policy (Type_Invariant'Class => Ignore); package Pack_Type_Invariant_Class is type Priv_Typ is tagged

[Ada] Cleanup work in internal support for renaming (2)

2015-05-26 Thread Arnaud Charlet
As explained in the previous change, Remove_Side_Effects already knows to avoid renaming function calls in most cases and, more generally, to avoid renaming something that does not denote a name. But the implementation is a little ad-hoc and not bullet-proof, for example a function call subject to

[Ada] Improved performance of writable actuals aliasing detection

2015-05-26 Thread Arnaud Charlet
Cleanup the initial version of this patch. No further test needed. Tested on x86_64-pc-linux-gnu, committed on trunk 2015-05-26 Javier Miranda * sem_aggr.adb (Resolve_Aggregate, Resolve_Extension_Aggregate): Code cleanup. * sem_ch3.adb (Build_Derived_Record_Type,

[Ada] Cleanup work in internal support for renaming (1)

2015-05-26 Thread Arnaud Charlet
In Ada, the result of evaluating a function call is a constant object and, therefore, can be subject to a renaming. This is fully implemented in the compiler by creating a temporary to capture the return value, either in gigi for simple cases or in the front-end for more convoluted cases. The fro

[Ada] Improve performance of writable actuals aliasing detection

2015-05-25 Thread Arnaud Charlet
This patch improves the performance of the frontend machinery which detects dangerous order dependencies caused by out-mode parameters of Ada 2012 functions (AI05-0144). Tested on x86_64-pc-linux-gnu, committed on trunk 2015-05-25 Javier Miranda * einfo.ads, einfo.adb (Has_Out_Or_In_O

[Ada] Rename Has_Volatile_Full_Access into Is_Volatile_Full_Access

2015-05-22 Thread Arnaud Charlet
This is an internal change that renames the Has_Volatile_Full_Access flag into Is_Volatile_Full_Access for the sake of consistency with similar flags. No user-visible changes. Tested on x86_64-pc-linux-gnu, committed on trunk 2015-05-22 Eric Botcazou * einfo.ads (Has_Volatile_Full_Ac

[Ada] Make sure Volatile_Full_Access is treated like Atomic

2015-05-22 Thread Arnaud Charlet
This update makes sure that Volatile_Full_Access is treated like Atomic in all cases except checking specific RM legality rules, and controlling atomic synchronization. Tested on x86_64-pc-linux-gnu, committed on trunk 2015-05-22 Robert Dewar * exp_ch5.adb, layout.adb, einfo.adb, einf

[Ada] Internal crash on package instantation compilation unit

2015-05-22 Thread Arnaud Charlet
This patch updates the implementation of anonymous masters that support finalization actions of anonymous access-to-controlled type allocations to handle package instantiations that act as a compilation unit. -- Source -- -- q.ads package Q is type Obj_T is tagged nu

[Ada] Size should be zero for null range discrete subtype

2015-05-22 Thread Arnaud Charlet
The 'Size of a discrete subtype with a null range should be zero. The following test: 1. with Ada.Text_IO; use Ada.Text_IO; 2. procedure Static_Null_Range_Size is 3.subtype Static_Null_Range is 4. Integer range 5 .. 0; 5.Dummy : Static_Null_Range; 6. begi

[Ada] Small enhancement to unchecked conversion warning in -gnatf mode

2015-05-22 Thread Arnaud Charlet
In full warning mode, when an unchecked conversion is applied to types of different sizes, the compiler issues a warning describing the effects of the conversion on the additional or missing bits. When the source is smaller than the target, it was issuing a specific warning if the target is of a d

[Ada] Duplicate symbol xxxAM due to anonymous access allocation

2015-05-22 Thread Arnaud Charlet
This patch reimplements the generation of anonymous finalization masters used in servicing anonymous access-to-controlled type allocations. The modification prevents the generation of a duplicate anonymous master in certain cases. -- Source -- -- gen_pack.ads with Ada.

[Ada] Raise Program_Error on default initialization of references

2015-05-22 Thread Arnaud Charlet
This patch causes default initialization of objects of types Constant_Reference_Type and Reference_Type in the containers packages to raise Program_Error as required by the RM. Tested on x86_64-pc-linux-gnu, committed on trunk 2015-05-22 Bob Duff * a-cborma.ads, a-cidlli.ads, a-cimutr

[Ada] Cannot rename component of Volatile_Full_Access object

2015-05-22 Thread Arnaud Charlet
It is not allowed to rename a component of a composite object to which pragma Volatile_Full_Access has been applied. The following is compiled with -gnatj55 1. package RenamVFA is 2.type Int8_t is mod 2**8; 3.type Rec is record 4. A,B,C,D : Int8_t; 5.end r

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