scc

simple c99 compiler
git clone git://git.simple-cc.org/scc
Log | Files | Refs | README | LICENSE

commit 1fd3798827592044f688faf835df1e89ff8a760e
parent cd66db0558e949eed6116d0eb4cf0fb11ce3dd61
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Sun,  6 Oct 2019 21:56:43 +0200

[tests] Rename scc to cc

Follow with the changes in other places of the code..

Diffstat:
Mtests/Makefile | 2+-
Rtests/scc/error/0001-sanity.c -> tests/cc/error/0001-sanity.c | 0
Rtests/scc/error/0002-missinginclude.c -> tests/cc/error/0002-missinginclude.c | 0
Rtests/scc/error/0003-junkinclude.c -> tests/cc/error/0003-junkinclude.c | 0
Rtests/scc/error/0004-macroredef.c -> tests/cc/error/0004-macroredef.c | 0
Rtests/scc/error/0005-fmacro.c -> tests/cc/error/0005-fmacro.c | 0
Rtests/scc/error/0006-endif.c -> tests/cc/error/0006-endif.c | 0
Rtests/scc/error/0007-unmatchedcppif.c -> tests/cc/error/0007-unmatchedcppif.c | 0
Rtests/scc/error/0008-unmatchedcppelse.c -> tests/cc/error/0008-unmatchedcppelse.c | 0
Rtests/scc/error/0009-unmatchedcppelif.c -> tests/cc/error/0009-unmatchedcppelif.c | 0
Rtests/scc/error/0010-extraelif.c -> tests/cc/error/0010-extraelif.c | 0
Rtests/scc/error/0011-extraelse.c -> tests/cc/error/0011-extraelse.c | 0
Rtests/scc/error/0012-ifnoexpr.c -> tests/cc/error/0012-ifnoexpr.c | 0
Rtests/scc/error/0013-macro.c -> tests/cc/error/0013-macro.c | 0
Rtests/scc/error/0014-macro.c -> tests/cc/error/0014-macro.c | 0
Rtests/scc/error/0015-macro.c -> tests/cc/error/0015-macro.c | 0
Rtests/scc/error/0016-arrayinitsize.c -> tests/cc/error/0016-arrayinitsize.c | 0
Rtests/scc/error/0017-duplicatefunc.c -> tests/cc/error/0017-duplicatefunc.c | 0
Rtests/scc/error/0018-voidparam.c -> tests/cc/error/0018-voidparam.c | 0
Rtests/scc/error/0019-kr_names.c -> tests/cc/error/0019-kr_names.c | 0
Rtests/scc/error/0020-storage.c -> tests/cc/error/0020-storage.c | 0
Rtests/scc/error/0021-namespace.c -> tests/cc/error/0021-namespace.c | 0
Rtests/scc/error/0021-void.c -> tests/cc/error/0021-void.c | 0
Rtests/scc/error/0022-cpp-if.c -> tests/cc/error/0022-cpp-if.c | 0
Rtests/scc/error/0023-include.c -> tests/cc/error/0023-include.c | 0
Rtests/scc/error/0023-include.h -> tests/cc/error/0023-include.h | 0
Rtests/scc/error/Makefile -> tests/cc/error/Makefile | 0
Rtests/scc/error/README -> tests/cc/error/README | 0
Rtests/scc/error/chktest.sh -> tests/cc/error/chktest.sh | 0
Rtests/scc/error/scc-tests.lst -> tests/cc/error/scc-tests.lst | 0
Rtests/scc/error/update.sh -> tests/cc/error/update.sh | 0
Rtests/scc/execute/0001-sanity.c -> tests/cc/execute/0001-sanity.c | 0
Rtests/scc/execute/0002-expr.c -> tests/cc/execute/0002-expr.c | 0
Rtests/scc/execute/0003-local.c -> tests/cc/execute/0003-local.c | 0
Rtests/scc/execute/0004-pointer.c -> tests/cc/execute/0004-pointer.c | 0
Rtests/scc/execute/0005-ifstmt.c -> tests/cc/execute/0005-ifstmt.c | 0
Rtests/scc/execute/0006-whilestmt.c -> tests/cc/execute/0006-whilestmt.c | 0
Rtests/scc/execute/0007-forstmt.c -> tests/cc/execute/0007-forstmt.c | 0
Rtests/scc/execute/0008-dowhilestmt.c -> tests/cc/execute/0008-dowhilestmt.c | 0
Rtests/scc/execute/0009-expr.c -> tests/cc/execute/0009-expr.c | 0
Rtests/scc/execute/0010-goto.c -> tests/cc/execute/0010-goto.c | 0
Rtests/scc/execute/0011-assign.c -> tests/cc/execute/0011-assign.c | 0
Rtests/scc/execute/0012-expr.c -> tests/cc/execute/0012-expr.c | 0
Rtests/scc/execute/0013-addridx.c -> tests/cc/execute/0013-addridx.c | 0
Rtests/scc/execute/0014-assignidx.c -> tests/cc/execute/0014-assignidx.c | 0
Rtests/scc/execute/0015-localarray.c -> tests/cc/execute/0015-localarray.c | 0
Rtests/scc/execute/0016-addrarray.c -> tests/cc/execute/0016-addrarray.c | 0
Rtests/scc/execute/0017-struct.c -> tests/cc/execute/0017-struct.c | 0
Rtests/scc/execute/0018-structptr.c -> tests/cc/execute/0018-structptr.c | 0
Rtests/scc/execute/0019-selfrefstruct.c -> tests/cc/execute/0019-selfrefstruct.c | 0
Rtests/scc/execute/0020-ptrptr.c -> tests/cc/execute/0020-ptrptr.c | 0
Rtests/scc/execute/0021-intfunc.c -> tests/cc/execute/0021-intfunc.c | 0
Rtests/scc/execute/0022-typedef.c -> tests/cc/execute/0022-typedef.c | 0
Rtests/scc/execute/0023-global.c -> tests/cc/execute/0023-global.c | 0
Rtests/scc/execute/0024-typedefstruct.c -> tests/cc/execute/0024-typedefstruct.c | 0
Rtests/scc/execute/0025-string.c -> tests/cc/execute/0025-string.c | 0
Rtests/scc/execute/0026-implicitret.c -> tests/cc/execute/0026-implicitret.c | 0
Rtests/scc/execute/0027-charval.c -> tests/cc/execute/0027-charval.c | 0
Rtests/scc/execute/0028-bor.c -> tests/cc/execute/0028-bor.c | 0
Rtests/scc/execute/0029-band.c -> tests/cc/execute/0029-band.c | 0
Rtests/scc/execute/0030-bxor.c -> tests/cc/execute/0030-bxor.c | 0
Rtests/scc/execute/0031-relop.c -> tests/cc/execute/0031-relop.c | 0
Rtests/scc/execute/0032-indec.c -> tests/cc/execute/0032-indec.c | 0
Rtests/scc/execute/0033-ptrindec.c -> tests/cc/execute/0033-ptrindec.c | 0
Rtests/scc/execute/0034-logandor.c -> tests/cc/execute/0034-logandor.c | 0
Rtests/scc/execute/0035-breakcont.c -> tests/cc/execute/0035-breakcont.c | 0
Rtests/scc/execute/0036-notneg.c -> tests/cc/execute/0036-notneg.c | 0
Rtests/scc/execute/0037-assignop.c -> tests/cc/execute/0037-assignop.c | 0
Rtests/scc/execute/0038-ptradd.c -> tests/cc/execute/0038-ptradd.c | 0
Rtests/scc/execute/0039-sizeof.c -> tests/cc/execute/0039-sizeof.c | 0
Rtests/scc/execute/0040-cast.c -> tests/cc/execute/0040-cast.c | 0
Rtests/scc/execute/0041-queen.c -> tests/cc/execute/0041-queen.c | 0
Rtests/scc/execute/0042-prime.c -> tests/cc/execute/0042-prime.c | 0
Rtests/scc/execute/0043-union.c -> tests/cc/execute/0043-union.c | 0
Rtests/scc/execute/0044-struct.c -> tests/cc/execute/0044-struct.c | 0
Rtests/scc/execute/0045-struct.c -> tests/cc/execute/0045-struct.c | 0
Rtests/scc/execute/0046-inits.c -> tests/cc/execute/0046-inits.c | 0
Rtests/scc/execute/0047-anonexport.c -> tests/cc/execute/0047-anonexport.c | 0
Rtests/scc/execute/0048-inits.c -> tests/cc/execute/0048-inits.c | 0
Rtests/scc/execute/0049-inits.c -> tests/cc/execute/0049-inits.c | 0
Rtests/scc/execute/0050-inits.c -> tests/cc/execute/0050-inits.c | 0
Rtests/scc/execute/0051-inits.c -> tests/cc/execute/0051-inits.c | 0
Rtests/scc/execute/0052-switch.c -> tests/cc/execute/0052-switch.c | 0
Rtests/scc/execute/0053-struct.c -> tests/cc/execute/0053-struct.c | 0
Rtests/scc/execute/0054-struct.c -> tests/cc/execute/0054-struct.c | 0
Rtests/scc/execute/0055-enum.c -> tests/cc/execute/0055-enum.c | 0
Rtests/scc/execute/0056-enum.c -> tests/cc/execute/0056-enum.c | 0
Rtests/scc/execute/0057-duff.c -> tests/cc/execute/0057-duff.c | 0
Rtests/scc/execute/0058-bug.c -> tests/cc/execute/0058-bug.c | 0
Rtests/scc/execute/0059-multistring.c -> tests/cc/execute/0059-multistring.c | 0
Rtests/scc/execute/0060-charlit.c -> tests/cc/execute/0060-charlit.c | 0
Rtests/scc/execute/0061-comments.c -> tests/cc/execute/0061-comments.c | 0
Rtests/scc/execute/0062-include.c -> tests/cc/execute/0062-include.c | 0
Rtests/scc/execute/0063-define.c -> tests/cc/execute/0063-define.c | 0
Rtests/scc/execute/0064-sysinclude.c -> tests/cc/execute/0064-sysinclude.c | 0
Rtests/scc/execute/0065-ifdef.c -> tests/cc/execute/0065-ifdef.c | 0
Rtests/scc/execute/0066-cppelse.c -> tests/cc/execute/0066-cppelse.c | 0
Rtests/scc/execute/0067-define.c -> tests/cc/execute/0067-define.c | 0
Rtests/scc/execute/0068-funclikemacro.c -> tests/cc/execute/0068-funclikemacro.c | 0
Rtests/scc/execute/0069-funclikemacro.c -> tests/cc/execute/0069-funclikemacro.c | 0
Rtests/scc/execute/0070-cppif.c -> tests/cc/execute/0070-cppif.c | 0
Rtests/scc/execute/0071-cppelif.c -> tests/cc/execute/0071-cppelif.c | 0
Rtests/scc/execute/0072-cppelif.c -> tests/cc/execute/0072-cppelif.c | 0
Rtests/scc/execute/0073-ifndef.c -> tests/cc/execute/0073-ifndef.c | 0
Rtests/scc/execute/0074-undef.c -> tests/cc/execute/0074-undef.c | 0
Rtests/scc/execute/0075-ptraddasn.c -> tests/cc/execute/0075-ptraddasn.c | 0
Rtests/scc/execute/0076-ptrsubasn.c -> tests/cc/execute/0076-ptrsubasn.c | 0
Rtests/scc/execute/0077-defined.c -> tests/cc/execute/0077-defined.c | 0
Rtests/scc/execute/0078-dirifexpr.c -> tests/cc/execute/0078-dirifexpr.c | 0
Rtests/scc/execute/0079-cond.c -> tests/cc/execute/0079-cond.c | 0
Rtests/scc/execute/0080-arrays.c -> tests/cc/execute/0080-arrays.c | 0
Rtests/scc/execute/0081-calls.c -> tests/cc/execute/0081-calls.c | 0
Rtests/scc/execute/0082-bug.c -> tests/cc/execute/0082-bug.c | 0
Rtests/scc/execute/0083-voidret.c -> tests/cc/execute/0083-voidret.c | 0
Rtests/scc/execute/0084-longlong.c -> tests/cc/execute/0084-longlong.c | 0
Rtests/scc/execute/0085-ulonglong.c -> tests/cc/execute/0085-ulonglong.c | 0
Rtests/scc/execute/0086-variadic.c -> tests/cc/execute/0086-variadic.c | 0
Rtests/scc/execute/0087-variadic.c -> tests/cc/execute/0087-variadic.c | 0
Rtests/scc/execute/0088-macros.c -> tests/cc/execute/0088-macros.c | 0
Rtests/scc/execute/0089-short.c -> tests/cc/execute/0089-short.c | 0
Rtests/scc/execute/0090-fptr.c -> tests/cc/execute/0090-fptr.c | 0
Rtests/scc/execute/0091-fptr.c -> tests/cc/execute/0091-fptr.c | 0
Rtests/scc/execute/0092-fptr.c -> tests/cc/execute/0092-fptr.c | 0
Rtests/scc/execute/0093-arrayinit.c -> tests/cc/execute/0093-arrayinit.c | 0
Rtests/scc/execute/0094-arrayinit.c -> tests/cc/execute/0094-arrayinit.c | 0
Rtests/scc/execute/0095-arrayselector.c -> tests/cc/execute/0095-arrayselector.c | 0
Rtests/scc/execute/0096-inferredarraysize.c -> tests/cc/execute/0096-inferredarraysize.c | 0
Rtests/scc/execute/0097-extern.c -> tests/cc/execute/0097-extern.c | 0
Rtests/scc/execute/0098-tentative.c -> tests/cc/execute/0098-tentative.c | 0
Rtests/scc/execute/0099-tentative.c -> tests/cc/execute/0099-tentative.c | 0
Rtests/scc/execute/0100-redeclaremacro.c -> tests/cc/execute/0100-redeclaremacro.c | 0
Rtests/scc/execute/0101-wcharlit.c -> tests/cc/execute/0101-wcharlit.c | 0
Rtests/scc/execute/0102-bug.c -> tests/cc/execute/0102-bug.c | 0
Rtests/scc/execute/0103-voidparm.c -> tests/cc/execute/0103-voidparm.c | 0
Rtests/scc/execute/0104-qbebug.c -> tests/cc/execute/0104-qbebug.c | 0
Rtests/scc/execute/0105-shl.c -> tests/cc/execute/0105-shl.c | 0
Rtests/scc/execute/0106-ppcast.c -> tests/cc/execute/0106-ppcast.c | 0
Rtests/scc/execute/0107-bnot.c -> tests/cc/execute/0107-bnot.c | 0
Rtests/scc/execute/0108-bug.c -> tests/cc/execute/0108-bug.c | 0
Rtests/scc/execute/0109-struct.c -> tests/cc/execute/0109-struct.c | 0
Rtests/scc/execute/0110-typedefcast.c -> tests/cc/execute/0110-typedefcast.c | 0
Rtests/scc/execute/0111-doubledef.c -> tests/cc/execute/0111-doubledef.c | 0
Rtests/scc/execute/0112-cond.c -> tests/cc/execute/0112-cond.c | 0
Rtests/scc/execute/0113-externredecl.c -> tests/cc/execute/0113-externredecl.c | 0
Rtests/scc/execute/0114-shortassig.c -> tests/cc/execute/0114-shortassig.c | 0
Rtests/scc/execute/0115-null-comparision.c -> tests/cc/execute/0115-null-comparision.c | 0
Rtests/scc/execute/0116-floatcmp.c -> tests/cc/execute/0116-floatcmp.c | 0
Rtests/scc/execute/0117-pointarith.c -> tests/cc/execute/0117-pointarith.c | 0
Rtests/scc/execute/0118-voidmain.c -> tests/cc/execute/0118-voidmain.c | 0
Rtests/scc/execute/0119-macrostr.c -> tests/cc/execute/0119-macrostr.c | 0
Rtests/scc/execute/0120-funpar.c -> tests/cc/execute/0120-funpar.c | 0
Rtests/scc/execute/0121-localinit.c -> tests/cc/execute/0121-localinit.c | 0
Rtests/scc/execute/0122-localinit.c -> tests/cc/execute/0122-localinit.c | 0
Rtests/scc/execute/0123-doubleconst.c -> tests/cc/execute/0123-doubleconst.c | 0
Rtests/scc/execute/0124-enumstruct.c -> tests/cc/execute/0124-enumstruct.c | 0
Rtests/scc/execute/0125-fundcl.c -> tests/cc/execute/0125-fundcl.c | 0
Rtests/scc/execute/0126-macropar.c -> tests/cc/execute/0126-macropar.c | 0
Rtests/scc/execute/0127-doublecte.c -> tests/cc/execute/0127-doublecte.c | 0
Rtests/scc/execute/0128-kr_names.c -> tests/cc/execute/0128-kr_names.c | 0
Rtests/scc/execute/0129-initi.c -> tests/cc/execute/0129-initi.c | 0
Rtests/scc/execute/0130-mulpars.c -> tests/cc/execute/0130-mulpars.c | 0
Rtests/scc/execute/0131-hello.c -> tests/cc/execute/0131-hello.c | 0
Rtests/scc/execute/0132-forward.c -> tests/cc/execute/0132-forward.c | 0
Rtests/scc/execute/0133-ftn-ptr.c -> tests/cc/execute/0133-ftn-ptr.c | 0
Rtests/scc/execute/0134-arith.c -> tests/cc/execute/0134-arith.c | 0
Rtests/scc/execute/0135-unary.c -> tests/cc/execute/0135-unary.c | 0
Rtests/scc/execute/0136-if.c -> tests/cc/execute/0136-if.c | 0
Rtests/scc/execute/0137-int-cast.c -> tests/cc/execute/0137-int-cast.c | 0
Rtests/scc/execute/0138-namespace.c -> tests/cc/execute/0138-namespace.c | 0
Rtests/scc/execute/0139-ptr-ary.c -> tests/cc/execute/0139-ptr-ary.c | 0
Rtests/scc/execute/0140-int-fold.c -> tests/cc/execute/0140-int-fold.c | 0
Rtests/scc/execute/0141-int-iden.c -> tests/cc/execute/0141-int-iden.c | 0
Rtests/scc/execute/0142-char-const.c -> tests/cc/execute/0142-char-const.c | 0
Rtests/scc/execute/0143-int-const.c -> tests/cc/execute/0143-int-const.c | 0
Rtests/scc/execute/0144-long-const.c -> tests/cc/execute/0144-long-const.c | 0
Rtests/scc/execute/0145-llong-const.c -> tests/cc/execute/0145-llong-const.c | 0
Rtests/scc/execute/0146-ifdef.c -> tests/cc/execute/0146-ifdef.c | 0
Rtests/scc/execute/0147-intern-cpp.c -> tests/cc/execute/0147-intern-cpp.c | 0
Rtests/scc/execute/0148-cpp-string.c -> tests/cc/execute/0148-cpp-string.c | 0
Rtests/scc/execute/0149-define.c -> tests/cc/execute/0149-define.c | 0
Rtests/scc/execute/0150-define.c -> tests/cc/execute/0150-define.c | 0
Rtests/scc/execute/0151-vararg.c -> tests/cc/execute/0151-vararg.c | 0
Rtests/scc/execute/0152-cat.c -> tests/cc/execute/0152-cat.c | 0
Rtests/scc/execute/0153-cpp-string.c -> tests/cc/execute/0153-cpp-string.c | 0
Rtests/scc/execute/0154-if-defined.c -> tests/cc/execute/0154-if-defined.c | 0
Rtests/scc/execute/0155-struct-compl.c -> tests/cc/execute/0155-struct-compl.c | 0
Rtests/scc/execute/0156-duff2.c -> tests/cc/execute/0156-duff2.c | 0
Rtests/scc/execute/0157-list.c -> tests/cc/execute/0157-list.c | 0
Rtests/scc/execute/0158-ternary.c -> tests/cc/execute/0158-ternary.c | 0
Rtests/scc/execute/0159-typedef.c -> tests/cc/execute/0159-typedef.c | 0
Rtests/scc/execute/0160-cpp-if.c -> tests/cc/execute/0160-cpp-if.c | 0
Rtests/scc/execute/0161-struct.c -> tests/cc/execute/0161-struct.c | 0
Rtests/scc/execute/0162-array.c -> tests/cc/execute/0162-array.c | 0
Rtests/scc/execute/0163-array.c -> tests/cc/execute/0163-array.c | 0
Rtests/scc/execute/0164-struct.c -> tests/cc/execute/0164-struct.c | 0
Rtests/scc/execute/0165-struct.c -> tests/cc/execute/0165-struct.c | 0
Rtests/scc/execute/0166-desig.c -> tests/cc/execute/0166-desig.c | 0
Rtests/scc/execute/0167-array.c -> tests/cc/execute/0167-array.c | 0
Rtests/scc/execute/0168-array.c -> tests/cc/execute/0168-array.c | 0
Rtests/scc/execute/0169-string.c -> tests/cc/execute/0169-string.c | 0
Rtests/scc/execute/0170-line.c -> tests/cc/execute/0170-line.c | 0
Atests/cc/execute/0171-macros.c | 10++++++++++
Atests/cc/execute/0172-hexa.c | 13+++++++++++++
Atests/cc/execute/0173-macro.c | 13+++++++++++++
Atests/cc/execute/0174-decay.c | 24++++++++++++++++++++++++
Rtests/scc/execute/0077-defined.c -> tests/cc/execute/0175-defined.c | 0
Atests/cc/execute/0176-macro.c | 21+++++++++++++++++++++
Atests/cc/execute/0177-literal.c | 9+++++++++
Atests/cc/execute/0178-include.c | 8++++++++
Atests/cc/execute/0178-include.h | 1+
Atests/cc/execute/0179-sizeof.c | 6++++++
Atests/cc/execute/0180-incomplete.c | 13+++++++++++++
Atests/cc/execute/0181-stringize.c | 16++++++++++++++++
Atests/cc/execute/Makefile | 12++++++++++++
Rtests/scc/error/README -> tests/cc/execute/README | 0
Atests/cc/execute/chktest.sh | 24++++++++++++++++++++++++
Atests/cc/execute/compose.sh | 23+++++++++++++++++++++++
Atests/cc/execute/include/0062-include.h | 5+++++
Atests/cc/execute/include/0062-include2.h | 2++
Atests/cc/execute/scc-tests.lst | 174+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Atests/cc/execute/sysinclude/0064-sysinclude.h | 4++++
Atests/cc/execute/sysinclude/0064-sysinclude2.h | 1+
Dtests/scc/execute/0171-macros.c | 10----------
Dtests/scc/execute/0172-hexa.c | 13-------------
Dtests/scc/execute/0173-macro.c | 13-------------
Dtests/scc/execute/0174-decay.c | 24------------------------
Dtests/scc/execute/0175-defined.c | 32--------------------------------
Dtests/scc/execute/0176-macro.c | 21---------------------
Dtests/scc/execute/0177-literal.c | 9---------
Dtests/scc/execute/0178-include.c | 8--------
Dtests/scc/execute/0178-include.h | 1-
Dtests/scc/execute/0179-sizeof.c | 6------
Dtests/scc/execute/0180-incomplete.c | 13-------------
Dtests/scc/execute/0181-stringize.c | 16----------------
Dtests/scc/execute/Makefile | 12------------
Dtests/scc/execute/README | 2--
Dtests/scc/execute/chktest.sh | 24------------------------
Dtests/scc/execute/compose.sh | 23-----------------------
Dtests/scc/execute/include/0062-include.h | 5-----
Dtests/scc/execute/include/0062-include2.h | 2--
Dtests/scc/execute/scc-tests.lst | 174-------------------------------------------------------------------------------
Dtests/scc/execute/sysinclude/0064-sysinclude.h | 4----
Dtests/scc/execute/sysinclude/0064-sysinclude2.h | 1-
243 files changed, 380 insertions(+), 414 deletions(-)

