From: Chris Lattner Date: Sun, 27 Feb 2005 18:19:26 +0000 (+0000) Subject: Test that a global is marked constant when it can be. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=9e2888609cbee2b693f5b54809d558981006b462;p=oota-llvm.git Test that a global is marked constant when it can be. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20349 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/CFrontend/2005-02-27-MarkGlobalConstant.c b/test/CFrontend/2005-02-27-MarkGlobalConstant.c new file mode 100644 index 00000000000..bf3130bbeeb --- /dev/null +++ b/test/CFrontend/2005-02-27-MarkGlobalConstant.c @@ -0,0 +1,10 @@ +// RUN: %llvmgcc -xc %s -S -o - | grep 'ctor_.* 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); +}