public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/41859]  New: ICE on invalid expression involving DT with pointer components in I/O
@ 2009-10-28 22:24 burnus at gcc dot gnu dot org
  2009-10-28 22:32 ` [Bug fortran/41859] " burnus at gcc dot gnu dot org
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: burnus at gcc dot gnu dot org @ 2009-10-28 22:24 UTC (permalink / raw)
  To: gcc-bugs

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


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

end of thread, other threads:[~2010-08-26  2:13 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-10-28 22:24 [Bug fortran/41859] New: ICE on invalid expression involving DT with pointer components in I/O burnus at gcc dot gnu dot org
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

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