-
Notifications
You must be signed in to change notification settings - Fork 54
/
BUGS
145 lines (112 loc) · 5.07 KB
/
BUGS
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
Bug reports should be sent to mercury-bugs@cs.mu.oz.au.
If you're reporting more than one bug, please use separate emails
for each bug. Please include all the relevant information,
including which version of Mercury you're using, what operating
system you're using, and a complete source file that
demonstrates the problem. (If it's something that only shows
up in multi-module programs, send a shar archive or uuencoded
tar archive containing your source files.) Please try to ensure
that bug reports contain all the information that we need to be
able to reproduce the problem. Make sure that all bug reports are
fully self-contained.
Below is a list of the known outstanding bugs.
We'll try to record any other bugs that are discovered
on our WWW page <http://www.cs.mu.oz.au/mercury>.
See also the LIMITATIONS file.
Note: please do not be alarmed by the fact that this software has some bugs.
ALL useful software has bugs. During the development of the Mercury
implementation we have found bugs in gcc, as, ld, the dynamic loader,
and even the OS kernel. We hope that by listing the known outstanding bugs
here we are doing our users a service. It would be disappointing if
anyone were to infer the wrong thing from it.
-----------------------------------------------------------------------------
Subject: bug report - Inf and NaN
Date: Wed, 4 Oct 1995 02:48:19 +1000 (EST)
The following module causes an "undefined variable Inf" error in the
generated C code, because 1E400 == Infinity, which gets printed as `Inf'.
:- module hello.
:- interface.
:- import_module io.
:- pred main(io__state::di, io__state::uo) is det.
:- implementation.
main -->
io__write_float(1E400),
io__write_string("\n").
-----------------------------------------------------------------------------
Subject: map__lookup failed in profiler
Date: Tue, 7 May 1996 11:58:08 +1000 (EST)
When profiling programs that have been compiled on the Alpha using
shared libraries, the profiler will abort with a "Software Error:
map__lookup failed" message. The work-around is to link with
`--static'.
This is actually due to a bug in the Alpha shared library mechanism,
which does not conform to the ANSI C standard. There is not much
we can do about this one.
-----------------------------------------------------------------------------
Subject: nit in error msg
Date: Thu, 16 May 1996 10:25:42 +1000 (EST)
Here's another small error in an error message. If you comment out
the [] clause for the functions car/1 or cdr/1, you get this message:
fntest.m:023: In `car(in) = out':
fntest.m:023: Error: determinism declaration not satisfied.
fntest.m:023: Declared `det', inferred `semidet'.
fntest.m:023: in argument 1 of clause head:
fntest.m:023: unification of `HeadVar__1' and `[X | V_4]' can fail.
It says Declared `det', inferred `semidet', but I never declared it at
all. It's a bit misleading. Certainly not a major problem, and the
later part of the message makes it quite clear what the problem is,
but I thought I'd point it out to you before I forgot it.
-----------------------------------------------------------------------------
Subject: missed mode error
Date: Tue, 28 May 1996 02:27:34 +1000 (EST)
Another one for the bug report file:
The goal `some [X, Y] X \= Y' should be a mode error,
but the current mode checker doesn't report an error.
Instead, the compiler goes on to generate code which gives
the wrong answer. For example, the following program prints out `no'.
The same problem also occurs with `some [X, Y] (X = Y -> fail ; true)'.
:- module bug.
:- interface.
:- import_module io.
:- pred main(io__state::di, io__state::uo) is det.
:- implementation.
main -->
( { p } -> io__write_string("yes\n") ; io__write_string("no\n") ).
:- pred p is semidet.
p :-
some [X, Y] X \= Y.
The bug occurs only when the variables being unified inside a negated
context are not live, i.e. when it is the last occurrence of those variables.
-----------------------------------------------------------------------------
Subject: bug with PC values on Alpha
Date: Wed, 12 Jun 1996 15:45:59 +1000
On the alpha, if the Mercury runtime catches a signal, it
sometimes prints out the wrong value for the PC.
-----------------------------------------------------------------------------
Subject: bug with polymorphic abstract exported equivalence types
Date: Tue, 27 May 1997 20:42:43 +1000 (EST)
The compiler generates incorrect code for the following program.
The problem is that at the call to f/1 in module bar, f/1 has
type `func(foo(T)) = int', and so it passes the type_info in r1
and the foo(T) (== int) in r2. But in the definition it has type
`func(int) = int', so it just passes the int in r1.
Similarly for the call to c/0.
:- module foo.
:- interface.
:- func f(foo(T)) = int.
:- type foo(T).
:- func c = foo(int).
:- implementation.
:- import_module int.
:- type foo(T) == int.
f(X) = X + 1.
c = 42.
:- module bar.
:- interface.
:- import_module io.
:- pred main(io__state::di, io__state::uo) is det.
:- implementation.
:- import_module foo.
main -->
write(f(c)), nl.
-----------------------------------------------------------------------------