<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 --- - Assertion `VD->isThisDeclarationADefinition() && !VD->isExternallyVisible() && "Broken AliasAttr handled late!""
   href="http://llvm.org/bugs/show_bug.cgi?id=22493">22493</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Assertion `VD->isThisDeclarationADefinition() && !VD->isExternallyVisible() && "Broken AliasAttr handled late!"
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </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>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>hans@chromium.org
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>david.majnemer@gmail.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=13816" name="attach_13816" title="preprocessed source">attachment 13816</a> <a href="attachment.cgi?id=13816&action=edit" title="preprocessed source">[details]</a></span>
preprocessed source

We ran into this compiling a library used by Chromium.

This does not occur on the 3.6 branch.

Attaching unreduced repro. Run line:

clang "-cc1" "-triple" "x86_64-unknown-linux-gnu" "-emit-obj"
"-mrelocation-model" "pic" "-pic-level" "2" "-mthread-model" "posix"
"-mdisable-fp-elim" "-fmath-errno" "-masm-verbose" "-mconstructor-aliases"
"-munwind-tables" "-fuse-init-array" "-target-cpu" "x86-64"
"-momit-leaf-frame-pointer" "-gline-tables-only" "-dwarf-column-info"
"-sys-header-deps" "-D" "HAVE_CONFIG_H" "-U" "_FORITFY_SOURCE" "-D" "PIC" "-O2"
"-w" "-fdeprecated-macro" "-fno-assume-sane-operator-new" "-mstackrealign"
"-fobjc-runtime=gcc" "-fcxx-exceptions" "-fexceptions" "-vectorize-loops"
"-vectorize-slp" "-x" "c++" "isthisdeclarationadefinition.cpp"






