<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 --- - Explicit specialization of base inherited constructor: Assertion `Method->isCanonicalDecl() && Overridden->isCanonicalDecl()' failed."
   href="http://llvm.org/bugs/show_bug.cgi?id=19365">19365</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Explicit specialization of base inherited constructor: Assertion `Method->isCanonicalDecl() && Overridden->isCanonicalDecl()' failed.
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>3.4
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Other
          </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>hstong@ca.ibm.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>### REDUCED SOURCE:> cat crashes.cc 
struct A { template <class T> A(T t); };
template <> A::A(int) { }

struct B : A { using A::A; };

int main() { B b(42); }
Return:  0x00:0


### COMPILER INVOCATION:
<span class="quote">> clang++ -std=c++1y crashes.cc</span >


### COMPILER OUTPUT:
clang: /build/workdir/llvm-dev.src/tools/clang/lib/AST/ASTContext.cpp:1208:
void clang::ASTContext::addOverriddenMethod(const clang::CXXMethodDecl*, const
clang::CXXMethodDecl*): Assertion `Method->isCanonicalDecl() &&
Overridden->isCanonicalDecl()' failed.
0  clang     0x000000001370e64c llvm::sys::PrintStackTrace(_IO_FILE*) +
4273534868
1  clang     0x000000001370e980
2  clang     0x000000001370f230
3            0x00000fffb5dc0418 __kernel_sigtramp_rt64 + 0
4  libc.so.6 0x00000fffb591a038 abort + 4293567448
5  libc.so.6 0x00000fffb590eab8 __assert_fail + 4293526792
6  clang     0x00000000121de834
clang::ASTContext::addOverriddenMethod(clang::CXXMethodDecl const*,
clang::CXXMethodDecl const*) + 4253675500
7  clang     0x00000000122ec468
clang::CXXConstructorDecl::setInheritedConstructor(clang::CXXConstructorDecl
const*) + 4254681280
8  clang     0x000000001150e058
clang::TemplateDeclInstantiator::VisitCXXMethodDecl(clang::CXXMethodDecl*,
clang::TemplateParameterList*, bool) + 4241864944
9  clang     0x000000001150eb94
clang::TemplateDeclInstantiator::VisitCXXMethodDecl(clang::CXXMethodDecl*) +
4241867796
10 clang     0x000000001150ec9c
clang::TemplateDeclInstantiator::VisitCXXConstructorDecl(clang::CXXConstructorDecl*)
+ 4241867988
11 clang     0x00000000114f6848
12 clang     0x0000000011503834 clang::Sema::SubstDecl(clang::Decl*,
clang::DeclContext*, clang::MultiLevelTemplateArgumentList const&) + 4241822548
13 clang     0x0000000011499b3c
clang::Sema::FinishTemplateArgumentDeduction(clang::FunctionTemplateDecl*,
llvm::SmallVectorImpl<clang::DeducedTemplateArgument>&, unsigned int,
clang::FunctionDecl*&, clang::sema::TemplateDeductionInfo&,
llvm::SmallVectorImpl<clang::Sema::OriginalCallArg> const*) + 4241414996
14 clang     0x00000000114a5de8
clang::Sema::DeduceTemplateArguments(clang::FunctionTemplateDecl*,
clang::TemplateArgumentListInfo*, llvm::ArrayRef<clang::Expr*>,
clang::FunctionDecl*&, clang::sema::TemplateDeductionInfo&) + 4241463800
15 clang     0x000000001136b368
clang::Sema::AddTemplateOverloadCandidate(clang::FunctionTemplateDecl*,
clang::DeclAccessPair, clang::TemplateArgumentListInfo*,
llvm::ArrayRef<clang::Expr*>, clang::OverloadCandidateSet&, bool) + 4240271040
16 clang     0x00000000112d6de4
17 clang     0x00000000112d7394
18 clang     0x00000000112e9304
clang::InitializationSequence::InitializeFrom(clang::Sema&,
clang::InitializedEntity const&, clang::InitializationKind const&,
llvm::MutableArrayRef<clang::Expr*>, bool) + 4239797140
19 clang     0x00000000112e98f4
clang::InitializationSequence::InitializationSequence(clang::Sema&,
clang::InitializedEntity const&, clang::InitializationKind const&,
llvm::MutableArrayRef<clang::Expr*>, bool) + 4239798636
20 clang     0x0000000011060a30 clang::Sema::AddInitializerToDecl(clang::Decl*,
clang::Expr*, bool, bool) + 4237354824
21 clang     0x0000000010eb6d94
clang::Parser::ParseDeclarationAfterDeclaratorAndAttributes(clang::Declarator&,
clang::Parser::ParsedTemplateInfo const&) + 4235787892
22 clang     0x0000000010ebef30
clang::Parser::ParseDeclGroup(clang::ParsingDeclSpec&, unsigned int, bool,
clang::SourceLocation*, clang::Parser::ForRangeInit*) + 4235820088
23 clang     0x0000000010ec8a70
clang::Parser::ParseSimpleDeclaration(llvm::SmallVector<clang::Stmt*, 32u>&,
unsigned int, clang::SourceLocation&,
clang::Parser::ParsedAttributesWithRange&, bool, clang::Parser::ForRangeInit*)
+ 4235859520
24 clang     0x0000000010ec8e8c
clang::Parser::ParseDeclaration(llvm::SmallVector<clang::Stmt*, 32u>&, unsigned
int, clang::SourceLocation&, clang::Parser::ParsedAttributesWithRange&) +
4235860548
25 clang     0x0000000010f2dbbc
clang::Parser::ParseStatementOrDeclarationAfterAttributes(llvm::SmallVector<clang::Stmt*,
32u>&, bool, clang::SourceLocation*, clang::Parser::ParsedAttributesWithRange&)
+ 4236249044
26 clang     0x0000000010f277d8
clang::Parser::ParseStatementOrDeclaration(llvm::SmallVector<clang::Stmt*,
32u>&, bool, clang::SourceLocation*) + 4236224048
27 clang     0x0000000010f28170 clang::Parser::ParseCompoundStatementBody(bool)
+ 4236226456
28 clang     0x0000000010f286f8
clang::Parser::ParseFunctionStatementBody(clang::Decl*,
clang::Parser::ParseScope&) + 4236227848
29 clang     0x0000000010ea3fbc
clang::Parser::ParseFunctionDefinition(clang::ParsingDeclarator&,
clang::Parser::ParsedTemplateInfo const&, clang::Parser::LateParsedAttrList*) +
4235720724
30 clang     0x0000000010ebeba8
clang::Parser::ParseDeclGroup(clang::ParsingDeclSpec&, unsigned int, bool,
clang::SourceLocation*, clang::Parser::ForRangeInit*) + 4235819184
31 clang     0x0000000010e9ea48
clang::Parser::ParseDeclOrFunctionDefInternal(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec&, clang::AccessSpecifier) + 4235699544
32 clang     0x0000000010e9eb1c
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*, clang::AccessSpecifier) + 4235699732
33 clang     0x0000000010ea1f6c
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*) + 4235712596
34 clang     0x0000000010ea256c
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&) +
4235714084
35 clang     0x0000000010e988ac clang::ParseAST(clang::Sema&, bool, bool) +
4235685476
36 clang     0x0000000010818624 clang::ASTFrontendAction::ExecuteAction() +
4229756484
37 clang     0x0000000010baec94 clang::CodeGenAction::ExecuteAction() +
4232996092
38 clang     0x0000000010818b60 clang::FrontendAction::Execute() + 4229757464
39 clang     0x00000000107db708
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 4229527256
40 clang     0x0000000010788880
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 4229256424
41 clang     0x0000000010771248 cc1_main(char const**, char const**, char
const*, void*) + 4229173584
42 clang     0x0000000010781af0 main + 4229230608
43 libc.so.6 0x00000fffb58ff13c
44 libc.so.6 0x00000fffb58ff34c __libc_start_main + 4293465684
Stack dump:
0.      Program arguments: /bin/clang -cc1 -triple powerpc64-unknown-linux-gnu
-S -disable-free -main-file-name crashes.cc -mrelocation-model static
-mdisable-fp-elim -fmath-errno -mconstructor-aliases -target-cpu ppc64
-target-linker-version 11 -resource-dir /bin/../lib/clang/3.4 -internal-isystem
/usr/lib64/gcc/powerpc64-suse-linux/4.3/../../../../include/c++/4.3
-internal-isystem
/usr/lib64/gcc/powerpc64-suse-linux/4.3/../../../../include/c++/4.3/powerpc64-suse-linux
-internal-isystem
/usr/lib64/gcc/powerpc64-suse-linux/4.3/../../../../include/c++/4.3/backward
-internal-isystem
/usr/lib64/gcc/powerpc64-suse-linux/4.3/../../../../include/powerpc64-suse-linux/c++/4.3
-internal-isystem /usr/local/include -internal-isystem
/bin/../lib/clang/3.4/include -internal-externc-isystem /include
-internal-externc-isystem /usr/include -std=c++1y -fdeprecated-macro
-fno-dwarf-directory-asm -fdebug-compilation-dir /tmp -ferror-limit 19
-fmessage-length 0 -mstackrealign -fno-signed-char -fobjc-runtime=gcc
-fcxx-exceptions -fexceptions -fdiagnostics-show-option -vectorize-slp -o
/tmp/crashes-94e8e0.s -x c++ crashes.cc
1.      crashes.cc:6:21: current parser token ';'
2.      crashes.cc:6:12: parsing function body 'main'
3.      crashes.cc:6:12: in compound statement ('{}')
clang: error: unable to execute command: Aborted (core dumped)
clang: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 3.4
Target: powerpc64-unknown-linux-gnu
Thread model: posix
clang: note: diagnostic msg: PLEASE submit a bug report to
<a href="http://llvm.org/bugs/">http://llvm.org/bugs/</a> and include the crash backtrace, preprocessed source, and
associated run script.
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/crashes-ed4ee0.cpp
clang: note: diagnostic msg: /tmp/crashes-ed4ee0.sh
clang: note: diagnostic msg:

********************</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>