This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
Tested on i686-linux, committed on mainline.
When analyzing a call of the form object.method (...), the call is rewritten
into its canonical method (object, ...), and then resolution is attempted
on this candidate rewritten form.
Get_First_Interp is called on a copy of each actual that was created
when constructing the candidate form, but when the actual is an overloaded
function call, the interpretations which were stored for the original
actual are not available, which causes the compiler to crash.
This is fixed by carrying the collected interpretations from the original
actual to the copy used in the candidate rewritten call.
Test case:
$ gcc -c -gnatQ -gnatf -gnat05 -gnatwa -I- -gnatA compilation_results.adb
must not cause a compiler crash.
-- Source code follows
with Ada.Strings.Unbounded; use Ada.Strings.Unbounded;
with Ada.Containers.Indefinite_Vectors;
procedure Compilation_Results is
package Vectors is new Ada.Containers.Indefinite_Vectors
(Index_Type => Natural,
Element_Type => Ada.Strings.Unbounded.Unbounded_String,
"=" => Ada.Strings.Unbounded."=");
use Vectors;
S : Vectors.Vector;
begin
S.Append (To_Unbounded_String (""));
end Compilation_Results;
2005-07-04 Thomas Quinot <quinot@adacore.com>
* sem_ch4.adb (Transform_Object_Operation): For an actual that is an
overloaded function call, carry interpretations from the original tree
to the copy.
Attachment:
difs.17
Description: Text document
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |