CHK of FUNDEF_RETURN code faulty
|
|
Bugzilla Link |
1018 |
Created on |
Aug 29, 2012 16:47 |
Resolution |
FIXED |
Resolved on |
Aug 31, 2012 22:59 |
Version |
svn |
OS |
Linux |
Architecture |
PC |
Extended Description
I recently introduced CHK code to vet FUNDEF_RETURN, but it has a flaw:
* 17: Converting from static single assignment form ...
**** Converting from SSA form ...
-> Running syntax tree checks
**** Reintroducing loops and conditionals ...
-> Running syntax tree checks
TRAVERSE ERROR: node of type 59810128:!invalid! found where 26:N_ap was expected!
The problem here is that FUNDEF_RETURN is no longer valid
once we no longer have loops as LACFUNS.
Similarly, it should not be valid before we have LACFUNS.
I am going to update ast.xml to reflect this situation and
will amend check_lib.c as well.
~/sac/testsuite/optimizations/constantfolding$ sac2c -V
sac2c v1.00-beta (Haggis And Apple)
developer rev 18189:MODIFIED linux-gnu_x86_64
(Wed Aug 29 11:33:27 EDT 2012 by sac)
sac2c bug897.sac -d treecheck -chkfreq 4 -v4
It is too bad we do not have any automated mechanism for vetting
AST attributes...