<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=http://email.email.llvm.org/c/eJytVE1v1DAQ_TXJZdSV19l8HXJotxQhuMGJy8ofk6yp8yHb2aX_nnHSli4UBAJp7MT25L2XeZPIUT80b5wbHfTovegwYbcJu04K9hjLMqAPGzVNSXZd0shymgDjY_FGWCM89LMPMI1mCBBGEKCxNQNqOAlnhLQIxNHOgwpmHFZUgNNoNLRZwquE13A4iBCckXPAwwGWzeqM4j7h-5Vj2eLtlibKf4zs5lXJPwi_TFEJv4mx7OLXgG4gPr6nAUl58yTPBxGMWlUm_Boi86I05pS3z9RAp3cULx_4o_y9FUMH59HdezijtfFN3-73MIzhskT870p0-PyBynR6tU7P5JHoknqV8xP5f_KHCvBro9TY92LQr2aoKGt1DJ4MhauPv0E7ofOxzag5I7AJkIm2lFKJnWDYFjuNxU5WUmaVzuS2KIsyQ1Ww9gLlXUh46SPCZCx1sp-Voo-kna19gLMJx3EOsW1W12Pv9KM2rUG3SXWT6TqrRSpmynPNp_fCTDh06exscwxh8iRuNaIjpFluiIYW1p6eLleTG7-gIhF3xvsZqbx3eVZvi_TY1MVuy1ReS81FJnNR0utVsmS1VLRR6dQKidY3SU5V4wOeYYGIxuS36b8rMA1nnGJbsYqVbLuhWalW8Yrt8lyT7TuGvTB2E3E2o-tS1yyQcu48HVrjg_9-KLw33YC4CCaFwQSLzdqPnups9UBeBKAe6ehXEo74_C-BQfSYLvqaRdw3v_Jl8g>53916</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Clang shouldn't mangle the function name
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
TKaipeng
</td>
</tr>
</table>
<pre>
Error message
```
test.cpp:7:35: error: alias must point to a defined variable or function
void f3() __attribute__ ((weak, alias("f1")));
```
test.cpp
```c++
extern "C" {
static void * f1() {};
// static void* f1() {};
// Clang works well, GCC not
void f2() __attribute__ ((weak, alias("_ZL2f1v")));
// GCC works well, Clang not
void f3() __attribute__ ((weak, alias("f1")));
}
```
command
```
clang++ test.cpp -S
```
version: commit 3af7bbca4a0ef64de64b8bb38d3b167673ec60f0
It's compiled successfully without "static" modifier.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJytU01v1DAQ_TXJxerKsfN5yGG7pQjBDU5cVv6YZE2dD9nOLv33jJO2sFAQSEhjJ7HH7728GctJP7ZvnJscGcB70UNC7xK6T0r6FOtnAB92ap4Tvq9w8AInAvFYfBHWCE-GxQcyT2YMJExEEA2dGUGTs3BGSAsEObplVMFM44ZKyHkymnQ8YXXCGnI8ihCckUuA45Gsi_UFxEPCDhvHusS6DCfMfwp--6rkn4Rfp6iE3cZYV-FrADciHzvgIEl1-yzPBxGM2lQmbE8i86o05lR3L9QEd-8xfjzwV_kHK8aeXCb34MkFrI1_-vZwIOMUri1i_2bR8fMHtOn8qk8v5JHomnqT8wv5f6oPGvD7QqlpGMSoX81QUdZWMfJcUHLz8Q9oZ3A-thk2ZwQ2gXDRVVIqkQsKXZlrKHNZS8lrzWVWVmXFQZW0u0J5FxJW-YgwG4ud7Bel8JJ0i7WP5GLCaVpCbJut6rF3hkmbzoDbpbrluuGNSIMJFtrNWY8nrB4RNRD82x4vRTjBy60goxggXZxtTyHMHtVvleqRapE71IEf1p6fHzezm76AQpX3xvsF0P_7gjdZmZ5aqfMsa1jdZE1By5rrqoE8o4UsQHDF69QKCda3SYG2shEuZIWIlSvuUtMyyjCymta0otkOZ6U6xWqaF4XGquYUBmHsLurYTa5PXbtKkkvvcdMaH_z3TeG96UeAlQ7xxYLmufbTe2FmGPt05W5X7d8AGiVPlQ">