testcase for PR691
[oota-llvm.git] / test / CFrontend / 2002-11-07-Redefinition.c
1 // RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
2
3 /* Provide Declarations */
4
5 #ifndef NULL
6 #define NULL 0
7 #endif
8
9 #ifndef __cplusplus
10 typedef unsigned char bool;
11 #endif
12
13
14 /* Support for floating point constants */
15 typedef unsigned long long ConstantDoubleTy;
16 typedef unsigned int        ConstantFloatTy;
17
18
19 /* Global Declarations */
20
21 /* External Global Variable Declarations */
22
23 /* Function Declarations */
24 void __main();
25 int printf(signed char *, ...);
26 void testfunc(short l5_s, float l11_X, signed char l3_C, signed long long l9_LL, int l7_I, double l12_D);
27 void main();
28
29 /* Malloc to make sun happy */
30 extern void * malloc(size_t);
31
32
33
34 /* Global Variable Declerations */
35 extern signed char l27_d_LC0[26];
36
37
38 /* Global Variable Definitions and Initialization */
39 static signed char l27_d_LC0[26] = "%d, %f, %d, %lld, %d, %f\n";
40
41
42 /* Function Bodies */
43 void testfunc(short l5_s, float l11_X, signed char l3_C, signed long long l9_LL, int l7_I, double l12_D) {
44   int l7_reg226;
45
46
47   l7_reg226 = printf((&(l27_d_LC0[0ll])), ((unsigned )l5_s), ((double )l11_X), ((unsigned )l3_C), l9_LL, l7_I, l12_D);
48   return;
49 }
50
51 void main() {
52
53   const ConstantFloatTy FloatConstant0 = 0x3f9f5c29;    /* 1.245 */
54   const ConstantDoubleTy FloatConstant1 = 0x432ff973cafa8000;    /* 4.5e+15 */
55
56   __main();
57   testfunc(12, (*(float*)&FloatConstant0), 120, 123456677890ll, -10, (*(double*)&FloatConstant1));
58   return;
59 }
60