It seems a new bug has been introduced between version 3.0 and 3.2.
Here is a small bit of code <below> that exercises the error:
 "Error: this addressing mode is not applicable for destination operand"

The compiler seems to have difficulty comparing the 
pointer to the address of a structure -- checking to see if the pointer
is pointing to the structure.



The offending assembler instructions is:
cmp     @r4, #data

The 3.0 version of the compiler generates the instruction

cmp  #data, @r4 

which compiles fine.

+++++++++++++++++++++++++++++++++++++++++
typedef unsigned int uint16_t;
typedef unsigned char uint8_t;
typedef struct Msg {
  uint16_t addr;
} Msg;

typedef Msg *MsgPtr;

Msg data;
char funcion(MsgPtr msg)
{
  if (msg == &data) {
      msg->addr = 5;
    }
  return 1;
}


"Dmitry" <[email protected]> wrote in message
news:<[email protected]>...
Fellows,
if you're using float point be carefull.
looks like there is a rounding bug in gcc code.
Use libfp.a ('-lfp' flag) from libc.

~d


-- 
/********************************************************************
     ("`-''-/").___..--''"`-._     (\   Dimmy the Wild      UA1ACZ
      `6_ 6  )   `-.  (     ).`-.__.`)  Enterprise Information Sys 
      (_Y_.)'  ._   )  `._ `. ``-..-'   Nevsky prospekt,   20 / 44
    _..`--'_..-_/  /--'_.' ,'           Saint Petersburg,   Russia
   (il),-''  (li),'  ((!.-'             +7 (812)  3468202, 5585314
 ********************************************************************/



-------------------------------------------------------
This sf.net email is sponsored by:
With Great Power, Comes Great Responsibility 
Learn to use your power at OSDN's High Performance Computing Channel
http://hpc.devchannel.org/
----------

Reply via email to