This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, Ada] Illegal program not detected, self renames, PR15846
- From: Alexander Basov <coopht at gmail dot com>
- To: Arnaud Charlet <charlet at adacore dot com>
- Cc: gcc-patches at gcc dot gnu dot org, Javier Miranda <miranda at adacore dot com>
- Date: Tue, 24 Jan 2012 01:01:10 +0400
- Subject: Re: [PATCH, Ada] Illegal program not detected, self renames, PR15846
- References: <4F0DF45A.3080904@gmail.com> <20120123201100.GA45472@adacore.com>
24.01.2012 00:11, Arnaud Charlet ÐÐÑÐÑ:
>> ChangeLog:
>> * gcc/ada/exp_disp.adb (Make_DT):
>> Check if flag Is_Dispatching_Operation is True before
>> getting DT_Position flag ,
>> present in function and procedure entities which are
>> dispatching
>>
>> * gcc/ada/sem_ch8.adb (Analyze_Subprogram_Renaming):
>> Added check if renaming entity package is the same as
>> renaming_declaration package,
>> in case if both operations has the same names.
> The patch for sem_ch8 is correct although we will incorporate a variant
> that has a minor change that will leave things a bit clearer, stay tuned.
Great!
>
> Regarding the proposed patch for exp_disp, it does not add any new
> useful functionality apparently.
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:
package renaming5 is
type T1 is tagged null record;
function "=" (left, right : in T1) return Boolean
renames renaming5."="; -- { dg-error "subprogram cannot rename itself" }
end renaming5;
Also this patch is partially fixes PR32164:
package Pak1 is
type T1 is tagged null record;
function Eq(X, Y : T1) return Boolean renames "=";
function Neq(X, Y : T1) return Boolean renames "/="; -- line 4
end Pak1;
It fixes ICE, but incorrect message still exists: "prefix of
"Unrestricted_Access" attribute cannot be intrinsic".
I will try to solve this problem a bit later.
>
> By the way, do you have a copyright assignment in place with the FSF?
No, I don't have it. What should I do?
>
> Arno
--
Best regards,
Alexander Basov