Debian Codegraph @

gcc/testsuite/gcc.c-torture/compile/pr33855.c

raw
1 /* Testcase by Martin Michlmayr <[email protected]> */
2 /* Used to segfault due to cselim not marking the complex temp var
3 as GIMPLE reg. */
4
5 typedef struct {
6 int nsant, nvqd;
7 _Complex long double *vqd;
8 } vsorc_t;
9 vsorc_t vsorc;
10 long double cabsl(_Complex long double);
11
12 void foo(int next_job, int ain_num, int iped, long t) {
13 long double zpnorm;
14
15 while (!next_job)
16 if (ain_num)
17 {
18 if (iped == 1)
19 zpnorm = 0.0;
20 int indx = vsorc.nvqd-1;
21 vsorc.vqd[indx] = t*1.0fj;
22 if (cabsl(vsorc.vqd[indx]) < 1.e-20)
23 vsorc.vqd[indx] = 0.0fj;
24 zpnorm = t;
25 if (zpnorm > 0.0)
26 iped = vsorc.nsant;
27 }
28 }