<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 --- - clang 3.4 failed to compile C++ code that works with clang 3.3 (Segmentation fault)"
   href="http://llvm.org/bugs/show_bug.cgi?id=18473">18473</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>clang 3.4 failed to compile C++ code that works with clang 3.3 (Segmentation fault)
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </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>Keywords</th>
          <td>compile-fail
          </td>
        </tr>

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

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

        <tr>
          <th>Component</th>
          <td>C++
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>wang_feng@live.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>dgregor@apple.com, llvmbugs@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Upgrading to 3.4 breaks my old c++ code

Step to reproduce:

 "/usr/bin/clang" -cc1 -triple x86_64-unknown-linux-gnu -emit-obj -disable-free
-disable-llvm-verifier -main-file-name second_order_approximation.cc
-mrelocation-model static -fmath-errno -masm-verbose -mconstructor-aliases
-munwind-tables -fuse-init-array -target-cpu x86-64 -target-linker-version 2.24
-momit-leaf-frame-pointer -D "NDEBUG" -O3 -Weverything -Wno-c++98-compat
-Wno-c++98-compat-pedantic -Wno-sign-conversion -Wno-exit-time-destructors
-Wno-float-equal -Wno-global-constructors -Wno-missing-declarations
-Wno-unused-parameter -Wno-padded -Wno-shadow -Wno-weak-vtables
-Wno-missing-prototypes -std=c++11 -fdeprecated-macro -ferror-limit 2
-fmessage-length 239 -mstackrealign -fobjc-runtime=gcc -fcxx-exceptions
-fexceptions -fdiagnostics-show-option -fcolor-diagnostics -vectorize-loops
-vectorize-slp -x c++ second_order_approximation-99534a.cpp

Actual Results:
0  libLLVM-3.4.so  0x00007f3a5b6fdb22 llvm::sys::PrintStackTrace(_IO_FILE*) +
34
1  libLLVM-3.4.so  0x00007f3a5b6fd6cc
2  libpthread.so.0 0x00007f3a5a613870
3  clang           0x00000000011465a8
clang::Expr::EvaluateAsInitializer(clang::APValue&, clang::ASTContext const&,
clang::VarDecl const*, llvm::SmallVectorImpl<std::pair<clang::SourceLocation,
clang::PartialDiagnostic> >&) const + 40
4  clang           0x00000000010c5159
clang::VarDecl::evaluateValue(llvm::SmallVectorImpl<std::pair<clang::SourceLocation,
clang::PartialDiagnostic> >&) const + 121
5  clang           0x00000000010cd302 clang::VarDecl::checkInitIsICE() const +
242
6  clang           0x0000000000b504d7
clang::Sema::ActOnFinishFullExpr(clang::Expr*, clang::SourceLocation, bool,
bool, bool) + 1911
7  clang           0x0000000000bf01c0
clang::Sema::ActOnCapScopeReturnStmt(clang::SourceLocation, clang::Expr*) + 752
8  clang           0x0000000000bf095f
clang::Sema::ActOnReturnStmt(clang::SourceLocation, clang::Expr*) + 703
9  clang           0x0000000000981940 clang::Parser::ParseReturnStatement() +
112
10 clang           0x0000000000985d5a
clang::Parser::ParseStatementOrDeclarationAfterAttributes(llvm::SmallVector<clang::Stmt*,
32u>&, bool, clang::SourceLocation*, clang::Parser::ParsedAttributesWithRange&)
+ 282
11 clang           0x0000000000986925
clang::Parser::ParseStatementOrDeclaration(llvm::SmallVector<clang::Stmt*,
32u>&, bool, clang::SourceLocation*) + 117
12 clang           0x000000000098a085
clang::Parser::ParseCompoundStatementBody(bool) + 1765
13 clang           0x000000000096ba22
clang::Parser::ParseLambdaExpressionAfterIntroducer(clang::LambdaIntroducer&) +
2962
14 clang           0x000000000096ce73 clang::Parser::ParseLambdaExpression() +
275
15 clang           0x0000000000958347 clang::Parser::ParseCastExpression(bool,
bool, bool&, clang::Parser::TypeCastState) + 6455
16 clang           0x000000000095923d clang::Parser::ParseCastExpression(bool,
bool, clang::Parser::TypeCastState) + 29
17 clang           0x00000000009592cf
clang::Parser::ParseAssignmentExpression(clang::Parser::TypeCastState) + 31
18 clang           0x000000000096f130 clang::Parser::ParseBraceInitializer() +
368
19 clang           0x00000000009336b8
clang::Parser::ParseDeclarationAfterDeclaratorAndAttributes(clang::Declarator&,
clang::Parser::ParsedTemplateInfo const&) + 920
20 clang           0x000000000093d3b9
clang::Parser::ParseDeclGroup(clang::ParsingDeclSpec&, unsigned int, bool,
clang::SourceLocation*, clang::Parser::ForRangeInit*) + 1833
21 clang           0x00000000009415cf
clang::Parser::ParseSimpleDeclaration(llvm::SmallVector<clang::Stmt*, 32u>&,
unsigned int, clang::SourceLocation&,
clang::Parser::ParsedAttributesWithRange&, bool, clang::Parser::ForRangeInit*)
+ 815
22 clang           0x000000000094187a
clang::Parser::ParseDeclaration(llvm::SmallVector<clang::Stmt*, 32u>&, unsigned
int, clang::SourceLocation&, clang::Parser::ParsedAttributesWithRange&) + 218
23 clang           0x0000000000986100
clang::Parser::ParseStatementOrDeclarationAfterAttributes(llvm::SmallVector<clang::Stmt*,
32u>&, bool, clang::SourceLocation*, clang::Parser::ParsedAttributesWithRange&)
+ 1216
24 clang           0x0000000000986925
clang::Parser::ParseStatementOrDeclaration(llvm::SmallVector<clang::Stmt*,
32u>&, bool, clang::SourceLocation*) + 117
25 clang           0x000000000098a085
clang::Parser::ParseCompoundStatementBody(bool) + 1765
26 clang           0x000000000098c20e
clang::Parser::ParseFunctionStatementBody(clang::Decl*,
clang::Parser::ParseScope&) + 190
27 clang           0x0000000000996ac4
clang::Parser::ParseLexedMethodDef(clang::Parser::LexedMethod&) + 308
28 clang           0x00000000009968e0
clang::Parser::ParseLexedMethodDefs(clang::Parser::ParsingClass&) + 112
29 clang           0x00000000009507cc
clang::Parser::ParseCXXMemberSpecification(clang::SourceLocation,
clang::SourceLocation, clang::Parser::ParsedAttributesWithRange&, unsigned int,
clang::Decl*) + 1548
30 clang           0x0000000000951ddc
clang::Parser::ParseClassSpecifier(clang::tok::TokenKind,
clang::SourceLocation, clang::DeclSpec&, clang::Parser::ParsedTemplateInfo
const&, clang::AccessSpecifier, bool, clang::Parser::DeclSpecContext,
clang::Parser::ParsedAttributesWithRange&) + 2060

