1// RUN: %Slang -O 0 %s 2// RUN: %rs-filecheck-wrapper %s 3// CHECK: define internal i32 @main( 4// CHECK: %f = alloca float, 5// CHECK: %pf = alloca float*, 6// CHECK: %ppn = alloca i32**, 7 8struct float_struct { 9 float f; 10 float f2[2]; 11} compound_float; 12 13static 14int main(int argc, char* argv[]) 15{ 16 float f = 0.f; 17 float *pf = &f; 18 19 double d[2][2] = {{0, 1}, {2, 3.0}}; 20 struct float_struct s; 21 22 unsigned short us = -1; 23 const unsigned long l = (unsigned long) -1.0e8f; 24 25 { 26 int** ppn = 0; 27 if (ppn) { 28 return -1; 29 } 30 } 31 32 s.f = 10e-4f; 33 s.f2[0] = 1e4f; 34 s.f2[1] = 100.5f; 35 36 double result = pf[0] * d[1][1] * s.f * us * l; 37 return (result == 0 ? 0 : -1); 38} 39 40void the_main() { 41 main(0, 0); 42} 43 44#pragma version(1) 45#pragma rs java_package_name(foo) 46