Issue 14840 - [2.068.0-b2] failure to inline functions with loops
Summary: [2.068.0-b2] failure to inline functions with loops
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P1 major
Assignee: No Owner
URL:
Keywords: performance
Depends on:
Blocks:
 
Reported: 2015-07-27 20:57 UTC by Daniel
Modified: 2017-02-20 18:22 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Daniel 2015-07-27 20:57:43 UTC
void Bug(uint val)
{
  pragma(inline, true);
  
  for(int i=0;i<2;++i) {}
}
void main()
{
  Bug(1); 
}

dmd -inline bug.d
bug.d(1): Error: function bug.Bug cannot inline function
Comment 1 Jack Stouffer 2017-02-20 18:22:40 UTC
This works in 2.073.0