diff gcc/testsuite/gcc.dg/tree-ssa/ssa-store-ccp-4.c @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-store-ccp-4.c	Fri Oct 27 22:46:09 2017 +0900
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target fpic } */
+/* { dg-skip-if "" { *-*-darwin* *-*-mingw* } } */
+/* { dg-options "-O2 -fno-common -fpic -fdump-tree-optimized" } */
+
+const int conststaticvariable;
+
+int f(void)
+{
+  return conststaticvariable;
+}
+
+/* There should be a reference to conststaticvariable since it may
+   may be overriden at run time.  */
+/* { dg-final { scan-tree-dump-times "conststaticvariable" 1 "optimized"} } */