31 clang           0x000000000093672d
clang::Parser::ParseDeclarationSpecifiers(clang::DeclSpec&,
clang::Parser::ParsedTemplateInfo const&, clang::AccessSpecifier,
clang::Parser::DeclSpecContext, clang::Parser::LateParsedAttrList*) + 4701
32 clang           0x0000000000990527
clang::Parser::ParseSingleDeclarationAfterTemplate(unsigned int,
clang::Parser::ParsedTemplateInfo const&, clang::ParsingDeclRAIIObject&,
clang::SourceLocation&, clang::AccessSpecifier, clang::AttributeList*) + 855
33 clang           0x0000000000991bf3
clang::Parser::ParseTemplateDeclarationOrSpecialization(unsigned int,
clang::SourceLocation&, clang::AccessSpecifier, clang::AttributeList*) + 867
34 clang           0x0000000000991ef9
clang::Parser::ParseDeclarationStartingWithTemplate(unsigned int,
clang::SourceLocation&, clang::AccessSpecifier, clang::AttributeList*) + 121
35 clang           0x00000000009419e8
clang::Parser::ParseDeclaration(llvm::SmallVector<clang::Stmt*, 32u>&, unsigned
int, clang::SourceLocation&, clang::Parser::ParsedAttributesWithRange&) + 584
36 clang           0x000000000092e6c4
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*) + 324
37 clang           0x000000000094b408
clang::Parser::ParseInnerNamespace(std::vector<clang::SourceLocation,
std::allocator<clang::SourceLocation> >&, std::vector<clang::IdentifierInfo*,
std::allocator<clang::IdentifierInfo*> >&, std::vector<clang::SourceLocation,
std::allocator<clang::SourceLocation> >&, unsigned int, clang::SourceLocation&,
clang::ParsedAttributes&, clang::BalancedDelimiterTracker&) + 376
38 clang           0x000000000094b994 clang::Parser::ParseNamespace(unsigned
int, clang::SourceLocation&, clang::SourceLocation) + 1204
39 clang           0x0000000000941a40
clang::Parser::ParseDeclaration(llvm::SmallVector<clang::Stmt*, 32u>&, unsigned
int, clang::SourceLocation&, clang::Parser::ParsedAttributesWithRange&) + 672
40 clang           0x000000000092e6c4
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*) + 324
41 clang           0x000000000092ecc6
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&) + 182
42 clang           0x000000000092536b clang::ParseAST(clang::Sema&, bool, bool)
+ 283
43 clang           0x00000000006610b9 clang::FrontendAction::Execute() + 169
44 clang           0x0000000000640858
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 296
45 clang           0x000000000062a7d3
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1683
46 clang           0x0000000000626218 cc1_main(char const**, char const**, char
const*, void*) + 1144
47 clang           0x0000000000624a4d main + 7597
48 libc.so.6       0x00007f3a59f77b05 __libc_start_main + 245
49 clang           0x00000000006252af
Stack dump:
0.      Program arguments: /usr/bin/clang -cc1 -triple x86_64-unknown-linux-gnu
-emit-obj -disable-free -disable-llvm-verifier -main-file-name
second_order_approximation.cc -mrelocation-model static -fmath-errno
-masm-verbose -mconstructor-aliases -munwind-tables -fuse-init-array
-target-cpu x86-64 -target-linker-version 2.24 -momit-leaf-frame-pointer -D
NDEBUG -O3 -Weverything -Wno-c++98-compat -Wno-c++98-compat-pedantic
-Wno-sign-conversion -Wno-exit-time-destructors -Wno-float-equal
-Wno-global-constructors -Wno-missing-declarations -Wno-unused-parameter
-Wno-padded -Wno-shadow -Wno-weak-vtables -Wno-missing-prototypes -std=c++11
-fdeprecated-macro -ferror-limit 2 -fmessage-length 239 -mstackrealign
-fobjc-runtime=gcc -fcxx-exceptions -fexceptions -fdiagnostics-show-option
-fcolor-diagnostics -vectorize-loops -vectorize-slp -x c++
second_order_approximation-99534a.cpp
1.      include/f/variate_generator/vg/distribution/burr.hpp:91:66: current
parser token ';'
2.      include/f/variate_generator/vg/distribution/burr.hpp:28:1: parsing
namespace 'f'
3.      include/f/variate_generator/vg/distribution/burr.hpp:32:5: parsing
struct/union/class body 'burr'
4.      include/f/variate_generator/vg/distribution/burr.hpp:77:13: parsing
function body 'direct_burr_impl'
5.      include/f/variate_generator/vg/distribution/burr.hpp:77:13: in compound
statement ('{}')
6.      include/f/variate_generator/vg/distribution/burr.hpp:90:21: lambda
expression parsing
7.      include/f/variate_generator/vg/distribution/burr.hpp:91:21: in compound
statement ('{}')
./second_order_approximation-99534a.sh: line 1: 12116 Segmentation fault     
(core dumped) "/usr/bin/clang" -cc1 -triple x86_64-unknown-linux-gnu -emit-obj
-disable-free -disable-llvm-verifier -main-file-name
second_order_approximation.cc -mrelocation-model static -fmath-errno
-masm-verbose -mconstructor-aliases -munwind-tables -fuse-init-array
-target-cpu x86-64 -target-linker-version 2.24 -momit-leaf-frame-pointer -D
"NDEBUG" -O3 -Weverything -Wno-c++98-compat -Wno-c++98-compat-pedantic
-Wno-sign-conversion -Wno-exit-time-destructors -Wno-float-equal
-Wno-global-constructors -Wno-missing-declarations -Wno-unused-parameter
-Wno-padded -Wno-shadow -Wno-weak-vtables -Wno-missing-prototypes -std=c++11
-fdeprecated-macro -ferror-limit 2 -fmessage-length 239 -mstackrealign
-fobjc-runtime=gcc -fcxx-exceptions -fexceptions -fdiagnostics-show-option
-fcolor-diagnostics -vectorize-loops -vectorize-slp -x c++
second_order_approximation-99534a.cpp

Expected Results:
clang3.4 compiles my code as clang3.3 does

Build Date & Platform:
Linux 3.10.24-1-lts #1 SMP Tue Jan 14 12:53:09 CET 2014 x86_64 GNU/Linux</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>