mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-05-31 00:30:57 +00:00
Add tests for double demotion
This commit is contained in:
parent
4bf37b274b
commit
08ca59d0df
3 changed files with 22 additions and 0 deletions
|
@ -61,6 +61,8 @@ test_progs_dat=\
|
||||||
fail_progs_dat=
|
fail_progs_dat=
|
||||||
|
|
||||||
test_build_errors=\
|
test_build_errors=\
|
||||||
|
double-demote-int.r \
|
||||||
|
double-demote-float.r \
|
||||||
double-int-compare.r \
|
double-int-compare.r \
|
||||||
double-float-compare.r
|
double-float-compare.r
|
||||||
|
|
||||||
|
@ -153,6 +155,12 @@ double.run: Makefile build-run
|
||||||
include ./$(DEPDIR)/double.Qo # am--include-marker
|
include ./$(DEPDIR)/double.Qo # am--include-marker
|
||||||
r_depfiles_remade += ./$(DEPDIR)/double.Qo
|
r_depfiles_remade += ./$(DEPDIR)/double.Qo
|
||||||
|
|
||||||
|
double-demote-int.run$(EXEEXT): double-demote-int.r Makefile build-compile-fail-run
|
||||||
|
$(srcdir)/build-compile-fail-run $@ $(QFCC) $(QCFLAGS) $<
|
||||||
|
|
||||||
|
double-demote-float.run$(EXEEXT): double-demote-float.r Makefile build-compile-fail-run
|
||||||
|
$(srcdir)/build-compile-fail-run $@ $(QFCC) $(QCFLAGS) $<
|
||||||
|
|
||||||
double-int-compare.run$(EXEEXT): double-int-compare.r Makefile build-compile-fail-run
|
double-int-compare.run$(EXEEXT): double-int-compare.r Makefile build-compile-fail-run
|
||||||
$(srcdir)/build-compile-fail-run $@ $(QFCC) $(QCFLAGS) $<
|
$(srcdir)/build-compile-fail-run $@ $(QFCC) $(QCFLAGS) $<
|
||||||
|
|
||||||
|
|
7
tools/qfcc/test/double-demote-float.r
Normal file
7
tools/qfcc/test/double-demote-float.r
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
double a;
|
||||||
|
float b;
|
||||||
|
int main ()
|
||||||
|
{
|
||||||
|
b = a;
|
||||||
|
return 1; // test fails if compile succeeds
|
||||||
|
}
|
7
tools/qfcc/test/double-demote-int.r
Normal file
7
tools/qfcc/test/double-demote-int.r
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
double a;
|
||||||
|
int b;
|
||||||
|
int main ()
|
||||||
|
{
|
||||||
|
b = a;
|
||||||
|
return 1; // test fails if compile succeeds
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue