r362587 - [clang] [test] Add a (xfailing) test for PR41027

Michal Gorny via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 5 01:21:42 PDT 2019


Author: mgorny
Date: Wed Jun  5 01:21:42 2019
New Revision: 362587

URL: http://llvm.org/viewvc/llvm-project?rev=362587&view=rev
Log:
[clang] [test] Add a (xfailing) test for PR41027

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

Added:
    cfe/trunk/test/Sema/pr41027.c

Added: cfe/trunk/test/Sema/pr41027.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/pr41027.c?rev=362587&view=auto
==============================================================================
--- cfe/trunk/test/Sema/pr41027.c (added)
+++ cfe/trunk/test/Sema/pr41027.c Wed Jun  5 01:21:42 2019
@@ -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));
+  }
+}




More information about the cfe-commits mailing list