move (now working) tests to test/val
This commit is contained in:
@@ -63,11 +63,6 @@ $(DIFF): ../bdiff.c | $(WORKDIR)
|
||||
|
||||
define PRG_template
|
||||
|
||||
# should compile, but gives an error
|
||||
$(WORKDIR)/bug975.$1.$2.prg: bug975.c | $(WORKDIR)
|
||||
$(if $(QUIET),echo misc/bug975.$1.$2.prg)
|
||||
$(CL65) -t sim$2 -$1 -o $$@ $$< $(NULLERR)
|
||||
|
||||
# should compile, but gives an error
|
||||
$(WORKDIR)/bug250.$1.$2.prg: bug250.c | $(WORKDIR)
|
||||
@echo "FIXME: " $$@ "currently does not compile."
|
||||
@@ -98,7 +93,7 @@ $(WORKDIR)/bug1048.$1.$2.prg: bug1048.c | $(WORKDIR)
|
||||
$(if $(QUIET),echo misc/bug1048.$1.$2.prg)
|
||||
$(CL65) -t sim$2 -$1 -o $$@ $$< $(NULLERR)
|
||||
|
||||
# internal compiler error
|
||||
# compiles, but we cant easily check if it works
|
||||
$(WORKDIR)/bug1075.$1.$2.prg: bug1075.c | $(WORKDIR)
|
||||
$(if $(QUIET),echo misc/bug1075.$1.$2.prg)
|
||||
$(CL65) -t sim$2 -$1 -o $$@ $$< $(NULLERR)
|
||||
@@ -123,11 +118,6 @@ $(WORKDIR)/goto.$1.$2.prg: goto.c $(DIFF) | $(WORKDIR)
|
||||
$(DIFF) $(WORKDIR)/goto.$1.$2.out goto.ref
|
||||
|
||||
# the rest are tests that fail currently for one reason or another
|
||||
$(WORKDIR)/fields.$1.$2.prg: fields.c | $(WORKDIR)
|
||||
@echo "FIXME: " $$@ "currently will fail."
|
||||
$(CL65) -t sim$2 -$1 -o $$@ $$< $(NULLERR)
|
||||
$(SIM65) $(SIM65FLAGS) $$@ $(NULLOUT)
|
||||
|
||||
$(WORKDIR)/sitest.$1.$2.prg: sitest.c | $(WORKDIR)
|
||||
@echo "FIXME: " $$@ "currently does not compile."
|
||||
$(NOT) $(CL65) -t sim$2 -$1 -o $$@ $$< $(NULLERR)
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
/* bug #975 - Forward array reference fails to compile */
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
// this works
|
||||
static const unsigned char array2[3];
|
||||
int test2(void) {
|
||||
return array2[0];
|
||||
}
|
||||
static const unsigned char array2[] = { 0, 1, 2 };
|
||||
|
||||
// this should work, but does not compile
|
||||
static const unsigned char array[];
|
||||
int main() {
|
||||
if (test2() != 0) return EXIT_FAILURE;
|
||||
return array[0];
|
||||
}
|
||||
static const unsigned char array[] = { 0, 1, 2 };
|
||||
@@ -1,94 +0,0 @@
|
||||
/*
|
||||
!!DESCRIPTION!! bitfield test
|
||||
!!ORIGIN!! LCC 4.1 Testsuite
|
||||
!!LICENCE!! own, freely distributeable for non-profit. read CPYRIGHT.LCC
|
||||
*/
|
||||
|
||||
#include "common.h"
|
||||
|
||||
#ifdef NO_BITFIELDS
|
||||
|
||||
main()
|
||||
{
|
||||
printf("NO_BITFIELDS\n\r");
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
#ifdef SIZEOF_INT_16BIT
|
||||
|
||||
#ifdef REFCC
|
||||
#include <stdint.h>
|
||||
struct foo {
|
||||
int16_t a;
|
||||
char b;
|
||||
int16_t x : 12, y : 4;
|
||||
int16_t zz : 1, : 0, : 4, z : 3;
|
||||
char c;
|
||||
} x = { 1, 2, 3, 4, 5, 6 };
|
||||
|
||||
struct baz { uint16_t a:2, b:4, c:16;} y = { 7, 8, 9};
|
||||
int16_t i = 8;
|
||||
|
||||
#else
|
||||
|
||||
struct foo {
|
||||
int a;
|
||||
char b;
|
||||
int x : 12, y : 4;
|
||||
int zz : 1, : 0, : 4, z : 3;
|
||||
char c;
|
||||
} x = { 1, 2, 3, 4, 5, 6 };
|
||||
|
||||
struct baz { unsigned int a:2, b:4, c:16;} y = { 7, 8, 9};
|
||||
int i = 8;
|
||||
#endif
|
||||
|
||||
#else
|
||||
struct foo {
|
||||
int a;
|
||||
char b;
|
||||
int x : 12, y : 4, : 0, : 4, z : 3;
|
||||
char c;
|
||||
} x = { 1, 2, 3, 4, 5, 6 };
|
||||
|
||||
struct baz { unsigned int a:2, b:4, c:32;} y = { 7, 8, 9};
|
||||
int i = 16;
|
||||
#endif
|
||||
|
||||
#ifdef NO_IMPLICIT_FUNC_PROTOTYPES
|
||||
f1(struct baz *p);
|
||||
f2(struct baz *p);
|
||||
#endif
|
||||
|
||||
main()
|
||||
{
|
||||
printf("x = %d b:%d %d %d %d c:%d\n", x.a, x.b, x.x, x.y, x.z, x.c);
|
||||
printf("y = %d b:%d c:%d\n", y.a, y.b, y.c);
|
||||
x.y = i;
|
||||
x.z = 070;
|
||||
printf("x = %d b:%d %d %d %d c:%d\n", x.a, x.b, x.x, x.y, x.z, x.c);
|
||||
y.a = 2;
|
||||
y.c = i;
|
||||
printf("y = %d b:%d c:%d\n", y.a, y.b, y.c);
|
||||
#ifdef CAST_STRUCT_PTR
|
||||
f2((struct baz *)&x);
|
||||
#else
|
||||
f2(&x);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
f1(struct baz *p) {
|
||||
p->a = p->b = 0;
|
||||
if (p->b)
|
||||
printf("p->b != 0!\n");
|
||||
p->a = 0x3; p->b = 0xf;
|
||||
printf("p->a = 0x%x, p->b = 0x%x\n", p->a, p->b);
|
||||
}
|
||||
f2(struct baz *p) {
|
||||
p->a = (i==0);
|
||||
p->b = (f1(p),0);
|
||||
}
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user