[LLVMbugs] [Bug 12774] New: Crash in 'Combine redundant instructions' pass
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Wed May 9 08:19:57 PDT 2012
http://llvm.org/bugs/show_bug.cgi?id=12774
Bug #: 12774
Summary: Crash in 'Combine redundant instructions' pass
Product: new-bugs
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: new bugs
AssignedTo: unassignedbugs at nondot.org
ReportedBy: markus at trippelsdorf.de
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
Crash happened during boost testing.
% cat test.ii
typedef int uintmax_t;
namespace boost {
namespace fusion {
struct void_;
template < typename, typename, typename, typename = void_, typename =
void_, typename = void_, typename = void_, typename = void_, typename =
void_, typename = void_ > struct tuple;
template < typename > struct sequence_base {
};
template < typename T0, typename T1, typename T2 > struct vector_data3 {
T0 m0;
T1 m1;
T2 m2;
};
template < typename T0, typename T1,
typename T2 > struct vector3:vector_data3 < T0, T1, T2 >,
sequence_base < vector3 < T0, T1, T2 > > {
};
namespace detail {
template < typename T0, typename T1, typename T2, typename, typename,
typename, typename, typename, typename,
typename > struct vector_n_chooser {
typedef vector3 < T0, T1, T2 > type;
};
} template < typename T0, typename T1, typename T2, typename T3,
typename T4, typename T5, typename T6, typename T7, typename T8,
typename T9 > struct vector:sequence_base < vector < T0, T1, T2, T3, T4,
T5, T6, T7, T8, T9 > > {
typedef typename detail::vector_n_chooser < T0, T1, T2, T3, T4, T5, T6,
T7, T8, T9 >::type vector_n;
vector_n vec;
};
template < typename T0, typename T1, typename T2, typename T3,
typename T4, typename T5, typename T6, typename T7, typename T8,
typename T9 > struct tuple:vector < T0, T1, T2, T3, T4, T5, T6,
T7, T8, T9 > {
template < typename U0, typename U1,
typename U2 > void operator= (tuple < U0, U1, U2 >) {
}
};
template < typename T0, typename T1, typename T2 > tuple < T0 &, T1 &,
T2 & >tie (T0, T1, T2) {
}
} namespace math {
using boost::fusion::tuple;
using boost::fusion::tie;
namespace tools {
template < class F, class T > void schroeder_iterate (F p1, T, T, T,
int, uintmax_t &) {
math:
tie (0, 0, 0) = p1 (1);
}
}
}
}
uintmax_t a;
void
compile_and_link_test () {
typedef boost::math::tuple < double, double, double >(*F3) (double);
F3 b;
boost::math::tools::schroeder_iterate (b, 0, 0, 0, 0, a);
}
% clang++ -O2 -c -w test.ii
0 clang 0x000000000195053f
1 clang 0x00000000019509e0
2 libpthread.so.0 0x00007fada0330190
3 clang 0x00000000015fb180
4 clang 0x00000000015fcaa0
5 clang 0x00000000015dcc92
6 clang 0x00000000015dcf4e
7 clang 0x00000000018f0774
llvm::FPPassManager::runOnFunction(llvm::Function&) + 500
8 clang 0x00000000018f0813
llvm::FPPassManager::runOnModule(llvm::Module&) + 51
9 clang 0x00000000018f03b0
llvm::MPPassManager::runOnModule(llvm::Module&) + 464
10 clang 0x00000000018f04e0 llvm::PassManagerImpl::run(llvm::Module&)
+ 128
11 clang 0x0000000000707bdb
clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::CodeGenOptions
const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::Module*,
clang::BackendAction, llvm::raw_ostream*) + 1883
12 clang 0x0000000000705cbf
13 clang 0x000000000084436f clang::ParseAST(clang::Sema&, bool, bool)
+ 463
14 clang 0x00000000005db6b2
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 274
15 clang 0x00000000005c3b31
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1073
16 clang 0x00000000005b98f0 cc1_main(char const**, char const**, char
const*, void*) + 6352
17 clang 0x00000000005c23bf main + 671
18 libc.so.6 0x00007fad9fa3b655 __libc_start_main + 245
19 clang 0x00000000005b7ec9
Stack dump:
0. Program arguments: /usr/local/bin/clang -cc1 -triple
x86_64-unknown-linux-gnu -emit-obj -disable-free -disable-llvm-verifier
-main-file-name test.ii -mrelocation-model static -masm-verbose
-mconstructor-aliases -munwind-tables -target-cpu x86-64 -target-linker-version
2.22.52.20120422 -momit-leaf-frame-pointer -coverage-file test.o -resource-dir
/usr/local/bin/../lib/clang/3.1 -O2 -w -fdeprecated-macro
-fdebug-compilation-dir /tmp -ferror-limit 19 -fmessage-length 149
-mstackrealign -fgnu-runtime -fobjc-runtime-has-arc -fobjc-runtime-has-weak
-fobjc-fragile-abi -fcxx-exceptions -fexceptions -fdiagnostics-show-option
-fcolor-diagnostics -o test.o -x c++-cpp-output test.ii
1. <eof> parser at end of file
2. Per-module optimization passes
3. Running pass 'Function Pass Manager' on module 'test.ii'.
4. Running pass 'Combine redundant instructions' on function
'@_ZN5boost4math5tools17schroeder_iterateIPFNS_6fusion5tupleIdddNS3_5void_ES5_S5_S5_S5_S5_S5_EEdEiEEvT_T0_SA_SA_iRi'
clang: error: unable to execute command: Segmentation fault
% clang -v
clang version 3.1
Target: x86_64-unknown-linux-gnu
Thread model: posix
--
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