https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117845
Bug ID: 117845 Summary: ICE: Segmentation fault (honor_protect_cleanup_actions and lower_try_finally during GIMPLE pass: eh ) Product: gcc Version: 15.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: iamanonymous.cs at gmail dot com Target Milestone: --- ******************************************************************************* The compiler produces an internal error during during GIMPLE pass: eh when compiling the provided code with the specified options. The issue can also be reproduced on Compiler Explorer. ******************************************************************************* OS and Platform: # uname -a Linux ubuntu 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux ******************************************************************************* # g++ -v Using built-in specs. COLLECT_GCC=g++ COLLECT_LTO_WRAPPER=/root/gdbtest/gcc/gcc-241127/libexec/gcc/x86_64-pc-linux-gnu/15.0.0/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: ../gcc/configure --prefix=/root/gdbtest/gcc/gcc-241127 --enable-languages=c,c++ --disable-multilib --disable-bootstrap Thread model: posix Supported LTO compression algorithms: zlib gcc version 15.0.0 20241127 (experimental) (GCC) ******************************************************************************* Program: #cat bug.cpp #include <ranges> #include <iostream> int main() { auto const ints = {0,1,2,3,4,5}; auto even = [](int i) { return 0 == i % 2; }; auto square = [](int i) { return i * i; }; // "pipe" syntax of composing the views: for (int i : ints | std::views::filter(even) | std::views::transform(square)) { std::cout << i << ' '; } std::cout << '\n'; // a traditional "functional" composing syntax: for (int i : std::views::transform(std::views::filter(ints, even), square)) { std::cout << i << ' '; } } ******************************************************************************* Command Lines: # g++ -funroll-loops -flto -Wall -Wextra -fno-strict-aliasing -fwrapv -g -fsanitize=address -c bug.cpp <source>: In function 'int main()': <source>:11:30: error: 'std::views' has not been declared 11 | for (int i : ints | std::views::filter(even) | std::views::transform(square)) { | ^~~~~ <source>:11:57: error: 'std::views' has not been declared 11 | for (int i : ints | std::views::filter(even) | std::views::transform(square)) { | ^~~~~ <source>:18:23: error: 'std::views' has not been declared 18 | for (int i : std::views::transform(std::views::filter(ints, even), square)) { | ^~~~~ <source>:18:45: error: 'std::views' has not been declared 18 | for (int i : std::views::transform(std::views::filter(ints, even), square)) { | ^~~~~ during GIMPLE pass: eh <source>:4:5: internal compiler error: Segmentation fault 4 | int main() | ^~~~ 0x28d6a35 diagnostic_context::diagnostic_impl(rich_location*, diagnostic_metadata const*, diagnostic_option_id, char const*, __va_list_tag (*) [1], diagnostic_t) ???:0 0x28ed725 internal_error(char const*, ...) ???:0 Please submit a full bug report, with preprocessed source (by using -freport-bug). Please include the complete backtrace with any bug report. See <https://gcc.gnu.org/bugs/> for instructions. Compiler returned: 1 ******************************************************************************* Also ICE on trunk, compiler explorer:https://godbolt.org/z/TYE6zjTh6 *******************************************************************************