<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 --- - [AArch64] Compiler crash for function pointer access"
href="http://llvm.org/bugs/show_bug.cgi?id=20109">20109</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>[AArch64] Compiler crash for function pointer access
</td>
</tr>
<tr>
<th>Product</th>
<td>new-bugs
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Windows NT
</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>new bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>weimingz@codeaurora.org
</td>
</tr>
<tr>
<th>CC</th>
<td>llvmbugs@cs.uiuc.edu
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>//extern void (*foo) (); //GOOD
extern void foo();
unsigned char test(unsigned char *c) {
*(char*)&foo = 'A'; //BAD
return *(char*)&foo; //BAD
}
clang-3.5 -Os test.c -c -target aarch64
clang-3.5: llvm/lib/IR/DataLayout.cpp:632: unsigned int
llvm::DataLayout::getAlignment(llvm::Type*, bool) const: Assertion
`Ty->isSized() && "Cannot getTypeInfo() on a type that is unsized!"' failed.
0 clang-3.5 0x0000000000cb8ad2 llvm::sys::PrintStackTrace(_IO_FILE*) +
34
1 clang-3.5 0x0000000000cb86f4
2 libpthread.so.0 0x00007f6e98f608f0
3 libc.so.6 0x00007f6e9823eb25 gsignal + 53
4 libc.so.6 0x00007f6e98242670 abort + 384
5 libc.so.6 0x00007f6e982379f1 __assert_fail + 241
6 clang-3.5 0x000000000099a365
llvm::DataLayout::getAlignment(llvm::Type*, bool) const + 117
7 clang-3.5 0x00000000007b8505
8 clang-3.5 0x00000000007b8f65
9 clang-3.5 0x0000000000fdcadb
llvm::SelectionDAGISel::SelectCodeCommon(llvm::SDNode*, unsigned char const*,
unsigned int) + 8507
10 clang-3.5 0x00000000007bdea7
11 clang-3.5 0x0000000000fd7f15
llvm::SelectionDAGISel::DoInstructionSelection() + 693
12 clang-3.5 0x0000000000fdf590
llvm::SelectionDAGISel::CodeGenAndEmitDAG() + 992
13 clang-3.5 0x0000000000fe354a
llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) + 1690
14 clang-3.5 0x0000000000fe5470
llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) + 800
15 clang-3.5 0x00000000007c5350
16 clang-3.5 0x0000000000a318ef
llvm::FPPassManager::runOnFunction(llvm::Function&) + 655
17 clang-3.5 0x0000000000a31dcb
llvm::FPPassManager::runOnModule(llvm::Module&) + 43
18 clang-3.5 0x0000000000a3210d
llvm::legacy::PassManagerImpl::run(llvm::Module&) + 797
19 clang-3.5 0x00000000012c3776
clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::CodeGenOptions
const&, clang::TargetOptions const&, clang::LangOptions const&,
llvm::StringRef, llvm::Module*, clang::BackendAction, llvm::raw_ostream*) +
3126
20 clang-3.5 0x00000000012bd82f
21 clang-3.5 0x000000000172f3f3 clang::ParseAST(clang::Sema&, bool, bool)
+ 483
22 clang-3.5 0x00000000012be56b clang::CodeGenAction::ExecuteAction() +
59
23 clang-3.5 0x0000000000e1a1e6 clang::FrontendAction::Execute() + 118
24 clang-3.5 0x0000000000dfbdb0
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 304
25 clang-3.5 0x0000000000e9935e
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 2014
26 clang-3.5 0x000000000064a438 cc1_main(char const**, char const**, char
const*, void*) + 952
27 clang-3.5 0x0000000000648806 main + 7846
28 libc.so.6 0x00007f6e98229c4d __libc_start_main + 253
29 clang-3.5 0x00000000006455f9
Stack dump:</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>