summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gnat.dg
diff options
context:
space:
mode:
authorebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>2011-08-30 16:15:49 +0000
committerebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>2011-08-30 16:15:49 +0000
commit897b0faf9dc87e8b01900509971b7fa3e3c20604 (patch)
tree3ce1830194439c491707cf0d2a98eedb5004514c /gcc/testsuite/gnat.dg
parent2c52d4c08cd60d9a67a4dbae83f94be34c1bdb7e (diff)
downloadgcc-897b0faf9dc87e8b01900509971b7fa3e3c20604.tar.gz
* gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Do not convert
the expression to the nominal type if the latter is a record type with a variant part and the type of the former is a record type without one. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@178331 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gnat.dg')
-rw-r--r--gcc/testsuite/gnat.dg/specs/aggr1.ads2
-rw-r--r--gcc/testsuite/gnat.dg/specs/aggr2.ads2
-rw-r--r--gcc/testsuite/gnat.dg/specs/aggr3.ads18
-rw-r--r--gcc/testsuite/gnat.dg/specs/aggr3_pkg.ads9
4 files changed, 29 insertions, 2 deletions
diff --git a/gcc/testsuite/gnat.dg/specs/aggr1.ads b/gcc/testsuite/gnat.dg/specs/aggr1.ads
index 6c766351374..f26f4999b49 100644
--- a/gcc/testsuite/gnat.dg/specs/aggr1.ads
+++ b/gcc/testsuite/gnat.dg/specs/aggr1.ads
@@ -1,4 +1,4 @@
--- { dg-do compile }
+-- { dg-do compile }
package aggr1 is
type Buffer_Array is array (1 .. 2 ** 23) of Integer;
diff --git a/gcc/testsuite/gnat.dg/specs/aggr2.ads b/gcc/testsuite/gnat.dg/specs/aggr2.ads
index 8f7ea871733..00bc44f15d8 100644
--- a/gcc/testsuite/gnat.dg/specs/aggr2.ads
+++ b/gcc/testsuite/gnat.dg/specs/aggr2.ads
@@ -1,4 +1,4 @@
--- { dg-do compile }
+-- { dg-do compile }
package Aggr2 is
diff --git a/gcc/testsuite/gnat.dg/specs/aggr3.ads b/gcc/testsuite/gnat.dg/specs/aggr3.ads
new file mode 100644
index 00000000000..09b4466e0e5
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/specs/aggr3.ads
@@ -0,0 +1,18 @@
+-- { dg-do compile }
+
+with Aggr3_Pkg; use Aggr3_Pkg;
+
+package Aggr3 is
+
+ type Enum is (One);
+
+ type R (D : Enum := One) is
+ record
+ case D is
+ when One => The_T : T;
+ end case;
+ end record;
+
+ My_R : R := (D => One, The_T => My_T);
+
+end Aggr3;
diff --git a/gcc/testsuite/gnat.dg/specs/aggr3_pkg.ads b/gcc/testsuite/gnat.dg/specs/aggr3_pkg.ads
new file mode 100644
index 00000000000..769426edecf
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/specs/aggr3_pkg.ads
@@ -0,0 +1,9 @@
+package Aggr3_Pkg is
+
+ type Root is abstract tagged null record;
+
+ type T is new Root with null record;
+
+ My_T : T;
+
+end Aggr3_Pkg;