diff --git a/compiler/add_pragma_tabling.m b/compiler/add_pragma_tabling.m index f14c6bfb7..b8644be28 100644 --- a/compiler/add_pragma_tabling.m +++ b/compiler/add_pragma_tabling.m @@ -85,7 +85,7 @@ module_add_pragma_tabled(ProgressStream, TabledInfo, ItemMercuryStatus, PredStatus, !ModuleInfo, !QualInfo, !ErrSpecs, !WarnSpecs) :- TabledInfo = impl_pragma_tabled_info(TabledMethod, PredOrProcSpec, - MaybeAttributes, Context, _SeqNum), + MaybeAttributes, PragmaContext, _SeqNum), PredOrProcSpec = pred_or_proc_pfumm_name(PFUMM, PredSymName), ( PredSymName = qualified(PredModuleName, PredName) @@ -125,7 +125,7 @@ module_add_pragma_tabled(ProgressStream, TabledInfo, DescPieces = [pragma_decl(TabledMethodStr), words("declaration")], add_implicit_pred_decl_report_error(PredOrFunc, PredModuleName, PredName, PredFormArity, PredStatus, - is_not_a_class_method, Context, Origin, DescPieces, + is_not_a_class_method, PragmaContext, Origin, DescPieces, PredId, !ModuleInfo, !ErrSpecs), PredIds = [PredId] ; @@ -136,7 +136,7 @@ module_add_pragma_tabled(ProgressStream, TabledInfo, PFUMM = pfumm_unknown(UserArity), TabledMethodStr = tabled_eval_method_to_string(TabledMethod), maybe_warn_about_pfumm_unknown(!.ModuleInfo, TabledMethodStr, PFUMM, - PredSymName, Context, PFUMMSpecs), + PredSymName, PragmaContext, PFUMMSpecs), !:WarnSpecs = PFUMMSpecs ++ !.WarnSpecs, predicate_table_lookup_m_n_ua(PredicateTable0, is_fully_qualified, PredModuleName, PredName, UserArity, PredIds0), @@ -151,7 +151,7 @@ module_add_pragma_tabled(ProgressStream, TabledInfo, user_arity_pred_form_arity(pf_predicate, UserArity, PredFormArity), add_implicit_pred_decl_report_error(pf_predicate, PredModuleName, PredName, PredFormArity, PredStatus, - is_not_a_class_method, Context, Origin, + is_not_a_class_method, PragmaContext, Origin, DescPieces, PredId, !ModuleInfo, !ErrSpecs), PredIds = [PredId] ; @@ -180,7 +180,7 @@ module_add_pragma_tabled(ProgressStream, TabledInfo, words("statistics predicate"), words("would have an ambiguous name too."), nl], StatsSpec = spec($pred, severity_error, phase_pt2h, - Context, StatsPieces), + PragmaContext, StatsPieces), !:ErrSpecs = [StatsSpec | !.ErrSpecs] ; Statistics = table_do_not_gather_statistics @@ -196,7 +196,7 @@ module_add_pragma_tabled(ProgressStream, TabledInfo, [words("since the compiler-generated reset predicate"), words("would have an ambiguous name too."), nl], ResetSpec = spec($pred, severity_error, phase_pt2h, - Context, ResetPieces), + PragmaContext, ResetPieces), !:ErrSpecs = [ResetSpec | !.ErrSpecs] ; AllowReset = table_do_not_allow_reset @@ -207,7 +207,7 @@ module_add_pragma_tabled(ProgressStream, TabledInfo, ), list.foldl4( module_add_pragma_tabled_for_pred(ProgressStream, TabledMethod, PFUMM, - PredModuleName, PredName, MaybeAttributes, Context, + PredModuleName, PredName, MaybeAttributes, PragmaContext, ItemMercuryStatus, PredStatus), PredIds, !ModuleInfo, !QualInfo, !ErrSpecs, !WarnSpecs). @@ -221,7 +221,7 @@ module_add_pragma_tabled(ProgressStream, TabledInfo, list(warn_spec)::in, list(warn_spec)::out) is det. module_add_pragma_tabled_for_pred(ProgressStream, TabledMethod0, PFUMM, - PredModuleName, PredName, MaybeAttributes, Context, + PredModuleName, PredName, MaybeAttributes, PragmaContext, ItemMercuryStatus, PredStatus, PredId, !ModuleInfo, !QualInfo, !ErrSpecs, !WarnSpecs) :- module_info_get_globals(!.ModuleInfo, Globals), @@ -294,7 +294,7 @@ module_add_pragma_tabled_for_pred(ProgressStream, TabledMethod0, PFUMM, words("option to suppress this warning."), nl], Severity = severity_warning(warn_table_with_inline), InlineWarningSpec = spec($pred, Severity, phase_pt2h, - Context, InlineWarningPieces), + PragmaContext, InlineWarningPieces), !:WarnSpecs = [InlineWarningSpec | !.WarnSpecs] else true @@ -309,14 +309,15 @@ module_add_pragma_tabled_for_pred(ProgressStream, TabledMethod0, PFUMM, words("such as")] ++ color_as_subject([qual_sym_name_arity(SNA), suffix(".")]) ++ [nl], - ImportSpec = spec($pred, severity_error, phase_pt2h, Context, Pieces), + ImportSpec = spec($pred, severity_error, phase_pt2h, + PragmaContext, Pieces), ImportErrSpecs = [ImportSpec], !:ErrSpecs = ImportErrSpecs ++ !.ErrSpecs else ImportErrSpecs = [] ), - find_grade_problems_for_tabling(!.ModuleInfo, PredId, TabledMethod, - GradeErrSpecs, GradeWarnSpecs), + find_grade_problems_for_tabling(!.ModuleInfo, PredId, PragmaContext, + TabledMethod, GradeErrSpecs, GradeWarnSpecs), ( if GradeErrSpecs = [], GradeWarnSpecs = [] then MaybeSetTabledEval = yes else @@ -336,7 +337,7 @@ module_add_pragma_tabled_for_pred(ProgressStream, TabledMethod0, PFUMM, select_tabled_proc_set_eval_method(ProgressStream, PredOrFunc, PredSymName, PredModuleName, PredName, UserArity, PredId, PredInfo0, MaybeModes, TabledMethod, TabledMethodStr, - MaybeAttributes, Context, ItemMercuryStatus, PredStatus, + MaybeAttributes, PragmaContext, ItemMercuryStatus, PredStatus, ProcTable0, ProcTable, !ModuleInfo, !QualInfo, !ErrSpecs, !WarnSpecs), ( @@ -361,10 +362,11 @@ module_add_pragma_tabled_for_pred(ProgressStream, TabledMethod0, PFUMM, %---------------------------------------------------------------------------% :- pred find_grade_problems_for_tabling(module_info::in, pred_id::in, - tabled_eval_method::in, list(err_spec)::out, list(warn_spec)::out) is det. + prog_context::in, tabled_eval_method::in, + list(err_spec)::out, list(warn_spec)::out) is det. -find_grade_problems_for_tabling(ModuleInfo, PredId, TabledMethod, - !:ErrSpecs, !:WarnSpecs) :- +find_grade_problems_for_tabling(ModuleInfo, PredId, PragmaContext, + TabledMethod, !:ErrSpecs, !:WarnSpecs) :- % We use severity_informational for any messages because severity_warning % would combine with --halt-at-warn to prevent the clean compilation % of the library and the compiler. @@ -383,17 +385,17 @@ find_grade_problems_for_tabling(ModuleInfo, PredId, TabledMethod, ( Target = target_csharp ; Target = target_java ), - general_cannot_table_reason_spec(ModuleInfo, PredId, + general_cannot_table_reason_spec(ModuleInfo, PredId, PragmaContext, TabledMethod, gen_reason_non_c_backend, !ErrSpecs, !WarnSpecs) ), globals.get_gc_method(Globals, GC), ( GC = gc_accurate, - general_cannot_table_reason_spec(ModuleInfo, PredId, + general_cannot_table_reason_spec(ModuleInfo, PredId, PragmaContext, TabledMethod, gen_reason_gc_accurate, !ErrSpecs, !WarnSpecs) ; GC = gc_hgc, - general_cannot_table_reason_spec(ModuleInfo, PredId, + general_cannot_table_reason_spec(ModuleInfo, PredId, PragmaContext, TabledMethod, gen_reason_gc_hgc, !ErrSpecs, !WarnSpecs) ; ( GC = gc_automatic @@ -407,7 +409,7 @@ find_grade_problems_for_tabling(ModuleInfo, PredId, TabledMethod, Parallel = no ; Parallel = yes, - general_cannot_table_reason_spec(ModuleInfo, PredId, + general_cannot_table_reason_spec(ModuleInfo, PredId, PragmaContext, TabledMethod, gen_reason_parallel, !ErrSpecs, !WarnSpecs) ), ( @@ -415,7 +417,7 @@ find_grade_problems_for_tabling(ModuleInfo, PredId, TabledMethod, globals.lookup_bool_option(Globals, highlevel_code, HighLevelCode), ( HighLevelCode = yes, - mm_cannot_table_reason_spec(mm_reason_hlc, HLCSpec), + mm_cannot_table_reason_spec(PragmaContext, mm_reason_hlc, HLCSpec), !:ErrSpecs = [HLCSpec | !.ErrSpecs] ; HighLevelCode = no @@ -423,7 +425,8 @@ find_grade_problems_for_tabling(ModuleInfo, PredId, TabledMethod, globals.lookup_bool_option(Globals, use_trail, UseTrail), ( UseTrail = yes, - mm_cannot_table_reason_spec(mm_reason_trailing, TrailSpec), + mm_cannot_table_reason_spec(PragmaContext, mm_reason_trailing, + TrailSpec), !:ErrSpecs = [TrailSpec | !.ErrSpecs] ; UseTrail = no @@ -431,7 +434,8 @@ find_grade_problems_for_tabling(ModuleInfo, PredId, TabledMethod, globals.lookup_bool_option(Globals, profile_calls, ProfileCalls), globals.lookup_bool_option(Globals, profile_deep, ProfileDeep), ( if ( ProfileCalls = yes ; ProfileDeep = yes ) then - mm_cannot_table_reason_spec(mm_reason_profiling, ProfSpec), + mm_cannot_table_reason_spec(PragmaContext, mm_reason_profiling, + ProfSpec), !:ErrSpecs = [ProfSpec | !.ErrSpecs] else true @@ -445,46 +449,41 @@ find_grade_problems_for_tabling(ModuleInfo, PredId, TabledMethod, %---------------------% -:- pred general_cannot_table_reason_spec(module_info::in, - pred_id::in, tabled_eval_method::in, general_cannot_table_reason::in, +:- pred general_cannot_table_reason_spec(module_info::in, pred_id::in, + prog_context::in, tabled_eval_method::in, general_cannot_table_reason::in, list(err_spec)::in, list(err_spec)::out, list(warn_spec)::in, list(warn_spec)::out) is det. -general_cannot_table_reason_spec(ModuleInfo, PredId, TabledMethod, Reason, - !ErrSpecs, !WarnSpecs) :- +general_cannot_table_reason_spec(ModuleInfo, PredId, PragmaContext, + TabledMethod, Reason, !ErrSpecs, !WarnSpecs) :- ReasonDesc = color_as_incorrect(gen_cannot_table_reason_desc(Reason)), ( ( TabledMethod = tabled_loop_check ; TabledMethod = tabled_memo(_) ), TabledMethodStr = tabled_eval_method_to_string(TabledMethod), - module_info_pred_info(ModuleInfo, PredId, PredInfo), PredPieces = describe_unqual_pred_name(ModuleInfo, PredId), - pred_info_get_context(PredInfo, Context), Pieces = [words("Ignoring the"), pragma_decl(TabledMethodStr), words("declaration for")] ++ PredPieces ++ [suffix(","), words("because tabling is")] ++ ReasonDesc ++ [nl], Spec = spec($pred, severity_warning(warn_cannot_table), phase_code_gen, - Context, Pieces), + PragmaContext, Pieces), !:WarnSpecs = [Spec | !.WarnSpecs] ; TabledMethod = tabled_io(_, _), - module_info_pred_info(ModuleInfo, PredId, PredInfo), - pred_info_get_context(PredInfo, Context), Pieces = [words("Warning: debugging implicitly tables"), words("all predicates that perform I/O"), words("(to make the mdb command `retry' safe across I/O),"), words("but tabling is")] ++ ReasonDesc ++ [nl], Spec = spec($pred, severity_warning(warn_cannot_table), phase_code_gen, - Context, Pieces), + PragmaContext, Pieces), !:WarnSpecs = [Spec | !.WarnSpecs] ; TabledMethod = tabled_minimal(_), Pieces = [words("Error: minimal model tabling is")] ++ ReasonDesc ++ [nl], - % We generate one no-context diag_spec for each affected predicate, - % but we print only one copy of each duplicated diag_spec. - Spec = no_ctxt_spec($pred, severity_error, phase_code_gen, Pieces), + Spec = spec($pred, severity_error, phase_code_gen, + PragmaContext, Pieces), !:ErrSpecs = [Spec | !.ErrSpecs] ). @@ -500,29 +499,27 @@ general_cannot_table_reason_spec(ModuleInfo, PredId, TabledMethod, Reason, gen_cannot_table_reason_desc(Reason) = Desc :- ( Reason = gen_reason_non_c_backend, - Desc = [words("is implemented only on the C backend."), nl] + Desc = [words("implemented only on the C backend."), nl] ; Reason = gen_reason_gc_accurate, - Desc = [words("is not compatible with --gc accurate."), nl] + Desc = [words("not compatible with --gc accurate."), nl] ; Reason = gen_reason_gc_hgc, - Desc = [words("is not compatible with --gc hgc."), nl] + Desc = [words("not compatible with --gc hgc."), nl] ; Reason = gen_reason_parallel, - Desc = [words("is not compatible with parallel execution."), nl] + Desc = [words("not compatible with parallel execution."), nl] ). %---------------------% -:- pred mm_cannot_table_reason_spec(mm_cannot_table_reason::in, - err_spec::out) is det. +:- pred mm_cannot_table_reason_spec(prog_context::in, + mm_cannot_table_reason::in, err_spec::out) is det. -mm_cannot_table_reason_spec(Reason, Spec) :- +mm_cannot_table_reason_spec(Context, Reason, Spec) :- Pieces = [words("Error: minimal model tabling is not compatible with")] ++ mm_cannot_table_reason_desc(Reason), - % We generate one no-context diag_spec for each affected predicate, - % but we print only one copy of each duplicated diag_spec. - Spec = no_ctxt_spec($pred, severity_error, phase_code_gen, Pieces). + Spec = spec($pred, severity_error, phase_code_gen, Context, Pieces). :- type mm_cannot_table_reason ---> mm_reason_hlc diff --git a/tests/invalid/hawkins_mm_fail_reset.err_exp b/tests/invalid/hawkins_mm_fail_reset.err_exp index 32c87ca04..0adb6228b 100644 --- a/tests/invalid/hawkins_mm_fail_reset.err_exp +++ b/tests/invalid/hawkins_mm_fail_reset.err_exp @@ -1,14 +1,14 @@ -hawkins_mm_fail_reset.m:024: Warning: the determinism declaration for predicate -hawkins_mm_fail_reset.m:024: `entry'/1 could be tighter. -hawkins_mm_fail_reset.m:024: Declared `nondet', inferred `failure'. -hawkins_mm_fail_reset.m:031: Error: `:- pragma minimal_model' declarations are -hawkins_mm_fail_reset.m:031: not allowed for procedures with determinism -hawkins_mm_fail_reset.m:031: `failure'. -hawkins_mm_fail_reset.m:034: Warning: this disjunct will never have any -hawkins_mm_fail_reset.m:034: solutions. +hawkins_mm_fail_reset.m:027: Warning: the determinism declaration for predicate +hawkins_mm_fail_reset.m:027: `entry'/1 could be tighter. +hawkins_mm_fail_reset.m:027: Declared `nondet', inferred `failure'. +hawkins_mm_fail_reset.m:034: Error: `:- pragma minimal_model' declarations are +hawkins_mm_fail_reset.m:034: not allowed for procedures with determinism +hawkins_mm_fail_reset.m:034: `failure'. hawkins_mm_fail_reset.m:037: Warning: this disjunct will never have any hawkins_mm_fail_reset.m:037: solutions. -hawkins_mm_fail_reset.m:040: Error: `:- pragma minimal_model' declarations are -hawkins_mm_fail_reset.m:040: not allowed for procedures with determinism -hawkins_mm_fail_reset.m:040: `failure'. +hawkins_mm_fail_reset.m:040: Warning: this disjunct will never have any +hawkins_mm_fail_reset.m:040: solutions. +hawkins_mm_fail_reset.m:043: Error: `:- pragma minimal_model' declarations are +hawkins_mm_fail_reset.m:043: not allowed for procedures with determinism +hawkins_mm_fail_reset.m:043: `failure'. For more information, recompile with `-E'. diff --git a/tests/invalid/hawkins_mm_fail_reset.err_exp2 b/tests/invalid/hawkins_mm_fail_reset.err_exp2 new file mode 100644 index 000000000..c8d7b4f01 --- /dev/null +++ b/tests/invalid/hawkins_mm_fail_reset.err_exp2 @@ -0,0 +1,11 @@ +hawkins_mm_fail_reset.m:027: Warning: the determinism declaration for predicate +hawkins_mm_fail_reset.m:027: `entry'/1 could be tighter. +hawkins_mm_fail_reset.m:027: Declared `nondet', inferred `failure'. +hawkins_mm_fail_reset.m:035: Error: minimal model tabling is not compatible +hawkins_mm_fail_reset.m:035: with generating high level code. +hawkins_mm_fail_reset.m:037: Warning: this disjunct will never have any +hawkins_mm_fail_reset.m:037: solutions. +hawkins_mm_fail_reset.m:040: Warning: this disjunct will never have any +hawkins_mm_fail_reset.m:040: solutions. +hawkins_mm_fail_reset.m:044: Error: minimal model tabling is not compatible +hawkins_mm_fail_reset.m:044: with generating high level code. diff --git a/tests/invalid/hawkins_mm_fail_reset.m b/tests/invalid/hawkins_mm_fail_reset.m index 6184fdef4..d99be2d8a 100644 --- a/tests/invalid/hawkins_mm_fail_reset.m +++ b/tests/invalid/hawkins_mm_fail_reset.m @@ -17,6 +17,9 @@ % foo.m:014: Warning: this disjunct will never have any solutions. % foo.m:017: Warning: this disjunct will never have any solutions. % ** Error making `Mercury/cs/foo.c'. +% +% The .err_exp file is for LLDS grades. +% The .err_exp2 file is for HLDS grades. :- module hawkins_mm_fail_reset. :- interface. diff --git a/tests/invalid/pragma_qual_error.err_exp b/tests/invalid/pragma_qual_error.err_exp index 7c0ff1aa3..04d63326c 100644 --- a/tests/invalid/pragma_qual_error.err_exp +++ b/tests/invalid/pragma_qual_error.err_exp @@ -1,31 +1,31 @@ -pragma_qual_error.m:025: In `:- pragma foreign_export_enum' declaration: -pragma_qual_error.m:025: error: the type `bar'/0 is undefined. -pragma_qual_error.m:032: Error: `:- pragma foreign_enum' declaration for the -pragma_qual_error.m:032: undeclared type `bar'/0. -pragma_qual_error.m:046: Error: C foreign_proc for undeclared mode of predicate -pragma_qual_error.m:046: `pragma_qual_error.foo'/2. -pragma_qual_error.m:046: In `:- pragma foreign_proc' declaration: -pragma_qual_error.m:046: error: the mode `not_a_mode'/0 is undefined. -pragma_qual_error.m:060: Error: `:- pragma memo' declaration for undeclared -pragma_qual_error.m:060: mode of predicate `pragma_qual_error.memoproc'/3. -pragma_qual_error.m:060: In `:- pragma memo' declaration: -pragma_qual_error.m:060: error: the mode `not_a_mode'/0 is undefined. -pragma_qual_error.m:071: Error: `:- pragma loop_check' declaration for -pragma_qual_error.m:071: undeclared mode of predicate -pragma_qual_error.m:071: `pragma_qual_error.loop_check_proc'/2. -pragma_qual_error.m:071: In `:- pragma loop_check' declaration: -pragma_qual_error.m:071: error: the mode `not_a_mode'/0 is undefined. -pragma_qual_error.m:088: Error: `:- pragma minimal_model_stack_copy' -pragma_qual_error.m:088: declaration for undeclared mode of predicate -pragma_qual_error.m:088: `pragma_qual_error.tc'/2. -pragma_qual_error.m:088: In `:- pragma minimal_model' declaration: -pragma_qual_error.m:088: error: the mode `not_a_mode'/0 is undefined. -pragma_qual_error.m:112: In `:- pragma type_spec' declaration: -pragma_qual_error.m:112: error: the mode `not_a_mode'/0 is undefined. -pragma_qual_error.m:112: In `:- pragma type_spec' declaration: -pragma_qual_error.m:112: error: the type `not_a_type'/0 is undefined. -pragma_qual_error.m:112: In `:- pragma type_spec' declaration for predicate -pragma_qual_error.m:112: `type_spec_pred'/2: -pragma_qual_error.m:112: error: mode annotation specifies undeclared mode -pragma_qual_error.m:112: `type_spec_pred(in, not_a_mode)'. +pragma_qual_error.m:028: In `:- pragma foreign_export_enum' declaration: +pragma_qual_error.m:028: error: the type `bar'/0 is undefined. +pragma_qual_error.m:035: Error: `:- pragma foreign_enum' declaration for the +pragma_qual_error.m:035: undeclared type `bar'/0. +pragma_qual_error.m:049: Error: C foreign_proc for undeclared mode of predicate +pragma_qual_error.m:049: `pragma_qual_error.foo'/2. +pragma_qual_error.m:049: In `:- pragma foreign_proc' declaration: +pragma_qual_error.m:049: error: the mode `not_a_mode'/0 is undefined. +pragma_qual_error.m:063: Error: `:- pragma memo' declaration for undeclared +pragma_qual_error.m:063: mode of predicate `pragma_qual_error.memoproc'/3. +pragma_qual_error.m:063: In `:- pragma memo' declaration: +pragma_qual_error.m:063: error: the mode `not_a_mode'/0 is undefined. +pragma_qual_error.m:074: Error: `:- pragma loop_check' declaration for +pragma_qual_error.m:074: undeclared mode of predicate +pragma_qual_error.m:074: `pragma_qual_error.loop_check_proc'/2. +pragma_qual_error.m:074: In `:- pragma loop_check' declaration: +pragma_qual_error.m:074: error: the mode `not_a_mode'/0 is undefined. +pragma_qual_error.m:091: Error: `:- pragma minimal_model_stack_copy' +pragma_qual_error.m:091: declaration for undeclared mode of predicate +pragma_qual_error.m:091: `pragma_qual_error.tc'/2. +pragma_qual_error.m:091: In `:- pragma minimal_model' declaration: +pragma_qual_error.m:091: error: the mode `not_a_mode'/0 is undefined. +pragma_qual_error.m:115: In `:- pragma type_spec' declaration: +pragma_qual_error.m:115: error: the mode `not_a_mode'/0 is undefined. +pragma_qual_error.m:115: In `:- pragma type_spec' declaration: +pragma_qual_error.m:115: error: the type `not_a_type'/0 is undefined. +pragma_qual_error.m:115: In `:- pragma type_spec' declaration for predicate +pragma_qual_error.m:115: `type_spec_pred'/2: +pragma_qual_error.m:115: error: mode annotation specifies undeclared mode +pragma_qual_error.m:115: `type_spec_pred(in, not_a_mode)'. For more information, recompile with `-E'. diff --git a/tests/invalid/pragma_qual_error.err_exp2 b/tests/invalid/pragma_qual_error.err_exp2 new file mode 100644 index 000000000..934dbe842 --- /dev/null +++ b/tests/invalid/pragma_qual_error.err_exp2 @@ -0,0 +1,33 @@ +pragma_qual_error.m:028: In `:- pragma foreign_export_enum' declaration: +pragma_qual_error.m:028: error: the type `bar'/0 is undefined. +pragma_qual_error.m:035: Error: `:- pragma foreign_enum' declaration for the +pragma_qual_error.m:035: undeclared type `bar'/0. +pragma_qual_error.m:049: Error: C foreign_proc for undeclared mode of predicate +pragma_qual_error.m:049: `pragma_qual_error.foo'/2. +pragma_qual_error.m:049: In `:- pragma foreign_proc' declaration: +pragma_qual_error.m:049: error: the mode `not_a_mode'/0 is undefined. +pragma_qual_error.m:063: Error: `:- pragma memo' declaration for undeclared +pragma_qual_error.m:063: mode of predicate `pragma_qual_error.memoproc'/3. +pragma_qual_error.m:063: In `:- pragma memo' declaration: +pragma_qual_error.m:063: error: the mode `not_a_mode'/0 is undefined. +pragma_qual_error.m:074: Error: `:- pragma loop_check' declaration for +pragma_qual_error.m:074: undeclared mode of predicate +pragma_qual_error.m:074: `pragma_qual_error.loop_check_proc'/2. +pragma_qual_error.m:074: In `:- pragma loop_check' declaration: +pragma_qual_error.m:074: error: the mode `not_a_mode'/0 is undefined. +pragma_qual_error.m:091: Error: `:- pragma minimal_model_stack_copy' +pragma_qual_error.m:091: declaration for undeclared mode of predicate +pragma_qual_error.m:091: `pragma_qual_error.tc'/2. +pragma_qual_error.m:091: Error: minimal model tabling is not compatible with +pragma_qual_error.m:091: generating high level code. +pragma_qual_error.m:091: In `:- pragma minimal_model' declaration: +pragma_qual_error.m:091: error: the mode `not_a_mode'/0 is undefined. +pragma_qual_error.m:115: In `:- pragma type_spec' declaration: +pragma_qual_error.m:115: error: the mode `not_a_mode'/0 is undefined. +pragma_qual_error.m:115: In `:- pragma type_spec' declaration: +pragma_qual_error.m:115: error: the type `not_a_type'/0 is undefined. +pragma_qual_error.m:115: In `:- pragma type_spec' declaration for predicate +pragma_qual_error.m:115: `type_spec_pred'/2: +pragma_qual_error.m:115: error: mode annotation specifies undeclared mode +pragma_qual_error.m:115: `type_spec_pred(in, not_a_mode)'. +For more information, recompile with `-E'. diff --git a/tests/invalid/pragma_qual_error.m b/tests/invalid/pragma_qual_error.m index cdea635cc..da2d663d7 100644 --- a/tests/invalid/pragma_qual_error.m +++ b/tests/invalid/pragma_qual_error.m @@ -3,6 +3,9 @@ %---------------------------------------------------------------------------% % Test for error messages produced by module qualification errors in % pragma declarations. +% +% The .err_exp file is for LLDS grades. +% The .err_exp2 file is for MLDS grades. %---------------------------------------------------------------------------% :- module pragma_qual_error.