From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id DAA643857B9B; Thu, 14 Mar 2024 18:34:39 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DAA643857B9B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1710441279; bh=NQ3rkFWIfPlvs6x6621CA65nrp1iV2cmS6jbVojgE30=; h=From:To:Subject:Date:In-Reply-To:References:From; b=INba433iL9xOeWCOJL68cAXmb8P7o8VF2/95aU9qxNwZppkvyWZ/qN2E1u6R0CfYP HGcJe9n49kwry3AmUGLanW8qUX0GZ15/Ua/XKxihU0AbAM6CARxKXqkkbT9l/K1GE3 IhN8w+PgVBoSxqurR9ioAhWMkIX4Klj4cgVmVako= From: "sjames at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/114339] [14 regression] Tor miscompiled with -O2 -mavx -fno-vect-cost-model Date: Thu, 14 Mar 2024 18:34:39 +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: 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: --- 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=3D114339 --- Comment #1 from Sam James --- The assert is at https://gitlab.torproject.org/tpo/core/tor/-/blob/tor-0.4.8.10/src/feature/= client/entrynodes.c#L2072 ``` (gdb) p delays $3 =3D {{ maximum =3D 21600, primary_delay =3D 600, nonprimary_delay =3D 3600 }, { maximum =3D 345600, primary_delay =3D 5400, nonprimary_delay =3D 14400 }, { maximum =3D 604800, primary_delay =3D 14400, nonprimary_delay =3D 64800 }, { maximum =3D 9223372036854775807, primary_delay =3D 32400, nonprimary_delay =3D 129600 }} (gdb) ``` The bad loop (confirmed w/ novector pragma) is: for (i =3D 0; i < ARRAY_LENGTH(delays); ++i) { if (tdiff <=3D delays[i].maximum) { return is_primary ? delays[i].primary_delay : delays[i].nonprimary_de= lay; } }=