Bug 15200 – [REG2.068.2] ICE(glue.c) when compiling with -inline

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2015-10-13T09:23:00Z
Last change time
2015-10-14T15:05:55Z
Keywords
ice, pull
Assigned to
nobody
Creator
jiki

Comments

Comment #0 by jiki — 2015-10-13T09:23:03Z
This code works with 2.068.1. But ICE with 2.068.2. dmd -c -inline test.d test.d: import func; void test() { f(); } func.d: import std.algorithm; auto f() // not void { sub([0], false); } void sub(R)(R list, bool b) { foreach (i; list.filter!(delegate(e)=>b) ) { } } OUTPUT: Assertion failure: '!v->csym' on line 1069 in file 'glue.c' NOTE: My actual project does not compile separately(-c), but the problem comes.
Comment #1 by k.hara.pg — 2015-10-13T15:05:23Z
Comment #2 by github-bugzilla — 2015-10-13T19:24:59Z
Commits pushed to stable at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/204df57a5ab578423dc655be6d4a2a733caa0362 fix Issue 15200 - ICE(glue.c) when compiling with -inline Even if a function is expanded by inlining, the function itself don't have to put in object file. In short, adjusting `ti.minst` in `inline.d` is not correct. The unspeculation in `expandInline` was added in the PR #4944, but sadly it was just a hack and inherently unneeded. The changes in `TemplateInstance.appendToModuleMember` and `needsCodegen` those were added since 2.068.1-b1, now correctly handle codegen of nested template instances. https://github.com/D-Programming-Language/dmd/commit/1e5d3b0427cc77199c1d03607256ff8518adf1e9 Merge pull request #5192 from 9rnsr/fix15200 [REG2.068.2] Issue 15200 - ICE(glue.c) when compiling with -inline
Comment #3 by github-bugzilla — 2015-10-14T15:05:55Z