public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/44666]  New: [F2008] Passing NULL pointer or unallocated allocatable to OPTIONAL dummy
@ 2010-06-25 14:37 burnus at gcc dot gnu dot org
  2010-08-15 16:26 ` [Bug fortran/44666] " burnus at gcc dot gnu dot org
  0 siblings, 1 reply; 2+ messages in thread
From: burnus at gcc dot gnu dot org @ 2010-06-25 14:37 UTC (permalink / raw)
  To: gcc-bugs

"12.5.2.12 Argument presence and restrictions on arguments not present

A dummy argument or an entity that is host associated with a dummy argument is
not present if the dummy argument
[...]
* does not have the ALLOCATABLE or POINTER attribute, and corresponds to an
  actual argument that
  - has the ALLOCATABLE attribute and is not allocated, or
  - has the POINTER attribute and is disassociated."

That probably means:

a) NULL(mold) as actual argument is allowed
b) For scalars, it should just work
c) For arguments with descriptors, one needs to add:
   (actual.data == NULL) ? NULL : actual


-- 
           Summary: [F2008] Passing NULL pointer or unallocated allocatable
                    to OPTIONAL dummy
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: burnus at gcc dot gnu dot org


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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug fortran/44666] [F2008] Passing NULL pointer or unallocated allocatable to OPTIONAL dummy
  2010-06-25 14:37 [Bug fortran/44666] New: [F2008] Passing NULL pointer or unallocated allocatable to OPTIONAL dummy burnus at gcc dot gnu dot org
@ 2010-08-15 16:26 ` burnus at gcc dot gnu dot org
  0 siblings, 0 replies; 2+ messages in thread
From: burnus at gcc dot gnu dot org @ 2010-08-15 16:26 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from burnus at gcc dot gnu dot org  2010-08-15 16:26 -------
FIXED on the 4.6 trunk.

I have missed to include the PR when writing, submitting, and committing the
patch. It can be found at:

Patch: http://gcc.gnu.org/ml/fortran/2010-08/msg00174.html
Committal: http://gcc.gnu.org/ml/gcc-cvs/2010-08/msg00474.html


-- 

burnus at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |FIXED


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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-08-15 16:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-25 14:37 [Bug fortran/44666] New: [F2008] Passing NULL pointer or unallocated allocatable to OPTIONAL dummy burnus at gcc dot gnu dot org
2010-08-15 16:26 ` [Bug fortran/44666] " burnus at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).