[Bug fortran/106048] New: [10/11/12/13 Regression] ICE in ubsan_encode_value, at ubsan.cc:143 / verify_gimple failed

gscfq@t-online.de gcc-bugzilla@gcc.gnu.org
Tue Jun 21 18:51:24 GMT 2022


            Bug ID: 106048
           Summary: [10/11/12/13 Regression] ICE in ubsan_encode_value, at
                    ubsan.cc:143 / verify_gimple failed
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gscfq@t-online.de
  Target Milestone: ---

Started with r7, with and without -fsanitize=undefined :

$ cat z1.f90
program p
   integer :: real
   print *, real(2)
   associate (y => real+real)
      print *, y
   end associate

$ cat z2.f90
program p
   integer :: n
   print *, n(2)
   associate (y => n+n)
      print *, y
   end associate

$ gfortran-13-20220619 -c z1.f90
/tmp/cc97osCU.s: Assembler messages:
/tmp/cc97osCU.s:35: Error: junk `(intrinsic)_MOD_real' after expression

$ gfortran-13-20220619 -c z1.f90 -fsanitize=undefined
during RTL pass: expand

    5 |       print *, y
      |                ^
internal compiler error: in ubsan_encode_value, at ubsan.cc:143
0xcf9ca2 ubsan_encode_value(tree_node*, ubsan_encode_value_phase)
0xcfe316 ubsan_build_overflow_builtin(tree_code, unsigned int, tree_node*,
tree_node*, tree_node*, tree_node**)
0xa72326 expand_mul_overflow
0xa749c6 expand_UBSAN_CHECK_MUL
0x8820e7 expand_call_stmt
0x8820e7 expand_gimple_stmt_1
0x8820e7 expand_gimple_stmt
0x887297 expand_gimple_basic_block
0x889d5e execute


gcc configured with --enable-checking=yes :

$ gfortran-13-20220619 -c z1.f90

    1 | program p
      |         ^
Error: type mismatch in binary expression

integer(kind=4) (*<T62d>) ()


_1 = real * 2;
z1.f90:1:9: internal compiler error: 'verify_gimple' failed
0xed9e9d verify_gimple_in_seq(gimple*)
0xb557b1 gimplify_body(tree_node*, bool)
0xb55a55 gimplify_function_tree(tree_node*)
0x964c47 cgraph_node::analyze()
0x967ef6 analyze_functions
0x9690cd symbol_table::finalize_compilation_unit()

More information about the Gcc-bugs mailing list