Re: [PATCH] [PR79542][Ada] Fix ICE in dwarf2out.c with nested func. inlining

2017-09-05 Thread Pierre-Marie de Rodat
On 09/04/2017 11:26 AM, Richard Biener wrote: No more pending issues and yes, I guess the fix is ok for the branch. Ok, thanks! This is now comitted on the 7 release branch. -- Pierre-Marie de Rodat

Re: [PATCH v2] Python testcases to check DWARF output

2017-09-06 Thread Pierre-Marie de Rodat
dback. :-) -- Pierre-Marie de Rodat

[PATCH] [PR82155] Fix crash in dwarf2out_abstract_function

2017-09-11 Thread Pierre-Marie de Rodat
Hello, This patch is an attempt to fix the crash reported in PR82155. When generating a C++ class method for a class that is itself nested in a class method, dwarf2out_early_global_decl currently leaves the existing context DIE as it is if it already exists. However, it is possible that this cal

Re: [PATCH] [PR79542][Ada] Fix ICE in dwarf2out.c with nested func. inlining

2017-05-26 Thread Pierre-Marie de Rodat
was still allowed in gen_typedef_die. So here’s the update patch: bootstrapped and regtested fine on x86_64-linux. -- Pierre-Marie de Rodat >From 334338c3ac5dbdeb3981a6302259d0be0b5efc11 Mon Sep 17 00:00:00 2001 From: Pierre-Marie de Rodat Date: Tue, 9 May 2017 12:24:36 +0200 Subject: [PATCH] [P

[PATCH 2/2] DWARF: make it possible to emit debug info for declarations only

2017-05-29 Thread Pierre-Marie de Rodat
Hello, The DWARF back-end used to systematically ignore file-scope function and variable declarations. While this is justified in language like C/C++, where such declarations can appear in several translation units and thus bloat uselessly the debug info, this behavior is counter-productive in la

[PATCH 1/2] gimplify_modify_expr: avoid DECL_DEBUG_EXPR links across functions

2017-05-29 Thread Pierre-Marie de Rodat
Hello, An upcoming patch exposes a bug in gimplify_modify_expr. There, we try not to create DECL_DEBUG_EXPR links across functions, however we don't check that *FROM_P actually belongs to the current function before modifying it. This patch fixes this oversight. Bootstrapped and regtested on x8

Re: [PATCH 2/2] DWARF: make it possible to emit debug info for declarations only

2017-05-29 Thread Pierre-Marie de Rodat
On 05/29/2017 09:50 AM, Pierre-Marie de Rodat wrote: Bootstrapped and reg-tested on x86_64-linux. Ok to commit? Thank you in advance! I just realized that I forgot to add the testcase: here it is, sorry! -- Pierre-Marie de Rodat -- { dg-options "-cargs -g -dA -margs" } -- { dg-fi

[PATCH] DWARF: for variants, produce unsigned discr. when debug type is unsigned

2017-05-30 Thread Pierre-Marie de Rodat
Hello, In Ada, the Character type is supposed to be unsigned. However, depending on the sign of C char types, GNAT can materialize it as a signed type for code generation purposes. When this is the case, GNAT also attach a debug type to it so it is represented as an unsigned base type in the deb

Re: [PATCH 1/2] gimplify_modify_expr: avoid DECL_DEBUG_EXPR links across functions

2017-05-30 Thread Pierre-Marie de Rodat
On 05/30/2017 01:51 PM, Richard Biener wrote: Ok. Thank you! This one is committed, now. -- Pierre-Marie de Rodat

Re: [PATCH 2/2] DWARF: make it possible to emit debug info for declarations only

2017-05-30 Thread Pierre-Marie de Rodat
. :-) -- Pierre-Marie de Rodat

Re: [PATCH 2/2] DWARF: make it possible to emit debug info for declarations only

2017-05-31 Thread Pierre-Marie de Rodat
. I’ll give a try to the first option, then. :-) -- Pierre-Marie de Rodat

Re: [PATCH] DWARF: for variants, produce unsigned discr. when debug type is unsigned

2017-06-01 Thread Pierre-Marie de Rodat
On 05/31/2017 10:34 PM, Jason Merrill wrote: OK. Jason Committed. Thank you! -- Pierre-Marie de Rodat

[PATCH] DWARF: add DW_AT_location for global decls with DECL_VALUE_EXPR

