digitalmars.D.learn - Getting a compiler with '-inline'. Is this valid?
- Saurabh Das (33/33) Mar 11 2014 Hello,
- Saurabh Das (3/3) Mar 11 2014 The title should have read "Getting a compiler _error_ with
- John Colvin (3/36) Mar 11 2014 Internal compiler errors are always bugs. Please report it here:
- Saurabh Das (4/6) Mar 11 2014 Oh okay. Will surely do that.
- Steven Schveighoffer (5/12) Mar 11 2014 Make sure you add the tag "ice", which indicates it's a compiler crash. ...
Hello, Consider this simple file 'byLineError.d': import std.stdio; void main() { auto f = File("test"); f.byLine.popFront(); } When I compile: dmd byLineError.d --- succeeds dmd -inline byLineError.d --- fails with 'Internal error: backend/cod2.c 2200' Using dmd version "DMD64 D Compiler v2.065" on Linux. Am I doing something wrong, or is this a compiler bug? (Maybe f.byLine cannot be used in this manner?) Thanks, Saurabh PS: How I came across this: I was trying to scan a file but skip the first line, so I wrote: auto f = File("test"); f.byLine.popFront(); foreach(line; f.byLine) { writeln(line); } which gave the error. PPS: This one uses an intermediate variable and succeeds: void main() { auto f = File("test"); auto x = f.byLine; x.popFront(); }
Mar 11 2014
The title should have read "Getting a compiler _error_ with '-inline'. Is this valid?" :((
Mar 11 2014
On Tuesday, 11 March 2014 at 08:43:11 UTC, Saurabh Das wrote:Hello, Consider this simple file 'byLineError.d': import std.stdio; void main() { auto f = File("test"); f.byLine.popFront(); } When I compile: dmd byLineError.d --- succeeds dmd -inline byLineError.d --- fails with 'Internal error: backend/cod2.c 2200' Using dmd version "DMD64 D Compiler v2.065" on Linux. Am I doing something wrong, or is this a compiler bug? (Maybe f.byLine cannot be used in this manner?) Thanks, Saurabh PS: How I came across this: I was trying to scan a file but skip the first line, so I wrote: auto f = File("test"); f.byLine.popFront(); foreach(line; f.byLine) { writeln(line); } which gave the error. PPS: This one uses an intermediate variable and succeeds: void main() { auto f = File("test"); auto x = f.byLine; x.popFront(); }Internal compiler errors are always bugs. Please report it here: https://d.puremagic.com/issues/enter_bug.cgi?product=D
Mar 11 2014
On Tuesday, 11 March 2014 at 09:10:56 UTC, John Colvin wrote: <snip>Internal compiler errors are always bugs. Please report it here: https://d.puremagic.com/issues/enter_bug.cgi?product=DOh okay. Will surely do that. (Yay my first bug report ever!)
Mar 11 2014
On Tue, 11 Mar 2014 05:15:45 -0400, Saurabh Das <saurabh.das gmail.com> wrote:On Tuesday, 11 March 2014 at 09:10:56 UTC, John Colvin wrote: <snip>Make sure you add the tag "ice", which indicates it's a compiler crash. These get higher priority. -SteveInternal compiler errors are always bugs. Please report it here: https://d.puremagic.com/issues/enter_bug.cgi?product=DOh okay. Will surely do that. (Yay my first bug report ever!)
Mar 11 2014