http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47051
--- Comment #5 from Joost VandeVondele <Joost.VandeVondele at pci dot uzh.ch> 2010-12-23 15:32:14 UTC --- (In reply to comment #4) Hi Dominique, I have read exactly this: > 3 If the variable is an unallocated allocatable array, expr shall have the > same > rank. If the variable is an allocated allocatable variable, it is deallocated > if expr is an array of different shape, any of the corresponding length type > parameter values of the variable and expr differ, or the variable is > polymorphic and the dynamic type of the variable and expr differ. this section explicitly says it is deallocated only if the shape is different. In my example, the shape is the same (even if the bounds are different). There is thus no need to deallocate a, and reallocate afterwards with the bounds of b. Joost