<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 --- - can't implicitly cast lvalue to rvalue with this cast kind"
href="https://llvm.org/bugs/show_bug.cgi?id=23286">23286</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>can't implicitly cast lvalue to rvalue with this cast kind
</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>All
</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>dimitry@andric.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>Reproduces with trunk r235079, with assertions enabled. Reduced test case:
======================================================================
struct ifmediareq {
if_media_t ifm_ulist
} fn1() {
ifmediareq *ifmr int *ep;
ep = ifm->ifm_list
======================================================================
Compile with:
$ clang -cc1 -triple x86_64-unknown-freebsd11.0 -emit-obj testcase.c
testcase.c:2:3: error: unknown type name 'if_media_t'
if_media_t ifm_ulist
^
testcase.c:2:23: warning: expected ';' at end of declaration list
if_media_t ifm_ulist
^
;
testcase.c:4:3: error: must use 'struct' tag to refer to type 'ifmediareq'
ifmediareq *ifmr int *ep;
^
struct
testcase.c:4:19: error: expected ';' at end of declaration
ifmediareq *ifmr int *ep;
^
;
testcase.c:5:8: error: use of undeclared identifier 'ifm'; did you mean 'ifmr'?
ep = ifm->ifm_list
^~~
ifmr
testcase.c:4:15: note: 'ifmr' declared here
ifmediareq *ifmr int *ep;
^
can't implicitly cast lvalue to rvalue with this cast kind
UNREACHABLE executed at
/share/dim/src/llvm/trunk/tools/clang/lib/Sema/Sema.cpp:347!
Abort trap</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>