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));
+ }
+}
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));
+ }
+}
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits