[Aldor-l] (to) add or not (to) add

Christian Aistleitner tmgisi at gmx.at
Thu May 11 04:01:11 EDT 2006


Hello,

> But I
> somehow believe that it is a bug (in case there is no "add") when the
> compiler produces segfaulting code.

So do I. For the following discussion, I modified the source code a bit,  
to get the corresponding variable names for -DWithAdd and without it in  
the c files. So I replaced

#else
Tree: Count == UnionCount(Atom, CrossCount(Tree, Tree));
#endif

by

#else
Tree: Count == UnionCount(Atom, CrossCount(Tree, Tree));
add;
#endif

. Lets take a look at the generated C code. At around line 350, I can find  
the following piece of code:

G_ERY3D_test__Tree__1058110290 = CF5_UnionCount(e0, (FiWord)
                G_9588Z_test__Atom__960192316, (FiWord) CF10_CrossCount(e0,  
(
                FiWord) G_ERY3D_test__Tree__1058110290, (FiWord)
                G_ERY3D_test__Tree__1058110290));

Here, G_ERY3D_test__Tree__1058110290 is used to initialize itself.  
However, G_ERY3D_test__Tree__1058110290 is 0; So the CF10_CrossCount call  
comes down to
CF10_CrossCount( e0, 0, 0 );

The CF10_CrossCount has no oppurtinity to know about the recursion or  
G_ERY3D_test__Tree__1058110290.
This looks very fishy to me. And I could not find a line that looks like  
it fixing this up.

This does not mean, that this is the or an actual error. It may be even  
correct.
However, to me this it looks like causing troubles.

--
Kind regards,
Christian




More information about the Aldor-l mailing list