diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2011-03-26 10:18:54 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2011-03-26 10:18:54 +0000 |
commit | 51c7954daf0d223599ad0aeea64b63816ee1e354 (patch) | |
tree | 5584c686f2c797da62ca728685356ce85163698f /gcc/testsuite | |
parent | 6ddf9843628ab87261d2ec8dc3d14ac057e76014 (diff) | |
download | gcc-51c7954daf0d223599ad0aeea64b63816ee1e354.zip gcc-51c7954daf0d223599ad0aeea64b63816ee1e354.tar.gz gcc-51c7954daf0d223599ad0aeea64b63816ee1e354.tar.bz2 |
decl.c (gnat_to_gnu_entity): Create TYPE_DECL for the padded type built to support a specified size or alignment.
* gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
for the padded type built to support a specified size or alignment.
From-SVN: r171554
Diffstat (limited to 'gcc/testsuite')
-rw-r--r-- | gcc/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/testsuite/gnat.dg/discr27.adb | 31 | ||||
-rw-r--r-- | gcc/testsuite/gnat.dg/discr27.ads | 7 |
3 files changed, 42 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 4f1fa8a..28ab5b9 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,9 @@ 2011-03-26 Eric Botcazou <ebotcazou@adacore.com> + * gnat.dg/discr27.ad[sb]: New test. + +2011-03-26 Eric Botcazou <ebotcazou@adacore.com> + * gnat.dg/limited_with2.ad[sb]: New test. * gnat.dg/limited_with2_pkg1.ads: New helper. * gnat.dg/imited_with2_pkg2.ads: Likewise. diff --git a/gcc/testsuite/gnat.dg/discr27.adb b/gcc/testsuite/gnat.dg/discr27.adb new file mode 100644 index 0000000..cfaba34 --- /dev/null +++ b/gcc/testsuite/gnat.dg/discr27.adb @@ -0,0 +1,31 @@ +package body Discr27 is
+
+ subtype Index is Positive range 1..4096;
+
+ function F return String is
+ S : String(1..1) := (others =>'w');
+ begin
+ return S;
+ end;
+
+ type Enum is (One, Two);
+
+ type Rec (D : Enum := One; Len : Index := 1) is record
+ case D is
+ when One => I : Integer;
+ when Two => A : String(1..Len);
+ end case;
+ end record;
+
+ procedure Nothing is
+ M : constant String := F;
+ C : constant Rec := (Two, M'Length, M);
+ begin
+ null;
+ end;
+
+ procedure Proc is begin
+ null;
+ end;
+
+end Discr27;
diff --git a/gcc/testsuite/gnat.dg/discr27.ads b/gcc/testsuite/gnat.dg/discr27.ads new file mode 100644 index 0000000..db1914a --- /dev/null +++ b/gcc/testsuite/gnat.dg/discr27.ads @@ -0,0 +1,7 @@ +-- { dg-do compile }
+
+package Discr27 is
+
+ procedure Proc;
+
+end Discr27;
|