diff options
author | xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e> | 2013-12-30 16:37:05 +0000 |
---|---|---|
committer | xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e> | 2013-12-30 16:37:05 +0000 |
commit | 51e8bc524d570439f868ec0bdbf718cb53ca7669 (patch) | |
tree | 5211b1971bdc1df4bc231dfef90cd15e3758a7e3 /backend/ValueDomain.v | |
parent | 98089fdf4880b46a57aafa96ea00578e396bb58b (diff) | |
download | compcert-51e8bc524d570439f868ec0bdbf718cb53ca7669.tar.gz compcert-51e8bc524d570439f868ec0bdbf718cb53ca7669.zip |
Ctypes.sizeof ty = 0 for empty types ty (zero-sized array, empty struct/union).
__builtin_memcpy_aligned now supports the case sz = 0.
git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@2392 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e
Diffstat (limited to 'backend/ValueDomain.v')
-rw-r--r-- | backend/ValueDomain.v | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/backend/ValueDomain.v b/backend/ValueDomain.v index 2c728d3c..5d0e3ae3 100644 --- a/backend/ValueDomain.v +++ b/backend/ValueDomain.v @@ -2727,16 +2727,14 @@ Qed. Lemma romatch_storebytes: forall m b ofs bytes m' rm, Mem.storebytes m b ofs bytes = Some m' -> - bytes <> nil -> romatch m rm -> romatch m' rm. Proof. - intros; red; intros. exploit H1; eauto. intros (A & B & C). split; auto. split. + intros; red; intros. exploit H0; eauto. intros (A & B & C). split; auto. split. - apply bmatch_inv with m; auto. - intros. eapply Mem.loadbytes_storebytes_other; eauto. - left. red; intros; subst b0. elim (C ofs). apply Mem.perm_cur_max. - eapply Mem.storebytes_range_perm; eauto. - destruct bytes. congruence. simpl length. rewrite inj_S. omega. + intros. eapply Mem.loadbytes_storebytes_disjoint; eauto. + destruct (eq_block b0 b); auto. subst b0. right; red; unfold Intv.In; simpl; red; intros. + elim (C x). apply Mem.perm_cur_max. eapply Mem.storebytes_range_perm; eauto. - intros; red; intros; elim (C ofs0). eauto with mem. Qed. |