Issue 16225 - [REG 2.068] Internal error cod1.c 1338 with -O
Summary: [REG 2.068] Internal error cod1.c 1338 with -O
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: x86_64 All
: P1 regression
Assignee: No Owner
URL:
Keywords: ice-on-valid-code, pull
Depends on:
Blocks:
 
Reported: 2016-07-01 17:56 UTC by Nemanja Boric
Modified: 2016-08-01 19:54 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Nemanja Boric 2016-07-01 17:56:45 UTC
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
```
Comment 1 Nemanja Boric 2016-07-01 18:16:17 UTC
Looks like it got introduced in 2.068
Comment 2 Steven Schveighoffer 2016-07-01 18:40:41 UTC
Confirms it fails also on MacOS
Comment 3 Walter Bright 2016-07-09 06:10:18 UTC
Also fails on Win64
Comment 4 Walter Bright 2016-07-09 06:25:02 UTC
https://github.com/dlang/dmd/pull/5923
Comment 5 github-bugzilla 2016-07-09 11:17:47 UTC
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
Comment 6 github-bugzilla 2016-08-01 19:54:31 UTC
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