# 'reshape' may behave inconsistently

**URL:** <https://fortran-lang.discourse.group/t/reshape-may-behave-inconsistently/10332>\
**Category:** Compilers\
**Created:** [August 14, 2025, 1:15pm UTC](https://fortran-lang.discourse.group/t/reshape-may-behave-inconsistently/10332 "2025-08-14T13:15:29Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![Walex](https://avatars.discourse-cdn.com/v4/letter/w/eada6e/32.png) [@Walex](https://fortran-lang.discourse.group/u/Walex)\
**Post date:** [August 14, 2025, 2:10pm UTC](https://fortran-lang.discourse.group/t/reshape-may-behave-inconsistently/10332/4 "2025-08-14T14:10:21Z")

</div>

> [@Walex](#):
>
> means that _all_ array references should be based on `lbound`. Unless I guess lower bounds are always set or defaulted to be 1

Just noticed in the related links this one:

> [@Just say no to non-default lower bounds](https://fortran-lang.discourse.group/t/just-say-no-to-non-default-lower-bounds/6108):
>
> I am officially declaring all use of non-default array bounds as evil forevermore. If one is writing code strictly for one’s own use and if you’re confident that you won’t need to modify the code ever again, maybe it’s ok, but if you have to return to the code years later or if anyone other than you has to work with it, then I think the byzantine rules around when the bounds will or won’t be preserved are sufficiently complicated and nuanced as to make seemingly simple code modifications proble…

Which pretty much comes to the same conclusion even without `reshape` or `pack`. One of the comments on that topic is the table in comment 12:

> [@Just say no to non-default lower bounds](https://fortran-lang.discourse.group/t/just-say-no-to-non-default-lower-bounds/6108/12):
>
> [Damian’s table](https://github.com/sourceryinstitute/fidbits/blob/master/src/array-bounds-preservation/bounds.md) is an excellent summary. I reproduce it here for the sake of better visibility: Bounds-preserving Fortran feature True intrinsic assignment True source allocation without specified bounds True allocatable, assumed-shape dummy argument True associate name False non-allocatable, assumed-shape dummy argument False function result

---

_[View the full topic](https://fortran-lang.discourse.group/t/reshape-may-behave-inconsistently/10332)._
