<html>
    <head>
      <base href="http://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - bad write in InitListExpr::resizeInits"
   href="http://llvm.org/bugs/show_bug.cgi?id=19944">19944</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>bad write in InitListExpr::resizeInits
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>new-bugs
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>new bugs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>dcb314@hotmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvmbugs@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=12605" name="attach_12605" title="C source code">attachment 12605</a> <a href="attachment.cgi?id=12605&action=edit" title="C source code">[details]</a></span>
C source code

I just compiled the attached code with llvm trunk
dated 20140604 and valgrind said

==21409== Invalid write of size 8
==21409==    at 0x13D839D: clang::InitListExpr::resizeInits(clang::ASTContext
const&, unsigned int) (ASTVector.h:356)
==21409==    by 0xCF8EB8: (anonymous
namespace)::InitListChecker::CheckDesignatedInitializer(clang::InitializedEntity
const&, clang::InitLis
tExpr*, clang::DesignatedInitExpr*, unsigned int, clang::QualType&,
clang::DeclContext::specific_decl_iterator<clang::FieldDecl>*, llvm::APS
Int*, unsigned int&, clang::InitListExpr*, unsigned int&, bool, bool)
(SemaInit.cpp:2189)
==21409==    by 0xCFA741: (anonymous
namespace)::InitListChecker::CheckArrayType(clang::InitializedEntity const&,
clang::InitListExpr*, clan
g::QualType&, llvm::APSInt, bool, unsigned int&, clang::InitListExpr*, unsigned
int&) (SemaInit.cpp:1317)
==21409==    by 0xCF59C1: (anonymous
namespace)::InitListChecker::CheckListElementTypes(clang::InitializedEntity
const&, clang::InitListExpr
*, clang::QualType&, bool, unsigned int&, clang::InitListExpr*, unsigned int&,
bool) [clone .constprop.726] (SemaInit.cpp:815)
==21409==    by 0xCF64E4: (anonymous
namespace)::InitListChecker::CheckExplicitInitList(clang::InitializedEntity
const&, clang::InitListExpr
*, clang::QualType&, clang::InitListExpr*, bool) (SemaInit.cpp:715)
==21409==    by 0xCF1774: (anonymous
namespace)::InitListChecker::InitListChecker(clang::Sema&,
clang::InitializedEntity const&, clang::Init
ListExpr*, clang::QualType&, bool) (SemaInit.cpp:593)
==21409==    by 0xCEF48B: clang::InitializationSequence::Perform(clang::Sema&,
clang::InitializedEntity const&, clang::InitializationKind co
nst&, llvm::MutableArrayRef<clang::Expr*>, clang::QualType*)
(SemaInit.cpp:5996)
==21409==    by 0xBA692B: clang::Sema::AddInitializerToDecl(clang::Decl*,
clang::Expr*, bool, bool) (SemaDecl.cpp:8366)
==21409==    by 0xA6BD76:
clang::Parser::ParseDeclarationAfterDeclaratorAndAttributes(clang::Declarator&,
clang::Parser::ParsedTemplateInfo 
const&, clang::Parser::ForRangeInit*) (ParseDecl.cpp:1861)
==21409==    by 0xA787B5:
clang::Parser::ParseDeclGroup(clang::ParsingDeclSpec&, unsigned int, bool,
clang::SourceLocation*, clang::Parser::
ForRangeInit*) (ParseDecl.cpp:1626)
==21409==    by 0xA5D018:
clang::Parser::ParseDeclOrFunctionDefInternal(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec&, 
clang::AccessSpecifier) (Parser.cpp:888)
==21409==    by 0xA5D6A0:
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclS
pec*, clang::AccessSpecifier) [clone .part.217] (Parser.cpp:904)
==21409==  Address 0x8 is not stack'd, malloc'd or (recently) free'd
==21409==</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>