Thread overview
Compiler intetrnal error cg87.c 1144
Jun 20, 2001
John Fletcher
Re: Compiler internal error cg87.c 1144
Jun 20, 2001
John Fletcher
Jun 20, 2001
Walter
June 20, 2001
Walter

I have an internal error cg87.c 1144 when compiling some code in 32 bit
(-mx -f) mode.  I am trying to construct a simple (!) example of this
but it is proving difficult to reproduce in an example.

The compilation uses -XD to instantiate templates and the error goes away if I don't use -XD (It then fails in the linker).

The error occurs at the very end of compilation, when I do a -v and compare with a modified version which runs.

The error is associated with access functions to the internal members of a template class, being called from within a member function, instead of accessing the members themselves.

e.g.
template <class T>
class A {
   T n;
  public :
   T get_n() const { return n; }
   T something() { }
};

template <class T>
T A<T>::something() {
    return get_n();
}

In my real case there are 16 internal variables and access functions. At the moment my example with 16 does not fail, but my real code does.

If the member function is programmed like this it works.

template <class T>
T A<T>::something() {
    return n;
}

It would help to report with a more helpful example if you could give me some clue what might be causing the error message.

I am using DM 8.10

Cheers

John Fletcher


June 20, 2001
Two corrections.

(1) misspelling of "internal"  in the Subject
(2) the outer function in the example is a frined not a member. I don't know
if this is significant. The example is corrected below.

Sorry

John

John Fletcher wrote:

> Walter
>
> I have an internal error cg87.c 1144 when compiling some code in 32 bit
> (-mx -f) mode.  I am trying to construct a simple (!) example of this
> but it is proving difficult to reproduce in an example.
>
> The compilation uses -XD to instantiate templates and the error goes away if I don't use -XD (It then fails in the linker).
>
> The error occurs at the very end of compilation, when I do a -v and compare with a modified version which runs.
>
> The error is associated with access functions to the internal members of a template class, being called from within a member function, instead of accessing the members themselves.
>
> e.g.
> template <class T>
> class A {
>    T n;
>   public :
>    T get_n() const { return n; }
>    frien T something() { }
> };
>
> template <class T>
> T something() {
>     return get_n();
> }
>
> In my real case there are 16 internal variables and access functions. At the moment my example with 16 does not fail, but my real code does.
>
> If the member function is programmed like this it works.
>
> template <class T>
> T something() {
>     return n;
> }
>
> It would help to report with a more helpful example if you could give me some clue what might be causing the error message.
>
> I am using DM 8.10
>
> Cheers
>
> John Fletcher

June 20, 2001
Zip up the headers, source, and .bat file which will produce the error, email it to me, and I'll have a look. -Walter

John Fletcher wrote in message <3B30CEAE.B47A1F67@aston.ac.uk>...
>Two corrections.
>
>(1) misspelling of "internal"  in the Subject
>(2) the outer function in the example is a frined not a member. I don't
know
>if this is significant. The example is corrected below.
>
>Sorry
>
>John
>
>John Fletcher wrote:
>
>> Walter
>>
>> I have an internal error cg87.c 1144 when compiling some code in 32 bit
>> (-mx -f) mode.  I am trying to construct a simple (!) example of this
>> but it is proving difficult to reproduce in an example.
>>
>> The compilation uses -XD to instantiate templates and the error goes away if I don't use -XD (It then fails in the linker).
>>
>> The error occurs at the very end of compilation, when I do a -v and compare with a modified version which runs.
>>
>> The error is associated with access functions to the internal members of a template class, being called from within a member function, instead of accessing the members themselves.
>>
>> e.g.
>> template <class T>
>> class A {
>>    T n;
>>   public :
>>    T get_n() const { return n; }
>>    frien T something() { }
>> };
>>
>> template <class T>
>> T something() {
>>     return get_n();
>> }
>>
>> In my real case there are 16 internal variables and access functions. At the moment my example with 16 does not fail, but my real code does.
>>
>> If the member function is programmed like this it works.
>>
>> template <class T>
>> T something() {
>>     return n;
>> }
>>
>> It would help to report with a more helpful example if you could give me some clue what might be causing the error message.
>>
>> I am using DM 8.10
>>
>> Cheers
>>
>> John Fletcher
>