public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/63158] New: Possible wrong code with absend optional BT_CLASS -> optional BT_DERIVED dummy argument
@ 2014-09-03 18:49 burnus at gcc dot gnu.org
  2015-03-06 13:38 ` [Bug fortran/63158] " dominiq at lps dot ens.fr
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: burnus at gcc dot gnu.org @ 2014-09-03 18:49 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63158

            Bug ID: 63158
           Summary: Possible wrong code with absend optional BT_CLASS ->
                    optional BT_DERIVED dummy argument
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: burnus at gcc dot gnu.org

Follow up to PR 62270 comment 3.

The following code adds conditionally a check whether a var == NULL check
should be added. I fear that some extra check for BT_CLASS might be needed,
e.g. when passing a BT_CLASS optional argument to a BT_DERIVED optional
argument (same declared type). Namely, in the case the actual argument is NULL.

trans-expr.c:gfc_conv_procedure_call
4445                   if (fsym->attr.optional
4446                       && e->expr_type == EXPR_VARIABLE
4447                       && (!e->ref
4448                           || (e->ref->type == REF_ARRAY
4449                               && !e->ref->u.ar.type != AR_FULL))


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

end of thread, other threads:[~2015-10-08 10:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-03 18:49 [Bug fortran/63158] New: Possible wrong code with absend optional BT_CLASS -> optional BT_DERIVED dummy argument burnus at gcc dot gnu.org
2015-03-06 13:38 ` [Bug fortran/63158] " dominiq at lps dot ens.fr
2015-09-04  9:11 ` dominiq at lps dot ens.fr
2015-10-08 10:05 ` dominiq at lps dot ens.fr

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).