[LLVMbugs] [Bug 14503] New: assertion failure 'Constant expressions should be initialized.' with constexpr constructor template which misses members

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Dec 4 00:45:08 PST 2012


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

             Bug #: 14503
           Summary: assertion failure 'Constant expressions should be
                    initialized.' with constexpr constructor template
                    which misses members
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++11
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: richard-llvm at metafoo.co.uk
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified


We don't seem to check that a constexpr constructor for a class template
initializes all members. We accept this:

template<typename> struct V {
  union { int n; struct { int x,y; }; };

  constexpr V() : x(0) {}    
};    
constexpr V<int> v;

... and then assert in IRGen.

-- 
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.



More information about the llvm-bugs mailing list