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

             Bug #: 13809
           Summary: IRGen failure with conditional operator which produces
                    an lvalue bitfield
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected], [email protected]
    Classification: Unclassified


Clang dies on this:

struct S { int x : 5, y : 9; };
void f(bool c, S &a) { (c ? a.x : a.y) = 4; }

... saying:

<stdin>:2:31: error: cannot compile this conditional operator yet
void f(bool c, S &a, S &b) { (c ? a.x : a.y) = 4; }
                              ^~~~~~~~~~~~~

We're also getting Sema wrong for this case. We accept:

int &g(bool c, S &a, S &b) { return (c ? a.x : a.y); }

... but we should not, because it binds a reference to a bitfield.

-- 
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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to