https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80349

            Bug ID: 80349
           Summary: UBSAN: compile time crash with "type mismatch in
                    binary expression" message
           Product: gcc
           Version: 7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: sanitizer
          Assignee: unassigned at gcc dot gnu.org
          Reporter: babokin at gmail dot com
                CC: dodji at gcc dot gnu.org, dvyukov at gcc dot gnu.org,
                    jakub at gcc dot gnu.org, kcc at gcc dot gnu.org
  Target Milestone: ---

Top of the trunk gcc on x86_64

> cat f.cpp
extern const long long int var_20;
void foo() { int((var_20 & 50 | 051UL) << 0) << 0; }

> g++ -fsanitize=undefined -w -O0 -c f.cpp
f.cpp: In function ‘void foo()’:
f.cpp:2:6: error: type mismatch in binary expression
 void foo() { int((var_20 & 50 | 051UL) << 0) << 0; }
      ^~~
long long unsigned int

long long int

long long unsigned int

_11 = var_20.2_10 & 18;
f.cpp:2:6: internal compiler error: verify_gimple failed
0xdae9ad verify_gimple_in_seq(gimple*)
        ../../gcc_svn_intel/gcc/tree-cfg.c:4934
0xafe2bd gimplify_body(tree_node*, bool)
        ../../gcc_svn_intel/gcc/gimplify.c:12500
0xafe624 gimplify_function_tree(tree_node*)
        ../../gcc_svn_intel/gcc/gimplify.c:12590
0x96e9df cgraph_node::analyze()
        ../../gcc_svn_intel/gcc/cgraphunit.c:657
0x9719c9 analyze_functions
        ../../gcc_svn_intel/gcc/cgraphunit.c:1118
0x972a82 symbol_table::finalize_compilation_unit()
        ../../gcc_svn_intel/gcc/cgraphunit.c:2603
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.

Reply via email to