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/49479] [4.6/4.7 Regression] reshape / optionals / zero sized arrays


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

Tobias Burnus <burnus at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |wrong-code
                 CC|                            |burnus at gcc dot gnu.org
   Target Milestone|---                         |4.6.2

--- Comment #3 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-06-20 21:39:28 UTC ---
There seems to be a bug in the implementation of Fortran 2008's new feature:

"A null pointer or unallocated allocatable can be used to denote an absent
nonallocatable nonpointer optional argument."

That check has been added in Rev 163263 on 2010-08-15.

However, I am not sure that the bug is in the new code - it could also be a
RESHAPE bug (cf. PR 49324 for another reshape bug). I think gfortran's
convention is - and also TR 29113 require that the addr_expr is not NULL if the
variable is allocated - even if it is zero sized. However, I need to recheck
and maybe also other library functions have this issue.

Workaround: -std=f2003.


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