view gcc/testsuite/gnat.dg/validity_check2_pkg.ads @ 143:76e1cf5455ef

add cbc_gc test
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Sun, 23 Dec 2018 19:24:05 +0900
parents 04ced10e8804
children
line wrap: on
line source

with Ada.unchecked_conversion;

package Validity_Check2_Pkg is

  type Op_Code is (One, Two, Three, Four);

  subtype Valid_Msg is Integer range 0 .. 15;

  function Op_Code_To_Msg is
    new Ada.Unchecked_Conversion (Source => Op_code, Target => Valid_Msg);

  type Rec is record
    Code : Op_Code;
  end record;

end Validity_Check2_Pkg;