diff mbox

[Ada] Illegal program not detected, self renames, PR15846

Message ID 20120124075349.GD23146@adacore.com
State New
Headers show

Commit Message

Arnaud Charlet Jan. 24, 2012, 7:53 a.m. UTC
> The patch for exp_disp is related to renaming of predefined "="
> operation for tagged type.
> without this patch I've got ICE on the following testcase:

OK, we have a better, simpler patch for this issue, no need for this hunk.

For the record, here is the patch we're looking at:
<<
Modified: trunk/gnat/sem_ch8.adb
>>

> > By the way, do you have a copyright assignment in place with the FSF?
> 
> No, I don't have it. What should I do?

Then we cannot accept your patch yet, and it's good that we've written a
different fix for this issue (currently under test).

You need to have a copyright assignment form in place with the FSF,
by e.g. contacting <assign@gnu.org>

Arno
diff mbox

Patch

===================================================================
--- trunk/gnat/sem_ch8.adb      2012-01-23 19:56:15 UTC (rev 210768)
+++ trunk/gnat/sem_ch8.adb      2012-01-23 20:12:40 UTC (rev 210769)
@@ -2665,7 +2665,10 @@ 
          if not Is_Actual
            and then (Old_S = New_S
                       or else (Nkind (Nam) /= N_Expanded_Name
-                        and then  Chars (Old_S) = Chars (New_S))) 
+                        and then Chars (Old_S) = Chars (New_S))
+                      or else (Nkind (Nam) = N_Expanded_Name
+                        and then Entity (Prefix (Nam)) = Current_Scope
+                        and then Chars (Selector_Name (Nam)) = Chars (New_S)))
          then
             Error_Msg_N ("subprogram cannot rename itself", N);
          end if;