From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C7C2A393D01F; Tue, 1 Dec 2020 07:42:21 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C7C2A393D01F From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: =?UTF-8?B?W0J1ZyBjLzk3MTcyXSBbMTEgUmVncmVzc2lvbl0gSUNFOiB0cmVl?= =?UTF-8?B?IGNvZGUg4oCYc3NhX25hbWXigJkgaXMgbm90IHN1cHBvcnRlZCBpbiBMVE8g?= =?UTF-8?B?c3RyZWFtcyBzaW5jZSByMTEtMzMwMy1nNjQ1MGYwNzM4OGY5ZmU1Nw==?= Date: Tue, 01 Dec 2020 07:42:21 +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: ice-on-valid-code, lto X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 11.0 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 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: Tue, 01 Dec 2020 07:42:21 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D97172 --- Comment #17 from Richard Biener --- Well - you're the first to add nontrivial (non-constant) trees to attribute= s.=20 In GIMPLE all effects are supposed to be reflected in the IL and thus things like variable TYPE_SIZE or TYPE_MIN/MAX_VALUE are actually gimplified with code generated during that inserted at the respective DECL_EXPR (which is where gimplification is triggered from for the types). Honestly I am not sure what you think you can do with arbitrary expressions in an attribute down the GIMPLE pipeline given there's no connection to actual variable values. That said, the idea of sticking this additional information in attributes in form of some random plain tree expressions doesn't work. You'd have to sanitize them at least if, say, expressions based purely on other formal function arguments is what you are after. That would for example be done by unsharing the expressions without locatio= ns which you could try. But for example the PR97133 case, attributes value chain side-effects arg:0 side-effects arg:0 side-effects arg:1 > arg:1 side-effects arg:0 >> arg:1 certainly is missing constant evaluation (I can bet whatever is supposed to consume the access attributes gives up on the above anyway). C_MAYBE_CONST_EXPR is a frontend specific tree code and thus it shouldn't even survive GENERICization. So I would stronly suggest to revisit the way you try to record "every information for accesses" for GCC 12 and for GCC 11 restrict the information to CONSTANT_CLASS_P trees.=