3 ms·
>As a bonus this crashes icc if you do it. I thought this was a pretty funny thing but unfortunately when I tried this on ICC it seemed to compile just fine.
by jchw 6y ago
>As a bonus this crashes icc if you do it.
I thought this was a pretty funny thing but unfortunately when I tried this on ICC it seemed to compile just fine.
Though I am amused by one thing: the VLA version generates worse code on all compilers I've tried. Seems to validate the common refrain that VLAs tend to break optimizations. (Surely it's worse when you have an on-stack VLA though.)
- astrange 6y agoThis does it: https://gcc.godbolt.org/z/5fz8sM https://gcc.godbolt.org/z/5fz8sM I'm not sure if they take bug reports if you're not a customer, but this one goes back at least 8 years.