[Bug fortran/56138] New: Deferred-length character RESULT: ICE in gfc_add_modify_loc

burnus at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Jan 29 08:30:00 GMT 2013


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

             Bug #: 56138
           Summary: Deferred-length character RESULT: ICE in
                    gfc_add_modify_loc
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: burnus@gcc.gnu.org
                CC: pault@gcc.gnu.org
            Blocks: 45170


See report at http://gcc.gnu.org/ml/fortran/2013-01/msg00206.html,
see F200x's version of iso varying string at
ftp://ftp.nag.co.uk/sc22wg5/N1901-N1950/N1913.txt

The following test case - with and without PURE - fails with:

foo.f90: In function 's_to_c':
foo.f90:5:0: internal compiler error: in gfc_add_modify_loc, at
fortran/trans.c:159
     s_to_c = string
 ^
0x5b8e97 gfc_add_modify_loc(unsigned int, stmtblock_t*, tree_node*, tree_node*)
        ../../gcc/fortran/trans.c:158
0x5f3af0 alloc_scalar_allocatable_for_assignment
        ../../gcc/fortran/trans-expr.c:7629
0x5f3af0 gfc_trans_assignment_1
        ../../gcc/fortran/trans-expr.c:7788


 PURE FUNCTION s_to_c (string)
  CHARACTER(LEN=*), INTENT(IN)  :: string 
  CHARACTER(LEN=:), ALLOCATABLE :: s_to_c 
  s_to_c = string
 ENDFUNCTION s_to_c



More information about the Gcc-bugs mailing list