Daniel Néri wrote:

      Hello,


I have some code (preprocessed source attached below), that gives me
an ICE when compiled with optimisations enabled (either -O or -O2):

   $ msp430-gcc -save-temps -c -O2 cmd.c
   cmd.c: In function `cmd_read':
   cmd.c:50: Internal compiler error in redirect_edge_and_branch, at 
cfgrtl.c:902
   Please submit a full bug report,
   with preprocessed source if appropriate.
   See <URL:http://gcc.gnu.org/bugs.html> for instructions.


I use GCC 3.2.3 with mspgcc patches from less than an hour ago.


Best wishes,
  --Daniel

If I strip your test case down to the following, it still gives the same error. I hope this makes a simpler test case for Dmitry.

Regards,
Steve


enum cmd_status
{
   CMD_OK
};

struct cmd_cfg
{
       enum cmd_status (*eval)(const char *, unsigned int);
};


static char cmd_buf[32];

unsigned int cmd_read(const struct cmd_cfg *cfg)
{
       char *p = cmd_buf;

       switch (getc())
       {
       case '\b':
           if (p > cmd_buf)
               --p;
           break;
       }
}



Reply via email to