2017-06-01 Thread Pierre-Marie de Rodat
Hi, In GNAT, we materialize renamings that cannot be described in standard DWARF as synthetic variables that describe how to fetch the renamed object. Look for "___XR" in gcc/ada/exp_dbug.ads for more details about this convention. In order to have a location for these variables in the debug inf

Re: [PATCH] DWARF: add DW_AT_location for global decls with DECL_VALUE_EXPR

2017-06-01 Thread Pierre-Marie de Rodat
On 06/01/2017 03:53 PM, Richard Biener wrote: Ok. Richard. Committed. Thank you, Richard! -- Pierre-Marie de Rodat

Re: [PATCH] DWARF: make signedness explicit for enumerator const values

2017-01-02 Thread Pierre-Marie de Rodat
on x86_64-linux (GCC+GDB). -- Pierre-Marie de Rodat >From 9b31876c85248817a62d78e1fb7133f610b6555f Mon Sep 17 00:00:00 2001 From: Pierre-Marie de Rodat Date: Mon, 19 Dec 2016 16:01:52 +0100 Subject: [PATCH] DWARF: add DW_AT_encoding attributes for DW_TAG_enumeration_type DIEs Current

Re: [PATCH] DWARF: make signedness explicit for enumerator const values

2017-01-03 Thread Pierre-Marie de Rodat
On 01/02/2017 06:29 PM, Jakub Jelinek wrote: Just a formatting nit, TYPE_UNSIGNED (type) doesn't need to be wrapped in ()s. No need to repost. Done and committed as r244015. Thank you! -- Pierre-Marie de Rodat

Re: [PATCH] Fix DW_AT_data_member_location/DW_AT_bit_offset handling (PR debug/78839)

2017-01-12 Thread Pierre-Marie de Rodat
ral lines below. Is it to avoid the conversions to tree/wide int/HOST_WIDE_INT (i.e. an optimization)? -- Pierre-Marie de Rodat

[PING][PATCH][PR79542][Ada] Fix ICE in dwarf2out.c with nested func. inlining

2017-03-22 Thread Pierre-Marie de Rodat
Hello, This is a ping for the patch I posted there: <https://gcc.gnu.org/ml/gcc-patches/2017-03/msg00725.html>. Thank you! -- Pierre-Marie de Rodat

[PING*2][PATCH][PR79542][Ada] Fix ICE in dwarf2out.c with nested func. inlining

2017-04-20 Thread Pierre-Marie de Rodat
Hello, I would like to ping for the patch I posted there: <https://gcc.gnu.org/ml/gcc-patches/2017-03/msg00725.html>. Thank you! -- Pierre-Marie de Rodat

[Ada] Undefined symbol at link time due to Disable_Controlled

2017-09-13 Thread Pierre-Marie de Rodat
This patch reimplements aspect Disable_Controlled to plug the following holes in its original implementation: * The aspect may appear without an expression in which case the aspect defaults to True, however the compiler would crash due to the lack of expression. * If the expressio

[Ada] Ineffective pragma Suppress (Alignment_Check) on warning

2017-09-13 Thread Pierre-Marie de Rodat
On platforms that require strict alignment of memory accesses, the per-object form of pragma Suppress (Alignment_Check) also disables the alignment warning associated with the check. That's not the case for the global form and this change fixes the inconsistency. Here's an example on a small pack

[Ada] vxworks: auto-registration of foreign threads

2017-09-13 Thread Pierre-Marie de Rodat
To make Ada tasks and C threads interoperate better, we have added some functionality to Self. Suppose a C main program (with threads) calls an Ada procedure and the Ada procedure calls the tasking runtime system. Eventually, a call will be made to self. Since the call is not coming from an Ada tas

[Ada] Review dependency tracking for Ada sources without -gnatd.n support

2017-09-13 Thread Pierre-Marie de Rodat
support the -gnatd.n flag. Tested on x86_64-pc-linux-gnu, committed on trunk. 2017-09-13 Nicolas Roche * Make-lang.in: In the fallback mechanim, parse the associated .ali file and try to guess the locations of dependencies. -- Pierre-Marie de Rodat Index: gcc/ada/gcc-interface

[PATCH] Add comments to struct cgraph_thunk_info

2017-09-14 Thread Pierre-Marie de Rodat
Hello, This commit adds comments to fields in the cgraph_thunk_info structure declaration from cgraph.h. They will hopefully answer questions that people like myself can ask while discovering the thunk machinery. I also made an assertion stricter in cgraph_node::create_thunk. I'm adding Nathan i

Re: [PATCH] Add comments to struct cgraph_thunk_info

