From nobody Fri May 27 14:32:23 2022 X-Original-To: bugs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 0C8121B57E5C for ; Fri, 27 May 2022 14:32:24 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4L8nMC57HGz3NrC for ; Fri, 27 May 2022 14:32:23 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 90D5224029 for ; Fri, 27 May 2022 14:32:23 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 24REWNdG050862 for ; Fri, 27 May 2022 14:32:23 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 24REWNp0050861 for bugs@FreeBSD.org; Fri, 27 May 2022 14:32:23 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 264288] llvm miscompiles the extension ({ ... }) Date: Fri, 27 May 2022 14:32:23 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: 13.0-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: andrew.cagney@gmail.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@freebsd.org MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1653661943; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+1qpJhCDEWkS0naD2uARnw09u1ECr255uC4+3LZ+DXk=; b=itnoUZqhZ7NgFTQzylz69YCVHgqGbULSAO+4kAQpTvRgju4EQVwjeQhbtTbWQy/VcZsoOE AOVVk1NQtYLnzMtkHhdQvCAoqPkNQ7q8sAzEIe4zn136b5Iw1MlR1yLNGYzUsQXIebJvp2 2ia20OruoIuQG8h9AEVMdIfwlU8nj/WTHUZBVCJsRfBMJDvxSCRAhIvupdgW8ecoAaY/pM YznK4fJpY4+vbQDAF+hScGpahHq62TjY2HgqAMGOyiUEOfwpmozze8VV+6lTiDMW+fclv8 sabLdA+hQwAZwdZw9RxEnbGvxemCxQI486W6Bdy8Dtztev5+wq+9IgOrZDGRFg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1653661943; a=rsa-sha256; cv=none; b=FGmH/5AS3JNE8ovbazQo6i+9XDiGP1H2SgAOgWvVuhvJxaNV8IIXSFuKM2Xf+d374FS32G 6Ym2ypTFnat+6OsdNEfuUboGFoa0mWn/3yJJ+J/SsJM31ODY/mFl+yh/3Hknfx1TJ3iaOo HBNj0dQ2jG05x1aQnaBRk+XDEI8lJuskX/5BSwCqKWUiMuU9aknp84dYDjDjWKJJKQTEHa 8AnEd5uL882zM14TDuB65YphlmBwrUS3t/E2ZM7rYkqYbm6U2F0UDnoYzaLP9LgF54w2ni lrVxUKxVqNqjLYHMYOCmruJH6692sYW4O7dWaInHD5i3GTHS3QDZpuD2X2UwEg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D264288 Bug ID: 264288 Summary: llvm miscompiles the extension ({ ... }) Product: Base System Version: 13.0-RELEASE Hardware: Any OS: Any Status: New Severity: Affects Some People Priority: --- Component: bin Assignee: bugs@FreeBSD.org Reporter: andrew.cagney@gmail.com Given: typedef const struct where { const char *func; const char *file; long line; } *where_t; and: struct connection_filter { /* filters */ enum connection_kind kind; const char *name; const struct id *this_id_eq; /* strict; not same_id() */ const struct id *that_id_eq; /* strict; not same_id() */ /* current result (can be safely deleted) */ struct connection *c; /* internal: handle on next entry */ struct list_entry *internal; /* internal: total matches so far */ unsigned count; /* .where MUST BE LAST (See GCC bug 102288) */ where_t where; }; this: + struct connection_filter cq =3D { + .where =3D ({ \ + static const struct where here =3D { \ + .func =3D __func__, \ + .file =3D __FILE__, \ + .line =3D __LINE__, \ + }; \ + &here; \ + }), + }; + dbg("FOR_EACH_CONNECTION_... in %s %s %ld", + cq.where->func, cq.where->file, cq.where->line); is mis-compiled. It prints NULL, NULL, 0 when it should print __func__, __FILE__, __LINE__. Note: - .where is last, yes that's a reall gcc bug - only the field .where is initialized, if a second field is initialized th= ings seem to compile correctly - I could include the assembler but I'm not sure of the point - the compiler lost track of values in a static structure --=20 You are receiving this mail because: You are the assignee for the bug.=