This is the mail archive of the gcc-patches@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: [patch] Relax assertion in vn_reference_lookup_3


Hi,

On Sat, 31 Oct 2009, Eric Botcazou wrote:

> > Of course I question this inconsistency - how do we expand a copy statement
> > that copies 48 bits to 64 bits ... (IMHO this shouldn't be valid gimple)
> 
> Essentially the same way we do for a regular bitfield:
> 
> struct S {
>   unsigned int i : 24;
> };
> 
> void foo (struct S *s)
> {
>   int i = s->i;
> }

This has an intermediate temporary of the 24bit type and a conversion, 
which is why I also question the inconsistency in your original example. :

foo (struct S * s)
{
  int i;
  <unnamed-unsigned:24> D.2702;

<bb 2>:
  D.2702_2 = s_1(D)->i;
  i_3 = (int) D.2702_2;
  return i_3;
}


Ciao,
Michael.


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