[Bug fortran/64209] New: [OOP] copy class(*) component from type with a subroutine

2014-12-06 Thread polajnar.miha at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64209

Bug ID: 64209
   Summary: [OOP] copy class(*) component from type with a
subroutine
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: fortran
  Assignee: unassigned at gcc dot gnu.org
  Reporter: polajnar.miha at gmail dot com

Created attachment 34209
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34209&action=edit
Source code describing the bug

The attached source code produces segmentation fault :

Program received signal SIGSEGV: Segmentation fault - invalid memory reference.

Backtrace for this error:
#0  0x7FA69CC6F4D0
#1  0x7FA69CC6E6B0
#2  0x7FA69C17E54F
#3  0x4011FC in __copy_INTEGER_4_.3528 at gfort_bug.f90:?
#4  0x4010B0 in __m_MOD_copy
#5  0x401411 in MAIN__ at gfort_bug.f90:?
Segmentation fault

with 

gcc version 5.0.0 20141202 (experimental) [trunk revision 218267] (SUSE Linux).

The code works fine with ifort.


[Bug fortran/66679] New: ICE with class(*) and transfer

2015-06-26 Thread polajnar.miha at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66679

Bug ID: 66679
   Summary: ICE with class(*) and transfer
   Product: gcc
   Version: 5.1.1
Status: UNCONFIRMED
  Severity: minor
  Priority: P3
 Component: fortran
  Assignee: unassigned at gcc dot gnu.org
  Reporter: polajnar.miha at gmail dot com
  Target Milestone: ---

The following program produces an ICE

program main
  implicit none
  class(*), allocatable :: vec(:)
  integer :: var
  allocate(vec(2),mold=var)
  print*, size(transfer(vec,[var]))
  print*, size(transfer(vec(1),[var]))
end program main

$ gfortran bug.f90 
bug.f90:7:0:

   print*, size(transfer(vec(1),[var]))
 1
internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://bugs.opensuse.org/> for instructions.

with $ gfortran -v
gcc version 5.1.1 20150518 [gcc-5-branch revision 223286] (SUSE Linux)


[Bug fortran/66680] New: ICE with openmp, a loop and a type bound procedure

2015-06-26 Thread polajnar.miha at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66680

Bug ID: 66680
   Summary: ICE with openmp, a loop and a type bound procedure
   Product: gcc
   Version: 5.1.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: fortran
  Assignee: unassigned at gcc dot gnu.org
  Reporter: polajnar.miha at gmail dot com
  Target Milestone: ---

The code in the attachment produces an ICE with

$ gfortran bug.f90 -fopenmp -O0
bug.f90:24:0:

 do p = 1, n
 ^
internal compiler error: in make_decl_rtl, at varasm.c:1313
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://bugs.opensuse.org/> for instructions.

Using a different optimization level
gfortran bug.f90 -fopenmp -O3 
compiles fine.

Using version $ gfortran -v
gcc version 5.1.1 20150518 [gcc-5-branch revision 223286] (SUSE Linux)


[Bug fortran/66680] ICE with openmp, a loop and a type bound procedure

2015-06-26 Thread polajnar.miha at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66680

--- Comment #1 from Miha Polajnar  ---
Created attachment 35856
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35856&action=edit
Source code for the described bug.