mescc: Tinycc support: Update some tests.

This commit is contained in:
Jan Nieuwenhuizen 2018-05-14 21:18:08 +02:00
parent 8c6e41d92d
commit 209f9cc599
No known key found for this signature in database
GPG key ID: F3C1A0D9C1D65273
4 changed files with 15 additions and 6 deletions

View file

@ -242,9 +242,7 @@ broken="$broken
#27_sizeof ; float
#28_strings ; TODO: strncpy strchr strrchr memset memcpy memcmp
#30_hanoi ; fails with GCC
#32_led ; unsupported: (decl (decl-spec-list (stor-spec (static)) (type-spec (fixed-type "int"))) (init-declr-list (init-declr (array-of (ident "d") (p-expr (fixed "32"))))))
#34_array_assignment ; fails with GCC
#36_array_initialisers ; unspported: (decl (decl-spec-list (type-spec (fixed-type "int"))) (init-declr-list (init-declr (array-of (ident "Array") (p-expr (fixed "10"))) (initzer (initzer-list (initzer (p-expr (fixed "12"))) (initzer (p-expr (fixed "34"))) (initzer (p-expr (fixed "56"))) (initzer (p-expr (fixed "78"))) (initzer (p-expr (fixed "90"))) (initzer (p-expr (fixed "123"))) (initzer (p-expr (fixed "456"))) (initzer (p-expr (fixed "789"))) (initzer (p-expr (fixed "8642"))) (initzer (p-expr (fixed "9753"))))))))
#37_sprintf ; integer formatting unsupported
#38_multiple_array_index ; unspported: (decl (decl-spec-list (type-spec (fixed-type "int"))) (init-declr-list (init-declr (array-of (array-of (ident "a") (p-expr (fixed "4"))) (p-expr (fixed "4"))))))
#39_typedef ;unsupported: (decl (decl-spec-list (stor-spec (typedef)) (type-spec (typename "MyFunStruct"))) (init-declr-list (init-declr (ptr-declr (pointer) (ident "MoreFunThanEver")))))
@ -253,9 +251,7 @@ broken="$broken
#42_function_pointer ; f* functions
#46_grep ; f* functions
#49_bracket_evaluation ; float
#51_static ; unsupported: (decl (decl-spec-list (stor-spec (static)) (type-spec (fixed-type "int"))) (init-declr-list (init-declr (ident "fred") (initzer (p-expr (fixed "1234"))))))
#52_unnamed_enum ; unsupported: (decl (decl-spec-list (stor-spec (typedef)) (type-spec (enum-def (enum-def-list (enum-defn (ident "e")) (enum-defn (ident "f")) (enum-defn (ident "g")))))) (init-declr-list (init-declr (ident "h"))))
#55_lshift_type ; unsigned
expect=$(echo $broken | wc -w)

View file

@ -28,6 +28,10 @@ main ()
#else // !__MESC__
asm ("mov $0,%ebx");
asm ("mov $1,%eax");
#if !__TINYC__
asm ("int $0x80");
#else
asm ("int $128");
#endif
#endif
}

View file

@ -20,6 +20,10 @@
int g_time = 1;
#if __TINYC__
#define time time_
#endif
int*
time ()
{

View file

@ -18,6 +18,10 @@
* along with Mes. If not, see <http://www.gnu.org/licenses/>.
*/
#if __TINYC__
#define unsigned
#endif
static int sint;
static int sint2, sint3;
typedef unsigned int size;
@ -34,5 +38,6 @@ int
main ()
{
void (*foo)() = &test;
return test (0);
test (0);
return 0;
}