diff --git a/test/misc/Makefile b/test/misc/Makefile index 7a1b82d5f..397635afd 100644 --- a/test/misc/Makefile +++ b/test/misc/Makefile @@ -64,6 +64,11 @@ $(WORKDIR)/bug760.$1.$2.prg: bug760.c | $(WORKDIR) $(if $(QUIET),echo misc/bug760.$1.$2.prg) $(NOT) $(CC65) -t sim$2 -$1 -o $$@ $$< $(NULLERR) +$(WORKDIR)/bug1437.$1.$2.prg: bug1437.c | $(WORKDIR) + @echo "FIXME: " $$@ "currently does not compile." + $(if $(QUIET),echo misc/bug1437.$1.$2.prg) + $(NOT) $(CC65) -t sim$2 -$1 -o $$@ $$< $(NULLERR) + # should compile, but gives an error $(WORKDIR)/bug1209-ind-goto-rev.$1.$2.prg: bug1209-ind-goto-rev.c | $(WORKDIR) @echo "FIXME: " $$@ "currently does not compile." diff --git a/test/misc/bug1437.c b/test/misc/bug1437.c new file mode 100644 index 000000000..de6c7008d --- /dev/null +++ b/test/misc/bug1437.c @@ -0,0 +1,23 @@ + +/* bug #1437 enum declaration in struct does not compile */ + +struct nodelist1 { + enum { DEAD1, LIVE1, ONCE1, TWICE1 } live1; +} firstnode1 = {ONCE1}; + +enum nodestate2 { DEAD2, LIVE2, ONCE2, TWICE2 } live2; + +struct nodelist2 { + enum nodestate2 live2; +} firstnode2 = {TWICE2}; + +int main (void) +{ + if (firstnode1.live1 != ONCE1) { + return 1; + } + if (firstnode2.live2 != TWICE2) { + return 1; + } + return 0; +}