[LLVMbugs] [Bug 16087] New: Crash when asking __imag__ 1.0 through a complex template

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue May 21 05:50:14 PDT 2013


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

            Bug ID: 16087
           Summary: Crash when asking __imag__ 1.0 through a complex
                    template
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++11
          Assignee: unassignedclangbugs at nondot.org
          Reporter: georgellvmb at oss3d.com
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Compiling the code code below crashes with the following assert:

Assertion failed: getValueKind() == VK_LValue, file
D:\CODE\vinext-tests\3rdparty\llvm\tools\clang\lib\AST\ExprClassification.cpp,
line 56

====== CODE:

template<typename T>
inline constexpr const __typeof__(__real__ *((T*)0)) &real(const T&a) { return
__real__ a; }

template<typename T>
inline constexpr const __typeof__(__imag__ *((T*)0)) &imag(const T&a) { return
__imag__ a; }

int main()
{
    int t = imag(0.0);
    return 0;
}

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20130521/6aa063ab/attachment.html>


More information about the llvm-bugs mailing list