├── .gitattributes ├── .github └── workflows │ ├── build.yml │ ├── csmith.yml │ └── statistics.yml ├── .gitignore ├── .rultor.yml ├── CITATION.cff ├── Dockerfile ├── LICENSE.txt ├── README.md ├── project ├── CMakeLists.txt ├── eo-lib │ ├── coperators │ │ ├── addr-of.eo │ │ ├── addrcpy.eo │ │ ├── address.eo │ │ ├── addrmemcpy.eo │ │ ├── and.eo │ │ ├── as-bool.eo │ │ ├── as-bytes.eo │ │ ├── as-char.eo │ │ ├── as-float32.eo │ │ ├── as-float64.eo │ │ ├── as-int16.eo │ │ ├── as-int32.eo │ │ ├── as-int64.eo │ │ ├── as-int8.eo │ │ ├── as-string.eo │ │ ├── as-uint16.eo │ │ ├── as-uint32.eo │ │ ├── as-uint64.eo │ │ ├── as-uint8.eo │ │ ├── bit-and.eo │ │ ├── bit-not.eo │ │ ├── bit-or.eo │ │ ├── bit-xor.eo │ │ ├── c-goto.eo │ │ ├── c-label.eo │ │ ├── div.eo │ │ ├── eq.eo │ │ ├── get.eo │ │ ├── gt.eo │ │ ├── gte.eo │ │ ├── if-else.eo │ │ ├── if.eo │ │ ├── lt.eo │ │ ├── lte.eo │ │ ├── memaddrcpy.eo │ │ ├── memcpy.eo │ │ ├── minus.eo │ │ ├── mod.eo │ │ ├── neg.eo │ │ ├── neq.eo │ │ ├── not.eo │ │ ├── null-function.eo │ │ ├── or.eo │ │ ├── plug.eo │ │ ├── plus.eo │ │ ├── pos.eo │ │ ├── post-dec-float32.eo │ │ ├── post-dec-float64.eo │ │ ├── post-dec-int16.eo │ │ ├── post-dec-int32.eo │ │ ├── post-dec-int64.eo │ │ ├── post-dec-int8.eo │ │ ├── post-dec-ptr.eo │ │ ├── post-dec-uint16.eo │ │ ├── post-dec-uint32.eo │ │ ├── post-dec-uint64.eo │ │ ├── post-dec-uint8.eo │ │ ├── post-inc-float32.eo │ │ ├── post-inc-float64.eo │ │ ├── post-inc-int16.eo │ │ ├── post-inc-int32.eo │ │ ├── post-inc-int64.eo │ │ ├── post-inc-int8.eo │ │ ├── post-inc-ptr.eo │ │ ├── post-inc-uint16.eo │ │ ├── post-inc-uint32.eo │ │ ├── post-inc-uint64.eo │ │ ├── post-inc-uint8.eo │ │ ├── pre-dec-float32.eo │ │ ├── pre-dec-float64.eo │ │ ├── pre-dec-int16.eo │ │ ├── pre-dec-int32.eo │ │ ├── pre-dec-int64.eo │ │ ├── pre-dec-int8.eo │ │ ├── pre-dec-ptr.eo │ │ ├── pre-dec-uint16.eo │ │ ├── pre-dec-uint32.eo │ │ ├── pre-dec-uint64.eo │ │ ├── pre-dec-uint8.eo │ │ ├── pre-inc-float32.eo │ │ ├── pre-inc-float64.eo │ │ ├── pre-inc-int16.eo │ │ ├── pre-inc-int32.eo │ │ ├── pre-inc-int64.eo │ │ ├── pre-inc-int8.eo │ │ ├── pre-inc-ptr.eo │ │ ├── pre-inc-uint16.eo │ │ ├── pre-inc-uint32.eo │ │ ├── pre-inc-uint64.eo │ │ ├── pre-inc-uint8.eo │ │ ├── printf.eo │ │ ├── ram.eo │ │ ├── read-as-address.eo │ │ ├── read-as-bool.eo │ │ ├── read-as-float32.eo │ │ ├── read-as-float64.eo │ │ ├── read-as-int16.eo │ │ ├── read-as-int32.eo │ │ ├── read-as-int64.eo │ │ ├── read-as-int8.eo │ │ ├── read-as-ptr.eo │ │ ├── read-as-string.eo │ │ ├── read-as-uint16.eo │ │ ├── read-as-uint32.eo │ │ ├── read-as-uint64.eo │ │ ├── read-as-uint8.eo │ │ ├── read.eo │ │ ├── set.eo │ │ ├── shift-left.eo │ │ ├── shift-right.eo │ │ ├── times.eo │ │ ├── write-as-bool.eo │ │ ├── write-as-float32.eo │ │ ├── write-as-float64.eo │ │ ├── write-as-int16.eo │ │ ├── write-as-int32.eo │ │ ├── write-as-int64.eo │ │ ├── write-as-int8.eo │ │ ├── write-as-ptr.eo │ │ ├── write-as-string.eo │ │ ├── write-as-uint16.eo │ │ ├── write-as-uint32.eo │ │ ├── write-as-uint64.eo │ │ ├── write-as-uint8.eo │ │ └── write.eo │ └── pom.xml ├── scripts │ ├── build_c2eo.py │ ├── build_eo.py │ ├── c2eo-all.py │ ├── clang_tidy.py │ ├── clean_before_transpilation.py │ ├── code_lines.py │ ├── compile.py │ ├── csmith.py │ ├── data │ │ ├── meta │ │ │ ├── plug.txt │ │ │ └── run.sh.txt │ │ ├── settings.yml │ │ └── skips │ │ │ ├── gcc-compile.txt │ │ │ ├── gcc.txt │ │ │ ├── test.txt │ │ │ └── testcuite.txt │ ├── eo_execute.py │ ├── readme.md │ ├── settings.py │ ├── test.py │ ├── tools.py │ ├── transpile.py │ └── update-release.py ├── src │ └── transpiler │ │ ├── .clang-format │ │ ├── CMakeLists.txt │ │ ├── aliases.h │ │ ├── analyzers.cpp │ │ ├── analyzers.h │ │ ├── enum_manager.cpp │ │ ├── enum_manager.h │ │ ├── enumdecl.cpp │ │ ├── enumdecl.h │ │ ├── eo_object.cpp │ │ ├── eo_object.h │ │ ├── function_manager.cpp │ │ ├── function_manager.h │ │ ├── main.cpp │ │ ├── matchers.cpp │ │ ├── matchers.h │ │ ├── memory_manager.cpp │ │ ├── memory_manager.h │ │ ├── process_variables.cpp │ │ ├── process_variables.h │ │ ├── readme.md │ │ ├── record_manager.cpp │ │ ├── record_manager.h │ │ ├── recorddecl.cpp │ │ ├── recorddecl.h │ │ ├── tracer.cpp │ │ ├── tracer.h │ │ ├── transpile_helper.cpp │ │ ├── transpile_helper.h │ │ ├── type_manager.cpp │ │ ├── type_manager.h │ │ ├── unit_transpiler.cpp │ │ ├── unit_transpiler.h │ │ ├── util.cpp │ │ ├── util.h │ │ ├── vardecl.cpp │ │ └── vardecl.h └── tests │ ├── in_progress │ ├── for_main │ │ ├── .gitkeep │ │ ├── array │ │ │ ├── arr3d │ │ │ │ ├── arr3d1.c │ │ │ │ ├── arr3d3.c │ │ │ │ ├── arr3dlong1.c │ │ │ │ └── arr3dlong3.c │ │ │ ├── array_formula │ │ │ │ ├── array_formula.c │ │ │ │ └── array_formula_simp.c │ │ │ └── other │ │ │ │ ├── array2scalar.c │ │ │ │ └── some.c │ │ ├── bad │ │ │ ├── algorthms │ │ │ │ └── fibo │ │ │ │ │ └── fibo_no_types.c │ │ │ ├── argc_argv │ │ │ │ ├── argc_argv01.c │ │ │ │ └── argc_argv02.c │ │ │ ├── operations │ │ │ │ ├── inc_dec │ │ │ │ │ ├── post_dec_char.c │ │ │ │ │ ├── post_dec_float64.c │ │ │ │ │ └── pre_inc_int64.c │ │ │ │ └── question │ │ │ │ │ ├── 00076 │ │ │ │ │ └── 00076.c │ │ │ │ │ ├── 00109 │ │ │ │ │ └── 00109.c │ │ │ │ │ ├── 00137 │ │ │ │ │ └── 00137.c │ │ │ │ │ ├── 00138 │ │ │ │ │ └── 00138.c │ │ │ │ │ ├── 00144 │ │ │ │ │ └── 00144.c │ │ │ │ │ └── 00183 │ │ │ │ │ └── 00183.c │ │ │ ├── operators │ │ │ │ ├── 00174 │ │ │ │ │ └── 00174.c │ │ │ │ ├── loops │ │ │ │ │ ├── 00041 │ │ │ │ │ │ └── 00041.c │ │ │ │ │ └── for │ │ │ │ │ │ └── for02.c │ │ │ │ └── switch │ │ │ │ │ └── switch01 │ │ │ │ │ ├── 00051 │ │ │ │ │ └── 00051.c │ │ │ │ │ └── 00143 │ │ │ │ │ └── 00143.c │ │ │ ├── types │ │ │ │ ├── base_types │ │ │ │ │ ├── 00216 │ │ │ │ │ │ └── 00216.c │ │ │ │ │ ├── type_char │ │ │ │ │ │ ├── 00025 │ │ │ │ │ │ │ └── 00025.c │ │ │ │ │ │ ├── 00058 │ │ │ │ │ │ │ └── 00058.c │ │ │ │ │ │ ├── 00173 │ │ │ │ │ │ │ └── 00173.c │ │ │ │ │ │ ├── type_char01.c │ │ │ │ │ │ ├── type_char02.c │ │ │ │ │ │ ├── type_char04.c │ │ │ │ │ │ ├── type_char06.c │ │ │ │ │ │ ├── type_char07.c │ │ │ │ │ │ └── type_char08.c │ │ │ │ │ └── type_uns_long(long) │ │ │ │ │ │ ├── 00082 │ │ │ │ │ │ └── 00082.c │ │ │ │ │ │ ├── 00134 │ │ │ │ │ │ └── 00134.c │ │ │ │ │ │ ├── 00135 │ │ │ │ │ │ └── 00135.c │ │ │ │ │ │ ├── 00204 │ │ │ │ │ │ └── 00204.c │ │ │ │ │ │ ├── 00215 │ │ │ │ │ │ └── 00215.c │ │ │ │ │ │ └── 00217 │ │ │ │ │ │ └── 00217.c │ │ │ │ ├── composite_types │ │ │ │ │ ├── array-code-too-large │ │ │ │ │ │ └── 00205 │ │ │ │ │ │ │ ├── 00205.c │ │ │ │ │ │ │ └── s │ │ │ │ │ │ │ └── 00205s.c │ │ │ │ │ ├── funptr │ │ │ │ │ │ ├── 00087 │ │ │ │ │ │ │ └── 00087.c │ │ │ │ │ │ ├── 00089 │ │ │ │ │ │ │ └── 00089.c │ │ │ │ │ │ ├── 00095 │ │ │ │ │ │ │ └── 00095.c │ │ │ │ │ │ ├── 00124 │ │ │ │ │ │ │ └── 00124.c │ │ │ │ │ │ ├── 00170 │ │ │ │ │ │ │ └── 00170.c │ │ │ │ │ │ ├── 00189 │ │ │ │ │ │ │ └── 00189.c │ │ │ │ │ │ ├── 00209 │ │ │ │ │ │ │ └── 00209.c │ │ │ │ │ │ ├── 00210 │ │ │ │ │ │ │ └── 00210.c │ │ │ │ │ │ └── 00219 │ │ │ │ │ │ │ └── 00219.c │ │ │ │ │ ├── pointers │ │ │ │ │ │ ├── 00149 │ │ │ │ │ │ │ └── 00149.c │ │ │ │ │ │ ├── local_ptr │ │ │ │ │ │ │ ├── char │ │ │ │ │ │ │ │ ├── char_ptr01 │ │ │ │ │ │ │ │ │ └── char_ptr01.c │ │ │ │ │ │ │ │ ├── char_ptr02 │ │ │ │ │ │ │ │ │ └── char_ptr02.c │ │ │ │ │ │ │ │ └── char_ptr03 │ │ │ │ │ │ │ │ │ └── char_ptr03.c │ │ │ │ │ │ │ └── unsigned_long_long │ │ │ │ │ │ │ │ ├── ulonglong_ptr01 │ │ │ │ │ │ │ │ └── ulonglong_ptr01.c │ │ │ │ │ │ │ │ ├── ulonglong_ptr03 │ │ │ │ │ │ │ │ └── ulonglong_ptr02.c │ │ │ │ │ │ │ │ └── ulonnglong_ptr02 │ │ │ │ │ │ │ │ └── ulonglong_ptr03.c │ │ │ │ │ │ ├── other │ │ │ │ │ │ │ ├── pointers01.c │ │ │ │ │ │ │ ├── pointers03.c │ │ │ │ │ │ │ └── pointers07.c │ │ │ │ │ │ └── simple_types_ptr │ │ │ │ │ │ │ ├── char │ │ │ │ │ │ │ ├── char_ptr01 │ │ │ │ │ │ │ │ └── char_ptr01.c │ │ │ │ │ │ │ ├── char_ptr02 │ │ │ │ │ │ │ │ └── char_ptr02.c │ │ │ │ │ │ │ └── char_ptr03 │ │ │ │ │ │ │ │ └── char_ptr03.c │ │ │ │ │ │ │ ├── double │ │ │ │ │ │ │ └── double_ptr02 │ │ │ │ │ │ │ │ └── double_ptr02.c │ │ │ │ │ │ │ ├── int │ │ │ │ │ │ │ └── int_ptr02 │ │ │ │ │ │ │ │ └── int_ptr02.c │ │ │ │ │ │ │ ├── long_long │ │ │ │ │ │ │ └── long_long_ptr02 │ │ │ │ │ │ │ │ └── long_long_ptr02.c │ │ │ │ │ │ │ ├── short │ │ │ │ │ │ │ └── short_ptr02 │ │ │ │ │ │ │ │ └── short_ptr02.c │ │ │ │ │ │ │ ├── unsigned_int │ │ │ │ │ │ │ ├── uint_ptr01 │ │ │ │ │ │ │ │ └── uint_ptr01.c │ │ │ │ │ │ │ ├── uint_ptr02 │ │ │ │ │ │ │ │ └── uint_ptr02.c │ │ │ │ │ │ │ └── uint_ptr03 │ │ │ │ │ │ │ │ └── uint_ptr03.c │ │ │ │ │ │ │ ├── unsigned_long_long │ │ │ │ │ │ │ ├── ulonglong_ptr01 │ │ │ │ │ │ │ │ └── ulonglong_ptr01.c │ │ │ │ │ │ │ ├── ulonglong_ptr03 │ │ │ │ │ │ │ │ └── ulonglong_ptr02.c │ │ │ │ │ │ │ └── ulonnglong_ptr02 │ │ │ │ │ │ │ │ └── ulonglong_ptr03.c │ │ │ │ │ │ │ └── unsigned_short │ │ │ │ │ │ │ ├── ushort_ptr01 │ │ │ │ │ │ │ └── ushort_ptr01.c │ │ │ │ │ │ │ ├── ushort_ptr02 │ │ │ │ │ │ │ └── ushort_ptr02.c │ │ │ │ │ │ │ └── ushort_ptr03 │ │ │ │ │ │ │ └── ushort_ptr03.c │ │ │ │ │ └── struct │ │ │ │ │ │ └── 00150 │ │ │ │ │ │ └── 00150.c │ │ │ │ ├── lists │ │ │ │ │ └── some │ │ │ │ │ │ └── simp-4.c │ │ │ │ └── type_casting │ │ │ │ │ └── 00104 │ │ │ │ │ └── 00104.c │ │ │ └── variables │ │ │ │ ├── 00096 │ │ │ │ └── 00096.c │ │ │ │ ├── 00175 │ │ │ │ └── 00175.c │ │ │ │ ├── init │ │ │ │ ├── optimization │ │ │ │ │ └── some1.c │ │ │ │ └── pointers │ │ │ │ │ └── 00045 │ │ │ │ │ ├── 00045.c │ │ │ │ │ └── local │ │ │ │ │ ├── double_local_ptr.c │ │ │ │ │ ├── int_local_ptr.c │ │ │ │ │ ├── long_long_local_ptr.c │ │ │ │ │ └── short_local_ptr.c │ │ │ │ └── static │ │ │ │ ├── 00197 │ │ │ │ └── 00197.c │ │ │ │ └── some_local_static │ │ │ │ ├── error │ │ │ │ └── some_local_static01.c │ │ │ │ └── fail │ │ │ │ ├── some_local_static02.c │ │ │ │ └── some_local_static03.c │ │ └── good │ │ │ ├── algorithms │ │ │ ├── factorial │ │ │ │ ├── fact01_while_glob_i32_post.c │ │ │ │ ├── fact02_while_glob_i32_post_cmpd.c │ │ │ │ ├── fact02_while_glob_i64_post_cmpd.c │ │ │ │ └── fact05_rec_i64.c │ │ │ ├── fibo │ │ │ │ ├── fibo.c │ │ │ │ ├── fibo_rec_global2.c │ │ │ │ └── fibo_rec_ret.c │ │ │ └── sqrt │ │ │ │ ├── sqrt_do_while.c │ │ │ │ ├── sqrt_newton.c │ │ │ │ └── sqrt_while_do.c │ │ │ ├── functions │ │ │ ├── extproto03.c │ │ │ ├── func005_add_inc_inc.c │ │ │ ├── func006_f2_in_f1.c │ │ │ ├── func007_add_f1_f2.c │ │ │ ├── func008_call_f1.c │ │ │ ├── func009_3params.c │ │ │ ├── func010_use_proto.c │ │ │ ├── func02.c │ │ │ └── func06.c │ │ │ ├── operations │ │ │ ├── arithmetic │ │ │ │ ├── div_i64i64 │ │ │ │ │ └── div_i64i64.c │ │ │ │ └── incdec │ │ │ │ │ ├── post_dec_int64.c │ │ │ │ │ ├── post_inc_int64.c │ │ │ │ │ ├── post_inc_int64_assign.c │ │ │ │ │ ├── post_pre_inc_int64_combi.c │ │ │ │ │ ├── ppost_inc_int64_combi.c │ │ │ │ │ └── pre_dec_int64.c │ │ │ ├── assign │ │ │ │ ├── ass06_cmpd_and.c │ │ │ │ ├── ass07_cmpd_or.c │ │ │ │ ├── ass08_cmpd_xor.c │ │ │ │ ├── ass09_cmpd_shift_left.c │ │ │ │ ├── ass10_cmpd_shift_right.c │ │ │ │ └── assign_full_cmpd.c │ │ │ └── ptr_bin_op │ │ │ │ └── ptr_plus_val │ │ │ │ └── ptr_plus_long.c │ │ │ ├── operators │ │ │ └── switch │ │ │ │ └── switch03.c │ │ │ ├── types │ │ │ ├── base_types │ │ │ │ └── type_casting │ │ │ │ │ ├── typecast01_i64_to_f64_ass.c │ │ │ │ │ └── typecast01_i64_to_f64_expl.c │ │ │ └── complex_types │ │ │ │ ├── array │ │ │ │ ├── arr3d │ │ │ │ │ └── arr3d2.c │ │ │ │ ├── exchange │ │ │ │ │ └── exchange01.c │ │ │ │ └── simple │ │ │ │ │ ├── array07.c │ │ │ │ │ └── array08.c │ │ │ │ ├── enum │ │ │ │ ├── enum01.c │ │ │ │ └── enum02.c │ │ │ │ ├── pointers │ │ │ │ ├── full │ │ │ │ │ └── pointers_full.c │ │ │ │ ├── local_ptr │ │ │ │ │ └── unsigned_int │ │ │ │ │ │ ├── uint_ptr01 │ │ │ │ │ │ └── uint_ptr01.c │ │ │ │ │ │ ├── uint_ptr02 │ │ │ │ │ │ └── uint_ptr02.c │ │ │ │ │ │ └── uint_ptr03 │ │ │ │ │ │ └── uint_ptr03.c │ │ │ │ ├── other │ │ │ │ │ ├── pointers02.c │ │ │ │ │ ├── pointers04.c │ │ │ │ │ ├── pointers05.c │ │ │ │ │ └── pointers06.c │ │ │ │ ├── ptr_arrow │ │ │ │ │ └── ptr_arrow01.c │ │ │ │ ├── struct_ptr │ │ │ │ │ ├── struct_ptr01 │ │ │ │ │ │ └── struct_ptr01.c │ │ │ │ │ ├── struct_ptr02 │ │ │ │ │ │ └── struct_ptr02.c │ │ │ │ │ ├── struct_ptr03 │ │ │ │ │ │ └── struct_ptr03.c │ │ │ │ │ └── struct_ptr04 │ │ │ │ │ │ └── struct_ptr04.c │ │ │ │ ├── unsigned_short │ │ │ │ │ ├── ushort_ptr01 │ │ │ │ │ │ └── ushort_ptr01.c │ │ │ │ │ ├── ushort_ptr02 │ │ │ │ │ │ └── ushort_ptr02.c │ │ │ │ │ └── ushort_ptr03 │ │ │ │ │ │ └── ushort_ptr03.c │ │ │ │ └── while_ptr │ │ │ │ │ └── while_ptr01.c │ │ │ │ └── struct │ │ │ │ ├── figures │ │ │ │ ├── rect │ │ │ │ │ └── rect_expl2_area_fun_i64f64.c │ │ │ │ └── union │ │ │ │ │ ├── uni_impl_area_fun_i64f64.c │ │ │ │ │ ├── uni_impl_per_fun_i32f64_ast_nonamed.c │ │ │ │ │ ├── uni_impl_per_fun_i64f64.c │ │ │ │ │ ├── uni_impl_per_fun_i64f64_ast.c │ │ │ │ │ └── uni_impl_per_fun_i64f64_ast_nonamed.c │ │ │ │ ├── struct00.c │ │ │ │ ├── struct01.c │ │ │ │ ├── struct02.c │ │ │ │ ├── struct03.c │ │ │ │ └── struct04.c │ │ │ └── variables │ │ │ ├── dublicate.c │ │ │ └── extvar │ │ │ └── executable │ │ │ ├── extvar01.c │ │ │ ├── extvar02.c │ │ │ ├── extvar03.c │ │ │ └── extvar04.c │ ├── pr26425 │ │ ├── pr26425.c │ │ └── run │ │ │ ├── pr26425_01 │ │ │ └── pr26425.c │ │ │ ├── pr26425_02 │ │ │ └── pr26425.c │ │ │ ├── pr26425_03 │ │ │ └── pr26425.c │ │ │ ├── pr26425_04 │ │ │ └── pr26425.c │ │ │ ├── pr26425_05 │ │ │ └── pr26425.c │ │ │ ├── pr26425_06 │ │ │ └── pr26425.c │ │ │ ├── pr26425_07 │ │ │ └── pr26425.c │ │ │ ├── pr26425_08 │ │ │ └── pr26425.c │ │ │ ├── pr26425_09 │ │ │ └── pr26425.c │ │ │ ├── pr26425_10 │ │ │ └── pr26425.c │ │ │ ├── pr26425_11 │ │ │ └── pr26425.c │ │ │ ├── pr26425_12 │ │ │ └── pr26425.c │ │ │ ├── pr26425_13 │ │ │ └── pr26425.c │ │ │ └── pr26425_14 │ │ │ └── pr26425.c │ ├── test-suite-to-compile │ │ ├── dead_code │ │ │ ├── 00213 │ │ │ │ └── 00213.c │ │ │ └── 00214 │ │ │ │ └── 00214.c │ │ ├── dyn_mem_alloc │ │ │ └── 00040 │ │ │ │ └── 00040.c │ │ ├── goto │ │ │ ├── 00010 │ │ │ │ └── 00010.c │ │ │ ├── 00129 │ │ │ │ └── 00129.c │ │ │ ├── 00199 │ │ │ │ └── 00199.c │ │ │ └── 00207 │ │ │ │ └── 00207.c │ │ ├── io_lib │ │ │ ├── 00182 │ │ │ │ └── 00182.c │ │ │ ├── 00186 │ │ │ │ └── 00186.c │ │ │ └── 00187 │ │ │ │ └── 00187.c │ │ └── str_lib │ │ │ ├── 00179 │ │ │ └── 00179.c │ │ │ ├── 00180 │ │ │ └── 00180.c │ │ │ └── 00220 │ │ │ └── 00220.c │ └── test_suit_modified │ │ ├── 00001 │ │ └── 00001.c │ │ ├── 00002 │ │ └── 00002.c │ │ ├── 00003 │ │ └── 00003.c │ │ ├── 00004 │ │ └── 00004.c │ │ ├── 00005 │ │ └── 00005.c │ │ ├── 00006 │ │ └── 00006.c │ │ ├── 00007 │ │ └── 00007.c │ │ ├── 00008 │ │ └── 00008.c │ │ ├── 00009 │ │ └── 00009.c │ │ ├── 00011 │ │ └── 00011.c │ │ ├── 00012 │ │ └── 00012.c │ │ ├── 00013 │ │ └── 00013.c │ │ ├── 00014 │ │ └── 00014.c │ │ ├── 00015 │ │ └── 00015.c │ │ ├── 00016 │ │ └── 00016.c │ │ ├── 00017 │ │ └── 00017.c │ │ ├── 00018 │ │ └── 00018.c │ │ ├── 00019 │ │ └── 00019.c │ │ ├── 00020 │ │ └── 00020.c │ │ ├── 00021 │ │ └── 00021.c │ │ ├── 00022 │ │ └── 00022.c │ │ ├── 00023 │ │ └── 00023.c │ │ ├── 00024 │ │ └── 00024.c │ │ ├── 00026 │ │ └── 00026.c │ │ ├── 00027 │ │ └── 00027.c │ │ ├── 00028 │ │ └── 00028.c │ │ ├── 00029 │ │ └── 00029.c │ │ ├── 00030 │ │ └── 00030.c │ │ ├── 00031 │ │ └── 00031.c │ │ ├── 00032 │ │ └── 00032.c │ │ ├── 00033 │ │ └── 00033.c │ │ ├── 00034 │ │ └── 00034.c │ │ ├── 00035 │ │ └── 00035.c │ │ ├── 00036 │ │ └── 00036.c │ │ ├── 00037 │ │ └── 00037.c │ │ ├── 00039 │ │ └── 00039.c │ │ ├── 00042 │ │ └── 00042.c │ │ ├── 00043 │ │ └── 00043.c │ │ ├── 00044 │ │ └── 00044.c │ │ ├── 00046 │ │ └── 00046.c │ │ ├── 00047 │ │ └── 00047.c │ │ ├── 00048 │ │ └── 00048.c │ │ ├── 00049 │ │ └── 00049.c │ │ ├── 00052 │ │ └── 00052.c │ │ ├── 00053 │ │ └── 00053.c │ │ ├── 00054 │ │ └── 00054.c │ │ ├── 00055 │ │ └── 00055.c │ │ ├── 00056 │ │ └── 00056.c │ │ ├── 00059 │ │ └── 00059.c │ │ ├── 00060 │ │ └── 00060.c │ │ ├── 00061 │ │ └── 00061.c │ │ ├── 00062 │ │ └── 00062.c │ │ ├── 00063 │ │ └── 00063.c │ │ ├── 00064 │ │ └── 00064.c │ │ ├── 00065 │ │ └── 00065.c │ │ ├── 00066 │ │ └── 00066.c │ │ ├── 00067 │ │ └── 00067.c │ │ ├── 00068 │ │ └── 00068.c │ │ ├── 00069 │ │ └── 00069.c │ │ ├── 00070 │ │ └── 00070.c │ │ ├── 00071 │ │ └── 00071.c │ │ ├── 00072 │ │ └── 00072.c │ │ ├── 00073 │ │ └── 00073.c │ │ ├── 00074 │ │ └── 00074.c │ │ ├── 00075 │ │ └── 00075.c │ │ ├── 00077 │ │ ├── 00077.c │ │ ├── 00077m1.c │ │ └── 00077p.c │ │ ├── 00078 │ │ └── 00078.c │ │ ├── 00079 │ │ └── 00079.c │ │ ├── 00080 │ │ └── 00080.c │ │ ├── 00081 │ │ └── 00081.c │ │ ├── 00083 │ │ └── 00083.c │ │ ├── 00084 │ │ └── 00084.c │ │ ├── 00085 │ │ └── 00085.c │ │ ├── 00086 │ │ └── 00086.c │ │ ├── 00088 │ │ └── 00088.c │ │ ├── 00090 │ │ └── 00090.c │ │ ├── 00091 │ │ └── 00091.c │ │ ├── 00094 │ │ └── 00094.c │ │ ├── 00097 │ │ └── 00097.c │ │ ├── 00098 │ │ └── 00098.c │ │ ├── 00099 │ │ └── 00099.c │ │ ├── 00100 │ │ └── 00100.c │ │ ├── 00101 │ │ └── 00101.c │ │ ├── 00102 │ │ └── 00102.c │ │ ├── 00103 │ │ └── 00103.c │ │ ├── 00105 │ │ └── 00105.c │ │ ├── 00106 │ │ └── 00106.c │ │ ├── 00107 │ │ └── 00107.c │ │ ├── 00108 │ │ └── 00108.c │ │ ├── 00110 │ │ └── 00110.c │ │ ├── 00111 │ │ └── 00111.c │ │ ├── 00112 │ │ └── 00112.c │ │ ├── 00114 │ │ └── 00114.c │ │ ├── 00115 │ │ └── 00115.c │ │ ├── 00116 │ │ └── 00116.c │ │ ├── 00117 │ │ └── 00117.c │ │ ├── 00118 │ │ └── 00118.c │ │ ├── 00119 │ │ └── 00119.c │ │ ├── 00120 │ │ └── 00120.c │ │ ├── 00121 │ │ └── 00121.c │ │ ├── 00122 │ │ └── 00122.c │ │ ├── 00123 │ │ └── 00123.c │ │ ├── 00125 │ │ └── 00125.c │ │ ├── 00126 │ │ └── 00126.c │ │ ├── 00127 │ │ └── 00127.c │ │ ├── 00130 │ │ └── 00130.c │ │ ├── 00131 │ │ └── 00131.c │ │ ├── 00132 │ │ └── 00132.c │ │ ├── 00133 │ │ └── 00133.c │ │ ├── 00136 │ │ └── 00136.c │ │ ├── 00139 │ │ └── 00139.c │ │ ├── 00140 │ │ └── 00140.c │ │ ├── 00141 │ │ └── 00141.c │ │ ├── 00142 │ │ └── 00142.c │ │ ├── 00145 │ │ └── 00145.c │ │ ├── 00146 │ │ └── 00146.c │ │ ├── 00147 │ │ └── 00147.c │ │ ├── 00148 │ │ ├── 00148.c │ │ └── 00148m.c │ │ ├── 00152 │ │ └── 00152.c │ │ ├── 00153 │ │ └── 00153.c │ │ ├── 00154 │ │ └── 00154.c │ │ ├── 00156 │ │ └── 00156.c │ │ ├── 00157 │ │ └── 00157.c │ │ ├── 00158 │ │ └── 00158.c │ │ ├── 00159 │ │ └── 00159.c │ │ ├── 00160 │ │ └── 00160.c │ │ ├── 00161 │ │ └── 00161.c │ │ ├── 00162 │ │ └── 00162.c │ │ ├── 00163 │ │ └── 00163.c │ │ ├── 00164 │ │ └── 00164.c │ │ ├── 00165 │ │ └── 00165.c │ │ ├── 00166 │ │ └── 00166.c │ │ ├── 00167 │ │ └── 00167.c │ │ ├── 00168 │ │ └── 00168.c │ │ ├── 00169 │ │ └── 00169.c │ │ ├── 00171 │ │ └── 00171.c │ │ ├── 00172 │ │ └── 00172.c │ │ ├── 00176qsort │ │ └── 00176.c │ │ ├── 00177c │ │ └── 00177.c │ │ ├── 00177s │ │ └── 00177.c │ │ ├── 00181 │ │ └── 00181.c │ │ ├── 00185i │ │ └── 00185.c │ │ ├── 00185l │ │ └── 00185.c │ │ ├── 00188 │ │ └── 00188.c │ │ ├── 00190 │ │ └── 00190.c │ │ ├── 00191 │ │ └── 00191.c │ │ ├── 00192 │ │ └── 00192.c │ │ ├── 00193 │ │ └── 00193.c │ │ ├── 00194 │ │ └── 00194.c │ │ ├── 00195 │ │ └── 00195.c │ │ ├── 00196 │ │ └── 00196.c │ │ ├── 00198 │ │ ├── 00198.c │ │ ├── 00198a.c │ │ ├── 00198b.c │ │ ├── 00198c.c │ │ └── 00198d.c │ │ ├── 00200 │ │ └── 00200.c │ │ ├── 00201 │ │ └── 00201.c │ │ ├── 00202 │ │ └── 00202.c │ │ ├── 00203 │ │ └── 00203.c │ │ ├── 00203stmt │ │ └── 00203.c │ │ ├── 00206 │ │ └── 00206.c │ │ ├── 00208 │ │ └── 00208.c │ │ ├── 00211 │ │ └── 00211.c │ │ ├── 00212 │ │ └── 00212.c │ │ └── 00218 │ │ └── 00218.c │ ├── main │ ├── algorithms │ │ ├── factorial │ │ │ ├── fact01_while_glob_i64_post.c │ │ │ ├── fact03_while_glob_i64.c │ │ │ ├── fact04_while_glob_i64_cmpd.c │ │ │ └── fact06_rec_i64.c │ │ ├── fibonacci │ │ │ ├── fibo_rec_global.c │ │ │ ├── fibo_rec_global2.c │ │ │ ├── fibo_rec_local.c │ │ │ ├── fibo_rec_local2.c │ │ │ ├── fibo_rec_ret_int.c │ │ │ ├── fibo_rec_ret_int16.c │ │ │ ├── fibo_rec_ret_int64.c │ │ │ ├── fibo_while_combi.c │ │ │ ├── fibo_while_glob.c │ │ │ ├── fibo_while_local.c │ │ │ └── fibo_while_stat.c │ │ └── swap │ │ │ ├── swapBC_global │ │ │ └── swapBC_global.c │ │ │ ├── swapBC_local │ │ │ └── swapBC_local.c │ │ │ ├── swapBC_localA │ │ │ └── swapBC_localA.c │ │ │ ├── swapBC_staticA │ │ │ └── swapBC_staticA.c │ │ │ └── swapBC_static_localA │ │ │ └── swapBC_static_localA.c │ ├── array │ │ ├── array02.c │ │ ├── array03.c │ │ ├── array04.c │ │ ├── array05.c │ │ ├── array06.c │ │ ├── array09.c │ │ ├── array_and_struct │ │ │ ├── array_in_struct │ │ │ │ └── array_in_struct_01.c │ │ │ ├── array_of_struct │ │ │ │ ├── array_of_struct_01.c │ │ │ │ ├── array_of_struct_02.c │ │ │ │ └── array_of_struct_03.c │ │ │ └── array_of_struct_in_array │ │ │ │ ├── array_of_struct_in_array_01.c │ │ │ │ ├── array_of_struct_in_array_02.c │ │ │ │ └── array_of_struct_in_array_03.c │ │ └── long_long │ │ │ └── global │ │ │ ├── long_long_global_array_01.c │ │ │ ├── long_long_global_array_02.c │ │ │ ├── long_long_global_array_03.c │ │ │ ├── long_long_global_array_04.c │ │ │ ├── long_long_global_array_05.c │ │ │ ├── long_long_global_array_06.c │ │ │ ├── long_long_global_array_07.c │ │ │ ├── long_long_global_array_08.c │ │ │ ├── long_long_global_array_09.c │ │ │ ├── long_long_global_array_10.c │ │ │ ├── long_long_global_array_11.c │ │ │ ├── long_long_global_array_12.c │ │ │ ├── long_long_global_array_13.c │ │ │ ├── long_long_global_array_14.c │ │ │ └── long_long_global_array_15.c │ ├── break_and_continue │ │ ├── break │ │ │ ├── do_while_break.c │ │ │ ├── for_break.c │ │ │ └── while_break.c │ │ ├── break_continue │ │ │ ├── do_while_break_continue.c │ │ │ ├── for_break_continue.c │ │ │ ├── for_for_break_continue.c │ │ │ ├── while_break_continue.c │ │ │ └── while_do_while_for_break_continue.c │ │ └── continue │ │ │ ├── do_while_continue.c │ │ │ ├── for_continue.c │ │ │ └── while_continue.c │ ├── cast │ │ ├── double_cast_0.c │ │ ├── double_cast_1.c │ │ ├── int_cast_0.c │ │ ├── int_cast_1.c │ │ ├── long_long_cast_0.c │ │ ├── long_long_cast_1.c │ │ ├── short_cast_0.c │ │ ├── short_cast_1.c │ │ ├── unsigned_int_cast_0.c │ │ ├── unsigned_int_cast_1.c │ │ ├── unsigned_short_cast_0.c │ │ └── unsigned_short_cast_1.c │ ├── char │ │ ├── char01.c │ │ ├── char02.c │ │ └── char03.c │ ├── circle │ │ ├── circle1.c │ │ ├── circle2.c │ │ ├── circle3.c │ │ └── circle4.c │ ├── cycles │ │ ├── nested │ │ │ ├── do_while_do_while.c │ │ │ ├── do_while_for.c │ │ │ ├── do_while_while.c │ │ │ ├── for_do_while.c │ │ │ ├── for_for.c │ │ │ ├── for_for_for.c │ │ │ ├── for_for_for_with_brackets.c │ │ │ ├── for_while.c │ │ │ ├── while_do_while.c │ │ │ ├── while_for.c │ │ │ └── while_while.c │ │ └── simple │ │ │ ├── do_while │ │ │ ├── do_while_with_empty_body.c │ │ │ ├── do_while_with_empty_statement.c │ │ │ ├── do_while_with_false_condition.c │ │ │ ├── do_while_without_braces.c │ │ │ ├── do_while_without_execution.c │ │ │ └── simple_do_while.c │ │ │ ├── for │ │ │ ├── for01.c │ │ │ ├── for_with_all_expressions.c │ │ │ ├── for_with_empty_body.c │ │ │ ├── for_with_emty_statement.c │ │ │ ├── for_with_multiple_statements_in_init_expression.c │ │ │ ├── for_with_multiple_statements_in_loop_expression.c │ │ │ ├── for_with_multiple_var_decl_in_init_expression.c │ │ │ ├── for_with_var_decl_in_init_expression.c │ │ │ ├── for_without_all_expressions.c │ │ │ ├── for_without_braces.c │ │ │ ├── for_without_cond_and_loop_expression.c │ │ │ ├── for_without_condition_expression.c │ │ │ ├── for_without_execution.c │ │ │ ├── for_without_init_and_cond_expression.c │ │ │ ├── for_without_init_and_loop_expression.c │ │ │ ├── for_without_init_expression.c │ │ │ └── for_without_loop_expression.c │ │ │ └── while │ │ │ ├── simple_while.c │ │ │ ├── while_with_empty_body.c │ │ │ ├── while_with_empty_statement.c │ │ │ ├── while_without_braces.c │ │ │ └── while_without_execution.c │ ├── enum │ │ ├── enum01.c │ │ └── enum02.c │ ├── extern │ │ ├── extvar01.c │ │ ├── extvar02.c │ │ └── extvar03.c │ ├── figures │ │ ├── circle │ │ │ ├── circle_impl_area_fun_i64f64.c │ │ │ ├── circle_impl_area_fun_i64f64_ast.c │ │ │ ├── circle_impl_area_fun_i64f64_ptr.c │ │ │ ├── circle_impl_per_fun_i64f64.c │ │ │ ├── circle_impl_per_fun_i64f64_ast.c │ │ │ └── circle_impl_per_fun_i64f64_ptr.c │ │ ├── rectangle │ │ │ ├── rect_expl2_area_fun_i64f64.c │ │ │ ├── rect_expl_area_fun_i64f64.c │ │ │ ├── rect_expl_per_fun_i64f64.c │ │ │ ├── rect_impl_area_fun_i64f64.c │ │ │ ├── rect_impl_area_fun_i64f64_ast.c │ │ │ ├── rect_impl_per_fun_i64f64.c │ │ │ ├── rect_impl_per_fun_i64f64_ast.c │ │ │ └── rect_per_fun_i64f64.c │ │ ├── triangle │ │ │ ├── trian_impl_area_fun_i64f64.c │ │ │ ├── trian_impl_area_fun_i64f64_ast.c │ │ │ ├── trian_impl_per_fun_i64f64.c │ │ │ └── trian_impl_per_fun_i64f64_ast.c │ │ └── union │ │ │ ├── uni_impl_area_fun_i64f64.c │ │ │ ├── uni_impl_per_fun_i64f64.c │ │ │ ├── uni_impl_per_fun_i64f64_ast.c │ │ │ └── uni_impl_per_fun_i64f64_ast_nonamed.c │ ├── func_ptr │ │ ├── func_only_no_proto │ │ │ └── func_only_no_proto.c │ │ ├── func_ptr01_par_empty │ │ │ └── func_ptr01_par_empty.c │ │ ├── func_ptr02_par_void │ │ │ └── func_ptr02_par_void.c │ │ ├── func_ptr03_par_empty_1arg │ │ │ └── func_ptr03_par_empty_1arg.c │ │ ├── func_ptr04_empty_combi_func │ │ │ └── func_ptr04_empty_combi_func.c │ │ ├── func_ptr05_empty_diff_params │ │ │ └── func_ptr05_empty_diff_params.c │ │ ├── func_ptr07_no_proto │ │ │ └── func_ptr07_no_proto.c │ │ ├── func_ptr08_proto_args_struct │ │ │ └── func_ptr08_proto_args_struct.c │ │ ├── func_ptr09_proto_args_struct_ptr │ │ │ └── func_ptr09_proto_args_struct_ptr.c │ │ ├── func_ptr10_void_proto │ │ │ └── func_ptr10_void_proto.c │ │ ├── func_ptr11_empty_many_func │ │ │ └── func_ptr11_empty_many_func.c │ │ ├── func_ptr12_par_2arg │ │ │ └── func_ptr12_par_2arg.c │ │ ├── func_ptr13_proto_args_struct_ret │ │ │ └── func_ptr13_proto_args_struct_ret.c │ │ ├── func_ptr14_arg_ptr │ │ │ └── func_ptr14_arg_ptr.c │ │ ├── func_ptr15_arg_ptr_plus3 │ │ │ └── func_ptr15_arg_ptr_plus3.c │ │ └── func_rec_main │ │ │ └── func_rec_main.c │ ├── functions │ │ ├── empty_main_with_return.c │ │ ├── empty_main_without_return.c │ │ ├── extfunc │ │ │ ├── extfunc01.c │ │ │ └── extfunc02.c │ │ ├── func01.c │ │ ├── func010_use_proto.c │ │ ├── func02.c │ │ ├── func03.c │ │ ├── func04.c │ │ ├── func05.c │ │ ├── func06.c │ │ ├── func07.c │ │ ├── func08.c │ │ ├── function_with_empty_statement_and_return.c │ │ ├── function_with_empty_statement_without_return.c │ │ ├── function_with_multiple_empty_statements_without_return.c │ │ └── proto │ │ │ ├── extproto01.c │ │ │ └── extproto03.c │ ├── initList │ │ ├── 00050 │ │ │ └── 00050.c │ │ ├── globalArrayInitList.c │ │ ├── globalMultyDimArrayInitList01.c │ │ ├── globalMultyDimArrayInitList02.c │ │ ├── globalNestedStuctInitList01.c │ │ ├── globalNestedStuctInitList02.c │ │ ├── globalStuctInitList.c │ │ ├── globalStuctInitListInPlace.c │ │ ├── localArrayInitList.c │ │ ├── localMultyDimArrayInitList01.c │ │ ├── localMultyDimArrayInitList02.c │ │ ├── localNestedStuctInitList01.c │ │ ├── localNestedStuctInitList02.c │ │ ├── localStuctInitList.c │ │ ├── localStuctInitListInPlace.c │ │ └── test01.c │ ├── operations │ │ ├── assignmentOperations │ │ │ ├── ass01_cmpd_add.c │ │ │ ├── ass02_cmpd_sub.c │ │ │ ├── ass03_cmpd_mul.c │ │ │ ├── ass04_cmpd_div.c │ │ │ ├── ass05_cmpd_mod.c │ │ │ ├── assign07.c │ │ │ ├── assign08.c │ │ │ ├── assign09.c │ │ │ ├── assign10.c │ │ │ ├── assignOp01.c │ │ │ ├── assignOp02.c │ │ │ └── assign_full │ │ │ │ └── assign_full.c │ │ ├── bin_operations │ │ │ ├── bit_operations │ │ │ │ ├── bit_and │ │ │ │ │ └── bit_and.c │ │ │ │ ├── bit_combi │ │ │ │ │ └── bit_combi.c │ │ │ │ ├── bit_or │ │ │ │ │ └── bit_or.c │ │ │ │ ├── bit_xor │ │ │ │ │ └── bit_xor.c │ │ │ │ └── shifts │ │ │ │ │ └── shifts.c │ │ │ └── bool_operations │ │ │ │ ├── bool_and │ │ │ │ └── bool_and.c │ │ │ │ └── bool_or │ │ │ │ └── bool_or.c │ │ ├── compstmt │ │ │ ├── compstmt01_ass_const.c │ │ │ ├── compstmt02_plus_int_const.c │ │ │ ├── compstmt03_plus_int_var.c │ │ │ ├── compstmt04_post_inc.c │ │ │ ├── compstmt05_ass_var.c │ │ │ └── compstmt06_pre_inc.c │ │ ├── cond_operator │ │ │ └── cond_operator.c │ │ ├── incdec │ │ │ ├── post_dec_int64.c │ │ │ ├── post_inc_int64.c │ │ │ ├── post_inc_int64_assign.c │ │ │ ├── post_pre_inc_int64_combi.c │ │ │ ├── ppost_inc_int64_combi.c │ │ │ ├── pre_dec_int64.c │ │ │ └── pre_inc_int64.c │ │ ├── increment │ │ │ └── increment.c │ │ ├── long_long_ptr │ │ │ ├── long_long_full_ptr.c │ │ │ ├── long_long_post_dec_ptr.c │ │ │ ├── long_long_post_inc_ptr.c │ │ │ ├── long_long_pre_dec_ptr.c │ │ │ └── long_long_pre_inc_ptr.c │ │ ├── sizeof │ │ │ ├── sizeof01.c │ │ │ ├── sizeof_expr │ │ │ │ └── sizeof_expr.c │ │ │ └── sizeof_types │ │ │ │ ├── sizeof_ptr │ │ │ │ ├── sizeof_ptr_array1 │ │ │ │ │ └── sizeof_ptr_array1.c │ │ │ │ ├── sizeof_ptr_array2 │ │ │ │ │ └── sizeof_ptr_array2.c │ │ │ │ └── sizeof_ptr_type │ │ │ │ │ └── sizeof_ptr_type.c │ │ │ │ └── sizeof_types.c │ │ ├── uno │ │ │ ├── bit_not │ │ │ │ └── bit_not.c │ │ │ ├── uno_not │ │ │ │ ├── not01.c │ │ │ │ ├── not02.c │ │ │ │ ├── not03.c │ │ │ │ └── not04.c │ │ │ └── uno_plus_minus │ │ │ │ ├── min01.c │ │ │ │ ├── min02.c │ │ │ │ ├── min03.c │ │ │ │ ├── min04.c │ │ │ │ ├── plus01.c │ │ │ │ ├── plus02.c │ │ │ │ ├── plus03.c │ │ │ │ ├── plus04.c │ │ │ │ └── plusmin01.c │ │ └── zero_div │ │ │ ├── zero_div_01 │ │ │ └── zero_div_01.c │ │ │ ├── zero_div_02 │ │ │ └── zero_div_02.c │ │ │ └── zero_div_03 │ │ │ └── zero_div_03.c │ ├── pointers │ │ ├── array-ptr │ │ │ ├── arrayNd │ │ │ │ ├── array1d_01.c │ │ │ │ ├── array2d_01.c │ │ │ │ └── array3d_01.c │ │ │ └── array_ptr │ │ │ │ ├── array_ptr_double.c │ │ │ │ ├── array_ptr_int.c │ │ │ │ ├── array_ptr_int_llops.c │ │ │ │ └── array_ptr_substr_int_double.c │ │ ├── global │ │ │ ├── long_long_global_array_ptr.c │ │ │ ├── long_long_global_ptr_01.c │ │ │ ├── long_long_global_ptr_02.c │ │ │ ├── long_long_global_ptr_03.c │ │ │ ├── long_long_global_ptr_04.c │ │ │ ├── long_long_global_ptr_05.c │ │ │ ├── long_long_global_ptr_06.c │ │ │ ├── long_long_global_ptr_07.c │ │ │ ├── long_long_global_ptr_08.c │ │ │ ├── long_long_global_ptr_09.c │ │ │ ├── long_long_global_ptr_10.c │ │ │ ├── long_long_global_ptr_11.c │ │ │ ├── long_long_global_ptr_12.c │ │ │ ├── long_long_global_ptr_13.c │ │ │ ├── long_long_global_ptr_14.c │ │ │ ├── long_long_global_ptr_15.c │ │ │ ├── long_long_global_ptr_16.c │ │ │ ├── long_long_global_ptr_17.c │ │ │ └── long_long_global_ptr_18.c │ │ └── local │ │ │ ├── double_local_ptr.c │ │ │ ├── int_local_ptr.c │ │ │ ├── long_long_local_ptr.c │ │ │ └── short_local_ptr.c │ ├── sqrt │ │ ├── sqrt_do_while.c │ │ ├── sqrt_newton_do_while.c │ │ └── sqrt_while_do.c │ ├── stress │ │ └── long_long_increment_x100.c │ ├── struct │ │ ├── int │ │ │ ├── global_int_union_struct.c │ │ │ ├── int_struct_01.c │ │ │ ├── int_struct_02.c │ │ │ ├── int_struct_03.c │ │ │ ├── int_struct_04.c │ │ │ ├── int_struct_05.c │ │ │ ├── int_struct_06.c │ │ │ ├── int_struct_07.c │ │ │ ├── int_struct_08.c │ │ │ ├── int_struct_09.c │ │ │ ├── int_struct_10.c │ │ │ └── int_union_struct.c │ │ ├── long_long │ │ │ ├── long_long_struct.c │ │ │ └── long_long_union_struct.c │ │ ├── struct14.c │ │ ├── struct15.c │ │ ├── struct16.c │ │ └── trian │ │ │ └── trian01.c │ ├── switch_and_if_else │ │ ├── if_else │ │ │ ├── complex_if.c │ │ │ ├── if.c │ │ │ └── if_as_switch.c │ │ └── switch │ │ │ ├── atypical_switch.c │ │ │ ├── complex_switch.c │ │ │ ├── for_switch.c │ │ │ ├── switch01.c │ │ │ └── switch02.c │ ├── tests_suite │ │ └── test080 │ │ │ └── testsuite080.c │ ├── type_casts │ │ ├── 00113 │ │ │ └── 00113.c │ │ ├── 00128 │ │ │ └── 00128.c │ │ ├── float_to_double.c │ │ ├── int32_equal_uint32.c │ │ ├── int_division_to_double.c │ │ ├── int_to_float.c │ │ ├── mix.c │ │ ├── type_int32_to_int64d.c │ │ ├── type_int32_to_int64x.c │ │ └── type_int64_to_int32d.c │ ├── types │ │ ├── double │ │ │ ├── global │ │ │ │ ├── double_const_global.c │ │ │ │ ├── double_global.c │ │ │ │ ├── double_static_const_global.c │ │ │ │ └── double_static_global.c │ │ │ ├── local │ │ │ │ ├── double_const_local.c │ │ │ │ ├── double_local.c │ │ │ │ ├── double_static_const_local.c │ │ │ │ └── double_static_local.c │ │ │ └── local_nested │ │ │ │ ├── double_const_local_nested.c │ │ │ │ ├── double_local_nested.c │ │ │ │ ├── double_static_const_local_nested.c │ │ │ │ └── double_static_local_nested.c │ │ ├── int │ │ │ ├── global │ │ │ │ ├── int_const_global.c │ │ │ │ ├── int_global.c │ │ │ │ ├── int_static_const_global.c │ │ │ │ └── int_static_global.c │ │ │ ├── local │ │ │ │ ├── int_const_local.c │ │ │ │ ├── int_local.c │ │ │ │ ├── int_static_const_local.c │ │ │ │ ├── int_static_local.c │ │ │ │ └── int_with_reassign_values.c │ │ │ └── local_nested │ │ │ │ ├── int_const_local_nested.c │ │ │ │ ├── int_local_nested.c │ │ │ │ ├── int_static_const_local_nested.c │ │ │ │ └── int_static_local_nested.c │ │ ├── long_long │ │ │ ├── global │ │ │ │ ├── long_long_const_global.c │ │ │ │ ├── long_long_global.c │ │ │ │ ├── long_long_static_const_global.c │ │ │ │ └── long_long_static_global.c │ │ │ ├── local │ │ │ │ ├── long_long_const_local.c │ │ │ │ ├── long_long_local.c │ │ │ │ ├── long_long_static_const_local.c │ │ │ │ └── long_long_static_local.c │ │ │ └── local_nested │ │ │ │ ├── long_long_const_local_nested.c │ │ │ │ ├── long_long_local_nested.c │ │ │ │ ├── long_long_static_const_local_nested.c │ │ │ │ └── long_long_static_local_nested.c │ │ ├── short │ │ │ ├── global │ │ │ │ ├── short_const_global.c │ │ │ │ ├── short_global.c │ │ │ │ ├── short_static_const_global.c │ │ │ │ └── short_static_global.c │ │ │ ├── local │ │ │ │ ├── short_const_local.c │ │ │ │ ├── short_local.c │ │ │ │ ├── short_static_const_local.c │ │ │ │ └── short_static_local.c │ │ │ └── local_nested │ │ │ │ ├── short_const_local_nested.c │ │ │ │ ├── short_local_nested.c │ │ │ │ ├── short_static_const_local_nested.c │ │ │ │ └── short_static_local_nested.c │ │ ├── type_bool │ │ │ ├── bool01.c │ │ │ ├── bool02.c │ │ │ ├── type_bool01.c │ │ │ ├── type_bool02.c │ │ │ └── type_bool0_full.c │ │ ├── unsigned_int │ │ │ ├── global │ │ │ │ ├── unsigned_int_const_global.c │ │ │ │ ├── unsigned_int_global.c │ │ │ │ ├── unsigned_int_static_const_global.c │ │ │ │ └── unsigned_int_static_global.c │ │ │ ├── local │ │ │ │ ├── unsigned_int_const_local.c │ │ │ │ ├── unsigned_int_local.c │ │ │ │ ├── unsigned_int_static_const_local.c │ │ │ │ └── unsigned_int_static_local.c │ │ │ └── local_nested │ │ │ │ ├── unsigned_int_const_local_nested.c │ │ │ │ ├── unsigned_int_local_nested.c │ │ │ │ ├── unsigned_int_static_const_local_nested.c │ │ │ │ └── unsigned_int_static_local_nested.c │ │ ├── unsigned_long_long │ │ │ └── unsigned_long_long.c │ │ └── unsigned_short │ │ │ ├── global │ │ │ ├── unsigned_short_const_global.c │ │ │ ├── unsigned_short_global.c │ │ │ ├── unsigned_short_static_const_global.c │ │ │ └── unsigned_short_static_global.c │ │ │ ├── local │ │ │ ├── unsigned_short_const_local.c │ │ │ ├── unsigned_short_local.c │ │ │ ├── unsigned_short_static_const_local.c │ │ │ └── unsigned_short_static_local.c │ │ │ └── local_nested │ │ │ ├── unsigned_short_const_local_nested.c │ │ │ ├── unsigned_short_local_nested.c │ │ │ ├── unsigned_short_static_const_local_nested.c │ │ │ └── unsigned_short_static_local_nested.c │ ├── union │ │ ├── global │ │ │ └── int │ │ │ │ └── int_global_union.c │ │ ├── some_104.c │ │ ├── union_104.c │ │ └── union_104_s.c │ ├── variables │ │ └── double │ │ │ └── init_double.c │ └── void │ │ ├── voidNoParam00.c │ │ ├── voidNoParam01.c │ │ ├── voidParam00.c │ │ ├── voidParam01.c │ │ ├── voidParam02.c │ │ ├── voidParam03.c │ │ └── voidParam04.c │ └── unit_tests │ ├── CMakeLists.txt │ └── util_test.cpp └── renovate.json /.gitattributes: -------------------------------------------------------------------------------- 1 | * eol=lf -------------------------------------------------------------------------------- /project/eo-lib/coperators/addr-of.eo: -------------------------------------------------------------------------------- 1 | +package c2eo.coperators 2 | 3 | [a] > addr-of 4 | a.addr > @ 5 | -------------------------------------------------------------------------------- /project/eo-lib/coperators/addrcpy.eo: -------------------------------------------------------------------------------- 1 | +package c2eo.coperators 2 | 3 | [addr1 addr2 size] > addrcpy 4 | addr1.write (addr2.read size) > @ 5 | -------------------------------------------------------------------------------- /project/eo-lib/coperators/address.eo: -------------------------------------------------------------------------------- 1 | +package c2eo.coperators 2 | 3 | [mem addr] > address 4 | 5 | [size-bytes] > read 6 | mem.slice addr size-bytes > @ 7 | 8 | [value] > write 9 | mem.write addr (value.as-bytes) > @ 10 | 11 | [value] > plus 12 | address mem (addr.plus value) > @ 13 | 14 | [value] > minus 15 | address mem (addr.minus value) > @ 16 | -------------------------------------------------------------------------------- /project/eo-lib/coperators/addrmemcpy.eo: -------------------------------------------------------------------------------- 1 | +package c2eo.coperators 2 | 3 | [addr mem size] > addrmemcpy 4 | addr.write (mem.read 0 size) > @ 5 | -------------------------------------------------------------------------------- /project/eo-lib/coperators/and.eo: -------------------------------------------------------------------------------- 1 | +package c2eo.coperators 2 | 3 | [a b] > and 4 | ((a.eq 0).or (b.eq 0)).if 0 1 > @ 5 | -------------------------------------------------------------------------------- /project/eo-lib/coperators/as-bool.eo: -------------------------------------------------------------------------------- 1 | +package c2eo.coperators 2 | 3 | [a] > as-bool 4 | (a.eq 0).if 0 1 > @ 5 | -------------------------------------------------------------------------------- /project/eo-lib/coperators/as-bytes.eo: -------------------------------------------------------------------------------- 1 | +package c2eo.coperators 2 | 3 | [a] > as-bytes 4 | a.as-bytes > @ 5 | -------------------------------------------------------------------------------- /project/eo-lib/coperators/as-char.eo: -------------------------------------------------------------------------------- 1 | +package c2eo.coperators 2 | 3 | [a] > as-char 4 | a.as-bytes.slice 7 1 > @ 5 | -------------------------------------------------------------------------------- /project/eo-lib/coperators/as-float32.eo: -------------------------------------------------------------------------------- 1 | +alias org.eolang.math.number 2 | 3 | +package c2eo.coperators 4 | 5 | [a] > as-float32 6 | (number a).as-float > @ 7 | -------------------------------------------------------------------------------- /project/eo-lib/coperators/as-float64.eo: -------------------------------------------------------------------------------- 1 | +alias org.eolang.math.number 2 | 3 | +package c2eo.coperators 4 | 5 | [a] > as-float64 6 | (number a).as-float > @ 7 | -------------------------------------------------------------------------------- /project/eo-lib/coperators/as-int16.eo: -------------------------------------------------------------------------------- 1 | +alias org.eolang.math.number 2 | 3 | +package c2eo.coperators 4 | 5 | [a] > as-int16 6 | ((number a).as-int.as-bytes.slice 6 2).as-int > @ 7 | -------------------------------------------------------------------------------- /project/eo-lib/coperators/as-int32.eo: -------------------------------------------------------------------------------- 1 | +alias org.eolang.math.number 2 | 3 | +package c2eo.coperators 4 | 5 | [a] > as-int32 6 | ((number a).as-int.as-bytes.slice 4 4).as-int > @ 7 | -------------------------------------------------------------------------------- /project/eo-lib/coperators/as-int64.eo: -------------------------------------------------------------------------------- 1 | +alias org.eolang.math.number 2 | 3 | +package c2eo.coperators 4 | 5 | [a] > as-int64 6 | (number a).as-int > @ 7 | -------------------------------------------------------------------------------- /project/eo-lib/coperators/as-int8.eo: -------------------------------------------------------------------------------- 1 | +alias org.eolang.math.number 2 | 3 | +package c2eo.coperators 4 | 5 | [a] > as-int8 6 | ((number a).as-int.as-bytes.slice 7 1).as-int > @ 7 | -------------------------------------------------------------------------------- /project/eo-lib/coperators/as-string.eo: -------------------------------------------------------------------------------- 1 | +package c2eo.coperators 2 | 3 | [a] > as-string 4 | a.as-string > @ 5 | -------------------------------------------------------------------------------- /project/eo-lib/coperators/as-uint16.eo: -------------------------------------------------------------------------------- 1 | +alias org.eolang.math.number 2 | 3 | +package c2eo.coperators 4 | 5 | [a] > as-uint16 6 | (00-00-00-00-00-00.concat ((number a).as-int.as-bytes.slice 6 2)).as-int > @ 7 | -------------------------------------------------------------------------------- /project/eo-lib/coperators/as-uint32.eo: -------------------------------------------------------------------------------- 1 | +alias org.eolang.math.number 2 | 3 | +package c2eo.coperators 4 | 5 | [a] > as-uint32 6 | (00-00-00-00.concat ((number a).as-int.as-bytes.slice 4 4)).as-int > @ 7 | -------------------------------------------------------------------------------- /project/eo-lib/coperators/as-uint64.eo: -------------------------------------------------------------------------------- 1 | +alias org.eolang.math.number 2 | 3 | +package c2eo.coperators 4 | 5 | [a] > as-uint64 6 | (00-.concat ((number a).as-int.as-bytes.slice 1 7)).as-int > @ > @ 7 | -------------------------------------------------------------------------------- /project/eo-lib/coperators/as-uint8.eo: -------------------------------------------------------------------------------- 1 | +alias org.eolang.math.number 2 | 3 | +package c2eo.coperators 4 | 5 | [a] > as-uint8 6 | (00-00-00-00-00-00-00.concat ((number a).as-int.as-bytes.slice 7 1)).as-int > @ 7 | -------------------------------------------------------------------------------- /project/eo-lib/coperators/bit-and.eo: -------------------------------------------------------------------------------- 1 | +package c2eo.coperators 2 | 3 | [a b] > bit-and 4 | (a.as-bytes.and (b.as-bytes)).as-int > @ 5 | -------------------------------------------------------------------------------- /project/eo-lib/coperators/bit-not.eo: -------------------------------------------------------------------------------- 1 | +package c2eo.coperators 2 | 3 | [a b] > bit-not 4 | a.as-bytes.not.as-int > @ 5 | -------------------------------------------------------------------------------- /project/eo-lib/coperators/bit-or.eo: -------------------------------------------------------------------------------- 1 | +package c2eo.coperators 2 | 3 | [a b] > bit-or 4 | (a.as-bytes.or (b.as-bytes)).as-int > @ 5 | -------------------------------------------------------------------------------- /project/eo-lib/coperators/bit-xor.eo: -------------------------------------------------------------------------------- 1 | +package c2eo.coperators 2 | 3 | [a b] > bit-xor 4 | (a.as-bytes.xor (b.as-bytes)).as-int > @ 5 | -------------------------------------------------------------------------------- /project/eo-lib/coperators/c-goto.eo: -------------------------------------------------------------------------------- 1 | +alias c2eo.coperators.printf 2 | 3 | +package c2eo.coperators 4 | 5 | [args...] > c-goto 6 | printf "exception: goto is not supported\n" > @ 7 | -------------------------------------------------------------------------------- /project/eo-lib/coperators/c-label.eo: -------------------------------------------------------------------------------- 1 | +alias c2eo.coperators.printf 2 | 3 | +package c2eo.coperators 4 | 5 | [args...] > c-label 6 | printf "exception: label is not supported\n" > @ 7 | -------------------------------------------------------------------------------- /project/eo-lib/coperators/div.eo: -------------------------------------------------------------------------------- 1 | +package c2eo.coperators 2 | 3 | [a b] > div 4 | a.div b > @ 5 | -------------------------------------------------------------------------------- /project/eo-lib/coperators/eq.eo: -------------------------------------------------------------------------------- 1 | +package c2eo.coperators 2 | 3 | [a b] > eq 4 | (a.eq b).if 1 0 > @ 5 | -------------------------------------------------------------------------------- /project/eo-lib/coperators/get.eo: -------------------------------------------------------------------------------- 1 | +package c2eo.coperators 2 | 3 | [a b] > get 4 | a.get b > @ 5 | -------------------------------------------------------------------------------- /project/eo-lib/coperators/gt.eo: -------------------------------------------------------------------------------- 1 | +package c2eo.coperators 2 | 3 | [a b] > gt 4 | (a.gt b).if 1 0 > @ 5 | -------------------------------------------------------------------------------- /project/eo-lib/coperators/gte.eo: -------------------------------------------------------------------------------- 1 | +package c2eo.coperators 2 | 3 | [a b] > gte 4 | (a.gte b).if 1 0 > @ 5 | -------------------------------------------------------------------------------- /project/eo-lib/coperators/if-else.eo: -------------------------------------------------------------------------------- 1 | +package c2eo.coperators 2 | 3 | [a b c] > if-else 4 | (a.eq 0).if c b > @ 5 | -------------------------------------------------------------------------------- /project/eo-lib/coperators/if.eo: -------------------------------------------------------------------------------- 1 | +package c2eo.coperators 2 | 3 | [a b] > if 4 | (a.eq 0).if TRUE b > @ 5 | -------------------------------------------------------------------------------- /project/eo-lib/coperators/lt.eo: -------------------------------------------------------------------------------- 1 | +package c2eo.coperators 2 | 3 | [a b] > lt 4 | (a.lt b).if 1 0 > @ 5 | -------------------------------------------------------------------------------- /project/eo-lib/coperators/lte.eo: -------------------------------------------------------------------------------- 1 | +package c2eo.coperators 2 | 3 | [a b] > lte 4 | (a.lte b).if 1 0 > @ 5 | -------------------------------------------------------------------------------- /project/eo-lib/coperators/memaddrcpy.eo: -------------------------------------------------------------------------------- 1 | +package c2eo.coperators 2 | 3 | [mem addr size] > memaddrcpy 4 | mem.write 0 (addr.read size) > @ 5 | -------------------------------------------------------------------------------- /project/eo-lib/coperators/memcpy.eo: -------------------------------------------------------------------------------- 1 | +package c2eo.coperators 2 | 3 | [destptr srcptr size] > memcpy 4 | destptr.write 0 (srcptr.read 0 size) > @ 5 | -------------------------------------------------------------------------------- /project/eo-lib/coperators/minus.eo: -------------------------------------------------------------------------------- 1 | +package c2eo.coperators 2 | 3 | [a b] > minus 4 | a.minus b > @ 5 | -------------------------------------------------------------------------------- /project/eo-lib/coperators/mod.eo: -------------------------------------------------------------------------------- 1 | +package c2eo.coperators 2 | 3 | [a b] > mod 4 | a.minus ((a.div b).times b) > @ 5 | 6 | -------------------------------------------------------------------------------- /project/eo-lib/coperators/neg.eo: -------------------------------------------------------------------------------- 1 | +package c2eo.coperators 2 | 3 | [a] > neg 4 | a.neg > @ 5 | -------------------------------------------------------------------------------- /project/eo-lib/coperators/neq.eo: -------------------------------------------------------------------------------- 1 | +package c2eo.coperators 2 | 3 | [a b] > neq 4 | (a.eq b).if 0 1 > @ 5 | -------------------------------------------------------------------------------- /project/eo-lib/coperators/not.eo: -------------------------------------------------------------------------------- 1 | +package c2eo.coperators 2 | 3 | [a] > not 4 | (a.eq 0).if 1 0 > @ 5 | -------------------------------------------------------------------------------- /project/eo-lib/coperators/null-function.eo: -------------------------------------------------------------------------------- 1 | +alias c2eo.coperators.printf 2 | 3 | +package c2eo.coperators 4 | 5 | [args...] > null-function 6 | printf "exception: the pointer to function is not initialized\n" > @ 7 | -------------------------------------------------------------------------------- /project/eo-lib/coperators/or.eo: -------------------------------------------------------------------------------- 1 | +package c2eo.coperators 2 | 3 | [a b] > or 4 | ((a.eq 0).and (b.eq 0)).if 0 1 > @ 5 | -------------------------------------------------------------------------------- /project/eo-lib/coperators/plug.eo: -------------------------------------------------------------------------------- 1 | +alias c2eo.coperators.printf 2 | 3 | +package c2eo.coperators 4 | 5 | [args...] > plug 6 | printf "exception: it is plug\n" > @ 7 | -------------------------------------------------------------------------------- /project/eo-lib/coperators/plus.eo: -------------------------------------------------------------------------------- 1 | +package c2eo.coperators 2 | 3 | [a b] > plus 4 | a.plus b > @ 5 | -------------------------------------------------------------------------------- /project/eo-lib/coperators/pos.eo: -------------------------------------------------------------------------------- 1 | +package c2eo.coperators 2 | 3 | [a] > pos 4 | a > @ 5 | -------------------------------------------------------------------------------- /project/eo-lib/coperators/post-dec-float32.eo: -------------------------------------------------------------------------------- 1 | +alias c2eo.coperators.read-as-float32 2 | +alias c2eo.coperators.write-as-float32 3 | 4 | +package c2eo.coperators 5 | 6 | [a] > post-dec-float32 7 | seq > @ 8 | write-as-float32 a ((read-as-float32 a).minus 1.0) 9 | (read-as-float32 a).plus 1.0 10 | -------------------------------------------------------------------------------- /project/eo-lib/coperators/post-dec-float64.eo: -------------------------------------------------------------------------------- 1 | +alias c2eo.coperators.read-as-float64 2 | +alias c2eo.coperators.write-as-float64 3 | 4 | +package c2eo.coperators 5 | 6 | [a] > post-dec-float64 7 | seq > @ 8 | write-as-float64 a ((read-as-float64 a).minus 1.0) 9 | (read-as-float64 a).plus 1.0 10 | -------------------------------------------------------------------------------- /project/eo-lib/coperators/post-dec-int16.eo: -------------------------------------------------------------------------------- 1 | +alias c2eo.coperators.read-as-int16 2 | +alias c2eo.coperators.write-as-int16 3 | 4 | +package c2eo.coperators 5 | 6 | [a] > post-dec-int16 7 | seq > @ 8 | write-as-int16 a ((read-as-int16 a).minus 1) 9 | (read-as-int16 a).plus 1 10 | -------------------------------------------------------------------------------- /project/eo-lib/coperators/post-dec-int32.eo: -------------------------------------------------------------------------------- 1 | +alias c2eo.coperators.read-as-int32 2 | +alias c2eo.coperators.write-as-int32 3 | 4 | +package c2eo.coperators 5 | 6 | [a] > post-dec-int32 7 | seq > @ 8 | write-as-int32 a ((read-as-int32 a).minus 1) 9 | (read-as-int32 a).plus 1 10 | -------------------------------------------------------------------------------- /project/eo-lib/coperators/post-dec-int64.eo: -------------------------------------------------------------------------------- 1 | +alias c2eo.coperators.read-as-int64 2 | +alias c2eo.coperators.write-as-int64 3 | 4 | +package c2eo.coperators 5 | 6 | [a] > post-dec-int64 7 | seq > @ 8 | write-as-int64 a ((read-as-int64 a).minus 1) 9 | (read-as-int64 a).plus 1 10 | -------------------------------------------------------------------------------- /project/eo-lib/coperators/post-dec-int8.eo: -------------------------------------------------------------------------------- 1 | +alias c2eo.coperators.read-as-int8 2 | +alias c2eo.coperators.write-as-int8 3 | 4 | +package c2eo.coperators 5 | 6 | [a] > post-dec-int8 7 | seq > @ 8 | write-as-int8 a ((read-as-int8 a).minus 1) 9 | (read-as-int8 a).plus 1 10 | -------------------------------------------------------------------------------- /project/eo-lib/coperators/post-dec-ptr.eo: -------------------------------------------------------------------------------- 1 | +alias c2eo.coperators.read-as-ptr 2 | +alias c2eo.coperators.write-as-ptr 3 | 4 | +package c2eo.coperators 5 | 6 | [a b] > post-dec-ptr 7 | seq > @ 8 | write-as-ptr a ((read-as-ptr a).minus b) 9 | (read-as-ptr a).plus b 10 | -------------------------------------------------------------------------------- /project/eo-lib/coperators/post-dec-uint16.eo: -------------------------------------------------------------------------------- 1 | +alias c2eo.coperators.read-as-uint16 2 | +alias c2eo.coperators.write-as-uint16 3 | 4 | +package c2eo.coperators 5 | 6 | [a] > post-dec-uint16 7 | seq > @ 8 | write-as-uint16 a ((read-as-uint16 a).minus 1) 9 | (read-as-uint16 a).plus 1 10 | -------------------------------------------------------------------------------- /project/eo-lib/coperators/post-dec-uint32.eo: -------------------------------------------------------------------------------- 1 | +alias c2eo.coperators.read-as-uint32 2 | +alias c2eo.coperators.write-as-uint32 3 | 4 | +package c2eo.coperators 5 | 6 | [a] > post-dec-uint32 7 | seq > @ 8 | write-as-uint32 a ((read-as-uint32 a).minus 1) 9 | (read-as-uint32 a).plus 1 10 | -------------------------------------------------------------------------------- /project/eo-lib/coperators/post-dec-uint64.eo: -------------------------------------------------------------------------------- 1 | +alias c2eo.coperators.read-as-uint64 2 | +alias c2eo.coperators.write-as-uint64 3 | 4 | +package c2eo.coperators 5 | 6 | [a] > post-dec-uint64 7 | seq > @ 8 | write-as-uint64 a ((read-as-uint64 a).minus 1) 9 | (read-as-uint64 a).plus 1 10 | -------------------------------------------------------------------------------- /project/eo-lib/coperators/post-dec-uint8.eo: -------------------------------------------------------------------------------- 1 | +alias c2eo.coperators.read-as-uint8 2 | +alias c2eo.coperators.write-as-uint8 3 | 4 | +package c2eo.coperators 5 | 6 | [a] > post-dec-uint8 7 | seq > @ 8 | write-as-uint8 a ((read-as-uint8 a).minus 1) 9 | (read-as-uint8 a).plus 1 10 | -------------------------------------------------------------------------------- /project/eo-lib/coperators/post-inc-float32.eo: -------------------------------------------------------------------------------- 1 | +alias c2eo.coperators.read-as-float32 2 | +alias c2eo.coperators.write-as-float32 3 | 4 | +package c2eo.coperators 5 | 6 | [a] > post-inc-float32 7 | seq > @ 8 | write-as-float32 a ((read-as-float32 a).plus 1.0) 9 | (read-as-float32 a).minus 1.0 10 | -------------------------------------------------------------------------------- /project/eo-lib/coperators/post-inc-float64.eo: -------------------------------------------------------------------------------- 1 | +alias c2eo.coperators.read-as-float64 2 | +alias c2eo.coperators.write-as-float64 3 | 4 | +package c2eo.coperators 5 | 6 | [a] > post-inc-float64 7 | seq > @ 8 | write-as-float64 a ((read-as-float64 a).plus 1.0) 9 | (read-as-float64 a).minus 1.0 10 | -------------------------------------------------------------------------------- /project/eo-lib/coperators/post-inc-int16.eo: -------------------------------------------------------------------------------- 1 | +alias c2eo.coperators.read-as-int16 2 | +alias c2eo.coperators.write-as-int16 3 | 4 | +package c2eo.coperators 5 | 6 | [a] > post-inc-int16 7 | seq > @ 8 | write-as-int16 a ((read-as-int16 a).plus 1) 9 | (read-as-int16 a).minus 1 10 | -------------------------------------------------------------------------------- /project/eo-lib/coperators/post-inc-int32.eo: -------------------------------------------------------------------------------- 1 | +alias c2eo.coperators.read-as-int32 2 | +alias c2eo.coperators.write-as-int32 3 | 4 | +package c2eo.coperators 5 | 6 | [a] > post-inc-int32 7 | seq > @ 8 | write-as-int32 a ((read-as-int32 a).plus 1) 9 | (read-as-int32 a).minus 1 10 | -------------------------------------------------------------------------------- /project/eo-lib/coperators/post-inc-int64.eo: -------------------------------------------------------------------------------- 1 | +alias c2eo.coperators.read-as-int64 2 | +alias c2eo.coperators.write-as-int64 3 | 4 | +package c2eo.coperators 5 | 6 | [a] > post-inc-int64 7 | seq > @ 8 | write-as-int64 a ((read-as-int64 a).plus 1) 9 | (read-as-int64 a).minus 1 10 | -------------------------------------------------------------------------------- /project/eo-lib/coperators/post-inc-int8.eo: -------------------------------------------------------------------------------- 1 | +alias c2eo.coperators.read-as-int8 2 | +alias c2eo.coperators.write-as-int8 3 | 4 | +package c2eo.coperators 5 | 6 | [a] > post-inc-int8 7 | seq > @ 8 | write-as-int8 a ((read-as-int8 a).plus 1) 9 | (read-as-int8 a).minus 1 10 | -------------------------------------------------------------------------------- /project/eo-lib/coperators/post-inc-ptr.eo: -------------------------------------------------------------------------------- 1 | +alias c2eo.coperators.read-as-ptr 2 | +alias c2eo.coperators.write-as-ptr 3 | 4 | +package c2eo.coperators 5 | 6 | [a b] > post-inc-ptr 7 | seq > @ 8 | write-as-ptr a ((read-as-ptr a).plus b) 9 | (read-as-ptr a).minus b 10 | -------------------------------------------------------------------------------- /project/eo-lib/coperators/post-inc-uint16.eo: -------------------------------------------------------------------------------- 1 | +alias c2eo.coperators.read-as-uint16 2 | +alias c2eo.coperators.write-as-uint16 3 | 4 | +package c2eo.coperators 5 | 6 | [a] > post-inc-uint16 7 | seq > @ 8 | write-as-uint16 a ((read-as-uint16 a).plus 1) 9 | (read-as-uint16 a).minus 1 10 | -------------------------------------------------------------------------------- /project/eo-lib/coperators/post-inc-uint32.eo: -------------------------------------------------------------------------------- 1 | +alias c2eo.coperators.read-as-uint32 2 | +alias c2eo.coperators.write-as-uint32 3 | 4 | +package c2eo.coperators 5 | 6 | [a] > post-inc-uint32 7 | seq > @ 8 | write-as-uint32 a ((read-as-uint32 a).plus 1) 9 | (read-as-uint32 a).minus 1 10 | -------------------------------------------------------------------------------- /project/eo-lib/coperators/post-inc-uint64.eo: -------------------------------------------------------------------------------- 1 | +alias c2eo.coperators.read-as-uint64 2 | +alias c2eo.coperators.write-as-uint64 3 | 4 | +package c2eo.coperators 5 | 6 | [a] > post-inc-uint64 7 | seq > @ 8 | write-as-uint64 a ((read-as-uint64 a).plus 1) 9 | (read-as-uint64 a).minus 1 10 | -------------------------------------------------------------------------------- /project/eo-lib/coperators/post-inc-uint8.eo: -------------------------------------------------------------------------------- 1 | +alias c2eo.coperators.read-as-uint8 2 | +alias c2eo.coperators.write-as-uint8 3 | 4 | +package c2eo.coperators 5 | 6 | [a] > post-inc-uint8 7 | seq > @ 8 | write-as-uint8 a ((read-as-uint8 a).plus 1) 9 | (read-as-uint8 a).minus 1 10 | -------------------------------------------------------------------------------- /project/eo-lib/coperators/pre-dec-float32.eo: -------------------------------------------------------------------------------- 1 | +alias c2eo.coperators.read-as-float32 2 | +alias c2eo.coperators.write-as-float32 3 | 4 | +package c2eo.coperators 5 | 6 | [a] > pre-dec-float32 7 | write-as-float32 a ((read-as-float32 a).minus 1.0) > @ 8 | -------------------------------------------------------------------------------- /project/eo-lib/coperators/pre-dec-float64.eo: -------------------------------------------------------------------------------- 1 | +alias c2eo.coperators.read-as-float64 2 | +alias c2eo.coperators.write-as-float64 3 | 4 | +package c2eo.coperators 5 | 6 | [a] > pre-dec-float64 7 | write-as-float64 a ((read-as-float64 a).minus 1.0) > @ 8 | -------------------------------------------------------------------------------- /project/eo-lib/coperators/pre-dec-int16.eo: -------------------------------------------------------------------------------- 1 | +alias c2eo.coperators.read-as-int16 2 | +alias c2eo.coperators.write-as-int16 3 | 4 | +package c2eo.coperators 5 | 6 | [a] > pre-dec-int16 7 | write-as-int16 a ((read-as-int16 a).minus 1) > @ 8 | -------------------------------------------------------------------------------- /project/eo-lib/coperators/pre-dec-int32.eo: -------------------------------------------------------------------------------- 1 | +alias c2eo.coperators.read-as-int32 2 | +alias c2eo.coperators.write-as-int32 3 | 4 | +package c2eo.coperators 5 | 6 | [a] > pre-dec-int32 7 | write-as-int32 a ((read-as-int32 a).minus 1) > @ 8 | -------------------------------------------------------------------------------- /project/eo-lib/coperators/pre-dec-int64.eo: -------------------------------------------------------------------------------- 1 | +alias c2eo.coperators.read-as-int64 2 | +alias c2eo.coperators.write-as-int64 3 | 4 | +package c2eo.coperators 5 | 6 | [a] > pre-dec-int64 7 | write-as-int64 a ((read-as-int64 a).minus 1) > @ 8 | -------------------------------------------------------------------------------- /project/eo-lib/coperators/pre-dec-int8.eo: -------------------------------------------------------------------------------- 1 | +alias c2eo.coperators.read-as-int8 2 | +alias c2eo.coperators.write-as-int8 3 | 4 | +package c2eo.coperators 5 | 6 | [a] > pre-dec-int8 7 | write-as-int8 a ((read-as-int8 a).minus 1) > @ 8 | -------------------------------------------------------------------------------- /project/eo-lib/coperators/pre-dec-ptr.eo: -------------------------------------------------------------------------------- 1 | +alias c2eo.coperators.read-as-ptr 2 | +alias c2eo.coperators.write-as-ptr 3 | 4 | +package c2eo.coperators 5 | 6 | [a b] > pre-dec-ptr 7 | write-as-ptr a ((read-as-ptr a).minus b) > @ 8 | -------------------------------------------------------------------------------- /project/eo-lib/coperators/pre-dec-uint16.eo: -------------------------------------------------------------------------------- 1 | +alias c2eo.coperators.read-as-uint16 2 | +alias c2eo.coperators.write-as-uint16 3 | 4 | +package c2eo.coperators 5 | 6 | [a] > pre-dec-uint16 7 | write-as-uint16 a ((read-as-uint16 a).minus 1) > @ 8 | -------------------------------------------------------------------------------- /project/eo-lib/coperators/pre-dec-uint32.eo: -------------------------------------------------------------------------------- 1 | +alias c2eo.coperators.read-as-uint32 2 | +alias c2eo.coperators.write-as-uint32 3 | 4 | +package c2eo.coperators 5 | 6 | [a] > pre-dec-uint32 7 | write-as-uint32 a ((read-as-uint32 a).minus 1) > @ 8 | -------------------------------------------------------------------------------- /project/eo-lib/coperators/pre-dec-uint64.eo: -------------------------------------------------------------------------------- 1 | +alias c2eo.coperators.read-as-uint64 2 | +alias c2eo.coperators.write-as-uint64 3 | 4 | +package c2eo.coperators 5 | 6 | [a] > pre-dec-uint64 7 | write-as-uint64 a ((read-as-uint64 a).minus 1) > @ 8 | -------------------------------------------------------------------------------- /project/eo-lib/coperators/pre-dec-uint8.eo: -------------------------------------------------------------------------------- 1 | +alias c2eo.coperators.read-as-uint8 2 | +alias c2eo.coperators.write-as-uint8 3 | 4 | +package c2eo.coperators 5 | 6 | [a] > pre-dec-uint8 7 | write-as-uint8 a ((read-as-uint8 a).minus 1) > @ 8 | -------------------------------------------------------------------------------- /project/eo-lib/coperators/pre-inc-float32.eo: -------------------------------------------------------------------------------- 1 | +alias c2eo.coperators.read-as-float32 2 | +alias c2eo.coperators.write-as-float32 3 | 4 | +package c2eo.coperators 5 | 6 | [a] > pre-inc-float32 7 | write-as-float32 a ((read-as-float32 a).plus 1.0) > @ 8 | -------------------------------------------------------------------------------- /project/eo-lib/coperators/pre-inc-float64.eo: -------------------------------------------------------------------------------- 1 | +alias c2eo.coperators.read-as-float64 2 | +alias c2eo.coperators.write-as-float64 3 | 4 | +package c2eo.coperators 5 | 6 | [a] > pre-inc-float64 7 | write-as-float64 a ((read-as-float64 a).plus 1.0) > @ 8 | -------------------------------------------------------------------------------- /project/eo-lib/coperators/pre-inc-int16.eo: -------------------------------------------------------------------------------- 1 | +alias c2eo.coperators.read-as-int16 2 | +alias c2eo.coperators.write-as-int16 3 | 4 | +package c2eo.coperators 5 | 6 | [a] > pre-inc-int16 7 | write-as-int16 a ((read-as-int16 a).plus 1) > @ 8 | -------------------------------------------------------------------------------- /project/eo-lib/coperators/pre-inc-int32.eo: -------------------------------------------------------------------------------- 1 | +alias c2eo.coperators.read-as-int32 2 | +alias c2eo.coperators.write-as-int32 3 | 4 | +package c2eo.coperators 5 | 6 | [a] > pre-inc-int32 7 | write-as-int32 a ((read-as-int32 a).plus 1) > @ 8 | -------------------------------------------------------------------------------- /project/eo-lib/coperators/pre-inc-int64.eo: -------------------------------------------------------------------------------- 1 | +alias c2eo.coperators.read-as-int64 2 | +alias c2eo.coperators.write-as-int64 3 | 4 | +package c2eo.coperators 5 | 6 | [a] > pre-inc-int64 7 | write-as-int64 a ((read-as-int64 a).plus 1) > @ 8 | -------------------------------------------------------------------------------- /project/eo-lib/coperators/pre-inc-int8.eo: -------------------------------------------------------------------------------- 1 | +alias c2eo.coperators.read-as-int8 2 | +alias c2eo.coperators.write-as-int8 3 | 4 | +package c2eo.coperators 5 | 6 | [a] > pre-inc-int8 7 | write-as-int8 a ((read-as-int8 a).plus 1) > @ 8 | -------------------------------------------------------------------------------- /project/eo-lib/coperators/pre-inc-ptr.eo: -------------------------------------------------------------------------------- 1 | +alias c2eo.coperators.read-as-ptr 2 | +alias c2eo.coperators.write-as-ptr 3 | 4 | +package c2eo.coperators 5 | 6 | [a b] > pre-inc-ptr 7 | write-as-ptr a ((read-as-ptr a).plus b) > @ 8 | -------------------------------------------------------------------------------- /project/eo-lib/coperators/pre-inc-uint16.eo: -------------------------------------------------------------------------------- 1 | +alias c2eo.coperators.read-as-uint16 2 | +alias c2eo.coperators.write-as-uint16 3 | 4 | +package c2eo.coperators 5 | 6 | [a] > pre-inc-uint16 7 | write-as-uint16 a ((read-as-uint16 a).plus 1) > @ 8 | -------------------------------------------------------------------------------- /project/eo-lib/coperators/pre-inc-uint32.eo: -------------------------------------------------------------------------------- 1 | +alias c2eo.coperators.read-as-uint32 2 | +alias c2eo.coperators.write-as-uint32 3 | 4 | +package c2eo.coperators 5 | 6 | [a] > pre-inc-uint32 7 | write-as-uint32 a ((read-as-uint32 a).plus 1) > @ 8 | -------------------------------------------------------------------------------- /project/eo-lib/coperators/pre-inc-uint64.eo: -------------------------------------------------------------------------------- 1 | +alias c2eo.coperators.read-as-uint64 2 | +alias c2eo.coperators.write-as-uint64 3 | 4 | +package c2eo.coperators 5 | 6 | [a] > pre-inc-uint64 7 | write-as-uint64 a ((read-as-uint64 a).plus 1) > @ 8 | -------------------------------------------------------------------------------- /project/eo-lib/coperators/pre-inc-uint8.eo: -------------------------------------------------------------------------------- 1 | +alias c2eo.coperators.read-as-uint8 2 | +alias c2eo.coperators.write-as-uint8 3 | 4 | +package c2eo.coperators 5 | 6 | [a] > pre-inc-uint8 7 | write-as-uint8 a ((read-as-uint8 a).plus 1) > @ 8 | -------------------------------------------------------------------------------- /project/eo-lib/coperators/printf.eo: -------------------------------------------------------------------------------- 1 | +alias org.eolang.io.stdout 2 | +alias org.eolang.txt.sprintf 3 | 4 | +package c2eo.coperators 5 | 6 | [format args...] > printf 7 | stdout (sprintf format ...args) > @ 8 | -------------------------------------------------------------------------------- /project/eo-lib/coperators/ram.eo: -------------------------------------------------------------------------------- 1 | +alias eoram org.eolang.ram 2 | 3 | +package c2eo.coperators 4 | 5 | [size] > ram 6 | 7 | eoram size > mem 8 | 9 | mem > @ 10 | 11 | [address bytes] > set 12 | mem.write address bytes > @ 13 | -------------------------------------------------------------------------------- /project/eo-lib/coperators/read-as-address.eo: -------------------------------------------------------------------------------- 1 | +alias c2eo.coperators.address 2 | 3 | +package c2eo.coperators 4 | 5 | [addr] > read-as-address 6 | address (addr.mem) ((addr.read 8).as-int) > @ 7 | -------------------------------------------------------------------------------- /project/eo-lib/coperators/read-as-bool.eo: -------------------------------------------------------------------------------- 1 | +package c2eo.coperators 2 | 3 | [a] > read-as-bool 4 | ((a.read 1).eq 00-).if 0 1 > @ 5 | -------------------------------------------------------------------------------- /project/eo-lib/coperators/read-as-float32.eo: -------------------------------------------------------------------------------- 1 | +package c2eo.coperators 2 | 3 | [a] > read-as-float32 4 | (a.read 8).as-float > @ 5 | -------------------------------------------------------------------------------- /project/eo-lib/coperators/read-as-float64.eo: -------------------------------------------------------------------------------- 1 | +package c2eo.coperators 2 | 3 | [a] > read-as-float64 4 | (a.read 8).as-float > @ 5 | -------------------------------------------------------------------------------- /project/eo-lib/coperators/read-as-int16.eo: -------------------------------------------------------------------------------- 1 | +package c2eo.coperators 2 | 3 | [a] > read-as-int16 4 | (a.read 2).as-int > @ 5 | -------------------------------------------------------------------------------- /project/eo-lib/coperators/read-as-int32.eo: -------------------------------------------------------------------------------- 1 | +package c2eo.coperators 2 | 3 | [a] > read-as-int32 4 | (a.read 4).as-int > @ 5 | -------------------------------------------------------------------------------- /project/eo-lib/coperators/read-as-int64.eo: -------------------------------------------------------------------------------- 1 | +package c2eo.coperators 2 | 3 | [a] > read-as-int64 4 | (a.read 8).as-int > @ 5 | -------------------------------------------------------------------------------- /project/eo-lib/coperators/read-as-int8.eo: -------------------------------------------------------------------------------- 1 | +package c2eo.coperators 2 | 3 | [a] > read-as-int8 4 | (a.read 1).as-int > @ 5 | -------------------------------------------------------------------------------- /project/eo-lib/coperators/read-as-ptr.eo: -------------------------------------------------------------------------------- 1 | +alias c2eo.coperators.read-as-int64 2 | 3 | +package c2eo.coperators 4 | 5 | [a] > read-as-ptr 6 | read-as-int64 a > @ 7 | -------------------------------------------------------------------------------- /project/eo-lib/coperators/read-as-string.eo: -------------------------------------------------------------------------------- 1 | +package c2eo.coperators 2 | 3 | [a b] > read-as-string 4 | memory 1 > len 5 | seq > @ 6 | while. 7 | (((a.read len).slice (len.minus 1) 1).eq 00-).not 8 | [i] 9 | len.write (len.plus 1) > @ 10 | (a.read (len.minus 1)).as-string 11 | -------------------------------------------------------------------------------- /project/eo-lib/coperators/read-as-uint16.eo: -------------------------------------------------------------------------------- 1 | +package c2eo.coperators 2 | 3 | [a] > read-as-uint16 4 | (00-00-00-00-00-00.concat (a.read 2)).as-int > @ 5 | -------------------------------------------------------------------------------- /project/eo-lib/coperators/read-as-uint32.eo: -------------------------------------------------------------------------------- 1 | +package c2eo.coperators 2 | 3 | [a] > read-as-uint32 4 | (00-00-00-00.concat (a.read 4)).as-int > @ 5 | -------------------------------------------------------------------------------- /project/eo-lib/coperators/read-as-uint64.eo: -------------------------------------------------------------------------------- 1 | +package c2eo.coperators 2 | 3 | [a] > read-as-uint64 4 | ((a.read 8).and 7F-FF-FF-FF-FF-FF-FF-FF).as-int > @ 5 | -------------------------------------------------------------------------------- /project/eo-lib/coperators/read-as-uint8.eo: -------------------------------------------------------------------------------- 1 | +package c2eo.coperators 2 | 3 | [a] > read-as-uint8 4 | (00-00-00-00-00-00-00.concat (a.read 1)).as-int > @ 5 | -------------------------------------------------------------------------------- /project/eo-lib/coperators/read.eo: -------------------------------------------------------------------------------- 1 | +package c2eo.coperators 2 | 3 | [a b] > read 4 | a.read b > @ 5 | -------------------------------------------------------------------------------- /project/eo-lib/coperators/set.eo: -------------------------------------------------------------------------------- 1 | +package c2eo.coperators 2 | 3 | [a b] > set 4 | a.set b > @ 5 | -------------------------------------------------------------------------------- /project/eo-lib/coperators/shift-left.eo: -------------------------------------------------------------------------------- 1 | +package c2eo.coperators 2 | 3 | [a b] > shift-left 4 | (a.as-bytes.left b).as-int > @ 5 | -------------------------------------------------------------------------------- /project/eo-lib/coperators/shift-right.eo: -------------------------------------------------------------------------------- 1 | +package c2eo.coperators 2 | 3 | [a b] > shift-right 4 | (a.as-bytes.right b).as-int > @ 5 | -------------------------------------------------------------------------------- /project/eo-lib/coperators/times.eo: -------------------------------------------------------------------------------- 1 | +package c2eo.coperators 2 | 3 | [a b] > times 4 | a.times b > @ 5 | -------------------------------------------------------------------------------- /project/eo-lib/coperators/write-as-bool.eo: -------------------------------------------------------------------------------- 1 | +alias c2eo.coperators.read-as-bool 2 | 3 | +package c2eo.coperators 4 | 5 | [a b] > write-as-bool 6 | seq > @ 7 | a.write ((b.eq 0).if 00- 01-) 8 | read-as-bool a 9 | -------------------------------------------------------------------------------- /project/eo-lib/coperators/write-as-float32.eo: -------------------------------------------------------------------------------- 1 | +alias c2eo.coperators.read-as-float32 2 | 3 | +package c2eo.coperators 4 | 5 | [a b] > write-as-float32 6 | seq > @ 7 | a.write b 8 | read-as-float32 a 9 | -------------------------------------------------------------------------------- /project/eo-lib/coperators/write-as-float64.eo: -------------------------------------------------------------------------------- 1 | +alias c2eo.coperators.read-as-float64 2 | 3 | +package c2eo.coperators 4 | 5 | [a b] > write-as-float64 6 | seq > @ 7 | a.write b 8 | read-as-float64 a 9 | -------------------------------------------------------------------------------- /project/eo-lib/coperators/write-as-int16.eo: -------------------------------------------------------------------------------- 1 | +alias c2eo.coperators.read-as-int16 2 | 3 | +package c2eo.coperators 4 | 5 | [a b] > write-as-int16 6 | seq > @ 7 | a.write (b.as-bytes.slice 6 2) 8 | read-as-int16 a 9 | -------------------------------------------------------------------------------- /project/eo-lib/coperators/write-as-int32.eo: -------------------------------------------------------------------------------- 1 | +alias c2eo.coperators.read-as-int32 2 | 3 | +package c2eo.coperators 4 | 5 | [a b] > write-as-int32 6 | seq > @ 7 | a.write (b.as-bytes.slice 4 4) 8 | read-as-int32 a 9 | -------------------------------------------------------------------------------- /project/eo-lib/coperators/write-as-int64.eo: -------------------------------------------------------------------------------- 1 | +alias c2eo.coperators.read-as-int64 2 | 3 | +package c2eo.coperators 4 | 5 | [a b] > write-as-int64 6 | seq > @ 7 | a.write b 8 | read-as-int64 a 9 | -------------------------------------------------------------------------------- /project/eo-lib/coperators/write-as-int8.eo: -------------------------------------------------------------------------------- 1 | +alias c2eo.coperators.read-as-int8 2 | 3 | +package c2eo.coperators 4 | 5 | [a b] > write-as-int8 6 | seq > @ 7 | a.write (b.as-bytes.slice 7 1) 8 | read-as-int8 a 9 | -------------------------------------------------------------------------------- /project/eo-lib/coperators/write-as-ptr.eo: -------------------------------------------------------------------------------- 1 | +alias c2eo.coperators.write-as-int64 2 | 3 | +package c2eo.coperators 4 | 5 | [a b] > write-as-ptr 6 | write-as-int64 a b > @ 7 | 8 | -------------------------------------------------------------------------------- /project/eo-lib/coperators/write-as-string.eo: -------------------------------------------------------------------------------- 1 | +package c2eo.coperators 2 | 3 | [a b] > write-as-string 4 | b.as-bytes > value 5 | if. > @ 6 | (value.slice (value.size.minus 1) 1).eq 00- 7 | a.write value 8 | a.write (value.concat 00-) 9 | -------------------------------------------------------------------------------- /project/eo-lib/coperators/write-as-uint16.eo: -------------------------------------------------------------------------------- 1 | +alias c2eo.coperators.read-as-uint16 2 | 3 | +package c2eo.coperators 4 | 5 | [a b] > write-as-uint16 6 | seq > @ 7 | a.write (b.as-bytes.slice 6 2) 8 | read-as-uint16 a 9 | -------------------------------------------------------------------------------- /project/eo-lib/coperators/write-as-uint32.eo: -------------------------------------------------------------------------------- 1 | +alias c2eo.coperators.read-as-uint32 2 | 3 | +package c2eo.coperators 4 | 5 | [a b] > write-as-uint32 6 | seq > @ 7 | a.write (b.as-bytes.slice 4 4) 8 | read-as-uint32 a 9 | -------------------------------------------------------------------------------- /project/eo-lib/coperators/write-as-uint64.eo: -------------------------------------------------------------------------------- 1 | +alias c2eo.coperators.read-as-uint64 2 | 3 | +package c2eo.coperators 4 | 5 | [a b] > write-as-uint64 6 | seq > @ 7 | a.write b 8 | read-as-uint64 a 9 | -------------------------------------------------------------------------------- /project/eo-lib/coperators/write-as-uint8.eo: -------------------------------------------------------------------------------- 1 | +alias c2eo.coperators.read-as-uint8 2 | 3 | +package c2eo.coperators 4 | 5 | [a b] > write-as-uint8 6 | seq > @ 7 | a.write (b.as-bytes.slice 7 1) 8 | read-as-uint8 a 9 | -------------------------------------------------------------------------------- /project/eo-lib/coperators/write.eo: -------------------------------------------------------------------------------- 1 | +package c2eo.coperators 2 | 3 | [a b] > write 4 | seq > @ 5 | a.write b 6 | b 7 | -------------------------------------------------------------------------------- /project/scripts/data/meta/plug.txt: -------------------------------------------------------------------------------- 1 | +alias c2eo.coperators.printf 2 | 3 | +package c2eo.src. 4 | 5 | [args...] > global 6 | printf "exception: \n" > @ 7 | -------------------------------------------------------------------------------- /project/scripts/data/meta/run.sh.txt: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | java -Xmx256m -cp target/classes:target/eo-runtime.jar org.eolang.Main c2eo.src..global "$@" 4 | -------------------------------------------------------------------------------- /project/scripts/data/skips/gcc.txt: -------------------------------------------------------------------------------- 1 | limits-blockid, limits-externalid, limits-externdecl.c, limits-pointer, pr46534: time limit 2 | limits-caselabels: Command terminated by signal 11 3 | pr28865, pr28865, 20030305-1, dump-noaddr, pr85582-2, pr85582-3, pr61375, nestfunc-7, pr42956, pr98474, 20050122-2: vardecl.cpp InitValueAnalysis 4 | limits-fndefn, pr105613: idk 5 | 20001018-1, pr32571, 991213-1, 20190827-1: element with id <> not found -------------------------------------------------------------------------------- /project/scripts/data/skips/test.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polystat/c2eo/c65958f36e04c98c46f758c5ca6896f373e80b2f/project/scripts/data/skips/test.txt -------------------------------------------------------------------------------- /project/src/transpiler/readme.md: -------------------------------------------------------------------------------- 1 | # C2EO 2 | 3 | C2EO source files using libtooling and libmatcher 4 | -------------------------------------------------------------------------------- /project/tests/in_progress/for_main/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polystat/c2eo/c65958f36e04c98c46f758c5ca6896f373e80b2f/project/tests/in_progress/for_main/.gitkeep -------------------------------------------------------------------------------- /project/tests/in_progress/for_main/array/array_formula/array_formula_simp.c: -------------------------------------------------------------------------------- 1 | int A[1][1]; 2 | 3 | int main() { 4 | int* T = (int*)A; 5 | return 0; 6 | } 7 | -------------------------------------------------------------------------------- /project/tests/in_progress/for_main/bad/argc_argv/argc_argv01.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main(int argc, char** argv) { 4 | printf("%d\n", argc); 5 | return 0; 6 | } 7 | -------------------------------------------------------------------------------- /project/tests/in_progress/for_main/bad/argc_argv/argc_argv02.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main(int arg_number, char** arguments) { 4 | printf("%d\n", arg_number); 5 | return 0; 6 | } 7 | -------------------------------------------------------------------------------- /project/tests/in_progress/for_main/bad/operations/inc_dec/post_dec_char.c: -------------------------------------------------------------------------------- 1 | //clang -Xclang -ast-dump -fsyntax-only main.c 2 | #include 3 | 4 | char e = 'z'; 5 | 6 | int main() { 7 | e--; 8 | printf("%c\n", e); 9 | e; 10 | 11 | return 0; 12 | } 13 | -------------------------------------------------------------------------------- /project/tests/in_progress/for_main/bad/operations/inc_dec/post_dec_float64.c: -------------------------------------------------------------------------------- 1 | //clang -Xclang -ast-dump -fsyntax-only main.c 2 | #include 3 | 4 | double d = 255; 5 | 6 | int main() { 7 | printf("d = %f\n", d); 8 | d--; 9 | printf("d-- = %f\n", d); 10 | 11 | return 0; 12 | } 13 | -------------------------------------------------------------------------------- /project/tests/in_progress/for_main/bad/operations/inc_dec/pre_inc_int64.c: -------------------------------------------------------------------------------- 1 | //clang -Xclang -ast-dump -fsyntax-only main.c 2 | #include 3 | 4 | long long c = 10; 5 | 6 | int main() { 7 | c++; 8 | printf("%lld\n", c); 9 | c; 10 | long long x = c++ + c++; 11 | printf("%lld\n", x); 12 | 13 | return 0; 14 | } 15 | -------------------------------------------------------------------------------- /project/tests/in_progress/for_main/bad/operations/question/00076/00076.c: -------------------------------------------------------------------------------- 1 | int 2 | test() 3 | { 4 | if(0 ? 1 : 0) 5 | return 1; 6 | if(1 ? 0 : 1) 7 | return 2; 8 | return 0; 9 | } 10 | 11 | #include 12 | int main() 13 | { 14 | int x = test(); 15 | printf("%d\n", x); 16 | return x; 17 | } 18 | -------------------------------------------------------------------------------- /project/tests/in_progress/for_main/bad/operations/question/00109/00109.c: -------------------------------------------------------------------------------- 1 | int 2 | test() 3 | { 4 | int x = 0; 5 | int y = 1; 6 | if(x ? 1 : 0) 7 | return 1; 8 | if(y ? 0 : 1) 9 | return 2; 10 | return 0; 11 | } 12 | 13 | #include 14 | int main() 15 | { 16 | int x = test(); 17 | printf("%d\n", x); 18 | return x; 19 | } 20 | -------------------------------------------------------------------------------- /project/tests/in_progress/for_main/bad/operations/question/00137/00137.c: -------------------------------------------------------------------------------- 1 | #define x(y) #y 2 | 3 | int 4 | test(void) 5 | { 6 | char *p; 7 | p = x(hello) " is better than bye"; 8 | 9 | return (*p == 'h') ? 0 : 1; 10 | } 11 | 12 | #include 13 | int main() 14 | { 15 | int x = test(); 16 | printf("%d\n", x); 17 | return x; 18 | } 19 | -------------------------------------------------------------------------------- /project/tests/in_progress/for_main/bad/operations/question/00138/00138.c: -------------------------------------------------------------------------------- 1 | #define M(x) x 2 | #define A(a,b) a(b) 3 | 4 | int 5 | test(void) 6 | { 7 | char *a = A(M,"hi"); 8 | 9 | return (a[1] == 'i') ? 0 : 1; 10 | } 11 | 12 | #include 13 | int main() 14 | { 15 | int x = test(); 16 | printf("%d\n", x); 17 | return x; 18 | } 19 | -------------------------------------------------------------------------------- /project/tests/in_progress/for_main/bad/operators/loops/for/for02.c: -------------------------------------------------------------------------------- 1 | // 2 | // Created by yarrya on 02.09.22. 3 | // todo: run bad/types/composite_types/array/arr3d/ 4 | #include 5 | 6 | int main() { 7 | 8 | int n=3; 9 | for(int i=0;i 2 | 3 | char c1 = 'a'; 4 | 5 | int main() { 6 | printf("%d\n", c1); 7 | printf("%c\n", c1); 8 | 9 | return 0; 10 | } 11 | -------------------------------------------------------------------------------- /project/tests/in_progress/for_main/bad/types/base_types/type_char/type_char02.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | char c1 = 65; 4 | 5 | int main() { 6 | printf("%d\n", c1); 7 | printf("%c\n", c1); 8 | 9 | return 0; 10 | } 11 | -------------------------------------------------------------------------------- /project/tests/in_progress/for_main/bad/types/base_types/type_char/type_char04.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | unsigned char c1 = 66; 4 | 5 | int main() { 6 | printf("%d\n", c1); 7 | printf("%c\n", c1); 8 | 9 | return 0; 10 | } 11 | -------------------------------------------------------------------------------- /project/tests/in_progress/for_main/bad/types/base_types/type_char/type_char06.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | signed char c1 = 67; 4 | 5 | int main() { 6 | printf("%d\n", c1); 7 | printf("%c\n", c1); 8 | 9 | return 0; 10 | } 11 | -------------------------------------------------------------------------------- /project/tests/in_progress/for_main/bad/types/base_types/type_char/type_char07.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int c1 = 'D'; 4 | 5 | int main() { 6 | printf("%d\n", c1); 7 | printf("%c\n", c1); 8 | 9 | return 0; 10 | } 11 | -------------------------------------------------------------------------------- /project/tests/in_progress/for_main/bad/types/base_types/type_char/type_char08.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int c1 = 69; 4 | 5 | int main() { 6 | printf("%d\n", c1); 7 | printf("%c\n", c1); 8 | 9 | return 0; 10 | } 11 | -------------------------------------------------------------------------------- /project/tests/in_progress/for_main/bad/types/base_types/type_uns_long(long)/00082/00082.c: -------------------------------------------------------------------------------- 1 | int 2 | test() 3 | { 4 | unsigned long long x; 5 | 6 | x = 0; 7 | x = x + 1; 8 | if (x != 1) 9 | return 1; 10 | return 0; 11 | } 12 | 13 | #include 14 | int main() 15 | { 16 | int x = test(); 17 | printf("%d\n", x); 18 | return x; 19 | } 20 | -------------------------------------------------------------------------------- /project/tests/in_progress/for_main/bad/types/base_types/type_uns_long(long)/00217/00217.c: -------------------------------------------------------------------------------- 1 | #include 2 | // int printf(const char *, ...); 3 | char t[] = "012345678"; 4 | 5 | int main(void) 6 | { 7 | char *data = t; 8 | unsigned long long r = 4; 9 | unsigned a = 5; 10 | unsigned long long b = 12; 11 | 12 | *(unsigned*)(data + r) += a - b; 13 | 14 | printf("data = \"%s\"\n", data); 15 | return 0; 16 | } 17 | -------------------------------------------------------------------------------- /project/tests/in_progress/for_main/bad/types/composite_types/funptr/00087/00087.c: -------------------------------------------------------------------------------- 1 | struct S 2 | { 3 | int (*fptr)(); 4 | }; 5 | 6 | int 7 | foo() 8 | { 9 | return 0; 10 | } 11 | 12 | int 13 | test() 14 | { 15 | struct S v; 16 | 17 | v.fptr = foo; 18 | return v.fptr(); 19 | } 20 | 21 | 22 | #include 23 | int main() 24 | { 25 | int x = test(); 26 | printf("%d\n", x); 27 | return x; 28 | } 29 | -------------------------------------------------------------------------------- /project/tests/in_progress/for_main/bad/types/composite_types/funptr/00095/00095.c: -------------------------------------------------------------------------------- 1 | int x; 2 | int x = 3; 3 | int x; 4 | 5 | int main(); 6 | 7 | void * 8 | foo() 9 | { 10 | return &main; 11 | } 12 | 13 | int 14 | test() 15 | { 16 | if (x != 3) 17 | return 0; 18 | 19 | x = 0; 20 | return x; 21 | } 22 | 23 | 24 | #include 25 | int main() 26 | { 27 | int x = test(); 28 | printf("%d\n", x); 29 | return x; 30 | } 31 | -------------------------------------------------------------------------------- /project/tests/in_progress/for_main/bad/types/composite_types/pointers/00149/00149.c: -------------------------------------------------------------------------------- 1 | struct S { int a; int b; }; 2 | struct S *s = &(struct S) { 1, 2 }; 3 | 4 | int 5 | test() 6 | { 7 | if(s->a != 1) 8 | return 1; 9 | if(s->b != 2) 10 | return 2; 11 | return 0; 12 | } 13 | 14 | #include 15 | int main() 16 | { 17 | int x = test(); 18 | printf("%d\n", x); 19 | return x; 20 | } 21 | -------------------------------------------------------------------------------- /project/tests/in_progress/for_main/bad/types/composite_types/pointers/local_ptr/char/char_ptr01/char_ptr01.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main() { 4 | char c = 'a'; 5 | printf("%c", *&c); 6 | *&c; 7 | return 0; 8 | } -------------------------------------------------------------------------------- /project/tests/in_progress/for_main/bad/types/composite_types/pointers/local_ptr/char/char_ptr02/char_ptr02.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main() { 4 | char c = 'g'; 5 | printf("%c\n", c); 6 | char *c1 = &c; 7 | printf("%c\n", *c1); 8 | *c1; 9 | return 0; 10 | } -------------------------------------------------------------------------------- /project/tests/in_progress/for_main/bad/types/composite_types/pointers/local_ptr/char/char_ptr03/char_ptr03.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main() { 4 | char c = 'k'; 5 | printf("%c\n", *&c); 6 | *&c; 7 | char c1 = 55; 8 | printf("%c\n", *&c1); 9 | *&c1; 10 | char *c2 = &c; 11 | printf("%c\n", *c2); 12 | *c2; 13 | return 0; 14 | } -------------------------------------------------------------------------------- /project/tests/in_progress/for_main/bad/types/composite_types/pointers/local_ptr/unsigned_long_long/ulonglong_ptr01/ulonglong_ptr01.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main() { 4 | unsigned long long a = 5; 5 | printf("%u\n", *&a); 6 | return 0; 7 | } 8 | -------------------------------------------------------------------------------- /project/tests/in_progress/for_main/bad/types/composite_types/pointers/local_ptr/unsigned_long_long/ulonglong_ptr03/ulonglong_ptr02.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main() { 4 | unsigned long long a = 5; // 4294967291 5 | unsigned long long *b = &a; 6 | printf("%u\n", *b); 7 | return 0; 8 | } 9 | -------------------------------------------------------------------------------- /project/tests/in_progress/for_main/bad/types/composite_types/pointers/local_ptr/unsigned_long_long/ulonnglong_ptr02/ulonglong_ptr03.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main() { 4 | unsigned long long a = -5; // 4294967291 5 | unsigned long long *b = &a; 6 | printf("%u\n", *b); 7 | return 0; 8 | } 9 | -------------------------------------------------------------------------------- /project/tests/in_progress/for_main/bad/types/composite_types/pointers/simple_types_ptr/char/char_ptr01/char_ptr01.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | char c = 'a'; 4 | 5 | int main() { 6 | printf("%c", *&c); 7 | return 0; 8 | } 9 | -------------------------------------------------------------------------------- /project/tests/in_progress/for_main/bad/types/composite_types/pointers/simple_types_ptr/char/char_ptr02/char_ptr02.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | char c = 'g'; 4 | char *c1 = &c; 5 | 6 | int main() { 7 | printf("%c\n", c); 8 | printf("%c\n", *c1); 9 | return 0; 10 | } 11 | -------------------------------------------------------------------------------- /project/tests/in_progress/for_main/bad/types/composite_types/pointers/simple_types_ptr/char/char_ptr03/char_ptr03.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | char c = 'k'; 4 | char c1 = 55; 5 | char *c2 = &c; 6 | 7 | int main() { 8 | printf("%c\n", *&c); 9 | printf("%c\n", *&c1); 10 | printf("%c\n", *c2); 11 | return 0; 12 | } 13 | -------------------------------------------------------------------------------- /project/tests/in_progress/for_main/bad/types/composite_types/pointers/simple_types_ptr/double/double_ptr02/double_ptr02.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | double a = 5.55; 4 | double *b = &a; 5 | 6 | int main() { 7 | printf("%f\n", *b); 8 | return 0; 9 | } 10 | -------------------------------------------------------------------------------- /project/tests/in_progress/for_main/bad/types/composite_types/pointers/simple_types_ptr/int/int_ptr02/int_ptr02.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int a = 5; 4 | int *b = &a; 5 | 6 | int main() { 7 | printf("%d\n", *b); 8 | return 0; 9 | } 10 | -------------------------------------------------------------------------------- /project/tests/in_progress/for_main/bad/types/composite_types/pointers/simple_types_ptr/long_long/long_long_ptr02/long_long_ptr02.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | long long a = 457346743; 4 | long long *b = &a; 5 | 6 | int main() { 7 | printf("%d\n", *b); 8 | return 0; 9 | } 10 | -------------------------------------------------------------------------------- /project/tests/in_progress/for_main/bad/types/composite_types/pointers/simple_types_ptr/short/short_ptr02/short_ptr02.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | short a = 5; 4 | short *b = &a; 5 | 6 | int main() { 7 | printf("%d\n", *b); 8 | return 0; 9 | } 10 | 11 | -------------------------------------------------------------------------------- /project/tests/in_progress/for_main/bad/types/composite_types/pointers/simple_types_ptr/unsigned_int/uint_ptr01/uint_ptr01.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | unsigned int a = 5; 4 | 5 | int main() { 6 | printf("%u\n", *&a); 7 | return 0; 8 | } 9 | -------------------------------------------------------------------------------- /project/tests/in_progress/for_main/bad/types/composite_types/pointers/simple_types_ptr/unsigned_int/uint_ptr02/uint_ptr02.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | unsigned int a = 5; 4 | unsigned int *b = &a; 5 | 6 | int main() { 7 | printf("%u\n", *b); 8 | return 0; 9 | } 10 | -------------------------------------------------------------------------------- /project/tests/in_progress/for_main/bad/types/composite_types/pointers/simple_types_ptr/unsigned_int/uint_ptr03/uint_ptr03.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | unsigned int a = -5; 4 | unsigned int *b = &a; 5 | 6 | int main() { 7 | printf("%u\n", *b); // 4294967291 8 | return 0; 9 | } 10 | -------------------------------------------------------------------------------- /project/tests/in_progress/for_main/bad/types/composite_types/pointers/simple_types_ptr/unsigned_long_long/ulonglong_ptr01/ulonglong_ptr01.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | unsigned long long a = 5; 4 | 5 | int main() { 6 | printf("%u\n", *&a); 7 | return 0; 8 | } 9 | -------------------------------------------------------------------------------- /project/tests/in_progress/for_main/bad/types/composite_types/pointers/simple_types_ptr/unsigned_long_long/ulonglong_ptr03/ulonglong_ptr02.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | unsigned long long a = 5; 4 | unsigned long long *b = &a; 5 | 6 | int main() { 7 | printf("%u\n", *b); // 4294967291 8 | return 0; 9 | } 10 | -------------------------------------------------------------------------------- /project/tests/in_progress/for_main/bad/types/composite_types/pointers/simple_types_ptr/unsigned_long_long/ulonnglong_ptr02/ulonglong_ptr03.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | unsigned long long a = -5; 4 | unsigned long long *b = &a; 5 | 6 | int main() { 7 | printf("%u\n", *b); // 4294967291 8 | return 0; 9 | } 10 | -------------------------------------------------------------------------------- /project/tests/in_progress/for_main/bad/types/composite_types/pointers/simple_types_ptr/unsigned_short/ushort_ptr01/ushort_ptr01.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | unsigned short a = 5; 4 | 5 | int main() { 6 | printf("%u\n", *&a); 7 | return 0; 8 | } 9 | -------------------------------------------------------------------------------- /project/tests/in_progress/for_main/bad/types/composite_types/pointers/simple_types_ptr/unsigned_short/ushort_ptr02/ushort_ptr02.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | unsigned short a = 5; 4 | unsigned short *b = &a; 5 | 6 | int main() { 7 | printf("%u\n", *b); 8 | return 0; 9 | } 10 | -------------------------------------------------------------------------------- /project/tests/in_progress/for_main/bad/types/composite_types/pointers/simple_types_ptr/unsigned_short/ushort_ptr03/ushort_ptr03.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | unsigned short a = -5; 4 | unsigned short *b = &a; 5 | 6 | int main() { 7 | printf("%u\n", *b); // 65531 8 | return 0; 9 | } 10 | -------------------------------------------------------------------------------- /project/tests/in_progress/for_main/bad/variables/00096/00096.c: -------------------------------------------------------------------------------- 1 | int x, x = 3, x; 2 | 3 | int 4 | test() 5 | { 6 | if (x != 3) 7 | return 3; 8 | 9 | x = 0; 10 | return x; 11 | } 12 | 13 | 14 | #include 15 | int main() 16 | { 17 | int x = test(); 18 | printf("%d\n", x); 19 | return x; 20 | } 21 | -------------------------------------------------------------------------------- /project/tests/in_progress/for_main/bad/variables/init/pointers/00045/00045.c: -------------------------------------------------------------------------------- 1 | int x = 5; 2 | long y = 6; 3 | int *p = &x; 4 | 5 | int 6 | test() 7 | { 8 | if (x != 5) 9 | return 1; 10 | if (y != 6) 11 | return 2; 12 | if (*p != 5) 13 | return 3; 14 | return 0; 15 | } 16 | 17 | 18 | #include 19 | int main() 20 | { 21 | int x = test(); 22 | printf("%d\n", x); 23 | return x; 24 | } 25 | -------------------------------------------------------------------------------- /project/tests/in_progress/for_main/bad/variables/init/pointers/00045/local/double_local_ptr.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main() { 4 | double a = 5.55; 5 | double b = 12.55; 6 | double *c = &b; 7 | printf("%1.2f\n", *c); 8 | printf("%1.2f\n", *&a); 9 | return 0; 10 | } 11 | -------------------------------------------------------------------------------- /project/tests/in_progress/for_main/bad/variables/init/pointers/00045/local/int_local_ptr.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main() { 4 | int a = 5; 5 | int b = 5; 6 | int *c = &b; 7 | printf("%d\n", *c); 8 | printf("%d\n", *&a); 9 | return 0; 10 | } 11 | -------------------------------------------------------------------------------- /project/tests/in_progress/for_main/bad/variables/init/pointers/00045/local/long_long_local_ptr.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main() { 4 | long long a = 5; 5 | long long b = 8; 6 | long long *c = &b; 7 | printf("%lld\n", *c); 8 | printf("%lld\n", *&a); 9 | return 0; 10 | } 11 | 12 | -------------------------------------------------------------------------------- /project/tests/in_progress/for_main/bad/variables/init/pointers/00045/local/short_local_ptr.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main() { 4 | short a = 5; 5 | short b = 8; 6 | short *c = &b; 7 | printf("%hd\n", *c); 8 | printf("%hd\n", *&a); 9 | return 0; 10 | } 11 | 12 | -------------------------------------------------------------------------------- /project/tests/in_progress/for_main/bad/variables/static/some_local_static/error/some_local_static01.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | void foo1() { 4 | static int a = 10; 5 | a++; 6 | printf("a-foo1 = %d\n", a); 7 | } 8 | 9 | void foo2() { 10 | static int a = 20; 11 | a++; 12 | printf("a-foo2 = %d\n", a); 13 | } 14 | 15 | int main(){ 16 | foo1(); 17 | foo2(); 18 | return 0; 19 | } 20 | -------------------------------------------------------------------------------- /project/tests/in_progress/for_main/good/algorithms/factorial/fact01_while_glob_i32_post.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int n = 10; 4 | 5 | int main() { 6 | int f = 1; 7 | while(n > 1) { 8 | f *= n; 9 | n--; 10 | } 11 | printf("%d\n", f); 12 | f; 13 | 14 | return 0; 15 | } 16 | -------------------------------------------------------------------------------- /project/tests/in_progress/for_main/good/algorithms/factorial/fact02_while_glob_i32_post_cmpd.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int n = 5; 4 | 5 | int main() { 6 | int f = 1; 7 | while(n > 1) { 8 | f *= n--; 9 | } 10 | printf("%d\n", f); 11 | f; 12 | 13 | return 0; 14 | } 15 | -------------------------------------------------------------------------------- /project/tests/in_progress/for_main/good/algorithms/factorial/fact02_while_glob_i64_post_cmpd.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | typedef long long int64; 4 | 5 | int64 n = 5; 6 | 7 | int64 main() { 8 | int64 f; 9 | f = 1; 10 | while(n > 1) { 11 | f *= n--; 12 | } 13 | printf("%lld\n", f); 14 | f; 15 | 16 | return 0; 17 | } 18 | -------------------------------------------------------------------------------- /project/tests/in_progress/for_main/good/algorithms/factorial/fact05_rec_i64.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | typedef long long int64; 4 | 5 | int64 factorial(int64 n) { 6 | if(n < 2) { 7 | return n; 8 | } 9 | else { 10 | return n * factorial(n -1); 11 | } 12 | } 13 | 14 | int main() { 15 | int64 f; 16 | f = factorial(5); 17 | printf("%lld\n", f); 18 | f; 19 | 20 | return 0; 21 | } 22 | -------------------------------------------------------------------------------- /project/tests/in_progress/for_main/good/functions/func005_add_inc_inc.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int foo(int x) { 4 | int y = x++ + x++; 5 | return y; 6 | } 7 | 8 | int main() { 9 | int v = foo(5); 10 | printf("v = %d\n", v); 11 | return 0; 12 | } 13 | -------------------------------------------------------------------------------- /project/tests/in_progress/for_main/good/functions/func008_call_f1.c: -------------------------------------------------------------------------------- 1 | //clang -Xclang -ast-dump -fsyntax-only func01.c 2 | 3 | #include 4 | 5 | long long c = 10; 6 | 7 | long long func1() { 8 | return c - 111; 9 | } 10 | 11 | int main() { 12 | long long a; 13 | a = func1(); 14 | printf("%lld\n", a); 15 | 16 | return 0; 17 | } 18 | -------------------------------------------------------------------------------- /project/tests/in_progress/for_main/good/functions/func009_3params.c: -------------------------------------------------------------------------------- 1 | //clang -Xclang -ast-dump -fsyntax-only func01.c 2 | 3 | #include 4 | 5 | long long c = 10; 6 | 7 | long long func1(long long x, long long y, long long z) { 8 | return x - y * z; 9 | } 10 | 11 | int main() { 12 | long long a; 13 | a = func1(c, 5, 10); 14 | printf("%lld\n", a); 15 | 16 | return 0; 17 | } 18 | -------------------------------------------------------------------------------- /project/tests/in_progress/for_main/good/operations/arithmetic/incdec/post_dec_int64.c: -------------------------------------------------------------------------------- 1 | //clang -Xclang -ast-dump -fsyntax-only main.c 2 | #include 3 | 4 | long long c = 10; 5 | 6 | int main() { 7 | c--; 8 | printf("%lld\n", c); 9 | 10 | return 0; 11 | } 12 | -------------------------------------------------------------------------------- /project/tests/in_progress/for_main/good/operations/arithmetic/incdec/post_inc_int64.c: -------------------------------------------------------------------------------- 1 | //clang -Xclang -ast-dump -fsyntax-only main.c 2 | #include 3 | 4 | long long c = 10; 5 | 6 | int main() { 7 | c++; 8 | printf("%lld\n", c); 9 | 10 | return 0; 11 | } 12 | -------------------------------------------------------------------------------- /project/tests/in_progress/for_main/good/operations/arithmetic/incdec/post_inc_int64_assign.c: -------------------------------------------------------------------------------- 1 | //clang -Xclang -ast-dump -fsyntax-only main.c 2 | #include 3 | 4 | long long c = 10; 5 | 6 | int main() { 7 | long long x; 8 | x = c++; 9 | printf("%lld\n", c); 10 | printf("%lld\n", x); 11 | 12 | return 0; 13 | } 14 | -------------------------------------------------------------------------------- /project/tests/in_progress/for_main/good/operations/arithmetic/incdec/post_pre_inc_int64_combi.c: -------------------------------------------------------------------------------- 1 | //clang -Xclang -ast-dump -fsyntax-only main.c 2 | #include 3 | 4 | long long c = 10; 5 | 6 | int main() { 7 | long long x; 8 | x = c++ + ++c; 9 | printf("%lld\n", c); 10 | printf("%lld\n", x); 11 | 12 | return 0; 13 | } 14 | -------------------------------------------------------------------------------- /project/tests/in_progress/for_main/good/operations/arithmetic/incdec/ppost_inc_int64_combi.c: -------------------------------------------------------------------------------- 1 | //clang -Xclang -ast-dump -fsyntax-only main.c 2 | #include 3 | 4 | long long c = 10; 5 | 6 | int main() { 7 | long long x; 8 | x = c++ + c++; 9 | printf("%lld\n", c); 10 | printf("%lld\n", x); 11 | 12 | return 0; 13 | } 14 | -------------------------------------------------------------------------------- /project/tests/in_progress/for_main/good/operations/arithmetic/incdec/pre_dec_int64.c: -------------------------------------------------------------------------------- 1 | //clang -Xclang -ast-dump -fsyntax-only main.c 2 | #include 3 | 4 | long long c = 10; 5 | 6 | int main() { 7 | c--; 8 | printf("%lld\n", c); 9 | 10 | return 0; 11 | } 12 | -------------------------------------------------------------------------------- /project/tests/in_progress/for_main/good/operations/assign/ass06_cmpd_and.c: -------------------------------------------------------------------------------- 1 | //clang -Xclang -ast-dump -fsyntax-only *.c 2 | #include 3 | 4 | long long a = 100; 5 | long long b = 20; 6 | long long c = 15; 7 | 8 | int main() { 9 | printf("%lld\n", a); 10 | a; 11 | printf("%lld\n", b); 12 | b; 13 | printf("%lld\n", c); 14 | c; 15 | 16 | a &= c; 17 | printf("%lld\n", a); 18 | a; 19 | 20 | return 0; 21 | } 22 | -------------------------------------------------------------------------------- /project/tests/in_progress/for_main/good/operations/assign/ass07_cmpd_or.c: -------------------------------------------------------------------------------- 1 | //clang -Xclang -ast-dump -fsyntax-only *.c 2 | #include 3 | 4 | long long a = 100; 5 | long long b = 20; 6 | long long c = 15; 7 | 8 | int main() { 9 | printf("%lld\n", a); 10 | a; 11 | printf("%lld\n", b); 12 | b; 13 | printf("%lld\n", c); 14 | c; 15 | 16 | a |= c; 17 | printf("%lld\n", a); 18 | a; 19 | 20 | return 0; 21 | } 22 | -------------------------------------------------------------------------------- /project/tests/in_progress/for_main/good/operations/assign/ass08_cmpd_xor.c: -------------------------------------------------------------------------------- 1 | //clang -Xclang -ast-dump -fsyntax-only *.c 2 | #include 3 | 4 | long long a = 100; 5 | long long b = 20; 6 | long long c = 15; 7 | 8 | int main() { 9 | printf("%lld\n", a); 10 | a; 11 | printf("%lld\n", b); 12 | b; 13 | printf("%lld\n", c); 14 | c; 15 | 16 | a ^= c; 17 | printf("%lld\n", a); 18 | a; 19 | 20 | return 0; 21 | } 22 | -------------------------------------------------------------------------------- /project/tests/in_progress/for_main/good/operations/assign/ass09_cmpd_shift_left.c: -------------------------------------------------------------------------------- 1 | //clang -Xclang -ast-dump -fsyntax-only *.c 2 | #include 3 | 4 | long long a = 100; 5 | long long b = 20; 6 | long long c = 15; 7 | 8 | int main() { 9 | printf("%lld\n", a); 10 | a; 11 | printf("%lld\n", b); 12 | b; 13 | printf("%lld\n", c); 14 | c; 15 | 16 | a <<= c; 17 | printf("%lld\n", a); 18 | a; 19 | 20 | return 0; 21 | } 22 | -------------------------------------------------------------------------------- /project/tests/in_progress/for_main/good/operations/assign/ass10_cmpd_shift_right.c: -------------------------------------------------------------------------------- 1 | //clang -Xclang -ast-dump -fsyntax-only *.c 2 | #include 3 | 4 | long long a = 100; 5 | long long b = 20; 6 | long long c = 15; 7 | 8 | int main() { 9 | printf("%lld\n", a); 10 | a; 11 | printf("%lld\n", b); 12 | b; 13 | printf("%lld\n", c); 14 | c; 15 | 16 | a >>= c; 17 | printf("%lld\n", a); 18 | a; 19 | 20 | return 0; 21 | } 22 | -------------------------------------------------------------------------------- /project/tests/in_progress/for_main/good/operations/ptr_bin_op/ptr_plus_val/ptr_plus_long.c: -------------------------------------------------------------------------------- 1 | //clang -Xclang -ast-dump -fsyntax-only main.c 2 | #include 3 | 4 | long array[3] = {0, 1, 2}; 5 | long *ptr; 6 | 7 | int main() { 8 | ptr = array; 9 | printf("array[0] = %ld\n", *ptr); 10 | ptr = array + 2; 11 | printf("array[2] = %ld\n", *ptr); 12 | --ptr; 13 | printf("array[1] = %ld\n", *ptr); 14 | 15 | return 0; 16 | } 17 | -------------------------------------------------------------------------------- /project/tests/in_progress/for_main/good/types/base_types/type_casting/typecast01_i64_to_f64_ass.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | typedef long long int64; 4 | typedef double float64; 5 | 6 | int64 a = 10; 7 | float64 b = 3.141592; 8 | 9 | int main() { 10 | printf("%lld\n", a); 11 | printf("%f\n", b); 12 | 13 | b = a; 14 | printf("%f\n", b); 15 | 16 | return 0; 17 | } 18 | 19 | -------------------------------------------------------------------------------- /project/tests/in_progress/for_main/good/types/base_types/type_casting/typecast01_i64_to_f64_expl.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | typedef long long int64; 4 | 5 | int64 a = 10; 6 | double b = 3.141592; 7 | 8 | int main() { 9 | printf("%lld\n", a); 10 | printf("%f\n", b); 11 | 12 | b = (double)a; 13 | printf("%f\n", b); 14 | 15 | return 0; 16 | } 17 | 18 | -------------------------------------------------------------------------------- /project/tests/in_progress/for_main/good/types/complex_types/array/simple/array07.c: -------------------------------------------------------------------------------- 1 | #include 2 | int tmp; 3 | 4 | int main(void) { 5 | int arr[5] = {10, 20, 30, 40, 50}; 6 | 7 | tmp = *arr; 8 | printf("%d\n", tmp); 9 | tmp = arr[0]; 10 | printf("%d\n", tmp); 11 | 12 | return 0; 13 | } 14 | -------------------------------------------------------------------------------- /project/tests/in_progress/for_main/good/types/complex_types/array/simple/array08.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int arr[5] = {10, 20, 30, 40, 50}; 4 | 5 | int main(void) { 6 | printf("%d\n", *arr); 7 | printf("%d\n", arr[0]); 8 | 9 | return 0; 10 | } 11 | -------------------------------------------------------------------------------- /project/tests/in_progress/for_main/good/types/complex_types/enum/enum01.c: -------------------------------------------------------------------------------- 1 | //clang -Xclang -ast-dump -fsyntax-only main.c 2 | enum a {a0, a1, a2}; 3 | enum a v1, v2, v3; 4 | 5 | int main() { 6 | v1 = a0; 7 | v2 = a1; 8 | v3 = a2; 9 | printf("%d\n", v1); 10 | printf("%d\n", v2); 11 | printf("%d\n", v3); 12 | return 0; 13 | } 14 | -------------------------------------------------------------------------------- /project/tests/in_progress/for_main/good/types/complex_types/pointers/local_ptr/unsigned_int/uint_ptr01/uint_ptr01.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main() { 4 | unsigned int a = 5; 5 | printf("%u\n", *&a); 6 | return 0; 7 | } 8 | -------------------------------------------------------------------------------- /project/tests/in_progress/for_main/good/types/complex_types/pointers/local_ptr/unsigned_int/uint_ptr02/uint_ptr02.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main() { 4 | unsigned int a = 5; 5 | unsigned int *b = &a; 6 | printf("%u\n", *b); 7 | return 0; 8 | } 9 | -------------------------------------------------------------------------------- /project/tests/in_progress/for_main/good/types/complex_types/pointers/local_ptr/unsigned_int/uint_ptr03/uint_ptr03.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main() { 4 | unsigned int a = -5; // 4294967291 5 | unsigned int *b = &a; 6 | printf("%u\n", *b); 7 | return 0; 8 | } 9 | -------------------------------------------------------------------------------- /project/tests/in_progress/for_main/good/types/complex_types/pointers/other/pointers04.c: -------------------------------------------------------------------------------- 1 | //clang -Xclang -ast-dump -fsyntax-only main.c 2 | #include 3 | 4 | long long c = 10; 5 | long long d = 10; 6 | long long *pc; 7 | 8 | int main() { 9 | pc = &c; 10 | d = *pc; 11 | printf("c = %lld\n", c); 12 | printf("d = %lld\n", d); 13 | printf("*pc = %lld\n", *pc); 14 | 15 | return 0; 16 | } 17 | -------------------------------------------------------------------------------- /project/tests/in_progress/for_main/good/types/complex_types/pointers/other/pointers05.c: -------------------------------------------------------------------------------- 1 | //clang -Xclang -ast-dump -fsyntax-only main.c 2 | #include 3 | 4 | long long c = 10; 5 | long long d = 100; 6 | 7 | int main() { 8 | d = *&c; 9 | printf("c = %lld\n", c); 10 | printf("d = %lld\n", d); 11 | 12 | return 0; 13 | } 14 | -------------------------------------------------------------------------------- /project/tests/in_progress/for_main/good/types/complex_types/pointers/struct_ptr/struct_ptr01/struct_ptr01.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | struct Test { 4 | int *val_ptr; 5 | int val; 6 | }; 7 | 8 | int a = 5; 9 | struct Test x; 10 | 11 | int main() { 12 | x.val = a; 13 | x.val_ptr = &a; 14 | printf("%d\n", x.val); 15 | x.val; 16 | printf("%d\n", *x.val_ptr); 17 | *x.val_ptr; 18 | return 0; 19 | } -------------------------------------------------------------------------------- /project/tests/in_progress/for_main/good/types/complex_types/pointers/struct_ptr/struct_ptr03/struct_ptr03.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | struct Test { 4 | struct Test *next; 5 | int val; 6 | }; 7 | 8 | int a; 9 | struct Test x1; 10 | struct Test x2; 11 | 12 | int main() { 13 | x1.val = 5; 14 | x2.next = &x1; 15 | a = x2.next->val; 16 | 17 | printf("%d\n", a); 18 | return 0; 19 | } -------------------------------------------------------------------------------- /project/tests/in_progress/for_main/good/types/complex_types/pointers/unsigned_short/ushort_ptr01/ushort_ptr01.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main() { 4 | unsigned short a = 5; 5 | printf("%u\n", *&a); 6 | return 0; 7 | } 8 | -------------------------------------------------------------------------------- /project/tests/in_progress/for_main/good/types/complex_types/pointers/unsigned_short/ushort_ptr02/ushort_ptr02.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main() { 4 | unsigned short a = 5; 5 | unsigned short *b = &a; 6 | printf("%u\n", *b); 7 | return 0; 8 | } 9 | -------------------------------------------------------------------------------- /project/tests/in_progress/for_main/good/types/complex_types/pointers/unsigned_short/ushort_ptr03/ushort_ptr03.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main() { 4 | unsigned short a = -5; // 65531 5 | unsigned short *b = &a; 6 | printf("%u\n", *b); 7 | return 0; 8 | } 9 | -------------------------------------------------------------------------------- /project/tests/in_progress/for_main/good/types/complex_types/struct/struct00.c: -------------------------------------------------------------------------------- 1 | //clang -Xclang -ast-dump -fsyntax-only main.cpp 2 | #include 3 | struct st{ 4 | int a; 5 | }; 6 | 7 | struct st obj1; 8 | 9 | int main() { 10 | return 0; 11 | } 12 | -------------------------------------------------------------------------------- /project/tests/in_progress/for_main/good/types/complex_types/struct/struct01.c: -------------------------------------------------------------------------------- 1 | //clang -Xclang -ast-dump -fsyntax-only main.cpp 2 | struct st{ 3 | int a; 4 | }; 5 | 6 | int main() { 7 | struct st obj1; 8 | return 0; 9 | } 10 | -------------------------------------------------------------------------------- /project/tests/in_progress/for_main/good/types/complex_types/struct/struct02.c: -------------------------------------------------------------------------------- 1 | //clang -Xclang -ast-dump -fsyntax-only main.cpp 2 | #include 3 | struct st{ 4 | int a; 5 | }; 6 | 7 | struct st obj1; 8 | 9 | int main() { 10 | obj1.a = 5; 11 | obj1.a; 12 | printf("%d\n", obj1.a); 13 | return 0; 14 | } 15 | -------------------------------------------------------------------------------- /project/tests/in_progress/for_main/good/types/complex_types/struct/struct03.c: -------------------------------------------------------------------------------- 1 | //clang -Xclang -ast-dump -fsyntax-only main.cpp 2 | #include 3 | struct st{ 4 | int a; 5 | }; 6 | 7 | 8 | 9 | int main() { 10 | struct st obj1; 11 | obj1.a = 6; 12 | obj1.a; 13 | printf("%d\n", obj1.a); 14 | return 0; 15 | } 16 | -------------------------------------------------------------------------------- /project/tests/in_progress/for_main/good/types/complex_types/struct/struct04.c: -------------------------------------------------------------------------------- 1 | //clang -Xclang -ast-dump -fsyntax-only main.cpp 2 | #include 3 | struct st{ 4 | int a; 5 | }; 6 | 7 | struct st obj1; 8 | 9 | int main() { 10 | struct st obj2; 11 | obj1.a = 7; 12 | obj2 = obj1; 13 | printf("%d\n", obj2.a); 14 | return 0; 15 | } 16 | -------------------------------------------------------------------------------- /project/tests/in_progress/for_main/good/variables/extvar/executable/extvar01.c: -------------------------------------------------------------------------------- 1 | //clang -Xclang -ast-dump -fsyntax-only main.c 2 | #include 3 | 4 | extern long long c; 5 | 6 | int main() { 7 | c = 5L; 8 | printf("%lld", c); 9 | return 0; 10 | } 11 | 12 | long long c; 13 | -------------------------------------------------------------------------------- /project/tests/in_progress/for_main/good/variables/extvar/executable/extvar02.c: -------------------------------------------------------------------------------- 1 | //clang -Xclang -ast-dump -fsyntax-only main.c 2 | #include 3 | 4 | extern long long c; 5 | 6 | long long c; 7 | 8 | int main() { 9 | c = 15L; 10 | printf("%lld", c); 11 | return 0; 12 | } 13 | -------------------------------------------------------------------------------- /project/tests/in_progress/for_main/good/variables/extvar/executable/extvar03.c: -------------------------------------------------------------------------------- 1 | //clang -Xclang -ast-dump -fsyntax-only main.c 2 | #include 3 | 4 | extern long long c; 5 | 6 | int main() { 7 | c = 25L; 8 | printf("%lld", c); 9 | return 0; 10 | } 11 | 12 | long long c; 13 | 14 | void f() { 15 | c = 10L; 16 | printf("%lld", c); 17 | } 18 | -------------------------------------------------------------------------------- /project/tests/in_progress/pr26425/pr26425.c: -------------------------------------------------------------------------------- 1 | struct keyring_list { 2 | struct key *keys[0]; 3 | }; 4 | void keyring_destroy(struct keyring_list *keyring, unsigned short a) 5 | { 6 | int loop; 7 | for (loop = a - 1; loop >= 0; loop--) 8 | key_put(keyring->keys[loop]); 9 | } 10 | -------------------------------------------------------------------------------- /project/tests/in_progress/pr26425/run/pr26425_02/pr26425.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | struct key {int t;}; 4 | 5 | struct keyring_list { 6 | struct key *keys[3]; 7 | }; 8 | 9 | unsigned short x = 2; 10 | struct key k; 11 | struct keyring_list krl; 12 | int arr[3]; 13 | 14 | int main() { 15 | krl.keys[0] = &k; 16 | k.t = 5; 17 | printf("key_put: t = %d\n", krl.keys[0]->t); 18 | 19 | return 0; 20 | } 21 | -------------------------------------------------------------------------------- /project/tests/in_progress/test-suite-to-compile/goto/00010/00010.c: -------------------------------------------------------------------------------- 1 | int 2 | test() 3 | { 4 | start: 5 | goto next; 6 | return 1; 7 | success: 8 | return 0; 9 | next: 10 | foo: 11 | goto success; 12 | return 1; 13 | } 14 | 15 | #include 16 | int main() 17 | { 18 | int x = test(); 19 | printf("%d\n", x); 20 | return x; 21 | } 22 | -------------------------------------------------------------------------------- /project/tests/in_progress/test-suite-to-compile/str_lib/00180/00180.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int test() 5 | { 6 | char a[10]; 7 | strcpy(a, "abcdef"); 8 | printf("%s\n", &a[1]); 9 | 10 | return 0; 11 | } 12 | 13 | /* vim: set expandtab ts=4 sw=3 sts=3 tw=80 :*/ 14 | 15 | #include 16 | int main() 17 | { 18 | int x = test(); 19 | printf("%d\n", x); 20 | return x; 21 | } 22 | -------------------------------------------------------------------------------- /project/tests/in_progress/test-suite-to-compile/str_lib/00220/00220.c: -------------------------------------------------------------------------------- 1 | // this file contains BMP chars encoded in UTF-8 2 | #include 3 | #include 4 | 5 | int main() 6 | { 7 | wchar_t s[] = L"hello$$你好¢¢世界€€world"; 8 | wchar_t *p; 9 | for (p = s; *p; p++) printf("%04X ", (unsigned) *p); 10 | printf("\n"); 11 | return 0; 12 | } 13 | -------------------------------------------------------------------------------- /project/tests/in_progress/test_suit_modified/00001/00001.c: -------------------------------------------------------------------------------- 1 | int 2 | test() 3 | { 4 | return 0; 5 | } 6 | 7 | #include 8 | int main() 9 | { 10 | int x = test(); 11 | printf("%d\n", x); 12 | return x; 13 | } 14 | -------------------------------------------------------------------------------- /project/tests/in_progress/test_suit_modified/00002/00002.c: -------------------------------------------------------------------------------- 1 | int 2 | test() 3 | { 4 | return 3-3; 5 | } 6 | 7 | #include 8 | int main() 9 | { 10 | int x = test(); 11 | printf("%d\n", x); 12 | return x; 13 | } 14 | -------------------------------------------------------------------------------- /project/tests/in_progress/test_suit_modified/00003/00003.c: -------------------------------------------------------------------------------- 1 | int 2 | test() 3 | { 4 | int x; 5 | 6 | x = 4; 7 | return x - 4; 8 | } 9 | 10 | #include 11 | int main() 12 | { 13 | int x = test(); 14 | printf("%d\n", x); 15 | return x; 16 | } 17 | -------------------------------------------------------------------------------- /project/tests/in_progress/test_suit_modified/00004/00004.c: -------------------------------------------------------------------------------- 1 | int 2 | test() 3 | { 4 | int x; 5 | int *p; 6 | 7 | x = 4; 8 | p = &x; 9 | *p = 0; 10 | 11 | return *p; 12 | } 13 | 14 | #include 15 | int main() 16 | { 17 | int x = test(); 18 | printf("%d\n", x); 19 | return x; 20 | } 21 | -------------------------------------------------------------------------------- /project/tests/in_progress/test_suit_modified/00005/00005.c: -------------------------------------------------------------------------------- 1 | int 2 | test() 3 | { 4 | int x; 5 | int *p; 6 | int **pp; 7 | 8 | x = 0; 9 | p = &x; 10 | pp = &p; 11 | 12 | if(*p) 13 | return 1; 14 | if(**pp) 15 | return 1; 16 | else 17 | **pp = 1; 18 | 19 | if(x) 20 | return 0; 21 | else 22 | return 1; 23 | } 24 | 25 | #include 26 | int main() 27 | { 28 | int x = test(); 29 | printf("%d\n", x); 30 | return x; 31 | } 32 | -------------------------------------------------------------------------------- /project/tests/in_progress/test_suit_modified/00006/00006.c: -------------------------------------------------------------------------------- 1 | int 2 | test() 3 | { 4 | int x; 5 | 6 | x = 50; 7 | while (x) 8 | x = x - 1; 9 | return x; 10 | } 11 | 12 | #include 13 | int main() 14 | { 15 | int x = test(); 16 | printf("%d\n", x); 17 | return x; 18 | } 19 | -------------------------------------------------------------------------------- /project/tests/in_progress/test_suit_modified/00007/00007.c: -------------------------------------------------------------------------------- 1 | int 2 | test() 3 | { 4 | int x; 5 | 6 | x = 1; 7 | for(x = 10; x; x = x - 1) 8 | ; 9 | if(x) 10 | return 1; 11 | x = 10; 12 | for (;x;) 13 | x = x - 1; 14 | return x; 15 | } 16 | 17 | #include 18 | int main() 19 | { 20 | int x = test(); 21 | printf("%d\n", x); 22 | return x; 23 | } 24 | -------------------------------------------------------------------------------- /project/tests/in_progress/test_suit_modified/00008/00008.c: -------------------------------------------------------------------------------- 1 | int 2 | test() 3 | { 4 | int x; 5 | 6 | x = 50; 7 | do 8 | x = x - 1; 9 | while(x); 10 | return x; 11 | } 12 | 13 | #include 14 | int main() 15 | { 16 | int x = test(); 17 | printf("%d\n", x); 18 | return x; 19 | } 20 | -------------------------------------------------------------------------------- /project/tests/in_progress/test_suit_modified/00009/00009.c: -------------------------------------------------------------------------------- 1 | int 2 | test() 3 | { 4 | int x; 5 | 6 | x = 1; 7 | x = x * 10; 8 | x = x / 2; 9 | x = x % 3; 10 | return x - 2; 11 | } 12 | 13 | #include 14 | int main() 15 | { 16 | int x = test(); 17 | printf("%d\n", x); 18 | return x; 19 | } 20 | -------------------------------------------------------------------------------- /project/tests/in_progress/test_suit_modified/00011/00011.c: -------------------------------------------------------------------------------- 1 | int 2 | test() 3 | { 4 | int x; 5 | int y; 6 | x = y = 0; 7 | return x; 8 | } 9 | 10 | #include 11 | int main() 12 | { 13 | int x = test(); 14 | printf("%d\n", x); 15 | return x; 16 | } 17 | -------------------------------------------------------------------------------- /project/tests/in_progress/test_suit_modified/00012/00012.c: -------------------------------------------------------------------------------- 1 | int 2 | test() 3 | { 4 | return (2 + 2) * 2 - 8; 5 | } 6 | 7 | #include 8 | int main() 9 | { 10 | int x = test(); 11 | printf("%d\n", x); 12 | return x; 13 | } 14 | -------------------------------------------------------------------------------- /project/tests/in_progress/test_suit_modified/00013/00013.c: -------------------------------------------------------------------------------- 1 | int 2 | main() 3 | { 4 | int x; 5 | int *p; 6 | 7 | x = 0; 8 | p = &x; 9 | return p[0]; 10 | } -------------------------------------------------------------------------------- /project/tests/in_progress/test_suit_modified/00014/00014.c: -------------------------------------------------------------------------------- 1 | int 2 | test() 3 | { 4 | int x; 5 | int *p; 6 | 7 | x = 1; 8 | p = &x; 9 | p[0] = 0; 10 | return x; 11 | } 12 | 13 | #include 14 | int main() 15 | { 16 | int x = test(); 17 | printf("%d\n", x); 18 | return x; 19 | } 20 | -------------------------------------------------------------------------------- /project/tests/in_progress/test_suit_modified/00015/00015.c: -------------------------------------------------------------------------------- 1 | int 2 | test() 3 | { 4 | int arr[2]; 5 | 6 | arr[0] = 1; 7 | arr[1] = 2; 8 | 9 | return arr[0] + arr[1] - 3; 10 | } 11 | 12 | #include 13 | int main() 14 | { 15 | int x = test(); 16 | printf("%d\n", x); 17 | return x; 18 | } 19 | -------------------------------------------------------------------------------- /project/tests/in_progress/test_suit_modified/00016/00016.c: -------------------------------------------------------------------------------- 1 | int 2 | test() 3 | { 4 | int arr[2]; 5 | int *p; 6 | 7 | p = &arr[1]; 8 | *p = 0; 9 | return arr[1]; 10 | } 11 | 12 | #include 13 | int main() 14 | { 15 | int x = test(); 16 | printf("%d\n", x); 17 | return x; 18 | } 19 | -------------------------------------------------------------------------------- /project/tests/in_progress/test_suit_modified/00017/00017.c: -------------------------------------------------------------------------------- 1 | int 2 | test() 3 | { 4 | struct { int x; int y; } s; 5 | 6 | s.x = 3; 7 | s.y = 5; 8 | return s.y - s.x - 2; 9 | } 10 | 11 | #include 12 | int main() 13 | { 14 | int x = test(); 15 | printf("%d\n", x); 16 | return x; 17 | } 18 | -------------------------------------------------------------------------------- /project/tests/in_progress/test_suit_modified/00018/00018.c: -------------------------------------------------------------------------------- 1 | int 2 | test() 3 | { 4 | 5 | struct S { int x; int y; } s; 6 | struct S *p; 7 | 8 | p = &s; 9 | s.x = 1; 10 | p->y = 2; 11 | return p->y + p->x - 3; 12 | } 13 | 14 | 15 | #include 16 | int main() 17 | { 18 | int x = test(); 19 | printf("%d\n", x); 20 | return x; 21 | } 22 | -------------------------------------------------------------------------------- /project/tests/in_progress/test_suit_modified/00019/00019.c: -------------------------------------------------------------------------------- 1 | int 2 | test() 3 | { 4 | struct S { struct S *p; int x; } s; 5 | 6 | s.x = 0; 7 | s.p = &s; 8 | return s.p->p->p->p->p->x; 9 | } 10 | 11 | 12 | #include 13 | int main() 14 | { 15 | int x = test(); 16 | printf("%d\n", x); 17 | return x; 18 | } 19 | -------------------------------------------------------------------------------- /project/tests/in_progress/test_suit_modified/00020/00020.c: -------------------------------------------------------------------------------- 1 | int 2 | test() 3 | { 4 | int x, *p, **pp; 5 | 6 | x = 0; 7 | p = &x; 8 | pp = &p; 9 | return **pp; 10 | } 11 | 12 | #include 13 | int main() 14 | { 15 | int x = test(); 16 | printf("%d\n", x); 17 | return x; 18 | } 19 | -------------------------------------------------------------------------------- /project/tests/in_progress/test_suit_modified/00021/00021.c: -------------------------------------------------------------------------------- 1 | int 2 | foo(int a, int b) 3 | { 4 | return 2 + a - b; 5 | } 6 | 7 | int 8 | test() 9 | { 10 | return foo(1, 3); 11 | } 12 | 13 | 14 | #include 15 | int main() 16 | { 17 | int x = test(); 18 | printf("%d\n", x); 19 | return x; 20 | } 21 | -------------------------------------------------------------------------------- /project/tests/in_progress/test_suit_modified/00022/00022.c: -------------------------------------------------------------------------------- 1 | typedef int x; 2 | 3 | int 4 | test() 5 | { 6 | x v; 7 | v = 0; 8 | return v; 9 | } 10 | 11 | #include 12 | int main() 13 | { 14 | int x = test(); 15 | printf("%d\n", x); 16 | return x; 17 | } 18 | -------------------------------------------------------------------------------- /project/tests/in_progress/test_suit_modified/00023/00023.c: -------------------------------------------------------------------------------- 1 | int x; 2 | 3 | int 4 | test() 5 | { 6 | x = 0; 7 | return x; 8 | } 9 | 10 | 11 | #include 12 | int main() 13 | { 14 | int x = test(); 15 | printf("%d\n", x); 16 | return x; 17 | } 18 | -------------------------------------------------------------------------------- /project/tests/in_progress/test_suit_modified/00024/00024.c: -------------------------------------------------------------------------------- 1 | typedef struct { int x; int y; } s; 2 | 3 | s v; 4 | 5 | int 6 | test() 7 | { 8 | v.x = 1; 9 | v.y = 2; 10 | return 3 - v.x - v.y; 11 | } 12 | 13 | 14 | #include 15 | int main() 16 | { 17 | int x = test(); 18 | printf("%d\n", x); 19 | return x; 20 | } 21 | -------------------------------------------------------------------------------- /project/tests/in_progress/test_suit_modified/00026/00026.c: -------------------------------------------------------------------------------- 1 | int 2 | test() 3 | { 4 | char *p; 5 | 6 | p = "hello"; 7 | return p[0] - 104; 8 | } 9 | 10 | 11 | #include 12 | int main() 13 | { 14 | int x = test(); 15 | printf("%d\n", x); 16 | return x; 17 | } 18 | -------------------------------------------------------------------------------- /project/tests/in_progress/test_suit_modified/00027/00027.c: -------------------------------------------------------------------------------- 1 | int 2 | test() 3 | { 4 | int x; 5 | 6 | x = 1; 7 | x = x | 4; 8 | return x - 5; 9 | } 10 | 11 | 12 | #include 13 | int main() 14 | { 15 | int x = test(); 16 | printf("%d\n", x); 17 | return x; 18 | } 19 | -------------------------------------------------------------------------------- /project/tests/in_progress/test_suit_modified/00028/00028.c: -------------------------------------------------------------------------------- 1 | int 2 | test() 3 | { 4 | int x; 5 | 6 | x = 1; 7 | x = x & 3; 8 | return x - 1; 9 | } 10 | 11 | 12 | #include 13 | int main() 14 | { 15 | int x = test(); 16 | printf("%d\n", x); 17 | return x; 18 | } 19 | -------------------------------------------------------------------------------- /project/tests/in_progress/test_suit_modified/00029/00029.c: -------------------------------------------------------------------------------- 1 | int 2 | test() 3 | { 4 | int x; 5 | 6 | x = 1; 7 | x = x ^ 3; 8 | return x - 2; 9 | } 10 | 11 | 12 | #include 13 | int main() 14 | { 15 | int x = test(); 16 | printf("%d\n", x); 17 | return x; 18 | } 19 | -------------------------------------------------------------------------------- /project/tests/in_progress/test_suit_modified/00035/00035.c: -------------------------------------------------------------------------------- 1 | int 2 | test() 3 | { 4 | int x; 5 | 6 | x = 4; 7 | if(!x != 0) 8 | return 1; 9 | if(!!x != 1) 10 | return 1; 11 | if(-x != 0 - 4) 12 | return 1; 13 | return 0; 14 | } 15 | 16 | 17 | #include 18 | int main() 19 | { 20 | int x = test(); 21 | printf("%d\n", x); 22 | return x; 23 | } 24 | -------------------------------------------------------------------------------- /project/tests/in_progress/test_suit_modified/00036/00036.c: -------------------------------------------------------------------------------- 1 | int 2 | test() 3 | { 4 | int x; 5 | 6 | x = 0; 7 | x += 2; 8 | x += 2; 9 | if (x != 4) 10 | return 1; 11 | x -= 1; 12 | if (x != 3) 13 | return 2; 14 | x *= 2; 15 | if (x != 6) 16 | return 3; 17 | 18 | return 0; 19 | } 20 | 21 | #include 22 | int main() 23 | { 24 | int x = test(); 25 | printf("%d\n", x); 26 | return x; 27 | } 28 | -------------------------------------------------------------------------------- /project/tests/in_progress/test_suit_modified/00037/00037.c: -------------------------------------------------------------------------------- 1 | int 2 | test() 3 | { 4 | int x[2]; 5 | int *p; 6 | 7 | x[1] = 7; 8 | p = &x[0]; 9 | p = p + 1; 10 | 11 | if(*p != 7) 12 | return 1; 13 | if(&x[1] - &x[0] != 1) 14 | return 1; 15 | 16 | return 0; 17 | } 18 | 19 | #include 20 | int main() 21 | { 22 | int x = test(); 23 | printf("%d\n", x); 24 | return x; 25 | } 26 | -------------------------------------------------------------------------------- /project/tests/in_progress/test_suit_modified/00039/00039.c: -------------------------------------------------------------------------------- 1 | int 2 | test() 3 | { 4 | void *p; 5 | int x; 6 | 7 | x = 2; 8 | p = &x; 9 | 10 | if(*((int*)p) != 2) 11 | return 1; 12 | return 0; 13 | } 14 | 15 | #include 16 | int main() 17 | { 18 | int x = test(); 19 | printf("%d\n", x); 20 | return x; 21 | } 22 | -------------------------------------------------------------------------------- /project/tests/in_progress/test_suit_modified/00042/00042.c: -------------------------------------------------------------------------------- 1 | int 2 | test() 3 | { 4 | union { int a; int b; } u; 5 | u.a = 1; 6 | u.b = 3; 7 | 8 | if (u.a != 3 || u.b != 3) 9 | return 1; 10 | return 0; 11 | } 12 | 13 | #include 14 | int main() 15 | { 16 | int x = test(); 17 | printf("%d\n", x); 18 | return x; 19 | } 20 | -------------------------------------------------------------------------------- /project/tests/in_progress/test_suit_modified/00044/00044.c: -------------------------------------------------------------------------------- 1 | struct T; 2 | 3 | struct T { 4 | int x; 5 | }; 6 | 7 | int 8 | test() 9 | { 10 | struct T v; 11 | { struct T { int z; }; } 12 | v.x = 2; 13 | if(v.x != 2) 14 | return 1; 15 | return 0; 16 | } 17 | 18 | #include 19 | int main() 20 | { 21 | int x = test(); 22 | printf("%d\n", x); 23 | return x; 24 | } 25 | -------------------------------------------------------------------------------- /project/tests/in_progress/test_suit_modified/00047/00047.c: -------------------------------------------------------------------------------- 1 | struct { int a; int b; int c; } s = {1, 2, 3}; 2 | 3 | int 4 | test() 5 | { 6 | if (s.a != 1) 7 | return 1; 8 | if (s.b != 2) 9 | return 2; 10 | if (s.c != 3) 11 | return 3; 12 | 13 | return 0; 14 | } 15 | 16 | #include 17 | int main() 18 | { 19 | int x = test(); 20 | printf("%d\n", x); 21 | return x; 22 | } 23 | -------------------------------------------------------------------------------- /project/tests/in_progress/test_suit_modified/00048/00048.c: -------------------------------------------------------------------------------- 1 | struct S {int a; int b;}; 2 | struct S s = { .b = 2, .a = 1}; 3 | 4 | int 5 | test() 6 | { 7 | if(s.a != 1) 8 | return 1; 9 | if(s.b != 2) 10 | return 2; 11 | return 0; 12 | } 13 | 14 | #include 15 | int main() 16 | { 17 | int x = test(); 18 | printf("%d\n", x); 19 | return x; 20 | } 21 | -------------------------------------------------------------------------------- /project/tests/in_progress/test_suit_modified/00049/00049.c: -------------------------------------------------------------------------------- 1 | int x = 10; 2 | 3 | struct S {int a; int *p;}; 4 | struct S s = { .p = &x, .a = 1}; 5 | 6 | int 7 | test() 8 | { 9 | if(s.a != 1) 10 | return 1; 11 | if(*s.p != 10) 12 | return 2; 13 | return 0; 14 | } 15 | 16 | #include 17 | int main() 18 | { 19 | int x = test(); 20 | printf("%d\n", x); 21 | return x; 22 | } 23 | -------------------------------------------------------------------------------- /project/tests/in_progress/test_suit_modified/00052/00052.c: -------------------------------------------------------------------------------- 1 | int 2 | test() 3 | { 4 | struct T { int x; }; 5 | { 6 | struct T s; 7 | s.x = 0; 8 | return s.x; 9 | } 10 | } 11 | 12 | 13 | #include 14 | int main() 15 | { 16 | int x = test(); 17 | printf("%d\n", x); 18 | return x; 19 | } 20 | -------------------------------------------------------------------------------- /project/tests/in_progress/test_suit_modified/00053/00053.c: -------------------------------------------------------------------------------- 1 | int 2 | test() 3 | { 4 | struct T { int x; } s1; 5 | s1.x = 1; 6 | { 7 | struct T { int y; } s2; 8 | s2.y = 1; 9 | if (s1.x - s2.y != 0) 10 | return 1; 11 | } 12 | return 0; 13 | } 14 | 15 | //#include 16 | int main() 17 | { 18 | int x = test(); 19 | // printf("%d\n", x); 20 | return x; 21 | } 22 | -------------------------------------------------------------------------------- /project/tests/in_progress/test_suit_modified/00054/00054.c: -------------------------------------------------------------------------------- 1 | enum E { 2 | x, 3 | y, 4 | z, 5 | }; 6 | 7 | int 8 | test() 9 | { 10 | enum E e; 11 | 12 | if(x != 0) 13 | return 1; 14 | if(y != 1) 15 | return 2; 16 | if(z != 2) 17 | return 3; 18 | 19 | e = x; 20 | return e; 21 | } 22 | 23 | 24 | #include 25 | int main() 26 | { 27 | int x = test(); 28 | printf("%d\n", x); 29 | return x; 30 | } 31 | -------------------------------------------------------------------------------- /project/tests/in_progress/test_suit_modified/00055/00055.c: -------------------------------------------------------------------------------- 1 | enum E { 2 | x, 3 | y = 2, 4 | z, 5 | }; 6 | 7 | int 8 | test() 9 | { 10 | enum E e; 11 | 12 | if(x != 0) 13 | return 1; 14 | if(y != 2) 15 | return 2; 16 | if(z != 3) 17 | return 3; 18 | 19 | e = x; 20 | return e; 21 | } 22 | 23 | 24 | #include 25 | int main() 26 | { 27 | int x = test(); 28 | printf("%d\n", x); 29 | return x; 30 | } 31 | -------------------------------------------------------------------------------- /project/tests/in_progress/test_suit_modified/00059/00059.c: -------------------------------------------------------------------------------- 1 | int 2 | test() 3 | { 4 | if ('a' != 97) 5 | return 1; 6 | 7 | return 0; 8 | } 9 | 10 | #include 11 | int main() 12 | { 13 | int x = test(); 14 | printf("%d\n", x); 15 | return x; 16 | } 17 | -------------------------------------------------------------------------------- /project/tests/in_progress/test_suit_modified/00060/00060.c: -------------------------------------------------------------------------------- 1 | // line comment 2 | 3 | int 4 | test() 5 | { 6 | /* 7 | multiline 8 | comment 9 | */ 10 | return 0; 11 | } 12 | 13 | #include 14 | int main() 15 | { 16 | int x = test(); 17 | printf("%d\n", x); 18 | return x; 19 | } 20 | -------------------------------------------------------------------------------- /project/tests/in_progress/test_suit_modified/00061/00061.c: -------------------------------------------------------------------------------- 1 | #define FOO 0 2 | 3 | int test() 4 | { 5 | return FOO; 6 | } 7 | 8 | 9 | #include 10 | int main() 11 | { 12 | int x = test(); 13 | printf("%d\n", x); 14 | return x; 15 | } 16 | -------------------------------------------------------------------------------- /project/tests/in_progress/test_suit_modified/00062/00062.c: -------------------------------------------------------------------------------- 1 | #ifdef FOO 2 | XXX 3 | #ifdef BAR 4 | XXX 5 | #endif 6 | XXX 7 | #endif 8 | 9 | #define FOO 1 10 | 11 | #ifdef FOO 12 | 13 | #ifdef FOO 14 | int x = 0; 15 | #endif 16 | 17 | int 18 | test() 19 | { 20 | return x; 21 | } 22 | #endif 23 | 24 | 25 | #include 26 | int main() 27 | { 28 | int x = test(); 29 | printf("%d\n", x); 30 | return x; 31 | } 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /project/tests/in_progress/test_suit_modified/00063/00063.c: -------------------------------------------------------------------------------- 1 | #define BAR 0 2 | #ifdef BAR 3 | #ifdef FOO 4 | XXX 5 | #ifdef FOO 6 | XXX 7 | #endif 8 | #else 9 | #define FOO 10 | #ifdef FOO 11 | int x = BAR; 12 | #endif 13 | #endif 14 | #endif 15 | 16 | int 17 | test() 18 | { 19 | return BAR; 20 | } 21 | 22 | #include 23 | int main() 24 | { 25 | int x = test(); 26 | printf("%d\n", x); 27 | return x; 28 | } 29 | -------------------------------------------------------------------------------- /project/tests/in_progress/test_suit_modified/00064/00064.c: -------------------------------------------------------------------------------- 1 | #define X 6 / 2 2 | 3 | int 4 | test() 5 | { 6 | return X - 3; 7 | } 8 | 9 | #include 10 | int main() 11 | { 12 | int x = test(); 13 | printf("%d\n", x); 14 | return x; 15 | } 16 | -------------------------------------------------------------------------------- /project/tests/in_progress/test_suit_modified/00065/00065.c: -------------------------------------------------------------------------------- 1 | #define ADD(X, Y) (X + Y) 2 | 3 | 4 | int 5 | test() 6 | { 7 | return ADD(1, 2) - 3; 8 | } 9 | 10 | #include 11 | int main() 12 | { 13 | int x = test(); 14 | printf("%d\n", x); 15 | return x; 16 | } 17 | -------------------------------------------------------------------------------- /project/tests/in_progress/test_suit_modified/00066/00066.c: -------------------------------------------------------------------------------- 1 | #define A 3 2 | #define FOO(X,Y,Z) X + Y + Z 3 | #define SEMI ; 4 | 5 | int 6 | test() 7 | { 8 | if(FOO(1, 2, A) != 6) 9 | return 1 SEMI 10 | return FOO(0,0,0); 11 | } 12 | 13 | #include 14 | int main() 15 | { 16 | int x = test(); 17 | printf("%d\n", x); 18 | return x; 19 | } 20 | -------------------------------------------------------------------------------- /project/tests/in_progress/test_suit_modified/00067/00067.c: -------------------------------------------------------------------------------- 1 | #if 1 2 | int x = 0; 3 | #endif 4 | 5 | #if 0 6 | int x = 1; 7 | #if 1 8 | X 9 | #endif 10 | #ifndef AAA 11 | X 12 | #endif 13 | #endif 14 | 15 | int test() 16 | { 17 | return x; 18 | } 19 | 20 | #include 21 | int main() 22 | { 23 | int x = test(); 24 | printf("%d\n", x); 25 | return x; 26 | } 27 | -------------------------------------------------------------------------------- /project/tests/in_progress/test_suit_modified/00068/00068.c: -------------------------------------------------------------------------------- 1 | #if 0 2 | X 3 | #elif 1 4 | int x = 0; 5 | #else 6 | X 7 | #endif 8 | 9 | int 10 | test() 11 | { 12 | return x; 13 | } 14 | 15 | #include 16 | int main() 17 | { 18 | int x = test(); 19 | printf("%d\n", x); 20 | return x; 21 | } 22 | -------------------------------------------------------------------------------- /project/tests/in_progress/test_suit_modified/00069/00069.c: -------------------------------------------------------------------------------- 1 | #if 0 2 | X 3 | #elif 0 4 | X 5 | #elif 1 6 | int x = 0; 7 | #endif 8 | 9 | int 10 | test() 11 | { 12 | return x; 13 | } 14 | 15 | #include 16 | int main() 17 | { 18 | int x = test(); 19 | printf("%d\n", x); 20 | return x; 21 | } 22 | -------------------------------------------------------------------------------- /project/tests/in_progress/test_suit_modified/00070/00070.c: -------------------------------------------------------------------------------- 1 | #ifndef DEF 2 | int x = 0; 3 | #endif 4 | 5 | #define DEF 6 | 7 | #ifndef DEF 8 | X 9 | #endif 10 | 11 | int 12 | test() 13 | { 14 | return x; 15 | } 16 | 17 | #include 18 | int main() 19 | { 20 | int x = test(); 21 | printf("%d\n", x); 22 | return x; 23 | } 24 | -------------------------------------------------------------------------------- /project/tests/in_progress/test_suit_modified/00071/00071.c: -------------------------------------------------------------------------------- 1 | #define X 1 2 | #undef X 3 | 4 | #ifdef X 5 | FAIL 6 | #endif 7 | 8 | int 9 | test() 10 | { 11 | return 0; 12 | } 13 | 14 | #include 15 | int main() 16 | { 17 | int x = test(); 18 | printf("%d\n", x); 19 | return x; 20 | } 21 | -------------------------------------------------------------------------------- /project/tests/in_progress/test_suit_modified/00072/00072.c: -------------------------------------------------------------------------------- 1 | int 2 | test() 3 | { 4 | int arr[2]; 5 | int *p; 6 | 7 | p = &arr[0]; 8 | p += 1; 9 | *p = 123; 10 | 11 | if(arr[1] != 123) 12 | return 1; 13 | return 0; 14 | } 15 | 16 | #include 17 | int main() 18 | { 19 | int x = test(); 20 | printf("%d\n", x); 21 | return x; 22 | } 23 | -------------------------------------------------------------------------------- /project/tests/in_progress/test_suit_modified/00073/00073.c: -------------------------------------------------------------------------------- 1 | int 2 | test() 3 | { 4 | int arr[2]; 5 | int *p; 6 | 7 | p = &arr[1]; 8 | p -= 1; 9 | *p = 123; 10 | 11 | if(arr[0] != 123) 12 | return 1; 13 | return 0; 14 | } 15 | 16 | #include 17 | int main() 18 | { 19 | int x = test(); 20 | printf("%d\n", x); 21 | return x; 22 | } 23 | -------------------------------------------------------------------------------- /project/tests/in_progress/test_suit_modified/00078/00078.c: -------------------------------------------------------------------------------- 1 | int 2 | f1(char *p) 3 | { 4 | return *p+1; 5 | } 6 | 7 | int 8 | test() 9 | { 10 | char s = 1; 11 | int v[1000]; 12 | int f1(char *); 13 | 14 | if (f1(&s) != 2) 15 | return 1; 16 | return 0; 17 | } 18 | 19 | #include 20 | int main() 21 | { 22 | int x = test(); 23 | printf("%d\n", x); 24 | return x; 25 | } 26 | -------------------------------------------------------------------------------- /project/tests/in_progress/test_suit_modified/00079/00079.c: -------------------------------------------------------------------------------- 1 | #define x(y) ((y) + 1) 2 | 3 | int 4 | test() 5 | { 6 | int x; 7 | int y; 8 | 9 | y = 0; 10 | x = x(y); 11 | 12 | if(x != 1) 13 | return 1; 14 | 15 | return 0; 16 | } 17 | 18 | 19 | #include 20 | int main() 21 | { 22 | int x = test(); 23 | printf("%d\n", x); 24 | return x; 25 | } 26 | -------------------------------------------------------------------------------- /project/tests/in_progress/test_suit_modified/00080/00080.c: -------------------------------------------------------------------------------- 1 | void 2 | voidfn() 3 | { 4 | return; 5 | } 6 | 7 | int 8 | test() 9 | { 10 | voidfn(); 11 | return 0; 12 | } 13 | 14 | #include 15 | int main() 16 | { 17 | int x = test(); 18 | printf("%d\n", x); 19 | return x; 20 | } 21 | -------------------------------------------------------------------------------- /project/tests/in_progress/test_suit_modified/00081/00081.c: -------------------------------------------------------------------------------- 1 | int 2 | test() 3 | { 4 | long long x; 5 | 6 | x = 0; 7 | x = x + 1; 8 | if (x != 1) 9 | return 1; 10 | return 0; 11 | } 12 | 13 | #include 14 | int main() 15 | { 16 | int x = test(); 17 | printf("%d\n", x); 18 | return x; 19 | } 20 | -------------------------------------------------------------------------------- /project/tests/in_progress/test_suit_modified/00086/00086.c: -------------------------------------------------------------------------------- 1 | int 2 | test() 3 | { 4 | short x; 5 | 6 | x = 0; 7 | x = x + 1; 8 | if (x != 1) 9 | return 1; 10 | return 0; 11 | } 12 | 13 | #include 14 | int main() 15 | { 16 | int x = test(); 17 | printf("%d\n", x); 18 | return x; 19 | } 20 | -------------------------------------------------------------------------------- /project/tests/in_progress/test_suit_modified/00088/00088.c: -------------------------------------------------------------------------------- 1 | int (*fptr)() = 0; 2 | 3 | 4 | int 5 | test() 6 | { 7 | if (fptr) 8 | return 1; 9 | return 0; 10 | } 11 | 12 | 13 | #include 14 | int main() 15 | { 16 | int x = test(); 17 | printf("%d\n", x); 18 | return x; 19 | } 20 | -------------------------------------------------------------------------------- /project/tests/in_progress/test_suit_modified/00090/00090.c: -------------------------------------------------------------------------------- 1 | int a[3] = {0, 1, 2}; 2 | 3 | int 4 | test() 5 | { 6 | if (a[0] != 0) 7 | return 1; 8 | if (a[1] != 1) 9 | return 2; 10 | if (a[2] != 2) 11 | return 3; 12 | 13 | return 0; 14 | } 15 | 16 | #include 17 | int main() 18 | { 19 | int x = test(); 20 | printf("%d\n", x); 21 | return x; 22 | } 23 | -------------------------------------------------------------------------------- /project/tests/in_progress/test_suit_modified/00091/00091.c: -------------------------------------------------------------------------------- 1 | typedef struct { 2 | int v; 3 | int sub[2]; 4 | } S; 5 | 6 | S a[1] = {{1, {2, 3}}}; 7 | 8 | int 9 | test() 10 | { 11 | if (a[0].v != 1) 12 | return 1; 13 | if (a[0].sub[0] != 2) 14 | return 2; 15 | if (a[0].sub[1] != 3) 16 | return 3; 17 | 18 | return 0; 19 | } 20 | 21 | #include 22 | int main() 23 | { 24 | int x = test(); 25 | printf("%d\n", x); 26 | return x; 27 | } 28 | -------------------------------------------------------------------------------- /project/tests/in_progress/test_suit_modified/00094/00094.c: -------------------------------------------------------------------------------- 1 | extern int x; 2 | 3 | int test() 4 | { 5 | return 0; 6 | } 7 | 8 | #include 9 | int main() 10 | { 11 | int x = test(); 12 | printf("%d\n", x); 13 | return x; 14 | } 15 | -------------------------------------------------------------------------------- /project/tests/in_progress/test_suit_modified/00097/00097.c: -------------------------------------------------------------------------------- 1 | #define NULL ((void*)0) 2 | #define NULL ((void*)0) 3 | 4 | #define FOO(X, Y) (X + Y + Z) 5 | #define FOO(X, Y) (X + Y + Z) 6 | 7 | #define BAR(X, Y, ...) (X + Y + Z) 8 | #define BAR(X, Y, ...) (X + Y + Z) 9 | 10 | int 11 | test() 12 | { 13 | return 0; 14 | } 15 | 16 | #include 17 | int main() 18 | { 19 | int x = test(); 20 | printf("%d\n", x); 21 | return x; 22 | } 23 | -------------------------------------------------------------------------------- /project/tests/in_progress/test_suit_modified/00098/00098.c: -------------------------------------------------------------------------------- 1 | int 2 | test() 3 | { 4 | return L'\0'; 5 | } 6 | 7 | #include 8 | int main() 9 | { 10 | int x = test(); 11 | printf("%d\n", x); 12 | return x; 13 | } 14 | -------------------------------------------------------------------------------- /project/tests/in_progress/test_suit_modified/00099/00099.c: -------------------------------------------------------------------------------- 1 | 2 | typedef struct { int n; } Vec; 3 | 4 | static void 5 | vecresize(Vec *v, int cap) 6 | { 7 | return; 8 | } 9 | 10 | int test() 11 | { 12 | return 0; 13 | } 14 | 15 | #include 16 | int main() 17 | { 18 | int x = test(); 19 | printf("%d\n", x); 20 | return x; 21 | } 22 | -------------------------------------------------------------------------------- /project/tests/in_progress/test_suit_modified/00100/00100.c: -------------------------------------------------------------------------------- 1 | int 2 | foo(void) 3 | { 4 | return 0; 5 | } 6 | 7 | int 8 | test() 9 | { 10 | return foo(); 11 | } 12 | 13 | #include 14 | int main() 15 | { 16 | int x = test(); 17 | printf("%d\n", x); 18 | return x; 19 | } 20 | -------------------------------------------------------------------------------- /project/tests/in_progress/test_suit_modified/00101/00101.c: -------------------------------------------------------------------------------- 1 | int 2 | test() 3 | { 4 | int c; 5 | c = 0; 6 | do 7 | ; 8 | while (0); 9 | return c; 10 | } 11 | 12 | #include 13 | int main() 14 | { 15 | int x = test(); 16 | printf("%d\n", x); 17 | return x; 18 | } 19 | -------------------------------------------------------------------------------- /project/tests/in_progress/test_suit_modified/00102/00102.c: -------------------------------------------------------------------------------- 1 | int 2 | test() 3 | { 4 | int x; 5 | 6 | x = 1; 7 | if ((x << 1) != 2) 8 | return 1; 9 | 10 | return 0; 11 | } 12 | 13 | #include 14 | int main() 15 | { 16 | int x = test(); 17 | printf("%d\n", x); 18 | return x; 19 | } 20 | -------------------------------------------------------------------------------- /project/tests/in_progress/test_suit_modified/00103/00103.c: -------------------------------------------------------------------------------- 1 | int 2 | test() 3 | { 4 | int x; 5 | void *foo; 6 | void **bar; 7 | 8 | x = 0; 9 | 10 | foo = (void*)&x; 11 | bar = &foo; 12 | 13 | return **(int**)bar; 14 | } 15 | 16 | #include 17 | int main() 18 | { 19 | int x = test(); 20 | printf("%d\n", x); 21 | return x; 22 | } 23 | -------------------------------------------------------------------------------- /project/tests/in_progress/test_suit_modified/00105/00105.c: -------------------------------------------------------------------------------- 1 | int 2 | test() 3 | { 4 | int i; 5 | 6 | for(i = 0; i < 10; i++) 7 | if (!i) 8 | continue; 9 | 10 | return 0; 11 | } 12 | 13 | #include 14 | int main() 15 | { 16 | int x = test(); 17 | printf("%d\n", x); 18 | return x; 19 | } 20 | -------------------------------------------------------------------------------- /project/tests/in_progress/test_suit_modified/00106/00106.c: -------------------------------------------------------------------------------- 1 | struct S1 { int x; }; 2 | struct S2 { struct S1 s1; }; 3 | 4 | int 5 | test() 6 | { 7 | struct S2 s2; 8 | s2.s1.x = 1; 9 | return 0; 10 | } 11 | 12 | #include 13 | int main() 14 | { 15 | int x = test(); 16 | printf("%d\n", x); 17 | return x; 18 | } 19 | -------------------------------------------------------------------------------- /project/tests/in_progress/test_suit_modified/00107/00107.c: -------------------------------------------------------------------------------- 1 | typedef int myint; 2 | myint x = (myint)1; 3 | 4 | int 5 | test(void) 6 | { 7 | return x-1; 8 | } 9 | 10 | #include 11 | int main() 12 | { 13 | int x = test(); 14 | printf("%d\n", x); 15 | return x; 16 | } 17 | -------------------------------------------------------------------------------- /project/tests/in_progress/test_suit_modified/00108/00108.c: -------------------------------------------------------------------------------- 1 | int foo(void); 2 | int foo(void); 3 | #define FOO 0 4 | 5 | int 6 | test() 7 | { 8 | return FOO; 9 | } 10 | 11 | #include 12 | int main() 13 | { 14 | int x = test(); 15 | printf("%d\n", x); 16 | return x; 17 | } 18 | -------------------------------------------------------------------------------- /project/tests/in_progress/test_suit_modified/00110/00110.c: -------------------------------------------------------------------------------- 1 | extern int x; 2 | int x; 3 | 4 | int 5 | test() 6 | { 7 | return x; 8 | } 9 | 10 | #include 11 | int main() 12 | { 13 | int x = test(); 14 | printf("%d\n", x); 15 | return x; 16 | } 17 | -------------------------------------------------------------------------------- /project/tests/in_progress/test_suit_modified/00111/00111.c: -------------------------------------------------------------------------------- 1 | int 2 | test() 3 | { 4 | short s = 1; 5 | long l = 1; 6 | 7 | s -= l; 8 | return s; 9 | } 10 | 11 | #include 12 | int main() 13 | { 14 | int x = test(); 15 | printf("%d\n", x); 16 | return x; 17 | } 18 | -------------------------------------------------------------------------------- /project/tests/in_progress/test_suit_modified/00112/00112.c: -------------------------------------------------------------------------------- 1 | int 2 | test() 3 | { 4 | return "abc" == (void *)0; 5 | } 6 | 7 | #include 8 | int main() 9 | { 10 | int x = test(); 11 | printf("%d\n", x); 12 | return x; 13 | } 14 | -------------------------------------------------------------------------------- /project/tests/in_progress/test_suit_modified/00114/00114.c: -------------------------------------------------------------------------------- 1 | int main(void); 2 | 3 | int 4 | test() 5 | { 6 | return 0; 7 | } 8 | 9 | #include 10 | int main() 11 | { 12 | int x = test(); 13 | printf("%d\n", x); 14 | return x; 15 | } 16 | -------------------------------------------------------------------------------- /project/tests/in_progress/test_suit_modified/00115/00115.c: -------------------------------------------------------------------------------- 1 | #define B "b" 2 | 3 | char s[] = "a" B "c"; 4 | 5 | int 6 | test() 7 | { 8 | if (s[0] != 'a') 9 | return 1; 10 | if (s[1] != 'b') 11 | return 2; 12 | if (s[2] != 'c') 13 | return 3; 14 | if (s[3] != '\0') 15 | return 4; 16 | return 0; 17 | } 18 | 19 | #include 20 | int main() 21 | { 22 | int x = test(); 23 | printf("%d\n", x); 24 | return x; 25 | } 26 | -------------------------------------------------------------------------------- /project/tests/in_progress/test_suit_modified/00116/00116.c: -------------------------------------------------------------------------------- 1 | int 2 | f(int f) 3 | { 4 | return f; 5 | } 6 | 7 | int 8 | test() 9 | { 10 | return f(0); 11 | } 12 | 13 | #include 14 | int main() 15 | { 16 | int x = test(); 17 | printf("%d\n", x); 18 | return x; 19 | } 20 | -------------------------------------------------------------------------------- /project/tests/in_progress/test_suit_modified/00117/00117.c: -------------------------------------------------------------------------------- 1 | int test() 2 | { 3 | int x[] = { 1, 0 }; 4 | return x[1]; 5 | } 6 | 7 | #include 8 | int main() 9 | { 10 | int x = test(); 11 | printf("%d\n", x); 12 | return x; 13 | } 14 | -------------------------------------------------------------------------------- /project/tests/in_progress/test_suit_modified/00118/00118.c: -------------------------------------------------------------------------------- 1 | int 2 | test() 3 | { 4 | struct { int x; } s = { 0 }; 5 | return s.x; 6 | } 7 | 8 | #include 9 | int main() 10 | { 11 | int x = test(); 12 | printf("%d\n", x); 13 | return x; 14 | } 15 | -------------------------------------------------------------------------------- /project/tests/in_progress/test_suit_modified/00119/00119.c: -------------------------------------------------------------------------------- 1 | double x = 100; 2 | 3 | int 4 | test() 5 | { 6 | return x < 1; 7 | } 8 | 9 | #include 10 | int main() 11 | { 12 | int x = test(); 13 | printf("%d\n", x); 14 | return x; 15 | } 16 | -------------------------------------------------------------------------------- /project/tests/in_progress/test_suit_modified/00120/00120.c: -------------------------------------------------------------------------------- 1 | struct { 2 | enum { X } x; 3 | } s; 4 | 5 | 6 | int 7 | test() 8 | { 9 | return X; 10 | } 11 | 12 | #include 13 | int main() 14 | { 15 | int x = test(); 16 | printf("%d\n", x); 17 | return x; 18 | } 19 | -------------------------------------------------------------------------------- /project/tests/in_progress/test_suit_modified/00121/00121.c: -------------------------------------------------------------------------------- 1 | int f(int a), g(int a), a; 2 | 3 | int 4 | test() 5 | { 6 | return f(1) - g(1); 7 | } 8 | 9 | int 10 | f(int a) 11 | { 12 | return a; 13 | } 14 | 15 | int 16 | g(int a) 17 | { 18 | return a; 19 | } 20 | 21 | #include 22 | int main() 23 | { 24 | int x = test(); 25 | printf("%d\n", x); 26 | return x; 27 | } 28 | -------------------------------------------------------------------------------- /project/tests/in_progress/test_suit_modified/00122/00122.c: -------------------------------------------------------------------------------- 1 | #define F(a, b) a 2 | int 3 | test() 4 | { 5 | return F(, 1) 0; 6 | } 7 | 8 | #include 9 | int main() 10 | { 11 | int x = test(); 12 | printf("%d\n", x); 13 | return x; 14 | } 15 | -------------------------------------------------------------------------------- /project/tests/in_progress/test_suit_modified/00123/00123.c: -------------------------------------------------------------------------------- 1 | double x = 100.0; 2 | 3 | int 4 | test() 5 | { 6 | return x < 1; 7 | } 8 | 9 | #include 10 | int main() 11 | { 12 | int x = test(); 13 | printf("%d\n", x); 14 | return x; 15 | } 16 | -------------------------------------------------------------------------------- /project/tests/in_progress/test_suit_modified/00125/00125.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int 4 | test(void) 5 | { 6 | printf("hello world\n"); 7 | return 0; 8 | } 9 | 10 | #include 11 | int main() 12 | { 13 | int x = test(); 14 | printf("%d\n", x); 15 | return x; 16 | } 17 | -------------------------------------------------------------------------------- /project/tests/in_progress/test_suit_modified/00126/00126.c: -------------------------------------------------------------------------------- 1 | int 2 | test() 3 | { 4 | int x; 5 | 6 | x = 3; 7 | x = !x; 8 | x = !x; 9 | x = ~x; 10 | x = -x; 11 | if(x != 2) 12 | return 1; 13 | return 0; 14 | } 15 | 16 | #include 17 | int main() 18 | { 19 | int x = test(); 20 | printf("%d\n", x); 21 | return x; 22 | } 23 | -------------------------------------------------------------------------------- /project/tests/in_progress/test_suit_modified/00127/00127.c: -------------------------------------------------------------------------------- 1 | int c; 2 | 3 | int 4 | test() 5 | { 6 | if(0) { 7 | return 1; 8 | } else if(0) { 9 | } else { 10 | if(1) { 11 | if(c) 12 | return 1; 13 | else 14 | return 0; 15 | } else { 16 | return 1; 17 | } 18 | } 19 | return 1; 20 | } 21 | 22 | #include 23 | int main() 24 | { 25 | int x = test(); 26 | printf("%d\n", x); 27 | return x; 28 | } 29 | -------------------------------------------------------------------------------- /project/tests/in_progress/test_suit_modified/00141/00141.c: -------------------------------------------------------------------------------- 1 | #define CAT(x,y) x ## y 2 | #define XCAT(x,y) CAT(x,y) 3 | #define FOO foo 4 | #define BAR bar 5 | 6 | int 7 | test(void) 8 | { 9 | int foo, bar, foobar; 10 | 11 | CAT(foo,bar) = foo + bar; 12 | XCAT(FOO,BAR) = foo + bar; 13 | return 0; 14 | } 15 | 16 | #include 17 | int main() 18 | { 19 | int x = test(); 20 | printf("%d\n", x); 21 | return x; 22 | } 23 | -------------------------------------------------------------------------------- /project/tests/in_progress/test_suit_modified/00142/00142.c: -------------------------------------------------------------------------------- 1 | #if defined(FOO) 2 | int a; 3 | #elif !defined(FOO) && defined(BAR) 4 | int b; 5 | #elif !defined(FOO) && !defined(BAR) 6 | int c; 7 | #else 8 | int d; 9 | #endif 10 | 11 | int 12 | test(void) 13 | { 14 | return c; 15 | } 16 | 17 | #include 18 | int main() 19 | { 20 | int x = test(); 21 | printf("%d\n", x); 22 | return x; 23 | } 24 | -------------------------------------------------------------------------------- /project/tests/in_progress/test_suit_modified/00146/00146.c: -------------------------------------------------------------------------------- 1 | struct S { int a; int b; }; 2 | struct S s = {1, 2}; 3 | 4 | int 5 | test() 6 | { 7 | if(s.a != 1) 8 | return 1; 9 | if(s.b != 2) 10 | return 2; 11 | return 0; 12 | } 13 | 14 | #include 15 | int main() 16 | { 17 | int x = test(); 18 | printf("%d\n", x); 19 | return x; 20 | } 21 | -------------------------------------------------------------------------------- /project/tests/in_progress/test_suit_modified/00147/00147.c: -------------------------------------------------------------------------------- 1 | int arr[3] = {[2] = 2, [0] = 0, [1] = 1}; 2 | 3 | int 4 | test() 5 | { 6 | if(arr[0] != 0) 7 | return 1; 8 | if(arr[1] != 1) 9 | return 2; 10 | if(arr[2] != 2) 11 | return 3; 12 | return 0; 13 | } 14 | 15 | #include 16 | int main() 17 | { 18 | int x = test(); 19 | printf("%d\n", x); 20 | return x; 21 | } 22 | -------------------------------------------------------------------------------- /project/tests/in_progress/test_suit_modified/00152/00152.c: -------------------------------------------------------------------------------- 1 | #undef line 2 | #define line 1000 3 | 4 | #line line 5 | #if 1000 != __LINE__ 6 | #error " # line line" not work as expected 7 | #endif 8 | 9 | int 10 | test() 11 | { 12 | return 0; 13 | } 14 | 15 | #include 16 | int main() 17 | { 18 | int x = test(); 19 | printf("%d\n", x); 20 | return x; 21 | } 22 | -------------------------------------------------------------------------------- /project/tests/in_progress/test_suit_modified/00153/00153.c: -------------------------------------------------------------------------------- 1 | #define x f 2 | #define y() f 3 | 4 | typedef struct { int f; } S; 5 | 6 | int 7 | test() 8 | { 9 | S s; 10 | 11 | s.x = 0; 12 | return s.y(); 13 | } 14 | 15 | #include 16 | int main() 17 | { 18 | int x = test(); 19 | printf("%d\n", x); 20 | return x; 21 | } 22 | -------------------------------------------------------------------------------- /project/tests/in_progress/test_suit_modified/00156/00156.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int test() 4 | { 5 | int Count; 6 | 7 | for (Count = 1; Count <= 10; Count++) 8 | { 9 | printf("%d\n", Count); 10 | } 11 | 12 | return 0; 13 | } 14 | 15 | // vim: set expandtab ts=4 sw=3 sts=3 tw=80 : 16 | 17 | #include 18 | int main() 19 | { 20 | int x = test(); 21 | printf("%d\n", x); 22 | return x; 23 | } 24 | -------------------------------------------------------------------------------- /project/tests/in_progress/test_suit_modified/00190/00190.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | void fred(void) 4 | { 5 | int x = 1000; 6 | printf("%d\n", x); 7 | } 8 | 9 | int main() 10 | { 11 | fred(); 12 | 13 | return 0; 14 | } 15 | 16 | /* vim: set expandtab ts=4 sw=3 sts=3 tw=80 :*/ 17 | -------------------------------------------------------------------------------- /project/tests/in_progress/test_suit_modified/00198/00198a.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | typedef enum fred { a, b, c } x; 4 | 5 | int main() 6 | { 7 | printf("a=%d\n", a); 8 | printf("b=%d\n", b); 9 | printf("c=%d\n", c); 10 | 11 | enum fred d; 12 | 13 | return 0; 14 | } 15 | 16 | /* vim: set expandtab ts=4 sw=3 sts=3 tw=80 :*/ 17 | -------------------------------------------------------------------------------- /project/tests/in_progress/test_suit_modified/00198/00198b.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main() 4 | { 5 | enum { e, f, g } h; 6 | 7 | printf("e=%d\n", e); 8 | printf("f=%d\n", f); 9 | printf("g=%d\n", g); 10 | 11 | return 0; 12 | } 13 | 14 | /* vim: set expandtab ts=4 sw=3 sts=3 tw=80 :*/ 15 | -------------------------------------------------------------------------------- /project/tests/in_progress/test_suit_modified/00198/00198c.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main() 4 | { 5 | typedef enum { e, f, g } h; 6 | 7 | printf("e=%d\n", e); 8 | printf("f=%d\n", f); 9 | printf("g=%d\n", g); 10 | 11 | return 0; 12 | } 13 | 14 | /* vim: set expandtab ts=4 sw=3 sts=3 tw=80 :*/ 15 | -------------------------------------------------------------------------------- /project/tests/in_progress/test_suit_modified/00198/00198d.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | enum fred { a, b, c }; 4 | 5 | int main() 6 | { 7 | printf("a=%d\n", a); 8 | printf("b=%d\n", b); 9 | printf("c=%d\n", c); 10 | 11 | enum fred d; 12 | 13 | return 0; 14 | } 15 | 16 | /* vim: set expandtab ts=4 sw=3 sts=3 tw=80 :*/ 17 | -------------------------------------------------------------------------------- /project/tests/in_progress/test_suit_modified/00201/00201.c: -------------------------------------------------------------------------------- 1 | #include // printf() 2 | 3 | #define CAT2(a,b) a##b 4 | #define CAT(a,b) CAT2(a,b) 5 | #define AB(x) CAT(x,y) 6 | 7 | int main(void) 8 | { 9 | int xy = 42; 10 | int t; 11 | t = CAT(A,B)(x); 12 | printf("%d\n", t); 13 | return 0; 14 | } 15 | -------------------------------------------------------------------------------- /project/tests/in_progress/test_suit_modified/00211/00211.c: -------------------------------------------------------------------------------- 1 | extern int printf(const char *format, ...); 2 | 3 | #define ACPI_TYPE_INVALID 0x1E 4 | #define NUM_NS_TYPES ACPI_TYPE_INVALID+1 5 | int array[NUM_NS_TYPES]; 6 | 7 | #define n 0xe 8 | int main() 9 | { 10 | int x; 11 | x = n+1; 12 | printf("%d\n", x); 13 | // printf("n+1 = %d\n", 0xe+1); 14 | } 15 | -------------------------------------------------------------------------------- /project/tests/main/algorithms/factorial/fact01_while_glob_i64_post.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | typedef long long int64; 4 | 5 | int64 n = 10; 6 | 7 | int main() { 8 | int64 f = 1; 9 | while(n > 1) { 10 | f *= n; 11 | n--; 12 | } 13 | printf("%lld\n", f); 14 | 15 | return 0; 16 | } 17 | -------------------------------------------------------------------------------- /project/tests/main/algorithms/factorial/fact03_while_glob_i64.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | typedef long long int64; 4 | 5 | int64 n = 10; 6 | 7 | int main() { 8 | int64 f = 1; 9 | while(n > 1) { 10 | f = f * n; 11 | n = n-1; 12 | } 13 | printf("%lld\n", f); 14 | 15 | return 0; 16 | } 17 | -------------------------------------------------------------------------------- /project/tests/main/algorithms/factorial/fact04_while_glob_i64_cmpd.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | typedef long long int64; 4 | 5 | int64 n = 5; 6 | 7 | int main() { 8 | int64 f = 1; 9 | while(n > 1) { 10 | f = f * n; 11 | n -= 1; 12 | } 13 | printf("%lld\n", f); 14 | 15 | return 0; 16 | } 17 | -------------------------------------------------------------------------------- /project/tests/main/algorithms/factorial/fact06_rec_i64.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | typedef long long int64; 4 | 5 | int64 factorial(int64 n) { 6 | int64 f = 1; 7 | if(n < 2) { 8 | return f; 9 | } 10 | else { 11 | f = n * factorial(n - 1); 12 | return f; 13 | } 14 | } 15 | 16 | int main() { 17 | int64 f; 18 | f = factorial(5); 19 | printf("%lld\n", f); 20 | 21 | return 0; 22 | } 23 | -------------------------------------------------------------------------------- /project/tests/main/algorithms/fibonacci/fibo_rec_local.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | typedef long long i64; 4 | 5 | i64 fibo(i64 p1, i64 p2, i64 n) { 6 | i64 tmp; 7 | if (0 < n) { 8 | tmp = p1; 9 | p1 = p1 + p2; 10 | p2 = tmp; 11 | n--; 12 | return fibo(p1, p2, n); 13 | } else { 14 | return p1; 15 | } 16 | } 17 | 18 | int main() { 19 | i64 r; 20 | r = fibo(0, 1, 10); 21 | printf("%lld\n", r); 22 | return 0; 23 | } 24 | -------------------------------------------------------------------------------- /project/tests/main/algorithms/fibonacci/fibo_rec_local2.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | typedef long long i64; 4 | 5 | i64 fibo(i64 p1, i64 p2, i64 n) { 6 | i64 tmp; 7 | if (0 < n) { 8 | tmp = p1; 9 | p1 = p1 + p2; 10 | p2 = tmp; 11 | n--; 12 | return fibo(p1, p2, n); 13 | } 14 | return p1; 15 | } 16 | 17 | int main() { 18 | i64 r; 19 | r = fibo(0, 1, 10); 20 | printf("%lld\n", r); 21 | return 0; 22 | } 23 | -------------------------------------------------------------------------------- /project/tests/main/algorithms/fibonacci/fibo_rec_ret_int.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | 4 | 5 | int fibo(int p1, int p2, int n) { 6 | int tmp; 7 | if (0 < n) { 8 | tmp = p1; 9 | p1 = p1 + p2; 10 | p2 = tmp; 11 | n--; 12 | return fibo(p1, p2, n); 13 | } else { 14 | return p1; 15 | } 16 | } 17 | 18 | int main() { 19 | int r = fibo(0, 1, 10); 20 | printf("%d\n", r); 21 | return 0; 22 | } 23 | -------------------------------------------------------------------------------- /project/tests/main/algorithms/fibonacci/fibo_rec_ret_int16.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | typedef short int i16; 4 | 5 | i16 fibo(i16 p1, i16 p2, i16 n) { 6 | i16 tmp; 7 | if (0 < n) { 8 | tmp = p1; 9 | p1 = p1 + p2; 10 | p2 = tmp; 11 | n--; 12 | return fibo(p1, p2, n); 13 | } else { 14 | return p1; 15 | } 16 | } 17 | 18 | int main() { 19 | i16 r = fibo(0, 1, 10); 20 | printf("%hd\n", r); 21 | return 0; 22 | } 23 | -------------------------------------------------------------------------------- /project/tests/main/algorithms/swap/swapBC_global/swapBC_global.c: -------------------------------------------------------------------------------- 1 | #include 2 | long long b = 10; 3 | long long c = 30; 4 | 5 | int main() { 6 | b = b + c; 7 | printf("%lld\n", b); 8 | c = b - c; 9 | printf("%lld\n", c); 10 | b = b - c; 11 | printf("%lld\n", b); 12 | return 0; 13 | } 14 | -------------------------------------------------------------------------------- /project/tests/main/algorithms/swap/swapBC_local/swapBC_local.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main() { 4 | long long b = 10; 5 | long long c = 30; 6 | b = b + c; 7 | printf("%lld\n", b); 8 | c = b - c; 9 | printf("%lld\n", c); 10 | b = b - c; 11 | printf("%lld\n", b); 12 | return 0; 13 | } 14 | -------------------------------------------------------------------------------- /project/tests/main/algorithms/swap/swapBC_localA/swapBC_localA.c: -------------------------------------------------------------------------------- 1 | #include 2 | long long b = 10; 3 | long long c = 30; 4 | 5 | int main() { 6 | long long a = 0; 7 | a = b; 8 | b = c; 9 | c = a; 10 | printf("%lld\n", a); 11 | printf("%lld\n", b); 12 | printf("%lld\n", c); 13 | } 14 | -------------------------------------------------------------------------------- /project/tests/main/algorithms/swap/swapBC_staticA/swapBC_staticA.c: -------------------------------------------------------------------------------- 1 | #include 2 | static long long a = 0; 3 | long long b = 10; 4 | long long c = 30; 5 | 6 | int main() { 7 | a = b; 8 | b = c; 9 | c = a; 10 | printf("%d\n", a); 11 | printf("%d\n", b); 12 | printf("%d\n", c); 13 | } 14 | -------------------------------------------------------------------------------- /project/tests/main/algorithms/swap/swapBC_static_localA/swapBC_static_localA.c: -------------------------------------------------------------------------------- 1 | #include 2 | long long b = 10; 3 | long long c = 30; 4 | 5 | int main() { 6 | static long long a = 0; 7 | a = b; 8 | b = c; 9 | c = a; 10 | printf("%lld\n", a); 11 | printf("%lld\n", b); 12 | printf("%lld\n", c); 13 | } 14 | -------------------------------------------------------------------------------- /project/tests/main/array/array02.c: -------------------------------------------------------------------------------- 1 | #include "stdio.h" 2 | long long a[5] = {1, 5}; 3 | int main() { 4 | printf("%d\n", a[0]); 5 | printf("%d\n", a[1]); 6 | return 0; 7 | } 8 | -------------------------------------------------------------------------------- /project/tests/main/array/array03.c: -------------------------------------------------------------------------------- 1 | #include "stdio.h" 2 | long long a[2] = {1, 5}; 3 | int main() { 4 | printf("%d\n", a[0]); 5 | printf("%d\n", a[1]); 6 | return 0; 7 | } 8 | -------------------------------------------------------------------------------- /project/tests/main/array/array04.c: -------------------------------------------------------------------------------- 1 | #include "stdio.h" 2 | long long a[] = {1, 5}; 3 | int main() { 4 | printf("%d\n", a[0]); 5 | printf("%d\n", a[1]); 6 | return 0; 7 | } 8 | -------------------------------------------------------------------------------- /project/tests/main/array/array05.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main(void) { 4 | int tmp; 5 | int arr[10] = {10, 20}; 6 | for (int i = 0; i < 10; ++i) { 7 | tmp = arr[i]; 8 | printf("%d\n", tmp); 9 | } // 10 20 ? 10 | return 0; 11 | } 12 | -------------------------------------------------------------------------------- /project/tests/main/array/array06.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | // int arr[] = {10, 20}; 4 | 5 | int main(void) { 6 | int tmp; 7 | int arr[] = {10, 20}; 8 | for (int i = 0; i < 2; ++i) { 9 | tmp = arr[i]; 10 | printf("%d\n", tmp); 11 | } // 10 20 ? 12 | 13 | return 0; 14 | } 15 | -------------------------------------------------------------------------------- /project/tests/main/array/array09.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int arr[] = {10, 20}; 4 | 5 | int main(void) { 6 | for (int i = 0; i < 2; ++i) { 7 | printf("%d\n", arr[i]); 8 | } // 10 20 ? 9 | // printf("\n"); 10 | 11 | return 0; 12 | } 13 | -------------------------------------------------------------------------------- /project/tests/main/array/long_long/global/long_long_global_array_01.c: -------------------------------------------------------------------------------- 1 | //#include "stdio.h" 2 | 3 | long long a[5]; 4 | int main() { 5 | return 0; 6 | } 7 | -------------------------------------------------------------------------------- /project/tests/main/array/long_long/global/long_long_global_array_02.c: -------------------------------------------------------------------------------- 1 | #include "stdio.h" 2 | 3 | long long a[5]; 4 | int main() { 5 | a[2] = 33; 6 | printf("%d\n", a[2]); 7 | return 0; 8 | } 9 | -------------------------------------------------------------------------------- /project/tests/main/array/long_long/global/long_long_global_array_03.c: -------------------------------------------------------------------------------- 1 | #include "stdio.h" 2 | 3 | long long a[5]; 4 | long long i = 2; 5 | int main() { 6 | a[i] = 33; 7 | printf("%lld\n", a[i]); 8 | return 0; 9 | } 10 | -------------------------------------------------------------------------------- /project/tests/main/array/long_long/global/long_long_global_array_04.c: -------------------------------------------------------------------------------- 1 | #include "stdio.h" 2 | 3 | long long a[5]; 4 | long long i = 2; 5 | long long x = 12; 6 | int main() { 7 | a[i] = x; 8 | printf("%lld\n", a[i]); 9 | return 0; 10 | } 11 | -------------------------------------------------------------------------------- /project/tests/main/array/long_long/global/long_long_global_array_05.c: -------------------------------------------------------------------------------- 1 | #include "stdio.h" 2 | 3 | struct st{ 4 | int a; 5 | long long c; 6 | } st1; 7 | 8 | struct st a[5]; 9 | int main() { 10 | st1.a = 212; 11 | a[2] = st1; 12 | printf("%d\n", a[2].a); 13 | return 0; 14 | } 15 | -------------------------------------------------------------------------------- /project/tests/main/array/long_long/global/long_long_global_array_06.c: -------------------------------------------------------------------------------- 1 | #include "stdio.h" 2 | 3 | struct st{ 4 | double b; 5 | int a; 6 | long long c; 7 | } st1; 8 | 9 | struct st a[5]; 10 | int main() { 11 | st1.a = 15; 12 | st1.b = 2.22; 13 | a[3] = st1; 14 | printf("%d\n", a[3].a); 15 | printf("%f\n", a[3].b); 16 | return 0; 17 | } 18 | -------------------------------------------------------------------------------- /project/tests/main/array/long_long/global/long_long_global_array_07.c: -------------------------------------------------------------------------------- 1 | #include "stdio.h" 2 | 3 | int getPos(int x) { 4 | x *= 2; 5 | return x; 6 | } 7 | 8 | int arr[10]; 9 | int main() { 10 | arr[getPos(3)] = 19; 11 | printf("%d\n", arr[getPos(3)]); 12 | return 0; 13 | } 14 | -------------------------------------------------------------------------------- /project/tests/main/array/long_long/global/long_long_global_array_08.c: -------------------------------------------------------------------------------- 1 | #include "stdio.h" 2 | 3 | int arr[10]; 4 | int main() { 5 | int i = 0; 6 | while (i < 10) { 7 | arr[i] = (i + 1) * 2; 8 | i += 1; 9 | } 10 | i = 0; 11 | while (i < 10) { 12 | printf("%d\n", arr[i]); 13 | i += 1; 14 | } 15 | return 0; 16 | } -------------------------------------------------------------------------------- /project/tests/main/array/long_long/global/long_long_global_array_09.c: -------------------------------------------------------------------------------- 1 | #include "stdio.h" 2 | 3 | int arr[10]; 4 | int main() { 5 | int i = 0; 6 | while (i < 10) { 7 | i[arr] = (i + 1) * 2; 8 | i += 1; 9 | } 10 | i = 0; 11 | while (i < 10) { 12 | printf("%d\n", i[arr]); 13 | i += 1; 14 | } 15 | return 0; 16 | } -------------------------------------------------------------------------------- /project/tests/main/array/long_long/global/long_long_global_array_10.c: -------------------------------------------------------------------------------- 1 | #include "stdio.h" 2 | 3 | long long a[5][7]; 4 | 5 | int main() { 6 | a[1][3] = 10; 7 | a[3][1] = 20; 8 | printf("%lld\n", a[1][3]); 9 | printf("%lld\n", 1[a][3]); 10 | printf("%lld\n", 3[1[a]]); 11 | return 0; 12 | } 13 | -------------------------------------------------------------------------------- /project/tests/main/array/long_long/global/long_long_global_array_11.c: -------------------------------------------------------------------------------- 1 | #include "stdio.h" 2 | 3 | long long a[5][4][3]; 4 | int main() { 5 | a[1][3][2] = 10; 6 | a[3][1][2] = 20; 7 | printf("%lld\n", a[1][3][2]); 8 | printf("%lld\n", a[3][1][2]); 9 | return 0; 10 | } 11 | -------------------------------------------------------------------------------- /project/tests/main/array/long_long/global/long_long_global_array_12.c: -------------------------------------------------------------------------------- 1 | #include "stdio.h" 2 | 3 | long long a[5][7]; 4 | int main() { 5 | a[1][3] = 10; 6 | a[3][1] = 20; 7 | printf("%lld\n", a[1][3]); 8 | printf("%lld\n", a[3][1]); 9 | return 0; 10 | } 11 | -------------------------------------------------------------------------------- /project/tests/main/array/long_long/global/long_long_global_array_14.c: -------------------------------------------------------------------------------- 1 | #include "stdio.h" 2 | union st1{ 3 | long long a[3], b[3], c[3]; 4 | } obj; 5 | 6 | int main() { 7 | obj.b[2] = 7; 8 | printf("%lld\n", obj.b[2]); 9 | return 0; 10 | } -------------------------------------------------------------------------------- /project/tests/main/array/long_long/global/long_long_global_array_15.c: -------------------------------------------------------------------------------- 1 | #include "stdio.h" 2 | union st1{ 3 | long long a, b, c; 4 | } obj[3]; 5 | 6 | int main() { 7 | obj[1].b = 7; 8 | printf("%lld\n", obj[1].b); 9 | return 0; 10 | } -------------------------------------------------------------------------------- /project/tests/main/break_and_continue/break/do_while_break.c: -------------------------------------------------------------------------------- 1 | 2 | #include "stdio.h" 3 | long long n = 5; 4 | int main() { 5 | do { 6 | printf("%d\n", n); 7 | n = n - 1; 8 | if (n == 0) { 9 | break; 10 | } 11 | } while (1); 12 | return 0; 13 | } 14 | -------------------------------------------------------------------------------- /project/tests/main/break_and_continue/break/for_break.c: -------------------------------------------------------------------------------- 1 | 2 | #include "stdio.h" 3 | 4 | int main() { 5 | long long n = 5; 6 | for ( ;1; n--) { 7 | printf("%d\n", n); 8 | if (n == 0) { 9 | break; 10 | } 11 | } 12 | return 0; 13 | } 14 | -------------------------------------------------------------------------------- /project/tests/main/break_and_continue/break/while_break.c: -------------------------------------------------------------------------------- 1 | 2 | #include "stdio.h" 3 | long long n = 5; 4 | int main() { 5 | while (1) { 6 | printf("%d\n", n); 7 | n = n - 1; 8 | if (n == 0) { 9 | break; 10 | } 11 | } 12 | return 0; 13 | } 14 | -------------------------------------------------------------------------------- /project/tests/main/break_and_continue/break_continue/do_while_break_continue.c: -------------------------------------------------------------------------------- 1 | 2 | #include "stdio.h" 3 | 4 | int main() { 5 | long long n = 0; 6 | do { 7 | n++; 8 | if (n % 2 == 0) { 9 | continue; 10 | } 11 | printf("%lld\n", n); 12 | if (n > 5) { 13 | break; 14 | } 15 | } while (1); 16 | return 0; 17 | } 18 | -------------------------------------------------------------------------------- /project/tests/main/break_and_continue/break_continue/for_break_continue.c: -------------------------------------------------------------------------------- 1 | 2 | #include "stdio.h" 3 | 4 | int main() { 5 | for (long long n = 0;1;n++) { 6 | if (n % 2 == 0) { 7 | continue; 8 | } 9 | printf("%lld\n", n); 10 | if (n > 5) { 11 | break; 12 | } 13 | } 14 | return 0; 15 | } 16 | -------------------------------------------------------------------------------- /project/tests/main/break_and_continue/break_continue/while_break_continue.c: -------------------------------------------------------------------------------- 1 | 2 | #include "stdio.h" 3 | 4 | int main() { 5 | long long n = 0; 6 | while (n < 5) { 7 | n++; 8 | if (n % 2 == 0) { 9 | continue; 10 | } 11 | printf("%lld\n", n); 12 | if (n > 5) { 13 | break; 14 | } 15 | } 16 | return 0; 17 | } 18 | -------------------------------------------------------------------------------- /project/tests/main/break_and_continue/continue/do_while_continue.c: -------------------------------------------------------------------------------- 1 | 2 | #include "stdio.h" 3 | 4 | int main() { 5 | long long n = 0; 6 | do { 7 | n++; 8 | if (n % 2 == 0) { 9 | continue; 10 | } 11 | printf("%lld\n", n); 12 | } while (n < 5); 13 | return 0; 14 | } 15 | -------------------------------------------------------------------------------- /project/tests/main/break_and_continue/continue/for_continue.c: -------------------------------------------------------------------------------- 1 | 2 | #include "stdio.h" 3 | 4 | int main() { 5 | for (long long n = 0; n < 5; n++) { 6 | if (n % 2 == 0) { 7 | continue; 8 | } 9 | printf("%lld\n", n); 10 | } 11 | return 0; 12 | } 13 | -------------------------------------------------------------------------------- /project/tests/main/break_and_continue/continue/while_continue.c: -------------------------------------------------------------------------------- 1 | 2 | #include "stdio.h" 3 | 4 | int main() { 5 | long long n = 0; 6 | while (n < 5) { 7 | n++; 8 | if (n % 2 == 0) { 9 | continue; 10 | } 11 | printf("%lld\n", n); 12 | } 13 | return 0; 14 | } 15 | -------------------------------------------------------------------------------- /project/tests/main/circle/circle1.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | double pi = 3.14192; 4 | static double r = 10.0; 5 | double p = 0.0; 6 | double s = 0.0; 7 | main() { 8 | p = 2.0 * pi * r; 9 | printf("%e\n", p); 10 | s = pi * r * r; 11 | printf("%e\n", s); 12 | } 13 | -------------------------------------------------------------------------------- /project/tests/main/circle/circle2.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | double pi = 3.14192; 4 | static double r = 10.0; 5 | double p = 0.0; 6 | double s = 0.0; 7 | double tmp = 0.0; 8 | 9 | main() { 10 | tmp = pi * r; 11 | p = 2.0 * tmp; 12 | printf("%e\n", p); 13 | s = tmp * r; 14 | printf("%e\n", s); 15 | } 16 | -------------------------------------------------------------------------------- /project/tests/main/circle/circle3.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | double pi = 3.14192; 4 | static double r = 10.0; 5 | double p = 0.0; 6 | double s = 0.0; 7 | double two = 2.0; 8 | main() { 9 | p = two * pi * r; 10 | printf("%f\n", p); 11 | s = pi * r * r; 12 | printf("%f\n", s); 13 | } 14 | -------------------------------------------------------------------------------- /project/tests/main/circle/circle4.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | double pi = 3.14192; 4 | static double r = 10.0; 5 | double p = 0.0; 6 | double s = 0.0; 7 | double tmp = 0.0; 8 | double two = 2.0; 9 | 10 | main() { 11 | tmp = pi * r; 12 | p = two * tmp; 13 | printf("%e\n", p); 14 | s = tmp * r; 15 | printf("%e\n", s); 16 | } 17 | -------------------------------------------------------------------------------- /project/tests/main/cycles/nested/do_while_for.c: -------------------------------------------------------------------------------- 1 | #include "stdio.h" 2 | 3 | int main() { 4 | long long i = 3; 5 | printf("%d\n",i); 6 | do { 7 | printf("%d\n", i); 8 | i--; 9 | for (long long j=0; j<3; j++) 10 | { 11 | printf("%d\n",j); 12 | } 13 | printf("%d\n",i); 14 | } while (i > 0); 15 | printf("%d\n",i); 16 | return 0; 17 | } -------------------------------------------------------------------------------- /project/tests/main/cycles/nested/for_do_while.c: -------------------------------------------------------------------------------- 1 | #include "stdio.h" 2 | 3 | int main() { 4 | for (long long i=0; i<3; i++) 5 | { 6 | printf("%d\n",i); 7 | long long j = 3; 8 | printf("%d\n", j); 9 | do { 10 | printf("%d\n", j); 11 | j -= 1; 12 | } while (j > 0); 13 | printf("%d\n", j); 14 | printf("%d\n",i); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /project/tests/main/cycles/nested/for_for.c: -------------------------------------------------------------------------------- 1 | #include "stdio.h" 2 | 3 | int main() { 4 | for (long long i=0; i<3; i++) 5 | { 6 | printf("%d\n",i); 7 | for (long long j=0; j<3; j++) 8 | { 9 | printf("%d\n",j); 10 | } 11 | printf("%d\n",i); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /project/tests/main/cycles/nested/for_for_for.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main() { 4 | 5 | int n = 3; 6 | for (int i = 0; i < n; i++) 7 | for (int j = 0; j < n; j++) 8 | for (int k = 0; k < n; k++) { 9 | printf("[%d,%d,%d]: %d\n", i, j, k, i + j + k); 10 | } 11 | return 0; 12 | } -------------------------------------------------------------------------------- /project/tests/main/cycles/nested/for_for_for_with_brackets.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main() { 4 | 5 | int n = 3; 6 | for (int i = 0; i < n; i++) { 7 | for (int j = 0; j < n; j++) { 8 | for (int k = 0; k < n; k++) { 9 | printf("[%d,%d,%d]: %d\n", i, j, k, i + j + k); 10 | } 11 | } 12 | } 13 | return 0; 14 | } -------------------------------------------------------------------------------- /project/tests/main/cycles/nested/for_while.c: -------------------------------------------------------------------------------- 1 | #include "stdio.h" 2 | 3 | int main() { 4 | for (long long i=0; i<3; i++) 5 | { 6 | printf("%d\n",i); 7 | long long j = 3; 8 | printf("%d\n", j); 9 | while (j > 0) { 10 | j--; 11 | printf("%d\n", j); 12 | } 13 | printf("%d\n", j); 14 | printf("%d\n", i); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /project/tests/main/cycles/nested/while_for.c: -------------------------------------------------------------------------------- 1 | #include "stdio.h" 2 | 3 | int main() { 4 | long long j = 3; 5 | printf("%d\n", j); 6 | while (j > 0) { 7 | printf("%d\n", j); 8 | j--; 9 | for (long long i=0; i<3; i++) { 10 | printf("%d\n",i); 11 | } 12 | printf("%d\n", j); 13 | } 14 | printf("%d\n", j); 15 | } -------------------------------------------------------------------------------- /project/tests/main/cycles/simple/do_while/do_while_with_empty_body.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main() { 4 | long long i = 0; 5 | printf("%lld\n", i); 6 | do{}while(i++ < 10); 7 | printf("%lld\n", i); 8 | } 9 | -------------------------------------------------------------------------------- /project/tests/main/cycles/simple/do_while/do_while_with_empty_statement.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main() { 4 | long long i = 0; 5 | printf("%lld\n", i); 6 | do;while(i++ < 10); 7 | printf("%lld\n", i); 8 | } 9 | -------------------------------------------------------------------------------- /project/tests/main/cycles/simple/do_while/do_while_with_false_condition.c: -------------------------------------------------------------------------------- 1 | #include "stdio.h" 2 | long long n = 5; 3 | int main() { 4 | printf("%d\n", n); 5 | do 6 | n = n - 1; 7 | while (n > 6); 8 | printf("%d\n", n); 9 | return 0; 10 | } 11 | -------------------------------------------------------------------------------- /project/tests/main/cycles/simple/do_while/do_while_without_braces.c: -------------------------------------------------------------------------------- 1 | #include "stdio.h" 2 | long long n = 5; 3 | int main() { 4 | printf("%d\n", n); 5 | do 6 | n = n - 1; 7 | while (n > 0); 8 | printf("%d\n", n); 9 | return 0; 10 | } 11 | -------------------------------------------------------------------------------- /project/tests/main/cycles/simple/do_while/do_while_without_execution.c: -------------------------------------------------------------------------------- 1 | #include "stdio.h" 2 | long long n = 5; 3 | int main() { 4 | printf("%d\n", n); 5 | do { 6 | break; 7 | n--; 8 | } while (n > 6); 9 | printf("%d\n", n); 10 | return 0; 11 | } -------------------------------------------------------------------------------- /project/tests/main/cycles/simple/do_while/simple_do_while.c: -------------------------------------------------------------------------------- 1 | #include "stdio.h" 2 | long long n = 5; 3 | int main() { 4 | printf("%d\n", n); 5 | do { 6 | printf("%d\n", n); 7 | n = n - 1; 8 | } while (n > 0); 9 | printf("%d\n", n); 10 | return 0; 11 | } 12 | -------------------------------------------------------------------------------- /project/tests/main/cycles/simple/for/for01.c: -------------------------------------------------------------------------------- 1 | #include "stdio.h" 2 | int main() { 3 | for (int i = 0; i < 1; i++) 4 | printf("%d\n", i); 5 | for (int i = 0; i < 1; i++) 6 | printf("%d\n", i); 7 | for (int i = 0; i < 1; i++) 8 | printf("%d\n", i); 9 | return 0; 10 | } 11 | -------------------------------------------------------------------------------- /project/tests/main/cycles/simple/for/for_with_all_expressions.c: -------------------------------------------------------------------------------- 1 | #include 2 | long long x = 10; 3 | 4 | int main() { 5 | long long i = 10; 6 | printf("%d\n",i); 7 | for (i=0; i 2 | 3 | int main() { 4 | long long i = 10; 5 | for(i = 0; i < 10; i++){} 6 | printf("%lld", i); 7 | } -------------------------------------------------------------------------------- /project/tests/main/cycles/simple/for/for_with_emty_statement.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main() { 4 | long long i = 10; 5 | for(i = 0; i < 10; i++); 6 | printf("%lld", i); 7 | } -------------------------------------------------------------------------------- /project/tests/main/cycles/simple/for/for_with_multiple_var_decl_in_init_expression.c: -------------------------------------------------------------------------------- 1 | #include 2 | long long x = 4; 3 | 4 | int main() { 5 | long long i = 1; 6 | printf("%d\n",i); 7 | for (long long j = 10, k = 45; i 2 | long long x = 10; 3 | 4 | int main() { 5 | for (long long i=0; i 2 | 3 | int main() { 4 | long long i = 1; 5 | printf("%lld\n", i); 6 | for (i = 10; 0; i++) 7 | printf("%lld\n", i); 8 | printf("%lld\n", i); 9 | } 10 | -------------------------------------------------------------------------------- /project/tests/main/cycles/simple/for/for_without_cond_and_loop_expression.c: -------------------------------------------------------------------------------- 1 | #include 2 | long long x = 10; 3 | 4 | int main() { 5 | long long i = -1; 6 | printf("%d\n",i); 7 | for (i=0;;) 8 | { 9 | if(i 2 | long long x = 10; 3 | 4 | int main() { 5 | long long i = 1; 6 | printf("%d\n",i); 7 | for (i=0;;i++) 8 | { 9 | if(i 2 | 3 | int main() { 4 | long long i = 1; 5 | printf("%lld\n", i); 6 | for (i = 10; 0; i++) 7 | { 8 | printf("%lld\n", i); 9 | } 10 | printf("%lld\n", i); 11 | } 12 | -------------------------------------------------------------------------------- /project/tests/main/cycles/simple/for/for_without_init_and_cond_expression.c: -------------------------------------------------------------------------------- 1 | #include 2 | long long x = 10; 3 | 4 | int main() { 5 | long long i = -1; 6 | printf("%d\n",i); 7 | for (;;i++) 8 | { 9 | if(i 2 | long long x = 10; 3 | 4 | int main() { 5 | long long i = -1; 6 | printf("%d\n",i); 7 | for (;i 2 | long long x = 10; 3 | 4 | int main() { 5 | long long i; 6 | i = -1; 7 | printf("%d\n",i); 8 | for (; i 2 | long long x = 10; 3 | 4 | int main() { 5 | long long i = -1; 6 | for (i = 0; i < x;) 7 | { 8 | printf("%lld\n", i); 9 | i++; 10 | } 11 | printf("%lld\n",i); 12 | } 13 | -------------------------------------------------------------------------------- /project/tests/main/cycles/simple/while/simple_while.c: -------------------------------------------------------------------------------- 1 | #include "stdio.h" 2 | long long n = 5; 3 | int main() { 4 | while (n > 0) { 5 | printf("%d\n", n); 6 | n = n - 1; 7 | } 8 | printf("%d\n", n); 9 | return 0; 10 | } 11 | -------------------------------------------------------------------------------- /project/tests/main/cycles/simple/while/while_with_empty_body.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main() { 4 | long long i = 0; 5 | printf("%lld\n", i); 6 | while(i++ < 10){} 7 | printf("%lld\n", i); 8 | } -------------------------------------------------------------------------------- /project/tests/main/cycles/simple/while/while_with_empty_statement.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main() { 4 | long long i = 0; 5 | printf("%lld\n", i); 6 | while(i++ < 10); 7 | printf("%lld\n", i); 8 | } -------------------------------------------------------------------------------- /project/tests/main/cycles/simple/while/while_without_braces.c: -------------------------------------------------------------------------------- 1 | #include "stdio.h" 2 | long long n = 5; 3 | int main() { 4 | printf("%d\n", n); 5 | while (n > 0) 6 | n = n - 1; 7 | printf("%d\n", n); 8 | return 0; 9 | } 10 | -------------------------------------------------------------------------------- /project/tests/main/cycles/simple/while/while_without_execution.c: -------------------------------------------------------------------------------- 1 | #include "stdio.h" 2 | long long n = 5; 3 | int main() { 4 | printf("%d\n", n); 5 | while (n > 6) 6 | n = n - 1; 7 | printf("%d\n", n); 8 | return 0; 9 | } 10 | -------------------------------------------------------------------------------- /project/tests/main/extern/extvar01.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | typedef long long int64; 4 | 5 | struct rectangle { 6 | int64 x, y; 7 | }; 8 | 9 | int64 x; 10 | int64 y = 7; 11 | 12 | extern int64 a; 13 | extern int64 a; 14 | 15 | int main() { 16 | x = a; 17 | a = y; 18 | 19 | printf("%lld\n", a); 20 | 21 | return 0; 22 | } 23 | 24 | int64 a; 25 | extern int64 a; 26 | extern int64 a; 27 | -------------------------------------------------------------------------------- /project/tests/main/extern/extvar02.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | typedef long long int64; 4 | 5 | struct rectangle { 6 | int64 x, y; 7 | }; 8 | 9 | int64 a; 10 | 11 | int64 x; 12 | int64 y = 7; 13 | 14 | extern int64 a; 15 | extern int64 a; 16 | 17 | int main() { 18 | x = a; 19 | a = y; 20 | 21 | printf("%lld\n", a); 22 | 23 | return 0; 24 | } 25 | 26 | extern int64 a; 27 | extern int64 a; 28 | -------------------------------------------------------------------------------- /project/tests/main/extern/extvar03.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | typedef long long int64; 4 | 5 | struct rectangle { 6 | int64 x, y; 7 | }; 8 | 9 | int64 x; 10 | int64 y = 7; 11 | 12 | extern int64 a; 13 | extern int64 a; 14 | 15 | int64 a; 16 | 17 | int main() { 18 | x = a; 19 | a = y; 20 | 21 | printf("%lld\n", a); 22 | 23 | return 0; 24 | } 25 | 26 | extern int64 a; 27 | extern int64 a; 28 | -------------------------------------------------------------------------------- /project/tests/main/func_ptr/func_ptr01_par_empty/func_ptr01_par_empty.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int func01() { 4 | return 1234; 5 | } 6 | 7 | int (*func_ptr)(); 8 | 9 | int main() { 10 | int result = 1; 11 | 12 | func_ptr = func01; 13 | result = func_ptr(result); 14 | printf("func01 = %d\n", result); 15 | 16 | result = func01(); 17 | printf("func01 = %d\n", result); 18 | 19 | return 0; 20 | } 21 | -------------------------------------------------------------------------------- /project/tests/main/func_ptr/func_ptr02_par_void/func_ptr02_par_void.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int func01(void) { 4 | return 1234; 5 | } 6 | 7 | int (*func_ptr)(void); 8 | 9 | int main() { 10 | int result; 11 | 12 | func_ptr = func01; 13 | result = func_ptr(); 14 | printf("func01 = %d\n", result); 15 | 16 | result = func01(); 17 | printf("func01 = %d\n", result); 18 | 19 | return 0; 20 | } 21 | -------------------------------------------------------------------------------- /project/tests/main/func_ptr/func_ptr03_par_empty_1arg/func_ptr03_par_empty_1arg.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int func01(int a) { 4 | return a+10; 5 | } 6 | 7 | int (*func_ptr)(); 8 | 9 | int main() { 10 | int result = 1; 11 | 12 | func_ptr = func01; 13 | result = func_ptr(result); 14 | printf("func01 = %d\n", result); 15 | 16 | result = func01(result); 17 | printf("func01 = %d\n", result); 18 | 19 | return 0; 20 | } 21 | -------------------------------------------------------------------------------- /project/tests/main/func_ptr/func_ptr14_arg_ptr/func_ptr14_arg_ptr.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int foo(int *px) { 4 | return *px+10; 5 | } 6 | int (*p_foo)(int *); 7 | 8 | int a = 10; 9 | int *pa; 10 | 11 | int main() { 12 | pa = &a; 13 | a = foo(pa); 14 | printf("foo(pa) = %d\n", a); 15 | 16 | p_foo = foo; 17 | printf("p_foo(pa) = %d\n", p_foo(pa)); 18 | 19 | return a; 20 | } 21 | -------------------------------------------------------------------------------- /project/tests/main/func_ptr/func_rec_main/func_rec_main.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int i = 0; 4 | 5 | long long func1() { 6 | printf("func1\n"); 7 | } 8 | 9 | long long func2() { 10 | printf("func2\n"); 11 | } 12 | 13 | int main() { 14 | func1(); 15 | func2(); 16 | if (i < 10) { 17 | i = i + 1; 18 | main(); 19 | } 20 | return 0; 21 | } 22 | -------------------------------------------------------------------------------- /project/tests/main/functions/empty_main_with_return.c: -------------------------------------------------------------------------------- 1 | int main(void) {return 0;} 2 | -------------------------------------------------------------------------------- /project/tests/main/functions/empty_main_without_return.c: -------------------------------------------------------------------------------- 1 | int main(void) { } 2 | -------------------------------------------------------------------------------- /project/tests/main/functions/extfunc/extfunc01.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | long long c; 4 | 5 | extern long long f(); 6 | 7 | int main() { 8 | c = f(); 9 | printf("%lld", c); 10 | 11 | return 0; 12 | } 13 | 14 | long long f() {return 10;} 15 | -------------------------------------------------------------------------------- /project/tests/main/functions/extfunc/extfunc02.c: -------------------------------------------------------------------------------- 1 | #include 2 | long long c; 3 | 4 | extern long long f(); 5 | 6 | int main() { 7 | c = f(); 8 | printf("%lld", c); 9 | return 0; 10 | } 11 | 12 | extern long long f(); 13 | 14 | long long f() {return 100;} 15 | 16 | extern long long f(); 17 | 18 | -------------------------------------------------------------------------------- /project/tests/main/functions/func01.c: -------------------------------------------------------------------------------- 1 | //Одна из функций запускается как параметр другой 2 | 3 | #include 4 | 5 | long long c = 10; 6 | 7 | long long func1(long long x) { 8 | return c + x - 111; 9 | } 10 | 11 | long long func2(long long x) { 12 | return c + x - 10; 13 | } 14 | 15 | int main() { 16 | long long a; 17 | a = func1(func2(c)); 18 | printf("%lld\n", a); 19 | return 0; 20 | } 21 | -------------------------------------------------------------------------------- /project/tests/main/functions/func02.c: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | 4 | long long a = 10; 5 | long long b = 15; 6 | 7 | long long min(long long a, long long b) { 8 | if (a < b) 9 | return a; 10 | return b; 11 | } 12 | 13 | int main() { 14 | long long res; 15 | res = min(a,b); 16 | printf("%lld\n", res); 17 | return 0; 18 | } 19 | -------------------------------------------------------------------------------- /project/tests/main/functions/func04.c: -------------------------------------------------------------------------------- 1 | //Одна из функций запускается как параметр другой 2 | 3 | #include 4 | 5 | long long c = 10; 6 | 7 | long long func1() { 8 | return c - 111; 9 | } 10 | 11 | int main() { 12 | long long a; 13 | a = func1(); 14 | printf("%lld\n", a); 15 | return 0; 16 | } 17 | -------------------------------------------------------------------------------- /project/tests/main/functions/func05.c: -------------------------------------------------------------------------------- 1 | //Одна из функций запускается как параметр другой 2 | 3 | #include 4 | 5 | long long c = 10; 6 | 7 | long long func1(long long x, long long y, long long z) { 8 | return x - y * z; 9 | } 10 | 11 | int main() { 12 | long long a; 13 | a = func1(c, 5, 10); 14 | 15 | printf("%lld\n", a); 16 | 17 | return 0; 18 | } 19 | -------------------------------------------------------------------------------- /project/tests/main/functions/func07.c: -------------------------------------------------------------------------------- 1 | //Одна из функций запускается как параметр другой 2 | 3 | #include 4 | 5 | double c = 0.0; 6 | 7 | double func1() { 8 | return c - 111.0; 9 | } 10 | 11 | int main() { 12 | c = 10.0; 13 | double a; 14 | a = func1(); 15 | printf("%f\n", a); 16 | return 0; 17 | } 18 | -------------------------------------------------------------------------------- /project/tests/main/functions/func08.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | typedef long long i64; 4 | 5 | i64 fun2(i64 a, i64 b); 6 | 7 | i64 fun1(i64 a, i64 b) { 8 | i64 result = a + b; 9 | result = fun2(result, 8); 10 | return result; 11 | } 12 | 13 | i64 fun2(i64 a, i64 b) { 14 | i64 result = a + b; 15 | return result; 16 | } 17 | 18 | int main() { 19 | i64 res = fun1(7, 9); 20 | printf("%lld\n", res); 21 | } -------------------------------------------------------------------------------- /project/tests/main/functions/function_with_empty_statement_and_return.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int test() { 4 | // empty statement 5 | ;;; 6 | return 0; 7 | } 8 | 9 | int main() { 10 | int x; 11 | x = test(); 12 | printf("%d\n", x); 13 | return 0; 14 | } 15 | -------------------------------------------------------------------------------- /project/tests/main/functions/function_with_empty_statement_without_return.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | void test() { 4 | // empty statement 5 | ; 6 | } 7 | 8 | int main() { 9 | int x = 0; 10 | test(); 11 | printf("%d\n", x); 12 | return 0; 13 | } 14 | -------------------------------------------------------------------------------- /project/tests/main/functions/function_with_multiple_empty_statements_without_return.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | void test() { 4 | // empty statement 5 | ; 6 | ; 7 | ;;; 8 | } 9 | 10 | int main() { 11 | int x = 0; 12 | test(); 13 | printf("%d\n", x); 14 | return 0; 15 | } 16 | -------------------------------------------------------------------------------- /project/tests/main/functions/proto/extproto01.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | typedef long long int64; 4 | 5 | // Прототипы функций без их использования. 6 | // Должны потеряться 7 | int64 min(int64 a, int64 b); 8 | int64 max(int64 a, int64 b); 9 | 10 | int64 x = 10; 11 | int64 y = 7; 12 | 13 | int main() { 14 | int64 result; 15 | result = 0; 16 | printf("%lld\n", result); 17 | // result = min(5, 2); 18 | 19 | return 0; 20 | } 21 | 22 | -------------------------------------------------------------------------------- /project/tests/main/initList/globalArrayInitList.c: -------------------------------------------------------------------------------- 1 | // 2 | // Created by yarrya on 18.07.22. 3 | // 4 | #include "stdio.h" 5 | 6 | long long a[3] = {1, 2, 3}; 7 | 8 | int main() { 9 | printf("%lld\n", a[0]); 10 | printf("%lld\n", a[1]); 11 | printf("%lld\n", a[2]); 12 | return 0; 13 | } -------------------------------------------------------------------------------- /project/tests/main/initList/globalMultyDimArrayInitList01.c: -------------------------------------------------------------------------------- 1 | // 2 | // Created by yarrya on 18.07.22. 3 | // 4 | 5 | #include "stdio.h" 6 | 7 | long long b[3][2] = {1, 2, 3, 4, 5, 6}; 8 | 9 | int main() { 10 | printf("%lld\n", b[0][0]); 11 | printf("%lld\n", b[0][1]); 12 | printf("%lld\n", b[1][0]); 13 | printf("%lld\n", b[1][1]); 14 | printf("%lld\n", b[2][0]); 15 | printf("%lld\n", b[2][1]); 16 | return 0; 17 | } -------------------------------------------------------------------------------- /project/tests/main/initList/globalNestedStuctInitList01.c: -------------------------------------------------------------------------------- 1 | // 2 | // Created by yarrya on 18.07.22. 3 | // 4 | 5 | #include "stdio.h" 6 | 7 | struct st { 8 | long long x, y; 9 | struct nst { 10 | long long a, b; 11 | } z; 12 | }; 13 | typedef struct st st; 14 | st b = {4, 5, 6, 7}; 15 | 16 | int main() { 17 | printf("%lld\n", b.x); 18 | printf("%lld\n", b.y); 19 | printf("%lld\n", b.z.a); 20 | printf("%lld\n", b.z.b); 21 | return 0; 22 | } -------------------------------------------------------------------------------- /project/tests/main/initList/globalStuctInitList.c: -------------------------------------------------------------------------------- 1 | // 2 | // Created by yarrya on 18.07.22. 3 | // 4 | #include "stdio.h" 5 | 6 | struct st { 7 | long long x, y, z; 8 | }; 9 | typedef struct st st; 10 | st b = {4, 5, 6}; 11 | 12 | int main() { 13 | printf("%lld\n", b.x); 14 | printf("%lld\n", b.y); 15 | printf("%lld\n", b.z); 16 | return 0; 17 | } -------------------------------------------------------------------------------- /project/tests/main/initList/globalStuctInitListInPlace.c: -------------------------------------------------------------------------------- 1 | // 2 | // Created by yarrya on 18.07.22. 3 | // 4 | 5 | #include "stdio.h" 6 | 7 | struct st { 8 | long long x, y, z; 9 | } b = {4, 5, 6}; 10 | 11 | 12 | int main() { 13 | printf("%lld\n", b.x); 14 | printf("%lld\n", b.y); 15 | printf("%lld\n", b.z); 16 | return 0; 17 | } -------------------------------------------------------------------------------- /project/tests/main/initList/localArrayInitList.c: -------------------------------------------------------------------------------- 1 | // 2 | // Created by yarrya on 18.07.22. 3 | // 4 | #include "stdio.h" 5 | 6 | int main() { 7 | long long b[3] = {4, 5, 6}; 8 | printf("%lld\n", b[0]); 9 | printf("%lld\n", b[1]); 10 | printf("%lld\n", b[2]); 11 | return 0; 12 | } -------------------------------------------------------------------------------- /project/tests/main/initList/localMultyDimArrayInitList01.c: -------------------------------------------------------------------------------- 1 | // 2 | // Created by yarrya on 18.07.22. 3 | // 4 | 5 | #include "stdio.h" 6 | 7 | int main() { 8 | long long b[3][2] = {1, 2, 3, 4, 5, 6}; 9 | printf("%lld\n", b[0][0]); 10 | printf("%lld\n", b[0][1]); 11 | printf("%lld\n", b[1][0]); 12 | printf("%lld\n", b[1][1]); 13 | printf("%lld\n", b[2][0]); 14 | printf("%lld\n", b[2][1]); 15 | return 0; 16 | } -------------------------------------------------------------------------------- /project/tests/main/initList/localMultyDimArrayInitList02.c: -------------------------------------------------------------------------------- 1 | // 2 | // Created by yarrya on 18.07.22. 3 | // 4 | #include "stdio.h" 5 | 6 | int main() { 7 | long long b[3][2] = {{1,2},{3,4},{5,6}}; 8 | printf("%lld\n", b[0][0]); 9 | printf("%lld\n", b[0][1]); 10 | printf("%lld\n", b[1][0]); 11 | printf("%lld\n", b[1][1]); 12 | printf("%lld\n", b[2][0]); 13 | printf("%lld\n", b[2][1]); 14 | return 0; 15 | } -------------------------------------------------------------------------------- /project/tests/main/initList/localNestedStuctInitList01.c: -------------------------------------------------------------------------------- 1 | // 2 | // Created by yarrya on 18.07.22. 3 | // 4 | 5 | #include "stdio.h" 6 | 7 | struct st { 8 | long long x, y; 9 | struct nst { 10 | long long a,b; 11 | } z; 12 | }; 13 | typedef struct st st; 14 | 15 | int main() { 16 | st b = {4, 5, 6, 7}; 17 | printf("%lld\n", b.x); 18 | printf("%lld\n", b.y); 19 | printf("%lld\n", b.z.a); 20 | printf("%lld\n", b.z.b); 21 | return 0; 22 | } -------------------------------------------------------------------------------- /project/tests/main/initList/localStuctInitList.c: -------------------------------------------------------------------------------- 1 | // 2 | // Created by yarrya on 18.07.22. 3 | // 4 | 5 | #include "stdio.h" 6 | 7 | struct st { 8 | long long x, y, z; 9 | }; 10 | typedef struct st st; 11 | 12 | int main() { 13 | st b = {4, 5, 6}; 14 | printf("%lld\n", b.x); 15 | printf("%lld\n", b.y); 16 | printf("%lld\n", b.z); 17 | return 0; 18 | } -------------------------------------------------------------------------------- /project/tests/main/initList/localStuctInitListInPlace.c: -------------------------------------------------------------------------------- 1 | // 2 | // Created by yarrya on 18.07.22. 3 | // 4 | #include "stdio.h" 5 | 6 | int main() { 7 | struct st { 8 | long long x, y, z; 9 | } b = {4, 5, 6}; 10 | printf("%lld\n", b.x); 11 | printf("%lld\n", b.y); 12 | printf("%lld\n", b.z); 13 | return 0; 14 | } -------------------------------------------------------------------------------- /project/tests/main/initList/test01.c: -------------------------------------------------------------------------------- 1 | struct S1 { 2 | int a; 3 | int b; 4 | int c; 5 | int d; 6 | }; 7 | 8 | 9 | struct S1 v = {1, .c=2, 3}; 10 | 11 | int a[5] = {1,2,[4]=5}; 12 | 13 | //#include 14 | int main() 15 | { 16 | // printf("%d %d %d %d\n", v.a, v.b, v.c, v.d); 17 | // printf("%d %d %d %d %d\n", a[0], a[1], a[2], a[3], a[4]); 18 | return 0; 19 | } 20 | -------------------------------------------------------------------------------- /project/tests/main/operations/assignmentOperations/ass01_cmpd_add.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | long long a = 100; 4 | long long b = 20; 5 | long long c = 15; 6 | 7 | int main() { 8 | printf("%lld\n", a); 9 | printf("%lld\n", b); 10 | printf("%lld\n", c); 11 | 12 | a += c; 13 | printf("%lld\n", a); 14 | 15 | return 0; 16 | } 17 | -------------------------------------------------------------------------------- /project/tests/main/operations/assignmentOperations/ass02_cmpd_sub.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | long long a = 100; 4 | long long b = 20; 5 | long long c = 15; 6 | 7 | int main() { 8 | printf("%lld\n", a); 9 | printf("%lld\n", b); 10 | printf("%lld\n", c); 11 | 12 | a -= c; 13 | printf("%lld\n", a); 14 | 15 | return 0; 16 | } 17 | -------------------------------------------------------------------------------- /project/tests/main/operations/assignmentOperations/ass03_cmpd_mul.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | long long a = 100; 4 | long long b = 20; 5 | long long c = 15; 6 | 7 | int main() { 8 | printf("%lld\n", a); 9 | printf("%lld\n", b); 10 | printf("%lld\n", c); 11 | 12 | a *= c; 13 | printf("%lld\n", a); 14 | 15 | return 0; 16 | } 17 | -------------------------------------------------------------------------------- /project/tests/main/operations/assignmentOperations/ass04_cmpd_div.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | long long a = 100; 4 | long long b = 20; 5 | long long c = 15; 6 | 7 | int main() { 8 | printf("%lld\n", a); 9 | printf("%lld\n", b); 10 | printf("%lld\n", c); 11 | 12 | a /= c; 13 | printf("%lld\n", a); 14 | 15 | return 0; 16 | } 17 | -------------------------------------------------------------------------------- /project/tests/main/operations/assignmentOperations/ass05_cmpd_mod.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | long long a = 100; 4 | long long b = 20; 5 | long long c = 15; 6 | 7 | int main() { 8 | printf("%lld\n", a); 9 | printf("%lld\n", b); 10 | printf("%lld\n", c); 11 | 12 | a %= c; 13 | printf("%lld\n", a); 14 | 15 | return 0; 16 | } 17 | -------------------------------------------------------------------------------- /project/tests/main/operations/assignmentOperations/assign07.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | long long a = 10; 4 | long long b = 255; 5 | long long c = 37; 6 | 7 | int main() { 8 | b = (a += c); 9 | printf("%lld\n", a); 10 | printf("%lld\n", b); 11 | printf("%lld\n", c); 12 | 13 | return 0; 14 | } 15 | -------------------------------------------------------------------------------- /project/tests/main/operations/assignmentOperations/assign08.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | long long a = 10; 4 | long long b = 255; 5 | long long c = 37; 6 | 7 | int main() { 8 | b = (a = c); 9 | printf("%lld\n", a); 10 | printf("%lld\n", b); 11 | printf("%lld\n", c); 12 | 13 | return 0; 14 | } 15 | -------------------------------------------------------------------------------- /project/tests/main/operations/assignmentOperations/assign09.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | long long a = 10; 4 | long long b = 255; 5 | long long c = 37; 6 | 7 | int main() { 8 | a = b = c; 9 | printf("%lld\n", a); 10 | printf("%lld\n", b); 11 | printf("%lld\n", c); 12 | 13 | return 0; 14 | } 15 | -------------------------------------------------------------------------------- /project/tests/main/operations/assignmentOperations/assign10.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | long long a = 10; 4 | long long b = 255; 5 | long long c = 37; 6 | 7 | int main() { 8 | c -= a++; 9 | printf("%lld\n", a); 10 | printf("%lld\n", b); 11 | printf("%lld\n", c); 12 | 13 | return 0; 14 | } 15 | -------------------------------------------------------------------------------- /project/tests/main/operations/assignmentOperations/assignOp01.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | long long x = 5; 4 | long long y = 10; 5 | int main() { 6 | x += y; 7 | printf("%d\n", x); 8 | x *= y; 9 | printf("%d\n", x); 10 | } 11 | -------------------------------------------------------------------------------- /project/tests/main/operations/assignmentOperations/assignOp02.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | long long x = 4; 4 | long long y = 40; 5 | int main() { 6 | y /= x; 7 | printf("%d\n", y); 8 | y %= 7; 9 | printf("%d\n", y); 10 | } 11 | -------------------------------------------------------------------------------- /project/tests/main/operations/bin_operations/bit_operations/shifts/shifts.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main() { 4 | int a = 1024; 5 | int b = -1024; 6 | int c = 0; 7 | for (int i = 0; i < 5; i++) { 8 | printf("%d\n", a >> i); 9 | printf("%d\n", b >> i); 10 | printf("%d\n", c >> i); 11 | printf("%d\n", a << i); 12 | printf("%d\n", b << i); 13 | printf("%d\n", c << i); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /project/tests/main/operations/bin_operations/bool_operations/bool_and/bool_and.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int a = 10; 4 | int b = 0; 5 | int c = 20; 6 | 7 | int main() { 8 | printf("%d\n", a); 9 | printf("%d\n", b); 10 | printf("%d\n", c); 11 | int x; 12 | x = a && b; 13 | printf("%d\n", x); 14 | x = a && c; 15 | printf("%d\n", x); 16 | 17 | return 0; 18 | } 19 | -------------------------------------------------------------------------------- /project/tests/main/operations/cond_operator/cond_operator.c: -------------------------------------------------------------------------------- 1 | #include "stdio.h" 2 | 3 | int main() { 4 | int x = -5; 5 | 6 | int res = x > 0 ? x : -x; 7 | 8 | printf("%d\n", res); 9 | //printf("%s\n", res % 2 ? "even" : "odd"); 10 | 11 | return 0; 12 | } -------------------------------------------------------------------------------- /project/tests/main/operations/incdec/post_dec_int64.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | long long c = 10; 4 | 5 | int main() { 6 | c--; 7 | printf("%lld\n", c); 8 | 9 | return 0; 10 | } 11 | -------------------------------------------------------------------------------- /project/tests/main/operations/incdec/post_inc_int64.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | long long c = 10; 4 | 5 | int main() { 6 | c++; 7 | printf("%lld\n", c); 8 | // long long x = c++ + c++; 9 | // printf("%lld\n", x); 10 | 11 | return 0; 12 | } 13 | -------------------------------------------------------------------------------- /project/tests/main/operations/incdec/post_inc_int64_assign.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | long long c = 10; 4 | 5 | int main() { 6 | long long x; 7 | x = c++; 8 | printf("%lld\n", c); 9 | printf("%lld\n", x); 10 | 11 | return 0; 12 | } 13 | -------------------------------------------------------------------------------- /project/tests/main/operations/incdec/post_pre_inc_int64_combi.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | long long c = 10; 4 | 5 | int main() { 6 | long long x; 7 | x = c++ + ++c; 8 | printf("%lld\n", c); 9 | printf("%lld\n", x); 10 | 11 | return 0; 12 | } 13 | -------------------------------------------------------------------------------- /project/tests/main/operations/incdec/ppost_inc_int64_combi.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | long long c = 10; 4 | 5 | int main() { 6 | long long x; 7 | x = c++ + c++; 8 | printf("%lld\n", c); 9 | printf("%lld\n", x); 10 | 11 | return 0; 12 | } 13 | -------------------------------------------------------------------------------- /project/tests/main/operations/incdec/pre_dec_int64.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | long long c = 10; 4 | 5 | int main() { 6 | c--; 7 | printf("%lld\n", c); 8 | // long long x = c++ + c++; 9 | // printf("%lld\n", x); 10 | 11 | return 0; 12 | } 13 | -------------------------------------------------------------------------------- /project/tests/main/operations/incdec/pre_inc_int64.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | long long c = 10; 4 | 5 | int main() { 6 | c++; 7 | printf("%lld\n", c); 8 | // long long x = c++ + c++; 9 | // printf("%lld\n", x); 10 | 11 | return 0; 12 | } 13 | -------------------------------------------------------------------------------- /project/tests/main/operations/increment/increment.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | typedef long long i64; 4 | 5 | i64 x = 42; 6 | i64 y = 0; 7 | 8 | int main() { 9 | x = 1 + x; 10 | printf("%ld\n", x); 11 | x = x + 1; 12 | printf("%ld\n", x); 13 | return 0; 14 | } -------------------------------------------------------------------------------- /project/tests/main/operations/long_long_ptr/long_long_post_dec_ptr.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | long long b = 5; 4 | long long c = 10; 5 | long long d = 55; 6 | long long e = 66; 7 | long long *pc; 8 | 9 | int main() { 10 | pc = &c; 11 | pc--; 12 | e = *pc; 13 | 14 | printf("%lld\n", b); 15 | printf("%lld\n", c); 16 | printf("%lld\n", d); 17 | printf("%lld\n", e); 18 | 19 | return 0; 20 | } 21 | -------------------------------------------------------------------------------- /project/tests/main/operations/long_long_ptr/long_long_post_inc_ptr.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | long long c = 10; 4 | long long d = 55; 5 | long long e = 66; 6 | long long *pc; 7 | 8 | int main() { 9 | pc = &c; 10 | pc++; 11 | e = *pc; 12 | 13 | printf("%lld\n", c); 14 | printf("%lld\n", d); 15 | printf("%lld\n", e); 16 | 17 | return 0; 18 | } 19 | -------------------------------------------------------------------------------- /project/tests/main/operations/long_long_ptr/long_long_pre_dec_ptr.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | long long b = 5; 4 | long long c = 10; 5 | long long d = 55; 6 | long long e = 66; 7 | long long *pc; 8 | 9 | int main() { 10 | pc = &c; 11 | --pc; 12 | e = *pc; 13 | 14 | printf("%lld\n", b); 15 | printf("%lld\n", c); 16 | printf("%lld\n", d); 17 | printf("%lld\n", e); 18 | 19 | return 0; 20 | } 21 | -------------------------------------------------------------------------------- /project/tests/main/operations/long_long_ptr/long_long_pre_inc_ptr.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | long long c = 10; 4 | long long d = 55; 5 | long long e = 66; 6 | long long *pc; 7 | long long **ppc; 8 | 9 | int main() { 10 | pc = &c; 11 | ++pc; 12 | e = *pc; 13 | 14 | printf("%lld\n", c); 15 | printf("%lld\n", d); 16 | printf("%lld\n", e); 17 | 18 | return 0; 19 | } 20 | -------------------------------------------------------------------------------- /project/tests/main/operations/sizeof/sizeof01.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int i1 = 0; 4 | 5 | int main() { 6 | i1 = sizeof(int); 7 | printf("%d\n", i1); 8 | 9 | i1 = sizeof(long int); 10 | printf("%d\n", i1); 11 | 12 | return 0; 13 | } 14 | -------------------------------------------------------------------------------- /project/tests/main/operations/uno/bit_not/bit_not.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int a = 10; 4 | int b = 0; 5 | int c = 20; 6 | 7 | int main() { 8 | printf("%d\n", a); 9 | printf("%d\n", b); 10 | printf("%d\n", c); 11 | 12 | int x; 13 | x = ~a; 14 | printf("%d\n", x); 15 | x = ~b; 16 | printf("%d\n", x); 17 | x = ~c; 18 | printf("%d\n", x); 19 | 20 | return 0; 21 | } 22 | -------------------------------------------------------------------------------- /project/tests/main/operations/uno/uno_not/not01.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | long long c = 10; 4 | 5 | int main() { 6 | printf("%lld\n", c); 7 | long long x; 8 | x = !c; 9 | printf("%lld\n", x); 10 | 11 | return 0; 12 | } 13 | -------------------------------------------------------------------------------- /project/tests/main/operations/uno/uno_not/not02.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | long long c = 10; 4 | 5 | int main() { 6 | printf("%lld\n", c); 7 | long long x; 8 | x = !(!c); 9 | printf("%lld\n", x); 10 | 11 | return 0; 12 | } 13 | -------------------------------------------------------------------------------- /project/tests/main/operations/uno/uno_not/not03.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | long long c = 10; 4 | 5 | int main() { 6 | printf("%lld\n", c); 7 | long long x; 8 | x = ! !c; 9 | printf("%lld\n", x); 10 | 11 | return 0; 12 | } 13 | -------------------------------------------------------------------------------- /project/tests/main/operations/uno/uno_not/not04.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | long long c = 10; 4 | 5 | int main() { 6 | printf("%lld\n", c); 7 | long long x; 8 | x = !c + !c; 9 | printf("%lld\n", x); 10 | 11 | return 0; 12 | } 13 | -------------------------------------------------------------------------------- /project/tests/main/operations/uno/uno_plus_minus/min01.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | long long c = 10; 4 | 5 | int main() { 6 | printf("%lld\n", c); 7 | long long x; 8 | x = -c; 9 | printf("%lld\n", x); 10 | 11 | return 0; 12 | } 13 | -------------------------------------------------------------------------------- /project/tests/main/operations/uno/uno_plus_minus/min02.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | long long c = 10; 4 | 5 | int main() { 6 | printf("%lld\n", c); 7 | long long x; 8 | x = -(-c); 9 | printf("%lld\n", x); 10 | 11 | return 0; 12 | } 13 | -------------------------------------------------------------------------------- /project/tests/main/operations/uno/uno_plus_minus/min03.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | long long c = 10; 4 | 5 | int main() { 6 | printf("%lld\n", c); 7 | long long x; 8 | x = - -c; 9 | printf("%lld\n", x); 10 | 11 | return 0; 12 | } 13 | -------------------------------------------------------------------------------- /project/tests/main/operations/uno/uno_plus_minus/min04.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | long long c = 10; 4 | 5 | int main() { 6 | printf("%lld\n", c); 7 | long long x; 8 | x = -c + -c; 9 | printf("%lld\n", x); 10 | 11 | return 0; 12 | } 13 | -------------------------------------------------------------------------------- /project/tests/main/operations/uno/uno_plus_minus/plus01.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | long long c = 10; 4 | 5 | int main() { 6 | printf("%lld\n", c); 7 | long long x; 8 | x = +c; 9 | printf("%lld\n", x); 10 | 11 | return 0; 12 | } 13 | -------------------------------------------------------------------------------- /project/tests/main/operations/uno/uno_plus_minus/plus02.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | long long c = 10; 4 | 5 | int main() { 6 | printf("%lld\n", c); 7 | long long x; 8 | x = +(+c); 9 | printf("%lld\n", x); 10 | 11 | return 0; 12 | } 13 | -------------------------------------------------------------------------------- /project/tests/main/operations/uno/uno_plus_minus/plus03.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | long long c = 10; 4 | 5 | int main() { 6 | printf("%lld\n", c); 7 | long long x; 8 | x = + +c; 9 | printf("%lld\n", x); 10 | 11 | return 0; 12 | } 13 | -------------------------------------------------------------------------------- /project/tests/main/operations/uno/uno_plus_minus/plus04.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | long long c = 10; 4 | 5 | int main() { 6 | printf("%lld\n", c); 7 | long long x; 8 | x = +c + +c; 9 | printf("%lld\n", x); 10 | 11 | return 0; 12 | } 13 | -------------------------------------------------------------------------------- /project/tests/main/operations/uno/uno_plus_minus/plusmin01.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | long long c = 10; 4 | 5 | int main() { 6 | printf("%lld\n", c); 7 | long long x; 8 | x = +- -c; 9 | printf("%lld\n", x); 10 | 11 | return 0; 12 | } 13 | -------------------------------------------------------------------------------- /project/tests/main/operations/zero_div/zero_div_01/zero_div_01.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | long long c = 10; 4 | long long x = 5; 5 | 6 | int main() { 7 | printf("%lld\n", x); 8 | 9 | x = c / x; 10 | 11 | printf("%lld\n", c); 12 | printf("%lld\n", x); 13 | 14 | return 0; 15 | } 16 | -------------------------------------------------------------------------------- /project/tests/main/operations/zero_div/zero_div_02/zero_div_02.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | //long long x; 4 | long long x = 6; 5 | 6 | int main() { 7 | x = 42 / x; 8 | printf("%lld\n", x); 9 | } 10 | -------------------------------------------------------------------------------- /project/tests/main/operations/zero_div/zero_div_03/zero_div_03.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | void zero_div(long long c, long long x) { 4 | printf("%lld\n", x); 5 | 6 | x = c / x; 7 | 8 | printf("%lld\n", c); 9 | printf("%lld\n", x); 10 | } 11 | 12 | int main() { 13 | zero_div(15, 3); 14 | 15 | long long c = 120; 16 | long long x = 10; 17 | zero_div(c, x); 18 | 19 | return 0; 20 | } 21 | -------------------------------------------------------------------------------- /project/tests/main/pointers/global/long_long_global_ptr_02.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | // Проверка инициализации указателей 4 | long long c = 255; 5 | long long d = 10; 6 | long long *pc; // = &c; 7 | 8 | int main() { 9 | pc = &c; 10 | d = *pc; 11 | printf("%lld\n", d); 12 | 13 | return 0; 14 | } 15 | -------------------------------------------------------------------------------- /project/tests/main/pointers/global/long_long_global_ptr_15.c: -------------------------------------------------------------------------------- 1 | //#include 2 | 3 | // Проверка инициализации указателей 4 | long long c = 255; 5 | // long long d = 10; 6 | long long *pc; // = &c; 7 | long long *pd; // = &d; 8 | // long long **ppc; // = &c; 9 | 10 | int main() { 11 | pd = pc; 12 | // printf("%lld\n", c); 13 | // c; 14 | 15 | return 0; 16 | } 17 | -------------------------------------------------------------------------------- /project/tests/main/pointers/global/long_long_global_ptr_16.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | long long c = 10; 4 | long long d = 255; 5 | long long e = 333; 6 | long long *pc; 7 | long long *pd; 8 | long long **ppc; 9 | long long **ppd; 10 | 11 | int main() { 12 | pc = &d; 13 | c = c + 1; 14 | // c = *(pc + 1); 15 | pd = pc + 1; 16 | 17 | printf("%lld\n", c); 18 | printf("%lld\n", d); 19 | printf("%lld\n", e); 20 | 21 | return 0; 22 | } 23 | -------------------------------------------------------------------------------- /project/tests/main/pointers/global/long_long_global_ptr_17.c: -------------------------------------------------------------------------------- 1 | //#include 2 | 3 | long long a = 10; 4 | long long c; 5 | long long *pc; 6 | long long **ppc; 7 | 8 | int main() { 9 | pc = &a; 10 | ppc = &pc; 11 | c = *&**&*ppc; 12 | printf("%lld\n", c); 13 | 14 | return 0; 15 | } 16 | -------------------------------------------------------------------------------- /project/tests/main/pointers/global/long_long_global_ptr_18.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | // Проверка инициализации указателей 4 | long long c = 255; 5 | long long *pc; // = &d; 6 | long long *pd; // = &d; 7 | 8 | int main() { 9 | pc = &c; 10 | pd = pc; 11 | c = *pd; 12 | printf("%lld\n", c); 13 | 14 | return 0; 15 | } 16 | -------------------------------------------------------------------------------- /project/tests/main/pointers/local/double_local_ptr.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main() { 4 | double a = 5.55; 5 | double b = 12.55; 6 | double *c = &b; 7 | printf("%1.2f\n", *c); 8 | printf("%1.2f\n", *&a); 9 | return 0; 10 | } 11 | -------------------------------------------------------------------------------- /project/tests/main/pointers/local/int_local_ptr.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main() { 4 | int a = 5; 5 | int b = 5; 6 | int *c = &b; 7 | printf("%d\n", *c); 8 | printf("%d\n", *&a); 9 | return 0; 10 | } 11 | -------------------------------------------------------------------------------- /project/tests/main/pointers/local/long_long_local_ptr.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main() { 4 | long long a = 5; 5 | long long b = 8; 6 | long long *c = &b; 7 | printf("%lld\n", *c); 8 | printf("%lld\n", *&a); 9 | return 0; 10 | } 11 | 12 | -------------------------------------------------------------------------------- /project/tests/main/pointers/local/short_local_ptr.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main() { 4 | short a = 5; 5 | short b = 8; 6 | short *c = &b; 7 | printf("%hd\n", *c); 8 | printf("%hd\n", *&a); 9 | return 0; 10 | } 11 | 12 | -------------------------------------------------------------------------------- /project/tests/main/struct/int/int_struct_01.c: -------------------------------------------------------------------------------- 1 | #include 2 | struct st{ 3 | int a; 4 | }; 5 | 6 | struct st obj1; 7 | 8 | int main() { 9 | return 0; 10 | } 11 | -------------------------------------------------------------------------------- /project/tests/main/struct/int/int_struct_02.c: -------------------------------------------------------------------------------- 1 | struct st{ 2 | int a; 3 | }; 4 | 5 | int main() { 6 | struct st obj1; 7 | return 0; 8 | } 9 | -------------------------------------------------------------------------------- /project/tests/main/struct/int/int_struct_03.c: -------------------------------------------------------------------------------- 1 | #include 2 | struct st{ 3 | int a; 4 | }; 5 | 6 | struct st obj1; 7 | 8 | int main() { 9 | obj1.a = 5; 10 | printf("%d\n", obj1.a); 11 | return 0; 12 | } 13 | -------------------------------------------------------------------------------- /project/tests/main/struct/int/int_struct_04.c: -------------------------------------------------------------------------------- 1 | #include 2 | struct st{ 3 | int a; 4 | }; 5 | 6 | 7 | 8 | int main() { 9 | struct st obj1; 10 | obj1.a = 6; 11 | printf("%d\n", obj1.a); 12 | return 0; 13 | } 14 | -------------------------------------------------------------------------------- /project/tests/main/struct/int/int_struct_05.c: -------------------------------------------------------------------------------- 1 | #include 2 | struct st{ 3 | int a; 4 | }; 5 | 6 | struct st obj1; 7 | 8 | int main() { 9 | struct st obj2; 10 | obj1.a = 7; 11 | obj2 = obj1; 12 | printf("%d\n", obj2.a); 13 | return 0; 14 | } 15 | -------------------------------------------------------------------------------- /project/tests/main/struct/int/int_struct_06.c: -------------------------------------------------------------------------------- 1 | #include 2 | struct st { 3 | int a; 4 | struct st2 { 5 | int x, y; 6 | } b; 7 | } a/* = {1, {2, 3}}*/; 8 | int b = 17; 9 | 10 | int main() { 11 | a.a = 1; 12 | a.b.x = 2; 13 | a.b.y = 3; 14 | 15 | printf("%d\n", a.b.x); 16 | printf("%d\n", b); 17 | return 0; 18 | } -------------------------------------------------------------------------------- /project/tests/main/struct/int/int_struct_07.c: -------------------------------------------------------------------------------- 1 | #include 2 | struct q { 3 | int a, b, c, d; 4 | } a/* = {1, 2, 3, 4}*/, 5 | b/* = {2, 3, 4, 5}*/; 6 | 7 | int main() { 8 | a.a=1; 9 | a.b=2; 10 | a.c=3; 11 | a.d=4; 12 | 13 | b.a=a.a+1; 14 | b.b=a.b+1; 15 | b.c=a.c+1; 16 | b.d=a.d+1; 17 | 18 | 19 | printf("%d\n", a.b); 20 | printf("%d\n", b.b); 21 | a = b; 22 | printf("%d\n", a.b); 23 | return 0; 24 | } -------------------------------------------------------------------------------- /project/tests/main/struct/long_long/long_long_struct.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | struct s01 { 4 | long long a; 5 | }; 6 | 7 | struct s01 sv; 8 | struct s01 *sp; 9 | 10 | int main() { 11 | sv.a = 10; 12 | long long x; 13 | sp = &sv; 14 | 15 | x = sp->a; 16 | printf("%lld\n", x); 17 | 18 | x = (*sp).a; 19 | printf("%lld\n", x); 20 | 21 | return 0; 22 | } -------------------------------------------------------------------------------- /project/tests/main/struct/trian/trian01.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | struct Triangle{int a, b, c;} t = {.a = 3, .c = 5}; 4 | 5 | 6 | int main() { 7 | t.b = 4; 8 | printf("t.a = %d, t.b = %d, t.c = %d\n", t.a, t.b, t.c); 9 | return 0; 10 | } 11 | -------------------------------------------------------------------------------- /project/tests/main/switch_and_if_else/switch/atypical_switch.c: -------------------------------------------------------------------------------- 1 | long long x = 1; 2 | 3 | int main() { 4 | switch(1) {break;} 5 | switch(1) {} 6 | switch(1) { 7 | case 1: 8 | printf("%lld\n", x); 9 | } 10 | switch(1) { 11 | default: 12 | printf("%lld\n", x); 13 | } 14 | return 0; 15 | } -------------------------------------------------------------------------------- /project/tests/main/tests_suite/test080/testsuite080.c: -------------------------------------------------------------------------------- 1 | //clang -Xclang -ast-dump -fsyntax-only 00080.c 2 | #include 3 | 4 | int c; 5 | 6 | void voidfn() { 7 | c = 10; 8 | return; 9 | } 10 | 11 | int main() { 12 | voidfn(); 13 | printf("%lld\n", c); 14 | return 0; 15 | } 16 | -------------------------------------------------------------------------------- /project/tests/main/type_casts/00113/00113.c: -------------------------------------------------------------------------------- 1 | int 2 | test() 3 | { 4 | int a = 0; 5 | float f = a + 1; 6 | 7 | return f == a; 8 | } 9 | 10 | #include 11 | int main() 12 | { 13 | int x = test(); 14 | printf("%d\n", x); 15 | return x; 16 | } 17 | -------------------------------------------------------------------------------- /project/tests/main/type_casts/float_to_double.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | float f1 = 80.11, f2 = 90.125; 4 | double d1; 5 | 6 | int main() { 7 | d1 = (double) (f1 + f2); 8 | printf("%f\n", d1); 9 | return 0; 10 | } -------------------------------------------------------------------------------- /project/tests/main/type_casts/int32_equal_uint32.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int any0, any1 = 2147483640, any2 = 1000; 4 | unsigned int positive0, positive1 = 4294967295, positive2 = 2000; 5 | 6 | int main() { 7 | positive0 = (unsigned int) any1 - any2; 8 | printf("%d\n", positive0); 9 | any0 = (int) positive1 - positive2; 10 | printf("%d\n", any0); 11 | return 0; 12 | } -------------------------------------------------------------------------------- /project/tests/main/type_casts/int_division_to_double.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int sum = 17, count = 5; 4 | double mean; 5 | 6 | int main() { 7 | mean = (double) sum / count; 8 | printf("%f\n", mean); 9 | } -------------------------------------------------------------------------------- /project/tests/main/type_casts/mix.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int a = 10, b = 4, number = 70, i; 4 | 5 | int main() { 6 | double e = (double)a / (double)b; 7 | printf("%f\n", e); // 2.50000 8 | char symbol = (char) number; 9 | printf("%d\n", symbol); // 70 10 | char c = 45; 11 | i = (int)c; 12 | printf("%d\n", i); // 45 13 | return 0; 14 | } -------------------------------------------------------------------------------- /project/tests/main/type_casts/type_int32_to_int64d.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int i1 = 0x98765432; 4 | long int i2 = 0x9876543210123456l; 5 | 6 | int main() { 7 | printf("%d\n", i1); 8 | printf("%ld\n", i2); 9 | printf("%ld\n", (long int)i1); 10 | i2 = (long int)i1; 11 | printf("%ld\n", i2); 12 | return 0; 13 | } 14 | -------------------------------------------------------------------------------- /project/tests/main/type_casts/type_int32_to_int64x.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int i1 = 0x98765432; 4 | long int i2 = 0x9876543210123456l; 5 | 6 | int main() { 7 | printf("%x\n", i1); 8 | printf("%lx\n", i2); 9 | // printf("%lx\n", (long int)i1); 10 | i2 = (long int)i1; 11 | printf("%lx\n", i2); 12 | return 0; 13 | } 14 | -------------------------------------------------------------------------------- /project/tests/main/type_casts/type_int64_to_int32d.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int i1 = 0x98765432; 4 | long int i2 = 0x9876543210123456l; 5 | 6 | int main() { 7 | printf("%d\n", i1); 8 | printf("%ld\n", i2); 9 | // printf("%d\n", (int)i2); 10 | i1 = -10000 + (int)i2; 11 | printf("%d\n", i1); 12 | return 0; 13 | } 14 | -------------------------------------------------------------------------------- /project/tests/main/types/type_bool/bool01.c: -------------------------------------------------------------------------------- 1 | //clang -Xclang -ast-dump -fsyntax-only main.c 2 | #include "stdio.h" 3 | _Bool b1 = 1; 4 | _Bool b2 = 0; 5 | int main() { 6 | printf("%d\n", b1); 7 | printf("%d\n", b2); 8 | return 0; 9 | } 10 | -------------------------------------------------------------------------------- /project/tests/main/types/type_bool/bool02.c: -------------------------------------------------------------------------------- 1 | #include "stdio.h" 2 | _Bool var = -18; 3 | int main() { 4 | printf("%d\n", var); 5 | } 6 | -------------------------------------------------------------------------------- /project/tests/main/types/type_bool/type_bool01.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | _Bool b1 = 1; 4 | 5 | int main() { 6 | printf("%d\n", b1); 7 | b1 = 0; 8 | printf("%d\n", b1); 9 | b1 = 1; 10 | printf("%d\n", b1); 11 | 12 | return 0; 13 | } 14 | -------------------------------------------------------------------------------- /project/tests/main/types/type_bool/type_bool02.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | _Bool b1 = 0; 4 | int i0 = 0; 5 | int i1 = 1; 6 | 7 | int main() { 8 | printf("%d\n", b1); 9 | b1 = i1; 10 | printf("%d\n", b1); 11 | b1 = i0; 12 | printf("%d\n", b1); 13 | 14 | return 0; 15 | } 16 | -------------------------------------------------------------------------------- /project/tests/main/union/global/int/int_global_union.c: -------------------------------------------------------------------------------- 1 | #include 2 | union { int a; int b; } u; 3 | int main () { 4 | 5 | u.a = 1; 6 | u.b = 3; 7 | printf("%d\n", u.a); 8 | printf("%d\n", u.b); 9 | return 0; 10 | } -------------------------------------------------------------------------------- /project/tests/main/variables/double/init_double.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | double d1; 4 | double d2 = 3.14; 5 | double d3 = 0; 6 | 7 | int main() { 8 | d1 = d2 + d3; 9 | printf("d1 = %f\n", d1); 10 | printf("d2 = %f\n", d2); 11 | printf("d3 = %f\n", d3); 12 | 13 | return 0; 14 | } 15 | -------------------------------------------------------------------------------- /project/tests/main/void/voidNoParam00.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | long long a = 5; 4 | long long b = 10; 5 | 6 | void do_math() { 7 | a = b; 8 | } 9 | 10 | void do_print() { 11 | printf("%d\n", a); 12 | } 13 | 14 | int main() { 15 | do_print(); 16 | do_math(); 17 | do_print(); 18 | return 0; 19 | } 20 | -------------------------------------------------------------------------------- /project/tests/main/void/voidNoParam01.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | long long a = 1; 4 | long long b = 2; 5 | long long c = 3; 6 | long long x; 7 | 8 | void swapABC(){ 9 | x = a; 10 | a = b; 11 | b = c; 12 | c = x; 13 | } 14 | 15 | void printALL(){ 16 | printf("%d\n", a); 17 | printf("%d\n", b); 18 | printf("%d\n", c); 19 | } 20 | 21 | int main(){ 22 | printALL(); 23 | swapABC(); 24 | printALL(); 25 | } 26 | -------------------------------------------------------------------------------- /project/tests/main/void/voidParam00.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | long long a = 6; 4 | long long b = 8; 5 | 6 | void fun(long long x) { 7 | a = b * 2; 8 | printf("%d\n", a); 9 | printf("%d\n", b); 10 | } 11 | 12 | int main(){ 13 | fun(5); 14 | fun(b); 15 | } 16 | -------------------------------------------------------------------------------- /project/tests/main/void/voidParam01.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | long long a = 6; 4 | long long b = 8; 5 | double x = 1.5; 6 | 7 | void fun(long long x, double d) { 8 | // d; 9 | // d = 0.5; 10 | // d; 11 | 12 | printf("%d\n", a); 13 | a = b * 5; 14 | printf("%d\n", a); 15 | } 16 | 17 | int main(){ 18 | fun(5, x); 19 | fun(b, 2.5); 20 | } 21 | 22 | -------------------------------------------------------------------------------- /project/tests/main/void/voidParam02.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | long long a = 6; 4 | long long b = 8; 5 | 6 | void fun(long long x) { 7 | a = b * x; 8 | printf("%d\n", a); 9 | printf("%d\n", b); 10 | } 11 | 12 | int main(){ 13 | fun(5); 14 | fun(b); 15 | } 16 | 17 | -------------------------------------------------------------------------------- /project/tests/main/void/voidParam03.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | long long a = 6; 4 | long long b = 8; 5 | 6 | void fun(long long x) { 7 | a = b * x; 8 | printf("%d\n", a); 9 | printf("%d\n", b); 10 | return; 11 | } 12 | 13 | int main(){ 14 | fun(5); 15 | fun(b); 16 | } 17 | 18 | -------------------------------------------------------------------------------- /project/tests/main/void/voidParam04.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | long long a = 6; 4 | long long b = 8; 5 | 6 | void print_min(long long x, long long y) { 7 | if (x < y) 8 | { 9 | printf("%lld\n", x); 10 | return; 11 | } 12 | printf("%lld\n", y); 13 | } 14 | 15 | int main(){ 16 | print_min(a,b); 17 | print_min(b,a); 18 | } 19 | 20 | -------------------------------------------------------------------------------- /renovate.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://docs.renovatebot.com/renovate-schema.json", 3 | "extends": [ 4 | "config:base" 5 | ] 6 | } 7 | --------------------------------------------------------------------------------