aboutsummaryrefslogtreecommitdiffstats
path: root/test/FrontendAda
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2008-01-03 11:53:52 +0000
committerDuncan Sands <baldrick@free.fr>2008-01-03 11:53:52 +0000
commitd8cac2c72c65a973c97f2e56197123dc9c450f95 (patch)
tree60984a1450efe307bc6feb06cfbaa089dda1d513 /test/FrontendAda
parent765db1aee086a8016f7710e26d478087ce2bd8c3 (diff)
downloadexternal_llvm-d8cac2c72c65a973c97f2e56197123dc9c450f95.zip
external_llvm-d8cac2c72c65a973c97f2e56197123dc9c450f95.tar.gz
external_llvm-d8cac2c72c65a973c97f2e56197123dc9c450f95.tar.bz2
Test for handling of large bit offset from a
variable field offset. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45534 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/FrontendAda')
-rw-r--r--test/FrontendAda/Support/var_offset.ads9
-rw-r--r--test/FrontendAda/var_offset.adb7
2 files changed, 16 insertions, 0 deletions
diff --git a/test/FrontendAda/Support/var_offset.ads b/test/FrontendAda/Support/var_offset.ads
new file mode 100644
index 0000000..55d0eb2
--- /dev/null
+++ b/test/FrontendAda/Support/var_offset.ads
@@ -0,0 +1,9 @@
+package Var_Offset is
+ pragma Elaborate_Body;
+ type T (L : Natural) is record
+ Var_Len : String (1 .. L);
+ Space : Integer;
+ Small : Character;
+ Bad_Field : Character;
+ end record;
+end;
diff --git a/test/FrontendAda/var_offset.adb b/test/FrontendAda/var_offset.adb
new file mode 100644
index 0000000..09f1c15
--- /dev/null
+++ b/test/FrontendAda/var_offset.adb
@@ -0,0 +1,7 @@
+-- RUN: %llvmgcc -c %s -I%p/Support
+package body Var_Offset is
+ function F (X : T) return Character is
+ begin
+ return X.Bad_Field;
+ end;
+end;