public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "muecker at gwdg dot de" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/108375] [10/11/12/13 Regression] Some variably modified types not detected as such
Date: Mon, 13 Feb 2023 13:57:54 +0000	[thread overview]
Message-ID: <bug-108375-4-SVsqy6G8Fa@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-108375-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108375

--- Comment #5 from Martin Uecker <muecker at gwdg dot de> ---

Recursing into arrays is simple and does not seem to cause any problems,
but this not enough for GNU C, we can also have VLA or variably modified
types as member of structs. At least the later is sometimes useful.

void bar(int a)
{
  struct foo { char (*p)[a]; };
  goto x;
  struct foo B;
  x: ;
}

Unfortunately, recursing into structs is too expensive. We could use
walk_tree_without_duplicates but this still seems expensive.

I think we should simply add a bit which is set by the C FE for such
structs.  The question is whether this is also needed by Ada or other
languages?

  parent reply	other threads:[~2023-02-13 13:57 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-11 18:44 [Bug c/108375] New: " jsm28 at gcc dot gnu.org
2023-01-11 19:36 ` [Bug c/108375] " pinskia at gcc dot gnu.org
2023-01-11 19:38 ` pinskia at gcc dot gnu.org
2023-01-11 19:40 ` pinskia at gcc dot gnu.org
2023-01-13 11:31 ` ebotcazou at gcc dot gnu.org
2023-02-13 13:57 ` muecker at gwdg dot de [this message]
2023-02-14  8:34 ` muecker at gwdg dot de
2023-02-15 23:04 ` muecker at gwdg dot de
2023-02-17 20:31 ` muecker at gwdg dot de
2023-02-18  9:39 ` cvs-commit at gcc dot gnu.org
2023-02-21 13:13 ` [Bug c/108375] [10/11/12 " rguenth at gcc dot gnu.org
2023-02-21 13:36 ` muecker at gwdg dot de
2023-07-07 10:44 ` [Bug c/108375] [11/12 " rguenth at gcc dot gnu.org

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-108375-4-SVsqy6G8Fa@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: link
Be 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).