2017-09-15 Thread Pierre-Marie de Rodat
more comments anyway as I’ve learned more about this since yesterday. ;-) -- Pierre-Marie de Rodat

Re: [PATCH] Add comments to struct cgraph_thunk_info

2017-09-15 Thread Pierre-Marie de Rodat
On 09/15/2017 12:54 PM, Pierre-Marie de Rodat wrote: I’m not super confident about this though, so I’ll resubmit a patch without the reordering: I’ve added more comments anyway as I’ve learned more about this since yesterday. ;-) Here it is! -- Pierre-Marie de Rodat >F

Re: [PATCH] Add comments to struct cgraph_thunk_info

2017-09-15 Thread Pierre-Marie de Rodat
On 09/15/2017 06:10 PM, Jeff Law wrote: OK. jeff Committed. Thanks! -- Pierre-Marie de Rodat

Re: [PATCH] Add comments to struct cgraph_thunk_info

2017-09-17 Thread Pierre-Marie de Rodat
the virtual one. */ bool virtual_offset_p; -- Pierre-Marie de Rodat

[Ada] Allow generic package holding state

2017-09-18 Thread Pierre-Marie de Rodat
SPARK RM 7.2.6(5) allows the hidden state of a generic package to be Part_Of the state of the generic package. This was not properly supported. Now fixed. The following code compiles without errors. $ gcc -c gen.ads 1. generic 2. J : Integer; 3. package Gen with 4. SPARK_Mode => On,

[Ada][PR ada/71358] GNAT.Command_Line: crash in Getopt on empty Config

2017-09-18 Thread Pierre-Marie de Rodat
This patch revisits the fix for a bug in GNAT.Command_Line.Getopt: instead of checking everywhere that an pointer is not null, we allocate a dummy object and remove all null pointer checks. Tested on x86_64-pc-linux-gnu, committed on trunk 2017-09-18 Bob Duff Alternate fix for PR ada/

[Ada] Spurious unreferenced warning in pramga Linker_Section

2017-09-18 Thread Pierre-Marie de Rodat
This patch corrects an issue whereby actuals within the aspect/pragma Linker_Section were incorrectly flagged as unreferenced causing spurious warnings when compiling with -gnatwu. Pramga_Linker_Section is now correctly classified within the Sig_Flags table as significant correcting this behavior.

[Ada] Crash on illegal current instance

2017-09-18 Thread Pierre-Marie de Rodat
If the type_mark of a qualified_expression refers to the current instance of the type, do not crash; instead give a proper error message. This is illegal by RM-8.6(17). The following test should get an error: current_instance_default.ads:2:54: current instance not allowed package Current_Instanc

[Ada] Crash on mutable record component with box initialization

2017-09-18 Thread Pierre-Marie de Rodat
This patch fixes a compiler abort on a record declaration that includes a mutable record component whose default value is an aggregate that includes a box-initialized component whose value depends on a discriminant of the component. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ 2017

[Ada] Scalar_Storage_Order support in conjunction with overlay

2017-09-18 Thread Pierre-Marie de Rodat
Toggling the scalar storage order by means of type punning or aliasing is not supported in the general case, but it might be reasonable to support simple overlays precisely used to test the effect of the attribute. The following procedure must give the same output at all optimization levels: with

[Ada] Implicit_Dereference with access to access and prefix notation

2017-09-18 Thread Pierre-Marie de Rodat
Fix a bug in which a call of the form X.Y (the prefix notation of Y(X)) where X is of a reference type (i.e. a type with the Implicit_Dereference aspect specified), and the access discriminant of X has a designated type that is also an access type, incorrectly gets compilation errors. Tested on x8

[Ada] Iterable aspect of derived types

2017-09-18 Thread Pierre-Marie de Rodat
This patch avoids incorrect compilation errors if a derived type has a parent type for which the Iterable aspect is specified, and a "for ... of" loop is used on an object of the derived type. The following test should compile quietly. gcc -c seqs-main.adb package Seqs is type Container is nu

[Ada] Validity check failure with packed array and pragma

2017-09-18 Thread Pierre-Marie de Rodat
Fix a bug in which if validity checking is enabled, Initialize_Scalars is enabled, optimization is turned on, and inlining is enabled, the initialization of a packed array can cause Constraint_Error to be incorrectly raised. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ 2017-09-18

[Ada] Undefined symbol due to pragma Inline_Always

