For function f(int a) ; ensures a==\old(a) may be invalid
ID0000168:
**This issue was created automatically from Mantis Issue 168. Further discussion may take place here.**
---
| **Id** | **Project** | **Category** | **View** | **Due Date** | **Updated** |
| --- | --- | --- | --- | --- | --- |
| ID0000168 | Frama-C | Plug-in > Eva | public | 2009-06-29 | 2009-09-24 |
| | | | | | |
| --- | --- | --- | --- | --- | --- |
| **Reporter** | patrick | **Assigned To** | pascal | **Resolution** | no change required |
| **Priority** | normal | **Severity** | major | **Reproducibility** | always |
| **Platform** | - | **OS** | - | **OS Version** | - |
| **Product Version** | Frama-C GIT, precise the release id | **Target Version** | - | **Fixed in Version** | Frama-C Beryllium-20090901 |
### Description :
The command "toplevel.opt -val old.c" gives the following line:
old.c:8: Warning: Function f, behavior default: postcondition got status valid
This is wrong: the postcondition is invalid.
### Additional Information :
Revision 5634
Contents of the file old.c
int *p, *q ;
/*@ ensures *q == a ;
*/
void f (int a) {
*q = a ;
*p = 3 ;
}
int main (int x, int y) {
q = &y ;
p = &x ;
f (x) ;
return x ;
}
issue