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]

Re: store_bit_field() problem


Hi,

I wrote:

> I'm analyzing the failure of gcc.c-torture/compile/20000818-1.c on m68k.
> gcc aborts in expmed.c:store_bit_field after calling int_mode_for_mode
> (which returns BLKmode).

Hmm, now gcc.c-torture/execute/931005-1.c fails with the patch I posted.
If I change the test 'bitpos == 0' into 'bitnum == 0' both tests work
now, maybe this removed comment:

   /* Note that the adjustment of BITPOS above has no effect on whether
      BITPOS is 0 in a REG bigger than a word.  */

should be added again?
BTW it seems that Jim's patch didn't break this, as 2.95 failed here as
well, it's just that the comment didn't agree with the code and it seems
the comment was correct.
Anyway, I would really appreciate some help to fix this correctly.
To summarize the problem: these structures should be stored in a
register:

typedef struct
{
  long double l;
} ld;

and

typedef struct
{
  char x;
} T;

In the first case store_bit_field is called with ((reg/v:XF 32), 96, 0,
XFmode, (reg:XF 33), 16, 12) and in the second case with ((reg/v:QI 30),
8, 0, QImode, (reg/v:QI 29), 8, 1).

bye, Roman


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