Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Internal compiler error, when use std::println #22412

Open
2 of 6 tasks
nekoyama32767 opened this issue Nov 5, 2024 · 0 comments
Open
2 of 6 tasks

Internal compiler error, when use std::println #22412

nekoyama32767 opened this issue Nov 5, 2024 · 0 comments
Labels

Comments

@nekoyama32767
Copy link

nekoyama32767 commented Nov 5, 2024

Description / Steps to reproduce the issue

When try to compile source code using std::println with mingw-w64-x86_64-gcc 14.2.0-1
gcc/g++ version is as flowing

$ g++ --version
g++.exe (Rev1, Built by MSYS2 project) 14.2.0
Copyright (C) 2024 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

println.cpp

#include <print>

int main()
{
    auto i = 0ull;
    std::println("{}", i);
    return 0;
}

Options are -O3 -std=c++23 -lstdc++exp -freport-bug

g++ println.cpp -O3 -std=c++23 -lstdc++exp -freport-bug

Flowing ICE will be shown, not every time, but very often

during RTL pass: cprop
In file included from D:/msys64/mingw64/include/c++/14.2.0/format:58,
                 from D:/msys64/mingw64/include/c++/14.2.0/print:41,
                 from println.cpp:1:
D:/msys64/mingw64/include/c++/14.2.0/bits/unicode.h: In member function 'constexpr std::__unicode::__v15_1_0::_Grapheme_cluster_view<_View>::_Iterator& std::__unicode::__v15_1_0::_Grapheme_cluster_view<_View>::_Iterator::operator++() [with _View = std::basic_string_view<char>]':
D:/msys64/mingw64/include/c++/14.2.0/bits/unicode.h:801:9: internal compiler error: in try_forward_edges, at cfgcleanup.cc:580
  801 |         }
      |         ^
Please submit a full bug report, with preprocessed source.
See <https://github.com/msys2/MINGW-packages/issues> for instructions.
g++.exe: fatal error: cannot execute 'D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/cc1plus.exe': open temporary output file
compilation terminated.

during RTL pass: into_cfglayout
In file included from D:/msys64/mingw64/include/c++/14.2.0/print:41,
                 from println.cpp:1:
D:/msys64/mingw64/include/c++/14.2.0/format: In member function 'decltype(auto) std::basic_format_arg<_Context>::_M_visit(_Visitor&&, std::__format::_Arg_t) [with _Visitor = std::__format::_Formatting_scanner<std::__format::_Sink_iter<char>, char>::_M_format_arg(std::size_t)::<lambda(auto:36&)>; _Context = std::basic_format_context<std::__format::_Sink_iter<char>, char>]':
D:/msys64/mingw64/include/c++/14.2.0/format:3560:9: internal compiler error: in try_forward_edges, at cfgcleanup.cc:580
 3560 |         }
      |         ^
Please submit a full bug report, with preprocessed source.
See <https://github.com/msys2/MINGW-packages/issues> for instructions.
The bug is not reproducible, so it is likely a hardware or OS problem.

Expected behavior

No ICE will be shown

Actual behavior

ICE will be shown

during RTL pass: cprop
In file included from D:/msys64/mingw64/include/c++/14.2.0/format:58,
                 from D:/msys64/mingw64/include/c++/14.2.0/print:41,
                 from println.cpp:1:
D:/msys64/mingw64/include/c++/14.2.0/bits/unicode.h: In member function 'constexpr std::__unicode::__v15_1_0::_Grapheme_cluster_view<_View>::_Iterator& std::__unicode::__v15_1_0::_Grapheme_cluster_view<_View>::_Iterator::operator++() [with _View = std::basic_string_view<char>]':
D:/msys64/mingw64/include/c++/14.2.0/bits/unicode.h:801:9: internal compiler error: in try_forward_edges, at cfgcleanup.cc:580
  801 |         }
      |         ^
Please submit a full bug report, with preprocessed source.
See <https://github.com/msys2/MINGW-packages/issues> for instructions.
g++.exe: fatal error: cannot execute 'D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/cc1plus.exe': open temporary output file
compilation terminated.

during RTL pass: into_cfglayout
In file included from D:/msys64/mingw64/include/c++/14.2.0/print:41,
                 from println.cpp:1:
D:/msys64/mingw64/include/c++/14.2.0/format: In member function 'decltype(auto) std::basic_format_arg<_Context>::_M_visit(_Visitor&&, std::__format::_Arg_t) [with _Visitor = std::__format::_Formatting_scanner<std::__format::_Sink_iter<char>, char>::_M_format_arg(std::size_t)::<lambda(auto:36&)>; _Context = std::basic_format_context<std::__format::_Sink_iter<char>, char>]':
D:/msys64/mingw64/include/c++/14.2.0/format:3560:9: internal compiler error: in try_forward_edges, at cfgcleanup.cc:580
 3560 |         }
      |         ^
Please submit a full bug report, with preprocessed source.
See <https://github.com/msys2/MINGW-packages/issues> for instructions.
The bug is not reproducible, so it is likely a hardware or OS problem.

Verification

Windows Version

MINGW64_NT-10.0-22631

MINGW environments affected

  • MINGW64
  • MINGW32
  • UCRT64
  • CLANG64
  • CLANGARM64

Are you willing to submit a PR?

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant