[llvm-commits] CVS: llvm/test/Programs/SingleSource/Benchmarks/Shootout-C++/ary2.cpp

Chris Lattner lattner at cs.uiuc.edu
Thu Dec 11 11:23:01 PST 2003


Changes in directory llvm/test/Programs/SingleSource/Benchmarks/Shootout-C++:

ary2.cpp updated: 1.2 -> 1.3

---
Log message:

Hrm, reading off the end of an array is _bad_.  PLEASE don't do that!  :)


---
Diffs of the changes:  (+2 -2)

Index: llvm/test/Programs/SingleSource/Benchmarks/Shootout-C++/ary2.cpp
diff -u llvm/test/Programs/SingleSource/Benchmarks/Shootout-C++/ary2.cpp:1.2 llvm/test/Programs/SingleSource/Benchmarks/Shootout-C++/ary2.cpp:1.3
--- llvm/test/Programs/SingleSource/Benchmarks/Shootout-C++/ary2.cpp:1.2	Mon Oct  6 19:53:07 2003
+++ llvm/test/Programs/SingleSource/Benchmarks/Shootout-C++/ary2.cpp	Thu Dec 11 11:22:38 2003
@@ -1,5 +1,5 @@
 // -*- mode: c++ -*-
-// $Id: ary2.cpp,v 1.2 2003/10/07 00:53:07 lattner Exp $
+// $Id: ary2.cpp,v 1.3 2003/12/11 17:22:38 lattner Exp $
 // http://www.bagley.org/~doug/shootout/
 
 #include <iostream>
@@ -7,7 +7,7 @@
 
 int
 main(int argc, char *argv[]) {
-    int i, n = ((argc == 2) ? atoi(argv[1]) : 1);
+    int i, n = 10*((argc == 2) ? atoi(argv[1]) : 1);
     typedef std::vector<int> ARY;
     ARY x(n);
     ARY y(n);





More information about the llvm-commits mailing list