December 24, 2004
Due to the inclusion of the Fortran 95 compiler (gfortran) in the current GCC CVS head I thought I'd take a stab at compiling gdc with GCC 4.0.  I'm not sure if anyone else has tried this but right off the bat it doesn't work.  Apart from some minor warning annoyances having to do with newly deprecated things it looks like many of the details of constructing the tree have changed.

The first warning is that there is no definition for a "nesting" type. In gcc 3.4.x struct nesting is declared in tree.h but in 4.0 there is no such declaration.

The second thing is that there is a large number of defines missing that are used by d-lang.cc.  Here is a partial list of the missing defines: V2SF_type_node, V2DF_type_node, V16SFmode, and so on.  Again, these are defined in tree.h in 3.4.x but are not defined anywhere meaningful in gcc 4.0.

I've started to look at the d backend code to figure out what I can do about figuring this out but its late, my patience is growing thin, and I have to get back to work on my thesis.  If someone can give me some pointers to where I can look to find the differences between the 3.4 and the 4.0 trees or even some more detail on how the gdc tree generator works I'll take a stab at this.

Gordon
December 26, 2004
Gordon James Miller wrote:

> The first warning is that there is no definition for a "nesting" type. In gcc 3.4.x struct nesting is declared in tree.h but in 4.0 there is no such declaration.
> 
> The second thing is that there is a large number of defines missing that are used by d-lang.cc.  Here is a partial list of the missing defines: V2SF_type_node, V2DF_type_node, V16SFmode, and so on.  Again, these are defined in tree.h in 3.4.x but are not defined anywhere meaningful in gcc 4.0.

These are due to the GIMPLE changes that has affected the backend
representation of the code tree... I was able to make most of the
rest of compile (sent patch to David), but it still just crashes
until the D back-end can be re-implemented for GCC 4.0 and SSA...

Says http://gcc.gnu.org:

> February 25, 2004
> The tree-ssa branch has been frozen to be incorporated into GCC 4.0.0.
> Tree SSA incorporates two new high-level intermediate languages (GENERIC
> and GIMPLE), an optimization framework for GIMPLE based on the Static
> Single Assignment (SSA) representation, several SSA-based optimizers and
> various other improvements to the internal structure of the compiler
> that allow new optimization opportunities that were difficult to
> implement before.

My interest was not from Fortran, but from AltiVec auto-vectorization...
(and the fact that GCC 4.0 will be the system compiler in Mac OS X 10.4)

--anders