On Saturday, 1 March 2014 at 11:46:03 UTC, Timo Sintonen wrote:
I checked my code and the library code and there is no other
call like this. I think there is one thing that makes this
function special: if I understand correct, this function will
not return. If there is some noreturn attribute somewhere this
function might be handled in a different way.
Is it so that gdc does not generate any assembly directly? So
this would be a bug in gcc side and I may report it there.
It's not marked as noreturn though, neither in C nor in the D
code.
The function can return if there is some kind of error
(http://refspecs.linuxfoundation.org/LSB_3.1.0/LSB-Core-S390/LSB-Core-S390/baselib--unwind-raiseexception.html)
Some google-fu shows that someone reported this bug here:
http://gcc.gnu.org/ml/gcc-help/2013-06/msg00091.html
https://sourceware.org/bugzilla/show_bug.cgi?id=15628
However, someone also had this problem on this german site:
http://www.mikrocontroller.net/topic/312956
and the solution was that -mcpu alone was not good enough, he had
to specify -march flags as well so please double-check your flags.
It's possible that binutils doesn't work properly with -mcpu so
I'd do this:
-march=armv7e-m -mcpu=cortex-m4 -mthumb -mtune=cortex-m4
Or better at configure time:
--with-arch=armv7e-m --with-cpu=cortex-m4 --with-mode=thumb
--with-tune=cortex-m4
Oh, and if that works: Please add a comment tu the bintuils issue
that specifying -march helps.