added test related to issue #1552 fixed in pr #1571

This commit is contained in:
mrdudz 2021-09-28 18:55:23 +02:00
parent 6ba8a385a0
commit 86f1965202
1 changed files with 42 additions and 0 deletions

42
test/val/bug1552.c Normal file
View File

@ -0,0 +1,42 @@
/*
bug #1552 - crash in fuzix xec.c
cc65 -t none -O bug1552.c
*/
#include <stdio.h>
typedef struct trenod *TREPTR;
typedef struct whnod *WHPTR;
struct trenod {
int tretyp;
};
struct whnod {
int whtyp;
TREPTR whtre;
};
int execute(TREPTR argt, int execflg, int *pf1, int *pf2)
{
register TREPTR t;
int type;
switch (type)
{
case 6:
{
while ((execute(((WHPTR) t)->whtre, 0, NULL, NULL) == 0) == (type == 5)) {
}
break;
}
}
return 0;
}
int main(void)
{
return execute((TREPTR)42, 2, (int *)3, (int *)4);
}