<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 --- - crash in or around call to std::chrono::steady_clock::now() when using precompiled header"
   href="http://llvm.org/bugs/show_bug.cgi?id=15699">15699</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>crash in or around call to std::chrono::steady_clock::now() when using precompiled header
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>3.2
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>HP
          </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>C++11
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>john@mcfarlane.name
          </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>Created <span class=""><a href="attachment.cgi?id=10318" name="attach_10318" title="as directed by diagnostic message">attachment 10318</a> <a href="attachment.cgi?id=10318&action=edit" title="as directed by diagnostic message">[details]</a></span>
as directed by diagnostic message

This crash occurs in a single source file out of a project of about 100 files.
I happens when I employ a CMake script
[<a href="https://code.google.com/p/crag/source/browse/PrecompiledHeader.cmake">https://code.google.com/p/crag/source/browse/PrecompiledHeader.cmake</a>] intended
to get precompiled headers to work with GCC, and adapted with minimal expertise
to work with Clang 3.2. The system is a daily of Ubuntu 13.04 with clang 3.2
installed using apt-get.

The line referenced in the console output (below), app.cpp:243 is as follows:
    auto now = std::chrono::steady_clock::now();

And this code compiles fine when not using a PCH.
================================================================================
[  1%] Built target crag_gch
[  2%] Building CXX object CMakeFiles/crag.dir/src/core/app.cpp.o
0  libLLVM-3.2.so.1 0x00002aaaaba0ec0f
1  libLLVM-3.2.so.1 0x00002aaaaba0f079
2  libpthread.so.0  0x00002aaaac407bd0
3  clang            0x0000000000a651d0
clang::Sema::LookupSpecialMember(clang::CXXRecordDecl*,
clang::Sema::CXXSpecialMember, bool, bool, bool, bool, bool) + 1440
4  clang            0x0000000000a656e0
clang::Sema::LookupCopyingConstructor(clang::CXXRecordDecl*, unsigned int) + 48
5  clang            0x000000000098f133
6  clang            0x00000000009a5a63
clang::Sema::DeclareImplicitCopyConstructor(clang::CXXRecordDecl*) + 643
7  clang            0x0000000000a63d0b
clang::Sema::LookupConstructors(clang::CXXRecordDecl*) + 251
8  clang            0x0000000000a4cd9b
9  clang            0x0000000000a56773
clang::InitializationSequence::InitializationSequence(clang::Sema&,
clang::InitializedEntity const&, clang::InitializationKind const&,
clang::Expr**, unsigned int) + 2371
10 clang            0x000000000095ff54
clang::Sema::AddInitializerToDecl(clang::Decl*, clang::Expr*, bool, bool) +
1876
11 clang            0x000000000086777e
clang::Parser::ParseDeclarationAfterDeclaratorAndAttributes(clang::Declarator&,
clang::Parser::ParsedTemplateInfo const&) + 750
12 clang            0x000000000086ff4a
clang::Parser::ParseDeclGroup(clang::ParsingDeclSpec&, unsigned int, bool,
clang::SourceLocation*, clang::Parser::ForRangeInit*) + 442
13 clang            0x00000000008767cc
clang::Parser::ParseSimpleDeclaration(llvm::SmallVector<clang::Stmt*, 32u>&,
unsigned int, clang::SourceLocation&,
clang::Parser::ParsedAttributesWithRange&, bool, clang::Parser::ForRangeInit*)
+ 780
14 clang            0x00000000008769bf
clang::Parser::ParseDeclaration(llvm::SmallVector<clang::Stmt*, 32u>&, unsigned
int, clang::SourceLocation&, clang::Parser::ParsedAttributesWithRange&) + 207
15 clang            0x00000000008badb8
clang::Parser::ParseStatementOrDeclarationAfterAttributes(llvm::SmallVector<clang::Stmt*,
32u>&, bool, clang::SourceLocation*, clang::Parser::ParsedAttributesWithRange&)
+ 376
16 clang            0x00000000008bba5d
clang::Parser::ParseStatementOrDeclaration(llvm::SmallVector<clang::Stmt*,
32u>&, bool, clang::SourceLocation*) + 141
17 clang            0x00000000008b85b7
clang::Parser::ParseCompoundStatementBody(bool) + 1879
18 clang            0x00000000008c0652
clang::Parser::ParseFunctionStatementBody(clang::Decl*,
clang::Parser::ParseScope&) + 130
19 clang            0x0000000000862b45
clang::Parser::ParseFunctionDefinition(clang::ParsingDeclarator&,
clang::Parser::ParsedTemplateInfo const&, clang::Parser::LateParsedAttrList*) +
997
20 clang            0x0000000000870150
clang::Parser::ParseDeclGroup(clang::ParsingDeclSpec&, unsigned int, bool,
clang::SourceLocation*, clang::Parser::ForRangeInit*) + 960
21 clang            0x000000000085ebc4
clang::Parser::ParseDeclOrFunctionDefInternal(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec&, clang::AccessSpecifier) + 228
22 clang            0x000000000085f381
23 clang            0x000000000085f3af
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*, clang::AccessSpecifier) + 31
24 clang            0x00000000008608a6
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*) + 102
25 clang            0x000000000086152f
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&) + 191
26 clang            0x0000000000859aeb clang::ParseAST(clang::Sema&, bool,
bool) + 267
27 clang            0x00000000005f50b1 clang::FrontendAction::Execute() + 97
28 clang            0x00000000005dc57a
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 282
29 clang            0x00000000005c5e92
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1378
30 clang            0x00000000005c0e88 cc1_main(char const**, char const**,
char const*, void*) + 1160
31 clang            0x00000000005bfd84 main + 7316
32 libc.so.6        0x00002aaaacb4fea5 __libc_start_main + 245
33 clang            0x00000000005c0889
Stack dump:
0.    Program arguments: /usr/bin/clang -cc1 -triple x86_64-pc-linux-gnu
-emit-obj -mrelax-all -disable-free -disable-llvm-verifier -main-file-name
app.cpp -mrelocation-model static -mdisable-fp-elim -fmath-errno -masm-verbose
-mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu x86-64
-target-linker-version 2.23.1 -momit-leaf-frame-pointer -g -coverage-file
/home/john/Documents/crag/CMakeFiles/crag.dir/src/core/app.cpp.o -resource-dir
/usr/bin/../lib/clang/3.2 -include-pch pch.h.gch -D PROFILE -D __STRICT_ANSI__
-I /home/john/Documents/crag/src -I
/home/john/Documents/crag/dependencies/include -fmodule-cache-path
/var/tmp/clang-module-cache -internal-isystem
/usr/bin/../lib/gcc/x86_64-linux-gnu/4.7/../../../../include/c++/4.7
-internal-isystem
/usr/bin/../lib/gcc/x86_64-linux-gnu/4.7/../../../../include/c++/4.7/x86_64-linux-gnu
-internal-isystem
/usr/bin/../lib/gcc/x86_64-linux-gnu/4.7/../../../../include/c++/4.7/backward
-internal-isystem
/usr/bin/../lib/gcc/x86_64-linux-gnu/4.7/../../../../include/x86_64-linux-gnu/c++/4.7
-internal-isystem
/usr/bin/../lib/gcc/x86_64-linux-gnu/4.7/../../../../include/x86_64-linux-gnu/c++/4.7/x86_64-linux-gnu
-internal-isystem
/usr/bin/../lib/gcc/x86_64-linux-gnu/4.7/../../../../include/x86_64-linux-gnu/c++/4.7/backward
-internal-isystem
/usr/bin/../lib/gcc/x86_64-linux-gnu/4.7/../../../../include/x86_64-linux-gnu/c++/4.7
-internal-isystem
/usr/bin/../lib/gcc/x86_64-linux-gnu/4.7/../../../../include/x86_64-linux-gnu/c++/4.7/x86_64-linux-gnu
-internal-isystem
/usr/bin/../lib/gcc/x86_64-linux-gnu/4.7/../../../../include/x86_64-linux-gnu/c++/4.7/backward
-internal-isystem
/usr/bin/../lib/gcc/x86_64-linux-gnu/4.7/../../../../include/c++
-internal-isystem
/usr/bin/../lib/gcc/x86_64-linux-gnu/4.7/../../../../include/c++/x86_64-linux-gnu
-internal-isystem
/usr/bin/../lib/gcc/x86_64-linux-gnu/4.7/../../../../include/c++/backward
-internal-isystem /usr/local/include -internal-isystem
/usr/bin/../lib/clang/3.2/include -internal-isystem
/usr/include/clang/3.2/include/ -internal-externc-isystem
/usr/include/x86_64-linux-gnu -internal-externc-isystem
/usr/include/x86_64-linux-gnu -internal-externc-isystem /usr/include -Wall
-Wfatal-errors -Winvalid-pch -std=gnu++11 -fdeprecated-macro
-fdebug-compilation-dir /home/john/Documents/crag -ferror-limit 19
-fmessage-length 213 -pthread -mstackrealign -fno-rtti -fobjc-runtime=gcc
-fdiagnostics-show-option -fcolor-diagnostics -o
CMakeFiles/crag.dir/src/core/app.cpp.o -x c++
/home/john/Documents/crag/src/core/app.cpp 
1.    /home/john/Documents/crag/src/core/app.cpp:243:45: current parser token
';'
2.    /home/john/Documents/crag/src/core/app.cpp:242:1: parsing function body
'GetTime'
3.    /home/john/Documents/crag/src/core/app.cpp:242:1: in compound statement
('{}')
clang: fatal error: unable to execute command: Segmentation fault (core dumped)
Ubuntu clang version 3.2-1~exp5ubuntu2 (tags/RELEASE_32/final) (based on LLVM
3.2)
Target: x86_64-pc-linux-gnu
Thread model: posix
clang: note: diagnostic msg: 
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang: note: diagnostic msg: /tmp/app-zWOsZa.cpp
clang: note: diagnostic msg: /tmp/app-zWOsZa.sh
clang: note: diagnostic msg: 

********************
make[2]: *** [CMakeFiles/crag.dir/src/core/app.cpp.o] Error 254
make[1]: *** [CMakeFiles/crag.dir/all] Error 2
make: *** [all] Error 2
================================================================================
Contents of /tmp/app-zWOsZa.sh as requested by diagnostic message:
/usr/bin/clang -cc1 -triple x86_64-pc-linux-gnu -emit-obj -mrelax-all
-disable-free -disable-llvm-verifier -main-file-name app.cpp -mrelocation-model
static -mdisable-fp-elim -fmath-errno -masm-verbose -mconstructor-aliases
-munwind-tables -fuse-init-array -target-cpu x86-64 -target-linker-version
2.23.1 -momit-leaf-frame-pointer -g -D "PROFILE" -D "__STRICT_ANSI__" -Wall
-Wfatal-errors -Winvalid-pch -std=gnu++11 -fdeprecated-macro -ferror-limit 19
-fmessage-length 213 -pthread -mstackrealign -fno-rtti -fobjc-runtime=gcc
-fdiagnostics-show-option -fcolor-diagnostics -x c++ app-zWOsZa.cpp</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>