[LLVMbugs] [Bug 16060] New: Incorrect linkage for testcase with static member of local type in inline function

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri May 17 15:11:23 PDT 2013


http://llvm.org/bugs/show_bug.cgi?id=16060

            Bug ID: 16060
           Summary: Incorrect linkage for testcase with static member of
                    local type in inline function
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++11
          Assignee: unassignedclangbugs at nondot.org
          Reporter: rafael.espindola at gmail.com
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Clang incorrectly rejects

template <typename T>
struct foo {
  template <T *P> static void f() {
  }
  static void *g() {
    return (void*)f<&x>;
  }
  static T x;
};
template<typename T> T foo<T>::x;
inline void *f() {
  struct S {
  };
  return foo<S>::g();
}
void *h() {
  return f();
}

because it thinks 'x' has no linkage.

-- 
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/20130517/79526e6c/attachment.html>


More information about the llvm-bugs mailing list