1
0
mirror of https://github.com/cc65/cc65.git synced 2024-06-07 23:29:39 +00:00

added test related to issue #1437

This commit is contained in:
mrdudz 2021-03-26 22:18:05 +01:00
parent d3cd668585
commit 02392d6220
2 changed files with 28 additions and 0 deletions

View File

@ -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."

23
test/misc/bug1437.c Normal file
View File

@ -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;
}