summaryrefslogtreecommitdiff
path: root/test/CFrontend
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-12-07 17:08:07 +0000
committerChris Lattner <sabre@nondot.org>2002-12-07 17:08:07 +0000
commit61eadb0255925c8ad74710c0694ac7d9639b3c30 (patch)
treea5a3e062c61604b1b2eed1a8a542663b95c13294 /test/CFrontend
parent90c5fdb20a4256f7cf7a857813a8aedc27c79a40 (diff)
downloadllvm-61eadb0255925c8ad74710c0694ac7d9639b3c30.tar.gz
llvm-61eadb0255925c8ad74710c0694ac7d9639b3c30.tar.bz2
llvm-61eadb0255925c8ad74710c0694ac7d9639b3c30.tar.xz
Check in an old testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4951 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CFrontend')
-rw-r--r--test/CFrontend/2002-11-07-Redefinition.c58
1 files changed, 58 insertions, 0 deletions
diff --git a/test/CFrontend/2002-11-07-Redefinition.c b/test/CFrontend/2002-11-07-Redefinition.c
new file mode 100644
index 0000000000..4ac88b8f14
--- /dev/null
+++ b/test/CFrontend/2002-11-07-Redefinition.c
@@ -0,0 +1,58 @@
+/* Provide Declarations */
+
+#ifndef NULL
+#define NULL 0
+#endif
+
+#ifndef __cplusplus
+typedef unsigned char bool;
+#endif
+
+
+/* Support for floating point constants */
+typedef unsigned long long ConstantDoubleTy;
+typedef unsigned int ConstantFloatTy;
+
+
+/* Global Declarations */
+
+/* External Global Variable Declarations */
+
+/* Function Declarations */
+void __main();
+int printf(signed char *, ...);
+void testfunc(short l5_s, float l11_X, signed char l3_C, signed long long l9_LL, int l7_I, double l12_D);
+void main();
+
+/* Malloc to make sun happy */
+extern void * malloc(size_t);
+
+
+
+/* Global Variable Declerations */
+extern signed char l27_d_LC0[26];
+
+
+/* Global Variable Definitions and Initialization */
+static signed char l27_d_LC0[26] = "%d, %f, %d, %lld, %d, %f\n";
+
+
+/* Function Bodies */
+void testfunc(short l5_s, float l11_X, signed char l3_C, signed long long l9_LL, int l7_I, double l12_D) {
+ int l7_reg226;
+
+
+ l7_reg226 = printf((&(l27_d_LC0[0ll])), ((unsigned )l5_s), ((double )l11_X), ((unsigned )l3_C), l9_LL, l7_I, l12_D);
+ return;
+}
+
+void main() {
+
+ const ConstantFloatTy FloatConstant0 = 0x3f9f5c29; /* 1.245 */
+ const ConstantDoubleTy FloatConstant1 = 0x432ff973cafa8000; /* 4.5e+15 */
+
+ __main();
+ testfunc(12, (*(float*)&FloatConstant0), 120, 123456677890ll, -10, (*(double*)&FloatConstant1));
+ return;
+}
+