diff --git a/tools/qfcc/test/Makemodule.am b/tools/qfcc/test/Makemodule.am index 51d173ba2..4c57e56a4 100644 --- a/tools/qfcc/test/Makemodule.am +++ b/tools/qfcc/test/Makemodule.am @@ -110,7 +110,8 @@ test_build_errors=\ tools/qfcc/test/double-demote-int-ginit.r \ tools/qfcc/test/double-demote-int-linit.r \ tools/qfcc/test/double-int-compare.r \ - tools/qfcc/test/double-float-compare.r + tools/qfcc/test/double-float-compare.r \ + tools/qfcc/test/shadow-param.r fail_build_errors= @@ -385,6 +386,9 @@ tools/qfcc/test/double-int-compare.run$(EXEEXT): tools/qfcc/test/double-int-comp tools/qfcc/test/double-float-compare.run$(EXEEXT): tools/qfcc/test/double-float-compare.r $(qfcc_fail_run_deps) @$(top_srcdir)/tools/qfcc/test/build-compile-fail-run $@ $(QFCC) $(QCFLAGS) $< +tools/qfcc/test/shadow-param.run$(EXEEXT): tools/qfcc/test/shadow-param.r $(qfcc_fail_run_deps) + @$(top_srcdir)/tools/qfcc/test/build-compile-fail-run $@ $(QFCC) $(QCFLAGS) $< + tools/qfcc/test/motor.run$(EXEEXT): tools/qfcc/test/motor.r $(qfcc_comp_run_deps) @$(top_srcdir)/tools/qfcc/test/build-compile-pass-run $@ $(QFCC) $(QCFLAGS) -c $< diff --git a/tools/qfcc/test/shadow-param.r b/tools/qfcc/test/shadow-param.r new file mode 100644 index 000000000..c0c418e90 --- /dev/null +++ b/tools/qfcc/test/shadow-param.r @@ -0,0 +1,10 @@ +float func (int x) +{ + float x = 0; + return x; +} + +int main () +{ + return 1; // test fails if compile succeeds +}