Commit 08c5a7c6 by Eric Botcazou Committed by Eric Botcazou

* gnat.dg/opt29.ad[sb]: New test.

From-SVN: r205523
parent 089d1227
2013-11-29 Eric Botcazou <ebotcazou@adacore.com>
* gnat.dg/opt29.ad[sb]: New test.
2013-11-29 Richard Biener <rguenther@suse.de>
PR middle-end/59338
......
-- { dg-do compile }
-- { dg-options "-O" }
package body Opt29 is
procedure Proc (T : Rec) is
begin
if Derived2 (T.F2.all).Id = T.F1.Id then
raise Program_Error;
end if;
end;
end Opt29;
package Opt29 is
type Word is mod 2**16;
type PID is record
W1, W2: Word;
end record;
type Root1 is tagged record
Id: PID;
end record;
type Root1_Ptr is access all Root1'Class;
type Root2 is tagged null record;
type Root2_Ptr is access all Root2'class;
type Derived2 is new Root2 with record
Id: PID;
end record;
type Rec is record
F1: Root1_Ptr;
F2: Root2_Ptr;
end record;
procedure Proc (T : Rec);
end Opt29;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment