This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/49479] [4.6/4.7 Regression] reshape / optionals / zero sized arrays
- From: "burnus at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 20 Jun 2011 21:39:31 +0000
- Subject: [Bug fortran/49479] [4.6/4.7 Regression] reshape / optionals / zero sized arrays
- Auto-submitted: auto-generated
- References: <bug-49479-4@http.gcc.gnu.org/bugzilla/>
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.