Here is a shorter snippet that exhibits the issue, however in this case both -O2 and -O3 fail with the same error
Error: immediate value out of range -- `movt r1,-77'
// Shutdown lock data
union shutdown_data {
struct { SSHORT flag; SSHORT delay;
} data_items;
SLONG data_long;
};
the called function is in another source file and looks like this
SLONG LOCK_write_data(SRQ_PTR request_offset, SLONG data)
{
/**************************************
*
* L O C K _ w r i t e _ d a t a
*
**************************************
*
* Functional description
* Write a longword into the lock block.
*
**************************************/ LOCK_TRACE(("LOCK_write_data (%ld)\n", request_offset));
lrq* request = get_request(request_offset); acquire(request->lrq_owner); ++LOCK_header->lhb_write_data;
request = (LRQ) SRQ_ABS_PTR(request_offset); /* Re-init after a potential remap */
lbl* lock = (LBL) SRQ_ABS_PTR(request->lrq_lock); remove_que(&lock->lbl_lhb_data);
if (lock->lbl_data = data) insert_data_que(lock);
if (lock->lbl_series < LCK_MAX_SERIES) ++LOCK_header->lhb_operations[lock->lbl_series];
else ++LOCK_header->lhb_operations[0];
Here is a shorter snippet that exhibits the issue, however in this case both -O2 and -O3 fail with the same error
Error: immediate value out of range -- `movt r1,-77'
// Shutdown lock data
SSHORT flag;
SSHORT delay;
union shutdown_data {
struct {
} data_items;
SLONG data_long;
};
void notify_ shutdown( Database* dbb)
shutdown_ data data;
{
}
the called function is in another source file and looks like this data(SRQ_ PTR request_offset, SLONG data) ******* ******* ******* ******* **** ******* ******* ******* ******* **** ******* ******* ******* ******* ****/
LOCK_TRACE( ("LOCK_ write_data (%ld)\n", request_offset));
SLONG LOCK_write_
{
/******
*
* L O C K _ w r i t e _ d a t a
*
******
*
* Functional description
* Write a longword into the lock block.
*
******
lrq* request = get_request( request_ offset) ;
acquire( request- >lrq_owner) ;
++LOCK_ header- >lhb_write_ data; PTR(request_ offset) ; /* Re-init after a potential remap */ PTR(request- >lrq_lock) ;
remove_ que(&lock- >lbl_lhb_ data);
insert_ data_que( lock);
request = (LRQ) SRQ_ABS_
lbl* lock = (LBL) SRQ_ABS_
if (lock->lbl_data = data)
if (lock->lbl_series < LCK_MAX_SERIES)
++LOCK_ header- >lhb_operations [lock-> lbl_series] ;
++LOCK_ header- >lhb_operations [0];
else
return data;
}