https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=289122

            Bug ID: 289122
           Summary: powerpc: llvm.threadlocal.address first argument must
                    be a GlobalValue
           Product: Base System
           Version: CURRENT
          Hardware: powerpc
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: bin
          Assignee: [email protected]
          Reporter: [email protected]

There seems to be an issue with building math/nauty port on powerpc*.
Clang throws (when using reduced reproducer):
llvm.threadlocal.address first argument must be a GlobalValue
in function g
fatal error: error in backend: Broken function found, compilation aborted!

This error doesn't happen with 14.3-RELEASSE, only CURRENT, even though both
use LLVM 19.1.7. It's in a C file, so probably something changed in our base
libraries. It also doesn't happen when trying to use llvm-devel port, so I'm
not reporting it upstream. I'm not sure which upstream commit fixed it, but
would it be possible to backport the fix to our LLVM?

Reproducer:
static int a[] = {0, 1};
static _Thread_local int b[] = {0, 0, 1};
int f, e, ah;
void g(void) {
  f = b[e];
  ah = a[f];
}

Build with:
cc -cc1 -triple powerpc64le-unknown-freebsd15.0 -emit-obj -O1
gentourng-15988f.c

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to