Skip to content

std.array calls non-existent Trace hook in version(D_ProfileGC) #10989

Closed

Description

@0xEAB
./dev/dmd/generated/linux/release/64/dmd -profile=gc test.d
/usr/bin/ld: test.o: in function `std.array.arrayAllocImpl!(false, ulong[], ulong).arrayAllocImpl(ulong)':
test.d:(.text._D3std5array__T14arrayAllocImplVbi0TAmTmZQBaFNaNbmZQp[_D3std5array__T14arrayAllocImplVbi0TAmTmZQBaFNaNbmZQp]+0x53): undefined reference to `_d_newarrayUTrace'
collect2: error: ld returned 1 exit status
Error: undefined reference to `_d_newarrayUTrace`
       referenced from `pure nothrow ulong[] std.array.arrayAllocImpl!(false, ulong[], ulong).arrayAllocImpl(ulong)`
       perhaps a library needs to be added with the `-L` flag or `pragma(lib, ...)`
Error: linker exited with status 1
       cc test.o -o test -m64 -Xlinker --export-dynamic -L./dev/dmd/generated/linux/release/64/../../../../../phobos/generated/linux/release/64 -Xlinker -Bstatic -lphobos2 -Xlinker -Bdynamic -lpthread -lm -lrt -ldl 
git -C dev/dmd status
On branch master
Your branch is up to date with 'origin/master'.

nothing to commit, working tree clean
git -C dev/phobos status
On branch master
Your branch is up to date with 'origin/master'.

nothing to commit, working tree clean

Originally posted by @0xEAB in #21033

Can someone please add a test with profile-gc? People is closing without even having tests in DMD. That other issue is related to template hooks dlang/dmd#22842

Originally posted by @MrcSnm in #21033

Activity

  1. added
    Severity:Regression
    on Apr 4, 2026
  2. added theissue type on Apr 4, 2026
  3. transferred this issue fromdlang/dmdon Apr 5, 2026
  4. changed the title [-]DMD ICE: Can't link simple program with `-profile=gc`[/-] [+]std.array calls non-existent Trace hook in version(D_ProfileGC)[/+] on Apr 5, 2026
  5. added a commit that references this issue on Apr 5, 2026
    1e2368e
  6. added a commit that references this issue on Apr 5, 2026
    57f660f
  7. added a commit that references this issue on Jun 21, 2026
    2a3febb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Severity:Regression

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions