Files
mercury/tests/valid/simplify_bug.m
Peter Wang 75771a9b6e Allow testing of java grade. Requires using `mmc --make' for now.
Branches: main

Allow testing of java grade.  Requires using `mmc --make' for now.
This patch does not attempt to fix test failures.

tests/Mmake.common:
        Delete unneeded Java-specific rule, which was broken.

tests/benchmarks/Mmakefile:
tests/general/Mmakefile:
tests/general/string_format/Mmakefile:
tests/grade_subdirs/Mmakefile:
tests/hard_coded/Mmakefile:
tests/recompilation/Mmakefile:
tests/term/Mmakefile:
tests/valid/Mmakefile:
        Don't deliberately disable tests in java grade.

tests/*.m:
        Add Java foreign code.

        Write dummy procedures instead of abusing `:- external'.
2009-08-14 03:21:55 +00:00

37 lines
610 B
Mathematica

% Regression test:
% When compiling this file with `mc -O-1', Mercury 0.6
% got an internal compiler error ("nondet code in det/semidet context").
:- module simplify_bug.
:- interface.
:- import_module io.
:- pred main(io__state::di, io__state::uo) is det.
:- implementation.
:- import_module require, list, std_util.
main -->
( { nasty([]) } ->
main, main
;
[]
).
:- pred nasty(list(T)::in) is nondet.
nasty(_) :-
( semidet_succeed ->
list__append(X, _, []),
X \= [],
e(X)
;
semidet_succeed
).
:- pred e(list(T)::in) is erroneous.
:- pragma no_inline(e/1).
e(_) :-
error("e/1").