PR tree-optimization/84740
[official-gcc.git] / gcc / testsuite / gcc.dg / pr27363.c
blob40a3c6b3526abda08d0645cc6f48b999861e0c3c
1 /* PR27363. CSE was breaking on the arm store multiple insn used for
2 structure copies. */
3 /* { dg-do run } */
4 /* { dg-options "-Os" } */
5 extern void abort (void);
7 struct snd_mask {
8 unsigned int bits[6];
9 };
11 static int __attribute__((noinline))
12 snd_mask_refine(struct snd_mask *mask)
14 struct snd_mask old;
16 old = *mask;
17 if (mask->bits[0]==0 && mask->bits[1]==0)
18 return 1;
20 return old.bits[0] != mask->bits[0];
23 int main(int argc, char *argv[])
25 struct snd_mask mask;
28 mask.bits[0] = 23;
29 mask.bits[1] = 42;
30 mask.bits[2] = 0;
31 mask.bits[3] = 0;
32 mask.bits[4] = 0;
33 mask.bits[5] = 0;
36 if (snd_mask_refine(&mask))
37 abort();
38 return 0;