comparison gcc/testsuite/gcc.dg/const-elim-2.c @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents 04ced10e8804
children
comparison
equal deleted inserted replaced
131:84e7813d76e9 145:1830386684a0
1 /* The string constant in this test case should be emitted exactly once. */ 1 /* The string constant in this test case should be emitted exactly once. */
2 /* { dg-do compile } */ 2 /* { dg-do compile } */
3 /* { dg-options "-O2" } */ 3 /* { dg-options "-O2" } */
4 /* { dg-final { scan-assembler-times "hi there" 1 { xfail nvptx-*-* } } } */ 4 /* { dg-final { scan-assembler-times "hi there" 1 { xfail nvptx-*-* pdp11-*-* } } } */
5 5
6 static inline int returns_23() { return 23; } 6 static inline int returns_23() { return 23; }
7 7
8 const char *test1(void) { if (returns_23()) return 0; return "hi there"; } 8 const char *test1(void) { if (returns_23()) return 0; return "hi there"; }
9 const char *test2(void) { return "hi there"; } 9 const char *test2(void) { return "hi there"; }