]> git.pld-linux.org Git - packages/crossppc-gcc.git/blame - gcc-branch.diff
- updated.
[packages/crossppc-gcc.git] / gcc-branch.diff
CommitLineData
5f3731d9
PS
1Index: configure
2===================================================================
67dc168c
PS
3--- configure (.../tags/gcc_4_2_0_release) (revision 126002)
4+++ configure (.../branches/gcc-4_2-branch) (revision 126002)
5@@ -4769,12 +4769,14 @@
6 else
7 CC_FOR_TARGET="${ncn_target_tool_prefix}$2"
8 fi
9+else
10+ CC_FOR_TARGET="$ac_cv_prog_CC_FOR_TARGET"
11 fi
12
13 if test -n "$with_build_time_tools"; then
14 for ncn_progname in c++ g++ cxx gxx; do
15 echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
16-echo "configure:4778: checking for ${ncn_progname} in $with_build_time_tools" >&5
17+echo "configure:4780: checking for ${ncn_progname} in $with_build_time_tools" >&5
18 if test -x $with_build_time_tools/${ncn_progname}; then
19 ac_cv_prog_CXX_FOR_TARGET=$with_build_time_tools/${ncn_progname}
20 echo "$ac_t""yes" 1>&6
21@@ -4791,7 +4793,7 @@
22 # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
23 set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
24 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
25-echo "configure:4795: checking for $ac_word" >&5
26+echo "configure:4797: checking for $ac_word" >&5
27 if eval "test \"`echo '$''{'ac_cv_prog_CXX_FOR_TARGET'+set}'`\" = set"; then
28 echo $ac_n "(cached) $ac_c" 1>&6
29 else
30@@ -4822,7 +4824,7 @@
31 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
32 set dummy ${ncn_progname}; ac_word=$2
33 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
34-echo "configure:4826: checking for $ac_word" >&5
35+echo "configure:4828: checking for $ac_word" >&5
36 if eval "test \"`echo '$''{'ac_cv_prog_CXX_FOR_TARGET'+set}'`\" = set"; then
37 echo $ac_n "(cached) $ac_c" 1>&6
38 else
39@@ -4860,12 +4862,14 @@
40 else
41 CXX_FOR_TARGET="${ncn_target_tool_prefix}$2"
42 fi
43+else
44+ CXX_FOR_TARGET="$ac_cv_prog_CXX_FOR_TARGET"
45 fi
46
47 if test -n "$with_build_time_tools"; then
48 for ncn_progname in gcc; do
49 echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
50-echo "configure:4869: checking for ${ncn_progname} in $with_build_time_tools" >&5
51+echo "configure:4873: checking for ${ncn_progname} in $with_build_time_tools" >&5
52 if test -x $with_build_time_tools/${ncn_progname}; then
53 ac_cv_prog_GCC_FOR_TARGET=$with_build_time_tools/${ncn_progname}
54 echo "$ac_t""yes" 1>&6
55@@ -4882,7 +4886,7 @@
56 # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
57 set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
58 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
59-echo "configure:4886: checking for $ac_word" >&5
60+echo "configure:4890: checking for $ac_word" >&5
61 if eval "test \"`echo '$''{'ac_cv_prog_GCC_FOR_TARGET'+set}'`\" = set"; then
62 echo $ac_n "(cached) $ac_c" 1>&6
63 else
64@@ -4913,7 +4917,7 @@
65 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
66 set dummy ${ncn_progname}; ac_word=$2
67 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
68-echo "configure:4917: checking for $ac_word" >&5
69+echo "configure:4921: checking for $ac_word" >&5
70 if eval "test \"`echo '$''{'ac_cv_prog_GCC_FOR_TARGET'+set}'`\" = set"; then
71 echo $ac_n "(cached) $ac_c" 1>&6
72 else
73@@ -4946,12 +4950,14 @@
74
75 if test -z "$ac_cv_prog_GCC_FOR_TARGET" ; then
76 GCC_FOR_TARGET="${CC_FOR_TARGET}"
77+else
78+ GCC_FOR_TARGET="$ac_cv_prog_GCC_FOR_TARGET"
79 fi
80
81 if test -n "$with_build_time_tools"; then
82 for ncn_progname in gcj; do
83 echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
84-echo "configure:4955: checking for ${ncn_progname} in $with_build_time_tools" >&5
85+echo "configure:4961: checking for ${ncn_progname} in $with_build_time_tools" >&5
86 if test -x $with_build_time_tools/${ncn_progname}; then
87 ac_cv_prog_GCJ_FOR_TARGET=$with_build_time_tools/${ncn_progname}
88 echo "$ac_t""yes" 1>&6
89@@ -4968,7 +4974,7 @@
90 # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
91 set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
92 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
93-echo "configure:4972: checking for $ac_word" >&5
94+echo "configure:4978: checking for $ac_word" >&5
95 if eval "test \"`echo '$''{'ac_cv_prog_GCJ_FOR_TARGET'+set}'`\" = set"; then
96 echo $ac_n "(cached) $ac_c" 1>&6
97 else
98@@ -4999,7 +5005,7 @@
99 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
100 set dummy ${ncn_progname}; ac_word=$2
101 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
102-echo "configure:5003: checking for $ac_word" >&5
103+echo "configure:5009: checking for $ac_word" >&5
104 if eval "test \"`echo '$''{'ac_cv_prog_GCJ_FOR_TARGET'+set}'`\" = set"; then
105 echo $ac_n "(cached) $ac_c" 1>&6
106 else
107@@ -5037,12 +5043,14 @@
108 else
109 GCJ_FOR_TARGET="${ncn_target_tool_prefix}$2"
110 fi
111+else
112+ GCJ_FOR_TARGET="$ac_cv_prog_GCJ_FOR_TARGET"
113 fi
114
115 if test -n "$with_build_time_tools"; then
116 for ncn_progname in gfortran; do
117 echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
118-echo "configure:5046: checking for ${ncn_progname} in $with_build_time_tools" >&5
119+echo "configure:5054: checking for ${ncn_progname} in $with_build_time_tools" >&5
120 if test -x $with_build_time_tools/${ncn_progname}; then
121 ac_cv_prog_GFORTRAN_FOR_TARGET=$with_build_time_tools/${ncn_progname}
122 echo "$ac_t""yes" 1>&6
123@@ -5059,7 +5067,7 @@
124 # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
125 set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
126 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
127-echo "configure:5063: checking for $ac_word" >&5
128+echo "configure:5071: checking for $ac_word" >&5
129 if eval "test \"`echo '$''{'ac_cv_prog_GFORTRAN_FOR_TARGET'+set}'`\" = set"; then
130 echo $ac_n "(cached) $ac_c" 1>&6
131 else
132@@ -5090,7 +5098,7 @@
133 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
134 set dummy ${ncn_progname}; ac_word=$2
135 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
136-echo "configure:5094: checking for $ac_word" >&5
137+echo "configure:5102: checking for $ac_word" >&5
138 if eval "test \"`echo '$''{'ac_cv_prog_GFORTRAN_FOR_TARGET'+set}'`\" = set"; then
139 echo $ac_n "(cached) $ac_c" 1>&6
140 else
141@@ -5128,6 +5136,8 @@
142 else
143 GFORTRAN_FOR_TARGET="${ncn_target_tool_prefix}$2"
144 fi
145+else
146+ GFORTRAN_FOR_TARGET="$ac_cv_prog_GFORTRAN_FOR_TARGET"
147 fi
148
149
150@@ -5197,7 +5207,7 @@
151 if test -z "$ac_cv_path_AR_FOR_TARGET" ; then
152 if test -n "$with_build_time_tools"; then
153 echo $ac_n "checking for ar in $with_build_time_tools""... $ac_c" 1>&6
154-echo "configure:5201: checking for ar in $with_build_time_tools" >&5
155+echo "configure:5211: checking for ar in $with_build_time_tools" >&5
156 if test -x $with_build_time_tools/ar; then
157 AR_FOR_TARGET=`cd $with_build_time_tools && pwd`/ar
158 ac_cv_path_AR_FOR_TARGET=$AR_FOR_TARGET
159@@ -5208,14 +5218,14 @@
160 elif test $build != $host && test $have_gcc_for_target = yes; then
161 AR_FOR_TARGET=`$GCC_FOR_TARGET --print-prog-name=ar`
162 test $AR_FOR_TARGET=ar && AR_FOR_TARGET=
163- ac_cv_path_AR_FOR_TARGET=$AR_FOR_TARGET
164+ test -n "$AR_FOR_TARGET" && ac_cv_path_AR_FOR_TARGET=$AR_FOR_TARGET
165 fi
166 fi
167 if test -z "$ac_cv_path_AR_FOR_TARGET" ; then
168 # Extract the first word of "ar", so it can be a program name with args.
169 set dummy ar; ac_word=$2
170 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
171-echo "configure:5219: checking for $ac_word" >&5
172+echo "configure:5229: checking for $ac_word" >&5
173 if eval "test \"`echo '$''{'ac_cv_path_AR_FOR_TARGET'+set}'`\" = set"; then
174 echo $ac_n "(cached) $ac_c" 1>&6
175 else
176@@ -5252,7 +5262,7 @@
177 if test -n "$with_build_time_tools"; then
178 for ncn_progname in ar; do
179 echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
180-echo "configure:5256: checking for ${ncn_progname} in $with_build_time_tools" >&5
181+echo "configure:5266: checking for ${ncn_progname} in $with_build_time_tools" >&5
182 if test -x $with_build_time_tools/${ncn_progname}; then
183 ac_cv_prog_AR_FOR_TARGET=$with_build_time_tools/${ncn_progname}
184 echo "$ac_t""yes" 1>&6
185@@ -5269,7 +5279,7 @@
186 # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
187 set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
188 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
189-echo "configure:5273: checking for $ac_word" >&5
190+echo "configure:5283: checking for $ac_word" >&5
191 if eval "test \"`echo '$''{'ac_cv_prog_AR_FOR_TARGET'+set}'`\" = set"; then
192 echo $ac_n "(cached) $ac_c" 1>&6
193 else
194@@ -5300,7 +5310,7 @@
195 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
196 set dummy ${ncn_progname}; ac_word=$2
197 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
198-echo "configure:5304: checking for $ac_word" >&5
199+echo "configure:5314: checking for $ac_word" >&5
200 if eval "test \"`echo '$''{'ac_cv_prog_AR_FOR_TARGET'+set}'`\" = set"; then
201 echo $ac_n "(cached) $ac_c" 1>&6
202 else
203@@ -5338,6 +5348,8 @@
204 else
205 AR_FOR_TARGET="${ncn_target_tool_prefix}$2"
206 fi
207+else
208+ AR_FOR_TARGET="$ac_cv_prog_AR_FOR_TARGET"
209 fi
210
211 else
212@@ -5350,7 +5362,7 @@
213 if test -z "$ac_cv_path_AS_FOR_TARGET" ; then
214 if test -n "$with_build_time_tools"; then
215 echo $ac_n "checking for as in $with_build_time_tools""... $ac_c" 1>&6
216-echo "configure:5354: checking for as in $with_build_time_tools" >&5
217+echo "configure:5366: checking for as in $with_build_time_tools" >&5
218 if test -x $with_build_time_tools/as; then
219 AS_FOR_TARGET=`cd $with_build_time_tools && pwd`/as
220 ac_cv_path_AS_FOR_TARGET=$AS_FOR_TARGET
221@@ -5361,14 +5373,14 @@
222 elif test $build != $host && test $have_gcc_for_target = yes; then
223 AS_FOR_TARGET=`$GCC_FOR_TARGET --print-prog-name=as`
224 test $AS_FOR_TARGET=as && AS_FOR_TARGET=
225- ac_cv_path_AS_FOR_TARGET=$AS_FOR_TARGET
226+ test -n "$AS_FOR_TARGET" && ac_cv_path_AS_FOR_TARGET=$AS_FOR_TARGET
227 fi
228 fi
229 if test -z "$ac_cv_path_AS_FOR_TARGET" ; then
230 # Extract the first word of "as", so it can be a program name with args.
231 set dummy as; ac_word=$2
232 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
233-echo "configure:5372: checking for $ac_word" >&5
234+echo "configure:5384: checking for $ac_word" >&5
235 if eval "test \"`echo '$''{'ac_cv_path_AS_FOR_TARGET'+set}'`\" = set"; then
236 echo $ac_n "(cached) $ac_c" 1>&6
237 else
238@@ -5405,7 +5417,7 @@
239 if test -n "$with_build_time_tools"; then
240 for ncn_progname in as; do
241 echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
242-echo "configure:5409: checking for ${ncn_progname} in $with_build_time_tools" >&5
243+echo "configure:5421: checking for ${ncn_progname} in $with_build_time_tools" >&5
244 if test -x $with_build_time_tools/${ncn_progname}; then
245 ac_cv_prog_AS_FOR_TARGET=$with_build_time_tools/${ncn_progname}
246 echo "$ac_t""yes" 1>&6
247@@ -5422,7 +5434,7 @@
248 # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
249 set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
250 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
251-echo "configure:5426: checking for $ac_word" >&5
252+echo "configure:5438: checking for $ac_word" >&5
253 if eval "test \"`echo '$''{'ac_cv_prog_AS_FOR_TARGET'+set}'`\" = set"; then
254 echo $ac_n "(cached) $ac_c" 1>&6
255 else
256@@ -5453,7 +5465,7 @@
257 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
258 set dummy ${ncn_progname}; ac_word=$2
259 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
260-echo "configure:5457: checking for $ac_word" >&5
261+echo "configure:5469: checking for $ac_word" >&5
262 if eval "test \"`echo '$''{'ac_cv_prog_AS_FOR_TARGET'+set}'`\" = set"; then
263 echo $ac_n "(cached) $ac_c" 1>&6
264 else
265@@ -5491,6 +5503,8 @@
266 else
267 AS_FOR_TARGET="${ncn_target_tool_prefix}$2"
268 fi
269+else
270+ AS_FOR_TARGET="$ac_cv_prog_AS_FOR_TARGET"
271 fi
272
273 else
274@@ -5503,7 +5517,7 @@
275 if test -z "$ac_cv_path_DLLTOOL_FOR_TARGET" ; then
276 if test -n "$with_build_time_tools"; then
277 echo $ac_n "checking for dlltool in $with_build_time_tools""... $ac_c" 1>&6
278-echo "configure:5507: checking for dlltool in $with_build_time_tools" >&5
279+echo "configure:5521: checking for dlltool in $with_build_time_tools" >&5
280 if test -x $with_build_time_tools/dlltool; then
281 DLLTOOL_FOR_TARGET=`cd $with_build_time_tools && pwd`/dlltool
282 ac_cv_path_DLLTOOL_FOR_TARGET=$DLLTOOL_FOR_TARGET
283@@ -5514,14 +5528,14 @@
284 elif test $build != $host && test $have_gcc_for_target = yes; then
285 DLLTOOL_FOR_TARGET=`$GCC_FOR_TARGET --print-prog-name=dlltool`
286 test $DLLTOOL_FOR_TARGET=dlltool && DLLTOOL_FOR_TARGET=
287- ac_cv_path_DLLTOOL_FOR_TARGET=$DLLTOOL_FOR_TARGET
288+ test -n "$DLLTOOL_FOR_TARGET" && ac_cv_path_DLLTOOL_FOR_TARGET=$DLLTOOL_FOR_TARGET
289 fi
290 fi
291 if test -z "$ac_cv_path_DLLTOOL_FOR_TARGET" ; then
292 # Extract the first word of "dlltool", so it can be a program name with args.
293 set dummy dlltool; ac_word=$2
294 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
295-echo "configure:5525: checking for $ac_word" >&5
296+echo "configure:5539: checking for $ac_word" >&5
297 if eval "test \"`echo '$''{'ac_cv_path_DLLTOOL_FOR_TARGET'+set}'`\" = set"; then
298 echo $ac_n "(cached) $ac_c" 1>&6
299 else
300@@ -5558,7 +5572,7 @@
301 if test -n "$with_build_time_tools"; then
302 for ncn_progname in dlltool; do
303 echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
304-echo "configure:5562: checking for ${ncn_progname} in $with_build_time_tools" >&5
305+echo "configure:5576: checking for ${ncn_progname} in $with_build_time_tools" >&5
306 if test -x $with_build_time_tools/${ncn_progname}; then
307 ac_cv_prog_DLLTOOL_FOR_TARGET=$with_build_time_tools/${ncn_progname}
308 echo "$ac_t""yes" 1>&6
309@@ -5575,7 +5589,7 @@
310 # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
311 set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
312 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
313-echo "configure:5579: checking for $ac_word" >&5
314+echo "configure:5593: checking for $ac_word" >&5
315 if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL_FOR_TARGET'+set}'`\" = set"; then
316 echo $ac_n "(cached) $ac_c" 1>&6
317 else
318@@ -5606,7 +5620,7 @@
319 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
320 set dummy ${ncn_progname}; ac_word=$2
321 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
322-echo "configure:5610: checking for $ac_word" >&5
323+echo "configure:5624: checking for $ac_word" >&5
324 if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL_FOR_TARGET'+set}'`\" = set"; then
325 echo $ac_n "(cached) $ac_c" 1>&6
326 else
327@@ -5644,6 +5658,8 @@
328 else
329 DLLTOOL_FOR_TARGET="${ncn_target_tool_prefix}$2"
330 fi
331+else
332+ DLLTOOL_FOR_TARGET="$ac_cv_prog_DLLTOOL_FOR_TARGET"
333 fi
334
335 else
336@@ -5656,7 +5672,7 @@
337 if test -z "$ac_cv_path_LD_FOR_TARGET" ; then
338 if test -n "$with_build_time_tools"; then
339 echo $ac_n "checking for ld in $with_build_time_tools""... $ac_c" 1>&6
340-echo "configure:5660: checking for ld in $with_build_time_tools" >&5
341+echo "configure:5676: checking for ld in $with_build_time_tools" >&5
342 if test -x $with_build_time_tools/ld; then
343 LD_FOR_TARGET=`cd $with_build_time_tools && pwd`/ld
344 ac_cv_path_LD_FOR_TARGET=$LD_FOR_TARGET
345@@ -5667,14 +5683,14 @@
346 elif test $build != $host && test $have_gcc_for_target = yes; then
347 LD_FOR_TARGET=`$GCC_FOR_TARGET --print-prog-name=ld`
348 test $LD_FOR_TARGET=ld && LD_FOR_TARGET=
349- ac_cv_path_LD_FOR_TARGET=$LD_FOR_TARGET
350+ test -n "$LD_FOR_TARGET" && ac_cv_path_LD_FOR_TARGET=$LD_FOR_TARGET
351 fi
352 fi
353 if test -z "$ac_cv_path_LD_FOR_TARGET" ; then
354 # Extract the first word of "ld", so it can be a program name with args.
355 set dummy ld; ac_word=$2
356 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
357-echo "configure:5678: checking for $ac_word" >&5
358+echo "configure:5694: checking for $ac_word" >&5
359 if eval "test \"`echo '$''{'ac_cv_path_LD_FOR_TARGET'+set}'`\" = set"; then
360 echo $ac_n "(cached) $ac_c" 1>&6
361 else
362@@ -5711,7 +5727,7 @@
363 if test -n "$with_build_time_tools"; then
364 for ncn_progname in ld; do
365 echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
366-echo "configure:5715: checking for ${ncn_progname} in $with_build_time_tools" >&5
367+echo "configure:5731: checking for ${ncn_progname} in $with_build_time_tools" >&5
368 if test -x $with_build_time_tools/${ncn_progname}; then
369 ac_cv_prog_LD_FOR_TARGET=$with_build_time_tools/${ncn_progname}
370 echo "$ac_t""yes" 1>&6
371@@ -5728,7 +5744,7 @@
372 # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
373 set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
374 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
375-echo "configure:5732: checking for $ac_word" >&5
376+echo "configure:5748: checking for $ac_word" >&5
377 if eval "test \"`echo '$''{'ac_cv_prog_LD_FOR_TARGET'+set}'`\" = set"; then
378 echo $ac_n "(cached) $ac_c" 1>&6
379 else
380@@ -5759,7 +5775,7 @@
381 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
382 set dummy ${ncn_progname}; ac_word=$2
383 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
384-echo "configure:5763: checking for $ac_word" >&5
385+echo "configure:5779: checking for $ac_word" >&5
386 if eval "test \"`echo '$''{'ac_cv_prog_LD_FOR_TARGET'+set}'`\" = set"; then
387 echo $ac_n "(cached) $ac_c" 1>&6
388 else
389@@ -5797,6 +5813,8 @@
390 else
391 LD_FOR_TARGET="${ncn_target_tool_prefix}$2"
392 fi
393+else
394+ LD_FOR_TARGET="$ac_cv_prog_LD_FOR_TARGET"
395 fi
396
397 else
398@@ -5809,7 +5827,7 @@
399 if test -z "$ac_cv_path_LIPO_FOR_TARGET" ; then
400 if test -n "$with_build_time_tools"; then
401 echo $ac_n "checking for lipo in $with_build_time_tools""... $ac_c" 1>&6
402-echo "configure:5813: checking for lipo in $with_build_time_tools" >&5
403+echo "configure:5831: checking for lipo in $with_build_time_tools" >&5
404 if test -x $with_build_time_tools/lipo; then
405 LIPO_FOR_TARGET=`cd $with_build_time_tools && pwd`/lipo
406 ac_cv_path_LIPO_FOR_TARGET=$LIPO_FOR_TARGET
407@@ -5820,14 +5838,14 @@
408 elif test $build != $host && test $have_gcc_for_target = yes; then
409 LIPO_FOR_TARGET=`$GCC_FOR_TARGET --print-prog-name=lipo`
410 test $LIPO_FOR_TARGET=lipo && LIPO_FOR_TARGET=
411- ac_cv_path_LIPO_FOR_TARGET=$LIPO_FOR_TARGET
412+ test -n "$LIPO_FOR_TARGET" && ac_cv_path_LIPO_FOR_TARGET=$LIPO_FOR_TARGET
413 fi
414 fi
415 if test -z "$ac_cv_path_LIPO_FOR_TARGET" ; then
416 # Extract the first word of "lipo", so it can be a program name with args.
417 set dummy lipo; ac_word=$2
418 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
419-echo "configure:5831: checking for $ac_word" >&5
420+echo "configure:5849: checking for $ac_word" >&5
421 if eval "test \"`echo '$''{'ac_cv_path_LIPO_FOR_TARGET'+set}'`\" = set"; then
422 echo $ac_n "(cached) $ac_c" 1>&6
423 else
424@@ -5864,7 +5882,7 @@
425 if test -n "$with_build_time_tools"; then
426 for ncn_progname in lipo; do
427 echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
428-echo "configure:5868: checking for ${ncn_progname} in $with_build_time_tools" >&5
429+echo "configure:5886: checking for ${ncn_progname} in $with_build_time_tools" >&5
430 if test -x $with_build_time_tools/${ncn_progname}; then
431 ac_cv_prog_LIPO_FOR_TARGET=$with_build_time_tools/${ncn_progname}
432 echo "$ac_t""yes" 1>&6
433@@ -5881,7 +5899,7 @@
434 # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
435 set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
436 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
437-echo "configure:5885: checking for $ac_word" >&5
438+echo "configure:5903: checking for $ac_word" >&5
439 if eval "test \"`echo '$''{'ac_cv_prog_LIPO_FOR_TARGET'+set}'`\" = set"; then
440 echo $ac_n "(cached) $ac_c" 1>&6
441 else
442@@ -5912,7 +5930,7 @@
443 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
444 set dummy ${ncn_progname}; ac_word=$2
445 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
446-echo "configure:5916: checking for $ac_word" >&5
447+echo "configure:5934: checking for $ac_word" >&5
448 if eval "test \"`echo '$''{'ac_cv_prog_LIPO_FOR_TARGET'+set}'`\" = set"; then
449 echo $ac_n "(cached) $ac_c" 1>&6
450 else
451@@ -5950,6 +5968,8 @@
452 else
453 LIPO_FOR_TARGET="${ncn_target_tool_prefix}$2"
454 fi
455+else
456+ LIPO_FOR_TARGET="$ac_cv_prog_LIPO_FOR_TARGET"
457 fi
458
459 else
460@@ -5962,7 +5982,7 @@
461 if test -z "$ac_cv_path_NM_FOR_TARGET" ; then
462 if test -n "$with_build_time_tools"; then
463 echo $ac_n "checking for nm in $with_build_time_tools""... $ac_c" 1>&6
464-echo "configure:5966: checking for nm in $with_build_time_tools" >&5
465+echo "configure:5986: checking for nm in $with_build_time_tools" >&5
466 if test -x $with_build_time_tools/nm; then
467 NM_FOR_TARGET=`cd $with_build_time_tools && pwd`/nm
468 ac_cv_path_NM_FOR_TARGET=$NM_FOR_TARGET
469@@ -5973,14 +5993,14 @@
470 elif test $build != $host && test $have_gcc_for_target = yes; then
471 NM_FOR_TARGET=`$GCC_FOR_TARGET --print-prog-name=nm`
472 test $NM_FOR_TARGET=nm && NM_FOR_TARGET=
473- ac_cv_path_NM_FOR_TARGET=$NM_FOR_TARGET
474+ test -n "$NM_FOR_TARGET" && ac_cv_path_NM_FOR_TARGET=$NM_FOR_TARGET
475 fi
476 fi
477 if test -z "$ac_cv_path_NM_FOR_TARGET" ; then
478 # Extract the first word of "nm", so it can be a program name with args.
479 set dummy nm; ac_word=$2
480 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
481-echo "configure:5984: checking for $ac_word" >&5
482+echo "configure:6004: checking for $ac_word" >&5
483 if eval "test \"`echo '$''{'ac_cv_path_NM_FOR_TARGET'+set}'`\" = set"; then
484 echo $ac_n "(cached) $ac_c" 1>&6
485 else
486@@ -6017,7 +6037,7 @@
487 if test -n "$with_build_time_tools"; then
488 for ncn_progname in nm; do
489 echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
490-echo "configure:6021: checking for ${ncn_progname} in $with_build_time_tools" >&5
491+echo "configure:6041: checking for ${ncn_progname} in $with_build_time_tools" >&5
492 if test -x $with_build_time_tools/${ncn_progname}; then
493 ac_cv_prog_NM_FOR_TARGET=$with_build_time_tools/${ncn_progname}
494 echo "$ac_t""yes" 1>&6
495@@ -6034,7 +6054,7 @@
496 # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
497 set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
498 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
499-echo "configure:6038: checking for $ac_word" >&5
500+echo "configure:6058: checking for $ac_word" >&5
501 if eval "test \"`echo '$''{'ac_cv_prog_NM_FOR_TARGET'+set}'`\" = set"; then
502 echo $ac_n "(cached) $ac_c" 1>&6
503 else
504@@ -6065,7 +6085,7 @@
505 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
506 set dummy ${ncn_progname}; ac_word=$2
507 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
508-echo "configure:6069: checking for $ac_word" >&5
509+echo "configure:6089: checking for $ac_word" >&5
510 if eval "test \"`echo '$''{'ac_cv_prog_NM_FOR_TARGET'+set}'`\" = set"; then
511 echo $ac_n "(cached) $ac_c" 1>&6
512 else
513@@ -6103,6 +6123,8 @@
514 else
515 NM_FOR_TARGET="${ncn_target_tool_prefix}$2"
516 fi
517+else
518+ NM_FOR_TARGET="$ac_cv_prog_NM_FOR_TARGET"
519 fi
520
521 else
522@@ -6115,7 +6137,7 @@
523 if test -z "$ac_cv_path_OBJDUMP_FOR_TARGET" ; then
524 if test -n "$with_build_time_tools"; then
525 echo $ac_n "checking for objdump in $with_build_time_tools""... $ac_c" 1>&6
526-echo "configure:6119: checking for objdump in $with_build_time_tools" >&5
527+echo "configure:6141: checking for objdump in $with_build_time_tools" >&5
528 if test -x $with_build_time_tools/objdump; then
529 OBJDUMP_FOR_TARGET=`cd $with_build_time_tools && pwd`/objdump
530 ac_cv_path_OBJDUMP_FOR_TARGET=$OBJDUMP_FOR_TARGET
531@@ -6126,14 +6148,14 @@
532 elif test $build != $host && test $have_gcc_for_target = yes; then
533 OBJDUMP_FOR_TARGET=`$GCC_FOR_TARGET --print-prog-name=objdump`
534 test $OBJDUMP_FOR_TARGET=objdump && OBJDUMP_FOR_TARGET=
535- ac_cv_path_OBJDUMP_FOR_TARGET=$OBJDUMP_FOR_TARGET
536+ test -n "$OBJDUMP_FOR_TARGET" && ac_cv_path_OBJDUMP_FOR_TARGET=$OBJDUMP_FOR_TARGET
537 fi
538 fi
539 if test -z "$ac_cv_path_OBJDUMP_FOR_TARGET" ; then
540 # Extract the first word of "objdump", so it can be a program name with args.
541 set dummy objdump; ac_word=$2
542 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
543-echo "configure:6137: checking for $ac_word" >&5
544+echo "configure:6159: checking for $ac_word" >&5
545 if eval "test \"`echo '$''{'ac_cv_path_OBJDUMP_FOR_TARGET'+set}'`\" = set"; then
546 echo $ac_n "(cached) $ac_c" 1>&6
547 else
548@@ -6170,7 +6192,7 @@
549 if test -n "$with_build_time_tools"; then
550 for ncn_progname in objdump; do
551 echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
552-echo "configure:6174: checking for ${ncn_progname} in $with_build_time_tools" >&5
553+echo "configure:6196: checking for ${ncn_progname} in $with_build_time_tools" >&5
554 if test -x $with_build_time_tools/${ncn_progname}; then
555 ac_cv_prog_OBJDUMP_FOR_TARGET=$with_build_time_tools/${ncn_progname}
556 echo "$ac_t""yes" 1>&6
557@@ -6187,7 +6209,7 @@
558 # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
559 set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
560 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
561-echo "configure:6191: checking for $ac_word" >&5
562+echo "configure:6213: checking for $ac_word" >&5
563 if eval "test \"`echo '$''{'ac_cv_prog_OBJDUMP_FOR_TARGET'+set}'`\" = set"; then
564 echo $ac_n "(cached) $ac_c" 1>&6
565 else
566@@ -6218,7 +6240,7 @@
567 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
568 set dummy ${ncn_progname}; ac_word=$2
569 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
570-echo "configure:6222: checking for $ac_word" >&5
571+echo "configure:6244: checking for $ac_word" >&5
572 if eval "test \"`echo '$''{'ac_cv_prog_OBJDUMP_FOR_TARGET'+set}'`\" = set"; then
573 echo $ac_n "(cached) $ac_c" 1>&6
574 else
575@@ -6256,6 +6278,8 @@
576 else
577 OBJDUMP_FOR_TARGET="${ncn_target_tool_prefix}$2"
578 fi
579+else
580+ OBJDUMP_FOR_TARGET="$ac_cv_prog_OBJDUMP_FOR_TARGET"
581 fi
582
583 else
584@@ -6268,7 +6292,7 @@
585 if test -z "$ac_cv_path_RANLIB_FOR_TARGET" ; then
586 if test -n "$with_build_time_tools"; then
587 echo $ac_n "checking for ranlib in $with_build_time_tools""... $ac_c" 1>&6
588-echo "configure:6272: checking for ranlib in $with_build_time_tools" >&5
589+echo "configure:6296: checking for ranlib in $with_build_time_tools" >&5
590 if test -x $with_build_time_tools/ranlib; then
591 RANLIB_FOR_TARGET=`cd $with_build_time_tools && pwd`/ranlib
592 ac_cv_path_RANLIB_FOR_TARGET=$RANLIB_FOR_TARGET
593@@ -6279,14 +6303,14 @@
594 elif test $build != $host && test $have_gcc_for_target = yes; then
595 RANLIB_FOR_TARGET=`$GCC_FOR_TARGET --print-prog-name=ranlib`
596 test $RANLIB_FOR_TARGET=ranlib && RANLIB_FOR_TARGET=
597- ac_cv_path_RANLIB_FOR_TARGET=$RANLIB_FOR_TARGET
598+ test -n "$RANLIB_FOR_TARGET" && ac_cv_path_RANLIB_FOR_TARGET=$RANLIB_FOR_TARGET
599 fi
600 fi
601 if test -z "$ac_cv_path_RANLIB_FOR_TARGET" ; then
602 # Extract the first word of "ranlib", so it can be a program name with args.
603 set dummy ranlib; ac_word=$2
604 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
605-echo "configure:6290: checking for $ac_word" >&5
606+echo "configure:6314: checking for $ac_word" >&5
607 if eval "test \"`echo '$''{'ac_cv_path_RANLIB_FOR_TARGET'+set}'`\" = set"; then
608 echo $ac_n "(cached) $ac_c" 1>&6
609 else
610@@ -6323,7 +6347,7 @@
611 if test -n "$with_build_time_tools"; then
612 for ncn_progname in ranlib; do
613 echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
614-echo "configure:6327: checking for ${ncn_progname} in $with_build_time_tools" >&5
615+echo "configure:6351: checking for ${ncn_progname} in $with_build_time_tools" >&5
616 if test -x $with_build_time_tools/${ncn_progname}; then
617 ac_cv_prog_RANLIB_FOR_TARGET=$with_build_time_tools/${ncn_progname}
618 echo "$ac_t""yes" 1>&6
619@@ -6340,7 +6364,7 @@
620 # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
621 set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
622 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
623-echo "configure:6344: checking for $ac_word" >&5
624+echo "configure:6368: checking for $ac_word" >&5
625 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB_FOR_TARGET'+set}'`\" = set"; then
626 echo $ac_n "(cached) $ac_c" 1>&6
627 else
628@@ -6371,7 +6395,7 @@
629 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
630 set dummy ${ncn_progname}; ac_word=$2
631 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
632-echo "configure:6375: checking for $ac_word" >&5
633+echo "configure:6399: checking for $ac_word" >&5
634 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB_FOR_TARGET'+set}'`\" = set"; then
635 echo $ac_n "(cached) $ac_c" 1>&6
636 else
637@@ -6409,6 +6433,8 @@
638 else
639 RANLIB_FOR_TARGET="${ncn_target_tool_prefix}$2"
640 fi
641+else
642+ RANLIB_FOR_TARGET="$ac_cv_prog_RANLIB_FOR_TARGET"
643 fi
644
645 else
646@@ -6421,7 +6447,7 @@
647 if test -z "$ac_cv_path_STRIP_FOR_TARGET" ; then
648 if test -n "$with_build_time_tools"; then
649 echo $ac_n "checking for strip in $with_build_time_tools""... $ac_c" 1>&6
650-echo "configure:6425: checking for strip in $with_build_time_tools" >&5
651+echo "configure:6451: checking for strip in $with_build_time_tools" >&5
652 if test -x $with_build_time_tools/strip; then
653 STRIP_FOR_TARGET=`cd $with_build_time_tools && pwd`/strip
654 ac_cv_path_STRIP_FOR_TARGET=$STRIP_FOR_TARGET
655@@ -6432,14 +6458,14 @@
656 elif test $build != $host && test $have_gcc_for_target = yes; then
657 STRIP_FOR_TARGET=`$GCC_FOR_TARGET --print-prog-name=strip`
658 test $STRIP_FOR_TARGET=strip && STRIP_FOR_TARGET=
659- ac_cv_path_STRIP_FOR_TARGET=$STRIP_FOR_TARGET
660+ test -n "$STRIP_FOR_TARGET" && ac_cv_path_STRIP_FOR_TARGET=$STRIP_FOR_TARGET
661 fi
662 fi
663 if test -z "$ac_cv_path_STRIP_FOR_TARGET" ; then
664 # Extract the first word of "strip", so it can be a program name with args.
665 set dummy strip; ac_word=$2
666 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
667-echo "configure:6443: checking for $ac_word" >&5
668+echo "configure:6469: checking for $ac_word" >&5
669 if eval "test \"`echo '$''{'ac_cv_path_STRIP_FOR_TARGET'+set}'`\" = set"; then
670 echo $ac_n "(cached) $ac_c" 1>&6
671 else
672@@ -6476,7 +6502,7 @@
673 if test -n "$with_build_time_tools"; then
674 for ncn_progname in strip; do
675 echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
676-echo "configure:6480: checking for ${ncn_progname} in $with_build_time_tools" >&5
677+echo "configure:6506: checking for ${ncn_progname} in $with_build_time_tools" >&5
678 if test -x $with_build_time_tools/${ncn_progname}; then
679 ac_cv_prog_STRIP_FOR_TARGET=$with_build_time_tools/${ncn_progname}
680 echo "$ac_t""yes" 1>&6
681@@ -6493,7 +6519,7 @@
682 # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
683 set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
684 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
685-echo "configure:6497: checking for $ac_word" >&5
686+echo "configure:6523: checking for $ac_word" >&5
687 if eval "test \"`echo '$''{'ac_cv_prog_STRIP_FOR_TARGET'+set}'`\" = set"; then
688 echo $ac_n "(cached) $ac_c" 1>&6
689 else
690@@ -6524,7 +6550,7 @@
691 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
692 set dummy ${ncn_progname}; ac_word=$2
693 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
694-echo "configure:6528: checking for $ac_word" >&5
695+echo "configure:6554: checking for $ac_word" >&5
696 if eval "test \"`echo '$''{'ac_cv_prog_STRIP_FOR_TARGET'+set}'`\" = set"; then
697 echo $ac_n "(cached) $ac_c" 1>&6
698 else
699@@ -6562,6 +6588,8 @@
700 else
701 STRIP_FOR_TARGET="${ncn_target_tool_prefix}$2"
702 fi
703+else
704+ STRIP_FOR_TARGET="$ac_cv_prog_STRIP_FOR_TARGET"
705 fi
706
707 else
708@@ -6574,7 +6602,7 @@
709 if test -z "$ac_cv_path_WINDRES_FOR_TARGET" ; then
710 if test -n "$with_build_time_tools"; then
711 echo $ac_n "checking for windres in $with_build_time_tools""... $ac_c" 1>&6
712-echo "configure:6578: checking for windres in $with_build_time_tools" >&5
713+echo "configure:6606: checking for windres in $with_build_time_tools" >&5
714 if test -x $with_build_time_tools/windres; then
715 WINDRES_FOR_TARGET=`cd $with_build_time_tools && pwd`/windres
716 ac_cv_path_WINDRES_FOR_TARGET=$WINDRES_FOR_TARGET
717@@ -6585,14 +6613,14 @@
718 elif test $build != $host && test $have_gcc_for_target = yes; then
719 WINDRES_FOR_TARGET=`$GCC_FOR_TARGET --print-prog-name=windres`
720 test $WINDRES_FOR_TARGET=windres && WINDRES_FOR_TARGET=
721- ac_cv_path_WINDRES_FOR_TARGET=$WINDRES_FOR_TARGET
722+ test -n "$WINDRES_FOR_TARGET" && ac_cv_path_WINDRES_FOR_TARGET=$WINDRES_FOR_TARGET
723 fi
724 fi
725 if test -z "$ac_cv_path_WINDRES_FOR_TARGET" ; then
726 # Extract the first word of "windres", so it can be a program name with args.
727 set dummy windres; ac_word=$2
728 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
729-echo "configure:6596: checking for $ac_word" >&5
730+echo "configure:6624: checking for $ac_word" >&5
731 if eval "test \"`echo '$''{'ac_cv_path_WINDRES_FOR_TARGET'+set}'`\" = set"; then
732 echo $ac_n "(cached) $ac_c" 1>&6
733 else
734@@ -6629,7 +6657,7 @@
735 if test -n "$with_build_time_tools"; then
736 for ncn_progname in windres; do
737 echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
738-echo "configure:6633: checking for ${ncn_progname} in $with_build_time_tools" >&5
739+echo "configure:6661: checking for ${ncn_progname} in $with_build_time_tools" >&5
740 if test -x $with_build_time_tools/${ncn_progname}; then
741 ac_cv_prog_WINDRES_FOR_TARGET=$with_build_time_tools/${ncn_progname}
742 echo "$ac_t""yes" 1>&6
743@@ -6646,7 +6674,7 @@
744 # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
745 set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
746 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
747-echo "configure:6650: checking for $ac_word" >&5
748+echo "configure:6678: checking for $ac_word" >&5
749 if eval "test \"`echo '$''{'ac_cv_prog_WINDRES_FOR_TARGET'+set}'`\" = set"; then
750 echo $ac_n "(cached) $ac_c" 1>&6
751 else
752@@ -6677,7 +6705,7 @@
753 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
754 set dummy ${ncn_progname}; ac_word=$2
755 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
756-echo "configure:6681: checking for $ac_word" >&5
757+echo "configure:6709: checking for $ac_word" >&5
758 if eval "test \"`echo '$''{'ac_cv_prog_WINDRES_FOR_TARGET'+set}'`\" = set"; then
759 echo $ac_n "(cached) $ac_c" 1>&6
760 else
761@@ -6715,6 +6743,8 @@
762 else
763 WINDRES_FOR_TARGET="${ncn_target_tool_prefix}$2"
764 fi
765+else
766+ WINDRES_FOR_TARGET="$ac_cv_prog_WINDRES_FOR_TARGET"
767 fi
768
769 else
770@@ -6725,7 +6755,7 @@
771 RAW_CXX_FOR_TARGET="$CXX_FOR_TARGET"
772
773 echo $ac_n "checking where to find the target ar""... $ac_c" 1>&6
774-echo "configure:6729: checking where to find the target ar" >&5
775+echo "configure:6759: checking where to find the target ar" >&5
776 if test "x${build}" != "x${host}" ; then
777 if expr "x$AR_FOR_TARGET" : "x/" > /dev/null; then
778 # We already found the complete path
779@@ -6758,7 +6788,7 @@
780 fi
781 fi
782 echo $ac_n "checking where to find the target as""... $ac_c" 1>&6
783-echo "configure:6762: checking where to find the target as" >&5
784+echo "configure:6792: checking where to find the target as" >&5
785 if test "x${build}" != "x${host}" ; then
786 if expr "x$AS_FOR_TARGET" : "x/" > /dev/null; then
787 # We already found the complete path
788@@ -6791,7 +6821,7 @@
789 fi
790 fi
791 echo $ac_n "checking where to find the target cc""... $ac_c" 1>&6
792-echo "configure:6795: checking where to find the target cc" >&5
793+echo "configure:6825: checking where to find the target cc" >&5
794 if test "x${build}" != "x${host}" ; then
795 if expr "x$CC_FOR_TARGET" : "x/" > /dev/null; then
796 # We already found the complete path
797@@ -6824,7 +6854,7 @@
798 fi
799 fi
800 echo $ac_n "checking where to find the target c++""... $ac_c" 1>&6
801-echo "configure:6828: checking where to find the target c++" >&5
802+echo "configure:6858: checking where to find the target c++" >&5
803 if test "x${build}" != "x${host}" ; then
804 if expr "x$CXX_FOR_TARGET" : "x/" > /dev/null; then
805 # We already found the complete path
806@@ -6860,7 +6890,7 @@
807 fi
808 fi
809 echo $ac_n "checking where to find the target c++ for libstdc++""... $ac_c" 1>&6
810-echo "configure:6864: checking where to find the target c++ for libstdc++" >&5
811+echo "configure:6894: checking where to find the target c++ for libstdc++" >&5
812 if test "x${build}" != "x${host}" ; then
813 if expr "x$RAW_CXX_FOR_TARGET" : "x/" > /dev/null; then
814 # We already found the complete path
815@@ -6896,7 +6926,7 @@
816 fi
817 fi
818 echo $ac_n "checking where to find the target dlltool""... $ac_c" 1>&6
819-echo "configure:6900: checking where to find the target dlltool" >&5
820+echo "configure:6930: checking where to find the target dlltool" >&5
821 if test "x${build}" != "x${host}" ; then
822 if expr "x$DLLTOOL_FOR_TARGET" : "x/" > /dev/null; then
823 # We already found the complete path
824@@ -6929,7 +6959,7 @@
825 fi
826 fi
827 echo $ac_n "checking where to find the target gcc""... $ac_c" 1>&6
828-echo "configure:6933: checking where to find the target gcc" >&5
829+echo "configure:6963: checking where to find the target gcc" >&5
830 if test "x${build}" != "x${host}" ; then
831 if expr "x$GCC_FOR_TARGET" : "x/" > /dev/null; then
832 # We already found the complete path
833@@ -6962,7 +6992,7 @@
834 fi
835 fi
836 echo $ac_n "checking where to find the target gcj""... $ac_c" 1>&6
837-echo "configure:6966: checking where to find the target gcj" >&5
838+echo "configure:6996: checking where to find the target gcj" >&5
839 if test "x${build}" != "x${host}" ; then
840 if expr "x$GCJ_FOR_TARGET" : "x/" > /dev/null; then
841 # We already found the complete path
842@@ -6998,7 +7028,7 @@
843 fi
844 fi
845 echo $ac_n "checking where to find the target gfortran""... $ac_c" 1>&6
846-echo "configure:7002: checking where to find the target gfortran" >&5
847+echo "configure:7032: checking where to find the target gfortran" >&5
848 if test "x${build}" != "x${host}" ; then
849 if expr "x$GFORTRAN_FOR_TARGET" : "x/" > /dev/null; then
850 # We already found the complete path
851@@ -7034,7 +7064,7 @@
852 fi
853 fi
854 echo $ac_n "checking where to find the target ld""... $ac_c" 1>&6
855-echo "configure:7038: checking where to find the target ld" >&5
856+echo "configure:7068: checking where to find the target ld" >&5
857 if test "x${build}" != "x${host}" ; then
858 if expr "x$LD_FOR_TARGET" : "x/" > /dev/null; then
859 # We already found the complete path
860@@ -7067,7 +7097,7 @@
861 fi
862 fi
863 echo $ac_n "checking where to find the target lipo""... $ac_c" 1>&6
864-echo "configure:7071: checking where to find the target lipo" >&5
865+echo "configure:7101: checking where to find the target lipo" >&5
866 if test "x${build}" != "x${host}" ; then
867 if expr "x$LIPO_FOR_TARGET" : "x/" > /dev/null; then
868 # We already found the complete path
869@@ -7090,7 +7120,7 @@
870 fi
871 fi
872 echo $ac_n "checking where to find the target nm""... $ac_c" 1>&6
873-echo "configure:7094: checking where to find the target nm" >&5
874+echo "configure:7124: checking where to find the target nm" >&5
875 if test "x${build}" != "x${host}" ; then
876 if expr "x$NM_FOR_TARGET" : "x/" > /dev/null; then
877 # We already found the complete path
878@@ -7123,7 +7153,7 @@
879 fi
880 fi
881 echo $ac_n "checking where to find the target objdump""... $ac_c" 1>&6
882-echo "configure:7127: checking where to find the target objdump" >&5
883+echo "configure:7157: checking where to find the target objdump" >&5
884 if test "x${build}" != "x${host}" ; then
885 if expr "x$OBJDUMP_FOR_TARGET" : "x/" > /dev/null; then
886 # We already found the complete path
887@@ -7156,7 +7186,7 @@
888 fi
889 fi
890 echo $ac_n "checking where to find the target ranlib""... $ac_c" 1>&6
891-echo "configure:7160: checking where to find the target ranlib" >&5
892+echo "configure:7190: checking where to find the target ranlib" >&5
893 if test "x${build}" != "x${host}" ; then
894 if expr "x$RANLIB_FOR_TARGET" : "x/" > /dev/null; then
895 # We already found the complete path
896@@ -7189,7 +7219,7 @@
897 fi
898 fi
899 echo $ac_n "checking where to find the target strip""... $ac_c" 1>&6
900-echo "configure:7193: checking where to find the target strip" >&5
901+echo "configure:7223: checking where to find the target strip" >&5
902 if test "x${build}" != "x${host}" ; then
903 if expr "x$STRIP_FOR_TARGET" : "x/" > /dev/null; then
904 # We already found the complete path
905@@ -7222,7 +7252,7 @@
906 fi
907 fi
908 echo $ac_n "checking where to find the target windres""... $ac_c" 1>&6
909-echo "configure:7226: checking where to find the target windres" >&5
910+echo "configure:7256: checking where to find the target windres" >&5
911 if test "x${build}" != "x${host}" ; then
912 if expr "x$WINDRES_FOR_TARGET" : "x/" > /dev/null; then
913 # We already found the complete path
914@@ -7283,7 +7313,7 @@
915
916
917 echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
918-echo "configure:7287: checking whether to enable maintainer-specific portions of Makefiles" >&5
919+echo "configure:7317: checking whether to enable maintainer-specific portions of Makefiles" >&5
920 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
921 if test "${enable_maintainer_mode+set}" = set; then
922 enableval="$enable_maintainer_mode"
923@@ -7332,16 +7362,22 @@
924 # Pass -fkeep-inline-functions for stage 1 if the GCC version supports it.
925 CFLAGS="$CFLAGS -fkeep-inline-functions"
926 echo $ac_n "checking whether -fkeep-inline-functions is supported""... $ac_c" 1>&6
927-echo "configure:7336: checking whether -fkeep-inline-functions is supported" >&5
928+echo "configure:7366: checking whether -fkeep-inline-functions is supported" >&5
929 cat > conftest.$ac_ext <<EOF
930-#line 7338 "configure"
931+#line 7368 "configure"
5f3731d9
PS
932 #include "confdefs.h"
933
934+#if (__GNUC__ < 3) \
935+ || (__GNUC__ == 3 && (__GNUC_MINOR__ < 3 \
936+ || (__GNUC_MINOR__ == 3 && __GNUC_PATCHLEVEL__ < 1)))
937+#error http://gcc.gnu.org/PR29382
938+#endif
939+
940 int main() {
686fea03 941
5f3731d9 942 ; return 0; }
67dc168c
PS
943 EOF
944-if { (eval echo configure:7345: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
945+if { (eval echo configure:7381: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
946 rm -rf conftest*
947 echo "$ac_t""yes" 1>&6; stage1_cflags="$stage1_cflags -fkeep-inline-functions"
948 else
949Index: libgomp/ChangeLog
950===================================================================
951--- libgomp/ChangeLog (.../tags/gcc_4_2_0_release) (revision 126002)
952+++ libgomp/ChangeLog (.../branches/gcc-4_2-branch) (revision 126002)
953@@ -1,3 +1,10 @@
954+2007-06-21 Jakub Jelinek <jakub@redhat.com>
955+
956+ PR middle-end/32362
957+ * testsuite/libgomp.c/pr32362-1.c: New test.
958+ * testsuite/libgomp.c/pr32362-2.c: New test.
959+ * testsuite/libgomp.c/pr32362-3.c: New test.
960+
961 2007-05-13 Release Manager
962
963 * GCC 4.2.0 released.
964Index: libgomp/testsuite/libgomp.c/pr32362-1.c
965===================================================================
966--- libgomp/testsuite/libgomp.c/pr32362-1.c (.../tags/gcc_4_2_0_release) (revision 0)
967+++ libgomp/testsuite/libgomp.c/pr32362-1.c (.../branches/gcc-4_2-branch) (revision 126002)
968@@ -0,0 +1,32 @@
969+/* PR middle-end/32362 */
970+/* { dg-do run } */
971+/* { dg-options "-O2" } */
972+
973+#include <omp.h>
974+#include <stdlib.h>
975+
976+int
977+main ()
978+{
979+ int n[4] = { -1, -1, -1, -1 };
980+ static int a = 2, b = 4;
981+ omp_set_num_threads (4);
982+ omp_set_dynamic (0);
983+ omp_set_nested (1);
984+#pragma omp parallel private(b)
985+ {
986+ b = omp_get_thread_num ();
987+#pragma omp parallel firstprivate(a)
988+ {
989+ a = (omp_get_thread_num () + a) + 1;
990+ if (b == omp_get_thread_num ())
991+ n[omp_get_thread_num ()] = a + (b << 4);
992+ }
993+ }
994+ if (n[0] != 3)
995+ abort ();
996+ if (n[3] != -1
997+ && (n[1] != 0x14 || n[2] != 0x25 || n[3] != 0x36))
998+ abort ();
999+ return 0;
1000+}
1001Index: libgomp/testsuite/libgomp.c/pr32362-3.c
1002===================================================================
1003--- libgomp/testsuite/libgomp.c/pr32362-3.c (.../tags/gcc_4_2_0_release) (revision 0)
1004+++ libgomp/testsuite/libgomp.c/pr32362-3.c (.../branches/gcc-4_2-branch) (revision 126002)
1005@@ -0,0 +1,34 @@
1006+/* PR middle-end/32362 */
1007+/* { dg-do run } */
1008+/* { dg-options "-O2" } */
1009+
1010+#include <omp.h>
1011+#include <stdlib.h>
1012+
1013+int a = 2;
1014+
1015+int
1016+main ()
1017+{
1018+ int n[4] = { -1, -1, -1, -1 };
1019+ int b = 4;
1020+ omp_set_num_threads (4);
1021+ omp_set_dynamic (0);
1022+ omp_set_nested (1);
1023+#pragma omp parallel private(b)
1024+ {
1025+ b = omp_get_thread_num ();
1026+#pragma omp parallel firstprivate(a)
1027+ {
1028+ a = (omp_get_thread_num () + a) + 1;
1029+ if (b == omp_get_thread_num ())
1030+ n[omp_get_thread_num ()] = a + (b << 4);
1031+ }
1032+ }
1033+ if (n[0] != 3)
1034+ abort ();
1035+ if (n[3] != -1
1036+ && (n[1] != 0x14 || n[2] != 0x25 || n[3] != 0x36))
1037+ abort ();
1038+ return 0;
1039+}
1040Index: libgomp/testsuite/libgomp.c/pr32362-2.c
1041===================================================================
1042--- libgomp/testsuite/libgomp.c/pr32362-2.c (.../tags/gcc_4_2_0_release) (revision 0)
1043+++ libgomp/testsuite/libgomp.c/pr32362-2.c (.../branches/gcc-4_2-branch) (revision 126002)
1044@@ -0,0 +1,33 @@
1045+/* PR middle-end/32362 */
1046+/* { dg-do run } */
1047+/* { dg-options "-O2" } */
1048+
1049+#include <omp.h>
1050+#include <stdlib.h>
1051+
1052+int a = 2, b = 4;
1053+
1054+int
1055+main ()
1056+{
1057+ int n[4] = { -1, -1, -1, -1 };
1058+ omp_set_num_threads (4);
1059+ omp_set_dynamic (0);
1060+ omp_set_nested (1);
1061+#pragma omp parallel private(b)
1062+ {
1063+ b = omp_get_thread_num ();
1064+#pragma omp parallel firstprivate(a)
1065+ {
1066+ a = (omp_get_thread_num () + a) + 1;
1067+ if (b == omp_get_thread_num ())
1068+ n[omp_get_thread_num ()] = a + (b << 4);
1069+ }
1070+ }
1071+ if (n[0] != 3)
1072+ abort ();
1073+ if (n[3] != -1
1074+ && (n[1] != 0x14 || n[2] != 0x25 || n[3] != 0x36))
1075+ abort ();
1076+ return 0;
1077+}
5f3731d9 1078Index: gcc/tree-vrp.c
686fea03 1079===================================================================
67dc168c
PS
1080--- gcc/tree-vrp.c (.../tags/gcc_4_2_0_release) (revision 126002)
1081+++ gcc/tree-vrp.c (.../branches/gcc-4_2-branch) (revision 126002)
5f3731d9
PS
1082@@ -195,7 +195,28 @@
1083 || operand_equal_p (val, TYPE_MIN_VALUE (TREE_TYPE (val)), 0)));
2cb538fa
PS
1084 }
1085
5f3731d9
PS
1086+/* If VAL is now an overflow infinity, return VAL. Otherwise, return
1087+ the same value with TREE_OVERFLOW clear. This can be used to avoid
1088+ confusing a regular value with an overflow value. */
1089
1090+static inline tree
1091+avoid_overflow_infinity (tree val)
2cb538fa 1092+{
5f3731d9
PS
1093+ if (!is_overflow_infinity (val))
1094+ return val;
1095+
1096+ if (operand_equal_p (val, TYPE_MAX_VALUE (TREE_TYPE (val)), 0))
1097+ return TYPE_MAX_VALUE (TREE_TYPE (val));
1098+ else
2cb538fa 1099+ {
5f3731d9
PS
1100+#ifdef ENABLE_CHECKING
1101+ gcc_assert (operand_equal_p (val, TYPE_MIN_VALUE (TREE_TYPE (val)), 0));
1102+#endif
1103+ return TYPE_MIN_VALUE (TREE_TYPE (val));
2cb538fa 1104+ }
2cb538fa
PS
1105+}
1106+
5f3731d9
PS
1107+
1108 /* Return whether VAL is equal to the maximum value of its type. This
1109 will be true for a positive overflow infinity. We can't do a
1110 simple equality comparison with TYPE_MAX_VALUE because C typedefs
1111@@ -351,23 +372,11 @@
1112 infinity when we shouldn't. */
1113
1114 static inline void
1115-set_value_range_to_value (value_range_t *vr, tree val)
1116+set_value_range_to_value (value_range_t *vr, tree val, bitmap equiv)
1117 {
1118 gcc_assert (is_gimple_min_invariant (val));
1119- if (is_overflow_infinity (val))
1120- {
1121- if (operand_equal_p (val, TYPE_MAX_VALUE (TREE_TYPE (val)), 0))
1122- val = TYPE_MAX_VALUE (TREE_TYPE (val));
1123- else
1124- {
1125-#ifdef ENABLE_CHECKING
1126- gcc_assert (operand_equal_p (val,
1127- TYPE_MIN_VALUE (TREE_TYPE (val)), 0));
1128-#endif
1129- val = TYPE_MIN_VALUE (TREE_TYPE (val));
1130- }
1131- }
1132- set_value_range (vr, VR_RANGE, val, val, NULL);
1133+ val = avoid_overflow_infinity (val);
1134+ set_value_range (vr, VR_RANGE, val, val, equiv);
1135 }
1136
2cb538fa 1137 /* Set value range VR to a non-negative range of type TYPE.
5f3731d9
PS
1138@@ -411,8 +420,7 @@
1139 static inline void
1140 set_value_range_to_null (value_range_t *vr, tree type)
1141 {
1142- tree zero = build_int_cst (type, 0);
1143- set_value_range (vr, VR_RANGE, zero, zero, vr->equiv);
1144+ set_value_range_to_value (vr, build_int_cst (type, 0), vr->equiv);
1145 }
1146
1147
4cb26ef3
AM
1148@@ -763,7 +771,9 @@
1149 if (!TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (val1)))
1150 return -2;
1151
1152- if (strict_overflow_p != NULL)
1153+ if (strict_overflow_p != NULL
1154+ && (code1 == SSA_NAME || !TREE_NO_WARNING (val1))
1155+ && (code2 == SSA_NAME || !TREE_NO_WARNING (val2)))
1156 *strict_overflow_p = true;
1157
1158 if (code1 == SSA_NAME)
1159@@ -1028,6 +1038,8 @@
5f3731d9
PS
1160 cond_code = swap_tree_comparison (TREE_CODE (cond));
1161 }
1162
1163+ limit = avoid_overflow_infinity (limit);
1164+
1165 type = TREE_TYPE (limit);
1166 gcc_assert (limit != var);
1167
4cb26ef3
AM
1168@@ -1167,6 +1179,8 @@
1169 {
1170 tree one = build_int_cst (type, 1);
1171 max = fold_build2 (MINUS_EXPR, type, max, one);
1172+ if (EXPR_P (max))
1173+ TREE_NO_WARNING (max) = 1;
1174 }
1175
1176 set_value_range (vr_p, VR_RANGE, min, max, vr_p->equiv);
1177@@ -1200,6 +1214,8 @@
1178 {
1179 tree one = build_int_cst (type, 1);
1180 min = fold_build2 (PLUS_EXPR, type, min, one);
1181+ if (EXPR_P (min))
1182+ TREE_NO_WARNING (min) = 1;
1183 }
1184
1185 set_value_range (vr_p, VR_RANGE, min, max, vr_p->equiv);
1186@@ -1619,7 +1635,7 @@
2cb538fa
PS
1187 if (TREE_CODE (op0) == SSA_NAME)
1188 vr0 = *(get_value_range (op0));
1189 else if (is_gimple_min_invariant (op0))
5f3731d9
PS
1190- set_value_range_to_value (&vr0, op0);
1191+ set_value_range_to_value (&vr0, op0, NULL);
2cb538fa
PS
1192 else
1193 set_value_range_to_varying (&vr0);
1194
4cb26ef3 1195@@ -1627,7 +1643,7 @@
2cb538fa
PS
1196 if (TREE_CODE (op1) == SSA_NAME)
1197 vr1 = *(get_value_range (op1));
1198 else if (is_gimple_min_invariant (op1))
5f3731d9
PS
1199- set_value_range_to_value (&vr1, op1);
1200+ set_value_range_to_value (&vr1, op1, NULL);
2cb538fa
PS
1201 else
1202 set_value_range_to_varying (&vr1);
1203
4cb26ef3 1204@@ -2006,7 +2022,7 @@
2cb538fa
PS
1205 if (TREE_CODE (op0) == SSA_NAME)
1206 vr0 = *(get_value_range (op0));
1207 else if (is_gimple_min_invariant (op0))
5f3731d9
PS
1208- set_value_range_to_value (&vr0, op0);
1209+ set_value_range_to_value (&vr0, op0, NULL);
2cb538fa
PS
1210 else
1211 set_value_range_to_varying (&vr0);
1212
67dc168c
PS
1213@@ -2091,6 +2107,8 @@
1214 && is_gimple_val (new_max)
1215 && tree_int_cst_equal (new_min, orig_min)
1216 && tree_int_cst_equal (new_max, orig_max)
1217+ && (!is_overflow_infinity (new_min)
1218+ || !is_overflow_infinity (new_max))
1219 && compare_values (new_min, new_max) <= 0
1220 && compare_values (new_min, new_max) >= -1)
1221 {
1222@@ -2393,7 +2411,10 @@
5f3731d9
PS
1223 its type may be different from _Bool. Convert VAL to EXPR's
1224 type. */
1225 val = fold_convert (TREE_TYPE (expr), val);
1226- set_value_range (vr, VR_RANGE, val, val, vr->equiv);
1227+ if (is_gimple_min_invariant (val))
1228+ set_value_range_to_value (vr, val, vr->equiv);
1229+ else
1230+ set_value_range (vr, VR_RANGE, val, val, vr->equiv);
1231 }
1232 else
1233 set_value_range_to_varying (vr);
67dc168c 1234@@ -2424,7 +2445,7 @@
2cb538fa
PS
1235 else if (TREE_CODE_CLASS (code) == tcc_comparison)
1236 extract_range_from_comparison (vr, expr);
1237 else if (is_gimple_min_invariant (expr))
5f3731d9
PS
1238- set_value_range_to_value (vr, expr);
1239+ set_value_range_to_value (vr, expr, NULL);
2cb538fa
PS
1240 else
1241 set_value_range_to_varying (vr);
1242
67dc168c 1243@@ -2545,6 +2566,13 @@
4cb26ef3
AM
1244 if (compare_values (min, max) == 1)
1245 return;
1246 }
1247+
1248+ /* According to the loop information, the variable does not
1249+ overflow. If we think it does, probably because of an
1250+ overflow due to arithmetic on a different INF value,
1251+ reset now. */
1252+ if (is_negative_overflow_infinity (min))
1253+ min = tmin;
1254 }
1255 else
1256 {
67dc168c 1257@@ -2557,13 +2585,62 @@
4cb26ef3
AM
1258 if (compare_values (min, max) == 1)
1259 return;
1260 }
1261+
1262+ if (is_positive_overflow_infinity (max))
1263+ max = tmax;
1264 }
1265
1266 set_value_range (vr, VR_RANGE, min, max, vr->equiv);
1267 }
1268 }
1269
1270+/* Return true if VAR may overflow at STMT. This checks any available
1271+ loop information to see if we can determine that VAR does not
1272+ overflow. */
1273
1274+static bool
1275+vrp_var_may_overflow (tree var, tree stmt)
1276+{
1277+ struct loop *l;
1278+ tree chrec, init, step;
1279+
1280+ if (current_loops == NULL)
1281+ return true;
1282+
1283+ l = loop_containing_stmt (stmt);
1284+ if (l == NULL)
1285+ return true;
1286+
1287+ chrec = instantiate_parameters (l, analyze_scalar_evolution (l, var));
1288+ if (TREE_CODE (chrec) != POLYNOMIAL_CHREC)
1289+ return true;
1290+
1291+ init = initial_condition_in_loop_num (chrec, l->num);
1292+ step = evolution_part_in_loop_num (chrec, l->num);
1293+
1294+ if (step == NULL_TREE
1295+ || !is_gimple_min_invariant (step)
1296+ || !valid_value_p (init))
1297+ return true;
1298+
1299+ /* If we get here, we know something useful about VAR based on the
1300+ loop information. If it wraps, it may overflow. */
1301+
1302+ if (scev_probably_wraps_p (init, step, stmt,
1303+ current_loops->parray[CHREC_VARIABLE (chrec)],
1304+ true))
1305+ return true;
1306+
1307+ if (dump_file && (dump_flags & TDF_DETAILS) != 0)
1308+ {
1309+ print_generic_expr (dump_file, var, 0);
1310+ fprintf (dump_file, ": loop information indicates does not overflow\n");
1311+ }
1312+
1313+ return false;
1314+}
1315+
1316+
1317 /* Given two numeric value ranges VR0, VR1 and a comparison code COMP:
1318
1319 - Return BOOLEAN_TRUE_NODE if VR0 COMP VR1 always returns true for
67dc168c 1320@@ -4156,7 +4233,7 @@
5f3731d9
PS
1321 t = retval = NULL_TREE;
1322 EXECUTE_IF_SET_IN_BITMAP (e2, 0, i2, bi2)
1323 {
1324- bool sop;
1325+ bool sop = false;
2cb538fa 1326
5f3731d9 1327 value_range_t vr2 = *(vr_value[i2]);
2cb538fa 1328
67dc168c 1329@@ -4773,7 +4850,8 @@
4cb26ef3
AM
1330 if (vrp_val_is_max (vr_result.max))
1331 goto varying;
1332
1333- if (!needs_overflow_infinity (TREE_TYPE (vr_result.min)))
1334+ if (!needs_overflow_infinity (TREE_TYPE (vr_result.min))
1335+ || !vrp_var_may_overflow (lhs, phi))
1336 vr_result.min = TYPE_MIN_VALUE (TREE_TYPE (vr_result.min));
1337 else if (supports_overflow_infinity (TREE_TYPE (vr_result.min)))
1338 vr_result.min =
67dc168c 1339@@ -4791,7 +4869,8 @@
4cb26ef3
AM
1340 if (vrp_val_is_min (vr_result.min))
1341 goto varying;
1342
1343- if (!needs_overflow_infinity (TREE_TYPE (vr_result.max)))
1344+ if (!needs_overflow_infinity (TREE_TYPE (vr_result.max))
1345+ || !vrp_var_may_overflow (lhs, phi))
1346 vr_result.max = TYPE_MAX_VALUE (TREE_TYPE (vr_result.max));
1347 else if (supports_overflow_infinity (TREE_TYPE (vr_result.max)))
1348 vr_result.max =
67dc168c 1349@@ -4971,6 +5050,8 @@
4cb26ef3
AM
1350 {
1351 tree one = build_int_cst (TREE_TYPE (op0), 1);
1352 max = fold_build2 (MINUS_EXPR, TREE_TYPE (op0), max, one);
1353+ if (EXPR_P (max))
1354+ TREE_NO_WARNING (max) = 1;
1355 }
1356 }
1357 else if (cond_code == GE_EXPR || cond_code == GT_EXPR)
67dc168c 1358@@ -4984,6 +5065,8 @@
4cb26ef3
AM
1359 {
1360 tree one = build_int_cst (TREE_TYPE (op0), 1);
1361 min = fold_build2 (PLUS_EXPR, TREE_TYPE (op0), min, one);
1362+ if (EXPR_P (min))
1363+ TREE_NO_WARNING (min) = 1;
1364 }
1365 }
1366
5f3731d9 1367Index: gcc/DATESTAMP
2cb538fa 1368===================================================================
67dc168c
PS
1369--- gcc/DATESTAMP (.../tags/gcc_4_2_0_release) (revision 126002)
1370+++ gcc/DATESTAMP (.../branches/gcc-4_2-branch) (revision 126002)
5f3731d9
PS
1371@@ -1 +1 @@
1372-20070514
67dc168c
PS
1373+20070625
1374Index: gcc/reload.c
1375===================================================================
1376--- gcc/reload.c (.../tags/gcc_4_2_0_release) (revision 126002)
1377+++ gcc/reload.c (.../branches/gcc-4_2-branch) (revision 126002)
1378@@ -1180,7 +1180,7 @@
1379
1380 /* If IN appears in OUT, we can't share any input-only reload for IN. */
1381 if (in != 0 && out != 0 && MEM_P (out)
1382- && (REG_P (in) || MEM_P (in))
1383+ && (REG_P (in) || MEM_P (in) || GET_CODE (in) == PLUS)
1384 && reg_overlap_mentioned_for_reload_p (in, XEXP (out, 0)))
1385 dont_share = 1;
1386
1387@@ -6540,7 +6540,8 @@
1388 if (REG_P (in))
1389 return 0;
1390 else if (GET_CODE (in) == PLUS)
1391- return (reg_overlap_mentioned_for_reload_p (x, XEXP (in, 0))
1392+ return (rtx_equal_p (x, in)
1393+ || reg_overlap_mentioned_for_reload_p (x, XEXP (in, 0))
1394 || reg_overlap_mentioned_for_reload_p (x, XEXP (in, 1)));
1395 else return (reg_overlap_mentioned_for_reload_p (XEXP (x, 0), in)
1396 || reg_overlap_mentioned_for_reload_p (XEXP (x, 1), in));
5f3731d9
PS
1397Index: gcc/pointer-set.c
1398===================================================================
67dc168c
PS
1399--- gcc/pointer-set.c (.../tags/gcc_4_2_0_release) (revision 126002)
1400+++ gcc/pointer-set.c (.../branches/gcc-4_2-branch) (revision 126002)
5f3731d9
PS
1401@@ -22,13 +22,12 @@
1402 #include "system.h"
1403 #include "pointer-set.h"
1404
1405-/* A pointer sets is represented as a simple open-addressing hash
1406+/* A pointer set is represented as a simple open-addressing hash
1407 table. Simplifications: The hash code is based on the value of the
1408 pointer, not what it points to. The number of buckets is always a
1409 power of 2. Null pointers are a reserved value. Deletion is not
1410- supported. There is no mechanism for user control of hash
1411- function, equality comparison, initial size, or resizing policy.
1412-*/
1413+ supported (yet). There is no mechanism for user control of hash
1414+ function, equality comparison, initial size, or resizing policy. */
1415
1416 struct pointer_set_t
686fea03 1417 {
5f3731d9
PS
1418@@ -114,22 +113,16 @@
1419 }
686fea03 1420 }
686fea03 1421
5f3731d9
PS
1422-/* Subroutine of pointer_set_insert. Inserts P into an empty
1423- element of SLOTS, an array of length N_SLOTS. Returns nonzero
1424- if P was already present in N_SLOTS. */
1425-static int
1426+/* Subroutine of pointer_set_insert. Return the insertion slot for P into
1427+ an empty element of SLOTS, an array of length N_SLOTS. */
1428+static inline size_t
1429 insert_aux (void *p, void **slots, size_t n_slots, size_t log_slots)
1430 {
1431 size_t n = hash1 (p, n_slots, log_slots);
1432 while (true)
686fea03 1433 {
5f3731d9
PS
1434- if (slots[n] == p)
1435- return 1;
1436- else if (slots[n] == 0)
1437- {
1438- slots[n] = p;
1439- return 0;
1440- }
1441+ if (slots[n] == p || slots[n] == 0)
1442+ return n;
686fea03 1443 else
5f3731d9
PS
1444 {
1445 ++n;
1446@@ -144,12 +137,10 @@
1447 int
1448 pointer_set_insert (struct pointer_set_t *pset, void *p)
686fea03 1449 {
5f3731d9
PS
1450- if (insert_aux (p, pset->slots, pset->n_slots, pset->log_slots))
1451- return 1;
1452-
1453- /* We've inserted a new element. Expand the table if necessary to keep
1454- the load factor small. */
1455- ++pset->n_elements;
1456+ size_t n;
1457+
1458+ /* For simplicity, expand the set even if P is already there. This can be
1459+ superfluous but can happen at most once. */
1460 if (pset->n_elements > pset->n_slots / 4)
686fea03 1461 {
5f3731d9
PS
1462 size_t new_log_slots = pset->log_slots + 1;
1463@@ -158,9 +149,10 @@
1464 size_t i;
686fea03 1465
5f3731d9
PS
1466 for (i = 0; i < pset->n_slots; ++i)
1467- {
1468- if (pset->slots[i])
1469- insert_aux (pset->slots[i], new_slots, new_n_slots, new_log_slots);
1470+ {
1471+ void *value = pset->slots[i];
1472+ n = insert_aux (value, new_slots, new_n_slots, new_log_slots);
1473+ new_slots[n] = value;
2cb538fa
PS
1474 }
1475
5f3731d9
PS
1476 XDELETEVEC (pset->slots);
1477@@ -169,5 +161,144 @@
1478 pset->slots = new_slots;
686fea03 1479 }
686fea03 1480
5f3731d9
PS
1481+ n = insert_aux (p, pset->slots, pset->n_slots, pset->log_slots);
1482+ if (pset->slots[n])
1483+ return 1;
686fea03 1484+
5f3731d9
PS
1485+ pset->slots[n] = p;
1486+ ++pset->n_elements;
1487 return 0;
686fea03 1488 }
2cb538fa 1489+
5f3731d9
PS
1490+/* Pass each pointer in PSET to the function in FN, together with the fixed
1491+ parameter DATA. If FN returns false, the iteration stops. */
2cb538fa 1492+
5f3731d9
PS
1493+void pointer_set_traverse (struct pointer_set_t *pset,
1494+ bool (*fn) (void *, void *), void *data)
1495+{
1496+ size_t i;
1497+ for (i = 0; i < pset->n_slots; ++i)
1498+ if (pset->slots[i] && !fn (pset->slots[i], data))
1499+ break;
1500+}
2cb538fa 1501+
5f3731d9
PS
1502+\f
1503+/* A pointer map is represented the same way as a pointer_set, so
1504+ the hash code is based on the address of the key, rather than
1505+ its contents. Null keys are a reserved value. Deletion is not
1506+ supported (yet). There is no mechanism for user control of hash
1507+ function, equality comparison, initial size, or resizing policy. */
2cb538fa 1508+
5f3731d9
PS
1509+struct pointer_map_t
1510+{
1511+ size_t log_slots;
1512+ size_t n_slots; /* n_slots = 2^log_slots */
1513+ size_t n_elements;
2cb538fa 1514+
5f3731d9
PS
1515+ void **keys;
1516+ void **values;
1517+};
2cb538fa 1518+
5f3731d9
PS
1519+/* Allocate an empty pointer map. */
1520+struct pointer_map_t *
1521+pointer_map_create (void)
1522+{
1523+ struct pointer_map_t *result = XNEW (struct pointer_map_t);
2cb538fa 1524+
5f3731d9
PS
1525+ result->n_elements = 0;
1526+ result->log_slots = 8;
1527+ result->n_slots = (size_t) 1 << result->log_slots;
2cb538fa 1528+
5f3731d9
PS
1529+ result->keys = XCNEWVEC (void *, result->n_slots);
1530+ result->values = XCNEWVEC (void *, result->n_slots);
1531+ return result;
1532+}
2cb538fa 1533+
5f3731d9
PS
1534+/* Reclaims all memory associated with PMAP. */
1535+void pointer_map_destroy (struct pointer_map_t *pmap)
1536+{
1537+ XDELETEVEC (pmap->keys);
1538+ XDELETEVEC (pmap->values);
1539+ XDELETE (pmap);
1540+}
2cb538fa 1541+
5f3731d9
PS
1542+/* Returns a pointer to the value to which P maps, if PMAP contains P. P
1543+ must be nonnull. Return NULL if PMAP does not contain P.
2cb538fa 1544+
5f3731d9
PS
1545+ Collisions are resolved by linear probing. */
1546+void **
1547+pointer_map_contains (struct pointer_map_t *pmap, void *p)
1548+{
1549+ size_t n = hash1 (p, pmap->n_slots, pmap->log_slots);
2cb538fa 1550+
5f3731d9
PS
1551+ while (true)
1552+ {
1553+ if (pmap->keys[n] == p)
1554+ return &pmap->values[n];
1555+ else if (pmap->keys[n] == 0)
1556+ return NULL;
1557+ else
1558+ {
1559+ ++n;
1560+ if (n == pmap->n_slots)
1561+ n = 0;
1562+ }
1563+ }
1564+}
2cb538fa 1565+
5f3731d9
PS
1566+/* Inserts P into PMAP if it wasn't already there. Returns a pointer
1567+ to the value. P must be nonnull. */
1568+void **
1569+pointer_map_insert (struct pointer_map_t *pmap, void *p)
1570+{
1571+ size_t n;
2cb538fa 1572+
5f3731d9
PS
1573+ /* For simplicity, expand the map even if P is already there. This can be
1574+ superfluous but can happen at most once. */
1575+ if (pmap->n_elements > pmap->n_slots / 4)
1576+ {
1577+ size_t new_log_slots = pmap->log_slots + 1;
1578+ size_t new_n_slots = pmap->n_slots * 2;
1579+ void **new_keys = XCNEWVEC (void *, new_n_slots);
1580+ void **new_values = XCNEWVEC (void *, new_n_slots);
1581+ size_t i;
1582+
1583+ for (i = 0; i < pmap->n_slots; ++i)
1584+ if (pmap->keys[i])
1585+ {
1586+ void *key = pmap->keys[i];
1587+ n = insert_aux (key, new_keys, new_n_slots, new_log_slots);
1588+ new_keys[n] = key;
1589+ new_values[n] = pmap->values[i];
1590+ }
2cb538fa 1591+
5f3731d9
PS
1592+ XDELETEVEC (pmap->keys);
1593+ XDELETEVEC (pmap->values);
1594+ pmap->n_slots = new_n_slots;
1595+ pmap->log_slots = new_log_slots;
1596+ pmap->keys = new_keys;
1597+ pmap->values = new_values;
1598+ }
2cb538fa 1599+
5f3731d9
PS
1600+ n = insert_aux (p, pmap->keys, pmap->n_slots, pmap->log_slots);
1601+ if (!pmap->keys[n])
1602+ {
1603+ ++pmap->n_elements;
1604+ pmap->keys[n] = p;
1605+ }
2cb538fa 1606+
5f3731d9
PS
1607+ return &pmap->values[n];
1608+}
2cb538fa 1609+
5f3731d9
PS
1610+/* Pass each pointer in PMAP to the function in FN, together with the pointer
1611+ to the value and the fixed parameter DATA. If FN returns false, the
1612+ iteration stops. */
2cb538fa 1613+
5f3731d9
PS
1614+void pointer_map_traverse (struct pointer_map_t *pmap,
1615+ bool (*fn) (void *, void **, void *), void *data)
1616+{
1617+ size_t i;
1618+ for (i = 0; i < pmap->n_slots; ++i)
1619+ if (pmap->keys[i] && !fn (pmap->keys[i], &pmap->values[i], data))
1620+ break;
1621+}
1622Index: gcc/pointer-set.h
1623===================================================================
67dc168c
PS
1624--- gcc/pointer-set.h (.../tags/gcc_4_2_0_release) (revision 126002)
1625+++ gcc/pointer-set.h (.../branches/gcc-4_2-branch) (revision 126002)
5f3731d9
PS
1626@@ -22,11 +22,21 @@
1627 #define POINTER_SET_H
1628
1629 struct pointer_set_t;
1630-
1631 struct pointer_set_t *pointer_set_create (void);
1632 void pointer_set_destroy (struct pointer_set_t *pset);
1633
1634 int pointer_set_contains (struct pointer_set_t *pset, void *p);
1635 int pointer_set_insert (struct pointer_set_t *pset, void *p);
1636+void pointer_set_traverse (struct pointer_set_t *, bool (*) (void *, void *),
1637+ void *);
1638
1639+struct pointer_map_t;
1640+struct pointer_map_t *pointer_map_create (void);
1641+void pointer_map_destroy (struct pointer_map_t *pmap);
2cb538fa 1642+
5f3731d9
PS
1643+void **pointer_map_contains (struct pointer_map_t *pmap, void *p);
1644+void **pointer_map_insert (struct pointer_map_t *pmap, void *p);
1645+void pointer_map_traverse (struct pointer_map_t *,
1646+ bool (*) (void *, void **, void *), void *);
2cb538fa 1647+
5f3731d9
PS
1648 #endif /* POINTER_SET_H */
1649Index: gcc/fold-const.c
1650===================================================================
67dc168c
PS
1651--- gcc/fold-const.c (.../tags/gcc_4_2_0_release) (revision 126002)
1652+++ gcc/fold-const.c (.../branches/gcc-4_2-branch) (revision 126002)
4cb26ef3
AM
1653@@ -4450,13 +4450,24 @@
1654 {
1655 low = range_successor (high1);
1656 high = high0;
1657- in_p = (low != 0);
1658+ in_p = 1;
1659+ if (low == 0)
1660+ {
1661+ /* We are in the weird situation where high0 > high1 but
1662+ high1 has no successor. Punt. */
1663+ return 0;
1664+ }
1665 }
1666 else if (! subset || highequal)
1667 {
1668 low = low0;
1669 high = range_predecessor (low1);
1670- in_p = (high != 0);
1671+ in_p = 1;
1672+ if (high == 0)
1673+ {
1674+ /* low0 < low1 but low1 has no predecessor. Punt. */
1675+ return 0;
1676+ }
1677 }
1678 else
1679 return 0;
1680@@ -4476,7 +4487,12 @@
1681 {
1682 low = range_successor (high0);
1683 high = high1;
1684- in_p = (low != 0);
1685+ in_p = 1;
1686+ if (low == 0)
1687+ {
1688+ /* high1 > high0 but high0 has no successor. Punt. */
1689+ return 0;
1690+ }
1691 }
1692 }
1693
1694@@ -12634,9 +12650,14 @@
5f3731d9
PS
1695 /* ... fall through ... */
1696
1697 default:
1698- if (truth_value_p (TREE_CODE (t)))
1699- /* Truth values evaluate to 0 or 1, which is nonnegative. */
1700- return 1;
1701+ {
1702+ tree type = TREE_TYPE (t);
1703+ if ((TYPE_PRECISION (type) != 1 || TYPE_UNSIGNED (type))
1704+ && truth_value_p (TREE_CODE (t)))
1705+ /* Truth values evaluate to 0 or 1, which is nonnegative unless we
1706+ have a signed:1 type (where the value is -1 and 0). */
1707+ return true;
1708+ }
1709 }
1710
1711 /* We don't know sign of `t', so be conservative and return false. */
67dc168c
PS
1712Index: gcc/omp-low.c
1713===================================================================
1714--- gcc/omp-low.c (.../tags/gcc_4_2_0_release) (revision 126002)
1715+++ gcc/omp-low.c (.../branches/gcc-4_2-branch) (revision 126002)
1716@@ -1505,9 +1505,9 @@
1717 for (up = ctx->outer, t = NULL; up && t == NULL; up = up->outer)
1718 t = maybe_lookup_decl (decl, up);
1719
1720- gcc_assert (t);
1721+ gcc_assert (t || is_global_var (decl));
1722
1723- return t;
1724+ return t ? t : decl;
1725 }
1726
1727
5f3731d9
PS
1728Index: gcc/DEV-PHASE
1729===================================================================
67dc168c
PS
1730--- gcc/DEV-PHASE (.../tags/gcc_4_2_0_release) (revision 126002)
1731+++ gcc/DEV-PHASE (.../branches/gcc-4_2-branch) (revision 126002)
5f3731d9
PS
1732@@ -0,0 +1 @@
1733+prerelease
1734Index: gcc/ChangeLog
1735===================================================================
67dc168c
PS
1736--- gcc/ChangeLog (.../tags/gcc_4_2_0_release) (revision 126002)
1737+++ gcc/ChangeLog (.../branches/gcc-4_2-branch) (revision 126002)
1738@@ -1,3 +1,285 @@
1739+2007-06-21 H.J. Lu <hongjiu.lu@intel.com>
1740+
1741+ * config/i386/i386.c (ix86_builtins): Add IX86_BUILTIN_VEC_EXT_V16QI.
1742+ (ix86_init_mmx_sse_builtins): Add __builtin_ia32_vec_ext_v16qi.
1743+ (ix86_expand_builtin): Handle IX86_BUILTIN_VEC_EXT_V16QI.
1744+
1745+2007-06-21 Jakub Jelinek <jakub@redhat.com>
1746+
1747+ PR middle-end/32362
1748+ * omp-low.c (lookup_decl_in_outer_ctx): Don't ICE if t is NULL,
1749+ but decl is a global var, instead return decl.
1750+ * gimplify.c (gimplify_adjust_omp_clauses_1): Add shared clauses
1751+ even for is_global_var decls, if they are private in some outer
1752+ context.
1753+
1754+2007-06-21 Uros Bizjak <ubizjak@gmail.com>
1755+
1756+ PR target/32389
1757+ * config/i386/i386.h (enum ix86_stack_slot): Add SLOT_VIRTUAL.
1758+ * config/i386/i386.c (assign_386_stack_local): Assert that
1759+ SLOT_VIRTUAL is valid only before virtual regs are instantiated.
1760+ (ix86_expand_builtin) [IX86_BUILTIN_LDMXCSR, IX86_BUILTIN_STMXCSR]:
1761+ Use SLOT_VIRTUAL stack slot instead of SLOT_TEMP.
1762+ * config/i386/i386.md (truncdfsf2, truncxfsf2, truncxfdf2): Ditto.
1763+
1764+2007-06-20 Jakub Jelinek <jakub@redhat.com>
1765+
1766+ PR inline-asm/32109
1767+ * gimplify.c (gimplify_asm_expr): Issue error if type is addressable
1768+ and !allows_mem.
1769+
1770+ PR middle-end/32285
1771+ * calls.c (precompute_arguments): Also precompute CALL_EXPR arguments
1772+ if ACCUMULATE_OUTGOING_ARGS.
1773+
1774+2007-06-20 Kaz Kojima <kkojima@gcc.gnu.org>
1775+
1776+ PR rtl-optimization/28011
1777+ Backport from mainline.
1778+ * reload.c (push_reload): Set dont_share if IN appears in OUT
1779+ also when IN is a PLUS rtx.
1780+ (reg_overlap_mentioned_for_reload_p): Return true if X and IN
1781+ are same PLUS rtx.
1782+
1783+2007-06-19 Richard Guenther <rguenther@suse.de>
1784+ Michael Matz <matz@suse.de>
1785+
1786+ PR tree-optimization/30252
1787+ * tree-ssa-structalias.c (solution_set_add): Make sure to
1788+ preserve all relevant vars.
1789+ (handle_ptr_arith): Make sure to only handle positive
1790+ offsets.
1791+ (push_fields_onto_fieldstack): Create fields for empty
1792+ bases.
1793+
1794+2007-06-19 Jakub Jelinek <jakub@redhat.com>
1795+
1796+ PR tree-optimization/32353
1797+ * tree-ssa-structalias.c (set_uids_in_ptset): Also handle RESULT_DECL.
1798+
1799+2007-06-17 Eric Botcazou <ebotcazou@libertysurf.fr>
1800+
1801+ * config/sparc/sparc.c (sparc_vis_init_builtins): Retrieve the
1802+ return mode from the builtin itself.
1803+ (sparc_fold_builtin): Fix cast of zero constant.
1804+
1805+2007-06-15 Diego Novillo <dnovillo@google.com>
1806+
1807+ PR 32327
1808+ * tree-ssa-operands.c (build_ssa_operands): Initially assume
1809+ that the statement does not take any addresses.
1810+
1811+2007-06-13 Eric Botcazou <ebotcazou@libertysurf.fr>
1812+
1813+ * config/sparc/sparc.c (sparc_override_options): Initialize
1814+ fpu mask correctly.
1815+
1816+2007-06-09 Ian Lance Taylor <iant@google.com>
1817+
1818+ PR tree-optimization/32169
1819+ * tree-vrp.c (extract_range_from_unary_expr): For NOP_EXPR and
1820+ CONVERT_EXPR, check whether min and max both converted to an
1821+ overflow infinity representation.
1822+
4cb26ef3
AM
1823+2007-06-08 Kaz Kojima <kkojima@gcc.gnu.org>
1824+
1825+ PR target/32163
1826+ Backport from mainline.
1827+ * config/sh/sh.md (symGOT_load): Don't schedule insns when
1828+ the symbol is generated with the stack protector.
1829+
1830+2007-06-06 Ian Lance Taylor <iant@google.com>
1831+
1832+ * fold-const.c (merge_ranges): If range_successor or
1833+ range_predecessor fail, just return 0.
1834+
1835+2007-06-05 Ian Lance Taylor <iant@google.com>
1836+
1837+ * tree-vrp.c (compare_values_warnv): Check TREE_NO_WARNING on a
1838+ PLUS_EXPR or MINUS_EXPR node before setting *strict_overflow_p.
1839+ (extract_range_from_assert): Set TREE_NO_WARNING when creating an
1840+ expression.
1841+ (test_for_singularity): Likewise.
1842+
1843+2007-06-04 Ian Lance Taylor <iant@google.com>
1844+
1845+ * tree-vrp.c (adjust_range_with_scev): When loop is not expected
1846+ to overflow, reduce overflow infinity to regular infinity.
1847+ (vrp_var_may_overflow): New static function.
1848+ (vrp_visit_phi_node): Check vrp_var_may_overflow.
1849+
5f3731d9 1850+2007-05-31 H.J. Lu <hongjiu.lu@intel.com>
2cb538fa 1851+
5f3731d9
PS
1852+ Backport from mainline:
1853+ 2007-05-25 H.J. Lu <hongjiu.lu@intel.com>
2cb538fa 1854+
5f3731d9
PS
1855+ * config/i386/i386.c (__builtin_ia32_vec_ext_v2df): Mark it
1856+ with MASK_SSE2.
1857+ (__builtin_ia32_vec_ext_v2di): Likewise.
1858+ (__builtin_ia32_vec_ext_v4si): Likewise.
1859+ (__builtin_ia32_vec_ext_v8hi): Likewise.
1860+ (__builtin_ia32_vec_set_v8hi): Likewise.
2cb538fa 1861+
5f3731d9 1862+2007-05-31 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
2cb538fa 1863+
5f3731d9
PS
1864+ Backport from mainline:
1865+ 2007-05-05 Aurelien Jarno <aurelien@aurel32.net>
2cb538fa 1866+
5f3731d9
PS
1867+ * config/pa/pa.md: Split tgd_load, tld_load and tie_load
1868+ into pic and non-pic versions. Mark r19 as used for
1869+ tgd_load_pic, tld_load_pic and tie_load_pic. Mark r27 as used
1870+ for tgd_load, tld_load and tie_load .
1871+ * config/pa/pa.c (legitimize_tls_address): Emit pic or non-pic
1872+ version of tgd_load, tld_load and tie_load depending on the
1873+ value of flag_pic.
2cb538fa 1874+
5f3731d9 1875+2007-05-27 Daniel Berlin <dberlin@dberlin.org>
2cb538fa 1876+
5f3731d9
PS
1877+ Fix PR/30052
1878+ Backport PTA solver from mainline
2cb538fa 1879+
5f3731d9
PS
1880+ * pointer-set.c: Copy from mainline
1881+ * pointer-set.h: Ditto.
1882+ * tree-ssa-structalias.c: Copy solver portions from mainline.
1883+ * Makefile.in (tree-ssa-structalias.o): Update dependencies
2cb538fa 1884+
5f3731d9 1885+2007-05-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2cb538fa 1886+
5f3731d9 1887+ * tree-vrp.c (compare_names): Initialize sop.
2cb538fa 1888+
5f3731d9 1889+2007-05-30 Jakub Jelinek <jakub@redhat.com>
2cb538fa 1890+
5f3731d9
PS
1891+ PR tree-optimization/31769
1892+ * except.c (duplicate_eh_regions): Clear prev_try if
1893+ ERT_MUST_NOT_THROW region is inside of ERT_TRY region.
2cb538fa 1894+
5f3731d9 1895+2007-05-28 Andrew Pinski <andrew_pinski@playstation.sony.com>
2cb538fa 1896+
5f3731d9
PS
1897+ PR tree-opt/32100
1898+ * fold-const.c (tree_expr_nonnegative_warnv_p): Don't
1899+ return true when truth_value_p is true and the type
1900+ is of signed:1.
2cb538fa 1901+
5f3731d9 1902+2007-05-27 H.J. Lu <hongjiu.lu@intel.com>
2cb538fa 1903+
5f3731d9
PS
1904+ Backport from mainline:
1905+ 2007-05-25 Uros Bizjak <ubizjak@gmail.com>
1906+
1907+ * config/i386/sse.md (*vec_extractv2di_1_sse2): Do not calculate
1908+ "memory" attribute for "sseishft" type insn without operands[2].
1909+
1910+ 2007-05-25 H.J. Lu <hongjiu.lu@intel.com>
1911+
1912+ * config/i386/sse.md (*vec_extractv2di_1_sse2): Correct shift.
1913+
1914+2007-05-22 Ian Lance Taylor <iant@google.com>
1915+
1916+ * tree-vrp.c (avoid_overflow_infinity): New static function,
1917+ broken out of set_value_range_to_value.
1918+ (set_value_range_to_value): Call avoid_overflow_infinity.
1919+ (extract_range_from_assert): Likewise.
1920+
1921+2007-05-23 Chen Liqin <liqin@sunnorth.com.cn>
1922+
1923+ PR target/30987
1924+ * config/score/misc.md (bitclr_c, bitset_c, bittgl_c): remove.
1925+ * config/score/predicate.md (const_pow2, const_npow2): remove.
1926+ * config/score/score.h (ASM_OUTPUT_EXTERNAL): add ASM_OUTPUT_EXTERNAL undef.
1927+ PR target/30474
1928+ * config/score/score.c (score_print_operand): makes sure that only lower
1929+ bits are used.
1930+
1931+2007-05-21 Uros Bizjak <ubizjak@gmail.com>
1932+
1933+ PR target/31167
1934+ Backport from mainline.
1935+ * config/i386/i386.md (*addti3_1, *addti3_1 splitter): Use
1936+ x86_64_general_operand as operand[2] predicate. Remove "iF"
1937+ from operand constraints and use "e" constraint instead.
1938+ (*subti3_1, *subti3_1 splitter): Ditto.
1939+ (*negti2_1, *negti2_1 splitter): Use nonimmediate_operand as
1940+ operand[1] predicate.
1941+
1942+2007-05-21 Uros Bizjak <ubizjak@gmail.com>
1943+
1944+ PR target/30041
1945+ Backport from mainline.
1946+ * config/i386/sse.md ("*sse3_movddup"): Use operands[0] and
1947+ operands[1] in insn constraint. Correct type attribute to sselog1.
1948+
1949+2007-05-20 Kaz Kojima <kkojima@gcc.gnu.org>
1950+
1951+ PR target/31701
1952+ Backport from mainline.
1953+ * config/sh/sh.c (output_stack_adjust): Avoid using the frame
1954+ register itself to hold the offset constant. Tell flow the use
1955+ of r4 and r5 when they are used.
1956+
1957+2007-05-20 Kaz Kojima <kkojima@gcc.gnu.org>
1958+
1959+ PR target/31480
1960+ Backport from mainline.
1961+ * config/sh/sh.md (length): Check if prev_nonnote_insn (insn)
1962+ is null.
1963+
1964+2007-05-20 Kaz Kojima <kkojima@gcc.gnu.org>
1965+
1966+ PR target/31022
1967+ Backport from mainline.
1968+ * config/sh/sh.c (sh_adjust_cost): Use the result of single_set
1969+ instead of PATTERN.
1970+
1971+2007-05-20 Kaz Kojima <kkojima@gcc.gnu.org>
1972+
1973+ PR target/27405
1974+ Backport from mainline.
1975+ * config/sh/sh.md (cmp{eq,gt,gtu}{si,di}_media): Remove.
1976+ (cmpsi{eq,gt,gtu}{si,di}_media): Rename to
1977+ cmp{eq,gt,gtu}{si,di}_media.
1978+ (*cmpne0si_media): Remove.
1979+ (*movsicc_umin): Adjust gen_cmp*_media call.
1980+ (unordered): Change the mode of unordered and operands[1] to
1981+ SImode.
1982+ (seq): Adjust gen_cmp*_media calls. Make the mode of
1983+ a temporary result of compare SImode if needed. If the mode
1984+ of operands[0] is DImode, extend the temporary result to DImode.
1985+ (slt, sle, sgt, sge, sgtu, sltu, sleu, sgue, sne): Likewise.
1986+ (sunorderd): Change the mode of match_operand and unorderd to
1987+ SImode.
1988+ (cmpeq{sf,df}_media): Remove.
1989+ (cmpsieq{sf,df}_media): Rename to cmpeq{sf,df}_media.
1990+ (cmp{gt,ge,un}{sf,df}_media): Change the mode of match_operand
1991+ and compare operation to SImode.
1992+
1993+2007-05-18 Joseph Myers <joseph@codesourcery.com>
1994+
1995+ * config/soft-fp/double.h, config/soft-fp/extended.h,
1996+ config/soft-fp/floatundidf.c, config/soft-fp/floatundisf.c,
1997+ config/soft-fp/floatunsidf.c, config/soft-fp/floatunsisf.c,
1998+ config/soft-fp/op-2.h, config/soft-fp/op-4.h,
1999+ config/soft-fp/op-common.h, config/soft-fp/quad.h: Update from
2000+ glibc CVS.
2001+
2002+2007-05-17 Ian Lance Taylor <iant@google.com>
2003+
2004+ PR tree-optimization/31953
2005+ * tree-vrp.c (set_value_range_to_value): Add equiv parameter.
2006+ Change all callers.
2007+ (set_value_range_to_null): Call set_value_range_to_value.
2008+ (extract_range_from_comparison): Likewise.
2009+
2010+2007-05-17 Eric Botcazou <ebotcazou@libertysurf.fr>
2011+
2012+ PR rtl-optimization/31691
2013+ * combine.c (simplify_set): Build a new src pattern instead of
2014+ substituting its operands in the COMPARE case.
2015+
2016+2007-05-14 Mark Mitchell <mark@codesourcery.com>
2017+
2018+ * BASE-VER: Set to 4.2.1.
2019+ * DEV-PHASE: Set to prerelease.
2020+
2021 2007-05-13 Release Manager
2022
2023 * GCC 4.2.0 released.
67dc168c 2024@@ -307,7 +589,8 @@
5f3731d9
PS
2025 2007-04-03 Stuart Hastings <stuart@apple.com>
2026
2027 PR 31281
2028- * objc/objc-act.c (next_sjlj_build_catch_list): Delete volatile from rethrow decl.
2029+ * objc/objc-act.c (next_sjlj_build_catch_list): Delete volatile
2030+ from rethrow decl.
2031 * cse.c (record_jump_equiv): Bail out on CCmode comparisons.
2032
2033 2007-04-03 Jakub Jelinek <jakub@redhat.com>
67dc168c
PS
2034Index: gcc/testsuite/gcc.c-torture/execute/20070614-1.c
2035===================================================================
2036--- gcc/testsuite/gcc.c-torture/execute/20070614-1.c (.../tags/gcc_4_2_0_release) (revision 0)
2037+++ gcc/testsuite/gcc.c-torture/execute/20070614-1.c (.../branches/gcc-4_2-branch) (revision 126002)
2038@@ -0,0 +1,33 @@
2039+extern void abort (void);
2040+
2041+_Complex v = 3.0 + 1.0iF;
2042+
2043+void
2044+foo (_Complex z, int *x)
2045+{
2046+ if (z != v)
2047+ abort ();
2048+}
2049+
2050+_Complex bar (_Complex z) __attribute__ ((pure));
2051+_Complex
2052+bar (_Complex z)
2053+{
2054+ return v;
2055+}
2056+
2057+int
2058+baz (void)
2059+{
2060+ int a, i;
2061+ for (i = 0; i < 6; i++)
2062+ foo (bar (1.0iF * i), &a);
2063+ return 0;
2064+}
2065+
2066+int
2067+main ()
2068+{
2069+ baz ();
2070+ return 0;
2071+}
5f3731d9
PS
2072Index: gcc/testsuite/gcc.c-torture/execute/vrp-7.c
2073===================================================================
67dc168c
PS
2074--- gcc/testsuite/gcc.c-torture/execute/vrp-7.c (.../tags/gcc_4_2_0_release) (revision 0)
2075+++ gcc/testsuite/gcc.c-torture/execute/vrp-7.c (.../branches/gcc-4_2-branch) (revision 126002)
5f3731d9
PS
2076@@ -0,0 +1,20 @@
2077+
2078+void abort (void);
2cb538fa 2079+
5f3731d9
PS
2080+struct T
2081+{
2082+ int b : 1;
2083+} t;
2cb538fa 2084+
5f3731d9
PS
2085+void __attribute__((noinline)) foo (int f)
2086+{
2087+ t.b = (f & 0x10) ? 1 : 0;
2088+}
2cb538fa 2089+
5f3731d9
PS
2090+int main (void)
2091+{
2092+ foo (0x10);
2093+ if (!t.b)
2094+ abort ();
2095+ return 0;
2096+}
2097Index: gcc/testsuite/gcc.c-torture/execute/20070517-1.c
2098===================================================================
67dc168c
PS
2099--- gcc/testsuite/gcc.c-torture/execute/20070517-1.c (.../tags/gcc_4_2_0_release) (revision 0)
2100+++ gcc/testsuite/gcc.c-torture/execute/20070517-1.c (.../branches/gcc-4_2-branch) (revision 126002)
5f3731d9
PS
2101@@ -0,0 +1,41 @@
2102+/* PR rtl-optimization/31691 */
2103+/* Origin: Chi-Hua Chen <stephaniechc-gccbug@yahoo.com> */
2cb538fa 2104+
5f3731d9 2105+extern void abort (void);
2cb538fa 2106+
5f3731d9 2107+static int get_kind(int) __attribute__ ((noinline));
2cb538fa 2108+
5f3731d9
PS
2109+static int get_kind(int v)
2110+{
2111+ volatile int k = v;
2112+ return k;
2113+}
2cb538fa 2114+
5f3731d9 2115+static int some_call(void) __attribute__ ((noinline));
2cb538fa 2116+
5f3731d9
PS
2117+static int some_call(void)
2118+{
2119+ return 0;
2120+}
686fea03 2121+
5f3731d9
PS
2122+static void example (int arg)
2123+{
2124+ int tmp, kind = get_kind (arg);
686fea03 2125+
5f3731d9
PS
2126+ if (kind == 9 || kind == 10 || kind == 5)
2127+ {
2128+ if (some_call() == 0)
2129+ {
2130+ if (kind == 9 || kind == 10)
2131+ tmp = arg;
2132+ else
2133+ abort();
2134+ }
2135+ }
2136+}
686fea03 2137+
5f3731d9
PS
2138+int main(void)
2139+{
2140+ example(10);
2141+ return 0;
2142+}
67dc168c
PS
2143Index: gcc/testsuite/gcc.c-torture/compile/pr32169.c
2144===================================================================
2145--- gcc/testsuite/gcc.c-torture/compile/pr32169.c (.../tags/gcc_4_2_0_release) (revision 0)
2146+++ gcc/testsuite/gcc.c-torture/compile/pr32169.c (.../branches/gcc-4_2-branch) (revision 126002)
2147@@ -0,0 +1,17 @@
2148+void f(char);
2149+static inline
2150+void * __memset_generic(char c)
2151+{
2152+ f(c);
2153+}
2154+int prepare_startup_playback_urb(
2155+ int b,
2156+ int c
2157+)
2158+{
2159+ char d;
2160+ if (b)
2161+ __memset_generic(c == ( 1) ? 0x80 : 0);
2162+ else
2163+ __memset_generic (c == ( 1) ? 0x80 : 0);
2164+}
5f3731d9
PS
2165Index: gcc/testsuite/gcc.c-torture/compile/pr31953.c
2166===================================================================
67dc168c
PS
2167--- gcc/testsuite/gcc.c-torture/compile/pr31953.c (.../tags/gcc_4_2_0_release) (revision 0)
2168+++ gcc/testsuite/gcc.c-torture/compile/pr31953.c (.../branches/gcc-4_2-branch) (revision 126002)
5f3731d9
PS
2169@@ -0,0 +1,14 @@
2170+struct WView
2171+{
2172+ int hexedit_mode:1;
2173+};
2174+toggle_hexedit_mode (struct WView *view)
2175+{
2176+ if (view->hexedit_mode)
2177+ {
2178+ }
2179+ else
2180+ {
2181+ view->hexedit_mode = !view->hexedit_mode;
2182+ }
2183+}
67dc168c
PS
2184Index: gcc/testsuite/gcc.target/sparc/combined-2.c
2185===================================================================
2186--- gcc/testsuite/gcc.target/sparc/combined-2.c (.../tags/gcc_4_2_0_release) (revision 126002)
2187+++ gcc/testsuite/gcc.target/sparc/combined-2.c (.../branches/gcc-4_2-branch) (revision 126002)
2188@@ -1,7 +1,7 @@
2189 /* { dg-do compile } */
2190 /* { dg-options "-O2 -mcpu=ultrasparc -mvis" } */
2191-typedef char pixel __attribute__((vector_size(4)));
2192-typedef char vec8 __attribute__((vector_size(8)));
2193+typedef unsigned char pixel __attribute__((vector_size(4)));
2194+typedef unsigned char vec8 __attribute__((vector_size(8)));
2195 typedef short vec16 __attribute__((vector_size(8)));
2196
2197 vec16 foo (pixel a, pixel b) {
2198Index: gcc/testsuite/gcc.target/sparc/fpmul.c
2199===================================================================
2200--- gcc/testsuite/gcc.target/sparc/fpmul.c (.../tags/gcc_4_2_0_release) (revision 126002)
2201+++ gcc/testsuite/gcc.target/sparc/fpmul.c (.../branches/gcc-4_2-branch) (revision 126002)
2202@@ -2,9 +2,9 @@
2203 /* { dg-options "-mcpu=ultrasparc -mvis" } */
2204 typedef int vec32 __attribute__((vector_size(8)));
2205 typedef short vec16 __attribute__((vector_size(8)));
2206-typedef char pixel __attribute__((vector_size(4)));
2207+typedef unsigned char pixel __attribute__((vector_size(4)));
2208 typedef short pixel16 __attribute__((vector_size(4)));
2209-typedef char vec8 __attribute__((vector_size(8)));
2210+typedef unsigned char vec8 __attribute__((vector_size(8)));
2211
2212 vec16 foo1 (pixel a, vec16 b) {
2213 return __builtin_vis_fmul8x16 (a, b);
2214Index: gcc/testsuite/gcc.target/sparc/pdist.c
2215===================================================================
2216--- gcc/testsuite/gcc.target/sparc/pdist.c (.../tags/gcc_4_2_0_release) (revision 126002)
2217+++ gcc/testsuite/gcc.target/sparc/pdist.c (.../branches/gcc-4_2-branch) (revision 126002)
2218@@ -1,8 +1,7 @@
2219 /* { dg-do compile } */
2220 /* { dg-options "-mcpu=ultrasparc -mvis" } */
2221-
2222 typedef long long int64_t;
2223-typedef char vec8 __attribute__((vector_size(8)));
2224+typedef unsigned char vec8 __attribute__((vector_size(8)));
2225
2226 int64_t foo (vec8 a, vec8 b) {
2227 int64_t d = 0;
2228Index: gcc/testsuite/gcc.target/sparc/fexpand.c
2229===================================================================
2230--- gcc/testsuite/gcc.target/sparc/fexpand.c (.../tags/gcc_4_2_0_release) (revision 126002)
2231+++ gcc/testsuite/gcc.target/sparc/fexpand.c (.../branches/gcc-4_2-branch) (revision 126002)
2232@@ -1,7 +1,7 @@
2233 /* { dg-do compile } */
2234 /* { dg-options "-mcpu=ultrasparc -mvis" } */
2235 typedef short vec16 __attribute__((vector_size(8)));
2236-typedef char vec8 __attribute__((vector_size(4)));
2237+typedef unsigned char vec8 __attribute__((vector_size(4)));
2238
2239 vec16 foo (vec8 a) {
2240 return __builtin_vis_fexpand (a);
2241Index: gcc/testsuite/gcc.target/sparc/fnot.c
2242===================================================================
2243--- gcc/testsuite/gcc.target/sparc/fnot.c (.../tags/gcc_4_2_0_release) (revision 126002)
2244+++ gcc/testsuite/gcc.target/sparc/fnot.c (.../branches/gcc-4_2-branch) (revision 126002)
2245@@ -1,8 +1,8 @@
2246 /* { dg-do compile } */
2247 /* { dg-options "-O -mcpu=ultrasparc -mvis" } */
2248-typedef char vec8 __attribute__((vector_size(8)));
2249+typedef unsigned char vec8 __attribute__((vector_size(8)));
2250 typedef short vec16 __attribute__((vector_size(8)));
2251-typedef int vec32 __attribute__((vector_size(8)));
2252+typedef int vec32 __attribute__((vector_size(8)));
2253
2254 extern vec8 foo1_8(void);
2255 extern void foo2_8(vec8);
2256@@ -21,7 +21,7 @@
2257 #endif
2258
2259 extern vec16 foo1_16(void);
2260-extern void foo2_16(vec8);
2261+extern void foo2_16(vec16);
2262
2263
2264 vec16 fun16(void)
2265@@ -38,7 +38,7 @@
2266 #endif
2267
2268 extern vec32 foo1_32(void);
2269-extern void foo2_32(vec8);
2270+extern void foo2_32(vec32);
2271
2272 vec32 fun32(void)
2273 {
2274Index: gcc/testsuite/gcc.target/sparc/mfpu.c
2275===================================================================
2276--- gcc/testsuite/gcc.target/sparc/mfpu.c (.../tags/gcc_4_2_0_release) (revision 0)
2277+++ gcc/testsuite/gcc.target/sparc/mfpu.c (.../branches/gcc-4_2-branch) (revision 126002)
2278@@ -0,0 +1,11 @@
2279+/* Reported by Peter A. Krauss <peter.a.krauss@web.de> */
2280+
2281+/* { dg-do compile } */
2282+/* { dg-options "-mfpu" } */
2283+
2284+float square(float x)
2285+{
2286+ return x * x;
2287+}
2288+
2289+/* { dg-final { scan-assembler "fmuls" } } */
2290Index: gcc/testsuite/gcc.target/sparc/noresult.c
2291===================================================================
2292--- gcc/testsuite/gcc.target/sparc/noresult.c (.../tags/gcc_4_2_0_release) (revision 126002)
2293+++ gcc/testsuite/gcc.target/sparc/noresult.c (.../branches/gcc-4_2-branch) (revision 126002)
2294@@ -1,7 +1,6 @@
2295 /* { dg-do compile } */
2296 /* { dg-options "-mcpu=ultrasparc -mvis" } */
2297 typedef short vec16 __attribute__((vector_size(8)));
2298-typedef char vec8 __attribute__((vector_size(4)));
2299
2300 void foo (vec16 a) {
2301 __builtin_vis_fpack16 (a);
2302Index: gcc/testsuite/gcc.target/sparc/fpmerge.c
2303===================================================================
2304--- gcc/testsuite/gcc.target/sparc/fpmerge.c (.../tags/gcc_4_2_0_release) (revision 126002)
2305+++ gcc/testsuite/gcc.target/sparc/fpmerge.c (.../branches/gcc-4_2-branch) (revision 126002)
2306@@ -1,7 +1,7 @@
2307 /* { dg-do compile } */
2308 /* { dg-options "-mcpu=ultrasparc -mvis" } */
2309-typedef char pixel __attribute__((vector_size(8)));
2310-typedef char vec8 __attribute__((vector_size(4)));
2311+typedef unsigned char pixel __attribute__((vector_size(8)));
2312+typedef unsigned char vec8 __attribute__((vector_size(4)));
2313
2314 pixel foo (vec8 a, vec8 b) {
2315 return __builtin_vis_fpmerge (a, b);
2316Index: gcc/testsuite/gcc.target/sparc/align.c
2317===================================================================
2318--- gcc/testsuite/gcc.target/sparc/align.c (.../tags/gcc_4_2_0_release) (revision 126002)
2319+++ gcc/testsuite/gcc.target/sparc/align.c (.../branches/gcc-4_2-branch) (revision 126002)
2320@@ -1,10 +1,9 @@
2321 /* { dg-do compile } */
2322 /* { dg-options "-mcpu=ultrasparc -mvis" } */
2323-
2324 typedef long long int64_t;
2325 typedef int vec32 __attribute__((vector_size(8)));
2326 typedef short vec16 __attribute__((vector_size(8)));
2327-typedef char vec8 __attribute__((vector_size(8)));
2328+typedef unsigned char vec8 __attribute__((vector_size(8)));
2329
2330 vec16 foo1 (vec16 a, vec16 b) {
2331 return __builtin_vis_faligndatav4hi (a, b);
2332Index: gcc/testsuite/gcc.target/sparc/fpack16.c
2333===================================================================
2334--- gcc/testsuite/gcc.target/sparc/fpack16.c (.../tags/gcc_4_2_0_release) (revision 126002)
2335+++ gcc/testsuite/gcc.target/sparc/fpack16.c (.../branches/gcc-4_2-branch) (revision 126002)
2336@@ -1,7 +1,7 @@
2337 /* { dg-do compile } */
2338 /* { dg-options "-mcpu=ultrasparc -mvis" } */
2339 typedef short vec16 __attribute__((vector_size(8)));
2340-typedef char vec8 __attribute__((vector_size(4)));
2341+typedef unsigned char vec8 __attribute__((vector_size(4)));
2342
2343 vec8 foo (vec16 a) {
2344 return __builtin_vis_fpack16 (a);
5f3731d9
PS
2345Index: gcc/testsuite/gcc.target/i386/sse2-vec-3.c
2346===================================================================
67dc168c
PS
2347--- gcc/testsuite/gcc.target/i386/sse2-vec-3.c (.../tags/gcc_4_2_0_release) (revision 0)
2348+++ gcc/testsuite/gcc.target/i386/sse2-vec-3.c (.../branches/gcc-4_2-branch) (revision 126002)
5f3731d9
PS
2349@@ -0,0 +1,37 @@
2350+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
2351+/* { dg-options "-O2 -msse2" } */
686fea03 2352+
5f3731d9 2353+#include "sse2-check.h"
686fea03 2354+
5f3731d9 2355+#include <emmintrin.h>
686fea03 2356+
5f3731d9
PS
2357+static void
2358+sse2_test (void)
2359+{
2360+ union
2361+ {
2362+ __m128i x;
2363+ char c[16];
2364+ short s[8];
2365+ int i[4];
2366+ long long ll[2];
2367+ } val1;
2368+ int res[4];
2369+ int masks[4];
2370+ int i;
2371+
2372+ for (i = 0; i < 16; i++)
2373+ val1.c[i] = i;
2374+
2375+ res[0] = __builtin_ia32_vec_ext_v4si ((__v4si)val1.x, 0);
2376+ res[1] = __builtin_ia32_vec_ext_v4si ((__v4si)val1.x, 1);
2377+ res[2] = __builtin_ia32_vec_ext_v4si ((__v4si)val1.x, 2);
2378+ res[3] = __builtin_ia32_vec_ext_v4si ((__v4si)val1.x, 3);
2379+
2380+ for (i = 0; i < 4; i++)
2381+ masks[i] = i;
2382+
2383+ for (i = 0; i < 4; i++)
2384+ if (res[i] != val1.i [masks[i]])
2385+ abort ();
2386+}
67dc168c
PS
2387Index: gcc/testsuite/gcc.target/i386/pr32389.c
2388===================================================================
2389--- gcc/testsuite/gcc.target/i386/pr32389.c (.../tags/gcc_4_2_0_release) (revision 0)
2390+++ gcc/testsuite/gcc.target/i386/pr32389.c (.../branches/gcc-4_2-branch) (revision 126002)
2391@@ -0,0 +1,10 @@
2392+/* Testcase by Mike Frysinger <vapier@gentoo.org> */
2393+
2394+/* { dg-do compile { target { { i?86-*-* x86_64-*-* } && ilp32 } } } */
2395+/* { dg-options "-msse" } */
2396+
2397+double f1();
2398+int f2() {
2399+ __builtin_ia32_stmxcsr();
2400+ return f1();
2401+}
5f3731d9
PS
2402Index: gcc/testsuite/gcc.target/i386/pr31167.c
2403===================================================================
67dc168c
PS
2404--- gcc/testsuite/gcc.target/i386/pr31167.c (.../tags/gcc_4_2_0_release) (revision 0)
2405+++ gcc/testsuite/gcc.target/i386/pr31167.c (.../branches/gcc-4_2-branch) (revision 126002)
5f3731d9
PS
2406@@ -0,0 +1,20 @@
2407+/* { dg-do compile { target x86_64-*-* } } */
2408+/* { dg-options "-O" } */
686fea03 2409+
5f3731d9 2410+typedef int int32_t;
686fea03 2411+
5f3731d9
PS
2412+int32_t round32hi (const __int128_t arg)
2413+{
2414+ const int SHIFT = 96;
2415+ const int mshift = 96;
2416+ const __int128_t M = (~(__int128_t) 0) << mshift;
2417+ const __int128_t L = (~M) + 1;
2418+ const __int128_t L1 = ((__int128_t) L) >> 1;
2419+ const __int128_t Mlo = ((__int128_t) (~M)) >> 1;
2420+ __int128_t vv = arg & M;
2421+
2422+ if ((arg & (L1)) && ((arg & Mlo) || (arg & L)))
2423+ vv += L;
2424+
2425+ return (int32_t) (vv >> SHIFT);
2426+}
2427Index: gcc/testsuite/gcc.target/i386/sse2-vec-4.c
2428===================================================================
67dc168c
PS
2429--- gcc/testsuite/gcc.target/i386/sse2-vec-4.c (.../tags/gcc_4_2_0_release) (revision 0)
2430+++ gcc/testsuite/gcc.target/i386/sse2-vec-4.c (.../branches/gcc-4_2-branch) (revision 126002)
5f3731d9
PS
2431@@ -0,0 +1,41 @@
2432+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
2433+/* { dg-options "-O2 -msse2" } */
686fea03 2434+
5f3731d9 2435+#include "sse2-check.h"
686fea03 2436+
5f3731d9 2437+#include <emmintrin.h>
686fea03 2438+
5f3731d9
PS
2439+static void
2440+sse2_test (void)
2441+{
2442+ union
2443+ {
2444+ __m128i x;
2445+ char c[16];
2446+ short s[8];
2447+ int i[4];
2448+ long long ll[2];
2449+ } val1;
2450+ short res[8];
2451+ int masks[8];
2452+ int i;
2453+
2454+ for (i = 0; i < 16; i++)
2455+ val1.c[i] = i;
2456+
2457+ res[0] = __builtin_ia32_vec_ext_v8hi ((__v8hi)val1.x, 0);
2458+ res[1] = __builtin_ia32_vec_ext_v8hi ((__v8hi)val1.x, 1);
2459+ res[2] = __builtin_ia32_vec_ext_v8hi ((__v8hi)val1.x, 2);
2460+ res[3] = __builtin_ia32_vec_ext_v8hi ((__v8hi)val1.x, 3);
2461+ res[4] = __builtin_ia32_vec_ext_v8hi ((__v8hi)val1.x, 4);
2462+ res[5] = __builtin_ia32_vec_ext_v8hi ((__v8hi)val1.x, 5);
2463+ res[6] = __builtin_ia32_vec_ext_v8hi ((__v8hi)val1.x, 6);
2464+ res[7] = __builtin_ia32_vec_ext_v8hi ((__v8hi)val1.x, 7);
2465+
2466+ for (i = 0; i < 8; i++)
2467+ masks[i] = i;
2468+
2469+ for (i = 0; i < 8; i++)
2470+ if (res[i] != val1.s [masks[i]])
2471+ abort ();
2472+}
2473Index: gcc/testsuite/gcc.target/i386/sse2-check.h
2474===================================================================
67dc168c
PS
2475--- gcc/testsuite/gcc.target/i386/sse2-check.h (.../tags/gcc_4_2_0_release) (revision 0)
2476+++ gcc/testsuite/gcc.target/i386/sse2-check.h (.../branches/gcc-4_2-branch) (revision 126002)
5f3731d9
PS
2477@@ -0,0 +1,20 @@
2478+#include <stdio.h>
2479+#include <stdlib.h>
686fea03 2480+
5f3731d9 2481+#include "../../gcc.dg/i386-cpuid.h"
686fea03 2482+
5f3731d9 2483+static void sse2_test (void);
686fea03 2484+
5f3731d9
PS
2485+int
2486+main ()
2487+{
2488+ unsigned long cpu_facilities;
2489+
2490+ cpu_facilities = i386_cpuid_edx ();
686fea03 2491+
5f3731d9
PS
2492+ /* Run SSE2 test only if host has SSE2 support. */
2493+ if ((cpu_facilities & bit_SSE2))
2494+ sse2_test ();
686fea03 2495+
5f3731d9
PS
2496+ exit (0);
2497+}
2498Index: gcc/testsuite/gcc.target/i386/sse2-vec-1.c
2499===================================================================
67dc168c
PS
2500--- gcc/testsuite/gcc.target/i386/sse2-vec-1.c (.../tags/gcc_4_2_0_release) (revision 0)
2501+++ gcc/testsuite/gcc.target/i386/sse2-vec-1.c (.../branches/gcc-4_2-branch) (revision 126002)
5f3731d9
PS
2502@@ -0,0 +1,35 @@
2503+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
2504+/* { dg-options "-O2 -msse2" } */
686fea03 2505+
5f3731d9 2506+#include "sse2-check.h"
686fea03 2507+
5f3731d9 2508+#include <emmintrin.h>
686fea03 2509+
5f3731d9
PS
2510+#define msk0 0
2511+#define msk1 1
686fea03 2512+
5f3731d9
PS
2513+static void
2514+sse2_test (void)
2515+{
2516+ union
2517+ {
2518+ __m128d x;
2519+ double d[2];
2520+ } val1;
2521+ double res[2];
2522+ int masks[2];
2523+ int i;
686fea03 2524+
5f3731d9
PS
2525+ val1.d[0] = 23.;
2526+ val1.d[1] = 45;
686fea03 2527+
5f3731d9
PS
2528+ res[0] = __builtin_ia32_vec_ext_v2df ((__v2df)val1.x, msk0);
2529+ res[1] = __builtin_ia32_vec_ext_v2df ((__v2df)val1.x, msk1);
686fea03 2530+
5f3731d9
PS
2531+ masks[0] = msk0;
2532+ masks[1] = msk1;
686fea03 2533+
5f3731d9
PS
2534+ for (i = 0; i < 2; i++)
2535+ if (res[i] != val1.d [masks[i]])
2536+ abort ();
2537+}
2538Index: gcc/testsuite/gcc.target/i386/sse2-vec-5.c
2539===================================================================
67dc168c
PS
2540--- gcc/testsuite/gcc.target/i386/sse2-vec-5.c (.../tags/gcc_4_2_0_release) (revision 0)
2541+++ gcc/testsuite/gcc.target/i386/sse2-vec-5.c (.../branches/gcc-4_2-branch) (revision 126002)
5f3731d9
PS
2542@@ -0,0 +1,49 @@
2543+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
2544+/* { dg-options "-O2 -msse2" } */
686fea03 2545+
5f3731d9 2546+#include "sse2-check.h"
686fea03 2547+
5f3731d9 2548+#include <emmintrin.h>
686fea03 2549+
5f3731d9
PS
2550+static void
2551+sse2_test (void)
2552+{
2553+ union
2554+ {
2555+ __m128i x;
2556+ char c[16];
2557+ short s[8];
2558+ int i[4];
2559+ long long ll[2];
2560+ } val1;
2561+ char res[16];
2562+ int masks[16];
2563+ int i;
2564+
2565+ for (i = 0; i < 16; i++)
2566+ val1.c[i] = i;
2567+
2568+ res[0] = __builtin_ia32_vec_ext_v16qi ((__v16qi)val1.x, 0);
2569+ res[1] = __builtin_ia32_vec_ext_v16qi ((__v16qi)val1.x, 1);
2570+ res[2] = __builtin_ia32_vec_ext_v16qi ((__v16qi)val1.x, 2);
2571+ res[3] = __builtin_ia32_vec_ext_v16qi ((__v16qi)val1.x, 3);
2572+ res[4] = __builtin_ia32_vec_ext_v16qi ((__v16qi)val1.x, 4);
2573+ res[5] = __builtin_ia32_vec_ext_v16qi ((__v16qi)val1.x, 5);
2574+ res[6] = __builtin_ia32_vec_ext_v16qi ((__v16qi)val1.x, 6);
2575+ res[7] = __builtin_ia32_vec_ext_v16qi ((__v16qi)val1.x, 7);
2576+ res[8] = __builtin_ia32_vec_ext_v16qi ((__v16qi)val1.x, 8);
2577+ res[9] = __builtin_ia32_vec_ext_v16qi ((__v16qi)val1.x, 9);
2578+ res[10] = __builtin_ia32_vec_ext_v16qi ((__v16qi)val1.x, 10);
2579+ res[11] = __builtin_ia32_vec_ext_v16qi ((__v16qi)val1.x, 11);
2580+ res[12] = __builtin_ia32_vec_ext_v16qi ((__v16qi)val1.x, 12);
2581+ res[13] = __builtin_ia32_vec_ext_v16qi ((__v16qi)val1.x, 13);
2582+ res[14] = __builtin_ia32_vec_ext_v16qi ((__v16qi)val1.x, 14);
2583+ res[15] = __builtin_ia32_vec_ext_v16qi ((__v16qi)val1.x, 15);
2584+
2585+ for (i = 0; i < 16; i++)
2586+ masks[i] = i;
2587+
2588+ for (i = 0; i < 16; i++)
2589+ if (res[i] != val1.c [masks[i]])
2590+ abort ();
2591+}
2592Index: gcc/testsuite/gcc.target/i386/sse2-vec-2.c
2593===================================================================
67dc168c
PS
2594--- gcc/testsuite/gcc.target/i386/sse2-vec-2.c (.../tags/gcc_4_2_0_release) (revision 0)
2595+++ gcc/testsuite/gcc.target/i386/sse2-vec-2.c (.../branches/gcc-4_2-branch) (revision 126002)
5f3731d9
PS
2596@@ -0,0 +1,35 @@
2597+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
2598+/* { dg-options "-O2 -msse2" } */
686fea03 2599+
5f3731d9 2600+#include "sse2-check.h"
686fea03 2601+
5f3731d9 2602+#include <emmintrin.h>
686fea03 2603+
5f3731d9
PS
2604+static void
2605+sse2_test (void)
2606+{
2607+ union
2608+ {
2609+ __m128i x;
2610+ char c[16];
2611+ short s[8];
2612+ int i[4];
2613+ long long ll[2];
2614+ } val1;
2615+ long long res[2];
2616+ int masks[2];
2617+ int i;
2618+
2619+ for (i = 0; i < 16; i++)
2620+ val1.c[i] = i;
2621+
2622+ res[0] = __builtin_ia32_vec_ext_v2di ((__v2di)val1.x, 0);
2623+ res[1] = __builtin_ia32_vec_ext_v2di ((__v2di)val1.x, 1);
2624+
2625+ for (i = 0; i < 2; i++)
2626+ masks[i] = i;
2627+
2628+ for (i = 0; i < 2; i++)
2629+ if (res[i] != val1.ll [masks[i]])
2630+ abort ();
2631+}
2632Index: gcc/testsuite/gcc.target/i386/sse2-vec-6.c
2633===================================================================
67dc168c
PS
2634--- gcc/testsuite/gcc.target/i386/sse2-vec-6.c (.../tags/gcc_4_2_0_release) (revision 0)
2635+++ gcc/testsuite/gcc.target/i386/sse2-vec-6.c (.../branches/gcc-4_2-branch) (revision 126002)
5f3731d9
PS
2636@@ -0,0 +1,69 @@
2637+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
2638+/* { dg-options "-O2 -msse2" } */
686fea03 2639+
5f3731d9 2640+#include "sse2-check.h"
686fea03 2641+
5f3731d9
PS
2642+#include <emmintrin.h>
2643+#include <string.h>
686fea03 2644+
5f3731d9
PS
2645+static void
2646+sse2_test (void)
2647+{
2648+ union
2649+ {
2650+ __m128i x;
2651+ char c[16];
2652+ short s[8];
2653+ int i[4];
2654+ long long ll[2];
2655+ } val1, res[16], tmp;
2656+ short ins[8] = { 8, 5, 9, 4, 2, 6, 1, 20 };
2657+ int masks[8];
2658+ int i;
2659+
2660+ for (i = 0; i < 16; i++)
2661+ val1.c[i] = i;
2662+
2663+ res[0].x = (__m128i) __builtin_ia32_vec_set_v8hi ((__v8hi)val1.x,
2664+ ins[0], 0);
2665+ res[1].x = (__m128i) __builtin_ia32_vec_set_v8hi ((__v8hi)val1.x,
2666+ ins[0], 1);
2667+ res[2].x = (__m128i) __builtin_ia32_vec_set_v8hi ((__v8hi)val1.x,
2668+ ins[0], 2);
2669+ res[3].x = (__m128i) __builtin_ia32_vec_set_v8hi ((__v8hi)val1.x,
2670+ ins[0], 3);
2671+ res[4].x = (__m128i) __builtin_ia32_vec_set_v8hi ((__v8hi)val1.x,
2672+ ins[0], 4);
2673+ res[5].x = (__m128i) __builtin_ia32_vec_set_v8hi ((__v8hi)val1.x,
2674+ ins[0], 5);
2675+ res[6].x = (__m128i) __builtin_ia32_vec_set_v8hi ((__v8hi)val1.x,
2676+ ins[0], 6);
2677+ res[7].x = (__m128i) __builtin_ia32_vec_set_v8hi ((__v8hi)val1.x,
2678+ ins[0], 7);
2679+
2680+ for (i = 0; i < 8; i++)
2681+ masks[i] = i;
2682+
2683+ for (i = 0; i < 8; i++)
2684+ {
2685+ tmp.x = val1.x;
2686+ tmp.s[masks[i]] = ins[0];
2687+ if (memcmp (&tmp, &res[i], sizeof (tmp)))
2688+ abort ();
2689+ }
686fea03 2690+
5f3731d9
PS
2691+ for (i = 0; i < 8; i++)
2692+ {
2693+ res[i].x = (__m128i) __builtin_ia32_vec_set_v8hi ((__v8hi)val1.x,
2694+ ins[i], 0);
2695+ masks[i] = 0;
2696+ }
686fea03 2697+
5f3731d9
PS
2698+ for (i = 0; i < 8; i++)
2699+ {
2700+ tmp.x = val1.x;
2701+ tmp.s[masks[i]] = ins[i];
2702+ if (memcmp (&tmp, &res[i], sizeof (tmp)))
2703+ abort ();
2704+ }
2705+}
4cb26ef3
AM
2706Index: gcc/testsuite/gcc.dg/Wstrict-overflow-18.c
2707===================================================================
67dc168c
PS
2708--- gcc/testsuite/gcc.dg/Wstrict-overflow-18.c (.../tags/gcc_4_2_0_release) (revision 0)
2709+++ gcc/testsuite/gcc.dg/Wstrict-overflow-18.c (.../branches/gcc-4_2-branch) (revision 126002)
4cb26ef3
AM
2710@@ -0,0 +1,22 @@
2711+/* { dg-do compile } */
2712+/* { dg-options "-fstrict-overflow -O2 -Wstrict-overflow" } */
2713+
2714+/* Don't warn about an overflow when folding i > 0. The loop analysis
2715+ should determine that i does not wrap. */
2716+
2717+struct c { unsigned int a; unsigned int b; };
2718+extern void bar (struct c *);
2719+int
2720+foo (struct c *p)
2721+{
2722+ int i;
2723+ int sum = 0;
2724+
2725+ for (i = 0; i < p->a - p->b; ++i)
2726+ {
2727+ if (i > 0)
2728+ sum += 2;
2729+ bar (p);
2730+ }
2731+ return sum;
2732+}
2733Index: gcc/testsuite/gcc.dg/Wstrict-overflow-19.c
2734===================================================================
67dc168c
PS
2735--- gcc/testsuite/gcc.dg/Wstrict-overflow-19.c (.../tags/gcc_4_2_0_release) (revision 0)
2736+++ gcc/testsuite/gcc.dg/Wstrict-overflow-19.c (.../branches/gcc-4_2-branch) (revision 126002)
4cb26ef3
AM
2737@@ -0,0 +1,15 @@
2738+/* { dg-do compile } */
2739+/* { dg-options "-fstrict-overflow -O2 -Wstrict-overflow" } */
2740+
2741+/* Don't warn about an overflow when threading jumps. We used to get
2742+ a warning from comparing bounds generated by VRP. */
2743+
2744+int
2745+bar(int a, int b, int n)
2746+{
2747+ if (b > a)
2748+ n = a - b;
2749+ if (a >= b)
2750+ n = 1;
2751+ return n;
2752+}
5f3731d9
PS
2753Index: gcc/testsuite/ChangeLog
2754===================================================================
67dc168c
PS
2755--- gcc/testsuite/ChangeLog (.../tags/gcc_4_2_0_release) (revision 126002)
2756+++ gcc/testsuite/ChangeLog (.../branches/gcc-4_2-branch) (revision 126002)
2757@@ -1,3 +1,190 @@
2758+2007-06-21 Uros Bizjak <ubizjak@gmail.com>
2759+
2760+ PR target/32389
2761+ * gcc.target/i386/pr32389.c New test.
2762+
2763+2007-06-20 Daniel Franke <franke.daniel@gmail.com>
2764+
2765+ Backport from trunk:
2766+ PR fortran/32002
2767+ * gfortran.dg/compliant_elemental_intrinsics_2.f90: New test.
2768+
2769+2007-06-20 Jakub Jelinek <jakub@redhat.com>
2770+
2771+ PR inline-asm/32109
2772+ * g++.dg/ext/asm10.C: New test.
2773+
2774+ PR middle-end/32285
2775+ * gcc.c-torture/execute/20070614-1.c: New test.
2776+
2777+2007-06-20 Paul Thomas <pault@gcc.gnu.org>
2778+
2779+ PR fortran/32302
2780+ * gfortran.dg/common_resize_1.f90: New test.
2781+
2782+2007-06-19 Richard Guenther <rguenther@suse.de>
2783+ Michael Matz <matz@suse.de>
2784+
2785+ PR tree-optimization/30252
2786+ * g++.dg/opt/pr30252.C: New testcase.
2787+
2788+2007-06-19 Jakub Jelinek <jakub@redhat.com>
2789+
2790+ PR tree-optimization/32353
2791+ * g++.dg/opt/nrv13.C: New test.
2792+
2793+2007-06-15 Mark Mitchell <mark@codesourcery.com>
2794+
2795+ * g++.dg/lookup/anon6.C: New test.
2796+
2797+2007-06-17 Eric Botcazou <ebotcazou@libertysurf.fr>
2798+
2799+ * gcc.target/sparc/align.c: Use 'unsigned char' as element type.
2800+ * gcc.target/sparc/combined-2.c: Likewise.
2801+ * gcc.target/sparc/fexpand.c : Likewise.
2802+ * gcc.target/sparc/fnot.c: Likewise. Fix a couple of prototypes.
2803+ * gcc.target/sparc/fpack16.c : Likewise.
2804+ * gcc.target/sparc/fpmerge.c : Likewise.
2805+ * gcc.target/sparc/fpmul.c : Likewise.
2806+ * gcc.target/sparc/noresult.c : Likewise.
2807+ * gcc.target/sparc/pdist.c: Likewise.
2808+
2809+2007-06-15 Diego Novillo <dnovillo@google.com>
2810+
2811+ PR 32327
2812+ * g++.dg/tree-ssa/pr32327-1.C: New test.
2813+ * g++.dg/tree-ssa/pr32327.C: New test.
2814+
2815+2007-06-13 Eric Botcazou <ebotcazou@libertysurf.fr>
2816+
2817+ * gcc.target/sparc/mfpu.c: New test.
2818+
2819+2007-06-09 Ian Lance Taylor <iant@google.com>
2820+
2821+ PR tree-optimization/32169
2822+ * gcc.c-torture/compile/pr32169.c: New test.
2823+
4cb26ef3
AM
2824+2007-06-08 Dirk Mueller <dmueller@suse.de>
2825+
2826+ PR c++/31809
2827+ Backport from mainline:
2828+ 2007-05-30 Jakub Jelinek <jakub@redhat.com>
2829+
2830+ * g++.dg/opt/static5.C: New test.
2831+
2832+2007-06-06 Ian Lance Taylor <iant@google.com>
2833+
2834+ * g++.dg/conversion/enum1.C: New test.
2835+
2836+2007-06-05 Ian Lance Taylor <iant@google.com>
2837+
2838+ * gcc.dg/Wstrict-overflow-19.c: New test.
2839+
2840+2007-06-04 Ian Lance Taylor <iant@google.com>
2841+
2842+ * gcc.dg/Wstrict-overflow-18.c: New test.
2843+
5f3731d9 2844+2007-05-31 H.J. Lu <hongjiu.lu@intel.com>
686fea03 2845+
5f3731d9
PS
2846+ Backport from mainline:
2847+ 2007-05-25 H.J. Lu <hongjiu.lu@intel.com>
686fea03 2848+
5f3731d9
PS
2849+ * gcc.target/i386/sse2-check.h: New.
2850+ * gcc.target/i386/sse2-vec-1.c: Likewise.
2851+ * gcc.target/i386/sse2-vec-2.c: Likewise.
2852+ * gcc.target/i386/sse2-vec-3.c: Likewise.
2853+ * gcc.target/i386/sse2-vec-4.c: Likewise.
2854+ * gcc.target/i386/sse2-vec-5.c: Likewise.
2855+ * gcc.target/i386/sse2-vec-6.c: Likewise.
686fea03 2856+
5f3731d9 2857+2007-05-31 Paul Thomas <pault@gcc.gnu.org>
686fea03 2858+
5f3731d9
PS
2859+ PR fortran/31483
2860+ * gfortran.dg/altreturn_5.f90: New test.
686fea03 2861+
5f3731d9
PS
2862+ PR fortran/31540
2863+ * gfortran.dg/char_result_5.f90: New test.
686fea03 2864+
5f3731d9
PS
2865+ PR fortran/31867
2866+ * gfortran.dg/char_length_5.f90: New test.
686fea03 2867+
5f3731d9
PS
2868+ PR fortran/31994
2869+ * gfortran.dg/array_reference_1.f90: New test.
686fea03 2870+
5f3731d9 2871+2007-05-22 Tobias Burnus <burnus@net-b.de>
686fea03 2872+
5f3731d9
PS
2873+ PR fortran/31559
2874+ Backport from mainline.
2875+ * primary.c (match_variable): External functions
2876+ are no variables.
686fea03 2877+
5f3731d9 2878+2007-05-30 Jakub Jelinek <jakub@redhat.com>
686fea03 2879+
5f3731d9
PS
2880+ PR tree-optimization/31769
2881+ * g++.dg/gomp/pr31769.C: New test.
686fea03 2882+
5f3731d9 2883+2007-05-28 Andrew Pinski <andrew_pinski@playstation.sony.com>
686fea03 2884+
5f3731d9
PS
2885+ PR tree-opt/32100
2886+ * gcc.c-torture/execute/vrp-7.c: New test.
2887+
2888+2007-05-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
686fea03 2889+
5f3731d9
PS
2890+ PR libfortran/31964
2891+ * gfortran.fortran-torture/execute/intrinsic_bitops.f90: Update.
686fea03 2892+
5f3731d9 2893+2007-05-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
686fea03 2894+
5f3731d9
PS
2895+ PR libgfortran/31051
2896+ * gfortran.dg/fmt_t_3.f90: New.
686fea03 2897+
5f3731d9 2898+2007-05-22 Dominique d'Humieres <dominiq@lps.ens.fr>
686fea03 2899+
5f3731d9 2900+ * gfortran.dg/unf_io_convert_3.f90: Fix dg directive.
686fea03 2901+
5f3731d9 2902+2007-05-22 Tobias Burnus <burnus@net-b.de>
686fea03 2903+
5f3731d9
PS
2904+ PR fortran/31559
2905+ Backport from mainline.
2906+ * func_assign.f90: New test.
2cb538fa 2907+
5f3731d9 2908+2007-05-21 Uros Bizjak <ubizjak@gmail.com>
2cb538fa 2909+
5f3731d9
PS
2910+ PR target/31167
2911+ Backport from mainline.
2912+ * gcc.target/i386/pr31167.c: New test.
2cb538fa 2913+
5f3731d9 2914+2007-05-20 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2cb538fa 2915+
5f3731d9
PS
2916+ PR libgfortran/31395
2917+ * gfortran.dg/fmt_colon.f90: New test.
686fea03 2918+
5f3731d9 2919+2007-05-20 Thomas Koenig <tkoenig@gcc.gnu.org>
686fea03 2920+
5f3731d9
PS
2921+ PR fortran/31618
2922+ Backport from trunk.
2923+ * gfortran.dg/backspace_8.f: New test case.
686fea03 2924+
5f3731d9 2925+2007-05-20 Thomas Koenig <tkoenig@gcc.gnu.org>
686fea03 2926+
5f3731d9
PS
2927+ PR libfortran/31196
2928+ Backport from trunk.
2929+ * gfortran.dg/reshape_transpose_1.f90: New test.
686fea03 2930+
5f3731d9 2931+2007-05-17 Ian Lance Taylor <iant@google.com>
686fea03 2932+
5f3731d9
PS
2933+ PR tree-optimization/31953
2934+ * gcc.c-torture/compile/pr31953.c: New test.
686fea03 2935+
5f3731d9 2936+2007-05-17 Eric Botcazou <ebotcazou@libertysurf.fr>
686fea03 2937+
5f3731d9 2938+ * gcc.c-torture/execute/20070517-1.c: New test.
686fea03 2939+
5f3731d9 2940+2007-05-16 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2cb538fa 2941+
5f3731d9
PS
2942+ PR fortran/31725
2943+ * gfortran.dg/substr_4.f: New test.
686fea03 2944+
5f3731d9
PS
2945 2007-05-13 Release Manager
2946
2947 * GCC 4.2.0 released.
2948Index: gcc/testsuite/gfortran.fortran-torture/execute/intrinsic_bitops.f90
2cb538fa 2949===================================================================
67dc168c
PS
2950--- gcc/testsuite/gfortran.fortran-torture/execute/intrinsic_bitops.f90 (.../tags/gcc_4_2_0_release) (revision 126002)
2951+++ gcc/testsuite/gfortran.fortran-torture/execute/intrinsic_bitops.f90 (.../branches/gcc-4_2-branch) (revision 126002)
5f3731d9
PS
2952@@ -8,7 +8,8 @@
2953 i = 2
2954 j = 3
2955 k = 12
2956-
2957+ a = 5
2958+
2959 if (.not. btest (i, o+1)) call abort
2960 if (btest (i, o+2)) call abort
2961 if (iand (i, j) .ne. 2) call abort
2962@@ -26,4 +27,6 @@
2963 if (ishftc (k, o-30) .ne. 48) call abort
2964 if (ishftc (k, o+1, o+3) .ne. 9) call abort
2965 if (not (i) .ne. -3) call abort
2966+ if (ishftc (a, 1, bit_size(a)) .ne. 10) call abort
2967+ if (ishftc (1, 1, 32) .ne. 2) call abort
2968 end program
67dc168c
PS
2969Index: gcc/testsuite/g++.dg/tree-ssa/pr32327-1.C
2970===================================================================
2971--- gcc/testsuite/g++.dg/tree-ssa/pr32327-1.C (.../tags/gcc_4_2_0_release) (revision 0)
2972+++ gcc/testsuite/g++.dg/tree-ssa/pr32327-1.C (.../branches/gcc-4_2-branch) (revision 126002)
2973@@ -0,0 +1,70 @@
2974+// { dg-do run { target { { i?86-*-* x86_64-*-* } && ilp32 } } }
2975+// { dg-options "-O2" }
2976+
2977+// Endian sensitive. This is a little-endian redux.
2978+
2979+typedef long long int64;
2980+typedef unsigned long long uint64;
2981+typedef __SIZE_TYPE__ size_t;
2982+
2983+extern "C" {
2984+extern void *memcpy (void *__restrict __dest,
2985+ __const void *__restrict __src, size_t __n) /*throw ()*/;
2986+extern void abort (void);
2987+}
2988+
2989+inline uint64 Swap64(uint64 ull) {
2990+ uint64 b0 = (ull >> 0) & 0xff;
2991+ uint64 b1 = (ull >> 8) & 0xff;
2992+ uint64 b2 = (ull >> 16) & 0xff;
2993+ uint64 b3 = (ull >> 24) & 0xff;
2994+ uint64 b4 = (ull >> 32) & 0xff;
2995+ uint64 b5 = (ull >> 40) & 0xff;
2996+ uint64 b6 = (ull >> 48) & 0xff;
2997+ uint64 b7 = (ull >> 56) & 0xff;
2998+ return (b0 << 56) | (b1 << 48) | (b2 << 40) | (b3 << 32) |
2999+ (b4 << 24) | (b5 << 16) | (b6 << 8) | (b7 << 0);
3000+}
3001+
3002+inline void KeyFromUint64(uint64 ull, unsigned char* key) {
3003+ uint64 ull_swap = Swap64(ull);
3004+ memcpy(key, &ull_swap, sizeof(uint64));
3005+}
3006+
3007+inline int64 int64_from_double(const double& source) {
3008+ int64 dest;
3009+ memcpy(&dest, &source, sizeof(dest));
3010+ return dest;
3011+}
3012+
3013+void KeyFromDouble(double x, unsigned char* key) __attribute__ ((noinline));
3014+void KeyFromDouble(double x, unsigned char* key) {
3015+ int64 n = int64_from_double(x);
3016+ if (n >= 0) {
3017+ n += 1ull << 63;
3018+ } else {
3019+ n = -n;
3020+ }
3021+ KeyFromUint64(n, key);
3022+}
3023+
3024+
3025+void TestKeyFromDouble(uint64 ull) {
3026+ double d;
3027+ memcpy(&d, &ull, sizeof(d));
3028+
3029+ unsigned char key[sizeof(uint64)];
3030+ unsigned char expected_key[sizeof(uint64)] = { 0x81, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef };
3031+
3032+ KeyFromDouble(d, key);
3033+
3034+ for (size_t i = 0; i < sizeof(key); ++i) {
3035+ if ((key[i] & 0xff) != expected_key[i])
3036+ abort ();
3037+ }
3038+}
3039+
3040+int main() {
3041+ TestKeyFromDouble(0x0123456789abcdefull);
3042+ return 0;
3043+}
3044Index: gcc/testsuite/g++.dg/tree-ssa/pr32327.C
3045===================================================================
3046--- gcc/testsuite/g++.dg/tree-ssa/pr32327.C (.../tags/gcc_4_2_0_release) (revision 0)
3047+++ gcc/testsuite/g++.dg/tree-ssa/pr32327.C (.../branches/gcc-4_2-branch) (revision 126002)
3048@@ -0,0 +1,84 @@
3049+// { dg-do run { target { { i?86-*-* x86_64-*-* } && ilp32 } } }
3050+// { dg-options "-O2" }
3051+
3052+typedef unsigned long long uint64;
3053+typedef __SIZE_TYPE__ size_t;
3054+
3055+extern "C" {
3056+extern void *memcpy (void *__restrict __dest,
3057+ __const void *__restrict __src, size_t __n) /*throw ()*/;
3058+extern void abort (void);
3059+}
3060+
3061+extern void foo (void* p);
3062+
3063+inline uint64
3064+ghtonll(uint64 x)
3065+{
3066+ // __r is allocated the same stack slot as dest below
3067+ union { unsigned long long int __ll;
3068+ unsigned long int __l[2]; } __w, __r;
3069+ __w.__ll = x;
3070+ __r.__l[0] = (
3071+ {
3072+ register unsigned int __v;
3073+ __asm__ __volatile__ ("bswap %0" : "=r" (__v) :
3074+ "0" ((unsigned int) (__w.__l[1])));
3075+ __v; });
3076+
3077+ __r.__l[1] = (
3078+ {
3079+ register unsigned int __v;
3080+ __asm__ __volatile__ ("bswap %0" : "=r" (__v) :
3081+ "0" ((unsigned int) (__w.__l[0])));
3082+ __v; });
3083+
3084+ return __r.__ll;
3085+}
3086+
3087+inline uint64
3088+double_2_uint64 (const double *source)
3089+{
3090+ uint64 dest; // allocated the same stack slot as __r above
3091+ memcpy(&dest, source, sizeof(dest));
3092+ return dest;
3093+}
3094+
3095+inline void
3096+KeyFromUint64(uint64 fp) {
3097+ uint64 norder;
3098+ norder = ghtonll (fp);
3099+ foo((char*)(&norder));
3100+}
3101+
3102+void
3103+KeyFromDouble(double x) {
3104+ uint64 n = double_2_uint64 (&x);
3105+ if (n >= 42) {
3106+ n += 1;
3107+ }
3108+
3109+ KeyFromUint64(n);
3110+}
3111+
3112+#define NUM 0x0123456789abcdefll
3113+#define EXPECTED 0xe0bc9a7856347243ll
3114+
3115+void foo (void *x)
3116+{
3117+ if (*((uint64 *)x) != (uint64) EXPECTED)
3118+ abort ();
3119+}
3120+
3121+int main ()
3122+{
3123+ if (sizeof (double) != sizeof (uint64))
3124+ return 0;
3125+
3126+ if (sizeof (uint64) == sizeof (unsigned long int))
3127+ return 0;
3128+
3129+ KeyFromDouble ((double)NUM);
3130+
3131+ return 0;
3132+}
4cb26ef3
AM
3133Index: gcc/testsuite/g++.dg/conversion/enum1.C
3134===================================================================
67dc168c
PS
3135--- gcc/testsuite/g++.dg/conversion/enum1.C (.../tags/gcc_4_2_0_release) (revision 0)
3136+++ gcc/testsuite/g++.dg/conversion/enum1.C (.../branches/gcc-4_2-branch) (revision 126002)
4cb26ef3
AM
3137@@ -0,0 +1,10 @@
3138+// { dg-do run }
3139+// { dg-options "-O2 -finline-functions" }
3140+
3141+enum E { V = 1 };
3142+static const E E_MIN = V;
3143+static const E E_MAX = V;
3144+
3145+bool valid(E v) { return v >= E_MIN && v <= E_MAX; }
3146+
3147+int main() { return valid(E(2)); }
67dc168c
PS
3148Index: gcc/testsuite/g++.dg/ext/asm10.C
3149===================================================================
3150--- gcc/testsuite/g++.dg/ext/asm10.C (.../tags/gcc_4_2_0_release) (revision 0)
3151+++ gcc/testsuite/g++.dg/ext/asm10.C (.../branches/gcc-4_2-branch) (revision 126002)
3152@@ -0,0 +1,14 @@
3153+// PR inline-asm/32109
3154+// { dg-do compile }
3155+// { dg-options "-O2" }
3156+
3157+struct A { int i[3]; ~A (); };
3158+struct A a;
3159+struct B { struct A c; int i; B (); } b;
3160+
3161+B::B ()
3162+{
3163+ __asm ("" : : "r" (a)); // { dg-error "impossible constraint|non-memory input" }
3164+ __asm ("" : : "r" (b.c)); // { dg-error "impossible constraint|non-memory input" }
3165+ __asm ("" : : "r" (c)); // { dg-error "impossible constraint|non-memory input" }
3166+}
5f3731d9
PS
3167Index: gcc/testsuite/g++.dg/gomp/pr31769.C
3168===================================================================
67dc168c
PS
3169--- gcc/testsuite/g++.dg/gomp/pr31769.C (.../tags/gcc_4_2_0_release) (revision 0)
3170+++ gcc/testsuite/g++.dg/gomp/pr31769.C (.../branches/gcc-4_2-branch) (revision 126002)
5f3731d9
PS
3171@@ -0,0 +1,61 @@
3172+// PR tree-optimization/31769
3173+// { dg-options "-O2 -fopenmp" }
3174+// { dg-do compile }
2cb538fa 3175+
5f3731d9 3176+struct B
2cb538fa 3177+{
5f3731d9
PS
3178+ B () {}
3179+ virtual ~B () {}
2cb538fa 3180+};
5f3731d9 3181+struct C
686fea03 3182+{
5f3731d9
PS
3183+ C (int x, int y) {}
3184+};
3185+template<typename T, int U>
3186+struct D
686fea03 3187+{
5f3731d9
PS
3188+ D () {}
3189+ ~D () {}
3190+};
3191+struct E
2cb538fa 3192+{
5f3731d9
PS
3193+ E () {}
3194+ ~E () {}
3195+ D<int, 1> e;
3196+};
3197+struct A
2cb538fa 3198+{
5f3731d9
PS
3199+ B *b;
3200+ A () { b = __null; }
3201+ ~A () { if (b != __null) delete b; }
3202+};
3203+struct F : public A
2cb538fa 3204+{
5f3731d9
PS
3205+ explicit F (int x) { foo (0); }
3206+ F (const F &x) {}
3207+ F (F &x, C y) {}
3208+ F operator () (C x) const
3209+ {
3210+ return F (const_cast<F &>(*this), x);
3211+ }
3212+ template <typename U> F & operator+= (const U &);
3213+ void foo (int);
3214+ E f;
3215+};
2cb538fa 3216+
5f3731d9
PS
3217+int
3218+main ()
2cb538fa 3219+{
5f3731d9
PS
3220+ try
3221+ {
3222+ F f (10);
3223+ F g (10);
3224+ C h (0, 9);
3225+#pragma omp parallel for
3226+ for (int i = 0; i < 2; ++i)
3227+ g += f (h);
3228+ }
3229+ catch (int &e)
3230+ {
3231+ }
2cb538fa 3232+}
67dc168c
PS
3233Index: gcc/testsuite/g++.dg/opt/pr30252.C
3234===================================================================
3235--- gcc/testsuite/g++.dg/opt/pr30252.C (.../tags/gcc_4_2_0_release) (revision 0)
3236+++ gcc/testsuite/g++.dg/opt/pr30252.C (.../branches/gcc-4_2-branch) (revision 126002)
3237@@ -0,0 +1,226 @@
3238+/* { dg-do run } */
3239+/* { dg-options "-O -fstrict-aliasing" } */
3240+
3241+extern "C" void abort (void);
3242+namespace sigc {
3243+ template <class T_type>
3244+ struct type_trait
3245+ {
3246+ typedef T_type& pass;
3247+ typedef const T_type& take;
3248+ typedef T_type* pointer;
3249+ };
3250+ template <class T_base, class T_derived>
3251+ struct is_base_and_derived
3252+ {
3253+ struct big {
3254+ char memory[64];
3255+ };
3256+ static big is_base_class_(...);
3257+ static char is_base_class_(typename type_trait<T_base>::pointer);
3258+ static const bool value =
3259+ sizeof(is_base_class_(reinterpret_cast<typename type_trait<T_derived>::pointer>(0))) ==
3260+ sizeof(char);
3261+ };
3262+ struct nil;
3263+ struct functor_base {};
3264+ template <class T_functor, bool I_derives_functor_base=is_base_and_derived<functor_base,T_functor>::value>
3265+ struct functor_trait
3266+ {
3267+ };
3268+ template <class T_functor>
3269+ struct functor_trait<T_functor,true>
3270+ {
3271+ typedef typename T_functor::result_type result_type;
3272+ typedef T_functor functor_type;
3273+ };
3274+ template <class T_arg1, class T_return>
3275+ class pointer_functor1 : public functor_base
3276+ {
3277+ typedef T_return (*function_type)(T_arg1);
3278+ function_type func_ptr_;
3279+ public:
3280+ typedef T_return result_type;
3281+ explicit pointer_functor1(function_type _A_func): func_ptr_(_A_func) {}
3282+ T_return operator()(typename type_trait<T_arg1>::take _A_a1) const
3283+ { return func_ptr_(_A_a1); }
3284+ };
3285+ template <class T_arg1, class T_return>
3286+ inline pointer_functor1<T_arg1, T_return>
3287+ ptr_fun1(T_return (*_A_func)(T_arg1))
3288+ { return pointer_functor1<T_arg1, T_return>(_A_func); }
3289+ struct adaptor_base : public functor_base {};
3290+ template <class T_functor,
3291+ class T_arg1=void,
3292+ bool I_derives_adaptor_base=is_base_and_derived<adaptor_base,T_functor>::value>
3293+ struct deduce_result_type
3294+ { typedef typename functor_trait<T_functor>::result_type type; };
3295+ template <class T_functor>
3296+ struct adaptor_functor : public adaptor_base
3297+ {
3298+ template <class T_arg1=void>
3299+ struct deduce_result_type
3300+ { typedef typename sigc::deduce_result_type<T_functor, T_arg1>::type type; };
3301+ typedef typename functor_trait<T_functor>::result_type result_type;
3302+ result_type
3303+ operator()() const;
3304+ template <class T_arg1>
3305+ typename deduce_result_type<T_arg1>::type
3306+ operator()(T_arg1 _A_arg1) const
3307+ { return functor_(_A_arg1); }
3308+ explicit adaptor_functor(const T_functor& _A_functor)
3309+ : functor_(_A_functor)
3310+ {}
3311+ mutable T_functor functor_;
3312+ };
3313+ template <class T_functor>
3314+ typename adaptor_functor<T_functor>::result_type
3315+ adaptor_functor<T_functor>::operator()() const
3316+ { return functor_(); }
3317+ template <class T_functor, bool I_isadaptor = is_base_and_derived<adaptor_base, T_functor>::value> struct adaptor_trait;
3318+ template <class T_functor>
3319+ struct adaptor_trait<T_functor, true>
3320+ {
3321+ typedef T_functor adaptor_type;
3322+ };
3323+ template <class T_functor>
3324+ struct adaptor_trait<T_functor, false>
3325+ {
3326+ typedef typename functor_trait<T_functor>::functor_type functor_type;
3327+ typedef adaptor_functor<functor_type> adaptor_type;
3328+ };
3329+ template <class T_functor>
3330+ struct adapts : public adaptor_base
3331+ {
3332+ typedef typename adaptor_trait<T_functor>::adaptor_type adaptor_type;
3333+ explicit adapts(const T_functor& _A_functor)
3334+ : functor_(_A_functor)
3335+ {}
3336+ mutable adaptor_type functor_;
3337+ };
3338+ template <class T_type>
3339+ struct reference_wrapper
3340+ {
3341+ };
3342+ template <class T_type>
3343+ struct unwrap_reference
3344+ {
3345+ typedef T_type type;
3346+ };
3347+ template <class T_type>
3348+ class bound_argument
3349+ {
3350+ public:
3351+ bound_argument(const T_type& _A_argument)
3352+ : visited_(_A_argument)
3353+ {}
3354+ inline T_type& invoke()
3355+ { return visited_; }
3356+ T_type visited_;
3357+ };
3358+ template <class T_wrapped>
3359+ class bound_argument< reference_wrapper<T_wrapped> >
3360+ {
3361+ };
3362+ template <int I_location, class T_functor, class T_type1=nil>
3363+ struct bind_functor;
3364+ template <class T_functor, class T_type1>
3365+ struct bind_functor<-1, T_functor, T_type1> : public adapts<T_functor>
3366+ {
3367+ typedef typename adapts<T_functor>::adaptor_type adaptor_type;
3368+ typedef typename adaptor_type::result_type result_type;
3369+ result_type
3370+ operator()()
3371+ {
3372+ return this->functor_.template operator()<typename type_trait<typename unwrap_reference<T_type1>::type>::pass> (bound1_.invoke());
3373+ }
3374+ bind_functor(typename type_trait<T_functor>::take _A_func, typename type_trait<T_type1>::take _A_bound1)
3375+ : adapts<T_functor>(_A_func), bound1_(_A_bound1)
3376+ {}
3377+ bound_argument<T_type1> bound1_;
3378+ };
3379+ template <class T_type1, class T_functor>
3380+ inline bind_functor<-1, T_functor,
3381+ T_type1>
3382+ bind(const T_functor& _A_func, T_type1 _A_b1)
3383+ { return bind_functor<-1, T_functor,
3384+ T_type1>
3385+ (_A_func, _A_b1);
3386+ }
3387+ namespace internal {
3388+ struct slot_rep;
3389+ typedef void* (*hook)(slot_rep *);
3390+ struct slot_rep
3391+ {
3392+ hook call_;
3393+ };
3394+ }
3395+ class slot_base : public functor_base
3396+ {
3397+ public:
3398+ typedef internal::slot_rep rep_type;
3399+ explicit slot_base(rep_type* rep)
3400+ : rep_(rep)
3401+ {
3402+ }
3403+ mutable rep_type *rep_;
3404+ };
3405+ namespace internal {
3406+ template <class T_functor>
3407+ struct typed_slot_rep : public slot_rep
3408+ {
3409+ typedef typename adaptor_trait<T_functor>::adaptor_type adaptor_type;
3410+ adaptor_type functor_;
3411+ inline typed_slot_rep(const T_functor& functor)
3412+ : functor_(functor)
3413+ {
3414+ }
3415+ };
3416+ template<class T_functor>
3417+ struct slot_call0
3418+ {
3419+ static void *call_it(slot_rep* rep)
3420+ {
3421+ typedef typed_slot_rep<T_functor> typed_slot;
3422+ typed_slot *typed_rep = static_cast<typed_slot*>(rep);
3423+ return (typed_rep->functor_)();
3424+ }
3425+ static hook address()
3426+ {
3427+ return &call_it;
3428+ }
3429+ };
3430+ }
3431+
3432+ class slot0 : public slot_base
3433+ {
3434+ public:
3435+ typedef void * (*call_type)(rep_type*);
3436+ inline void *operator()() const
3437+ {
3438+ return slot_base::rep_->call_ (slot_base::rep_);
3439+ }
3440+ template <class T_functor>
3441+ slot0(const T_functor& _A_func)
3442+ : slot_base(new internal::typed_slot_rep<T_functor>(_A_func))
3443+ {
3444+ slot_base::rep_->call_ = internal::slot_call0<T_functor>::address();
3445+ }
3446+ };
3447+}
3448+struct A
3449+{
3450+ static void *foo (void *p) { return p; }
3451+ typedef sigc::slot0 C;
3452+ C bar();
3453+};
3454+A::C A::bar ()
3455+{
3456+ return sigc::bind (sigc::ptr_fun1 (&A::foo), (void*)0);
3457+}
3458+int main (void)
3459+{
3460+ A a;
3461+ if (a.bar ()() != 0)
3462+ abort ();
3463+}
4cb26ef3
AM
3464Index: gcc/testsuite/g++.dg/opt/static5.C
3465===================================================================
67dc168c
PS
3466--- gcc/testsuite/g++.dg/opt/static5.C (.../tags/gcc_4_2_0_release) (revision 0)
3467+++ gcc/testsuite/g++.dg/opt/static5.C (.../branches/gcc-4_2-branch) (revision 126002)
4cb26ef3
AM
3468@@ -0,0 +1,29 @@
3469+// PR c++/31809
3470+// { dg-do run }
3471+// { dg-options "-O2" }
3472+
3473+struct S
3474+{
3475+ unsigned v;
3476+ static inline S f (unsigned a);
3477+};
3478+
3479+inline S
3480+S::f (unsigned a)
3481+{
3482+ static S t = { a };
3483+ return t;
3484+}
3485+
3486+const static S s = S::f (26);
3487+
3488+extern "C" void abort (void);
3489+
3490+int
3491+main ()
3492+{
3493+ S t = s;
3494+ if (t.v != 26)
3495+ abort ();
3496+ return 0;
3497+}
67dc168c
PS
3498Index: gcc/testsuite/g++.dg/opt/nrv13.C
3499===================================================================
3500--- gcc/testsuite/g++.dg/opt/nrv13.C (.../tags/gcc_4_2_0_release) (revision 0)
3501+++ gcc/testsuite/g++.dg/opt/nrv13.C (.../branches/gcc-4_2-branch) (revision 126002)
3502@@ -0,0 +1,42 @@
3503+// PR tree-optimization/32353
3504+// { dg-do run }
3505+// { dg-options "-O2" }
3506+
3507+extern "C" void abort ();
3508+
3509+struct A
3510+{
3511+ int f;
3512+ A (int x) : f (x) {}
3513+};
3514+
3515+A
3516+foo (const A &x, const A &y)
3517+{
3518+ A r (0);
3519+ r = x.f == -111 ? y : (y.f == -111 || x.f > y.f) ? x : y;
3520+ A s (0);
3521+ r = r.f == -111 ? s : (r.f > s.f) ? r : s;
3522+ return r;
3523+}
3524+
3525+int
3526+main ()
3527+{
3528+ if (foo (A (0), A (1)).f != 1)
3529+ abort ();
3530+ if (foo (A (1), A (9)).f != 9)
3531+ abort ();
3532+ if (foo (A (9), A (1)).f != 9)
3533+ abort ();
3534+ if (foo (A (-4), A (-5)).f != 0)
3535+ abort ();
3536+ if (foo (A (-111), A (-111)).f != 0)
3537+ abort ();
3538+ if (foo (A (2), A (-111)).f != 2)
3539+ abort ();
3540+ if (foo (A (-111), A (6)).f != 6)
3541+ abort ();
3542+ if (foo (A (-111), A (-4)).f != 0)
3543+ abort ();
3544+}
3545Index: gcc/testsuite/g++.dg/lookup/anon6.C
3546===================================================================
3547--- gcc/testsuite/g++.dg/lookup/anon6.C (.../tags/gcc_4_2_0_release) (revision 0)
3548+++ gcc/testsuite/g++.dg/lookup/anon6.C (.../branches/gcc-4_2-branch) (revision 126002)
3549@@ -0,0 +1,11 @@
3550+extern int v1; // { dg-error "declared" }
3551+static union { int v1; }; // { dg-error "redeclaration" }
3552+
3553+static union { int v2; }; // { dg-error "declared" }
3554+extern int v2; // { dg-error "redeclaration" }
3555+
3556+int v3; // { dg-error "declared" }
3557+static union { int v3; }; // { dg-error "redeclaration" }
3558+
3559+static union { int v4; }; // { dg-error "declared" }
3560+static union { int v4; }; // { dg-error "redeclaration" }
5f3731d9 3561Index: gcc/testsuite/gfortran.dg/char_length_5.f90
2cb538fa 3562===================================================================
67dc168c
PS
3563--- gcc/testsuite/gfortran.dg/char_length_5.f90 (.../tags/gcc_4_2_0_release) (revision 0)
3564+++ gcc/testsuite/gfortran.dg/char_length_5.f90 (.../branches/gcc-4_2-branch) (revision 126002)
5f3731d9
PS
3565@@ -0,0 +1,61 @@
3566+! { dg-do run }
3567+! Tests the fix for PR31867, in which the interface evaluation
3568+! of the character length of 'join' (ie. the length available in
3569+! the caller) was wrong.
3570+!
3571+! Contributed by <beliavsky@aol.com>
3572+!
3573+module util_mod
3574+ implicit none
3575+contains
3576+ function join (words, sep) result(str)
3577+ character (len=*), intent(in) :: words(:),sep
3578+ character (len = (size (words) - 1) * len_trim (sep) + &
3579+ sum (len_trim (words))) :: str
3580+ integer :: i,nw
3581+ nw = size (words)
3582+ str = ""
3583+ if (nw < 1) then
3584+ return
3585+ else
3586+ str = words(1)
3587+ end if
3588+ do i=2,nw
3589+ str = trim (str) // trim (sep) // words(i)
3590+ end do
3591+ end function join
3592+end module util_mod
3593+!
3594+program xjoin
3595+ use util_mod, only: join
3596+ implicit none
3597+ integer yy
3598+ character (len=5) :: words(5:8) = (/"two ","three","four ","five "/), sep = "^#^"
3599+ character (len=5) :: words2(4) = (/"bat ","ball ","goal ","stump"/), sep2 = "&"
3600+
3601+ if (join (words, sep) .ne. "two^#^three^#^four^#^five") call abort ()
3602+ if (len (join (words, sep)) .ne. 25) call abort ()
3603+
3604+ if (join (words(5:6), sep) .ne. "two^#^three") call abort ()
3605+ if (len (join (words(5:6), sep)) .ne. 11) call abort ()
3606+
3607+ if (join (words(7:8), sep) .ne. "four^#^five") call abort ()
3608+ if (len (join (words(7:8), sep)) .ne. 11) call abort ()
3609+
3610+ if (join (words(5:7:2), sep) .ne. "two^#^four") call abort ()
3611+ if (len (join (words(5:7:2), sep)) .ne. 10) call abort ()
3612+
3613+ if (join (words(6:8:2), sep) .ne. "three^#^five") call abort ()
3614+ if (len (join (words(6:8:2), sep)) .ne. 12) call abort ()
3615+
3616+ if (join (words2, sep2) .ne. "bat&ball&goal&stump") call abort ()
3617+ if (len (join (words2, sep2)) .ne. 19) call abort ()
3618+
3619+ if (join (words2(1:2), sep2) .ne. "bat&ball") call abort ()
3620+ if (len (join (words2(1:2), sep2)) .ne. 8) call abort ()
3621+
3622+ if (join (words2(2:4:2), sep2) .ne. "ball&stump") call abort ()
3623+ if (len (join (words2(2:4:2), sep2)) .ne. 10) call abort ()
3624+
3625+end program xjoin
3626+! { dg-final { cleanup-modules "util_mod" } }
3627Index: gcc/testsuite/gfortran.dg/array_reference_1.f90
3628===================================================================
67dc168c
PS
3629--- gcc/testsuite/gfortran.dg/array_reference_1.f90 (.../tags/gcc_4_2_0_release) (revision 0)
3630+++ gcc/testsuite/gfortran.dg/array_reference_1.f90 (.../branches/gcc-4_2-branch) (revision 126002)
5f3731d9
PS
3631@@ -0,0 +1,35 @@
3632+! { dg-do run }
3633+! Tests the fix for PR31994, aka 31867, in which the offset
3634+! of 'a' in both subroutines was being evaluated incorrectly.
3635+! The testcase for PR31867 is char_length_5.f90
3636+!
3637+! Contributed by Elizabeth Yip <elizabeth.l.yip@boeing.com>
3638+! and Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3639+!
3640+program main
3641+ call PR31994
3642+ call PR31994_comment6
3643+contains
3644+ subroutine PR31994
3645+ implicit none
3646+ complex (kind=4), dimension(2,2) :: a, b, c
3647+ a(1,1) = (1.,1.)
3648+ a(2,1) = (2.,2.)
3649+ a(1,2) = (3.,3.)
3650+ a(2,2) = (4.,4.)
3651+ b=conjg (transpose (a))
3652+ c=transpose (a)
3653+ c=conjg (c)
3654+ if (any (b .ne. c)) call abort ()
3655+ end subroutine PR31994
3656+ subroutine PR31994_comment6
3657+ implicit none
3658+ real ,dimension(2,2)::a
3659+ integer ,dimension(2,2) :: b, c
3660+ a = reshape ((/1.,2.,3.,4./), (/2,2/))
3661+ b=int (transpose(a))
3662+ c = int (a)
3663+ c = transpose (c)
3664+ if (any (b .ne. c)) call abort ()
3665+ end subroutine PR31994_comment6
3666+END program main
3667Index: gcc/testsuite/gfortran.dg/reshape_transpose_1.f90
3668===================================================================
67dc168c
PS
3669--- gcc/testsuite/gfortran.dg/reshape_transpose_1.f90 (.../tags/gcc_4_2_0_release) (revision 0)
3670+++ gcc/testsuite/gfortran.dg/reshape_transpose_1.f90 (.../branches/gcc-4_2-branch) (revision 126002)
5f3731d9
PS
3671@@ -0,0 +1,18 @@
3672+! { dg-do run }
3673+! PR 31196 - reshape of transposed derived types generated
3674+! wront results.
3675+program main
3676+ implicit none
3677+ TYPE datatype
3678+ INTEGER :: I
3679+ END TYPE datatype
3680+ character (len=20) line1, line2
3681+ TYPE(datatype), dimension(2,2) :: data, result
3682+ data(1,1)%i = 1
3683+ data(2,1)%i = 2
3684+ data(1,2)%i = 3
3685+ data(2,2)%i = 4
3686+ write (unit=line1, fmt="(4I4)") reshape(transpose(data),shape(data))
3687+ write (unit=line2, fmt="(4I4)") (/ 1, 3, 2, 4 /)
3688+ if (line1 /= line2) call abort
3689+END program main
67dc168c
PS
3690Index: gcc/testsuite/gfortran.dg/common_resize_1.f
3691===================================================================
3692--- gcc/testsuite/gfortran.dg/common_resize_1.f (.../tags/gcc_4_2_0_release) (revision 0)
3693+++ gcc/testsuite/gfortran.dg/common_resize_1.f (.../branches/gcc-4_2-branch) (revision 126002)
3694@@ -0,0 +1,176 @@
3695+c { dg-do run }
3696+c { dg-options "-std=legacy" }
3697+c
3698+c Tests the fix for PR32302, in which the resizing of 'aux32' would cause
3699+c misalignment for double precision types and a wrong result would be obtained
3700+c at any level of optimization except none.
3701+c
3702+c Contributed by Dale Ranta <dir@lanl.gov>
3703+c
3704+ subroutine unpki(ixp,nwcon,nmel)
3705+ parameter(lnv=32)
3706+ implicit double precision (a-h,o-z) dp
3707+c
3708+c unpack connection data
3709+c
3710+ common/aux32/kka(lnv),kkb(lnv),kkc(lnv),
3711+ 1 kk1(lnv),kk2(lnv),kk3(lnv),dxy(lnv),
3712+ 2 dyx(lnv),dyz(lnv),dzy(lnv),dzx(lnv),
3713+ 3 dxz(lnv),vx17(lnv),vx28(lnv),vx35(lnv),
3714+ 4 vx46(lnv),vy17(lnv),vy28(lnv),
3715+ 5 vy35(lnv),vy46(lnv),vz17(lnv),vz28(lnv),vz35(lnv),vz46(lnv)
3716+ common/aux33/ix1(lnv),ix2(lnv),ix3(lnv),ix4(lnv),ix5(lnv),
3717+ 1 ix6(lnv),ix7(lnv),ix8(lnv),mxt(lnv)
3718+ dimension ixp(nwcon,*)
3719+c
3720+ return
3721+ end
3722+ subroutine prtal
3723+ parameter(lnv=32)
3724+ implicit double precision (a-h,o-z) dp
3725+ common/aux8/
3726+ & x1(lnv),x2(lnv),x3(lnv),x4(lnv),
3727+ & x5(lnv),x6(lnv),x7(lnv),x8(lnv),
3728+ & y1(lnv),y2(lnv),y3(lnv),y4(lnv),
3729+ & y5(lnv),y6(lnv),y7(lnv),y8(lnv),
3730+ & z1(lnv),z2(lnv),z3(lnv),z4(lnv),
3731+ & z5(lnv),z6(lnv),z7(lnv),z8(lnv)
3732+ common/aux9/vlrho(lnv),det(lnv)
3733+ common/aux10/
3734+ 1 px1(lnv),px2(lnv),px3(lnv),px4(lnv),
3735+ & px5(lnv),px6(lnv),px7(lnv),px8(lnv),
3736+ 2 py1(lnv),py2(lnv),py3(lnv),py4(lnv),
3737+ & py5(lnv),py6(lnv),py7(lnv),py8(lnv),
3738+ 3 pz1(lnv),pz2(lnv),pz3(lnv),pz4(lnv),
3739+ & pz5(lnv),pz6(lnv),pz7(lnv),pz8(lnv),
3740+ 4 vx1(lnv),vx2(lnv),vx3(lnv),vx4(lnv),
3741+ 5 vx5(lnv),vx6(lnv),vx7(lnv),vx8(lnv),
3742+ 6 vy1(lnv),vy2(lnv),vy3(lnv),vy4(lnv),
3743+ 7 vy5(lnv),vy6(lnv),vy7(lnv),vy8(lnv),
3744+ 8 vz1(lnv),vz2(lnv),vz3(lnv),vz4(lnv),
3745+ 9 vz5(lnv),vz6(lnv),vz7(lnv),vz8(lnv)
3746+ common/aux32/ ! { dg-warning "shall be of the same size" }
3747+ a a17(lnv),a28(lnv),dett(lnv),
3748+ 1 aj1(lnv),aj2(lnv),aj3(lnv),aj4(lnv),
3749+ 2 aj5(lnv),aj6(lnv),aj7(lnv),aj8(lnv),
3750+ 3 aj9(lnv),x17(lnv),x28(lnv),x35(lnv),
3751+ 4 x46(lnv),y17(lnv),y28(lnv),y35(lnv),
3752+ 5 y46(lnv),z17(lnv),z28(lnv),z35(lnv),z46(lnv)
3753+ common/aux33/ ! { dg-warning "shall be of the same size" }
3754+ a ix1(lnv),ix2(lnv),ix3(lnv),ix4(lnv),ix5(lnv),
3755+ 1 ix6(lnv),ix7(lnv),ix8(lnv),mxt(lnv),nmel
3756+ common/aux36/lft,llt
3757+ common/failu/sieu(lnv),failu(lnv)
3758+ common/sand1/ihf,ibemf,ishlf,itshf
3759+ dimension aj5968(lnv),aj6749(lnv),aj4857(lnv),aji1(lnv),aji2(lnv),
3760+ 1 aji3(lnv),aji4(lnv),aji5(lnv),
3761+ 1 aji6(lnv),aji7(lnv),aji8(lnv),aji9(lnv),aj12(lnv),
3762+ 2 aj45(lnv),aj78(lnv),b17(lnv),b28(lnv),c17(lnv),c28(lnv)
3763+c
3764+ equivalence (x17,aj5968),(x28,aj6749),(x35,aj4857),(x46,aji1),
3765+ 1 (y17,aji2),(y28,aji3),(y35,aji4),(y46,aji5),(z17,aji6),
3766+ 2 (z28,aji7),(z35,aji8),(z46,aji9),(aj1,aj12),(aj2,aj45),
3767+ 3 (aj3,aj78),(px1,b17),(px2,b28),(px3,c17),(px4,c28)
3768+ data o64th/0.0156250/
3769+c
3770+c jacobian matrix
3771+c
3772+ do 10 i=lft,llt
3773+ x17(i)=x7(i)-x1(i)
3774+ x28(i)=x8(i)-x2(i)
3775+ x35(i)=x5(i)-x3(i)
3776+ x46(i)=x6(i)-x4(i)
3777+ y17(i)=y7(i)-y1(i)
3778+ y28(i)=y8(i)-y2(i)
3779+ y35(i)=y5(i)-y3(i)
3780+ y46(i)=y6(i)-y4(i)
3781+ z17(i)=z7(i)-z1(i)
3782+ z28(i)=z8(i)-z2(i)
3783+ z35(i)=z5(i)-z3(i)
3784+ 10 z46(i)=z6(i)-z4(i)
3785+ do 20 i=lft,llt
3786+ aj1(i)=x17(i)+x28(i)-x35(i)-x46(i)
3787+ aj2(i)=y17(i)+y28(i)-y35(i)-y46(i)
3788+ aj3(i)=z17(i)+z28(i)-z35(i)-z46(i)
3789+ a17(i)=x17(i)+x46(i)
3790+ a28(i)=x28(i)+x35(i)
3791+ b17(i)=y17(i)+y46(i)
3792+ b28(i)=y28(i)+y35(i)
3793+ c17(i)=z17(i)+z46(i)
3794+ 20 c28(i)=z28(i)+z35(i)
3795+ do 30 i=lft,llt
3796+ aj4(i)=a17(i)+a28(i)
3797+ aj5(i)=b17(i)+b28(i)
3798+ aj6(i)=c17(i)+c28(i)
3799+ aj7(i)=a17(i)-a28(i)
3800+ aj8(i)=b17(i)-b28(i)
3801+ 30 aj9(i)=c17(i)-c28(i)
3802+c
3803+c jacobian
3804+c
3805+ do 40 i=lft,llt
3806+ aj5968(i)=aj5(i)*aj9(i)-aj6(i)*aj8(i)
3807+ aj6749(i)=aj6(i)*aj7(i)-aj4(i)*aj9(i)
3808+ 40 aj4857(i)=aj4(i)*aj8(i)-aj5(i)*aj7(i)
3809+ if (ihf.ne.1) then
3810+ do 50 i=lft,llt
3811+ 50 det(i)=o64th*(aj1(i)*aj5968(i)+aj2(i)*aj6749(i)+aj3(i)*aj4857(i))
3812+ else
3813+ do 55 i=lft,llt
3814+ det(i)=o64th*(aj1(i)*aj5968(i)+aj2(i)*aj6749(i)+aj3(i)*aj4857(i))
3815+ 1 *failu(i) + (1. - failu(i))
3816+ 55 continue
3817+ endif
3818+ do 60 i=lft,llt
3819+ 60 dett(i)=o64th/det(i)
3820+
3821+ if (det(lft) .ne. 1d0) call abort ()
3822+ if (det(llt) .ne. 1d0) call abort ()
3823+
3824+ return
3825+c
3826+ end
3827+ program main
3828+ parameter(lnv=32)
3829+ implicit double precision (a-h,o-z) dp
3830+ common/aux8/
3831+ & x1(lnv),x2(lnv),x3(lnv),x4(lnv),
3832+ & x5(lnv),x6(lnv),x7(lnv),x8(lnv),
3833+ & y1(lnv),y2(lnv),y3(lnv),y4(lnv),
3834+ & y5(lnv),y6(lnv),y7(lnv),y8(lnv),
3835+ & z1(lnv),z2(lnv),z3(lnv),z4(lnv),
3836+ & z5(lnv),z6(lnv),z7(lnv),z8(lnv)
3837+ common/aux36/lft,llt
3838+ common/sand1/ihf,ibemf,ishlf,itshf
3839+ lft=1
3840+ llt=1
3841+ x1(1)=0
3842+ x2(1)=1
3843+ x3(1)=1
3844+ x4(1)=0
3845+ x5(1)=0
3846+ x6(1)=1
3847+ x7(1)=1
3848+ x8(1)=0
3849+
3850+ y1(1)=0
3851+ y2(1)=0
3852+ y3(1)=1
3853+ y4(1)=1
3854+ y5(1)=0
3855+ y6(1)=0
3856+ y7(1)=1
3857+ y8(1)=1
3858+
3859+ z1(1)=0
3860+ z2(1)=0
3861+ z3(1)=0
3862+ z4(1)=0
3863+ z5(1)=1
3864+ z6(1)=1
3865+ z7(1)=1
3866+ z8(1)=1
3867+ call prtal
3868+ stop
3869+ end
3870+
5f3731d9
PS
3871Index: gcc/testsuite/gfortran.dg/fmt_colon.f90
3872===================================================================
67dc168c
PS
3873--- gcc/testsuite/gfortran.dg/fmt_colon.f90 (.../tags/gcc_4_2_0_release) (revision 0)
3874+++ gcc/testsuite/gfortran.dg/fmt_colon.f90 (.../branches/gcc-4_2-branch) (revision 126002)
5f3731d9
PS
3875@@ -0,0 +1,14 @@
3876+! { dg-do run }
3877+! PR31395 Colon edit descriptor is ignored.
3878+! Test case derived from PR. Prepared by Jerry DeLisle
3879+! <jvdelisle@gcc.gnu.org>
3880+PROGRAM test
3881+ INTEGER :: i = 1
3882+ character(30) :: astring
3883+ WRITE(astring, 10) i
3884+ 10 FORMAT('i =',I2:' this should not print')
3885+ if (astring.ne."i = 1") call abort
3886+ write(astring, 20) i, i
3887+ 20 format('i =',I2:' this should print',I2)
3888+ if (astring.ne."i = 1 this should print 1") call abort
3889+END PROGRAM test
67dc168c 3890\ No newline at end of file
5f3731d9
PS
3891Index: gcc/testsuite/gfortran.dg/char_result_13.f90
3892===================================================================
67dc168c
PS
3893--- gcc/testsuite/gfortran.dg/char_result_13.f90 (.../tags/gcc_4_2_0_release) (revision 0)
3894+++ gcc/testsuite/gfortran.dg/char_result_13.f90 (.../branches/gcc-4_2-branch) (revision 126002)
5f3731d9
PS
3895@@ -0,0 +1,13 @@
3896+! { dg-do compile }
3897+! tests the fix for PR31540, in which the character lengths in
3898+! parentheses were not resolved.
3899+!
3900+! Contributed by Tobias Burnus <burnus@gcc.gnu.org>
3901+!
3902+ subroutine pfb()
3903+ implicit none
3904+ external pfname1, pfname2
3905+ character ((136)) pfname1
3906+ character ((129+7)) pfname2
3907+ return
3908+ end
67dc168c
PS
3909Index: gcc/testsuite/gfortran.dg/compliant_elemental_intrinsics_2.f90
3910===================================================================
3911--- gcc/testsuite/gfortran.dg/compliant_elemental_intrinsics_2.f90 (.../tags/gcc_4_2_0_release) (revision 0)
3912+++ gcc/testsuite/gfortran.dg/compliant_elemental_intrinsics_2.f90 (.../branches/gcc-4_2-branch) (revision 126002)
3913@@ -0,0 +1,44 @@
3914+! { dg-compile }
3915+!
3916+! Testcases from PR32002.
3917+!
3918+PROGRAM test_pr32002
3919+
3920+ CALL test_1() ! scalar/vector
3921+ CALL test_2() ! vector/vector
3922+ CALL test_3() ! matrix/vector
3923+ CALL test_4() ! matrix/matrix
3924+
3925+CONTAINS
3926+ ELEMENTAL FUNCTION f(x)
3927+ INTEGER, INTENT(in) :: x
3928+ INTEGER :: f
3929+ f = x
3930+ END FUNCTION
3931+
3932+ SUBROUTINE test_1()
3933+ INTEGER :: a = 0, b(2) = 0
3934+ a = f(b) ! { dg-error "Incompatible ranks" }
3935+ b = f(a) ! ok, set all array elements to f(a)
3936+ END SUBROUTINE
3937+
3938+ SUBROUTINE test_2()
3939+ INTEGER :: a(2) = 0, b(3) = 0
3940+ a = f(b) ! { dg-error "different shape" }
3941+ a = f(b(1:2)) ! ok, slice, stride 1
3942+ a = f(b(1:3:2)) ! ok, slice, stride 2
3943+ END SUBROUTINE
3944+
3945+ SUBROUTINE test_3()
3946+ INTEGER :: a(4) = 0, b(2,2) = 0
3947+ a = f(b) ! { dg-error "Incompatible ranks" }
3948+ a = f(RESHAPE(b, (/ 4 /))) ! ok, same shape
3949+ END SUBROUTINE
3950+
3951+ SUBROUTINE test_4()
3952+ INTEGER :: a(2,2) = 0, b(3,3) = 0
3953+ a = f(b) ! { dg-error "different shape" }
3954+ a = f(b(1:3, 1:2)) ! { dg-error "different shape" }
3955+ a = f(b(1:3:2, 1:3:2)) ! ok, same shape
3956+ END SUBROUTINE
3957+END PROGRAM
5f3731d9
PS
3958Index: gcc/testsuite/gfortran.dg/altreturn_5.f90
3959===================================================================
67dc168c
PS
3960--- gcc/testsuite/gfortran.dg/altreturn_5.f90 (.../tags/gcc_4_2_0_release) (revision 0)
3961+++ gcc/testsuite/gfortran.dg/altreturn_5.f90 (.../branches/gcc-4_2-branch) (revision 126002)
5f3731d9
PS
3962@@ -0,0 +1,30 @@
3963+! { dg-do run }
3964+! Tests the fix for PR31483, in which dummy argument procedures
3965+! produced an ICE if they had an alternate return.
3966+!
3967