clang: ../tools/clang/lib/Sema/SemaDecl.cpp:5114: void
checkAttributesAfterMerging(clang::Sema &, clang::NamedDecl &): Assertion
`VD->isThisDeclarationADefinition() && !VD->isExternallyVisible() && "Broken
AliasAttr handled late!"' failed.
#0 0x15315d8 llvm::sys::PrintStackTrace(_IO_FILE*)
(/usr/local/google/work/llvm/build.release/bin/clang-3.6+0x15315d8)
#1 0x1532b9b SignalHandler(int)
(/usr/local/google/work/llvm/build.release/bin/clang-3.6+0x1532b9b)
#2 0x7f666f3c1340 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x10340)
#3 0x7f666e5e1cc9 gsignal
/build/buildd/eglibc-2.19/signal/../nptl/sysdeps/unix/sysv/linux/raise.c:56:0
#4 0x7f666e5e50d8 abort /build/buildd/eglibc-2.19/stdlib/abort.c:91:0
#5 0x7f666e5dab86 __assert_fail_base
/build/buildd/eglibc-2.19/assert/assert.c:92:0
#6 0x7f666e5dac32 (/lib/x86_64-linux-gnu/libc.so.6+0x2fc32)
#7 0x21af6be
(/usr/local/google/work/llvm/build.release/bin/clang-3.6+0x21af6be)
#8 0x21b433d clang::Sema::FinalizeDeclaration(clang::Decl*)
(/usr/local/google/work/llvm/build.release/bin/clang-3.6+0x21b433d)
#9 0x1f3abcf
clang::Parser::ParseDeclarationAfterDeclaratorAndAttributes(clang::Declarator&,
clang::Parser::ParsedTemplateInfo const&, clang::Parser::ForRangeInit*)
(/usr/local/google/work/llvm/build.release/bin/clang-3.6+0x1f3abcf)
#10 0x1f38313 clang::Parser::ParseDeclGroup(clang::ParsingDeclSpec&, unsigned
int, clang::SourceLocation*, clang::Parser::ForRangeInit*)
(/usr/local/google/work/llvm/build.release/bin/clang-3.6+0x1f38313)
#11 0x1f25bf6
clang::Parser::ParseDeclOrFunctionDefInternal(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec&, clang::AccessSpecifier)
(/usr/local/google/work/llvm/build.release/bin/clang-3.6+0x1f25bf6)
#12 0x1f2563c
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*, clang::AccessSpecifier)
(/usr/local/google/work/llvm/build.release/bin/clang-3.6+0x1f2563c)
#13 0x1f248ea
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*)
(/usr/local/google/work/llvm/build.release/bin/clang-3.6+0x1f248ea)
#14 0x1f4c309
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&)
(/usr/local/google/work/llvm/build.release/bin/clang-3.6+0x1f4c309)
#15 0x1f4bb45 clang::Parser::ParseNamespace(unsigned int,
clang::SourceLocation&, clang::SourceLocation)
(/usr/local/google/work/llvm/build.release/bin/clang-3.6+0x1f4bb45)
#16 0x1f33688 clang::Parser::ParseDeclaration(unsigned int,
clang::SourceLocation&, clang::Parser::ParsedAttributesWithRange&)
(/usr/local/google/work/llvm/build.release/bin/clang-3.6+0x1f33688)
#17 0x1f24463
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*)
(/usr/local/google/work/llvm/build.release/bin/clang-3.6+0x1f24463)
#18 0x1f23c9a
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&)
(/usr/local/google/work/llvm/build.release/bin/clang-3.6+0x1f23c9a)
#19 0x1f1fa36 clang::ParseAST(clang::Sema&, bool, bool)
(/usr/local/google/work/llvm/build.release/bin/clang-3.6+0x1f1fa36)
#20 0x16d8f1e clang::FrontendAction::Execute()
(/usr/local/google/work/llvm/build.release/bin/clang-3.6+0x16d8f1e)
#21 0x16a98dc clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(/usr/local/google/work/llvm/build.release/bin/clang-3.6+0x16a98dc)
#22 0x175e86a clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
(/usr/local/google/work/llvm/build.release/bin/clang-3.6+0x175e86a)
#23 0x6df8a4 cc1_main(llvm::ArrayRef<char const*>, char const*, void*)
(/usr/local/google/work/llvm/build.release/bin/clang-3.6+0x6df8a4)
#24 0x6de47a main
(/usr/local/google/work/llvm/build.release/bin/clang-3.6+0x6de47a)
#25 0x7f666e5ccec5 __libc_start_main
/build/buildd/eglibc-2.19/csu/libc-start.c:321:0
#26 0x6db16b _start
(/usr/local/google/work/llvm/build.release/bin/clang-3.6+0x6db16b)
Stack dump:
0.    Program arguments: /work/llvm/build.release/bin/clang -cc1 -triple
x86_64-unknown-linux-gnu -emit-obj -mrelocation-model pic -pic-level 2
-mthread-model posix -mdisable-fp-elim -fmath-errno -masm-verbose
-mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu x86-64
-momit-leaf-frame-pointer -gline-tables-only -dwarf-column-info
-sys-header-deps -D HAVE_CONFIG_H -U _FORITFY_SOURCE -D PIC -O2 -w
-fdeprecated-macro -fno-assume-sane-operator-new -mstackrealign
-fobjc-runtime=gcc -fcxx-exceptions -fexceptions -vectorize-loops
-vectorize-slp -x c++ isthisdeclarationadefinition.cpp 
1.    pcrecpp.cc:74:73: current parser token ';'
2.    pcrecpp.cc:52:1: parsing namespace 'pcrecpp'
isthisdeclarationadefinition.sh: line 1:  5510 Aborted                 (core
dumped) "/work/llvm/build.release/bin/clang" "-cc1" "-triple"
"x86_64-unknown-linux-gnu" "-emit-obj" "-mrelocation-model" "pic" "-pic-level"
"2" "-mthread-model" "posix" "-mdisable-fp-elim" "-fmath-errno" "-masm-verbose"
"-mconstructor-aliases" "-munwind-tables" "-fuse-init-array" "-target-cpu"
"x86-64" "-momit-leaf-frame-pointer" "-gline-tables-only" "-dwarf-column-info"
"-sys-header-deps" "-D" "HAVE_CONFIG_H" "-U" "_FORITFY_SOURCE" "-D" "PIC" "-O2"
"-w" "-fdeprecated-macro" "-fno-assume-sane-operator-new" "-mstackrealign"
"-fobjc-runtime=gcc" "-fcxx-exceptions" "-fexceptions" "-vectorize-loops"
"-vectorize-slp" "-x" "c++" "isthisdeclarationadefinition.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>