[LLVMbugs] [Bug 1375] NEW: llvm.returnaddress intrinsic is not handled correctly

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Tue May 1 05:28:29 PDT 2007


           Summary: llvm.returnaddress intrinsic is not handled correctly
           Product: tools
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: llvm-gcc
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: asl at math.spbu.ru

Consider the following code:

#include <memory.h>

struct _Unwind_Context
  void *ra;

void bar(struct _Unwind_Context*);

void foo(struct _Unwind_Context* context)
  void *ra = __builtin_extract_return_addr (__builtin_return_address (0));

  memset (context, 0, sizeof (struct _Unwind_Context));
  context->ra = ra;


llvm-gcc produces:

%tmp = call i8* @llvm.returnaddress( i32 0 )            ; <i8*> [#uses=0]
store i8* null, i8** %ra

which is definitely wrong.

This is one small bit needed for EH support in llvm-gcc.

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.

More information about the llvm-bugs mailing list