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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-valid-code, lto
   Last reconfirmed|                            |2024-07-12
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
I think this is a known issue of local vs. global type streaming where local
types never enter merging but struct d is shared between c and f.

Same with the following just to show a case where we cannot stream 'd' into
the global types and decl pool as it refers to a local entity in 'c'.  I
suppose the fix is to "abstract" the struct for its use in 'f' and make
the two copies of 's' compatible to the middle-end.

void c(int b) {
  struct d {
    int a[b]
  } e() {
  }
  struct d f() { return e(); }
  f();
}

Reply via email to