public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug lto/115129] New: [12/13/14/15 regression] ICE on recursive realloc call with LTO
@ 2024-05-17  7:56 sjames at gcc dot gnu.org
  2024-05-17  8:03 ` [Bug lto/115129] " rguenth at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: sjames at gcc dot gnu.org @ 2024-05-17  7:56 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 115129
           Summary: [12/13/14/15 regression] ICE on recursive realloc call
                    with LTO
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Keywords: ice-on-invalid-code
          Severity: normal
          Priority: P3
         Component: lto
          Assignee: unassigned at gcc dot gnu.org
          Reporter: sjames at gcc dot gnu.org
  Target Milestone: ---

Working on reducing something else but noticed this in the process.

url.i:
```
struct growable main_dest;
void* realloc();

struct growable {
  char base;
} append_string(struct growable *dest) {
  struct growable G_ = *dest;
  long DR_needed_size;
  while (DR_needed_size)
    realloc(G_);
}
int main() { append_string(&main_dest); }
```

xmalloc.i:
```
void *realloc(void *p, unsigned long s) { realloc(p, s); }
```

```
$ gcc url.i xmalloc.i -flto -O2
[...]
during GIMPLE pass: fre
url.i: In function ‘main’:
url.i:12:5: internal compiler error: in execute_todo, at passes.cc:2138
   12 | int main() { append_string(&main_dest); }
      |     ^
0x55b08ec670be execute_todo
        /usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/passes.cc:2138
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://bugs.gentoo.org/> for instructions.
lto-wrapper: fatal error: gcc returned 1 exit status
compilation terminated.
/usr/lib/gcc/x86_64-pc-linux-gnu/15/../../../../x86_64-pc-linux-gnu/bin/ld:
error: lto-wrapper failed
collect2: error: ld returned 1 exit status
```

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

end of thread, other threads:[~2024-06-20  9:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-17  7:56 [Bug lto/115129] New: [12/13/14/15 regression] ICE on recursive realloc call with LTO sjames at gcc dot gnu.org
2024-05-17  8:03 ` [Bug lto/115129] " rguenth at gcc dot gnu.org
2024-05-17  8:08 ` rguenth at gcc dot gnu.org
2024-06-20  9:15 ` 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).