public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "burnus at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/56423] New: F08/0071: Shall reject invalid Vector subscript target with Pointer assignment
Date: Thu, 21 Feb 2013 21:25:00 -0000	[thread overview]
Message-ID: <bug-56423-4@http.gcc.gnu.org/bugzilla/> (raw)


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

             Bug #: 56423
           Summary: F08/0071: Shall reject invalid Vector subscript target
                    with Pointer assignment
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Keywords: ice-on-invalid-code
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: burnus@gcc.gnu.org


Interp F08/0071, http://www.j3-fortran.org/doc/year/13/13-250.txt

Note: The J3/WG5 vote is still pending.


Case (4) of the test case below is invalid per clarified constraint F2008,
C724:

  "A variable that is a pointer target shall have either the TARGET
   or POINTER attribute, and shall not be an array section with a
   vector subscript."

Currently, gfortran ICEs with:
internal compiler error: in gfc_conv_expr_descriptor, at
fortran/trans-array.c:6589

  PROGRAM m197006
    REAL,TARGET :: x(100) = [ (i,i=1,100) ]
    REAL,POINTER :: p(:)
    TYPE t
      REAL,POINTER :: q(:)
    END TYPE
    TYPE(t) y
    p => x                     ! (1)
    y = t(x)                   ! (2)
!   p => x( [ 1,4,9,25 ] )     ! (3)  ! Invalid and rejected
    y = t(x( [ 1,4,9,25 ] ))   ! (4)  ! Invalid per IR F08/0071 but not
rejected
    PRINT *,y%q
  END PROGRAM


             reply	other threads:[~2013-02-21 21:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-21 21:25 burnus at gcc dot gnu.org [this message]
2015-10-10 10:28 ` [Bug fortran/56423] " dominiq at lps dot ens.fr

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-56423-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).