[Bug fortran/54714] ICE on invalid expression involving DT with allocatable components and constructor in I/O

burnus at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Sep 26 09:09:00 GMT 2012


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

Tobias Burnus <burnus at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-invalid-code
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2012-09-26
                 CC|                            |burnus at gcc dot gnu.org
     Ever Confirmed|0                           |1

--- Comment #1 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-09-26 09:08:45 UTC ---
 Invalid read of size 4
    at 0x57EB174: __gmpz_sub (in /usr/lib64/libgmp.so.10.0.5)
    by 0x6540BE: transfer_array_component(tree_node*, gfc_component*, locus*)
(trans-io.c:1963)
    by 0x653C0E: transfer_expr(gfc_se*, gfc_typespec*, tree_node*, gfc_code*)
(trans-io.c:2168)
    by 0x6570E7: gfc_trans_transfer(gfc_code*) (trans-io.c:2308)


But the actual problem is that it isn't already rejected at resolving time; the
code is invalid.

"If a list item of derived type in a formatted input/output statement is not
processed by a defined input/output procedure, that list item is treated as if
all of the components of the list item were specified in the list in component
order; those components shall be accessible in the scoping unit containing the
input/output statement and shall not be pointers or allocatable."

(F2008, "9.6.3 Data transfer input/output list" paragraph 7, list item below
"NOTE 9.34")



More information about the Gcc-bugs mailing list