From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 8AB943858410; Thu, 18 Jan 2024 09:32:35 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8AB943858410 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1705570355; bh=+NqiSO7mA5F9/vbTpO3bbF5gqIt9wjbqp8Qkboi6XII=; h=From:To:Subject:Date:In-Reply-To:References:From; b=JDOUVj+c878UyFomCzHcksZqEiDqG3jTyddBCBGrpIqvpZCe7+Frk/wFViqJJfnmS /lSl8yCNQp5j6q82pXa0hF2Ll6HrP5Av8g0Hd+bIApDZS5D1eB5nHHZkwQm76S8cUZ Rg7PB8vPgjEef8RSsSlAFUyIVbG3K1eglVPOfYhw= From: "sjames at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/113467] [14 regression] libgcrypt-1.10.3 is miscompiled Date: Thu, 18 Jan 2024 09:32:33 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: sjames 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: 14.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: 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=3D113467 --- Comment #9 from Sam James --- I get an ICE with that: ``` /tmp/build/./gcc/xgcc -B/tmp/build/./gcc/ -B/tmp/gcc/x86_64-pc-linux-gnu/bi= n/ -B/tmp/gcc/x86_64-pc-linux-gnu/lib/ -isystem /tmp/gcc/x86_64-pc-linux-gnu/include -isystem /tmp/gcc/x86_64-pc-linux-gnu/sys-include -g -O2 -m32 -O2 -g -O2 -DIN_GC= C=20=20 -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -fpic -mlong-double-80 -DUSE_ELF_SYMVER -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector -fpic -mlong-double-80 -DUSE_ELF_SYMVER -I. -I. -I../../.././gcc -I/home/sam/git/gcc/libgcc -I/home/sam/git/gcc/libgcc/. -I/home/sam/git/gcc/libgcc/../gcc -I/home/sam/git/gcc/libgcc/../include -I/home/sam/git/gcc/libgcc/config/libbid -DENABLE_DECIMAL_BID_FORMAT -DHAVE_CC_TLS -DUSE_TLS -o bid128_div.o -MT bid128_div.o -MD -MP -MF bid128_div.dep -c /home/sam/git/gcc/libgcc/config/libbid/bid128_div.c during GIMPLE pass: vect In file included from /home/sam/git/gcc/libgcc/config/libbid/bid_internal.h= :27, =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20 from /home/sam/git/gcc/libgcc/config/libbid/bid_div_macros.h:27, from /home/sam/git/gcc/libgcc/config/libbid/bid128_div.c:2= 5: /home/sam/git/gcc/libgcc/config/libbid/bid128_div.c: In function '__bid128_div': /home/sam/git/gcc/libgcc/config/libbid/bid_conf.h:181:20: internal compiler error: in single_pred_edge, at basic-block.h:342 181 | #define bid128_div __bid128_div | ^~~~~~~~~~~~ /home/sam/git/gcc/libgcc/config/libbid/bid_conf.h:1047:6: note: in definiti= on of macro 'BID128_FUNCTION_ARG2' 1047 | fn_name (UINT128 bid_##arg_name1, \ | ^~~~~~~ /home/sam/git/gcc/libgcc/config/libbid/bid128_div.c:36:23: note: in expansi= on of macro 'bid128_div' 36 | BID128_FUNCTION_ARG2 (bid128_div, x, y) | ^~~~~~~~~~ Please submit a full bug report, with preprocessed source (by using -freport-bug). See for instructions. make[4]: *** [Makefile:653: bid128_div.o] Error 1 ``` Reduced: ``` typedef struct { int w; } UINT128; UINT128 get_BID128_coeff; int get_BID128_coeff_0_1, get_BID128_coeff_0_0, get_BID128_tmp2, get_BID128_expon; void get_BID128() { while ((get_BID128_coeff.w || get_BID128_coeff_0_0) && get_BID128_expon) { if (get_BID128_tmp2) get_BID128_coeff_0_1++; get_BID128_expon--; } } ```=