-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Re-add for rems-project/cerberus#797
- Loading branch information
Showing
2 changed files
with
80 additions
and
0 deletions.
There are no files selected for viewing
37 changes: 37 additions & 0 deletions
37
src/example-archive/c-testsuite/broken/error-proof/00143.err1.c
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/* Disgusting, no? But it compiles and runs just fine. I feel a combination of | ||
pride and revulsion at this discovery. If no one's thought of it before, | ||
I think I'll name it after myself. | ||
It amazes me that after 10 years of writing C there are still | ||
little corners that I haven't explored fully. | ||
- Tom Duff */ | ||
|
||
int main() | ||
{ | ||
int count, n; | ||
short *from, *to; | ||
short a[39], b[39]; | ||
|
||
for(n = 0; n < 39; n++) { | ||
a[n] = n; | ||
b[n] = 0; | ||
} | ||
from = a; | ||
to = b; | ||
count = 39; | ||
n = (count + 7) / 8; | ||
switch (count % 8) { | ||
case 0: do { *to++ = *from++; | ||
case 7: *to++ = *from++; | ||
case 6: *to++ = *from++; | ||
case 5: *to++ = *from++; | ||
case 4: *to++ = *from++; | ||
case 3: *to++ = *from++; | ||
case 2: *to++ = *from++; | ||
case 1: *to++ = *from++; | ||
} while (--n > 0); | ||
} | ||
for(n = 0; n < 39; n++) | ||
if(a[n] != b[n]) | ||
return 1; | ||
return 0; | ||
} |
43 changes: 43 additions & 0 deletions
43
src/example-archive/c-testsuite/broken/error-timeout/00051.timeout.c
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
/* | ||
Invalid_argument("option is None") | ||
*/ | ||
// Cause: unknown | ||
|
||
int x = 0; | ||
|
||
int | ||
main() | ||
{ | ||
switch(x) | ||
case 0: | ||
; | ||
switch(x) | ||
case 0: | ||
switch(x) { | ||
case 0: | ||
goto next; | ||
default: | ||
return 1; | ||
} | ||
return 1; | ||
next: | ||
switch(x) | ||
case 1: | ||
return 1; | ||
switch(x) { | ||
{ | ||
x = 1 + 1; | ||
foo: | ||
case 1: | ||
return 1; | ||
} | ||
} | ||
switch(x) { | ||
case 0: | ||
return x; | ||
case 1: | ||
return 1; | ||
default: | ||
return 1; | ||
} | ||
} |