blob: 1dc51a092844c4bae9e954c5d093f4683e18e1b9 [file] [log] [blame]
Dan Gohmanfea1dd02009-08-25 15:38:29 +00001// RUN: %llvmgcc -S %s -o - | llvm-as -o /dev/null
Tanya Lattnere9af5d12004-11-06 22:41:00 +00002
Chris Lattner65903732002-04-08 18:48:47 +00003/* GCC is not outputting the static array to the LLVM backend, so bad things
4 * happen. Note that if this is defined static, everything seems fine.
5 */
Matthijs Kooijmanb7e103b2008-06-10 14:37:44 +00006double test(unsigned X) {
Chris Lattner65903732002-04-08 18:48:47 +00007 double student_t[30]={0.0 , 12.706 , 4.303 , 3.182 , 2.776 , 2.571 ,
8 2.447 , 2.365 , 2.306 , 2.262 , 2.228 ,
9 2.201 , 2.179 , 2.160 , 2.145 , 2.131 ,
10 2.120 , 2.110 , 2.101 , 2.093 , 2.086 ,
11 2.080 , 2.074 , 2.069 , 2.064 , 2.060 ,
12 2.056 , 2.052 , 2.048 , 2.045 };
13 return student_t[X];
14}