[LLVMbugs] [Bug 23286] New: can't implicitly cast lvalue to rvalue with this cast kind

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sun Apr 19 06:27:39 PDT 2015


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: unassignedbugs at nondot.org
          Reporter: dimitry at andric.com
                CC: llvmbugs at cs.uiuc.edu
    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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20150419/c813a4f5/attachment.html>


More information about the llvm-bugs mailing list