Skip to content

Commit

Permalink
[clang] [test] Add a (xfailing) test for PR41027
Browse files Browse the repository at this point in the history
Add a test for tracking PR41027 (8.0 regression breaking assembly code
relying on __builtin_constant_p() to identify compile-time constants).
Mark it as expected to fail everywhere.

Differential Revision: https://reviews.llvm.org/D60728

llvm-svn: 362587
  • Loading branch information
mgorny committed Jun 5, 2019
1 parent da7f033 commit 2ae86d2
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions clang/test/Sema/pr41027.c
@@ -0,0 +1,10 @@
// RUN: %clang_cc1 -triple x86_64 -fsyntax-only %s
// XFAIL: *

inline void pr41027(unsigned a, unsigned b) {
if (__builtin_constant_p(a)) {
__asm__ volatile("outl %0,%w1" : : "a"(b), "n"(a));
} else {
__asm__ volatile("outl %0,%w1" : : "a"(b), "d"(a));
}
}

0 comments on commit 2ae86d2

Please sign in to comment.