OSDN Git Service

* c-decl.c (declspecs_add_type): Don't pedwarn for _Complex in
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / ultrasp6.c
1 /* PR target/7784 */
2 /* Originator: Peter van Hoof <p.van-hoof@qub.ac.uk> */
3 /* { dg-do compile { target sparc-*-* } } */
4 /* { dg-options "-O2 -mcpu=ultrasparc" } */
5
6 typedef struct
7 {
8   float EnergyErg;
9   float ots;
10 } EmLine;
11
12 extern const int ipH_LIKE ;
13 extern const int ipHYDROGEN ;
14 extern const int ipH1s;
15 extern const int ipH2s;
16 extern const int ipH2p;
17
18 extern EmLine ****EmisLines;
19
20 typedef struct
21 {
22   long n;
23   long s;
24   long l;
25 } Elevels;
26
27 extern struct t_iso
28 {
29   float ***Pop2Ion;
30   long int numLevels[2][30L];
31 } iso;
32
33 extern struct t_LineSave
34 {
35   long int nsum;
36   long int ndsum;
37   long int nComment;
38   long int npxdd;
39   long int ipass;
40   char chHoldComments[10][200];
41 } LineSave;
42
43 extern struct t_hydro
44 {
45   int lgHydEmiss;
46   float **pestrk ;
47 } hydro;
48
49 extern struct t_dense
50 {
51   double DensityLaw[10];
52   float frad[500];
53   float fhden[500];
54   float den0;
55   double eden;
56 } dense;
57
58 extern struct t_abund
59 {
60   float xIonFracs[30L +3][30L +1];
61 } abund;
62
63 extern struct t_CaseBHS
64 {
65   long int nDensity[2][8] , ntemp[2][8] , ncut[2][8] ;
66   int lgHCaseBOK[2][8];
67 } CaseBHS ;
68
69 extern struct t_smbeta
70 {
71   float SimHBeta,
72     cn4861,
73     cn1216,
74     sv4861,
75     sv1216;
76 } smbeta;
77
78 extern struct t_phycon
79 {
80   float te;
81 } phycon;
82
83
84 extern struct t_sphere
85 {
86   int lgSphere;
87   float covgeo;
88 } sphere;
89
90 void linadd(double xInten, float wavelength, char *chLab, char chInfo);
91
92 extern struct t_radiusVar
93 {
94   int lgDrNeg;
95   double dVeff;
96 } radius;
97
98 void lines_hydro(void)
99 {
100   long int i, nelem, ipHi, ipLo;
101   double hbetab, em , EmisFac, pump;
102   char chLabel[5];
103
104   linadd(abund.xIonFracs[ipHYDROGEN][1]*iso.Pop2Ion[ipH_LIKE][ipHYDROGEN][3]*hydro.pestrk[3][2]*3.025e-12, 6563,"Strk",'i');
105
106   linadd(abund.xIonFracs[ipHYDROGEN][1]*iso.Pop2Ion[ipH_LIKE][ipHYDROGEN][4]*hydro.pestrk[4][2]*4.084e-12, 4861,"Strk",'i');
107
108   linadd(abund.xIonFracs[ipHYDROGEN][1]*iso.Pop2Ion[ipH_LIKE][ipHYDROGEN][4]*hydro.pestrk[4][3]*1.059e-12, 18751,"Strk",'i');
109
110   linadd(abund.xIonFracs[ipHYDROGEN][1]*iso.Pop2Ion[ipH_LIKE][ipHYDROGEN][5]*hydro.pestrk[5][4]*4.900e-13, 40512,"Strk",'i');
111
112   ((void)((LineSave.ipass <1 || EmisLines[ipH_LIKE][ipHYDROGEN][ipH2p][ipH1s].ots>= 0.) || (__assert("LineSave.ipass <1 || EmisLines[ipH_LIKE][ipHYDROGEN][ipH2p][ipH1s].ots>= 0.", "lines_hydro.c", 118), 0)));
113
114   linadd(EmisLines[ipH_LIKE][ipHYDROGEN][3][ipH2s].ots*EmisLines[ipH_LIKE][ipHYDROGEN][3][ipH2s].EnergyErg, 6563,"Dest",'i');
115
116   linadd(EmisLines[ipH_LIKE][ipHYDROGEN][5][4].ots*EmisLines[ipH_LIKE][ipHYDROGEN][5][4].EnergyErg,40516, "Dest",'i');
117
118   smbeta.SimHBeta = smbeta.SimHBeta/(float)radius.dVeff*sphere.covgeo;
119
120   linadd(smbeta.SimHBeta,4861,"Q(H)",'i');
121
122   smbeta.SimHBeta = smbeta.SimHBeta*(float)radius.dVeff/sphere.covgeo;
123
124   for( nelem=0; nelem < 30L; nelem++ )
125   {
126     int iCase;
127     for( iCase=0; iCase<2; ++iCase )
128     {
129       char chAB[2]={'A','B'};
130       char chLab[5]="Ca  ";
131
132       for( ipLo=1+iCase; ipLo<(((6)<(iso.numLevels[ipH_LIKE][nelem])) ? (6) : (5)); ++ipLo )
133       {
134         for( ipHi=ipLo+1; ipHi< (((ipLo+5)<(iso.numLevels[ipH_LIKE][nelem])) ? (ipLo+5) : (iso.numLevels[ipH_LIKE][nelem])); ++ipHi )
135         {
136           float wl;
137
138           hbetab = HSRate( ipHi,ipLo , nelem+1, phycon.te , dense.eden, chAB[iCase] );
139           if( hbetab<=0. )
140             CaseBHS.lgHCaseBOK[iCase][nelem] = 0;
141
142           if( !hydro.lgHydEmiss )
143             hbetab *= abund.xIonFracs[nelem][nelem+1]*dense.eden;
144
145          linadd(hbetab,wl,chLab,'i' );
146         }
147       }
148     }
149   }
150 }