[qfcc] Add failing test for unary minus

Producing a void type... very odd.
This commit is contained in:
Bill Currie 2020-04-08 21:12:56 +09:00
parent d88c1e2f40
commit d5604aef73
2 changed files with 24 additions and 0 deletions

View file

@ -71,6 +71,7 @@ test_progs_dat=\
triangle.dat \
typedef.dat \
typelinker.dat \
unaryminus.dat \
vecaddr.dat \
vecexpr.dat \
vecinit.dat \
@ -533,6 +534,16 @@ typelinker.run: Makefile build-run
include $(typelinker_dep) # am--include-marker
r_depfiles_remade += $(typelinker_dep)
unaryminus_dat_SOURCES=unaryminus.r
unaryminus_obj=$(unaryminus_dat_SOURCES:.r=.qfo)
unaryminus_dep=$(addprefix ./$(DEPDIR)/,$(unaryminus_obj:.qfo=.Qo))
unaryminus.dat$(EXEEXT): $(unaryminus_obj) $(QFCC_DEP)
$(QFCC) $(QCFLAGS) -o $@ $(unaryminus_obj)
unaryminus.run: Makefile build-run
@$(srcdir)/build-run $@
include $(unaryminus_dep) # am--include-marker
r_depfiles_remade += $(unaryminus_dep)
vecaddr_dat_SOURCES=vecaddr.r
vecaddr_obj=$(vecaddr_dat_SOURCES:.r=.qfo)
vecaddr_dep=$(addprefix ./$(DEPDIR)/,$(vecaddr_obj:.qfo=.Qo))

View file

@ -0,0 +1,13 @@
int strlen (string s) = #0;
int foo (string bar)
{
int len;
len = -strlen (bar);
return len;
}
int main (void)
{
return 0;
}