1 /* Origin: PR c/5420 from David Mosberger <davidm@hpl.hp.com>.
2    This testcase was miscompiled when tail call optimizing, because a
3    compound literal initialization was emitted only in the tail call insn
4    chain, not in the normal call insn chain.  */
5 
6 typedef struct { unsigned short a; } A;
7 
8 extern void abort (void);
9 extern void exit (int);
10 
foo(unsigned int x)11 void foo (unsigned int x)
12 {
13   if (x != 0x800 && x != 0x810)
14     abort ();
15 }
16 
17 int
main(int argc,char ** argv)18 main (int argc, char **argv)
19 {
20   int i;
21   for (i = 0; i < 2; ++i)
22     foo (((A) { ((!(i >> 4) ? 8 : 64 + (i >> 4)) << 8) + (i << 4) } ).a);
23   exit (0);
24 }
25