diff options
author | Michael Forney <mforney@mforney.org> | 2019-04-15 01:11:08 -0700 |
---|---|---|
committer | Michael Forney <mforney@mforney.org> | 2019-04-15 01:15:07 -0700 |
commit | fca0b26275a82c480a5286c281834dad6887b410 (patch) | |
tree | f0046a7b66a9e7f3c56f4c3caf7e4620481c2e9a /tests | |
parent | b6e582d2842aa21e24a70675b760bba331dc0d72 (diff) |
Handle static sub-initializers
Diffstat (limited to 'tests')
-rw-r--r-- | tests/initializer-replace-local.c (renamed from tests/initializer-replace.c) | 0 | ||||
-rw-r--r-- | tests/initializer-replace-local.qbe (renamed from tests/initializer-replace.qbe) | 0 | ||||
-rw-r--r-- | tests/initializer-replace-static.c | 6 | ||||
-rw-r--r-- | tests/initializer-replace-static.qbe | 1 |
4 files changed, 7 insertions, 0 deletions
diff --git a/tests/initializer-replace.c b/tests/initializer-replace-local.c index 8b93ef2..8b93ef2 100644 --- a/tests/initializer-replace.c +++ b/tests/initializer-replace-local.c diff --git a/tests/initializer-replace.qbe b/tests/initializer-replace-local.qbe index 72ad90a..72ad90a 100644 --- a/tests/initializer-replace.qbe +++ b/tests/initializer-replace-local.qbe diff --git a/tests/initializer-replace-static.c b/tests/initializer-replace-static.c new file mode 100644 index 0000000..c1fa376 --- /dev/null +++ b/tests/initializer-replace-static.c @@ -0,0 +1,6 @@ +struct { + char s[6]; +} x = { + .s = "hello", + .s[1] = 'a', +}; diff --git a/tests/initializer-replace-static.qbe b/tests/initializer-replace-static.qbe new file mode 100644 index 0000000..18b774e --- /dev/null +++ b/tests/initializer-replace-static.qbe @@ -0,0 +1 @@ +export data $x = align 1 { b "hallo", z 1, } |