From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 06B213858D33; Tue, 11 Apr 2023 14:48:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 06B213858D33 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1681224526; bh=5aGd7GoP0SLDSkpycPNAI/CpGSLcBW9oq4TZTHA06ZQ=; h=From:To:Subject:Date:From; b=TWSoQx1XY8XHuhjRhw5oluXLQrgdLTOqecAYTzKLycR4IflrdpKK3C4KEYTrkaFy+ CUBY4M1lWxUoURdpdC2mjVVv8+d3WCPjSJ44OsSDnSLEp9QVXB8BDwLTtlnXaSYYhR 7kZ/jEdRA6EH+HRalKWMtkwO/ErkcB5ny5vesnKc= From: "arsen at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/109473] New: ICE during GIMPLE pass: vect: verify_gimple failed with -m32 Date: Tue, 11 Apr 2023 14:48:45 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: arsen at gcc dot gnu.org 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 attachments.created 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=3D109473 Bug ID: 109473 Summary: ICE during GIMPLE pass: vect: verify_gimple failed with -m32 Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: arsen at gcc dot gnu.org Target Milestone: --- Created attachment 54831 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D54831&action=3Dedit reduced reproducer detected initially while building PipeWire, the attached code compiled with -m32 -march=3Dx86-64 -O1 -ftree-loop-vectorize produces an ICE: ~/gcc/scratch_build/gcc 4 $ ./cc1 -quiet ccGrpuMH.out -m32 -march=3Dx86-64 = -O1 -ftree-loop-vectorize ccGrpuMH.out: In function =E2=80=98do_port_use_buffers=E2=80=99: ccGrpuMH.out:9:14: warning: comparison between pointer and integer 9 | for (; j < buffers; j++) | ^ ccGrpuMH.out:10:14: warning: assignment to =E2=80=98void *=E2=80=99 from = =E2=80=98unsigned int=E2=80=99 makes pointer from integer without a cast [-Wint-conversion] 10 | endptr =3D (__UINTPTR_TYPE__)endptr + buffers[i]->metas[j]; | ^ ccGrpuMH.out:11:16: warning: comparison of distinct pointer types lacks a c= ast 11 | if (endptr > mem) | ^ ccGrpuMH.out:4:6: error: invalid (pointer) operands =E2=80=98plus_expr=E2= =80=99 4 | void do_port_use_buffers(struct spa_buffer **buffers) { | ^~~~~~~~~~~~~~~~~~~ _77 =3D stmp_endptr_23.18_76 + endptr_15; during GIMPLE pass: vect ccGrpuMH.out:4:6: internal compiler error: verify_gimple failed 0x142f352 verify_gimple_in_cfg(function*, bool, bool) ../../scratch/gcc/tree-cfg.cc:5648 0x12d1050 execute_function_todo ../../scratch/gcc/passes.cc:2098 0x12d15be execute_todo ../../scratch/gcc/passes.cc:2152 Please submit a full bug report, with preprocessed source (by using -freport-bug). Please include the complete backtrace with any bug report. See for instructions. ~/gcc/scratch_build/gcc 4 $ ./xgcc -v Using built-in specs. COLLECT_GCC=3D./xgcc Target: x86_64-pc-linux-gnu Configured with: ../scratch/configure --disable-bootstrap --enable-checking=3Dyes,rtl,tree --enable-languages=3Dc,c++ --enable-multil= ib Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 13.0.1 20230411 (experimental) (GCC) ~/gcc/scratch_build/gcc$ echo -n g:; git -C ../../scratch rev-parse HEAD^ g:b8e32978e3d9e3b88cd4f441edfdebfa395a5c26 (the commit applied on top of this is a maintainer-scripts/ edit) I don't have a vanilla build of current releases/gcc-12, but it seems that = it is affected too: ~/gcc/scratch_build/gcc 1 $ gcc-12 --version gcc-12 (Gentoo Hardened 12.2.1_p20230408 p14) 12.2.1 20230408 Copyright (C) 2022 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. ~/gcc/scratch_build/gcc$ gcc-12 -x c -S -o - ccGrpuMH.out -m32 -march=3Dx86= -64 -O1 -ftree-loop-vectorize .file "ccGrpuMH.out" ccGrpuMH.out: In function =E2=80=98do_port_use_buffers=E2=80=99: ccGrpuMH.out:9:14: warning: comparison between pointer and integer 9 | for (; j < buffers; j++) | ^ ccGrpuMH.out:10:14: warning: assignment to =E2=80=98void *=E2=80=99 from = =E2=80=98unsigned int=E2=80=99 makes pointer from integer without a cast [-Wint-conversion] 10 | endptr =3D (__UINTPTR_TYPE__)endptr + buffers[i]->metas[j]; | ^ ccGrpuMH.out:11:16: warning: comparison of distinct pointer types lacks a c= ast 11 | if (endptr > mem) | ^ .text ccGrpuMH.out:4:6: error: invalid (pointer) operands =E2=80=98plus_expr=E2= =80=99 4 | void do_port_use_buffers(struct spa_buffer **buffers) { | ^~~~~~~~~~~~~~~~~~~ _77 =3D stmp_endptr_23.18_76 + endptr_15; during GIMPLE pass: vect ccGrpuMH.out:4:6: internal compiler error: verify_gimple failed 0xe96d34 verify_gimple_in_cfg(function*, bool) =20=20=20=20=20=20=20 /usr/src/debug/sys-devel/gcc-12.2.1_p20230408/gcc-12-20230408/gcc/tree-cfg.= cc:5561 0xd5c927 execute_function_todo =20=20=20=20=20=20=20 /usr/src/debug/sys-devel/gcc-12.2.1_p20230408/gcc-12-20230408/gcc/passes.cc= :2085 0xd5ca51 execute_todo =20=20=20=20=20=20=20 /usr/src/debug/sys-devel/gcc-12.2.1_p20230408/gcc-12-20230408/gcc/passes.cc= :2139 Please submit a full bug report, with preprocessed source (by using -freport-bug). Please include the complete backtrace with any bug report. See for instructions. but, earlier gcc-12 seems unaffected: ~/gcc/releases/gcc-12b/gcc$ ./cc1 -quiet ccGrpuMH.out -m32 -march=3Dx86-64 = -O1 -ftree-loop-vectorize ccGrpuMH.out: In function =E2=80=98do_port_use_buffers=E2=80=99: ccGrpuMH.out:9:14: warning: comparison between pointer and integer 9 | for (; j < buffers; j++) | ^ ccGrpuMH.out:10:14: warning: assignment to =E2=80=98void *=E2=80=99 from = =E2=80=98unsigned int=E2=80=99 makes pointer from integer without a cast [-Wint-conversion] 10 | endptr =3D (__UINTPTR_TYPE__)endptr + buffers[i]->metas[j]; | ^ ccGrpuMH.out:11:16: warning: comparison of distinct pointer types lacks a c= ast 11 | if (endptr > mem) | ^ ~/gcc/releases/gcc-12b/gcc$ ./xgcc --version xgcc (GCC) 12.2.1 20230313 Copyright (C) 2022 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. ~/gcc/releases/gcc-12b/gcc$ git -C ../../gcc-12 gcc-descr HEAD r12-9248-g775be7d6cb5517 apologies for the lack of bisect - i'm in a time crunch=