This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/26787] New: Assigning to function causes ice in gfortran


The following incorrect code causes:
simple.f90: In function ?bar?:
simple.f90:4: internal compiler error: in gfc_conv_variable, at
fortran/trans-expr.c:355

Code:
module simple
  implicit none
contains
  integer function foo() 
    foo = 10
  end function foo

  subroutine bar()
    foo = 10
  end subroutine bar
end module simple

This should cause an error, rather than an internal compiler error.


-- 
           Summary: Assigning to function causes ice in gfortran
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jjcogliati-r1 at yahoo dot com
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]