hm...
no optimization?

thanks, 
fixed.
in cvs.

~d


On Tuesday 17 December 2002 10:40, Jason Hill wrote:
> 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
 ********************************************************************/


Reply via email to