diff options
author | Andrzej Janik <[email protected]> | 2020-10-18 15:06:37 +0200 |
---|---|---|
committer | Andrzej Janik <[email protected]> | 2020-10-18 15:06:37 +0200 |
commit | 28a0968294b7001b69174087445d1254cb8a0138 (patch) | |
tree | 7da6c5c9524721f6ee775ef94f9d00e44a766e1d | |
parent | 2b3ecc99e3b2a1c0a1989733da17b359e974951c (diff) | |
download | ZLUDA-28a0968294b7001b69174087445d1254cb8a0138.tar.gz ZLUDA-28a0968294b7001b69174087445d1254cb8a0138.zip |
Fix small regression
-rw-r--r-- | ptx/src/ptx.lalrpop | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ptx/src/ptx.lalrpop b/ptx/src/ptx.lalrpop index 4624580..c066ae4 100644 --- a/ptx/src/ptx.lalrpop +++ b/ptx/src/ptx.lalrpop @@ -1345,7 +1345,10 @@ VariableArrayOrPointer<T>: (Option<u32>, T, &'input str, ast::ArrayOrPointer) = if dims.len() > 1 && dims.contains(&0) { return Err(ParseError::User { error: ast::PtxError::ZeroDimensionArray }) } - ast::ArrayOrPointer::Pointer + match &*dims { + [0] => ast::ArrayOrPointer::Pointer, + _ => ast::ArrayOrPointer::Array { dimensions: dims, init: Vec::new() } + } } }; Ok((align, typ, name, array_init)) |