2017-09-18 Thread Pierre-Marie de Rodat
This patch modifies the semantics of pragma Inline_Always to require that the pragma appears on the initial declaration of the related subprogram. This rule ensures that the back end will properly carry out the "always" semantic of the pragma, regardless of whether a call to the related subprogram

[Ada] Ravenscar simple barriers and validity checks

2017-09-18 Thread Pierre-Marie de Rodat
If validity checks are enabled in Ravenscar mode, avoid incorrect error messages complaining that simple barriers are not simple. Tested on x86_64-pc-linux-gnu, committed on trunk 2017-09-18 Bob Duff * exp_ch9.adb (Is_Simple_Barrier_Name): Follow Original_Node, in case validit

[Ada] Spurious error in ASIS on static predicate aspects/

2017-09-18 Thread Pierre-Marie de Rodat
This patch fixes an error in ASIS mode when processing queries on a static predicate for an enumeration type that involves a case expression. Tested on x86_64-pc-linux-gnu, committed on trunk 2017-09-18 Ed Schonberg * sem_ch3.adb (Analyze_Declarations): In ASIS mode, At the end of t

[Ada] Spurious error with unqualified aggregate in instantiation.

2017-09-18 Thread Pierre-Marie de Rodat
When an aggregate appears without an explicit qualification in a generic unit, the compiler builds a qualified expression for it, using the type of the aggregate and when possible the scope of that type, so that both of these entities are properly resolved in an instantiation. This patch verifies t

[Ada] Fix spurious error on component of overloaded function result

2017-09-18 Thread Pierre-Marie de Rodat
This fixes a weird error given by the compiler on an access attribute applied to the component of the result of a function call, if the called function returns an access type designating a record containing the component declared as aliased, and is overloaded with another function returning another

Re: [Ada] Validity check failure with packed array and pragma

2017-09-18 Thread Pierre-Marie de Rodat
c/testsuite/ or is it fine if I just keep the current “New testcase.”? -- Pierre-Marie de Rodat

Re: [Ada] Validity check failure with packed array and pragma

2017-09-19 Thread Pierre-Marie de Rodat
On 09/18/2017 10:09 PM, Eric Botcazou wrote: I'm not sure anyone really cares so it's up to you I'd say. Ok, thanks. Done! Committed as r252971. -- Pierre-Marie de Rodat

Re: [PATCH][2/2] early LTO debug, main part

2017-09-21 Thread Pierre-Marie de Rodat
On 09/20/2017 08:08 PM, Jeff Law wrote: As for general DWARF5 testing, I think best coverage is GDB (say guality testing with -gdwarf-5), I think GDB 8.0 should have the needed support. I'll try to install it (am only at 7.12.1 right now) and try to do some testing. > What about Pierre

[Ada] Use the Monotonic Clock on Linux

2017-09-25 Thread Pierre-Marie de Rodat
The monotonic clock epoch is set to some undetermined time in the past (typically system boot time). In order to use the monotonic clock for absolute time, the offset from a known epoch is calculated and incorporated into timed delay and sleep. Tested on x86_64-pc-linux-gnu, committed on trunk 2

[Ada] Improve performance of 'Image with enumeration types.

2017-09-25 Thread Pierre-Marie de Rodat
This patch improves the performance of the code generated by the compiler for attribute Image when applied to user-defined enumeration types and the sources are compiled with optimizations enabled. No test required. Tested on x86_64-pc-linux-gnu, committed on trunk 2017-09-25 Javier Miranda

[Ada] Remove duplicated Has_Null_Abstract_State routines

2017-09-25 Thread Pierre-Marie de Rodat
Cleanup only; semantics unaffected. Tested on x86_64-pc-linux-gnu, committed on trunk 2017-09-25 Piotr Trojanek * sem_util.adb (Has_Null_Abstract_State): Remove, as an exactly same routine is already provided by Einfo. * einfo.adb (Has_Null_Abstract_State): Replace wit

[Ada] Spurious visibility error in ASIS mode

2017-09-25 Thread Pierre-Marie de Rodat
In ASIS mode we resolve the expressions in aspect specifications to provide sufficient semantic information, including entities and types of identifiers. The tree traversal that performs this resolution must omit identifiers that are selector names of parameter associations in calls, because these

[Ada] Entry family selector not recognised as entity usage

