For PR1338: Rename test dirs
authorAnton Korobeynikov <asl@math.spbu.ru>
Thu, 29 May 2008 19:17:15 +0000 (19:17 +0000)
committerAnton Korobeynikov <asl@math.spbu.ru>
Thu, 29 May 2008 19:17:15 +0000 (19:17 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51695 91177308-0d34-0410-b5e6-96231b3b80d8

710 files changed:
test/C++Frontend/2003-08-20-ExceptionFail.cpp [deleted file]
test/C++Frontend/2003-08-21-EmptyClass.cpp [deleted file]
test/C++Frontend/2003-08-24-Cleanup.cpp [deleted file]
test/C++Frontend/2003-08-27-TypeNamespaces.cpp [deleted file]
test/C++Frontend/2003-08-28-ForwardType.cpp [deleted file]
test/C++Frontend/2003-08-28-SaveExprBug.cpp [deleted file]
test/C++Frontend/2003-08-29-ArgPassingBug.cpp [deleted file]
test/C++Frontend/2003-08-31-StructLayout.cpp [deleted file]
test/C++Frontend/2003-09-22-CompositeExprValue.cpp [deleted file]
test/C++Frontend/2003-09-29-ArgumentNumberMismatch.cpp [deleted file]
test/C++Frontend/2003-09-30-CommaExprBug.cpp [deleted file]
test/C++Frontend/2003-09-30-ForIncrementExprBug.cpp [deleted file]
test/C++Frontend/2003-09-30-ForIncrementExprBug2.cpp [deleted file]
test/C++Frontend/2003-09-30-NestedFunctionDecl.cpp [deleted file]
test/C++Frontend/2003-10-17-BoolBitfields.cpp [deleted file]
test/C++Frontend/2003-10-21-InnerClass.cpp [deleted file]
test/C++Frontend/2003-10-27-VirtualBaseClassCrash.cpp [deleted file]
test/C++Frontend/2003-11-02-WeakLinkage.cpp [deleted file]
test/C++Frontend/2003-11-04-ArrayConstructors.cpp [deleted file]
test/C++Frontend/2003-11-04-CatchLabelName.cpp [deleted file]
test/C++Frontend/2003-11-08-ArrayAddress.cpp [deleted file]
test/C++Frontend/2003-11-09-ConstructorTypeSafety.cpp [deleted file]
test/C++Frontend/2003-11-18-EnumArray.cpp [deleted file]
test/C++Frontend/2003-11-18-MemberInitializationCasting.cpp [deleted file]
test/C++Frontend/2003-11-18-PtrMemConstantInitializer.cpp [deleted file]
test/C++Frontend/2003-11-25-ReturningOpaqueByValue.cpp [deleted file]
test/C++Frontend/2003-11-27-MultipleInheritanceThunk.cpp [deleted file]
test/C++Frontend/2003-11-29-DuplicatedCleanupTest.cpp [deleted file]
test/C++Frontend/2003-12-08-ArrayOfPtrToMemberFunc.cpp [deleted file]
test/C++Frontend/2004-01-11-DynamicInitializedConstant.cpp [deleted file]
test/C++Frontend/2004-03-08-ReinterpretCastCopy.cpp [deleted file]
test/C++Frontend/2004-03-09-UnmangledBuiltinMethods.cpp [deleted file]
test/C++Frontend/2004-03-15-CleanupsAndGotos.cpp [deleted file]
test/C++Frontend/2004-06-08-LateTemplateInstantiation.cpp [deleted file]
test/C++Frontend/2004-09-27-CompilerCrash.cpp [deleted file]
test/C++Frontend/2004-09-27-DidntEmitTemplate.cpp [deleted file]
test/C++Frontend/2004-11-27-EmitsUnusedInlineFunctions.cpp [deleted file]
test/C++Frontend/2004-11-27-ExceptionCleanupAssertion.cpp [deleted file]
test/C++Frontend/2004-11-27-FriendDefaultArgCrash.cpp [deleted file]
test/C++Frontend/2004-11-27-InlineAsmFunctionRedefinition.cpp [deleted file]
test/C++Frontend/2005-01-03-StaticInitializers.cpp [deleted file]
test/C++Frontend/2005-02-11-AnonymousUnion.cpp [deleted file]
test/C++Frontend/2005-02-13-BadDynamicInit.cpp [deleted file]
test/C++Frontend/2005-02-14-BitFieldOffset.cpp [deleted file]
test/C++Frontend/2005-02-19-BitfieldStructCrash.cpp [deleted file]
test/C++Frontend/2005-02-19-UnnamedVirtualThunkArgument.cpp [deleted file]
test/C++Frontend/2005-02-20-BrokenReferenceTest.cpp [deleted file]
test/C++Frontend/2005-02-27-PlacementArrayNewCrash.cpp [deleted file]
test/C++Frontend/2005-07-21-VirtualBaseAccess.cpp [deleted file]
test/C++Frontend/2006-03-01-GimplifyCrash.cpp [deleted file]
test/C++Frontend/2006-03-06-C++RecurseCrash.cpp [deleted file]
test/C++Frontend/2006-09-08-powi.cpp [deleted file]
test/C++Frontend/2006-09-12-OpaqueStructCrash.cpp [deleted file]
test/C++Frontend/2006-09-27-Debug-Protection.cpp [deleted file]
test/C++Frontend/2006-10-30-ClassBitfield.cpp [deleted file]
test/C++Frontend/2006-11-06-StackTrace.cpp [deleted file]
test/C++Frontend/2006-11-20-GlobalSymbols.cpp [deleted file]
test/C++Frontend/2006-11-30-ConstantExprCrash.cpp [deleted file]
test/C++Frontend/2006-11-30-NoCompileUnit.cpp [deleted file]
test/C++Frontend/2006-11-30-Pubnames.cpp [deleted file]
test/C++Frontend/2007-01-02-UnboundedArray.cpp [deleted file]
test/C++Frontend/2007-01-06-ELF-Thunk-Sections.cpp [deleted file]
test/C++Frontend/2007-01-06-PtrMethodInit.cpp [deleted file]
test/C++Frontend/2007-03-27-FunctionVarRename.cpp [deleted file]
test/C++Frontend/2007-04-05-PackedBitFields-1.cpp [deleted file]
test/C++Frontend/2007-04-05-PackedBitFieldsOverlap-2.cpp [deleted file]
test/C++Frontend/2007-04-05-PackedBitFieldsOverlap.cpp [deleted file]
test/C++Frontend/2007-04-05-PackedBitFieldsSmall.cpp [deleted file]
test/C++Frontend/2007-04-05-StructPackedFieldUnpacked.cpp [deleted file]
test/C++Frontend/2007-04-10-PackedUnion.cpp [deleted file]
test/C++Frontend/2007-04-11-InlineStorageClassC++.cpp [deleted file]
test/C++Frontend/2007-04-14-FNoBuiltin.cpp [deleted file]
test/C++Frontend/2007-04-31-TryCatch.cpp [deleted file]
test/C++Frontend/2007-05-03-VectorInit.cpp [deleted file]
test/C++Frontend/2007-05-16-ReverseBitFieldCrash.cpp [deleted file]
test/C++Frontend/2007-05-23-TryFinally.cpp [deleted file]
test/C++Frontend/2007-07-04-NestedCatches.cpp [deleted file]
test/C++Frontend/2007-07-29-RestrictPtrArg.cpp [deleted file]
test/C++Frontend/2007-07-29-RestrictRefArg.cpp [deleted file]
test/C++Frontend/2007-08-01-RestrictMethod.cpp [deleted file]
test/C++Frontend/2007-09-10-RecursiveTypeResolution.cpp [deleted file]
test/C++Frontend/2007-10-01-StructResize.cpp [deleted file]
test/C++Frontend/2008-01-11-BadWarning.cpp [deleted file]
test/C++Frontend/2008-01-12-VecInit.cpp [deleted file]
test/C++Frontend/2008-02-13-sret.cpp [deleted file]
test/C++Frontend/2008-05-07-CrazyOffsetOf.cpp [deleted file]
test/C++Frontend/dg.exp [deleted file]
test/C++Frontend/ptr-to-method-devirt.cpp [deleted file]
test/CFrontend/2002-01-23-LoadQISIReloadFailure.c [deleted file]
test/CFrontend/2002-01-24-ComplexSpaceInType.c [deleted file]
test/CFrontend/2002-01-24-HandleCallInsnSEGV.c [deleted file]
test/CFrontend/2002-02-13-ConditionalInCall.c [deleted file]
test/CFrontend/2002-02-13-ReloadProblem.c [deleted file]
test/CFrontend/2002-02-13-TypeVarNameCollision.c [deleted file]
test/CFrontend/2002-02-13-UnnamedLocal.c [deleted file]
test/CFrontend/2002-02-14-EntryNodePreds.c [deleted file]
test/CFrontend/2002-02-16-RenamingTest.c [deleted file]
test/CFrontend/2002-02-17-ArgumentAddress.c [deleted file]
test/CFrontend/2002-02-18-64bitConstant.c [deleted file]
test/CFrontend/2002-02-18-StaticData.c [deleted file]
test/CFrontend/2002-03-11-LargeCharInString.c [deleted file]
test/CFrontend/2002-03-12-ArrayInitialization.c [deleted file]
test/CFrontend/2002-03-12-StructInitialize.c [deleted file]
test/CFrontend/2002-03-12-StructInitializer.c [deleted file]
test/CFrontend/2002-03-14-BrokenPHINode.c [deleted file]
test/CFrontend/2002-03-14-BrokenSSA.c [deleted file]
test/CFrontend/2002-03-14-QuotesInStrConst.c [deleted file]
test/CFrontend/2002-04-07-SwitchStmt.c [deleted file]
test/CFrontend/2002-04-08-LocalArray.c [deleted file]
test/CFrontend/2002-04-09-StructRetVal.c [deleted file]
test/CFrontend/2002-04-10-StructParameters.c [deleted file]
test/CFrontend/2002-05-23-StaticValues.c [deleted file]
test/CFrontend/2002-05-23-TypeNameCollision.c [deleted file]
test/CFrontend/2002-05-24-Alloca.c [deleted file]
test/CFrontend/2002-06-25-FWriteInterfaceFailure.c [deleted file]
test/CFrontend/2002-07-14-MiscListTests.c [deleted file]
test/CFrontend/2002-07-14-MiscTests.c [deleted file]
test/CFrontend/2002-07-14-MiscTests2.c [deleted file]
test/CFrontend/2002-07-14-MiscTests3.c [deleted file]
test/CFrontend/2002-07-16-HardStringInit.c [deleted file]
test/CFrontend/2002-07-17-StringConstant.c [deleted file]
test/CFrontend/2002-07-29-Casts.c [deleted file]
test/CFrontend/2002-07-30-SubregSetAssertion.c [deleted file]
test/CFrontend/2002-07-30-UnionTest.c [deleted file]
test/CFrontend/2002-07-30-VarArgsCallFailure.c [deleted file]
test/CFrontend/2002-07-31-BadAssert.c [deleted file]
test/CFrontend/2002-07-31-SubregFailure.c [deleted file]
test/CFrontend/2002-08-02-UnionTest.c [deleted file]
test/CFrontend/2002-08-19-RecursiveLocals.c [deleted file]
test/CFrontend/2002-09-08-PointerShifts.c [deleted file]
test/CFrontend/2002-09-18-UnionProblem.c [deleted file]
test/CFrontend/2002-09-19-StarInLabel.c [deleted file]
test/CFrontend/2002-10-12-TooManyArguments.c [deleted file]
test/CFrontend/2002-12-15-GlobalBoolTest.c [deleted file]
test/CFrontend/2002-12-15-GlobalConstantTest.c [deleted file]
test/CFrontend/2002-12-15-GlobalRedefinition.c [deleted file]
test/CFrontend/2002-12-15-StructParameters.c [deleted file]
test/CFrontend/2003-01-30-UnionInit.c [deleted file]
test/CFrontend/2003-03-03-DeferredType.c [deleted file]
test/CFrontend/2003-06-22-UnionCrash.c [deleted file]
test/CFrontend/2003-06-23-GCC-fold-infinite-recursion.c [deleted file]
test/CFrontend/2003-06-26-CFECrash.c [deleted file]
test/CFrontend/2003-06-29-MultipleFunctionDefinition.c [deleted file]
test/CFrontend/2003-07-22-ArrayAccessTypeSafety.c [deleted file]
test/CFrontend/2003-08-06-BuiltinSetjmpLongjmp.c [deleted file]
test/CFrontend/2003-08-17-DeadCodeShortCircuit.c [deleted file]
test/CFrontend/2003-08-18-SigSetJmp.c [deleted file]
test/CFrontend/2003-08-18-StructAsValue.c [deleted file]
test/CFrontend/2003-08-20-BadBitfieldRef.c [deleted file]
test/CFrontend/2003-08-20-PrototypeMismatch.c [deleted file]
test/CFrontend/2003-08-20-vfork-bug.c [deleted file]
test/CFrontend/2003-08-21-BinOp-Type-Mismatch.c [deleted file]
test/CFrontend/2003-08-21-StmtExpr.c [deleted file]
test/CFrontend/2003-08-21-WideString.c [deleted file]
test/CFrontend/2003-08-23-LocalUnionTest.c [deleted file]
test/CFrontend/2003-08-29-BitFieldStruct.c [deleted file]
test/CFrontend/2003-08-29-HugeCharConst.c [deleted file]
test/CFrontend/2003-08-29-StructLayoutBug.c [deleted file]
test/CFrontend/2003-08-30-AggregateInitializer.c [deleted file]
test/CFrontend/2003-08-30-LargeIntegerBitfieldMember.c [deleted file]
test/CFrontend/2003-09-18-BitfieldTests.c [deleted file]
test/CFrontend/2003-09-30-StructLayout.c [deleted file]
test/CFrontend/2003-10-02-UnionLValueError.c [deleted file]
test/CFrontend/2003-10-06-NegateExprType.c [deleted file]
test/CFrontend/2003-10-09-UnionInitializerBug.c [deleted file]
test/CFrontend/2003-10-28-ident.c [deleted file]
test/CFrontend/2003-10-29-AsmRename.c [deleted file]
test/CFrontend/2003-11-01-C99-CompoundLiteral.c [deleted file]
test/CFrontend/2003-11-01-EmptyStructCrash.c [deleted file]
test/CFrontend/2003-11-01-GlobalUnionInit.c [deleted file]
test/CFrontend/2003-11-03-AddrArrayElement.c [deleted file]
test/CFrontend/2003-11-04-EmptyStruct.c [deleted file]
test/CFrontend/2003-11-04-OutOfMemory.c [deleted file]
test/CFrontend/2003-11-08-PointerSubNotGetelementptr.c [deleted file]
test/CFrontend/2003-11-12-VoidString.c [deleted file]
test/CFrontend/2003-11-13-TypeSafety.c [deleted file]
test/CFrontend/2003-11-16-StaticArrayInit.c [deleted file]
test/CFrontend/2003-11-18-CondExprLValue.c [deleted file]
test/CFrontend/2003-11-19-AddressOfRegister.c [deleted file]
test/CFrontend/2003-11-19-BitFieldArray.c [deleted file]
test/CFrontend/2003-11-20-Bitfields.c [deleted file]
test/CFrontend/2003-11-20-ComplexDivision.c [deleted file]
test/CFrontend/2003-11-20-UnionBitfield.c [deleted file]
test/CFrontend/2003-11-26-PointerShift.c [deleted file]
test/CFrontend/2003-11-27-ConstructorCast.c [deleted file]
test/CFrontend/2003-11-27-UnionCtorInitialization.c [deleted file]
test/CFrontend/2003-12-14-ExternInlineSupport.c [deleted file]
test/CFrontend/2004-01-01-UnknownInitSize.c [deleted file]
test/CFrontend/2004-01-08-ExternInlineRedefine.c [deleted file]
test/CFrontend/2004-02-12-LargeAggregateCopy.c [deleted file]
test/CFrontend/2004-02-13-BuiltinFrameReturnAddress.c [deleted file]
test/CFrontend/2004-02-13-IllegalVararg.c [deleted file]
test/CFrontend/2004-02-13-Memset.c [deleted file]
test/CFrontend/2004-02-14-ZeroInitializer.c [deleted file]
test/CFrontend/2004-02-20-Builtins.c [deleted file]
test/CFrontend/2004-03-07-ComplexDivEquals.c [deleted file]
test/CFrontend/2004-03-07-ExternalConstant.c [deleted file]
test/CFrontend/2004-03-09-LargeArrayInitializers.c [deleted file]
test/CFrontend/2004-03-15-SimpleIndirectGoto.c [deleted file]
test/CFrontend/2004-03-16-AsmRegisterCrash.c [deleted file]
test/CFrontend/2004-05-07-VarArrays.c [deleted file]
test/CFrontend/2004-05-21-IncompleteEnum.c [deleted file]
test/CFrontend/2004-06-08-OpaqueStructArg.c [deleted file]
test/CFrontend/2004-06-17-UnorderedBuiltins.c [deleted file]
test/CFrontend/2004-06-17-UnorderedCompares.c [deleted file]
test/CFrontend/2004-06-18-VariableLengthArrayOfStructures.c [deleted file]
test/CFrontend/2004-07-06-FunctionCast.c [deleted file]
test/CFrontend/2004-08-06-LargeStructTest.c [deleted file]
test/CFrontend/2004-11-25-UnnamedBitfieldPadding.c [deleted file]
test/CFrontend/2004-11-27-InvalidConstantExpr.c [deleted file]
test/CFrontend/2004-11-27-StaticFunctionRedeclare.c [deleted file]
test/CFrontend/2004-11-27-VariableSizeInStructure.c [deleted file]
test/CFrontend/2005-01-02-ConstantInits.c [deleted file]
test/CFrontend/2005-01-02-PointerDifference.c [deleted file]
test/CFrontend/2005-01-02-VAArgError-ICE.c [deleted file]
test/CFrontend/2005-02-20-AggregateSAVEEXPR.c [deleted file]
test/CFrontend/2005-02-27-MarkGlobalConstant.c [deleted file]
test/CFrontend/2005-03-05-OffsetOfHack.c [deleted file]
test/CFrontend/2005-03-06-OffsetOfStructCrash.c [deleted file]
test/CFrontend/2005-03-11-Prefetch.c [deleted file]
test/CFrontend/2005-04-09-ComplexOps.c [deleted file]
test/CFrontend/2005-05-06-CountBuiltins.c [deleted file]
test/CFrontend/2005-05-10-GlobalUnionInit.c [deleted file]
test/CFrontend/2005-06-15-ExpandGotoInternalProblem.c [deleted file]
test/CFrontend/2005-07-20-SqrtNoErrno.c [deleted file]
test/CFrontend/2005-07-26-UnionInitCrash.c [deleted file]
test/CFrontend/2005-07-28-IncorrectWeakGlobal.c [deleted file]
test/CFrontend/2005-09-20-ComplexConstants.c [deleted file]
test/CFrontend/2005-09-24-AsmUserPrefix.c [deleted file]
test/CFrontend/2005-09-24-BitFieldCrash.c [deleted file]
test/CFrontend/2005-10-18-VariableSizedElementCrash.c [deleted file]
test/CFrontend/2005-12-04-AttributeUsed.c [deleted file]
test/CFrontend/2005-12-04-DeclarationLineNumbers.c [deleted file]
test/CFrontend/2006-01-13-Includes.c [deleted file]
test/CFrontend/2006-01-13-StackSave.c [deleted file]
test/CFrontend/2006-01-16-BitCountIntrinsicsUnsigned.c [deleted file]
test/CFrontend/2006-01-23-FileScopeAsm.c [deleted file]
test/CFrontend/2006-03-03-MissingInitializer.c [deleted file]
test/CFrontend/2006-03-16-VectorCtor.c [deleted file]
test/CFrontend/2006-03-17-KnRMismatch.c [deleted file]
test/CFrontend/2006-05-01-AppleAlignmentPragma.c [deleted file]
test/CFrontend/2006-05-19-SingleEltReturn.c [deleted file]
test/CFrontend/2006-07-31-PR854.c [deleted file]
test/CFrontend/2006-09-11-BitfieldRefCrash.c [deleted file]
test/CFrontend/2006-09-18-fwrite-cast-crash.c [deleted file]
test/CFrontend/2006-09-21-IncompleteElementType.c [deleted file]
test/CFrontend/2006-09-25-DebugFilename.c [deleted file]
test/CFrontend/2006-09-25-DebugFilename.h [deleted file]
test/CFrontend/2006-09-28-SimpleAsm.c [deleted file]
test/CFrontend/2006-10-30-ArrayCrash.c [deleted file]
test/CFrontend/2006-12-14-ordered_expr.c [deleted file]
test/CFrontend/2007-01-06-KNR-Proto.c [deleted file]
test/CFrontend/2007-01-20-VectorICE.c [deleted file]
test/CFrontend/2007-01-24-InlineAsmCModifier.c [deleted file]
test/CFrontend/2007-02-04-AddrLValue-2.c [deleted file]
test/CFrontend/2007-02-04-AddrLValue.c [deleted file]
test/CFrontend/2007-02-04-EmptyStruct.c [deleted file]
test/CFrontend/2007-02-04-WITH_SIZE_EXPR.c [deleted file]
test/CFrontend/2007-02-05-nested.c [deleted file]
test/CFrontend/2007-02-07-AddrLabel.c [deleted file]
test/CFrontend/2007-02-16-VariableSizeStructArg.c [deleted file]
test/CFrontend/2007-02-16-VoidPtrDiff.c [deleted file]
test/CFrontend/2007-02-16-WritableStrings.c [deleted file]
test/CFrontend/2007-02-25-C-DotDotDot.c [deleted file]
test/CFrontend/2007-03-01-VarSizeArrayIdx.c [deleted file]
test/CFrontend/2007-03-05-DataLayout.c [deleted file]
test/CFrontend/2007-03-06-VarSizeInStruct1.c [deleted file]
test/CFrontend/2007-03-06-VarSizeInStruct2.c [deleted file]
test/CFrontend/2007-03-26-BitfieldAfterZeroWidth.c [deleted file]
test/CFrontend/2007-03-26-ZeroWidthBitfield.c [deleted file]
test/CFrontend/2007-03-27-ArrayCompatible.c [deleted file]
test/CFrontend/2007-03-27-VarLengthArray.c [deleted file]
test/CFrontend/2007-04-05-PackedBitFields-2.c [deleted file]
test/CFrontend/2007-04-05-PackedBitFields.c [deleted file]
test/CFrontend/2007-04-05-PackedStruct.c [deleted file]
test/CFrontend/2007-04-05-PadBeforeZeroLengthField.c [deleted file]
test/CFrontend/2007-04-05-UnPackedStruct.c [deleted file]
test/CFrontend/2007-04-11-InlineAsmStruct.c [deleted file]
test/CFrontend/2007-04-11-InlineAsmUnion.c [deleted file]
test/CFrontend/2007-04-11-InlineStorageClassC89.c [deleted file]
test/CFrontend/2007-04-11-InlineStorageClassC99.c [deleted file]
test/CFrontend/2007-04-11-PR1321.c [deleted file]
test/CFrontend/2007-04-13-InlineAsmStruct2.c [deleted file]
test/CFrontend/2007-04-13-InlineAsmUnion2.c [deleted file]
test/CFrontend/2007-04-14-FNoBuiltin.c [deleted file]
test/CFrontend/2007-04-17-ZeroSizeBitFields.c [deleted file]
test/CFrontend/2007-04-24-VolatileStructCopy.c [deleted file]
test/CFrontend/2007-04-24-bit-not-expr.c [deleted file]
test/CFrontend/2007-04-24-str-const.c [deleted file]
test/CFrontend/2007-05-07-NestedStructReturn.c [deleted file]
test/CFrontend/2007-05-07-PaddingElements.c [deleted file]
test/CFrontend/2007-05-08-PCH.c [deleted file]
test/CFrontend/2007-05-11-str-const.c [deleted file]
test/CFrontend/2007-05-15-PaddingElement.c [deleted file]
test/CFrontend/2007-05-16-EmptyStruct.c [deleted file]
test/CFrontend/2007-05-29-UnionCopy.c [deleted file]
test/CFrontend/2007-06-05-NoInlineAttribute.c [deleted file]
test/CFrontend/2007-06-15-AnnotateAttribute.c [deleted file]
test/CFrontend/2007-06-18-SextAttrAggregate.c [deleted file]
test/CFrontend/2007-07-29-RestrictPtrArg.c [deleted file]
test/CFrontend/2007-08-01-LoadStoreAlign.c [deleted file]
test/CFrontend/2007-08-21-ComplexCst.c [deleted file]
test/CFrontend/2007-08-22-CTTZ.c [deleted file]
test/CFrontend/2007-09-05-ConstCtor.c [deleted file]
test/CFrontend/2007-09-12-PragmaPack.c [deleted file]
test/CFrontend/2007-09-14-NegatePointer.c [deleted file]
test/CFrontend/2007-09-17-WeakRef.c [deleted file]
test/CFrontend/2007-09-20-GcrootAttribute.c [deleted file]
test/CFrontend/2007-09-26-Alignment.c [deleted file]
test/CFrontend/2007-09-27-ComplexIntCompare.c [deleted file]
test/CFrontend/2007-09-28-PackedUnionMember.c [deleted file]
test/CFrontend/2007-10-01-BuildArrayRef.c [deleted file]
test/CFrontend/2007-10-02-VolatileArray.c [deleted file]
test/CFrontend/2007-10-15-VoidPtr.c [deleted file]
test/CFrontend/2007-10-30-Volatile.c [deleted file]
test/CFrontend/2007-11-07-AlignedMemcpy.c [deleted file]
test/CFrontend/2007-11-07-CopyAggregateAlign.c [deleted file]
test/CFrontend/2007-11-07-ZeroAggregateAlign.c [deleted file]
test/CFrontend/2007-11-27-SExtZExt.c [deleted file]
test/CFrontend/2007-11-28-GlobalInitializer.c [deleted file]
test/CFrontend/2007-12-16-AsmNoUnwind.c [deleted file]
test/CFrontend/2007-12-VarArrayDebug.c [deleted file]
test/CFrontend/2008-01-04-WideBitfield.c [deleted file]
test/CFrontend/2008-01-07-UnusualIntSize.c [deleted file]
test/CFrontend/2008-01-11-ChainConsistency.c [deleted file]
test/CFrontend/2008-01-21-PackedBitFields.c [deleted file]
test/CFrontend/2008-01-21-PackedStructField.c [deleted file]
test/CFrontend/2008-01-24-StructAlignAndBitFields.c [deleted file]
test/CFrontend/2008-01-25-ByValReadNone.c [deleted file]
test/CFrontend/2008-01-25-ZeroSizedAggregate.c [deleted file]
test/CFrontend/2008-01-28-PragmaMark.c [deleted file]
test/CFrontend/2008-01-28-UnionSize.c [deleted file]
test/CFrontend/2008-02-11-AnnotateBuiltin.c [deleted file]
test/CFrontend/2008-03-03-CtorAttrType.c [deleted file]
test/CFrontend/2008-03-05-syncPtr.c [deleted file]
test/CFrontend/2008-03-24-BitField-And-Alloca.c [deleted file]
test/CFrontend/2008-03-26-PackedBitFields.c [deleted file]
test/CFrontend/2008-04-08-NoExceptions.c [deleted file]
test/CFrontend/2008-05-06-CFECrash.c [deleted file]
test/CFrontend/2008-05-12-TempUsedBeforeDef.c [deleted file]
test/CFrontend/2008-05-19-AlwaysInline.c [deleted file]
test/CFrontend/BasicInstrs.c [deleted file]
test/CFrontend/attribute_constructor.c [deleted file]
test/CFrontend/block-copy.c [deleted file]
test/CFrontend/dg.exp [deleted file]
test/CFrontend/exact-div-expr.c [deleted file]
test/CFrontend/extern-weak.c [deleted file]
test/CFrontend/funccall.c [deleted file]
test/CFrontend/hidden-visibility.c [deleted file]
test/CFrontend/inline-asm-mrv.c [deleted file]
test/CFrontend/libcalls.c [deleted file]
test/CFrontend/nested-functions.c [deleted file]
test/CFrontend/sret.c [deleted file]
test/CFrontend/sret2.c [deleted file]
test/CFrontend/unaligned-memcpy.c [deleted file]
test/FrontendC++/2003-08-20-ExceptionFail.cpp [new file with mode: 0644]
test/FrontendC++/2003-08-21-EmptyClass.cpp [new file with mode: 0644]
test/FrontendC++/2003-08-24-Cleanup.cpp [new file with mode: 0644]
test/FrontendC++/2003-08-27-TypeNamespaces.cpp [new file with mode: 0644]
test/FrontendC++/2003-08-28-ForwardType.cpp [new file with mode: 0644]
test/FrontendC++/2003-08-28-SaveExprBug.cpp [new file with mode: 0644]
test/FrontendC++/2003-08-29-ArgPassingBug.cpp [new file with mode: 0644]
test/FrontendC++/2003-08-31-StructLayout.cpp [new file with mode: 0644]
test/FrontendC++/2003-09-22-CompositeExprValue.cpp [new file with mode: 0644]
test/FrontendC++/2003-09-29-ArgumentNumberMismatch.cpp [new file with mode: 0644]
test/FrontendC++/2003-09-30-CommaExprBug.cpp [new file with mode: 0644]
test/FrontendC++/2003-09-30-ForIncrementExprBug.cpp [new file with mode: 0644]
test/FrontendC++/2003-09-30-ForIncrementExprBug2.cpp [new file with mode: 0644]
test/FrontendC++/2003-09-30-NestedFunctionDecl.cpp [new file with mode: 0644]
test/FrontendC++/2003-10-17-BoolBitfields.cpp [new file with mode: 0644]
test/FrontendC++/2003-10-21-InnerClass.cpp [new file with mode: 0644]
test/FrontendC++/2003-10-27-VirtualBaseClassCrash.cpp [new file with mode: 0644]
test/FrontendC++/2003-11-02-WeakLinkage.cpp [new file with mode: 0644]
test/FrontendC++/2003-11-04-ArrayConstructors.cpp [new file with mode: 0644]
test/FrontendC++/2003-11-04-CatchLabelName.cpp [new file with mode: 0644]
test/FrontendC++/2003-11-08-ArrayAddress.cpp [new file with mode: 0644]
test/FrontendC++/2003-11-09-ConstructorTypeSafety.cpp [new file with mode: 0644]
test/FrontendC++/2003-11-18-EnumArray.cpp [new file with mode: 0644]
test/FrontendC++/2003-11-18-MemberInitializationCasting.cpp [new file with mode: 0644]
test/FrontendC++/2003-11-18-PtrMemConstantInitializer.cpp [new file with mode: 0644]
test/FrontendC++/2003-11-25-ReturningOpaqueByValue.cpp [new file with mode: 0644]
test/FrontendC++/2003-11-27-MultipleInheritanceThunk.cpp [new file with mode: 0644]
test/FrontendC++/2003-11-29-DuplicatedCleanupTest.cpp [new file with mode: 0644]
test/FrontendC++/2003-12-08-ArrayOfPtrToMemberFunc.cpp [new file with mode: 0644]
test/FrontendC++/2004-01-11-DynamicInitializedConstant.cpp [new file with mode: 0644]
test/FrontendC++/2004-03-08-ReinterpretCastCopy.cpp [new file with mode: 0644]
test/FrontendC++/2004-03-09-UnmangledBuiltinMethods.cpp [new file with mode: 0644]
test/FrontendC++/2004-03-15-CleanupsAndGotos.cpp [new file with mode: 0644]
test/FrontendC++/2004-06-08-LateTemplateInstantiation.cpp [new file with mode: 0644]
test/FrontendC++/2004-09-27-CompilerCrash.cpp [new file with mode: 0644]
test/FrontendC++/2004-09-27-DidntEmitTemplate.cpp [new file with mode: 0644]
test/FrontendC++/2004-11-27-EmitsUnusedInlineFunctions.cpp [new file with mode: 0644]
test/FrontendC++/2004-11-27-ExceptionCleanupAssertion.cpp [new file with mode: 0644]
test/FrontendC++/2004-11-27-FriendDefaultArgCrash.cpp [new file with mode: 0644]
test/FrontendC++/2004-11-27-InlineAsmFunctionRedefinition.cpp [new file with mode: 0644]
test/FrontendC++/2005-01-03-StaticInitializers.cpp [new file with mode: 0644]
test/FrontendC++/2005-02-11-AnonymousUnion.cpp [new file with mode: 0644]
test/FrontendC++/2005-02-13-BadDynamicInit.cpp [new file with mode: 0644]
test/FrontendC++/2005-02-14-BitFieldOffset.cpp [new file with mode: 0644]
test/FrontendC++/2005-02-19-BitfieldStructCrash.cpp [new file with mode: 0644]
test/FrontendC++/2005-02-19-UnnamedVirtualThunkArgument.cpp [new file with mode: 0644]
test/FrontendC++/2005-02-20-BrokenReferenceTest.cpp [new file with mode: 0644]
test/FrontendC++/2005-02-27-PlacementArrayNewCrash.cpp [new file with mode: 0644]
test/FrontendC++/2005-07-21-VirtualBaseAccess.cpp [new file with mode: 0644]
test/FrontendC++/2006-03-01-GimplifyCrash.cpp [new file with mode: 0644]
test/FrontendC++/2006-03-06-C++RecurseCrash.cpp [new file with mode: 0644]
test/FrontendC++/2006-09-08-powi.cpp [new file with mode: 0644]
test/FrontendC++/2006-09-12-OpaqueStructCrash.cpp [new file with mode: 0644]
test/FrontendC++/2006-09-27-Debug-Protection.cpp [new file with mode: 0644]
test/FrontendC++/2006-10-30-ClassBitfield.cpp [new file with mode: 0644]
test/FrontendC++/2006-11-06-StackTrace.cpp [new file with mode: 0644]
test/FrontendC++/2006-11-20-GlobalSymbols.cpp [new file with mode: 0644]
test/FrontendC++/2006-11-30-ConstantExprCrash.cpp [new file with mode: 0644]
test/FrontendC++/2006-11-30-NoCompileUnit.cpp [new file with mode: 0644]
test/FrontendC++/2006-11-30-Pubnames.cpp [new file with mode: 0644]
test/FrontendC++/2007-01-02-UnboundedArray.cpp [new file with mode: 0644]
test/FrontendC++/2007-01-06-ELF-Thunk-Sections.cpp [new file with mode: 0644]
test/FrontendC++/2007-01-06-PtrMethodInit.cpp [new file with mode: 0644]
test/FrontendC++/2007-03-27-FunctionVarRename.cpp [new file with mode: 0644]
test/FrontendC++/2007-04-05-PackedBitFields-1.cpp [new file with mode: 0644]
test/FrontendC++/2007-04-05-PackedBitFieldsOverlap-2.cpp [new file with mode: 0644]
test/FrontendC++/2007-04-05-PackedBitFieldsOverlap.cpp [new file with mode: 0644]
test/FrontendC++/2007-04-05-PackedBitFieldsSmall.cpp [new file with mode: 0644]
test/FrontendC++/2007-04-05-StructPackedFieldUnpacked.cpp [new file with mode: 0644]
test/FrontendC++/2007-04-10-PackedUnion.cpp [new file with mode: 0644]
test/FrontendC++/2007-04-11-InlineStorageClassC++.cpp [new file with mode: 0644]
test/FrontendC++/2007-04-14-FNoBuiltin.cpp [new file with mode: 0644]
test/FrontendC++/2007-04-31-TryCatch.cpp [new file with mode: 0644]
test/FrontendC++/2007-05-03-VectorInit.cpp [new file with mode: 0644]
test/FrontendC++/2007-05-16-ReverseBitFieldCrash.cpp [new file with mode: 0644]
test/FrontendC++/2007-05-23-TryFinally.cpp [new file with mode: 0644]
test/FrontendC++/2007-07-04-NestedCatches.cpp [new file with mode: 0644]
test/FrontendC++/2007-07-29-RestrictPtrArg.cpp [new file with mode: 0644]
test/FrontendC++/2007-07-29-RestrictRefArg.cpp [new file with mode: 0644]
test/FrontendC++/2007-08-01-RestrictMethod.cpp [new file with mode: 0644]
test/FrontendC++/2007-09-10-RecursiveTypeResolution.cpp [new file with mode: 0644]
test/FrontendC++/2007-10-01-StructResize.cpp [new file with mode: 0644]
test/FrontendC++/2008-01-11-BadWarning.cpp [new file with mode: 0644]
test/FrontendC++/2008-01-12-VecInit.cpp [new file with mode: 0644]
test/FrontendC++/2008-02-13-sret.cpp [new file with mode: 0644]
test/FrontendC++/2008-05-07-CrazyOffsetOf.cpp [new file with mode: 0644]
test/FrontendC++/dg.exp [new file with mode: 0644]
test/FrontendC++/ptr-to-method-devirt.cpp [new file with mode: 0644]
test/FrontendC/2002-01-23-LoadQISIReloadFailure.c [new file with mode: 0644]
test/FrontendC/2002-01-24-ComplexSpaceInType.c [new file with mode: 0644]
test/FrontendC/2002-01-24-HandleCallInsnSEGV.c [new file with mode: 0644]
test/FrontendC/2002-02-13-ConditionalInCall.c [new file with mode: 0644]
test/FrontendC/2002-02-13-ReloadProblem.c [new file with mode: 0644]
test/FrontendC/2002-02-13-TypeVarNameCollision.c [new file with mode: 0644]
test/FrontendC/2002-02-13-UnnamedLocal.c [new file with mode: 0644]
test/FrontendC/2002-02-14-EntryNodePreds.c [new file with mode: 0644]
test/FrontendC/2002-02-16-RenamingTest.c [new file with mode: 0644]
test/FrontendC/2002-02-17-ArgumentAddress.c [new file with mode: 0644]
test/FrontendC/2002-02-18-64bitConstant.c [new file with mode: 0644]
test/FrontendC/2002-02-18-StaticData.c [new file with mode: 0644]
test/FrontendC/2002-03-11-LargeCharInString.c [new file with mode: 0644]
test/FrontendC/2002-03-12-ArrayInitialization.c [new file with mode: 0644]
test/FrontendC/2002-03-12-StructInitialize.c [new file with mode: 0644]
test/FrontendC/2002-03-12-StructInitializer.c [new file with mode: 0644]
test/FrontendC/2002-03-14-BrokenPHINode.c [new file with mode: 0644]
test/FrontendC/2002-03-14-BrokenSSA.c [new file with mode: 0644]
test/FrontendC/2002-03-14-QuotesInStrConst.c [new file with mode: 0644]
test/FrontendC/2002-04-07-SwitchStmt.c [new file with mode: 0644]
test/FrontendC/2002-04-08-LocalArray.c [new file with mode: 0644]
test/FrontendC/2002-04-09-StructRetVal.c [new file with mode: 0644]
test/FrontendC/2002-04-10-StructParameters.c [new file with mode: 0644]
test/FrontendC/2002-05-23-StaticValues.c [new file with mode: 0644]
test/FrontendC/2002-05-23-TypeNameCollision.c [new file with mode: 0644]
test/FrontendC/2002-05-24-Alloca.c [new file with mode: 0644]
test/FrontendC/2002-06-25-FWriteInterfaceFailure.c [new file with mode: 0644]
test/FrontendC/2002-07-14-MiscListTests.c [new file with mode: 0644]
test/FrontendC/2002-07-14-MiscTests.c [new file with mode: 0644]
test/FrontendC/2002-07-14-MiscTests2.c [new file with mode: 0644]
test/FrontendC/2002-07-14-MiscTests3.c [new file with mode: 0644]
test/FrontendC/2002-07-16-HardStringInit.c [new file with mode: 0644]
test/FrontendC/2002-07-17-StringConstant.c [new file with mode: 0644]
test/FrontendC/2002-07-29-Casts.c [new file with mode: 0644]
test/FrontendC/2002-07-30-SubregSetAssertion.c [new file with mode: 0644]
test/FrontendC/2002-07-30-UnionTest.c [new file with mode: 0644]
test/FrontendC/2002-07-30-VarArgsCallFailure.c [new file with mode: 0644]
test/FrontendC/2002-07-31-BadAssert.c [new file with mode: 0644]
test/FrontendC/2002-07-31-SubregFailure.c [new file with mode: 0644]
test/FrontendC/2002-08-02-UnionTest.c [new file with mode: 0644]
test/FrontendC/2002-08-19-RecursiveLocals.c [new file with mode: 0644]
test/FrontendC/2002-09-08-PointerShifts.c [new file with mode: 0644]
test/FrontendC/2002-09-18-UnionProblem.c [new file with mode: 0644]
test/FrontendC/2002-09-19-StarInLabel.c [new file with mode: 0644]
test/FrontendC/2002-10-12-TooManyArguments.c [new file with mode: 0644]
test/FrontendC/2002-12-15-GlobalBoolTest.c [new file with mode: 0644]
test/FrontendC/2002-12-15-GlobalConstantTest.c [new file with mode: 0644]
test/FrontendC/2002-12-15-GlobalRedefinition.c [new file with mode: 0644]
test/FrontendC/2002-12-15-StructParameters.c [new file with mode: 0644]
test/FrontendC/2003-01-30-UnionInit.c [new file with mode: 0644]
test/FrontendC/2003-03-03-DeferredType.c [new file with mode: 0644]
test/FrontendC/2003-06-22-UnionCrash.c [new file with mode: 0644]
test/FrontendC/2003-06-23-GCC-fold-infinite-recursion.c [new file with mode: 0644]
test/FrontendC/2003-06-26-CFECrash.c [new file with mode: 0644]
test/FrontendC/2003-06-29-MultipleFunctionDefinition.c [new file with mode: 0644]
test/FrontendC/2003-07-22-ArrayAccessTypeSafety.c [new file with mode: 0644]
test/FrontendC/2003-08-06-BuiltinSetjmpLongjmp.c [new file with mode: 0644]
test/FrontendC/2003-08-17-DeadCodeShortCircuit.c [new file with mode: 0644]
test/FrontendC/2003-08-18-SigSetJmp.c [new file with mode: 0644]
test/FrontendC/2003-08-18-StructAsValue.c [new file with mode: 0644]
test/FrontendC/2003-08-20-BadBitfieldRef.c [new file with mode: 0644]
test/FrontendC/2003-08-20-PrototypeMismatch.c [new file with mode: 0644]
test/FrontendC/2003-08-20-vfork-bug.c [new file with mode: 0644]
test/FrontendC/2003-08-21-BinOp-Type-Mismatch.c [new file with mode: 0644]
test/FrontendC/2003-08-21-StmtExpr.c [new file with mode: 0644]
test/FrontendC/2003-08-21-WideString.c [new file with mode: 0644]
test/FrontendC/2003-08-23-LocalUnionTest.c [new file with mode: 0644]
test/FrontendC/2003-08-29-BitFieldStruct.c [new file with mode: 0644]
test/FrontendC/2003-08-29-HugeCharConst.c [new file with mode: 0644]
test/FrontendC/2003-08-29-StructLayoutBug.c [new file with mode: 0644]
test/FrontendC/2003-08-30-AggregateInitializer.c [new file with mode: 0644]
test/FrontendC/2003-08-30-LargeIntegerBitfieldMember.c [new file with mode: 0644]
test/FrontendC/2003-09-18-BitfieldTests.c [new file with mode: 0644]
test/FrontendC/2003-09-30-StructLayout.c [new file with mode: 0644]
test/FrontendC/2003-10-02-UnionLValueError.c [new file with mode: 0644]
test/FrontendC/2003-10-06-NegateExprType.c [new file with mode: 0644]
test/FrontendC/2003-10-09-UnionInitializerBug.c [new file with mode: 0644]
test/FrontendC/2003-10-28-ident.c [new file with mode: 0644]
test/FrontendC/2003-10-29-AsmRename.c [new file with mode: 0644]
test/FrontendC/2003-11-01-C99-CompoundLiteral.c [new file with mode: 0644]
test/FrontendC/2003-11-01-EmptyStructCrash.c [new file with mode: 0644]
test/FrontendC/2003-11-01-GlobalUnionInit.c [new file with mode: 0644]
test/FrontendC/2003-11-03-AddrArrayElement.c [new file with mode: 0644]
test/FrontendC/2003-11-04-EmptyStruct.c [new file with mode: 0644]
test/FrontendC/2003-11-04-OutOfMemory.c [new file with mode: 0644]
test/FrontendC/2003-11-08-PointerSubNotGetelementptr.c [new file with mode: 0644]
test/FrontendC/2003-11-12-VoidString.c [new file with mode: 0644]
test/FrontendC/2003-11-13-TypeSafety.c [new file with mode: 0644]
test/FrontendC/2003-11-16-StaticArrayInit.c [new file with mode: 0644]
test/FrontendC/2003-11-18-CondExprLValue.c [new file with mode: 0644]
test/FrontendC/2003-11-19-AddressOfRegister.c [new file with mode: 0644]
test/FrontendC/2003-11-19-BitFieldArray.c [new file with mode: 0644]
test/FrontendC/2003-11-20-Bitfields.c [new file with mode: 0644]
test/FrontendC/2003-11-20-ComplexDivision.c [new file with mode: 0644]
test/FrontendC/2003-11-20-UnionBitfield.c [new file with mode: 0644]
test/FrontendC/2003-11-26-PointerShift.c [new file with mode: 0644]
test/FrontendC/2003-11-27-ConstructorCast.c [new file with mode: 0644]
test/FrontendC/2003-11-27-UnionCtorInitialization.c [new file with mode: 0644]
test/FrontendC/2003-12-14-ExternInlineSupport.c [new file with mode: 0644]
test/FrontendC/2004-01-01-UnknownInitSize.c [new file with mode: 0644]
test/FrontendC/2004-01-08-ExternInlineRedefine.c [new file with mode: 0644]
test/FrontendC/2004-02-12-LargeAggregateCopy.c [new file with mode: 0644]
test/FrontendC/2004-02-13-BuiltinFrameReturnAddress.c [new file with mode: 0644]
test/FrontendC/2004-02-13-IllegalVararg.c [new file with mode: 0644]
test/FrontendC/2004-02-13-Memset.c [new file with mode: 0644]
test/FrontendC/2004-02-14-ZeroInitializer.c [new file with mode: 0644]
test/FrontendC/2004-02-20-Builtins.c [new file with mode: 0644]
test/FrontendC/2004-03-07-ComplexDivEquals.c [new file with mode: 0644]
test/FrontendC/2004-03-07-ExternalConstant.c [new file with mode: 0644]
test/FrontendC/2004-03-09-LargeArrayInitializers.c [new file with mode: 0644]
test/FrontendC/2004-03-15-SimpleIndirectGoto.c [new file with mode: 0644]
test/FrontendC/2004-03-16-AsmRegisterCrash.c [new file with mode: 0644]
test/FrontendC/2004-05-07-VarArrays.c [new file with mode: 0644]
test/FrontendC/2004-05-21-IncompleteEnum.c [new file with mode: 0644]
test/FrontendC/2004-06-08-OpaqueStructArg.c [new file with mode: 0644]
test/FrontendC/2004-06-17-UnorderedBuiltins.c [new file with mode: 0644]
test/FrontendC/2004-06-17-UnorderedCompares.c [new file with mode: 0644]
test/FrontendC/2004-06-18-VariableLengthArrayOfStructures.c [new file with mode: 0644]
test/FrontendC/2004-07-06-FunctionCast.c [new file with mode: 0644]
test/FrontendC/2004-08-06-LargeStructTest.c [new file with mode: 0644]
test/FrontendC/2004-11-25-UnnamedBitfieldPadding.c [new file with mode: 0644]
test/FrontendC/2004-11-27-InvalidConstantExpr.c [new file with mode: 0644]
test/FrontendC/2004-11-27-StaticFunctionRedeclare.c [new file with mode: 0644]
test/FrontendC/2004-11-27-VariableSizeInStructure.c [new file with mode: 0644]
test/FrontendC/2005-01-02-ConstantInits.c [new file with mode: 0644]
test/FrontendC/2005-01-02-PointerDifference.c [new file with mode: 0644]
test/FrontendC/2005-01-02-VAArgError-ICE.c [new file with mode: 0644]
test/FrontendC/2005-02-20-AggregateSAVEEXPR.c [new file with mode: 0644]
test/FrontendC/2005-02-27-MarkGlobalConstant.c [new file with mode: 0644]
test/FrontendC/2005-03-05-OffsetOfHack.c [new file with mode: 0644]
test/FrontendC/2005-03-06-OffsetOfStructCrash.c [new file with mode: 0644]
test/FrontendC/2005-03-11-Prefetch.c [new file with mode: 0644]
test/FrontendC/2005-04-09-ComplexOps.c [new file with mode: 0644]
test/FrontendC/2005-05-06-CountBuiltins.c [new file with mode: 0644]
test/FrontendC/2005-05-10-GlobalUnionInit.c [new file with mode: 0644]
test/FrontendC/2005-06-15-ExpandGotoInternalProblem.c [new file with mode: 0644]
test/FrontendC/2005-07-20-SqrtNoErrno.c [new file with mode: 0644]
test/FrontendC/2005-07-26-UnionInitCrash.c [new file with mode: 0644]
test/FrontendC/2005-07-28-IncorrectWeakGlobal.c [new file with mode: 0644]
test/FrontendC/2005-09-20-ComplexConstants.c [new file with mode: 0644]
test/FrontendC/2005-09-24-AsmUserPrefix.c [new file with mode: 0644]
test/FrontendC/2005-09-24-BitFieldCrash.c [new file with mode: 0644]
test/FrontendC/2005-10-18-VariableSizedElementCrash.c [new file with mode: 0644]
test/FrontendC/2005-12-04-AttributeUsed.c [new file with mode: 0644]
test/FrontendC/2005-12-04-DeclarationLineNumbers.c [new file with mode: 0644]
test/FrontendC/2006-01-13-Includes.c [new file with mode: 0644]
test/FrontendC/2006-01-13-StackSave.c [new file with mode: 0644]
test/FrontendC/2006-01-16-BitCountIntrinsicsUnsigned.c [new file with mode: 0644]
test/FrontendC/2006-01-23-FileScopeAsm.c [new file with mode: 0644]
test/FrontendC/2006-03-03-MissingInitializer.c [new file with mode: 0644]
test/FrontendC/2006-03-16-VectorCtor.c [new file with mode: 0644]
test/FrontendC/2006-03-17-KnRMismatch.c [new file with mode: 0644]
test/FrontendC/2006-05-01-AppleAlignmentPragma.c [new file with mode: 0644]
test/FrontendC/2006-05-19-SingleEltReturn.c [new file with mode: 0644]
test/FrontendC/2006-07-31-PR854.c [new file with mode: 0644]
test/FrontendC/2006-09-11-BitfieldRefCrash.c [new file with mode: 0644]
test/FrontendC/2006-09-18-fwrite-cast-crash.c [new file with mode: 0644]
test/FrontendC/2006-09-21-IncompleteElementType.c [new file with mode: 0644]
test/FrontendC/2006-09-25-DebugFilename.c [new file with mode: 0644]
test/FrontendC/2006-09-25-DebugFilename.h [new file with mode: 0644]
test/FrontendC/2006-09-28-SimpleAsm.c [new file with mode: 0644]
test/FrontendC/2006-10-30-ArrayCrash.c [new file with mode: 0644]
test/FrontendC/2006-12-14-ordered_expr.c [new file with mode: 0644]
test/FrontendC/2007-01-06-KNR-Proto.c [new file with mode: 0644]
test/FrontendC/2007-01-20-VectorICE.c [new file with mode: 0644]
test/FrontendC/2007-01-24-InlineAsmCModifier.c [new file with mode: 0644]
test/FrontendC/2007-02-04-AddrLValue-2.c [new file with mode: 0644]
test/FrontendC/2007-02-04-AddrLValue.c [new file with mode: 0644]
test/FrontendC/2007-02-04-EmptyStruct.c [new file with mode: 0644]
test/FrontendC/2007-02-04-WITH_SIZE_EXPR.c [new file with mode: 0644]
test/FrontendC/2007-02-05-nested.c [new file with mode: 0644]
test/FrontendC/2007-02-07-AddrLabel.c [new file with mode: 0644]
test/FrontendC/2007-02-16-VariableSizeStructArg.c [new file with mode: 0644]
test/FrontendC/2007-02-16-VoidPtrDiff.c [new file with mode: 0644]
test/FrontendC/2007-02-16-WritableStrings.c [new file with mode: 0644]
test/FrontendC/2007-02-25-C-DotDotDot.c [new file with mode: 0644]
test/FrontendC/2007-03-01-VarSizeArrayIdx.c [new file with mode: 0644]
test/FrontendC/2007-03-05-DataLayout.c [new file with mode: 0644]
test/FrontendC/2007-03-06-VarSizeInStruct1.c [new file with mode: 0644]
test/FrontendC/2007-03-06-VarSizeInStruct2.c [new file with mode: 0644]
test/FrontendC/2007-03-26-BitfieldAfterZeroWidth.c [new file with mode: 0644]
test/FrontendC/2007-03-26-ZeroWidthBitfield.c [new file with mode: 0644]
test/FrontendC/2007-03-27-ArrayCompatible.c [new file with mode: 0644]
test/FrontendC/2007-03-27-VarLengthArray.c [new file with mode: 0644]
test/FrontendC/2007-04-05-PackedBitFields-2.c [new file with mode: 0644]
test/FrontendC/2007-04-05-PackedBitFields.c [new file with mode: 0644]
test/FrontendC/2007-04-05-PackedStruct.c [new file with mode: 0644]
test/FrontendC/2007-04-05-PadBeforeZeroLengthField.c [new file with mode: 0644]
test/FrontendC/2007-04-05-UnPackedStruct.c [new file with mode: 0644]
test/FrontendC/2007-04-11-InlineAsmStruct.c [new file with mode: 0644]
test/FrontendC/2007-04-11-InlineAsmUnion.c [new file with mode: 0644]
test/FrontendC/2007-04-11-InlineStorageClassC89.c [new file with mode: 0644]
test/FrontendC/2007-04-11-InlineStorageClassC99.c [new file with mode: 0644]
test/FrontendC/2007-04-11-PR1321.c [new file with mode: 0644]
test/FrontendC/2007-04-13-InlineAsmStruct2.c [new file with mode: 0644]
test/FrontendC/2007-04-13-InlineAsmUnion2.c [new file with mode: 0644]
test/FrontendC/2007-04-14-FNoBuiltin.c [new file with mode: 0644]
test/FrontendC/2007-04-17-ZeroSizeBitFields.c [new file with mode: 0644]
test/FrontendC/2007-04-24-VolatileStructCopy.c [new file with mode: 0644]
test/FrontendC/2007-04-24-bit-not-expr.c [new file with mode: 0644]
test/FrontendC/2007-04-24-str-const.c [new file with mode: 0644]
test/FrontendC/2007-05-07-NestedStructReturn.c [new file with mode: 0644]
test/FrontendC/2007-05-07-PaddingElements.c [new file with mode: 0644]
test/FrontendC/2007-05-08-PCH.c [new file with mode: 0644]
test/FrontendC/2007-05-11-str-const.c [new file with mode: 0644]
test/FrontendC/2007-05-15-PaddingElement.c [new file with mode: 0644]
test/FrontendC/2007-05-16-EmptyStruct.c [new file with mode: 0644]
test/FrontendC/2007-05-29-UnionCopy.c [new file with mode: 0644]
test/FrontendC/2007-06-05-NoInlineAttribute.c [new file with mode: 0644]
test/FrontendC/2007-06-15-AnnotateAttribute.c [new file with mode: 0644]
test/FrontendC/2007-06-18-SextAttrAggregate.c [new file with mode: 0644]
test/FrontendC/2007-07-29-RestrictPtrArg.c [new file with mode: 0644]
test/FrontendC/2007-08-01-LoadStoreAlign.c [new file with mode: 0644]
test/FrontendC/2007-08-21-ComplexCst.c [new file with mode: 0644]
test/FrontendC/2007-08-22-CTTZ.c [new file with mode: 0644]
test/FrontendC/2007-09-05-ConstCtor.c [new file with mode: 0644]
test/FrontendC/2007-09-12-PragmaPack.c [new file with mode: 0644]
test/FrontendC/2007-09-14-NegatePointer.c [new file with mode: 0644]
test/FrontendC/2007-09-17-WeakRef.c [new file with mode: 0644]
test/FrontendC/2007-09-20-GcrootAttribute.c [new file with mode: 0644]
test/FrontendC/2007-09-26-Alignment.c [new file with mode: 0644]
test/FrontendC/2007-09-27-ComplexIntCompare.c [new file with mode: 0644]
test/FrontendC/2007-09-28-PackedUnionMember.c [new file with mode: 0644]
test/FrontendC/2007-10-01-BuildArrayRef.c [new file with mode: 0644]
test/FrontendC/2007-10-02-VolatileArray.c [new file with mode: 0644]
test/FrontendC/2007-10-15-VoidPtr.c [new file with mode: 0644]
test/FrontendC/2007-10-30-Volatile.c [new file with mode: 0644]
test/FrontendC/2007-11-07-AlignedMemcpy.c [new file with mode: 0644]
test/FrontendC/2007-11-07-CopyAggregateAlign.c [new file with mode: 0644]
test/FrontendC/2007-11-07-ZeroAggregateAlign.c [new file with mode: 0644]
test/FrontendC/2007-11-27-SExtZExt.c [new file with mode: 0644]
test/FrontendC/2007-11-28-GlobalInitializer.c [new file with mode: 0644]
test/FrontendC/2007-12-16-AsmNoUnwind.c [new file with mode: 0644]
test/FrontendC/2007-12-VarArrayDebug.c [new file with mode: 0644]
test/FrontendC/2008-01-04-WideBitfield.c [new file with mode: 0644]
test/FrontendC/2008-01-07-UnusualIntSize.c [new file with mode: 0644]
test/FrontendC/2008-01-11-ChainConsistency.c [new file with mode: 0644]
test/FrontendC/2008-01-21-PackedBitFields.c [new file with mode: 0644]
test/FrontendC/2008-01-21-PackedStructField.c [new file with mode: 0644]
test/FrontendC/2008-01-24-StructAlignAndBitFields.c [new file with mode: 0644]
test/FrontendC/2008-01-25-ByValReadNone.c [new file with mode: 0644]
test/FrontendC/2008-01-25-ZeroSizedAggregate.c [new file with mode: 0644]
test/FrontendC/2008-01-28-PragmaMark.c [new file with mode: 0644]
test/FrontendC/2008-01-28-UnionSize.c [new file with mode: 0644]
test/FrontendC/2008-02-11-AnnotateBuiltin.c [new file with mode: 0644]
test/FrontendC/2008-03-03-CtorAttrType.c [new file with mode: 0644]
test/FrontendC/2008-03-05-syncPtr.c [new file with mode: 0644]
test/FrontendC/2008-03-24-BitField-And-Alloca.c [new file with mode: 0644]
test/FrontendC/2008-03-26-PackedBitFields.c [new file with mode: 0644]
test/FrontendC/2008-04-08-NoExceptions.c [new file with mode: 0644]
test/FrontendC/2008-05-06-CFECrash.c [new file with mode: 0644]
test/FrontendC/2008-05-12-TempUsedBeforeDef.c [new file with mode: 0644]
test/FrontendC/2008-05-19-AlwaysInline.c [new file with mode: 0644]
test/FrontendC/BasicInstrs.c [new file with mode: 0644]
test/FrontendC/attribute_constructor.c [new file with mode: 0644]
test/FrontendC/block-copy.c [new file with mode: 0644]
test/FrontendC/dg.exp [new file with mode: 0644]
test/FrontendC/exact-div-expr.c [new file with mode: 0644]
test/FrontendC/extern-weak.c [new file with mode: 0644]
test/FrontendC/funccall.c [new file with mode: 0644]
test/FrontendC/hidden-visibility.c [new file with mode: 0644]
test/FrontendC/inline-asm-mrv.c [new file with mode: 0644]
test/FrontendC/libcalls.c [new file with mode: 0644]
test/FrontendC/nested-functions.c [new file with mode: 0644]
test/FrontendC/sret.c [new file with mode: 0644]
test/FrontendC/sret2.c [new file with mode: 0644]
test/FrontendC/unaligned-memcpy.c [new file with mode: 0644]

diff --git a/test/C++Frontend/2003-08-20-ExceptionFail.cpp b/test/C++Frontend/2003-08-20-ExceptionFail.cpp
deleted file mode 100644 (file)
index fd1c6ad..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-// RUN: %llvmgxx -S %s -o - | llvm-as -f -o /dev/null
-
-void foo();
-
-void bar() {
-  struct local {
-    ~local() { foo(); }
-  } local_obj;
-
-  foo();
-}
-
diff --git a/test/C++Frontend/2003-08-21-EmptyClass.cpp b/test/C++Frontend/2003-08-21-EmptyClass.cpp
deleted file mode 100644 (file)
index 2f90b3a..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-// RUN: %llvmgxx -S %s -o - | llvm-as -f -o /dev/null
-
-// This tests compilation of EMPTY_CLASS_EXPR's
-
-struct empty {};
-
-void foo(empty) {}
-
-void bar() { foo(empty()); }
diff --git a/test/C++Frontend/2003-08-24-Cleanup.cpp b/test/C++Frontend/2003-08-24-Cleanup.cpp
deleted file mode 100644 (file)
index ab0d1a0..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-// RUN: %llvmgxx -xc++ %s -c -o - | llvm-dis | grep unwind
-
-struct S { ~S(); };
-
-int mightthrow();
-
-int test() {
-  S s;
-  mightthrow();
-}
diff --git a/test/C++Frontend/2003-08-27-TypeNamespaces.cpp b/test/C++Frontend/2003-08-27-TypeNamespaces.cpp
deleted file mode 100644 (file)
index cd7247e..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-// RUN: %llvmgxx -S %s -o - | llvm-as -f -o /dev/null
-
-
-namespace foo {
-  namespace bar {
-    struct X { X(); };
-
-    X::X() {}
-  }
-}
-
-
-namespace {
-  struct Y { Y(); };
-  Y::Y() {}
-}
diff --git a/test/C++Frontend/2003-08-28-ForwardType.cpp b/test/C++Frontend/2003-08-28-ForwardType.cpp
deleted file mode 100644 (file)
index 38c4e2d..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-// RUN: %llvmgxx -S %s -o - | llvm-as -f -o /dev/null
-
-// Default placement versions of operator new.
-#include <new>
-
-void* operator new(size_t, void* __p) throw();
-
-
-template<typename _CharT>
-struct stdio_filebuf
-{  stdio_filebuf();
-
-};
-
-extern stdio_filebuf<char> buf_cout;
-
-void foo() {
-  // Create stream buffers for the standard streams and use
-  // those buffers without destroying and recreating the
-  // streams.
-  new (&buf_cout) stdio_filebuf<char>();
-
-}
diff --git a/test/C++Frontend/2003-08-28-SaveExprBug.cpp b/test/C++Frontend/2003-08-28-SaveExprBug.cpp
deleted file mode 100644 (file)
index 2be35d8..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-// RUN: %llvmgxx -S %s -o - | llvm-as -f -o /dev/null
-
-
-char* eback();
-
-template<typename foo>
-struct basic_filebuf {
-  char *instancevar;
-
-  void callee() {
-    instancevar += eback() != eback();
-  }
-
-  void caller();
-};
-
-
-template<typename _CharT>
-void basic_filebuf<_CharT>::caller() {
-  callee();
-}
-
-
-template class basic_filebuf<char>;
diff --git a/test/C++Frontend/2003-08-29-ArgPassingBug.cpp b/test/C++Frontend/2003-08-29-ArgPassingBug.cpp
deleted file mode 100644 (file)
index d4cddff..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-
-// RUN: %llvmgcc -xc++ -c -o /dev/null %s |& not grep WARNING
-
-struct iterator {
-  iterator();
-  iterator(const iterator &I);
-};
-
-iterator foo(const iterator &I) { return I; }
-
-void test() {
-  foo(iterator());
-}
diff --git a/test/C++Frontend/2003-08-31-StructLayout.cpp b/test/C++Frontend/2003-08-31-StructLayout.cpp
deleted file mode 100644 (file)
index 99d6682..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-// RUN: %llvmgxx -S %s -o - | llvm-as -f -o /dev/null
-
-// There is a HOLE in the derived2 object due to not wanting to place the two
-// baseclass instances at the same offset!
-
-struct baseclass {};
-
-class derived1 : public baseclass {
-  void * NodePtr;
-};
-
-class derived2 : public baseclass {
-  derived1 current;
-};
-
-derived2 RI;
diff --git a/test/C++Frontend/2003-09-22-CompositeExprValue.cpp b/test/C++Frontend/2003-09-22-CompositeExprValue.cpp
deleted file mode 100644 (file)
index a8208ad..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-// RUN: %llvmgxx -S %s -o - | llvm-as -f -o /dev/null
-
-struct duration {
- duration operator/=(int c) {
-  return *this;
-  }
-};
-
-void a000090() {
-  duration() /= 1;
-}
diff --git a/test/C++Frontend/2003-09-29-ArgumentNumberMismatch.cpp b/test/C++Frontend/2003-09-29-ArgumentNumberMismatch.cpp
deleted file mode 100644 (file)
index 4873123..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-// RUN: %llvmgxx -S %s -o - | llvm-as -f -o /dev/null
-
-// Non-POD classes cannot be passed into a function by component, because their
-// dtors must be run.  Instead, pass them in by reference.  The C++ front-end
-// was mistakenly "thinking" that 'foo' took a structure by component.
-
-struct C {
-  int A, B;
-  ~C() {}
-};
-
-void foo(C b);
-
-void test(C *P) {
-  foo(*P);
-}
-
diff --git a/test/C++Frontend/2003-09-30-CommaExprBug.cpp b/test/C++Frontend/2003-09-30-CommaExprBug.cpp
deleted file mode 100644 (file)
index afe470c..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-// RUN: %llvmgxx -S %s -o - | llvm-as -f -o /dev/null
-
-class Empty {};
-
-void foo(Empty E);
-
-void bar() {
-  foo(Empty());
-}
-
diff --git a/test/C++Frontend/2003-09-30-ForIncrementExprBug.cpp b/test/C++Frontend/2003-09-30-ForIncrementExprBug.cpp
deleted file mode 100644 (file)
index 40c9c87..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-// RUN: %llvmgxx -S %s -o - | llvm-as -f -o /dev/null
-
-struct C {};
-
-C &foo();
-
-void foox() {
-  for (; ; foo());
-}
-
diff --git a/test/C++Frontend/2003-09-30-ForIncrementExprBug2.cpp b/test/C++Frontend/2003-09-30-ForIncrementExprBug2.cpp
deleted file mode 100644 (file)
index e07eb42..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-// RUN: %llvmgxx -S %s -o - | llvm-as -f -o /dev/null
-
-// Test with an opaque type
-
-struct C;
-
-C &foo();
-
-void foox() {
-  for (; ; foo());
-}
-
diff --git a/test/C++Frontend/2003-09-30-NestedFunctionDecl.cpp b/test/C++Frontend/2003-09-30-NestedFunctionDecl.cpp
deleted file mode 100644 (file)
index b1c54b8..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-// RUN: %llvmgxx -S %s -o - | llvm-as -f -o /dev/null
-
-// The C++ front-end thinks the two foo's are different, the LLVM emitter
-// thinks they are the same.  The disconnect causes problems.
-
-void foo() { }
-
-void bar() {
-  void foo();
-
-  foo();
-}
diff --git a/test/C++Frontend/2003-10-17-BoolBitfields.cpp b/test/C++Frontend/2003-10-17-BoolBitfields.cpp
deleted file mode 100644 (file)
index 547a367..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-// RUN: %llvmgxx -S %s -o - | llvm-as -f -o /dev/null
-
-struct test {
-  bool A : 1;
-  bool B : 1;
-};
-
-void foo(test *T) {
-  T->B = true;
-}
-
diff --git a/test/C++Frontend/2003-10-21-InnerClass.cpp b/test/C++Frontend/2003-10-21-InnerClass.cpp
deleted file mode 100644 (file)
index fadd51d..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-// RUN: %llvmgcc -xc++ -S -o - %s | grep {struct.X::Y}
-struct X {
-
-  struct Y {
-    Y();
-  };
-
-};
-
-X::Y::Y() {
-
-}
diff --git a/test/C++Frontend/2003-10-27-VirtualBaseClassCrash.cpp b/test/C++Frontend/2003-10-27-VirtualBaseClassCrash.cpp
deleted file mode 100644 (file)
index f9fc80e..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-// RUN: %llvmgxx -S %s -o - | llvm-as -f -o /dev/null
-
-
-template<class T>
-struct super {
-  int Y;
-  void foo();
-};
-
-template <class T>
-struct test : virtual super<int> {};
-
-extern test<int> X;
-
-void foo() {
-  X.foo();
-}
diff --git a/test/C++Frontend/2003-11-02-WeakLinkage.cpp b/test/C++Frontend/2003-11-02-WeakLinkage.cpp
deleted file mode 100644 (file)
index 748ca63..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-// RUN: %llvmgcc -xc++ -S -o - %s | not grep weak
-// The template should compile to linkonce linkage, not weak linkage.
-
-template<class T>
-void thefunc();
-
-template<class T>
-inline void thefunc() {}
-
-void test() {
-  thefunc<int>();
-}
-
diff --git a/test/C++Frontend/2003-11-04-ArrayConstructors.cpp b/test/C++Frontend/2003-11-04-ArrayConstructors.cpp
deleted file mode 100644 (file)
index 4df4f9b..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-// RUN: %llvmgxx -S %s -o - | llvm-as -f -o /dev/null
-
-
-struct Foo {
-  Foo(int);
-  ~Foo();
-};
-void foo() {
-  struct {
-    Foo name;
-  } Int[] =  { 1 };
-}
diff --git a/test/C++Frontend/2003-11-04-CatchLabelName.cpp b/test/C++Frontend/2003-11-04-CatchLabelName.cpp
deleted file mode 100644 (file)
index 8acf88d..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-// RUN: %llvmgxx -S %s -o - | llvm-as -f -o /dev/null
-
-#include <string>
-
-void bar();
-
-void test() {
-  try {
-    bar();
-  } catch (std::string) {}
-}
diff --git a/test/C++Frontend/2003-11-08-ArrayAddress.cpp b/test/C++Frontend/2003-11-08-ArrayAddress.cpp
deleted file mode 100644 (file)
index 9ad1b8f..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-// RUN: %llvmgxx -xc++ %s -c -o - | llvm-dis | grep getelementptr
-
-struct foo {
-  int array[100];
-  void *getAddr(unsigned i);
-};
-
-void *foo::getAddr(unsigned i) {
-  return &array[i];
-}
diff --git a/test/C++Frontend/2003-11-09-ConstructorTypeSafety.cpp b/test/C++Frontend/2003-11-09-ConstructorTypeSafety.cpp
deleted file mode 100644 (file)
index e6c09e5..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-// The code generated for this testcase should be completely typesafe!
-// RUN: %llvmgcc -xc++ -S -o - %s | llvm-as | opt -die | llvm-dis | \
-// RUN:    notcast
-
-struct contained {
-  unsigned X;
-  contained();
-};
-
-struct base {
-  unsigned A, B;
-};
-
-struct derived : public base {
-  contained _M_value_field;
-};
-
-int test() {
-  derived X;
-}
-
diff --git a/test/C++Frontend/2003-11-18-EnumArray.cpp b/test/C++Frontend/2003-11-18-EnumArray.cpp
deleted file mode 100644 (file)
index 6eaf9d6..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-// RUN: %llvmgxx -S %s -o - | llvm-as -f -o /dev/null
-
-enum TchkType {
-  tchkNum, tchkString, tchkSCN, tchkNone
-};
-
-struct Operator {
-  enum TchkType tchk[8];
-};
-
-struct Operator opTab[] = {
-  {{tchkNum, tchkNum, tchkString} }
-};
-
diff --git a/test/C++Frontend/2003-11-18-MemberInitializationCasting.cpp b/test/C++Frontend/2003-11-18-MemberInitializationCasting.cpp
deleted file mode 100644 (file)
index cb66ba1..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-// RUN: %llvmgcc -xc++ -S -o - %s | llvm-as | opt -die | llvm-dis |  notcast
-
-struct A {
-        A() : i(0) {}
-        int getI() {return i;}
-        int i;
-};
-
-int f(int j)
-{
-        A a;
-        return j+a.getI();
-}
diff --git a/test/C++Frontend/2003-11-18-PtrMemConstantInitializer.cpp b/test/C++Frontend/2003-11-18-PtrMemConstantInitializer.cpp
deleted file mode 100644 (file)
index ae76a6c..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-// RUN: %llvmgxx -S %s -o - | llvm-as -f -o /dev/null
-
-struct Gfx {
-  void opMoveSetShowText();
-};
-
-struct Operator {
-  void (Gfx::*func)();
-};
-
-Operator opTab[] = {
-  {&Gfx::opMoveSetShowText},
-};
-
diff --git a/test/C++Frontend/2003-11-25-ReturningOpaqueByValue.cpp b/test/C++Frontend/2003-11-25-ReturningOpaqueByValue.cpp
deleted file mode 100644 (file)
index 83fe1b3..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-// RUN: %llvmgxx -S %s -o - | llvm-as -f -o /dev/null
-
-#include <vector>
-std::vector<int> my_method ();
-
-int
-main ()
-{
-  my_method ();
-  return 0;
-}
-
diff --git a/test/C++Frontend/2003-11-27-MultipleInheritanceThunk.cpp b/test/C++Frontend/2003-11-27-MultipleInheritanceThunk.cpp
deleted file mode 100644 (file)
index 16026c3..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-// RUN: %llvmgxx -S %s -o - | llvm-as -f -o /dev/null
-
-
-struct CallSite {
-  int X;
-
-  CallSite(const CallSite &CS);
-};
-
-struct AliasAnalysis {
-  int TD;
-
-  virtual int getModRefInfo(CallSite CS);
-};
-
-
-struct Pass {
-  int X;
-  virtual int foo();
-};
-
-struct AliasAnalysisCounter : public Pass, public AliasAnalysis {
-  int getModRefInfo(CallSite CS) {
-    return 0;
-  }
-};
-
-AliasAnalysisCounter AAC;
diff --git a/test/C++Frontend/2003-11-29-DuplicatedCleanupTest.cpp b/test/C++Frontend/2003-11-29-DuplicatedCleanupTest.cpp
deleted file mode 100644 (file)
index 8131baa..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-// RUN: %llvmgxx -S %s -o - | llvm-as -f -o /dev/null
-
-
-void doesntThrow() throw();
-struct F {
-  ~F() { doesntThrow(); }
-};
-
-void atest() {
-  F A;
-lab:
-  F B;
-  goto lab;
-}
-
-void test(int val) {
-label: {
-   F A;
-   F B;
-   if (val == 0) goto label;
-   if (val == 1) goto label;
-}
-}
-
-void test3(int val) {
-label: {
-   F A;
-   F B;
-   if (val == 0) { doesntThrow(); goto label; }
-   if (val == 1) { doesntThrow(); goto label; }
-}
-}
-
-void test4(int val) {
-label: {
-   F A;
-   F B;
-   if (val == 0) { F C; goto label; }
-   if (val == 1) { F D; goto label; }
-}
-}
diff --git a/test/C++Frontend/2003-12-08-ArrayOfPtrToMemberFunc.cpp b/test/C++Frontend/2003-12-08-ArrayOfPtrToMemberFunc.cpp
deleted file mode 100644 (file)
index d512234..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-// RUN: %llvmgxx -S %s -o - | llvm-as -f -o /dev/null
-
-struct Evil {
- void fun ();
-};
-int foo();
-typedef void (Evil::*memfunptr) ();
-static memfunptr jumpTable[] = { &Evil::fun };
-
-void Evil::fun() {
- (this->*jumpTable[foo()]) ();
-}
diff --git a/test/C++Frontend/2004-01-11-DynamicInitializedConstant.cpp b/test/C++Frontend/2004-01-11-DynamicInitializedConstant.cpp
deleted file mode 100644 (file)
index 8ae15c9..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-// RUN: %llvmgcc -xc++ -S -o - %s | not grep { constant }
-
-extern int X;
-const int Y = X;
-const int* foo() { return &Y; }
-
diff --git a/test/C++Frontend/2004-03-08-ReinterpretCastCopy.cpp b/test/C++Frontend/2004-03-08-ReinterpretCastCopy.cpp
deleted file mode 100644 (file)
index 755d7c7..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-// RUN: %llvmgxx -S %s -o - | llvm-as -f -o /dev/null
-
-struct A {
-  virtual void Method() = 0;
-};
-
-struct B : public A {
-  virtual void Method() { }
-};
-
-typedef void (A::*fn_type_a)(void);
-typedef void (B::*fn_type_b)(void);
-
-int main(int argc, char **argv)
-{
-  fn_type_a f = reinterpret_cast<fn_type_a>(&B::Method);
-  fn_type_b g = reinterpret_cast<fn_type_b>(f);
-  B b;
-  (b.*g)();
-  return 0;
-}
diff --git a/test/C++Frontend/2004-03-09-UnmangledBuiltinMethods.cpp b/test/C++Frontend/2004-03-09-UnmangledBuiltinMethods.cpp
deleted file mode 100644 (file)
index b019e0c..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-// RUN: %llvmgcc -xc++ -c -o - %s | llvm-dis | grep _ZN11AccessFlags6strlenEv
-
-struct AccessFlags {
-  void strlen();
-};
-
-void AccessFlags::strlen() { }
-
diff --git a/test/C++Frontend/2004-03-15-CleanupsAndGotos.cpp b/test/C++Frontend/2004-03-15-CleanupsAndGotos.cpp
deleted file mode 100644 (file)
index 9bc70c8..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-// RUN: %llvmgxx -S %s -o - | llvm-as -f -o /dev/null
-
-// Testcase from Bug 291
-
-struct X {
-  ~X();
-};
-
-void foo() {
-  X v;
-
-TryAgain:
-  goto TryAgain;
-}
diff --git a/test/C++Frontend/2004-06-08-LateTemplateInstantiation.cpp b/test/C++Frontend/2004-06-08-LateTemplateInstantiation.cpp
deleted file mode 100644 (file)
index 16d8e5e..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-// RUN: %llvmgxx -S %s -o - | llvm-as -f -o /dev/null
-
-
-
-template<typename Ty>
-struct normal_iterator {
-  int FIELD;
-};
-
-void foo(normal_iterator<int>);
-normal_iterator<int> baz();
-
-void bar() {
-  foo(baz());
-}
-
-void *bar2() {
-  return (void*)foo;
-}
diff --git a/test/C++Frontend/2004-09-27-CompilerCrash.cpp b/test/C++Frontend/2004-09-27-CompilerCrash.cpp
deleted file mode 100644 (file)
index f507c23..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-// RUN: %llvmgxx -S %s -o - | llvm-as -f -o /dev/null
-
-struct Pass {} ;
-template<typename PassName>
-Pass *callDefaultCtor() { return new PassName(); }
-
-void foo(Pass *(*C)());
-
-#include <string>
-
-bool foo(std::string &X) {
-  return X.empty();
-}
diff --git a/test/C++Frontend/2004-09-27-DidntEmitTemplate.cpp b/test/C++Frontend/2004-09-27-DidntEmitTemplate.cpp
deleted file mode 100644 (file)
index 706d541..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-// RUN: %llvmgxx -xc++ %s -c -o - | llvm-dis | grep callDefaultCtor | \
-// RUN:   not grep declare
-
-// This is a testcase for LLVM PR445, which was a problem where the 
-// instantiation of callDefaultCtor was not being emitted correctly.
-
-struct Pass {};
-
-template<typename PassName>
-Pass *callDefaultCtor() { return new Pass(); }
-
-void foo(Pass *(*C)());
-
-struct basic_string {
-  bool empty() const { return true; }
-};
-
-
-bool foo2(basic_string &X) {
-  return X.empty();
-}
-void baz() { foo(callDefaultCtor<Pass>); }
-
diff --git a/test/C++Frontend/2004-11-27-EmitsUnusedInlineFunctions.cpp b/test/C++Frontend/2004-11-27-EmitsUnusedInlineFunctions.cpp
deleted file mode 100644 (file)
index 794b7d7..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-// The C++ front-end was emitting WAY too many inline functions.  This test
-// verifies that it does not emit the body of getchar, because it is not used.
-// This corresponds to PR459
-
-// RUN: %llvmgxx %s -S -o - | not grep {^i32 .getchar}
-
-#include <stdio.h>
diff --git a/test/C++Frontend/2004-11-27-ExceptionCleanupAssertion.cpp b/test/C++Frontend/2004-11-27-ExceptionCleanupAssertion.cpp
deleted file mode 100644 (file)
index f3d225e..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-// RUN: %llvmgxx %s -S -o /dev/null
-
-// This is PR421
-
-struct Strongbad {
-    Strongbad(const char *str );
-    ~Strongbad();
-    operator const char *() const;
-};
-
-void TheCheat () {
-  Strongbad foo(0);
-  Strongbad dirs[] = { Strongbad(0) + 1};
-}
diff --git a/test/C++Frontend/2004-11-27-FriendDefaultArgCrash.cpp b/test/C++Frontend/2004-11-27-FriendDefaultArgCrash.cpp
deleted file mode 100644 (file)
index 731e726..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-// RUN: %llvmgxx %s -o /dev/null -S
-
-// PR447
-
-namespace nm {
-  struct str {
-    friend int foo(int arg = 0);
-  };
-}
diff --git a/test/C++Frontend/2004-11-27-InlineAsmFunctionRedefinition.cpp b/test/C++Frontend/2004-11-27-InlineAsmFunctionRedefinition.cpp
deleted file mode 100644 (file)
index 42b223b..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-// RUN: %llvmgxx %s -S -o /dev/null
-
-// PR397
-
-struct stat { };
-struct stat64 { };
-
-extern "C" {
-
-extern int lstat(const char *, struct stat *) __asm__("lstat64");
-extern int lstat64(const char *, struct stat64 *);
-
-extern int __lxstat(int, const char *, struct stat *) __asm__("__lxstat64");
-extern int __lxstat64(int, const char *, struct stat64 *);
-
-extern __inline__ int lstat(const char *path, struct stat *statbuf) {
-    return __lxstat(3, path, statbuf);
-}
-extern __inline__ int lstat64(const char *path, struct stat64 *statbuf) {
-    return __lxstat64(3, path, statbuf);
-}
-}
-
-int do_one_file(void) {
-    return lstat(0, 0) + lstat64(0,0);
-}
diff --git a/test/C++Frontend/2005-01-03-StaticInitializers.cpp b/test/C++Frontend/2005-01-03-StaticInitializers.cpp
deleted file mode 100644 (file)
index da1b005..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-// RUN: %llvmgxx %s -S -o - | not grep llvm.global_ctor
-
-struct S {
-  int  A[2];
-};
-
-int XX = (int)(long)&(((struct S*)0)->A[1]);
-
diff --git a/test/C++Frontend/2005-02-11-AnonymousUnion.cpp b/test/C++Frontend/2005-02-11-AnonymousUnion.cpp
deleted file mode 100644 (file)
index b0ff7e7..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-// RUN: %llvmgxx %s -S -o -
-
-// Test anonymous union with members of the same size.
-int test1(float F) {
-  union {
-     float G;
-     int i;
-  };
-  G = F;
-  return i;
-}
-
-// test anonymous union with members of differing size.
-int test2(short F) {
-  volatile union {
-     short G;
-     int i;
-  };
-  G = F;
-  return i;
-}
-
-// Make sure that normal unions work.  duh :)
-volatile union {
-  short S;
-  int i;
-} U;
-
-int test3(short s) {
-  U.S = s;
-  return U.i;
-}
diff --git a/test/C++Frontend/2005-02-13-BadDynamicInit.cpp b/test/C++Frontend/2005-02-13-BadDynamicInit.cpp
deleted file mode 100644 (file)
index 84fa565..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-// RUN: %llvmgxx %s -S -o - | not grep llvm.global_ctors
-// This testcase corresponds to PR509
-struct Data {
-  unsigned *data;
-  unsigned array[1];
-};
-
-Data shared_null = { shared_null.array };
-
diff --git a/test/C++Frontend/2005-02-14-BitFieldOffset.cpp b/test/C++Frontend/2005-02-14-BitFieldOffset.cpp
deleted file mode 100644 (file)
index 522e20a..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-// RUN: %llvmgxx %s -S -o - | not grep {i32 6}
-
-struct QVectorTypedData {
-    int size;
-    unsigned int sharable : 1;
-    unsigned short array[1];
-};
-
-void foo(QVectorTypedData *X) {
-  X->array[0] = 123;
-}
diff --git a/test/C++Frontend/2005-02-19-BitfieldStructCrash.cpp b/test/C++Frontend/2005-02-19-BitfieldStructCrash.cpp
deleted file mode 100644 (file)
index 8f571e0..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-// RUN: %llvmgxx -S %s -o -
-
-struct QChar {unsigned short X; QChar(unsigned short); } ;
-
-struct Command {
-        Command(QChar c) : c(c) {}
-        unsigned int type : 4;
-        QChar c;
-    };
-
-Command X(QChar('c'));
-
-void Foo(QChar );
-void bar() { Foo(X.c); }
diff --git a/test/C++Frontend/2005-02-19-UnnamedVirtualThunkArgument.cpp b/test/C++Frontend/2005-02-19-UnnamedVirtualThunkArgument.cpp
deleted file mode 100644 (file)
index 853fee7..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-// RUN: %llvmgxx -S %s -o /dev/null
-
-struct Foo  {
-    Foo();
-    virtual ~Foo();
-};
-
-struct Bar  {
-    Bar();
-    virtual ~Bar();
-    virtual bool test(bool) const;
-};
-
-struct Baz : public Foo, public Bar  {
-    Baz();
-    virtual ~Baz();
-    virtual bool test(bool) const;
-};
-
-bool Baz::test(bool) const  {
-    return true;
-}
diff --git a/test/C++Frontend/2005-02-20-BrokenReferenceTest.cpp b/test/C++Frontend/2005-02-20-BrokenReferenceTest.cpp
deleted file mode 100644 (file)
index 31026d3..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-// RUN: %llvmgxx %s -S -o /dev/null
-
-void test(unsigned char *b, int rb) {
-  typedef unsigned char imgfoo[10][rb];
-  imgfoo &br = *(imgfoo *)b;
-
-  br[0][0] = 1;
-
-  rb = br[0][0];
-}
-
diff --git a/test/C++Frontend/2005-02-27-PlacementArrayNewCrash.cpp b/test/C++Frontend/2005-02-27-PlacementArrayNewCrash.cpp
deleted file mode 100644 (file)
index a8fc668..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-// RUN: %llvmgxx -S %s -o -
-
-#include <new>
-typedef double Ty[4];
-
-void foo(Ty *XX) {
-  new(XX) Ty();
-}
diff --git a/test/C++Frontend/2005-07-21-VirtualBaseAccess.cpp b/test/C++Frontend/2005-07-21-VirtualBaseAccess.cpp
deleted file mode 100644 (file)
index 7711cff..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-// RUN: %llvmgxx -xc++ %s -c -o - | opt -die | llvm-dis | not grep cast
-
-void foo(int*);
-
-struct FOO {
-  int X;
-};
-
-struct BAR : virtual FOO { BAR(); };
-
-int testfn() {
-  BAR B;
-  foo(&B.X);
-}
diff --git a/test/C++Frontend/2006-03-01-GimplifyCrash.cpp b/test/C++Frontend/2006-03-01-GimplifyCrash.cpp
deleted file mode 100644 (file)
index b0d00fe..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-// RUN: %llvmgxx -S %s -o -
-
-struct PrefMapElem {
-  virtual ~PrefMapElem(); 
-  unsigned int fPrefId;
-};
-
-int foo() {
-  PrefMapElem* fMap;
-  if (fMap[0].fPrefId == 1)
-    return 1;
-  
-  return 0;
-}
diff --git a/test/C++Frontend/2006-03-06-C++RecurseCrash.cpp b/test/C++Frontend/2006-03-06-C++RecurseCrash.cpp
deleted file mode 100644 (file)
index 2fb3fb7..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-// RUN: %llvmgcc %s -S -o -
-namespace std {
-  class exception { };
-
-  class type_info {
-  public:
-    virtual ~type_info();
-  };
-
-}
-
-namespace __cxxabiv1 {
-  class __si_class_type_info : public std::type_info {
-    ~__si_class_type_info();
-  };
-}
-
-class recursive_init: public std::exception {
-public:
-  virtual ~recursive_init() throw ();
-};
-
-recursive_init::~recursive_init() throw() { }
-
diff --git a/test/C++Frontend/2006-09-08-powi.cpp b/test/C++Frontend/2006-09-08-powi.cpp
deleted file mode 100644 (file)
index 75cbfda..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-// RUN: %llvmgxx -O3 -S -o - %s
-
-#include <cmath>
-
-double foo(double X, int Y) {
-  return std::pow(X, Y);
-}
diff --git a/test/C++Frontend/2006-09-12-OpaqueStructCrash.cpp b/test/C++Frontend/2006-09-12-OpaqueStructCrash.cpp
deleted file mode 100644 (file)
index f3160e8..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-// RUN: %llvmgxx -O3 -S -o - %s
-
-struct A {
-   virtual ~A();
-};
-
-template <typename Ty>
-struct B : public A {
-   ~B () { delete [] val; }
-private:
-     Ty* val;
-};
-
-template <typename Ty>
-struct C : public A {
-   C ();
-   ~C ();
-};
-
-template <typename Ty>
-struct D : public A {
-     D () {}
-   private:
-     B<C<Ty> > blocks;
-};
-
-template class D<double>;
-
diff --git a/test/C++Frontend/2006-09-27-Debug-Protection.cpp b/test/C++Frontend/2006-09-27-Debug-Protection.cpp
deleted file mode 100644 (file)
index d9a25aa..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-// RUN: %llvmgxx -O0 -emit-llvm -S -g -o - %s | grep {i32 1,}
-// RUN: %llvmgxx -O0 -emit-llvm -S -g -o - %s | grep {i32 2,}
-
-class A {
-public:
-  int x;
-protected:
-  int y;
-private:
-  int z;
-};
-
-A a;
diff --git a/test/C++Frontend/2006-10-30-ClassBitfield.cpp b/test/C++Frontend/2006-10-30-ClassBitfield.cpp
deleted file mode 100644 (file)
index bd3b173..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-// RUN: %llvmgxx %s -emit-llvm -S -o -
-// PR954
-
-struct _Refcount_Base   {
-  unsigned long _M_ref_count;
-  int _M_ref_count_lock;
-  _Refcount_Base() : _M_ref_count(0) {}
-};
-
-struct _Rope_RopeRep : public _Refcount_Base 
-{
-public:
-  int _M_tag:8; 
-};
-
-int foo(_Rope_RopeRep* r) { return r->_M_tag; }
diff --git a/test/C++Frontend/2006-11-06-StackTrace.cpp b/test/C++Frontend/2006-11-06-StackTrace.cpp
deleted file mode 100644 (file)
index 55b34ad..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-// This is a regression test on debug info to make sure that we can get a
-// meaningful stack trace from a C++ program.
-// RUN: %llvmgcc -S -O0 -g %s -o - | llvm-as | llc --disable-fp-elim -o %t.s -f
-// RUN: %compile_c %t.s -o %t.o
-// RUN: %link %t.o -o %t.exe
-// RUN: echo {break DeepStack::deepest\nrun 17\nwhere\n} > %t.in 
-// RUN: gdb -q -batch -n -x %t.in %t.exe | tee %t.out | \
-// RUN:   grep {#0  DeepStack::deepest.*(this=.*,.*x=33)}
-// RUN: gdb -q -batch -n -x %t.in %t.exe | \
-// RUN:   grep {#7  0x.* in main.*(argc=\[12\],.*argv=.*)}
-
-// Only works on ppc, x86 and x86_64.  Should generalize?
-// XFAIL: alpha|ia64|arm
-
-#include <stdlib.h>
-
-class DeepStack {
-  int seedVal;
-public:
-  DeepStack(int seed) : seedVal(seed) {}
-
-  int shallowest( int x ) { return shallower(x + 1); }
-  int shallower ( int x ) { return shallow(x + 2); }
-  int shallow   ( int x ) { return deep(x + 3); }
-  int deep      ( int x ) { return deeper(x + 4); }
-  int deeper    ( int x ) { return deepest(x + 6); }
-  int deepest   ( int x ) { return x + 7; }
-
-  int runit() { return shallowest(seedVal); }
-};
-
-int main ( int argc, char** argv) {
-
-  DeepStack DS9( (argc > 1 ? atoi(argv[1]) : 0) );
-  return DS9.runit();
-}
diff --git a/test/C++Frontend/2006-11-20-GlobalSymbols.cpp b/test/C++Frontend/2006-11-20-GlobalSymbols.cpp
deleted file mode 100644 (file)
index fc896b3..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-// PR1013
-// Check to make sure debug symbols use the correct name for globals and
-// functions.  Will not assemble if it fails to.
-// RUN: %llvmgcc -O0 -g -c %s
-
-int foo __asm__("f\001oo");
-
-int bar() {
-  return foo;
-}
diff --git a/test/C++Frontend/2006-11-30-ConstantExprCrash.cpp b/test/C++Frontend/2006-11-30-ConstantExprCrash.cpp
deleted file mode 100644 (file)
index 365c8e8..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-// RUN: %llvmgxx %s -emit-llvm -S -o -
-// PR1027
-
-struct sys_var {
-  unsigned name_length;
-
-  bool no_support_one_shot;
-  sys_var() {}
-};
-
-
-struct sys_var_thd : public sys_var {
-};
-
-extern sys_var_thd sys_auto_is_null;
-
-sys_var *getsys_variables() {
-  return &sys_auto_is_null;
-}
-
-sys_var *sys_variables = &sys_auto_is_null;
-
-
-
-
-
-
diff --git a/test/C++Frontend/2006-11-30-NoCompileUnit.cpp b/test/C++Frontend/2006-11-30-NoCompileUnit.cpp
deleted file mode 100644 (file)
index c1fa9ae..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-// This is a regression test on debug info to make sure we don't hit a compile 
-// unit size issue with gdb.
-// RUN: %llvmgcc -S -O0 -g %s -o - | llvm-as | \
-// RUN:   llc --disable-fp-elim -o NoCompileUnit.s -f
-// RUN: %compile_c NoCompileUnit.s -o NoCompileUnit.o
-// RUN: %compile_cxx NoCompileUnit.o -o NoCompileUnit.exe
-// RUN: echo {break main\nrun\np NoCompileUnit::pubname} > %t2
-// RUN: gdb -q -batch -n -x %t2 NoCompileUnit.exe | \
-// RUN:   tee NoCompileUnit.out | not grep {"low == high"}
-// XFAIL: alpha|ia64|arm
-
-
-class MamaDebugTest {
-private:
-  int N;
-  
-protected:
-  MamaDebugTest(int n) : N(n) {}
-  
-  int getN() const { return N; }
-
-};
-
-class BabyDebugTest : public MamaDebugTest {
-private:
-
-public:
-  BabyDebugTest(int n) : MamaDebugTest(n) {}
-  
-  static int doh;
-  
-  int  doit() {
-    int N = getN();
-    int Table[N];
-    
-    int sum = 0;
-    
-    for (int i = 0; i < N; ++i) {
-      int j = i;
-      Table[i] = j;
-    }
-    for (int i = 0; i < N; ++i) {
-      int j = Table[i];
-      sum += j;
-    }
-    
-    return sum;
-  }
-
-};
-
-int BabyDebugTest::doh;
-
-
-int main(int argc, const char *argv[]) {
-  BabyDebugTest BDT(20);
-  return BDT.doit();
-}
diff --git a/test/C++Frontend/2006-11-30-Pubnames.cpp b/test/C++Frontend/2006-11-30-Pubnames.cpp
deleted file mode 100644 (file)
index c6165a6..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-// This is a regression test on debug info to make sure that we can access 
-// qualified global names.
-// RUN: %llvmgcc -S -O0 -g %s -o - | llvm-as | \
-// RUN:   llc --disable-fp-elim -o %t.s -f
-// RUN: %compile_c %t.s -o %t.o
-// RUN: %link %t.o -o %t.exe
-// RUN: echo {break main\nrun\np Pubnames::pubname} > %t.in
-// RUN: gdb -q -batch -n -x %t.in %t.exe | tee %t.out | grep {\$1 = 10}
-// XFAIL: alpha|ia64|arm
-
-struct Pubnames {
-  static int pubname;
-};
-
-int Pubnames::pubname = 10;
-
-int main (int argc, char** argv) {
-  Pubnames p;
-  return 0;
-}
diff --git a/test/C++Frontend/2007-01-02-UnboundedArray.cpp b/test/C++Frontend/2007-01-02-UnboundedArray.cpp
deleted file mode 100644 (file)
index 648d19b..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-// Make sure unbounded arrays compile with debug information.
-// 
-// RUN: %llvmgcc -O0 -c -g %s
-
-// PR1068
-
-struct Object {
-  char buffer[];
-};
-
-int main(int argc, char** argv) {
-  new Object;
-  return 0;
-}
diff --git a/test/C++Frontend/2007-01-06-ELF-Thunk-Sections.cpp b/test/C++Frontend/2007-01-06-ELF-Thunk-Sections.cpp
deleted file mode 100644 (file)
index 654e11b..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-// RUN: %llvmgxx %s -emit-llvm -S -o - | not grep gnu.linkonce.
-// PR1085
-
-class 
-__attribute__((visibility("default"))) QGenericArgument
-{
-       public:inline QGenericArgument(const char *aName = 0, const void *aData = 0):_data(aData), _name(aName) {
-       }
-       private:const void *_data;
-       const char     *_name;
-};
-struct __attribute__ ((
-                      visibility("default"))) QMetaObject
-{
-       struct {
-       }
-                       d;
-};
-class 
-__attribute__((visibility("default"))) QObject
-{
-       virtual const QMetaObject *metaObject() const;
-};
-class 
-__attribute__((visibility("default"))) QPaintDevice
-{
-       public:enum PaintDeviceMetric {
-               PdmWidth = 1, PdmHeight, PdmWidthMM, PdmHeightMM, PdmNumColors, PdmDepth, PdmDpiX, PdmDpiY, PdmPhysicalDpiX, PdmPhysicalDpiY
-       };
-       virtual ~ QPaintDevice();
-       union {
-       }
-                       ct;
-};
-class 
-__attribute__((visibility("default"))) QWidget:public QObject, public QPaintDevice
-{
-};
-class 
-__attribute__((visibility("default"))) QDialog:public QWidget
-{
-};
-class           TopicChooser:public QDialog {
-       virtual const QMetaObject *metaObject() const;
-};
-const QMetaObject *TopicChooser::
-metaObject() const
-{
-}
diff --git a/test/C++Frontend/2007-01-06-PtrMethodInit.cpp b/test/C++Frontend/2007-01-06-PtrMethodInit.cpp
deleted file mode 100644 (file)
index f87c8d8..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-// RUN: %llvmgxx %s -emit-llvm -S -o -
-// PR1084
-
-extern "C"
-{
-  typedef unsigned char PRUint8;
-  typedef unsigned int PRUint32;
-}
-typedef PRUint32 nsresult;
-struct nsID
-{
-};
-typedef nsID nsIID;
-class nsISupports
-{
-};
-extern "C++"
-{
-  template < class T > struct nsCOMTypeInfo
-  {
-    static const nsIID & GetIID ()
-    {
-    }
-  };
-}
-
-class nsIDOMEvent:public nsISupports
-{
-};
-class nsIDOMEventListener:public nsISupports
-{
-public:static const nsIID & GetIID ()
-  {
-  }
-  virtual nsresult
-    __attribute__ ((regparm (0), cdecl)) HandleEvent (nsIDOMEvent * event) =
-    0;
-};
-class nsIDOMMouseListener:public nsIDOMEventListener
-{
-public:static const nsIID & GetIID ()
-  {
-    static const nsIID iid = {
-    };
-  }
-  virtual nsresult
-    __attribute__ ((regparm (0),
-                   cdecl)) MouseDown (nsIDOMEvent * aMouseEvent) = 0;
-};
-typedef
-typeof (&nsIDOMEventListener::HandleEvent)
-  GenericHandler;
-     struct EventDispatchData
-     {
-       PRUint32 message;
-       GenericHandler method;
-       PRUint8 bits;
-     };
-     struct EventTypeData
-     {
-       const EventDispatchData *events;
-       int numEvents;
-       const nsIID *iid;
-     };
-     static const EventDispatchData sMouseEvents[] = {
-       {
-       (300 + 2),
-       reinterpret_cast < GenericHandler > (&nsIDOMMouseListener::MouseDown),
-       0x01}
-     };
-static const EventTypeData sEventTypes[] = {
-  {
-   sMouseEvents, (sizeof (sMouseEvents) / sizeof (sMouseEvents[0])),
-   &nsCOMTypeInfo < nsIDOMMouseListener >::GetIID ()}
-};
diff --git a/test/C++Frontend/2007-03-27-FunctionVarRename.cpp b/test/C++Frontend/2007-03-27-FunctionVarRename.cpp
deleted file mode 100644 (file)
index 538d6df..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-// RUN: %llvmgxx %s -emit-llvm -S -o - | not grep eprintf1
-// RUN: %llvmgxx %s -emit-llvm -S -o - | grep eprintf
-
-// Only one eprintf should exist in the output
-
-extern "C" 
-void __eprintf();
-
-void foo() {
-
-  __eprintf();
-}
-
-void *bar() {
-  extern void *__eprintf;
-  return &__eprintf;
-}
diff --git a/test/C++Frontend/2007-04-05-PackedBitFields-1.cpp b/test/C++Frontend/2007-04-05-PackedBitFields-1.cpp
deleted file mode 100644 (file)
index 4797baf..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-// RUN: %llvmgxx -S %s -o - | llvm-as -f -o /dev/null
-
-#ifdef PACKED
-#define P __attribute__((packed))
-#else
-#define P
-#endif
-
-struct P M_Packed { 
-  unsigned int l_Packed; 
-  unsigned short k_Packed : 6, 
-    i_Packed : 15,
-    j_Packed : 11;
-  
-}; 
-
-struct M_Packed sM_Packed; 
-
-int testM_Packed (void) { 
-  struct M_Packed x; 
-  return (x.i_Packed != 0);
-}
-      
diff --git a/test/C++Frontend/2007-04-05-PackedBitFieldsOverlap-2.cpp b/test/C++Frontend/2007-04-05-PackedBitFieldsOverlap-2.cpp
deleted file mode 100644 (file)
index 3ba5d7b..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-// RUN: %llvmgxx -S %s -o - | llvm-as -f -o /dev/null
-
-#ifdef PACKED
-#define P __attribute__((packed))
-#else
-#define P
-#endif
-
-struct P M_Packed { 
-  unsigned long sorted : 1;
-  unsigned long from_array : 1;
-  unsigned long mixed_encoding : 1;
-  unsigned long encoding : 8;
-  unsigned long count : 21;
-
-}; 
-
-struct M_Packed sM_Packed; 
-
-int testM_Packed (void) { 
-  struct M_Packed x; 
-  return (x.count != 0);
-}
-      
diff --git a/test/C++Frontend/2007-04-05-PackedBitFieldsOverlap.cpp b/test/C++Frontend/2007-04-05-PackedBitFieldsOverlap.cpp
deleted file mode 100644 (file)
index ad272c9..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-// RUN: %llvmgxx -S %s -o - | llvm-as -f -o /dev/null
-
-
-#ifdef PACKED
-#define P __attribute__((packed))
-#else
-#define P
-#endif
-
-struct P M_Packed { 
-  unsigned int l_Packed; 
-  unsigned short k_Packed : 6, 
-    i_Packed : 15;
-  char c;
-  
-}; 
-
-struct M_Packed sM_Packed; 
-
-int testM_Packed (void) { 
-  struct M_Packed x; 
-  return (x.i_Packed != 0);
-}
-      
diff --git a/test/C++Frontend/2007-04-05-PackedBitFieldsSmall.cpp b/test/C++Frontend/2007-04-05-PackedBitFieldsSmall.cpp
deleted file mode 100644 (file)
index e7517dd..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-// RUN: %llvmgxx -S %s -o - | llvm-as -f -o /dev/null
-
-
-#ifdef PACKED
-// This is an example where size of Packed struct is smaller then 
-// the size of bit field type.
-#define P __attribute__((packed))
-#else
-#define P
-#endif
-
-struct P M_Packed { 
-  unsigned long long X:50;
-  unsigned Y:2;
-}; 
-
-struct M_Packed sM_Packed; 
-
-int testM_Packed (void) { 
-  struct M_Packed x; 
-  return (0 != x.Y);
-}
-      
-int testM_Packed2 (void) { 
-  struct M_Packed x; 
-  return (0 != x.X);
-}
diff --git a/test/C++Frontend/2007-04-05-StructPackedFieldUnpacked.cpp b/test/C++Frontend/2007-04-05-StructPackedFieldUnpacked.cpp
deleted file mode 100644 (file)
index 52e2471..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-// RUN: %llvmgxx -S %s -o - | llvm-as -f -o /dev/null
-
-#ifdef PACKED
-#define P __attribute__((packed))
-#else
-#define P
-#endif
-
-struct UnPacked {
-       int X;  
-       int Y;
-};
-
-struct P M_Packed { 
-  unsigned char A;
-  struct UnPacked B;
-}; 
-
-struct M_Packed sM_Packed; 
-
-int testM_Packed (void) { 
-  struct M_Packed x; 
-  return (x.B.Y != 0);
-}
-      
diff --git a/test/C++Frontend/2007-04-10-PackedUnion.cpp b/test/C++Frontend/2007-04-10-PackedUnion.cpp
deleted file mode 100644 (file)
index b4b8894..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-// RUN: %llvmgxx -S %s -o /dev/null
-extern "C" {
-
-#pragma pack(push, 2)
-  typedef struct ABC* abc;
-
-  struct ABCS {
-    float red;
-    float green;
-    float blue;
-    float alpha;
-  };
-
-  typedef void (*XYZ)();
-#pragma pack(pop)
-}
-
-
-union ABCU {
-  ABCS color;
-  XYZ bg;
-};
-
-struct AData {
-  ABCU data;
-};
-
-class L {
- public:
-  L() {}
-  L(const L& other);
-
- private:
-  AData fdata;
-};
-
-
-L::L(const L& other)
-{
-  fdata = other.fdata;
-}
diff --git a/test/C++Frontend/2007-04-11-InlineStorageClassC++.cpp b/test/C++Frontend/2007-04-11-InlineStorageClassC++.cpp
deleted file mode 100644 (file)
index eabcd57..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-// RUN: %llvmgxx %s -S -emit-llvm -O0 -o - | grep define | \
-// RUN:   grep xglobWeak | grep linkonce | count 1
-// RUN: %llvmgxx %s -S -emit-llvm -O0 -o - | grep define | \
-// RUN:   grep xextWeak | grep linkonce | count 1
-// RUN: %llvmgxx %s -S -emit-llvm -O0 -o - | grep define | \
-// RUN:   grep xWeaknoinline | grep weak | count 1
-// RUN: %llvmgxx %s -S -emit-llvm -O0 -o - | grep define | \
-// RUN:   grep xWeakextnoinline | grep weak | count 1
-// RUN: %llvmgxx %s -S -emit-llvm -O0 -o - | grep define | \
-// RUN:   grep xglobnoWeak | grep linkonce | count 1
-// RUN: %llvmgxx %s -S -emit-llvm -O0 -o - | grep define | \
-// RUN:   grep xstatnoWeak | grep internal | count 1
-// RUN: %llvmgxx %s -S -emit-llvm -O0 -o - | grep define | \
-// RUN:   grep xextnoWeak | grep linkonce | count 1
-inline int xglobWeak(int) __attribute__((weak));
-inline int xglobWeak (int i) {
-  return i*2;
-}
-inline int xextWeak(int) __attribute__((weak));
-extern  inline int xextWeak (int i) {
-  return i*4;
-}
-int xWeaknoinline(int) __attribute__((weak));
-int xWeaknoinline(int i) {
-  return i*8;
-}
-int xWeakextnoinline(int) __attribute__((weak));
-extern int xWeakextnoinline(int i) {
-  return i*16;
-}
-inline int xglobnoWeak (int i) {
-  return i*32;
-}
-static inline int xstatnoWeak (int i) {
-  return i*64;
-}
-extern  inline int xextnoWeak (int i) {
-  return i*128;
-}
-int j(int y) {
-  return xglobnoWeak(y)+xstatnoWeak(y)+xextnoWeak(y)+
-        xglobWeak(y)+xextWeak(y)+
-        xWeakextnoinline(y)+xWeaknoinline(y);
-}
diff --git a/test/C++Frontend/2007-04-14-FNoBuiltin.cpp b/test/C++Frontend/2007-04-14-FNoBuiltin.cpp
deleted file mode 100644 (file)
index 31e4528..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-// RUN: %llvmgcc -S %s -O2 -fno-builtin -o - | grep call.*printf
-// Check that -fno-builtin is honored.
-
-extern "C" int printf(const char*, ...);
-void foo(const char *msg) {
-       printf("%s\n",msg);
-}
diff --git a/test/C++Frontend/2007-04-31-TryCatch.cpp b/test/C++Frontend/2007-04-31-TryCatch.cpp
deleted file mode 100644 (file)
index 8b8254d..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-// RUN: %llvmgxx -S %s -o /dev/null
-
-#include <locale>
-
-namespace std 
-{
-  codecvt<char, char, mbstate_t>::
-  codecvt(size_t __refs)
-  : __codecvt_abstract_base<char, char, mbstate_t>(__refs),
-  _M_c_locale_codecvt(_S_get_c_locale())
-  { }
-}
diff --git a/test/C++Frontend/2007-05-03-VectorInit.cpp b/test/C++Frontend/2007-05-03-VectorInit.cpp
deleted file mode 100644 (file)
index b87f4d4..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-// RUN: %llvmgxx %s -S -emit-llvm -O0 -o - 
-// PR1378
-
-typedef float v4sf __attribute__((vector_size(16)));
-
-typedef v4sf float4;
-
-static float4 splat4(float a) 
-{
-  float4 tmp = {a,a,a,a};
-  return tmp;
-}
-
-float4 foo(float a)
-{
-  return splat4(a);
-}
diff --git a/test/C++Frontend/2007-05-16-ReverseBitFieldCrash.cpp b/test/C++Frontend/2007-05-16-ReverseBitFieldCrash.cpp
deleted file mode 100644 (file)
index 8392c0b..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-// RUN: %llvmgxx %s -emit-llvm -S -o -
-
-#pragma reverse_bitfields on
-typedef unsigned long UINT32;
-
-extern void abort(void);
-
-typedef struct TestStruct
-{
-  long first: 15,
-    second: 17;        
-} TestStruct;
-
-int main (int argc, char * const argv[]) {
-
-  TestStruct testStruct = {1, 0};
-  
-  UINT32 dw = *(UINT32 *)(&testStruct);
-  
-  if(!(dw & 0xFFFF))
-    abort ();
-
-  return 0;
-}
diff --git a/test/C++Frontend/2007-05-23-TryFinally.cpp b/test/C++Frontend/2007-05-23-TryFinally.cpp
deleted file mode 100644 (file)
index 38f0b02..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-// RUN: %llvmgxx %s -S -emit-llvm -O2 -o - | ignore grep _Unwind_Resume | \
-// RUN:   wc -l | grep {\[23\]}
-
-struct One { };
-struct Two { };
-
-void handle_unexpected () {
-  try
-  {
-    throw;
-  }
-  catch (One &)
-  {
-    throw Two ();
-  }
-}
diff --git a/test/C++Frontend/2007-07-04-NestedCatches.cpp b/test/C++Frontend/2007-07-04-NestedCatches.cpp
deleted file mode 100644 (file)
index b10a5db..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-// RUN: %llvmgxx %s -S -O2 -o - | \
-// RUN:   ignore grep {eh\.selector.*One.*Two.*Three.*Four.*Five.*Six.*null} | \
-// RUN:     wc -l | grep {\[01\]}
-
-extern void X(void);
-
-struct One   {};
-struct Two   {};
-struct Three {};
-struct Four  {};
-struct Five  {};
-struct Six   {};
-
-static void A(void) throw ()
-{
-  X();
-}
-
-static void B(void) throw (Two)
-{
-  try { A(); } catch (One) {}
-}
-
-static void C(void) throw (Six, Five)
-{
-  try { B(); } catch (Three) {} catch (Four) {}
-}
-
-int main ()
-{
-  try { C(); } catch (...) {}
-}
diff --git a/test/C++Frontend/2007-07-29-RestrictPtrArg.cpp b/test/C++Frontend/2007-07-29-RestrictPtrArg.cpp
deleted file mode 100644 (file)
index d54dfbe..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-// RUN: %llvmgxx -c -emit-llvm %s -o - | llvm-dis | grep noalias
-
-void foo(int * __restrict myptr1, int * myptr2) {
-  myptr1[0] = 0;
-  myptr2[0] = 0;
-}
diff --git a/test/C++Frontend/2007-07-29-RestrictRefArg.cpp b/test/C++Frontend/2007-07-29-RestrictRefArg.cpp
deleted file mode 100644 (file)
index 0c28e4d..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-// RUN: %llvmgxx -c -emit-llvm %s -o - | llvm-dis | grep noalias
-
-void foo(int & __restrict myptr1, int & myptr2) {
-  myptr1 = 0;
-  myptr2 = 0;
-}
diff --git a/test/C++Frontend/2007-08-01-RestrictMethod.cpp b/test/C++Frontend/2007-08-01-RestrictMethod.cpp
deleted file mode 100644 (file)
index b4922be..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-// RUN: %llvmgxx -c -emit-llvm %s -o - | llvm-dis | grep noalias
-
-
-class foo {
-  int member[4];
-  
-  void bar(int * a);
-  
-};
-
-void foo::bar(int * a) __restrict {
-  member[3] = *a;
-}
diff --git a/test/C++Frontend/2007-09-10-RecursiveTypeResolution.cpp b/test/C++Frontend/2007-09-10-RecursiveTypeResolution.cpp
deleted file mode 100644 (file)
index f813944..0000000
+++ /dev/null
@@ -1,88 +0,0 @@
-// RUN: %llvmgxx -c -emit-llvm %s -o -
-// PR1634
-
-namespace Manta
-{
-  class CallbackHandle
-  {
-  protected:virtual ~ CallbackHandle (void)
-    {
-    }
-  };
-template < typename Data1 > class CallbackBase_1Data:public CallbackHandle
-  {
-  };
-}
-
-namespace __gnu_cxx
-{
-  template < typename _Iterator, typename _Container >
-  class __normal_iterator
-  {
-    _Iterator _M_current;
-  };
-}
-
-namespace std
-{
-  template < typename _Tp > struct allocator
-  {
-    typedef _Tp *pointer;
-  };
-  template < typename _InputIterator,
-    typename _Tp > inline void find (_InputIterator __last,
-                                              const _Tp & __val)
-  {
-  };
-}
-
-namespace Manta
-{
-  template < typename _Tp, typename _Alloc> struct _Vector_base
-  {
-    struct _Vector_impl
-    {
-      _Tp *_M_start;
-    };
-  public:
-    _Vector_impl _M_impl;
-  };
-  template < typename _Tp, typename _Alloc = std::allocator < _Tp > >
-  class vector:protected _Vector_base < _Tp,_Alloc >
-  {
-  public:
-    typedef __gnu_cxx::__normal_iterator < typename _Alloc::pointer,
-      vector < _Tp, _Alloc > > iterator;
-    iterator end ()
-    {
-    }
-  };
-  class MantaInterface
-  {
-  };
-  class RTRT
-  {
-    virtual CallbackHandle *registerTerminationCallback (CallbackBase_1Data <
-                                                        MantaInterface * >*);
-    virtual void unregisterCallback (CallbackHandle *);
-    typedef vector < CallbackBase_1Data < int >*>PRCallbackMapType;
-    PRCallbackMapType parallelPreRenderCallbacks;
-  };
-}
-using namespace Manta;
-CallbackHandle *
-RTRT::registerTerminationCallback (CallbackBase_1Data < MantaInterface * >*cb)
-{
-  return cb;
-}
-
-void
-RTRT::unregisterCallback (CallbackHandle * callback)
-{
-  {
-    typedef CallbackBase_1Data < int > callback_t;
-    callback_t *cb = static_cast < callback_t * >(callback);
-    find (parallelPreRenderCallbacks.end (), cb);
-  }
-}
-
diff --git a/test/C++Frontend/2007-10-01-StructResize.cpp b/test/C++Frontend/2007-10-01-StructResize.cpp
deleted file mode 100644 (file)
index d37057a..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-// RUN: %llvmgxx -c %s -o /dev/null
-
-#pragma pack(4)
-
-struct Bork {
-  unsigned int f1 : 3;
-  unsigned int f2 : 30;
-};
-
-int Foo(Bork *hdr) {
-  hdr->f1 = 7;
-  hdr->f2 = 927;
-}
-
diff --git a/test/C++Frontend/2008-01-11-BadWarning.cpp b/test/C++Frontend/2008-01-11-BadWarning.cpp
deleted file mode 100644 (file)
index 43f6a71..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-// RUN: %llvmgcc -xc++ %s -S -o /dev/null |& not grep warning
-// rdar://5683899
-void** f(void **Buckets, unsigned NumBuckets) {
-  return Buckets + NumBuckets;
-}
-
diff --git a/test/C++Frontend/2008-01-12-VecInit.cpp b/test/C++Frontend/2008-01-12-VecInit.cpp
deleted file mode 100644 (file)
index e21bbb9..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-// RUN: %llvmgcc -xc++ %s -S -o -
-// rdar://5685492
-
-typedef int __attribute__((vector_size(16))) v;
-v vt = {1, 2, 3, 4};
-
diff --git a/test/C++Frontend/2008-02-13-sret.cpp b/test/C++Frontend/2008-02-13-sret.cpp
deleted file mode 100644 (file)
index 15bfa2d..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-// RUN: %llvmgxx -S -O1 -m32 -emit-llvm %s -o - | grep {store i32} | count 1
-
-// Test that all 8 bytes of ret in check242 are copied, and only 4 bytes of
-// ret in check93 are copied (the same LLVM struct is used for both).
-
-typedef __builtin_va_list va_list;
-typedef unsigned long size_t;
-void *memset(void *, int, size_t);
-
-struct S93 { __attribute__((aligned (8))) void * a; } ;
- extern struct S93 s93;
- struct S93 check93 () { 
-  struct S93 ret;
- memset (&ret, 0, sizeof (ret));
- ret.a = s93.a; 
- return ret; }
-
-struct S242 { char * a;int b[1]; } ;
- extern struct S242 s242;
-
- struct S242 check242 () {
- struct S242 ret;
- memset (&ret, 0, sizeof (ret));
- ret.a = s242.a;
- ret.b[0] = s242.b[0];
- return ret; }
-
-void check93va (int z, ...) { 
- struct S93 arg;
- va_list ap;
- __builtin_va_start(ap,z);
- arg = __builtin_va_arg(ap,struct S93);
-  __builtin_va_end(ap); }
-
-void check242va (int z, ...) { 
-struct S242 arg;
-va_list ap;
-__builtin_va_start(ap,z);
- arg = __builtin_va_arg(ap,struct S242);
- __builtin_va_end(ap); }
-
diff --git a/test/C++Frontend/2008-05-07-CrazyOffsetOf.cpp b/test/C++Frontend/2008-05-07-CrazyOffsetOf.cpp
deleted file mode 100644 (file)
index f183197..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-// RUN: %llvmgxx -S %s -o -
-// rdar://5914926
-
-struct bork {
-  struct bork *next_local;
-  char * query;
-};
-int offset =  (char *) &(((struct bork *) 0x10)->query) - (char *) 0x10;
diff --git a/test/C++Frontend/dg.exp b/test/C++Frontend/dg.exp
deleted file mode 100644 (file)
index fc852e3..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-load_lib llvm.exp
-
-if [ llvm_gcc_supports c++ ] then {
-  RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp}]]
-}
diff --git a/test/C++Frontend/ptr-to-method-devirt.cpp b/test/C++Frontend/ptr-to-method-devirt.cpp
deleted file mode 100644 (file)
index 358b801..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-// PR1602
-// RUN: %llvmgxx -c -emit-llvm %s -o - -O3 | llvm-dis | not grep ptrtoint
-// RUN: %llvmgxx -c -emit-llvm %s -o - -O3 | llvm-dis | grep getelementptr | count 1
-
-
-struct S { virtual void f(); };
-
-typedef void (S::*P)(void);
-
-const P p = &S::f; 
-
-void g(S s) {
-   (s.*p)();
- }
diff --git a/test/CFrontend/2002-01-23-LoadQISIReloadFailure.c b/test/CFrontend/2002-01-23-LoadQISIReloadFailure.c
deleted file mode 100644 (file)
index 258d3cc..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
-
-/* Regression test.  Just compile .c -> .ll to test */
-int foo(void) {
-  unsigned char *pp;
-  unsigned w_cnt;
-
-  w_cnt += *pp;
-  
-  return w_cnt;
-}
diff --git a/test/CFrontend/2002-01-24-ComplexSpaceInType.c b/test/CFrontend/2002-01-24-ComplexSpaceInType.c
deleted file mode 100644 (file)
index 9559d5b..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
-
-// This caused generation of the following type name:
-//   %Array = uninitialized global [10 x %complex int]
-//
-// which caused problems because of the space int the complex int type
-//
-
-struct { int X, Y; } Array[10];
-
-void foo() {}
diff --git a/test/CFrontend/2002-01-24-HandleCallInsnSEGV.c b/test/CFrontend/2002-01-24-HandleCallInsnSEGV.c
deleted file mode 100644 (file)
index 09029fb..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
-
-void *dlclose(void*);
-
-void ap_os_dso_unload(void *handle)
-{
-    dlclose(handle);
-    return;     /* This return triggers the bug: Weird */
-}
diff --git a/test/CFrontend/2002-02-13-ConditionalInCall.c b/test/CFrontend/2002-02-13-ConditionalInCall.c
deleted file mode 100644 (file)
index 0dad6ff..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
-
-/* Test problem where bad code was generated with a ?: statement was 
-   in a function call argument */
-
-void foo(int, double, float);
-
-void bar(int x) {
-  foo(x, x ? 1.0 : 12.5, 1.0f);
-}
-
diff --git a/test/CFrontend/2002-02-13-ReloadProblem.c b/test/CFrontend/2002-02-13-ReloadProblem.c
deleted file mode 100644 (file)
index ab9b56d..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
-
-/* This triggered a problem in reload, fixed by disabling most of the 
- * steps of compilation in GCC.  Before this change, the code went through
- * the entire backend of GCC, even though it was unnecessary for LLVM output
- * now it is skipped entirely, and since reload doesn't run, it can't cause
- * a problem.
- */
-
-extern int tolower(int);
-
-const char *rangematch(const char *pattern, int test, int c) {
-
-  if ((c <= test) | (tolower(c) <= tolower((unsigned char)test)))
-    return 0;
-
-  return pattern;
-}
diff --git a/test/CFrontend/2002-02-13-TypeVarNameCollision.c b/test/CFrontend/2002-02-13-TypeVarNameCollision.c
deleted file mode 100644 (file)
index ec33401..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
-
-/* This testcase causes a symbol table collision.  Type names and variable
- * names should be in distinct namespaces
- */
-
-typedef struct foo {
-  int X, Y;
-} FOO;
-
-static FOO foo[100];
-
-int test() {
-  return foo[4].Y;
-}
-
diff --git a/test/CFrontend/2002-02-13-UnnamedLocal.c b/test/CFrontend/2002-02-13-UnnamedLocal.c
deleted file mode 100644 (file)
index 6fdc7ef..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
-
-/* Testcase for a problem where GCC allocated xqic to a register,
- * and did not have a VAR_DECL that explained the stack slot to LLVM.
- * Now the LLVM code synthesizes a stack slot if one is presented that
- * has not been previously recognized.  This is where alloca's named 
- * 'local' come from now. 
- */
-
-typedef struct {
-  short x;
-} foostruct;
-
-int foo(foostruct ic);
-
-void test() {
-  foostruct xqic;
-  foo(xqic);
-}
-
-
diff --git a/test/CFrontend/2002-02-14-EntryNodePreds.c b/test/CFrontend/2002-02-14-EntryNodePreds.c
deleted file mode 100644 (file)
index f1e0151..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
-
-/* GCC Used to generate code that contained a branch to the entry node of 
- * the do_merge function.  This is illegal LLVM code.  To fix this, GCC now
- * inserts an entry node regardless of whether or not it has to insert allocas.
- */
-
-struct edge_rec
-{
-  struct VERTEX *v;
-  struct edge_rec *next;
-  int wasseen;
-  int more_data;
-};
-
-typedef struct edge_rec *QUAD_EDGE;
-
-typedef struct {
-  QUAD_EDGE left, right;
-} EDGE_PAIR;
-
-struct EDGE_STACK {
-    int ptr;
-    QUAD_EDGE *elts;
-    int stack_size;
-};
-
-int do_merge(QUAD_EDGE ldo, QUAD_EDGE rdo) {
-  int lvalid;
-  QUAD_EDGE basel,rcand;
-  while (1) {
-    if (!lvalid) {
-      return (int)basel->next;
-    }
-  }
-}
-
diff --git a/test/CFrontend/2002-02-16-RenamingTest.c b/test/CFrontend/2002-02-16-RenamingTest.c
deleted file mode 100644 (file)
index 952af90..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
-
-/* test that locals are renamed with . notation */
-
-void abc(void *);
-
-void Test5(double X) {
-  abc(&X);
-  {
-    int X;
-    abc(&X);
-    {
-      float X;
-      abc(&X);
-    }
-  }
-}
-
diff --git a/test/CFrontend/2002-02-17-ArgumentAddress.c b/test/CFrontend/2002-02-17-ArgumentAddress.c
deleted file mode 100644 (file)
index 9379295..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
-
-int test(int X) {
-  return X;
-}
-
-void abc(int *X);
-int def(int Y, int Z) {
-  abc(&Z);
-  return Y;
-}
-
-struct Test { short X, x; int Y, Z; };
-
-int Testing(struct Test *A) {
-  return A->X+A->Y;
-}
-
-int Test2(int X, struct Test A, int Y) {
-  return X+Y+A.X+A.Y;
-}
-int Test3(struct Test A, struct Test B) {
-  return A.X+A.Y+B.Y+B.Z;
-}
-
-struct Test Test4(struct Test A) {
-  return A;
-}
-
-int Test6() {
-  int B[200];
-  return B[4];
-}
-
-struct STest2 { int X; short Y[4]; double Z; };
-
-struct STest2 Test7(struct STest2 X) {
-  return X;
-}
diff --git a/test/CFrontend/2002-02-18-64bitConstant.c b/test/CFrontend/2002-02-18-64bitConstant.c
deleted file mode 100644 (file)
index 6fd3e29..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
-
-/* GCC wasn't handling 64 bit constants right fixed */
-
-void main() {
-  long long Var = 123455678902ll;
-  printf("%lld\n", Var);
-}
diff --git a/test/CFrontend/2002-02-18-StaticData.c b/test/CFrontend/2002-02-18-StaticData.c
deleted file mode 100644 (file)
index 10439c3..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
-
-
-double FOO = 17;
-double BAR = 12.0;
-float XX = 12.0f;
-
-static char *procnames[] = {
-  "EXIT"
-};
-
-void *Data[] = { &FOO, &BAR, &XX };
-
diff --git a/test/CFrontend/2002-03-11-LargeCharInString.c b/test/CFrontend/2002-03-11-LargeCharInString.c
deleted file mode 100644 (file)
index d8a1671..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
-
-#include <string.h>
-
-int test(char *X) {
-  /* LLVM-GCC used to emit:
-     %.LC0 = internal global [3 x sbyte] c"\1F\FFFFFF8B\00"
-   */
-  return strcmp(X, "\037\213");
-}
diff --git a/test/CFrontend/2002-03-12-ArrayInitialization.c b/test/CFrontend/2002-03-12-ArrayInitialization.c
deleted file mode 100644 (file)
index d6cf446..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
-
-/* GCC would generate bad code if not enough initializers are 
-   specified for an array.
- */
-
-int a[10] = { 0, 2};
-
-char str[10] = "x";
-
-void *Arr[5] = { 0, 0 };
-
-float F[12] = { 1.23f, 34.7f };
-
-struct Test { int X; double Y; };
-
-struct Test Array[10] = { { 2, 12.0 }, { 3, 24.0 } };
-
-int B[4][4] = { { 1, 2, 3, 4}, { 5, 6, 7 }, { 8, 9 } };
diff --git a/test/CFrontend/2002-03-12-StructInitialize.c b/test/CFrontend/2002-03-12-StructInitialize.c
deleted file mode 100644 (file)
index 5174ad4..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
-
-
-typedef struct Connection_Type {
-   long    to;
-   char    type[10];
-   long    length;
-} Connection;
-
-Connection link[3]
-= { {1, "link1", 10},
-    {2, "link2", 20},
-    {3, "link3", 30} };
-
diff --git a/test/CFrontend/2002-03-12-StructInitializer.c b/test/CFrontend/2002-03-12-StructInitializer.c
deleted file mode 100644 (file)
index cf2ba4e..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
-
-/* GCC was not emitting string constants of the correct length when
- * embedded into a structure field like this.  It thought the strlength
- * was -1.
- */
-
-typedef struct Connection_Type {
-   long    to;
-   char    type[10];
-   long    length;
-} Connection;
-
-Connection link[3]
-= { {1, "link1", 10},
-    {2, "link2", 20},
-    {3, "link3", 30} };
-
diff --git a/test/CFrontend/2002-03-14-BrokenPHINode.c b/test/CFrontend/2002-03-14-BrokenPHINode.c
deleted file mode 100644 (file)
index 16d9bc7..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
-
-/* GCC was generating PHI nodes with an arity < #pred of the basic block the
- * PHI node lived in.  This was breaking LLVM because the number of entries
- * in a PHI node must equal the number of predecessors for a basic block.
- */
-
-int trys(char *s, int x)
-{
-  int asa;
-  double Val;
-  int LLS;
-  if (x) {
-    asa = LLS + asa;
-  } else {
-  }
-  return asa+(int)Val;
-}
-
diff --git a/test/CFrontend/2002-03-14-BrokenSSA.c b/test/CFrontend/2002-03-14-BrokenSSA.c
deleted file mode 100644 (file)
index 01f2597..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
-
-/* This code used to break GCC's SSA computation code.  It would create
-   uses of B & C that are not dominated by their definitions.  See:
-   http://gcc.gnu.org/ml/gcc/2002-03/msg00697.html
- */
-int bar();
-int foo()
-{
-  int a,b,c;
-
-  a = b + c;
-  b = bar();
-  c = bar();
-  return a + b + c;
-}
-
diff --git a/test/CFrontend/2002-03-14-QuotesInStrConst.c b/test/CFrontend/2002-03-14-QuotesInStrConst.c
deleted file mode 100644 (file)
index 42f82bf..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
-
-/* GCC was not escaping quotes in string constants correctly, so this would
- * get emitted:
- *  %.LC1 = internal global [32 x sbyte] c"*** Word "%s" on line %d is not\00"
- */
-
-const char *Foo() {
-  return "*** Word \"%s\" on line %d is not";
-}
diff --git a/test/CFrontend/2002-04-07-SwitchStmt.c b/test/CFrontend/2002-04-07-SwitchStmt.c
deleted file mode 100644 (file)
index 79632c9..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
-
-int printf(const char *, ...);
-int foo();
-
-int main() {
-  while (foo()) {
-     switch (foo()) {
-     case 0:
-     case 1:
-     case 2:
-     case 3:
-       printf("3");
-     case 4: printf("4");
-     case 5:
-     case 6:
-     default:
-       break;
-     }
-   }
-   return 0;
-}
diff --git a/test/CFrontend/2002-04-08-LocalArray.c b/test/CFrontend/2002-04-08-LocalArray.c
deleted file mode 100644 (file)
index af6ebd6..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
-
-/* GCC is not outputting the static array to the LLVM backend, so bad things
- * happen.  Note that if this is defined static, everything seems fine.
- */
-void test(unsigned X) {
-  double student_t[30]={0.0 , 12.706 , 4.303 , 3.182 , 2.776 , 2.571 ,
-                               2.447 , 2.365 , 2.306 , 2.262 , 2.228 ,
-                               2.201 , 2.179 , 2.160 , 2.145 , 2.131 ,
-                               2.120 , 2.110 , 2.101 , 2.093 , 2.086 ,
-                               2.080 , 2.074 , 2.069 , 2.064 , 2.060 ,
-                               2.056 , 2.052 , 2.048 , 2.045 };
-  return student_t[X];
-}
diff --git a/test/CFrontend/2002-04-09-StructRetVal.c b/test/CFrontend/2002-04-09-StructRetVal.c
deleted file mode 100644 (file)
index c655e4a..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
-
-struct S {
-  int i;
-  short s1, s2;
-};
-
-struct S func_returning_struct(void);
-
-void loop(void) {
-  func_returning_struct();
-}
diff --git a/test/CFrontend/2002-04-10-StructParameters.c b/test/CFrontend/2002-04-10-StructParameters.c
deleted file mode 100644 (file)
index 9db6a13..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
-
-
-typedef struct {
-  char p;
-  short q;
-  char r;
-  int X;
-  short Y, Z;
-  int Q;
-} foo;
-
-int test(foo X, float);
-int testE(char,short,char,int,int,float);
-void test3(foo *X) {
-  X->q = 1;
-}
-
-void test2(foo Y) {
-  testE(Y.p, Y.q, Y.r, Y.X, Y.Y, 0.1f);
-  test(Y, 0.1f);
-  test2(Y);
-  test3(&Y);
-}
-
diff --git a/test/CFrontend/2002-05-23-StaticValues.c b/test/CFrontend/2002-05-23-StaticValues.c
deleted file mode 100644 (file)
index bf583e2..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
-
-/* Make sure the frontend is correctly marking static stuff as internal! */
-
-int X;
-static int Y = 12;
-
-static void foo(int Z) {
-  Y = Z;
-}
-
-void *test() {
-  foo(12);
-  return &Y;
-}
diff --git a/test/CFrontend/2002-05-23-TypeNameCollision.c b/test/CFrontend/2002-05-23-TypeNameCollision.c
deleted file mode 100644 (file)
index 43faf97..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
-
-/* Testcase for when struct tag conflicts with typedef name... grr */
-
-typedef struct foo {
-  struct foo *X;
-  int Y;
-} * foo;
-
-foo F1;
-struct foo *F2;
-
-enum bar { test1, test2 };
-
-typedef float bar;
-
-enum bar B1;
-bar B2;
-
diff --git a/test/CFrontend/2002-05-24-Alloca.c b/test/CFrontend/2002-05-24-Alloca.c
deleted file mode 100644 (file)
index ac5b78d..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
-
-#include <string.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-int main(int argc, char **argv) {
-  char *C = (char*)alloca(argc);
-  strcpy(C, argv[0]);
-  puts(C);
-}
diff --git a/test/CFrontend/2002-06-25-FWriteInterfaceFailure.c b/test/CFrontend/2002-06-25-FWriteInterfaceFailure.c
deleted file mode 100644 (file)
index fb1b54b..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
-
-#include <stdio.h>
-
-void  test() {
-  fprintf(stderr, "testing\n");
-}
diff --git a/test/CFrontend/2002-07-14-MiscListTests.c b/test/CFrontend/2002-07-14-MiscListTests.c
deleted file mode 100644 (file)
index baae585..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
-
-// Test list stuff
-
-void *malloc(unsigned);
-
-// Test opaque structure support.  the list type is defined later
-struct list;
-
-struct list *PassThroughList(struct list *L) {
-  return L;
-}
-
-
-// Recursive data structure tests...
-
-typedef struct list {
-  int Data;
-  struct list *Next;
-} list;
-
-list *Data;
-
-void foo() {
-  static int Foo = 0;            // Test static local variable
-  Foo += 1;                      // Increment static variable
-
-  Data = (list*)malloc(12);      // This is not a proper list allocation
-}
-
-extern list ListNode1;
-list ListNode3 = { 4, 0          };
-list ListNode2 = { 3, &ListNode3 };
-list ListNode0 = { 1, &ListNode1 };
-list ListNode1 = { 2, &ListNode2 };
-
-
-list ListArray[10];
-
-// Iterative insert fn
-void InsertIntoListTail(list **L, int Data) {
-  while (*L)
-    L = &(*L)->Next;
-  *L = (list*)malloc(sizeof(list));
-  (*L)->Data = Data;
-  (*L)->Next = 0;
-}
-
-// Recursive list search fn
-list *FindData(list *L, int Data) {
-  if (L == 0) return 0;
-  if (L->Data == Data) return L;
-  return FindData(L->Next, Data);
-}
-
-void foundIt(void);
-
-// Driver fn...
-void DoListStuff() {
-  list *MyList = 0;
-  InsertIntoListTail(&MyList, 100);
-  InsertIntoListTail(&MyList, 12);
-  InsertIntoListTail(&MyList, 42);
-  InsertIntoListTail(&MyList, 1123);
-  InsertIntoListTail(&MyList, 1213);
-
-  if (FindData(MyList, 75)) foundIt();
-  if (FindData(MyList, 42)) foundIt();
-  if (FindData(MyList, 700)) foundIt();
-}
-
diff --git a/test/CFrontend/2002-07-14-MiscTests.c b/test/CFrontend/2002-07-14-MiscTests.c
deleted file mode 100644 (file)
index e78dbd7..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
-
-/* These are random tests that I used when working on the GCC frontend 
-   originally. */
-
-// test floating point comparison!
-int floatcomptest(double *X, double *Y, float *x, float *y) {
-  return *X < *Y || *x < *y;
-}
-
-extern void *malloc(unsigned);
-
-// Exposed a bug
-void *memset_impl(void *dstpp, int c, unsigned len) {
-  long long int dstp = (long long int) dstpp;
-
-  while (dstp % 4 != 0)
-    {
-      ((unsigned char *) dstp)[0] = c;
-      dstp += 1;
-      len -= 1;
-    }
-  return dstpp;
-}
-
-// TEST problem with signed/unsigned versions of the same constants being shared
-// incorrectly!
-//
-static char *temp;
-static int remaining;
-static char *localmalloc(int size) {
-  char *blah;
-  
-  if (size>remaining) 
-    {
-      temp = (char *) malloc(32768);
-      remaining = 32768;
-      return temp;
-    }
-  return 0;
-}
-
-typedef struct { double X; double Y; int Z; } PBVTest;
-
-PBVTest testRetStruct(float X, double Y, int Z) {
-  PBVTest T = { X, Y, Z };
-  return T;
-}
-PBVTest testRetStruct2(void);  // external func no inlining
-
-
-double CallRetStruct(float X, double Y, int Z) {
-  PBVTest T = testRetStruct2();
-  return T.X+X+Y+Z;
-}
-
-
diff --git a/test/CFrontend/2002-07-14-MiscTests2.c b/test/CFrontend/2002-07-14-MiscTests2.c
deleted file mode 100644 (file)
index ac58926..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
-
-
-// Test ?: in function calls
-extern fp(int, char*);
-char *Ext;
-void
-__bb_exit_func (void)
-{
-  fp (12, Ext ? Ext : "<none>");
-}
-
-
diff --git a/test/CFrontend/2002-07-14-MiscTests3.c b/test/CFrontend/2002-07-14-MiscTests3.c
deleted file mode 100644 (file)
index 9a262d5..0000000
+++ /dev/null
@@ -1,187 +0,0 @@
-// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
-
-
-
-void *malloc(unsigned);
-
-//#include <stdio.h>
-int puts(const char *s);
-
-struct FunStructTest {
-  int Test1;
-  char *Pointer;
-  int Array[12];
-};
-
-struct SubStruct {
-  short X, Y;
-};
-
-struct Quad {
-  int w;
-  struct SubStruct SS;
-  struct SubStruct *SSP;
-  char c;
-  int y;
-};
-
-struct Quad GlobalQuad = { 4, {1, 2}, 0, 3, 156 };
-
-typedef int (*FuncPtr)(int);
-
-unsigned PtrFunc(int (*Func)(int), int X) {
-  return Func(X);
-}
-
-char PtrFunc2(FuncPtr FuncTab[30], int Num) {
-  return FuncTab[Num]('b');
-}
-
-extern char SmallArgs2(char w, char x, long long Zrrk, char y, char z);
-extern int SomeFunc(void);
-char SmallArgs(char w, char x, char y, char z) {
-  SomeFunc();
-  return SmallArgs2(w-1, x+1, y, z, w);
-}
-
-static int F0(struct Quad Q, int i) {              /* Pass Q by value */
-  struct Quad R;
-  if (i) R.SS = Q.SS;
-  Q.SSP = &R.SS;
-  Q.w = Q.y = Q.c = 1;
-  return Q.SS.Y + i + R.y - Q.c;
-}
-
-int F1(struct Quad *Q, int i) {             /* Pass Q by address */
-  struct Quad R;
-#if 0
-  if (i) R.SS = Q->SS;
-#else
-  if (i) R = *Q;
-#endif
-  Q->w = Q->y = Q->c = 1;
-  return Q->SS.Y+i+R.y-Q->c;
-}
-
-
-int BadFunc(float Val) {
-  int Result;
-  if (Val > 12.345) Result = 4;
-  return Result;     /* Test use of undefined value */
-}
-
-int RealFunc(void) {
-  return SomeUndefinedFunction(1, 4, 5);
-}
-
-extern int EF1(int *, char *, int *);
-
-int Func(int Param, long long Param2) {
-  int Result = Param;
-
-  {{{{
-      char c; int X;
-      EF1(&Result, &c, &X);
-    }}}
-
-    {   // c & X are duplicate names!
-      char c; int X;
-      EF1(&Result, &c, &X);
-    }
-
-  }
-  return Result;
-}
-
-
-short FunFunc(long long x, char z) {
-  return x+z;
-}
-
-unsigned castTest(int X) { return X; }
-
-double TestAdd(double X, float Y) {
-  return X+Y+.5;
-}
-
-int func(int i, int j) {
-  while (i != 20)
-    i += 2;
-
-  j += func(2, i);
-  return (i * 3 + j*2)*j;
-}
-
-int SumArray(int Array[], int Num) {
-  int i, Result = 0;
-  for (i = 0; i < Num; ++i)
-    Result += Array[i];
-
-  return Result;
-}
-
-int ArrayParam(int Values[100]) {
-  return EF1((int*)Values[50], (char*)1, &Values[50]);
-}
-
-int ArrayToSum(void) {
-  int A[100], i;
-  for (i = 0; i < 100; ++i)
-    A[i] = i*4;
-
-  return A[A[0]]; //SumArray(A, 100);
-}
-
-
-int ExternFunc(long long, unsigned*, short, unsigned char);
-
-int main(int argc, char *argv[]) {
-  unsigned i;
-  puts("Hello world!\n");
-
-  ExternFunc(-1, 0, (short)argc, 2);
-  //func(argc, argc);
-
-  for (i = 0; i < 10; i++)
-    puts(argv[3]);
-  return 0;
-}
-
-double MathFunc(double X, double Y, double Z,
-                double AA, double BB, double CC, double DD,
-                double EE, double FF, double GG, double HH,
-                double aAA, double aBB, double aCC, double aDD,
-                double aEE, double aFF) {
-  return X + Y + Z + AA + BB + CC + DD + EE + FF + GG + HH
-       + aAA + aBB + aCC + aDD + aEE + aFF;
-}
-
-
-
-void strcpy(char *s1, char *s2) {
-  while (*s1++ = *s2++);
-}
-
-void strcat(char *s1, char *s2) {
-  while (*s1++);
-  s1--;
-  while (*s1++ = *s2++);
-}
-
-int strcmp(char *s1, char *s2) {
-  while (*s1++ == *s2++);
-  if (*s1 == 0) {
-    if (*s2 == 0) {
-      return 0;
-    } else {
-      return -1;
-    }
-  } else {
-    if (*s2 == 0) {
-      return 1;
-    } else {
-      return (*(--s1) - *(--s2));
-    }
-  }
-}
-
diff --git a/test/CFrontend/2002-07-16-HardStringInit.c b/test/CFrontend/2002-07-16-HardStringInit.c
deleted file mode 100644 (file)
index d1d0321..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
-
-  char      auto_kibitz_list[100][20] = {
-                                      {"diepx"},
-                                      {"ferret"},
-                                      {"knightc"},
-                                      {"knightcap"}};
-
diff --git a/test/CFrontend/2002-07-17-StringConstant.c b/test/CFrontend/2002-07-17-StringConstant.c
deleted file mode 100644 (file)
index 8a39203..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
-
-
-char * foo() { return "\\begin{"; }
diff --git a/test/CFrontend/2002-07-29-Casts.c b/test/CFrontend/2002-07-29-Casts.c
deleted file mode 100644 (file)
index 6794e80..0000000
+++ /dev/null
@@ -1,86 +0,0 @@
-// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <sys/types.h>
-
-int
-main(int argc, char** argv)
-{
-  char     c1;
-  short    s1, ssf1, ssd1;
-  unsigned char  ubs0;
-  signed char   bs0;
-  unsigned char ubc0, uc2;
-  unsigned short us2, usf1, usd1;
-  int ic3, is3, sif1, sid1;
-  unsigned int     uic4, uis4, uif1, uid1;
-  long     slf1, sld1;
-  unsigned long    ulf1, uld1;
-  float    f1;
-  double   d1;
-  
-  /* Test integer to integer conversions */
-  
-  c1 = (char)  (argc >= 2)? atoi(argv[1]) : 0xff64; /* 100 = 'd' */
-  s1 = (short) (argc >= 3)? atoi(argv[2]) : -769;   /* 0xf7ff = -769 */
-  
-  ubc0 = (unsigned char) c1;                      /* 100 = 'd' */
-  ubs0 = (unsigned char) s1;                            /* 0xff = 255 */
-  bs0  = (signed char) s1;                             /* 0xff = -1 */
-  
-  uc2 = (unsigned char) c1;                       /* 100 = 'd' */
-  us2 = (unsigned short) s1;                      /* 0xf7ff = 64767 */
-  
-  ic3 = (int) c1;                                 /* 100 = 'd' */
-  is3 = (int) s1;                                 /* 0xfffff7ff = -769 */
-  
-  uic4 = (unsigned int) c1;                       /*  100 = 'd' */
-  uis4 = (unsigned int) s1;                       /* 0xfffff7ff = 4294966527 */
-  
-  printf("ubc0 = '%c'\n", ubc0);
-  printf("ubs0 = %u\n",   ubs0);
-  printf("bs0  = %d\n",   bs0);
-  printf("c1   = '%c'\n", c1);
-  printf("s1   = %d\n",   s1);
-  printf("uc2  = '%c'\n", uc2);
-  printf("us2  = %u\n",   us2);
-  printf("ic3  = '%c'\n", ic3);
-  printf("is3  = %d\n",   is3);
-  printf("uic4 = '%c'\n", uic4);
-  printf("uis4 = %u\n",   uis4);
-  
-  /* Test floating-point to integer conversions */
-  f1 = (float)  (argc >= 4)? atof(argv[3]) : 1.0;
-  d1 =          (argc >= 5)? atof(argv[4]) : 2.0;
-  
-  usf1 = (unsigned short) f1;
-  usd1 = (unsigned short) d1;
-  uif1 = (unsigned int) f1;
-  uid1 = (unsigned int) d1;
-  ulf1 = (unsigned long) f1;
-  uld1 = (unsigned long) d1;
-  
-  ssf1 = (short) f1;
-  ssd1 = (short) d1;
-  sif1 = (int) f1;
-  sid1 = (int) d1;
-  slf1 = (long) f1;
-  sld1 = (long) d1;
-  
-  printf("usf1 = %u\n", usf1);
-  printf("usd1 = %u\n", usd1);
-  printf("uif1 = %u\n", uif1);
-  printf("uid1 = %u\n", uid1);
-  printf("ulf1 = %u\n", ulf1);
-  printf("uld1 = %u\n", uld1);
-  
-  printf("ssf1 = %d\n", ssf1);
-  printf("ssd1 = %d\n", ssd1);
-  printf("sif1 = %d\n", sif1);
-  printf("sid1 = %d\n", sid1);
-  printf("slf1 = %d\n", slf1);
-  printf("sld1 = %d\n", sld1);
-  
-  return 0;
-}
diff --git a/test/CFrontend/2002-07-30-SubregSetAssertion.c b/test/CFrontend/2002-07-30-SubregSetAssertion.c
deleted file mode 100644 (file)
index 6d4f9f6..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
-
-
-union X {
-  void *B;
-};
-
-union X foo() {
-  union X A;
-  A.B = (void*)123;
-  return A;
-}
diff --git a/test/CFrontend/2002-07-30-UnionTest.c b/test/CFrontend/2002-07-30-UnionTest.c
deleted file mode 100644 (file)
index b2c481e..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
-
-union X;
-struct Empty {};
-union F {};
-union Q { union Q *X; };
-union X {
-  char C;
-  int A, Z;
-  long long B;
-  void *b1;
-  struct { int A; long long Z; } Q;
-};
-
-union X foo(union X A) {
-  A.C = 123;
-  A.A = 39249;
-  //A.B = (void*)123040123321;
-  A.B = 12301230123123LL;
-  A.Z = 1;
-  return A;
-}
diff --git a/test/CFrontend/2002-07-30-VarArgsCallFailure.c b/test/CFrontend/2002-07-30-VarArgsCallFailure.c
deleted file mode 100644 (file)
index b37a462..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
-
-int tcount;
-void test(char *, const char*, int);
-void foo() {
-  char Buf[10];
-  test(Buf, "n%%%d", tcount++);
-}
diff --git a/test/CFrontend/2002-07-31-BadAssert.c b/test/CFrontend/2002-07-31-BadAssert.c
deleted file mode 100644 (file)
index 5801d03..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
-
-typedef struct
-{
-        unsigned char type;        /* Indicates, NORMAL, SUBNORMAL, etc. */
-} InternalFPF;
-
-
-static void SetInternalFPFZero(InternalFPF *dest) {
-  dest->type=0;
-}
-
-void denormalize(InternalFPF *ptr) {
-   SetInternalFPFZero(ptr);
-}
-
diff --git a/test/CFrontend/2002-07-31-SubregFailure.c b/test/CFrontend/2002-07-31-SubregFailure.c
deleted file mode 100644 (file)
index 15573f9..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
-
-
-typedef union {
-   long (*ap)[4];
-} ptrs;
-
-void DoAssignIteration() {
-  ptrs abase;
-  abase.ap+=27;
-  Assignment(*abase.ap);
-}
-
-
diff --git a/test/CFrontend/2002-08-02-UnionTest.c b/test/CFrontend/2002-08-02-UnionTest.c
deleted file mode 100644 (file)
index bc44e46..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
-
-/* In this testcase, the return value of foo() is being promotedto a register
- * which breaks stuff
- */
-#include <stdio.h>
-
-union X { char X; void *B; int a, b, c, d;};
-
-union X foo() {
-  union X Global;
-  Global.B = (void*)123;   /* Interesting part */
-  return Global;
-}
-
-void main() {
-  union X test = foo();
-  printf("0x%p", test.B);
-}
diff --git a/test/CFrontend/2002-08-19-RecursiveLocals.c b/test/CFrontend/2002-08-19-RecursiveLocals.c
deleted file mode 100644 (file)
index e5007af..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
-
-/* This testcase doesn't actually test a bug, it's just the result of me 
- * figuring out the syntax for forward declaring a static variable. */
-struct list {
-  int x;
-  struct list *Next;
-};
-
-static struct list B;  /* Forward declare static */
-static struct list A = { 7, &B };
-static struct list B = { 8, &A };
-
-extern struct list D;  /* forward declare normal var */
-
-struct list C = { 7, &D };
-struct list D = { 8, &C };
-
diff --git a/test/CFrontend/2002-09-08-PointerShifts.c b/test/CFrontend/2002-09-08-PointerShifts.c
deleted file mode 100644 (file)
index cc7e91a..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
-
-
-int foo(int *A, unsigned X) {
-  return A[X];
-}
diff --git a/test/CFrontend/2002-09-18-UnionProblem.c b/test/CFrontend/2002-09-18-UnionProblem.c
deleted file mode 100644 (file)
index 56ec6ce..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
-
-
-struct DWstruct {
-  char high, low;
-};
-
-typedef union {
-  struct DWstruct s;
-  short ll;
-} DWunion;
-
-short __udivmodhi4 (char n1, char bm) {
-  DWunion rr;
-
-  if (bm == 0)
-    {
-      rr.s.high = n1;
-    }
-  else
-    {
-      rr.s.high = bm;
-    }
-
-  return rr.ll;
-}
diff --git a/test/CFrontend/2002-09-19-StarInLabel.c b/test/CFrontend/2002-09-19-StarInLabel.c
deleted file mode 100644 (file)
index 86a2571..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
-
-extern void start() __asm__("start");
-extern void _start() __asm__("_start");
-extern void __start() __asm__("__start");
-void start() {}
-void _start() {}
-void __start() {}
-
diff --git a/test/CFrontend/2002-10-12-TooManyArguments.c b/test/CFrontend/2002-10-12-TooManyArguments.c
deleted file mode 100644 (file)
index 206cdd9..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
-
-
-void foo() {}
-
-void bar() {
-  foo(1, 2, 3);  /* Too many arguments passed */
-}
diff --git a/test/CFrontend/2002-12-15-GlobalBoolTest.c b/test/CFrontend/2002-12-15-GlobalBoolTest.c
deleted file mode 100644 (file)
index 6b27391..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
-
-
-_Bool X = 0;
-
diff --git a/test/CFrontend/2002-12-15-GlobalConstantTest.c b/test/CFrontend/2002-12-15-GlobalConstantTest.c
deleted file mode 100644 (file)
index a5a679d..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
-
-
-const char *W = "foo";
-const int X = 7;
-int Y = 8;
-const char * const Z = "bar";
-
diff --git a/test/CFrontend/2002-12-15-GlobalRedefinition.c b/test/CFrontend/2002-12-15-GlobalRedefinition.c
deleted file mode 100644 (file)
index 39632a1..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
-
-extern char algbrfile[9];
-char algbrfile[9] = "abcdefgh";
-
diff --git a/test/CFrontend/2002-12-15-StructParameters.c b/test/CFrontend/2002-12-15-StructParameters.c
deleted file mode 100644 (file)
index c85dab1..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
-
-typedef struct
-{
-  void *stack;
-  unsigned size;
-  unsigned avail;
-} compile_stack_type;
-
-void foo(void*);
-void bar(compile_stack_type T, unsigned);
-
-void test() {
-  compile_stack_type CST;
-  foo(&CST);
-
-  bar(CST, 12);
-}
diff --git a/test/CFrontend/2003-01-30-UnionInit.c b/test/CFrontend/2003-01-30-UnionInit.c
deleted file mode 100644 (file)
index 5769584..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-// RUN: %llvmgcc -S %s -o /dev/null
-
-union foo {
-  struct { char A, B; } X;
-  int C;
-};
-
-union foo V = { {1, 2} };
diff --git a/test/CFrontend/2003-03-03-DeferredType.c b/test/CFrontend/2003-03-03-DeferredType.c
deleted file mode 100644 (file)
index fa51991..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
-
-
-
-
-struct foo A;
-
-struct foo {
-  int x;
-double D;
-};
-
diff --git a/test/CFrontend/2003-06-22-UnionCrash.c b/test/CFrontend/2003-06-22-UnionCrash.c
deleted file mode 100644 (file)
index dab0716..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
-
-struct Blend_Map_Entry {
-  union {
-   float Colour[5];
-   double Point_Slope[2];
-  } Vals;
-};
-
-void test(struct Blend_Map_Entry* Foo)
-{
-}
-
diff --git a/test/CFrontend/2003-06-23-GCC-fold-infinite-recursion.c b/test/CFrontend/2003-06-23-GCC-fold-infinite-recursion.c
deleted file mode 100644 (file)
index ba66276..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
-
-double Test(double A, double B, double C, double D) {
-  return -(A-B) - (C-D);
-}
-
diff --git a/test/CFrontend/2003-06-26-CFECrash.c b/test/CFrontend/2003-06-26-CFECrash.c
deleted file mode 100644 (file)
index bb6977f..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
-
-typedef struct min_info {
-  long offset;
-  unsigned file_attr;
-} min_info;
-
-typedef struct Globals {
-  char answerbuf;
-  min_info info[1];
-  min_info *pInfo;
-} Uz_Globs;
-
-extern Uz_Globs G;
-
-int extract_or_test_files() {  
-  G.pInfo = G.info;
-}
-
diff --git a/test/CFrontend/2003-06-29-MultipleFunctionDefinition.c b/test/CFrontend/2003-06-29-MultipleFunctionDefinition.c
deleted file mode 100644 (file)
index b7bc803..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
-
-/* This is apparently legal C.  
- */
-extern __inline__ void test() { }
-
-void test() {
-}
diff --git a/test/CFrontend/2003-07-22-ArrayAccessTypeSafety.c b/test/CFrontend/2003-07-22-ArrayAccessTypeSafety.c
deleted file mode 100644 (file)
index 51e66c9..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-/* RUN: %llvmgcc -xc %s -S -o - | grep -v alloca | not grep bitcast
- */
-
-void test(int* array, long long N) {
-    array[N] = N[array] = 33;
-}
-
diff --git a/test/CFrontend/2003-08-06-BuiltinSetjmpLongjmp.c b/test/CFrontend/2003-08-06-BuiltinSetjmpLongjmp.c
deleted file mode 100644 (file)
index 39412e5..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-/* RUN: %llvmgcc -xc %s -c -o - | llvm-dis | not grep __builtin_
- *
- * __builtin_longjmp/setjmp should get transformed into llvm.setjmp/longjmp 
- * just like explicit setjmp/longjmp calls are.
- */
-
-void jumpaway(int *ptr) {
-  __builtin_longjmp(ptr,1);
-}
-    
-int main(void) {
-  __builtin_setjmp(0);
-  jumpaway(0);
-}
diff --git a/test/CFrontend/2003-08-17-DeadCodeShortCircuit.c b/test/CFrontend/2003-08-17-DeadCodeShortCircuit.c
deleted file mode 100644 (file)
index c275fee..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-// RUN: %llvmgcc -xc %s -c -o %t.o
-
-int test(_Bool pos, _Bool color) {
-  return 0;
-  return (pos && color);
-}
-
diff --git a/test/CFrontend/2003-08-18-SigSetJmp.c b/test/CFrontend/2003-08-18-SigSetJmp.c
deleted file mode 100644 (file)
index b7f4553..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
-
-
-#include <setjmp.h>
-
-sigjmp_buf B;
-int foo() {
-  sigsetjmp(B, 1);
-  bar();
-}
diff --git a/test/CFrontend/2003-08-18-StructAsValue.c b/test/CFrontend/2003-08-18-StructAsValue.c
deleted file mode 100644 (file)
index 649eadc..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
-
-
-typedef struct {
-  int op;
-} event_t;
-
-event_t test(int X) {
-  event_t foo = { 1 }, bar = { 2 };
-  return X ? foo : bar;
-}
diff --git a/test/CFrontend/2003-08-20-BadBitfieldRef.c b/test/CFrontend/2003-08-20-BadBitfieldRef.c
deleted file mode 100644 (file)
index 58cf1bc..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
-
-void foo()
-{
-  char *ap;
-  ap[1] == '-' && ap[2] == 0;
-}
-
diff --git a/test/CFrontend/2003-08-20-PrototypeMismatch.c b/test/CFrontend/2003-08-20-PrototypeMismatch.c
deleted file mode 100644 (file)
index 8358a2f..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
-
-
-
-static int foo(int);
-
-static int foo(C)
-char C;
-{
-  return C;
-}
-
-void test() {
-  foo(7);
-}
diff --git a/test/CFrontend/2003-08-20-vfork-bug.c b/test/CFrontend/2003-08-20-vfork-bug.c
deleted file mode 100644 (file)
index 575bfd6..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
-
-extern int vfork(void);
-test() {
-  vfork();
-}
diff --git a/test/CFrontend/2003-08-21-BinOp-Type-Mismatch.c b/test/CFrontend/2003-08-21-BinOp-Type-Mismatch.c
deleted file mode 100644 (file)
index 8829652..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
-
-struct bar;
-
-void foo()
-{
-  unsigned int frame, focus;
-  (struct bar *) focus == (focus ? ((struct bar *) frame) : 0);
-}
-
diff --git a/test/CFrontend/2003-08-21-StmtExpr.c b/test/CFrontend/2003-08-21-StmtExpr.c
deleted file mode 100644 (file)
index 878ed47..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
-
-
-typedef struct {
-  unsigned long val;
-} structty;
-
-void bar(structty new_mask);
-static void foo() {
-  bar(({ structty mask; mask; }));
-}
-
diff --git a/test/CFrontend/2003-08-21-WideString.c b/test/CFrontend/2003-08-21-WideString.c
deleted file mode 100644 (file)
index 0a833dc..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
-
-struct {
-  int *name;
-} syms = { L"NUL" };
diff --git a/test/CFrontend/2003-08-23-LocalUnionTest.c b/test/CFrontend/2003-08-23-LocalUnionTest.c
deleted file mode 100644 (file)
index dc27802..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
-
-
-
-union foo { int X; };
-
-int test(union foo* F) {
-  {
-    union foo { float X; } A;
-  }
-}
diff --git a/test/CFrontend/2003-08-29-BitFieldStruct.c b/test/CFrontend/2003-08-29-BitFieldStruct.c
deleted file mode 100644 (file)
index 8c303e8..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
-
-struct Word {
-  short bar;
-  short baz;
-  int final:1;
-  short quux;
-} *word_limit;
-
-void foo ()
-{
-  word_limit->final = (word_limit->final && word_limit->final);
-}
diff --git a/test/CFrontend/2003-08-29-HugeCharConst.c b/test/CFrontend/2003-08-29-HugeCharConst.c
deleted file mode 100644 (file)
index a997994..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
-
-void foo() {
-  unsigned char int_latin1[] = "f\200\372b\200\343\200\340";
-}
diff --git a/test/CFrontend/2003-08-29-StructLayoutBug.c b/test/CFrontend/2003-08-29-StructLayoutBug.c
deleted file mode 100644 (file)
index a5f6fb1..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
-
-struct foo {
-  unsigned int I:1;
-  unsigned char J[1];
-  unsigned int K:1;
- };
-
-void test(struct foo *X) {}
-
diff --git a/test/CFrontend/2003-08-30-AggregateInitializer.c b/test/CFrontend/2003-08-30-AggregateInitializer.c
deleted file mode 100644 (file)
index 58c77b6..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-// RUN: %llvmgcc -S %s -o /dev/null
-
-struct istruct {
-  unsigned char C;
-};
-
-struct foo {
-  unsigned int I:1;
-  struct istruct J;
-  unsigned char L[1];
-  unsigned int K:1;
-};
-
-struct foo F = { 1, { 7 }, { 123 } , 1 };
-
-
diff --git a/test/CFrontend/2003-08-30-LargeIntegerBitfieldMember.c b/test/CFrontend/2003-08-30-LargeIntegerBitfieldMember.c
deleted file mode 100644 (file)
index f67aee4..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
-
-struct foo {
-  unsigned int I:1;
-  unsigned char J[1][123];
-  unsigned int K:1;
- };
-
-struct foo F;
diff --git a/test/CFrontend/2003-09-18-BitfieldTests.c b/test/CFrontend/2003-09-18-BitfieldTests.c
deleted file mode 100644 (file)
index 3a7879b..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
-
-
-typedef struct BF {
-  int A : 1;
-  char B;
-  int C : 13;
-} BF;
-
-char *test1(BF *b) {
-  return &b->B;        // Must be able to address non-bitfield
-}
-
-void test2(BF *b) {    // Increment and decrement operators
-  b->A++;
-  --b->C;
-}
-
-void test3(BF *b) {
-   b->C = 12345;        // Store
-}
-
-int test4(BF *b) {
-  return b->C;         // Load
-}
-
-void test5(BF *b, int i) { // array ref
-  b[i].C = 12345;
-}
-
diff --git a/test/CFrontend/2003-09-30-StructLayout.c b/test/CFrontend/2003-09-30-StructLayout.c
deleted file mode 100644 (file)
index 3a40166..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
-
-enum En {
-  ENUM_VAL
-};
-
-struct St {
-  unsigned char A;
-  enum En B;
-  unsigned char C;
-  enum En D;
-  float E;
-};
-
-
-void func(struct St* A) {
-  A->D = ENUM_VAL;
-}
diff --git a/test/CFrontend/2003-10-02-UnionLValueError.c b/test/CFrontend/2003-10-02-UnionLValueError.c
deleted file mode 100644 (file)
index 732f93a..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
-
-union U{
-  int i[8];
-  char s[80];
-};
-
-void format_message(char *buffer, union U *u) {
-  sprintf(buffer, u->s);
-}
-
diff --git a/test/CFrontend/2003-10-06-NegateExprType.c b/test/CFrontend/2003-10-06-NegateExprType.c
deleted file mode 100644 (file)
index 0238603..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
-
-
-extern int A[10];
-void Func(int *B) { 
-  B - &A[5]; 
-}
-
diff --git a/test/CFrontend/2003-10-09-UnionInitializerBug.c b/test/CFrontend/2003-10-09-UnionInitializerBug.c
deleted file mode 100644 (file)
index 90dbd37..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
-
-struct Foo {
-    unsigned a;
-    unsigned b;
-    unsigned c;
-};
-
-struct Bar {
-    union {
-        void **a;
-        struct Foo b;
-    }u;
-};
-
-struct Bar test = {0};
-
diff --git a/test/CFrontend/2003-10-28-ident.c b/test/CFrontend/2003-10-28-ident.c
deleted file mode 100644 (file)
index 9911dfd..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
-
-
-#ident "foo"
diff --git a/test/CFrontend/2003-10-29-AsmRename.c b/test/CFrontend/2003-10-29-AsmRename.c
deleted file mode 100644 (file)
index 5750ced..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
-
-
-struct foo { int X; };
-struct bar { int Y; };
-
-extern int Func(struct foo*) __asm__("Func64");
-extern int Func64(struct bar*);
-
-int Func(struct foo *F) {
-  return 1;
-}
-
-int Func64(struct bar* B) {
-  return 0;
-}
-
-
-int test() {
-  Func(0);    /* should be renamed to call Func64 */
-  Func64(0);
-}
diff --git a/test/CFrontend/2003-11-01-C99-CompoundLiteral.c b/test/CFrontend/2003-11-01-C99-CompoundLiteral.c
deleted file mode 100644 (file)
index a0aa698..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
-
-typedef struct { int foo; } spinlock_t;
-typedef struct wait_queue_head_t { spinlock_t lock; } wait_queue_head_t;
-void call_usermodehelper(void) { 
-  struct wait_queue_head_t work = { lock: (spinlock_t) { 0 }, }; 
-}
-
diff --git a/test/CFrontend/2003-11-01-EmptyStructCrash.c b/test/CFrontend/2003-11-01-EmptyStructCrash.c
deleted file mode 100644 (file)
index fb6993b..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
-
-typedef struct { } the_coolest_struct_in_the_world;
-extern the_coolest_struct_in_the_world xyzzy;
-void *foo() { return &xyzzy; }
-
diff --git a/test/CFrontend/2003-11-01-GlobalUnionInit.c b/test/CFrontend/2003-11-01-GlobalUnionInit.c
deleted file mode 100644 (file)
index be7788d..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
-
-union bdflush_param {
-    struct { int x; } b_un;
-    int y[1];
-} bdf_prm = {{30}};
-
diff --git a/test/CFrontend/2003-11-03-AddrArrayElement.c b/test/CFrontend/2003-11-03-AddrArrayElement.c
deleted file mode 100644 (file)
index ed3fc1a..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-// RUN: %llvmgcc -xc %s -c -o - | llvm-dis | grep getelementptr
-
-// This should be turned into a tasty getelementptr instruction, not a nasty
-// series of casts and address arithmetic.
-
-char Global[100];
-
-char *test1(unsigned i) {
-  return &Global[i];
-}
-
diff --git a/test/CFrontend/2003-11-04-EmptyStruct.c b/test/CFrontend/2003-11-04-EmptyStruct.c
deleted file mode 100644 (file)
index c7a0164..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
-
-typedef struct { } rwlock_t;
-struct fs_struct { rwlock_t lock; int umask; };
-void __copy_fs_struct(struct fs_struct *fs) { fs->lock = (rwlock_t) { }; }
-
diff --git a/test/CFrontend/2003-11-04-OutOfMemory.c b/test/CFrontend/2003-11-04-OutOfMemory.c
deleted file mode 100644 (file)
index 6a42e16..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
-
-void schedule_timeout(signed long timeout)
-{
- switch (timeout)
- {
- case ((long)(~0UL>>1)): break;
- }
-}
diff --git a/test/CFrontend/2003-11-08-PointerSubNotGetelementptr.c b/test/CFrontend/2003-11-08-PointerSubNotGetelementptr.c
deleted file mode 100644 (file)
index 443dfbd..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-// RUN: %llvmgcc -xc %s -c -o - | llvm-dis | grep getelementptr
-
-char *test(char* C) {
-  return C-1;   // Should turn into a GEP
-}
-
-int *test2(int* I) {
-  return I-1;
-}
diff --git a/test/CFrontend/2003-11-12-VoidString.c b/test/CFrontend/2003-11-12-VoidString.c
deleted file mode 100644 (file)
index db2e84b..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
-
-void query_newnamebuf(void) { ((void)"query_newnamebuf"); }
-
diff --git a/test/CFrontend/2003-11-13-TypeSafety.c b/test/CFrontend/2003-11-13-TypeSafety.c
deleted file mode 100644 (file)
index 128b767..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-// RUN: %llvmgcc -xc %s -c -o - | llvm-dis | grep getelementptr
-
-int *test(int *X, int Y) {
-  return X + Y;
-}
diff --git a/test/CFrontend/2003-11-16-StaticArrayInit.c b/test/CFrontend/2003-11-16-StaticArrayInit.c
deleted file mode 100644 (file)
index 2b42e38..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
-
-void bar () {
- static char x[10];
- static char *xend = x + 10;
-}
-
-
diff --git a/test/CFrontend/2003-11-18-CondExprLValue.c b/test/CFrontend/2003-11-18-CondExprLValue.c
deleted file mode 100644 (file)
index ec000a4..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
-
-typedef struct { unsigned long pgprot; } pgprot_t;
-
-void split_large_page(unsigned long addr, pgprot_t prot)
-{
-  (addr ? prot : ((pgprot_t) { 0x001 } )).pgprot;
-}
-
diff --git a/test/CFrontend/2003-11-19-AddressOfRegister.c b/test/CFrontend/2003-11-19-AddressOfRegister.c
deleted file mode 100644 (file)
index 69dc54d..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-// RUN: %llvmgcc -xc %s -S -o /dev/null |& not grep warning
-
-struct item {
-  short delta[4];
-};
-
-int TEST(int nt) {
- register struct item *aa;
- aa[nt].delta;
- return 1;
-}
-
diff --git a/test/CFrontend/2003-11-19-BitFieldArray.c b/test/CFrontend/2003-11-19-BitFieldArray.c
deleted file mode 100644 (file)
index 9d54112..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
-
-struct _GIOChannel {
-  int write_buf;
-  char partial_write_buf[6];
-  int d :1;
-};
-
-void g_io_channel_init (struct _GIOChannel *channel) {
-  channel->partial_write_buf[0];
-}
-
diff --git a/test/CFrontend/2003-11-20-Bitfields.c b/test/CFrontend/2003-11-20-Bitfields.c
deleted file mode 100644 (file)
index c9ea0dc..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
-
-struct face_cachel {
-  unsigned int reverse :1;
-  unsigned char font_specified[1];
-};
-
-void
-ensure_face_cachel_contains_charset (struct face_cachel *cachel) {
-  cachel->font_specified[0] = 0;
-}
-
diff --git a/test/CFrontend/2003-11-20-ComplexDivision.c b/test/CFrontend/2003-11-20-ComplexDivision.c
deleted file mode 100644 (file)
index cd548c0..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
-
-int test() {
-  __complex__ double C;
-  double D;
-  C / D;
-}
diff --git a/test/CFrontend/2003-11-20-UnionBitfield.c b/test/CFrontend/2003-11-20-UnionBitfield.c
deleted file mode 100644 (file)
index 12e7df5..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
-
-struct printf_spec {
-  unsigned int minus_flag:1;
-  char converter;
-};
-
-void parse_doprnt_spec () {
-  struct printf_spec spec;
-  spec.minus_flag = 1;
-}
-
diff --git a/test/CFrontend/2003-11-26-PointerShift.c b/test/CFrontend/2003-11-26-PointerShift.c
deleted file mode 100644 (file)
index 079f690..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
-
-unsigned long do_csum(const unsigned char *buff, int len, unsigned long result) {
-  if (2 & (unsigned long) buff) result += 1;
-  return result;
-}
diff --git a/test/CFrontend/2003-11-27-ConstructorCast.c b/test/CFrontend/2003-11-27-ConstructorCast.c
deleted file mode 100644 (file)
index 3780e7a..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
-
-struct i387_soft_struct {
-  long cwd;
-};
-union i387_union {
-  struct i387_soft_struct soft;
-};
-struct thread_struct {
-  union i387_union i387;
-};
-void _init_task_union(void) {
-   struct thread_struct thread = (struct thread_struct) { {{0}} };
-}
diff --git a/test/CFrontend/2003-11-27-UnionCtorInitialization.c b/test/CFrontend/2003-11-27-UnionCtorInitialization.c
deleted file mode 100644 (file)
index 472b591..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
-
-struct i387_soft_struct {
- long cwd;
- long twd;
- long fip;
-};
-union i387_union {
- struct i387_soft_struct soft;
-};
-struct thread_struct {
- union i387_union i387;
-};
-void _init_task_union(void) {
-  struct thread_struct thread = (struct thread_struct) { {{0}} };
-}
diff --git a/test/CFrontend/2003-12-14-ExternInlineSupport.c b/test/CFrontend/2003-12-14-ExternInlineSupport.c
deleted file mode 100644 (file)
index fb92ec7..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-// RUN: %llvmgcc -xc %s -c -o - | llvm-dis | not grep dead_function
-
-extern __inline__ void dead_function() {}
diff --git a/test/CFrontend/2004-01-01-UnknownInitSize.c b/test/CFrontend/2004-01-01-UnknownInitSize.c
deleted file mode 100644 (file)
index b26b6cd..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-// RUN: %llvmgcc -S %s -o /dev/null
-
-/*
- * This regression test ensures that the C front end can compile initializers
- * even when it cannot determine the size (as below).
-*/
-struct one
-{
-  int a;
-  int values [];
-};
-
-struct one hobbit = {5, {1, 2, 3}};
-
diff --git a/test/CFrontend/2004-01-08-ExternInlineRedefine.c b/test/CFrontend/2004-01-08-ExternInlineRedefine.c
deleted file mode 100644 (file)
index b3907ee..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
-
-
-extern __inline long int
-__strtol_l (int a)
-{
-  return 0;
-}
-
-long int
-__strtol_l (int a)
-{
-  return 0;
-}
diff --git a/test/CFrontend/2004-02-12-LargeAggregateCopy.c b/test/CFrontend/2004-02-12-LargeAggregateCopy.c
deleted file mode 100644 (file)
index b3c9bcf..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-// RUN: %llvmgcc -xc %s -c -o - | llvm-dis | grep llvm.memcpy
-
-struct X { int V[10000]; };
-struct X Global1, Global2;
-void test() {
-  Global2 = Global1;
-}
-
diff --git a/test/CFrontend/2004-02-13-BuiltinFrameReturnAddress.c b/test/CFrontend/2004-02-13-BuiltinFrameReturnAddress.c
deleted file mode 100644 (file)
index 162d32a..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-// RUN: %llvmgcc -xc %s -c -o - | llvm-dis | grep llvm.*address | count 4
-
-void *test1() {
-  return __builtin_return_address(1);
-}
-void *test2() {
-  return __builtin_frame_address(0);
-}
diff --git a/test/CFrontend/2004-02-13-IllegalVararg.c b/test/CFrontend/2004-02-13-IllegalVararg.c
deleted file mode 100644 (file)
index 1f3eded..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-// RUN: %llvmgcc -xc %s -c -o - | llc
-
-#include <stdarg.h>
-
-float test(int X, ...) {
-  va_list ap;
-  float F;
-  va_start(ap, X);
-  F = va_arg(ap, float);
-  return F;
-}
diff --git a/test/CFrontend/2004-02-13-Memset.c b/test/CFrontend/2004-02-13-Memset.c
deleted file mode 100644 (file)
index 89ab9b9..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-// RUN: %llvmgcc -xc %s -c -o - | llvm-dis | grep llvm.memset | count 3
-
-void test(int* X, char *Y) {
-  memset(X, 4, 1000);
-  bzero(Y, 100);
-}
diff --git a/test/CFrontend/2004-02-14-ZeroInitializer.c b/test/CFrontend/2004-02-14-ZeroInitializer.c
deleted file mode 100644 (file)
index bede907..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-// RUN: %llvmgcc -xc %s -S -o - | grep zeroinitializer
-
-int X[1000];
-
diff --git a/test/CFrontend/2004-02-20-Builtins.c b/test/CFrontend/2004-02-20-Builtins.c
deleted file mode 100644 (file)
index 82b7dc1..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-// RUN: %llvmgcc -O3 -xc %s -c -o - | llvm-dis | not grep builtin
-
-void zsqrtxxx(float num) {
-   num = sqrt(num);
-}
-
diff --git a/test/CFrontend/2004-03-07-ComplexDivEquals.c b/test/CFrontend/2004-03-07-ComplexDivEquals.c
deleted file mode 100644 (file)
index b1da580..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
-
-
-void test(__complex__ double D, double X) {
-  D /= X;
-}
diff --git a/test/CFrontend/2004-03-07-ExternalConstant.c b/test/CFrontend/2004-03-07-ExternalConstant.c
deleted file mode 100644 (file)
index b8e13a3..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-// RUN: %llvmgcc -xc %s -c -o - | llvm-dis | grep constant
-
-extern const int a[];   // 'a' should be marked constant even though it's external!
-int foo () {
-  return a[0];
-}
-
diff --git a/test/CFrontend/2004-03-09-LargeArrayInitializers.c b/test/CFrontend/2004-03-09-LargeArrayInitializers.c
deleted file mode 100644 (file)
index 335c568..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
-
-// Test that these initializers are handled efficiently
-
-int test(int x) {
-  const int XX[1000] = { 0, 0 };
-  const char S [1000] = "foo";
-
-  const int array[] = {
-     17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 
-     17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 
-     17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 
-     17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 
-     17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 
-     17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 
-     17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 
-     17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 
-     17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 
-     17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 
-     17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 
-     17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 
-     17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 
-     17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 
-     17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 
-     17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 
-     17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 
-     17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 
-     17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 
-     17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 
-   };
-   return array[x];
-} 
diff --git a/test/CFrontend/2004-03-15-SimpleIndirectGoto.c b/test/CFrontend/2004-03-15-SimpleIndirectGoto.c
deleted file mode 100644 (file)
index ad7221e..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
-
-int code[]={0,0,0,0,1};
-void foo(int x) {
-  volatile int b;
-  b = 0xffffffff;
-}
-void bar(int *pc) {
-  static const void *l[] = {&&lab0, &&end};
-
-  foo(0);
-  goto *l[*pc];
- lab0:
-  foo(0);
-  pc++;
-  goto *l[*pc];
- end:
-  return;
-}
-int main() {
-  bar(code);
-  return 0;
-}
diff --git a/test/CFrontend/2004-03-16-AsmRegisterCrash.c b/test/CFrontend/2004-03-16-AsmRegisterCrash.c
deleted file mode 100644 (file)
index 6ad1cd4..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
-
-int foo() {
-  register int X __asm__("ebx");
-  return X;
-}
diff --git a/test/CFrontend/2004-05-07-VarArrays.c b/test/CFrontend/2004-05-07-VarArrays.c
deleted file mode 100644 (file)
index 2041298..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
-
-int foo(int len, char arr[][len], int X) {
-  return arr[X][0];
-}
diff --git a/test/CFrontend/2004-05-21-IncompleteEnum.c b/test/CFrontend/2004-05-21-IncompleteEnum.c
deleted file mode 100644 (file)
index 3636ca7..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
-
-void test(enum foo *X) {
-}
-
diff --git a/test/CFrontend/2004-06-08-OpaqueStructArg.c b/test/CFrontend/2004-06-08-OpaqueStructArg.c
deleted file mode 100644 (file)
index ede811c..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
-
-   struct fu;
-   void foo(struct fu);
-   void bar() {
-      foo;
-   }
diff --git a/test/CFrontend/2004-06-17-UnorderedBuiltins.c b/test/CFrontend/2004-06-17-UnorderedBuiltins.c
deleted file mode 100644 (file)
index 5e02e7f..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
-
-
-_Bool A, B, C, D, E, F, G, H;
-void TestF(float X, float Y) {
-  A = __builtin_isgreater(X, Y);
-  B = __builtin_isgreaterequal(X, Y);
-  C = __builtin_isless(X, Y);
-  D = __builtin_islessequal(X, Y);
-  E = __builtin_islessgreater(X, Y);
-  F = __builtin_isunordered(X, Y);
-  //G = __builtin_isordered(X, Y);    // Our current snapshot of GCC doesn't include this builtin
-  H = __builtin_isunordered(X, Y);
-}
-void TestD(double X, double Y) {
-  A = __builtin_isgreater(X, Y);
-  B = __builtin_isgreaterequal(X, Y);
-  C = __builtin_isless(X, Y);
-  D = __builtin_islessequal(X, Y);
-  E = __builtin_islessgreater(X, Y);
-  F = __builtin_isunordered(X, Y);
-  //G = __builtin_isordered(X, Y);    // Our current snapshot doesn't include this builtin.  FIXME
-  H = __builtin_isunordered(X, Y);
-}
diff --git a/test/CFrontend/2004-06-17-UnorderedCompares.c b/test/CFrontend/2004-06-17-UnorderedCompares.c
deleted file mode 100644 (file)
index f91ed66..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-// RUN: %llvmgcc -xc -std=c99 %s -c -o - | llvm-dis | grep -v llvm.isunordered | not grep call
-
-#include <math.h>
-
-_Bool A, B, C, D, E, F;
-void TestF(float X, float Y) {
-  A = __builtin_isgreater(X, Y);
-  B = __builtin_isgreaterequal(X, Y);
-  C = __builtin_isless(X, Y);
-  D = __builtin_islessequal(X, Y);
-  E = __builtin_islessgreater(X, Y);
-  F = __builtin_isunordered(X, Y);
-}
-void TestD(double X, double Y) {
-  A = __builtin_isgreater(X, Y);
-  B = __builtin_isgreaterequal(X, Y);
-  C = __builtin_isless(X, Y);
-  D = __builtin_islessequal(X, Y);
-  E = __builtin_islessgreater(X, Y);
-  F = __builtin_isunordered(X, Y);
-}
diff --git a/test/CFrontend/2004-06-18-VariableLengthArrayOfStructures.c b/test/CFrontend/2004-06-18-VariableLengthArrayOfStructures.c
deleted file mode 100644 (file)
index e474a13..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
-
-
-struct S { };
-
-int xxxx(int a) {
-  struct S comps[a];
-  comps[0];
-}
-
diff --git a/test/CFrontend/2004-07-06-FunctionCast.c b/test/CFrontend/2004-07-06-FunctionCast.c
deleted file mode 100644 (file)
index 169f740..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
-
-static int unused_func(void) {
-  return 1;
-}
-
-int foo(void) {
-  (void)unused_func; /* avoid compiler warning */
-  return 2;
-}
diff --git a/test/CFrontend/2004-08-06-LargeStructTest.c b/test/CFrontend/2004-08-06-LargeStructTest.c
deleted file mode 100644 (file)
index b0413b4..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
-
-
-#define A(X) int X;
-#define B(X) A(X##0) A(X##1) A(X##2) A(X##3) A(X##4) A(X##5) A(X##6) A(X##7) \
-             A(X##8) A(X##9) A(X##A) A(X##B) A(X##C) A(X##D) A(X##E) A(X##F)
-#define C(X) B(X##0) B(X##1) B(X##2) B(X##3) B(X##4) B(X##5) B(X##6) B(X##7) \
-             B(X##8) B(X##9) B(X##A) B(X##B) B(X##C) B(X##D) B(X##E) B(X##F)
-
-struct foo {
-  C(x);   // 256
-  C(y);   // 256
-  C(z);
-};
-
-
-int test(struct foo *F) {
-   return F->xA1 + F->yFF + F->zC4;
-}
diff --git a/test/CFrontend/2004-11-25-UnnamedBitfieldPadding.c b/test/CFrontend/2004-11-25-UnnamedBitfieldPadding.c
deleted file mode 100644 (file)
index b3f4a82..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-// RUN: %llvmgcc -S %s -o /dev/null
-// This is a testcase for PR461
-typedef struct {
-  unsigned min_align: 1;
-  unsigned : 1;
-} addr_diff_vec_flags;
-
-addr_diff_vec_flags X;
diff --git a/test/CFrontend/2004-11-27-InvalidConstantExpr.c b/test/CFrontend/2004-11-27-InvalidConstantExpr.c
deleted file mode 100644 (file)
index ee8642f..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-// RUN: %llvmgcc %s -S -o - | not grep {foo\\* sub}
-// This should not produce a subtrace constantexpr of a pointer
-struct foo {
-  int Y;
-  char X[100];
-} F;
-
-int test(char *Y) {
-   return Y - F.X;
-} 
diff --git a/test/CFrontend/2004-11-27-StaticFunctionRedeclare.c b/test/CFrontend/2004-11-27-StaticFunctionRedeclare.c
deleted file mode 100644 (file)
index b1e1421..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-// RUN: %llvmgcc -c -emit-llvm %s -o - | \
-// RUN:   opt -std-compile-opts | llvm-dis | not grep {declare i32.*func}
-
-// There should not be an unresolved reference to func here.  Believe it or not,
-// the "expected result" is a function named 'func' which is internal and 
-// referenced by bar().
-
-// This is PR244
-
-static int func();
-void bar() {
-  int func();
-  foo(func);
-}
-static int func(char** A, char ** B) {}
diff --git a/test/CFrontend/2004-11-27-VariableSizeInStructure.c b/test/CFrontend/2004-11-27-VariableSizeInStructure.c
deleted file mode 100644 (file)
index bd63ae3..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-// RUN: %llvmgcc %s -S -o /dev/null
-
-// GCC allows variable sized arrays in structures, crazy!
-
-// This is PR360.
-
-int sub1(int i, char *pi) {
-  typedef int foo[i];
-  struct bar {foo f1; int f2;} *p = (struct bar *) pi;
-  return p->f2;
-}
diff --git a/test/CFrontend/2005-01-02-ConstantInits.c b/test/CFrontend/2005-01-02-ConstantInits.c
deleted file mode 100644 (file)
index 735278e..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-// RUN: %llvmgcc %s -S -o -
-
-// This tests all kinds of hard cases with initializers and
-// array subscripts.  This corresponds to PR487.
-
-struct X { int a[2]; };
-
-int test() {
-  static int i23 = (int) &(((struct X *)0)->a[1]);
-  return i23;
-}
-
-int i = (int) &( ((struct X *)0) -> a[1]);
-
-int Arr[100];
-
-int foo(int i) { return bar(&Arr[49])+bar(&Arr[i]); }
-int foo2(int i) { 
-  static const int *X = &Arr[49];
-   static int i23 = (int) &( ((struct X *)0) -> a[0]);
-  int *P = Arr;
-  ++P;
-  return bar(Arr+i);
-}
diff --git a/test/CFrontend/2005-01-02-PointerDifference.c b/test/CFrontend/2005-01-02-PointerDifference.c
deleted file mode 100644 (file)
index a351da2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-// RUN: %llvmgcc -xc %s -c -o - | llvm-dis | grep -v div
-
-int Diff(int *P, int *Q) { return P-Q; }
diff --git a/test/CFrontend/2005-01-02-VAArgError-ICE.c b/test/CFrontend/2005-01-02-VAArgError-ICE.c
deleted file mode 100644 (file)
index db82558..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-// This file is erroneous, but should not cause the compiler to ICE.
-// PR481
-// RUN: %llvmgcc %s -S -o /dev/null |& not grep {internal compiler error}
-
-#include <stdarg.h>
-int flags(int a, int b, ...) {
-        va_list         args;
-        va_start(args,a);       // not the last named arg
-        foo(args);
-}
diff --git a/test/CFrontend/2005-02-20-AggregateSAVEEXPR.c b/test/CFrontend/2005-02-20-AggregateSAVEEXPR.c
deleted file mode 100644 (file)
index 7a95533..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-// RUN: %llvmgcc %s -o /dev/null -S
-// Note:
-//  We fail this on Sparc because the C library seems to be missing complex.h
-//  and the corresponding C99 complex support.
-//
-//  We could modify the test to use only GCC extensions, but I don't know if
-//  that would change the nature of the test.
-//
-// XFAIL: sparc
-
-#ifdef __CYGWIN__
-  #include <mingw/complex.h>
-#else
-  #include <complex.h>
-#endif
-
-int foo(complex float c) {
-    return creal(c);
-}
diff --git a/test/CFrontend/2005-02-27-MarkGlobalConstant.c b/test/CFrontend/2005-02-27-MarkGlobalConstant.c
deleted file mode 100644 (file)
index 4d24d0c..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-// RUN: %llvmgcc -xc %s -S -o - | grep {internal constant }
-
-// The synthetic global made by the CFE for big initializer should be marked
-// constant.
-
-void bar();
-void foo() {
-  char Blah[] = "asdlfkajsdlfkajsd;lfkajds;lfkjasd;flkajsd;lkfja;sdlkfjasd";
-  bar(Blah);
-}
diff --git a/test/CFrontend/2005-03-05-OffsetOfHack.c b/test/CFrontend/2005-03-05-OffsetOfHack.c
deleted file mode 100644 (file)
index 8df7231..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-// RUN: %llvmgcc %s -S -o - 
-
-struct s {
-  unsigned long int field[0];
-};
-
-#define OFFS \
-        (((char *) &((struct s *) 0)->field[0]) - (char *) 0)
-
-int foo[OFFS];
-
-
diff --git a/test/CFrontend/2005-03-06-OffsetOfStructCrash.c b/test/CFrontend/2005-03-06-OffsetOfStructCrash.c
deleted file mode 100644 (file)
index 91e6862..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-// RUN: %llvmgcc %s -S -o -
-
-struct Y {};
-struct XXX {
-  struct  Y F;
-};
-
-void test1() {
-   (int)&((struct XXX*)(((void *)0)))->F;
-}
-
-void test2() {
-   &((struct XXX*)(((void *)0)))->F;
-}
diff --git a/test/CFrontend/2005-03-11-Prefetch.c b/test/CFrontend/2005-03-11-Prefetch.c
deleted file mode 100644 (file)
index bf79653..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-// RUN: %llvmgcc %s -S -o - | llvm-as | llvm-dis | grep llvm.prefetch
-
-void foo(int *P) {
-  __builtin_prefetch(P);
-  __builtin_prefetch(P, 1);
-}
diff --git a/test/CFrontend/2005-04-09-ComplexOps.c b/test/CFrontend/2005-04-09-ComplexOps.c
deleted file mode 100644 (file)
index 2962b74..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-// RUN: %llvmgcc %s -S -o -
-
-#include <math.h>
-#define I 1.0iF
-
-double __complex test(double X) { return ~-(X*I); }
-
-_Bool EQ(double __complex A, double __complex B) { return A == B; }
-_Bool NE(double __complex A, double __complex B) { return A != B; }
diff --git a/test/CFrontend/2005-05-06-CountBuiltins.c b/test/CFrontend/2005-05-06-CountBuiltins.c
deleted file mode 100644 (file)
index da40a14..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-// RUN: %llvmgcc %s -S -o - | llvm-as | llvm-dis | not grep call.*__builtin
-
-int G, H, I;
-void foo(int P) {
-  G = __builtin_clz(P);
-  H = __builtin_ctz(P);
-  I = __builtin_popcount(P);
-}
-
-long long g, h, i;
-void fooll(float P) {
-  g = __builtin_clzll(P);
-  g = __builtin_clzll(P);
-  h = __builtin_ctzll(P);
-  i = __builtin_popcountll(P);
-}
-
diff --git a/test/CFrontend/2005-05-10-GlobalUnionInit.c b/test/CFrontend/2005-05-10-GlobalUnionInit.c
deleted file mode 100644 (file)
index 443064c..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-// RUN: %llvmgcc %s -S -o -
-
-union A {                    // { uint }
-  union B { double *C; } D;
-} E = { { (double*)12312 } };
-
diff --git a/test/CFrontend/2005-06-15-ExpandGotoInternalProblem.c b/test/CFrontend/2005-06-15-ExpandGotoInternalProblem.c
deleted file mode 100644 (file)
index d7d03ba..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-// RUN: %llvmgcc -std=c99 %s -S -o - | llvm-as | \
-// RUN:    opt -std-compile-opts -disable-output
-// PR580
-
-int X, Y;
-int foo() {
-  int i;
-        for (i=0; i<100; i++ )
-        {
-                break;
-                i = ( X || Y ) ;
-        }
-}
-
diff --git a/test/CFrontend/2005-07-20-SqrtNoErrno.c b/test/CFrontend/2005-07-20-SqrtNoErrno.c
deleted file mode 100644 (file)
index fd976a6..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-// RUN: %llvmgcc %s -S -o - -fno-math-errno | gccas | llvm-dis | grep llvm.sqrt
-#include <math.h>
-
-float foo(float X) {
-  // Check that this compiles to llvm.sqrt when errno is ignored.
-  return sqrtf(X);
-}
diff --git a/test/CFrontend/2005-07-26-UnionInitCrash.c b/test/CFrontend/2005-07-26-UnionInitCrash.c
deleted file mode 100644 (file)
index 563278a..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-// PR607
-// RUN: %llvmgcc %s -S -o -
-union { char bytes[8]; double alignment; }EQ1 = {0,0,0,0,0,0,0,0};
diff --git a/test/CFrontend/2005-07-28-IncorrectWeakGlobal.c b/test/CFrontend/2005-07-28-IncorrectWeakGlobal.c
deleted file mode 100644 (file)
index 1a8c409..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-// RUN: %llvmgcc %s -S -o - | grep TheGlobal | not grep weak
-
-extern int TheGlobal;
-int foo() { return TheGlobal; }
-int TheGlobal = 1;
diff --git a/test/CFrontend/2005-09-20-ComplexConstants.c b/test/CFrontend/2005-09-20-ComplexConstants.c
deleted file mode 100644 (file)
index db98fc2..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-// RUN: %llvmgcc %s -S -o - | llvm-as -o /dev/null -f
-
-const double _Complex x[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}; 
-
diff --git a/test/CFrontend/2005-09-24-AsmUserPrefix.c b/test/CFrontend/2005-09-24-AsmUserPrefix.c
deleted file mode 100644 (file)
index 9b9b153..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-// RUN: %llvmgcc %s -S -o - | llvm-as | opt -std-compile-opts | llc | \
-// RUN:    not grep _foo2
-
-void foo() __asm__("foo2");
-
-void bar() {
-  foo();
-}
diff --git a/test/CFrontend/2005-09-24-BitFieldCrash.c b/test/CFrontend/2005-09-24-BitFieldCrash.c
deleted file mode 100644 (file)
index b4c85ff..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-// RUN: %llvmgcc %s -S -o - 
-
-struct tree_common {};
-
-struct tree_int_cst {
- struct tree_common common;
-  struct tree_int_cst_lowhi {
-    unsigned long long low;
-    long long high;
-  } int_cst;
-};
-
-enum XXX { yyy };
-
-struct tree_function_decl {
-  struct tree_common common;
-  long long locus, y;
-  __extension__ enum  XXX built_in_class : 2;
-
-};
-
-
-union tree_node {
-  struct tree_int_cst int_cst;
-  struct tree_function_decl function_decl;
-};
-
-
-void foo (union tree_node * decl) {
-  decl->function_decl.built_in_class != 0;
-}
-
-
diff --git a/test/CFrontend/2005-10-18-VariableSizedElementCrash.c b/test/CFrontend/2005-10-18-VariableSizedElementCrash.c
deleted file mode 100644 (file)
index 867e4d2..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-// RUN: %llvmgcc %s -S -o -
-
-int sub1(int i, char *pi) {
-  typedef int foo[i];
-  struct bar {foo f1; int f2:3; int f3:4} *p = (struct bar *) pi;
-  xxx(p->f1);  
-  return p->f3;
-}
-
diff --git a/test/CFrontend/2005-12-04-AttributeUsed.c b/test/CFrontend/2005-12-04-AttributeUsed.c
deleted file mode 100644 (file)
index 33e27e8..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-// RUN: %llvmgcc %s -S -emit-llvm -o - | llvm-as | llvm-dis | \
-// RUN:   grep llvm.used | grep foo | grep X
-
-int X __attribute__((used));
-int Y;
-
-__attribute__((used)) void foo() {}
-
diff --git a/test/CFrontend/2005-12-04-DeclarationLineNumbers.c b/test/CFrontend/2005-12-04-DeclarationLineNumbers.c
deleted file mode 100644 (file)
index 0ced92e..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-// RUN: %llvmgcc %s -S -g -o - | grep {llvm.dbg.stoppoint.*i32 14}
-// PR664: ensure that line #'s are emitted for declarations
-
-
-short test(short br_data_0,
-short br_data_1,
-short br_data_2,
-short br_data_3,
-short br_data_4,
-short br_data_5,
-short br_data_6,
-short br_data_7) {
-
-short sm07 = br_data_0 + br_data_7;
-short sm16 = br_data_1 + br_data_6;
-short sm25 = br_data_2 + br_data_5;
-short sm34 = br_data_3 + br_data_4;
-short s0734 = sm07 + sm34;
-short s1625 = sm16 + sm25;
-
-return s0734 + s1625;
-}
-
diff --git a/test/CFrontend/2006-01-13-Includes.c b/test/CFrontend/2006-01-13-Includes.c
deleted file mode 100644 (file)
index 46e7867..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-// RUN: %llvmgcc %s -g -S -o - | llvm-as | opt -std-compile-opts | \
-// RUN:   llvm-dis | grep {test/CFrontend}
-// PR676
-
-#include <stdio.h>
-
-void test() {
-  printf("Hello World\n");
-}
diff --git a/test/CFrontend/2006-01-13-StackSave.c b/test/CFrontend/2006-01-13-StackSave.c
deleted file mode 100644 (file)
index dfe00fb..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-// PR691
-// RUN: %llvmgcc %s -S -o - | llvm-as | opt -std-compile-opts | \
-// RUN:    llvm-dis | grep llvm.stacksave
-
-void test(int N) {
-  int i;
-  for (i = 0; i < N; ++i) {
-    int VLA[i];
-    external(VLA);
-  }
-}
diff --git a/test/CFrontend/2006-01-16-BitCountIntrinsicsUnsigned.c b/test/CFrontend/2006-01-16-BitCountIntrinsicsUnsigned.c
deleted file mode 100644 (file)
index 598ffb5..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-// RUN: %llvmgcc -S %s -o - | grep {llvm.ctlz.i32( i32} | count 2
-// RUN: %llvmgcc -S %s -o - | grep {llvm.ctlz.i32(i32} | count 1
-
-unsigned t2(unsigned X) {
-  return __builtin_clz(X);
-}
-int t1(int X) {
-  return __builtin_clz(X);
-}
diff --git a/test/CFrontend/2006-01-23-FileScopeAsm.c b/test/CFrontend/2006-01-23-FileScopeAsm.c
deleted file mode 100644 (file)
index fb55a41..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-// RUN: %llvmgcc %s -S -o - | llvm-as | opt -std-compile-opts | \
-// RUN:    llvm-dis | grep {foo\[12345\]} | count 5
-
-__asm__ ("foo1");
-__asm__ ("foo2");
-__asm__ ("foo3");
-__asm__ ("foo4");
-__asm__ ("foo5");
diff --git a/test/CFrontend/2006-03-03-MissingInitializer.c b/test/CFrontend/2006-03-03-MissingInitializer.c
deleted file mode 100644 (file)
index 0d09d29..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-// RUN: %llvmgcc %s -S -o - | llvm-as | opt -std-compile-opts | \
-// RUN:    llvm-dis | grep {@nate.*internal global i32 0}
-
-struct X { int *XX; int Y;};
-
-void foo() {
-  static int nate = 0;
-  struct X bob = { &nate, 14 };
-  bar(&bob);
-}
-
diff --git a/test/CFrontend/2006-03-16-VectorCtor.c b/test/CFrontend/2006-03-16-VectorCtor.c
deleted file mode 100644 (file)
index b95593b..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-// Test that basic generic vector support works
-// RUN: %llvmgcc %s -S -o -
-
-typedef int v4si __attribute__ ((__vector_size__ (16)));
-void test(v4si *P, v4si *Q, float X) {
-  *P = (v4si){ X, X, X, X } * *Q;
-}
-
-v4si G = (v4si){ 0.1, 1.2, 4.2, 17.2 };
-
diff --git a/test/CFrontend/2006-03-17-KnRMismatch.c b/test/CFrontend/2006-03-17-KnRMismatch.c
deleted file mode 100644 (file)
index 1939112..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-// RUN: %llvmgcc %s -S -o -
-
-void regnode(int op);
-
-void regnode(op)
-char op;
-{
-}
diff --git a/test/CFrontend/2006-05-01-AppleAlignmentPragma.c b/test/CFrontend/2006-05-01-AppleAlignmentPragma.c
deleted file mode 100644 (file)
index c9050aa..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-// RUN: %llvmgcc %s -S -o -
-
-#ifdef __APPLE__
-/* test that X is layed out correctly when this pragma is used. */
-#pragma options align=mac68k
-#endif
-
-struct S {
-  unsigned A;
-  unsigned short B;
-} X;
-
diff --git a/test/CFrontend/2006-05-19-SingleEltReturn.c b/test/CFrontend/2006-05-19-SingleEltReturn.c
deleted file mode 100644 (file)
index 70c94c6..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-// Test returning a single element aggregate value containing a double.
-// RUN: %llvmgcc %s -S -o -
-
-struct X {
-  double D;
-};
-
-struct Y { 
-  struct X x; 
-};
-
-struct Y bar();
-
-void foo(struct Y *P) {
-  *P = bar();
-}
-
-struct Y bar() {
-  struct Y a;
-  a.x.D = 0;
-  return a;
-}
-
diff --git a/test/CFrontend/2006-07-31-PR854.c b/test/CFrontend/2006-07-31-PR854.c
deleted file mode 100644 (file)
index 516085a..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-// RUN: %llvmgcc %s -S -o -
-// PR854
-  struct kernel_symbol {
-    unsigned long value;
-  };
-  unsigned long loops_per_jiffy = (1<<12);
-  static const char __kstrtab_loops_per_jiffy[]
-__attribute__((section("__ksymtab_strings"))) = "loops_per_jiffy";
-  static const struct kernel_symbol __ksymtab_loops_per_jiffy
-__attribute__((__used__)) __attribute__((section("__ksymtab"))) = { (unsigned
-long)&loops_per_jiffy, __kstrtab_loops_per_jiffy };
diff --git a/test/CFrontend/2006-09-11-BitfieldRefCrash.c b/test/CFrontend/2006-09-11-BitfieldRefCrash.c
deleted file mode 100644 (file)
index d06cc3a..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-// RUN: %llvmgcc %s -S -o -
-// PR906
-
-struct state_struct {
-  unsigned long long phys_frame: 50;
-  unsigned valid : 2;
-} s;
-
-int mem_access(struct state_struct *p) {
-  return p->valid;
-}
-
diff --git a/test/CFrontend/2006-09-18-fwrite-cast-crash.c b/test/CFrontend/2006-09-18-fwrite-cast-crash.c
deleted file mode 100644 (file)
index 8ba2052..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-// RUN: %llvmgcc %s -S -o -
-// PR910
-
-struct l_struct_2E_FILE { char x; };
-unsigned fwrite(signed char *, unsigned , unsigned , signed char *);
-static signed char str301[39];
-static void Usage(signed char *ltmp_611_6) {
-  struct l_struct_2E_FILE *ltmp_6202_16;
-  unsigned ltmp_6203_92;
-  ltmp_6203_92 =  /*tail*/ ((unsigned  (*) (signed char *, unsigned , unsigned ,
-struct l_struct_2E_FILE *))(void*)fwrite)((&(str301[0u])), 38u, 1u, ltmp_6202_16);
-}
-
diff --git a/test/CFrontend/2006-09-21-IncompleteElementType.c b/test/CFrontend/2006-09-21-IncompleteElementType.c
deleted file mode 100644 (file)
index a509182..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-// RUN: not %llvmgcc %s -S -o /dev/null |& not grep {internal compiler error}
-
-struct A X[(927 - 37) / sizeof(struct A)];
diff --git a/test/CFrontend/2006-09-25-DebugFilename.c b/test/CFrontend/2006-09-25-DebugFilename.c
deleted file mode 100644 (file)
index eea52ba..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-// RUN: not %llvmgcc -xc %s -S -o /dev/null |& \
-// RUN:   grep fluffy | grep 2006-09-25-DebugFilename.c
-#include "2006-09-25-DebugFilename.h"
-int func1() { return hfunc1(); }
-int func2() { fluffy; return hfunc1(); }
-
diff --git a/test/CFrontend/2006-09-25-DebugFilename.h b/test/CFrontend/2006-09-25-DebugFilename.h
deleted file mode 100644 (file)
index 9b03666..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-extern int exfunc(int a);
-
-static inline int hfunc1()
-{
-  return exfunc(1);
-}
diff --git a/test/CFrontend/2006-09-28-SimpleAsm.c b/test/CFrontend/2006-09-28-SimpleAsm.c
deleted file mode 100644 (file)
index e304020..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-// RUN: %llvmgcc %s -S -o - | grep {ext: xorl %eax, eax; movl}
-// RUN: %llvmgcc %s -S -o - | grep {nonext: xorl %eax, %eax; mov}
-// PR924
-
-void bar() {
-   // Extended asm
-   asm volatile ("ext: xorl %%eax, eax; movl eax, fs; movl eax, gs  %%blah %= %% " : : "r"(1));
-   // Non-extended asm.
-   asm volatile ("nonext: xorl %eax, %eax; movl %eax, %fs; movl %eax, %gs  %%blah %= %% ");
-}
diff --git a/test/CFrontend/2006-10-30-ArrayCrash.c b/test/CFrontend/2006-10-30-ArrayCrash.c
deleted file mode 100644 (file)
index 09464dd..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-// RUN: %llvmgcc -O3 -S -o - %s
-// PR954, PR911
-
-extern void foo();
-
-struct S {
-  short        f1[3];
-  unsigned int f2 : 1;
-};
-
-void bar()
-{
-  struct S *A;
-
-  if (A->f2)
-    foo();
-}
diff --git a/test/CFrontend/2006-12-14-ordered_expr.c b/test/CFrontend/2006-12-14-ordered_expr.c
deleted file mode 100644 (file)
index 8ff2eb6..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-// RUN: %llvmgcc -O3 -S %s -o - | grep {fcmp ord float %X, %Y}
-
-int test2(float X, float Y) {
-  return !__builtin_isunordered(X, Y);
-}
-
diff --git a/test/CFrontend/2007-01-06-KNR-Proto.c b/test/CFrontend/2007-01-06-KNR-Proto.c
deleted file mode 100644 (file)
index eb2f254..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-// RUN: %llvmgcc -S -o - -emit-llvm %s
-// PR1083
-
-int svc_register (void (*dispatch) (int));
-
-int svc_register (dispatch)
-     void (*dispatch) ();
-{
-}
-
diff --git a/test/CFrontend/2007-01-20-VectorICE.c b/test/CFrontend/2007-01-20-VectorICE.c
deleted file mode 100644 (file)
index c2dcdef..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-// RUN: %llvmgcc %s -S -o - 
-
-typedef float __m128 __attribute__((__vector_size__(16)));
-typedef long long __v2di __attribute__((__vector_size__(16)));
-typedef int __v4si __attribute__((__vector_size__(16)));
-
-__v2di  bar(void);
-void foo(int X, __v4si *P) {
-       *P = X == 2 ? bar() : bar();
-}
-
diff --git a/test/CFrontend/2007-01-24-InlineAsmCModifier.c b/test/CFrontend/2007-01-24-InlineAsmCModifier.c
deleted file mode 100644 (file)
index 5735cce..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-// Verify that the %c modifier works and strips off any prefixes from 
-// immediates.
-// RUN: %llvmgcc -S %s -o - | llvm-as | llc | grep {pickANumber: 789514}
-
-void foo() {
-  __asm__         volatile("/* " "pickANumber" ": %c0 */"::"i"(0xC0C0A));
-  
-  // Check that non-c modifiers work also (not greped for above).
-   __asm__         volatile("/* " "pickANumber2 " ": %0 */"::"i"(123));
-}
diff --git a/test/CFrontend/2007-02-04-AddrLValue-2.c b/test/CFrontend/2007-02-04-AddrLValue-2.c
deleted file mode 100644 (file)
index 90251e6..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-// RUN: %llvmgcc %s -O3 -S -o - -emit-llvm
-// PR1173
-
-struct S { char s; };
-struct T { struct S t; };
-
-struct S *const p = &((struct T * const) (0x4000))->t;
-
-void
-foo (void)
-{
-  p->s = 0;
-}
diff --git a/test/CFrontend/2007-02-04-AddrLValue.c b/test/CFrontend/2007-02-04-AddrLValue.c
deleted file mode 100644 (file)
index c8b65a9..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-// RUN: %llvmgcc %s -O3 -S -o - -emit-llvm
-// PR1176
-
-typedef struct
-{
-  char *key;
-  char *value;
-} T1;
-
-typedef struct
-{
-  long type;
-  char *value;
-} T3;
-
-T1 a[] =
-{
-  {
-    "",
-    ((char *)&((T3) {1, (char *) 1}))
-  }
-};
-
diff --git a/test/CFrontend/2007-02-04-EmptyStruct.c b/test/CFrontend/2007-02-04-EmptyStruct.c
deleted file mode 100644 (file)
index 48ad31f..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-// RUN: %llvmgcc %s -O3 -S -o - -emit-llvm
-// PR1175
-
-struct empty { };
-
-void foo(struct empty *p) {
-   p++;
-}
-
diff --git a/test/CFrontend/2007-02-04-WITH_SIZE_EXPR.c b/test/CFrontend/2007-02-04-WITH_SIZE_EXPR.c
deleted file mode 100644 (file)
index f02a44b..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-// RUN: %llvmgcc %s -O3 -S -o - -emit-llvm
-// PR1174
-
-void zzz (char *s1, char *s2, int len, int *q)
-{
-  int z = 5;
-  unsigned int i,  b;
-  struct { char a[z]; } x;
-          
-  for (i = 0; i < len; i++)
-    s1[i] = s2[i];
-
-  b = z & 0x3;
-
-  len += (b == 0 ? 0 : 1) + z;
-    
-  *q = len;
-
-  foo (x, x);
-}
-
diff --git a/test/CFrontend/2007-02-05-nested.c b/test/CFrontend/2007-02-05-nested.c
deleted file mode 100644 (file)
index be23f17..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-// RUN: %llvmgcc -S -fnested-functions -O0 -o - -emit-llvm %s 
-// PR915
-
-extern void abort(void);
-
-void nest(int n)
-{
-  int a = 0;
-  int b = 5;
-  int c = 0;
-  int d = 7;
-
-  void o(int i, int j)
-  {
-    if (i!=j)
-      abort();
-  }
-
-  void f(x)
-    int x; /* K&R style */
-  {
-    int e = 0;
-    int f = 2;
-    int g = 0;
-
-    void y(void)
-    {
-      c = n;
-      e = 1;
-      g = x;
-    }
-
-    void z(void)
-    {
-      a = 4;
-      g = 3;
-    }
-
-    a = 5;
-    y();
-    c = x;
-    z();
-    o(1,e);
-    o(2,f);
-    o(3,g);
-  }
-
-  c = 2;
-  f(6);
-  o(4,a);
-  o(5,b);
-  o(6,c);
-  o(7,d);
-}
diff --git a/test/CFrontend/2007-02-07-AddrLabel.c b/test/CFrontend/2007-02-07-AddrLabel.c
deleted file mode 100644 (file)
index 144f62d..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-// PR947
-// RUN: %llvmgcc %s -c -o - 
-
-void foo() {
-    void *ptr;
-  label:
-    ptr = &&label;
-
-    goto *ptr;
-  }
diff --git a/test/CFrontend/2007-02-16-VariableSizeStructArg.c b/test/CFrontend/2007-02-16-VariableSizeStructArg.c
deleted file mode 100644 (file)
index fd07cd8..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-// RUN: %llvmgcc -S %s -o - 
-// PR1170
-int f(int a, struct {int b[a];} c) {  return c.b[0]; }
-
-int g(struct {int b[1];} c) {
-  return c.b[0];
-}
diff --git a/test/CFrontend/2007-02-16-VoidPtrDiff.c b/test/CFrontend/2007-02-16-VoidPtrDiff.c
deleted file mode 100644 (file)
index 713b9b2..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-// RUN: %llvmgcc %s -S -o - -emit-llvm
-
-void foo(void *ptr, int test) {
-  (ptr - ((void *) test + 0x2000));
-}
diff --git a/test/CFrontend/2007-02-16-WritableStrings.c b/test/CFrontend/2007-02-16-WritableStrings.c
deleted file mode 100644 (file)
index d11fa08..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-// Test the -fwritable-strings option.
-
-// RUN: %llvmgcc -O3 -S -o - -emit-llvm -fwritable-strings %s | \
-// RUN:    grep {internal global}
-// RUN: %llvmgcc -O3 -S -o - -emit-llvm %s | grep {internal constant}
-
-char *X = "foo";
-
diff --git a/test/CFrontend/2007-02-25-C-DotDotDot.c b/test/CFrontend/2007-02-25-C-DotDotDot.c
deleted file mode 100644 (file)
index 9696022..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-// RUN: %llvmgcc -O0 -S -o - -emit-llvm -fno-inline -fno-unit-at-a-time %s | \
-// RUN:   grep {call float @foo}
-
-// Make sure the call to foo is compiled as:
-//  call float @foo()
-// not
-//  call float (...)* bitcast (float ()* @foo to float (...)*)( )
-
-static float foo() { return 0.0; }
-float bar() { return foo()*10.0;}
-
-
diff --git a/test/CFrontend/2007-03-01-VarSizeArrayIdx.c b/test/CFrontend/2007-03-01-VarSizeArrayIdx.c
deleted file mode 100644 (file)
index a3d480c..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-// RUN: %llvmgcc %s -O3 -S -o - -emit-llvm | grep mul
-// PR1233
-
-float foo(int w, float A[][w], int g, int h) {
-  return A[g][0];
-}
-
diff --git a/test/CFrontend/2007-03-05-DataLayout.c b/test/CFrontend/2007-03-05-DataLayout.c
deleted file mode 100644 (file)
index 18819f1..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-// Testcase for PR1242
-// RUN: %llvmgcc -S %s -o - | grep datalayout | \
-// RUN:    not grep {"\[Ee\]-p:\[36\]\[24\]:\[36\]\[24\]"}
-// END.
-#include <stdlib.h>
-#define NDIM 3
-#define BODY 01
-typedef double vector[NDIM];
-typedef struct bnode* bodyptr;
-// { i16, double, [3 x double], i32, i32, [3 x double], [3 x double], [3 x
-// double], double, \2 *, \2 * }
-struct bnode {
-  short int type;
-  double mass;
-  vector pos;
-  int proc;
-  int new_proc;
-  vector vel;
-  vector acc;
-  vector new_acc;
-  double phi;
-  bodyptr next;
-  bodyptr proc_next;
-} body;
-
-#define Type(x) ((x)->type)
-#define Mass(x) ((x)->mass)
-#define Pos(x)  ((x)->pos)
-#define Proc(x) ((x)->proc)
-#define New_Proc(x) ((x)->new_proc)
-#define Vel(x)  ((x)->vel)
-#define Acc(x)  ((x)->acc)
-#define New_Acc(x)  ((x)->new_acc)
-#define Phi(x)  ((x)->phi)
-#define Next(x) ((x)->next)
-#define Proc_Next(x) ((x)->proc_next)
-
-bodyptr ubody_alloc(int p)
-{ 
-  register bodyptr tmp;
-  tmp = (bodyptr)malloc(sizeof(body));
-
-  Type(tmp) = BODY;
-  Proc(tmp) = p;
-  Proc_Next(tmp) = NULL;
-  New_Proc(tmp) = p;
-  return tmp;
-}
-
-int main(int argc, char** argv) {
-  bodyptr b = ubody_alloc(17);
-  return 0;
-}
diff --git a/test/CFrontend/2007-03-06-VarSizeInStruct1.c b/test/CFrontend/2007-03-06-VarSizeInStruct1.c
deleted file mode 100644 (file)
index 8d28a1d..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-// RUN: %llvmgcc %s -S -o -
-void* p (int n) {
-  struct f {
-    char w; char x[n]; char z[];
-  } F;
-  F.x[0]='x';
-  return &F;
-}
diff --git a/test/CFrontend/2007-03-06-VarSizeInStruct2.c b/test/CFrontend/2007-03-06-VarSizeInStruct2.c
deleted file mode 100644 (file)
index 13bc3aa..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-// RUN: %llvmgcc %s -S -o -
-char p (int n) {
-  struct f {
-    char w; char x[n]; char y[n];
-  } F;
-
-  return F.x[0];
-}
diff --git a/test/CFrontend/2007-03-26-BitfieldAfterZeroWidth.c b/test/CFrontend/2007-03-26-BitfieldAfterZeroWidth.c
deleted file mode 100644 (file)
index 9b6a869..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-// RUN: %llvmgcc %s -S -o -
-struct W {};
-struct Y {
-  struct W w;
-  int i:1;
-} __attribute__ ((packed)) y;
diff --git a/test/CFrontend/2007-03-26-ZeroWidthBitfield.c b/test/CFrontend/2007-03-26-ZeroWidthBitfield.c
deleted file mode 100644 (file)
index 89bfb8e..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-// RUN: %llvmgcc %s -S -o -
-struct Z { int :0; } z;
diff --git a/test/CFrontend/2007-03-27-ArrayCompatible.c b/test/CFrontend/2007-03-27-ArrayCompatible.c
deleted file mode 100644 (file)
index fa3d2db..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-// RUN: %llvmgcc -S %s -O2 -o - | grep {ret i8 0}
-static char c(int n) {
-  char x[2][n];
-  x[1][0]=0;
-  return *(n+(char *)x);
-}
-
-char d(void) {
-  return c(2);
-}
diff --git a/test/CFrontend/2007-03-27-VarLengthArray.c b/test/CFrontend/2007-03-27-VarLengthArray.c
deleted file mode 100644 (file)
index 5bebe9b..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-// RUN: %llvmgcc -S %s -o - | grep {getelementptr i32}
-extern void f(int *);
-int e(int m, int n) {
-  int x[n];
-  f(x);
-  return x[m];
-}
diff --git a/test/CFrontend/2007-04-05-PackedBitFields-2.c b/test/CFrontend/2007-04-05-PackedBitFields-2.c
deleted file mode 100644 (file)
index d9db420..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-// RUN: %llvmgcc %s -S -o -
-
-# define pck __attribute__((packed))
-
-
-struct pck F { 
-  unsigned long long i : 12, 
-    j : 23, 
-    k : 27, 
-    l; 
-}; 
-struct F f1;
-
-void foo() {
-       f1.l = 5;
-}
diff --git a/test/CFrontend/2007-04-05-PackedBitFields.c b/test/CFrontend/2007-04-05-PackedBitFields.c
deleted file mode 100644 (file)
index f9de356..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-// RUN: %llvmgcc %s -S -o -
-
-# define pck __attribute__((packed))
-
-
-struct pck E { 
-  unsigned long long l, 
-    i : 12, 
-    j : 23, 
-    k : 29; };
-
-struct E e1;
-
-void foo() {
-       e1.k = 5;
-}
diff --git a/test/CFrontend/2007-04-05-PackedStruct.c b/test/CFrontend/2007-04-05-PackedStruct.c
deleted file mode 100644 (file)
index 0d524c4..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-// RUN: %llvmgcc %s -S -o -
-
-#pragma pack(push, 2)
-
-enum {
-  tA = 0,
-  tB = 1
-};
-
-struct MyStruct {
-  unsigned long A;
-  char C;
-  void * B;
-};
-
-void bar(){
-struct MyStruct MS = { tB, 0 };
-}
diff --git a/test/CFrontend/2007-04-05-PadBeforeZeroLengthField.c b/test/CFrontend/2007-04-05-PadBeforeZeroLengthField.c
deleted file mode 100644 (file)
index acc3821..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-// RUN: %llvmgcc %s -S -o -
-struct c__ { unsigned int type:4; };
-union A { struct c__ c;  } __attribute__((aligned(8)));
-struct B {
-    unsigned int retainCount;
-    union A objects[];
-};
-void foo(union A * objects, struct B *array, unsigned long k)
-{  array->objects[k] = objects[k]; }
diff --git a/test/CFrontend/2007-04-05-UnPackedStruct.c b/test/CFrontend/2007-04-05-UnPackedStruct.c
deleted file mode 100644 (file)
index 9e168ed..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-// RUN: %llvmgcc %s -S -o -
-
-
-enum {
-  tA = 0,
-  tB = 1
-};
-
-struct MyStruct {
-  unsigned long A;
-  void * B;
-};
-
-void bar(){
-struct MyStruct MS = { tB, 0 };
-}
diff --git a/test/CFrontend/2007-04-11-InlineAsmStruct.c b/test/CFrontend/2007-04-11-InlineAsmStruct.c
deleted file mode 100644 (file)
index 158a16e..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-// RUN: %llvmgcc %s -S -emit-llvm -o - | llvm-as | llc
-
-struct V { short X, Y; };
-int bar() {
-  struct V bar;
-  __asm__ volatile("foo %0\n" : "=r"(bar));
-  return bar.X;
-}
-
diff --git a/test/CFrontend/2007-04-11-InlineAsmUnion.c b/test/CFrontend/2007-04-11-InlineAsmUnion.c
deleted file mode 100644 (file)
index 0435d64..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-// RUN: %llvmgcc %s -S -emit-llvm -o - | llvm-as | llc
-
-union U { int x; float p; };
-void foo() {
-  union U bar;
-  __asm__ volatile("foo %0\n" : "=r"(bar));
-}
diff --git a/test/CFrontend/2007-04-11-InlineStorageClassC89.c b/test/CFrontend/2007-04-11-InlineStorageClassC89.c
deleted file mode 100644 (file)
index ab1f556..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-// RUN: %llvmgcc %s -S -emit-llvm -O0 -o - | grep define | grep xglobWeak | \
-// RUN:   grep weak | count 1
-// RUN: %llvmgcc %s -S -emit-llvm -O0 -o - | grep define | grep xextWeak | \
-// RUN:   grep weak | count 1
-// RUN: %llvmgcc %s -S -emit-llvm -O0 -o - | grep define | \
-// RUN:   grep xWeaknoinline | grep weak | count 1
-// RUN: %llvmgcc %s -S -emit-llvm -O0 -o - | grep define | \
-// RUN:   grep xWeakextnoinline | grep weak | count 1
-// RUN: %llvmgcc %s -S -emit-llvm -O0 -o - | grep define | \
-// RUN:   grep xglobnoWeak | grep -v internal | grep -v weak | \
-// RUN:   grep -v linkonce | count 1
-// RUN: %llvmgcc %s -S -emit-llvm -O0 -o - | grep define | \
-// RUN:   grep xstatnoWeak | grep internal | count 1
-// RUN: %llvmgcc %s -S -emit-llvm -O0 -o - | grep declare | \
-// RUN:   grep xextnoWeak | grep -v internal | grep -v weak | \
-// RUN:   grep -v linkonce | count 1
-inline int xglobWeak(int) __attribute__((weak));
-inline int xglobWeak (int i) {
-  return i*2;
-}
-inline int xextWeak(int) __attribute__((weak));
-extern  inline int xextWeak (int i) {
-  return i*4;
-}
-int xWeaknoinline(int) __attribute__((weak));
-int xWeaknoinline(int i) {
-  return i*8;
-}
-int xWeakextnoinline(int) __attribute__((weak));
-extern int xWeakextnoinline(int i) {
-  return i*16;
-}
-inline int xglobnoWeak (int i) {
-  return i*32;
-}
-static inline int xstatnoWeak (int i) {
-  return i*64;
-}
-extern  inline int xextnoWeak (int i) {
-  return i*128;
-}
-int j(int y) {
-  return xglobnoWeak(y)+xstatnoWeak(y)+xextnoWeak(y)+
-        xglobWeak(y)+xextWeak(y)+
-        xWeakextnoinline(y)+xWeaknoinline(y);
-}
diff --git a/test/CFrontend/2007-04-11-InlineStorageClassC99.c b/test/CFrontend/2007-04-11-InlineStorageClassC99.c
deleted file mode 100644 (file)
index f6193aa..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-// RUN: %llvmgcc -std=c99 %s -S -emit-llvm -O0 -o - | grep declare | \
-// RUN:   grep xglobWeak | grep extern_weak | count 1
-// RUN: %llvmgcc -std=c99 %s -S -emit-llvm -O0 -o - | grep define | \
-// RUN:   grep xextWeak | grep weak | count 1
-// RUN: %llvmgcc -std=c99 %s -S -emit-llvm -O0 -o - | grep define | \
-// RUN:   grep xWeaknoinline | grep weak | count 1
-// RUN: %llvmgcc -std=c99 %s -S -emit-llvm -O0 -o - | grep define | \
-// RUN:   grep xWeakextnoinline | grep weak | count 1
-// RUN: %llvmgcc -std=c99 %s -S -emit-llvm -O0 -o - | grep declare | \
-// RUN:   grep xglobnoWeak | grep -v internal | grep -v weak | \
-// RUN:   grep -v linkonce | count 1
-// RUN: %llvmgcc -std=c99 %s -S -emit-llvm -O0 -o - | grep define | \
-// RUN:   grep xstatnoWeak | grep internal | count 1
-// RUN: %llvmgcc -std=c99 %s -S -emit-llvm -O0 -o - | grep define | \
-// RUN:   grep xextnoWeak | grep -v internal | grep -v weak | \
-// RUN:   grep -v linkonce | count 1
-inline int xglobWeak(int) __attribute__((weak));
-inline int xglobWeak (int i) {
-  return i*2;
-}
-inline int xextWeak(int) __attribute__((weak));
-extern  inline int xextWeak (int i) {
-  return i*4;
-}
-int xWeaknoinline(int) __attribute__((weak));
-int xWeaknoinline(int i) {
-  return i*8;
-}
-int xWeakextnoinline(int) __attribute__((weak));
-extern int xWeakextnoinline(int i) {
-  return i*16;
-}
-inline int xglobnoWeak (int i) {
-  return i*32;
-}
-static inline int xstatnoWeak (int i) {
-  return i*64;
-}
-extern  inline int xextnoWeak (int i) {
-  return i*128;
-}
-int j(int y) {
-  return xglobnoWeak(y)+xstatnoWeak(y)+xextnoWeak(y)+
-        xglobWeak(y)+xextWeak(y)+
-        xWeakextnoinline(y)+xWeaknoinline(y);
-}
diff --git a/test/CFrontend/2007-04-11-PR1321.c b/test/CFrontend/2007-04-11-PR1321.c
deleted file mode 100644 (file)
index f391329..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-// RUN: %llvmgcc %s -S -o /dev/null
-
-struct X {
-  unsigned int e0 : 17;
-  unsigned int e1 : 17;
-  unsigned int e2 : 17;
-  unsigned int e3 : 17;
-  unsigned int e4 : 17;
-  unsigned int e5 : 17;
-  unsigned int e6 : 17;
-  unsigned int e7 : 17;
-} __attribute__((packed)) x;
diff --git a/test/CFrontend/2007-04-13-InlineAsmStruct2.c b/test/CFrontend/2007-04-13-InlineAsmStruct2.c
deleted file mode 100644 (file)
index e4870e7..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-// RUN: %llvmgcc %s -S -emit-llvm -o - | grep {call void asm}
-
-struct V { short X, Y; };
-int bar() {
-  struct V bar;
-  __asm__ volatile("foo %0\n" :: "r"(bar));
-  return bar.X;
-}
-
diff --git a/test/CFrontend/2007-04-13-InlineAsmUnion2.c b/test/CFrontend/2007-04-13-InlineAsmUnion2.c
deleted file mode 100644 (file)
index 284654d..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-// RUN: %llvmgcc %s -S -emit-llvm -o - | grep {call void asm}
-
-union U { int x; char* p; };
-void foo() {
-  union U bar;
-  __asm__ volatile("foo %0\n" :: "r"(bar));
-}
diff --git a/test/CFrontend/2007-04-14-FNoBuiltin.c b/test/CFrontend/2007-04-14-FNoBuiltin.c
deleted file mode 100644 (file)
index 88bf0e0..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-// RUN: %llvmgcc -S %s -O2 -fno-builtin -o - | grep call.*printf
-// Check that -fno-builtin is honored.
-
-extern int printf(const char*, ...);
-void foo(const char *msg) {
-       printf("%s\n",msg);
-}
diff --git a/test/CFrontend/2007-04-17-ZeroSizeBitFields.c b/test/CFrontend/2007-04-17-ZeroSizeBitFields.c
deleted file mode 100644 (file)
index ec7b7ea..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-// PR 1332
-// RUN: %llvmgcc %s -S -o /dev/null
-
-struct Z { int a:1; int :0; int c:1; } z;
diff --git a/test/CFrontend/2007-04-24-VolatileStructCopy.c b/test/CFrontend/2007-04-24-VolatileStructCopy.c
deleted file mode 100644 (file)
index 4765921..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-// RUN: %llvmgcc -O3 -S -o - -emit-llvm %s | grep {volatile store}
-// PR1352
-
-struct foo {
-  int x;
-};
-
-void copy(volatile struct foo *p, struct foo *q) {
-  *p = *q;
-}
diff --git a/test/CFrontend/2007-04-24-bit-not-expr.c b/test/CFrontend/2007-04-24-bit-not-expr.c
deleted file mode 100644 (file)
index 1c27f18..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-// PR 1346
-// RUN: %llvmgcc -c %s  -o /dev/null
-extern bar(void *);
-
-void f(void *cd) {
-  bar(((void *)((unsigned long)(cd) ^ -1)));
-}
diff --git a/test/CFrontend/2007-04-24-str-const.c b/test/CFrontend/2007-04-24-str-const.c
deleted file mode 100644 (file)
index 4c109c4..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-// RUN: %llvmgcc -c %s  -o /dev/null
-static char *str;
-
-static const struct {
- const char *name;
- unsigned type;
-} scan_special[] = {
- {"shift", 1},
- {0, 0}
-};
-
-static void
-sb(void)
-{
- while (*str == ' ' || *str == '\t')
-  str++;
-}
diff --git a/test/CFrontend/2007-05-07-NestedStructReturn.c b/test/CFrontend/2007-05-07-NestedStructReturn.c
deleted file mode 100644 (file)
index aea58e3..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-// RUN: %llvmgcc %s -S -fnested-functions -o - | grep {sret *%agg.result}
-
-struct X { long m, n, o, p; };
-
-struct X p(int n) {
-  struct X c(int m) {
-    struct X x;
-    x.m = m;
-    x.n = n;
-    return x;
-  }
-  return c(n);
-}
diff --git a/test/CFrontend/2007-05-07-PaddingElements.c b/test/CFrontend/2007-05-07-PaddingElements.c
deleted file mode 100644 (file)
index c0a65f0..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-// PR 1278
-// RUN: %llvmgcc %s -S -emit-llvm -O0 -o - | not grep "4 x i8] zeroinitializer"
-// RUN: %llvmgcc %s -S -emit-llvm -O0 -o - | not grep "i32 0, i32 2"
-struct s {
-  double d1;
-  int s1;
-};
-
-struct s foo(void) {
-  struct s S = {1.1, 2};
-  return S;
-}
diff --git a/test/CFrontend/2007-05-08-PCH.c b/test/CFrontend/2007-05-08-PCH.c
deleted file mode 100644 (file)
index aa277ec..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-// PR 1400
-// RUN: %llvmgcc -x c-header %s -o /dev/null
-
-int main() {
-  return 0;
-}
-
diff --git a/test/CFrontend/2007-05-11-str-const.c b/test/CFrontend/2007-05-11-str-const.c
deleted file mode 100644 (file)
index 48deddb..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-// RUN: %llvmgcc -c -g %s  -o /dev/null
-
-static unsigned char out[]={0,1};
-static const unsigned char str1[]="1";
-
diff --git a/test/CFrontend/2007-05-15-PaddingElement.c b/test/CFrontend/2007-05-15-PaddingElement.c
deleted file mode 100644 (file)
index a218b35..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-// PR 1419
-
-// RUN: %llvmgcc -xc  -O2 %s -c -o - | llvm-dis | grep "ret i32 1"
-struct A {
-  short x;
-  long long :0;
-};
-
-struct B {
-  char a;
-  char b;
-  unsigned char i;
-};
-
-union X { struct A a; struct B b; };
-
-int check(void) {
-  union X x, y;
-
-  y.b.i = 0xff;
-  x = y;
-  return (x.b.i == 0xff);
-}
diff --git a/test/CFrontend/2007-05-16-EmptyStruct.c b/test/CFrontend/2007-05-16-EmptyStruct.c
deleted file mode 100644 (file)
index 64652be..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-// PR 1417
-
-// RUN: %llvmgcc -xc  %s -c -o - | llvm-dis | grep "struct.anon = type \{  \}"
-
-struct { } *X;
diff --git a/test/CFrontend/2007-05-29-UnionCopy.c b/test/CFrontend/2007-05-29-UnionCopy.c
deleted file mode 100644 (file)
index ded67d4..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-// RUN: %llvmgcc -S -o - -emit-llvm %s | grep memcpy
-// PR1421
-
-struct A {
-  char c;
-  int i;
-};
-
-struct B {
-  int c;
-  unsigned char x;
-};
-
-union U { struct A a; struct B b; };
-
-void check(union U *u, union U *v) {
-  *u = *v;
-}
diff --git a/test/CFrontend/2007-06-05-NoInlineAttribute.c b/test/CFrontend/2007-06-05-NoInlineAttribute.c
deleted file mode 100644 (file)
index cb1920a..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-// RUN: %llvmgcc -c -emit-llvm %s -o - | llvm-dis | grep llvm.noinline 
-
-static int bar(int x, int y) __attribute__((noinline));
-
-static int bar(int x, int y)  
-{
- return x + y;
-}
-
-int foo(int a, int b) {
- return  bar(b, a);
-}
-
diff --git a/test/CFrontend/2007-06-15-AnnotateAttribute.c b/test/CFrontend/2007-06-15-AnnotateAttribute.c
deleted file mode 100644 (file)
index 0099117..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-// RUN: %llvmgcc -c -emit-llvm %s -o - | llvm-dis | grep llvm.global.annotations
-// RUN: %llvmgcc -c -emit-llvm %s -o - | llvm-dis | grep llvm.var.annotation | count 3 
-
-#include <stdio.h>
-
-/* Global variable with attribute */
-int X __attribute__((annotate("GlobalValAnnotation")));
-
-/* Function with attribute */
-int foo(int y) __attribute__((annotate("GlobalValAnnotation"))) 
-               __attribute__((noinline));
-
-int foo(int y __attribute__((annotate("LocalValAnnotation")))) {
-  int x __attribute__((annotate("LocalValAnnotation")));
-  x = 34;
-  return y + x;
-} 
-
-int main() {
-  static int a __attribute__((annotate("GlobalValAnnotation")));
-  a = foo(2);
-  printf("hello world%d\n", a);
-  return 0;
-}
diff --git a/test/CFrontend/2007-06-18-SextAttrAggregate.c b/test/CFrontend/2007-06-18-SextAttrAggregate.c
deleted file mode 100644 (file)
index 2fcd726..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-// RUN: %llvmgcc %s -o - -S -emit-llvm -O3 | grep {i8 signext}
-// PR1513
-
-struct s{
-long a;
-long b;
-};
-
-void f(struct s a, char *b, signed char C) {
-
-}
diff --git a/test/CFrontend/2007-07-29-RestrictPtrArg.c b/test/CFrontend/2007-07-29-RestrictPtrArg.c
deleted file mode 100644 (file)
index 99eae39..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-// RUN: %llvmgcc -c -emit-llvm %s -o - | llvm-dis | grep noalias
-
-void foo(int * __restrict myptr1, int * myptr2) {
-  myptr1[0] = 0;
-  myptr2[0] = 0;
-}
diff --git a/test/CFrontend/2007-08-01-LoadStoreAlign.c b/test/CFrontend/2007-08-01-LoadStoreAlign.c
deleted file mode 100644 (file)
index ef890bf..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-// RUN: %llvmgcc -O3 -S -o - -emit-llvm %s | grep {align 1} | count 2
-// RUN: %llvmgcc -O3 -S -o - -emit-llvm %s | llvm-as | llc
-
-struct p {
-  char a;
-  int b;
-} __attribute__ ((packed));
-
-struct p t = { 1, 10 };
-struct p u;
-
-int main () {
-  int tmp = t.b;
-  u.b = tmp;
-  return tmp;
-
-}
diff --git a/test/CFrontend/2007-08-21-ComplexCst.c b/test/CFrontend/2007-08-21-ComplexCst.c
deleted file mode 100644 (file)
index 7ddd87c..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-// RUN: %llvmgcc -O2 -c %s -o /dev/null
-void f(_Complex float z);
-void g() { f(1.0i); }
diff --git a/test/CFrontend/2007-08-22-CTTZ.c b/test/CFrontend/2007-08-22-CTTZ.c
deleted file mode 100644 (file)
index 9e74f24..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-// RUN: %llvmgcc -O2 -S -o - %s | grep {llvm.cttz.i64} | count 2
-// RUN: %llvmgcc -O2 -S -o - %s | not grep {lshr}
-
-int bork(unsigned long long x) {
-  return __builtin_ctzll(x);
-}
diff --git a/test/CFrontend/2007-09-05-ConstCtor.c b/test/CFrontend/2007-09-05-ConstCtor.c
deleted file mode 100644 (file)
index c267a59..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-// RUN: %llvmgcc -xc -Os -c %s -o /dev/null
-// PR1641
-
-struct A {
-  unsigned long l;
-};
-
-void bar(struct A *a);
-
-void bork() {
-  const unsigned long vcgt = 'vcgt';
-  struct A a = { vcgt };
-  bar(&a);
-}
diff --git a/test/CFrontend/2007-09-12-PragmaPack.c b/test/CFrontend/2007-09-12-PragmaPack.c
deleted file mode 100644 (file)
index 4fc7f48..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-// RUN: %llvmgcc -O3 -S -o - %s | grep {18}
-
-#include <stdint.h>
-
-#pragma pack(push, 1)
-typedef struct
-{
-        uint32_t        a;
-} foo;
-
-typedef struct {
-        uint8_t         major;
-        uint8_t         minor;
-        uint16_t        build;
-} VERSION;
-
-typedef struct {
-        uint8_t       a[5];
-        VERSION       version;
-        uint8_t       b;
-        foo           d;
-        uint32_t      guard;
-} bar;
-#pragma pack(pop)
-
-
-unsigned barsize(void) {
-  return sizeof(bar);
-}
-
diff --git a/test/CFrontend/2007-09-14-NegatePointer.c b/test/CFrontend/2007-09-14-NegatePointer.c
deleted file mode 100644 (file)
index cb49e46..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-// RUN: %llvmgcc -S %s -o - 
-// PR1662
-
-int foo(unsigned char *test) {
-  return 0U - (unsigned int )test;
-}
-
diff --git a/test/CFrontend/2007-09-17-WeakRef.c b/test/CFrontend/2007-09-17-WeakRef.c
deleted file mode 100644 (file)
index 3cdd47e..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-// RUN: %llvmgcc -O1 -S %s -o - | grep icmp
-// PR1678
-// XFAIL: llvmgcc4.0.1
-extern void B (void);
-static __typeof(B) A __attribute__ ((__weakref__("B")));
-int active (void)
-{
-  static void *const p = __extension__ (void *) &A;
-  return p != 0;
-}
diff --git a/test/CFrontend/2007-09-20-GcrootAttribute.c b/test/CFrontend/2007-09-20-GcrootAttribute.c
deleted file mode 100644 (file)
index 23cd37f..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-// RUN: %llvmgcc -S -emit-llvm %s -o - | grep llvm.gcroot
-// RUN: %llvmgcc -S -emit-llvm %s -o - | grep llvm.gcroot | count 6
-// RUN: %llvmgcc -S -emit-llvm %s -o - | llvm-as
-
-typedef struct foo_s
-{
-  int a;
-} foo, __attribute__ ((gcroot)) *foo_p;
-
-foo my_foo;
-
-int alpha ()
-{
-  foo my_foo2 = my_foo;
-  
-  return my_foo2.a;
-}
-
-int bar (foo a)
-{
-  foo_p b;
-  return b->a;
-}
-
-foo_p baz (foo_p a, foo_p b, foo_p *c)
-{
-  a = b = *c;
-  return a;
-}
diff --git a/test/CFrontend/2007-09-26-Alignment.c b/test/CFrontend/2007-09-26-Alignment.c
deleted file mode 100644 (file)
index 1638fed..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-// RUN: %llvmgcc -S %s -o - | grep {align 16}
-extern p(int *);
-int q(void) {
-  int x __attribute__ ((aligned (16)));
-  p(&x);
-  return x;
-}
diff --git a/test/CFrontend/2007-09-27-ComplexIntCompare.c b/test/CFrontend/2007-09-27-ComplexIntCompare.c
deleted file mode 100644 (file)
index ee9a85c..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-// RUN: %llvmgcc -S %s -o -  
-// PR1708
-struct s { _Complex unsigned short x; };
-struct s gs = { 100 + 200i };
-struct s __attribute__((noinline)) foo (void) { return gs; }
-
-int main ()
-{
-  if (foo ().x != gs.x)
-    abort ();
-  exit (0);
-}
-
-
diff --git a/test/CFrontend/2007-09-28-PackedUnionMember.c b/test/CFrontend/2007-09-28-PackedUnionMember.c
deleted file mode 100644 (file)
index 1e64657..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-// RUN: %llvmgcc %s -S -o -
-#pragma pack(push, 2)
-struct H {
-  unsigned long f1;
-  unsigned long f2;
-  union {
-    struct opaque1 *f3;
-    struct opaque2 *f4;
-    struct {
-      struct opaque3 *f5;
-      unsigned short  f6;
-    } f7;
-  } f8;
-};
-#pragma pack(pop)
-
-struct E {
-  unsigned long f1;
-  unsigned long f2;
-};
-
-typedef long (*FuncPtr) ();
-
-extern long bork(FuncPtr handler, const struct E *list);
-
-static long hndlr()
-{
-  struct H cmd = { 4, 'fart' };
-  return 0;
-}
-void foo(void *inWindow) {
-  static const struct E events[] = {
-    { 'cmds', 1 }
-  };
-  bork(hndlr, events);
-}
-
diff --git a/test/CFrontend/2007-10-01-BuildArrayRef.c b/test/CFrontend/2007-10-01-BuildArrayRef.c
deleted file mode 100644 (file)
index e903755..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-// RUN: not %llvmgcc -S %s -o /dev/null |& grep "error: assignment of read-only location"
-// PR 1603
-int func()
-{
-   const int *arr;
-   arr[0] = 1;
-}
-
diff --git a/test/CFrontend/2007-10-02-VolatileArray.c b/test/CFrontend/2007-10-02-VolatileArray.c
deleted file mode 100644 (file)
index 7e8bf24..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-// RUN: %llvmgcc -S %s -o - | grep volatile
-// PR1647
-
-void foo(volatile int *p)
-{
-p[0] = 0;
-}
diff --git a/test/CFrontend/2007-10-15-VoidPtr.c b/test/CFrontend/2007-10-15-VoidPtr.c
deleted file mode 100644 (file)
index c5948b9..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-// RUN: %llvmgcc -S %s -o /dev/null
-void bork(void **data) {
-  (*(unsigned short *) (&(data[37])[927]) = 0);
-}
diff --git a/test/CFrontend/2007-10-30-Volatile.c b/test/CFrontend/2007-10-30-Volatile.c
deleted file mode 100644 (file)
index 7a75b05..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-// RUN: %llvmgcc -S %s -o /dev/null -Wall -Werror
-void bork() {
-  char * volatile p;
-  volatile int cc;
-  p += cc;
-}
diff --git a/test/CFrontend/2007-11-07-AlignedMemcpy.c b/test/CFrontend/2007-11-07-AlignedMemcpy.c
deleted file mode 100644 (file)
index f1900bb..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-// RUN: %llvmgcc -c %s -o /dev/null
-void bork() {
-  int Qux[33] = {0};
-}
diff --git a/test/CFrontend/2007-11-07-CopyAggregateAlign.c b/test/CFrontend/2007-11-07-CopyAggregateAlign.c
deleted file mode 100644 (file)
index 8bd94b0..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-// RUN: %llvmgcc -S %s -o - | grep "align 2" | count 6
-struct A { char s, t, u, v; short a; };
-void q() { struct A a, b; a = b; }
diff --git a/test/CFrontend/2007-11-07-ZeroAggregateAlign.c b/test/CFrontend/2007-11-07-ZeroAggregateAlign.c
deleted file mode 100644 (file)
index 424120d..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-// RUN: %llvmgcc -S %s -o - | grep "align 2"
-struct A { short s; short t; int i; };
-void q() { struct A a = {0}; }
diff --git a/test/CFrontend/2007-11-27-SExtZExt.c b/test/CFrontend/2007-11-27-SExtZExt.c
deleted file mode 100644 (file)
index 2b6cd62..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-// RUN: %llvmgcc -S %s -emit-llvm -o - | grep "signext" | count 4
-
-signed char foo1() { return 1; }
-
-void foo2(signed short a) { }
-
-signed char foo3(void) { return 1; }
-
-void foo4(a) signed short a; { }
-
-
-
diff --git a/test/CFrontend/2007-11-28-GlobalInitializer.c b/test/CFrontend/2007-11-28-GlobalInitializer.c
deleted file mode 100644 (file)
index c8c7a59..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-// RUN: %llvmgcc -S %s -o - 
-// PR1744
-typedef struct foo { int x; char *p; } FOO;
-extern FOO yy[];
-
-int *y = &((yy + 1)->x);
-void *z = &((yy + 1)->x);
-
diff --git a/test/CFrontend/2007-12-16-AsmNoUnwind.c b/test/CFrontend/2007-12-16-AsmNoUnwind.c
deleted file mode 100644 (file)
index b080e6a..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-// RUN: %llvmgcc %s -S -o - | grep nounwind
-
-void bar() { asm (""); }
diff --git a/test/CFrontend/2007-12-VarArrayDebug.c b/test/CFrontend/2007-12-VarArrayDebug.c
deleted file mode 100644 (file)
index cd6cfdf..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-// RUN: %llvmgcc -S -g -O %s -o - | llvm-as | llc
-// RUN: %llvmgcc -S -g %s -o - | llvm-as | llc
-
-extern void foo (void);
-
-static
-void baz (int i)
-{
-  foo ();
-  typedef char A[i];
-  struct { A b; } *x = 0;
-}
-
-void
-bar (i)
-{
-  baz (i);
-}
diff --git a/test/CFrontend/2008-01-04-WideBitfield.c b/test/CFrontend/2008-01-04-WideBitfield.c
deleted file mode 100644 (file)
index a0045a4..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-// RUN: %llvmgcc -S -o - %s
-// PR1386
-#include <stdint.h>
-
-struct X {
-  unsigned char pad : 4;
-  uint64_t a : 64;
-} __attribute__((packed)) x;
-
-uint64_t f(void)
-{
-  return x.a;
-}
diff --git a/test/CFrontend/2008-01-07-UnusualIntSize.c b/test/CFrontend/2008-01-07-UnusualIntSize.c
deleted file mode 100644 (file)
index 924ae2b..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-// RUN: %llvmgcc %s -S -o - -O | grep {and.*8589934591}
-// PR1721
-
-struct s {
-  unsigned long long u33: 33;
-} a, b;
-
-// This should turn into a real 33-bit add, not a 64-bit add.
-_Bool test(void) {
-  return a.u33 + b.u33 != 0;
-}
diff --git a/test/CFrontend/2008-01-11-ChainConsistency.c b/test/CFrontend/2008-01-11-ChainConsistency.c
deleted file mode 100644 (file)
index 13e48a3..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-// RUN: %llvmgcc -S %s -o - -fnested-functions | not grep nest
-
-void n1(void) { void a(void) { a(); } a(); }
diff --git a/test/CFrontend/2008-01-21-PackedBitFields.c b/test/CFrontend/2008-01-21-PackedBitFields.c
deleted file mode 100644 (file)
index 4c38dee..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-// RUN: %llvmgcc %s -S -o -
-
-typedef double Al1Double __attribute__((aligned(1)));
-struct x { int a:23; Al1Double v; };
-struct x X = { 5, 3.0 };
-double foo() { return X.v; }
-
diff --git a/test/CFrontend/2008-01-21-PackedStructField.c b/test/CFrontend/2008-01-21-PackedStructField.c
deleted file mode 100644 (file)
index 9cc1731..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-// RUN: %llvmgcc %s -S -o -
-
-struct X { long double b; unsigned char c; double __attribute__((packed)) d; };
-struct X x = { 3.0L, 5, 3.0 };
-
-
-struct S2504 {
-  int e:17;
-    __attribute__((packed)) unsigned long long int f; 
-} ;
-int fails;
- extern struct S2504 s2504; 
-void check2504va (int z) { 
-  struct S2504 arg, *p;
-  long long int i = 0; 
-  arg.f = i;
-}
-
diff --git a/test/CFrontend/2008-01-24-StructAlignAndBitFields.c b/test/CFrontend/2008-01-24-StructAlignAndBitFields.c
deleted file mode 100644 (file)
index 380a7ef..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-// RUN: %llvmgcc %s -S -o -
-
-struct U { char a; short b; int c:25; char d; } u;
-
diff --git a/test/CFrontend/2008-01-25-ByValReadNone.c b/test/CFrontend/2008-01-25-ByValReadNone.c
deleted file mode 100644 (file)
index 8ec6052..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-// RUN: %llvmgcc -O3 -S -o - -emit-llvm %s | not grep readonly
-// RUN: %llvmgcc -O3 -S -o - -emit-llvm %s | not grep readnone
-
-
-// The struct being passed byval means that we cannot mark the
-// function readnone.  Readnone would allow stores to the arg to
-// be deleted in the caller.  We also don't allow readonly since
-// the callee might write to the byval parameter.  The inliner
-// would have to assume the worse and introduce an explicit
-// temporary when inlining such a function, which is costly for
-// the common case in which the byval argument is not written.
-struct S { int A[1000]; };
-int __attribute__ ((const)) f(struct S x) { return x.A[0]; }
-int g(struct S x) __attribute__ ((pure));
-int h(struct S x) { return g(x); }
diff --git a/test/CFrontend/2008-01-25-ZeroSizedAggregate.c b/test/CFrontend/2008-01-25-ZeroSizedAggregate.c
deleted file mode 100644 (file)
index 643caff..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-// RUN: %llvmgcc %s -S -o -
-
-// Aggregates of size zero should be dropped from argument list.
-typedef long int Tlong;
-struct S2411 {
-  __attribute__((aligned)) Tlong:0;
-};
-
-extern struct S2411 a2411[5];
-extern void checkx2411(struct S2411);
-void test2411(void) {
-  checkx2411(a2411[0]);
-}
-
-// Proper handling of zero sized fields during type conversion.
-typedef unsigned long long int Tal2ullong __attribute__((aligned(2)));
-struct S2525 {
- Tal2ullong: 0;
- struct {
- } e;
-};
-struct S2525 s2525;
-
-struct {
-  signed char f;
-  char :0;
-  struct{}h;
-  char * i[5];
-} data; 
-
-// Taking address of a zero sized field.
-struct Z {};
-struct Y {
-  int i;
-  struct Z z;
-};
-void *f(struct Y *y) {
-  return &y->z;
-}
diff --git a/test/CFrontend/2008-01-28-PragmaMark.c b/test/CFrontend/2008-01-28-PragmaMark.c
deleted file mode 100644 (file)
index 0b3ac17..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-// RUN: %llvmgcc -Werror -c %s -o /dev/null
-#pragma mark LLVM's world
-#ifdef DO_ERROR
-#error LLVM's world
-#endif
-int i;
diff --git a/test/CFrontend/2008-01-28-UnionSize.c b/test/CFrontend/2008-01-28-UnionSize.c
deleted file mode 100644 (file)
index ea2c863..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-// RUN: %llvmgcc %s -S -o -
-// PR 1861
-
-typedef unsigned char __u8;
-typedef unsigned int __u32;
-typedef unsigned short u16;
-typedef __u32 __le32;
-struct bcm43xx_plcp_hdr6 {
-  union {
-    __le32 data;
-    __u8 raw[6];
-  }
-    __attribute__((__packed__));
-}
-  __attribute__((__packed__));
-struct bcm43xx_txhdr {
-  union {
-    struct {
-      struct bcm43xx_plcp_hdr6 plcp;
-    };
-  };
-}
-  __attribute__((__packed__));
-static void bcm43xx_generate_rts(struct bcm43xx_txhdr *txhdr ) { }
diff --git a/test/CFrontend/2008-02-11-AnnotateBuiltin.c b/test/CFrontend/2008-02-11-AnnotateBuiltin.c
deleted file mode 100644 (file)
index 32bc7a8..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-// RUN: %llvmgcc %s -S -o - | llvm-as | llvm-dis | grep llvm.annotation
-
-int main() {
-  int x = 0;
-  return __builtin_annotation(x, "annotate");
-}
-
diff --git a/test/CFrontend/2008-03-03-CtorAttrType.c b/test/CFrontend/2008-03-03-CtorAttrType.c
deleted file mode 100644 (file)
index dc0e47d..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-// RUN: %llvmgcc %s -S -emit-llvm -o - | grep llvm.global_ctors
-int __attribute__((constructor)) foo(void) {
-  return 0;
-}
-void __attribute__((constructor)) bar(void) {}
-
diff --git a/test/CFrontend/2008-03-05-syncPtr.c b/test/CFrontend/2008-03-05-syncPtr.c
deleted file mode 100644 (file)
index 03aedab..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-// RUN: %llvmgcc %s -S -emit-llvm -o - | grep llvm.atomic
-// XFAIL: sparc-sun-solaris2|arm|ia64
-// Feature currently implemented only for x86, alpha, powerpc.
-
-int* foo(int** a, int* b, int* c) {
-return __sync_val_compare_and_swap (a, b, c);
-}
-
-int foo2(int** a, int* b, int* c) {
-return __sync_bool_compare_and_swap (a, b, c);
-}
-
-int* foo3(int** a, int b) {
-  return __sync_fetch_and_add (a, b);
-}
-
-int* foo4(int** a, int b) {
-  return __sync_fetch_and_sub (a, b);
-}
-
-int* foo5(int** a, int* b) {
-  return __sync_lock_test_and_set (a, b);
-}
-
-int* foo6(int** a, int*** b) {
-  return __sync_lock_test_and_set (a, b);
-}
diff --git a/test/CFrontend/2008-03-24-BitField-And-Alloca.c b/test/CFrontend/2008-03-24-BitField-And-Alloca.c
deleted file mode 100644 (file)
index e8112bb..0000000
+++ /dev/null
@@ -1,88 +0,0 @@
-// RUN: %llvmgcc -S --emit-llvm %s -o - | not grep "\{ i8, .7 x i8. \}"
-// RUN: %llvmgcc -O2 -S %s -o - | not grep alloca
-enum {
- PP_C,
- PP_D,
- PP_R,
- PP_2D,
- PP_1D,
- PP_SR,
- PP_S2D,
- PP_S1D,
- PP_SC
-};
-
-enum {
- G_VP,
- G_FP,
- G_VS,
- G_GS,
- G_FS
-};
-
-enum {
- G_NONE,
- G_B,
- G_R
-};
-
-typedef union _Key {
- struct {
-  unsigned int count : 2;
-  unsigned int Aconst : 1;
-  unsigned int Bconst : 1;
-  unsigned int Cconst : 1;
-  unsigned int Xused : 1;
-  unsigned int Yused : 1;
-  unsigned int Zused : 1;
-  unsigned int Wused : 1;
-  unsigned int ttype : 3;
-  unsigned int scalar : 1;
-  unsigned int AType : 4;
-  unsigned int BType : 4;
-  unsigned int CType : 4;
-  unsigned int RType : 4;
-  unsigned int Size : 2;
-  unsigned int prec : 1;
-
-  unsigned int ASize : 2;
-  unsigned int BSize : 2;
-  unsigned int CSize : 2;
-  unsigned int tTex : 4;
-  unsigned int proj : 1;
-  unsigned int lod : 2;
-  unsigned int dvts : 1;
-  unsigned int uipad : 18;
- } key_io;
- struct {
-  unsigned int key0;
-  unsigned int key1;
- } key;
- unsigned long long lkey;
-} Key;
-
-static inline __attribute__ ((always_inline)) void foo(const Key iospec, int* ret)
-{
-  *ret=0;
- if(((iospec.key_io.lod == G_B) &&
-  (iospec.key_io.ttype != G_VS) &&
-  (iospec.key_io.ttype != G_GS) &&
-  (iospec.key_io.ttype != G_FS)) ||
-
-  (((iospec.key_io.tTex == PP_C) ||
-    (iospec.key_io.tTex == PP_SC)) &&
-   ((iospec.key_io.tTex == PP_SR) ||
-    (iospec.key_io.tTex == PP_S2D) ||
-    (iospec.key_io.tTex == PP_S1D) ||
-    (iospec.key_io.tTex == PP_SC))))
-  *ret=1;
-}
-
-
-extern int bar(unsigned long long key_token2)
-{
- int ret;
- __attribute__ ((unused)) Key iospec = (Key) key_token2;
- foo(iospec, &ret);
- return ret;
-}
diff --git a/test/CFrontend/2008-03-26-PackedBitFields.c b/test/CFrontend/2008-03-26-PackedBitFields.c
deleted file mode 100644 (file)
index 7214281..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-// RUN: %llvmgcc %s -S -o -
-
-
-struct S1757 { 
-  long double c;
-  long int __attribute__((packed)) e:28;
-} x;
diff --git a/test/CFrontend/2008-04-08-NoExceptions.c b/test/CFrontend/2008-04-08-NoExceptions.c
deleted file mode 100644 (file)
index 257fee2..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-// RUN: %llvmgcc -S -o - %s | grep nounwind | count 2
-// RUN: %llvmgcc -S -o - %s | not grep {declare.*nounwind}
-
-void f(void);
-void g(void) {
-  f();
-}
diff --git a/test/CFrontend/2008-05-06-CFECrash.c b/test/CFrontend/2008-05-06-CFECrash.c
deleted file mode 100644 (file)
index 94d556c..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-// RUN: %llvmgcc -S -O2 %s -o /dev/null
-// PR2292.
-__inline__ __attribute__ ((__pure__)) int g (void) {}
-void f (int k) { k = g (); }
diff --git a/test/CFrontend/2008-05-12-TempUsedBeforeDef.c b/test/CFrontend/2008-05-12-TempUsedBeforeDef.c
deleted file mode 100644 (file)
index 5c3bfda..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-// RUN: %llvmgcc -S -o /dev/null %s
-// PR2264.
-unsigned foo = 8L;
-unsigned bar = 0L;
-volatile unsigned char baz = 6L;
-int test() {
-  char qux = 1L;
-  for (; baz >= -29; baz--)
-    bork(bar && foo, qux);
-}
diff --git a/test/CFrontend/2008-05-19-AlwaysInline.c b/test/CFrontend/2008-05-19-AlwaysInline.c
deleted file mode 100644 (file)
index 506f6cf..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-// RUN: %llvmgcc %s -S -fno-unit-at-a-time -emit-llvm -O0 -o - | not grep sabrina
-// RUN: %llvmgcc %s -S -funit-at-a-time -emit-llvm -O0 -o - | not grep sabrina
-
-static inline int sabrina (void) __attribute__((always_inline));
-static inline int sabrina (void)
-{
-  return 13;
-}
-int bar (void)
-{
-  return sabrina () + 68;
-}
diff --git a/test/CFrontend/BasicInstrs.c b/test/CFrontend/BasicInstrs.c
deleted file mode 100644 (file)
index 812b49d..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-// This file can be used to see what a native C compiler is generating for a
-// variety of interesting operations.
-//
-// RUN: %llvmgcc -S %s -o - | llvm-as | llc
-
-unsigned int udiv(unsigned int X, unsigned int Y) {
-  return X/Y;
-}
-int sdiv(int X, int Y) {
-  return X/Y;
-}
-unsigned int urem(unsigned int X, unsigned int Y) {
-  return X%Y;
-}
-int srem(int X, int Y) {
-  return X%Y;
-}
-
-_Bool setlt(int X, int Y) {
-  return X < Y;
-}
-
-_Bool setgt(int X, int Y) {
-  return X > Y;
-}
-
diff --git a/test/CFrontend/attribute_constructor.c b/test/CFrontend/attribute_constructor.c
deleted file mode 100644 (file)
index b2f7c9b..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-// RUN: %llvmgcc %s -c -o - | llvm-dis | grep llvm.global_ctors
-
-void foo() __attribute__((constructor));
-void foo() {
-  bar();
-}
diff --git a/test/CFrontend/block-copy.c b/test/CFrontend/block-copy.c
deleted file mode 100644 (file)
index a53732e..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-/* RUN: %llvmgcc %s -S -o - -emit-llvm -O3 | grep {call.*memcpy}
-
- This should compile into a memcpy from a global, not 128 stores. */
-
-
-
-void foo();
-
-float bar() {
-       float lookupTable[] = {-1,-1,-1,0, -1,-1,0,-1, -1,-1,0,1, -1,-1,1,0,
-                                                  -1,0,-1,-1, -1,0,-1,1, -1,0,1,-1, -1,0,1,1,
-                                                  -1,1,-1,0, -1,1,0,-1, -1,1,0,1, -1,1,1,0,
-                                                  0,-1,-1,-1, 0,-1,-1,1, 0,-1,1,-1, 0,-1,1,1,
-                                                  1,-1,-1,0, 1,-1,0,-1, 1,-1,0,1, 1,-1,1,0,
-                                                  1,0,-1,-1, 1,0,-1,1, 1,0,1,-1, 1,0,1,1,
-                                                  1,1,-1,0, 1,1,0,-1, 1,1,0,1, 1,1,1,0,
-                                                  0,1,-1,-1, 0,1,-1,1, 0,1,1,-1, 0,1,1,1};
-   foo(lookupTable);
-}
-
diff --git a/test/CFrontend/dg.exp b/test/CFrontend/dg.exp
deleted file mode 100644 (file)
index a9be28a..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-load_lib llvm.exp
-
-if [ llvm_gcc_supports c ] then {
-  RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp}]]
-}
diff --git a/test/CFrontend/exact-div-expr.c b/test/CFrontend/exact-div-expr.c
deleted file mode 100644 (file)
index 9dce922..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-// RUN: %llvmgcc -S %s -o - -O1 | grep ashr
-// RUN: %llvmgcc -S %s -o - -O1 | not grep sdiv
-
-long long test(int *A, int *B) {
-  return A-B;
-}
diff --git a/test/CFrontend/extern-weak.c b/test/CFrontend/extern-weak.c
deleted file mode 100644 (file)
index 2a8569c..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-// RUN: %llvmgcc -O3 -S -o - -emit-llvm %s | grep extern_weak
-// RUN: %llvmgcc -O3 -S -o - -emit-llvm %s | llvm-as | llc
-
-#if !defined(__linux__) && !defined(__FreeBSD__) && \
-    !defined(__OpenBSD__) && !defined(__CYGWIN__)
-void foo() __attribute__((weak_import));
-#else
-void foo() __attribute__((weak));
-#endif
-
-void bar() { foo(); }
-
diff --git a/test/CFrontend/funccall.c b/test/CFrontend/funccall.c
deleted file mode 100644 (file)
index 9735e34..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-
-static int q;
-
-void foo() {
-  int t = q;
-  q = t + 1;
-}
-int main() {
-  q = 0;
-  foo();
-  q = q - 1;
-
-  return q;
-}
-
-// This is the source that corresponds to funccall.ll
-// RUN: echo foo
diff --git a/test/CFrontend/hidden-visibility.c b/test/CFrontend/hidden-visibility.c
deleted file mode 100644 (file)
index fc2ae44..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-// RUN: %llvmgcc %s -emit-llvm -S -o - | grep {hidden global}
-
-int X __attribute__ ((__visibility__ ("hidden"))) = 123;
diff --git a/test/CFrontend/inline-asm-mrv.c b/test/CFrontend/inline-asm-mrv.c
deleted file mode 100644 (file)
index 6d1df67..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-// RUN: %llvmgcc -S %s -o - -O | not grep alloca
-// PR2094
-
-int sad16_sse2(void *v, unsigned char *blk2, unsigned char *blk1,
-               int stride, int h) {
-    int ret;
-    asm volatile( "%0 %1 %2 %3"
-        : "+r" (h), "+r" (blk1), "+r" (blk2)
-        : "r" ((long)stride));
-    asm volatile("set %0 %1" : "=r"(ret) : "r"(blk1));
-    return ret;
-}
diff --git a/test/CFrontend/libcalls.c b/test/CFrontend/libcalls.c
deleted file mode 100644 (file)
index c027ea4..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-// llvm-gcc -O1+ should run simplify libcalls, O0 shouldn't
-// and -fno-builtins shouldn't.
-// RUN: %llvmgcc %s -S -emit-llvm -O0 -o - | grep {call.*exp2f}
-// RUN: %llvmgcc %s -S -emit-llvm -O1 -o - | grep {call.*ldexp}
-// RUN: %llvmgcc %s -S -emit-llvm -O3 -fno-builtin -o - | grep {call.*exp2f}
-
-float t4(unsigned char x) {
-  return exp2f(x);
-}
-
diff --git a/test/CFrontend/nested-functions.c b/test/CFrontend/nested-functions.c
deleted file mode 100644 (file)
index bccbef3..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-// RUN: %llvmgcc -S %s -o -  -fnested-functions
-// PR1274
-
-void Bork() {
-  void Fork(const int *src, int size) {
-    int i = 1;
-    int x;
-
-    while (i < size)
-      x = src[i];
-  }
-}
-
-void foo(void *a){
-  inline void foo_bar() {
-    a += 1;
-  }
-}
diff --git a/test/CFrontend/sret.c b/test/CFrontend/sret.c
deleted file mode 100644 (file)
index 11ac5d6..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-// RUN: %llvmgcc %s -S -emit-llvm -O0 -o - | grep sret | count 5
-
-struct abc {
- long a;
- long b;
- long c;
-};
-struct abc foo1(void);
-struct abc foo2();
-
-void bar() {
-  struct abc dummy1 = foo1();
-  struct abc dummy2 = foo2();
-}
diff --git a/test/CFrontend/sret2.c b/test/CFrontend/sret2.c
deleted file mode 100644 (file)
index 7b621f9..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-// RUN: %llvmgcc %s -S -emit-llvm -O0 -o - | grep sret | count 2
-
-struct abc {
- long a;
- long b;
- long c;
-};
-struct abc foo2(){}
diff --git a/test/CFrontend/unaligned-memcpy.c b/test/CFrontend/unaligned-memcpy.c
deleted file mode 100644 (file)
index e5d810f..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-// RUN: %llvmgcc %s -S -emit-llvm -o - | llvm-as | llc
-
-void bork() {
-  char Qux[33] = {0};
-}
diff --git a/test/FrontendC++/2003-08-20-ExceptionFail.cpp b/test/FrontendC++/2003-08-20-ExceptionFail.cpp
new file mode 100644 (file)
index 0000000..fd1c6ad
--- /dev/null
@@ -0,0 +1,12 @@
+// RUN: %llvmgxx -S %s -o - | llvm-as -f -o /dev/null
+
+void foo();
+
+void bar() {
+  struct local {
+    ~local() { foo(); }
+  } local_obj;
+
+  foo();
+}
+
diff --git a/test/FrontendC++/2003-08-21-EmptyClass.cpp b/test/FrontendC++/2003-08-21-EmptyClass.cpp
new file mode 100644 (file)
index 0000000..2f90b3a
--- /dev/null
@@ -0,0 +1,9 @@
+// RUN: %llvmgxx -S %s -o - | llvm-as -f -o /dev/null
+
+// This tests compilation of EMPTY_CLASS_EXPR's
+
+struct empty {};
+
+void foo(empty) {}
+
+void bar() { foo(empty()); }
diff --git a/test/FrontendC++/2003-08-24-Cleanup.cpp b/test/FrontendC++/2003-08-24-Cleanup.cpp
new file mode 100644 (file)
index 0000000..ab0d1a0
--- /dev/null
@@ -0,0 +1,10 @@
+// RUN: %llvmgxx -xc++ %s -c -o - | llvm-dis | grep unwind
+
+struct S { ~S(); };
+
+int mightthrow();
+
+int test() {
+  S s;
+  mightthrow();
+}
diff --git a/test/FrontendC++/2003-08-27-TypeNamespaces.cpp b/test/FrontendC++/2003-08-27-TypeNamespaces.cpp
new file mode 100644 (file)
index 0000000..cd7247e
--- /dev/null
@@ -0,0 +1,16 @@
+// RUN: %llvmgxx -S %s -o - | llvm-as -f -o /dev/null
+
+
+namespace foo {
+  namespace bar {
+    struct X { X(); };
+
+    X::X() {}
+  }
+}
+
+
+namespace {
+  struct Y { Y(); };
+  Y::Y() {}
+}
diff --git a/test/FrontendC++/2003-08-28-ForwardType.cpp b/test/FrontendC++/2003-08-28-ForwardType.cpp
new file mode 100644 (file)
index 0000000..38c4e2d
--- /dev/null
@@ -0,0 +1,23 @@
+// RUN: %llvmgxx -S %s -o - | llvm-as -f -o /dev/null
+
+// Default placement versions of operator new.
+#include <new>
+
+void* operator new(size_t, void* __p) throw();
+
+
+template<typename _CharT>
+struct stdio_filebuf
+{  stdio_filebuf();
+
+};
+
+extern stdio_filebuf<char> buf_cout;
+
+void foo() {
+  // Create stream buffers for the standard streams and use
+  // those buffers without destroying and recreating the
+  // streams.
+  new (&buf_cout) stdio_filebuf<char>();
+
+}
diff --git a/test/FrontendC++/2003-08-28-SaveExprBug.cpp b/test/FrontendC++/2003-08-28-SaveExprBug.cpp
new file mode 100644 (file)
index 0000000..2be35d8
--- /dev/null
@@ -0,0 +1,24 @@
+// RUN: %llvmgxx -S %s -o - | llvm-as -f -o /dev/null
+
+
+char* eback();
+
+template<typename foo>
+struct basic_filebuf {
+  char *instancevar;
+
+  void callee() {
+    instancevar += eback() != eback();
+  }
+
+  void caller();
+};
+
+
+template<typename _CharT>
+void basic_filebuf<_CharT>::caller() {
+  callee();
+}
+
+
+template class basic_filebuf<char>;
diff --git a/test/FrontendC++/2003-08-29-ArgPassingBug.cpp b/test/FrontendC++/2003-08-29-ArgPassingBug.cpp
new file mode 100644 (file)
index 0000000..d4cddff
--- /dev/null
@@ -0,0 +1,13 @@
+
+// RUN: %llvmgcc -xc++ -c -o /dev/null %s |& not grep WARNING
+
+struct iterator {
+  iterator();
+  iterator(const iterator &I);
+};
+
+iterator foo(const iterator &I) { return I; }
+
+void test() {
+  foo(iterator());
+}
diff --git a/test/FrontendC++/2003-08-31-StructLayout.cpp b/test/FrontendC++/2003-08-31-StructLayout.cpp
new file mode 100644 (file)
index 0000000..99d6682
--- /dev/null
@@ -0,0 +1,16 @@
+// RUN: %llvmgxx -S %s -o - | llvm-as -f -o /dev/null
+
+// There is a HOLE in the derived2 object due to not wanting to place the two
+// baseclass instances at the same offset!
+
+struct baseclass {};
+
+class derived1 : public baseclass {
+  void * NodePtr;
+};
+
+class derived2 : public baseclass {
+  derived1 current;
+};
+
+derived2 RI;
diff --git a/test/FrontendC++/2003-09-22-CompositeExprValue.cpp b/test/FrontendC++/2003-09-22-CompositeExprValue.cpp
new file mode 100644 (file)
index 0000000..a8208ad
--- /dev/null
@@ -0,0 +1,11 @@
+// RUN: %llvmgxx -S %s -o - | llvm-as -f -o /dev/null
+
+struct duration {
+ duration operator/=(int c) {
+  return *this;
+  }
+};
+
+void a000090() {
+  duration() /= 1;
+}
diff --git a/test/FrontendC++/2003-09-29-ArgumentNumberMismatch.cpp b/test/FrontendC++/2003-09-29-ArgumentNumberMismatch.cpp
new file mode 100644 (file)
index 0000000..4873123
--- /dev/null
@@ -0,0 +1,17 @@
+// RUN: %llvmgxx -S %s -o - | llvm-as -f -o /dev/null
+
+// Non-POD classes cannot be passed into a function by component, because their
+// dtors must be run.  Instead, pass them in by reference.  The C++ front-end
+// was mistakenly "thinking" that 'foo' took a structure by component.
+
+struct C {
+  int A, B;
+  ~C() {}
+};
+
+void foo(C b);
+
+void test(C *P) {
+  foo(*P);
+}
+
diff --git a/test/FrontendC++/2003-09-30-CommaExprBug.cpp b/test/FrontendC++/2003-09-30-CommaExprBug.cpp
new file mode 100644 (file)
index 0000000..afe470c
--- /dev/null
@@ -0,0 +1,10 @@
+// RUN: %llvmgxx -S %s -o - | llvm-as -f -o /dev/null
+
+class Empty {};
+
+void foo(Empty E);
+
+void bar() {
+  foo(Empty());
+}
+
diff --git a/test/FrontendC++/2003-09-30-ForIncrementExprBug.cpp b/test/FrontendC++/2003-09-30-ForIncrementExprBug.cpp
new file mode 100644 (file)
index 0000000..40c9c87
--- /dev/null
@@ -0,0 +1,10 @@
+// RUN: %llvmgxx -S %s -o - | llvm-as -f -o /dev/null
+
+struct C {};
+
+C &foo();
+
+void foox() {
+  for (; ; foo());
+}
+
diff --git a/test/FrontendC++/2003-09-30-ForIncrementExprBug2.cpp b/test/FrontendC++/2003-09-30-ForIncrementExprBug2.cpp
new file mode 100644 (file)
index 0000000..e07eb42
--- /dev/null
@@ -0,0 +1,12 @@
+// RUN: %llvmgxx -S %s -o - | llvm-as -f -o /dev/null
+
+// Test with an opaque type
+
+struct C;
+
+C &foo();
+
+void foox() {
+  for (; ; foo());
+}
+
diff --git a/test/FrontendC++/2003-09-30-NestedFunctionDecl.cpp b/test/FrontendC++/2003-09-30-NestedFunctionDecl.cpp
new file mode 100644 (file)
index 0000000..b1c54b8
--- /dev/null
@@ -0,0 +1,12 @@
+// RUN: %llvmgxx -S %s -o - | llvm-as -f -o /dev/null
+
+// The C++ front-end thinks the two foo's are different, the LLVM emitter
+// thinks they are the same.  The disconnect causes problems.
+
+void foo() { }
+
+void bar() {
+  void foo();
+
+  foo();
+}
diff --git a/test/FrontendC++/2003-10-17-BoolBitfields.cpp b/test/FrontendC++/2003-10-17-BoolBitfields.cpp
new file mode 100644 (file)
index 0000000..547a367
--- /dev/null
@@ -0,0 +1,11 @@
+// RUN: %llvmgxx -S %s -o - | llvm-as -f -o /dev/null
+
+struct test {
+  bool A : 1;
+  bool B : 1;
+};
+
+void foo(test *T) {
+  T->B = true;
+}
+
diff --git a/test/FrontendC++/2003-10-21-InnerClass.cpp b/test/FrontendC++/2003-10-21-InnerClass.cpp
new file mode 100644 (file)
index 0000000..fadd51d
--- /dev/null
@@ -0,0 +1,12 @@
+// RUN: %llvmgcc -xc++ -S -o - %s | grep {struct.X::Y}
+struct X {
+
+  struct Y {
+    Y();
+  };
+
+};
+
+X::Y::Y() {
+
+}
diff --git a/test/FrontendC++/2003-10-27-VirtualBaseClassCrash.cpp b/test/FrontendC++/2003-10-27-VirtualBaseClassCrash.cpp
new file mode 100644 (file)
index 0000000..f9fc80e
--- /dev/null
@@ -0,0 +1,17 @@
+// RUN: %llvmgxx -S %s -o - | llvm-as -f -o /dev/null
+
+
+template<class T>
+struct super {
+  int Y;
+  void foo();
+};
+
+template <class T>
+struct test : virtual super<int> {};
+
+extern test<int> X;
+
+void foo() {
+  X.foo();
+}
diff --git a/test/FrontendC++/2003-11-02-WeakLinkage.cpp b/test/FrontendC++/2003-11-02-WeakLinkage.cpp
new file mode 100644 (file)
index 0000000..748ca63
--- /dev/null
@@ -0,0 +1,13 @@
+// RUN: %llvmgcc -xc++ -S -o - %s | not grep weak
+// The template should compile to linkonce linkage, not weak linkage.
+
+template<class T>
+void thefunc();
+
+template<class T>
+inline void thefunc() {}
+
+void test() {
+  thefunc<int>();
+}
+
diff --git a/test/FrontendC++/2003-11-04-ArrayConstructors.cpp b/test/FrontendC++/2003-11-04-ArrayConstructors.cpp
new file mode 100644 (file)
index 0000000..4df4f9b
--- /dev/null
@@ -0,0 +1,12 @@
+// RUN: %llvmgxx -S %s -o - | llvm-as -f -o /dev/null
+
+
+struct Foo {
+  Foo(int);
+  ~Foo();
+};
+void foo() {
+  struct {
+    Foo name;
+  } Int[] =  { 1 };
+}
diff --git a/test/FrontendC++/2003-11-04-CatchLabelName.cpp b/test/FrontendC++/2003-11-04-CatchLabelName.cpp
new file mode 100644 (file)
index 0000000..8acf88d
--- /dev/null
@@ -0,0 +1,11 @@
+// RUN: %llvmgxx -S %s -o - | llvm-as -f -o /dev/null
+
+#include <string>
+
+void bar();
+
+void test() {
+  try {
+    bar();
+  } catch (std::string) {}
+}
diff --git a/test/FrontendC++/2003-11-08-ArrayAddress.cpp b/test/FrontendC++/2003-11-08-ArrayAddress.cpp
new file mode 100644 (file)
index 0000000..9ad1b8f
--- /dev/null
@@ -0,0 +1,10 @@
+// RUN: %llvmgxx -xc++ %s -c -o - | llvm-dis | grep getelementptr
+
+struct foo {
+  int array[100];
+  void *getAddr(unsigned i);
+};
+
+void *foo::getAddr(unsigned i) {
+  return &array[i];
+}
diff --git a/test/FrontendC++/2003-11-09-ConstructorTypeSafety.cpp b/test/FrontendC++/2003-11-09-ConstructorTypeSafety.cpp
new file mode 100644 (file)
index 0000000..e6c09e5
--- /dev/null
@@ -0,0 +1,21 @@
+// The code generated for this testcase should be completely typesafe!
+// RUN: %llvmgcc -xc++ -S -o - %s | llvm-as | opt -die | llvm-dis | \
+// RUN:    notcast
+
+struct contained {
+  unsigned X;
+  contained();
+};
+
+struct base {
+  unsigned A, B;
+};
+
+struct derived : public base {
+  contained _M_value_field;
+};
+
+int test() {
+  derived X;
+}
+
diff --git a/test/FrontendC++/2003-11-18-EnumArray.cpp b/test/FrontendC++/2003-11-18-EnumArray.cpp
new file mode 100644 (file)
index 0000000..6eaf9d6
--- /dev/null
@@ -0,0 +1,14 @@
+// RUN: %llvmgxx -S %s -o - | llvm-as -f -o /dev/null
+
+enum TchkType {
+  tchkNum, tchkString, tchkSCN, tchkNone
+};
+
+struct Operator {
+  enum TchkType tchk[8];
+};
+
+struct Operator opTab[] = {
+  {{tchkNum, tchkNum, tchkString} }
+};
+
diff --git a/test/FrontendC++/2003-11-18-MemberInitializationCasting.cpp b/test/FrontendC++/2003-11-18-MemberInitializationCasting.cpp
new file mode 100644 (file)
index 0000000..cb66ba1
--- /dev/null
@@ -0,0 +1,13 @@
+// RUN: %llvmgcc -xc++ -S -o - %s | llvm-as | opt -die | llvm-dis |  notcast
+
+struct A {
+        A() : i(0) {}
+        int getI() {return i;}
+        int i;
+};
+
+int f(int j)
+{
+        A a;
+        return j+a.getI();
+}
diff --git a/test/FrontendC++/2003-11-18-PtrMemConstantInitializer.cpp b/test/FrontendC++/2003-11-18-PtrMemConstantInitializer.cpp
new file mode 100644 (file)
index 0000000..ae76a6c
--- /dev/null
@@ -0,0 +1,14 @@
+// RUN: %llvmgxx -S %s -o - | llvm-as -f -o /dev/null
+
+struct Gfx {
+  void opMoveSetShowText();
+};
+
+struct Operator {
+  void (Gfx::*func)();
+};
+
+Operator opTab[] = {
+  {&Gfx::opMoveSetShowText},
+};
+
diff --git a/test/FrontendC++/2003-11-25-ReturningOpaqueByValue.cpp b/test/FrontendC++/2003-11-25-ReturningOpaqueByValue.cpp
new file mode 100644 (file)
index 0000000..83fe1b3
--- /dev/null
@@ -0,0 +1,12 @@
+// RUN: %llvmgxx -S %s -o - | llvm-as -f -o /dev/null
+
+#include <vector>
+std::vector<int> my_method ();
+
+int
+main ()
+{
+  my_method ();
+  return 0;
+}
+
diff --git a/test/FrontendC++/2003-11-27-MultipleInheritanceThunk.cpp b/test/FrontendC++/2003-11-27-MultipleInheritanceThunk.cpp
new file mode 100644 (file)
index 0000000..16026c3
--- /dev/null
@@ -0,0 +1,28 @@
+// RUN: %llvmgxx -S %s -o - | llvm-as -f -o /dev/null
+
+
+struct CallSite {
+  int X;
+
+  CallSite(const CallSite &CS);
+};
+
+struct AliasAnalysis {
+  int TD;
+
+  virtual int getModRefInfo(CallSite CS);
+};
+
+
+struct Pass {
+  int X;
+  virtual int foo();
+};
+
+struct AliasAnalysisCounter : public Pass, public AliasAnalysis {
+  int getModRefInfo(CallSite CS) {
+    return 0;
+  }
+};
+
+AliasAnalysisCounter AAC;
diff --git a/test/FrontendC++/2003-11-29-DuplicatedCleanupTest.cpp b/test/FrontendC++/2003-11-29-DuplicatedCleanupTest.cpp
new file mode 100644 (file)
index 0000000..8131baa
--- /dev/null
@@ -0,0 +1,41 @@
+// RUN: %llvmgxx -S %s -o - | llvm-as -f -o /dev/null
+
+
+void doesntThrow() throw();
+struct F {
+  ~F() { doesntThrow(); }
+};
+
+void atest() {
+  F A;
+lab:
+  F B;
+  goto lab;
+}
+
+void test(int val) {
+label: {
+   F A;
+   F B;
+   if (val == 0) goto label;
+   if (val == 1) goto label;
+}
+}
+
+void test3(int val) {
+label: {
+   F A;
+   F B;
+   if (val == 0) { doesntThrow(); goto label; }
+   if (val == 1) { doesntThrow(); goto label; }
+}
+}
+
+void test4(int val) {
+label: {
+   F A;
+   F B;
+   if (val == 0) { F C; goto label; }
+   if (val == 1) { F D; goto label; }
+}
+}
diff --git a/test/FrontendC++/2003-12-08-ArrayOfPtrToMemberFunc.cpp b/test/FrontendC++/2003-12-08-ArrayOfPtrToMemberFunc.cpp
new file mode 100644 (file)
index 0000000..d512234
--- /dev/null
@@ -0,0 +1,12 @@
+// RUN: %llvmgxx -S %s -o - | llvm-as -f -o /dev/null
+
+struct Evil {
+ void fun ();
+};
+int foo();
+typedef void (Evil::*memfunptr) ();
+static memfunptr jumpTable[] = { &Evil::fun };
+
+void Evil::fun() {
+ (this->*jumpTable[foo()]) ();
+}
diff --git a/test/FrontendC++/2004-01-11-DynamicInitializedConstant.cpp b/test/FrontendC++/2004-01-11-DynamicInitializedConstant.cpp
new file mode 100644 (file)
index 0000000..8ae15c9
--- /dev/null
@@ -0,0 +1,6 @@
+// RUN: %llvmgcc -xc++ -S -o - %s | not grep { constant }
+
+extern int X;
+const int Y = X;
+const int* foo() { return &Y; }
+
diff --git a/test/FrontendC++/2004-03-08-ReinterpretCastCopy.cpp b/test/FrontendC++/2004-03-08-ReinterpretCastCopy.cpp
new file mode 100644 (file)
index 0000000..755d7c7
--- /dev/null
@@ -0,0 +1,21 @@
+// RUN: %llvmgxx -S %s -o - | llvm-as -f -o /dev/null
+
+struct A {
+  virtual void Method() = 0;
+};
+
+struct B : public A {
+  virtual void Method() { }
+};
+
+typedef void (A::*fn_type_a)(void);
+typedef void (B::*fn_type_b)(void);
+
+int main(int argc, char **argv)
+{
+  fn_type_a f = reinterpret_cast<fn_type_a>(&B::Method);
+  fn_type_b g = reinterpret_cast<fn_type_b>(f);
+  B b;
+  (b.*g)();
+  return 0;
+}
diff --git a/test/FrontendC++/2004-03-09-UnmangledBuiltinMethods.cpp b/test/FrontendC++/2004-03-09-UnmangledBuiltinMethods.cpp
new file mode 100644 (file)
index 0000000..b019e0c
--- /dev/null
@@ -0,0 +1,8 @@
+// RUN: %llvmgcc -xc++ -c -o - %s | llvm-dis | grep _ZN11AccessFlags6strlenEv
+
+struct AccessFlags {
+  void strlen();
+};
+
+void AccessFlags::strlen() { }
+
diff --git a/test/FrontendC++/2004-03-15-CleanupsAndGotos.cpp b/test/FrontendC++/2004-03-15-CleanupsAndGotos.cpp
new file mode 100644 (file)
index 0000000..9bc70c8
--- /dev/null
@@ -0,0 +1,14 @@
+// RUN: %llvmgxx -S %s -o - | llvm-as -f -o /dev/null
+
+// Testcase from Bug 291
+
+struct X {
+  ~X();
+};
+
+void foo() {
+  X v;
+
+TryAgain:
+  goto TryAgain;
+}
diff --git a/test/FrontendC++/2004-06-08-LateTemplateInstantiation.cpp b/test/FrontendC++/2004-06-08-LateTemplateInstantiation.cpp
new file mode 100644 (file)
index 0000000..16d8e5e
--- /dev/null
@@ -0,0 +1,19 @@
+// RUN: %llvmgxx -S %s -o - | llvm-as -f -o /dev/null
+
+
+
+template<typename Ty>
+struct normal_iterator {
+  int FIELD;
+};
+
+void foo(normal_iterator<int>);
+normal_iterator<int> baz();
+
+void bar() {
+  foo(baz());
+}
+
+void *bar2() {
+  return (void*)foo;
+}
diff --git a/test/FrontendC++/2004-09-27-CompilerCrash.cpp b/test/FrontendC++/2004-09-27-CompilerCrash.cpp
new file mode 100644 (file)
index 0000000..f507c23
--- /dev/null
@@ -0,0 +1,13 @@
+// RUN: %llvmgxx -S %s -o - | llvm-as -f -o /dev/null
+
+struct Pass {} ;
+template<typename PassName>
+Pass *callDefaultCtor() { return new PassName(); }
+
+void foo(Pass *(*C)());
+
+#include <string>
+
+bool foo(std::string &X) {
+  return X.empty();
+}
diff --git a/test/FrontendC++/2004-09-27-DidntEmitTemplate.cpp b/test/FrontendC++/2004-09-27-DidntEmitTemplate.cpp
new file mode 100644 (file)
index 0000000..706d541
--- /dev/null
@@ -0,0 +1,23 @@
+// RUN: %llvmgxx -xc++ %s -c -o - | llvm-dis | grep callDefaultCtor | \
+// RUN:   not grep declare
+
+// This is a testcase for LLVM PR445, which was a problem where the 
+// instantiation of callDefaultCtor was not being emitted correctly.
+
+struct Pass {};
+
+template<typename PassName>
+Pass *callDefaultCtor() { return new Pass(); }
+
+void foo(Pass *(*C)());
+
+struct basic_string {
+  bool empty() const { return true; }
+};
+
+
+bool foo2(basic_string &X) {
+  return X.empty();
+}
+void baz() { foo(callDefaultCtor<Pass>); }
+
diff --git a/test/FrontendC++/2004-11-27-EmitsUnusedInlineFunctions.cpp b/test/FrontendC++/2004-11-27-EmitsUnusedInlineFunctions.cpp
new file mode 100644 (file)
index 0000000..794b7d7
--- /dev/null
@@ -0,0 +1,7 @@
+// The C++ front-end was emitting WAY too many inline functions.  This test
+// verifies that it does not emit the body of getchar, because it is not used.
+// This corresponds to PR459
+
+// RUN: %llvmgxx %s -S -o - | not grep {^i32 .getchar}
+
+#include <stdio.h>
diff --git a/test/FrontendC++/2004-11-27-ExceptionCleanupAssertion.cpp b/test/FrontendC++/2004-11-27-ExceptionCleanupAssertion.cpp
new file mode 100644 (file)
index 0000000..f3d225e
--- /dev/null
@@ -0,0 +1,14 @@
+// RUN: %llvmgxx %s -S -o /dev/null
+
+// This is PR421
+
+struct Strongbad {
+    Strongbad(const char *str );
+    ~Strongbad();
+    operator const char *() const;
+};
+
+void TheCheat () {
+  Strongbad foo(0);
+  Strongbad dirs[] = { Strongbad(0) + 1};
+}
diff --git a/test/FrontendC++/2004-11-27-FriendDefaultArgCrash.cpp b/test/FrontendC++/2004-11-27-FriendDefaultArgCrash.cpp
new file mode 100644 (file)
index 0000000..731e726
--- /dev/null
@@ -0,0 +1,9 @@
+// RUN: %llvmgxx %s -o /dev/null -S
+
+// PR447
+
+namespace nm {
+  struct str {
+    friend int foo(int arg = 0);
+  };
+}
diff --git a/test/FrontendC++/2004-11-27-InlineAsmFunctionRedefinition.cpp b/test/FrontendC++/2004-11-27-InlineAsmFunctionRedefinition.cpp
new file mode 100644 (file)
index 0000000..42b223b
--- /dev/null
@@ -0,0 +1,26 @@
+// RUN: %llvmgxx %s -S -o /dev/null
+
+// PR397
+
+struct stat { };
+struct stat64 { };
+
+extern "C" {
+
+extern int lstat(const char *, struct stat *) __asm__("lstat64");
+extern int lstat64(const char *, struct stat64 *);
+
+extern int __lxstat(int, const char *, struct stat *) __asm__("__lxstat64");
+extern int __lxstat64(int, const char *, struct stat64 *);
+
+extern __inline__ int lstat(const char *path, struct stat *statbuf) {
+    return __lxstat(3, path, statbuf);
+}
+extern __inline__ int lstat64(const char *path, struct stat64 *statbuf) {
+    return __lxstat64(3, path, statbuf);
+}
+}
+
+int do_one_file(void) {
+    return lstat(0, 0) + lstat64(0,0);
+}
diff --git a/test/FrontendC++/2005-01-03-StaticInitializers.cpp b/test/FrontendC++/2005-01-03-StaticInitializers.cpp
new file mode 100644 (file)
index 0000000..da1b005
--- /dev/null
@@ -0,0 +1,8 @@
+// RUN: %llvmgxx %s -S -o - | not grep llvm.global_ctor
+
+struct S {
+  int  A[2];
+};
+
+int XX = (int)(long)&(((struct S*)0)->A[1]);
+
diff --git a/test/FrontendC++/2005-02-11-AnonymousUnion.cpp b/test/FrontendC++/2005-02-11-AnonymousUnion.cpp
new file mode 100644 (file)
index 0000000..b0ff7e7
--- /dev/null
@@ -0,0 +1,32 @@
+// RUN: %llvmgxx %s -S -o -
+
+// Test anonymous union with members of the same size.
+int test1(float F) {
+  union {
+     float G;
+     int i;
+  };
+  G = F;
+  return i;
+}
+
+// test anonymous union with members of differing size.
+int test2(short F) {
+  volatile union {
+     short G;
+     int i;
+  };
+  G = F;
+  return i;
+}
+
+// Make sure that normal unions work.  duh :)
+volatile union {
+  short S;
+  int i;
+} U;
+
+int test3(short s) {
+  U.S = s;
+  return U.i;
+}
diff --git a/test/FrontendC++/2005-02-13-BadDynamicInit.cpp b/test/FrontendC++/2005-02-13-BadDynamicInit.cpp
new file mode 100644 (file)
index 0000000..84fa565
--- /dev/null
@@ -0,0 +1,9 @@
+// RUN: %llvmgxx %s -S -o - | not grep llvm.global_ctors
+// This testcase corresponds to PR509
+struct Data {
+  unsigned *data;
+  unsigned array[1];
+};
+
+Data shared_null = { shared_null.array };
+
diff --git a/test/FrontendC++/2005-02-14-BitFieldOffset.cpp b/test/FrontendC++/2005-02-14-BitFieldOffset.cpp
new file mode 100644 (file)
index 0000000..522e20a
--- /dev/null
@@ -0,0 +1,11 @@
+// RUN: %llvmgxx %s -S -o - | not grep {i32 6}
+
+struct QVectorTypedData {
+    int size;
+    unsigned int sharable : 1;
+    unsigned short array[1];
+};
+
+void foo(QVectorTypedData *X) {
+  X->array[0] = 123;
+}
diff --git a/test/FrontendC++/2005-02-19-BitfieldStructCrash.cpp b/test/FrontendC++/2005-02-19-BitfieldStructCrash.cpp
new file mode 100644 (file)
index 0000000..8f571e0
--- /dev/null
@@ -0,0 +1,14 @@
+// RUN: %llvmgxx -S %s -o -
+
+struct QChar {unsigned short X; QChar(unsigned short); } ;
+
+struct Command {
+        Command(QChar c) : c(c) {}
+        unsigned int type : 4;
+        QChar c;
+    };
+
+Command X(QChar('c'));
+
+void Foo(QChar );
+void bar() { Foo(X.c); }
diff --git a/test/FrontendC++/2005-02-19-UnnamedVirtualThunkArgument.cpp b/test/FrontendC++/2005-02-19-UnnamedVirtualThunkArgument.cpp
new file mode 100644 (file)
index 0000000..853fee7
--- /dev/null
@@ -0,0 +1,22 @@
+// RUN: %llvmgxx -S %s -o /dev/null
+
+struct Foo  {
+    Foo();
+    virtual ~Foo();
+};
+
+struct Bar  {
+    Bar();
+    virtual ~Bar();
+    virtual bool test(bool) const;
+};
+
+struct Baz : public Foo, public Bar  {
+    Baz();
+    virtual ~Baz();
+    virtual bool test(bool) const;
+};
+
+bool Baz::test(bool) const  {
+    return true;
+}
diff --git a/test/FrontendC++/2005-02-20-BrokenReferenceTest.cpp b/test/FrontendC++/2005-02-20-BrokenReferenceTest.cpp
new file mode 100644 (file)
index 0000000..31026d3
--- /dev/null
@@ -0,0 +1,11 @@
+// RUN: %llvmgxx %s -S -o /dev/null
+
+void test(unsigned char *b, int rb) {
+  typedef unsigned char imgfoo[10][rb];
+  imgfoo &br = *(imgfoo *)b;
+
+  br[0][0] = 1;
+
+  rb = br[0][0];
+}
+
diff --git a/test/FrontendC++/2005-02-27-PlacementArrayNewCrash.cpp b/test/FrontendC++/2005-02-27-PlacementArrayNewCrash.cpp
new file mode 100644 (file)
index 0000000..a8fc668
--- /dev/null
@@ -0,0 +1,8 @@
+// RUN: %llvmgxx -S %s -o -
+
+#include <new>
+typedef double Ty[4];
+
+void foo(Ty *XX) {
+  new(XX) Ty();
+}
diff --git a/test/FrontendC++/2005-07-21-VirtualBaseAccess.cpp b/test/FrontendC++/2005-07-21-VirtualBaseAccess.cpp
new file mode 100644 (file)
index 0000000..7711cff
--- /dev/null
@@ -0,0 +1,14 @@
+// RUN: %llvmgxx -xc++ %s -c -o - | opt -die | llvm-dis | not grep cast
+
+void foo(int*);
+
+struct FOO {
+  int X;
+};
+
+struct BAR : virtual FOO { BAR(); };
+
+int testfn() {
+  BAR B;
+  foo(&B.X);
+}
diff --git a/test/FrontendC++/2006-03-01-GimplifyCrash.cpp b/test/FrontendC++/2006-03-01-GimplifyCrash.cpp
new file mode 100644 (file)
index 0000000..b0d00fe
--- /dev/null
@@ -0,0 +1,14 @@
+// RUN: %llvmgxx -S %s -o -
+
+struct PrefMapElem {
+  virtual ~PrefMapElem(); 
+  unsigned int fPrefId;
+};
+
+int foo() {
+  PrefMapElem* fMap;
+  if (fMap[0].fPrefId == 1)
+    return 1;
+  
+  return 0;
+}
diff --git a/test/FrontendC++/2006-03-06-C++RecurseCrash.cpp b/test/FrontendC++/2006-03-06-C++RecurseCrash.cpp
new file mode 100644 (file)
index 0000000..2fb3fb7
--- /dev/null
@@ -0,0 +1,24 @@
+// RUN: %llvmgcc %s -S -o -
+namespace std {
+  class exception { };
+
+  class type_info {
+  public:
+    virtual ~type_info();
+  };
+
+}
+
+namespace __cxxabiv1 {
+  class __si_class_type_info : public std::type_info {
+    ~__si_class_type_info();
+  };
+}
+
+class recursive_init: public std::exception {
+public:
+  virtual ~recursive_init() throw ();
+};
+
+recursive_init::~recursive_init() throw() { }
+
diff --git a/test/FrontendC++/2006-09-08-powi.cpp b/test/FrontendC++/2006-09-08-powi.cpp
new file mode 100644 (file)
index 0000000..75cbfda
--- /dev/null
@@ -0,0 +1,7 @@
+// RUN: %llvmgxx -O3 -S -o - %s
+
+#include <cmath>
+
+double foo(double X, int Y) {
+  return std::pow(X, Y);
+}
diff --git a/test/FrontendC++/2006-09-12-OpaqueStructCrash.cpp b/test/FrontendC++/2006-09-12-OpaqueStructCrash.cpp
new file mode 100644 (file)
index 0000000..f3160e8
--- /dev/null
@@ -0,0 +1,28 @@
+// RUN: %llvmgxx -O3 -S -o - %s
+
+struct A {
+   virtual ~A();
+};
+
+template <typename Ty>
+struct B : public A {
+   ~B () { delete [] val; }
+private:
+     Ty* val;
+};
+
+template <typename Ty>
+struct C : public A {
+   C ();
+   ~C ();
+};
+
+template <typename Ty>
+struct D : public A {
+     D () {}
+   private:
+     B<C<Ty> > blocks;
+};
+
+template class D<double>;
+
diff --git a/test/FrontendC++/2006-09-27-Debug-Protection.cpp b/test/FrontendC++/2006-09-27-Debug-Protection.cpp
new file mode 100644 (file)
index 0000000..d9a25aa
--- /dev/null
@@ -0,0 +1,13 @@
+// RUN: %llvmgxx -O0 -emit-llvm -S -g -o - %s | grep {i32 1,}
+// RUN: %llvmgxx -O0 -emit-llvm -S -g -o - %s | grep {i32 2,}
+
+class A {
+public:
+  int x;
+protected:
+  int y;
+private:
+  int z;
+};
+
+A a;
diff --git a/test/FrontendC++/2006-10-30-ClassBitfield.cpp b/test/FrontendC++/2006-10-30-ClassBitfield.cpp
new file mode 100644 (file)
index 0000000..bd3b173
--- /dev/null
@@ -0,0 +1,16 @@
+// RUN: %llvmgxx %s -emit-llvm -S -o -
+// PR954
+
+struct _Refcount_Base   {
+  unsigned long _M_ref_count;
+  int _M_ref_count_lock;
+  _Refcount_Base() : _M_ref_count(0) {}
+};
+
+struct _Rope_RopeRep : public _Refcount_Base 
+{
+public:
+  int _M_tag:8; 
+};
+
+int foo(_Rope_RopeRep* r) { return r->_M_tag; }
diff --git a/test/FrontendC++/2006-11-06-StackTrace.cpp b/test/FrontendC++/2006-11-06-StackTrace.cpp
new file mode 100644 (file)
index 0000000..55b34ad
--- /dev/null
@@ -0,0 +1,36 @@
+// This is a regression test on debug info to make sure that we can get a
+// meaningful stack trace from a C++ program.
+// RUN: %llvmgcc -S -O0 -g %s -o - | llvm-as | llc --disable-fp-elim -o %t.s -f
+// RUN: %compile_c %t.s -o %t.o
+// RUN: %link %t.o -o %t.exe
+// RUN: echo {break DeepStack::deepest\nrun 17\nwhere\n} > %t.in 
+// RUN: gdb -q -batch -n -x %t.in %t.exe | tee %t.out | \
+// RUN:   grep {#0  DeepStack::deepest.*(this=.*,.*x=33)}
+// RUN: gdb -q -batch -n -x %t.in %t.exe | \
+// RUN:   grep {#7  0x.* in main.*(argc=\[12\],.*argv=.*)}
+
+// Only works on ppc, x86 and x86_64.  Should generalize?
+// XFAIL: alpha|ia64|arm
+
+#include <stdlib.h>
+
+class DeepStack {
+  int seedVal;
+public:
+  DeepStack(int seed) : seedVal(seed) {}
+
+  int shallowest( int x ) { return shallower(x + 1); }
+  int shallower ( int x ) { return shallow(x + 2); }
+  int shallow   ( int x ) { return deep(x + 3); }
+  int deep      ( int x ) { return deeper(x + 4); }
+  int deeper    ( int x ) { return deepest(x + 6); }
+  int deepest   ( int x ) { return x + 7; }
+
+  int runit() { return shallowest(seedVal); }
+};
+
+int main ( int argc, char** argv) {
+
+  DeepStack DS9( (argc > 1 ? atoi(argv[1]) : 0) );
+  return DS9.runit();
+}
diff --git a/test/FrontendC++/2006-11-20-GlobalSymbols.cpp b/test/FrontendC++/2006-11-20-GlobalSymbols.cpp
new file mode 100644 (file)
index 0000000..fc896b3
--- /dev/null
@@ -0,0 +1,10 @@
+// PR1013
+// Check to make sure debug symbols use the correct name for globals and
+// functions.  Will not assemble if it fails to.
+// RUN: %llvmgcc -O0 -g -c %s
+
+int foo __asm__("f\001oo");
+
+int bar() {
+  return foo;
+}
diff --git a/test/FrontendC++/2006-11-30-ConstantExprCrash.cpp b/test/FrontendC++/2006-11-30-ConstantExprCrash.cpp
new file mode 100644 (file)
index 0000000..365c8e8
--- /dev/null
@@ -0,0 +1,27 @@
+// RUN: %llvmgxx %s -emit-llvm -S -o -
+// PR1027
+
+struct sys_var {
+  unsigned name_length;
+
+  bool no_support_one_shot;
+  sys_var() {}
+};
+
+
+struct sys_var_thd : public sys_var {
+};
+
+extern sys_var_thd sys_auto_is_null;
+
+sys_var *getsys_variables() {
+  return &sys_auto_is_null;
+}
+
+sys_var *sys_variables = &sys_auto_is_null;
+
+
+
+
+
+
diff --git a/test/FrontendC++/2006-11-30-NoCompileUnit.cpp b/test/FrontendC++/2006-11-30-NoCompileUnit.cpp
new file mode 100644 (file)
index 0000000..c1fa9ae
--- /dev/null
@@ -0,0 +1,58 @@
+// This is a regression test on debug info to make sure we don't hit a compile 
+// unit size issue with gdb.
+// RUN: %llvmgcc -S -O0 -g %s -o - | llvm-as | \
+// RUN:   llc --disable-fp-elim -o NoCompileUnit.s -f
+// RUN: %compile_c NoCompileUnit.s -o NoCompileUnit.o
+// RUN: %compile_cxx NoCompileUnit.o -o NoCompileUnit.exe
+// RUN: echo {break main\nrun\np NoCompileUnit::pubname} > %t2
+// RUN: gdb -q -batch -n -x %t2 NoCompileUnit.exe | \
+// RUN:   tee NoCompileUnit.out | not grep {"low == high"}
+// XFAIL: alpha|ia64|arm
+
+
+class MamaDebugTest {
+private:
+  int N;
+  
+protected:
+  MamaDebugTest(int n) : N(n) {}
+  
+  int getN() const { return N; }
+
+};
+
+class BabyDebugTest : public MamaDebugTest {
+private:
+
+public:
+  BabyDebugTest(int n) : MamaDebugTest(n) {}
+  
+  static int doh;
+  
+  int  doit() {
+    int N = getN();
+    int Table[N];
+    
+    int sum = 0;
+    
+    for (int i = 0; i < N; ++i) {
+      int j = i;
+      Table[i] = j;
+    }
+    for (int i = 0; i < N; ++i) {
+      int j = Table[i];
+      sum += j;
+    }
+    
+    return sum;
+  }
+
+};
+
+int BabyDebugTest::doh;
+
+
+int main(int argc, const char *argv[]) {
+  BabyDebugTest BDT(20);
+  return BDT.doit();
+}
diff --git a/test/FrontendC++/2006-11-30-Pubnames.cpp b/test/FrontendC++/2006-11-30-Pubnames.cpp
new file mode 100644 (file)
index 0000000..c6165a6
--- /dev/null
@@ -0,0 +1,20 @@
+// This is a regression test on debug info to make sure that we can access 
+// qualified global names.
+// RUN: %llvmgcc -S -O0 -g %s -o - | llvm-as | \
+// RUN:   llc --disable-fp-elim -o %t.s -f
+// RUN: %compile_c %t.s -o %t.o
+// RUN: %link %t.o -o %t.exe
+// RUN: echo {break main\nrun\np Pubnames::pubname} > %t.in
+// RUN: gdb -q -batch -n -x %t.in %t.exe | tee %t.out | grep {\$1 = 10}
+// XFAIL: alpha|ia64|arm
+
+struct Pubnames {
+  static int pubname;
+};
+
+int Pubnames::pubname = 10;
+
+int main (int argc, char** argv) {
+  Pubnames p;
+  return 0;
+}
diff --git a/test/FrontendC++/2007-01-02-UnboundedArray.cpp b/test/FrontendC++/2007-01-02-UnboundedArray.cpp
new file mode 100644 (file)
index 0000000..648d19b
--- /dev/null
@@ -0,0 +1,14 @@
+// Make sure unbounded arrays compile with debug information.
+// 
+// RUN: %llvmgcc -O0 -c -g %s
+
+// PR1068
+
+struct Object {
+  char buffer[];
+};
+
+int main(int argc, char** argv) {
+  new Object;
+  return 0;
+}
diff --git a/test/FrontendC++/2007-01-06-ELF-Thunk-Sections.cpp b/test/FrontendC++/2007-01-06-ELF-Thunk-Sections.cpp
new file mode 100644 (file)
index 0000000..654e11b
--- /dev/null
@@ -0,0 +1,49 @@
+// RUN: %llvmgxx %s -emit-llvm -S -o - | not grep gnu.linkonce.
+// PR1085
+
+class 
+__attribute__((visibility("default"))) QGenericArgument
+{
+       public:inline QGenericArgument(const char *aName = 0, const void *aData = 0):_data(aData), _name(aName) {
+       }
+       private:const void *_data;
+       const char     *_name;
+};
+struct __attribute__ ((
+                      visibility("default"))) QMetaObject
+{
+       struct {
+       }
+                       d;
+};
+class 
+__attribute__((visibility("default"))) QObject
+{
+       virtual const QMetaObject *metaObject() const;
+};
+class 
+__attribute__((visibility("default"))) QPaintDevice
+{
+       public:enum PaintDeviceMetric {
+               PdmWidth = 1, PdmHeight, PdmWidthMM, PdmHeightMM, PdmNumColors, PdmDepth, PdmDpiX, PdmDpiY, PdmPhysicalDpiX, PdmPhysicalDpiY
+       };
+       virtual ~ QPaintDevice();
+       union {
+       }
+                       ct;
+};
+class 
+__attribute__((visibility("default"))) QWidget:public QObject, public QPaintDevice
+{
+};
+class 
+__attribute__((visibility("default"))) QDialog:public QWidget
+{
+};
+class           TopicChooser:public QDialog {
+       virtual const QMetaObject *metaObject() const;
+};
+const QMetaObject *TopicChooser::
+metaObject() const
+{
+}
diff --git a/test/FrontendC++/2007-01-06-PtrMethodInit.cpp b/test/FrontendC++/2007-01-06-PtrMethodInit.cpp
new file mode 100644 (file)
index 0000000..f87c8d8
--- /dev/null
@@ -0,0 +1,75 @@
+// RUN: %llvmgxx %s -emit-llvm -S -o -
+// PR1084
+
+extern "C"
+{
+  typedef unsigned char PRUint8;
+  typedef unsigned int PRUint32;
+}
+typedef PRUint32 nsresult;
+struct nsID
+{
+};
+typedef nsID nsIID;
+class nsISupports
+{
+};
+extern "C++"
+{
+  template < class T > struct nsCOMTypeInfo
+  {
+    static const nsIID & GetIID ()
+    {
+    }
+  };
+}
+
+class nsIDOMEvent:public nsISupports
+{
+};
+class nsIDOMEventListener:public nsISupports
+{
+public:static const nsIID & GetIID ()
+  {
+  }
+  virtual nsresult
+    __attribute__ ((regparm (0), cdecl)) HandleEvent (nsIDOMEvent * event) =
+    0;
+};
+class nsIDOMMouseListener:public nsIDOMEventListener
+{
+public:static const nsIID & GetIID ()
+  {
+    static const nsIID iid = {
+    };
+  }
+  virtual nsresult
+    __attribute__ ((regparm (0),
+                   cdecl)) MouseDown (nsIDOMEvent * aMouseEvent) = 0;
+};
+typedef
+typeof (&nsIDOMEventListener::HandleEvent)
+  GenericHandler;
+     struct EventDispatchData
+     {
+       PRUint32 message;
+       GenericHandler method;
+       PRUint8 bits;
+     };
+     struct EventTypeData
+     {
+       const EventDispatchData *events;
+       int numEvents;
+       const nsIID *iid;
+     };
+     static const EventDispatchData sMouseEvents[] = {
+       {
+       (300 + 2),
+       reinterpret_cast < GenericHandler > (&nsIDOMMouseListener::MouseDown),
+       0x01}
+     };
+static const EventTypeData sEventTypes[] = {
+  {
+   sMouseEvents, (sizeof (sMouseEvents) / sizeof (sMouseEvents[0])),
+   &nsCOMTypeInfo < nsIDOMMouseListener >::GetIID ()}
+};
diff --git a/test/FrontendC++/2007-03-27-FunctionVarRename.cpp b/test/FrontendC++/2007-03-27-FunctionVarRename.cpp
new file mode 100644 (file)
index 0000000..538d6df
--- /dev/null
@@ -0,0 +1,17 @@
+// RUN: %llvmgxx %s -emit-llvm -S -o - | not grep eprintf1
+// RUN: %llvmgxx %s -emit-llvm -S -o - | grep eprintf
+
+// Only one eprintf should exist in the output
+
+extern "C" 
+void __eprintf();
+
+void foo() {
+
+  __eprintf();
+}
+
+void *bar() {
+  extern void *__eprintf;
+  return &__eprintf;
+}
diff --git a/test/FrontendC++/2007-04-05-PackedBitFields-1.cpp b/test/FrontendC++/2007-04-05-PackedBitFields-1.cpp
new file mode 100644 (file)
index 0000000..4797baf
--- /dev/null
@@ -0,0 +1,23 @@
+// RUN: %llvmgxx -S %s -o - | llvm-as -f -o /dev/null
+
+#ifdef PACKED
+#define P __attribute__((packed))
+#else
+#define P
+#endif
+
+struct P M_Packed { 
+  unsigned int l_Packed; 
+  unsigned short k_Packed : 6, 
+    i_Packed : 15,
+    j_Packed : 11;
+  
+}; 
+
+struct M_Packed sM_Packed; 
+
+int testM_Packed (void) { 
+  struct M_Packed x; 
+  return (x.i_Packed != 0);
+}
+      
diff --git a/test/FrontendC++/2007-04-05-PackedBitFieldsOverlap-2.cpp b/test/FrontendC++/2007-04-05-PackedBitFieldsOverlap-2.cpp
new file mode 100644 (file)
index 0000000..3ba5d7b
--- /dev/null
@@ -0,0 +1,24 @@
+// RUN: %llvmgxx -S %s -o - | llvm-as -f -o /dev/null
+
+#ifdef PACKED
+#define P __attribute__((packed))
+#else
+#define P
+#endif
+
+struct P M_Packed { 
+  unsigned long sorted : 1;
+  unsigned long from_array : 1;
+  unsigned long mixed_encoding : 1;
+  unsigned long encoding : 8;
+  unsigned long count : 21;
+
+}; 
+
+struct M_Packed sM_Packed; 
+
+int testM_Packed (void) { 
+  struct M_Packed x; 
+  return (x.count != 0);
+}
+      
diff --git a/test/FrontendC++/2007-04-05-PackedBitFieldsOverlap.cpp b/test/FrontendC++/2007-04-05-PackedBitFieldsOverlap.cpp
new file mode 100644 (file)
index 0000000..ad272c9
--- /dev/null
@@ -0,0 +1,24 @@
+// RUN: %llvmgxx -S %s -o - | llvm-as -f -o /dev/null
+
+
+#ifdef PACKED
+#define P __attribute__((packed))
+#else
+#define P
+#endif
+
+struct P M_Packed { 
+  unsigned int l_Packed; 
+  unsigned short k_Packed : 6, 
+    i_Packed : 15;
+  char c;
+  
+}; 
+
+struct M_Packed sM_Packed; 
+
+int testM_Packed (void) { 
+  struct M_Packed x; 
+  return (x.i_Packed != 0);
+}
+      
diff --git a/test/FrontendC++/2007-04-05-PackedBitFieldsSmall.cpp b/test/FrontendC++/2007-04-05-PackedBitFieldsSmall.cpp
new file mode 100644 (file)
index 0000000..e7517dd
--- /dev/null
@@ -0,0 +1,27 @@
+// RUN: %llvmgxx -S %s -o - | llvm-as -f -o /dev/null
+
+
+#ifdef PACKED
+// This is an example where size of Packed struct is smaller then 
+// the size of bit field type.
+#define P __attribute__((packed))
+#else
+#define P
+#endif
+
+struct P M_Packed { 
+  unsigned long long X:50;
+  unsigned Y:2;
+}; 
+
+struct M_Packed sM_Packed; 
+
+int testM_Packed (void) { 
+  struct M_Packed x; 
+  return (0 != x.Y);
+}
+      
+int testM_Packed2 (void) { 
+  struct M_Packed x; 
+  return (0 != x.X);
+}
diff --git a/test/FrontendC++/2007-04-05-StructPackedFieldUnpacked.cpp b/test/FrontendC++/2007-04-05-StructPackedFieldUnpacked.cpp
new file mode 100644 (file)
index 0000000..52e2471
--- /dev/null
@@ -0,0 +1,25 @@
+// RUN: %llvmgxx -S %s -o - | llvm-as -f -o /dev/null
+
+#ifdef PACKED
+#define P __attribute__((packed))
+#else
+#define P
+#endif
+
+struct UnPacked {
+       int X;  
+       int Y;
+};
+
+struct P M_Packed { 
+  unsigned char A;
+  struct UnPacked B;
+}; 
+
+struct M_Packed sM_Packed; 
+
+int testM_Packed (void) { 
+  struct M_Packed x; 
+  return (x.B.Y != 0);
+}
+      
diff --git a/test/FrontendC++/2007-04-10-PackedUnion.cpp b/test/FrontendC++/2007-04-10-PackedUnion.cpp
new file mode 100644 (file)
index 0000000..b4b8894
--- /dev/null
@@ -0,0 +1,41 @@
+// RUN: %llvmgxx -S %s -o /dev/null
+extern "C" {
+
+#pragma pack(push, 2)
+  typedef struct ABC* abc;
+
+  struct ABCS {
+    float red;
+    float green;
+    float blue;
+    float alpha;
+  };
+
+  typedef void (*XYZ)();
+#pragma pack(pop)
+}
+
+
+union ABCU {
+  ABCS color;
+  XYZ bg;
+};
+
+struct AData {
+  ABCU data;
+};
+
+class L {
+ public:
+  L() {}
+  L(const L& other);
+
+ private:
+  AData fdata;
+};
+
+
+L::L(const L& other)
+{
+  fdata = other.fdata;
+}
diff --git a/test/FrontendC++/2007-04-11-InlineStorageClassC++.cpp b/test/FrontendC++/2007-04-11-InlineStorageClassC++.cpp
new file mode 100644 (file)
index 0000000..eabcd57
--- /dev/null
@@ -0,0 +1,44 @@
+// RUN: %llvmgxx %s -S -emit-llvm -O0 -o - | grep define | \
+// RUN:   grep xglobWeak | grep linkonce | count 1
+// RUN: %llvmgxx %s -S -emit-llvm -O0 -o - | grep define | \
+// RUN:   grep xextWeak | grep linkonce | count 1
+// RUN: %llvmgxx %s -S -emit-llvm -O0 -o - | grep define | \
+// RUN:   grep xWeaknoinline | grep weak | count 1
+// RUN: %llvmgxx %s -S -emit-llvm -O0 -o - | grep define | \
+// RUN:   grep xWeakextnoinline | grep weak | count 1
+// RUN: %llvmgxx %s -S -emit-llvm -O0 -o - | grep define | \
+// RUN:   grep xglobnoWeak | grep linkonce | count 1
+// RUN: %llvmgxx %s -S -emit-llvm -O0 -o - | grep define | \
+// RUN:   grep xstatnoWeak | grep internal | count 1
+// RUN: %llvmgxx %s -S -emit-llvm -O0 -o - | grep define | \
+// RUN:   grep xextnoWeak | grep linkonce | count 1
+inline int xglobWeak(int) __attribute__((weak));
+inline int xglobWeak (int i) {
+  return i*2;
+}
+inline int xextWeak(int) __attribute__((weak));
+extern  inline int xextWeak (int i) {
+  return i*4;
+}
+int xWeaknoinline(int) __attribute__((weak));
+int xWeaknoinline(int i) {
+  return i*8;
+}
+int xWeakextnoinline(int) __attribute__((weak));
+extern int xWeakextnoinline(int i) {
+  return i*16;
+}
+inline int xglobnoWeak (int i) {
+  return i*32;
+}
+static inline int xstatnoWeak (int i) {
+  return i*64;
+}
+extern  inline int xextnoWeak (int i) {
+  return i*128;
+}
+int j(int y) {
+  return xglobnoWeak(y)+xstatnoWeak(y)+xextnoWeak(y)+
+        xglobWeak(y)+xextWeak(y)+
+        xWeakextnoinline(y)+xWeaknoinline(y);
+}
diff --git a/test/FrontendC++/2007-04-14-FNoBuiltin.cpp b/test/FrontendC++/2007-04-14-FNoBuiltin.cpp
new file mode 100644 (file)
index 0000000..31e4528
--- /dev/null
@@ -0,0 +1,7 @@
+// RUN: %llvmgcc -S %s -O2 -fno-builtin -o - | grep call.*printf
+// Check that -fno-builtin is honored.
+
+extern "C" int printf(const char*, ...);
+void foo(const char *msg) {
+       printf("%s\n",msg);
+}
diff --git a/test/FrontendC++/2007-04-31-TryCatch.cpp b/test/FrontendC++/2007-04-31-TryCatch.cpp
new file mode 100644 (file)
index 0000000..8b8254d
--- /dev/null
@@ -0,0 +1,12 @@
+// RUN: %llvmgxx -S %s -o /dev/null
+
+#include <locale>
+
+namespace std 
+{
+  codecvt<char, char, mbstate_t>::
+  codecvt(size_t __refs)
+  : __codecvt_abstract_base<char, char, mbstate_t>(__refs),
+  _M_c_locale_codecvt(_S_get_c_locale())
+  { }
+}
diff --git a/test/FrontendC++/2007-05-03-VectorInit.cpp b/test/FrontendC++/2007-05-03-VectorInit.cpp
new file mode 100644 (file)
index 0000000..b87f4d4
--- /dev/null
@@ -0,0 +1,17 @@
+// RUN: %llvmgxx %s -S -emit-llvm -O0 -o - 
+// PR1378
+
+typedef float v4sf __attribute__((vector_size(16)));
+
+typedef v4sf float4;
+
+static float4 splat4(float a) 
+{
+  float4 tmp = {a,a,a,a};
+  return tmp;
+}
+
+float4 foo(float a)
+{
+  return splat4(a);
+}
diff --git a/test/FrontendC++/2007-05-16-ReverseBitFieldCrash.cpp b/test/FrontendC++/2007-05-16-ReverseBitFieldCrash.cpp
new file mode 100644 (file)
index 0000000..8392c0b
--- /dev/null
@@ -0,0 +1,24 @@
+// RUN: %llvmgxx %s -emit-llvm -S -o -
+
+#pragma reverse_bitfields on
+typedef unsigned long UINT32;
+
+extern void abort(void);
+
+typedef struct TestStruct
+{
+  long first: 15,
+    second: 17;        
+} TestStruct;
+
+int main (int argc, char * const argv[]) {
+
+  TestStruct testStruct = {1, 0};
+  
+  UINT32 dw = *(UINT32 *)(&testStruct);
+  
+  if(!(dw & 0xFFFF))
+    abort ();
+
+  return 0;
+}
diff --git a/test/FrontendC++/2007-05-23-TryFinally.cpp b/test/FrontendC++/2007-05-23-TryFinally.cpp
new file mode 100644 (file)
index 0000000..38f0b02
--- /dev/null
@@ -0,0 +1,16 @@
+// RUN: %llvmgxx %s -S -emit-llvm -O2 -o - | ignore grep _Unwind_Resume | \
+// RUN:   wc -l | grep {\[23\]}
+
+struct One { };
+struct Two { };
+
+void handle_unexpected () {
+  try
+  {
+    throw;
+  }
+  catch (One &)
+  {
+    throw Two ();
+  }
+}
diff --git a/test/FrontendC++/2007-07-04-NestedCatches.cpp b/test/FrontendC++/2007-07-04-NestedCatches.cpp
new file mode 100644 (file)
index 0000000..b10a5db
--- /dev/null
@@ -0,0 +1,32 @@
+// RUN: %llvmgxx %s -S -O2 -o - | \
+// RUN:   ignore grep {eh\.selector.*One.*Two.*Three.*Four.*Five.*Six.*null} | \
+// RUN:     wc -l | grep {\[01\]}
+
+extern void X(void);
+
+struct One   {};
+struct Two   {};
+struct Three {};
+struct Four  {};
+struct Five  {};
+struct Six   {};
+
+static void A(void) throw ()
+{
+  X();
+}
+
+static void B(void) throw (Two)
+{
+  try { A(); } catch (One) {}
+}
+
+static void C(void) throw (Six, Five)
+{
+  try { B(); } catch (Three) {} catch (Four) {}
+}
+
+int main ()
+{
+  try { C(); } catch (...) {}
+}
diff --git a/test/FrontendC++/2007-07-29-RestrictPtrArg.cpp b/test/FrontendC++/2007-07-29-RestrictPtrArg.cpp
new file mode 100644 (file)
index 0000000..d54dfbe
--- /dev/null
@@ -0,0 +1,6 @@
+// RUN: %llvmgxx -c -emit-llvm %s -o - | llvm-dis | grep noalias
+
+void foo(int * __restrict myptr1, int * myptr2) {
+  myptr1[0] = 0;
+  myptr2[0] = 0;
+}
diff --git a/test/FrontendC++/2007-07-29-RestrictRefArg.cpp b/test/FrontendC++/2007-07-29-RestrictRefArg.cpp
new file mode 100644 (file)
index 0000000..0c28e4d
--- /dev/null
@@ -0,0 +1,6 @@
+// RUN: %llvmgxx -c -emit-llvm %s -o - | llvm-dis | grep noalias
+
+void foo(int & __restrict myptr1, int & myptr2) {
+  myptr1 = 0;
+  myptr2 = 0;
+}
diff --git a/test/FrontendC++/2007-08-01-RestrictMethod.cpp b/test/FrontendC++/2007-08-01-RestrictMethod.cpp
new file mode 100644 (file)
index 0000000..b4922be
--- /dev/null
@@ -0,0 +1,13 @@
+// RUN: %llvmgxx -c -emit-llvm %s -o - | llvm-dis | grep noalias
+
+
+class foo {
+  int member[4];
+  
+  void bar(int * a);
+  
+};
+
+void foo::bar(int * a) __restrict {
+  member[3] = *a;
+}
diff --git a/test/FrontendC++/2007-09-10-RecursiveTypeResolution.cpp b/test/FrontendC++/2007-09-10-RecursiveTypeResolution.cpp
new file mode 100644 (file)
index 0000000..f813944
--- /dev/null
@@ -0,0 +1,88 @@
+// RUN: %llvmgxx -c -emit-llvm %s -o -
+// PR1634
+
+namespace Manta
+{
+  class CallbackHandle
+  {
+  protected:virtual ~ CallbackHandle (void)
+    {
+    }
+  };
+template < typename Data1 > class CallbackBase_1Data:public CallbackHandle
+  {
+  };
+}
+
+namespace __gnu_cxx
+{
+  template < typename _Iterator, typename _Container >
+  class __normal_iterator
+  {
+    _Iterator _M_current;
+  };
+}
+
+namespace std
+{
+  template < typename _Tp > struct allocator
+  {
+    typedef _Tp *pointer;
+  };
+  template < typename _InputIterator,
+    typename _Tp > inline void find (_InputIterator __last,
+                                              const _Tp & __val)
+  {
+  };
+}
+
+namespace Manta
+{
+  template < typename _Tp, typename _Alloc> struct _Vector_base
+  {
+    struct _Vector_impl
+    {
+      _Tp *_M_start;
+    };
+  public:
+    _Vector_impl _M_impl;
+  };
+  template < typename _Tp, typename _Alloc = std::allocator < _Tp > >
+  class vector:protected _Vector_base < _Tp,_Alloc >
+  {
+  public:
+    typedef __gnu_cxx::__normal_iterator < typename _Alloc::pointer,
+      vector < _Tp, _Alloc > > iterator;
+    iterator end ()
+    {
+    }
+  };
+  class MantaInterface
+  {
+  };
+  class RTRT
+  {
+    virtual CallbackHandle *registerTerminationCallback (CallbackBase_1Data <
+                                                        MantaInterface * >*);
+    virtual void unregisterCallback (CallbackHandle *);
+    typedef vector < CallbackBase_1Data < int >*>PRCallbackMapType;
+    PRCallbackMapType parallelPreRenderCallbacks;
+  };
+}
+using namespace Manta;
+CallbackHandle *
+RTRT::registerTerminationCallback (CallbackBase_1Data < MantaInterface * >*cb)
+{
+  return cb;
+}
+
+void
+RTRT::unregisterCallback (CallbackHandle * callback)
+{
+  {
+    typedef CallbackBase_1Data < int > callback_t;
+    callback_t *cb = static_cast < callback_t * >(callback);
+    find (parallelPreRenderCallbacks.end (), cb);
+  }
+}
+
diff --git a/test/FrontendC++/2007-10-01-StructResize.cpp b/test/FrontendC++/2007-10-01-StructResize.cpp
new file mode 100644 (file)
index 0000000..d37057a
--- /dev/null
@@ -0,0 +1,14 @@
+// RUN: %llvmgxx -c %s -o /dev/null
+
+#pragma pack(4)
+
+struct Bork {
+  unsigned int f1 : 3;
+  unsigned int f2 : 30;
+};
+
+int Foo(Bork *hdr) {
+  hdr->f1 = 7;
+  hdr->f2 = 927;
+}
+
diff --git a/test/FrontendC++/2008-01-11-BadWarning.cpp b/test/FrontendC++/2008-01-11-BadWarning.cpp
new file mode 100644 (file)
index 0000000..43f6a71
--- /dev/null
@@ -0,0 +1,6 @@
+// RUN: %llvmgcc -xc++ %s -S -o /dev/null |& not grep warning
+// rdar://5683899
+void** f(void **Buckets, unsigned NumBuckets) {
+  return Buckets + NumBuckets;
+}
+
diff --git a/test/FrontendC++/2008-01-12-VecInit.cpp b/test/FrontendC++/2008-01-12-VecInit.cpp
new file mode 100644 (file)
index 0000000..e21bbb9
--- /dev/null
@@ -0,0 +1,6 @@
+// RUN: %llvmgcc -xc++ %s -S -o -
+// rdar://5685492
+
+typedef int __attribute__((vector_size(16))) v;
+v vt = {1, 2, 3, 4};
+
diff --git a/test/FrontendC++/2008-02-13-sret.cpp b/test/FrontendC++/2008-02-13-sret.cpp
new file mode 100644 (file)
index 0000000..15bfa2d
--- /dev/null
@@ -0,0 +1,41 @@
+// RUN: %llvmgxx -S -O1 -m32 -emit-llvm %s -o - | grep {store i32} | count 1
+
+// Test that all 8 bytes of ret in check242 are copied, and only 4 bytes of
+// ret in check93 are copied (the same LLVM struct is used for both).
+
+typedef __builtin_va_list va_list;
+typedef unsigned long size_t;
+void *memset(void *, int, size_t);
+
+struct S93 { __attribute__((aligned (8))) void * a; } ;
+ extern struct S93 s93;
+ struct S93 check93 () { 
+  struct S93 ret;
+ memset (&ret, 0, sizeof (ret));
+ ret.a = s93.a; 
+ return ret; }
+
+struct S242 { char * a;int b[1]; } ;
+ extern struct S242 s242;
+
+ struct S242 check242 () {
+ struct S242 ret;
+ memset (&ret, 0, sizeof (ret));
+ ret.a = s242.a;
+ ret.b[0] = s242.b[0];
+ return ret; }
+
+void check93va (int z, ...) { 
+ struct S93 arg;
+ va_list ap;
+ __builtin_va_start(ap,z);
+ arg = __builtin_va_arg(ap,struct S93);
+  __builtin_va_end(ap); }
+
+void check242va (int z, ...) { 
+struct S242 arg;
+va_list ap;
+__builtin_va_start(ap,z);
+ arg = __builtin_va_arg(ap,struct S242);
+ __builtin_va_end(ap); }
+
diff --git a/test/FrontendC++/2008-05-07-CrazyOffsetOf.cpp b/test/FrontendC++/2008-05-07-CrazyOffsetOf.cpp
new file mode 100644 (file)
index 0000000..f183197
--- /dev/null
@@ -0,0 +1,8 @@
+// RUN: %llvmgxx -S %s -o -
+// rdar://5914926
+
+struct bork {
+  struct bork *next_local;
+  char * query;
+};
+int offset =  (char *) &(((struct bork *) 0x10)->query) - (char *) 0x10;
diff --git a/test/FrontendC++/dg.exp b/test/FrontendC++/dg.exp
new file mode 100644 (file)
index 0000000..fc852e3
--- /dev/null
@@ -0,0 +1,5 @@
+load_lib llvm.exp
+
+if [ llvm_gcc_supports c++ ] then {
+  RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp}]]
+}
diff --git a/test/FrontendC++/ptr-to-method-devirt.cpp b/test/FrontendC++/ptr-to-method-devirt.cpp
new file mode 100644 (file)
index 0000000..358b801
--- /dev/null
@@ -0,0 +1,14 @@
+// PR1602
+// RUN: %llvmgxx -c -emit-llvm %s -o - -O3 | llvm-dis | not grep ptrtoint
+// RUN: %llvmgxx -c -emit-llvm %s -o - -O3 | llvm-dis | grep getelementptr | count 1
+
+
+struct S { virtual void f(); };
+
+typedef void (S::*P)(void);
+
+const P p = &S::f; 
+
+void g(S s) {
+   (s.*p)();
+ }
diff --git a/test/FrontendC/2002-01-23-LoadQISIReloadFailure.c b/test/FrontendC/2002-01-23-LoadQISIReloadFailure.c
new file mode 100644 (file)
index 0000000..258d3cc
--- /dev/null
@@ -0,0 +1,11 @@
+// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
+
+/* Regression test.  Just compile .c -> .ll to test */
+int foo(void) {
+  unsigned char *pp;
+  unsigned w_cnt;
+
+  w_cnt += *pp;
+  
+  return w_cnt;
+}
diff --git a/test/FrontendC/2002-01-24-ComplexSpaceInType.c b/test/FrontendC/2002-01-24-ComplexSpaceInType.c
new file mode 100644 (file)
index 0000000..9559d5b
--- /dev/null
@@ -0,0 +1,11 @@
+// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
+
+// This caused generation of the following type name:
+//   %Array = uninitialized global [10 x %complex int]
+//
+// which caused problems because of the space int the complex int type
+//
+
+struct { int X, Y; } Array[10];
+
+void foo() {}
diff --git a/test/FrontendC/2002-01-24-HandleCallInsnSEGV.c b/test/FrontendC/2002-01-24-HandleCallInsnSEGV.c
new file mode 100644 (file)
index 0000000..09029fb
--- /dev/null
@@ -0,0 +1,9 @@
+// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
+
+void *dlclose(void*);
+
+void ap_os_dso_unload(void *handle)
+{
+    dlclose(handle);
+    return;     /* This return triggers the bug: Weird */
+}
diff --git a/test/FrontendC/2002-02-13-ConditionalInCall.c b/test/FrontendC/2002-02-13-ConditionalInCall.c
new file mode 100644 (file)
index 0000000..0dad6ff
--- /dev/null
@@ -0,0 +1,11 @@
+// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
+
+/* Test problem where bad code was generated with a ?: statement was 
+   in a function call argument */
+
+void foo(int, double, float);
+
+void bar(int x) {
+  foo(x, x ? 1.0 : 12.5, 1.0f);
+}
+
diff --git a/test/FrontendC/2002-02-13-ReloadProblem.c b/test/FrontendC/2002-02-13-ReloadProblem.c
new file mode 100644 (file)
index 0000000..ab9b56d
--- /dev/null
@@ -0,0 +1,18 @@
+// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
+
+/* This triggered a problem in reload, fixed by disabling most of the 
+ * steps of compilation in GCC.  Before this change, the code went through
+ * the entire backend of GCC, even though it was unnecessary for LLVM output
+ * now it is skipped entirely, and since reload doesn't run, it can't cause
+ * a problem.
+ */
+
+extern int tolower(int);
+
+const char *rangematch(const char *pattern, int test, int c) {
+
+  if ((c <= test) | (tolower(c) <= tolower((unsigned char)test)))
+    return 0;
+
+  return pattern;
+}
diff --git a/test/FrontendC/2002-02-13-TypeVarNameCollision.c b/test/FrontendC/2002-02-13-TypeVarNameCollision.c
new file mode 100644 (file)
index 0000000..ec33401
--- /dev/null
@@ -0,0 +1,16 @@
+// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
+
+/* This testcase causes a symbol table collision.  Type names and variable
+ * names should be in distinct namespaces
+ */
+
+typedef struct foo {
+  int X, Y;
+} FOO;
+
+static FOO foo[100];
+
+int test() {
+  return foo[4].Y;
+}
+
diff --git a/test/FrontendC/2002-02-13-UnnamedLocal.c b/test/FrontendC/2002-02-13-UnnamedLocal.c
new file mode 100644 (file)
index 0000000..6fdc7ef
--- /dev/null
@@ -0,0 +1,21 @@
+// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
+
+/* Testcase for a problem where GCC allocated xqic to a register,
+ * and did not have a VAR_DECL that explained the stack slot to LLVM.
+ * Now the LLVM code synthesizes a stack slot if one is presented that
+ * has not been previously recognized.  This is where alloca's named 
+ * 'local' come from now. 
+ */
+
+typedef struct {
+  short x;
+} foostruct;
+
+int foo(foostruct ic);
+
+void test() {
+  foostruct xqic;
+  foo(xqic);
+}
+
+
diff --git a/test/FrontendC/2002-02-14-EntryNodePreds.c b/test/FrontendC/2002-02-14-EntryNodePreds.c
new file mode 100644 (file)
index 0000000..f1e0151
--- /dev/null
@@ -0,0 +1,37 @@
+// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
+
+/* GCC Used to generate code that contained a branch to the entry node of 
+ * the do_merge function.  This is illegal LLVM code.  To fix this, GCC now
+ * inserts an entry node regardless of whether or not it has to insert allocas.
+ */
+
+struct edge_rec
+{
+  struct VERTEX *v;
+  struct edge_rec *next;
+  int wasseen;
+  int more_data;
+};
+
+typedef struct edge_rec *QUAD_EDGE;
+
+typedef struct {
+  QUAD_EDGE left, right;
+} EDGE_PAIR;
+
+struct EDGE_STACK {
+    int ptr;
+    QUAD_EDGE *elts;
+    int stack_size;
+};
+
+int do_merge(QUAD_EDGE ldo, QUAD_EDGE rdo) {
+  int lvalid;
+  QUAD_EDGE basel,rcand;
+  while (1) {
+    if (!lvalid) {
+      return (int)basel->next;
+    }
+  }
+}
+
diff --git a/test/FrontendC/2002-02-16-RenamingTest.c b/test/FrontendC/2002-02-16-RenamingTest.c
new file mode 100644 (file)
index 0000000..952af90
--- /dev/null
@@ -0,0 +1,18 @@
+// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
+
+/* test that locals are renamed with . notation */
+
+void abc(void *);
+
+void Test5(double X) {
+  abc(&X);
+  {
+    int X;
+    abc(&X);
+    {
+      float X;
+      abc(&X);
+    }
+  }
+}
+
diff --git a/test/FrontendC/2002-02-17-ArgumentAddress.c b/test/FrontendC/2002-02-17-ArgumentAddress.c
new file mode 100644 (file)
index 0000000..9379295
--- /dev/null
@@ -0,0 +1,39 @@
+// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
+
+int test(int X) {
+  return X;
+}
+
+void abc(int *X);
+int def(int Y, int Z) {
+  abc(&Z);
+  return Y;
+}
+
+struct Test { short X, x; int Y, Z; };
+
+int Testing(struct Test *A) {
+  return A->X+A->Y;
+}
+
+int Test2(int X, struct Test A, int Y) {
+  return X+Y+A.X+A.Y;
+}
+int Test3(struct Test A, struct Test B) {
+  return A.X+A.Y+B.Y+B.Z;
+}
+
+struct Test Test4(struct Test A) {
+  return A;
+}
+
+int Test6() {
+  int B[200];
+  return B[4];
+}
+
+struct STest2 { int X; short Y[4]; double Z; };
+
+struct STest2 Test7(struct STest2 X) {
+  return X;
+}
diff --git a/test/FrontendC/2002-02-18-64bitConstant.c b/test/FrontendC/2002-02-18-64bitConstant.c
new file mode 100644 (file)
index 0000000..6fd3e29
--- /dev/null
@@ -0,0 +1,8 @@
+// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
+
+/* GCC wasn't handling 64 bit constants right fixed */
+
+void main() {
+  long long Var = 123455678902ll;
+  printf("%lld\n", Var);
+}
diff --git a/test/FrontendC/2002-02-18-StaticData.c b/test/FrontendC/2002-02-18-StaticData.c
new file mode 100644 (file)
index 0000000..10439c3
--- /dev/null
@@ -0,0 +1,13 @@
+// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
+
+
+double FOO = 17;
+double BAR = 12.0;
+float XX = 12.0f;
+
+static char *procnames[] = {
+  "EXIT"
+};
+
+void *Data[] = { &FOO, &BAR, &XX };
+
diff --git a/test/FrontendC/2002-03-11-LargeCharInString.c b/test/FrontendC/2002-03-11-LargeCharInString.c
new file mode 100644 (file)
index 0000000..d8a1671
--- /dev/null
@@ -0,0 +1,10 @@
+// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
+
+#include <string.h>
+
+int test(char *X) {
+  /* LLVM-GCC used to emit:
+     %.LC0 = internal global [3 x sbyte] c"\1F\FFFFFF8B\00"
+   */
+  return strcmp(X, "\037\213");
+}
diff --git a/test/FrontendC/2002-03-12-ArrayInitialization.c b/test/FrontendC/2002-03-12-ArrayInitialization.c
new file mode 100644 (file)
index 0000000..d6cf446
--- /dev/null
@@ -0,0 +1,19 @@
+// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
+
+/* GCC would generate bad code if not enough initializers are 
+   specified for an array.
+ */
+
+int a[10] = { 0, 2};
+
+char str[10] = "x";
+
+void *Arr[5] = { 0, 0 };
+
+float F[12] = { 1.23f, 34.7f };
+
+struct Test { int X; double Y; };
+
+struct Test Array[10] = { { 2, 12.0 }, { 3, 24.0 } };
+
+int B[4][4] = { { 1, 2, 3, 4}, { 5, 6, 7 }, { 8, 9 } };
diff --git a/test/FrontendC/2002-03-12-StructInitialize.c b/test/FrontendC/2002-03-12-StructInitialize.c
new file mode 100644 (file)
index 0000000..5174ad4
--- /dev/null
@@ -0,0 +1,14 @@
+// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
+
+
+typedef struct Connection_Type {
+   long    to;
+   char    type[10];
+   long    length;
+} Connection;
+
+Connection link[3]
+= { {1, "link1", 10},
+    {2, "link2", 20},
+    {3, "link3", 30} };
+
diff --git a/test/FrontendC/2002-03-12-StructInitializer.c b/test/FrontendC/2002-03-12-StructInitializer.c
new file mode 100644 (file)
index 0000000..cf2ba4e
--- /dev/null
@@ -0,0 +1,18 @@
+// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
+
+/* GCC was not emitting string constants of the correct length when
+ * embedded into a structure field like this.  It thought the strlength
+ * was -1.
+ */
+
+typedef struct Connection_Type {
+   long    to;
+   char    type[10];
+   long    length;
+} Connection;
+
+Connection link[3]
+= { {1, "link1", 10},
+    {2, "link2", 20},
+    {3, "link3", 30} };
+
diff --git a/test/FrontendC/2002-03-14-BrokenPHINode.c b/test/FrontendC/2002-03-14-BrokenPHINode.c
new file mode 100644 (file)
index 0000000..16d9bc7
--- /dev/null
@@ -0,0 +1,19 @@
+// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
+
+/* GCC was generating PHI nodes with an arity < #pred of the basic block the
+ * PHI node lived in.  This was breaking LLVM because the number of entries
+ * in a PHI node must equal the number of predecessors for a basic block.
+ */
+
+int trys(char *s, int x)
+{
+  int asa;
+  double Val;
+  int LLS;
+  if (x) {
+    asa = LLS + asa;
+  } else {
+  }
+  return asa+(int)Val;
+}
+
diff --git a/test/FrontendC/2002-03-14-BrokenSSA.c b/test/FrontendC/2002-03-14-BrokenSSA.c
new file mode 100644 (file)
index 0000000..01f2597
--- /dev/null
@@ -0,0 +1,17 @@
+// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
+
+/* This code used to break GCC's SSA computation code.  It would create
+   uses of B & C that are not dominated by their definitions.  See:
+   http://gcc.gnu.org/ml/gcc/2002-03/msg00697.html
+ */
+int bar();
+int foo()
+{
+  int a,b,c;
+
+  a = b + c;
+  b = bar();
+  c = bar();
+  return a + b + c;
+}
+
diff --git a/test/FrontendC/2002-03-14-QuotesInStrConst.c b/test/FrontendC/2002-03-14-QuotesInStrConst.c
new file mode 100644 (file)
index 0000000..42f82bf
--- /dev/null
@@ -0,0 +1,10 @@
+// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
+
+/* GCC was not escaping quotes in string constants correctly, so this would
+ * get emitted:
+ *  %.LC1 = internal global [32 x sbyte] c"*** Word "%s" on line %d is not\00"
+ */
+
+const char *Foo() {
+  return "*** Word \"%s\" on line %d is not";
+}
diff --git a/test/FrontendC/2002-04-07-SwitchStmt.c b/test/FrontendC/2002-04-07-SwitchStmt.c
new file mode 100644 (file)
index 0000000..79632c9
--- /dev/null
@@ -0,0 +1,22 @@
+// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
+
+int printf(const char *, ...);
+int foo();
+
+int main() {
+  while (foo()) {
+     switch (foo()) {
+     case 0:
+     case 1:
+     case 2:
+     case 3:
+       printf("3");
+     case 4: printf("4");
+     case 5:
+     case 6:
+     default:
+       break;
+     }
+   }
+   return 0;
+}
diff --git a/test/FrontendC/2002-04-08-LocalArray.c b/test/FrontendC/2002-04-08-LocalArray.c
new file mode 100644 (file)
index 0000000..af6ebd6
--- /dev/null
@@ -0,0 +1,14 @@
+// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
+
+/* GCC is not outputting the static array to the LLVM backend, so bad things
+ * happen.  Note that if this is defined static, everything seems fine.
+ */
+void test(unsigned X) {
+  double student_t[30]={0.0 , 12.706 , 4.303 , 3.182 , 2.776 , 2.571 ,
+                               2.447 , 2.365 , 2.306 , 2.262 , 2.228 ,
+                               2.201 , 2.179 , 2.160 , 2.145 , 2.131 ,
+                               2.120 , 2.110 , 2.101 , 2.093 , 2.086 ,
+                               2.080 , 2.074 , 2.069 , 2.064 , 2.060 ,
+                               2.056 , 2.052 , 2.048 , 2.045 };
+  return student_t[X];
+}
diff --git a/test/FrontendC/2002-04-09-StructRetVal.c b/test/FrontendC/2002-04-09-StructRetVal.c
new file mode 100644 (file)
index 0000000..c655e4a
--- /dev/null
@@ -0,0 +1,12 @@
+// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
+
+struct S {
+  int i;
+  short s1, s2;
+};
+
+struct S func_returning_struct(void);
+
+void loop(void) {
+  func_returning_struct();
+}
diff --git a/test/FrontendC/2002-04-10-StructParameters.c b/test/FrontendC/2002-04-10-StructParameters.c
new file mode 100644 (file)
index 0000000..9db6a13
--- /dev/null
@@ -0,0 +1,25 @@
+// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
+
+
+typedef struct {
+  char p;
+  short q;
+  char r;
+  int X;
+  short Y, Z;
+  int Q;
+} foo;
+
+int test(foo X, float);
+int testE(char,short,char,int,int,float);
+void test3(foo *X) {
+  X->q = 1;
+}
+
+void test2(foo Y) {
+  testE(Y.p, Y.q, Y.r, Y.X, Y.Y, 0.1f);
+  test(Y, 0.1f);
+  test2(Y);
+  test3(&Y);
+}
+
diff --git a/test/FrontendC/2002-05-23-StaticValues.c b/test/FrontendC/2002-05-23-StaticValues.c
new file mode 100644 (file)
index 0000000..bf583e2
--- /dev/null
@@ -0,0 +1,15 @@
+// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
+
+/* Make sure the frontend is correctly marking static stuff as internal! */
+
+int X;
+static int Y = 12;
+
+static void foo(int Z) {
+  Y = Z;
+}
+
+void *test() {
+  foo(12);
+  return &Y;
+}
diff --git a/test/FrontendC/2002-05-23-TypeNameCollision.c b/test/FrontendC/2002-05-23-TypeNameCollision.c
new file mode 100644 (file)
index 0000000..43faf97
--- /dev/null
@@ -0,0 +1,19 @@
+// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
+
+/* Testcase for when struct tag conflicts with typedef name... grr */
+
+typedef struct foo {
+  struct foo *X;
+  int Y;
+} * foo;
+
+foo F1;
+struct foo *F2;
+
+enum bar { test1, test2 };
+
+typedef float bar;
+
+enum bar B1;
+bar B2;
+
diff --git a/test/FrontendC/2002-05-24-Alloca.c b/test/FrontendC/2002-05-24-Alloca.c
new file mode 100644 (file)
index 0000000..ac5b78d
--- /dev/null
@@ -0,0 +1,11 @@
+// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
+
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+int main(int argc, char **argv) {
+  char *C = (char*)alloca(argc);
+  strcpy(C, argv[0]);
+  puts(C);
+}
diff --git a/test/FrontendC/2002-06-25-FWriteInterfaceFailure.c b/test/FrontendC/2002-06-25-FWriteInterfaceFailure.c
new file mode 100644 (file)
index 0000000..fb1b54b
--- /dev/null
@@ -0,0 +1,7 @@
+// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
+
+#include <stdio.h>
+
+void  test() {
+  fprintf(stderr, "testing\n");
+}
diff --git a/test/FrontendC/2002-07-14-MiscListTests.c b/test/FrontendC/2002-07-14-MiscListTests.c
new file mode 100644 (file)
index 0000000..baae585
--- /dev/null
@@ -0,0 +1,71 @@
+// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
+
+// Test list stuff
+
+void *malloc(unsigned);
+
+// Test opaque structure support.  the list type is defined later
+struct list;
+
+struct list *PassThroughList(struct list *L) {
+  return L;
+}
+
+
+// Recursive data structure tests...
+
+typedef struct list {
+  int Data;
+  struct list *Next;
+} list;
+
+list *Data;
+
+void foo() {
+  static int Foo = 0;            // Test static local variable
+  Foo += 1;                      // Increment static variable
+
+  Data = (list*)malloc(12);      // This is not a proper list allocation
+}
+
+extern list ListNode1;
+list ListNode3 = { 4, 0          };
+list ListNode2 = { 3, &ListNode3 };
+list ListNode0 = { 1, &ListNode1 };
+list ListNode1 = { 2, &ListNode2 };
+
+
+list ListArray[10];
+
+// Iterative insert fn
+void InsertIntoListTail(list **L, int Data) {
+  while (*L)
+    L = &(*L)->Next;
+  *L = (list*)malloc(sizeof(list));
+  (*L)->Data = Data;
+  (*L)->Next = 0;
+}
+
+// Recursive list search fn
+list *FindData(list *L, int Data) {
+  if (L == 0) return 0;
+  if (L->Data == Data) return L;
+  return FindData(L->Next, Data);
+}
+
+void foundIt(void);
+
+// Driver fn...
+void DoListStuff() {
+  list *MyList = 0;
+  InsertIntoListTail(&MyList, 100);
+  InsertIntoListTail(&MyList, 12);
+  InsertIntoListTail(&MyList, 42);
+  InsertIntoListTail(&MyList, 1123);
+  InsertIntoListTail(&MyList, 1213);
+
+  if (FindData(MyList, 75)) foundIt();
+  if (FindData(MyList, 42)) foundIt();
+  if (FindData(MyList, 700)) foundIt();
+}
+
diff --git a/test/FrontendC/2002-07-14-MiscTests.c b/test/FrontendC/2002-07-14-MiscTests.c
new file mode 100644 (file)
index 0000000..e78dbd7
--- /dev/null
@@ -0,0 +1,57 @@
+// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
+
+/* These are random tests that I used when working on the GCC frontend 
+   originally. */
+
+// test floating point comparison!
+int floatcomptest(double *X, double *Y, float *x, float *y) {
+  return *X < *Y || *x < *y;
+}
+
+extern void *malloc(unsigned);
+
+// Exposed a bug
+void *memset_impl(void *dstpp, int c, unsigned len) {
+  long long int dstp = (long long int) dstpp;
+
+  while (dstp % 4 != 0)
+    {
+      ((unsigned char *) dstp)[0] = c;
+      dstp += 1;
+      len -= 1;
+    }
+  return dstpp;
+}
+
+// TEST problem with signed/unsigned versions of the same constants being shared
+// incorrectly!
+//
+static char *temp;
+static int remaining;
+static char *localmalloc(int size) {
+  char *blah;
+  
+  if (size>remaining) 
+    {
+      temp = (char *) malloc(32768);
+      remaining = 32768;
+      return temp;
+    }
+  return 0;
+}
+
+typedef struct { double X; double Y; int Z; } PBVTest;
+
+PBVTest testRetStruct(float X, double Y, int Z) {
+  PBVTest T = { X, Y, Z };
+  return T;
+}
+PBVTest testRetStruct2(void);  // external func no inlining
+
+
+double CallRetStruct(float X, double Y, int Z) {
+  PBVTest T = testRetStruct2();
+  return T.X+X+Y+Z;
+}
+
+
diff --git a/test/FrontendC/2002-07-14-MiscTests2.c b/test/FrontendC/2002-07-14-MiscTests2.c
new file mode 100644 (file)
index 0000000..ac58926
--- /dev/null
@@ -0,0 +1,13 @@
+// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
+
+
+// Test ?: in function calls
+extern fp(int, char*);
+char *Ext;
+void
+__bb_exit_func (void)
+{
+  fp (12, Ext ? Ext : "<none>");
+}
+
+
diff --git a/test/FrontendC/2002-07-14-MiscTests3.c b/test/FrontendC/2002-07-14-MiscTests3.c
new file mode 100644 (file)
index 0000000..9a262d5
--- /dev/null
@@ -0,0 +1,187 @@
+// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
+
+
+
+void *malloc(unsigned);
+
+//#include <stdio.h>
+int puts(const char *s);
+
+struct FunStructTest {
+  int Test1;
+  char *Pointer;
+  int Array[12];
+};
+
+struct SubStruct {
+  short X, Y;
+};
+
+struct Quad {
+  int w;
+  struct SubStruct SS;
+  struct SubStruct *SSP;
+  char c;
+  int y;
+};
+
+struct Quad GlobalQuad = { 4, {1, 2}, 0, 3, 156 };
+
+typedef int (*FuncPtr)(int);
+
+unsigned PtrFunc(int (*Func)(int), int X) {
+  return Func(X);
+}
+
+char PtrFunc2(FuncPtr FuncTab[30], int Num) {
+  return FuncTab[Num]('b');
+}
+
+extern char SmallArgs2(char w, char x, long long Zrrk, char y, char z);
+extern int SomeFunc(void);
+char SmallArgs(char w, char x, char y, char z) {
+  SomeFunc();
+  return SmallArgs2(w-1, x+1, y, z, w);
+}
+
+static int F0(struct Quad Q, int i) {              /* Pass Q by value */
+  struct Quad R;
+  if (i) R.SS = Q.SS;
+  Q.SSP = &R.SS;
+  Q.w = Q.y = Q.c = 1;
+  return Q.SS.Y + i + R.y - Q.c;
+}
+
+int F1(struct Quad *Q, int i) {             /* Pass Q by address */
+  struct Quad R;
+#if 0
+  if (i) R.SS = Q->SS;
+#else
+  if (i) R = *Q;
+#endif
+  Q->w = Q->y = Q->c = 1;
+  return Q->SS.Y+i+R.y-Q->c;
+}
+
+
+int BadFunc(float Val) {
+  int Result;
+  if (Val > 12.345) Result = 4;
+  return Result;     /* Test use of undefined value */
+}
+
+int RealFunc(void) {
+  return SomeUndefinedFunction(1, 4, 5);
+}
+
+extern int EF1(int *, char *, int *);
+
+int Func(int Param, long long Param2) {
+  int Result = Param;
+
+  {{{{
+      char c; int X;
+      EF1(&Result, &c, &X);
+    }}}
+
+    {   // c & X are duplicate names!
+      char c; int X;
+      EF1(&Result, &c, &X);
+    }
+
+  }
+  return Result;
+}
+
+
+short FunFunc(long long x, char z) {
+  return x+z;
+}
+
+unsigned castTest(int X) { return X; }
+
+double TestAdd(double X, float Y) {
+  return X+Y+.5;
+}
+
+int func(int i, int j) {
+  while (i != 20)
+    i += 2;
+
+  j += func(2, i);
+  return (i * 3 + j*2)*j;
+}
+
+int SumArray(int Array[], int Num) {
+  int i, Result = 0;
+  for (i = 0; i < Num; ++i)
+    Result += Array[i];
+
+  return Result;
+}
+
+int ArrayParam(int Values[100]) {
+  return EF1((int*)Values[50], (char*)1, &Values[50]);
+}
+
+int ArrayToSum(void) {
+  int A[100], i;
+  for (i = 0; i < 100; ++i)
+    A[i] = i*4;
+
+  return A[A[0]]; //SumArray(A, 100);
+}
+
+
+int ExternFunc(long long, unsigned*, short, unsigned char);
+
+int main(int argc, char *argv[]) {
+  unsigned i;
+  puts("Hello world!\n");
+
+  ExternFunc(-1, 0, (short)argc, 2);
+  //func(argc, argc);
+
+  for (i = 0; i < 10; i++)
+    puts(argv[3]);
+  return 0;
+}
+
+double MathFunc(double X, double Y, double Z,
+                double AA, double BB, double CC, double DD,
+                double EE, double FF, double GG, double HH,
+                double aAA, double aBB, double aCC, double aDD,
+                double aEE, double aFF) {
+  return X + Y + Z + AA + BB + CC + DD + EE + FF + GG + HH
+       + aAA + aBB + aCC + aDD + aEE + aFF;
+}
+
+
+
+void strcpy(char *s1, char *s2) {
+  while (*s1++ = *s2++);
+}
+
+void strcat(char *s1, char *s2) {
+  while (*s1++);
+  s1--;
+  while (*s1++ = *s2++);
+}
+
+int strcmp(char *s1, char *s2) {
+  while (*s1++ == *s2++);
+  if (*s1 == 0) {
+    if (*s2 == 0) {
+      return 0;
+    } else {
+      return -1;
+    }
+  } else {
+    if (*s2 == 0) {
+      return 1;
+    } else {
+      return (*(--s1) - *(--s2));
+    }
+  }
+}
+
diff --git a/test/FrontendC/2002-07-16-HardStringInit.c b/test/FrontendC/2002-07-16-HardStringInit.c
new file mode 100644 (file)
index 0000000..d1d0321
--- /dev/null
@@ -0,0 +1,8 @@
+// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
+
+  char      auto_kibitz_list[100][20] = {
+                                      {"diepx"},
+                                      {"ferret"},
+                                      {"knightc"},
+                                      {"knightcap"}};
+
diff --git a/test/FrontendC/2002-07-17-StringConstant.c b/test/FrontendC/2002-07-17-StringConstant.c
new file mode 100644 (file)
index 0000000..8a39203
--- /dev/null
@@ -0,0 +1,4 @@
+// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
+
+
+char * foo() { return "\\begin{"; }
diff --git a/test/FrontendC/2002-07-29-Casts.c b/test/FrontendC/2002-07-29-Casts.c
new file mode 100644 (file)
index 0000000..6794e80
--- /dev/null
@@ -0,0 +1,86 @@
+// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <sys/types.h>
+
+int
+main(int argc, char** argv)
+{
+  char     c1;
+  short    s1, ssf1, ssd1;
+  unsigned char  ubs0;
+  signed char   bs0;
+  unsigned char ubc0, uc2;
+  unsigned short us2, usf1, usd1;
+  int ic3, is3, sif1, sid1;
+  unsigned int     uic4, uis4, uif1, uid1;
+  long     slf1, sld1;
+  unsigned long    ulf1, uld1;
+  float    f1;
+  double   d1;
+  
+  /* Test integer to integer conversions */
+  
+  c1 = (char)  (argc >= 2)? atoi(argv[1]) : 0xff64; /* 100 = 'd' */
+  s1 = (short) (argc >= 3)? atoi(argv[2]) : -769;   /* 0xf7ff = -769 */
+  
+  ubc0 = (unsigned char) c1;                      /* 100 = 'd' */
+  ubs0 = (unsigned char) s1;                            /* 0xff = 255 */
+  bs0  = (signed char) s1;                             /* 0xff = -1 */
+  
+  uc2 = (unsigned char) c1;                       /* 100 = 'd' */
+  us2 = (unsigned short) s1;                      /* 0xf7ff = 64767 */
+  
+  ic3 = (int) c1;                                 /* 100 = 'd' */
+  is3 = (int) s1;                                 /* 0xfffff7ff = -769 */
+  
+  uic4 = (unsigned int) c1;                       /*  100 = 'd' */
+  uis4 = (unsigned int) s1;                       /* 0xfffff7ff = 4294966527 */
+  
+  printf("ubc0 = '%c'\n", ubc0);
+  printf("ubs0 = %u\n",   ubs0);
+  printf("bs0  = %d\n",   bs0);
+  printf("c1   = '%c'\n", c1);
+  printf("s1   = %d\n",   s1);
+  printf("uc2  = '%c'\n", uc2);
+  printf("us2  = %u\n",   us2);
+  printf("ic3  = '%c'\n", ic3);
+  printf("is3  = %d\n",   is3);
+  printf("uic4 = '%c'\n", uic4);
+  printf("uis4 = %u\n",   uis4);
+  
+  /* Test floating-point to integer conversions */
+  f1 = (float)  (argc >= 4)? atof(argv[3]) : 1.0;
+  d1 =          (argc >= 5)? atof(argv[4]) : 2.0;
+  
+  usf1 = (unsigned short) f1;
+  usd1 = (unsigned short) d1;
+  uif1 = (unsigned int) f1;
+  uid1 = (unsigned int) d1;
+  ulf1 = (unsigned long) f1;
+  uld1 = (unsigned long) d1;
+  
+  ssf1 = (short) f1;
+  ssd1 = (short) d1;
+  sif1 = (int) f1;
+  sid1 = (int) d1;
+  slf1 = (long) f1;
+  sld1 = (long) d1;
+  
+  printf("usf1 = %u\n", usf1);
+  printf("usd1 = %u\n", usd1);
+  printf("uif1 = %u\n", uif1);
+  printf("uid1 = %u\n", uid1);
+  printf("ulf1 = %u\n", ulf1);
+  printf("uld1 = %u\n", uld1);
+  
+  printf("ssf1 = %d\n", ssf1);
+  printf("ssd1 = %d\n", ssd1);
+  printf("sif1 = %d\n", sif1);
+  printf("sid1 = %d\n", sid1);
+  printf("slf1 = %d\n", slf1);
+  printf("sld1 = %d\n", sld1);
+  
+  return 0;
+}
diff --git a/test/FrontendC/2002-07-30-SubregSetAssertion.c b/test/FrontendC/2002-07-30-SubregSetAssertion.c
new file mode 100644 (file)
index 0000000..6d4f9f6
--- /dev/null
@@ -0,0 +1,12 @@
+// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
+
+
+union X {
+  void *B;
+};
+
+union X foo() {
+  union X A;
+  A.B = (void*)123;
+  return A;
+}
diff --git a/test/FrontendC/2002-07-30-UnionTest.c b/test/FrontendC/2002-07-30-UnionTest.c
new file mode 100644 (file)
index 0000000..b2c481e
--- /dev/null
@@ -0,0 +1,22 @@
+// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
+
+union X;
+struct Empty {};
+union F {};
+union Q { union Q *X; };
+union X {
+  char C;
+  int A, Z;
+  long long B;
+  void *b1;
+  struct { int A; long long Z; } Q;
+};
+
+union X foo(union X A) {
+  A.C = 123;
+  A.A = 39249;
+  //A.B = (void*)123040123321;
+  A.B = 12301230123123LL;
+  A.Z = 1;
+  return A;
+}
diff --git a/test/FrontendC/2002-07-30-VarArgsCallFailure.c b/test/FrontendC/2002-07-30-VarArgsCallFailure.c
new file mode 100644 (file)
index 0000000..b37a462
--- /dev/null
@@ -0,0 +1,8 @@
+// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
+
+int tcount;
+void test(char *, const char*, int);
+void foo() {
+  char Buf[10];
+  test(Buf, "n%%%d", tcount++);
+}
diff --git a/test/FrontendC/2002-07-31-BadAssert.c b/test/FrontendC/2002-07-31-BadAssert.c
new file mode 100644 (file)
index 0000000..5801d03
--- /dev/null
@@ -0,0 +1,16 @@
+// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
+
+typedef struct
+{
+        unsigned char type;        /* Indicates, NORMAL, SUBNORMAL, etc. */
+} InternalFPF;
+
+
+static void SetInternalFPFZero(InternalFPF *dest) {
+  dest->type=0;
+}
+
+void denormalize(InternalFPF *ptr) {
+   SetInternalFPFZero(ptr);
+}
+
diff --git a/test/FrontendC/2002-07-31-SubregFailure.c b/test/FrontendC/2002-07-31-SubregFailure.c
new file mode 100644 (file)
index 0000000..15573f9
--- /dev/null
@@ -0,0 +1,14 @@
+// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
+
+
+typedef union {
+   long (*ap)[4];
+} ptrs;
+
+void DoAssignIteration() {
+  ptrs abase;
+  abase.ap+=27;
+  Assignment(*abase.ap);
+}
+
+
diff --git a/test/FrontendC/2002-08-02-UnionTest.c b/test/FrontendC/2002-08-02-UnionTest.c
new file mode 100644 (file)
index 0000000..bc44e46
--- /dev/null
@@ -0,0 +1,19 @@
+// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
+
+/* In this testcase, the return value of foo() is being promotedto a register
+ * which breaks stuff
+ */
+#include <stdio.h>
+
+union X { char X; void *B; int a, b, c, d;};
+
+union X foo() {
+  union X Global;
+  Global.B = (void*)123;   /* Interesting part */
+  return Global;
+}
+
+void main() {
+  union X test = foo();
+  printf("0x%p", test.B);
+}
diff --git a/test/FrontendC/2002-08-19-RecursiveLocals.c b/test/FrontendC/2002-08-19-RecursiveLocals.c
new file mode 100644 (file)
index 0000000..e5007af
--- /dev/null
@@ -0,0 +1,18 @@
+// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
+
+/* This testcase doesn't actually test a bug, it's just the result of me 
+ * figuring out the syntax for forward declaring a static variable. */
+struct list {
+  int x;
+  struct list *Next;
+};
+
+static struct list B;  /* Forward declare static */
+static struct list A = { 7, &B };
+static struct list B = { 8, &A };
+
+extern struct list D;  /* forward declare normal var */
+
+struct list C = { 7, &D };
+struct list D = { 8, &C };
+
diff --git a/test/FrontendC/2002-09-08-PointerShifts.c b/test/FrontendC/2002-09-08-PointerShifts.c
new file mode 100644 (file)
index 0000000..cc7e91a
--- /dev/null
@@ -0,0 +1,6 @@
+// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
+
+
+int foo(int *A, unsigned X) {
+  return A[X];
+}
diff --git a/test/FrontendC/2002-09-18-UnionProblem.c b/test/FrontendC/2002-09-18-UnionProblem.c
new file mode 100644 (file)
index 0000000..56ec6ce
--- /dev/null
@@ -0,0 +1,26 @@
+// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
+
+
+struct DWstruct {
+  char high, low;
+};
+
+typedef union {
+  struct DWstruct s;
+  short ll;
+} DWunion;
+
+short __udivmodhi4 (char n1, char bm) {
+  DWunion rr;
+
+  if (bm == 0)
+    {
+      rr.s.high = n1;
+    }
+  else
+    {
+      rr.s.high = bm;
+    }
+
+  return rr.ll;
+}
diff --git a/test/FrontendC/2002-09-19-StarInLabel.c b/test/FrontendC/2002-09-19-StarInLabel.c
new file mode 100644 (file)
index 0000000..86a2571
--- /dev/null
@@ -0,0 +1,9 @@
+// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
+
+extern void start() __asm__("start");
+extern void _start() __asm__("_start");
+extern void __start() __asm__("__start");
+void start() {}
+void _start() {}
+void __start() {}
+
diff --git a/test/FrontendC/2002-10-12-TooManyArguments.c b/test/FrontendC/2002-10-12-TooManyArguments.c
new file mode 100644 (file)
index 0000000..206cdd9
--- /dev/null
@@ -0,0 +1,8 @@
+// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
+
+
+void foo() {}
+
+void bar() {
+  foo(1, 2, 3);  /* Too many arguments passed */
+}
diff --git a/test/FrontendC/2002-12-15-GlobalBoolTest.c b/test/FrontendC/2002-12-15-GlobalBoolTest.c
new file mode 100644 (file)
index 0000000..6b27391
--- /dev/null
@@ -0,0 +1,5 @@
+// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
+
+
+_Bool X = 0;
+
diff --git a/test/FrontendC/2002-12-15-GlobalConstantTest.c b/test/FrontendC/2002-12-15-GlobalConstantTest.c
new file mode 100644 (file)
index 0000000..a5a679d
--- /dev/null
@@ -0,0 +1,8 @@
+// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
+
+
+const char *W = "foo";
+const int X = 7;
+int Y = 8;
+const char * const Z = "bar";
+
diff --git a/test/FrontendC/2002-12-15-GlobalRedefinition.c b/test/FrontendC/2002-12-15-GlobalRedefinition.c
new file mode 100644 (file)
index 0000000..39632a1
--- /dev/null
@@ -0,0 +1,5 @@
+// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
+
+extern char algbrfile[9];
+char algbrfile[9] = "abcdefgh";
+
diff --git a/test/FrontendC/2002-12-15-StructParameters.c b/test/FrontendC/2002-12-15-StructParameters.c
new file mode 100644 (file)
index 0000000..c85dab1
--- /dev/null
@@ -0,0 +1,18 @@
+// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
+
+typedef struct
+{
+  void *stack;
+  unsigned size;
+  unsigned avail;
+} compile_stack_type;
+
+void foo(void*);
+void bar(compile_stack_type T, unsigned);
+
+void test() {
+  compile_stack_type CST;
+  foo(&CST);
+
+  bar(CST, 12);
+}
diff --git a/test/FrontendC/2003-01-30-UnionInit.c b/test/FrontendC/2003-01-30-UnionInit.c
new file mode 100644 (file)
index 0000000..5769584
--- /dev/null
@@ -0,0 +1,8 @@
+// RUN: %llvmgcc -S %s -o /dev/null
+
+union foo {
+  struct { char A, B; } X;
+  int C;
+};
+
+union foo V = { {1, 2} };
diff --git a/test/FrontendC/2003-03-03-DeferredType.c b/test/FrontendC/2003-03-03-DeferredType.c
new file mode 100644 (file)
index 0000000..fa51991
--- /dev/null
@@ -0,0 +1,12 @@
+// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
+
+
+
+
+struct foo A;
+
+struct foo {
+  int x;
+double D;
+};
+
diff --git a/test/FrontendC/2003-06-22-UnionCrash.c b/test/FrontendC/2003-06-22-UnionCrash.c
new file mode 100644 (file)
index 0000000..dab0716
--- /dev/null
@@ -0,0 +1,13 @@
+// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
+
+struct Blend_Map_Entry {
+  union {
+   float Colour[5];
+   double Point_Slope[2];
+  } Vals;
+};
+
+void test(struct Blend_Map_Entry* Foo)
+{
+}
+
diff --git a/test/FrontendC/2003-06-23-GCC-fold-infinite-recursion.c b/test/FrontendC/2003-06-23-GCC-fold-infinite-recursion.c
new file mode 100644 (file)
index 0000000..ba66276
--- /dev/null
@@ -0,0 +1,6 @@
+// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
+
+double Test(double A, double B, double C, double D) {
+  return -(A-B) - (C-D);
+}
+
diff --git a/test/FrontendC/2003-06-26-CFECrash.c b/test/FrontendC/2003-06-26-CFECrash.c
new file mode 100644 (file)
index 0000000..bb6977f
--- /dev/null
@@ -0,0 +1,19 @@
+// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
+
+typedef struct min_info {
+  long offset;
+  unsigned file_attr;
+} min_info;
+
+typedef struct Globals {
+  char answerbuf;
+  min_info info[1];
+  min_info *pInfo;
+} Uz_Globs;
+
+extern Uz_Globs G;
+
+int extract_or_test_files() {  
+  G.pInfo = G.info;
+}
+
diff --git a/test/FrontendC/2003-06-29-MultipleFunctionDefinition.c b/test/FrontendC/2003-06-29-MultipleFunctionDefinition.c
new file mode 100644 (file)
index 0000000..b7bc803
--- /dev/null
@@ -0,0 +1,8 @@
+// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
+
+/* This is apparently legal C.  
+ */
+extern __inline__ void test() { }
+
+void test() {
+}
diff --git a/test/FrontendC/2003-07-22-ArrayAccessTypeSafety.c b/test/FrontendC/2003-07-22-ArrayAccessTypeSafety.c
new file mode 100644 (file)
index 0000000..51e66c9
--- /dev/null
@@ -0,0 +1,7 @@
+/* RUN: %llvmgcc -xc %s -S -o - | grep -v alloca | not grep bitcast
+ */
+
+void test(int* array, long long N) {
+    array[N] = N[array] = 33;
+}
+
diff --git a/test/FrontendC/2003-08-06-BuiltinSetjmpLongjmp.c b/test/FrontendC/2003-08-06-BuiltinSetjmpLongjmp.c
new file mode 100644 (file)
index 0000000..39412e5
--- /dev/null
@@ -0,0 +1,14 @@
+/* RUN: %llvmgcc -xc %s -c -o - | llvm-dis | not grep __builtin_
+ *
+ * __builtin_longjmp/setjmp should get transformed into llvm.setjmp/longjmp 
+ * just like explicit setjmp/longjmp calls are.
+ */
+
+void jumpaway(int *ptr) {
+  __builtin_longjmp(ptr,1);
+}
+    
+int main(void) {
+  __builtin_setjmp(0);
+  jumpaway(0);
+}
diff --git a/test/FrontendC/2003-08-17-DeadCodeShortCircuit.c b/test/FrontendC/2003-08-17-DeadCodeShortCircuit.c
new file mode 100644 (file)
index 0000000..c275fee
--- /dev/null
@@ -0,0 +1,7 @@
+// RUN: %llvmgcc -xc %s -c -o %t.o
+
+int test(_Bool pos, _Bool color) {
+  return 0;
+  return (pos && color);
+}
+
diff --git a/test/FrontendC/2003-08-18-SigSetJmp.c b/test/FrontendC/2003-08-18-SigSetJmp.c
new file mode 100644 (file)
index 0000000..b7f4553
--- /dev/null
@@ -0,0 +1,10 @@
+// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
+
+
+#include <setjmp.h>
+
+sigjmp_buf B;
+int foo() {
+  sigsetjmp(B, 1);
+  bar();
+}
diff --git a/test/FrontendC/2003-08-18-StructAsValue.c b/test/FrontendC/2003-08-18-StructAsValue.c
new file mode 100644 (file)
index 0000000..649eadc
--- /dev/null
@@ -0,0 +1,11 @@
+// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
+
+
+typedef struct {
+  int op;
+} event_t;
+
+event_t test(int X) {
+  event_t foo = { 1 }, bar = { 2 };
+  return X ? foo : bar;
+}
diff --git a/test/FrontendC/2003-08-20-BadBitfieldRef.c b/test/FrontendC/2003-08-20-BadBitfieldRef.c
new file mode 100644 (file)
index 0000000..58cf1bc
--- /dev/null
@@ -0,0 +1,8 @@
+// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
+
+void foo()
+{
+  char *ap;
+  ap[1] == '-' && ap[2] == 0;
+}
+
diff --git a/test/FrontendC/2003-08-20-PrototypeMismatch.c b/test/FrontendC/2003-08-20-PrototypeMismatch.c
new file mode 100644 (file)
index 0000000..8358a2f
--- /dev/null
@@ -0,0 +1,15 @@
+// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
+
+
+
+static int foo(int);
+
+static int foo(C)
+char C;
+{
+  return C;
+}
+
+void test() {
+  foo(7);
+}
diff --git a/test/FrontendC/2003-08-20-vfork-bug.c b/test/FrontendC/2003-08-20-vfork-bug.c
new file mode 100644 (file)
index 0000000..575bfd6
--- /dev/null
@@ -0,0 +1,6 @@
+// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
+
+extern int vfork(void);
+test() {
+  vfork();
+}
diff --git a/test/FrontendC/2003-08-21-BinOp-Type-Mismatch.c b/test/FrontendC/2003-08-21-BinOp-Type-Mismatch.c
new file mode 100644 (file)
index 0000000..8829652
--- /dev/null
@@ -0,0 +1,10 @@
+// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
+
+struct bar;
+
+void foo()
+{
+  unsigned int frame, focus;
+  (struct bar *) focus == (focus ? ((struct bar *) frame) : 0);
+}
+
diff --git a/test/FrontendC/2003-08-21-StmtExpr.c b/test/FrontendC/2003-08-21-StmtExpr.c
new file mode 100644 (file)
index 0000000..878ed47
--- /dev/null
@@ -0,0 +1,12 @@
+// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
+
+
+typedef struct {
+  unsigned long val;
+} structty;
+
+void bar(structty new_mask);
+static void foo() {
+  bar(({ structty mask; mask; }));
+}
+
diff --git a/test/FrontendC/2003-08-21-WideString.c b/test/FrontendC/2003-08-21-WideString.c
new file mode 100644 (file)
index 0000000..0a833dc
--- /dev/null
@@ -0,0 +1,5 @@
+// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
+
+struct {
+  int *name;
+} syms = { L"NUL" };
diff --git a/test/FrontendC/2003-08-23-LocalUnionTest.c b/test/FrontendC/2003-08-23-LocalUnionTest.c
new file mode 100644 (file)
index 0000000..dc27802
--- /dev/null
@@ -0,0 +1,11 @@
+// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
+
+
+
+union foo { int X; };
+
+int test(union foo* F) {
+  {
+    union foo { float X; } A;
+  }
+}
diff --git a/test/FrontendC/2003-08-29-BitFieldStruct.c b/test/FrontendC/2003-08-29-BitFieldStruct.c
new file mode 100644 (file)
index 0000000..8c303e8
--- /dev/null
@@ -0,0 +1,13 @@
+// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
+
+struct Word {
+  short bar;
+  short baz;
+  int final:1;
+  short quux;
+} *word_limit;
+
+void foo ()
+{
+  word_limit->final = (word_limit->final && word_limit->final);
+}
diff --git a/test/FrontendC/2003-08-29-HugeCharConst.c b/test/FrontendC/2003-08-29-HugeCharConst.c
new file mode 100644 (file)
index 0000000..a997994
--- /dev/null
@@ -0,0 +1,5 @@
+// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
+
+void foo() {
+  unsigned char int_latin1[] = "f\200\372b\200\343\200\340";
+}
diff --git a/test/FrontendC/2003-08-29-StructLayoutBug.c b/test/FrontendC/2003-08-29-StructLayoutBug.c
new file mode 100644 (file)
index 0000000..a5f6fb1
--- /dev/null
@@ -0,0 +1,10 @@
+// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
+
+struct foo {
+  unsigned int I:1;
+  unsigned char J[1];
+  unsigned int K:1;
+ };
+
+void test(struct foo *X) {}
+
diff --git a/test/FrontendC/2003-08-30-AggregateInitializer.c b/test/FrontendC/2003-08-30-AggregateInitializer.c
new file mode 100644 (file)
index 0000000..58c77b6
--- /dev/null
@@ -0,0 +1,16 @@
+// RUN: %llvmgcc -S %s -o /dev/null
+
+struct istruct {
+  unsigned char C;
+};
+
+struct foo {
+  unsigned int I:1;
+  struct istruct J;
+  unsigned char L[1];
+  unsigned int K:1;
+};
+
+struct foo F = { 1, { 7 }, { 123 } , 1 };
+
+
diff --git a/test/FrontendC/2003-08-30-LargeIntegerBitfieldMember.c b/test/FrontendC/2003-08-30-LargeIntegerBitfieldMember.c
new file mode 100644 (file)
index 0000000..f67aee4
--- /dev/null
@@ -0,0 +1,9 @@
+// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
+
+struct foo {
+  unsigned int I:1;
+  unsigned char J[1][123];
+  unsigned int K:1;
+ };
+
+struct foo F;
diff --git a/test/FrontendC/2003-09-18-BitfieldTests.c b/test/FrontendC/2003-09-18-BitfieldTests.c
new file mode 100644 (file)
index 0000000..3a7879b
--- /dev/null
@@ -0,0 +1,30 @@
+// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
+
+
+typedef struct BF {
+  int A : 1;
+  char B;
+  int C : 13;
+} BF;
+
+char *test1(BF *b) {
+  return &b->B;        // Must be able to address non-bitfield
+}
+
+void test2(BF *b) {    // Increment and decrement operators
+  b->A++;
+  --b->C;
+}
+
+void test3(BF *b) {
+   b->C = 12345;        // Store
+}
+
+int test4(BF *b) {
+  return b->C;         // Load
+}
+
+void test5(BF *b, int i) { // array ref
+  b[i].C = 12345;
+}
+
diff --git a/test/FrontendC/2003-09-30-StructLayout.c b/test/FrontendC/2003-09-30-StructLayout.c
new file mode 100644 (file)
index 0000000..3a40166
--- /dev/null
@@ -0,0 +1,18 @@
+// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
+
+enum En {
+  ENUM_VAL
+};
+
+struct St {
+  unsigned char A;
+  enum En B;
+  unsigned char C;
+  enum En D;
+  float E;
+};
+
+
+void func(struct St* A) {
+  A->D = ENUM_VAL;
+}
diff --git a/test/FrontendC/2003-10-02-UnionLValueError.c b/test/FrontendC/2003-10-02-UnionLValueError.c
new file mode 100644 (file)
index 0000000..732f93a
--- /dev/null
@@ -0,0 +1,11 @@
+// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
+
+union U{
+  int i[8];
+  char s[80];
+};
+
+void format_message(char *buffer, union U *u) {
+  sprintf(buffer, u->s);
+}
+
diff --git a/test/FrontendC/2003-10-06-NegateExprType.c b/test/FrontendC/2003-10-06-NegateExprType.c
new file mode 100644 (file)
index 0000000..0238603
--- /dev/null
@@ -0,0 +1,8 @@
+// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
+
+
+extern int A[10];
+void Func(int *B) { 
+  B - &A[5]; 
+}
+
diff --git a/test/FrontendC/2003-10-09-UnionInitializerBug.c b/test/FrontendC/2003-10-09-UnionInitializerBug.c
new file mode 100644 (file)
index 0000000..90dbd37
--- /dev/null
@@ -0,0 +1,17 @@
+// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
+
+struct Foo {
+    unsigned a;
+    unsigned b;
+    unsigned c;
+};
+
+struct Bar {
+    union {
+        void **a;
+        struct Foo b;
+    }u;
+};
+
+struct Bar test = {0};
+
diff --git a/test/FrontendC/2003-10-28-ident.c b/test/FrontendC/2003-10-28-ident.c
new file mode 100644 (file)
index 0000000..9911dfd
--- /dev/null
@@ -0,0 +1,4 @@
+// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
+
+
+#ident "foo"
diff --git a/test/FrontendC/2003-10-29-AsmRename.c b/test/FrontendC/2003-10-29-AsmRename.c
new file mode 100644 (file)
index 0000000..5750ced
--- /dev/null
@@ -0,0 +1,22 @@
+// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
+
+
+struct foo { int X; };
+struct bar { int Y; };
+
+extern int Func(struct foo*) __asm__("Func64");
+extern int Func64(struct bar*);
+
+int Func(struct foo *F) {
+  return 1;
+}
+
+int Func64(struct bar* B) {
+  return 0;
+}
+
+
+int test() {
+  Func(0);    /* should be renamed to call Func64 */
+  Func64(0);
+}
diff --git a/test/FrontendC/2003-11-01-C99-CompoundLiteral.c b/test/FrontendC/2003-11-01-C99-CompoundLiteral.c
new file mode 100644 (file)
index 0000000..a0aa698
--- /dev/null
@@ -0,0 +1,8 @@
+// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
+
+typedef struct { int foo; } spinlock_t;
+typedef struct wait_queue_head_t { spinlock_t lock; } wait_queue_head_t;
+void call_usermodehelper(void) { 
+  struct wait_queue_head_t work = { lock: (spinlock_t) { 0 }, }; 
+}
+
diff --git a/test/FrontendC/2003-11-01-EmptyStructCrash.c b/test/FrontendC/2003-11-01-EmptyStructCrash.c
new file mode 100644 (file)
index 0000000..fb6993b
--- /dev/null
@@ -0,0 +1,6 @@
+// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
+
+typedef struct { } the_coolest_struct_in_the_world;
+extern the_coolest_struct_in_the_world xyzzy;
+void *foo() { return &xyzzy; }
+
diff --git a/test/FrontendC/2003-11-01-GlobalUnionInit.c b/test/FrontendC/2003-11-01-GlobalUnionInit.c
new file mode 100644 (file)
index 0000000..be7788d
--- /dev/null
@@ -0,0 +1,7 @@
+// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
+
+union bdflush_param {
+    struct { int x; } b_un;
+    int y[1];
+} bdf_prm = {{30}};
+
diff --git a/test/FrontendC/2003-11-03-AddrArrayElement.c b/test/FrontendC/2003-11-03-AddrArrayElement.c
new file mode 100644 (file)
index 0000000..ed3fc1a
--- /dev/null
@@ -0,0 +1,11 @@
+// RUN: %llvmgcc -xc %s -c -o - | llvm-dis | grep getelementptr
+
+// This should be turned into a tasty getelementptr instruction, not a nasty
+// series of casts and address arithmetic.
+
+char Global[100];
+
+char *test1(unsigned i) {
+  return &Global[i];
+}
+
diff --git a/test/FrontendC/2003-11-04-EmptyStruct.c b/test/FrontendC/2003-11-04-EmptyStruct.c
new file mode 100644 (file)
index 0000000..c7a0164
--- /dev/null
@@ -0,0 +1,6 @@
+// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
+
+typedef struct { } rwlock_t;
+struct fs_struct { rwlock_t lock; int umask; };
+void __copy_fs_struct(struct fs_struct *fs) { fs->lock = (rwlock_t) { }; }
+
diff --git a/test/FrontendC/2003-11-04-OutOfMemory.c b/test/FrontendC/2003-11-04-OutOfMemory.c
new file mode 100644 (file)
index 0000000..6a42e16
--- /dev/null
@@ -0,0 +1,9 @@
+// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
+
+void schedule_timeout(signed long timeout)
+{
+ switch (timeout)
+ {
+ case ((long)(~0UL>>1)): break;
+ }
+}
diff --git a/test/FrontendC/2003-11-08-PointerSubNotGetelementptr.c b/test/FrontendC/2003-11-08-PointerSubNotGetelementptr.c
new file mode 100644 (file)
index 0000000..443dfbd
--- /dev/null
@@ -0,0 +1,9 @@
+// RUN: %llvmgcc -xc %s -c -o - | llvm-dis | grep getelementptr
+
+char *test(char* C) {
+  return C-1;   // Should turn into a GEP
+}
+
+int *test2(int* I) {
+  return I-1;
+}
diff --git a/test/FrontendC/2003-11-12-VoidString.c b/test/FrontendC/2003-11-12-VoidString.c
new file mode 100644 (file)
index 0000000..db2e84b
--- /dev/null
@@ -0,0 +1,4 @@
+// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
+
+void query_newnamebuf(void) { ((void)"query_newnamebuf"); }
+
diff --git a/test/FrontendC/2003-11-13-TypeSafety.c b/test/FrontendC/2003-11-13-TypeSafety.c
new file mode 100644 (file)
index 0000000..128b767
--- /dev/null
@@ -0,0 +1,5 @@
+// RUN: %llvmgcc -xc %s -c -o - | llvm-dis | grep getelementptr
+
+int *test(int *X, int Y) {
+  return X + Y;
+}
diff --git a/test/FrontendC/2003-11-16-StaticArrayInit.c b/test/FrontendC/2003-11-16-StaticArrayInit.c
new file mode 100644 (file)
index 0000000..2b42e38
--- /dev/null
@@ -0,0 +1,8 @@
+// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
+
+void bar () {
+ static char x[10];
+ static char *xend = x + 10;
+}
+
+
diff --git a/test/FrontendC/2003-11-18-CondExprLValue.c b/test/FrontendC/2003-11-18-CondExprLValue.c
new file mode 100644 (file)
index 0000000..ec000a4
--- /dev/null
@@ -0,0 +1,9 @@
+// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
+
+typedef struct { unsigned long pgprot; } pgprot_t;
+
+void split_large_page(unsigned long addr, pgprot_t prot)
+{
+  (addr ? prot : ((pgprot_t) { 0x001 } )).pgprot;
+}
+
diff --git a/test/FrontendC/2003-11-19-AddressOfRegister.c b/test/FrontendC/2003-11-19-AddressOfRegister.c
new file mode 100644 (file)
index 0000000..69dc54d
--- /dev/null
@@ -0,0 +1,12 @@
+// RUN: %llvmgcc -xc %s -S -o /dev/null |& not grep warning
+
+struct item {
+  short delta[4];
+};
+
+int TEST(int nt) {
+ register struct item *aa;
+ aa[nt].delta;
+ return 1;
+}
+
diff --git a/test/FrontendC/2003-11-19-BitFieldArray.c b/test/FrontendC/2003-11-19-BitFieldArray.c
new file mode 100644 (file)
index 0000000..9d54112
--- /dev/null
@@ -0,0 +1,12 @@
+// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
+
+struct _GIOChannel {
+  int write_buf;
+  char partial_write_buf[6];
+  int d :1;
+};
+
+void g_io_channel_init (struct _GIOChannel *channel) {
+  channel->partial_write_buf[0];
+}
+
diff --git a/test/FrontendC/2003-11-20-Bitfields.c b/test/FrontendC/2003-11-20-Bitfields.c
new file mode 100644 (file)
index 0000000..c9ea0dc
--- /dev/null
@@ -0,0 +1,12 @@
+// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
+
+struct face_cachel {
+  unsigned int reverse :1;
+  unsigned char font_specified[1];
+};
+
+void
+ensure_face_cachel_contains_charset (struct face_cachel *cachel) {
+  cachel->font_specified[0] = 0;
+}
+
diff --git a/test/FrontendC/2003-11-20-ComplexDivision.c b/test/FrontendC/2003-11-20-ComplexDivision.c
new file mode 100644 (file)
index 0000000..cd548c0
--- /dev/null
@@ -0,0 +1,7 @@
+// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
+
+int test() {
+  __complex__ double C;
+  double D;
+  C / D;
+}
diff --git a/test/FrontendC/2003-11-20-UnionBitfield.c b/test/FrontendC/2003-11-20-UnionBitfield.c
new file mode 100644 (file)
index 0000000..12e7df5
--- /dev/null
@@ -0,0 +1,12 @@
+// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
+
+struct printf_spec {
+  unsigned int minus_flag:1;
+  char converter;
+};
+
+void parse_doprnt_spec () {
+  struct printf_spec spec;
+  spec.minus_flag = 1;
+}
+
diff --git a/test/FrontendC/2003-11-26-PointerShift.c b/test/FrontendC/2003-11-26-PointerShift.c
new file mode 100644 (file)
index 0000000..079f690
--- /dev/null
@@ -0,0 +1,6 @@
+// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
+
+unsigned long do_csum(const unsigned char *buff, int len, unsigned long result) {
+  if (2 & (unsigned long) buff) result += 1;
+  return result;
+}
diff --git a/test/FrontendC/2003-11-27-ConstructorCast.c b/test/FrontendC/2003-11-27-ConstructorCast.c
new file mode 100644 (file)
index 0000000..3780e7a
--- /dev/null
@@ -0,0 +1,14 @@
+// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
+
+struct i387_soft_struct {
+  long cwd;
+};
+union i387_union {
+  struct i387_soft_struct soft;
+};
+struct thread_struct {
+  union i387_union i387;
+};
+void _init_task_union(void) {
+   struct thread_struct thread = (struct thread_struct) { {{0}} };
+}
diff --git a/test/FrontendC/2003-11-27-UnionCtorInitialization.c b/test/FrontendC/2003-11-27-UnionCtorInitialization.c
new file mode 100644 (file)
index 0000000..472b591
--- /dev/null
@@ -0,0 +1,16 @@
+// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
+
+struct i387_soft_struct {
+ long cwd;
+ long twd;
+ long fip;
+};
+union i387_union {
+ struct i387_soft_struct soft;
+};
+struct thread_struct {
+ union i387_union i387;
+};
+void _init_task_union(void) {
+  struct thread_struct thread = (struct thread_struct) { {{0}} };
+}
diff --git a/test/FrontendC/2003-12-14-ExternInlineSupport.c b/test/FrontendC/2003-12-14-ExternInlineSupport.c
new file mode 100644 (file)
index 0000000..fb92ec7
--- /dev/null
@@ -0,0 +1,3 @@
+// RUN: %llvmgcc -xc %s -c -o - | llvm-dis | not grep dead_function
+
+extern __inline__ void dead_function() {}
diff --git a/test/FrontendC/2004-01-01-UnknownInitSize.c b/test/FrontendC/2004-01-01-UnknownInitSize.c
new file mode 100644 (file)
index 0000000..b26b6cd
--- /dev/null
@@ -0,0 +1,14 @@
+// RUN: %llvmgcc -S %s -o /dev/null
+
+/*
+ * This regression test ensures that the C front end can compile initializers
+ * even when it cannot determine the size (as below).
+*/
+struct one
+{
+  int a;
+  int values [];
+};
+
+struct one hobbit = {5, {1, 2, 3}};
+
diff --git a/test/FrontendC/2004-01-08-ExternInlineRedefine.c b/test/FrontendC/2004-01-08-ExternInlineRedefine.c
new file mode 100644 (file)
index 0000000..b3907ee
--- /dev/null
@@ -0,0 +1,14 @@
+// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
+
+
+extern __inline long int
+__strtol_l (int a)
+{
+  return 0;
+}
+
+long int
+__strtol_l (int a)
+{
+  return 0;
+}
diff --git a/test/FrontendC/2004-02-12-LargeAggregateCopy.c b/test/FrontendC/2004-02-12-LargeAggregateCopy.c
new file mode 100644 (file)
index 0000000..b3c9bcf
--- /dev/null
@@ -0,0 +1,8 @@
+// RUN: %llvmgcc -xc %s -c -o - | llvm-dis | grep llvm.memcpy
+
+struct X { int V[10000]; };
+struct X Global1, Global2;
+void test() {
+  Global2 = Global1;
+}
+
diff --git a/test/FrontendC/2004-02-13-BuiltinFrameReturnAddress.c b/test/FrontendC/2004-02-13-BuiltinFrameReturnAddress.c
new file mode 100644 (file)
index 0000000..162d32a
--- /dev/null
@@ -0,0 +1,8 @@
+// RUN: %llvmgcc -xc %s -c -o - | llvm-dis | grep llvm.*address | count 4
+
+void *test1() {
+  return __builtin_return_address(1);
+}
+void *test2() {
+  return __builtin_frame_address(0);
+}
diff --git a/test/FrontendC/2004-02-13-IllegalVararg.c b/test/FrontendC/2004-02-13-IllegalVararg.c
new file mode 100644 (file)
index 0000000..1f3eded
--- /dev/null
@@ -0,0 +1,11 @@
+// RUN: %llvmgcc -xc %s -c -o - | llc
+
+#include <stdarg.h>
+
+float test(int X, ...) {
+  va_list ap;
+  float F;
+  va_start(ap, X);
+  F = va_arg(ap, float);
+  return F;
+}
diff --git a/test/FrontendC/2004-02-13-Memset.c b/test/FrontendC/2004-02-13-Memset.c
new file mode 100644 (file)
index 0000000..89ab9b9
--- /dev/null
@@ -0,0 +1,6 @@
+// RUN: %llvmgcc -xc %s -c -o - | llvm-dis | grep llvm.memset | count 3
+
+void test(int* X, char *Y) {
+  memset(X, 4, 1000);
+  bzero(Y, 100);
+}
diff --git a/test/FrontendC/2004-02-14-ZeroInitializer.c b/test/FrontendC/2004-02-14-ZeroInitializer.c
new file mode 100644 (file)
index 0000000..bede907
--- /dev/null
@@ -0,0 +1,4 @@
+// RUN: %llvmgcc -xc %s -S -o - | grep zeroinitializer
+
+int X[1000];
+
diff --git a/test/FrontendC/2004-02-20-Builtins.c b/test/FrontendC/2004-02-20-Builtins.c
new file mode 100644 (file)
index 0000000..82b7dc1
--- /dev/null
@@ -0,0 +1,6 @@
+// RUN: %llvmgcc -O3 -xc %s -c -o - | llvm-dis | not grep builtin
+
+void zsqrtxxx(float num) {
+   num = sqrt(num);
+}
+
diff --git a/test/FrontendC/2004-03-07-ComplexDivEquals.c b/test/FrontendC/2004-03-07-ComplexDivEquals.c
new file mode 100644 (file)
index 0000000..b1da580
--- /dev/null
@@ -0,0 +1,6 @@
+// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
+
+
+void test(__complex__ double D, double X) {
+  D /= X;
+}
diff --git a/test/FrontendC/2004-03-07-ExternalConstant.c b/test/FrontendC/2004-03-07-ExternalConstant.c
new file mode 100644 (file)
index 0000000..b8e13a3
--- /dev/null
@@ -0,0 +1,7 @@
+// RUN: %llvmgcc -xc %s -c -o - | llvm-dis | grep constant
+
+extern const int a[];   // 'a' should be marked constant even though it's external!
+int foo () {
+  return a[0];
+}
+
diff --git a/test/FrontendC/2004-03-09-LargeArrayInitializers.c b/test/FrontendC/2004-03-09-LargeArrayInitializers.c
new file mode 100644 (file)
index 0000000..335c568
--- /dev/null
@@ -0,0 +1,32 @@
+// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
+
+// Test that these initializers are handled efficiently
+
+int test(int x) {
+  const int XX[1000] = { 0, 0 };
+  const char S [1000] = "foo";
+
+  const int array[] = {
+     17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 
+     17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 
+     17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 
+     17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 
+     17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 
+     17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 
+     17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 
+     17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 
+     17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 
+     17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 
+     17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 
+     17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 
+     17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 
+     17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 
+     17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 
+     17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 
+     17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 
+     17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 
+     17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 
+     17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 
+   };
+   return array[x];
+} 
diff --git a/test/FrontendC/2004-03-15-SimpleIndirectGoto.c b/test/FrontendC/2004-03-15-SimpleIndirectGoto.c
new file mode 100644 (file)
index 0000000..ad7221e
--- /dev/null
@@ -0,0 +1,23 @@
+// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
+
+int code[]={0,0,0,0,1};
+void foo(int x) {
+  volatile int b;
+  b = 0xffffffff;
+}
+void bar(int *pc) {
+  static const void *l[] = {&&lab0, &&end};
+
+  foo(0);
+  goto *l[*pc];
+ lab0:
+  foo(0);
+  pc++;
+  goto *l[*pc];
+ end:
+  return;
+}
+int main() {
+  bar(code);
+  return 0;
+}
diff --git a/test/FrontendC/2004-03-16-AsmRegisterCrash.c b/test/FrontendC/2004-03-16-AsmRegisterCrash.c
new file mode 100644 (file)
index 0000000..6ad1cd4
--- /dev/null
@@ -0,0 +1,6 @@
+// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
+
+int foo() {
+  register int X __asm__("ebx");
+  return X;
+}
diff --git a/test/FrontendC/2004-05-07-VarArrays.c b/test/FrontendC/2004-05-07-VarArrays.c
new file mode 100644 (file)
index 0000000..2041298
--- /dev/null
@@ -0,0 +1,5 @@
+// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
+
+int foo(int len, char arr[][len], int X) {
+  return arr[X][0];
+}
diff --git a/test/FrontendC/2004-05-21-IncompleteEnum.c b/test/FrontendC/2004-05-21-IncompleteEnum.c
new file mode 100644 (file)
index 0000000..3636ca7
--- /dev/null
@@ -0,0 +1,5 @@
+// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
+
+void test(enum foo *X) {
+}
+
diff --git a/test/FrontendC/2004-06-08-OpaqueStructArg.c b/test/FrontendC/2004-06-08-OpaqueStructArg.c
new file mode 100644 (file)
index 0000000..ede811c
--- /dev/null
@@ -0,0 +1,7 @@
+// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
+
+   struct fu;
+   void foo(struct fu);
+   void bar() {
+      foo;
+   }
diff --git a/test/FrontendC/2004-06-17-UnorderedBuiltins.c b/test/FrontendC/2004-06-17-UnorderedBuiltins.c
new file mode 100644 (file)
index 0000000..5e02e7f
--- /dev/null
@@ -0,0 +1,24 @@
+// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
+
+
+_Bool A, B, C, D, E, F, G, H;
+void TestF(float X, float Y) {
+  A = __builtin_isgreater(X, Y);
+  B = __builtin_isgreaterequal(X, Y);
+  C = __builtin_isless(X, Y);
+  D = __builtin_islessequal(X, Y);
+  E = __builtin_islessgreater(X, Y);
+  F = __builtin_isunordered(X, Y);
+  //G = __builtin_isordered(X, Y);    // Our current snapshot of GCC doesn't include this builtin
+  H = __builtin_isunordered(X, Y);
+}
+void TestD(double X, double Y) {
+  A = __builtin_isgreater(X, Y);
+  B = __builtin_isgreaterequal(X, Y);
+  C = __builtin_isless(X, Y);
+  D = __builtin_islessequal(X, Y);
+  E = __builtin_islessgreater(X, Y);
+  F = __builtin_isunordered(X, Y);
+  //G = __builtin_isordered(X, Y);    // Our current snapshot doesn't include this builtin.  FIXME
+  H = __builtin_isunordered(X, Y);
+}
diff --git a/test/FrontendC/2004-06-17-UnorderedCompares.c b/test/FrontendC/2004-06-17-UnorderedCompares.c
new file mode 100644 (file)
index 0000000..f91ed66
--- /dev/null
@@ -0,0 +1,21 @@
+// RUN: %llvmgcc -xc -std=c99 %s -c -o - | llvm-dis | grep -v llvm.isunordered | not grep call
+
+#include <math.h>
+
+_Bool A, B, C, D, E, F;
+void TestF(float X, float Y) {
+  A = __builtin_isgreater(X, Y);
+  B = __builtin_isgreaterequal(X, Y);
+  C = __builtin_isless(X, Y);
+  D = __builtin_islessequal(X, Y);
+  E = __builtin_islessgreater(X, Y);
+  F = __builtin_isunordered(X, Y);
+}
+void TestD(double X, double Y) {
+  A = __builtin_isgreater(X, Y);
+  B = __builtin_isgreaterequal(X, Y);
+  C = __builtin_isless(X, Y);
+  D = __builtin_islessequal(X, Y);
+  E = __builtin_islessgreater(X, Y);
+  F = __builtin_isunordered(X, Y);
+}
diff --git a/test/FrontendC/2004-06-18-VariableLengthArrayOfStructures.c b/test/FrontendC/2004-06-18-VariableLengthArrayOfStructures.c
new file mode 100644 (file)
index 0000000..e474a13
--- /dev/null
@@ -0,0 +1,10 @@
+// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
+
+
+struct S { };
+
+int xxxx(int a) {
+  struct S comps[a];
+  comps[0];
+}
+
diff --git a/test/FrontendC/2004-07-06-FunctionCast.c b/test/FrontendC/2004-07-06-FunctionCast.c
new file mode 100644 (file)
index 0000000..169f740
--- /dev/null
@@ -0,0 +1,10 @@
+// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
+
+static int unused_func(void) {
+  return 1;
+}
+
+int foo(void) {
+  (void)unused_func; /* avoid compiler warning */
+  return 2;
+}
diff --git a/test/FrontendC/2004-08-06-LargeStructTest.c b/test/FrontendC/2004-08-06-LargeStructTest.c
new file mode 100644 (file)
index 0000000..b0413b4
--- /dev/null
@@ -0,0 +1,19 @@
+// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
+
+
+#define A(X) int X;
+#define B(X) A(X##0) A(X##1) A(X##2) A(X##3) A(X##4) A(X##5) A(X##6) A(X##7) \
+             A(X##8) A(X##9) A(X##A) A(X##B) A(X##C) A(X##D) A(X##E) A(X##F)
+#define C(X) B(X##0) B(X##1) B(X##2) B(X##3) B(X##4) B(X##5) B(X##6) B(X##7) \
+             B(X##8) B(X##9) B(X##A) B(X##B) B(X##C) B(X##D) B(X##E) B(X##F)
+
+struct foo {
+  C(x);   // 256
+  C(y);   // 256
+  C(z);
+};
+
+
+int test(struct foo *F) {
+   return F->xA1 + F->yFF + F->zC4;
+}
diff --git a/test/FrontendC/2004-11-25-UnnamedBitfieldPadding.c b/test/FrontendC/2004-11-25-UnnamedBitfieldPadding.c
new file mode 100644 (file)
index 0000000..b3f4a82
--- /dev/null
@@ -0,0 +1,8 @@
+// RUN: %llvmgcc -S %s -o /dev/null
+// This is a testcase for PR461
+typedef struct {
+  unsigned min_align: 1;
+  unsigned : 1;
+} addr_diff_vec_flags;
+
+addr_diff_vec_flags X;
diff --git a/test/FrontendC/2004-11-27-InvalidConstantExpr.c b/test/FrontendC/2004-11-27-InvalidConstantExpr.c
new file mode 100644 (file)
index 0000000..ee8642f
--- /dev/null
@@ -0,0 +1,10 @@
+// RUN: %llvmgcc %s -S -o - | not grep {foo\\* sub}
+// This should not produce a subtrace constantexpr of a pointer
+struct foo {
+  int Y;
+  char X[100];
+} F;
+
+int test(char *Y) {
+   return Y - F.X;
+} 
diff --git a/test/FrontendC/2004-11-27-StaticFunctionRedeclare.c b/test/FrontendC/2004-11-27-StaticFunctionRedeclare.c
new file mode 100644 (file)
index 0000000..b1e1421
--- /dev/null
@@ -0,0 +1,15 @@
+// RUN: %llvmgcc -c -emit-llvm %s -o - | \
+// RUN:   opt -std-compile-opts | llvm-dis | not grep {declare i32.*func}
+
+// There should not be an unresolved reference to func here.  Believe it or not,
+// the "expected result" is a function named 'func' which is internal and 
+// referenced by bar().
+
+// This is PR244
+
+static int func();
+void bar() {
+  int func();
+  foo(func);
+}
+static int func(char** A, char ** B) {}
diff --git a/test/FrontendC/2004-11-27-VariableSizeInStructure.c b/test/FrontendC/2004-11-27-VariableSizeInStructure.c
new file mode 100644 (file)
index 0000000..bd63ae3
--- /dev/null
@@ -0,0 +1,11 @@
+// RUN: %llvmgcc %s -S -o /dev/null
+
+// GCC allows variable sized arrays in structures, crazy!
+
+// This is PR360.
+
+int sub1(int i, char *pi) {
+  typedef int foo[i];
+  struct bar {foo f1; int f2;} *p = (struct bar *) pi;
+  return p->f2;
+}
diff --git a/test/FrontendC/2005-01-02-ConstantInits.c b/test/FrontendC/2005-01-02-ConstantInits.c
new file mode 100644 (file)
index 0000000..735278e
--- /dev/null
@@ -0,0 +1,24 @@
+// RUN: %llvmgcc %s -S -o -
+
+// This tests all kinds of hard cases with initializers and
+// array subscripts.  This corresponds to PR487.
+
+struct X { int a[2]; };
+
+int test() {
+  static int i23 = (int) &(((struct X *)0)->a[1]);
+  return i23;
+}
+
+int i = (int) &( ((struct X *)0) -> a[1]);
+
+int Arr[100];
+
+int foo(int i) { return bar(&Arr[49])+bar(&Arr[i]); }
+int foo2(int i) { 
+  static const int *X = &Arr[49];
+   static int i23 = (int) &( ((struct X *)0) -> a[0]);
+  int *P = Arr;
+  ++P;
+  return bar(Arr+i);
+}
diff --git a/test/FrontendC/2005-01-02-PointerDifference.c b/test/FrontendC/2005-01-02-PointerDifference.c
new file mode 100644 (file)
index 0000000..a351da2
--- /dev/null
@@ -0,0 +1,3 @@
+// RUN: %llvmgcc -xc %s -c -o - | llvm-dis | grep -v div
+
+int Diff(int *P, int *Q) { return P-Q; }
diff --git a/test/FrontendC/2005-01-02-VAArgError-ICE.c b/test/FrontendC/2005-01-02-VAArgError-ICE.c
new file mode 100644 (file)
index 0000000..db82558
--- /dev/null
@@ -0,0 +1,10 @@
+// This file is erroneous, but should not cause the compiler to ICE.
+// PR481
+// RUN: %llvmgcc %s -S -o /dev/null |& not grep {internal compiler error}
+
+#include <stdarg.h>
+int flags(int a, int b, ...) {
+        va_list         args;
+        va_start(args,a);       // not the last named arg
+        foo(args);
+}
diff --git a/test/FrontendC/2005-02-20-AggregateSAVEEXPR.c b/test/FrontendC/2005-02-20-AggregateSAVEEXPR.c
new file mode 100644 (file)
index 0000000..7a95533
--- /dev/null
@@ -0,0 +1,19 @@
+// RUN: %llvmgcc %s -o /dev/null -S
+// Note:
+//  We fail this on Sparc because the C library seems to be missing complex.h
+//  and the corresponding C99 complex support.
+//
+//  We could modify the test to use only GCC extensions, but I don't know if
+//  that would change the nature of the test.
+//
+// XFAIL: sparc
+
+#ifdef __CYGWIN__
+  #include <mingw/complex.h>
+#else
+  #include <complex.h>
+#endif
+
+int foo(complex float c) {
+    return creal(c);
+}
diff --git a/test/FrontendC/2005-02-27-MarkGlobalConstant.c b/test/FrontendC/2005-02-27-MarkGlobalConstant.c
new file mode 100644 (file)
index 0000000..4d24d0c
--- /dev/null
@@ -0,0 +1,10 @@
+// RUN: %llvmgcc -xc %s -S -o - | grep {internal constant }
+
+// The synthetic global made by the CFE for big initializer should be marked
+// constant.
+
+void bar();
+void foo() {
+  char Blah[] = "asdlfkajsdlfkajsd;lfkajds;lfkjasd;flkajsd;lkfja;sdlkfjasd";
+  bar(Blah);
+}
diff --git a/test/FrontendC/2005-03-05-OffsetOfHack.c b/test/FrontendC/2005-03-05-OffsetOfHack.c
new file mode 100644 (file)
index 0000000..8df7231
--- /dev/null
@@ -0,0 +1,12 @@
+// RUN: %llvmgcc %s -S -o - 
+
+struct s {
+  unsigned long int field[0];
+};
+
+#define OFFS \
+        (((char *) &((struct s *) 0)->field[0]) - (char *) 0)
+
+int foo[OFFS];
+
+
diff --git a/test/FrontendC/2005-03-06-OffsetOfStructCrash.c b/test/FrontendC/2005-03-06-OffsetOfStructCrash.c
new file mode 100644 (file)
index 0000000..91e6862
--- /dev/null
@@ -0,0 +1,14 @@
+// RUN: %llvmgcc %s -S -o -
+
+struct Y {};
+struct XXX {
+  struct  Y F;
+};
+
+void test1() {
+   (int)&((struct XXX*)(((void *)0)))->F;
+}
+
+void test2() {
+   &((struct XXX*)(((void *)0)))->F;
+}
diff --git a/test/FrontendC/2005-03-11-Prefetch.c b/test/FrontendC/2005-03-11-Prefetch.c
new file mode 100644 (file)
index 0000000..bf79653
--- /dev/null
@@ -0,0 +1,6 @@
+// RUN: %llvmgcc %s -S -o - | llvm-as | llvm-dis | grep llvm.prefetch
+
+void foo(int *P) {
+  __builtin_prefetch(P);
+  __builtin_prefetch(P, 1);
+}
diff --git a/test/FrontendC/2005-04-09-ComplexOps.c b/test/FrontendC/2005-04-09-ComplexOps.c
new file mode 100644 (file)
index 0000000..2962b74
--- /dev/null
@@ -0,0 +1,9 @@
+// RUN: %llvmgcc %s -S -o -
+
+#include <math.h>
+#define I 1.0iF
+
+double __complex test(double X) { return ~-(X*I); }
+
+_Bool EQ(double __complex A, double __complex B) { return A == B; }
+_Bool NE(double __complex A, double __complex B) { return A != B; }
diff --git a/test/FrontendC/2005-05-06-CountBuiltins.c b/test/FrontendC/2005-05-06-CountBuiltins.c
new file mode 100644 (file)
index 0000000..da40a14
--- /dev/null
@@ -0,0 +1,17 @@
+// RUN: %llvmgcc %s -S -o - | llvm-as | llvm-dis | not grep call.*__builtin
+
+int G, H, I;
+void foo(int P) {
+  G = __builtin_clz(P);
+  H = __builtin_ctz(P);
+  I = __builtin_popcount(P);
+}
+
+long long g, h, i;
+void fooll(float P) {
+  g = __builtin_clzll(P);
+  g = __builtin_clzll(P);
+  h = __builtin_ctzll(P);
+  i = __builtin_popcountll(P);
+}
+
diff --git a/test/FrontendC/2005-05-10-GlobalUnionInit.c b/test/FrontendC/2005-05-10-GlobalUnionInit.c
new file mode 100644 (file)
index 0000000..443064c
--- /dev/null
@@ -0,0 +1,6 @@
+// RUN: %llvmgcc %s -S -o -
+
+union A {                    // { uint }
+  union B { double *C; } D;
+} E = { { (double*)12312 } };
+
diff --git a/test/FrontendC/2005-06-15-ExpandGotoInternalProblem.c b/test/FrontendC/2005-06-15-ExpandGotoInternalProblem.c
new file mode 100644 (file)
index 0000000..d7d03ba
--- /dev/null
@@ -0,0 +1,14 @@
+// RUN: %llvmgcc -std=c99 %s -S -o - | llvm-as | \
+// RUN:    opt -std-compile-opts -disable-output
+// PR580
+
+int X, Y;
+int foo() {
+  int i;
+        for (i=0; i<100; i++ )
+        {
+                break;
+                i = ( X || Y ) ;
+        }
+}
+
diff --git a/test/FrontendC/2005-07-20-SqrtNoErrno.c b/test/FrontendC/2005-07-20-SqrtNoErrno.c
new file mode 100644 (file)
index 0000000..fd976a6
--- /dev/null
@@ -0,0 +1,7 @@
+// RUN: %llvmgcc %s -S -o - -fno-math-errno | gccas | llvm-dis | grep llvm.sqrt
+#include <math.h>
+
+float foo(float X) {
+  // Check that this compiles to llvm.sqrt when errno is ignored.
+  return sqrtf(X);
+}
diff --git a/test/FrontendC/2005-07-26-UnionInitCrash.c b/test/FrontendC/2005-07-26-UnionInitCrash.c
new file mode 100644 (file)
index 0000000..563278a
--- /dev/null
@@ -0,0 +1,3 @@
+// PR607
+// RUN: %llvmgcc %s -S -o -
+union { char bytes[8]; double alignment; }EQ1 = {0,0,0,0,0,0,0,0};
diff --git a/test/FrontendC/2005-07-28-IncorrectWeakGlobal.c b/test/FrontendC/2005-07-28-IncorrectWeakGlobal.c
new file mode 100644 (file)
index 0000000..1a8c409
--- /dev/null
@@ -0,0 +1,5 @@
+// RUN: %llvmgcc %s -S -o - | grep TheGlobal | not grep weak
+
+extern int TheGlobal;
+int foo() { return TheGlobal; }
+int TheGlobal = 1;
diff --git a/test/FrontendC/2005-09-20-ComplexConstants.c b/test/FrontendC/2005-09-20-ComplexConstants.c
new file mode 100644 (file)
index 0000000..db98fc2
--- /dev/null
@@ -0,0 +1,4 @@
+// RUN: %llvmgcc %s -S -o - | llvm-as -o /dev/null -f
+
+const double _Complex x[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}; 
+
diff --git a/test/FrontendC/2005-09-24-AsmUserPrefix.c b/test/FrontendC/2005-09-24-AsmUserPrefix.c
new file mode 100644 (file)
index 0000000..9b9b153
--- /dev/null
@@ -0,0 +1,8 @@
+// RUN: %llvmgcc %s -S -o - | llvm-as | opt -std-compile-opts | llc | \
+// RUN:    not grep _foo2
+
+void foo() __asm__("foo2");
+
+void bar() {
+  foo();
+}
diff --git a/test/FrontendC/2005-09-24-BitFieldCrash.c b/test/FrontendC/2005-09-24-BitFieldCrash.c
new file mode 100644 (file)
index 0000000..b4c85ff
--- /dev/null
@@ -0,0 +1,33 @@
+// RUN: %llvmgcc %s -S -o - 
+
+struct tree_common {};
+
+struct tree_int_cst {
+ struct tree_common common;
+  struct tree_int_cst_lowhi {
+    unsigned long long low;
+    long long high;
+  } int_cst;
+};
+
+enum XXX { yyy };
+
+struct tree_function_decl {
+  struct tree_common common;
+  long long locus, y;
+  __extension__ enum  XXX built_in_class : 2;
+
+};
+
+
+union tree_node {
+  struct tree_int_cst int_cst;
+  struct tree_function_decl function_decl;
+};
+
+
+void foo (union tree_node * decl) {
+  decl->function_decl.built_in_class != 0;
+}
+
+
diff --git a/test/FrontendC/2005-10-18-VariableSizedElementCrash.c b/test/FrontendC/2005-10-18-VariableSizedElementCrash.c
new file mode 100644 (file)
index 0000000..867e4d2
--- /dev/null
@@ -0,0 +1,9 @@
+// RUN: %llvmgcc %s -S -o -
+
+int sub1(int i, char *pi) {
+  typedef int foo[i];
+  struct bar {foo f1; int f2:3; int f3:4} *p = (struct bar *) pi;
+  xxx(p->f1);  
+  return p->f3;
+}
+
diff --git a/test/FrontendC/2005-12-04-AttributeUsed.c b/test/FrontendC/2005-12-04-AttributeUsed.c
new file mode 100644 (file)
index 0000000..33e27e8
--- /dev/null
@@ -0,0 +1,8 @@
+// RUN: %llvmgcc %s -S -emit-llvm -o - | llvm-as | llvm-dis | \
+// RUN:   grep llvm.used | grep foo | grep X
+
+int X __attribute__((used));
+int Y;
+
+__attribute__((used)) void foo() {}
+
diff --git a/test/FrontendC/2005-12-04-DeclarationLineNumbers.c b/test/FrontendC/2005-12-04-DeclarationLineNumbers.c
new file mode 100644 (file)
index 0000000..0ced92e
--- /dev/null
@@ -0,0 +1,23 @@
+// RUN: %llvmgcc %s -S -g -o - | grep {llvm.dbg.stoppoint.*i32 14}
+// PR664: ensure that line #'s are emitted for declarations
+
+
+short test(short br_data_0,
+short br_data_1,
+short br_data_2,
+short br_data_3,
+short br_data_4,
+short br_data_5,
+short br_data_6,
+short br_data_7) {
+
+short sm07 = br_data_0 + br_data_7;
+short sm16 = br_data_1 + br_data_6;
+short sm25 = br_data_2 + br_data_5;
+short sm34 = br_data_3 + br_data_4;
+short s0734 = sm07 + sm34;
+short s1625 = sm16 + sm25;
+
+return s0734 + s1625;
+}
+
diff --git a/test/FrontendC/2006-01-13-Includes.c b/test/FrontendC/2006-01-13-Includes.c
new file mode 100644 (file)
index 0000000..46e7867
--- /dev/null
@@ -0,0 +1,9 @@
+// RUN: %llvmgcc %s -g -S -o - | llvm-as | opt -std-compile-opts | \
+// RUN:   llvm-dis | grep {test/CFrontend}
+// PR676
+
+#include <stdio.h>
+
+void test() {
+  printf("Hello World\n");
+}
diff --git a/test/FrontendC/2006-01-13-StackSave.c b/test/FrontendC/2006-01-13-StackSave.c
new file mode 100644 (file)
index 0000000..dfe00fb
--- /dev/null
@@ -0,0 +1,11 @@
+// PR691
+// RUN: %llvmgcc %s -S -o - | llvm-as | opt -std-compile-opts | \
+// RUN:    llvm-dis | grep llvm.stacksave
+
+void test(int N) {
+  int i;
+  for (i = 0; i < N; ++i) {
+    int VLA[i];
+    external(VLA);
+  }
+}
diff --git a/test/FrontendC/2006-01-16-BitCountIntrinsicsUnsigned.c b/test/FrontendC/2006-01-16-BitCountIntrinsicsUnsigned.c
new file mode 100644 (file)
index 0000000..598ffb5
--- /dev/null
@@ -0,0 +1,9 @@
+// RUN: %llvmgcc -S %s -o - | grep {llvm.ctlz.i32( i32} | count 2
+// RUN: %llvmgcc -S %s -o - | grep {llvm.ctlz.i32(i32} | count 1
+
+unsigned t2(unsigned X) {
+  return __builtin_clz(X);
+}
+int t1(int X) {
+  return __builtin_clz(X);
+}
diff --git a/test/FrontendC/2006-01-23-FileScopeAsm.c b/test/FrontendC/2006-01-23-FileScopeAsm.c
new file mode 100644 (file)
index 0000000..fb55a41
--- /dev/null
@@ -0,0 +1,8 @@
+// RUN: %llvmgcc %s -S -o - | llvm-as | opt -std-compile-opts | \
+// RUN:    llvm-dis | grep {foo\[12345\]} | count 5
+
+__asm__ ("foo1");
+__asm__ ("foo2");
+__asm__ ("foo3");
+__asm__ ("foo4");
+__asm__ ("foo5");
diff --git a/test/FrontendC/2006-03-03-MissingInitializer.c b/test/FrontendC/2006-03-03-MissingInitializer.c
new file mode 100644 (file)
index 0000000..0d09d29
--- /dev/null
@@ -0,0 +1,11 @@
+// RUN: %llvmgcc %s -S -o - | llvm-as | opt -std-compile-opts | \
+// RUN:    llvm-dis | grep {@nate.*internal global i32 0}
+
+struct X { int *XX; int Y;};
+
+void foo() {
+  static int nate = 0;
+  struct X bob = { &nate, 14 };
+  bar(&bob);
+}
+
diff --git a/test/FrontendC/2006-03-16-VectorCtor.c b/test/FrontendC/2006-03-16-VectorCtor.c
new file mode 100644 (file)
index 0000000..b95593b
--- /dev/null
@@ -0,0 +1,10 @@
+// Test that basic generic vector support works
+// RUN: %llvmgcc %s -S -o -
+
+typedef int v4si __attribute__ ((__vector_size__ (16)));
+void test(v4si *P, v4si *Q, float X) {
+  *P = (v4si){ X, X, X, X } * *Q;
+}
+
+v4si G = (v4si){ 0.1, 1.2, 4.2, 17.2 };
+
diff --git a/test/FrontendC/2006-03-17-KnRMismatch.c b/test/FrontendC/2006-03-17-KnRMismatch.c
new file mode 100644 (file)
index 0000000..1939112
--- /dev/null
@@ -0,0 +1,8 @@
+// RUN: %llvmgcc %s -S -o -
+
+void regnode(int op);
+
+void regnode(op)
+char op;
+{
+}
diff --git a/test/FrontendC/2006-05-01-AppleAlignmentPragma.c b/test/FrontendC/2006-05-01-AppleAlignmentPragma.c
new file mode 100644 (file)
index 0000000..c9050aa
--- /dev/null
@@ -0,0 +1,12 @@
+// RUN: %llvmgcc %s -S -o -
+
+#ifdef __APPLE__
+/* test that X is layed out correctly when this pragma is used. */
+#pragma options align=mac68k
+#endif
+
+struct S {
+  unsigned A;
+  unsigned short B;
+} X;
+
diff --git a/test/FrontendC/2006-05-19-SingleEltReturn.c b/test/FrontendC/2006-05-19-SingleEltReturn.c
new file mode 100644 (file)
index 0000000..70c94c6
--- /dev/null
@@ -0,0 +1,23 @@
+// Test returning a single element aggregate value containing a double.
+// RUN: %llvmgcc %s -S -o -
+
+struct X {
+  double D;
+};
+
+struct Y { 
+  struct X x; 
+};
+
+struct Y bar();
+
+void foo(struct Y *P) {
+  *P = bar();
+}
+
+struct Y bar() {
+  struct Y a;
+  a.x.D = 0;
+  return a;
+}
+
diff --git a/test/FrontendC/2006-07-31-PR854.c b/test/FrontendC/2006-07-31-PR854.c
new file mode 100644 (file)
index 0000000..516085a
--- /dev/null
@@ -0,0 +1,11 @@
+// RUN: %llvmgcc %s -S -o -
+// PR854
+  struct kernel_symbol {
+    unsigned long value;
+  };
+  unsigned long loops_per_jiffy = (1<<12);
+  static const char __kstrtab_loops_per_jiffy[]
+__attribute__((section("__ksymtab_strings"))) = "loops_per_jiffy";
+  static const struct kernel_symbol __ksymtab_loops_per_jiffy
+__attribute__((__used__)) __attribute__((section("__ksymtab"))) = { (unsigned
+long)&loops_per_jiffy, __kstrtab_loops_per_jiffy };
diff --git a/test/FrontendC/2006-09-11-BitfieldRefCrash.c b/test/FrontendC/2006-09-11-BitfieldRefCrash.c
new file mode 100644 (file)
index 0000000..d06cc3a
--- /dev/null
@@ -0,0 +1,12 @@
+// RUN: %llvmgcc %s -S -o -
+// PR906
+
+struct state_struct {
+  unsigned long long phys_frame: 50;
+  unsigned valid : 2;
+} s;
+
+int mem_access(struct state_struct *p) {
+  return p->valid;
+}
+
diff --git a/test/FrontendC/2006-09-18-fwrite-cast-crash.c b/test/FrontendC/2006-09-18-fwrite-cast-crash.c
new file mode 100644 (file)
index 0000000..8ba2052
--- /dev/null
@@ -0,0 +1,13 @@
+// RUN: %llvmgcc %s -S -o -
+// PR910
+
+struct l_struct_2E_FILE { char x; };
+unsigned fwrite(signed char *, unsigned , unsigned , signed char *);
+static signed char str301[39];
+static void Usage(signed char *ltmp_611_6) {
+  struct l_struct_2E_FILE *ltmp_6202_16;
+  unsigned ltmp_6203_92;
+  ltmp_6203_92 =  /*tail*/ ((unsigned  (*) (signed char *, unsigned , unsigned ,
+struct l_struct_2E_FILE *))(void*)fwrite)((&(str301[0u])), 38u, 1u, ltmp_6202_16);
+}
+
diff --git a/test/FrontendC/2006-09-21-IncompleteElementType.c b/test/FrontendC/2006-09-21-IncompleteElementType.c
new file mode 100644 (file)
index 0000000..a509182
--- /dev/null
@@ -0,0 +1,3 @@
+// RUN: not %llvmgcc %s -S -o /dev/null |& not grep {internal compiler error}
+
+struct A X[(927 - 37) / sizeof(struct A)];
diff --git a/test/FrontendC/2006-09-25-DebugFilename.c b/test/FrontendC/2006-09-25-DebugFilename.c
new file mode 100644 (file)
index 0000000..eea52ba
--- /dev/null
@@ -0,0 +1,6 @@
+// RUN: not %llvmgcc -xc %s -S -o /dev/null |& \
+// RUN:   grep fluffy | grep 2006-09-25-DebugFilename.c
+#include "2006-09-25-DebugFilename.h"
+int func1() { return hfunc1(); }
+int func2() { fluffy; return hfunc1(); }
+
diff --git a/test/FrontendC/2006-09-25-DebugFilename.h b/test/FrontendC/2006-09-25-DebugFilename.h
new file mode 100644 (file)
index 0000000..9b03666
--- /dev/null
@@ -0,0 +1,6 @@
+extern int exfunc(int a);
+
+static inline int hfunc1()
+{
+  return exfunc(1);
+}
diff --git a/test/FrontendC/2006-09-28-SimpleAsm.c b/test/FrontendC/2006-09-28-SimpleAsm.c
new file mode 100644 (file)
index 0000000..e304020
--- /dev/null
@@ -0,0 +1,10 @@
+// RUN: %llvmgcc %s -S -o - | grep {ext: xorl %eax, eax; movl}
+// RUN: %llvmgcc %s -S -o - | grep {nonext: xorl %eax, %eax; mov}
+// PR924
+
+void bar() {
+   // Extended asm
+   asm volatile ("ext: xorl %%eax, eax; movl eax, fs; movl eax, gs  %%blah %= %% " : : "r"(1));
+   // Non-extended asm.
+   asm volatile ("nonext: xorl %eax, %eax; movl %eax, %fs; movl %eax, %gs  %%blah %= %% ");
+}
diff --git a/test/FrontendC/2006-10-30-ArrayCrash.c b/test/FrontendC/2006-10-30-ArrayCrash.c
new file mode 100644 (file)
index 0000000..09464dd
--- /dev/null
@@ -0,0 +1,17 @@
+// RUN: %llvmgcc -O3 -S -o - %s
+// PR954, PR911
+
+extern void foo();
+
+struct S {
+  short        f1[3];
+  unsigned int f2 : 1;
+};
+
+void bar()
+{
+  struct S *A;
+
+  if (A->f2)
+    foo();
+}
diff --git a/test/FrontendC/2006-12-14-ordered_expr.c b/test/FrontendC/2006-12-14-ordered_expr.c
new file mode 100644 (file)
index 0000000..8ff2eb6
--- /dev/null
@@ -0,0 +1,6 @@
+// RUN: %llvmgcc -O3 -S %s -o - | grep {fcmp ord float %X, %Y}
+
+int test2(float X, float Y) {
+  return !__builtin_isunordered(X, Y);
+}
+
diff --git a/test/FrontendC/2007-01-06-KNR-Proto.c b/test/FrontendC/2007-01-06-KNR-Proto.c
new file mode 100644 (file)
index 0000000..eb2f254
--- /dev/null
@@ -0,0 +1,10 @@
+// RUN: %llvmgcc -S -o - -emit-llvm %s
+// PR1083
+
+int svc_register (void (*dispatch) (int));
+
+int svc_register (dispatch)
+     void (*dispatch) ();
+{
+}
+
diff --git a/test/FrontendC/2007-01-20-VectorICE.c b/test/FrontendC/2007-01-20-VectorICE.c
new file mode 100644 (file)
index 0000000..c2dcdef
--- /dev/null
@@ -0,0 +1,11 @@
+// RUN: %llvmgcc %s -S -o - 
+
+typedef float __m128 __attribute__((__vector_size__(16)));
+typedef long long __v2di __attribute__((__vector_size__(16)));
+typedef int __v4si __attribute__((__vector_size__(16)));
+
+__v2di  bar(void);
+void foo(int X, __v4si *P) {
+       *P = X == 2 ? bar() : bar();
+}
+
diff --git a/test/FrontendC/2007-01-24-InlineAsmCModifier.c b/test/FrontendC/2007-01-24-InlineAsmCModifier.c
new file mode 100644 (file)
index 0000000..5735cce
--- /dev/null
@@ -0,0 +1,10 @@
+// Verify that the %c modifier works and strips off any prefixes from 
+// immediates.
+// RUN: %llvmgcc -S %s -o - | llvm-as | llc | grep {pickANumber: 789514}
+
+void foo() {
+  __asm__         volatile("/* " "pickANumber" ": %c0 */"::"i"(0xC0C0A));
+  
+  // Check that non-c modifiers work also (not greped for above).
+   __asm__         volatile("/* " "pickANumber2 " ": %0 */"::"i"(123));
+}
diff --git a/test/FrontendC/2007-02-04-AddrLValue-2.c b/test/FrontendC/2007-02-04-AddrLValue-2.c
new file mode 100644 (file)
index 0000000..90251e6
--- /dev/null
@@ -0,0 +1,13 @@
+// RUN: %llvmgcc %s -O3 -S -o - -emit-llvm
+// PR1173
+
+struct S { char s; };
+struct T { struct S t; };
+
+struct S *const p = &((struct T * const) (0x4000))->t;
+
+void
+foo (void)
+{
+  p->s = 0;
+}
diff --git a/test/FrontendC/2007-02-04-AddrLValue.c b/test/FrontendC/2007-02-04-AddrLValue.c
new file mode 100644 (file)
index 0000000..c8b65a9
--- /dev/null
@@ -0,0 +1,23 @@
+// RUN: %llvmgcc %s -O3 -S -o - -emit-llvm
+// PR1176
+
+typedef struct
+{
+  char *key;
+  char *value;
+} T1;
+
+typedef struct
+{
+  long type;
+  char *value;
+} T3;
+
+T1 a[] =
+{
+  {
+    "",
+    ((char *)&((T3) {1, (char *) 1}))
+  }
+};
+
diff --git a/test/FrontendC/2007-02-04-EmptyStruct.c b/test/FrontendC/2007-02-04-EmptyStruct.c
new file mode 100644 (file)
index 0000000..48ad31f
--- /dev/null
@@ -0,0 +1,9 @@
+// RUN: %llvmgcc %s -O3 -S -o - -emit-llvm
+// PR1175
+
+struct empty { };
+
+void foo(struct empty *p) {
+   p++;
+}
+
diff --git a/test/FrontendC/2007-02-04-WITH_SIZE_EXPR.c b/test/FrontendC/2007-02-04-WITH_SIZE_EXPR.c
new file mode 100644 (file)
index 0000000..f02a44b
--- /dev/null
@@ -0,0 +1,21 @@
+// RUN: %llvmgcc %s -O3 -S -o - -emit-llvm
+// PR1174
+
+void zzz (char *s1, char *s2, int len, int *q)
+{
+  int z = 5;
+  unsigned int i,  b;
+  struct { char a[z]; } x;
+          
+  for (i = 0; i < len; i++)
+    s1[i] = s2[i];
+
+  b = z & 0x3;
+
+  len += (b == 0 ? 0 : 1) + z;
+    
+  *q = len;
+
+  foo (x, x);
+}
+
diff --git a/test/FrontendC/2007-02-05-nested.c b/test/FrontendC/2007-02-05-nested.c
new file mode 100644 (file)
index 0000000..be23f17
--- /dev/null
@@ -0,0 +1,54 @@
+// RUN: %llvmgcc -S -fnested-functions -O0 -o - -emit-llvm %s 
+// PR915
+
+extern void abort(void);
+
+void nest(int n)
+{
+  int a = 0;
+  int b = 5;
+  int c = 0;
+  int d = 7;
+
+  void o(int i, int j)
+  {
+    if (i!=j)
+      abort();
+  }
+
+  void f(x)
+    int x; /* K&R style */
+  {
+    int e = 0;
+    int f = 2;
+    int g = 0;
+
+    void y(void)
+    {
+      c = n;
+      e = 1;
+      g = x;
+    }
+
+    void z(void)
+    {
+      a = 4;
+      g = 3;
+    }
+
+    a = 5;
+    y();
+    c = x;
+    z();
+    o(1,e);
+    o(2,f);
+    o(3,g);
+  }
+
+  c = 2;
+  f(6);
+  o(4,a);
+  o(5,b);
+  o(6,c);
+  o(7,d);
+}
diff --git a/test/FrontendC/2007-02-07-AddrLabel.c b/test/FrontendC/2007-02-07-AddrLabel.c
new file mode 100644 (file)
index 0000000..144f62d
--- /dev/null
@@ -0,0 +1,10 @@
+// PR947
+// RUN: %llvmgcc %s -c -o - 
+
+void foo() {
+    void *ptr;
+  label:
+    ptr = &&label;
+
+    goto *ptr;
+  }
diff --git a/test/FrontendC/2007-02-16-VariableSizeStructArg.c b/test/FrontendC/2007-02-16-VariableSizeStructArg.c
new file mode 100644 (file)
index 0000000..fd07cd8
--- /dev/null
@@ -0,0 +1,7 @@
+// RUN: %llvmgcc -S %s -o - 
+// PR1170
+int f(int a, struct {int b[a];} c) {  return c.b[0]; }
+
+int g(struct {int b[1];} c) {
+  return c.b[0];
+}
diff --git a/test/FrontendC/2007-02-16-VoidPtrDiff.c b/test/FrontendC/2007-02-16-VoidPtrDiff.c
new file mode 100644 (file)
index 0000000..713b9b2
--- /dev/null
@@ -0,0 +1,5 @@
+// RUN: %llvmgcc %s -S -o - -emit-llvm
+
+void foo(void *ptr, int test) {
+  (ptr - ((void *) test + 0x2000));
+}
diff --git a/test/FrontendC/2007-02-16-WritableStrings.c b/test/FrontendC/2007-02-16-WritableStrings.c
new file mode 100644 (file)
index 0000000..d11fa08
--- /dev/null
@@ -0,0 +1,8 @@
+// Test the -fwritable-strings option.
+
+// RUN: %llvmgcc -O3 -S -o - -emit-llvm -fwritable-strings %s | \
+// RUN:    grep {internal global}
+// RUN: %llvmgcc -O3 -S -o - -emit-llvm %s | grep {internal constant}
+
+char *X = "foo";
+
diff --git a/test/FrontendC/2007-02-25-C-DotDotDot.c b/test/FrontendC/2007-02-25-C-DotDotDot.c
new file mode 100644 (file)
index 0000000..9696022
--- /dev/null
@@ -0,0 +1,12 @@
+// RUN: %llvmgcc -O0 -S -o - -emit-llvm -fno-inline -fno-unit-at-a-time %s | \
+// RUN:   grep {call float @foo}
+
+// Make sure the call to foo is compiled as:
+//  call float @foo()
+// not
+//  call float (...)* bitcast (float ()* @foo to float (...)*)( )
+
+static float foo() { return 0.0; }
+float bar() { return foo()*10.0;}
+
+
diff --git a/test/FrontendC/2007-03-01-VarSizeArrayIdx.c b/test/FrontendC/2007-03-01-VarSizeArrayIdx.c
new file mode 100644 (file)
index 0000000..a3d480c
--- /dev/null
@@ -0,0 +1,7 @@
+// RUN: %llvmgcc %s -O3 -S -o - -emit-llvm | grep mul
+// PR1233
+
+float foo(int w, float A[][w], int g, int h) {
+  return A[g][0];
+}
+
diff --git a/test/FrontendC/2007-03-05-DataLayout.c b/test/FrontendC/2007-03-05-DataLayout.c
new file mode 100644 (file)
index 0000000..18819f1
--- /dev/null
@@ -0,0 +1,53 @@
+// Testcase for PR1242
+// RUN: %llvmgcc -S %s -o - | grep datalayout | \
+// RUN:    not grep {"\[Ee\]-p:\[36\]\[24\]:\[36\]\[24\]"}
+// END.
+#include <stdlib.h>
+#define NDIM 3
+#define BODY 01
+typedef double vector[NDIM];
+typedef struct bnode* bodyptr;
+// { i16, double, [3 x double], i32, i32, [3 x double], [3 x double], [3 x
+// double], double, \2 *, \2 * }
+struct bnode {
+  short int type;
+  double mass;
+  vector pos;
+  int proc;
+  int new_proc;
+  vector vel;
+  vector acc;
+  vector new_acc;
+  double phi;
+  bodyptr next;
+  bodyptr proc_next;
+} body;
+
+#define Type(x) ((x)->type)
+#define Mass(x) ((x)->mass)
+#define Pos(x)  ((x)->pos)
+#define Proc(x) ((x)->proc)
+#define New_Proc(x) ((x)->new_proc)
+#define Vel(x)  ((x)->vel)
+#define Acc(x)  ((x)->acc)
+#define New_Acc(x)  ((x)->new_acc)
+#define Phi(x)  ((x)->phi)
+#define Next(x) ((x)->next)
+#define Proc_Next(x) ((x)->proc_next)
+
+bodyptr ubody_alloc(int p)
+{ 
+  register bodyptr tmp;
+  tmp = (bodyptr)malloc(sizeof(body));
+
+  Type(tmp) = BODY;
+  Proc(tmp) = p;
+  Proc_Next(tmp) = NULL;
+  New_Proc(tmp) = p;
+  return tmp;
+}
+
+int main(int argc, char** argv) {
+  bodyptr b = ubody_alloc(17);
+  return 0;
+}
diff --git a/test/FrontendC/2007-03-06-VarSizeInStruct1.c b/test/FrontendC/2007-03-06-VarSizeInStruct1.c
new file mode 100644 (file)
index 0000000..8d28a1d
--- /dev/null
@@ -0,0 +1,8 @@
+// RUN: %llvmgcc %s -S -o -
+void* p (int n) {
+  struct f {
+    char w; char x[n]; char z[];
+  } F;
+  F.x[0]='x';
+  return &F;
+}
diff --git a/test/FrontendC/2007-03-06-VarSizeInStruct2.c b/test/FrontendC/2007-03-06-VarSizeInStruct2.c
new file mode 100644 (file)
index 0000000..13bc3aa
--- /dev/null
@@ -0,0 +1,8 @@
+// RUN: %llvmgcc %s -S -o -
+char p (int n) {
+  struct f {
+    char w; char x[n]; char y[n];
+  } F;
+
+  return F.x[0];
+}
diff --git a/test/FrontendC/2007-03-26-BitfieldAfterZeroWidth.c b/test/FrontendC/2007-03-26-BitfieldAfterZeroWidth.c
new file mode 100644 (file)
index 0000000..9b6a869
--- /dev/null
@@ -0,0 +1,6 @@
+// RUN: %llvmgcc %s -S -o -
+struct W {};
+struct Y {
+  struct W w;
+  int i:1;
+} __attribute__ ((packed)) y;
diff --git a/test/FrontendC/2007-03-26-ZeroWidthBitfield.c b/test/FrontendC/2007-03-26-ZeroWidthBitfield.c
new file mode 100644 (file)
index 0000000..89bfb8e
--- /dev/null
@@ -0,0 +1,2 @@
+// RUN: %llvmgcc %s -S -o -
+struct Z { int :0; } z;
diff --git a/test/FrontendC/2007-03-27-ArrayCompatible.c b/test/FrontendC/2007-03-27-ArrayCompatible.c
new file mode 100644 (file)
index 0000000..fa3d2db
--- /dev/null
@@ -0,0 +1,10 @@
+// RUN: %llvmgcc -S %s -O2 -o - | grep {ret i8 0}
+static char c(int n) {
+  char x[2][n];
+  x[1][0]=0;
+  return *(n+(char *)x);
+}
+
+char d(void) {
+  return c(2);
+}
diff --git a/test/FrontendC/2007-03-27-VarLengthArray.c b/test/FrontendC/2007-03-27-VarLengthArray.c
new file mode 100644 (file)
index 0000000..5bebe9b
--- /dev/null
@@ -0,0 +1,7 @@
+// RUN: %llvmgcc -S %s -o - | grep {getelementptr i32}
+extern void f(int *);
+int e(int m, int n) {
+  int x[n];
+  f(x);
+  return x[m];
+}
diff --git a/test/FrontendC/2007-04-05-PackedBitFields-2.c b/test/FrontendC/2007-04-05-PackedBitFields-2.c
new file mode 100644 (file)
index 0000000..d9db420
--- /dev/null
@@ -0,0 +1,16 @@
+// RUN: %llvmgcc %s -S -o -
+
+# define pck __attribute__((packed))
+
+
+struct pck F { 
+  unsigned long long i : 12, 
+    j : 23, 
+    k : 27, 
+    l; 
+}; 
+struct F f1;
+
+void foo() {
+       f1.l = 5;
+}
diff --git a/test/FrontendC/2007-04-05-PackedBitFields.c b/test/FrontendC/2007-04-05-PackedBitFields.c
new file mode 100644 (file)
index 0000000..f9de356
--- /dev/null
@@ -0,0 +1,16 @@
+// RUN: %llvmgcc %s -S -o -
+
+# define pck __attribute__((packed))
+
+
+struct pck E { 
+  unsigned long long l, 
+    i : 12, 
+    j : 23, 
+    k : 29; };
+
+struct E e1;
+
+void foo() {
+       e1.k = 5;
+}
diff --git a/test/FrontendC/2007-04-05-PackedStruct.c b/test/FrontendC/2007-04-05-PackedStruct.c
new file mode 100644 (file)
index 0000000..0d524c4
--- /dev/null
@@ -0,0 +1,18 @@
+// RUN: %llvmgcc %s -S -o -
+
+#pragma pack(push, 2)
+
+enum {
+  tA = 0,
+  tB = 1
+};
+
+struct MyStruct {
+  unsigned long A;
+  char C;
+  void * B;
+};
+
+void bar(){
+struct MyStruct MS = { tB, 0 };
+}
diff --git a/test/FrontendC/2007-04-05-PadBeforeZeroLengthField.c b/test/FrontendC/2007-04-05-PadBeforeZeroLengthField.c
new file mode 100644 (file)
index 0000000..acc3821
--- /dev/null
@@ -0,0 +1,9 @@
+// RUN: %llvmgcc %s -S -o -
+struct c__ { unsigned int type:4; };
+union A { struct c__ c;  } __attribute__((aligned(8)));
+struct B {
+    unsigned int retainCount;
+    union A objects[];
+};
+void foo(union A * objects, struct B *array, unsigned long k)
+{  array->objects[k] = objects[k]; }
diff --git a/test/FrontendC/2007-04-05-UnPackedStruct.c b/test/FrontendC/2007-04-05-UnPackedStruct.c
new file mode 100644 (file)
index 0000000..9e168ed
--- /dev/null
@@ -0,0 +1,16 @@
+// RUN: %llvmgcc %s -S -o -
+
+
+enum {
+  tA = 0,
+  tB = 1
+};
+
+struct MyStruct {
+  unsigned long A;
+  void * B;
+};
+
+void bar(){
+struct MyStruct MS = { tB, 0 };
+}
diff --git a/test/FrontendC/2007-04-11-InlineAsmStruct.c b/test/FrontendC/2007-04-11-InlineAsmStruct.c
new file mode 100644 (file)
index 0000000..158a16e
--- /dev/null
@@ -0,0 +1,9 @@
+// RUN: %llvmgcc %s -S -emit-llvm -o - | llvm-as | llc
+
+struct V { short X, Y; };
+int bar() {
+  struct V bar;
+  __asm__ volatile("foo %0\n" : "=r"(bar));
+  return bar.X;
+}
+
diff --git a/test/FrontendC/2007-04-11-InlineAsmUnion.c b/test/FrontendC/2007-04-11-InlineAsmUnion.c
new file mode 100644 (file)
index 0000000..0435d64
--- /dev/null
@@ -0,0 +1,7 @@
+// RUN: %llvmgcc %s -S -emit-llvm -o - | llvm-as | llc
+
+union U { int x; float p; };
+void foo() {
+  union U bar;
+  __asm__ volatile("foo %0\n" : "=r"(bar));
+}
diff --git a/test/FrontendC/2007-04-11-InlineStorageClassC89.c b/test/FrontendC/2007-04-11-InlineStorageClassC89.c
new file mode 100644 (file)
index 0000000..ab1f556
--- /dev/null
@@ -0,0 +1,46 @@
+// RUN: %llvmgcc %s -S -emit-llvm -O0 -o - | grep define | grep xglobWeak | \
+// RUN:   grep weak | count 1
+// RUN: %llvmgcc %s -S -emit-llvm -O0 -o - | grep define | grep xextWeak | \
+// RUN:   grep weak | count 1
+// RUN: %llvmgcc %s -S -emit-llvm -O0 -o - | grep define | \
+// RUN:   grep xWeaknoinline | grep weak | count 1
+// RUN: %llvmgcc %s -S -emit-llvm -O0 -o - | grep define | \
+// RUN:   grep xWeakextnoinline | grep weak | count 1
+// RUN: %llvmgcc %s -S -emit-llvm -O0 -o - | grep define | \
+// RUN:   grep xglobnoWeak | grep -v internal | grep -v weak | \
+// RUN:   grep -v linkonce | count 1
+// RUN: %llvmgcc %s -S -emit-llvm -O0 -o - | grep define | \
+// RUN:   grep xstatnoWeak | grep internal | count 1
+// RUN: %llvmgcc %s -S -emit-llvm -O0 -o - | grep declare | \
+// RUN:   grep xextnoWeak | grep -v internal | grep -v weak | \
+// RUN:   grep -v linkonce | count 1
+inline int xglobWeak(int) __attribute__((weak));
+inline int xglobWeak (int i) {
+  return i*2;
+}
+inline int xextWeak(int) __attribute__((weak));
+extern  inline int xextWeak (int i) {
+  return i*4;
+}
+int xWeaknoinline(int) __attribute__((weak));
+int xWeaknoinline(int i) {
+  return i*8;
+}
+int xWeakextnoinline(int) __attribute__((weak));
+extern int xWeakextnoinline(int i) {
+  return i*16;
+}
+inline int xglobnoWeak (int i) {
+  return i*32;
+}
+static inline int xstatnoWeak (int i) {
+  return i*64;
+}
+extern  inline int xextnoWeak (int i) {
+  return i*128;
+}
+int j(int y) {
+  return xglobnoWeak(y)+xstatnoWeak(y)+xextnoWeak(y)+
+        xglobWeak(y)+xextWeak(y)+
+        xWeakextnoinline(y)+xWeaknoinline(y);
+}
diff --git a/test/FrontendC/2007-04-11-InlineStorageClassC99.c b/test/FrontendC/2007-04-11-InlineStorageClassC99.c
new file mode 100644 (file)
index 0000000..f6193aa
--- /dev/null
@@ -0,0 +1,46 @@
+// RUN: %llvmgcc -std=c99 %s -S -emit-llvm -O0 -o - | grep declare | \
+// RUN:   grep xglobWeak | grep extern_weak | count 1
+// RUN: %llvmgcc -std=c99 %s -S -emit-llvm -O0 -o - | grep define | \
+// RUN:   grep xextWeak | grep weak | count 1
+// RUN: %llvmgcc -std=c99 %s -S -emit-llvm -O0 -o - | grep define | \
+// RUN:   grep xWeaknoinline | grep weak | count 1
+// RUN: %llvmgcc -std=c99 %s -S -emit-llvm -O0 -o - | grep define | \
+// RUN:   grep xWeakextnoinline | grep weak | count 1
+// RUN: %llvmgcc -std=c99 %s -S -emit-llvm -O0 -o - | grep declare | \
+// RUN:   grep xglobnoWeak | grep -v internal | grep -v weak | \
+// RUN:   grep -v linkonce | count 1
+// RUN: %llvmgcc -std=c99 %s -S -emit-llvm -O0 -o - | grep define | \
+// RUN:   grep xstatnoWeak | grep internal | count 1
+// RUN: %llvmgcc -std=c99 %s -S -emit-llvm -O0 -o - | grep define | \
+// RUN:   grep xextnoWeak | grep -v internal | grep -v weak | \
+// RUN:   grep -v linkonce | count 1
+inline int xglobWeak(int) __attribute__((weak));
+inline int xglobWeak (int i) {
+  return i*2;
+}
+inline int xextWeak(int) __attribute__((weak));
+extern  inline int xextWeak (int i) {
+  return i*4;
+}
+int xWeaknoinline(int) __attribute__((weak));
+int xWeaknoinline(int i) {
+  return i*8;
+}
+int xWeakextnoinline(int) __attribute__((weak));
+extern int xWeakextnoinline(int i) {
+  return i*16;
+}
+inline int xglobnoWeak (int i) {
+  return i*32;
+}
+static inline int xstatnoWeak (int i) {
+  return i*64;
+}
+extern  inline int xextnoWeak (int i) {
+  return i*128;
+}
+int j(int y) {
+  return xglobnoWeak(y)+xstatnoWeak(y)+xextnoWeak(y)+
+        xglobWeak(y)+xextWeak(y)+
+        xWeakextnoinline(y)+xWeaknoinline(y);
+}
diff --git a/test/FrontendC/2007-04-11-PR1321.c b/test/FrontendC/2007-04-11-PR1321.c
new file mode 100644 (file)
index 0000000..f391329
--- /dev/null
@@ -0,0 +1,12 @@
+// RUN: %llvmgcc %s -S -o /dev/null
+
+struct X {
+  unsigned int e0 : 17;
+  unsigned int e1 : 17;
+  unsigned int e2 : 17;
+  unsigned int e3 : 17;
+  unsigned int e4 : 17;
+  unsigned int e5 : 17;
+  unsigned int e6 : 17;
+  unsigned int e7 : 17;
+} __attribute__((packed)) x;
diff --git a/test/FrontendC/2007-04-13-InlineAsmStruct2.c b/test/FrontendC/2007-04-13-InlineAsmStruct2.c
new file mode 100644 (file)
index 0000000..e4870e7
--- /dev/null
@@ -0,0 +1,9 @@
+// RUN: %llvmgcc %s -S -emit-llvm -o - | grep {call void asm}
+
+struct V { short X, Y; };
+int bar() {
+  struct V bar;
+  __asm__ volatile("foo %0\n" :: "r"(bar));
+  return bar.X;
+}
+
diff --git a/test/FrontendC/2007-04-13-InlineAsmUnion2.c b/test/FrontendC/2007-04-13-InlineAsmUnion2.c
new file mode 100644 (file)
index 0000000..284654d
--- /dev/null
@@ -0,0 +1,7 @@
+// RUN: %llvmgcc %s -S -emit-llvm -o - | grep {call void asm}
+
+union U { int x; char* p; };
+void foo() {
+  union U bar;
+  __asm__ volatile("foo %0\n" :: "r"(bar));
+}
diff --git a/test/FrontendC/2007-04-14-FNoBuiltin.c b/test/FrontendC/2007-04-14-FNoBuiltin.c
new file mode 100644 (file)
index 0000000..88bf0e0
--- /dev/null
@@ -0,0 +1,7 @@
+// RUN: %llvmgcc -S %s -O2 -fno-builtin -o - | grep call.*printf
+// Check that -fno-builtin is honored.
+
+extern int printf(const char*, ...);
+void foo(const char *msg) {
+       printf("%s\n",msg);
+}
diff --git a/test/FrontendC/2007-04-17-ZeroSizeBitFields.c b/test/FrontendC/2007-04-17-ZeroSizeBitFields.c
new file mode 100644 (file)
index 0000000..ec7b7ea
--- /dev/null
@@ -0,0 +1,4 @@
+// PR 1332
+// RUN: %llvmgcc %s -S -o /dev/null
+
+struct Z { int a:1; int :0; int c:1; } z;
diff --git a/test/FrontendC/2007-04-24-VolatileStructCopy.c b/test/FrontendC/2007-04-24-VolatileStructCopy.c
new file mode 100644 (file)
index 0000000..4765921
--- /dev/null
@@ -0,0 +1,10 @@
+// RUN: %llvmgcc -O3 -S -o - -emit-llvm %s | grep {volatile store}
+// PR1352
+
+struct foo {
+  int x;
+};
+
+void copy(volatile struct foo *p, struct foo *q) {
+  *p = *q;
+}
diff --git a/test/FrontendC/2007-04-24-bit-not-expr.c b/test/FrontendC/2007-04-24-bit-not-expr.c
new file mode 100644 (file)
index 0000000..1c27f18
--- /dev/null
@@ -0,0 +1,7 @@
+// PR 1346
+// RUN: %llvmgcc -c %s  -o /dev/null
+extern bar(void *);
+
+void f(void *cd) {
+  bar(((void *)((unsigned long)(cd) ^ -1)));
+}
diff --git a/test/FrontendC/2007-04-24-str-const.c b/test/FrontendC/2007-04-24-str-const.c
new file mode 100644 (file)
index 0000000..4c109c4
--- /dev/null
@@ -0,0 +1,17 @@
+// RUN: %llvmgcc -c %s  -o /dev/null
+static char *str;
+
+static const struct {
+ const char *name;
+ unsigned type;
+} scan_special[] = {
+ {"shift", 1},
+ {0, 0}
+};
+
+static void
+sb(void)
+{
+ while (*str == ' ' || *str == '\t')
+  str++;
+}
diff --git a/test/FrontendC/2007-05-07-NestedStructReturn.c b/test/FrontendC/2007-05-07-NestedStructReturn.c
new file mode 100644 (file)
index 0000000..aea58e3
--- /dev/null
@@ -0,0 +1,13 @@
+// RUN: %llvmgcc %s -S -fnested-functions -o - | grep {sret *%agg.result}
+
+struct X { long m, n, o, p; };
+
+struct X p(int n) {
+  struct X c(int m) {
+    struct X x;
+    x.m = m;
+    x.n = n;
+    return x;
+  }
+  return c(n);
+}
diff --git a/test/FrontendC/2007-05-07-PaddingElements.c b/test/FrontendC/2007-05-07-PaddingElements.c
new file mode 100644 (file)
index 0000000..c0a65f0
--- /dev/null
@@ -0,0 +1,12 @@
+// PR 1278
+// RUN: %llvmgcc %s -S -emit-llvm -O0 -o - | not grep "4 x i8] zeroinitializer"
+// RUN: %llvmgcc %s -S -emit-llvm -O0 -o - | not grep "i32 0, i32 2"
+struct s {
+  double d1;
+  int s1;
+};
+
+struct s foo(void) {
+  struct s S = {1.1, 2};
+  return S;
+}
diff --git a/test/FrontendC/2007-05-08-PCH.c b/test/FrontendC/2007-05-08-PCH.c
new file mode 100644 (file)
index 0000000..aa277ec
--- /dev/null
@@ -0,0 +1,7 @@
+// PR 1400
+// RUN: %llvmgcc -x c-header %s -o /dev/null
+
+int main() {
+  return 0;
+}
+
diff --git a/test/FrontendC/2007-05-11-str-const.c b/test/FrontendC/2007-05-11-str-const.c
new file mode 100644 (file)
index 0000000..48deddb
--- /dev/null
@@ -0,0 +1,5 @@
+// RUN: %llvmgcc -c -g %s  -o /dev/null
+
+static unsigned char out[]={0,1};
+static const unsigned char str1[]="1";
+
diff --git a/test/FrontendC/2007-05-15-PaddingElement.c b/test/FrontendC/2007-05-15-PaddingElement.c
new file mode 100644 (file)
index 0000000..a218b35
--- /dev/null
@@ -0,0 +1,23 @@
+// PR 1419
+
+// RUN: %llvmgcc -xc  -O2 %s -c -o - | llvm-dis | grep "ret i32 1"
+struct A {
+  short x;
+  long long :0;
+};
+
+struct B {
+  char a;
+  char b;
+  unsigned char i;
+};
+
+union X { struct A a; struct B b; };
+
+int check(void) {
+  union X x, y;
+
+  y.b.i = 0xff;
+  x = y;
+  return (x.b.i == 0xff);
+}
diff --git a/test/FrontendC/2007-05-16-EmptyStruct.c b/test/FrontendC/2007-05-16-EmptyStruct.c
new file mode 100644 (file)
index 0000000..64652be
--- /dev/null
@@ -0,0 +1,5 @@
+// PR 1417
+
+// RUN: %llvmgcc -xc  %s -c -o - | llvm-dis | grep "struct.anon = type \{  \}"
+
+struct { } *X;
diff --git a/test/FrontendC/2007-05-29-UnionCopy.c b/test/FrontendC/2007-05-29-UnionCopy.c
new file mode 100644 (file)
index 0000000..ded67d4
--- /dev/null
@@ -0,0 +1,18 @@
+// RUN: %llvmgcc -S -o - -emit-llvm %s | grep memcpy
+// PR1421
+
+struct A {
+  char c;
+  int i;
+};
+
+struct B {
+  int c;
+  unsigned char x;
+};
+
+union U { struct A a; struct B b; };
+
+void check(union U *u, union U *v) {
+  *u = *v;
+}
diff --git a/test/FrontendC/2007-06-05-NoInlineAttribute.c b/test/FrontendC/2007-06-05-NoInlineAttribute.c
new file mode 100644 (file)
index 0000000..cb1920a
--- /dev/null
@@ -0,0 +1,13 @@
+// RUN: %llvmgcc -c -emit-llvm %s -o - | llvm-dis | grep llvm.noinline 
+
+static int bar(int x, int y) __attribute__((noinline));
+
+static int bar(int x, int y)  
+{
+ return x + y;
+}
+
+int foo(int a, int b) {
+ return  bar(b, a);
+}
+
diff --git a/test/FrontendC/2007-06-15-AnnotateAttribute.c b/test/FrontendC/2007-06-15-AnnotateAttribute.c
new file mode 100644 (file)
index 0000000..0099117
--- /dev/null
@@ -0,0 +1,24 @@
+// RUN: %llvmgcc -c -emit-llvm %s -o - | llvm-dis | grep llvm.global.annotations
+// RUN: %llvmgcc -c -emit-llvm %s -o - | llvm-dis | grep llvm.var.annotation | count 3 
+
+#include <stdio.h>
+
+/* Global variable with attribute */
+int X __attribute__((annotate("GlobalValAnnotation")));
+
+/* Function with attribute */
+int foo(int y) __attribute__((annotate("GlobalValAnnotation"))) 
+               __attribute__((noinline));
+
+int foo(int y __attribute__((annotate("LocalValAnnotation")))) {
+  int x __attribute__((annotate("LocalValAnnotation")));
+  x = 34;
+  return y + x;
+} 
+
+int main() {
+  static int a __attribute__((annotate("GlobalValAnnotation")));
+  a = foo(2);
+  printf("hello world%d\n", a);
+  return 0;
+}
diff --git a/test/FrontendC/2007-06-18-SextAttrAggregate.c b/test/FrontendC/2007-06-18-SextAttrAggregate.c
new file mode 100644 (file)
index 0000000..2fcd726
--- /dev/null
@@ -0,0 +1,11 @@
+// RUN: %llvmgcc %s -o - -S -emit-llvm -O3 | grep {i8 signext}
+// PR1513
+
+struct s{
+long a;
+long b;
+};
+
+void f(struct s a, char *b, signed char C) {
+
+}
diff --git a/test/FrontendC/2007-07-29-RestrictPtrArg.c b/test/FrontendC/2007-07-29-RestrictPtrArg.c
new file mode 100644 (file)
index 0000000..99eae39
--- /dev/null
@@ -0,0 +1,6 @@
+// RUN: %llvmgcc -c -emit-llvm %s -o - | llvm-dis | grep noalias
+
+void foo(int * __restrict myptr1, int * myptr2) {
+  myptr1[0] = 0;
+  myptr2[0] = 0;
+}
diff --git a/test/FrontendC/2007-08-01-LoadStoreAlign.c b/test/FrontendC/2007-08-01-LoadStoreAlign.c
new file mode 100644 (file)
index 0000000..ef890bf
--- /dev/null
@@ -0,0 +1,17 @@
+// RUN: %llvmgcc -O3 -S -o - -emit-llvm %s | grep {align 1} | count 2
+// RUN: %llvmgcc -O3 -S -o - -emit-llvm %s | llvm-as | llc
+
+struct p {
+  char a;
+  int b;
+} __attribute__ ((packed));
+
+struct p t = { 1, 10 };
+struct p u;
+
+int main () {
+  int tmp = t.b;
+  u.b = tmp;
+  return tmp;
+
+}
diff --git a/test/FrontendC/2007-08-21-ComplexCst.c b/test/FrontendC/2007-08-21-ComplexCst.c
new file mode 100644 (file)
index 0000000..7ddd87c
--- /dev/null
@@ -0,0 +1,3 @@
+// RUN: %llvmgcc -O2 -c %s -o /dev/null
+void f(_Complex float z);
+void g() { f(1.0i); }
diff --git a/test/FrontendC/2007-08-22-CTTZ.c b/test/FrontendC/2007-08-22-CTTZ.c
new file mode 100644 (file)
index 0000000..9e74f24
--- /dev/null
@@ -0,0 +1,6 @@
+// RUN: %llvmgcc -O2 -S -o - %s | grep {llvm.cttz.i64} | count 2
+// RUN: %llvmgcc -O2 -S -o - %s | not grep {lshr}
+
+int bork(unsigned long long x) {
+  return __builtin_ctzll(x);
+}
diff --git a/test/FrontendC/2007-09-05-ConstCtor.c b/test/FrontendC/2007-09-05-ConstCtor.c
new file mode 100644 (file)
index 0000000..c267a59
--- /dev/null
@@ -0,0 +1,14 @@
+// RUN: %llvmgcc -xc -Os -c %s -o /dev/null
+// PR1641
+
+struct A {
+  unsigned long l;
+};
+
+void bar(struct A *a);
+
+void bork() {
+  const unsigned long vcgt = 'vcgt';
+  struct A a = { vcgt };
+  bar(&a);
+}
diff --git a/test/FrontendC/2007-09-12-PragmaPack.c b/test/FrontendC/2007-09-12-PragmaPack.c
new file mode 100644 (file)
index 0000000..4fc7f48
--- /dev/null
@@ -0,0 +1,30 @@
+// RUN: %llvmgcc -O3 -S -o - %s | grep {18}
+
+#include <stdint.h>
+
+#pragma pack(push, 1)
+typedef struct
+{
+        uint32_t        a;
+} foo;
+
+typedef struct {
+        uint8_t         major;
+        uint8_t         minor;
+        uint16_t        build;
+} VERSION;
+
+typedef struct {
+        uint8_t       a[5];
+        VERSION       version;
+        uint8_t       b;
+        foo           d;
+        uint32_t      guard;
+} bar;
+#pragma pack(pop)
+
+
+unsigned barsize(void) {
+  return sizeof(bar);
+}
+
diff --git a/test/FrontendC/2007-09-14-NegatePointer.c b/test/FrontendC/2007-09-14-NegatePointer.c
new file mode 100644 (file)
index 0000000..cb49e46
--- /dev/null
@@ -0,0 +1,7 @@
+// RUN: %llvmgcc -S %s -o - 
+// PR1662
+
+int foo(unsigned char *test) {
+  return 0U - (unsigned int )test;
+}
+
diff --git a/test/FrontendC/2007-09-17-WeakRef.c b/test/FrontendC/2007-09-17-WeakRef.c
new file mode 100644 (file)
index 0000000..3cdd47e
--- /dev/null
@@ -0,0 +1,10 @@
+// RUN: %llvmgcc -O1 -S %s -o - | grep icmp
+// PR1678
+// XFAIL: llvmgcc4.0.1
+extern void B (void);
+static __typeof(B) A __attribute__ ((__weakref__("B")));
+int active (void)
+{
+  static void *const p = __extension__ (void *) &A;
+  return p != 0;
+}
diff --git a/test/FrontendC/2007-09-20-GcrootAttribute.c b/test/FrontendC/2007-09-20-GcrootAttribute.c
new file mode 100644 (file)
index 0000000..23cd37f
--- /dev/null
@@ -0,0 +1,29 @@
+// RUN: %llvmgcc -S -emit-llvm %s -o - | grep llvm.gcroot
+// RUN: %llvmgcc -S -emit-llvm %s -o - | grep llvm.gcroot | count 6
+// RUN: %llvmgcc -S -emit-llvm %s -o - | llvm-as
+
+typedef struct foo_s
+{
+  int a;
+} foo, __attribute__ ((gcroot)) *foo_p;
+
+foo my_foo;
+
+int alpha ()
+{
+  foo my_foo2 = my_foo;
+  
+  return my_foo2.a;
+}
+
+int bar (foo a)
+{
+  foo_p b;
+  return b->a;
+}
+
+foo_p baz (foo_p a, foo_p b, foo_p *c)
+{
+  a = b = *c;
+  return a;
+}
diff --git a/test/FrontendC/2007-09-26-Alignment.c b/test/FrontendC/2007-09-26-Alignment.c
new file mode 100644 (file)
index 0000000..1638fed
--- /dev/null
@@ -0,0 +1,7 @@
+// RUN: %llvmgcc -S %s -o - | grep {align 16}
+extern p(int *);
+int q(void) {
+  int x __attribute__ ((aligned (16)));
+  p(&x);
+  return x;
+}
diff --git a/test/FrontendC/2007-09-27-ComplexIntCompare.c b/test/FrontendC/2007-09-27-ComplexIntCompare.c
new file mode 100644 (file)
index 0000000..ee9a85c
--- /dev/null
@@ -0,0 +1,14 @@
+// RUN: %llvmgcc -S %s -o -  
+// PR1708
+struct s { _Complex unsigned short x; };
+struct s gs = { 100 + 200i };
+struct s __attribute__((noinline)) foo (void) { return gs; }
+
+int main ()
+{
+  if (foo ().x != gs.x)
+    abort ();
+  exit (0);
+}
+
+
diff --git a/test/FrontendC/2007-09-28-PackedUnionMember.c b/test/FrontendC/2007-09-28-PackedUnionMember.c
new file mode 100644 (file)
index 0000000..1e64657
--- /dev/null
@@ -0,0 +1,37 @@
+// RUN: %llvmgcc %s -S -o -
+#pragma pack(push, 2)
+struct H {
+  unsigned long f1;
+  unsigned long f2;
+  union {
+    struct opaque1 *f3;
+    struct opaque2 *f4;
+    struct {
+      struct opaque3 *f5;
+      unsigned short  f6;
+    } f7;
+  } f8;
+};
+#pragma pack(pop)
+
+struct E {
+  unsigned long f1;
+  unsigned long f2;
+};
+
+typedef long (*FuncPtr) ();
+
+extern long bork(FuncPtr handler, const struct E *list);
+
+static long hndlr()
+{
+  struct H cmd = { 4, 'fart' };
+  return 0;
+}
+void foo(void *inWindow) {
+  static const struct E events[] = {
+    { 'cmds', 1 }
+  };
+  bork(hndlr, events);
+}
+
diff --git a/test/FrontendC/2007-10-01-BuildArrayRef.c b/test/FrontendC/2007-10-01-BuildArrayRef.c
new file mode 100644 (file)
index 0000000..e903755
--- /dev/null
@@ -0,0 +1,8 @@
+// RUN: not %llvmgcc -S %s -o /dev/null |& grep "error: assignment of read-only location"
+// PR 1603
+int func()
+{
+   const int *arr;
+   arr[0] = 1;
+}
+
diff --git a/test/FrontendC/2007-10-02-VolatileArray.c b/test/FrontendC/2007-10-02-VolatileArray.c
new file mode 100644 (file)
index 0000000..7e8bf24
--- /dev/null
@@ -0,0 +1,7 @@
+// RUN: %llvmgcc -S %s -o - | grep volatile
+// PR1647
+
+void foo(volatile int *p)
+{
+p[0] = 0;
+}
diff --git a/test/FrontendC/2007-10-15-VoidPtr.c b/test/FrontendC/2007-10-15-VoidPtr.c
new file mode 100644 (file)
index 0000000..c5948b9
--- /dev/null
@@ -0,0 +1,4 @@
+// RUN: %llvmgcc -S %s -o /dev/null
+void bork(void **data) {
+  (*(unsigned short *) (&(data[37])[927]) = 0);
+}
diff --git a/test/FrontendC/2007-10-30-Volatile.c b/test/FrontendC/2007-10-30-Volatile.c
new file mode 100644 (file)
index 0000000..7a75b05
--- /dev/null
@@ -0,0 +1,6 @@
+// RUN: %llvmgcc -S %s -o /dev/null -Wall -Werror
+void bork() {
+  char * volatile p;
+  volatile int cc;
+  p += cc;
+}
diff --git a/test/FrontendC/2007-11-07-AlignedMemcpy.c b/test/FrontendC/2007-11-07-AlignedMemcpy.c
new file mode 100644 (file)
index 0000000..f1900bb
--- /dev/null
@@ -0,0 +1,4 @@
+// RUN: %llvmgcc -c %s -o /dev/null
+void bork() {
+  int Qux[33] = {0};
+}
diff --git a/test/FrontendC/2007-11-07-CopyAggregateAlign.c b/test/FrontendC/2007-11-07-CopyAggregateAlign.c
new file mode 100644 (file)
index 0000000..8bd94b0
--- /dev/null
@@ -0,0 +1,3 @@
+// RUN: %llvmgcc -S %s -o - | grep "align 2" | count 6
+struct A { char s, t, u, v; short a; };
+void q() { struct A a, b; a = b; }
diff --git a/test/FrontendC/2007-11-07-ZeroAggregateAlign.c b/test/FrontendC/2007-11-07-ZeroAggregateAlign.c
new file mode 100644 (file)
index 0000000..424120d
--- /dev/null
@@ -0,0 +1,3 @@
+// RUN: %llvmgcc -S %s -o - | grep "align 2"
+struct A { short s; short t; int i; };
+void q() { struct A a = {0}; }
diff --git a/test/FrontendC/2007-11-27-SExtZExt.c b/test/FrontendC/2007-11-27-SExtZExt.c
new file mode 100644 (file)
index 0000000..2b6cd62
--- /dev/null
@@ -0,0 +1,12 @@
+// RUN: %llvmgcc -S %s -emit-llvm -o - | grep "signext" | count 4
+
+signed char foo1() { return 1; }
+
+void foo2(signed short a) { }
+
+signed char foo3(void) { return 1; }
+
+void foo4(a) signed short a; { }
+
+
+
diff --git a/test/FrontendC/2007-11-28-GlobalInitializer.c b/test/FrontendC/2007-11-28-GlobalInitializer.c
new file mode 100644 (file)
index 0000000..c8c7a59
--- /dev/null
@@ -0,0 +1,8 @@
+// RUN: %llvmgcc -S %s -o - 
+// PR1744
+typedef struct foo { int x; char *p; } FOO;
+extern FOO yy[];
+
+int *y = &((yy + 1)->x);
+void *z = &((yy + 1)->x);
+
diff --git a/test/FrontendC/2007-12-16-AsmNoUnwind.c b/test/FrontendC/2007-12-16-AsmNoUnwind.c
new file mode 100644 (file)
index 0000000..b080e6a
--- /dev/null
@@ -0,0 +1,3 @@
+// RUN: %llvmgcc %s -S -o - | grep nounwind
+
+void bar() { asm (""); }
diff --git a/test/FrontendC/2007-12-VarArrayDebug.c b/test/FrontendC/2007-12-VarArrayDebug.c
new file mode 100644 (file)
index 0000000..cd6cfdf
--- /dev/null
@@ -0,0 +1,18 @@
+// RUN: %llvmgcc -S -g -O %s -o - | llvm-as | llc
+// RUN: %llvmgcc -S -g %s -o - | llvm-as | llc
+
+extern void foo (void);
+
+static
+void baz (int i)
+{
+  foo ();
+  typedef char A[i];
+  struct { A b; } *x = 0;
+}
+
+void
+bar (i)
+{
+  baz (i);
+}
diff --git a/test/FrontendC/2008-01-04-WideBitfield.c b/test/FrontendC/2008-01-04-WideBitfield.c
new file mode 100644 (file)
index 0000000..a0045a4
--- /dev/null
@@ -0,0 +1,13 @@
+// RUN: %llvmgcc -S -o - %s
+// PR1386
+#include <stdint.h>
+
+struct X {
+  unsigned char pad : 4;
+  uint64_t a : 64;
+} __attribute__((packed)) x;
+
+uint64_t f(void)
+{
+  return x.a;
+}
diff --git a/test/FrontendC/2008-01-07-UnusualIntSize.c b/test/FrontendC/2008-01-07-UnusualIntSize.c
new file mode 100644 (file)
index 0000000..924ae2b
--- /dev/null
@@ -0,0 +1,11 @@
+// RUN: %llvmgcc %s -S -o - -O | grep {and.*8589934591}
+// PR1721
+
+struct s {
+  unsigned long long u33: 33;
+} a, b;
+
+// This should turn into a real 33-bit add, not a 64-bit add.
+_Bool test(void) {
+  return a.u33 + b.u33 != 0;
+}
diff --git a/test/FrontendC/2008-01-11-ChainConsistency.c b/test/FrontendC/2008-01-11-ChainConsistency.c
new file mode 100644 (file)
index 0000000..13e48a3
--- /dev/null
@@ -0,0 +1,3 @@
+// RUN: %llvmgcc -S %s -o - -fnested-functions | not grep nest
+
+void n1(void) { void a(void) { a(); } a(); }
diff --git a/test/FrontendC/2008-01-21-PackedBitFields.c b/test/FrontendC/2008-01-21-PackedBitFields.c
new file mode 100644 (file)
index 0000000..4c38dee
--- /dev/null
@@ -0,0 +1,7 @@
+// RUN: %llvmgcc %s -S -o -
+
+typedef double Al1Double __attribute__((aligned(1)));
+struct x { int a:23; Al1Double v; };
+struct x X = { 5, 3.0 };
+double foo() { return X.v; }
+
diff --git a/test/FrontendC/2008-01-21-PackedStructField.c b/test/FrontendC/2008-01-21-PackedStructField.c
new file mode 100644 (file)
index 0000000..9cc1731
--- /dev/null
@@ -0,0 +1,18 @@
+// RUN: %llvmgcc %s -S -o -
+
+struct X { long double b; unsigned char c; double __attribute__((packed)) d; };
+struct X x = { 3.0L, 5, 3.0 };
+
+
+struct S2504 {
+  int e:17;
+    __attribute__((packed)) unsigned long long int f; 
+} ;
+int fails;
+ extern struct S2504 s2504; 
+void check2504va (int z) { 
+  struct S2504 arg, *p;
+  long long int i = 0; 
+  arg.f = i;
+}
+
diff --git a/test/FrontendC/2008-01-24-StructAlignAndBitFields.c b/test/FrontendC/2008-01-24-StructAlignAndBitFields.c
new file mode 100644 (file)
index 0000000..380a7ef
--- /dev/null
@@ -0,0 +1,4 @@
+// RUN: %llvmgcc %s -S -o -
+
+struct U { char a; short b; int c:25; char d; } u;
+
diff --git a/test/FrontendC/2008-01-25-ByValReadNone.c b/test/FrontendC/2008-01-25-ByValReadNone.c
new file mode 100644 (file)
index 0000000..8ec6052
--- /dev/null
@@ -0,0 +1,15 @@
+// RUN: %llvmgcc -O3 -S -o - -emit-llvm %s | not grep readonly
+// RUN: %llvmgcc -O3 -S -o - -emit-llvm %s | not grep readnone
+
+
+// The struct being passed byval means that we cannot mark the
+// function readnone.  Readnone would allow stores to the arg to
+// be deleted in the caller.  We also don't allow readonly since
+// the callee might write to the byval parameter.  The inliner
+// would have to assume the worse and introduce an explicit
+// temporary when inlining such a function, which is costly for
+// the common case in which the byval argument is not written.
+struct S { int A[1000]; };
+int __attribute__ ((const)) f(struct S x) { return x.A[0]; }
+int g(struct S x) __attribute__ ((pure));
+int h(struct S x) { return g(x); }
diff --git a/test/FrontendC/2008-01-25-ZeroSizedAggregate.c b/test/FrontendC/2008-01-25-ZeroSizedAggregate.c
new file mode 100644 (file)
index 0000000..643caff
--- /dev/null
@@ -0,0 +1,39 @@
+// RUN: %llvmgcc %s -S -o -
+
+// Aggregates of size zero should be dropped from argument list.
+typedef long int Tlong;
+struct S2411 {
+  __attribute__((aligned)) Tlong:0;
+};
+
+extern struct S2411 a2411[5];
+extern void checkx2411(struct S2411);
+void test2411(void) {
+  checkx2411(a2411[0]);
+}
+
+// Proper handling of zero sized fields during type conversion.
+typedef unsigned long long int Tal2ullong __attribute__((aligned(2)));
+struct S2525 {
+ Tal2ullong: 0;
+ struct {
+ } e;
+};
+struct S2525 s2525;
+
+struct {
+  signed char f;
+  char :0;
+  struct{}h;
+  char * i[5];
+} data; 
+
+// Taking address of a zero sized field.
+struct Z {};
+struct Y {
+  int i;
+  struct Z z;
+};
+void *f(struct Y *y) {
+  return &y->z;
+}
diff --git a/test/FrontendC/2008-01-28-PragmaMark.c b/test/FrontendC/2008-01-28-PragmaMark.c
new file mode 100644 (file)
index 0000000..0b3ac17
--- /dev/null
@@ -0,0 +1,6 @@
+// RUN: %llvmgcc -Werror -c %s -o /dev/null
+#pragma mark LLVM's world
+#ifdef DO_ERROR
+#error LLVM's world
+#endif
+int i;
diff --git a/test/FrontendC/2008-01-28-UnionSize.c b/test/FrontendC/2008-01-28-UnionSize.c
new file mode 100644 (file)
index 0000000..ea2c863
--- /dev/null
@@ -0,0 +1,24 @@
+// RUN: %llvmgcc %s -S -o -
+// PR 1861
+
+typedef unsigned char __u8;
+typedef unsigned int __u32;
+typedef unsigned short u16;
+typedef __u32 __le32;
+struct bcm43xx_plcp_hdr6 {
+  union {
+    __le32 data;
+    __u8 raw[6];
+  }
+    __attribute__((__packed__));
+}
+  __attribute__((__packed__));
+struct bcm43xx_txhdr {
+  union {
+    struct {
+      struct bcm43xx_plcp_hdr6 plcp;
+    };
+  };
+}
+  __attribute__((__packed__));
+static void bcm43xx_generate_rts(struct bcm43xx_txhdr *txhdr ) { }
diff --git a/test/FrontendC/2008-02-11-AnnotateBuiltin.c b/test/FrontendC/2008-02-11-AnnotateBuiltin.c
new file mode 100644 (file)
index 0000000..32bc7a8
--- /dev/null
@@ -0,0 +1,7 @@
+// RUN: %llvmgcc %s -S -o - | llvm-as | llvm-dis | grep llvm.annotation
+
+int main() {
+  int x = 0;
+  return __builtin_annotation(x, "annotate");
+}
+
diff --git a/test/FrontendC/2008-03-03-CtorAttrType.c b/test/FrontendC/2008-03-03-CtorAttrType.c
new file mode 100644 (file)
index 0000000..dc0e47d
--- /dev/null
@@ -0,0 +1,6 @@
+// RUN: %llvmgcc %s -S -emit-llvm -o - | grep llvm.global_ctors
+int __attribute__((constructor)) foo(void) {
+  return 0;
+}
+void __attribute__((constructor)) bar(void) {}
+
diff --git a/test/FrontendC/2008-03-05-syncPtr.c b/test/FrontendC/2008-03-05-syncPtr.c
new file mode 100644 (file)
index 0000000..03aedab
--- /dev/null
@@ -0,0 +1,27 @@
+// RUN: %llvmgcc %s -S -emit-llvm -o - | grep llvm.atomic
+// XFAIL: sparc-sun-solaris2|arm|ia64
+// Feature currently implemented only for x86, alpha, powerpc.
+
+int* foo(int** a, int* b, int* c) {
+return __sync_val_compare_and_swap (a, b, c);
+}
+
+int foo2(int** a, int* b, int* c) {
+return __sync_bool_compare_and_swap (a, b, c);
+}
+
+int* foo3(int** a, int b) {
+  return __sync_fetch_and_add (a, b);
+}
+
+int* foo4(int** a, int b) {
+  return __sync_fetch_and_sub (a, b);
+}
+
+int* foo5(int** a, int* b) {
+  return __sync_lock_test_and_set (a, b);
+}
+
+int* foo6(int** a, int*** b) {
+  return __sync_lock_test_and_set (a, b);
+}
diff --git a/test/FrontendC/2008-03-24-BitField-And-Alloca.c b/test/FrontendC/2008-03-24-BitField-And-Alloca.c
new file mode 100644 (file)
index 0000000..e8112bb
--- /dev/null
@@ -0,0 +1,88 @@
+// RUN: %llvmgcc -S --emit-llvm %s -o - | not grep "\{ i8, .7 x i8. \}"
+// RUN: %llvmgcc -O2 -S %s -o - | not grep alloca
+enum {
+ PP_C,
+ PP_D,
+ PP_R,
+ PP_2D,
+ PP_1D,
+ PP_SR,
+ PP_S2D,
+ PP_S1D,
+ PP_SC
+};
+
+enum {
+ G_VP,
+ G_FP,
+ G_VS,
+ G_GS,
+ G_FS
+};
+
+enum {
+ G_NONE,
+ G_B,
+ G_R
+};
+
+typedef union _Key {
+ struct {
+  unsigned int count : 2;
+  unsigned int Aconst : 1;
+  unsigned int Bconst : 1;
+  unsigned int Cconst : 1;
+  unsigned int Xused : 1;
+  unsigned int Yused : 1;
+  unsigned int Zused : 1;
+  unsigned int Wused : 1;
+  unsigned int ttype : 3;
+  unsigned int scalar : 1;
+  unsigned int AType : 4;
+  unsigned int BType : 4;
+  unsigned int CType : 4;
+  unsigned int RType : 4;
+  unsigned int Size : 2;
+  unsigned int prec : 1;
+
+  unsigned int ASize : 2;
+  unsigned int BSize : 2;
+  unsigned int CSize : 2;
+  unsigned int tTex : 4;
+  unsigned int proj : 1;
+  unsigned int lod : 2;
+  unsigned int dvts : 1;
+  unsigned int uipad : 18;
+ } key_io;
+ struct {
+  unsigned int key0;
+  unsigned int key1;
+ } key;
+ unsigned long long lkey;
+} Key;
+
+static inline __attribute__ ((always_inline)) void foo(const Key iospec, int* ret)
+{
+  *ret=0;
+ if(((iospec.key_io.lod == G_B) &&
+  (iospec.key_io.ttype != G_VS) &&
+  (iospec.key_io.ttype != G_GS) &&
+  (iospec.key_io.ttype != G_FS)) ||
+
+  (((iospec.key_io.tTex == PP_C) ||
+    (iospec.key_io.tTex == PP_SC)) &&
+   ((iospec.key_io.tTex == PP_SR) ||
+    (iospec.key_io.tTex == PP_S2D) ||
+    (iospec.key_io.tTex == PP_S1D) ||
+    (iospec.key_io.tTex == PP_SC))))
+  *ret=1;
+}
+
+
+extern int bar(unsigned long long key_token2)
+{
+ int ret;
+ __attribute__ ((unused)) Key iospec = (Key) key_token2;
+ foo(iospec, &ret);
+ return ret;
+}
diff --git a/test/FrontendC/2008-03-26-PackedBitFields.c b/test/FrontendC/2008-03-26-PackedBitFields.c
new file mode 100644 (file)
index 0000000..7214281
--- /dev/null
@@ -0,0 +1,7 @@
+// RUN: %llvmgcc %s -S -o -
+
+
+struct S1757 { 
+  long double c;
+  long int __attribute__((packed)) e:28;
+} x;
diff --git a/test/FrontendC/2008-04-08-NoExceptions.c b/test/FrontendC/2008-04-08-NoExceptions.c
new file mode 100644 (file)
index 0000000..257fee2
--- /dev/null
@@ -0,0 +1,7 @@
+// RUN: %llvmgcc -S -o - %s | grep nounwind | count 2
+// RUN: %llvmgcc -S -o - %s | not grep {declare.*nounwind}
+
+void f(void);
+void g(void) {
+  f();
+}
diff --git a/test/FrontendC/2008-05-06-CFECrash.c b/test/FrontendC/2008-05-06-CFECrash.c
new file mode 100644 (file)
index 0000000..94d556c
--- /dev/null
@@ -0,0 +1,4 @@
+// RUN: %llvmgcc -S -O2 %s -o /dev/null
+// PR2292.
+__inline__ __attribute__ ((__pure__)) int g (void) {}
+void f (int k) { k = g (); }
diff --git a/test/FrontendC/2008-05-12-TempUsedBeforeDef.c b/test/FrontendC/2008-05-12-TempUsedBeforeDef.c
new file mode 100644 (file)
index 0000000..5c3bfda
--- /dev/null
@@ -0,0 +1,10 @@
+// RUN: %llvmgcc -S -o /dev/null %s
+// PR2264.
+unsigned foo = 8L;
+unsigned bar = 0L;
+volatile unsigned char baz = 6L;
+int test() {
+  char qux = 1L;
+  for (; baz >= -29; baz--)
+    bork(bar && foo, qux);
+}
diff --git a/test/FrontendC/2008-05-19-AlwaysInline.c b/test/FrontendC/2008-05-19-AlwaysInline.c
new file mode 100644 (file)
index 0000000..506f6cf
--- /dev/null
@@ -0,0 +1,12 @@
+// RUN: %llvmgcc %s -S -fno-unit-at-a-time -emit-llvm -O0 -o - | not grep sabrina
+// RUN: %llvmgcc %s -S -funit-at-a-time -emit-llvm -O0 -o - | not grep sabrina
+
+static inline int sabrina (void) __attribute__((always_inline));
+static inline int sabrina (void)
+{
+  return 13;
+}
+int bar (void)
+{
+  return sabrina () + 68;
+}
diff --git a/test/FrontendC/BasicInstrs.c b/test/FrontendC/BasicInstrs.c
new file mode 100644 (file)
index 0000000..812b49d
--- /dev/null
@@ -0,0 +1,26 @@
+// This file can be used to see what a native C compiler is generating for a
+// variety of interesting operations.
+//
+// RUN: %llvmgcc -S %s -o - | llvm-as | llc
+
+unsigned int udiv(unsigned int X, unsigned int Y) {
+  return X/Y;
+}
+int sdiv(int X, int Y) {
+  return X/Y;
+}
+unsigned int urem(unsigned int X, unsigned int Y) {
+  return X%Y;
+}
+int srem(int X, int Y) {
+  return X%Y;
+}
+
+_Bool setlt(int X, int Y) {
+  return X < Y;
+}
+
+_Bool setgt(int X, int Y) {
+  return X > Y;
+}
+
diff --git a/test/FrontendC/attribute_constructor.c b/test/FrontendC/attribute_constructor.c
new file mode 100644 (file)
index 0000000..b2f7c9b
--- /dev/null
@@ -0,0 +1,6 @@
+// RUN: %llvmgcc %s -c -o - | llvm-dis | grep llvm.global_ctors
+
+void foo() __attribute__((constructor));
+void foo() {
+  bar();
+}
diff --git a/test/FrontendC/block-copy.c b/test/FrontendC/block-copy.c
new file mode 100644 (file)
index 0000000..a53732e
--- /dev/null
@@ -0,0 +1,20 @@
+/* RUN: %llvmgcc %s -S -o - -emit-llvm -O3 | grep {call.*memcpy}
+
+ This should compile into a memcpy from a global, not 128 stores. */
+
+
+
+void foo();
+
+float bar() {
+       float lookupTable[] = {-1,-1,-1,0, -1,-1,0,-1, -1,-1,0,1, -1,-1,1,0,
+                                                  -1,0,-1,-1, -1,0,-1,1, -1,0,1,-1, -1,0,1,1,
+                                                  -1,1,-1,0, -1,1,0,-1, -1,1,0,1, -1,1,1,0,
+                                                  0,-1,-1,-1, 0,-1,-1,1, 0,-1,1,-1, 0,-1,1,1,
+                                                  1,-1,-1,0, 1,-1,0,-1, 1,-1,0,1, 1,-1,1,0,
+                                                  1,0,-1,-1, 1,0,-1,1, 1,0,1,-1, 1,0,1,1,
+                                                  1,1,-1,0, 1,1,0,-1, 1,1,0,1, 1,1,1,0,
+                                                  0,1,-1,-1, 0,1,-1,1, 0,1,1,-1, 0,1,1,1};
+   foo(lookupTable);
+}
+
diff --git a/test/FrontendC/dg.exp b/test/FrontendC/dg.exp
new file mode 100644 (file)
index 0000000..a9be28a
--- /dev/null
@@ -0,0 +1,5 @@
+load_lib llvm.exp
+
+if [ llvm_gcc_supports c ] then {
+  RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp}]]
+}
diff --git a/test/FrontendC/exact-div-expr.c b/test/FrontendC/exact-div-expr.c
new file mode 100644 (file)
index 0000000..9dce922
--- /dev/null
@@ -0,0 +1,6 @@
+// RUN: %llvmgcc -S %s -o - -O1 | grep ashr
+// RUN: %llvmgcc -S %s -o - -O1 | not grep sdiv
+
+long long test(int *A, int *B) {
+  return A-B;
+}
diff --git a/test/FrontendC/extern-weak.c b/test/FrontendC/extern-weak.c
new file mode 100644 (file)
index 0000000..2a8569c
--- /dev/null
@@ -0,0 +1,12 @@
+// RUN: %llvmgcc -O3 -S -o - -emit-llvm %s | grep extern_weak
+// RUN: %llvmgcc -O3 -S -o - -emit-llvm %s | llvm-as | llc
+
+#if !defined(__linux__) && !defined(__FreeBSD__) && \
+    !defined(__OpenBSD__) && !defined(__CYGWIN__)
+void foo() __attribute__((weak_import));
+#else
+void foo() __attribute__((weak));
+#endif
+
+void bar() { foo(); }
+
diff --git a/test/FrontendC/funccall.c b/test/FrontendC/funccall.c
new file mode 100644 (file)
index 0000000..9735e34
--- /dev/null
@@ -0,0 +1,17 @@
+
+static int q;
+
+void foo() {
+  int t = q;
+  q = t + 1;
+}
+int main() {
+  q = 0;
+  foo();
+  q = q - 1;
+
+  return q;
+}
+
+// This is the source that corresponds to funccall.ll
+// RUN: echo foo
diff --git a/test/FrontendC/hidden-visibility.c b/test/FrontendC/hidden-visibility.c
new file mode 100644 (file)
index 0000000..fc2ae44
--- /dev/null
@@ -0,0 +1,3 @@
+// RUN: %llvmgcc %s -emit-llvm -S -o - | grep {hidden global}
+
+int X __attribute__ ((__visibility__ ("hidden"))) = 123;
diff --git a/test/FrontendC/inline-asm-mrv.c b/test/FrontendC/inline-asm-mrv.c
new file mode 100644 (file)
index 0000000..6d1df67
--- /dev/null
@@ -0,0 +1,12 @@
+// RUN: %llvmgcc -S %s -o - -O | not grep alloca
+// PR2094
+
+int sad16_sse2(void *v, unsigned char *blk2, unsigned char *blk1,
+               int stride, int h) {
+    int ret;
+    asm volatile( "%0 %1 %2 %3"
+        : "+r" (h), "+r" (blk1), "+r" (blk2)
+        : "r" ((long)stride));
+    asm volatile("set %0 %1" : "=r"(ret) : "r"(blk1));
+    return ret;
+}
diff --git a/test/FrontendC/libcalls.c b/test/FrontendC/libcalls.c
new file mode 100644 (file)
index 0000000..c027ea4
--- /dev/null
@@ -0,0 +1,10 @@
+// llvm-gcc -O1+ should run simplify libcalls, O0 shouldn't
+// and -fno-builtins shouldn't.
+// RUN: %llvmgcc %s -S -emit-llvm -O0 -o - | grep {call.*exp2f}
+// RUN: %llvmgcc %s -S -emit-llvm -O1 -o - | grep {call.*ldexp}
+// RUN: %llvmgcc %s -S -emit-llvm -O3 -fno-builtin -o - | grep {call.*exp2f}
+
+float t4(unsigned char x) {
+  return exp2f(x);
+}
+
diff --git a/test/FrontendC/nested-functions.c b/test/FrontendC/nested-functions.c
new file mode 100644 (file)
index 0000000..bccbef3
--- /dev/null
@@ -0,0 +1,18 @@
+// RUN: %llvmgcc -S %s -o -  -fnested-functions
+// PR1274
+
+void Bork() {
+  void Fork(const int *src, int size) {
+    int i = 1;
+    int x;
+
+    while (i < size)
+      x = src[i];
+  }
+}
+
+void foo(void *a){
+  inline void foo_bar() {
+    a += 1;
+  }
+}
diff --git a/test/FrontendC/sret.c b/test/FrontendC/sret.c
new file mode 100644 (file)
index 0000000..11ac5d6
--- /dev/null
@@ -0,0 +1,15 @@
+// RUN: %llvmgcc %s -S -emit-llvm -O0 -o - | grep sret | count 5
+
+struct abc {
+ long a;
+ long b;
+ long c;
+};
+struct abc foo1(void);
+struct abc foo2();
+
+void bar() {
+  struct abc dummy1 = foo1();
+  struct abc dummy2 = foo2();
+}
diff --git a/test/FrontendC/sret2.c b/test/FrontendC/sret2.c
new file mode 100644 (file)
index 0000000..7b621f9
--- /dev/null
@@ -0,0 +1,9 @@
+// RUN: %llvmgcc %s -S -emit-llvm -O0 -o - | grep sret | count 2
+
+struct abc {
+ long a;
+ long b;
+ long c;
+};
+struct abc foo2(){}
diff --git a/test/FrontendC/unaligned-memcpy.c b/test/FrontendC/unaligned-memcpy.c
new file mode 100644 (file)
index 0000000..e5d810f
--- /dev/null
@@ -0,0 +1,5 @@
+// RUN: %llvmgcc %s -S -emit-llvm -o - | llvm-as | llc
+
+void bork() {
+  char Qux[33] = {0};
+}