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/58351] New: ICE using c_f_pointer subroutine and derived types


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

            Bug ID: 58351
           Summary: ICE using c_f_pointer subroutine and derived types
           Product: gcc
           Version: 4.8.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: h.larsson@fz-juelich.de

I got an segmentation fault using the c_f_pointer-subroutine and derived types:
program blah
   use,intrinsic:: ISO_C_BINDING
   type t_m
      real,dimension(:),pointer::m
   end type t_m
   type foo 
      type(t_m)::i 
   end type foo
   real,dimension(:,:),pointer::e
   type(foo),target::b
   call C_F_POINTER(C_LOC(b%i%m), e ,[1,1])
end program blah

It works fine and correct with ifort 13.1.0.

% gfortan -Wall -Wextra ice.f90 
ice.f90: In function âblahâ:
ice.f90:11:0: internal compiler error: Segmentation fault
    call C_F_POINTER(C_LOC(b%i%m), e ,[1,1])
 ^
Please submit a full bug report,

% gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-unknown-linux-gnu/4.8.1/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: /build/gcc/src/gcc-4.8-20130725/configure --prefix=/usr
--libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man
--infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/
--enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ --enable-shared
--enable-threads=posix --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-clocale=gnu --disable-libstdcxx-pch
--enable-gnu-unique-object --enable-linker-build-id --enable-cloog-backend=isl
--disable-cloog-version-check --enable-lto --enable-gold --enable-ld=default
--enable-plugin --with-plugin-ld=ld.gold --with-linker-hash-style=gnu
--disable-install-libiberty --disable-multilib --disable-libssp
--disable-werror --enable-checking=release
Thread model: posix
gcc version 4.8.1 20130725 (prerelease) (GCC)

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