-
Notifications
You must be signed in to change notification settings - Fork 112
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix crash in type checking of nested field assign lhs (#782)
- Loading branch information
1 parent
074167a
commit c15862c
Showing
3 changed files
with
32 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// RUN: %parallel-boogie /lib:base "%s" > "%t" | ||
// RUN: %diff "%s.expect" "%t" | ||
|
||
type MemAddr; | ||
type CacheId; | ||
|
||
datatype DirState { | ||
Owner(i: CacheId), | ||
Sharers(i: CacheId) | ||
} | ||
|
||
datatype DirRequest { | ||
Share(i: CacheId), | ||
Own(i: CacheId) | ||
} | ||
|
||
datatype DirInfo { | ||
DirInfo(state: DirState, pending: DirRequest) | ||
} | ||
|
||
var dir: [MemAddr]DirInfo; | ||
|
||
procedure cache_snoop_resp(i: CacheId, ma: MemAddr) | ||
modifies dir; | ||
{ | ||
dir[ma]->t->pending := dir[ma]->t->pending; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
unknown_field_error.bpl(26,11): Error: datatype DirInfo does not have a field with name t | ||
unknown_field_error.bpl(26,34): Error: datatype DirInfo does not have a field with name t | ||
2 type checking errors detected in unknown_field_error.bpl |