1 /* { dg-do compile } */
2 /* { dg-options "-Ofast -floop-nest-optimize" } */
3
4 typedef struct _IO_FILE FILE;
5 extern struct _IO_FILE *stderr;
6 typedef float real;
7 typedef real rvec[3];
8 int rgbset (int);
9 void ps_box (int, int);
plot_phi(char * fn,rvec box,int natoms,rvec x[],real phi[])10 void plot_phi(char *fn,rvec box,int natoms,rvec x[],real phi[])
11 {
12 real phi_max,rr,gg,bb,fac,dx,x0,y0;
13 int i;
14 for(i=0; (i<natoms); i++)
15 phi_max=((phi_max > __builtin_fabs(phi[i]))
16 ? phi_max : __builtin_fabs(phi[i]));
17 if (__builtin_fabs(phi_max)<1.2e-38)
18 __builtin_fprintf(stderr, "X");
19 ps_box((real)(fac*box[0]-1),(real)(fac*box[1]-1));
20 for(i=0; (i<natoms); i++)
21 {
22 rr=gg=bb=1.0;
23 if (phi[i] < 0)
24 gg=bb=(1.0+(phi[i]/phi_max));
25 else
26 rr=gg=(1.0-(phi[i]/phi_max));
27 rr=rgbset(rr);
28 }
29 }
30