PR tree-optimization/86415 - strlen() not folded for substrings within constant arrays
[official-gcc.git] / gcc / testsuite / gnat.dg / expr_func3.ads
blob45593da845caa7e3da0ba7b61f8c60c33772aad6
1 package Expr_Func3 is
3 type Obj_T is abstract tagged null record;
5 type T is access all Obj_T'Class;
7 function Slave (Obj : access Obj_T) return T is (T(Obj));
9 function Optional_Slave (Obj : T) return T;
11 procedure Dummy;
13 private
15 function Optional_Slave (Obj : T) return T is
16 (if Obj = null then null else Slave (Obj));
18 end Expr_Func3;