llvm-gcc checks the static asm variable is valid in ValidateRegisterVariable. Make...
authorBill Wendling <isanbard@gmail.com>
Tue, 4 Aug 2009 04:48:31 +0000 (04:48 +0000)
committerBill Wendling <isanbard@gmail.com>
Tue, 4 Aug 2009 04:48:31 +0000 (04:48 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78051 91177308-0d34-0410-b5e6-96231b3b80d8

test/FrontendC/2004-03-16-AsmRegisterCrash.c

index 6ad1cd48f3cd116de4ac5a5776dfba53948d0db5..2662c79a1c6be8e481fd19a9f69f283fd9cc5393 100644 (file)
@@ -1,6 +1,10 @@
 // RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
 
 int foo() {
+#ifdef __ppc__
+  register int X __asm__("r1");
+#else
   register int X __asm__("ebx");
+#endif
   return X;
 }