public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/109334] New: tree-object-size: Improve size computation in arguments
@ 2023-03-29 11:14 siddhesh at gcc dot gnu.org
  2023-03-30 22:04 ` [Bug tree-optimization/109334] " muecker at gwdg dot de
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: siddhesh at gcc dot gnu.org @ 2023-03-29 11:14 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 109334
           Summary: tree-object-size: Improve size computation in
                    arguments
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: siddhesh at gcc dot gnu.org
                CC: jakub at gcc dot gnu.org, marxin at gcc dot gnu.org,
                    msebor at gcc dot gnu.org, muecker at gwdg dot de,
                    siddhesh at gcc dot gnu.org
        Depends on: 104970
  Target Milestone: ---

The fix for bug 104970 is too restrictive, size computation should also work
for VLA bounds and also cases where it could work without attributes in simple
cases, e.g.

size_t
__attribute__ ((noinline))
test_parmsz_internal3 (size_t sz1, size_t sz2, double obj[sz1][sz2])
{
  return __builtin_dynamic_object_size (obj, 0);
}

or

__attribute__ ((noinline, access (read_only, 2, 1)))
int foo(int n, int buf[n])
{
    buf[n] = 1;
    return __builtin_dynamic_object_size(buf, 0);
}

int main() {
    int n = 10;
    int buf[n];
    return foo(n, buf);
}


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104970
[Bug 104970] [12 Regression] ICE in execute_todo, at passes.cc:2133 since
r12-6480-gea19c8f33a3a8d2b

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-05-07  7:40 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-29 11:14 [Bug tree-optimization/109334] New: tree-object-size: Improve size computation in arguments siddhesh at gcc dot gnu.org
2023-03-30 22:04 ` [Bug tree-optimization/109334] " muecker at gwdg dot de
2023-03-31 12:27 ` siddhesh at gcc dot gnu.org
2023-10-29  6:48 ` cvs-commit at gcc dot gnu.org
2023-10-29  7:29 ` sjames at gcc dot gnu.org
2024-05-07  7:40 ` rguenth at gcc dot gnu.org

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).