From cc450706d13ccde2e6b8d638d1af38edfc292dbf Mon Sep 17 00:00:00 2001 From: mrdudz Date: Thu, 3 Nov 2022 18:03:47 +0100 Subject: [PATCH] testcase related to bug #1888 --- test/misc/Makefile | 6 ++++++ test/misc/int-static-1888.c | 10 ++++++++++ 2 files changed, 16 insertions(+) create mode 100644 test/misc/int-static-1888.c diff --git a/test/misc/Makefile b/test/misc/Makefile index e77d37b29..f18f40da6 100644 --- a/test/misc/Makefile +++ b/test/misc/Makefile @@ -58,6 +58,12 @@ $(ISEQUAL): ../isequal.c | $(WORKDIR) define PRG_template +# should compile, but gives an error +$(WORKDIR)/int-static-1888.$1.$2.prg: int-static-1888.c | $(WORKDIR) + @echo "FIXME: " $$@ "currently does not compile." + $(if $(QUIET),echo misc/int-static-1888.$1.$2.prg) + $(NOT) $(CC65) -t sim$2 -$1 -o $$@ $$< $(NULLERR) + # should compile, but gives an error $(WORKDIR)/bug1768.$1.$2.prg: bug1768.c | $(WORKDIR) @echo "FIXME: " $$@ "currently does not compile." diff --git a/test/misc/int-static-1888.c b/test/misc/int-static-1888.c new file mode 100644 index 000000000..e5234ab2c --- /dev/null +++ b/test/misc/int-static-1888.c @@ -0,0 +1,10 @@ + +/* bug #1888 - The compiler doesn't accept valid data declarations */ + +/* The following is a valid declaration but not accepted by the compiler */ +int static a; + +int main(void) +{ + return 0; +}