[LLVMbugs] [Bug 4126] New: conditional jump to nowhere

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Sat May 2 10:47:13 PDT 2009


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

           Summary: conditional jump to nowhere
           Product: new-bugs
           Version: unspecified
          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: llvmbugs at cs.uiuc.edu, jxyang at cs.utah.edu


Seen using r70624 on Ubuntu Hardy on x86.

One of the functions in the emitted code contains this strange-looking body:

uint8func_52:
        pushl   %ebp
        movl    %esp, %ebp
        subl    $8, %esp
        movl    8(%ebp), %eax
        testl   %eax, %eax
        jne     .LBB9_1
        jle     .LBB9_1
        movl    $0, (%esp)
        call    funcmul_
        addl    $8, %esp
        popl    %ebp
        ret

regehr at john-home:~/volatile/tmp158$ llvm-gcc -Os small.c
/tmp/ccgm63CD.o: In function `uint8func_52':
small.c:(.text+0x55): undefined reference to `funcmul_'
small.c:(.text+0x43): undefined reference to `.LBB9_1'
small.c:(.text+0x49): undefined reference to `.LBB9_1'
collect2: ld returned 1 exit status

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

typedef int int16_t;
typedef int int32_t;
__extension__ typedef int int64_t;
typedef char uint8_t;
typedef int uint32_t;
__extension__ typedef int uint64_t;
static uint8_t
safe_mul_func_int16_t_s_s (int16_t _si1, int16_t _si2)
{
  return _si2 > 0 && _si1 > 1 + _si2 && _si2 < -32767 - 1 + _si1 && +1
    || _si2 ? : _si2;
}
static int16_t
safe_div_func_int32_t_s_s (int32_t _si1, uint8_t _si2)
{
  return -2147483647 - 1 == 1 ? : _si1;
}

int crc32 (int x)
{
}

static void
crc32_8bytes (uint64_t val)
{
  crc32 (val >> 0);
  crc32 (val >> 8);
  crc32 (val >> 16);
}
volatile uint8_t g_89;
uint8_t g_93;
uint8_t
func_2 (uint32_t p_4, uint8_t p_5, uint8_t p_7, uint8_t p_8, uint8_t p_9)
{
}

uint82 (uint8_t p_13, uint8_t p_14)
{
}

uint81 (int64p_22)
{
}

uint8func_52 (uint64_t p_53)
{
  uint8_t l_91;
  funcmul_ (func_2
            (1, g_93, safe_div_func_int32_t_s_s (p_53, 1)
             || safe_mul_func_int16_t_s_s (l_91, p_53), 1, 1));
}

uint84 (uint8p_56)
{
}

uint87 (uint8p_58)
{
}

uint89 (int64_t p_61, uint8_t p_62)
{
}
int
main (void)
{
  crc32_8bytes (g_89);
  crc32_8bytes (g_93);
}


-- 
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