From e0fa368f2215bd1160283cd94944af2517000701 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Mon, 8 Mar 2004 02:12:36 +0000 Subject: [PATCH] New code-quality testcase. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12205 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/CFrontend/2004-03-07-ExternalConstant.c.tr | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 test/CFrontend/2004-03-07-ExternalConstant.c.tr diff --git a/test/CFrontend/2004-03-07-ExternalConstant.c.tr b/test/CFrontend/2004-03-07-ExternalConstant.c.tr new file mode 100644 index 00000000000..b8e13a35548 --- /dev/null +++ b/test/CFrontend/2004-03-07-ExternalConstant.c.tr @@ -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]; +} + -- 2.34.1