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

Piotr Grabowski <piotr.grabowski at scylladb dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |piotr.grabowski at scylladb 
dot co
                   |                            |m

--- Comment #18 from Piotr Grabowski <piotr.grabowski at scylladb dot com> ---
Created attachment 52520
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52520&action=edit
smaller reproducer (-g flag required)

Uploading a smaller 30-line reproducer, reduced independently from Avi, but
started from the same origin file. The error messages are the same as previous
reproducers. It fails to compile with all optimization levels I checked.

Compiled with (-g required):

   g++ -g -std=c++20 attached.cpp

For g++ (GCC) 11.2.1 20220127 (Red Hat 11.2.1-9) and "-g -std=c++20 -fchecking"
it fails with:

...
pr103328_smaller.cpp:30:13: error: location references block not in block tree
... (repeated multiple times)
pr103328_smaller.cpp:30: confused by earlier errors, bailing out
Preprocessed source stored into /tmp/ccdJXVFM.out file, please attach this to
your bugreport.

For "g++ (GCC) 11.2.1 20220127 (Red Hat 11.2.1-9)" and "-g -std=c++20
-fno-checking" it fails with:

during RTL pass: final
pr103328_smaller.cpp: In function ‘void
foo::f()::<lambda()>::operator()(foo::f()::<lambda()>::_ZZN3foo1fEvENKUlvE_clEv.Frame*)’:
pr103328_smaller.cpp:24:17: internal compiler error: Segmentation fault
   24 |   auto lambda = [this]() noexcept -> task {
      |                 ^
Please submit a full bug report,

For "g++
(Compiler-Explorer-Build-gcc-cb3afcd2a380f2fb6c490f2c1318f76402eab43a-binutils-2.36.1)
12.0.1 20220217 (experimental)" and "-g -std=c++20 -fno-checking" it fails
with:

during RTL pass: final
<source>: In function 'void
foo::f()::<lambda()>::operator()(foo::f()::<lambda()>::_ZZN3foo1fEvENKUlvE_clEv.Frame*)':
<source>:24:17: internal compiler error: tree check: expected block, have
function_decl in change_scope, at final.cc:1467
   24 |   auto lambda = [this]() noexcept -> task {
      |                 ^
0x217c1f9 internal_error(char const*, ...)
        ???:0
0x6f3eaf tree_check_failed(tree_node const*, char const*, int, char const*,
...)
        ???:0
Please submit a full bug report, with preprocessed source (by using
-freport-bug).

For "g++
(Compiler-Explorer-Build-gcc-cb3afcd2a380f2fb6c490f2c1318f76402eab43a-binutils-2.36.1)
12.0.1 20220217 (experimental)" and "-g -std=c++20 -fchecking" it fails with:

...
<source>:30:13: error: location references block not in block tree
... (repeated multiple times)
during IPA pass: *free_lang_data
<source>:30:13: internal compiler error: verify_gimple failed
0x217c1f9 internal_error(char const*, ...)
        ???:0
0x1188a85 verify_gimple_in_cfg(function*, bool)
        ???:0

Reply via email to