From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id A7C053858402; Mon, 4 Oct 2021 22:16:14 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A7C053858402 From: "johelegp at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/102600] New: [modules] ICE Segmentation fault during GIMPLE pass evrp Date: Mon, 04 Oct 2021 22:16:14 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: johelegp at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status keywords bug_severity priority component assigned_to reporter cc target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Oct 2021 22:16:14 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D102600 Bug ID: 102600 Summary: [modules] ICE Segmentation fault during GIMPLE pass evrp Product: gcc Version: 12.0 Status: UNCONFIRMED Keywords: ice-on-valid-code Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: johelegp at gmail dot com CC: johelegp at gmail dot com Target Milestone: --- main.cpp: ```C++ import; void push(std::byte) {} void write(char v) { push(static_cast(v)); } int main() { write(char{}); } ``` Compile commands: ``` gcc -std=3Dc++23 -O3 -fmodules-ts -x c++-system-header -c cstddef gcc -std=3Dc++23 -O3 -fmodules-ts -c main.cpp ``` Output: ``` during GIMPLE pass: evrp main.cpp: In function =E2=80=98void write(char)=E2=80=99: main.cpp:4:29: internal compiler error: Segmentation fault 4 | int main() { write(char{}); } | ^ 0x2068f9d internal_error(char const*, ...) ???:0 0xca4c68 wi::to_wide(tree_node const*) ???:0 0x1f85553 operator_cast::inside_domain_p(generic_wide_int const&, generic_wide_int const&, irange const&) const ???:0 0x1f8c51d operator_cast::fold_pair(irange&, unsigned int, irange const&, ir= ange const&) const ???:0 0x1f8cb6a operator_cast::fold_range(irange&, tree_node*, irange const&, ira= nge const&, tree_code) const ???:0 0x1e723b0 fold_using_range::range_of_range_op(irange&, gimple*, fur_source&) ???:0 0x1e73142 fold_using_range::fold_stmt(irange&, gimple*, fur_source&, tree_node*) ???:0 0x1e67484 gimple_ranger::range_of_stmt(irange&, gimple*, tree_node*) ???:0 0x1e681ff gimple_ranger::range_of_expr(irange&, tree_node*, gimple*) ???:0 0x14ec2f1 range_query::value_of_expr(tree_node*, gimple*) ???:0 0x1e7bda8 rvrp_folder::value_of_expr(tree_node*, gimple*) ???:0 0x138eebe substitute_and_fold_dom_walker::before_dom_children(basic_block_d= ef*) ???:0 0x1e37697 dom_walker::walk(basic_block_def*) ???:0 0x138e03d substitute_and_fold_engine::substitute_and_fold(basic_block_def*) ???:0 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See for instructions. ```=