https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111537
--- Comment #2 from Iain Buclaw <ibuclaw at gdcproject dot org> ---
(In reply to David Malcolm from comment #1)
> Am trying to reproduce locally, but when I run this in my BUILDDIR/gcc:
> ./gdc -B. -S -fanalyzer oob.d
> I get:
> d21: error: cannot find source code for runtime library file 'object.d'
>
> Possibly a silly question, but what am I doing wrong?
The library sources aren't in any paths that the compiler looks for. It should
work without any explicit `-I` if the target libraries were installed.
This alternative reproducer should get you off the ground though.
---
mkdir gcc;
echo "module gcc.builtins;" > gcc/builtins.d
cat > oob.d << EOF
module object;
import gcc.builtins;
void main()
{
char[5] arr;
__builtin_strcpy(arr.ptr, "hello world");
}
EOF
./gdc -B. -S -fanalyzer oob.d