Make tests work with broken 32-bit compiler.
[riscv-tests.git] / debug / programs / debug.c
index afca484e992d1229eb7664ab5b2326dce8ea76da..c7c23a6e83dea1bfe5b0c45058806c0110b274ed 100644 (file)
@@ -26,10 +26,14 @@ size_t strlen(const char *buf)
     return len;
 }
 
+// TODO: These should be local to main, but if I make them global then gdb can
+// find them.
+static volatile int i;
+static int j;
 int main()
 {
-    volatile int i = 0;
-    int j = 0;
+    i = 0;
+    j = 0;
     char *fox = "The quick brown fox jumps of the lazy dog.";
     unsigned int checksum = 0;