From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 04A473858C36; Mon, 27 Nov 2023 19:24:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 04A473858C36 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1701113050; bh=3AOVg8u8BE2Lu+ahpyhtVxoPWy0hcyYWPotAE4rD0S0=; h=From:To:Subject:Date:In-Reply-To:References:From; b=MVUuzoatsws7+HM/4sttz5y7qX1fOU6fFEj5eWU796DyiOGoE7Sdq9Fq8I5/TTfxE 38iIC1gwKYnqEUCwvwLaD2CiMDTjwE9Re9H64HBdnqda++7S48va+M8clseYLTlqO2 Px9gXCMsKtDg1jWLLLcPq+tgLYicjtoY+MkdhuG4= From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug bootstrap/111601] [14 Regression] profilebootstrap fails in stagestrain in libcody on x86_64-linux-gnu and powerpc64le-linux-gnu Date: Mon, 27 Nov 2023 19:24:09 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: bootstrap X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: build, ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: NEW 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=3D111601 --- Comment #22 from Jakub Jelinek --- Full executable testcase: struct tree_base { int code:16; }; struct saved_scope { void *pad[14]; int x_processing_template_decl; }; struct saved_scope *scope_chain; struct z_candidate { tree_base *fn; void *pad[11]; z_candidate *next; int viable; int flags; }; __attribute__((noipa)) struct z_candidate * splice_viable (struct z_candidate *cands, bool strict_p, bool *any_viable_p) { struct z_candidate *viable; struct z_candidate **last_viable; struct z_candidate **cand; bool found_strictly_viable =3D false; if (scope_chain->x_processing_template_decl) strict_p =3D true; viable =3D (z_candidate *) 0; last_viable =3D &viable; *any_viable_p =3D false; cand =3D &cands; while (*cand) { struct z_candidate *c =3D *cand; if (!strict_p && (c->viable =3D=3D 1 || ((int) (c->fn)->code) =3D=3D = 273)) { strict_p =3D true; if (viable && !found_strictly_viable) { *any_viable_p =3D false; *last_viable =3D cands; cands =3D viable; viable =3D (z_candidate *) 0; last_viable =3D &viable; } } if (strict_p ? c->viable =3D=3D 1 : c->viable) { *last_viable =3D c; *cand =3D c->next; c->next =3D (z_candidate *) 0; last_viable =3D &c->next; *any_viable_p =3D true; if (c->viable =3D=3D 1) found_strictly_viable =3D true; } else cand =3D &c->next; } return viable ? viable : cands; } int main () { saved_scope s{}; scope_chain =3D &s; z_candidate z[4] =3D {}; z[0].next =3D &z[1]; z[1].viable =3D 1; z[1].next =3D &z[2]; z[2].viable =3D 1; z[2].next =3D &z[3]; bool b; z_candidate *c =3D splice_viable (&z[0], true, &b); if (c !=3D &z[1] || z[1].next !=3D &z[2] || z[2].next) __builtin_abort (); return 0; } ../prev-gcc/xg++ -B ../prev-gcc/ -O2 -fprofile-generate -fno-exceptions -fno-rtti -o ~/pr111601.{s,ii} -S; g++ -o ~/pr111601{,.s} ../prev-gcc/libgcov.a; ~/pr111601; echo $?; ../prev-gcc/xg++ -B ../prev-gcc/ -O2 -fprofile-generate -fno-exceptions -fno-rtti -o ~/pr111601.{s,ii} -S -fno-fold-mem-offsets; g++ -o ~/pr111601{,.s} ../prev-gcc/libgcov.a; ~/pr111601; echo $? Aborted 134 0=