Re: [Ada] convert GNAT doc to sphinx

2015-02-25 Thread Arnaud Charlet
> > Two .png files were missing, now added: > > > > 2015-02-22 Arnaud Charlet > > > > * doc/gnat_ugn/project-manager-figure.png, > > doc/gnat_ugn/rtlibrary-structure.png: New. > > The maintainer-scripts/update_web_d

Re: [Ada] convert GNAT doc to sphinx

2015-02-25 Thread Arnaud Charlet
> So you need to update the > find command therein not to remove anything that's part of the sources for > this documentation, and possibly update -I options for building manuals as > well. I've added a -I gcc/gcc/ada/doc/gnat_ugn there, that's as far as my knowledge goes for this script so I hope

Re: [Ada] convert GNAT doc to sphinx

2015-02-25 Thread Arnaud Charlet
> > I've added a -I gcc/gcc/ada/doc/gnat_ugn there, that's as far as my > > knowledge goes for this script so I hope this is enough. > > Well, since by default the find command deletes all files except those > known to be documentation sources, you need at least to change it not to > delete those

Re: [Ada] convert GNAT doc to sphinx

2015-02-26 Thread Arnaud Charlet
Thanks for your feedback, very useful! > How are you testing this? When getting the jit docs to work I had to > hack up the script somewhat to be able to test it on a development box > (e.g. to cut back "MANUALS" to just libcpp to speed up testing). That's a good question. Truth is that so far I

[Ada] Output of errors related to Pre'Class, Pre_Class, Post'Class, Post_Class

