https://bugs.llvm.org/show_bug.cgi?id=41186

            Bug ID: 41186
           Summary: [ms] Clang returns trivial, but "non-POD" types
                    indirectly, unlike MSVC
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: LLVM Codegen
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected]

Test case courtesy of Eli:

class DefaultedDefaultConstructor {
public:
    bool hasValue;
    bool value;
    DefaultedDefaultConstructor() = default;
};
class NoDefaultConstructor {
public:
    bool hasValue;
    bool value;
};
DefaultedDefaultConstructor f(int x, int y);
bool g() { return f(5, 6).value; }
NoDefaultConstructor f2(int x, int y);
bool g2() { return f2(5, 6).value; }

MSVC generates the same code for g and g2, but clang returns
DefaultedDefaultConstructor indirectly.

I tested x86 and x64, and both are wrong, but we probably get it wrong for
arm64 and thumb as well.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to