1833044 Members
2579 Online
110049 Solutions
New Discussion

Compiler bug?

 
David Layden
New Member

Compiler bug?

We're getting a SIGSEGV signal when accessing large (>256M) bitfield arrays. Writing to the bitfield works fine. Reading fails. The problem exists in cc and aCC, 32-bit and 64-bit. Optimization seems to fix the problem but debug versions always fail.

Any ideas? (see attachment)

Dave
We can do anything, but not everything!
4 REPLIES 4
Andreas Voss
Honored Contributor

Re: Compiler bug?

Hi,

you could try setting:
#pragma HP_ALIGN NOPADDING
into your c source to align your structure.

Regards
David Layden
New Member

Re: Compiler bug?

#pragma HP_ALIGN NOPADDING
This works in cc but aCC rejects it.

Dave
We can do anything, but not everything!
David Layden
New Member

Re: Compiler bug?

#pragma HP_ALIGN NOPADDING
This doesn't work for other bitfield patterns. For example:

typedef struct {
unsigned int tbits:1 ;
unsigned int ubits:31 ;
} NODE ;
We can do anything, but not everything!