public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "burnus at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/41859]  New: ICE on invalid expression involving DT with pointer components in I/O
Date: Wed, 28 Oct 2009 22:24:00 -0000	[thread overview]
Message-ID: <bug-41859-13404@http.gcc.gnu.org/bugzilla/> (raw)

The following program is rejected with NAG/ifort/g95 with:

error #6382: The result of an evaluation of an output item list must not be of
a derived type that ultimately contains a pointer component.

ERROR: Data transfer element at (1) cannot have POINTER components

ERROR: Derived type T in io-list has POINTER component NODENAME

gfortran crashes in trans-io.c


module inputdom
  type t
    private
    character, pointer, dimension(:)         :: nodeName => null()
  end type t
contains
  subroutine getstructinput()
    implicit none
    print *, (foo()) ! <------ ICE here!
  end subroutine
  function foo()
    type(t), pointer :: foo
    foo => null()
  end function foo
end module inputdom


==16927== Invalid read of size 4
==16927==    at 0xD25BE4: __gmpz_sub (aors.h:65)
==16927==    by 0x56C5DE: transfer_array_component (trans-io.c:1947)
==16927==    by 0x56C988: transfer_expr (trans-io.c:2108)


#1  0x000000000056c5df in transfer_array_component (expr=<value optimized out>,
cm=0x149a910, where=<value optimized out>)
    at /home/tob/projects/gcc-trunk-checkout/gcc/fortran/trans-io.c:1947
#2  0x000000000056c989 in transfer_expr (se=0x7fffffffd250, ts=<value optimized
out>, addr_expr=<value optimized out>, code=0x149d5f0)
    at /home/tob/projects/gcc-trunk-checkout/gcc/fortran/trans-io.c:2108
#3  0x000000000057077b in gfc_trans_transfer (code=0x149d5f0) at
/home/tob/projects/gcc-trunk-checkout/gcc/fortran/trans-io.c:2244
#4  0x000000000053be88 in gfc_trans_code (code=0x149d5f0) at
/home/tob/projects/gcc-trunk-checkout/gcc/fortran/trans.c:1250
#5  0x000000000056e7a8 in build_dt (function=<value optimized out>, code=<value
optimized out>)
    at /home/tob/projects/gcc-trunk-checkout/gcc/fortran/trans-io.c:1814


-- 
           Summary: ICE on invalid expression involving DT with pointer
                    components in I/O
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Keywords: ice-on-invalid-code
          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=41859


             reply	other threads:[~2009-10-28 22:24 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-28 22:24 burnus at gcc dot gnu dot org [this message]
2009-10-28 22:32 ` [Bug fortran/41859] " burnus at gcc dot gnu dot org
2010-05-18 21:18 ` dfranke at gcc dot gnu dot org
2010-05-18 21:31 ` dfranke at gcc dot gnu dot org
2010-05-18 21:54 ` dfranke at gcc dot gnu dot org
2010-05-19  5:47 ` jvdelisle at gcc dot gnu dot org
2010-07-23 12:28 ` jvdelisle at gcc dot gnu dot org
2010-08-07 17:07 ` dominiq at lps dot ens dot fr
2010-08-07 18:31 ` dominiq at lps dot ens dot fr
2010-08-16  6:10 ` jvdelisle at gcc dot gnu dot org
2010-08-19  2:36 ` jvdelisle at gcc dot gnu dot org
2010-08-19  4:01 ` jvdelisle at gcc dot gnu dot org
2010-08-26  2:13 ` jvdelisle at gcc dot gnu dot org

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-41859-13404@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).