aboutsummaryrefslogtreecommitdiff
path: root/clang/test/CodeGen/SystemZ/systemz-inline-asm-02.c
blob: 754d7e66f04b241a46f1d9201ee5371ef6589b9b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// RUN: not %clang_cc1 -triple s390x-linux-gnu -O2 -emit-llvm -o - %s 2>&1 \
// RUN:  | FileCheck %s
// REQUIRES: systemz-registered-target

// Test that an error is given if a physreg is defined by multiple operands.
int test_physreg_defs(void) {
  register int l __asm__("r7") = 0;

  // CHECK: error: multiple outputs to hard register: r7
  __asm__("" : "+r"(l), "=r"(l));

  return l;
}