[tree-ssa] Bootstrap fails with undefined reference to find_reachable_lable
Tim Josling
tej@melbpc.org.au
Sat Apr 26 10:30:00 GMT 2003
> On Thursday 24 April 2003 22:28, Diego Novillo wrote:
>
>> On Thu, 2003-04-24 at 16:06, law@redhat.com wrote:
>
>> > In message <1051213400.15231.85.camel@frodo.toronto.redhat.com>, Diego
>> > Novillo
>> >
>> > writes:
>> > >On Thu, 2003-04-24 at 15:17, Andreas Jaeger wrote:
>> > >> -----BEGIN PGP SIGNED MESSAGE-----
>> > >> Hash: SHA1
>> > >>
>> > >>
>> > >> bootstrap of current tree-ssa fails on i686-linux-gnu for me with:
>> > >
>> > >Ah, yes. I've got a local fix that I still haven't flushed out. Why
>
>
> Can you send out the fix? I'm disabling tree-lang in my tree-ssa testing now.
>
>
>> > > is it that treelang uses parts of the C front end, but not all? It's
>> > > quite annoying and easy to break.
>> >
>> > You're kidding, right? [ Clearly you're not, but I couldn't think of a
>> > better way to express my surprise that something used c-simplify, but
>> > did not use c-semantics. ]
>
>>
>> I wish I was :( It may be a misunderstanding on my side, but I have
>> seen function duplication in treelang/treetree.c that merely call
>> abort. Previously I had to fix other link errors for treelang's front
>> end that essentially did the same thing: create an empty function in
>> treetree.c.
>>
>
>> > This is a problem with treelang's implementation that the treelang folks
>> > really need to fix.
>
>>
>> There was a thread discussing this issue recently:
>> http://gcc.gnu.org/ml/gcc-patches/2003-03/msg01444.html
>>
>> Perhaps treelang should be changed to use language hooks or generate
>> GIMPLE or ... something, I don't know.
>
>
> Tim, could you look into these issues and design a cleaner interface for
> treelang? With every major change treelang breaks because the interface is
> not well-defined,
>
> Andreas
> - --
> Andreas Jaeger
> SuSE Labs aj@suse.de
> private aj@arthur.inka.de
> http://www.suse.de/~aj
The problem is that the interface between the back end and the front
ends is not clean. This is not a treelang specific problem. Current
languages solve the problem in two ways
1. Objective C, C++ - by sharing code with C though the code is not
properly abstracted out into a language independent layer.
2. Fortran, etc - by duplicating code.
Both these are bad solutions. Treelang uses option (1).
A lot of code that is common to numerous languages is in c-* files.
There is c-specific stuff in the back end as well. Example: The rules on
deferred definition are straight C. Example: PCH spews a whole lot of C
specific PCH stuff into every front end, whether they have restartable
compilation / PCH or not.
The choices I have are
- Duplicate a whole lot of code that's in c-*, and manage the fractal
interface of that code into the back end. I did try that by the way, and
it was a lot of work and very painful.
- The current solution. Reuse some c-* code. This is not ideal but it
involves far fewer patches.I you have a look at the changelog there is
not a huge lot of this. Personally I think that this is not a big
problem, it is just that the idea of it does not appeal.
- Restructure the c-* code and the back end to make a clean interface
Option 3 is the *right thing* but it is a huge job, particularly without
having a mindset change about GCC being a C compiler. I am also of the
view that any attempt by me to do this would not succeed and I have
other priorities.
I am more than happy for someone to implement option (1) as long as they
commit to keep it alive. That would be a lot of work.
Perhaps someone can find a better solution but at this stage I am stuck.
Tim Josling
More information about the Gcc-bugs
mailing list