[Bug fortran/104128] New: ICE in gfc_widechar_to_char, at fortran/scanner.c:199
gscfq@t-online.de
gcc-bugzilla@gcc.gnu.org
Wed Jan 19 18:51:16 GMT 2022
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104128
Bug ID: 104128
Summary: ICE in gfc_widechar_to_char, at fortran/scanner.c:199
Product: gcc
Version: 12.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: gscfq@t-online.de
Target Milestone: ---
Affects versions down to at least r5 :
(follow-up of pr83079)
$ cat z1.f90
program p
character(3), parameter :: a = 'abc'
print *, transfer(a , 4_'xy', size=2)
end
$ cat z2.f90
program p
character(len=3, kind=4), parameter :: a = 'abc'
print *, transfer('xyz', [a], size=2)
end
$ gfortran-12-20220116 -c z1.f90
f951: internal compiler error: in gfc_widechar_to_char, at
fortran/scanner.c:199
0x7737d6 gfc_widechar_to_char(unsigned int const*, int)
../../gcc/fortran/scanner.c:199
0x792e22 gfc_target_interpret_expr(unsigned char*, unsigned long, gfc_expr*,
bool)
../../gcc/fortran/target-memory.c:639
0x792dec interpret_array
../../gcc/fortran/target-memory.c:392
0x792dec gfc_target_interpret_expr(unsigned char*, unsigned long, gfc_expr*,
bool)
../../gcc/fortran/target-memory.c:583
0x786f9d gfc_simplify_transfer(gfc_expr*, gfc_expr*, gfc_expr*)
../../gcc/fortran/simplify.c:8188
0x701c3a do_simplify
../../gcc/fortran/intrinsic.c:4676
0x70cb1a gfc_intrinsic_func_interface(gfc_expr*, int)
../../gcc/fortran/intrinsic.c:5055
0x760e98 resolve_unknown_f
../../gcc/fortran/resolve.c:2972
0x760e98 resolve_function
../../gcc/fortran/resolve.c:3329
0x760e98 gfc_resolve_expr(gfc_expr*)
../../gcc/fortran/resolve.c:7169
0x767284 gfc_resolve_expr(gfc_expr*)
../../gcc/fortran/resolve.c:7136
0x767284 gfc_resolve_code(gfc_code*, gfc_namespace*)
../../gcc/fortran/resolve.c:11928
0x765c3f gfc_resolve_blocks(gfc_code*, gfc_namespace*)
../../gcc/fortran/resolve.c:10944
0x765f98 gfc_resolve_code(gfc_code*, gfc_namespace*)
../../gcc/fortran/resolve.c:11918
0x7688d7 resolve_codes
../../gcc/fortran/resolve.c:17537
0x76899e gfc_resolve(gfc_namespace*)
../../gcc/fortran/resolve.c:17572
0x750cc4 resolve_all_program_units
../../gcc/fortran/parse.c:6586
0x750cc4 gfc_parse_file()
../../gcc/fortran/parse.c:6842
0x79e33f gfc_be_parse_file
../../gcc/fortran/f95-lang.c:216
More information about the Gcc-bugs
mailing list