www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - function core.checkedint.muls cannot inline function

reply Etranger <nonvalidemail nowhere.com> writes:
Hi,

I'm trying to use the module core.checkedint, but I have a 
problem and I don't know if it is a bug or me.

This simple program compiles well in debug mode with dmd, but 
give me an error when I compile in release mode: Error: function 
core.checkedint.muls cannot inline function

import core.checkedint;

void main()
{
   ulong a = 1;
   ulong b =2;
   bool ovf;
   muls(a, b, ovf);
}

PS: it compiles with ldc2

Thanks for your help !
Aug 02 2016
parent reply Steven Schveighoffer <schveiguy yahoo.com> writes:
On 8/2/16 2:09 PM, Etranger wrote:
 Hi,

 I'm trying to use the module core.checkedint, but I have a problem and I
 don't know if it is a bug or me.

 This simple program compiles well in debug mode with dmd, but give me an
 error when I compile in release mode: Error: function
 core.checkedint.muls cannot inline function

 import core.checkedint;

 void main()
 {
   ulong a = 1;
   ulong b =2;
   bool ovf;
   muls(a, b, ovf);
 }

 PS: it compiles with ldc2

 Thanks for your help !
Bug. Please file: https://issues.dlang.org mulu also cannot be inlined. I'm curious how it passes unit tests, since druntime is compiled in release/inline mode. -Steve
Aug 02 2016
parent Etranger <nonvalidemail nowhere.com> writes:
On Tuesday, 2 August 2016 at 18:32:42 UTC, Steven Schveighoffer 
wrote:
 On 8/2/16 2:09 PM, Etranger wrote:
 Hi,

 I'm trying to use the module core.checkedint, but I have a 
 problem and I
 don't know if it is a bug or me.

 This simple program compiles well in debug mode with dmd, but 
 give me an
 error when I compile in release mode: Error: function
 core.checkedint.muls cannot inline function

 import core.checkedint;

 void main()
 {
   ulong a = 1;
   ulong b =2;
   bool ovf;
   muls(a, b, ovf);
 }

 PS: it compiles with ldc2

 Thanks for your help !
Bug. Please file: https://issues.dlang.org mulu also cannot be inlined. I'm curious how it passes unit tests, since druntime is compiled in release/inline mode. -Steve
Thanks, I filed the bug https://issues.dlang.org/show_bug.cgi?id=16350
Aug 02 2016