[LLVMbugs] [Bug 7249] New: Crash in qualified member call when member function has same name as base class
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Fri May 28 10:43:12 PDT 2010
http://llvm.org/bugs/show_bug.cgi?id=7249
Summary: Crash in qualified member call when member function
has same name as base class
Product: clang
Version: trunk
Platform: PC
OS/Version: All
Status: NEW
Severity: normal
Priority: P
Component: C++
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: jyasskin at google.com
CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com
I'm not sure if this is valid. Neither gcc nor comeau accept it.
dhcp-172-31-155-187:~/tmp$ cat test2.cc
namespace hide {
template<typename T> struct base {
void bar(double) {}
};
struct Value : base<double> {
template<typename T> void base(const T& value) {}
};
}
void foo() {
hide::Value v;
v.base<double>::bar(3.2);
}
dhcp-172-31-155-187:~/tmp$ gdb --args
"/Users/jyasskin/src/llvm/clang/obj/Debug/bin/clang" -cc1 -fsyntax-only
test2.cc
GNU gdb 6.3.50-20050815 (Apple version gdb-962) (Sat Jul 26 08:14:40 UTC 2008)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-apple-darwin"...Reading symbols for shared
libraries ..... done
(gdb) run
Starting program: /Users/jyasskin/src/llvm/clang/obj/Debug/bin/clang -cc1
-fsyntax-only test2.cc
Reading symbols for shared libraries +++. done
Assertion failed: (false && "FIXME: Only type template names supported here"),
function ParseOptionalCXXScopeSpecifier, file
/Users/jyasskin/src/llvm/clang/src/tools/clang/lib/Parse/ParseExprCXX.cpp, line
222.
Program received signal SIGABRT, Aborted.
0x96bc7e42 in __kill ()
(gdb) bt
#0 0x96bc7e42 in __kill ()
#1 0x96bc7e34 in kill$UNIX2003 ()
#2 0x96c3a23a in raise ()
#3 0x96c46679 in abort ()
#4 0x96c3b3db in __assert_rtn ()
#5 0x0062b969 in clang::Parser::ParseOptionalCXXScopeSpecifier
(this=0xbfffecd8, SS=@0xbfffcf84, ObjectType=0x1907bc0, EnteringContext=false,
MayBePseudoDestructor=0xbfffcf7f) at
/Users/jyasskin/src/llvm/clang/src/tools/clang/lib/Parse/ParseExprCXX.cpp:222
#6 0x00625ea8 in clang::Parser::ParsePostfixExpressionSuffix (this=0xbfffecd8,
LHS=@0xbfffd35c) at
/Users/jyasskin/src/llvm/clang/src/tools/clang/lib/Parse/ParseExpr.cpp:1024
#7 0x00621da0 in clang::Parser::ParseCastExpression (this=0xbfffecd8,
isUnaryExpression=false, isAddressOfOperand=false, NotCastExpr=@0xbfffd817,
TypeOfCast=0x0) at
/Users/jyasskin/src/llvm/clang/src/tools/clang/lib/Parse/ParseExpr.cpp:668
#8 0x00623ef5 in clang::Parser::ParseCastExpression (this=0xbfffecd8,
isUnaryExpression=false, isAddressOfOperand=false, TypeOfCast=0x0) at
/Users/jyasskin/src/llvm/clang/src/tools/clang/lib/Parse/ParseExpr.cpp:424
#9 0x00624093 in clang::Parser::ParseAssignmentExpression (this=0xbfffecd8) at
/Users/jyasskin/src/llvm/clang/src/tools/clang/lib/Parse/ParseExpr.cpp:231
#10 0x006245ab in clang::Parser::ParseExpression (this=0xbfffecd8) at
/Users/jyasskin/src/llvm/clang/src/tools/clang/lib/Parse/ParseExpr.cpp:180
#11 0x006406c2 in clang::Parser::ParseStatementOrDeclaration (this=0xbfffecd8,
OnlyStatement=false) at
/Users/jyasskin/src/llvm/clang/src/tools/clang/lib/Parse/ParseStmt.cpp:126
#12 0x006450c4 in clang::Parser::ParseCompoundStatementBody (this=0xbfffecd8,
isStmtExpr=false) at
/Users/jyasskin/src/llvm/clang/src/tools/clang/lib/Parse/ParseStmt.cpp:471
#13 0x00645797 in clang::Parser::ParseFunctionStatementBody (this=0xbfffecd8,
Decl={Ptr = 0x19078a0}) at
/Users/jyasskin/src/llvm/clang/src/tools/clang/lib/Parse/ParseStmt.cpp:1463
#14 0x0064f39e in clang::Parser::ParseFunctionDefinition (this=0xbfffecd8,
D=@0xbfffded0, TemplateInfo=@0xbfffe1cc) at
/Users/jyasskin/src/llvm/clang/src/tools/clang/lib/Parse/Parser.cpp:686
#15 0x0060f731 in clang::Parser::ParseDeclGroup (this=0xbfffecd8,
DS=@0xbfffe2ec, Context=0, AllowFunctionDefinitions=true, DeclEnd=0x0) at
/Users/jyasskin/src/llvm/clang/src/tools/clang/lib/Parse/ParseDecl.cpp:409
#16 0x0064d80a in clang::Parser::ParseDeclarationOrFunctionDefinition
(this=0xbfffecd8, DS=@0xbfffe2ec, Attr=0x0, AS=clang::AS_none) at
/Users/jyasskin/src/llvm/clang/src/tools/clang/lib/Parse/Parser.cpp:587
#17 0x0064d85a in clang::Parser::ParseDeclarationOrFunctionDefinition
(this=0xbfffecd8, Attr=0x0, AS=clang::AS_none) at
/Users/jyasskin/src/llvm/clang/src/tools/clang/lib/Parse/Parser.cpp:594
#18 0x0064e63c in clang::Parser::ParseExternalDeclaration (this=0xbfffecd8,
Attr={AttrList = 0x0, Range = {B = {ID = 0}, E = {ID = 0}}, HasAttr = false})
at /Users/jyasskin/src/llvm/clang/src/tools/clang/lib/Parse/Parser.cpp:483
#19 0x0064e77a in clang::Parser::ParseTopLevelDecl (this=0xbfffecd8,
Result=@0xbfffeddc) at
/Users/jyasskin/src/llvm/clang/src/tools/clang/lib/Parse/Parser.cpp:355
#20 0x00256b92 in clang::ParseAST (PP=@0x1903640, Consumer=0x1905e50,
Ctx=@0x2022e00, PrintStats=false, CompleteTranslationUnit=true,
CompletionConsumer=0x0) at
/Users/jyasskin/src/llvm/clang/src/tools/clang/lib/Sema/ParseAST.cpp:87
#21 0x0004d05c in clang::ASTFrontendAction::ExecuteAction (this=0x19030f0) at
/Users/jyasskin/src/llvm/clang/src/tools/clang/lib/Frontend/FrontendAction.cpp:224
#22 0x0004cf4c in clang::FrontendAction::Execute (this=0x19030f0) at
/Users/jyasskin/src/llvm/clang/src/tools/clang/lib/Frontend/FrontendAction.cpp:150
#23 0x0002d41f in clang::CompilerInstance::ExecuteAction (this=0x19018c0,
Act=@0x19030f0) at
/Users/jyasskin/src/llvm/clang/src/tools/clang/lib/Frontend/CompilerInstance.cpp:513
#24 0x0000392a in cc1_main (ArgBegin=0xbffff698, ArgEnd=0xbffff6a0,
Argv0=0xbffff74c "/Users/jyasskin/src/llvm/clang/obj/Debug/bin/clang",
MainAddr=0xa264) at
/Users/jyasskin/src/llvm/clang/src/tools/clang/tools/driver/cc1_main.cpp:286
#25 0x0000b054 in main (argc=4, argv=0xbffff690) at
/Users/jyasskin/src/llvm/clang/src/tools/clang/tools/driver/driver.cpp:186
(gdb)
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list