From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 02A9038582BD; Sun, 20 Aug 2023 09:34:28 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 02A9038582BD DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1692524068; bh=ppbnooyraheGQi2NSv/ec6Keq34olWLD/LeCfOdznFE=; h=From:To:Subject:Date:In-Reply-To:References:From; b=SDUnQT8Y/yNlHuicWwC5h/nyUaKIP5PuQgRwKYfJDcg758Q/m5pV63UdONbPYjmzp SWfdIL5tOhVUrtlGOCWYtCi5zSDCIVnZaBUNju6raKkt1BywScZKB4aWvsSaUixOn/ FGhdUrorcZc6JMbOrAC3LHYTIhxxuOqwo+6bZA24= From: "sagebar at web dot de" To: gcc-bugs@gcc.gnu.org Subject: [Bug debug/111080] [11/12/13/14 Regression] restrict qualifier causes extra debug info to happen Date: Sun, 20 Aug 2023 09:34:27 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: debug X-Bugzilla-Version: 12.1.0 X-Bugzilla-Keywords: needs-bisection X-Bugzilla-Severity: normal X-Bugzilla-Who: sagebar at web dot de 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: 11.5 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=3D111080 --- Comment #2 from sagebar at web dot de --- @Andrew Pinski Of course: yes. I did make a mistake there, but only for this case: > int (*fun_t)(struct foo *); // Leak (even w/o restrict!) asm: ... .globl fun_t .section .bss .align 4 .type fun_t, @object .size fun_t, 4 fun_t: .zero 4 ... In the other case: > static int (*fun_t)(struct foo *); // Leak (even w/o restrict!) asm: ... # No data-symbol is generated for `fun_t` ... Gcc actually doesn't generate a .bss-symbol for the static variable (since = it's unused), but it still generates debug inforation for `struct foo`. So I gue= ss strike `int (*fun_t)(struct foo *);` from the list, but keep `static int (*fun_t)(struct foo *);` which still leaks=