From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C484D388F06E; Mon, 11 May 2020 11:32:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C484D388F06E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1589196775; bh=H4pt/6+2si1vrLiuBjOdqq5TALnv9sBCkFXpJX+5ql8=; h=From:To:Subject:Date:In-Reply-To:References:From; b=HSWno1xjim93VovbLKNRqABDT9fnXXpG21cVWzUJ/MehbaP/jFw8NeY26luwhHbvr 11h+wiVRrQ/A9mxWTt4JIo6+ku6Q5y1AGeQMU1AWfPFhh3Ri558F2jU7NaBL29TyLX fdMn7wuxFYmVdNuuwdNSvBcqhdvIiQiGfrIMw5j8= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/95052] Excess padding of partially initialized strings/char arrays Date: Mon, 11 May 2020 11:32:55 +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.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth 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: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: everconfirmed bug_status cf_reconfirmed_on keywords 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 May 2020 11:32:55 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D95052 Richard Biener changed: What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 Status|UNCONFIRMED |NEW Last reconfirmed| |2020-05-11 Keywords| |missed-optimization --- Comment #1 from Richard Biener --- I'm not sure what you describe as padding is padding. Instead it's valid to access all elements of the array you declare and thus it must be initialize= d. What could be done is elide zero-padding parts to a memset() call.=