public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/108522] New: [Regression 12/13] ICE in tree-object-size when struct has VLA
@ 2023-01-24 16:52 siddhesh at gcc dot gnu.org
  2023-01-24 16:53 ` [Bug tree-optimization/108522] " siddhesh at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: siddhesh at gcc dot gnu.org @ 2023-01-24 16:52 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 108522
           Summary: [Regression 12/13] ICE in tree-object-size when struct
                    has VLA
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: siddhesh at gcc dot gnu.org
  Target Milestone: ---

Reproducer:

__SIZE_TYPE__ foo (unsigned int n)
{
 struct {
  unsigned char a[n];
  unsigned char b;
 } s;

 return __builtin_dynamic_object_size (&s.b, 1);
}

$ gcc/cc1 -quiet ../repro.cc -O2 -Wall -o -
        .file   "repro.cc"
        .text
during GIMPLE pass: objsz
../repro.cc: In function ‘foo’:
../repro.cc:1:15: internal compiler error: in execute_todo, at passes.cc:2140
    1 | __SIZE_TYPE__ foo (unsigned int n)
      |               ^~~
0x72216f execute_todo
        ../../gcc/passes.cc:2140
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

Looks like getting the size of object for a pointer right after a VLA in a
struct results in an ICE.  I'm on it.

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

end of thread, other threads:[~2023-02-07 20:05 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-24 16:52 [Bug tree-optimization/108522] New: [Regression 12/13] ICE in tree-object-size when struct has VLA siddhesh at gcc dot gnu.org
2023-01-24 16:53 ` [Bug tree-optimization/108522] " siddhesh at gcc dot gnu.org
2023-01-24 18:27 ` [Bug tree-optimization/108522] [12/13 Regression] " jakub at gcc dot gnu.org
2023-01-24 18:28 ` jakub at gcc dot gnu.org
2023-01-25  0:47 ` cvs-commit at gcc dot gnu.org
2023-01-26 12:21 ` cvs-commit at gcc dot gnu.org
2023-02-07 20:03 ` [Bug tree-optimization/108522] [12 " cvs-commit at gcc dot gnu.org
2023-02-07 20:03 ` cvs-commit at gcc dot gnu.org
2023-02-07 20:05 ` siddhesh 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).