[Bug fortran/67311] New: ICE calling subroutine with derived type as argument within OpenMP parallel region
acreman at astro dot ex.ac.uk
gcc-bugzilla@gcc.gnu.org
Fri Aug 21 17:37:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67311
Bug ID: 67311
Summary: ICE calling subroutine with derived type as argument
within OpenMP parallel region
Product: gcc
Version: 5.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: acreman at astro dot ex.ac.uk
Target Milestone: ---
The following test case produces an internal compiler error with recent
gfortran versions:
! == Begin test case ==
subroutine test
call openmp_sub
end subroutine test
subroutine openmp_sub
implicit none
TYPE myType
TYPE(myType), DIMENSION(:), POINTER :: x
END TYPE myType
type(myType) :: argument
!$OMP PARALLEL DEFAULT(NONE) PRIVATE(argument)
call foo(argument)
!$OMP END PARALLEL
end subroutine openmp_sub
! == End test case ==
The command line used to build was: gfortran -c -fopenmp test.f90
I see an ICE at versions 4.9.3 and 5.2 on SLES and gfortran 4.9.2 on Mac OS.
The test case compiles OK with version 4.6.3 (SLES) and 4.8.2 (Ubuntu)
The output from gfortran 4.9.3 is:
> gfortran -c -fopenmp test.f90
gfortran: internal compiler error: Segmentation fault (program f951)
0x40d14c execute
../../gcc-4.9.3/gcc/gcc.c:2854
0x40d514 do_spec_1
../../gcc-4.9.3/gcc/gcc.c:4658
0x40fdd6 process_brace_body
../../gcc-4.9.3/gcc/gcc.c:5941
0x40fdd6 handle_braces
../../gcc-4.9.3/gcc/gcc.c:5855
0x40e389 do_spec_1
../../gcc-4.9.3/gcc/gcc.c:5312
0x40fdd6 process_brace_body
../../gcc-4.9.3/gcc/gcc.c:5941
0x40fdd6 handle_braces
../../gcc-4.9.3/gcc/gcc.c:5855
0x40e389 do_spec_1
../../gcc-4.9.3/gcc/gcc.c:5312
0x40e0f3 do_spec_1
../../gcc-4.9.3/gcc/gcc.c:5427
0x40fdd6 process_brace_body
../../gcc-4.9.3/gcc/gcc.c:5941
0x40fdd6 handle_braces
../../gcc-4.9.3/gcc/gcc.c:5855
0x40e389 do_spec_1
../../gcc-4.9.3/gcc/gcc.c:5312
0x40fdd6 process_brace_body
../../gcc-4.9.3/gcc/gcc.c:5941
0x40fdd6 handle_braces
../../gcc-4.9.3/gcc/gcc.c:5855
0x40e389 do_spec_1
../../gcc-4.9.3/gcc/gcc.c:5312
0x40eea6 do_spec_2
../../gcc-4.9.3/gcc/gcc.c:4359
0x4104b8 do_spec(char const*)
../../gcc-4.9.3/gcc/gcc.c:4326
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
More information about the Gcc-bugs
mailing list