mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Struct members declared in a single line declaration were not sharing attributes. #1266
This commit is contained in:
22
test/test_suite/struct/multi_member_attributes.c3t
Normal file
22
test/test_suite/struct/multi_member_attributes.c3t
Normal file
@@ -0,0 +1,22 @@
|
||||
// #target: macos-x64
|
||||
|
||||
module test;
|
||||
|
||||
char x, y, z @align(64);
|
||||
|
||||
struct Vector3
|
||||
{
|
||||
char x, y, z @align(8); // Issue #1266
|
||||
}
|
||||
|
||||
Vector3 a = { 6, 8, 16 };
|
||||
|
||||
/* #expect: test.ll
|
||||
|
||||
|
||||
%Vector3 = type { i8, [7 x i8], i8, [7 x i8], i8, [7 x i8] }
|
||||
|
||||
@test.x = local_unnamed_addr global i8 0, align 64
|
||||
@test.y = local_unnamed_addr global i8 0, align 64
|
||||
@test.z = local_unnamed_addr global i8 0, align 64
|
||||
@test.a = local_unnamed_addr global %Vector3 { i8 6, [7 x i8] undef, i8 8, [7 x i8] undef, i8 16, [7 x i8] undef }, align 8
|
||||
Reference in New Issue
Block a user