summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gnat.dg/return1.adb
blob: f632211f5d43b315b8d0eb8814058d89a8763834 (plain)
1
2
3
4
5
6
7
8
9
10
11
-- { dg-do compile }
-- { dg-options "-gnatwa" }

package body return1 is
    function X_Func (O : access Child) return access Base'Class is
    begin
       return X_Local : access Base'Class do
          X_Local := O;
       end return;
    end X_Func;
end return1;