This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: tree-SSA and indirect references.


> On Tue, Jan 20, 2004 at 10:50:13AM +0100, Jan Hubicka wrote:
> > > On Tue, Jan 20, 2004 at 01:31:56AM +0100, Jan Hubicka wrote:
> > > > vara=(type *)&varb;
> > > > varc=*vara;
> > 
> > In the case of Gerald's testcase these are different classes inherited
> > from each other.
> 
> Would you please be concrete, draw the diagram and show the members?
> 
> My guess is that the best way to fix this is to change how the C++
> front end implements inheritence.
> 
> At present, as you can see, the front end takes the address of the
> base, casts, and then dereferences.  From the point of view of GIMPLE,
> it would be much better to have this appear to be nested structures.
> (The only exception will be for virtual bases, but I can see from the
> above that that is not at issue for this test case.)
> 
> I have no idea how easy or difficult such a change might be.  Jason
> or Mark, perhaps you could comment?

Actually the casts don't have to be very complex.  See for instance:
  <D175450>_4 = (short unsigned int * const *)&__first;
  T.14797_7 = *<D175450>_4;
  <D175454>_9 = (short unsigned int * const *)&__last;
  T.14799_12 = *<D175454>_9;
these two are operands of template:

void std::fill(_ForwardIter, _ForwardIter, const _Tp&) [with _ForwardIter = __gnu_cxx::__normal_iterator<short unsigned int*,
std::vector<short unsigned int, std::allocator<short unsigned int> > >, _Tp = short unsigned int] (__first, __last, __value)

so if I read it right, they shall differ only in constantness.

The other cass I saw were just same case of instantiation of template to
aggregate I think.

Honza
> 
> 
> r~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]