Created
June 25, 2013 19:00
-
-
Save kripken/5861336 to your computer and use it in GitHub Desktop.
fuzz test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// t245.c | |
// Generated by Moh's fuzzer on Fri Jun 21 22:42:39 2013 | |
// | |
// Intel Corporation | |
// | |
#include <stdio.h> | |
#define N 100 | |
#define CS(a,n) checkSum((unsigned int*) a, n) | |
#define INIT(a,n,s) init((unsigned int*) a, n, s) | |
void init (unsigned int a[], unsigned int n, int seed) | |
{ | |
unsigned int j; | |
for (j = 0; j < n; j++) { | |
a[j] = ((j % 2 == 0) ? seed+j : seed-j) % 101; | |
} | |
} | |
unsigned int checkSum (unsigned int a[], unsigned int n) | |
{ | |
unsigned int j, sum; | |
sum = 0; | |
for (j = 0; j < n; j++) { | |
sum += ((j % 2 == 0) ? a[j] : -a[j]); | |
} | |
return sum; | |
} | |
int main() | |
{ | |
FILE* INPUT = fopen ("input.txt", "r"); | |
unsigned int ko=24, iq=46, k9=40, jm=41, res=31; | |
unsigned int er[N]; | |
unsigned int *pm=&ko; | |
INIT (er, N, 90); | |
fscanf (INPUT, "%u %u %u %u", &ko, &iq, &k9, &jm); | |
ko = -(er[96]); | |
if (er[70] <= er[80]) { | |
for (iq = 1; iq < 44; ++iq) { | |
} | |
*pm += *pm; | |
} | |
// Test Loop Fusion | |
for (k9 = 2; k9 < 54; k9++) { | |
} | |
for (jm = 2; jm < 54; jm++) { | |
// Test Pointer Intensiveness | |
*pm = ko - k9; | |
pm = &er[jm+1]; | |
*pm = er[jm-1]; | |
pm = &er[jm]; | |
*pm += er[jm+1]; | |
*pm += *pm; | |
} | |
res = ko; | |
res += CS (er, N); | |
printf ("res = %u\n", res); | |
return 0; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 | |
46 | |
40 | |
41 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment