Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clang crashes when instantiating a function template whose body uses a global function of the same name #6165

Closed
llvmbot opened this issue Dec 16, 2009 · 1 comment
Labels
bugzilla Issues migrated from bugzilla c++

Comments

@llvmbot
Copy link
Collaborator

llvmbot commented Dec 16, 2009

Bugzilla Link 5793
Resolution FIXED
Resolved on Feb 22, 2010 12:44
Version trunk
OS All
Reporter LLVM Bugzilla Contributor
CC @chandlerc,@DougGregor

Extended Description

$ cat t.cc
void Foo(int);

template
class MI {
public:
void Foo() const {
using ::Foo;
Foo(0);
}
};

void Test() {
MI().Foo();
}

$ clang -cc1 t.cc
clang: Sema.h:3137: clang::Decl* clang::Sema::LocalInstantiationScope::getInstantiationOf(const clang::Decl*): Assertion `Result && "declaration was not instantiated in this scope!"' failed.
0 clang 0x0000000001601302
1 clang 0x000000000160189e
2 libpthread.so.0 0x00007f53e789c7d0
3 libc.so.6 0x00007f53e6bc0095 gsignal + 53
4 libc.so.6 0x00007f53e6bc1af0 abort + 272
5 libc.so.6 0x00007f53e6bb92df __assert_fail + 239
6 clang 0x00000000008912ea
7 clang 0x0000000000888f17
8 clang 0x00000000008674ee
9 clang 0x000000000087c7bc
10 clang 0x000000000086b00d
11 clang 0x000000000086f4a3
12 clang 0x000000000086a05c
13 clang 0x000000000086930c
14 clang 0x0000000000869565
15 clang 0x000000000087e3c5
16 clang 0x000000000086891c
17 clang 0x0000000000880caa
18 clang 0x000000000088fa03
19 clang 0x000000000088f4b7
20 clang 0x0000000000745181
21 clang 0x0000000000963d8b
22 clang 0x00000000007431de
23 clang 0x000000000044ee1c
24 clang 0x000000000044ef0c
25 clang 0x0000000000433272
26 clang 0x0000000000437c67 main + 251
27 libc.so.6 0x00007f53e6bac1c4 __libc_start_main + 244
28 clang 0x0000000000431f29
Stack dump:
0. Program arguments: clang -cc1 t.cc

  1.  Program arguments: t.cc Segmentation fault
    
@chandlerc
Copy link
Member

This appears to have been fixed.

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 3, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from bugzilla c++
Projects
None yet
Development

No branches or pull requests

2 participants