(System/GCC parameters and compiler error messages given below)
Minimal Fortran reproducer:

module M_mod
  implicit none
  private

  public :: M_type
  public :: getKeys

  type M_type
    character(len=10) :: key
  end type M_type

contains

  subroutine getKeys(this)
    type (M_type), target :: this(:)
    character(len=10), pointer :: keys(:)

    keys => this(:)%key
  end subroutine getKeys

end module M_mod


Produces an internal compiler error:

bash-3.2$ gfortran -v -save-temps -c t.F90
Using built-in specs.
Target: i386-apple-darwin8.10.1
Configured with: /tmp/gfortran-20090604/ibin/../gcc/configure
--prefix=/usr/local/gfortran --enable-languages=c,fortran
--with-gmp=/tmp/gfortran-20090604/gfortran_libs --enable-bootstrap
Thread model: posix
gcc version 4.5.0 20090604 (experimental) [trunk revision 148180] (GCC) 
COLLECT_GCC_OPTIONS='-mmacosx-version-min=10.5.8' '-v' '-save-temps' '-c'
'-mtune=generic'
 /usr/local/gfortran/libexec/gcc/i386-apple-darwin8.10.1/4.5.0/f951 t.F90 -cpp
/var/folders/e4/e484tj9PEd4Jm8SyiqE9Ak5hB2U/-Tmp-//ccjLAEQe.f90 -quiet -v
-D__DYNAMIC__ t.F90 -fPIC -quiet -dumpbase t.F90 -mmacosx-version-min=10.5.8
-mtune=generic -auxbase t -version -fintrinsic-modules-path
/usr/local/gfortran/lib/gcc/i386-apple-darwin8.10.1/4.5.0/finclude -o t.s
GNU Fortran (GCC) version 4.5.0 20090604 (experimental) [trunk revision 148180]
(i386-apple-darwin8.10.1)
        compiled by GNU C version 4.5.0 20090604 (experimental) [trunk revision
148180], GMP version 4.3.1, MPFR version 2.4.1-p5
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
ignoring nonexistent directory
"/usr/local/gfortran/lib/gcc/i386-apple-darwin8.10.1/4.5.0/../../../../i386-apple-darwin8.10.1/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/gfortran/lib/gcc/i386-apple-darwin8.10.1/4.5.0/finclude
 /usr/local/include
 /usr/local/gfortran/include
 /usr/local/gfortran/lib/gcc/i386-apple-darwin8.10.1/4.5.0/include
 /usr/local/gfortran/lib/gcc/i386-apple-darwin8.10.1/4.5.0/include-fixed
 /usr/include
End of search list.
GNU Fortran (GCC) version 4.5.0 20090604 (experimental) [trunk revision 148180]
(i386-apple-darwin8.10.1)
        compiled by GNU C version 4.5.0 20090604 (experimental) [trunk revision
148180], GMP version 4.3.1, MPFR version 2.4.1-p5
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
t.F90: In function 'getkeys':
t.F90:14:0: internal compiler error: Bus error
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.


-- 
           Summary: function result with pointer to strided component of
                    argument
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: Thomas dot L dot Clune at nasa dot gov
GCC target triplet: i386-apple-darwin8.10.1


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

Reply via email to