This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/80752] New: ICE with wrong type initialization
- From: "valeryweber at hotmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 15 May 2017 08:44:50 +0000
- Subject: [Bug fortran/80752] New: ICE with wrong type initialization
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80752
Bug ID: 80752
Summary: ICE with wrong type initialization
Product: gcc
Version: 7.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: valeryweber at hotmail dot com
Target Milestone: ---
Hi All
The following wrong code is ICEing.
v
MODULE cp_mgga_exchange_utils
IMPLICIT NONE
INTEGER, PARAMETER, PUBLIC :: real_8 = SELECTED_REAL_KIND ( 14, 200 )
TYPE, PRIVATE :: m05_m06_x_t
LOGICAL :: add_vs98 = 0.0_real_8
END TYPE m05_m06_x_t
TYPE, PRIVATE :: cp_mgga_x_param_t
TYPE(m05_m06_x_t) :: M05_M06
END TYPE cp_mgga_x_param_t
TYPE(cp_mgga_x_param_t), PUBLIC, SAVE :: cp_mgga_x_param
END MODULE cp_mgga_exchange_utils
gfortran-intel-7.1.0 -c cp_mgga_exchange_utils.mod.F90
cp_mgga_exchange_utils.mod.F90:5:46:
LOGICAL :: add_vs98 = 0.0_real_8
1
internal compiler error: Can't convert ‘REAL(8)’ to ‘LOGICAL(4)’ at (1)
0x5a1ec8 gfc_internal_error(char const*, ...)
../../gcc-7.1.0/gcc/fortran/error.c:1348
0x5b592f gfc_convert_type_warn(gfc_expr*, gfc_typespec*, int, int)
../../gcc-7.1.0/gcc/fortran/intrinsic.c:5069
0x5a93fa gfc_generate_initializer(gfc_typespec*, bool)
../../gcc-7.1.0/gcc/fortran/expr.c:4398
0x59aab4 variable_decl
../../gcc-7.1.0/gcc/fortran/decl.c:2437
0x59aab4 gfc_match_data_decl()
../../gcc-7.1.0/gcc/fortran/decl.c:4888
0x5f9e29 match_word
../../gcc-7.1.0/gcc/fortran/parse.c:65
0x5fc871 decode_statement
../../gcc-7.1.0/gcc/fortran/parse.c:376
0x5fe0d4 next_free
../../gcc-7.1.0/gcc/fortran/parse.c:1223
0x5fe0d4 next_statement
../../gcc-7.1.0/gcc/fortran/parse.c:1455
0x5ffc35 parse_derived
../../gcc-7.1.0/gcc/fortran/parse.c:3250
0x5ffc35 parse_spec
../../gcc-7.1.0/gcc/fortran/parse.c:3790
0x602933 parse_module
../../gcc-7.1.0/gcc/fortran/parse.c:5883
0x602c2f gfc_parse_file()
../../gcc-7.1.0/gcc/fortran/parse.c:6196
0x64a90f gfc_be_parse_file
../../gcc-7.1.0/gcc/fortran/f95-lang.c:204
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.