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

            Bug ID: 79656
           Summary: ICE on invalid C++ code in execute_function_todo in
                    gcc/passes.c:1966
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Keywords: ice-on-invalid-code
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: marxin at gcc dot gnu.org
  Target Milestone: ---

Created attachment 40794
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40794&action=edit
test-case

Adopted from clang:

$ g++
/home/marxin/BIG/Programming/llvm-project/llvm/tools/clang/test/SemaTemplate/instantiate-typeof.cpp
-c
/home/marxin/BIG/Programming/llvm-project/llvm/tools/clang/test/SemaTemplate/instantiate-typeof.cpp:
In lambda function:
/home/marxin/BIG/Programming/llvm-project/llvm/tools/clang/test/SemaTemplate/instantiate-typeof.cpp:7:11:
error: Local declaration from a different function
   [&buffer] { __typeof(buffer) x; }();
           ^
D.2324
/home/marxin/BIG/Programming/llvm-project/llvm/tools/clang/test/SemaTemplate/instantiate-typeof.cpp:7:32:
note: in statement
   [&buffer] { __typeof(buffer) x; }();
                                ^
_1 = (sizetype) D.2324;
/home/marxin/BIG/Programming/llvm-project/llvm/tools/clang/test/SemaTemplate/instantiate-typeof.cpp:7:11:
error: Local declaration from a different function
   [&buffer] { __typeof(buffer) x; }();
           ^
D.2324
/home/marxin/BIG/Programming/llvm-project/llvm/tools/clang/test/SemaTemplate/instantiate-typeof.cpp:7:32:
note: in statement
   [&buffer] { __typeof(buffer) x; }();
                                ^
_5 = (sizetype) D.2324;
/home/marxin/BIG/Programming/llvm-project/llvm/tools/clang/test/SemaTemplate/instantiate-typeof.cpp:7:11:
internal compiler error: verify_gimple failed
   [&buffer] { __typeof(buffer) x; }();
           ^
0x121d2c5 verify_gimple_in_cfg(function*, bool)
        ../../gcc/tree-cfg.c:5266
0x10a5b35 execute_function_todo
        ../../gcc/passes.c:1966
0x10a4bca do_per_function
        ../../gcc/passes.c:1650
0x10a5d0a execute_todo
        ../../gcc/passes.c:2016

Reply via email to