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/13415] New: Internal error in gfortran


I believe the following commit on the tree-ssa branch is either the
direct cause of the below problem or it uncovered a hidden bug.

2003-12-05  Richard Henderson  <rth@redhat.com>

        * trans.c (gfc_build_addr_expr): New.
        (gfc_build_indirect_ref, gfc_build_array_ref): New.
        * trans.h: Declare them.
        * trans-array.c, trans-expr.c, trans-intrinsic.c, trans-io.c,
        trans-stmt.c, trans.c (*): Use them.

        * f95-lang.c (gfc_post_options): Remove dead prototype.
        * trans-array.c (gfc_trans_deferred_vars): Remove unused variable.
        * trans-stmt.c (gfc_evaluate_where_mask): Fix temporary_list
        allocation size.

kargl[207] ../../../bin/gfortran b.f90
 In file b.f90:14

      end program test
                     1
 Internal Error at (1):
 calculate_length(): Unable to determine array size

Environment:
System: FreeBSD 12-230-81-20.client.attbi.com 5.2-CURRENT FreeBSD 5.2-CURRENT #2: Sun Dec 14 15:18:04 PST 2003 kargl@12-230-81-20.client.attbi.com:/usr/local/obj/usr/src/sys/HOTRATS i386


	
host: i386-unknown-freebsd5.2
build: i386-unknown-freebsd5.2
target: i386-unknown-freebsd5.2
configured with: ../gcc/configure --prefix=/usr/home/kargl/gcc-ssa/work --disable-libmudflap --enable-languages=c,f95 --with-gmp=/usr/local

How-To-Repeat:

kargl[207] ../../../bin/gfortran b.f90
 In file b.f90:14

      end program test
                     1
 Internal Error at (1):
 calculate_length(): Unable to determine array size


      program test
      real, allocatable, target, dimension(:) :: array1, array2
      real, pointer, dimension(:) :: parray
      common /mydata/ parray,q
      q=99.0
      allocate(array1(10))
      allocate(array2(20))
      array1=1.
      array2=2.
      parray => array1
      call sub(10)
      parray => array2
      call sub(20)
      end program test
      subroutine sub(n)
      integer n
      real, pointer, dimension(:) :: parray
      common /mydata/ parray,q
      print *,parray(1),parray(n),q
      return
      end subroutine sub

-- 
           Summary: Internal error in gfortran
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: critical
          Priority: P2
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: kargl at 12-230-81-20 dot client dot attbi dot com
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i386-unknown-freebsd5.2
  GCC host triplet: i386-unknown-freebsd5.2
GCC target triplet: i386-unknown-freebsd5.2


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


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