From 1c1f558695a5fa2a192be136440b0307eceb70b3 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Fri, 17 May 2002 04:53:52 +0000 Subject: [PATCH] New C backend testcases with first testcase git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2638 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/CBackend/2002-05-16-NameCollide.ll | 5 +++++ test/CBackend/Makefile | 22 +++++++++++++++++++ .../CBackend/2002-05-16-NameCollide.ll | 5 +++++ 3 files changed, 32 insertions(+) create mode 100644 test/CBackend/2002-05-16-NameCollide.ll create mode 100644 test/CBackend/Makefile create mode 100644 test/CodeGen/CBackend/2002-05-16-NameCollide.ll diff --git a/test/CBackend/2002-05-16-NameCollide.ll b/test/CBackend/2002-05-16-NameCollide.ll new file mode 100644 index 00000000000..c08024bbec4 --- /dev/null +++ b/test/CBackend/2002-05-16-NameCollide.ll @@ -0,0 +1,5 @@ +; Make sure that global variables do not collide if they have the same name, +; but different types. + +%X = global int 5 +%X = global long 7 diff --git a/test/CBackend/Makefile b/test/CBackend/Makefile new file mode 100644 index 00000000000..27a3588bf96 --- /dev/null +++ b/test/CBackend/Makefile @@ -0,0 +1,22 @@ +# test/Regression/CBackend/Makefile +# +# This directory contains regression tests for the C backend for LLVM. +# These testcases are assembled with the LLVM assembler, then disassembled into +# C code. The C code should be compilable with the standard C compiler. +# +LEVEL = ../../.. +include $(LEVEL)/test/Makefile.tests + +.PRECIOUS: Output/%.c + +TESTS := $(wildcard *.ll) + +all:: $(addprefix Output/, $(TESTS:%.ll=%.to)) + + +Output/%.to: Output/%.c + gcc -c $< -o $@ || \ + (rm -f $@; $(FAILURE) $@ ) + +Output/%.c: %.ll Output/.dir $(LAS) $(LDIS) + $(LAS) < $< | $(LDIS) -c > $@ diff --git a/test/CodeGen/CBackend/2002-05-16-NameCollide.ll b/test/CodeGen/CBackend/2002-05-16-NameCollide.ll new file mode 100644 index 00000000000..c08024bbec4 --- /dev/null +++ b/test/CodeGen/CBackend/2002-05-16-NameCollide.ll @@ -0,0 +1,5 @@ +; Make sure that global variables do not collide if they have the same name, +; but different types. + +%X = global int 5 +%X = global long 7 -- 2.34.1