PPC doesn't supported VLA with large alignment. This was
authorDale Johannesen <dalej@apple.com>
Fri, 30 Jul 2010 21:09:48 +0000 (21:09 +0000)
committerDale Johannesen <dalej@apple.com>
Fri, 30 Jul 2010 21:09:48 +0000 (21:09 +0000)
formerly rejected by the FE, so asserted in the BE; now the FE only
warns, so we treat it as a legitimate fatal error in PPC BE.
This means the test for the feature won't pass, so it's xfail'd.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109892 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/PowerPC/PPCRegisterInfo.cpp
test/FrontendC/vla-1.c

index cc69fb5206f6acb5c45826ec852f483113acf1ca..113c9fd82b2eaf3a35b1c5fc22aac80df958a29e 100644 (file)
@@ -449,8 +449,8 @@ void PPCRegisterInfo::lowerDynamicAlloc(MachineBasicBlock::iterator II,
   // Get stack alignments.
   unsigned TargetAlign = MF.getTarget().getFrameInfo()->getStackAlignment();
   unsigned MaxAlign = MFI->getMaxAlignment();
-  assert(MaxAlign <= TargetAlign &&
-         "Dynamic alloca with large aligns not supported");
+  if (MaxAlign > TargetAlign)
+    report_fatal_error("Dynamic alloca with large aligns not supported");
 
   // Determine the previous frame's address.  If FrameSize can't be
   // represented as 16 bits or we need special alignment, then we load the
index c6c58f6cc36dbd05e13b51b5e0a5b27467b662bb..77f78a5e3af743da66888961a15f472adc2ba3a1 100644 (file)
@@ -1,4 +1,6 @@
 // RUN: %llvmgcc_only -std=gnu99 %s -S |& grep {warning: alignment for}
+// ppc does not support this feature, and gets a fatal error at runtime.
+// XFAIL: powerpc
 
 int foo(int a)
 {