2017-09-25 Thread Pierre-Marie de Rodat
This patch corrects an issue whereby index actuals in calls to entry families were not being properly flagged as referenced leading to spurious warnings when compiling with -gnatwu. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ 2017-09-25 Justin Squirek * sem_res.adb (Re

[Ada] Proper qualification of concurrent discriminants

2017-09-25 Thread Pierre-Marie de Rodat
This patch modifies resolution to perform minor expansion for SPARK in order to properly qualify concurrent discriminants used as defaulted actuals in calls. -- Source -- -- p.ads package P is protected type PT (D : Integer) is procedure Dummy (Arg : Integer :

[Ada] Minor clean up of contract freezing

2017-09-25 Thread Pierre-Marie de Rodat
This patch updates the analysis of Refined_State triggered by contract freezing to raise a more suitable exception when compilation has to be halted. -- Source -- -- pack.ads package Pack with Abstract_State => State is function F return Boolean with Global => Sta

[Ada] Use of renamings in pragmas

2017-09-25 Thread Pierre-Marie de Rodat
This patch suppresses the transformation of references to renamings into references to renamed names when the reference appears within a pragma of no significance to SPARK. -- Source -- -- uname.adb procedure Uname is type Bounded_String is record Length : Nat

[Ada] Crash on instantiation with renamed formal package.

2017-09-25 Thread Pierre-Marie de Rodat
This patch fixes a compiler abort on a package instantiation when the corresponding generic has a formal package, and the instantiation has an actual that renames the desired package instance. The following must compile quietly: gcc -c mc.adb --- package MC is procedure Dump_States; end MC;

[Ada] Default to no source locations in non-GCC backend bug boxes

2017-09-25 Thread Pierre-Marie de Rodat
Default to "No source file position information available" message for bug boxes emitted from the non-GCC backends. No test provided, because this only affects bug boxes. Tested on x86_64-pc-linux-gnu, committed on trunk 2017-09-25 Piotr Trojanek * adabkend.adb (Call_Back_End): Reset

[Ada] Crash on classwide precondition for interface operation

2017-09-25 Thread Pierre-Marie de Rodat
This patch fixes a crash on a classwide precondition on an interface primitive with an controlling access parameter, when the precondition is a call that contains a reference to that formal. The following must execute quietly: gnatmake -q main main --- with Conditional_Interfaces; with Con

[Ada] Insert explicit dereference in GNATprove mode for pointer analysis

2017-09-25 Thread Pierre-Marie de Rodat
Safe pointer analysis in GNATprove mode depends on explicit dereferences being present in the tree. Insert them where needed on access to components in the special expansion performed in GNATprove mode. The following code is now analysed without errors in GNATprove mode (with -gnatd.F) with the sp

[Ada] Handle errors and limit simultaneous wait objects number in win32_wait

2017-09-25 Thread Pierre-Marie de Rodat
Everything is in the subject. Tested on x86_64-pc-linux-gnu, committed on trunk 2017-09-25 Vasiliy Fofanov * adaint.c (win32_wait): Properly handle error and take into account the WIN32 limitation on the number of simultaneous wait objects. Index: adaint.c ===

[Ada] Do not insert calls to invariant procedure in GNATprove mode

2017-09-25 Thread Pierre-Marie de Rodat
GNATprove handles specially invariant checks, and so does not expect to see calls to invariant procedures in the AST. This patch fixes the two places where such calls were inserted during semantic analysis, so that calls are only inserted when not in GNATprove mode. Possibly the same could be done

[Ada] Crash on an aspect specification with parameter associations

2017-09-25 Thread Pierre-Marie de Rodat
This patch fixes a compiler abort in ASIS mode on an aspect specification whose expression is a function call with parameter associations. The following must compile quietly: gcc -c -gnatct p.adb --- with System; procedure P is type T is new Integer; package Obj is Buf : T := 1234; en

Re: [PATCH] [PR82155] Fix crash in dwarf2out_abstract_function

2017-09-25 Thread Pierre-Marie de Rodat
On 09/25/2017 01:54 PM, Richard Biener wrote: Ok for trunk and gcc-7 branch after a while. Thank you, Richard! Committed on trunk as 253147; I’ll wait at least one week to revisit the gcc-7 branch commit. -- Pierre-Marie de Rodat

Re: [Ada] Use the Monotonic Clock on Linux

2017-09-26 Thread Pierre-Marie de Rodat
ch3 -- Pierre-Marie de Rodat

Re: [Ada] Improve performance of 'Image with enumeration types.

2017-09-26 Thread Pierre-Marie de Rodat
this instance of inlining is a win for both performance and code size, so it’s a good candidate even for -Os. Note that we inline string concatenation routines for the same reason. -- Pierre-Marie de Rodat

[Ada] Spurious error in nested generic containing expression function

2017-09-29 Thread Pierre-Marie de Rodat
This patch removes spurious visibility errors from the instantiation of a generic package nested within another generic, when the inner package contains an expression function that is the completion of a visible function of that package, and the expression includes an object of a tagged type local

[Ada] Compiler hangs on evaluation of use-clause within package context

2017-09-29 Thread Pierre-Marie de Rodat
Due to the installation order of packages within a context clause it is possible to create circularities within the Prev_Use_Clause clain. This patch corrects this issue by identifying this case through the use of an extra check. Tested on x86_64-pc-linux-gnu, committed on trunk 2017-09-29 Justi

[Ada] Pragma Unchecked_Union on derived discriminated type

2017-09-29 Thread Pierre-Marie de Rodat
The compiler reports an spurious error processing a derived type of a non-tagged record type that has discriminants, pragma Unchecked_Union and pragma Convention C. After this patch the following test compiles silently. procedure Conversion is type small_array is array (0 .. 2) of Integer;

[Ada] Copy of Unchecked_Union derived discriminated types

2017-09-29 Thread Pierre-Marie de Rodat
The compiler crashes processing an assignment to a discriminated record type that has pragma Unchecked_Union and Convention C and is a derivation of a non-tagged record type with discriminants. After this patch the following test compiles silently. procedure Conversion is type small_array is a

[Ada] Crash on illegal use of iterated component association

2017-09-29 Thread Pierre-Marie de Rodat
An iterated component association is an Ada2020 extension that simplifies the construction of array aggregates. This patch properly rejects the use of this construct as a named association in an aggregate for a record type. compiling gcc -c -gnat2020 klurigt-m2.adb must yield: klurigt-m2.

[Ada] Build in place for nonlimited types

2017-09-29 Thread Pierre-Marie de Rodat
First cut at build-in-place for nonlimited types. This is a work in progress; the build-in-place support is currently disabled. Tested on x86_64-pc-linux-gnu, committed on trunk 2017-09-29 Bob Duff * exp_ch6.adb (Expand_Call_Helper): Handle case of build-in-place functions ret

[Ada] Misleading warning when no read access for source file

2017-09-29 Thread Pierre-Marie de Rodat
This patch corrects an issue whereby source files that did not have read permissions were incorrectly referred to as "not found'. Now, these different cases are explicitly identified and warned about properly. -- Source -- -- toto.c void toto(void) { } -- hello.adb

[Ada] Avoid single colon in comment markup

2017-09-29 Thread Pierre-Marie de Rodat
This change allows our style-checker to implement a heuristic to detect either only typed one ':' or mistyped one of the characters, causing the entire markup block to disappear as it is then unexpectedly being treated as a comment instead. Tested on x86_64-pc-linux-gnu, committed on trunk 2017-0

[Ada] Crash on actual that is an instance of a generic child unit

2017-10-09 Thread Pierre-Marie de Rodat
This patch fixes a compiler abort on an instantiation where the actual for a formal package is an instantiation of a generic child unit. An instantiation freezes its actuals, and in the case of formal packages whose instance includes a body the back-end needs an explicit freeze node for the actual.

[Ada] Crash on validity check on actual with type conversion

2017-10-09 Thread Pierre-Marie de Rodat
This patch fixes a compiler crash on a function call when validity checks on actuals are enabled (-gnatVi) and the target type is a scalar type. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ 2017-10-09 Ed Schonberg * exp_attr.adb (Expand_Attribute_Reference, case 'Valid)

[Ada] Warnings for ineffective use clauses unclear

2017-10-09 Thread Pierre-Marie de Rodat
This patch modifies the warnings denoting ineffective use-clauses to be more explicit and user-friendly. -- Source -- -- unused_a.adb with Ada.Text_IO; with Interfaces; procedure Unused_A is use type Interfaces.Unsigned_8; begin Ada.Text_IO.Put_Line ("Hello, Wor

[Ada] Detect protected types as program units

2017-10-09 Thread Pierre-Marie de Rodat
Routine Unit_Declaration_Node now recognizes protected types as program units and returns their declaration nodes; previously it returned declaration nodes of the enclosing program units. This was an oversight. -- Source -- -- illegal.ads package Illegal with SPARK_M

[Add] Spurious ambiguity in prefixed call to classwide operation

2017-10-09 Thread Pierre-Marie de Rodat
This patch suppresses a spurious ambiguity error on a prefixed call to an inherited class-wide operation, when the operation also has other visible homonyms in the context. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ 2017-10-09 Ed Schonberg * sem_ch4.adb (Try_Class_Wid

[Ada] Improve nnd debugging hooks

2017-10-09 Thread Pierre-Marie de Rodat
This patch improves and simplifies the debugging hooks. Now you just have to break on nnd to find all "interesting" creations/modifications of node ids. No change in functionality; no test available. Tested on x86_64-pc-linux-gnu, committed on trunk 2017-10-09 Bob Duff * atree.adb:

[Ada] Static allocation of secondary dispatch tables

2017-10-09 Thread Pierre-Marie de Rodat
This patch enhances the compiler to statically allocate secondary dispatch tables. No test available because it would require the analysis of the generated assembly code (thus depending on the target architecture). Tested on x86_64-pc-linux-gnu, committed on trunk 2017-10-09 Javier Miranda

[Ada] Spurious error with expression function returning anonymous access

2017-10-09 Thread Pierre-Marie de Rodat
This patch fixes a spurious error on an expression function that is a completion, when the expression is a function call that returns an anonymous access type. The preanalysis of the expression to freeze referenced types requires the proper computation of the access level of the function call, at a

[Ada] Suppress checks within finalizers

2017-10-09 Thread Pierre-Marie de Rodat
This patch suppresses checks within finalizer routines, because they can't fail. No change in behavior; no test available. This is just an internal cleanup. Tested on x86_64-pc-linux-gnu, committed on trunk 2017-10-09 Bob Duff * exp_ch7.adb (Create_Finalizer): Suppress checks within t

[Ada] Spurious error with predicate and class-wide object

2017-10-09 Thread Pierre-Marie de Rodat
This patch removes a spurious error on a call to a function that applies to a predicated tagged type, when the actual in the call is class-wide. The argument must be converted to be type-specific, given that the predicate function is not dispatching and cannot accept a class-wide actual. Executing

[Ada] Suppress generation of ABE checks in GNATprove mode

2017-10-09 Thread Pierre-Marie de Rodat
This patch suppresses the generation of ABE checks when compiling for GNATprove because a) the checks are not needed and b) the checks involve raise statements which are not supported by GNATprove. No need for a test. Tested on x86_64-pc-linux-gnu, committed on trunk 2017-10-09 Hristian Kirtchev

[Ada] Spurious error in use of homograph of type name in predicate

2017-10-09 Thread Pierre-Marie de Rodat
This patch fixes a spurious error in an expression for a dynamic predicate, when the name of (a homograph of) the type to which the predicate applies is used in a context where the name cannot denote a current occurrence. The following must compile quietly: gcc -c conv.ads --- with Typ; use T

[Ada] Rewrite check for SPARK RM 7.1.3(10)

2017-10-09 Thread Pierre-Marie de Rodat
The evolution of SPARK RM 7.1.3(10) rule was not followed by code that implements it. The current wording is: "If a procedure has an in mode parameter of an effectively volatile type, then the Effective_Reads aspect of any corresponding actual parameter shall be False." and the current

[Ada] Internal error on expression function in ghost package

2017-10-09 Thread Pierre-Marie de Rodat
This patch corrects an issue whereby an expression function within a ghost package would cause orphaned freeze nodes. -- Source -- -- p.ads package P with SPARK_Mode is type Rec is record I : Integer; end record; package Inner with Ghost is funct

[Ada] Spurious warnings with dynamic elab checks

2017-10-09 Thread Pierre-Marie de Rodat
This patch classifies 'Access, variable assignments, and variable references as static model-only scenarios because they are graph-dependent and do not produce any checks. No need for a test. Tested on x86_64-pc-linux-gnu, committed on trunk 2017-10-09 Hristian Kirtchev * sem_elab.adb

[Ada] Support for reverse iteration on formal containers

2017-10-09 Thread Pierre-Marie de Rodat
This patch adds support for reverse iterations over formal containers, analogous to what is supported on arrays and predefined containers. Executing: gnatmake -q foo foo must yield; 1 2 3 4 5 6 7 8 9 10 10 9 8 7 6 5 4 3 2 1 10 9 8 7 6 5 4 3 2 1 --- with Ada.Text_IO; use Ada.Text_IO; pr

[Ada] Check elaboration requirement for SPARK in the static model

2017-10-09 Thread Pierre-Marie de Rodat
This patch ensures that the Elaborate[_All] requirement imposed on the context of a unit in SPARK code is verified only when the static model is in effect. -- Source -- -- server.ads package Server with SPARK_Mode is function Read return Integer; end Server; -- se

[Ada] Crash on child unit name with -gnatdJ

2017-10-09 Thread Pierre-Marie de Rodat
When the debugging switch -gnatdJ is present, warning messages include the name of the unit within which the warning is generated. This patch fixes a crash in the compiler when a warning appears within a child unit. The command gcc -c -gnatdJ test-a.ads must yield; test-a.ads:6:17: warning:

[Ada] Crash on potential access-before-elaboration in ZFP

2017-10-09 Thread Pierre-Marie de Rodat
This patch update the mechanism which retrieves the enclosing scope of a node to account for blocks produces by exception handler expansion. These blocks are not scoping constructs and should not be considered. As a result, an access- before-elaboration check will no longer cause a crash on ZFP. -

[Ada] Update the categorization of N_Call_Marker nodes

2017-10-09 Thread Pierre-Marie de Rodat
This patch update the categorization of node N_Call_Marker's fields. No change in behaviour, no need for a test. Tested on x86_64-pc-linux-gnu, committed on trunk 2017-10-09 Hristian Kirtchev * sinfo.ads: Update table Is_Syntactic_Field to reflect the nature of semantic field

[Ada] Missing error on implicit copy of limited value in expression function

2017-10-09 Thread Pierre-Marie de Rodat
This patch corrects an omission on the legality check of an allocator whose expression is of a limited type, when the allocator is the expression of an expression function. Compiling t3.adb must yield: t3.adb:4:13: warning: not dispatching (must be defined in a package spec) t3.adb:5:07: init

[Ada] Small optimizations in Sem_Type.Covers

2017-10-09 Thread Pierre-Marie de Rodat
The Sem_Type.Covers predicate is by far the topmost subprogram in the profile of unoptimized compilations in Ada. This change contains a series of small optimizations that save about 2% of the instruction count on x86-64: 1. Inline 3 more predicates from einfo, 2. Simplify a convoluted condit

Re: r253554 - in /trunk/gcc: ada/ChangeLog ada/exp_...

2017-10-10 Thread Pierre-Marie de Rodat
I guess I got confused with my SVN setup. Anyway the fix is now in. Thank you for having reported this! -- Pierre-Marie de Rodat

[PATCH] [PR79542][Ada] Fix ICE in dwarf2out.c with nested func. inlining

2017-03-14 Thread Pierre-Marie de Rodat
Hello, https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79542 reports an ICE in dwarf2out.c for an Ada testcase built with optimization. This crash happens during the late generation pass because add_gnat_descriptive_type cannot find the type DIE corresponding to some descriptive type after having tr

[PING][PATCH] DWARF: add abstract origin links on lexical blocks DIEs

2016-04-26 Thread Pierre-Marie de Rodat
Ping for the patch submitted at <https://gcc.gnu.org/ml/gcc-patches/2016-01/msg01495.html>. It applies just fine on the current trunk and still bootstrapps and regtests successfuly on x86_64-linux. Thank you in advance, -- Pierre-Marie de Rodat

[PATCH] DWARF: turn dw_loc_descr_node field into hash map for frame offset check

2016-04-27 Thread Pierre-Marie de Rodat
Hello, As discussed on , this change removes a field in the dw_loc_descr_node structure so we can get rid of the CHECKING_P macro usage. This field was used to perform consistency checks for frame offset in DWARF procedures. As a replaceme

Re: [PATCH, PING] DWARF: process all TYPE_DECL nodes when iterating on scopes

2016-09-08 Thread Pierre-Marie de Rodat
y, I think I’ll investigate this way next week. Thanks again! :-) -- Pierre-Marie de Rodat

Re: [PATCH, PING] DWARF: process all TYPE_DECL nodes when iterating on scopes

2016-09-27 Thread Pierre-Marie de Rodat
mbol_table::finalize_compilation_unit). The new patch attached tries to fix the call order. Bootstrapping and regtesting on x86_64-linux were clean except one testcase where the debug output changed legitimally (matcher updated). Ok to commit? Thank you in advance! -- Pierre-Marie de R

[PATCH, PING*2] DWARF: space-optimize loc. descr. for integer literals on 32-bit targets

2016-09-27 Thread Pierre-Marie de Rodat
Hello, Ping for the patch submitted at <https://gcc.gnu.org/ml/gcc-patches/2016-08/msg02117.html>. Thanks! -- Pierre-Marie de Rodat

<    20   21   22   23   24   25   26   27   28   29   >