<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 --- - tls related miscompile"
href="http://llvm.org/bugs/show_bug.cgi?id=18521">18521</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>tls related miscompile
</td>
</tr>
<tr>
<th>Product</th>
<td>libraries
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</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>Backend: Sparc
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>rdivacky@freebsd.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>nova ~/delta-2006.08.03$ cat runetest.c
typedef struct {
}
_RuneLocale;
extern const _RuneLocale _DefaultRuneLocale;
extern const _RuneLocale *_CurrentRuneLocale;
extern __thread const _RuneLocale *_ThreadRuneLocale;
static __inline const _RuneLocale *__getCurrentRuneLocale(void) {
if (_CurrentRuneLocale) return _CurrentRuneLocale;
}
int main(int argc, char *argv[]) {
printf("trl: %p", _ThreadRuneLocale);
printf("crl: %p", (__getCurrentRuneLocale()));
printf("drl: %p", &_DefaultRuneLocale);
printf("gcrl: %p", __getCurrentRuneLocale());
}
nova ~/delta-2006.08.03$ gcc runetest.c && ./a.out
runetest.c: In function 'main':
runetest.c:11: warning: incompatible implicit declaration of built-in function
'printf'
trl: 0x0crl: 0x200e38drl: 0x200e38gcrl: 0x200e38nova ~/delta-2006.08.03$
nova ~/delta-2006.08.03$ ~/llvm/Release+Asserts/bin/clang runetest.c && ./a.out
runetest.c:9:4: warning: control may reach end of non-void function
[-Wreturn-type]
}
^
runetest.c:11:13: warning: implicitly declaring library function 'printf' with
type 'int (const char *, ...)'
printf("trl: %p", _ThreadRuneLocale);
^
runetest.c:11:13: note: please include the header <stdio.h> or explicitly
provide a declaration for 'printf'
2 warnings generated.
Segmentation fault (core dumped)</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>