comparison gcc/testsuite/gcc.dg/tree-ssa/ssa-ccp-2.c @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children
comparison
equal deleted inserted replaced
111:04ced10e8804 131:84e7813d76e9
111 return g9; 111 return g9;
112 } 112 }
113 113
114 int test99 (int *intarr) 114 int test99 (int *intarr)
115 { 115 {
116 extern int foo9 (int) __attribute__ ((pure)); 116 extern int foo99 (int) __attribute__ ((pure));
117 int h, v; 117 int h, v;
118 g9 = 9; 118 g9 = 9;
119 h = foo9 (g9); 119 h = foo99 (g9);
120 v = g9; 120 v = g9;
121 if (v != 9) 121 if (v != 9)
122 link_error (); 122 link_error ();
123 return g9; 123 return g9;
124 } 124 }
125 125
126 extern int foo99 (int); 126 /* foo9 is const because of its declaration in test9. */
127 extern int foo9 (int);
127 128
128 int test999 (int *arr) 129 int test999 (int *arr)
129 { 130 {
130 static int l; 131 static int l;
131 int v1; 132 int v1;
132 g9 = 9; 133 g9 = 9;
133 l = 4; 134 l = 4;
134 v1 = g9; 135 v1 = g9;
135 if (v1 != 9) 136 if (v1 != 9)
136 link_error (); 137 link_error ();
137 l = foo99 (l); 138 l = foo9 (l);
138 return v1 + l; 139 return v1 + l;
139 } 140 }
140 141
142 /* foo99 is pure because of its declaration in test99. */
143 extern int foo9 (int);
141 144
142 int test9999 (void) 145 int test9999 (void)
143 { 146 {
144 int v1; 147 int v1;
145 static int sarr[10]; 148 static int sarr[10];