https://llvm.org/bugs/show_bug.cgi?id=23286
Bug ID: 23286
Summary: can't implicitly cast lvalue to rvalue with this cast
kind
Product: new-bugs
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: new bugs
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Classification: Unclassified
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
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs