[llvm-commits] CVS: llvm/test/Programs/SingleSource/UnitTests/2002-10-09-ArrayResolution.c

Misha Brukman brukman at cs.uiuc.edu
Fri Jun 6 21:49:01 PDT 2003


Changes in directory llvm/test/Programs/SingleSource/UnitTests:

2002-10-09-ArrayResolution.c updated: 1.1 -> 1.2

---
Log message:

* If we're using printf(), might as well #include <stdio.h>
* 50000 doesn't make much sense for the size of the array, since the point is
  that the upper bound of the loop equals the size of the array (shouldn't it be
  sizeof(array)+1?) The real problem is running 'dis' on a bytecode file with a
  an array of size 50000 and finding it statically initialized with 50000 const
  zeros written out. That grinds the editor to a halt on a slow machine, since
  that's all on the same line. Instead, why not use something manageable, that's
  also a power of 2, say 2**5?


---
Diffs of the changes:

Index: llvm/test/Programs/SingleSource/UnitTests/2002-10-09-ArrayResolution.c
diff -u llvm/test/Programs/SingleSource/UnitTests/2002-10-09-ArrayResolution.c:1.1 llvm/test/Programs/SingleSource/UnitTests/2002-10-09-ArrayResolution.c:1.2
--- llvm/test/Programs/SingleSource/UnitTests/2002-10-09-ArrayResolution.c:1.1	Wed Oct  9 11:48:12 2002
+++ llvm/test/Programs/SingleSource/UnitTests/2002-10-09-ArrayResolution.c	Fri Jun  6 21:48:43 2003
@@ -1,10 +1,13 @@
+#include <stdio.h>
+#define NUM 32
+
 int Array[];
-int Array[50000];
+int Array[NUM];
 int Foo;            /* If writing to the wrong "Array", this will get clobbered */
 
 int main() { 
   unsigned i;
-  for (i = 0; i != 50000; ++i)
+  for (i = 0; i != NUM; ++i)
     Array[i] = 5;
 
   printf("%d\n", Foo);





More information about the llvm-commits mailing list