~ubuntu-branches/debian/sid/frama-c/sid

« back to all changes in this revision

Viewing changes to tests/jessie/array_field_addr.c

  • Committer: Bazaar Package Importer
  • Author(s): Mehdi Dogguy
  • Date: 2009-06-03 08:19:25 UTC
  • Revision ID: james.westby@ubuntu.com-20090603081925-kihvxvt0wy3zc4ar
Tags: upstream-20081201.dfsg
ImportĀ upstreamĀ versionĀ 20081201.dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
struct t {
 
3
  int tab[5];
 
4
};
 
5
 
 
6
/*@ requires \valid(i);
 
7
  @ ensures *i == 1;
 
8
  @ */
 
9
void g(int* i) {
 
10
  *i = 1;
 
11
}
 
12
 
 
13
/*@ requires \valid(a) && \valid_range(a->tab,0,4); */
 
14
void f(struct t* a) {
 
15
  g (&a->tab[0]);
 
16
  //@ assert a->tab[0] == 1;
 
17
}
 
18
 
 
19
/* 
 
20
Local Variables:
 
21
compile-command: "LC_ALL=C make array_field_addr"
 
22
End:
 
23
*/