www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.ldc - Illegal Instruction

reply Russel Winder <russel winder.org.uk> writes:
Using the LDC2 compiler up to date on Debian Sid:

LDC - the LLVM D compiler (1.4.0):
  based on DMD v2.074.1 and LLVM 5.0.0
  built with LDC - the LLVM D compiler (0.17.5)
  Default target: x86_64-pc-linux-gnu

in debug mode I get a program that runs (albeit the thread messaging
fails to work), whereas if I use release mode I get an Illegal
Instruction. I am guessing this is an LDC2 problem?


PS I can't use DMD just now to compare against as it fails to link to
my build of GtkD for no reason I can ascertain. I'm still working on
it.

--=20
Russel.
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
Dr Russel Winder      t: +44 20 7585 2200
41 Buckmaster Road    m: +44 7770 465 077
London SW11 1EN, UK   w: www.russel.org.uk
Nov 07
parent reply Johan Engelen <j j.nl> writes:
On Tuesday, 7 November 2017 at 16:03:09 UTC, Russel Winder wrote:
 Using the LDC2 compiler up to date on Debian Sid:

 LDC - the LLVM D compiler (1.4.0):
   based on DMD v2.074.1 and LLVM 5.0.0
   built with LDC - the LLVM D compiler (0.17.5)
   Default target: x86_64-pc-linux-gnu

 in debug mode I get a program that runs (albeit the thread 
 messaging fails to work), whereas if I use release mode I get 
 an Illegal Instruction. I am guessing this is an LDC2 problem?
Could be caused by several things. For example, perhaps the code is doing something technically invalid (UB) and the optimizer is making use of that (or are you not turning on optimizations?). In any case, dustmite [1] it to a testcase and report it in our bug tracker. cheers, Johan [1] https://github.com/CyberShadow/DustMite/wiki
Nov 07
parent Johan Engelen <j j.nl> writes:
On Tuesday, 7 November 2017 at 17:05:28 UTC, Johan Engelen wrote:
 On Tuesday, 7 November 2017 at 16:03:09 UTC, Russel Winder 
 wrote:
 ...
...
Oh, didn't see the other forum thread. Continue discussion here: http://forum.dlang.org/post/mailman.37.1510074380.9493.digitalmars-d-ldc puremagic.com
Nov 07