Hi Matt,
Couple of bad things i’ve experienced with the GDC compilers for the D language when I try cross-compiling to ARM Aarch64 asm output.
1. when I try to compile a long-ish D source file with GDC -O2 -release to get Aarch64 asm, the compiler explorer reports something like "time exceeded 15s; killed". I can get it to work without the heavy optimisation of -O2, but then that defeats my aim as I want to see how good GDC can be at its best and I’m learning ARM64 asm too.
2. Some of the other three Aarch64 compiler options listed in the compiler explorer pull-down list under Aarch64 cause compilation to fail with various weird errors. I tried them until I picked the one that worked. It looks as if some of those GDC installations were broken - perhaps theif D runtime library is bad, or the D equivalent of header files are nasty somehow.
best,
Cecil Ward
Absolutely, clearly you can’t hang the server up forever agreed.The problem of "how long do you give it" is getting worse too, with CTFE being something that D promotes as a sexy feature. Now I come to think of it, my particular D program CTFE-compiles a function that generates a small static table at compile time. Now one could even CTFE-compile an infinite loop by accident, and screw the compiler’s innards, and this kind of danger only moves the ‘halting problem’ back into the compiler instead of the program.
Perhaps compilers themselves need to generate some kind of intelligent watchdog-defeat events internally while they are CTFE-compiling. Not at all sure how that would work, it’s a hard problem to output ‘genuine percentage (of real work) done‘ in a way where just going round an infinite loop longer doesn’t look like more great progress towards some goal. One could extend a time limit kill duration by tickling it to extend it as proof of new work achieved comes out, so for example, each new function’s code that is generated, and each CTFE result that is successfully returned could buy you so much more time. I’m sure someone will have done some relevant work in areas that could help here.In the end, I managed to get GDC to work outputting Aarch64 code with the desired-O2 -freleaseIt seems there was some badness in the parameters appended to the long URL that I had bookmarked, and the web UI wouldn’t appear properly for some unknown reason. So I stripped all the junk of the end and went back up to the top of the site explore.dgnu.org again and all was then well. I uploaded the D source code into the source window with paste-copy; probably is an intelligent way to do this but I couldn’t seem to get it to work on an ipad.This is the short URL which I got when I did a Share: https://explore.dgnu.org/z/ciqaNT
Thanks for your help and of course your continued good work. I’ve learned a lot about the spectacular capabilities of modern compilers’ backends now. Code generation is sparkling now compared to the simple efforts I used to see at work 35 years ago.Best,Cecil Ward