1; UNSUPPORTED: system-windows
2; REQUIRES: shell
3; RUN: llvm-as %s -o %t.bc
4; RUN: touch %t.resolution.txt
5; RUN: chmod -w %t.resolution.txt
6; RUN: not ld.lld -save-temps %t.bc -o %t 2>&1 | FileCheck %s
7; RUN: rm -f %t.resolution.txt
8
9; CHECK: error: {{[Pp]}}ermission denied{{$}}
10
11target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
12target triple = "x86_64-unknown-linux-gnu"
13
14define void @_start() {
15  ret void
16}
17