-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
New "access to undefined reference" (from optimization?) #6599
Comments
Can you run |
We have a winner (with a suitably suspicious commit message):
@vtjnash :o) [Full disclosure - this is the first time I have used git bisect, so I could have screwed up, but it seemed simple enough. Also, I'm thinking maybe the problem is deeper and that patch only exposes it by restricting an optimization that hides the issue?] |
the problem is related to #6566 (comment) |
the different examples are just triggering different inlining thresholds, the first example manages to hit a sweet-spot the problem is that the inliner considers |
that seems like a reasonable explanation and solution. i've worked around this in my own code (they are now immutable) so there's no pressure from me, but the idea that Julia is quietly duplicating mutable instances sounds a little worrying. |
Compiler bugs are indeed scary. But they can be fixed! |
See pull request #6605 |
I am getting an "access to undefined reference" in code that used to work, and that I believe is valid. It takes a very specific combination of details to trigger the problem, so I think it is related to optimization.
As far as I can tell from Travis (assuming they update 0.3 regularly) this behaviour started in the last day or two.
I believe this is valid code - undefined members of a type seem to be supported in general, as long as they are created before reading.
Note that much of the "mess" above is necessary in order to trigger this. Below I'll add some minimally modified versions that work to illustrate this:
The type parameterization is needed:
The default argument is needed:
The separate routine to set the value is needed:
Finally, the example to cut+paste:
The text was updated successfully, but these errors were encountered: