summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gnat.dg/dimensions.ads
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@linaro.org>2017-11-05 17:19:35 +0000
committerRichard Sandiford <richard.sandiford@linaro.org>2017-11-05 17:19:35 +0000
commit648f8fc59b2cc39abd24f4c22388b346cdebcc31 (patch)
tree3a07eccc4c22b265261edd75c9ec3910d9c626f5 /gcc/testsuite/gnat.dg/dimensions.ads
parent7bef5b82e4109778a0988d20e19e1ed29dadd835 (diff)
parent8c089b5c15a7b35644750ca393f1e66071ad9aa9 (diff)
downloadgcc-648f8fc59b2cc39abd24f4c22388b346cdebcc31.tar.gz
Merge trunk into sve
Diffstat (limited to 'gcc/testsuite/gnat.dg/dimensions.ads')
-rw-r--r--gcc/testsuite/gnat.dg/dimensions.ads29
1 files changed, 29 insertions, 0 deletions
diff --git a/gcc/testsuite/gnat.dg/dimensions.ads b/gcc/testsuite/gnat.dg/dimensions.ads
new file mode 100644
index 00000000000..54bab081470
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/dimensions.ads
@@ -0,0 +1,29 @@
+package Dimensions is
+
+ type Mks_Int_Type is new Integer
+ with
+ Dimension_System => (
+ (Unit_Name => Meter, Unit_Symbol => 'm', Dim_Symbol => 'L'),
+ (Unit_Name => Kilogram, Unit_Symbol => "kg", Dim_Symbol => 'M'),
+ (Unit_Name => Second, Unit_Symbol => 's', Dim_Symbol => 'T'),
+ (Unit_Name => Ampere, Unit_Symbol => 'A', Dim_Symbol => 'I'),
+ (Unit_Name => Kelvin, Unit_Symbol => 'K', Dim_Symbol => '@'),
+ (Unit_Name => Mole, Unit_Symbol => "mol", Dim_Symbol => 'N'),
+ (Unit_Name => Candela, Unit_Symbol => "cd", Dim_Symbol => 'J'));
+
+ subtype Int_Length is Mks_Int_Type
+ with
+ Dimension => (Symbol => 'm',
+ Meter => 1,
+ others => 0);
+
+ subtype Int_Speed is Mks_Int_Type
+ with
+ Dimension => (
+ Meter => 1,
+ Second => -1,
+ others => 0);
+
+ procedure Dummy;
+
+end Dimensions;