This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/49308] [4.7 Regression] segfault in rest_of_handle_ud_dce () at gcc/gcc/dce.c:518
- From: "Joost.VandeVondele at pci dot uzh.ch" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 7 Jun 2011 08:27:36 +0000
- Subject: [Bug middle-end/49308] [4.7 Regression] segfault in rest_of_handle_ud_dce () at gcc/gcc/dce.c:518
- Auto-submitted: auto-generated
- References: <bug-49308-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49308
--- Comment #7 from Joost VandeVondele <Joost.VandeVondele at pci dot uzh.ch> 2011-06-07 08:27:13 UTC ---
reduced testcase:
> gfortran-trunk -c -O2 -funroll-loops -g bug.f90
bug.f90: In function âcalculate_first_density_matrixâ:
bug.f90:29:0: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
> cat bug.f90
MODULE qs_initial_guess
TYPE real_matrix_type
INTEGER :: sparsity_id
END TYPE real_matrix_type
TYPE real_matrix_p_type
TYPE(real_matrix_type), POINTER :: matrix
END TYPE real_matrix_p_type
TYPE qs_environment_type
TYPE(real_matrix_p_type), DIMENSION(:), POINTER :: matrix_s
END TYPE
INTEGER, PARAMETER :: default_path_length=250
CONTAINS
SUBROUTINE calculate_first_density_matrix()
TYPE(qs_environment_type), POINTER :: qs_env
CHARACTER(LEN=default_path_length) :: file_name
CHARACTER(LEN=default_path_length) :: filename
CHARACTER(LEN=default_path_length) :: cp_to_string
LOGICAL :: id_equal
DO i=1,nvec
j = i - 1
IF (j/=0) filename = TRIM(file_name)//".bak-"//ADJUSTL(cp_to_string(j))
END DO
DO ispin=1, SIZE(qs_env%matrix_s)
id_equal=(qs_env%matrix_s(ispin)%matrix%sparsity_id&
==qs_env%matrix_s(1)%matrix%sparsity_id)
IF(.NOT.(id_equal)) &
CALL cp_a_l(0==1,cp_failure_level,routineP,39)
ENDDO
END SUBROUTINE calculate_first_density_matrix
END MODULE qs_initial_guess