New directory for Ada testcases. Test handling of NON_LVALUE_EXPR.
authorDuncan Sands <baldrick@free.fr>
Mon, 5 Mar 2007 08:20:48 +0000 (08:20 +0000)
committerDuncan Sands <baldrick@free.fr>
Mon, 5 Mar 2007 08:20:48 +0000 (08:20 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34925 91177308-0d34-0410-b5e6-96231b3b80d8

test/AdaFrontend/non_lvalue.adb [new file with mode: 0644]
test/AdaFrontend/non_lvalue.ads [new file with mode: 0644]

diff --git a/test/AdaFrontend/non_lvalue.adb b/test/AdaFrontend/non_lvalue.adb
new file mode 100644 (file)
index 0000000..2a92e52
--- /dev/null
@@ -0,0 +1,7 @@
+-- RUN: %llvmgcc -c %s -o /dev/null
+package body Non_LValue is
+   function A (Y : U) return String is
+   begin
+      return Y.X.B;
+   end;
+end;
diff --git a/test/AdaFrontend/non_lvalue.ads b/test/AdaFrontend/non_lvalue.ads
new file mode 100644 (file)
index 0000000..7d4eeed
--- /dev/null
@@ -0,0 +1,11 @@
+package Non_LValue is
+   type T (Length : Natural) is record
+      A : String (1 .. Length);
+      B : String (1 .. Length);
+   end record;
+   type T_Ptr is access all T;
+   type U is record
+      X : T_Ptr;
+   end record;
+   function A (Y : U) return String;
+end;