diff options
| author | Aleksandr Nogikh <nogikh@google.com> | 2023-09-20 14:35:47 +0200 |
|---|---|---|
| committer | Aleksandr Nogikh <nogikh@google.com> | 2023-09-28 09:53:32 +0000 |
| commit | 746f61e725ad2460e3f101b5e8899105ddea08a1 (patch) | |
| tree | 16504ca1ef7d98f67d221e59c449266402d84c01 /pkg/compiler | |
| parent | f73e09b3a31addec5481c03b113a17cc839ded1f (diff) | |
prog: preserve inout direction during squashing
Prohibit arg direction from being DirIn if other calls use the resource
as input.
Fix one case where we used to violate it - during argument squashing.
Reported-by: John Miller <jm3228520@gmail.com>
Diffstat (limited to 'pkg/compiler')
| -rw-r--r-- | pkg/compiler/types.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/compiler/types.go b/pkg/compiler/types.go index 095791adb..85a5bd527 100644 --- a/pkg/compiler/types.go +++ b/pkg/compiler/types.go @@ -1110,8 +1110,8 @@ ANYUNION [ ] [varlen] ANYPTRS [ - ANYPTR ptr[in, array[ANYUNION]] - ANYPTR64 ptr64[in, array[ANYUNION]] + ANYPTR ptr[inout, array[ANYUNION]] + ANYPTR64 ptr64[inout, array[ANYUNION]] ] resource ANYRES8[int8]: -1, 0 |
