Skip to content

Commit

Permalink
Fix #2099.
Browse files Browse the repository at this point in the history
  • Loading branch information
athas committed Jan 24, 2024
1 parent bb1ed3b commit c92651f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

* A crash in alias checking under some rare circumstances (#2096).

* Mishandling of existential sizes for top level constants. (#2099)

## [0.25.12]

### Added
Expand Down
3 changes: 3 additions & 0 deletions src/Futhark/Internalise/Exps.hs
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ internaliseValBind types fb@(E.ValBind entry fname _ (Info rettype) tparams para
first zeroExts . unzip . internaliseReturnType (map (fmap paramDeclType) all_params) rettype
<$> mapM subExpType body_res

when (null params') $
bindExtSizes (E.AppRes (E.toStruct $ E.retType rettype) (E.retDims rettype)) body_res

body_res' <-
ensureResultExtShape msg loc (map I.fromDecl rettype') $ subExpsRes body_res
let num_ctx = length (shapeContext rettype')
Expand Down
6 changes: 6 additions & 0 deletions tests/issue2099.fut
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
-- ==
-- input {}
-- output { [100, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9] 11i64 }

def numbers = concat [100] (0..<10i32)
entry main = (numbers, length numbers)

0 comments on commit c92651f

Please sign in to comment.