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

            Bug ID: 80973
           Summary: ICE with lambda and -fsanitize=undefined
           Product: gcc
           Version: 8.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: sanitizer
          Assignee: unassigned at gcc dot gnu.org
          Reporter: reichelt at gcc dot gnu.org
                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, marxin at 
gcc dot gnu.org
  Target Milestone: ---

The testcase g++.dg/cpp1y/pr77739.C triggers an ICE when compiled
with -std=c++1y -fsanitize=undefined since GCC 4.9.0:

pr77739.C: In member function 'auto B::g(Args&& ...) [with Args = {A, const
char (&)[1]}]':
pr77739.C:10:36: error: invalid offset operand in MEM_REF
   template <typename... Args> auto g(Args &&... p1) {
                                    ^
MEM[(struct __lambda0 &)<retval> + UBSAN_NULL (0, 2B, 8);, 0];

MEM[(struct __lambda0 &)<retval> + UBSAN_NULL (0, 2B, 8);, 0].__p1#1 = *p1#1;
pr77739.C:10:36: internal compiler error: verify_gimple failed
0xdb728d verify_gimple_in_seq(gimple*)
        ../../gcc/gcc/tree-cfg.c:4954
0xb0f08d gimplify_body(tree_node*, bool)
        ../../gcc/gcc/gimplify.c:12562
0xb0f3f4 gimplify_function_tree(tree_node*)
        ../../gcc/gcc/gimplify.c:12652
0x9720e7 cgraph_node::analyze()
        ../../gcc/gcc/cgraphunit.c:665
0x974f79 analyze_functions
        ../../gcc/gcc/cgraphunit.c:1126
0x976182 symbol_table::finalize_compilation_unit()
        ../../gcc/gcc/cgraphunit.c:2611
Please submit a full bug report, [etc.]

Reply via email to