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

added test related to issue #1113

This commit is contained in:
mrdudz 2020-07-22 15:55:55 +02:00
parent 98b2d43c2b
commit afe455238c
2 changed files with 19 additions and 0 deletions

View File

@ -111,6 +111,13 @@ $(WORKDIR)/bug1098b.$1.$2.prg: bug1098b.c | $(WORKDIR)
$(if $(QUIET),echo misc/bug1098b.$1.$2.prg)
$(CL65) -t sim$2 -$1 -o $$@ $$< $(NULLERR)
# this should fail to compile, because there are errors in the code
# instead, the compiler crashes
$(WORKDIR)/bug1113.$1.$2.prg: bug1113.c | $(WORKDIR)
@echo "FIXME: " $$@ "compiler crashes but should give an error."
$(if $(QUIET),echo misc/bug1113.$1.$2.prg)
$(NOT) $(CL65) -t sim$2 -$1 -o $$@ $$< $(NULLERR)
# should compile, but then hangs in an endless loop
$(WORKDIR)/endless.$1.$2.prg: endless.c | $(WORKDIR)
$(if $(QUIET),echo misc/endless.$1.$2.prg)

12
test/misc/bug1113.c Normal file
View File

@ -0,0 +1,12 @@
/* bug #1113 - Compiler crashes when calling functions "redefined" as other types */
void f() {}
int f;
int main(void)
{
f();
return 0;
}