Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

static immutable variables not in read-only data segment #543

Closed
MartinNowak opened this issue Nov 14, 2013 · 3 comments
Closed

static immutable variables not in read-only data segment #543

MartinNowak opened this issue Nov 14, 2013 · 3 comments

Comments

@MartinNowak
Copy link
Contributor

cat > bug.d << CODE
immutable val = 13;
CODE
ldmd2 -c bug && nm bug.o | grep 3val
0000000000000000 D _D3bug3valyi

If I do the same with a const variable it works.

cat > bug.d << CODE
const val = 13;
CODE
ldmd2 -c bug && nm bug.o | grep 3val
0000000000000000 R _D3bug3valxi
@redstar
Copy link
Member

redstar commented Nov 14, 2013

Confirmed. Thanks for the report.

redstar added a commit that referenced this issue Nov 14, 2013
Immutables are constant values, too.
@redstar
Copy link
Member

redstar commented Nov 14, 2013

Fixed with commit 2063b4e.

@redstar redstar closed this as completed Nov 14, 2013
@MartinNowak
Copy link
Contributor Author

Thanks

redstar pushed a commit that referenced this issue Sep 27, 2014
Supplemental fix for issue 10567
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants