aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gnat.dg/specs
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2014-10-27 11:19:41 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2014-10-27 11:19:41 +0000
commit8c44fc0f2305f051c9631b4ab3f46417bfe0d644 (patch)
tree96a95cb33de3391c4a2f50123941d5368fe48d07 /gcc/testsuite/gnat.dg/specs
parent33ccc5363ec5994c39048b1aa18e6ae6e35aa2a9 (diff)
downloadgcc-8c44fc0f2305f051c9631b4ab3f46417bfe0d644.zip
gcc-8c44fc0f2305f051c9631b4ab3f46417bfe0d644.tar.gz
gcc-8c44fc0f2305f051c9631b4ab3f46417bfe0d644.tar.bz2
decl.c (gnat_to_gnu_entity): Apply special treatment of derived packed array types to constrained subtypes only.
* gcc-interface/decl.c (gnat_to_gnu_entity): Apply special treatment of derived packed array types to constrained subtypes only. From-SVN: r216727
Diffstat (limited to 'gcc/testsuite/gnat.dg/specs')
-rw-r--r--gcc/testsuite/gnat.dg/specs/pack10.ads14
-rw-r--r--gcc/testsuite/gnat.dg/specs/pack10_pkg.adb5
-rw-r--r--gcc/testsuite/gnat.dg/specs/pack10_pkg.ads9
3 files changed, 28 insertions, 0 deletions
diff --git a/gcc/testsuite/gnat.dg/specs/pack10.ads b/gcc/testsuite/gnat.dg/specs/pack10.ads
new file mode 100644
index 0000000..0138e09
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/specs/pack10.ads
@@ -0,0 +1,14 @@
+-- { dg-do compile }
+
+with Pack10_Pkg; use Pack10_Pkg;
+
+package Pack10 is
+
+ type Boolean_Vector is array (Positive range <>) of Boolean;
+
+ type Packed_Boolean_Vector is new Boolean_Vector;
+ pragma Pack (Packed_Boolean_Vector);
+
+ procedure My_Proc is new Proc (Packed_Boolean_Vector);
+
+end Pack10;
diff --git a/gcc/testsuite/gnat.dg/specs/pack10_pkg.adb b/gcc/testsuite/gnat.dg/specs/pack10_pkg.adb
new file mode 100644
index 0000000..af81776
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/specs/pack10_pkg.adb
@@ -0,0 +1,5 @@
+package body Pack10_Pkg is
+
+ procedure Proc is begin null; end;
+
+end Pack10_Pkg;
diff --git a/gcc/testsuite/gnat.dg/specs/pack10_pkg.ads b/gcc/testsuite/gnat.dg/specs/pack10_pkg.ads
new file mode 100644
index 0000000..76d99fb
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/specs/pack10_pkg.ads
@@ -0,0 +1,9 @@
+-- { dg-excess-errors "cannot generate code" }
+
+package Pack10_Pkg is
+
+ generic
+ type Vector_Type (<>) is private;
+ procedure Proc;
+
+end Pack10_Pkg;