From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id A41D33858283; Wed, 7 Feb 2024 20:59:28 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A41D33858283 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1707339568; bh=2Vgnxtt7EjYtn2HQ4b6ZP5Q5Zq98KVA3sq9jX7yraQE=; h=From:To:Subject:Date:From; b=OG1VpDKUFsloDR95IAq+vOA/9Ob2fiUMpKSu1f827CWCNK8lJkQ307ZWf387bBRvv 4rzYQLcN8u4jn3y/AraNgr7HRfXZvuxOa+ouuyIrTDoANlDQyKbEg/C7xqtN4A3VVh bplkX3Nc5svrSYZWyPGa47fPpqzJVSpGReo51n1M= From: "dcb314 at hotmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/113817] New: ice in move_early_exit_stmts Date: Wed, 07 Feb 2024 20:59:27 +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: 14.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: dcb314 at hotmail 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 bug_severity priority component assigned_to reporter 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D113817 Bug ID: 113817 Summary: ice in move_early_exit_stmts Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: dcb314 at hotmail dot com Target Milestone: --- For this C code: char enc_int_dst_orig; long main_val; char main_buf[20]; char *enc_int(char *dst, char *end, long value) { while (value) if (dst < end) *dst++ =3D value >>=3D 7; else return &enc_int_dst_orig; *dst =3D 7; } void main() { enc_int(main_buf, main_buf + sizeof(main_buf), main_val); } compiles ok as follows: $ /home/dcb38/gcc/results.20240202.asan.ubsan/bin/gcc -c -O3 -march=3Dznver3 ~/cvise/bug1005.c $ But a few days later: $ /home/dcb38/gcc/results.20240205.asan.ubsan/bin/gcc -c -O3 -march=3Dznver3 ~/cvise/bug1005.c during GIMPLE pass: vect /home/dcb38/cvise/bug1005.c: In function =E2=80=98main=E2=80=99: /home/dcb38/cvise/bug1005.c:12:6: internal compiler error: Segmentation fau= lt 12 | void main() { enc_int(main_buf, main_buf + sizeof(main_buf), main_v= al);=20 } | ^~~~ 0xed44e9 crash_signal(int) /home/dcb38/gcc/working/gcc/../../trunk.20210101/gcc/toplev.cc:317 0x1186bd3 gsi_prev(gimple_stmt_iterator*) ../../trunk.20210101/gcc/gimple-iterator.h:236 0x1186bd3 move_early_exit_stmts(_loop_vec_info*) =20=20=20=20=20=20=20 /home/dcb38/gcc/working/gcc/../../trunk.20210101/gcc/tree-vect-loop.cc:1 1804 $ /home/dcb38/gcc/results.20240202.asan.ubsan/bin/gcc -v 2>&1 | grep exp gcc version 14.0.1 20240202 (experimental) (639bd5e9b759a6d7) $ /home/dcb38/gcc/results.20240205.asan.ubsan/bin/gcc -v 2>&1 | grep exp gcc version 14.0.1 20240205 (experimental) (5b281946c4b51132) The git range is 40 commits.=