mirror of
https://github.com/kmc7468/cs420.git
synced 2025-12-15 06:58:50 +00:00
Update skeleton
This commit is contained in:
@@ -43,23 +43,9 @@ REPLACE_DICT = {
|
||||
"typedef __builtin_va_list __gnuc_va_list;": "",
|
||||
"typedef __gnuc_va_list va_list;": "",
|
||||
|
||||
# To check fuzzer before make kecc support struct type
|
||||
# "struct[^}]*};": "",
|
||||
# " struct[^{]*[^}]*}[^;]*;": "",
|
||||
# "typedef struct _IO_FILE __FILE;": "",
|
||||
# "struct _IO_FILE;": "",
|
||||
# "typedef struct _IO_FILE FILE;": "typedef int FILE;",
|
||||
# "typedef struct _IO_FILE": "typedef int",
|
||||
# "typedef struct __locale_struct": "typedef int",
|
||||
# "typedef __locale_t locale_t;": "typedef int locale_t;",
|
||||
# "struct _IO_FILE_plus;": "",
|
||||
# "typedef _G_fpos_t": "typedef int",
|
||||
# "typedef struct[^\n]*\n{[^}]*}[^;]*;": "",
|
||||
# "typedef struct[^{]{[^}]*}": "typedef int",
|
||||
# "struct _IO_FILE": "int",
|
||||
# "FILE *": "void *",
|
||||
# "typedef __fpos_t fpos_t;": "",
|
||||
# "fpos_t *": "void *",
|
||||
# todo: need to consider the case below in the future:
|
||||
# avoid compile-time constant expressed as complex expression such as `1 + 1`
|
||||
"char _unused2[^;]*;": "char _unused2[10];",
|
||||
}
|
||||
CSMITH_DIR = "csmith-2.3.0"
|
||||
|
||||
|
||||
@@ -28,6 +28,7 @@ if
|
||||
grep 'pointer-bool-conversion' out.txt ||\
|
||||
grep 'non-void function does not return a value' out.txt ||\
|
||||
grep 'too many arguments in call' out.txt ||\
|
||||
grep 'declaration does not declare anything' out.txt ||\
|
||||
! gcc -Wall -Wextra -O2 test_reduced.c > outa.txt 2>&1 ||\
|
||||
grep 'uninitialized' outa.txt ||\
|
||||
grep 'without a cast' outa.txt ||\
|
||||
|
||||
@@ -34,7 +34,6 @@ where
|
||||
#[test]
|
||||
fn test_examples_write_c() {
|
||||
test_dir(Path::new("examples/"), &OsStr::new("c"), test_write_c);
|
||||
test_dir(Path::new("examples/hw1"), &OsStr::new("c"), test_write_c);
|
||||
}
|
||||
|
||||
#[test]
|
||||
@@ -75,3 +74,12 @@ fn test_examples_simplify_cfg() {
|
||||
&mut FunctionPass::<SimplifyCfgEmpty>::default(),
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_examples_mem2reg() {
|
||||
test_opt(
|
||||
&Path::new("examples/mem2reg/mem2reg.input.ir"),
|
||||
&Path::new("examples/mem2reg/mem2reg.output.ir"),
|
||||
&mut Mem2reg::default(),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user