diff options
author | Duncan Sands <baldrick@free.fr> | 2008-01-03 00:26:42 +0000 |
---|---|---|
committer | Duncan Sands <baldrick@free.fr> | 2008-01-03 00:26:42 +0000 |
commit | 227ff79ceb2b0b0d1c9705fa6786067f401ae003 (patch) | |
tree | e8cebf8c1cf874b3fb9416ce5ea1596000dd756b /test/FrontendAda | |
parent | c51daccb7ec40335e819fb0b3f961353b17ea34b (diff) | |
download | llvm-227ff79ceb2b0b0d1c9705fa6786067f401ae003.tar.gz llvm-227ff79ceb2b0b0d1c9705fa6786067f401ae003.tar.bz2 llvm-227ff79ceb2b0b0d1c9705fa6786067f401ae003.tar.xz |
An example for which the TYPE_SIZE was being set from
the initial value, while the type fields were not (this
is a qualified union type, so not all fields are always
present). This resulted in the size of the corresponding
LLVM type being larger than the gcc TYPE_SIZE.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45522 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/FrontendAda')
-rw-r--r-- | test/FrontendAda/init_size.ads | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/FrontendAda/init_size.ads b/test/FrontendAda/init_size.ads new file mode 100644 index 0000000000..1d76ba24f3 --- /dev/null +++ b/test/FrontendAda/init_size.ads @@ -0,0 +1,12 @@ +-- RUN: %llvmgcc -c %s +package Init_Size is + type T (B : Boolean := False) is record + case B is + when False => + I : Integer; + when True => + J : Long_Long_Integer; -- Bigger than I + end case; + end record; + A_T : constant T := (False, 0); +end; |