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

* [Bug fortran/63158] Possible wrong code with absend optional BT_CLASS -> optional BT_DERIVED dummy argument
  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 ` 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
  2 siblings, 0 replies; 4+ messages in thread
From: dominiq at lps dot ens.fr @ 2015-03-06 13:38 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING
   Last reconfirmed|                            |2015-03-06
     Ever confirmed|0                           |1

--- Comment #1 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
I cannot find any file in gcc/fortran containing the string "!e->ref->u.ar.type
!= AR_FULL" for 4.8, 4.9 and trunk (5.0). Is this PR still valid?


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

* [Bug fortran/63158] Possible wrong code with absend optional BT_CLASS -> optional BT_DERIVED dummy argument
  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
  2 siblings, 0 replies; 4+ messages in thread
From: dominiq at lps dot ens.fr @ 2015-09-04  9:11 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
Ping!


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

* [Bug fortran/63158] Possible wrong code with absend optional BT_CLASS -> optional BT_DERIVED dummy argument
  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
  2 siblings, 0 replies; 4+ messages in thread
From: dominiq at lps dot ens.fr @ 2015-10-08 10:05 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
> I cannot find any file in gcc/fortran containing the string
> "!e->ref->u.ar.type != AR_FULL" for 4.8, 4.9 and trunk (5.0).

It has been replaced with "e->ref->u.ar.type != AR_FULL" at line 5218:

                  if (fsym->attr.optional
                      && e->expr_type == EXPR_VARIABLE
                      && (!e->ref
                          || (e->ref->type == REF_ARRAY
                              && e->ref->u.ar.type != AR_FULL))
                      && e->symtree->n.sym->attr.optional)

Changed by r214827.

> Is this PR still valid?

*PING*!

Should I close this PR as INVALID to get an answer?


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