1f08c3bdfSopenharmony_cistruct bfu { 2f08c3bdfSopenharmony_ci unsigned int a:11; 3f08c3bdfSopenharmony_ci unsigned int f:9; 4f08c3bdfSopenharmony_ci unsigned int :2; 5f08c3bdfSopenharmony_ci unsigned int z:3; 6f08c3bdfSopenharmony_ci}; 7f08c3bdfSopenharmony_ci 8f08c3bdfSopenharmony_cistruct bfu bfuu_init(unsigned int a) 9f08c3bdfSopenharmony_ci{ 10f08c3bdfSopenharmony_ci struct bfu bf = { .f = a, }; 11f08c3bdfSopenharmony_ci return bf; 12f08c3bdfSopenharmony_ci} 13f08c3bdfSopenharmony_ci 14f08c3bdfSopenharmony_cistruct bfu bfus_init(int a) 15f08c3bdfSopenharmony_ci{ 16f08c3bdfSopenharmony_ci struct bfu bf = { .f = a, }; 17f08c3bdfSopenharmony_ci return bf; 18f08c3bdfSopenharmony_ci} 19f08c3bdfSopenharmony_ci 20f08c3bdfSopenharmony_ciunsigned int bfu_get0(void) 21f08c3bdfSopenharmony_ci{ 22f08c3bdfSopenharmony_ci struct bfu bf = { }; 23f08c3bdfSopenharmony_ci return bf.f; 24f08c3bdfSopenharmony_ci} 25f08c3bdfSopenharmony_ci 26f08c3bdfSopenharmony_ci 27f08c3bdfSopenharmony_cistruct bfs { 28f08c3bdfSopenharmony_ci signed int a:11; 29f08c3bdfSopenharmony_ci signed int f:9; 30f08c3bdfSopenharmony_ci signed int :2; 31f08c3bdfSopenharmony_ci signed int z:3; 32f08c3bdfSopenharmony_ci}; 33f08c3bdfSopenharmony_ci 34f08c3bdfSopenharmony_cistruct bfs bfsu_init(unsigned int a) 35f08c3bdfSopenharmony_ci{ 36f08c3bdfSopenharmony_ci struct bfs bf = { .f = a, }; 37f08c3bdfSopenharmony_ci return bf; 38f08c3bdfSopenharmony_ci} 39f08c3bdfSopenharmony_ci 40f08c3bdfSopenharmony_cistruct bfs bfss_init(int a) 41f08c3bdfSopenharmony_ci{ 42f08c3bdfSopenharmony_ci struct bfs bf = { .f = a, }; 43f08c3bdfSopenharmony_ci return bf; 44f08c3bdfSopenharmony_ci} 45f08c3bdfSopenharmony_ci 46f08c3bdfSopenharmony_ciint bfs_get0(void) 47f08c3bdfSopenharmony_ci{ 48f08c3bdfSopenharmony_ci struct bfs bf = { }; 49f08c3bdfSopenharmony_ci return bf.f; 50f08c3bdfSopenharmony_ci} 51f08c3bdfSopenharmony_ci 52f08c3bdfSopenharmony_ci/* 53f08c3bdfSopenharmony_ci * check-name: bitfield implicit init zero 54f08c3bdfSopenharmony_ci * check-command: test-linearize -Wno-decl $file 55f08c3bdfSopenharmony_ci * 56f08c3bdfSopenharmony_ci * check-output-start 57f08c3bdfSopenharmony_cibfuu_init: 58f08c3bdfSopenharmony_ci.L0: 59f08c3bdfSopenharmony_ci <entry-point> 60f08c3bdfSopenharmony_ci and.32 %r4 <- %arg1, $511 61f08c3bdfSopenharmony_ci shl.32 %r5 <- %r4, $11 62f08c3bdfSopenharmony_ci ret.32 %r5 63f08c3bdfSopenharmony_ci 64f08c3bdfSopenharmony_ci 65f08c3bdfSopenharmony_cibfus_init: 66f08c3bdfSopenharmony_ci.L2: 67f08c3bdfSopenharmony_ci <entry-point> 68f08c3bdfSopenharmony_ci and.32 %r13 <- %arg1, $511 69f08c3bdfSopenharmony_ci shl.32 %r14 <- %r13, $11 70f08c3bdfSopenharmony_ci ret.32 %r14 71f08c3bdfSopenharmony_ci 72f08c3bdfSopenharmony_ci 73f08c3bdfSopenharmony_cibfu_get0: 74f08c3bdfSopenharmony_ci.L4: 75f08c3bdfSopenharmony_ci <entry-point> 76f08c3bdfSopenharmony_ci ret.32 $0 77f08c3bdfSopenharmony_ci 78f08c3bdfSopenharmony_ci 79f08c3bdfSopenharmony_cibfsu_init: 80f08c3bdfSopenharmony_ci.L6: 81f08c3bdfSopenharmony_ci <entry-point> 82f08c3bdfSopenharmony_ci and.32 %r27 <- %arg1, $511 83f08c3bdfSopenharmony_ci shl.32 %r28 <- %r27, $11 84f08c3bdfSopenharmony_ci ret.32 %r28 85f08c3bdfSopenharmony_ci 86f08c3bdfSopenharmony_ci 87f08c3bdfSopenharmony_cibfss_init: 88f08c3bdfSopenharmony_ci.L8: 89f08c3bdfSopenharmony_ci <entry-point> 90f08c3bdfSopenharmony_ci and.32 %r36 <- %arg1, $511 91f08c3bdfSopenharmony_ci shl.32 %r37 <- %r36, $11 92f08c3bdfSopenharmony_ci ret.32 %r37 93f08c3bdfSopenharmony_ci 94f08c3bdfSopenharmony_ci 95f08c3bdfSopenharmony_cibfs_get0: 96f08c3bdfSopenharmony_ci.L10: 97f08c3bdfSopenharmony_ci <entry-point> 98f08c3bdfSopenharmony_ci ret.32 $0 99f08c3bdfSopenharmony_ci 100f08c3bdfSopenharmony_ci 101f08c3bdfSopenharmony_ci * check-output-end 102f08c3bdfSopenharmony_ci */ 103