summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gnat.dg/specs/unchecked_union.ads
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gnat.dg/specs/unchecked_union.ads')
-rw-r--r--gcc/testsuite/gnat.dg/specs/unchecked_union.ads20
1 files changed, 20 insertions, 0 deletions
diff --git a/gcc/testsuite/gnat.dg/specs/unchecked_union.ads b/gcc/testsuite/gnat.dg/specs/unchecked_union.ads
new file mode 100644
index 000000000..260f781d8
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/specs/unchecked_union.ads
@@ -0,0 +1,20 @@
+-- PR ada/28591
+-- Reported by Martin Michlmayr <tbm@cyrius.com>
+
+-- { dg-do compile }
+-- { dg-options "-g" }
+
+with Interfaces; use Interfaces;
+
+package Unchecked_Union is
+ type Mode_Type is (Mode_B2);
+
+ type Value_Union (Mode : Mode_Type := Mode_B2) is record
+ case Mode is
+ when Mode_B2 =>
+ B2 : Integer_32;
+ end case;
+ end record;
+ pragma Unchecked_Union (Value_Union);
+
+end Unchecked_Union;