[LLVMbugs] [Bug 5813] New: msp430 backend: Error: operand out of range

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Wed Dec 16 19:36:49 PST 2009


http://llvm.org/bugs/show_bug.cgi?id=5813

           Summary: msp430 backend: Error: operand out of range
           Product: new-bugs
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: regehr at cs.utah.edu
                CC: asl at math.spbu.ru, llvmbugs at cs.uiuc.edu


This is seen on Edwin Foo's branch-- so not sure if I should report it here? 
Anyway see below.  Sorry for the gross testcase, my reducers didn't get any
further than this.

regehr at john-home:~/volatile/bugs/tmp247$ clang -v
clang version 1.1 (trunk 114)
Target: i386-pc-linux-gnu
Thread model: posix

regehr at john-home:~/volatile/bugs/tmp247$ clang -Os -w -ccc-host-triple
msp430-elf -c small.c

/tmp/cc-kZIVEF.s: Assembler messages:
/tmp/cc-kZIVEF.s:15: Error: operand out of range: 523
/tmp/cc-kZIVEF.s:19: Error: operand out of range: 517
clang: error: assembler command failed with exit code 1 (use -v to see
invocation)

regehr at john-home:~/volatile/bugs/tmp247$ cat small.c

typedef signed char int8_t;
typedef int int32_t;
typedef unsigned short int uint16_t;
typedef unsigned int uint32_t;
struct S0
{
  uint32_t f1;
  uint32_t f2;
};
struct S1
{
  int8_t f5;
};
struct S2
{
  volatile struct S1 f7;
};
struct S1 g_3 = {
  1L
};

int32_t g_10;
int32_t *g_26 = &g_10;
const volatile struct S2 g_74 = {
  1L
};

struct S0 g_83 = {
  -7L, 0L
};

struct S0 *volatile g_84 = &g_83;
int32_t *g_123 = &g_10;
int32_t **g_122 = &g_123;
int32_t g_175;
int32_t ***volatile g_194 = &g_122;
int32_t *func_38 (int32_t * p_39);
struct S0 func_40 (uint16_t p_41);
int int323 (const int8_t p_24, int32_t * p_25)
{
  int32_t **l_27 = &g_26;
  int32_t l_95;
  const struct S1 *l_98 = &g_3;
  if (0 == *l_27)
    {
    }
  else
    {
      int32_t l_170;
      int32_t *volatile l_176 = &g_175;
      if (p_24)
        {
          func_38 (func_38 (func_38 (&l_170)));
          if (func_44 (l_98, &g_3, &g_123))
            if (+func_28 (0) || func_28 (1L))
              {
              }
            else
              *g_122 = func_38 (func_38 (0));
          for (g_83.f1; g_83.f1; g_83.f1 = safe (g_83.f1, 1))
            {
            }
          struct S0 *l_208 = &g_83;
          *l_208 = func_40 (0);
          if (*l_176 != (*g_122 != 0))
            {
              int32_t *l = &l_95;
              l = func_38 (0);
              l = func_38 (func_38 (func_38 (func_38 (**g_194))));
            }
        }
    }
  return 0;
}

int32_t *
func_38 (int32_t * p_39)
{
  *g_84 = func_40 (g_74.f7.f5);
  return 0;
}


-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list