[Issue 9315] New: ICE (expression.c:4249, StructLiteralExp::getField) Tupleof of nested struct literal
http://d.puremagic.com/issues/show_bug.cgi?id=9315 Summary: ICE (expression.c:4249, StructLiteralExp::getField) Tupleof of nested struct literal Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: ma...@maxim-fomin.ru --- Comment #0 from Maxim Fomin ma...@maxim-fomin.ru 2013-01-14 00:07:54 PST --- auto foo() { struct S { int i; void bar() { } } pragma(msg, S.init.tupleof[$-1]); } void main() { } dmd 2.061 (actually fresh from git head); dmd: expression.c:4249: Expression* StructLiteralExp::getField(Type*, unsigned int): Assertion `i elements-dim' failed. Aborted -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9315] ICE (expression.c:4249, StructLiteralExp::getField) Tupleof of nested struct literal
http://d.puremagic.com/issues/show_bug.cgi?id=9315 --- Comment #1 from Maxim Fomin ma...@maxim-fomin.ru 2013-01-14 00:10:26 PST --- Moving struct definition outside function does not result in crash. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9098] Error with ddoc: octal digit expected
http://d.puremagic.com/issues/show_bug.cgi?id=9098 --- Comment #4 from yebblies yebbl...@gmail.com 2013-01-14 20:01:19 EST --- (In reply to comment #3) (In reply to comment #2) Why on earth aren't the errors gagged while processing code samples? Because it allows us to catch bugs like these before the user has to face disappointment when he finds out the code doesn't compile. But it only catches lexical errors... -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9174] regression(2.057) ice(cast.c) with ternary operator and alias this
http://d.puremagic.com/issues/show_bug.cgi?id=9174 yebblies yebbl...@gmail.com changed: What|Removed |Added Keywords||ice, rejects-valid CC||yebbl...@gmail.com Platform|x86 |All Summary|[ICE](cast.c line 2463) |regression(2.057) |with ternary operator with |ice(cast.c) with ternary |mixed alias this types |operator and alias this OS/Version|Windows |All Severity|normal |regression --- Comment #1 from yebblies yebbl...@gmail.com 2013-01-14 21:24:51 EST --- No ice with 2.056. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9182] Forward reference error with static immutable struct members
http://d.puremagic.com/issues/show_bug.cgi?id=9182 yebblies yebbl...@gmail.com changed: What|Removed |Added CC||yebbl...@gmail.com Platform|x86 |All Summary|[ICE](glue.c line 1235) |Forward reference error |With static struct fields |with static immutable ||struct members OS/Version|Windows |All --- Comment #1 from yebblies yebbl...@gmail.com 2013-01-14 21:35:29 EST --- With 2.062 head it doesn't ice. Now prints: testx.d(3): Error: forward reference of variable F or testx.d(4): Error: variable testx.Foo.foos3 had semantic errors when compiling If you move the lines around. I suspect this is a dupe of one of the other forward reference bugs. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9316] New: Version string should be generated from a git tag
http://d.puremagic.com/issues/show_bug.cgi?id=9316 Summary: Version string should be generated from a git tag Product: D Version: D1 D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: leandro.lucare...@sociomantic.com --- Comment #0 from Leandro Lucarella leandro.lucare...@sociomantic.com 2013-01-14 02:47:31 PST --- Instead of having to change the version number manually, it would be better to generate the version number from the git tag. For that there is a very handy command called 'describe'. git describe for a commit that have a tag pointing to it, returns the tag name. What's also nice about it is if there isn't the command prints tag-n-hash, where is the name of the last tag found, n is the number of commits on top of it and hash is the current hash. This can make very easy to detect if a compiler is a real release or a development snapshot and would make easier to report bugs for betas, since you can tell exactly which snapshot you're using. I will also suggest using the --dirty option to tell if the working copy was dirty (with uncommitted changes) too. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9316] Version string should be generated from a git tag
http://d.puremagic.com/issues/show_bug.cgi?id=9316 --- Comment #1 from Leandro Lucarella leandro.lucare...@sociomantic.com 2013-01-14 02:54:05 PST --- Just for reference, this was triggered by https://github.com/D-Programming-Language/dmd/pull/1469 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9200] Wrong SIMD code generated
http://d.puremagic.com/issues/show_bug.cgi?id=9200 yebblies yebbl...@gmail.com changed: What|Removed |Added Keywords||wrong-code CC||yebbl...@gmail.com Severity|major |critical --- Comment #5 from yebblies yebbl...@gmail.com 2013-01-14 22:08:27 EST --- (In reply to comment #4) MOVUPD is terribly slow. Terribly slow is still much better than wrong-code. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9209] ice(symbol.c) with const struct heap allocation
http://d.puremagic.com/issues/show_bug.cgi?id=9209 yebblies yebbl...@gmail.com changed: What|Removed |Added Keywords||ice CC||yebbl...@gmail.com Summary|[ICE](symbol.c line 1025) |ice(symbol.c) with const |with const struct heap |struct heap allocation |allocation | Severity|normal |critical --- Comment #1 from yebblies yebbl...@gmail.com 2013-01-14 22:18:20 EST --- Does not need templates: struct Foo { int x; } void bar(const Foo*) {} void main () { const f = new Foo(1); bar(f); } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9219] Allow matching { } in asm statements
http://d.puremagic.com/issues/show_bug.cgi?id=9219 yebblies yebbl...@gmail.com changed: What|Removed |Added CC||yebbl...@gmail.com --- Comment #1 from yebblies yebbl...@gmail.com 2013-01-14 22:26:56 EST --- https://github.com/D-Programming-Language/dmd/pull/641 https://github.com/D-Programming-Language/dmd/commit/48157cb615c973220923183f073dcb4945428a75 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9240] (Regression: 2.058) non-const does not implicitly convert to const
http://d.puremagic.com/issues/show_bug.cgi?id=9240 yebblies yebbl...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED CC||yebbl...@gmail.com Resolution||INVALID --- Comment #2 from yebblies yebbl...@gmail.com 2013-01-14 22:33:33 EST --- This is not a bug. See the examples in issue 4251 for how allowing this would break const. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9241] 2.061: Property call error message disappeared
http://d.puremagic.com/issues/show_bug.cgi?id=9241 yebblies yebbl...@gmail.com changed: What|Removed |Added CC||yebbl...@gmail.com --- Comment #1 from yebblies yebbl...@gmail.com 2013-01-14 22:35:27 EST --- I get: DMD v2.062 DEBUG testx.d(6): Error: cannot implicitly convert expression (splitLines(s, cast(Keep Terminator)false)) of type string[] to string Fixed? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9244] union containing pointers not allowed
http://d.puremagic.com/issues/show_bug.cgi?id=9244 yebblies yebbl...@gmail.com changed: What|Removed |Added Keywords||rejects-valid CC||yebbl...@gmail.com Platform|x86 |All OS/Version|Windows |All Severity|normal |regression --- Comment #2 from yebblies yebbl...@gmail.com 2013-01-14 22:49:46 EST --- Reduced: void main() { union U { int i; @safe int x() { return i; } } } Because U has a function in it, dmd incorrectly decides it is a nested union and (even worse) inserts a void* member. A regression because: - @safe code didn't always disallow unions with pointers - wrapping x in an attribute such as @safe used to make the compiler infer U as non-nested Workaround: make U static -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9262] compilation of erroneous source files causes segfault
http://d.puremagic.com/issues/show_bug.cgi?id=9262 yebblies yebbl...@gmail.com changed: What|Removed |Added CC||yebbl...@gmail.com --- Comment #1 from yebblies yebbl...@gmail.com 2013-01-14 23:28:39 EST --- Unfortunately without a test case this will never get fixed. It might be worth using dustmite to find a smaller test case. https://github.com/CyberShadow/DustMite/wiki -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8695] ParameterStorageClassTuple doesn't recognize 'in' parameters
http://d.puremagic.com/issues/show_bug.cgi?id=8695 Mihail Strashun m.stras...@gmail.com changed: What|Removed |Added CC||m.stras...@gmail.com --- Comment #1 from Mihail Strashun m.stras...@gmail.com 2013-01-14 04:56:39 PST --- Somewhat similar, but for inout: - import std.traits; inout int func(inout int param) { return param; } void main() { alias stcs = ParameterStorageClassTuple!(typeof(func)); pragma(msg, stcs); } - /usr/local/include/dmd2/std/traits.d(97): Error: key 'g' not found in associative array ['a':cast(FunctionAttribute)1u,'b':cast(FunctionAttribute)2u,'c':cast(FunctionAttribute)4u,'d':cast(FunctionAttribute)8u,'e':cast(FunctionAttribute)16u,'f':cast(FunctionAttribute)32u] /usr/local/include/dmd2/std/traits.d(458): called from here: demangleFunctionAttributes(NgiZic) /usr/local/include/dmd2/std/traits.d(97): Error: key 'g' not found in associative array ['a':cast(FunctionAttribute)1u,'b':cast(FunctionAttribute)2u,'c':cast(FunctionAttribute)4u,'d':cast(FunctionAttribute)8u,'e':cast(FunctionAttribute)16u,'f':cast(FunctionAttribute)32u] /usr/local/include/dmd2/std/traits.d(458): called from here: demangleFunctionAttributes(NgiZic) /home/c565/c253.d(10): Error: template instance std.traits.ParameterStorageClassTuple!(inout int(inout(int) param)) error instantiating demangleNextParameter!(demangleFunctionAttributes(NgiZic).rest) - -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8695] ParameterStorageClassTuple doesn't recognize 'in' parameters
http://d.puremagic.com/issues/show_bug.cgi?id=8695 --- Comment #2 from Mihail Strashun m.stras...@gmail.com 2013-01-14 05:11:11 PST --- Hm, after some inspection it is not that related, I'll probably make a separate bugzilla entry after scratching a fix. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9303] ICE: (1235 in file 'glue.c') with property switch
http://d.puremagic.com/issues/show_bug.cgi?id=9303 yebblies yebbl...@gmail.com changed: What|Removed |Added CC||yebbl...@gmail.com --- Comment #2 from yebblies yebbl...@gmail.com 2013-01-15 00:38:51 EST --- Doesn't happen for me win32+2.062 DMD v2.062 DEBUG testx.d(11): Error: mixin testx.main.T!() error instantiating -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9317] ParameterStorageClassTuple reports errors for inout function
http://d.puremagic.com/issues/show_bug.cgi?id=9317 Dicebot m.stras...@gmail.com changed: What|Removed |Added CC||m.stras...@gmail.com --- Comment #1 from Dicebot m.stras...@gmail.com 2013-01-14 06:51:04 PST --- Quick investigation: this is actually more related to demangleXXX family of functions in std.traits Their type system awareness seems a bit out of date :) -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8695] ParameterStorageClassTuple doesn't recognize 'in' parameters
http://d.puremagic.com/issues/show_bug.cgi?id=8695 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Component|Phobos |DMD --- Comment #3 from Kenji Hara k.hara...@gmail.com 2013-01-14 06:53:14 PST --- Comment#0 is a compiler issue. In current, dmd converts 'in' storage class to 'const', not 'const scpope'. But, I'm not sure which is correct, a wrong spec issue or compiler implementation bug. Comment #1 is a Phobos issue. ParameterStorageClassTuple and functionAttributes uses a private utility demangleFunctionAttributes, but it does not recognize inout function. For the latter, I opened a separate bug 9317. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9317] ParameterStorageClassTuple reports errors for inout function
http://d.puremagic.com/issues/show_bug.cgi?id=9317 --- Comment #2 from Kenji Hara k.hara...@gmail.com 2013-01-14 07:02:54 PST --- (In reply to comment #1) Quick investigation: this is actually more related to demangleXXX family of functions in std.traits Their type system awareness seems a bit out of date :) As far as I see, demangleParameterStorageClass has no problem. In current, the set of valid parameter storage classes is (scope, out ref, lazy). And `inout` is always treated as a type qualifier, so is not contained the set. On the other hand, demangleFunctionAttributes has the problem that just reported here. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9317] ParameterStorageClassTuple reports errors for inout function
http://d.puremagic.com/issues/show_bug.cgi?id=9317 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Keywords||pull --- Comment #3 from Kenji Hara k.hara...@gmail.com 2013-01-14 07:08:45 PST --- https://github.com/D-Programming-Language/phobos/pull/1073 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9317] ParameterStorageClassTuple reports errors for inout function
http://d.puremagic.com/issues/show_bug.cgi?id=9317 --- Comment #4 from Dicebot m.stras...@gmail.com 2013-01-14 07:18:17 PST --- (In reply to comment #2) In current, the set of valid parameter storage classes is (scope, out ref, lazy). And `inout` is always treated as a type qualifier, so is not contained the set. Is there any single place on dlang.org or in TDPL where this can be read? I am struggling to find proper classification of D type system since the very start of work on fullyQualifiedTypeName. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8695] ParameterStorageClassTuple doesn't recognize 'in' parameters
http://d.puremagic.com/issues/show_bug.cgi?id=8695 --- Comment #4 from Andrej Mitrovic andrej.mitrov...@gmail.com 2013-01-14 07:34:33 PST --- (In reply to comment #3) Comment#0 is a compiler issue. In current, dmd converts 'in' storage class to 'const', not 'const scpope'. But, I'm not sure which is correct, a wrong spec issue or compiler implementation bug. The spec page had not had 'in' documented for a long time, and we've discussed it many times where we said 'in' was 'const scope'. It's a compiler bug. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9241] 2.061: Property call error message disappeared
http://d.puremagic.com/issues/show_bug.cgi?id=9241 --- Comment #2 from Andrej Mitrovic andrej.mitrov...@gmail.com 2013-01-14 07:39:20 PST --- (In reply to comment #1) I get: DMD v2.062 DEBUG testx.d(6): Error: cannot implicitly convert expression (splitLines(s, cast(Keep Terminator)false)) of type string[] to string Fixed? I forgot to mention -property is required. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9317] ParameterStorageClassTuple reports errors for inout function
http://d.puremagic.com/issues/show_bug.cgi?id=9317 --- Comment #5 from Kenji Hara k.hara...@gmail.com 2013-01-14 07:35:48 PST --- (In reply to comment #4) (In reply to comment #2) In current, the set of valid parameter storage classes is (scope, out ref, lazy). And `inout` is always treated as a type qualifier, so is not contained the set. Is there any single place on dlang.org or in TDPL where this can be read? I am struggling to find proper classification of D type system since the very start of work on fullyQualifiedTypeName. Mostly complete thing is here. http://dlang.org/function#parameters - const, immutable, share, and inout implicitly qualify the parameter type. That means, foo(const T param) is implicitly translated to foo(const(T) param). After that, they will not remain as actual 'storage class'. - The description 'in'equivalent to 'const scope' is not correct. With current compiler implementation, 'in' is just treated as 'const'. So it's treated as a part of type, and will not remain as actual 'storage class' - Remaining four, 'ref', 'scope', 'lazy', and 'out' will have actual meanings as 'storage class'. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9240] (Regression: 2.058) non-const does not implicitly convert to const
http://d.puremagic.com/issues/show_bug.cgi?id=9240 --- Comment #3 from Andrej Mitrovic andrej.mitrov...@gmail.com 2013-01-14 07:43:19 PST --- (In reply to comment #2) This is not a bug. See the examples in issue 4251 for how allowing this would break const. Exact comment which explains this: http://d.puremagic.com/issues/show_bug.cgi?id=4251#c9 I think this could go to the spec as a small note. It was brought up on IRC by someone converting some C++ code to D, and at first sight it seemed like a rejects-valid. A few of us agreed and I filed it, but comment #9 above explains the problem perfectly. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9315] ICE (expression.c:4249, StructLiteralExp::getField) Tupleof of nested struct literal
http://d.puremagic.com/issues/show_bug.cgi?id=9315 --- Comment #3 from Maxim Fomin ma...@maxim-fomin.ru 2013-01-14 07:42:16 PST --- (In reply to comment #2) I get: DMD v2.062 DEBUG Assertion failure: 'index dim' on line 318 in file 'root\root.h' I updated my dmd to today version, and still receive original message. It happens on linux 64 bit. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8695] ParameterStorageClassTuple doesn't recognize 'in' parameters
http://d.puremagic.com/issues/show_bug.cgi?id=8695 --- Comment #5 from Kenji Hara k.hara...@gmail.com 2013-01-14 07:47:03 PST --- (In reply to comment #4) (In reply to comment #3) Comment#0 is a compiler issue. In current, dmd converts 'in' storage class to 'const', not 'const scpope'. But, I'm not sure which is correct, a wrong spec issue or compiler implementation bug. The spec page had not had 'in' documented for a long time, and we've discussed it many times where we said 'in' was 'const scope'. It's a compiler bug. Even if it is correct, 'scope' storage class had not been discussed enough and its semantics had not been defined deeply. In recent Walter says about 'scope': nobody has gotten around to it. https://github.com/D-Programming-Language/phobos/commit/ef0bed7d157afe5be5a69e17d5f30ffd309be527#commitcomment-2352989 So it seems to me that is yet not _defined_. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8695] ParameterStorageClassTuple doesn't recognize 'in' parameters
http://d.puremagic.com/issues/show_bug.cgi?id=8695 --- Comment #6 from Andrej Mitrovic andrej.mitrov...@gmail.com 2013-01-14 07:52:49 PST --- (In reply to comment #5) In recent Walter says about 'scope': nobody has gotten around to it. https://github.com/D-Programming-Language/phobos/commit/ef0bed7d157afe5be5a69e17d5f30ffd309be527#commitcomment-2352989 So it seems to me that is yet not _defined_. So basically it was a no-op all this time. We've been telling newcomers to D that 'in' means 'const scope' for the longest time. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9303] ICE: (1235 in file 'glue.c') with property switch
http://d.puremagic.com/issues/show_bug.cgi?id=9303 --- Comment #3 from Andrej Mitrovic andrej.mitrov...@gmail.com 2013-01-14 07:55:30 PST --- (In reply to comment #2) Doesn't happen for me win32+2.062 DMD v2.062 DEBUG testx.d(11): Error: mixin testx.main.T!() error instantiating commit 67ca915e3d89db564217bd6452de6c6799c01f6c $ dmd -property test.d DMD v2.062 DEBUG ty = 35, '_error_' And a dialog box: --- dmd.exe - Application Error --- The instruction at 0x004024ce referenced memory at 0x. The memory could not be written. Stack trace: 0012f518 004d1fef DMD!halt+0x5(...) 0012f58c 004da582 DMD!Type::totym()+0x38f(...) 0012f5b0 004d981e DMD!IntegerExp::toElem(IRState*)+0x1e 0012f5dc 004d568d DMD!Expression::toElemDtor(IRState*)+0x2f 0012f65c 004d57ea DMD!ReturnStatement::toIR(IRState*)+0x1e3 0012f688 004d1843 DMD!CompoundStatement::toIR(IRState*)+0x71 0012f884 004d1b86 DMD!FuncDeclaration::toObjFile(int )+0xd62 0012fa80 004d057d DMD!FuncDeclaration::toObjFile(int )+0x10a5 0012fb2c 004050b1 DMD!Module::genobjfile(int )+0x28f 0012ff44 0040546b DMD!tryMain+0x2ba2 0012ff80 005651f5 DMD!main+0x43 0012ffc0 7c817067 DMD!mainCRTStartup+0xa9 0012fff0 0x7c817067 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9318] New: stack overflow if struct have alias this to this.init and has function, in which compare itself with init
http://d.puremagic.com/issues/show_bug.cgi?id=9318 Summary: stack overflow if struct have alias this to this.init and has function,in which compare itself with init Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: zh...@list.ru --- Comment #0 from Zhenya Chapovsky zh...@list.ru 2013-01-14 07:57:29 PST --- import std.stdio; struct Bar { bool checkState() { return this == Bar.init;//if comment it all right } static @property Bar m_init() { return Bar.init; } alias m_init this; } void main() { } This fails to compile with message Stack overflow -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9319] New: Unexpected compiles __traits behaviour in a certain situation
http://d.puremagic.com/issues/show_bug.cgi?id=9319 Summary: Unexpected compiles __traits behaviour in a certain situation Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: critical Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: pun...@coverify.org --- Comment #0 from Puneet Goel pun...@coverify.org 2013-01-14 11:12:38 PST --- static if on the line number 3 should take the else branch, but it does not and compilation actually fails on line number 6, giving me error: Error: this for foo needs to be type Derived not type Base BTW, it is failing for nested (inside base class) template, but seems to work fine for function template (line 16). class Base { // 1 template Bar(alias F) { // 2 static if(__traits(compiles, F())) { // 3 pragma(msg, F.stringof ~ compiles here); // prints this // 4 class Bar { // 5 this() { F(); } // but actual compilation fails // 6 } // 7 } else { // 8 pragma(msg, F.stringof ~ does not compile); // 9 class Bar { // 10 this() { }// 11 } // 12 } // 13 } // 14 // 15 public void bar(alias F)() {// 16 static if(__traits(compiles, F())) { // works as expected // 17 F();// 18 } // 19 } // 20 } // 21 // 22 class Derived: Base { // 23 public void foo() {}// 24 public Bar!foo boo; // 25 public void frop() {// 26 bar!foo; // 27 boo = new Bar!foo;// 28 } // 29 } // 30 // 31 void main() { // 32 auto obj = new Derived; // 33 obj.frop(); // 34 } // 35 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9195] Should not be able to index a pointer in safed
http://d.puremagic.com/issues/show_bug.cgi?id=9195 --- Comment #7 from github-bugzi...@puremagic.com 2013-01-14 11:49:06 PST --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/580eb165d141848658ea71ac6cba54e3023d98a8 Fix Issue 9195 - Should not be able to index a pointer in safed This prevents indexing a pointer in @safe code unless the index is known at compile time to be zero. https://github.com/D-Programming-Language/dmd/commit/e97e886c7a092a279bf72b1ad5e6fb63dc81b82e Merge pull request #1482 from yebblies/issue9195 Issue 9195 - Should not be able to index a pointer in safed -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9305] Ugly Ddoc for default template lambda expressions
http://d.puremagic.com/issues/show_bug.cgi?id=9305 --- Comment #2 from github-bugzi...@puremagic.com 2013-01-14 11:52:01 PST --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/2d6db80aa890f23644676dc023842b3c849082a7 fix Issue 9305 - Ugly Ddoc for default template lambda expressions https://github.com/D-Programming-Language/dmd/commit/67ffded7e2635148347cdf312b878277501121be Merge pull request #1481 from 9rnsr/fix9305 Issue 9305 - Ugly Ddoc for default template lambda expressions -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9305] Ugly Ddoc for default template lambda expressions
http://d.puremagic.com/issues/show_bug.cgi?id=9305 Walter Bright bugzi...@digitalmars.com changed: What|Removed |Added Status|NEW |RESOLVED CC||bugzi...@digitalmars.com Resolution||FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 648] DDoc: unable to document mixin statement
http://d.puremagic.com/issues/show_bug.cgi?id=648 --- Comment #9 from github-bugzi...@puremagic.com 2013-01-14 11:56:55 PST --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/a671cb3480d68201e868adf5f103fff95574a597 Fixes Issue 648 - Expand template mixins in ddoc. https://github.com/D-Programming-Language/dmd/commit/33c36716ed97b67e454815565c6f21f41af51983 Merge pull request #1480 from AndrejMitrovic/Fix648 Issue 648 - Expand template mixins in ddoc -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 2420] string mixins are not considered in ddoc
http://d.puremagic.com/issues/show_bug.cgi?id=2420 Walter Bright bugzi...@digitalmars.com changed: What|Removed |Added Version|1.033 |D1 D2 OS/Version|Other |All Severity|minor |enhancement -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 648] DDoc: unable to document mixin statement
http://d.puremagic.com/issues/show_bug.cgi?id=648 --- Comment #10 from github-bugzi...@puremagic.com 2013-01-14 12:33:10 PST --- Commit pushed to dmd-1.x at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/00bc154aa5bbe3bbad72906edbfa6ab8caf0fc6a fix Issue 648 - DDoc: unable to document mixin statement -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9195] Should not be able to index a pointer in safed
http://d.puremagic.com/issues/show_bug.cgi?id=9195 Walter Bright bugzi...@digitalmars.com changed: What|Removed |Added Status|NEW |RESOLVED CC||bugzi...@digitalmars.com Resolution||FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9200] Wrong SIMD code generated
http://d.puremagic.com/issues/show_bug.cgi?id=9200 Walter Bright bugzi...@digitalmars.com changed: What|Removed |Added Keywords||SIMD Status|NEW |RESOLVED Platform|x86_64 |All Resolution||FIXED OS/Version|Linux |All --- Comment #6 from Walter Bright bugzi...@digitalmars.com 2013-01-14 12:44:51 PST --- Fixed here: https://github.com/D-Programming-Language/dmd/commit/c33809cc201b4697b384209eb3a7a623e8e871e9#src/backend/cod3.c -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9253] Review Phobos algorithms and make them transient-safe where possible
http://d.puremagic.com/issues/show_bug.cgi?id=9253 --- Comment #2 from monarchdo...@gmail.com 2013-01-14 13:30:18 PST --- (In reply to comment #0) This bug is to have a central place to keep the list of Phobos algorithms found to be transient-incompatible but could potentially be made transient-compatible, so that the list doesn't get lost in the dust of forum history. - std.algorithm.reduce (when no seed is given) - std.algorithm.joiner (both variants have been fixed in git HEAD) - std.algorithm.group - std.algorithm.minCount - std.algorithm.minPos (takes forward range; should use .save) - std.algorithm.Levenshtein (takes forward range; should use .save) - std.algorithm.makeIndex (takes forward range; should use .save) - std.algorithm.splitter (takes slices without checking for isSlicable) - std.algorithm.topNCopy - std.algorithm.NWayUnion - std.array.array (probably not fixable) - std.array.insertInPlace (probably not fixable) - std.array.join (copies input range; may not be fixable) - std.stdio.writeln friends (need more testing, there are some deep bits that fail with transient ranges) While the whole transience issue hasn't been decided yet, Andrei has agreed that those algorithms that *can* be made transience-compatible, should be. The fate of the rest will be determined when this issue has been decided on. I just fixed minPos to use safe, and it should now be transient safe. No unittest though (yet) to prevent future breakage. I'm fixing minCount: It will be transient safe for forward ranges. Input ranges will the thoroughly unsafe though, with no possibility of workaround. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 648] DDoc: unable to document mixin statement
http://d.puremagic.com/issues/show_bug.cgi?id=648 Walter Bright bugzi...@digitalmars.com changed: What|Removed |Added Status|NEW |RESOLVED CC||bugzi...@digitalmars.com Resolution||FIXED --- Comment #11 from Walter Bright bugzi...@digitalmars.com 2013-01-14 13:44:12 PST --- The string mixin issue isn't fixed, but that is issue 2420. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 648] DDoc: unable to document mixin statement
http://d.puremagic.com/issues/show_bug.cgi?id=648 Andrej Mitrovic andrej.mitrov...@gmail.com changed: What|Removed |Added Status|RESOLVED|REOPENED Resolution|FIXED | --- Comment #12 from Andrej Mitrovic andrej.mitrov...@gmail.com 2013-01-14 13:47:36 PST --- It's not fixed. The revert should have been done in full because of the uncaught bug, instead you created your own fixup of my pull and now master is failing: http://d.puremagic.com/test-results/ You should revert everything and allow me to work on the fix again. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 648] DDoc: unable to document mixin statement
http://d.puremagic.com/issues/show_bug.cgi?id=648 --- Comment #13 from Walter Bright bugzi...@digitalmars.com 2013-01-14 14:09:56 PST --- reverted. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9320] New: Non-POD status of a struct correlated to bad inlining.
http://d.puremagic.com/issues/show_bug.cgi?id=9320 Summary: Non-POD status of a struct correlated to bad inlining. Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: dran...@gmail.com --- Comment #0 from Nicolas Sicard dran...@gmail.com 2013-01-14 14:08:34 PST --- This codes defines a struct that is just a wrapper around a real x, with binary operators. --- struct Foo { real x; version(Constructor) { this(real x) { this.x = x; } } Foo opBinary(string op)(Foo other) { return Foo(mixin(x ~ op ~ other.x)); } } version(Constructor) static assert(!__traits(isPOD, Foo)); else static assert(__traits(isPOD, Foo)); Foo test(Foo a, Foo b, Foo c) { return (a + b) / (a * b) - c; } void main() {} --- When compiled with -O -inline -release, the object code for the test function is: --- pushRBP movRBP,RSP subRSP,010h fldtbyte ptr 030h[RBP] fldtbyte ptr 020h[RBP] faddpST(1),ST fldtbyte ptr 030h[RBP] fldtbyte ptr 020h[RBP] fmulpST(1),ST fdivpST(1),ST fldtbyte ptr 010h[RBP] fsubpST(1),ST fstptbyte ptr [RDI] movword ptr 0Ah[RDI],0 movdword ptr 0Ch[RDI],0 movRAX,RDI movRSP,RBP popRBP ret --- When compiled with the same flags, but with -version=Constructor, I benchmarked the code as 5x slower (no data here) and the object code becomes: --- pushRBP movRBP,RSP subRSP,0D0h mov-010h[RBP],RDI leaRSI,020h[RBP] leaRDI,-0A0h[RBP] movsd movsd movRSI,[00h][RIP] leaRDI,-090h[RBP] movsd movsd fldtbyte ptr 030h[RBP] fldtbyte ptr -0A0h[RBP] faddpST(1),ST fstptbyte ptr -090h[RBP] movword ptr -086h[RBP],0 movdword ptr -084h[RBP],0 leaRSI,-090h[RBP] leaRDI,-0B0h[RBP] movsd movsd leaRSI,020h[RBP] leaRDI,-060h[RBP] movsd movsd movRSI,[00h][RIP] leaRDI,-050h[RBP] movsd movsd fldtbyte ptr 030h[RBP] fldtbyte ptr -060h[RBP] fmulpST(1),ST fstptbyte ptr -050h[RBP] movword ptr -046h[RBP],0 movdword ptr -044h[RBP],0 leaRSI,-050h[RBP] leaRDI,-070h[RBP] movsd movsd leaRSI,-070h[RBP] leaRDI,-080h[RBP] movsd movsd movRSI,[00h][RIP] leaRDI,-040h[RBP] movsd movsd fldtbyte ptr -0B0h[RBP] fldtbyte ptr -080h[RBP] fdivpST(1),ST fstptbyte ptr -040h[RBP] movword ptr -036h[RBP],0 movdword ptr -034h[RBP],0 leaRSI,-040h[RBP] leaRDI,-0C0h[RBP] movsd movsd leaRSI,010h[RBP] leaRDI,-030h[RBP] movsd movsd movRSI,[00h][RIP] leaRDI,-020h[RBP] movsd movsd fldtbyte ptr -0C0h[RBP] fldtbyte ptr -030h[RBP] fsubpST(1),ST fstptbyte ptr -020h[RBP] movword ptr -016h[RBP],0 movdword ptr -014h[RBP],0 leaRSI,-020h[RBP] leaRDI,-0D0h[RBP] movsd movsd leaRSI,-0D0h[RBP] movRDI,-010h[RBP] movsd movsd movRAX,-010h[RBP] movRSP,RBP popRBP ret --- D2.061, OSX 10.8.2 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9253] Review Phobos algorithms and make them transient-safe where possible
http://d.puremagic.com/issues/show_bug.cgi?id=9253 --- Comment #3 from hst...@quickfur.ath.cx 2013-01-14 21:44:56 PST --- Yeah, some algorithms will have to be transient-unsafe, because it will either introduce unacceptable overhead, or it's plain impossible due to the nature of the algorithm. These cases will just have to be left as-is. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 648] DDoc: unable to document mixin statement
http://d.puremagic.com/issues/show_bug.cgi?id=648 Jacob Carlborg d...@me.com changed: What|Removed |Added CC||d...@me.com --- Comment #14 from Jacob Carlborg d...@me.com 2013-01-14 23:27:29 PST --- I think this would be useful to have. For example: /// doc class Foo { /// doc mixin Singleton; } In this case you might want that the singleton should be documented and part of the public API. It would be a good idea to know that Foo is a singleton. Another example: /// doc class Bar { /// doc mixin Property!(int, x); } The mixin would expand to something like: private int x_; @property int x () { return x_; } @property int x (int value) { return x_ = value; } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---