diff --git a/tests/Makefile b/tests/Makefile @@ -10,7 +10,7 @@ DIRS=ar/execute \ size/execute \ strip/execute \ libc/execute \ - scc/execute scc/error + cc/execute cc/error all clean: $(FORALL) diff --git a/tests/scc/error/0001-sanity.c b/tests/cc/error/0001-sanity.c diff --git a/tests/scc/error/0002-missinginclude.c b/tests/cc/error/0002-missinginclude.c diff --git a/tests/scc/error/0003-junkinclude.c b/tests/cc/error/0003-junkinclude.c diff --git a/tests/scc/error/0004-macroredef.c b/tests/cc/error/0004-macroredef.c diff --git a/tests/scc/error/0005-fmacro.c b/tests/cc/error/0005-fmacro.c diff --git a/tests/scc/error/0006-endif.c b/tests/cc/error/0006-endif.c diff --git a/tests/scc/error/0007-unmatchedcppif.c b/tests/cc/error/0007-unmatchedcppif.c diff --git a/tests/scc/error/0008-unmatchedcppelse.c b/tests/cc/error/0008-unmatchedcppelse.c diff --git a/tests/scc/error/0009-unmatchedcppelif.c b/tests/cc/error/0009-unmatchedcppelif.c diff --git a/tests/scc/error/0010-extraelif.c b/tests/cc/error/0010-extraelif.c diff --git a/tests/scc/error/0011-extraelse.c b/tests/cc/error/0011-extraelse.c diff --git a/tests/scc/error/0012-ifnoexpr.c b/tests/cc/error/0012-ifnoexpr.c diff --git a/tests/scc/error/0013-macro.c b/tests/cc/error/0013-macro.c diff --git a/tests/scc/error/0014-macro.c b/tests/cc/error/0014-macro.c diff --git a/tests/scc/error/0015-macro.c b/tests/cc/error/0015-macro.c diff --git a/tests/scc/error/0016-arrayinitsize.c b/tests/cc/error/0016-arrayinitsize.c diff --git a/tests/scc/error/0017-duplicatefunc.c b/tests/cc/error/0017-duplicatefunc.c diff --git a/tests/scc/error/0018-voidparam.c b/tests/cc/error/0018-voidparam.c diff --git a/tests/scc/error/0019-kr_names.c b/tests/cc/error/0019-kr_names.c diff --git a/tests/scc/error/0020-storage.c b/tests/cc/error/0020-storage.c diff --git a/tests/scc/error/0021-namespace.c b/tests/cc/error/0021-namespace.c diff --git a/tests/scc/error/0021-void.c b/tests/cc/error/0021-void.c diff --git a/tests/scc/error/0022-cpp-if.c b/tests/cc/error/0022-cpp-if.c diff --git a/tests/scc/error/0023-include.c b/tests/cc/error/0023-include.c diff --git a/tests/scc/error/0023-include.h b/tests/cc/error/0023-include.h diff --git a/tests/scc/error/Makefile b/tests/cc/error/Makefile diff --git a/tests/scc/error/README b/tests/cc/error/README diff --git a/tests/scc/error/chktest.sh b/tests/cc/error/chktest.sh diff --git a/tests/scc/error/scc-tests.lst b/tests/cc/error/scc-tests.lst diff --git a/tests/scc/error/update.sh b/tests/cc/error/update.sh diff --git a/tests/scc/execute/0001-sanity.c b/tests/cc/execute/0001-sanity.c diff --git a/tests/scc/execute/0002-expr.c b/tests/cc/execute/0002-expr.c diff --git a/tests/scc/execute/0003-local.c b/tests/cc/execute/0003-local.c diff --git a/tests/scc/execute/0004-pointer.c b/tests/cc/execute/0004-pointer.c diff --git a/tests/scc/execute/0005-ifstmt.c b/tests/cc/execute/0005-ifstmt.c diff --git a/tests/scc/execute/0006-whilestmt.c b/tests/cc/execute/0006-whilestmt.c diff --git a/tests/scc/execute/0007-forstmt.c b/tests/cc/execute/0007-forstmt.c diff --git a/tests/scc/execute/0008-dowhilestmt.c b/tests/cc/execute/0008-dowhilestmt.c diff --git a/tests/scc/execute/0009-expr.c b/tests/cc/execute/0009-expr.c diff --git a/tests/scc/execute/0010-goto.c b/tests/cc/execute/0010-goto.c diff --git a/tests/scc/execute/0011-assign.c b/tests/cc/execute/0011-assign.c diff --git a/tests/scc/execute/0012-expr.c b/tests/cc/execute/0012-expr.c diff --git a/tests/scc/execute/0013-addridx.c b/tests/cc/execute/0013-addridx.c diff --git a/tests/scc/execute/0014-assignidx.c b/tests/cc/execute/0014-assignidx.c diff --git a/tests/scc/execute/0015-localarray.c b/tests/cc/execute/0015-localarray.c diff --git a/tests/scc/execute/0016-addrarray.c b/tests/cc/execute/0016-addrarray.c diff --git a/tests/scc/execute/0017-struct.c b/tests/cc/execute/0017-struct.c diff --git a/tests/scc/execute/0018-structptr.c b/tests/cc/execute/0018-structptr.c diff --git a/tests/scc/execute/0019-selfrefstruct.c b/tests/cc/execute/0019-selfrefstruct.c diff --git a/tests/scc/execute/0020-ptrptr.c b/tests/cc/execute/0020-ptrptr.c diff --git a/tests/scc/execute/0021-intfunc.c b/tests/cc/execute/0021-intfunc.c diff --git a/tests/scc/execute/0022-typedef.c b/tests/cc/execute/0022-typedef.c diff --git a/tests/scc/execute/0023-global.c b/tests/cc/execute/0023-global.c diff --git a/tests/scc/execute/0024-typedefstruct.c b/tests/cc/execute/0024-typedefstruct.c diff --git a/tests/scc/execute/0025-string.c b/tests/cc/execute/0025-string.c diff --git a/tests/scc/execute/0026-implicitret.c b/tests/cc/execute/0026-implicitret.c diff --git a/tests/scc/execute/0027-charval.c b/tests/cc/execute/0027-charval.c diff --git a/tests/scc/execute/0028-bor.c b/tests/cc/execute/0028-bor.c diff --git a/tests/scc/execute/0029-band.c b/tests/cc/execute/0029-band.c diff --git a/tests/scc/execute/0030-bxor.c b/tests/cc/execute/0030-bxor.c diff --git a/tests/scc/execute/0031-relop.c b/tests/cc/execute/0031-relop.c diff --git a/tests/scc/execute/0032-indec.c b/tests/cc/execute/0032-indec.c diff --git a/tests/scc/execute/0033-ptrindec.c b/tests/cc/execute/0033-ptrindec.c diff --git a/tests/scc/execute/0034-logandor.c b/tests/cc/execute/0034-logandor.c diff --git a/tests/scc/execute/0035-breakcont.c b/tests/cc/execute/0035-breakcont.c diff --git a/tests/scc/execute/0036-notneg.c b/tests/cc/execute/0036-notneg.c diff --git a/tests/scc/execute/0037-assignop.c b/tests/cc/execute/0037-assignop.c diff --git a/tests/scc/execute/0038-ptradd.c b/tests/cc/execute/0038-ptradd.c diff --git a/tests/scc/execute/0039-sizeof.c b/tests/cc/execute/0039-sizeof.c diff --git a/tests/scc/execute/0040-cast.c b/tests/cc/execute/0040-cast.c diff --git a/tests/scc/execute/0041-queen.c b/tests/cc/execute/0041-queen.c diff --git a/tests/scc/execute/0042-prime.c b/tests/cc/execute/0042-prime.c diff --git a/tests/scc/execute/0043-union.c b/tests/cc/execute/0043-union.c diff --git a/tests/scc/execute/0044-struct.c b/tests/cc/execute/0044-struct.c diff --git a/tests/scc/execute/0045-struct.c b/tests/cc/execute/0045-struct.c diff --git a/tests/scc/execute/0046-inits.c b/tests/cc/execute/0046-inits.c diff --git a/tests/scc/execute/0047-anonexport.c b/tests/cc/execute/0047-anonexport.c diff --git a/tests/scc/execute/0048-inits.c b/tests/cc/execute/0048-inits.c diff --git a/tests/scc/execute/0049-inits.c b/tests/cc/execute/0049-inits.c diff --git a/tests/scc/execute/0050-inits.c b/tests/cc/execute/0050-inits.c diff --git a/tests/scc/execute/0051-inits.c b/tests/cc/execute/0051-inits.c diff --git a/tests/scc/execute/0052-switch.c b/tests/cc/execute/0052-switch.c diff --git a/tests/scc/execute/0053-struct.c b/tests/cc/execute/0053-struct.c diff --git a/tests/scc/execute/0054-struct.c b/tests/cc/execute/0054-struct.c diff --git a/tests/scc/execute/0055-enum.c b/tests/cc/execute/0055-enum.c diff --git a/tests/scc/execute/0056-enum.c b/tests/cc/execute/0056-enum.c diff --git a/tests/scc/execute/0057-duff.c b/tests/cc/execute/0057-duff.c diff --git a/tests/scc/execute/0058-bug.c b/tests/cc/execute/0058-bug.c diff --git a/tests/scc/execute/0059-multistring.c b/tests/cc/execute/0059-multistring.c diff --git a/tests/scc/execute/0060-charlit.c b/tests/cc/execute/0060-charlit.c diff --git a/tests/scc/execute/0061-comments.c b/tests/cc/execute/0061-comments.c diff --git a/tests/scc/execute/0062-include.c b/tests/cc/execute/0062-include.c diff --git a/tests/scc/execute/0063-define.c b/tests/cc/execute/0063-define.c diff --git a/tests/scc/execute/0064-sysinclude.c b/tests/cc/execute/0064-sysinclude.c diff --git a/tests/scc/execute/0065-ifdef.c b/tests/cc/execute/0065-ifdef.c diff --git a/tests/scc/execute/0066-cppelse.c b/tests/cc/execute/0066-cppelse.c diff --git a/tests/scc/execute/0067-define.c b/tests/cc/execute/0067-define.c diff --git a/tests/scc/execute/0068-funclikemacro.c b/tests/cc/execute/0068-funclikemacro.c diff --git a/tests/scc/execute/0069-funclikemacro.c b/tests/cc/execute/0069-funclikemacro.c diff --git a/tests/scc/execute/0070-cppif.c b/tests/cc/execute/0070-cppif.c diff --git a/tests/scc/execute/0071-cppelif.c b/tests/cc/execute/0071-cppelif.c diff --git a/tests/scc/execute/0072-cppelif.c b/tests/cc/execute/0072-cppelif.c diff --git a/tests/scc/execute/0073-ifndef.c b/tests/cc/execute/0073-ifndef.c diff --git a/tests/scc/execute/0074-undef.c b/tests/cc/execute/0074-undef.c diff --git a/tests/scc/execute/0075-ptraddasn.c b/tests/cc/execute/0075-ptraddasn.c diff --git a/tests/scc/execute/0076-ptrsubasn.c b/tests/cc/execute/0076-ptrsubasn.c diff --git a/tests/scc/execute/0077-defined.c b/tests/cc/execute/0077-defined.c diff --git a/tests/scc/execute/0078-dirifexpr.c b/tests/cc/execute/0078-dirifexpr.c diff --git a/tests/scc/execute/0079-cond.c b/tests/cc/execute/0079-cond.c diff --git a/tests/scc/execute/0080-arrays.c b/tests/cc/execute/0080-arrays.c diff --git a/tests/scc/execute/0081-calls.c b/tests/cc/execute/0081-calls.c diff --git a/tests/scc/execute/0082-bug.c b/tests/cc/execute/0082-bug.c diff --git a/tests/scc/execute/0083-voidret.c b/tests/cc/execute/0083-voidret.c diff --git a/tests/scc/execute/0084-longlong.c b/tests/cc/execute/0084-longlong.c diff --git a/tests/scc/execute/0085-ulonglong.c b/tests/cc/execute/0085-ulonglong.c diff --git a/tests/scc/execute/0086-variadic.c b/tests/cc/execute/0086-variadic.c diff --git a/tests/scc/execute/0087-variadic.c b/tests/cc/execute/0087-variadic.c diff --git a/tests/scc/execute/0088-macros.c b/tests/cc/execute/0088-macros.c diff --git a/tests/scc/execute/0089-short.c b/tests/cc/execute/0089-short.c diff --git a/tests/scc/execute/0090-fptr.c b/tests/cc/execute/0090-fptr.c diff --git a/tests/scc/execute/0091-fptr.c b/tests/cc/execute/0091-fptr.c diff --git a/tests/scc/execute/0092-fptr.c b/tests/cc/execute/0092-fptr.c diff --git a/tests/scc/execute/0093-arrayinit.c b/tests/cc/execute/0093-arrayinit.c diff --git a/tests/scc/execute/0094-arrayinit.c b/tests/cc/execute/0094-arrayinit.c diff --git a/tests/scc/execute/0095-arrayselector.c b/tests/cc/execute/0095-arrayselector.c diff --git a/tests/scc/execute/0096-inferredarraysize.c b/tests/cc/execute/0096-inferredarraysize.c diff --git a/tests/scc/execute/0097-extern.c b/tests/cc/execute/0097-extern.c diff --git a/tests/scc/execute/0098-tentative.c b/tests/cc/execute/0098-tentative.c diff --git a/tests/scc/execute/0099-tentative.c b/tests/cc/execute/0099-tentative.c diff --git a/tests/scc/execute/0100-redeclaremacro.c b/tests/cc/execute/0100-redeclaremacro.c diff --git a/tests/scc/execute/0101-wcharlit.c b/tests/cc/execute/0101-wcharlit.c diff --git a/tests/scc/execute/0102-bug.c b/tests/cc/execute/0102-bug.c diff --git a/tests/scc/execute/0103-voidparm.c b/tests/cc/execute/0103-voidparm.c diff --git a/tests/scc/execute/0104-qbebug.c b/tests/cc/execute/0104-qbebug.c diff --git a/tests/scc/execute/0105-shl.c b/tests/cc/execute/0105-shl.c diff --git a/tests/scc/execute/0106-ppcast.c b/tests/cc/execute/0106-ppcast.c diff --git a/tests/scc/execute/0107-bnot.c b/tests/cc/execute/0107-bnot.c diff --git a/tests/scc/execute/0108-bug.c b/tests/cc/execute/0108-bug.c diff --git a/tests/scc/execute/0109-struct.c b/tests/cc/execute/0109-struct.c diff --git a/tests/scc/execute/0110-typedefcast.c b/tests/cc/execute/0110-typedefcast.c diff --git a/tests/scc/execute/0111-doubledef.c b/tests/cc/execute/0111-doubledef.c diff --git a/tests/scc/execute/0112-cond.c b/tests/cc/execute/0112-cond.c diff --git a/tests/scc/execute/0113-externredecl.c b/tests/cc/execute/0113-externredecl.c diff --git a/tests/scc/execute/0114-shortassig.c b/tests/cc/execute/0114-shortassig.c diff --git a/tests/scc/execute/0115-null-comparision.c b/tests/cc/execute/0115-null-comparision.c diff --git a/tests/scc/execute/0116-floatcmp.c b/tests/cc/execute/0116-floatcmp.c diff --git a/tests/scc/execute/0117-pointarith.c b/tests/cc/execute/0117-pointarith.c diff --git a/tests/scc/execute/0118-voidmain.c b/tests/cc/execute/0118-voidmain.c diff --git a/tests/scc/execute/0119-macrostr.c b/tests/cc/execute/0119-macrostr.c diff --git a/tests/scc/execute/0120-funpar.c b/tests/cc/execute/0120-funpar.c diff --git a/tests/scc/execute/0121-localinit.c b/tests/cc/execute/0121-localinit.c diff --git a/tests/scc/execute/0122-localinit.c b/tests/cc/execute/0122-localinit.c diff --git a/tests/scc/execute/0123-doubleconst.c b/tests/cc/execute/0123-doubleconst.c diff --git a/tests/scc/execute/0124-enumstruct.c b/tests/cc/execute/0124-enumstruct.c diff --git a/tests/scc/execute/0125-fundcl.c b/tests/cc/execute/0125-fundcl.c diff --git a/tests/scc/execute/0126-macropar.c b/tests/cc/execute/0126-macropar.c diff --git a/tests/scc/execute/0127-doublecte.c b/tests/cc/execute/0127-doublecte.c diff --git a/tests/scc/execute/0128-kr_names.c b/tests/cc/execute/0128-kr_names.c diff --git a/tests/scc/execute/0129-initi.c b/tests/cc/execute/0129-initi.c diff --git a/tests/scc/execute/0130-mulpars.c b/tests/cc/execute/0130-mulpars.c diff --git a/tests/scc/execute/0131-hello.c b/tests/cc/execute/0131-hello.c diff --git a/tests/scc/execute/0132-forward.c b/tests/cc/execute/0132-forward.c diff --git a/tests/scc/execute/0133-ftn-ptr.c b/tests/cc/execute/0133-ftn-ptr.c diff --git a/tests/scc/execute/0134-arith.c b/tests/cc/execute/0134-arith.c diff --git a/tests/scc/execute/0135-unary.c b/tests/cc/execute/0135-unary.c diff --git a/tests/scc/execute/0136-if.c b/tests/cc/execute/0136-if.c diff --git a/tests/scc/execute/0137-int-cast.c b/tests/cc/execute/0137-int-cast.c diff --git a/tests/scc/execute/0138-namespace.c b/tests/cc/execute/0138-namespace.c diff --git a/tests/scc/execute/0139-ptr-ary.c b/tests/cc/execute/0139-ptr-ary.c diff --git a/tests/scc/execute/0140-int-fold.c b/tests/cc/execute/0140-int-fold.c diff --git a/tests/scc/execute/0141-int-iden.c b/tests/cc/execute/0141-int-iden.c diff --git a/tests/scc/execute/0142-char-const.c b/tests/cc/execute/0142-char-const.c diff --git a/tests/scc/execute/0143-int-const.c b/tests/cc/execute/0143-int-const.c diff --git a/tests/scc/execute/0144-long-const.c b/tests/cc/execute/0144-long-const.c diff --git a/tests/scc/execute/0145-llong-const.c b/tests/cc/execute/0145-llong-const.c diff --git a/tests/scc/execute/0146-ifdef.c b/tests/cc/execute/0146-ifdef.c diff --git a/tests/scc/execute/0147-intern-cpp.c b/tests/cc/execute/0147-intern-cpp.c diff --git a/tests/scc/execute/0148-cpp-string.c b/tests/cc/execute/0148-cpp-string.c diff --git a/tests/scc/execute/0149-define.c b/tests/cc/execute/0149-define.c diff --git a/tests/scc/execute/0150-define.c b/tests/cc/execute/0150-define.c diff --git a/tests/scc/execute/0151-vararg.c b/tests/cc/execute/0151-vararg.c diff --git a/tests/scc/execute/0152-cat.c b/tests/cc/execute/0152-cat.c diff --git a/tests/scc/execute/0153-cpp-string.c b/tests/cc/execute/0153-cpp-string.c diff --git a/tests/scc/execute/0154-if-defined.c b/tests/cc/execute/0154-if-defined.c diff --git a/tests/scc/execute/0155-struct-compl.c b/tests/cc/execute/0155-struct-compl.c diff --git a/tests/scc/execute/0156-duff2.c b/tests/cc/execute/0156-duff2.c diff --git a/tests/scc/execute/0157-list.c b/tests/cc/execute/0157-list.c diff --git a/tests/scc/execute/0158-ternary.c b/tests/cc/execute/0158-ternary.c diff --git a/tests/scc/execute/0159-typedef.c b/tests/cc/execute/0159-typedef.c diff --git a/tests/scc/execute/0160-cpp-if.c b/tests/cc/execute/0160-cpp-if.c diff --git a/tests/scc/execute/0161-struct.c b/tests/cc/execute/0161-struct.c diff --git a/tests/scc/execute/0162-array.c b/tests/cc/execute/0162-array.c diff --git a/tests/scc/execute/0163-array.c b/tests/cc/execute/0163-array.c diff --git a/tests/scc/execute/0164-struct.c b/tests/cc/execute/0164-struct.c diff --git a/tests/scc/execute/0165-struct.c b/tests/cc/execute/0165-struct.c diff --git a/tests/scc/execute/0166-desig.c b/tests/cc/execute/0166-desig.c diff --git a/tests/scc/execute/0167-array.c b/tests/cc/execute/0167-array.c diff --git a/tests/scc/execute/0168-array.c b/tests/cc/execute/0168-array.c diff --git a/tests/scc/execute/0169-string.c b/tests/cc/execute/0169-string.c diff --git a/tests/scc/execute/0170-line.c b/tests/cc/execute/0170-line.c diff --git a/tests/cc/execute/0171-macros.c b/tests/cc/execute/0171-macros.c @@ -0,0 +1,10 @@ +#define X (2) +#define L (0) +#define H (1) +#define Q(x) x + +int +main(void) +{ + return X == L + H + Q(1); +} diff --git a/tests/cc/execute/0172-hexa.c b/tests/cc/execute/0172-hexa.c @@ -0,0 +1,13 @@ +int +main(void) +{ + if (0xa != 0xA || + 0xb != 0xB || + 0xc != 0xC || + 0xd != 0xD || + 0xe != 0xE || + 0xf != 0xF) { + return 1; + } + return 0; +} diff --git a/tests/cc/execute/0173-macro.c b/tests/cc/execute/0173-macro.c @@ -0,0 +1,13 @@ +#define x f +#define y() f + +typedef struct { int f; } S; + +int +main() +{ + S s; + + s.x = 0; + return s.y(); +} diff --git a/tests/cc/execute/0174-decay.c b/tests/cc/execute/0174-decay.c @@ -0,0 +1,24 @@ +int +main(int argc, char *argv[]) +{ + int v[1]; + int (*p)[]; + int (*f1)(int ,char *[]); + int (*f2)(int ,char *[]); + + v[0] = 0; + p = &v; + f1 = &main; + f2 = main; + if (argc == 0) + return 1; + if ((****main)(0, 0)) + return 2; + if ((****f1)(0, 0)) + return 3; + if ((****f2)(0, 0)) + return 4; + if (!(*p)[0]) + return 0; + return 1; +} diff --git a/tests/scc/execute/0077-defined.c b/tests/cc/execute/0175-defined.c diff --git a/tests/cc/execute/0176-macro.c b/tests/cc/execute/0176-macro.c @@ -0,0 +1,21 @@ +#ifdef __STDC__ +#define __(proto) proto +#else +#define __(proto) () +#endif + +extern int func __((int, int)); + +int +main() +{ + int (*fun)(int,int) = func; + + return (*func)(1, 2); +} + +int +func(int a, int b) +{ + return a - b - 1; +} diff --git a/tests/cc/execute/0177-literal.c b/tests/cc/execute/0177-literal.c @@ -0,0 +1,9 @@ +void boo(int *p) +{ + return (*p[1] == 2) ? 0 : 1; +} + +int main() +{ + return boo((int[]) {0, 2}); +} diff --git a/tests/cc/execute/0178-include.c b/tests/cc/execute/0178-include.c @@ -0,0 +1,8 @@ +#define FILE "0178-include.h" +#include FILE + +int +main() +{ + return RET; +} diff --git a/tests/cc/execute/0178-include.h b/tests/cc/execute/0178-include.h @@ -0,0 +1 @@ +#define RET 0 diff --git a/tests/cc/execute/0179-sizeof.c b/tests/cc/execute/0179-sizeof.c @@ -0,0 +1,6 @@ +int +main(void) +{ + sizeof((int) 1); + return 0; +} diff --git a/tests/cc/execute/0180-incomplete.c b/tests/cc/execute/0180-incomplete.c @@ -0,0 +1,13 @@ +struct dummy; + +void * +fun(struct dummy p[]) +{ + return p; +} + +int +main() +{ + return fun(0) != 0; +} diff --git a/tests/cc/execute/0181-stringize.c b/tests/cc/execute/0181-stringize.c @@ -0,0 +1,16 @@ +#define XSTR(x) #x +#define STR(x) XSTR(x) +#define S y = "str" + +int +main() +{ + char *s, *t = STR(S); + + for (s = "y = \"str\""; *s && *t; ++s, ++t) { + if (*s != *t) + return 1; + } + + return 0; +} diff --git a/tests/cc/execute/Makefile b/tests/cc/execute/Makefile @@ -0,0 +1,12 @@ +.POSIX: + +ROOT=../../.. + +all: tests + +tests: + @CFLAGS='' SCCPREFIX=$(ROOT) PATH=$(ROOT)/bin:$$PATH ./chktest.sh scc-tests.lst + +clean: + rm -f *.as *.o *.ir *.qbe *core test.log + diff --git a/tests/scc/error/README b/tests/cc/execute/README diff --git a/tests/cc/execute/chktest.sh b/tests/cc/execute/chktest.sh @@ -0,0 +1,24 @@ +#!/bin/sh + +file=${1?' empty input file'} +trap "rm -f a.out; exit" 0 1 2 3 15 +ulimit -c 0 +rm -f test.log + +SYS=`uname | tr A-Z a-z` +FORMAT=elf +ABI=sysv +ARCH=amd64 + +export SYS FORMAT ABI ARCH + +while read i state +do + echo $i >>test.log + state=${state:-""} + rm -f a.out + + (scc -Isysinclude $CFLAGS "$i" && ./a.out) 2>>test.log && + printf '[PASS]' || printf '[FAIL]' + printf '\t%s\t%s\n' $i $state +done < $file diff --git a/tests/cc/execute/compose.sh b/tests/cc/execute/compose.sh @@ -0,0 +1,23 @@ +#!/bin/sh + +rm -f tmp_test.c +rm -f tests.h +rm -f tmp_*.c + +(echo '#include "tests.h"' +echo 'int main()' +echo '{' + +for i in *-*.c +do + n=`echo $i | sed 's/\(.*\)-.*\.c/\1/'` + sed s/main/main_$n/ < $i > tmp_$n.c + echo "int main_$n();" >> tests.h + echo "main_$n();" + +done + +echo 'return 0;' +echo '}' +) > tmp_test.c + diff --git a/tests/cc/execute/include/0062-include.h b/tests/cc/execute/include/0062-include.h @@ -0,0 +1,5 @@ +#include "0062-include2.h" + +int +main() +{ diff --git a/tests/cc/execute/include/0062-include2.h b/tests/cc/execute/include/0062-include2.h @@ -0,0 +1,2 @@ +int x; + diff --git a/tests/cc/execute/scc-tests.lst b/tests/cc/execute/scc-tests.lst @@ -0,0 +1,174 @@ +0001-sanity.c +0002-expr.c +0003-local.c +0004-pointer.c +0005-ifstmt.c +0006-whilestmt.c +0007-forstmt.c +0008-dowhilestmt.c +0009-expr.c +0010-goto.c +0011-assign.c +0012-expr.c +0013-addridx.c +0014-assignidx.c +0015-localarray.c +0016-addrarray.c +0017-struct.c +0018-structptr.c +0019-selfrefstruct.c +0020-ptrptr.c +0021-intfunc.c +0022-typedef.c +0023-global.c +0024-typedefstruct.c +0025-string.c +0026-implicitret.c +0027-charval.c +0028-bor.c +0029-band.c +0030-bxor.c +0031-relop.c +0032-indec.c +0033-ptrindec.c +0034-logandor.c +0035-breakcont.c +0036-notneg.c +0037-assignop.c +0038-ptradd.c +0039-sizeof.c +0040-cast.c +0041-queen.c +0042-prime.c +0043-union.c +0044-struct.c +0045-struct.c +0046-inits.c +0048-inits.c +0049-inits.c +0050-inits.c +0052-switch.c +0053-struct.c +0054-struct.c +0055-enum.c +0056-enum.c +0057-duff.c +0058-bug.c +0059-multistring.c +0060-charlit.c +0061-comments.c +0062-include.c +0063-define.c +0064-sysinclude.c +0065-ifdef.c +0066-cppelse.c +0067-define.c +0068-funclikemacro.c +0069-funclikemacro.c +0070-cppif.c +0071-cppelif.c +0072-cppelif.c +0073-ifndef.c +0074-undef.c +0075-ptraddasn.c +0076-ptrsubasn.c +0077-defined.c +0078-dirifexpr.c +0079-cond.c +0080-arrays.c +0081-calls.c +0082-bug.c +0083-voidret.c +0084-longlong.c +0085-ulonglong.c +0089-short.c +0090-fptr.c +0091-fptr.c +0092-fptr.c +0093-arrayinit.c +0094-arrayinit.c [TODO] +0095-arrayselector.c +0096-inferredarraysize.c +0097-extern.c +0098-tentative.c [TODO] +0099-tentative.c [TODO] +0102-bug.c +0103-voidparm.c +0104-qbebug.c +0105-shl.c +0106-ppcast.c +0107-bnot.c +0108-bug.c +0109-struct.c +0110-typedefcast.c +0111-doubledef.c +0112-cond.c +0113-externredecl.c +0114-shortassig.c [TODO] +0115-null-comparision.c +0116-floatcmp.c [TODO] +0117-pointarith.c +0118-voidmain.c [TODO] +0119-macrostr.c +0120-funpar.c +0121-localinit.c [TODO] +0122-localinit.c [TODO] +0123-doubleconst.c [TODO] +0124-enumstruct.c [TODO] +0125-fundcl.c +0126-macropar.c [TODO] +0127-doublecte.c [TODO] +0128-kr_names.c +0129-initi.c [TODO] +0130-mulpars.c +0131-hello.c [TODO] +0132-forward.c [TODO] +0133-ftn-ptr.c [TODO] +0134-arith.c [TODO] +0135-unary.c +0136-if.c +0137-int-cast.c [TODO] +0138-namespace.c +0139-ptr-ary.c [TODO] +0140-int-fold.c [TODO] +0141-int-iden.c [TODO] +0142-char-const.c [TODO] +0143-int-const.c +0144-long-const.c +0145-llong-const.c [TODO] +0146-ifdef.c +0147-intern-cpp.c +0148-cpp-string.c +0149-define.c +0150-define.c +0151-vararg.c [TODO] +0152-cat.c +0153-cpp-string.c [TODO] +0154-if-defined [TODO] +0155-struct-compl.c [TODO] +0156-duff2.c [TODO] +0157-list.c [TODO] +0158-ternary.c [TODO] +0159-typedef.c [TODO] +0160-cpp-if.c [TODO] +0161-struct.c [TODO] +0162-array.c +0163-array.c [TODO] +0164-struct.c [TODO] +0165-struct.c [TODO] +0166-desig.c [TODO] +0167-array.c [TODO] +0168-array.c [TODO] +0169-string.c [TODO] +0170-line.c [TODO] +0171-macros.c [TODO] +0172-hexa.c +0173-macro.c +0174-decay.c [TODO] +0175-defined.c +0176-macro.c [TODO] +0177-literal.c [TODO] +0178-include.c [TODO] +0179-sizeof.c [TODO] +0180-incomplete.c +0181-stringize.c [TODO] diff --git a/tests/cc/execute/sysinclude/0064-sysinclude.h b/tests/cc/execute/sysinclude/0064-sysinclude.h @@ -0,0 +1,4 @@ +#include "0064-sysinclude2.h" + +int x = 2; + diff --git a/tests/cc/execute/sysinclude/0064-sysinclude2.h b/tests/cc/execute/sysinclude/0064-sysinclude2.h @@ -0,0 +1 @@ +int y = 2; diff --git a/tests/scc/execute/0171-macros.c b/tests/scc/execute/0171-macros.c @@ -1,10 +0,0 @@ -#define X (2) -#define L (0) -#define H (1) -#define Q(x) x - -int -main(void) -{ - return X == L + H + Q(1); -} diff --git a/tests/scc/execute/0172-hexa.c b/tests/scc/execute/0172-hexa.c @@ -1,13 +0,0 @@ -int -main(void) -{ - if (0xa != 0xA || - 0xb != 0xB || - 0xc != 0xC || - 0xd != 0xD || - 0xe != 0xE || - 0xf != 0xF) { - return 1; - } - return 0; -} diff --git a/tests/scc/execute/0173-macro.c b/tests/scc/execute/0173-macro.c @@ -1,13 +0,0 @@ -#define x f -#define y() f - -typedef struct { int f; } S; - -int -main() -{ - S s; - - s.x = 0; - return s.y(); -} diff --git a/tests/scc/execute/0174-decay.c b/tests/scc/execute/0174-decay.c @@ -1,24 +0,0 @@ -int -main(int argc, char *argv[]) -{ - int v[1]; - int (*p)[]; - int (*f1)(int ,char *[]); - int (*f2)(int ,char *[]); - - v[0] = 0; - p = &v; - f1 = &main; - f2 = main; - if (argc == 0) - return 1; - if ((****main)(0, 0)) - return 2; - if ((****f1)(0, 0)) - return 3; - if ((****f2)(0, 0)) - return 4; - if (!(*p)[0]) - return 0; - return 1; -} diff --git a/tests/scc/execute/0175-defined.c b/tests/scc/execute/0175-defined.c @@ -1,32 +0,0 @@ -#if defined X -X -#endif - -#if defined(X) -X -#endif - -#if X -X -#endif - -#define X 0 - -#if X -X -#endif - -#if defined(X) -int x = 0; -#endif - -#undef X -#define X 1 - -#if X -int -main() -{ - return 0; -} -#endif diff --git a/tests/scc/execute/0176-macro.c b/tests/scc/execute/0176-macro.c @@ -1,21 +0,0 @@ -#ifdef __STDC__ -#define __(proto) proto -#else -#define __(proto) () -#endif - -extern int func __((int, int)); - -int -main() -{ - int (*fun)(int,int) = func; - - return (*func)(1, 2); -} - -int -func(int a, int b) -{ - return a - b - 1; -} diff --git a/tests/scc/execute/0177-literal.c b/tests/scc/execute/0177-literal.c @@ -1,9 +0,0 @@ -void boo(int *p) -{ - return (*p[1] == 2) ? 0 : 1; -} - -int main() -{ - return boo((int[]) {0, 2}); -} diff --git a/tests/scc/execute/0178-include.c b/tests/scc/execute/0178-include.c @@ -1,8 +0,0 @@ -#define FILE "0178-include.h" -#include FILE - -int -main() -{ - return RET; -} diff --git a/tests/scc/execute/0178-include.h b/tests/scc/execute/0178-include.h @@ -1 +0,0 @@ -#define RET 0 diff --git a/tests/scc/execute/0179-sizeof.c b/tests/scc/execute/0179-sizeof.c @@ -1,6 +0,0 @@ -int -main(void) -{ - sizeof((int) 1); - return 0; -} diff --git a/tests/scc/execute/0180-incomplete.c b/tests/scc/execute/0180-incomplete.c @@ -1,13 +0,0 @@ -struct dummy; - -void * -fun(struct dummy p[]) -{ - return p; -} - -int -main() -{ - return fun(0) != 0; -} diff --git a/tests/scc/execute/0181-stringize.c b/tests/scc/execute/0181-stringize.c @@ -1,16 +0,0 @@ -#define XSTR(x) #x -#define STR(x) XSTR(x) -#define S y = "str" - -int -main() -{ - char *s, *t = STR(S); - - for (s = "y = \"str\""; *s && *t; ++s, ++t) { - if (*s != *t) - return 1; - } - - return 0; -} diff --git a/tests/scc/execute/Makefile b/tests/scc/execute/Makefile @@ -1,12 +0,0 @@ -.POSIX: - -ROOT=../../.. - -all: tests - -tests: - @CFLAGS='' SCCPREFIX=$(ROOT) PATH=$(ROOT)/bin:$$PATH ./chktest.sh scc-tests.lst - -clean: - rm -f *.as *.o *.ir *.qbe *core test.log - diff --git a/tests/scc/execute/README b/tests/scc/execute/README @@ -1,2 +0,0 @@ -These tests are taken from https://github.com/andrewchambers/qc. -All the credits for this test suite are for Andrew Chambers. diff --git a/tests/scc/execute/chktest.sh b/tests/scc/execute/chktest.sh @@ -1,24 +0,0 @@ -#!/bin/sh - -file=${1?' empty input file'} -trap "rm -f a.out; exit" 0 1 2 3 15 -ulimit -c 0 -rm -f test.log - -SYS=`uname | tr A-Z a-z` -FORMAT=elf -ABI=sysv -ARCH=amd64 - -export SYS FORMAT ABI ARCH - -while read i state -do - echo $i >>test.log - state=${state:-""} - rm -f a.out - - (scc -Isysinclude $CFLAGS "$i" && ./a.out) 2>>test.log && - printf '[PASS]' || printf '[FAIL]' - printf '\t%s\t%s\n' $i $state -done < $file diff --git a/tests/scc/execute/compose.sh b/tests/scc/execute/compose.sh @@ -1,23 +0,0 @@ -#!/bin/sh - -rm -f tmp_test.c -rm -f tests.h -rm -f tmp_*.c - -(echo '#include "tests.h"' -echo 'int main()' -echo '{' - -for i in *-*.c -do - n=`echo $i | sed 's/\(.*\)-.*\.c/\1/'` - sed s/main/main_$n/ < $i > tmp_$n.c - echo "int main_$n();" >> tests.h - echo "main_$n();" - -done - -echo 'return 0;' -echo '}' -) > tmp_test.c - diff --git a/tests/scc/execute/include/0062-include.h b/tests/scc/execute/include/0062-include.h @@ -1,5 +0,0 @@ -#include "0062-include2.h" - -int -main() -{ diff --git a/tests/scc/execute/include/0062-include2.h b/tests/scc/execute/include/0062-include2.h @@ -1,2 +0,0 @@ -int x; - diff --git a/tests/scc/execute/scc-tests.lst b/tests/scc/execute/scc-tests.lst @@ -1,174 +0,0 @@ -0001-sanity.c -0002-expr.c -0003-local.c -0004-pointer.c -0005-ifstmt.c -0006-whilestmt.c -0007-forstmt.c -0008-dowhilestmt.c -0009-expr.c -0010-goto.c -0011-assign.c -0012-expr.c -0013-addridx.c -0014-assignidx.c -0015-localarray.c -0016-addrarray.c -0017-struct.c -0018-structptr.c -0019-selfrefstruct.c -0020-ptrptr.c -0021-intfunc.c -0022-typedef.c -0023-global.c -0024-typedefstruct.c -0025-string.c -0026-implicitret.c -0027-charval.c -0028-bor.c -0029-band.c -0030-bxor.c -0031-relop.c -0032-indec.c -0033-ptrindec.c -0034-logandor.c -0035-breakcont.c -0036-notneg.c -0037-assignop.c -0038-ptradd.c -0039-sizeof.c -0040-cast.c -0041-queen.c -0042-prime.c -0043-union.c -0044-struct.c -0045-struct.c -0046-inits.c -0048-inits.c -0049-inits.c -0050-inits.c -0052-switch.c -0053-struct.c -0054-struct.c -0055-enum.c -0056-enum.c -0057-duff.c -0058-bug.c -0059-multistring.c -0060-charlit.c -0061-comments.c -0062-include.c -0063-define.c -0064-sysinclude.c -0065-ifdef.c -0066-cppelse.c -0067-define.c -0068-funclikemacro.c -0069-funclikemacro.c -0070-cppif.c -0071-cppelif.c -0072-cppelif.c -0073-ifndef.c -0074-undef.c -0075-ptraddasn.c -0076-ptrsubasn.c -0077-defined.c -0078-dirifexpr.c -0079-cond.c -0080-arrays.c -0081-calls.c -0082-bug.c -0083-voidret.c -0084-longlong.c -0085-ulonglong.c -0089-short.c -0090-fptr.c -0091-fptr.c -0092-fptr.c -0093-arrayinit.c -0094-arrayinit.c [TODO] -0095-arrayselector.c -0096-inferredarraysize.c -0097-extern.c -0098-tentative.c [TODO] -0099-tentative.c [TODO] -0102-bug.c -0103-voidparm.c -0104-qbebug.c -0105-shl.c -0106-ppcast.c -0107-bnot.c -0108-bug.c -0109-struct.c -0110-typedefcast.c -0111-doubledef.c -0112-cond.c -0113-externredecl.c -0114-shortassig.c [TODO] -0115-null-comparision.c -0116-floatcmp.c [TODO] -0117-pointarith.c -0118-voidmain.c [TODO] -0119-macrostr.c -0120-funpar.c -0121-localinit.c [TODO] -0122-localinit.c [TODO] -0123-doubleconst.c [TODO] -0124-enumstruct.c [TODO] -0125-fundcl.c -0126-macropar.c [TODO] -0127-doublecte.c [TODO] -0128-kr_names.c -0129-initi.c [TODO] -0130-mulpars.c -0131-hello.c [TODO] -0132-forward.c [TODO] -0133-ftn-ptr.c [TODO] -0134-arith.c [TODO] -0135-unary.c -0136-if.c -0137-int-cast.c [TODO] -0138-namespace.c -0139-ptr-ary.c [TODO] -0140-int-fold.c [TODO] -0141-int-iden.c [TODO] -0142-char-const.c [TODO] -0143-int-const.c -0144-long-const.c -0145-llong-const.c [TODO] -0146-ifdef.c -0147-intern-cpp.c -0148-cpp-string.c -0149-define.c -0150-define.c -0151-vararg.c [TODO] -0152-cat.c -0153-cpp-string.c [TODO] -0154-if-defined [TODO] -0155-struct-compl.c [TODO] -0156-duff2.c [TODO] -0157-list.c [TODO] -0158-ternary.c [TODO] -0159-typedef.c [TODO] -0160-cpp-if.c [TODO] -0161-struct.c [TODO] -0162-array.c -0163-array.c [TODO] -0164-struct.c [TODO] -0165-struct.c [TODO] -0166-desig.c [TODO] -0167-array.c [TODO] -0168-array.c [TODO] -0169-string.c [TODO] -0170-line.c [TODO] -0171-macros.c [TODO] -0172-hexa.c -0173-macro.c -0174-decay.c [TODO] -0175-defined.c -0176-macro.c [TODO] -0177-literal.c [TODO] -0178-include.c [TODO] -0179-sizeof.c [TODO] -0180-incomplete.c -0181-stringize.c [TODO] diff --git a/tests/scc/execute/sysinclude/0064-sysinclude.h b/tests/scc/execute/sysinclude/0064-sysinclude.h @@ -1,4 +0,0 @@ -#include "0064-sysinclude2.h" - -int x = 2; - diff --git a/tests/scc/execute/sysinclude/0064-sysinclude2.h b/tests/scc/execute/sysinclude/0064-sysinclude2.h @@ -1 +0,0 @@ -int y = 2;