[PATCH] D60728: [clang] [test] Add a (xfailing) test for PR41027

Michał Górny via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 15 11:28:42 PDT 2019


mgorny created this revision.
mgorny added reviewers: krytarowski, joerg, hans, rsmith.

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.


https://reviews.llvm.org/D60728

Files:
  clang/test/Sema/pr41027.c


Index: clang/test/Sema/pr41027.c
===================================================================
--- /dev/null
+++ clang/test/Sema/pr41027.c
@@ -0,0 +1,9 @@
+// XFAIL: *
+// RUN: %clang_cc1 -triple x86_64 -fsyntax-only %s
+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));
+  }
+}


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D60728.195229.patch
Type: text/x-patch
Size: 441 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190415/ebd1caab/attachment.bin>


More information about the cfe-commits mailing list