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