[Bug ada/16095] New: Illegal program not detected, X'Access of wrong type

ludovic dot brenta at insalien dot org gcc-bugzilla@gcc.gnu.org
Sun Jun 20 11:28:00 GMT 2004


--  When operands of "=" are reversed, we get the expected error (see
--  line 11).
procedure Test_248680 is
   type T1 is tagged null record;

   procedure p1 (x : access T1) is
      b: boolean;
      y: aliased T1;
   begin
      B := Y'Access = X;     -- ERROR: no matching "="
--    B := X = Y'Access;     -- line 11: error detected
   end p1;

begin
   null;
end Test_248680;

I expect error messages like:
test_248680.adb:10:14: invalid operand types for operator "="
test_248680.adb:10:14: left operand has type access to "T1" defined at line 10
test_248680.adb:10:14: right operand has type access to "T1" defined at line 6
gnatmake: "test_248680.adb" compilation error


But the compiler says nothing.

-- 
           Summary: Illegal program not detected, X'Access of wrong type
           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=16095



More information about the Gcc-bugs mailing list