2015-03-02 Thread Arnaud Charlet
This patch takes advantage of the recently introduced mechanism that outputs special names _Pre and _Post to emit errors related to pre/postconditions. No change in behavior, no test. Tested on x86_64-pc-linux-gnu, committed on trunk 2015-03-02 Hristian Kirtchev * sem_prag.adb (Duplic

[Ada] Initial checkin for unnesting of subprograms

2015-03-02 Thread Arnaud Charlet
This is an initial checkin for the feature of unnesting subprograms in the front end (for use by alternate, non GCC backends). The documentation is complete, but the implementation checked in is only part of the final implementation, so no test needed yet. Tested on x86_64-pc-linux-gnu, committed

[Ada] Argument of pragma Depends has wrong source location

2015-03-02 Thread Arnaud Charlet
This patch ensures that the normalization mechanism which services aspects or pragmas Abstract_State, Contract_State, Depends, Global, Initializes, Refined_Depends, Refined_Global and Refined_State properly sets the source location of the first item. No change in behavior. No reproducer possible as

[Ada] Type_Invariant'Class on interface types

2015-03-02 Thread Arnaud Charlet
This new language feature allows Type_Invariant'class on interface types. When a type implements one or several interfaces, its inherited type invariant is the conjunction of all ancestor Type_Invariant'Class. The following package now compiles without errors: package AI12_0041 is type VIntf is

[Ada] Compiler hang with full inlining and use clause in parent private part

2015-03-02 Thread Arnaud Charlet
When compiling a descendant instance unit use_clauses in parent units are chained to simplify removal at end of compilation. Use_clauses that appear in the private part of parent are chained when compiling the private part of the descendant. To prevent circularities in the list, use_clauses in the

Re: [Ada] convert GNAT doc to sphinx

2015-03-03 Thread Arnaud Charlet
As discussed last year, we've converted the GNAT main documentation (gnat_rm.texi and gnat_ugn.texi) to reST/sphinx, so the master doc can now be found under gcc/ada/doc. there is an empty directory left in SVN: gcc/ada/doc/share/_static ok to remove? No, this (empty currently) directory

[Ada] Spurious runtime failure on Default_Initial_Condition

2015-03-04 Thread Arnaud Charlet
This patch ensures that the expression of pragma Default_Initial_Condition is verified against an object with default initialization. -- Source -- -- dic_pack.ads generic type Element_Typ is private; No_Element : Element_Typ; package DIC_Pack is type List (Ca

[Ada] Syntax error detection on Ghost abstract states

2015-03-04 Thread Arnaud Charlet
This patch modifies the analysis of pragma Abstract_State to detect a syntax error related to a state with a simple option. -- Source -- -- malformed_state.ads package Malformed_State with SPARK_Mode, Abstract_State => (State1, State2 => Ghost) is end Malforme

[Ada] Bounded string slice fails when passed superflat bounds

2015-03-04 Thread Arnaud Charlet
If a bounded string slice operation has a lower bound less than the higher bound minus one, the resulting length can be negative leading to failures and exceptions. The following must compile and execute cleanly: 1. with Ada.Strings.Bounded; use Ada.Strings.Bounded; 2. with Ada.Text_IO;

[Ada] Wrong runtime check on function returning interface type

2015-03-04 Thread Arnaud Charlet
For functions returning class-wide interface types the compiler may generate erroneous code implementing the Ada rule 6.5(8/3), thus causing an unexpected exception at runtime. After this patch the following test compiles and executes without errors. package Ifaces is type Iface is limited int

[Ada] Fix problem with unnesting of subprograms

2015-03-04 Thread Arnaud Charlet
The subprogram unnesting circuit did not properly handle the case where we are adding an ARECnF formal, and there are already extra formals present. This is fixed by now using the normal Extra_Formal circuit for adding the ARECnF formal. This also required significant repair to Sprint, which was no

[Ada] Clean up generation of FIRST/LAST temps for bounds

2015-03-13 Thread Arnaud Charlet
This is an internal change to the cleanup and simplify the generation of FIRST/LAST temporaries for subtype bounds. No test is needed since no functional effect on the behavior of the compiler. Tested on x86_64-pc-linux-gnu, committed on trunk 2015-03-13 Robert Dewar * exp_util.ads, e

[Ada] Preliminary work for aspect Unimplemented

2015-03-13 Thread Arnaud Charlet
This is some preliminary checkins for aspect Unimplemented. No functionality yet, so no test. Tested on x86_64-pc-linux-gnu, committed on trunk 2015-03-13 Robert Dewar * aspects.ads, aspects.adb: Add entries for aspect Unimplemented. * einfo.ads, einfo.adb (Is_Unimplemented):

[Ada] Add extra entity fields

2015-03-13 Thread Arnaud Charlet
This change is an internal change to add extra fields to each entity for future use. No functional effect. No test required. Tested on x86_64-pc-linux-gnu, committed on trunk 2015-03-13 Robert Dewar * einfo.adb, einfo.ads, atree.adb, atree.ads, atree.h: Add seventh component t

Re: [PATCH] Fix Ada bootstrap (PR bootstrap/65522)

2015-03-23 Thread Arnaud Charlet
> In any case, for compatibility, this patch just changes the guard so that > adadecode.c's ada_demangle is compiled only into libgnat*.{a,so} and not > into gnat1, which can then successfully link against libiberty > cplus-dem.o. > > The ipa-devirt.c change is obvious IMHO, the same header is inc

[Ada] New attribute typ'Deref (address-expr)

2015-03-24 Thread Arnaud Charlet
This attribute is equivalent to (atyp!(address-expr)).all where atyp is a general-access-to-typ type. Right now, only the front end changes are done. The back end needs to adapt to this change too. The following is a test which should compile and run silently 1. with System; use System;

Re: [PATCH, Ada] Fix powerpc-darwin bootstrap with gcc-trunk.

2015-03-29 Thread Arnaud Charlet
> Currently Ada bootstrap is broken for bootstrap compiler == gcc-trunk, and > platform == powerpc-darwin9 (although it is possible to bootstrap with > gcc-4.9). > > The reason is that generations of sinfo.h appears now to _require_ support > for atomics (I assume that's intended). No, that's def

Re: [PATCH, Ada] Fix powerpc-darwin bootstrap with gcc-trunk.

2015-03-29 Thread Arnaud Charlet
> (cd ada/bldtools/sinfo; gnatmake -q xsinfo ; ./xsinfo sinfo.h ) > raised PROGRAM_ERROR : s-atocou.adb:57 explicit raise > > Looking at this code, it indicates that it is a dummy implementation for > platforms without an atomic increment support. > > hence, I concluded (possibly erroneously) tha

Re: [PATCH, Ada] Fix powerpc-darwin bootstrap with gcc-trunk.

2015-03-29 Thread Arnaud Charlet
> So, FAOD, you're OK with my applying the patch to trunk for gcc-5? Yes, that's fine.

Re: [PATCH][ada][PR65490] Fix bzero warning in child_setup_tty

2015-03-31 Thread Arnaud Charlet
> OK for stage 4/stage1? > > Thanks, > - Tom > Fix bzero warning in child_setup_tty > > 2015-03-30 Tom de Vries > > PR ada/65490 > * terminals.c (child_setup_tty): Fix warning 'argument to sizeof in > bzero call is the same expression as the destination'. > --- > gcc/ada/t

Re: [PATCH][ada][PR65490] Fix bzero warning in child_setup_tty

2015-03-31 Thread Arnaud Charlet
> > - /* ensure that s is filled with 0 */ > > - bzero (&s, sizeof (&s)); > > + /* Ensure that s is filled with 0. */ > > Please keep the comment as is, we do not put dots on single partial sentences > (otherwise you would have to change these everywhere, and you and I do not > really want tha

Re: GNAT User's Guide /onlinedocs broken? (was: Broken links on gcc.gnu.org/onlinedocs)

2015-04-11 Thread Arnaud Charlet
tainer-scripts update_web_docs_svn as > follows last year, might this be related? > > 2014-08-01 Arnaud Charlet > >* update_web_docs_svn: Simplify build of gnat_ugn. > > Is the patch below a proper fix? Your patch looks good to me. > Index: index.html > ===

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] PR ada/64640: Fix Ada bootstrap under cygwin.

2015-01-19 Thread Arnaud Charlet
> this patch fixes the Ada bootstrap under cygwin-32. See PR ada/64640. > > Boot-strapped successfully under cygwin-32/XP. > OK for trunk? OK

Re: [Ada] Fix bootstrapping on darwin9/10 (PR ada/64349).

2015-01-20 Thread Arnaud Charlet
> Any news on when this might hit trunk? > - it is a bootstrap issue (although on older targets). Right, and you have local patches/a work around. I have been on paternity leave, so with no time to sync our changes (and with other priorities :-)). My next sync won't be before next week. Let us

Re: [PATCH] Fix ada bootstrap under cygwin-64

2015-01-27 Thread Arnaud Charlet
> this patch fixes the ada bootstrap under cygwin-64. > > Boot-strapped under x86_64-pc-cygwin. > OK for trunk? OK

[Ada] Wrong Finalize_Address leads to Segmentation_Fault

2015-01-30 Thread Arnaud Charlet
This patch reimplements a key aspect of heap-allocated controlled objects. Primitive Finalize_Address is now associated with the finalization master of an access-to-controlled type when the designated type is frozen and not at the point of object allocation. -- Source --

[Ada] Rejection of legal use of subp'Access within a generic body

2015-01-30 Thread Arnaud Charlet
When the Access attribute is applied within a generic body to a prefix that denotes a subprogram declared in an enclosing generic unit, the compiler rejects this as a violation of the rule in the last sentence of RM 3.10.2(32/3). This is happening because the compiler is requiring both the access t

[Ada] Improve message for condition always False (simple variable case)

2015-01-30 Thread Arnaud Charlet
The warning message for an always True condition special cased the simple variable case. This special casing is now extended for the False case as well: 1. package CCF_Warn is 2.procedure Mess; 3. end; 1. package body CCF_Warn is 2. type T is array (1..10) of Inte

[Ada] Improve error message of interface primitive overriding

2015-01-30 Thread Arnaud Charlet
This patch improves the text of the error reported for RM 9.4(11.9). This new output is visible using this small reproducer: procedure by30018 is package pack is type Iface is synchronized interface; procedure Prim1_1 (M : in Iface) is abstract; protected type T_PO is new If

[Ada] Fix bootstrapping on darwin9/10 (PR ada/64349)

2015-01-30 Thread Arnaud Charlet
Avoid possible warning on darwin during compiler build. Should hopefully close PR 64349, committed on trunk 2015-01-30 Tristan Gingold PR ada/64349 * env.c: Move vxworks and darwin includes out of #ifdef IN_RTS. Index: env.c ===

[Ada] Suppress Import-In-Pure-Unit warning if Pure_Function given

2015-01-30 Thread Arnaud Charlet
The warning for use of Import in a Pure unit is refined so that it is omitted if an explicit Pure_Function aspect is given, as shown by the following test, compiled with -gnatl 1. package PureImportF is 2. pragma Pure (PureImportF); 3.function F (A : integer) return integer;

[Ada] Obscure ambiguity involving user-defined operators returning Boolean

2015-01-30 Thread Arnaud Charlet
This patch fixes a rather obscure bug in case there is a user-defined "+" operator returning Boolean, passed to two contexts where the expected type is Boolean, and the expected type is the result of the PREdefined operator. This is ambiguous, and therefore illegal. gnatmake -q -f cutdown1-main.ad

[Ada] Fix bootstrapping on darwin9/10 (PR64349)

2015-02-05 Thread Arnaud Charlet
Move Darwin case before default one. Hopefully should be the last iteration on this PR, sorry about the confusion! Committed on trunk. 2015-02-05 Tristan Gingold PR ada/64349 * env.c: Fix thinko: handle Darwin case before default one. Index: env.c

[Ada] Poor error message on pragma SPARK_Mode

2015-02-05 Thread Arnaud Charlet
This patch modifies the mode conformance checks of pragma SPARK_Mode to account for the case where the pragma appears without an argument. -- Source -- -- pack.ads package Pack is procedure Error; end Pack; -- pack.adb package body Pack is procedure Error with

[Ada] Fix missing index check with optimization on

2015-02-05 Thread Arnaud Charlet
In some unusual cases, the index check on a subscript of an unconstrained array was omitted. The following test program 1. package Out_Constraint_Violation is 2.type Arr is array (Natural range <>) of Integer; 3.procedure Violate 4. (Input : Arr; Modifier : Arr; O

[Ada] Handle WHEN used in place of WITH nicely

2015-02-05 Thread Arnaud Charlet
This patch improves the error recovery when WHEN is used in place of WITH for aspect specifications: 1. package WhenWith is 2.X : integer when Size => 4; | >>> "when" should be "with" 3.Y : integer when Rubbish; |

[Ada] Record fatal errors in tree even in -gnatq/Q mode

2015-02-05 Thread Arnaud Charlet
This internal modification changes the representation of the Fatal_Error field in the unit record to record the presence of fatal errors even if -gnatq/Q is set. No functional effect for the compiler itself so no test now. This should allow an improvement in ASIS processing which will be documented

[Ada] Add optional argument for tool name to pragma Warnings

2015-02-05 Thread Arnaud Charlet
Users of GNATprove can now specify pragma Warnings for GNAT and GNATprove separately, to selectively disable warnings from the compiler or the formal verification tool. This also allows detecting useless pragma Warnings with switch -gnatw.w Tested on x86_64-pc-linux-gnu, committed on trunk 2015-0

[Ada] missing error on interface overriding

2015-02-05 Thread Arnaud Charlet
If an inherited subprogram is implemented by a protected function, then the first parameter of the inherited subprogram shall be of mode in, but not an access-to-variable parameter (RM 9.4(11/9) After this patch the error is reported in the following example: procedure by30015_01p is package

Re: Add CFLAGS_FOR_TARGET to Ada OS Constant Extraction Process

2015-02-10 Thread Arnaud Charlet
> When building Ada for RTEMS, you need to pass in the CFLAGS_FOR_TARGET > to see OS specific .h files. This was already done for the RTS but needed to > be added to the process which extracts value settings from the .h files. > > This patch is against 4.9. OK to apply to 4.8, 4.9, and head assum

[Ada] convert GNAT doc to sphinx

2015-02-20 Thread Arnaud Charlet
er integration with the GCC Makefiles. Not including the diff which is very large and not very interesting. Tested on x86_64-pc-linux-gnu, committed on trunk. 2015-02-20 Arnaud Charlet * gnat_rm.texi, gnat_ugn.texi: Now automatically generated from

[Ada] Allow pragma Inline_Always to overrule -fno-inline

2015-02-20 Thread Arnaud Charlet
Prior to this change, -fno-inline was stopping all the inlining unconditionally, even when requested with a pragma Inline_Always. This was inconsistent with the behavior of the "always_inline" gcc attribute, and this change fixes this. It also removes an internal shortcircuit which was preventing

[Ada] --RTS= specified several times for same runtime directory

2015-02-20 Thread Arnaud Charlet
When the compiler is invoked with several --RTS= switches, with different values designated the same runtime directory, the compiler reports an error that RTS cannot be specified several times. This patch fixes this problem. The test for this is to invoke the compiler with two switches --RTS=, one

[Ada] Fix internal error on inlining of renamed subprogram instantiation

2015-02-20 Thread Arnaud Charlet
This fixes an assertion failure in gigi triggered by an order-of-elaboration issue for the type of a parameter of a subprogram which is both the renaming of another subprogram and marked Inline. In this case the compiler was using expansion (aka front-end inlining) but this doesn't always play nic

[Ada] Wrong type conversion on access to limited-with interface

2015-02-20 Thread Arnaud Charlet
If the type of the operand of a type conversion is defined as an access to a class-wide interface type, and the target interface type is defined in a package visible at the point of declaration of the access type through a limited-with clause, then the compiler may silently skip generating code for

[Ada] Better error recovery for statement used in place of declaration

2015-02-20 Thread Arnaud Charlet
If a statement appears where a declaration is expected, then an appropriate error message is given, but the tree is malformed leading to a later crash if -gnatQ is used. The following should compile with -gnatQ without giving a "compilation abandoned" message: 1. procedure AssignInD is

[Ada] Non-preemptive dispatching

2015-02-20 Thread Arnaud Charlet
Make Non_Preemptive_FIFO_Within_Priorities a standard dispatching policy name as defined in RM D.2.4(2/2). Create the language-defined library package Ada.Dispatching.Non_Preemptive, as defined in RM D.2.4(2.2/3). This package is marked as unimplemented because no target environment supports it.

[Ada] Better error message for illegal Invariant'class aspect

2015-02-20 Thread Arnaud Charlet
Within the compiler class-wide aspects use a leading-underscore internal identifier. If the placement of the aspect is illegal, the error message must mention the original form of the aspect. Compiling class_a.ads must yield: class_a.ads:5:10: aspect "Type_Invariant_Class" only allowe

[Ada] use proper name for Type_Invariant'Class in messages

2015-02-20 Thread Arnaud Charlet
In some error messages, the aspect name Type_Invariant'Class appeared as Type_Invariant_Class, this is now fixed. The following is compiled with -gnatl -gnatj60: 1. package Class_Aspect is 2.type A_T is tagged private; 3.procedure P (Arg : Integer) with 4. Pre'Clas

[Ada] Indirect calls are always external

2015-02-20 Thread Arnaud Charlet
an indirect call through an access-to-protected-subprogram value is always considered an external call. This patch makes that happen (previously, the compiler was using internal calls in some cases). The following test should run to completion, silently. (Before the bug fix, it would hang, because

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

2015-02-22 Thread Arnaud Charlet
> While generating gnat-style.info, we see these warnings: > ... > src/gcc/doc/include/fdl.texi:33: warning: node `Index' is next for > `GNU Free Documentation License' in menu but not in sectioning > src/gcc/doc/include/fdl.texi:33: warning: node `Top' is up for `GNU > Free Documentation License'

Re: [Ada] convert GNAT doc to sphinx

2015-02-22 Thread Arnaud Charlet
> >2015-02-20 Arnaud Charlet > > > > * gnat_rm.texi, gnat_ugn.texi: Now automatically generated > > from > > sphinx in the doc directory. > > * doc: New directory containing sphinx versions of gnat_rm and > >

Re: [Ada] convert GNAT doc to sphinx

2015-02-22 Thread Arnaud Charlet
> Your patch removes these arguments to dircategory: > ... > $ git show bf5dffd3a47fe12ace71fe48e87cfb1b9ada1344 | grep dircategory > +@dircategory > -@dircategory GNU Ada tools > -@dircategory GNU Ada tools > +@dircategory > ... Well OK but these are automatically generated now, and this doesn't

Re: [Ada] convert GNAT doc to sphinx

2015-02-22 Thread Arnaud Charlet
> I didn't see a question here: > ... > As for the @dircategory I do not know, I couldn't find a proper documentation > for this node other than: > http://www.gnu.org/software/texinfo/manual/texinfo/html_node/Installing-Dir-Entries.html#index-dircategory > which is incomplete. > ... > > Could you

[Ada] Case variable from another project in an extended project

2014-10-30 Thread Arnaud Charlet
When a case variable is declared in another imported project and its project is itself extended, the Project Manager is confused and may crash or report incorrect errors. Tested on x86_64-pc-linux-gnu, committed on trunk 2014-10-30 Vincent Celier * prj-proc.adb (Process_Case_Construct

[Ada] Insertion of child into multiway tree yields bad cursor

2014-10-30 Thread Arnaud Charlet
This patch corrects the implementation of routine Insert_Child in the following multiway tree packages: Ada.Containers.Indefinite_Multiway_Trees Ada.Containers.Multiway_Trees As a result, Insert_Child no longer returns a faulty Position when inserting elements. -- Source -- --

[Ada] Prevent generation of gotos during inlining for GNATprove

2014-10-30 Thread Arnaud Charlet
In GNATprove mode, the special frontend inlining could generate gotos on return statements inside blocks, thus causing errors in GNATprove later. Now prevent inlining of such subprograms. Tested on x86_64-pc-linux-gnu, committed on trunk 2014-10-30 Yannick Moy * inline.adb (Has_Single

[Ada] Missing finalization of controlled function result

2014-10-30 Thread Arnaud Charlet
This patch modifies the finalization machinery to detect a subprogram call that returns a constrolled transient temporary in the context of a function call that returns an unconstrained result as part of the initialization expression of an object declaration. -- Source --

[Ada] Aspect/pragma Extensions_Visible

2014-10-30 Thread Arnaud Charlet
This patch implements aspect/pragma Extensions_Visible. This construct has the following rules: Extensions_Visible is a Boolean-valued aspect which may be specified for a subprogram. If directly specified, the aspect_definition shall be a static [Boolean] expression. The aspect is inherited by an

[Ada] Tag initialization in object declarations

2014-10-31 Thread Arnaud Charlet
When a tagged object is initialized in a declaration, the expression may involve a view conversion, so the tag must be re-assigned explicitly to the object in a separate step. This assignment can only take place after the object is frozen. If there is an address clause for the object following the

[Ada] Spurious error on component clause in generic unit

2014-10-31 Thread Arnaud Charlet
In ASIS mode the compiler creates and analyzes instance bodies in generic units and applies semantic checks on record components. Checks on staticness of components must not be applied to them, as they would not be in the standard compilation mode. The following must compile quietly: gcc -c -g

[Ada] Handling of implicit dereference in instantiations

2014-10-31 Thread Arnaud Charlet
The use of reference types and generalized indexing leads to multiple tree rewritings. When these uses are in a generic unit, the transformations are not propagated to instantiations, and the analysis of the instance must replicate that of the generic to recognize the presence of implicit dereferen

[Ada] Lift obsolete limitations for pragma Inline

2014-10-31 Thread Arnaud Charlet
This change lifts obsolete limitations for pragma Inline that have already been lifted for pragma Inline_Always, since they use the same machinery. Tested on x86_64-pc-linux-gnu, committed on trunk 2014-10-31 Eric Botcazou * inline.adb (Back_End_Cannot_Inline): Delete. (Add_In

[Ada] Calls to protected operations in pre/postcondition

2014-10-31 Thread Arnaud Charlet
A protected specification cannot contain calls to its own operations, except if the call appears within a pre- or postcondition for another protected operation. Executing: gnatmake -q -gnata prot prot must yield: Good call Bad call --- with Text_IO; use Text_IO; with Ada.Assertion

[Ada] Aspect Default_Storage_Pool

2014-10-31 Thread Arnaud Charlet
This aspect was not properly recognized by GNAT, even though the corresponding pragma was fully handled. Tested on x86_64-pc-linux-gnu, committed on trunk 2014-10-31 Ed Schonberg * aspects.ads, aspects.adb: Add aspect Default_Storage_Pool. * sem_ch13.adb (Analyze_One_Aspect):

[Ada] Inlining of calls to subprogram renamings

2014-10-31 Thread Arnaud Charlet
The compiler does not inline calls to entities which are subprogram renamings. This is visible by means of the following small reproducer; compiling the main unit without this patch the compiler reported a the warning indicating "inlining failed in call to R.Value" After this patch these sources a

[Ada] Remove unreachable inlining code

2014-10-31 Thread Arnaud Charlet
This removes unreachable code for back-end inlining in Expand_Call. No functional changes. Tested on x86_64-pc-linux-gnu, committed on trunk 2014-10-31 Eric Botcazou * exp_ch6.adb (Do_Inline): Remove unreachable code. (Do_Inline_Always): Likewise. Index: exp_ch6.adb

[Ada] Changes related to back-end inlining

2014-10-31 Thread Arnaud Charlet
This change affects only back-end inlining and is two-fold: 1. It lifts in a 3rd place the limitation associated with nested subprograms as well as with a couple of other constructs. After it is applied, the only significant limitation left are the nested packages. 2. It makes sure the errors ass

[Ada] Implementation of Default_Pool pragma

2014-10-31 Thread Arnaud Charlet
This patch adds missing semantic checks to the implementation of the Ada2012 aspect Default_Storage_Pool. Compiling bdb3dbm0.adb must yield: bdb3dbm0.adb:17:45: default storage pool must be a variable bdb3dbm0.adb:19:33: expected type "System.Storage_Pools.Root_Storage_Pool'CLASS"

[Ada] Derived type whose parent has a full view with access discriminants

2014-10-31 Thread Arnaud Charlet
An access discriminant has an anonymous access type whose scope is the enclosing package. If a derived type inherits access discriminants, their itypes needs to be referenced in the current scope before the bodies of primitive operations for the derived type are elaborated, to ensure that the first

[Ada] Missing check on interface primitives

2014-10-31 Thread Arnaud Charlet
The compiler does not not verify always that all the primitives of an interface type are abstract or null procedures. After this patch the following test is compiled with errors: package Pkg is -- Test 1 type IA is tagged; function Get_myB (Self : IA) return natural; type IA is inter

[Ada] New and updated library units for efficient and formal vectors

2014-10-31 Thread Arnaud Charlet
A new unit Ada.Containers.Formal_Indefinite_Vectors is introduced, which defines vectors possibly holding indefinite elements, such as classwide objects. The API of this new unit is based on the existing unit Ada.Containers.Formal_Vectors which has been simplified in favor of efficiency and provabi

[Ada] Handling of Default_Storage_Pool in generics and instantiations.

2014-10-31 Thread Arnaud Charlet
If there is a non-null default storage pool, a generic unit uses it for the allocators it may contain. At the point of instantiation, that default must be installed so that it applies to the allocators in the instance. This is achieved by adding an aspect specification Default_Storage_Pool to the

[Ada] Incorrect RM references on invalid uses of 'Access attribute.

2014-10-31 Thread Arnaud Charlet
The RM reference in the error message for a use of 'access whose prefix is not aliased mentioned the wrong paragraph in the RM. Compiling proc.adb must yield: proc.adb:6:03: object in prefixed call to "Q" must be aliased (RM 4.1.3 (13 1/2)) -- package P is type T is tagged null rec

[Ada] Switch -gnatp should have no effect in GNATprove mode

2014-10-31 Thread Arnaud Charlet
In GNATprove mode for formal verification, the presence or absence of switch -gnatp should have not effect. This was not the case, leading to missing proofs in GNATprove for overflow/range/division checks when -gnatp was used. Now fixed. Tested on x86_64-pc-linux-gnu, committed on trunk 2014-10-3

[Ada] Store the display name in the project node

2014-10-31 Thread Arnaud Charlet
The Display_Name of a project is now store in its project node instead of a hash table. No change of functionality. Tested on x86_64-pc-linux-gnu, committed on trunk 2014-10-31 Vincent Celier * prj-part.adb (Parse_Single_Project): Call Set_Display_Name_Of. * prj-proc.adb (Recu

[Ada] Fixed-point multiplication in with no floating point

2014-11-07 Thread Arnaud Charlet
In the general case, a multiplication of two fixed-point values that yield an integer type requires the use of floating point operations. When the types of the operands are identical it is possible to avoid their use by introducing a temporary of the same type, and performing a conversion to intege

[Ada] Ghost legality rules and SPARK_Mode

2014-11-07 Thread Arnaud Charlet
This patch decouples the semantic and legality rules of Ghost entities from the presence of aspect/pragma SPARK_Mode. This way non-SPARK code can utilize Ghost annotations. -- Source -- -- ghost_decl.ads package Ghost_Decl is X : Integer := 0 with Ghost; Y : Inte

[Ada] Rejecting properly illegal iterator

2014-11-07 Thread Arnaud Charlet
This patch removes an infinite loop in the compiler, when an Ada 2012 iterator is attempted over an object without proper iterable aspects, and the code is compiled in SPARK mode. Compiling iter.adb must yield: iter.adb:12:21: cannot iterate over "R" iter.adb:12:21: to iterate directly over the e

[Ada] Reject illegal null procedure

2014-11-07 Thread Arnaud Charlet
In Ada 2012 a null procedure can be a completion, but it cannot be the completion of a previous null procedure with the same profile Compiling p.adb must yield: p.adb:7:04: duplicate body for "Q" declared at p.ads:6 p.adb:12:04: duplicate body for "Q1" declared at p.ads:7 --- package P is

[Ada] Use of Ghost actuals in Ghost subprogram calls

2014-11-07 Thread Arnaud Charlet
This patch adds a check to ensure that the actual parameter of a Ghost subprogram call whose formal is of mode IN OUT or OUT is Ghost. -- Source -- -- ghost_procs.ads package Ghost_Procs is procedure In_Proc (Formal :Integer) with Ghost; procedure In_

[Ada] Lower severity of the program's return value in some common cases

2014-11-07 Thread Arnaud Charlet
In some common use cases, gnatls used to return E_Fatal error code, which was unfriendly for analysis. It has been changed as follows: "gnatls -v" and default runtime exists, or "gnatls -v --RTS=" - now returns E_Success "gnatls -v" and no default runtime exists - now returns E_Warnings "gnatls

[Ada] Workaround for PR ada/80590

2019-06-17 Thread Arnaud Charlet
s in gnat1 with this patch when compiling g-exptty.adb, g-locfil.adb, s-gloloc.adb and g-socthi.adb. Tom, if you could confirm that you are unblocked and can move forward on reenabling Ada on your builds, that'd be great, let me know. Committed on branches 8, 9 and trunk. 2019-06-17 Arnaud Ch

Re: [PING][PATCH 0/3] GNAT test suite fixes for build sysroot

2019-06-19 Thread Arnaud Charlet
> > In the course of setting up GCC regression testing for the RISC-V target > > I have discovered that the GNAT test suite does not correctly respond to > > the test environment settings passed from the test harness in my setup and > > consequently no test case works correctly. > > Ping for:

Re: [PING][PATCH 0/3] GNAT test suite fixes for build sysroot

2019-06-20 Thread Arnaud Charlet
> > Have you resolved your copyright assignment issues since then? > > The ball is now in FSF's court I'm told. OK > > The above patch needs to use "or else" instead of "or". OK with this change > > on the above patch. > > OK, I have updated that in my patch. > > Technically both variants o

Re: r272976 - in /trunk/gcc/ada: ChangeLog ali.adb ...

2019-09-04 Thread Arnaud Charlet
Maciej, > This change (not posted to `gcc-patches' for some reason) has caused a > regression in the form of a build failure with the `riscv-linux-gnu' > target (and for the record the `x86_64-linux-gnu' build/host running GCC > 8.3.0): > > ali.adb:34:28: warning: use clause for package "GNAT

Re: r272976 - in /trunk/gcc/ada: ChangeLog ali.adb ...

2019-09-05 Thread Arnaud Charlet
Maciej, Thank you for your comments, I definitely agree with you that the document is too well hidden and could be improved, I'll work on that and put the Ada build requirements in a single, easier to find place (probably the prerequisites since both you and I started from there). Can someone ple

Re: r272976 - in /trunk/gcc/ada: ChangeLog ali.adb ...

2019-09-05 Thread Arnaud Charlet
> Can someone please remind me in which repository I can find the GCC > prerequisites doc sources? Answering my own question: found it under gcc/doc/install.texi Working on it...

Re: r272976 - in /trunk/gcc/ada: ChangeLog ali.adb ...

2019-09-05 Thread Arnaud Charlet
> > Can someone please remind me in which repository I can find the GCC > > prerequisites doc sources? > > Answering my own question: found it under gcc/doc/install.texi > > Working on it... Just installed the following change on trunk, thanks again for your feedb

Re: r272976 - in /trunk/gcc/ada: ChangeLog ali.adb ...

2019-09-09 Thread Arnaud Charlet
> > Just installed the following change on trunk, thanks again for your > > feedback! > > > > 2019-09-05 Arnaud Charlet > > > > * doc/install.texi: Update and clarify requirements to build GNAT. > > > Hi Arnaud, > > It seems ther

Re: r272976 - in /trunk/gcc/ada: ChangeLog ali.adb ...

2019-09-10 Thread Arnaud Charlet
known-linux-gnueabihf/armv8l-unknown-linux-gnueabihf/gcc.git~master-stage2/gcc/HTML/gcc-10.0.0/gccinstall/index.html' > > > failed > > > > Hmm strange, the ref should be there: > > > Indeed, that's what I thought too Allright, there are already simila

Re: [PING^2][PATCH 0/3] GNAT test suite fixes for build sysroot

2019-09-16 Thread Arnaud Charlet
> > In the course of setting up GCC regression testing for the RISC-V target > > I have discovered that the GNAT test suite does not correctly respond to > > the test environment settings passed from the test harness in my setup and > > consequently no test case works correctly. > > Ping for:

Re: [Ada] Fix 32/64bit mistake on SYSTEM_INFO component in s-win32

2019-09-20 Thread Arnaud Charlet
> I'd keep the target list alphabetical. Can do so when the Solaris patch > goes in. > > Here's what I've successfully tested last night on both > i386-pc-solaris2.11 and sparc-sun-solaris2.11, shamelessly stolen from > the Linux counterparts. If it is acceptable, I'd add *-*-solaris2.* to > the

Re: [PATCH][GCC][mingw-w64][Ada] Fix Ada native bootstrap (PR81878).

2018-10-26 Thread Arnaud Charlet
> Bootstrapped on x86_64-pc-linux-gnu and mingw-w64-x86_64. > > Ok for trunk? OK, thanks.

Re: [PR81878]: fix --disable-bootstrap --enable-languages=ada, and cross-back gnattools build

2018-11-12 Thread Arnaud Charlet
> I've considered sourcing ada/config-lang.in from within > gnattools/configure, and testing lang_requires as set by it, so as to > avoid a duplication of tests that ought to remain in sync, but decided > it would be too fragile, as ada/config-lang.in does not expect srcdir > to refer to gnattools.

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