libcpp, c, middle-end: Optimize initializers using #embed in C
[official-gcc.git] / gcc / testsuite / gcc.dg / pr112380.c
blob7dd7a85d363f72d3d64cb33f59424213f3fef9af
1 /* { dg-do compile } */
2 /* { dg-options "-O2" } */
4 enum { TGSI_FILE_NULL };
5 struct ureg_src {
6 unsigned File : 4;
7 unsigned : 2;
8 unsigned : 2;
9 unsigned : 2;
10 unsigned : 1;
11 unsigned IndirectFile : 4;
12 unsigned IndirectSwizzle : 2;
13 int : 16;
14 int : 6;
15 int : 16;
16 int : 16;
17 unsigned : 10;
18 } __trans_tmp_1;
20 int ureg_src_indirect_addr_1, ntt_emit_texture_instr_sampler_handle_src;
22 void ureg_scalar(struct ureg_src);
24 void ntt_emit_texture_instr() {
25 struct ureg_src sampler;
26 if (ntt_emit_texture_instr_sampler_handle_src)
27 sampler = __trans_tmp_1;
28 struct ureg_src reg = sampler;
29 reg.File != TGSI_FILE_NULL;
30 reg.IndirectFile = reg.IndirectSwizzle = ureg_src_indirect_addr_1;
31 sampler = reg;
32 ureg_scalar(reg);