<html>
<head>
<base href="https://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 --- - crash with weak alias attribute with same name with function"
href="https://llvm.org/bugs/show_bug.cgi?id=23509">23509</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>crash with weak alias attribute with same name with function
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>Other
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</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>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>kli@ca.ibm.com
</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>$ cat d1a.c
int foo();
int foo() __attribute__((weak,alias("foo")));
$ clang -v d1a.c
clang version 3.7.0 (<a href="http://llvm.org/git/clang.git">http://llvm.org/git/clang.git</a>
990bb3c80c90fa29797082baf72d1a67817fd1eb) (<a href="http://llvm.org/git/llvm.git">http://llvm.org/git/llvm.git</a>
d3a9dd70429239093b136e178147ec0425dab269)
Target: powerpc64le-unknown-linux-gnu
Thread model: posix
Found candidate GCC installation: /usr/lib/gcc/powerpc64le-linux-gnu/4.9
Found candidate GCC installation: /usr/lib/gcc/powerpc64le-linux-gnu/4.9.1
Selected GCC installation: /usr/lib/gcc/powerpc64le-linux-gnu/4.9
Candidate multilib: .;@m64
Selected multilib: .;@m64
"/home/kli/wrk/dtmp-clang/builds/Debug+Asserts/bin/clang" -cc1 -triple
powerpc64le-unknown-linux-gnu -emit-obj -mrelax-all -disable-free
-main-file-name d1a.c -mrelocation-model static -mthread-model posix
-mdisable-fp-elim -fmath-errno -masm-verbose -mconstructor-aliases
-fuse-init-array -target-cpu ppc64le -target-abi elfv2 -target-linker-version
2.24.90.20141014 -v -dwarf-column-info -fno-unique-section-names -resource-dir
/home/kli/wrk/dtmp-clang/builds/Debug+Asserts/bin/../lib/clang/3.7.0
-internal-isystem /usr/local/include -internal-isystem
/home/kli/wrk/dtmp-clang/builds/Debug+Asserts/bin/../lib/clang/3.7.0/include
-internal-externc-isystem /usr/include/powerpc64le-linux-gnu
-internal-externc-isystem /include -internal-externc-isystem /usr/include
-fdebug-compilation-dir /home/kli/wrk -ferror-limit 19 -fmessage-length 80
-mstackrealign -fno-signed-char -fobjc-runtime=gcc -fdiagnostics-show-option
-fcolor-diagnostics -o /tmp/d1a-00eef8.o -x c d1a.c
clang -cc1 version 3.7.0 based upon LLVM 3.7.0svn default target
powerpc64le-unknown-linux-gnu
ignoring nonexistent directory "/include"
#include "..." search starts here:
#include <...> search starts here:
/usr/local/include
/home/kli/wrk/dtmp-clang/builds/Debug+Asserts/bin/../lib/clang/3.7.0/include
/usr/include/powerpc64le-linux-gnu
/usr/include
End of search list.
clang:
/gsa/tlbgsa-h1/00/kli/clang-latest/llvm/include/llvm/Support/Casting.h:237:
typename llvm::cast_retty<X, Y*>::ret_type llvm::cast(Y*) [with X =
llvm::GlobalAlias; Y = llvm::GlobalValue; typename llvm::cast_retty<X,
Y*>::ret_type = llvm::GlobalAlias*]: Assertion `isa<X>(Val) && "cast<Ty>()
argument of incompatible type!"' failed.
#0 0x15db8828 llvm::sys::PrintStackTrace(llvm::raw_ostream&)
/gsa/tlbgsa-h1/00/kli/clang-latest/llvm/lib/Support/Unix/Signals.inc:431:0
#1 0x15db8c84 PrintStackTraceSignalHandler(void*)
/gsa/tlbgsa-h1/00/kli/clang-latest/llvm/lib/Support/Unix/Signals.inc:488:0
#2 0x15db6fbc SignalHandler(int)
/gsa/tlbgsa-h1/00/kli/clang-latest/llvm/lib/Support/Unix/Signals.inc:206:0
0 clang 0x0000000015db8828 llvm::sys::PrintStackTrace(llvm::raw_ostream&)
+ 92
1 clang 0x0000000015db8c84
2 clang 0x0000000015db6fbc
3 0x00003fff9f7f0478 __kernel_sigtramp_rt64 + 0
4 libc.so.6 0x00003fff9f3406b8 gsignal + 72
5 libc.so.6 0x00003fff9f34295c abort + 636
6 libc.so.6 0x00003fff9f336274
7 libc.so.6 0x00003fff9f336364 __assert_fail + 100
8 clang 0x00000000116e756c
9 clang 0x00000000116cff64 clang::CodeGen::CodeGenModule::checkAliases() +
264
10 clang 0x00000000116d06d0 clang::CodeGen::CodeGenModule::Release() + 84
11 clang 0x00000000115b363c
12 clang 0x000000001158310c
13 clang 0x0000000011a14914 clang::ParseAST(clang::Sema&, bool, bool) + 928
14 clang 0x0000000011094c80 clang::ASTFrontendAction::ExecuteAction() + 468
15 clang 0x00000000115867e0 clang::CodeGenAction::ExecuteAction() + 1472
16 clang 0x0000000011094544 clang::FrontendAction::Execute() + 200
17 clang 0x00000000110334c0
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 1068
18 clang 0x0000000010fb8168
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1416
19 clang 0x0000000010f8f208 cc1_main(llvm::ArrayRef<char const*>, char
const*, void*) + 876
20 clang 0x0000000010fabe04
21 clang 0x0000000010fac5bc main + 1072
22 libc.so.6 0x00003fff9f324e80
23 libc.so.6 0x00003fff9f325074 __libc_start_main + 196
Stack dump:
0. Program arguments:
/home/kli/wrk/dtmp-clang/builds/Debug+Asserts/bin/clang -cc1 -triple
powerpc64le-unknown-linux-gnu -emit-obj -mrelax-all -disable-free
-main-file-name d1a.c -mrelocation-model static -mthread-model posix
-mdisable-fp-elim -fmath-errno -masm-verbose -mconstructor-aliases
-fuse-init-array -target-cpu ppc64le -target-abi elfv2 -target-linker-version
2.24.90.20141014 -v -dwarf-column-info -fno-unique-section-names -resource-dir
/home/kli/wrk/dtmp-clang/builds/Debug+Asserts/bin/../lib/clang/3.7.0
-internal-isystem /usr/local/include -internal-isystem
/home/kli/wrk/dtmp-clang/builds/Debug+Asserts/bin/../lib/clang/3.7.0/include
-internal-externc-isystem /usr/include/powerpc64le-linux-gnu
-internal-externc-isystem /include -internal-externc-isystem /usr/include
-fdebug-compilation-dir /home/kli/wrk -ferror-limit 19 -fmessage-length 80
-mstackrealign -fno-signed-char -fobjc-runtime=gcc -fdiagnostics-show-option
-fcolor-diagnostics -o /tmp/d1a-00eef8.o -x c d1a.c
1. <eof> parser at end of file
2. Per-file LLVM IR generation
clang: error: unable to execute command: Aborted
clang: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 3.7.0 (<a href="http://llvm.org/git/clang.git">http://llvm.org/git/clang.git</a>
990bb3c80c90fa29797082baf72d1a67817fd1eb) (<a href="http://llvm.org/git/llvm.git">http://llvm.org/git/llvm.git</a>
d3a9dd70429239093b136e178147ec0425dab269)
Target: powerpc64le-unknown-linux-gnu
Thread model: posix
clang: note: diagnostic msg: PLEASE submit a bug report to
<a href="http://llvm.org/bugs/">http://llvm.org/bugs/</a> and include the crash backtrace, preprocessed source, and
associated run script.
clang: note: diagnostic msg:
********************
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang: note: diagnostic msg: /tmp/d1a-85e08a.c
clang: note: diagnostic msg: /tmp/d1a-85e08a.sh
clang: note: diagnostic msg:
********************</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>