From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30881 invoked by alias); 15 Feb 2006 09:38:50 -0000 Received: (qmail 30818 invoked by alias); 15 Feb 2006 09:38:44 -0000 Date: Wed, 15 Feb 2006 09:38:00 -0000 Message-ID: <20060215093844.30817.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug ada/25885] [4.0/4.1/4.2 Regression] Tree checking failure on ASIS In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "charlet at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2006-02/txt/msg01668.txt.bz2 List-Id: ------- Comment #6 from charlet at gcc dot gnu dot org 2006-02-15 09:38 ------- Subject: Bug 25885 Author: charlet Date: Wed Feb 15 09:38:39 2006 New Revision: 111062 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=111062 Log: 2006-02-13 Ed Schonberg Javier Miranda Robert Dewar Gary Dismukes * exp_ch6.adb (Expand_Inlined_Call): Handle calls to functions that return unconstrained arrays. Update comments. (Expand_Call): An indirect call through an access parameter of a protected operation is not a protected call. Add circuit to raise CE in Ada 2005 mode following call to Raise_Exception. (Register_DT_Entry): Do nothing if the run-time does not give support to abstract interfaces. (Freeze_Subprogram): In case of dispatching operations, do not generate code to register the operation in the dispatch table if the source is compiled with No_Dispatching_Calls. (Register_Predefined_DT_Entry): Generate code that calls the new run-time subprogram Set_Predefined_Prim_Op_Address instead of Set_Prim_Op_Address. * sem_ch5.adb (Analyze_Assignment_Statement): Do not apply length checks on array assignments if the right-hand side is a function call that has been inlined. Check is performed on the assignment in the block. (Process_Bounds): If bounds and range are overloaded, apply preference rule for root operations to disambiguate, and diagnose true ambiguity. (Analyze_Assignment): Propagate the tag for a class-wide assignment with a tag-indeterminate right-hand side even when Expander_Active is True. Needed to ensure that dispatching calls to T'Input are allowed and get the tag of the target class-wide object. * sem_ch6.adb (New_Overloaded_Entity): Handle entities that override an inherited primitive operation that already overrides several abstract interface primitives. For transitivity, the new entity must also override all the abstract interface primitives covered by the inherited overriden primitive. Emit warning if new entity differs from homograph in same scope only in that one has an access parameter and the other one has a parameter of a general access type with the same designated type, at the same position in the signature. (Make_Inequality_Operator): Use source locations of parameters and subtype marks from corresponding equality operator when creating the tree structure for the implicit declaration of "/=". This does not change anything in behaviour except that the decoration of the components of the subtree created for "/=" allows ASIS to get the string images of the corresponding identifiers. (Analyze_Return_Statement): Remove '!' in warning message. (Check_Statement_Sequence): Likewise. (Analyze_Subprogram_Body): For an access parameter whose designated type is an incomplete type imported through a limited_with clause, use the type of the corresponding formal in the body. (Check_Returns): Implicit return in No_Return procedure now raises Program_Error with a compile time warning, instead of beging illegal. (Has_Single_Return): Function returning unconstrained type cannot be inlined if expression in unique return statement is not an identifier. (Build_Body_To_Inline): It is possible to inline a function call that returns an unconstrained type if all return statements in the function return the same local variable. Subsidiary procedure Has_Single_Return verifies that the body conforms to this restriction. * sem_res.adb (Resolve_Equality_Op): If the operands do not have the same type, and one of them is of an anonymous access type, convert the other operand to it, so that this is a valid binary operation for gigi. (Resolve_Type_Conversion): Handle subtypes of protected types and task types when accessing to the corresponding record type. (Resolve_Allocator): Add '\' in 2-line warning message. Remove '!' in warning message. (Resolve_Call): Add '\' in 2-line warning message. (Valid_Conversion): Likewise. (Resolve_Overloaded_Selected_Component): If disambiguation succeeds, the resulting type may be an access type with an implicit dereference. Obtain the proper component from the designated type. (Make_Call_Into_Operator): Handle properly a call to predefined equality given by an expanded name with prefix Standard, when the operands are of an anonymous access type. (Check_Fully_Declared_Prefix): New procedure, subsidiary of Resolve_ Explicit_Dereference and Resolve_Selected_Component, to verify that the prefix of the expression is not of an incomplete type. Allows full diagnoses of all semantic errors. (Resolve_Actuals): If the actual is an allocator whose directly designated type is a class-wide interface we build an anonymous access type to use it as the type of the allocator. Later, when the subprogram call is expanded, if the interface has a secondary dispatch table the expander will add a type conversion to force the displacement of the pointer. (Resolve_Call): If a function that returns an unconstrained type is marked Inlined_Always and inlined, the call will be inlined and does not require the creation of a transient scope. (Check_Direct_Boolean_Op): Removed (Resolve_Comparison_Op): Remove call to above (Resolve_Equality_Op): Remove call to above (Resolve_Logical_Op): Inline above, since this is only call. (Valid_Conversion): Handle properly conversions between arrays of convertible anonymous access types. PR ada/25885 (Set_Literal_String_Subtype): If the lower bound is not static, wrap the literal in an unchecked conversion, because GCC 4.x needs a static value for a string bound. Modified: trunk/gcc/ada/exp_ch6.adb trunk/gcc/ada/sem_ch5.adb trunk/gcc/ada/sem_ch6.adb trunk/gcc/ada/sem_res.adb -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25885