D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 13703 - "Error 16: Index Range" reported incorrectly on windows
Summary: "Error 16: Index Range" reported incorrectly on windows
Status: RESOLVED INVALID
Alias: None
Product: D
Classification: Unclassified
Component: tools (show other issues)
Version: D2
Hardware: x86 Windows
: P1 blocker
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-11-09 15:56 UTC by forsaken
Modified: 2017-07-01 14:02 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description forsaken 2014-11-09 15:56:36 UTC
This project compiles fine on MacOSX.

On windows, I get the following error:

OPTLINK (R) for Win32  Release 8.00.15
Copyright (C) Digital Mars 1989-2013  All rights reserved.
http://www.digitalmars.com/ctg/optlink.html
obj\Debug\TestD.obj(TestD)  Offset 1E6ADH Record Type 009D 
 Error 16: Index Range 
--- errorlevel 1

I believe this is a bug in the linker.

The project(small) can be found here:
https://github.com/bitwise-github/D-Reflection/
Comment 1 forsaken 2014-11-09 15:59:19 UTC
Forgot the specs:

Xamarin Studio, DMD2, x86, on both sides

MacOSX Mavericks
Windows 8.1
Comment 2 forsaken 2014-11-22 03:55:54 UTC
After further testing, I found that commenting out all occurrences of the following line in 'reflection.d' of the cited project allows the code to compile:

// _parent = parent;

'parent' is passed from parent to child through a constructor while a hierarchy of objects is created at compile time.
Comment 3 forsaken 2014-11-27 01:09:52 UTC
code was updated with workarounds, and the bug is gone.

The last broken commit:
https://github.com/bitwise-github/D-Reflection/tree/593993af078d3b3758909cb070c98d0aaf9440bd
Comment 4 Vladimir Panteleev 2017-07-01 14:02:06 UTC
All links are dead, no test case, closing.

bitwise, if you are reading this and can still reproduce the bug, please create an archive with all source files and build script(s), attach it here, and reopen.