-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cgen: fix global initializer of fixed array on gcc (vlang#20934)
- Loading branch information
Showing
3 changed files
with
21 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Array_fixed_main__Foo_3 g_test_foo = {{.foo = 0,.bar = {.a = 0,.b = 0,},}, {.foo = 0,.bar = {.a = 0,.b = 0,},}, {.foo = 0,.bar = {.a = 0,.b = 0,},}}; // global4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// vtest vflags: -enable-globals | ||
|
||
struct Foo { | ||
foo int | ||
bar struct { | ||
a int | ||
b f64 | ||
} | ||
} | ||
|
||
__global g_test_foo = [3]Foo{} |