public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@redhat.com>
To: Siddhesh Poyarekar <siddhesh@gotplt.org>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] tree-optimization/104970: Limit size computation for access attribute
Date: Thu, 24 Mar 2022 09:14:47 +0100	[thread overview]
Message-ID: <Yjwod47C/cHDpSzZ@tucnak> (raw)
In-Reply-To: <20220324030944.44287-1-siddhesh@gotplt.org>

On Thu, Mar 24, 2022 at 08:39:44AM +0530, Siddhesh Poyarekar wrote:
> Limit object size computation only to the simple case where access
> attribute has been explicitly specified.  The object passed to
> __builtin_dynamic_object_size could either be a pointer or a VLA whose
> size has been described only using access attribute.
> 
> Further, return a valid size only if the object is a void * pointer or
> points to (or is a VLA of) a type that has a constant size.
> 
> gcc/ChangeLog:
> 
> 	PR tree-optimization/104970
> 	* tree-object-size.cc (parm_object_size): Restrict size
> 	computation scenarios to explicit access attributes.
> 
> gcc/testsuite/ChangeLog:
> 
> 	PR tree-optimization/104970
> 	* gcc.dg/builtin-dynamic-object-size-0.c (test_parmsz_simple2,
> 	test_parmsz_simple3, test_parmsz_extern, test_parmsz_internal,
> 	test_parmsz_internal2, test_parmsz_internal3): New tests.
> 	(main): Use them.
> 
> Signed-off-by: Siddhesh Poyarekar <siddhesh@gotplt.org>

Ok, thanks.

	Jakub


      reply	other threads:[~2022-03-24  8:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-24  3:09 Siddhesh Poyarekar
2022-03-24  8:14 ` Jakub Jelinek [this message]

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=Yjwod47C/cHDpSzZ@tucnak \
    --to=jakub@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=siddhesh@gotplt.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).