aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/AdaFrontend/non_lvalue.adb7
-rw-r--r--test/AdaFrontend/non_lvalue.ads11
2 files changed, 18 insertions, 0 deletions
diff --git a/test/AdaFrontend/non_lvalue.adb b/test/AdaFrontend/non_lvalue.adb
new file mode 100644
index 0000000000..2a92e52fba
--- /dev/null
+++ b/test/AdaFrontend/non_lvalue.adb
@@ -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
index 0000000000..7d4eeed8b8
--- /dev/null
+++ b/test/AdaFrontend/non_lvalue.ads
@@ -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;