Files
mercury/tests/invalid_manual/Mmakefile
Zoltan Somogyi 40ff19acbb Standardize mode names in argument lists.
compiler/hlds_error_util.m:
    When converting lists of arguments mode to strings for error messages,
    replace from/to pairs of insts that stand for standard modes with the
    names of those standard modes.

compiler/prog_mode.m:
    Add a utility function for doing that standardization.

tests/invalid/io_in_ite_cond.err_exp:
tests/invalid_manual/gh118.err_exp:
    Expect the standard forms of modes.

tests/invalid_manual/Mmakefile:
    Specify the grade for the test independently of the grade of the
    workspace or of the last bootcheck. Make the Mercury compiler flags
    specific to the test.
2023-03-19 00:24:25 +11:00

50 lines
1.5 KiB
Makefile

#-----------------------------------------------------------------------------#
# vim: ts=8 sw=8 noexpandtab ft=make
#-----------------------------------------------------------------------------#
TESTS_DIR = ..
THIS_DIR = invalid_manual
MAYBE_J1 =
TESTS = \
gh118
#-----------------------------------------------------------------------------#
include ../Mmake.common
# Module-specific options should go in Mercury.options so they can be found
# by `mmc --make'.
include Mercury.options
%.runtest: %.err_res ;
#-----------------------------------------------------------------------------#
GH118_MCFLAGS = --grade asm_fast.gc.decldebug.stseg --no-intermod-opt
# This is set up to be run manually. It could be set up for automatic
# operation by adding code to clean up files before and after the test.
# However, the right fix for github issue #118, which is about the compiler's
# response to invalid data in a .int file, is to prevent such invalid data
# from being put into .int files.
gh118.err: gh118.m gh118.gh118_helper.m
$(MC) --make-short-interface $(GH118_MCFLAGS) \
gh118.m gh118.gh118_helper.m
$(MC) --make-private-interface $(GH118_MCFLAGS) \
gh118.m
$(MC) --make-interface $(GH118_MCFLAGS) \
gh118.m gh118.gh118_helper.m
if $(MC) -E $(GH118_MCFLAGS) \
gh118.m > gh118.err 2>&1; \
then false; \
else true; \
fi
clean_local: clean_invalid_manual
clean_invalid_manual:
rm -f *.dep_err *.int_err *.err *.err_res *.err_res[2345]
#-----------------------------------------------------------------------------#