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

--- Comment #10 from Sam James <sjames at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #7)
> Note fixing the ODR issue:
> 
> Fixes the ICE.

As discussed on IRC, just noting for completeness, it repros w/ valid:

a.cxx:
```
struct array1 {
  unsigned char _M_elems[256];
};

array1 MRAMBurstTable;
extern const array1 MRAMRead16Bursts[1];
void DMAUnitTimings9_16() { MRAMBurstTable = MRAMRead16Bursts[0]; }
```

b.cxx:
```
struct array1 {
  unsigned char _M_elems[256];
};

extern const array1 MRAMRead16Bursts[1]{
    {3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
     2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 2, 2, 2,
     2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
     2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
     2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
     2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 7, 3, 0}
     };
```

Reply via email to