When using -O with dmd fails with the following code (reduced): ``` struct C { hash_t foo( ) { int y; return ((cast(ubyte*)&y)[1]); } } ``` ``` nemanjaboric:/home/nemanjaboric/test-clean.reduced $ dmd -O testreduced.d Internal error: backend/cod1.c 1338 ``` ``` DMD64 D Compiler v2.071.1 ```
Looks like it got introduced in 2.068
Confirms it fails also on MacOS
Also fails on Win64
https://github.com/dlang/dmd/pull/5923
Commits pushed to stable at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/ebbb2c6fb8856afb709bb1b05260df875a3790c4 fix Issue 16225 - [REG 2.068] Internal error cod1.c 1338 with -O https://github.com/dlang/dmd/commit/8a4a90f51bbc185214f70ccb115cab147a5a7f62 Merge pull request #5924 from MartinNowak/fix16225 fix Issue 16225 - [REG 2.068] Internal error cod1.c 1338 with -O
Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/ebbb2c6fb8856afb709bb1b05260df875a3790c4 fix Issue 16225 - [REG 2.068] Internal error cod1.c 1338 with -O https://github.com/dlang/dmd/commit/8a4a90f51bbc185214f70ccb115cab147a5a7f62 Merge pull request #5924 from MartinNowak/fix16225