aboutsummaryrefslogtreecommitdiff
path: root/tests/initializer-replace-local.c
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2019-04-15 01:11:08 -0700
committerMichael Forney <mforney@mforney.org>2019-04-15 01:15:07 -0700
commitfca0b26275a82c480a5286c281834dad6887b410 (patch)
treef0046a7b66a9e7f3c56f4c3caf7e4620481c2e9a /tests/initializer-replace-local.c
parentb6e582d2842aa21e24a70675b760bba331dc0d72 (diff)
Handle static sub-initializers
Diffstat (limited to 'tests/initializer-replace-local.c')
-rw-r--r--tests/initializer-replace-local.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/initializer-replace-local.c b/tests/initializer-replace-local.c
new file mode 100644
index 0000000..8b93ef2
--- /dev/null
+++ b/tests/initializer-replace-local.c
@@ -0,0 +1,10 @@
+void f(void) {
+ struct {
+ char s[6];
+ } x = {
+ .s[0] = 'x',
+ .s[4] = 'y',
+ .s = "hello",
+ .s[1] = 'a',
+ };
+}