In gcc/testsuite/: 2011-03-04 Nicola Pero <nicola.pero@meta-innovation.com>
[official-gcc.git] / gcc / testsuite / gcc.dg / const-elim-2.c
blobce55ba1c8242d2f60fafef718643a3df2b4a457d
1 /* The string constant in this test case should be emitted exactly once. */
2 /* { dg-do compile } */
3 /* { dg-options "-O2" } */
4 /* { dg-final { scan-assembler-times "hi there" 1 } } */
6 static inline int returns_23() { return 23; }
8 const char *test1(void) { if (returns_23()) return 0; return "hi there"; }
9 const char *test2(void) { return "hi there"; }
10 const char *test3(void) { return "hi there"; }