public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/114959] incorrect TBAA for drived types involving function types Date: Mon, 06 May 2024 11:42:37 +0000 [thread overview] Message-ID: <bug-114959-4-doSpE6XYnB@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-114959-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114959 Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|unknown |14.0 Keywords| |wrong-code CC| |hubicka at gcc dot gnu.org --- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> --- alias.c does /* See if the language has special handling for this type. */ set = lang_hooks.get_alias_set (t); if (set != -1) return set; /* There are no objects of FUNCTION_TYPE, so there's no point in using up an alias set for them. (There are, of course, pointers and references to functions, but that's different.) */ else if (TREE_CODE (t) == FUNCTION_TYPE || TREE_CODE (t) == METHOD_TYPE) set = 0; but when handling pointer-to-function we simply create a new alias-set for each distinct (according to TYPE_CANONICAL (TYPE_MAIN_VARIANT ()))) pointed-to type. It's going to be difficult to canonicalize return and argument types here, so the answer is probably tree.cc:maybe_canonicalize_argtypes and thus reflecting this in the TYPE_CANONICAL of the function type. Note this is also how we handle pointer to structure types, but as structures are real objects those already have TYPE_CANONICAL set up appropriately. So I wonder whether the C frontend doesn't need to do the same for FUNCTION_TYPEs rather than putting the burden on the middle-end here?
next prev parent reply other threads:[~2024-05-06 11:42 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2024-05-06 11:19 [Bug tree-optimization/114959] New: " muecker at gwdg dot de 2024-05-06 11:42 ` rguenth at gcc dot gnu.org [this message] 2024-05-06 15:02 ` [Bug tree-optimization/114959] " muecker at gwdg dot de 2024-05-07 6:47 ` rguenth at gcc dot gnu.org 2024-05-07 12:05 ` hubicka at ucw dot cz
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-114959-4-doSpE6XYnB@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).