This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/48058] [4.6 Regression] reallocation of array during constructor assignement


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48058

Dominique d'Humieres <dominiq at lps dot ens.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |burnus@net-b.de, pault at
                   |                            |gcc dot gnu.org

--- Comment #1 from Dominique d'Humieres <dominiq at lps dot ens.fr> 2011-03-10 14:07:49 UTC ---
> Assigning [...] constructor to allocatable array changes size of that array, if
> size([...]) is not equal to size(array)

As far as I understand "reallocation on assignment, this is the expected
behavior (default that you can override with -fno-realloc-lhs).

There may be a missing error in

[macbook] f90/bug% gfc -fno-realloc-lhs -fcheck=all pr48058.f90
[macbook] f90/bug% a.out
           3
           3

where a length 2 vector is assigned to a length 3 one(?).


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]