bebbo / amiga-gcc

The GNU C-Compiler with Binutils and other useful tools for cross development for Amiga

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

Midar opened this issue · comments

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).

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.