1
0
mirror of https://github.com/cc65/cc65.git synced 2024-06-25 13:29:41 +00:00

added testcase related to issue #1768

This commit is contained in:
mrdudz 2022-08-27 01:15:06 +02:00
parent d2628d5949
commit 90b9438b48
2 changed files with 20 additions and 0 deletions

View File

@ -58,6 +58,12 @@ $(ISEQUAL): ../isequal.c | $(WORKDIR)
define PRG_template
# should compile, but gives an error
$(WORKDIR)/bug1768.$1.$2.prg: bug1768.c | $(WORKDIR)
@echo "FIXME: " $$@ "currently does not compile."
$(if $(QUIET),echo misc/bug1768.$1.$2.prg)
$(NOT) $(CC65) -t sim$2 -$1 -o $$@ $$< $(NULLERR)
# should compile, but gives an error
$(WORKDIR)/bug760.$1.$2.prg: bug760.c | $(WORKDIR)
@echo "FIXME: " $$@ "currently does not compile."

14
test/misc/bug1768.c Normal file
View File

@ -0,0 +1,14 @@
#include <stdlib.h>
int a = 1 || (8 / 0);
int b = 0 && (8 % 0);
int c = 1 ? 42 : (0 % 0);
int d = 1 || a / 0;
int e = 0 && b % 0;
int f = 1 ? 42 : (a %= 0, b /= 0);
int main(void)
{
return EXIT_SUCCESS;
}