From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 322D53858D28; Thu, 5 Jan 2023 15:53:16 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 322D53858D28 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1672933996; bh=9Kls3Ajc0NUgVBgckgZVKXiw+pHsuJUp+ECCXKDgBCE=; h=From:To:Subject:Date:In-Reply-To:References:From; b=RphJLwk+AryVsfRkbDrc39/K7SHmo0TrOJquAfy4BUZS/z9hcz7h/+Rjw2x/3Y9Iz JcG9Go1kIkjKGrDzOzZEWNd9n57WaGq6wb8UCCAJa3qzdp5SfkiIsrGXss8D742bLS T2XxGNMjlzvH1dviAqrrZuyvF3NEREDTecXs+aHg= From: "agriff at tin dot it" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/108299] toplevel thread_local variables are not initialized if not referenced and initialized at wrong moment when referenced Date: Thu, 05 Jan 2023 15:53:15 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 12.2.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: agriff at tin dot it X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: INVALID 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=3D108299 --- Comment #9 from Andrea Griffini --- I agree that comment 0 is wrong and was based on a text that I thought was taken from the standard but apparently was not (cppreference.com). Sorry for the noise. I think that if the dynamic initialization should be tied only to uses of o= ther thread locals requiring dynamic initialization this should be stated more precisely in the standard text.=