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

            Bug ID: 22429
           Summary: "naked" attribute of class member function causes
                    assertion fail
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Frontend
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    Classification: Unclassified

test.ii:

class Foo {
    unsigned r4;
    void func1 ();
};

void __attribute__((naked)) Foo::func1 () {
    __asm__ volatile (
        "mov    r2, %0 \n\t" : "=r" (r4) :
    );
}


 clang++ -cc1 -triple thumbv7m-none--eabi -S  -mthread-model posix
-target-feature +soft-float-abi  -target-abi aapcs -mfloat-abi soft -x
c++-cpp-output test.ii

clang++: llvm/tools/clang/lib/CodeGen/CodeGenFunction.h:1580: llvm::Value*
clang::CodeGen::CodeGenFunction::GetAddrOfLocalVar(const clang::VarDecl*):
Assertion `Res && "Invalid argument to GetAddrOfLocalVar(), no decl!"' failed.
#0 0x106d0a2 llvm::sys::PrintStackTrace(_IO_FILE*) (bin/clang-3.7+0x106d0a2)
...

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to