diff options
| author | Duncan Sands <baldrick@free.fr> | 2009-02-25 18:10:49 +0000 |
|---|---|---|
| committer | Duncan Sands <baldrick@free.fr> | 2009-02-25 18:10:49 +0000 |
| commit | c642e53b8c58ea80b4329a336d50856bfddba4e2 (patch) | |
| tree | 3be9b434fb96e9967e01da288728343c86ca3308 /llvm/test | |
| parent | d92f1bfa1142f0b69dbd10ec39844a3edc5255a8 (diff) | |
| download | bcm5719-llvm-c642e53b8c58ea80b4329a336d50856bfddba4e2.tar.gz bcm5719-llvm-c642e53b8c58ea80b4329a336d50856bfddba4e2.zip | |
Check that records with a known constant size are not
copied field by LLVM field if the record has a variable
sized field in it. The problem is that the LLVM field
will not completely cover the variable sized gcc field.
llvm-svn: 65463
Diffstat (limited to 'llvm/test')
| -rw-r--r-- | llvm/test/FrontendAda/Support/element_copy.ads | 8 | ||||
| -rw-r--r-- | llvm/test/FrontendAda/element_copy.adb | 8 |
2 files changed, 16 insertions, 0 deletions
diff --git a/llvm/test/FrontendAda/Support/element_copy.ads b/llvm/test/FrontendAda/Support/element_copy.ads new file mode 100644 index 00000000000..52c6e49275e --- /dev/null +++ b/llvm/test/FrontendAda/Support/element_copy.ads @@ -0,0 +1,8 @@ +package Element_Copy is + type SmallInt is range 1 .. 4; + type SmallStr is array (SmallInt range <>) of Character; + type VariableSizedField (D : SmallInt := 2) is record + S : SmallStr (1 .. D) := "Hi"; + end record; + function F return VariableSizedField; +end; diff --git a/llvm/test/FrontendAda/element_copy.adb b/llvm/test/FrontendAda/element_copy.adb new file mode 100644 index 00000000000..29274fa744a --- /dev/null +++ b/llvm/test/FrontendAda/element_copy.adb @@ -0,0 +1,8 @@ +-- RUN: %llvmgcc -S -O2 %s -I%p/Support -o - | grep 105 | count 2 +package body Element_Copy is + function F return VariableSizedField is + X : VariableSizedField; + begin + return X; + end; +end; |

