This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug ada/16081] New: Illegal program not detected, ambiguous call to "="
- From: "ludovic dot brenta at insalien dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 19 Jun 2004 14:59:22 -0000
- Subject: [Bug ada/16081] New: Illegal program not detected, ambiguous call to "="
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
procedure Test_248166 is
package pak1 is
type T1 is tagged null record;
end pak1;
package body pak1 is
-- type T1 is tagged null record; -- line 7
function "=" (x, y : T1'class) return boolean is -- line 9
begin
return true;
end "=";
procedure proc (x, y : T1'class) is
b : boolean;
begin
b := x = y; --ERROR: ambiguous "="
end proc;
end pak1;
begin
null;
end Test_248166;
I expect several error messages:
test_248166.adb:17:17: ambiguous expression (cannot resolve ""="")
test_248166.adb:17:17: possible interpretation at line 9
test_248166.adb:17:17: possible interpretation at line 3
gnatmake: "test_248166.adb" compilation error
Instead, the compiler is silent.
--
Summary: Illegal program not detected, ambiguous call to "="
Product: gcc
Version: 3.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: ada
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: ludovic dot brenta at insalien dot org
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16081