Skip to content

Commit

Permalink
tests: add 'aligned_attr_gcc_windows.vv' for gcc (#20870)
Browse files Browse the repository at this point in the history
  • Loading branch information
smalltalkman committed Feb 19, 2024
1 parent 50e271a commit d198a89
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 0 deletions.
6 changes: 6 additions & 0 deletions vlib/v/gen/c/coutput_test.v
Expand Up @@ -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')
Expand Down
13 changes: 13 additions & 0 deletions vlib/v/gen/c/testdata/aligned_attr_gcc_windows.c.must_have
@@ -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)));
Empty file.
17 changes: 17 additions & 0 deletions vlib/v/gen/c/testdata/aligned_attr_gcc_windows.vv
@@ -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
}

0 comments on commit d198a89

Please sign in to comment.