I've been using "gdc (GCC) 4.6.3 20120106 (gdc 0.31 - r748:ab99d67f04c2, dmd 2.057)"
as my only D compiler for the last months, and it's been doing great, almost everything
including LTO works. There have been a few ices/crashes, but mostly with invalid code
or looking front-end related (didn't want to report them until the 4.8 merge is done).
But still using that old compiler means working with a different language, so I finally
decided to try out the current GDC versions, and started with the 4.7 branch.
First difference that i noticed - the frontend version no longer shows up in '--version'
output - is there a way to retrieve it, preferably as a git hash?
Then the very first app that i tried to compile didn't - failed with an LTO related
error. I need LTO for that one, at least i used to with my old compiler.
Decided to try the head (4.8) based tree - with similar results; apparently LTO no
longer works at all, even for trivial 'void main(){}' programs. At least the error,
which appears to be the same, got a bit better reported on that branch [1].
One difference between my old working setup and the new ones is that the former is
not a multilib one; haven't tried a new build w/o multilibs yet.
Then I wanted to try to build some other programs using master, w/o LTO. Didn't
really work - the problem is that gcc-pragma-attributes are now /errors/. So I'd
have to modify the sources just to build with the newer compiler - which isn't a
big problem; the fact that I can't then easily go back to using an older one is.
I tried modifying some trivial sources, which were using only
'pragma(attribute, noinline)', but couldn't get them to work; the compiler keeps
complaining, 'cc1d: error: unknown attribute noinline'.
Is 'import gcc.attribute; @attribute("noinline") void f() {}' supposed to work?
[1]
$ gdc -flto main.d -o main
lto1: internal compiler error: in streamer_get_pickled_tree, at tree-streamer-in.c:1050
Please submit a full bug report,