Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* Issue #1144: Simple version of designated initialisers * Isssue #1144: Rechecking tests revealed alignment error
- Loading branch information
Showing
3 changed files
with
126 additions
and
3 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,16 @@ | ||
|
||
|
||
struct test { | ||
int x; | ||
int y; | ||
int z:2; | ||
int a:4; | ||
char *str; | ||
}; | ||
|
||
|
||
struct test data = { .z = 1, .str = "hello" }; | ||
struct test data1 = { .x = 10, .z=1, .a=4, .str = "hello" }; | ||
struct test data2 = { .x = 12, .str = "hello" }; | ||
|
||
|
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,47 @@ | ||
|
||
|
||
|
||
|
||
|
||
INCLUDE "z80_crt0.hdr" | ||
|
||
|
||
SECTION data_compiler | ||
._data | ||
defs 4 | ||
defb 0x1 | ||
defw i_1+0 | ||
SECTION code_compiler | ||
SECTION data_compiler | ||
._data1 | ||
defw 10 | ||
defs 2 | ||
defb 0x11 | ||
defw i_1+0 | ||
SECTION code_compiler | ||
SECTION data_compiler | ||
._data2 | ||
defw 12 | ||
defs 3 | ||
defw i_1+0 | ||
SECTION code_compiler | ||
|
||
SECTION rodata_compiler | ||
.i_1 | ||
defm "hello" | ||
defb 0 | ||
|
||
|
||
|
||
SECTION bss_compiler | ||
SECTION code_compiler | ||
|
||
|
||
|
||
GLOBAL _data | ||
GLOBAL _data1 | ||
GLOBAL _data2 | ||
|
||
|
||
|
||
|