Merge -r 127928:132243 from trunk
[official-gcc.git] / gcc / testsuite / gcc.c-torture / compile / pr33855.c
blobe678cb34105abda8ff349c932d6ba083bdc5d40f
1 /* Testcase by Martin Michlmayr <tbm@cyrius.com> */
2 /* Used to segfault due to cselim not marking the complex temp var
3 as GIMPLE reg. */
5 typedef struct {
6 int nsant, nvqd;
7 _Complex long double *vqd;
8 } vsorc_t;
9 vsorc_t vsorc;
11 void foo(int next_job, int ain_num, int iped, long t) {
12 long double zpnorm;
14 while (!next_job)
15 if (ain_num)
17 if (iped == 1)
18 zpnorm = 0.0;
19 int indx = vsorc.nvqd-1;
20 vsorc.vqd[indx] = t*1.0fj;
21 if (cabsl(vsorc.vqd[indx]) < 1.e-20)
22 vsorc.vqd[indx] = 0.0fj;
23 zpnorm = t;
24 if (zpnorm > 0.0)
25 iped = vsorc.nsant;