LACINLING loses AVIS_MAXVAL info
|
|
Bugzilla Link |
682 |
Created on |
Feb 25, 2010 15:58 |
Resolution |
DUPLICATE |
Resolved on |
Apr 26, 2010 17:37 |
Version |
svn |
OS |
Linux |
Architecture |
PC |
Attachments |
bugCF.sac |
Extended Description
Created an attachment (id=676)
source code to reproduce fault
The attached, when compiled with almost any version of sac2c
(e.g., Build #16392 - #16770:MODIFIED), with options:
sac2c bugCF.sac -v4 -extrema -nocyc -noprelude
dies in one of several ways, all related to AVIS extrema not being
handled properly when a LACFUN is inlined at the end of CF.
The N_avis node pointed to by the non-inlined LACFUN extrema
end up pointing to junk, so the failure occurs only when
some other traversal looks at the extrema. Hence, the failure
may occur in VP, CSE, DCR, etc., depending on the phase of
the moon and the will of Loki.
I think the problem demonstrates a design problem in AVIS_MINVAL/MAXVAL:
These fields are defined as attributes, so they are not traversed
at all during DUP or other traversals.
The current flattened representation of extrema has AVIS_MINVAL/MAXVAL
pointing to an appropriate N_avis node, as an attribute.
I am coming to the conclusion that this is wrong, and that
AVIS_MINVAL/MAX should be son nodes, either NULL or pointing to
an N_id, which would then point to the same N_avis node as
at present.