From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 3B4923858D38; Mon, 20 Feb 2023 05:23:41 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3B4923858D38 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1676870621; bh=jm69I7N++2fG4SnKzTt8d8efbUoFlCFtDMFpSHkHqxQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=rOivJDHg+mOlYzJggBkeetApGdct6SZxG74GZBGoJ7a6XuAwIeKtYVuddf9c1Yj7E TkmxgRQJPUerQqKBqme/qlRPoLreRCbgHEcXUKclOM8TCVPwfMAlDyThNRyysgmyZg frMnoKnVp9yWiLOqnWZTP+zVX/2bMLLFJqIW5yNY= From: "de34 at live dot cn" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/108243] [10/11/12/13 Regression] Missed optimization for static const std::string_view(const char*) Date: Mon, 20 Feb 2023 05:23:39 +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: 11.3.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: de34 at live dot cn X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: ppalka at gcc dot gnu.org X-Bugzilla-Target-Milestone: 10.5 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc 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=3D108243 Jiang An changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |de34 at live dot cn --- Comment #8 from Jiang An --- This seems a bug, not merely missing of optimization. The string_view object should always be statically initialized, because it has static storage dura= tion and its initializer is a constant iniitializer.=