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/41200] New: allocate: improve a compiler error message for an invalid Fortran code


The following sample is an invalid Fortran code although the compiler gives an
ICE error message. 

Perhaps, the compiler error message in this case could be improved, e.g. tell
what we are doing wrong. 

Regards,
Jorge.
--
CIMEC-INTEC, http://www.cimec.org.ar/
UNL-CONICET, Guemes 3450, 3000-Santa Fe, ARGENTINA
ph: +54-342-451.15.94, extension 1018

--

! $ cat /proc/version
!   Linux version 2.6.27.30-170.2.82.fc10.i686
!   (mockbuild@xenbuilder4.fedora.phx.redhat.com)
!   (gcc version 4.3.2 20081105 (Red Hat 4.3.2-7) (GCC) )
!   #1 SMP Mon Aug 17 08:38:59 EDT 2009
!
! $ which gfortran
!   /usr/local/gfortran/bin/gfortran
!
! $ gfortran --version
!   GNU Fortran (GCC) 4.3.2 20081105 (Red Hat 4.3.2-7)
!   Copyright (C) 2008 Free Software Foundation, Inc.
!
! $ gfortran -o is_an_ice.exe is_an_ice.f90
!   is_an_ice.f90: In function 'is_an_ice':
!   is_an_ice.f90:21: internal compiler error: Segmentation fault
!   Please submit a full bug report,
!   with preprocessed source if appropriate.
!   See <http://bugzilla.redhat.com/bugzilla> for instructions.
!
program is_an_ice
  integer, dimension (4) :: ier = 0
  integer, dimension (:), allocatable :: a
  integer :: n = 16
 !allocate (a (n), stat = ier (1)) ! A  valid Fortran line
  allocate (a (n), stat = ier)     ! and an invalid Fortran one
  print *, "allocated (a) : ", allocated (a)
end program is_an_ice


-- 
           Summary: allocate: improve a compiler error message for an
                    invalid Fortran code
           Product: gcc
           Version: 4.3.2
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jdelia at intec dot unl dot edu dot ar


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


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