public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/57035] New: TS29113's C535b: Wrongly accept DIMENSION(..) to TRANSFER
@ 2013-04-22 18:29 burnus at gcc dot gnu.org
  2013-05-20 17:04 ` [Bug fortran/57035] " burnus at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: burnus at gcc dot gnu.org @ 2013-04-22 18:29 UTC (permalink / raw)
  To: gcc-bugs


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

             Bug #: 57035
           Summary: TS29113's C535b: Wrongly accept DIMENSION(..) to
                    TRANSFER
    Classification: Unclassified
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Keywords: accepts-invalid, diagnostic
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: burnus@gcc.gnu.org


>From http://gcc.gnu.org/ml/fortran/2013-04/msg00203.html

The following code is wrongly accepted:

subroutine assumed_rank (a)
  integer, intent(in) :: a(..)
  integer :: c(1:4)
  c = transfer(a,c,4)
end subroutine


>From TS29113:

"C535b An assumed-rank variable name shall not appear in a designator or
expression except as an actual argument corresponding to a dummy argument that
is assumed-rank, the argument of the C_LOC function in the ISO_C_BINDING
intrinsic module, or the first argument in a reference to an intrinsic inquiry
function."

There might be similar issues with TYPE(*) and !GCC$ attributes no_arg_check,
which are similar constraints.


Possibly the simplest would be to use intrinsic.c's do_check which could use
both
  if (!specific->inquiry) 
    ...
and
  for (arg = arg->next; arg; arg = arg->next)
    if (arg->expr ... )
      ...


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

end of thread, other threads:[~2013-05-21 17:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-22 18:29 [Bug fortran/57035] New: TS29113's C535b: Wrongly accept DIMENSION(..) to TRANSFER burnus at gcc dot gnu.org
2013-05-20 17:04 ` [Bug fortran/57035] " burnus at gcc dot gnu.org
2013-05-21 17:29 ` burnus at gcc dot gnu.org
2013-05-21 17:29 ` burnus at gcc dot gnu.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).