[llvm-commits] CVS: llvm/test/Regression/CFrontend/2005-02-27-MarkGlobalConstant.c

Chris Lattner lattner at cs.uiuc.edu
Sun Feb 27 10:19:41 PST 2005



Changes in directory llvm/test/Regression/CFrontend:

2005-02-27-MarkGlobalConstant.c added (r1.1)
---
Log message:

Test that a global is marked constant when it can be.


---
Diffs of the changes:  (+10 -0)

 2005-02-27-MarkGlobalConstant.c |   10 ++++++++++
 1 files changed, 10 insertions(+)


Index: llvm/test/Regression/CFrontend/2005-02-27-MarkGlobalConstant.c
diff -c /dev/null llvm/test/Regression/CFrontend/2005-02-27-MarkGlobalConstant.c:1.1
*** /dev/null	Sun Feb 27 12:19:36 2005
--- llvm/test/Regression/CFrontend/2005-02-27-MarkGlobalConstant.c	Sun Feb 27 12:19:26 2005
***************
*** 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);
+ }






More information about the llvm-commits mailing list