bebbo / amiga-gcc

The GNU C-Compiler with Binutils and other useful tools for cross development for Amiga
GNU General Public License v2.0
312 stars 66 forks source link

Compiling with any optimization other than -O0 leads to various miscompilations #360

Closed Midar closed 1 year ago

Midar commented 1 year ago

It seems that with any level > -O0, there are a lot of miscompilations. I tried -O1, -O2 and -Os and they all lead to different miscompiles. Since these are various different miscompiles, I'm not sure how to report those. It can be very easily reproduced by compiling ObjFW with amiga-gcc, testing the resulting "tests" binary, then replacing -O0 with any other optimization level in buildsys.mk and rebuilding and see it crash (sooner with -O2, later with the other optimization levels).

bebbo commented 1 year ago

this was moved to https://github.com/bebbo/gcc/issues/207

Midar commented 1 year ago

Ah, sorry. I was sure I had already reported it, but couldn’t find it and so thought I hadn’t. Sorry for the noise.