I am getting the following error when compiling
a simple snippet
system_error(cannot_catch_throw(error(existence_error(procedure,(>)/2),findall/3)))
To reproduce, create a file (test.pl) with this
code:
:-initialization(findall_bug).
findall_bug:-
write(findall_bug),nl,
findall(Att, (member(Att, [6, 0]), Att >
0), XParmAs),
write(XParmAs),nl,
findall(Att,
findall_bug1([6,0], Att), ParmAs),
write(ParmAs),nl,
write(done),nl,
!.
findall_bug1(Parms,
Att):-
member( Att, Parms),
Att > 0.
I usually compile the generated assembly file
with this two steps:
gplc -S test.pl -o
test.s
mingw-as - o test.obj --32
test.s
and link with MSVC linker.
However, I can reproduce this using only gplc:
gplc --no-top-level
--min-pl-bips -o test.exe test.pl
Output of execution is:
findall_bug
system_error(cannot_catch_throw(error(existence_error(procedure,(>)/2),findall/3)))
system_error(cannot_catch_throw(error(existence_error(procedure,(>)/2),findall/3)))
[]
[6]
done
If you compile without --min-pl-bips, the output is right
It seems that the compiler treats differently
the arithmetic comparison inside findall, and does not include some library
code when using --min-pl-bips (and also linking directly with
MSVC)
Using GNU Prolog 1.4.4
Regards,
Gustavo
--
Ce message a été vérifié par MailScanner
pour des virus ou des polluriels et rien de suspect n'a été trouvé.
_______________________________________________
Bug-prolog mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/bug-prolog