-check c defeats WLF and AWLF
|
|
Bugzilla Link |
988 |
Created on |
Jun 30, 2012 20:48 |
Version |
svn |
OS |
Linux |
Architecture |
PC |
Extended Description
The summary says it all. WLF is well-known to be broken WRT -ecc and
-check c, but I was not aware that -check c would also break AWLF.
Consider the AWLF unit test prdAKD.sac, which basically does
sum(iota(id(N)). It can be seen here:
int[*] id(int[*] y)
{
return(y);
}
int main()
{
XXX = iota(id (50));
ZZZ = sum(XXX);
z = _sub_SxS_(ZZZ, 1225);
return(z);
}
If we compile it with -doawlf -nowlf -ecc, we get one WL, as desired.
If we compile it with -doawlf -nowlf -check c, we get two WLs, as not
desired.
The problem may be merely inadequate tests in the compiler for
-check c vs. -ecc. At any rate, I'll look into it: I was operating
under the apparently mistaken impression that they were
identical, except that -ecc ripped out the guards after optimization,
and -check c did not.