[LLVMbugs] [Bug 10757] New: clang crashes from gcc torture test g++.dg/cpp0x/defaulted3.C
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Thu Aug 25 20:00:45 PDT 2011
http://llvm.org/bugs/show_bug.cgi?id=10757
Summary: clang crashes from gcc torture test
g++.dg/cpp0x/defaulted3.C
Product: clang
Version: 2.9
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: Frontend
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: rkotler at mips.com
CC: llvmbugs at cs.uiuc.edu
Created an attachment (id=7136)
--> (http://llvm.org/bugs/attachment.cgi?id=7136)
defaulted3.C
rkotler at ubuntu-rkotler:~/icpc$ ~/build_llvm/install/bin/clang++
/home/rkotler/gcc-4.4.6/gcc/testsuite/g++.dg/cpp0x/defaulted3.C
/home/rkotler/gcc-4.4.6/gcc/testsuite/g++.dg/cpp0x/defaulted3.C:7:34: warning:
deleted function definition accepted as a C++0x extension
[-Wc++0x-extensions]
bool operator==(const A<U>&) = delete; // { dg-error "deleted function" }
^
/home/rkotler/gcc-4.4.6/gcc/testsuite/g++.dg/cpp0x/defaulted3.C:15:9: error:
overload resolution selected deleted operator '=='
if(a1 == a2) {} // { dg-error "used here" }
~~ ^ ~~
/home/rkotler/gcc-4.4.6/gcc/testsuite/g++.dg/cpp0x/defaulted3.C:7:8: note:
candidate function [with U = void] has been explicitly deleted
bool operator==(const A<U>&) = delete; // { dg-error "deleted function" }
^
0 clang 0x00000000028f3411
1 clang 0x00000000028f3204
2 libpthread.so.0 0x00007f6db20c68f0
3 libc.so.6 0x00007f6db14a9252
4 libstdc++.so.6 0x00007f6db1c485cc std::string::operator+=(char const*) + 28
5 clang 0x000000000157000e
6 clang 0x0000000001570f8d
clang::OverloadCandidateSet::NoteCandidates(clang::Sema&,
clang::OverloadCandidateDisplayKind, clang::Expr**, unsigned int, char const*,
clang::SourceLocation) + 707
7 clang 0x00000000015750c5
clang::Sema::CreateOverloadedBinOp(clang::SourceLocation, unsigned int,
clang::UnresolvedSetImpl const&, clang::Expr*, clang::Expr*) + 4789
8 clang 0x00000000014bba3e clang::Sema::BuildBinOp(clang::Scope*,
clang::SourceLocation, clang::BinaryOperatorKind, clang::Expr*, clang::Expr*) +
506
9 clang 0x00000000014bb83c clang::Sema::ActOnBinOp(clang::Scope*,
clang::SourceLocation, clang::tok::TokenKind, clang::Expr*, clang::Expr*) + 190
10 clang 0x000000000138396d
clang::Parser::ParseRHSOfBinaryExpression(clang::ActionResult<clang::Expr*,
true>, clang::prec::Level) + 2185
11 clang 0x0000000001382ff3
clang::Parser::ParseAssignmentExpression() + 193
12 clang 0x0000000001382dda clang::Parser::ParseExpression() + 24
13 clang 0x000000000138e615
clang::Parser::ParseCXXCondition(clang::ActionResult<clang::Expr*, true>&,
clang::Decl*&, clang::SourceLocation, bool) + 179
14 clang 0x000000000134b142
clang::Parser::ParseParenExprOrCondition(clang::ActionResult<clang::Expr*,
true>&, clang::Decl*&, clang::SourceLocation, bool) + 108
15 clang 0x000000000134b441
clang::Parser::ParseIfStatement(clang::ParsedAttributes&) + 455
16 clang 0x0000000001348e14
clang::Parser::ParseStatementOrDeclaration(clang::ASTOwningVector<clang::Stmt*,
32u>&, bool) + 2516
17 clang 0x000000000134aca3
clang::Parser::ParseCompoundStatementBody(bool) + 1113
18 clang 0x000000000134e9c1
clang::Parser::ParseFunctionStatementBody(clang::Decl*,
clang::Parser::ParseScope&) + 245
19 clang 0x000000000135e4b6
clang::Parser::ParseFunctionDefinition(clang::Parser::ParsingDeclarator&,
clang::Parser::ParsedTemplateInfo const&) + 2518
20 clang 0x0000000001369b39
clang::Parser::ParseDeclGroup(clang::Parser::ParsingDeclSpec&, unsigned int,
bool, clang::SourceLocation*, clang::Parser::ForRangeInit*) + 523
21 clang 0x000000000135da43
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::Parser::ParsingDeclSpec&,
clang::AccessSpecifier) + 1043
22 clang 0x000000000135dac1
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::ParsedAttributes&,
clang::AccessSpecifier) + 113
23 clang 0x000000000135d2fd
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::Parser::ParsingDeclSpec*) + 2521
24 clang 0x000000000135c875
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&) + 309
25 clang 0x000000000133b17a clang::ParseAST(clang::Sema&, bool) + 455
26 clang 0x000000000105f1a5 clang::ASTFrontendAction::ExecuteAction()
+ 263
27 clang 0x00000000011bcab8 clang::CodeGenAction::ExecuteAction() +
968
28 clang 0x000000000105edf6 clang::FrontendAction::Execute() + 326
29 clang 0x0000000001043f83
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 751
30 clang 0x0000000001015f33
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 912
31 clang 0x0000000001006b5c cc1_main(char const**, char const**, char
const*, void*) + 987
32 clang 0x0000000001011552 main + 499
33 libc.so.6 0x00007f6db13a0c4d __libc_start_main + 253
34 clang 0x00000000010061f9
Stack dump:
0. Program arguments: /home/rkotler/build_llvm/install/bin/clang -cc1
-triple x86_64-unknown-linux-gnu -emit-obj -mrelax-all -disable-free
-main-file-name defaulted3.C -mrelocation-model static -mdisable-fp-elim
-masm-verbose -mconstructor-aliases -munwind-tables -target-cpu x86-64
-target-linker-version 2.20.1 -momit-leaf-frame-pointer -resource-dir
/home/rkotler/build_llvm/install/bin/../lib/clang/3.0 -fdeprecated-macro
-ferror-limit 19 -fmessage-length 80 -fcxx-exceptions -fexceptions
-fdiagnostics-show-option -fcolor-diagnostics -o /tmp/cc-GocZBP.o -x c++
/home/rkotler/gcc-4.4.6/gcc/testsuite/g++.dg/cpp0x/defaulted3.C
1. /home/rkotler/gcc-4.4.6/gcc/testsuite/g++.dg/cpp0x/defaulted3.C:15:14:
current parser token ')'
2. /home/rkotler/gcc-4.4.6/gcc/testsuite/g++.dg/cpp0x/defaulted3.C:12:1:
parsing function body 'main'
3. /home/rkotler/gcc-4.4.6/gcc/testsuite/g++.dg/cpp0x/defaulted3.C:12:1: in
compound statement ('{}')
clang: error: unable to execute command: Segmentation fault
clang: error: clang frontend command failed due to signal 2 (use -v to see
invocation)
clang: note: diagnostic msg: Please submit a bug report to http://llvm.org and
include command line arguments and all diagnostic information.
clang: note: diagnostic msg: Preprocessed source(s) are located at:
clang: note: diagnostic msg: /tmp/cc-OYpoOQ.ii
--
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