mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-14 17:34:41 +00:00
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65463 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
9a7c743fc0
commit
411c285404
8
test/FrontendAda/Support/element_copy.ads
Normal file
8
test/FrontendAda/Support/element_copy.ads
Normal file
@ -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;
|
8
test/FrontendAda/element_copy.adb
Normal file
8
test/FrontendAda/element_copy.adb
Normal file
@ -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;
|
Loading…
x
Reference in New Issue
Block a user