tests: add 'aligned_attr_gcc_windows.vv' for gcc (#20870)

This commit is contained in:
gym603 2024-02-19 21:21:27 +08:00 committed by GitHub
parent 50e271a77e
commit d198a89897
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 36 additions and 0 deletions

View File

@ -255,6 +255,12 @@ fn should_skip(relpath string) bool {
return true
}
}
$if msvc {
if relpath.contains('_gcc_windows.vv') {
eprintln('> skipping ${relpath} on msvc')
return true
}
}
} else {
if relpath.contains('_windows.vv') {
eprintln('> skipping ${relpath} on !windows')

View File

@ -0,0 +1,13 @@
struct main__Test {
int a;
} __attribute__((aligned (8)));
struct main__Test2 {
int a;
int b;
} __attribute__((aligned (16)));
union main__Test3 {
int a;
} __attribute__((aligned (8)));

View File

View File

@ -0,0 +1,17 @@
// vtest vflags: -cc gcc -os windows
@[aligned:8]
struct Test {
a int
}
@[aligned:16]
struct Test2 {
a int
b int
}
@[aligned:8]
union Test3 {
a int
}