source: patches/gcc-4.4.1-branch_update-4.patch@ 665937ac

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since 665937ac was 0cbb4b7, checked in by jim <jim@…>, 15 years ago

Updated GCC Patches

  • Property mode set to 100644
File size: 240.3 KB
RevLine 
[0cbb4b7]1Submitted By: Jim Gifford (jim at cross-lfs dot org)
2Date: 09-12-2009
3Initial Package Version: 4.4.1
4Origin: Upstream
5Upstream Status: Applied
6Description: This is a branch update for gcc-4.4.1, and should be
7 rechecked periodically.
8
9This patch was made from Revision # 151655.
10
11diff -Naur gcc-4.4.1.orig/contrib/compare-debug gcc-4.4.1/contrib/compare-debug
12--- gcc-4.4.1.orig/contrib/compare-debug 2007-11-25 22:40:31.000000000 -0800
13+++ gcc-4.4.1/contrib/compare-debug 2009-08-18 12:46:20.000000000 -0700
14@@ -2,7 +2,7 @@
15
16 # Compare stripped copies of two given object files.
17
18-# Copyright (C) 2007 Free Software Foundation
19+# Copyright (C) 2007, 2008, 2009 Free Software Foundation
20 # Originally by Alexandre Oliva <aoliva@redhat.com>
21
22 # This file is part of GCC.
23@@ -67,6 +67,74 @@
24 status=0
25 else
26 status=1
27+
28+ # Assembler-generated CFI will add an .eh_frame section for -g not
29+ # present in -g0. Try to cope with it by checking that an .eh_frame
30+ # section is present in either object file, and then stripping it
31+ # off before re-comparing.
32+
33+ cmd=
34+ cmp1=
35+ cmp2=
36+
37+ for t in objdump readelf eu-readelf; do
38+ if ($t --help) 2>&1 | grep -e '--\[*section-\]*headers' > /dev/null; then
39+ cmd=$t
40+
41+ $cmd --section-headers "$1.$suf1" | grep '\.eh_frame' > /dev/null
42+ cmp1=$?
43+
44+ $cmd --section-headers "$2.$suf2" | grep '\.eh_frame' > /dev/null
45+ cmp2=$?
46+
47+ break
48+ fi
49+ done
50+
51+ # If we found .eh_frame in one but not the other, or if we could not
52+ # find a command to tell, try to strip off the .eh_frame section
53+ # from both.
54+ if test "x$cmp1" != "x$cmp2" || test "x$cmd" = "x"; then
55+ suf3=$suf1.
56+ while test -f "$1.$suf3"; do
57+ suf3=$suf3.
58+ done
59+
60+ suf4=$suf2.
61+ while test -f "$2.$suf4"; do
62+ suf4=$suf4.
63+ done
64+
65+ trap 'rm -f "$1.$suf1" "$2.$suf2" "$1.$suf3" "$2.$suf4"' 0 1 2 15
66+
67+ echo stripping off .eh_frame, then retrying >&2
68+
69+ if (objcopy -v) 2>&1 | grep -e "--remove-section" > /dev/null; then
70+ objcopy --remove-section .eh_frame --remove-section .rel.eh_frame --remove-section .rela.eh_frame "$1.$suf1" "$1.$suf3"
71+ mv "$1.$suf3" "$1.$suf1"
72+
73+ objcopy --remove-section .eh_frame --remove-section .rel.eh_frame --remove-section .rela.eh_frame "$2.$suf2" "$2.$suf4"
74+ mv "$2.$suf4" "$2.$suf2"
75+ elif (strip --help) 2>&1 | grep -e --remove-section > /dev/null; then
76+ cp "$1.$suf1" "$1.$suf3"
77+ strip --remove-section .eh_frame --remove-section .rel.eh_frame --remove-section .rela.eh_frame "$1.$suf3"
78+ mv "$1.$suf3" "$1.$suf1"
79+
80+ cp "$2.$suf2" "$2.$suf4"
81+ strip --remove-section .eh_frame --remove-section .rel.eh_frame --remove-section .rela.eh_frame "$2.$suf4"
82+ mv "$2.$suf4" "$2.$suf2"
83+ else
84+ echo failed to strip off .eh_frame >&2
85+ fi
86+
87+ trap 'rm -f "$1.$suf1" "$2.$suf2"' 0 1 2 15
88+
89+ if cmp "$1.$suf1" "$2.$suf2"; then
90+ status=0
91+ else
92+ status=1
93+ fi
94+ fi
95 fi
96
97 $rm "$1.$suf1" "$2.$suf2"
98diff -Naur gcc-4.4.1.orig/gcc/alias.c gcc-4.4.1/gcc/alias.c
99--- gcc-4.4.1.orig/gcc/alias.c 2009-04-27 04:55:13.000000000 -0700
100+++ gcc-4.4.1/gcc/alias.c 2009-08-12 23:28:28.000000000 -0700
101@@ -1932,6 +1932,9 @@
102 {
103 const_tree fieldx, fieldy, typex, typey, orig_y;
104
105+ if (!flag_strict_aliasing)
106+ return false;
107+
108 do
109 {
110 /* The comparison has to be done at a common type, since we don't
111diff -Naur gcc-4.4.1.orig/gcc/builtins.c gcc-4.4.1/gcc/builtins.c
112--- gcc-4.4.1.orig/gcc/builtins.c 2009-05-29 08:47:31.000000000 -0700
113+++ gcc-4.4.1/gcc/builtins.c 2009-08-24 02:52:03.000000000 -0700
114@@ -8634,15 +8634,18 @@
115 }
116 }
117
118- /* Optimize pow(pow(x,y),z) = pow(x,y*z). */
119+ /* Optimize pow(pow(x,y),z) = pow(x,y*z) iff x is nonnegative. */
120 if (fcode == BUILT_IN_POW
121 || fcode == BUILT_IN_POWF
122 || fcode == BUILT_IN_POWL)
123 {
124 tree arg00 = CALL_EXPR_ARG (arg0, 0);
125- tree arg01 = CALL_EXPR_ARG (arg0, 1);
126- tree narg1 = fold_build2 (MULT_EXPR, type, arg01, arg1);
127- return build_call_expr (fndecl, 2, arg00, narg1);
128+ if (tree_expr_nonnegative_p (arg00))
129+ {
130+ tree arg01 = CALL_EXPR_ARG (arg0, 1);
131+ tree narg1 = fold_build2 (MULT_EXPR, type, arg01, arg1);
132+ return build_call_expr (fndecl, 2, arg00, narg1);
133+ }
134 }
135 }
136
137diff -Naur gcc-4.4.1.orig/gcc/config/alpha/alpha.c gcc-4.4.1/gcc/config/alpha/alpha.c
138--- gcc-4.4.1.orig/gcc/config/alpha/alpha.c 2009-03-17 13:18:21.000000000 -0700
139+++ gcc-4.4.1/gcc/config/alpha/alpha.c 2009-08-28 02:57:51.000000000 -0700
140@@ -2052,11 +2052,22 @@
141
142 switch (GET_CODE (x))
143 {
144- case CONST:
145 case LABEL_REF:
146 case HIGH:
147 return true;
148
149+ case CONST:
150+ if (GET_CODE (XEXP (x, 0)) == PLUS
151+ && GET_CODE (XEXP (XEXP (x, 0), 1)) == CONST_INT)
152+ x = XEXP (XEXP (x, 0), 0);
153+ else
154+ return true;
155+
156+ if (GET_CODE (x) != SYMBOL_REF)
157+ return true;
158+
159+ /* FALLTHRU */
160+
161 case SYMBOL_REF:
162 /* TLS symbols are never valid. */
163 return SYMBOL_REF_TLS_MODEL (x) == 0;
164@@ -3542,7 +3553,7 @@
165 emit_insn (gen_insll_le (insl, gen_lowpart (SImode, src), addr));
166 break;
167 case 8:
168- emit_insn (gen_insql_le (insl, src, addr));
169+ emit_insn (gen_insql_le (insl, gen_lowpart (DImode, src), addr));
170 break;
171 }
172 }
173@@ -8279,7 +8290,7 @@
174 insn = get_last_insn ();
175 if (!INSN_P (insn))
176 insn = prev_active_insn (insn);
177- if (GET_CODE (insn) == CALL_INSN)
178+ if (insn && GET_CODE (insn) == CALL_INSN)
179 output_asm_insn (get_insn_template (CODE_FOR_nop, NULL), NULL);
180
181 #if TARGET_ABI_OSF
182diff -Naur gcc-4.4.1.orig/gcc/config/alpha/alpha.md gcc-4.4.1/gcc/config/alpha/alpha.md
183--- gcc-4.4.1.orig/gcc/config/alpha/alpha.md 2009-02-20 07:20:38.000000000 -0800
184+++ gcc-4.4.1/gcc/config/alpha/alpha.md 2009-08-28 02:57:51.000000000 -0700
185@@ -256,16 +256,7 @@
186 (sign_extend:DI (match_dup 1)))]
187 "")
188
189-;; Don't say we have addsi3 if optimizing. This generates better code. We
190-;; have the anonymous addsi3 pattern below in case combine wants to make it.
191-(define_expand "addsi3"
192- [(set (match_operand:SI 0 "register_operand" "")
193- (plus:SI (match_operand:SI 1 "reg_or_0_operand" "")
194- (match_operand:SI 2 "add_operand" "")))]
195- "! optimize"
196- "")
197-
198-(define_insn "*addsi_internal"
199+(define_insn "addsi3"
200 [(set (match_operand:SI 0 "register_operand" "=r,r,r,r")
201 (plus:SI (match_operand:SI 1 "reg_or_0_operand" "%rJ,rJ,rJ,rJ")
202 (match_operand:SI 2 "add_operand" "rI,O,K,L")))]
203@@ -619,14 +610,7 @@
204 ""
205 "subqv $31,%1,%0")
206
207-(define_expand "subsi3"
208- [(set (match_operand:SI 0 "register_operand" "")
209- (minus:SI (match_operand:SI 1 "reg_or_0_operand" "")
210- (match_operand:SI 2 "reg_or_8bit_operand" "")))]
211- "! optimize"
212- "")
213-
214-(define_insn "*subsi_internal"
215+(define_insn "subsi3"
216 [(set (match_operand:SI 0 "register_operand" "=r")
217 (minus:SI (match_operand:SI 1 "reg_or_0_operand" "rJ")
218 (match_operand:SI 2 "reg_or_8bit_operand" "rI")))]
219@@ -3716,19 +3700,7 @@
220 (match_operator:DF 1 "alpha_fp_comparison_operator"
221 [(match_operand:DF 2 "reg_or_0_operand" "fG")
222 (match_operand:DF 3 "reg_or_0_operand" "fG")]))]
223- "TARGET_FP && alpha_fptm < ALPHA_FPTM_SU"
224- "cmp%-%C1%/ %R2,%R3,%0"
225- [(set_attr "type" "fadd")
226- (set_attr "trap" "yes")
227- (set_attr "trap_suffix" "su")])
228-
229-(define_insn "*cmpdf_ieee_ext1"
230- [(set (match_operand:DF 0 "register_operand" "=&f")
231- (match_operator:DF 1 "alpha_fp_comparison_operator"
232- [(float_extend:DF
233- (match_operand:SF 2 "reg_or_0_operand" "fG"))
234- (match_operand:DF 3 "reg_or_0_operand" "fG")]))]
235- "TARGET_FP && alpha_fptm >= ALPHA_FPTM_SU"
236+ "TARGET_FP"
237 "cmp%-%C1%/ %R2,%R3,%0"
238 [(set_attr "type" "fadd")
239 (set_attr "trap" "yes")
240@@ -3746,18 +3718,6 @@
241 (set_attr "trap" "yes")
242 (set_attr "trap_suffix" "su")])
243
244-(define_insn "*cmpdf_ieee_ext2"
245- [(set (match_operand:DF 0 "register_operand" "=&f")
246- (match_operator:DF 1 "alpha_fp_comparison_operator"
247- [(match_operand:DF 2 "reg_or_0_operand" "fG")
248- (float_extend:DF
249- (match_operand:SF 3 "reg_or_0_operand" "fG"))]))]
250- "TARGET_FP && alpha_fptm >= ALPHA_FPTM_SU"
251- "cmp%-%C1%/ %R2,%R3,%0"
252- [(set_attr "type" "fadd")
253- (set_attr "trap" "yes")
254- (set_attr "trap_suffix" "su")])
255-
256 (define_insn "*cmpdf_ext2"
257 [(set (match_operand:DF 0 "register_operand" "=f")
258 (match_operator:DF 1 "alpha_fp_comparison_operator"
259@@ -3770,19 +3730,6 @@
260 (set_attr "trap" "yes")
261 (set_attr "trap_suffix" "su")])
262
263-(define_insn "*cmpdf_ieee_ext3"
264- [(set (match_operand:DF 0 "register_operand" "=&f")
265- (match_operator:DF 1 "alpha_fp_comparison_operator"
266- [(float_extend:DF
267- (match_operand:SF 2 "reg_or_0_operand" "fG"))
268- (float_extend:DF
269- (match_operand:SF 3 "reg_or_0_operand" "fG"))]))]
270- "TARGET_FP && alpha_fptm >= ALPHA_FPTM_SU"
271- "cmp%-%C1%/ %R2,%R3,%0"
272- [(set_attr "type" "fadd")
273- (set_attr "trap" "yes")
274- (set_attr "trap_suffix" "su")])
275-
276 (define_insn "*cmpdf_ext3"
277 [(set (match_operand:DF 0 "register_operand" "=f")
278 (match_operator:DF 1 "alpha_fp_comparison_operator"
279@@ -3832,7 +3779,7 @@
280 (match_operand:DF 2 "const0_operand" "G,G")])
281 (float_extend:DF (match_operand:SF 1 "reg_or_0_operand" "fG,0"))
282 (match_operand:DF 5 "reg_or_0_operand" "0,fG")))]
283- "TARGET_FP"
284+ "TARGET_FP && alpha_fptm < ALPHA_FPTM_SU"
285 "@
286 fcmov%C3 %R4,%R1,%0
287 fcmov%D3 %R4,%R5,%0"
288@@ -3847,7 +3794,7 @@
289 (match_operand:DF 2 "const0_operand" "G,G")])
290 (match_operand:DF 1 "reg_or_0_operand" "fG,0")
291 (match_operand:DF 5 "reg_or_0_operand" "0,fG")))]
292- "TARGET_FP"
293+ "TARGET_FP && alpha_fptm < ALPHA_FPTM_SU"
294 "@
295 fcmov%C3 %R4,%R1,%0
296 fcmov%D3 %R4,%R5,%0"
297@@ -3862,7 +3809,7 @@
298 (match_operand:DF 2 "const0_operand" "G,G")])
299 (match_operand:SF 1 "reg_or_0_operand" "fG,0")
300 (match_operand:SF 5 "reg_or_0_operand" "0,fG")))]
301- "TARGET_FP"
302+ "TARGET_FP && alpha_fptm < ALPHA_FPTM_SU"
303 "@
304 fcmov%C3 %R4,%R1,%0
305 fcmov%D3 %R4,%R5,%0"
306@@ -3877,7 +3824,7 @@
307 (match_operand:DF 2 "const0_operand" "G,G")])
308 (float_extend:DF (match_operand:SF 1 "reg_or_0_operand" "fG,0"))
309 (match_operand:DF 5 "reg_or_0_operand" "0,fG")))]
310- "TARGET_FP"
311+ "TARGET_FP && alpha_fptm < ALPHA_FPTM_SU"
312 "@
313 fcmov%C3 %R4,%R1,%0
314 fcmov%D3 %R4,%R5,%0"
315diff -Naur gcc-4.4.1.orig/gcc/config/alpha/sync.md gcc-4.4.1/gcc/config/alpha/sync.md
316--- gcc-4.4.1.orig/gcc/config/alpha/sync.md 2009-02-20 07:20:38.000000000 -0800
317+++ gcc-4.4.1/gcc/config/alpha/sync.md 2009-08-28 02:57:51.000000000 -0700
318@@ -62,11 +62,8 @@
319 [(set_attr "type" "st_c")])
320
321 ;; The Alpha Architecture Handbook says that it is UNPREDICTABLE whether
322-;; the lock is cleared by a TAKEN branch. If we were to honor that, it
323-;; would mean that we could not expand a ll/sc sequence until after the
324-;; final basic-block reordering pass. Fortunately, it appears that no
325-;; Alpha implementation ever built actually clears the lock on branches,
326-;; taken or not.
327+;; the lock is cleared by a TAKEN branch. This means that we can not
328+;; expand a ll/sc sequence until after the final basic-block reordering pass.
329
330 (define_insn_and_split "sync_<fetchop_name><mode>"
331 [(set (match_operand:I48MODE 0 "memory_operand" "+m")
332@@ -77,7 +74,7 @@
333 (clobber (match_scratch:I48MODE 2 "=&r"))]
334 ""
335 "#"
336- "reload_completed"
337+ "epilogue_completed"
338 [(const_int 0)]
339 {
340 alpha_split_atomic_op (<CODE>, operands[0], operands[1],
341@@ -96,7 +93,7 @@
342 (clobber (match_scratch:I48MODE 2 "=&r"))]
343 ""
344 "#"
345- "reload_completed"
346+ "epilogue_completed"
347 [(const_int 0)]
348 {
349 alpha_split_atomic_op (NOT, operands[0], operands[1],
350@@ -116,7 +113,7 @@
351 (clobber (match_scratch:I48MODE 3 "=&r"))]
352 ""
353 "#"
354- "reload_completed"
355+ "epilogue_completed"
356 [(const_int 0)]
357 {
358 alpha_split_atomic_op (<CODE>, operands[1], operands[2],
359@@ -137,7 +134,7 @@
360 (clobber (match_scratch:I48MODE 3 "=&r"))]
361 ""
362 "#"
363- "reload_completed"
364+ "epilogue_completed"
365 [(const_int 0)]
366 {
367 alpha_split_atomic_op (NOT, operands[1], operands[2],
368@@ -158,7 +155,7 @@
369 (clobber (match_scratch:I48MODE 3 "=&r"))]
370 ""
371 "#"
372- "reload_completed"
373+ "epilogue_completed"
374 [(const_int 0)]
375 {
376 alpha_split_atomic_op (<CODE>, operands[1], operands[2],
377@@ -179,7 +176,7 @@
378 (clobber (match_scratch:I48MODE 3 "=&r"))]
379 ""
380 "#"
381- "reload_completed"
382+ "epilogue_completed"
383 [(const_int 0)]
384 {
385 alpha_split_atomic_op (NOT, operands[1], operands[2],
386@@ -214,7 +211,7 @@
387 (clobber (match_scratch:DI 6 "=X,&r"))]
388 ""
389 "#"
390- "reload_completed"
391+ "epilogue_completed"
392 [(const_int 0)]
393 {
394 alpha_split_compare_and_swap_12 (<MODE>mode, operands[0], operands[1],
395@@ -251,7 +248,7 @@
396 (clobber (match_scratch:I48MODE 4 "=&r"))]
397 ""
398 "#"
399- "reload_completed"
400+ "epilogue_completed"
401 [(const_int 0)]
402 {
403 alpha_split_compare_and_swap (operands[0], operands[1], operands[2],
404@@ -282,7 +279,7 @@
405 (clobber (match_scratch:DI 4 "=&r"))]
406 ""
407 "#"
408- "reload_completed"
409+ "epilogue_completed"
410 [(const_int 0)]
411 {
412 alpha_split_lock_test_and_set_12 (<MODE>mode, operands[0], operands[1],
413@@ -301,7 +298,7 @@
414 (clobber (match_scratch:I48MODE 3 "=&r"))]
415 ""
416 "#"
417- "reload_completed"
418+ "epilogue_completed"
419 [(const_int 0)]
420 {
421 alpha_split_lock_test_and_set (operands[0], operands[1],
422diff -Naur gcc-4.4.1.orig/gcc/config/arm/arm.md gcc-4.4.1/gcc/config/arm/arm.md
423--- gcc-4.4.1.orig/gcc/config/arm/arm.md 2009-05-16 06:28:27.000000000 -0700
424+++ gcc-4.4.1/gcc/config/arm/arm.md 2009-08-05 09:11:25.000000000 -0700
425@@ -472,9 +472,9 @@
426 if (TARGET_THUMB1)
427 {
428 if (GET_CODE (operands[1]) != REG)
429- operands[1] = force_reg (SImode, operands[1]);
430+ operands[1] = force_reg (DImode, operands[1]);
431 if (GET_CODE (operands[2]) != REG)
432- operands[2] = force_reg (SImode, operands[2]);
433+ operands[2] = force_reg (DImode, operands[2]);
434 }
435 "
436 )
437diff -Naur gcc-4.4.1.orig/gcc/config/avr/avr.c gcc-4.4.1/gcc/config/avr/avr.c
438--- gcc-4.4.1.orig/gcc/config/avr/avr.c 2009-04-01 00:18:47.000000000 -0700
439+++ gcc-4.4.1/gcc/config/avr/avr.c 2009-08-25 12:03:53.000000000 -0700
440@@ -996,7 +996,7 @@
441 start_sequence ();
442
443 emit_move_insn (myfp,
444- gen_rtx_PLUS (HImode, myfp,
445+ gen_rtx_PLUS (GET_MODE (myfp), myfp,
446 gen_int_mode (size,
447 GET_MODE(myfp))));
448
449diff -Naur gcc-4.4.1.orig/gcc/config/i386/i386.c gcc-4.4.1/gcc/config/i386/i386.c
450--- gcc-4.4.1.orig/gcc/config/i386/i386.c 2009-07-21 00:22:51.000000000 -0700
451+++ gcc-4.4.1/gcc/config/i386/i386.c 2009-09-09 12:08:31.000000000 -0700
452@@ -7340,7 +7340,8 @@
453 return 0;
454
455 ix86_compute_frame_layout (&frame);
456- return frame.to_allocate == 0 && (frame.nregs + frame.nsseregs) == 0;
457+ return frame.to_allocate == 0 && frame.padding0 == 0
458+ && (frame.nregs + frame.nsseregs) == 0;
459 }
460
461
462 /* Value should be nonzero if functions must have frame pointers.
463@@ -8328,7 +8329,7 @@
464 && (! TARGET_STACK_PROBE || allocate < CHECK_STACK_LIMIT)))
465 {
466 if (!frame_pointer_needed
467- || !frame.to_allocate
468+ || !(frame.to_allocate + frame.padding0)
469 || crtl->stack_realign_needed)
470 ix86_emit_save_regs_using_mov (stack_pointer_rtx,
471 frame.to_allocate
472@@ -8338,7 +8339,7 @@
473 -frame.nregs * UNITS_PER_WORD);
474 }
475 if (!frame_pointer_needed
476- || !frame.to_allocate
477+ || !(frame.to_allocate + frame.padding0)
478 || crtl->stack_realign_needed)
479 ix86_emit_save_sse_regs_using_mov (stack_pointer_rtx,
480 frame.to_allocate);
481@@ -8524,8 +8525,10 @@
482 if ((!sp_valid && (frame.nregs + frame.nsseregs) <= 1)
483 || (TARGET_EPILOGUE_USING_MOVE
484 && cfun->machine->use_fast_prologue_epilogue
485- && ((frame.nregs + frame.nsseregs) > 1 || frame.to_allocate))
486- || (frame_pointer_needed && !(frame.nregs + frame.nsseregs) && frame.to_allocate)
487+ && ((frame.nregs + frame.nsseregs) > 1
488+ || (frame.to_allocate + frame.padding0) != 0))
489+ || (frame_pointer_needed && !(frame.nregs + frame.nsseregs)
490+ && (frame.to_allocate + frame.padding0) != 0)
491 || (frame_pointer_needed && TARGET_USE_LEAVE
492 && cfun->machine->use_fast_prologue_epilogue
493 && (frame.nregs + frame.nsseregs) == 1)
494@@ -8535,13 +8538,13 @@
495 locations. If both are available, default to ebp, since offsets
496 are known to be small. Only exception is esp pointing directly
497 to the end of block of saved registers, where we may simplify
498- addressing mode.
499+ addressing mode.
500
501 If we are realigning stack with bp and sp, regs restore can't
502 be addressed by bp. sp must be used instead. */
503
504 if (!frame_pointer_needed
505- || (sp_valid && !frame.to_allocate)
506+ || (sp_valid && !(frame.to_allocate + frame.padding0))
507 || stack_realign_fp)
508 {
509 ix86_emit_restore_sse_regs_using_mov (stack_pointer_rtx,
510@@ -8630,9 +8633,10 @@
511 ix86_emit_restore_sse_regs_using_mov (stack_pointer_rtx,
512 frame.to_allocate, style == 2);
513 pro_epilogue_adjust_stack (stack_pointer_rtx, stack_pointer_rtx,
514- GEN_INT (frame.nsseregs * 16), style);
515+ GEN_INT (frame.nsseregs * 16 +
516+ frame.padding0), style);
517 }
518- else if (frame.to_allocate || frame.nsseregs)
519+ else if (frame.to_allocate || frame.padding0 || frame.nsseregs)
520 {
521 ix86_emit_restore_sse_regs_using_mov (stack_pointer_rtx,
522 frame.to_allocate,
523@@ -12090,16 +12094,18 @@
524 output_387_ffreep (rtx *operands ATTRIBUTE_UNUSED, int opno)
525 {
526 if (TARGET_USE_FFREEP)
527-#if HAVE_AS_IX86_FFREEP
528+#ifdef HAVE_AS_IX86_FFREEP
529 return opno ? "ffreep\t%y1" : "ffreep\t%y0";
530 #else
531 {
532- static char retval[] = ".word\t0xc_df";
533+ static char retval[32];
534 int regno = REGNO (operands[opno]);
535
536 gcc_assert (FP_REGNO_P (regno));
537
538- retval[9] = '0' + (regno - FIRST_STACK_REG);
539+ regno -= FIRST_STACK_REG;
540+
541+ snprintf (retval, sizeof (retval), ASM_SHORT "0xc%ddf", regno);
542 return retval;
543 }
544 #endif
545@@ -16307,10 +16313,20 @@
546 /* When emitting push, take care for source operands on the stack. */
547 if (push && MEM_P (operands[1])
548 && reg_overlap_mentioned_p (stack_pointer_rtx, operands[1]))
549- for (i = 0; i < nparts - 1; i++)
550- part[1][i] = change_address (part[1][i],
551- GET_MODE (part[1][i]),
552- XEXP (part[1][i + 1], 0));
553+ {
554+ rtx src_base = XEXP (part[1][nparts - 1], 0);
555+
556+ /* Compensate for the stack decrement by 4. */
557+ if (!TARGET_64BIT && nparts == 3
558+ && mode == XFmode && TARGET_128BIT_LONG_DOUBLE)
559+ src_base = plus_constant (src_base, 4);
560+
561+ /* src_base refers to the stack pointer and is
562+ automatically decreased by emitted push. */
563+ for (i = 0; i < nparts; i++)
564+ part[1][i] = change_address (part[1][i],
565+ GET_MODE (part[1][i]), src_base);
566+ }
567
568 /* We need to do copy in the right order in case an address register
569 of the source overlaps the destination. */
570@@ -16380,7 +16396,8 @@
571 if (nparts == 3)
572 {
573 if (TARGET_128BIT_LONG_DOUBLE && mode == XFmode)
574- emit_insn (gen_addsi3 (stack_pointer_rtx, stack_pointer_rtx, GEN_INT (-4)));
575+ emit_insn (gen_addsi3 (stack_pointer_rtx,
576+ stack_pointer_rtx, GEN_INT (-4)));
577 emit_move_insn (part[0][2], part[1][2]);
578 }
579 else if (nparts == 4)
580@@ -25306,7 +25323,7 @@
581 static tree
582 ix86_vectorize_builtin_conversion (unsigned int code, tree type)
583 {
584- if (TREE_CODE (type) != VECTOR_TYPE
585+ if (!TARGET_SSE2 || TREE_CODE (type) != VECTOR_TYPE
586 /* There are only conversions from/to signed integers. */
587 || TYPE_UNSIGNED (TREE_TYPE (type)))
588 return NULL_TREE;
589diff -Naur gcc-4.4.1.orig/gcc/config/i386/i386.md gcc-4.4.1/gcc/config/i386/i386.md
590--- gcc-4.4.1.orig/gcc/config/i386/i386.md 2009-07-08 09:59:15.000000000 -0700
591+++ gcc-4.4.1/gcc/config/i386/i386.md 2009-08-23 05:47:57.000000000 -0700
592@@ -14973,22 +14973,25 @@
593 (match_operand:SI 1 "" ""))
594 (set (reg:SI SP_REG) (plus:SI (reg:SI SP_REG)
595 (match_operand:SI 2 "immediate_operand" "i")))]
596- "!TARGET_64BIT"
597+ "!SIBLING_CALL_P (insn) && !TARGET_64BIT"
598 {
599 if (constant_call_address_operand (operands[0], Pmode))
600- {
601- if (SIBLING_CALL_P (insn))
602- return "jmp\t%P0";
603- else
604- return "call\t%P0";
605- }
606- if (SIBLING_CALL_P (insn))
607- return "jmp\t%A0";
608- else
609- return "call\t%A0";
610+ return "call\t%P0";
611+ return "call\t%A0";
612 }
613 [(set_attr "type" "call")])
614
615+(define_insn "*sibcall_pop_1"
616+ [(call (mem:QI (match_operand:SI 0 "sibcall_insn_operand" "s,U"))
617+ (match_operand:SI 1 "" ""))
618+ (set (reg:SI SP_REG) (plus:SI (reg:SI SP_REG)
619+ (match_operand:SI 2 "immediate_operand" "i,i")))]
620+ "SIBLING_CALL_P (insn) && !TARGET_64BIT"
621+ "@
622+ jmp\t%P0
623+ jmp\t%A0"
624+ [(set_attr "type" "call")])
625+
626 (define_expand "call"
627 [(call (match_operand:QI 0 "" "")
628 (match_operand 1 "" ""))
629@@ -15920,7 +15923,7 @@
630 (unspec:DI [(match_operand:DI 1 "tls_symbolic_operand" "")]
631 UNSPEC_TLS_GD)]
632 "TARGET_64BIT"
633- ".byte\t0x66\;lea{q}\t{%a1@TLSGD(%%rip), %%rdi|rdi, %a1@TLSGD[rip]}\;.word\t0x6666\;rex64\;call\t%P2"
634+ { return ".byte\t0x66\n\tlea{q}\t{%a1@TLSGD(%%rip), %%rdi|rdi, %a1@TLSGD[rip]}\n" ASM_SHORT "0x6666\n\trex64\n\tcall\t%P2"; }
635 [(set_attr "type" "multi")
636 (set_attr "length" "16")])
637
638@@ -21469,22 +21472,26 @@
639 (match_operand:SI 2 "" "")))
640 (set (reg:SI SP_REG) (plus:SI (reg:SI SP_REG)
641 (match_operand:SI 3 "immediate_operand" "i")))]
642- "!TARGET_64BIT"
643+ "!SIBLING_CALL_P (insn) && !TARGET_64BIT"
644 {
645 if (constant_call_address_operand (operands[1], Pmode))
646- {
647- if (SIBLING_CALL_P (insn))
648- return "jmp\t%P1";
649- else
650- return "call\t%P1";
651- }
652- if (SIBLING_CALL_P (insn))
653- return "jmp\t%A1";
654- else
655- return "call\t%A1";
656+ return "call\t%P1";
657+ return "call\t%A1";
658 }
659 [(set_attr "type" "callv")])
660
661+(define_insn "*sibcall_value_pop_1"
662+ [(set (match_operand 0 "" "")
663+ (call (mem:QI (match_operand:SI 1 "sibcall_insn_operand" "s,U"))
664+ (match_operand:SI 2 "" "")))
665+ (set (reg:SI SP_REG) (plus:SI (reg:SI SP_REG)
666+ (match_operand:SI 3 "immediate_operand" "i,i")))]
667+ "SIBLING_CALL_P (insn) && !TARGET_64BIT"
668+ "@
669+ jmp\t%P1
670+ jmp\t%A1"
671+ [(set_attr "type" "callv")])
672+
673 (define_insn "*call_value_0"
674 [(set (match_operand 0 "" "")
675 (call (mem:QI (match_operand:SI 1 "constant_call_address_operand" ""))
676diff -Naur gcc-4.4.1.orig/gcc/config/i386/netware.c gcc-4.4.1/gcc/config/i386/netware.c
677--- gcc-4.4.1.orig/gcc/config/i386/netware.c 2008-07-01 23:43:45.000000000 -0700
678+++ gcc-4.4.1/gcc/config/i386/netware.c 2009-08-28 08:40:31.000000000 -0700
679@@ -30,6 +30,7 @@
680 #include "flags.h"
681 #include "tm_p.h"
682 #include "toplev.h"
683+#include "langhooks.h"
684 #include "ggc.h"
685
686 /* Return string which is the function name, identified by ID, modified
687@@ -179,16 +180,15 @@
688 {
689 default_encode_section_info (decl, rtl, first);
690
691- if (first
692- && TREE_CODE (decl) == FUNCTION_DECL
693+ if (TREE_CODE (decl) == FUNCTION_DECL
694 /* Do not change the identifier if a verbatim asmspec
695 or if stdcall suffix already added. */
696 && *IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl)) != '*'
697- && !strchr (IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl)), '@'))
698+ && !strchr (IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl)), '@')
699+ /* FIXME: Imported stdcall names are not modified by the Ada frontend.
700+ Check and decorate the RTL name now. */
701+ && strcmp (lang_hooks.name, "GNU Ada") == 0)
702 {
703- /* FIXME: In Ada, and perhaps other language frontends,
704- imported stdcall names may not yet have been modified.
705- Check and do it know. */
706 rtx symbol = XEXP (rtl, 0);
707 tree new_id;
708 tree old_id = DECL_ASSEMBLER_NAME (decl);
709@@ -196,14 +196,7 @@
710 gcc_assert (GET_CODE (symbol) == SYMBOL_REF);
711
712 if ((new_id = i386_nlm_maybe_mangle_decl_assembler_name (decl, old_id)))
713- {
714- /* These attributes must be present on first declaration,
715- change_decl_assembler_name will warn if they are added
716- later and the decl has been referenced, but duplicate_decls
717- should catch the mismatch first. */
718- change_decl_assembler_name (decl, new_id);
719- XSTR (symbol, 0) = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl));
720- }
721+ XSTR (symbol, 0) = IDENTIFIER_POINTER (new_id);
722 }
723 }
724
725@@ -233,24 +226,3 @@
726 }
727 return name;
728 }
729-
730-/* Sometimes certain combinations of command options do not make
731- sense on a particular target machine. You can define a macro
732- `OVERRIDE_OPTIONS' to take account of this. This macro, if
733- defined, is executed once just after all the command options have
734- been parsed.
735-
736- Don't use this macro to turn on various extra optimizations for
737- `-O'. That is what `OPTIMIZATION_OPTIONS' is for. */
738-
739-void
740-netware_override_options (void)
741-{
742- override_options ();
743-
744- if (flag_pic)
745- {
746- error ("-fPIC and -fpic are not supported for this target");
747- flag_pic = 0;
748- }
749-}
750diff -Naur gcc-4.4.1.orig/gcc/config/i386/netware.h gcc-4.4.1/gcc/config/i386/netware.h
751--- gcc-4.4.1.orig/gcc/config/i386/netware.h 2009-02-20 07:20:38.000000000 -0800
752+++ gcc-4.4.1/gcc/config/i386/netware.h 2009-08-28 08:40:31.000000000 -0700
753@@ -72,17 +72,16 @@
754 #define TARGET_SUBTARGET_DEFAULT (MASK_80387 | MASK_IEEE_FP | \
755 MASK_FLOAT_RETURNS | MASK_ALIGN_DOUBLE | MASK_MS_BITFIELD_LAYOUT)
756
757-/* Sometimes certain combinations of command options do not make
758- sense on a particular target machine. You can define a macro
759- `OVERRIDE_OPTIONS' to take account of this. This macro, if
760- defined, is executed once just after all the command options have
761- been parsed.
762-
763- Don't use this macro to turn on various extra optimizations for
764- `-O'. That is what `OPTIMIZATION_OPTIONS' is for. */
765-#undef OVERRIDE_OPTIONS
766-extern void netware_override_options (void);
767-#define OVERRIDE_OPTIONS netware_override_options ()
768+/* Don't allow flag_pic to propagate since invalid relocations will
769+ result otherwise. */
770+#define SUBTARGET_OVERRIDE_OPTIONS \
771+do { \
772+ if (flag_pic) \
773+ { \
774+ error ("-fPIC and -fpic are not supported for this target"); \
775+ flag_pic = 0; \
776+ } \
777+} while (0)
778
779 #undef MATH_LIBRARY
780 #define MATH_LIBRARY ""
781@@ -99,6 +98,9 @@
782 #undef KEEP_AGGREGATE_RETURN_POINTER
783 #define KEEP_AGGREGATE_RETURN_POINTER 1
784
785+#undef ASM_COMMENT_START
786+#define ASM_COMMENT_START "#"
787+
788 #undef DBX_REGISTER_NUMBER
789 #define DBX_REGISTER_NUMBER(n) (svr4_dbx_register_map[n])
790
791diff -Naur gcc-4.4.1.orig/gcc/config/i386/nwld.h gcc-4.4.1/gcc/config/i386/nwld.h
792--- gcc-4.4.1.orig/gcc/config/i386/nwld.h 2007-08-02 03:49:31.000000000 -0700
793+++ gcc-4.4.1/gcc/config/i386/nwld.h 2009-08-28 08:40:31.000000000 -0700
794@@ -55,6 +55,13 @@
795 #define TARGET_ASM_CONSTRUCTOR nwld_named_section_asm_out_constructor
796 #define TARGET_ASM_DESTRUCTOR nwld_named_section_asm_out_destructor
797
798+#define SUBSUBTARGET_OVERRIDE_OPTIONS \
799+do { \
800+ /* XXX This can be enabled once gas output meets nwld's needs. */ \
801+ /* if (!flag_unwind_tables && !flag_exceptions) */ \
802+ flag_dwarf2_cfi_asm = 0; \
803+} while (0)
804+
805 #undef EH_FRAME_SECTION_NAME
806 #define EH_FRAME_SECTION_NAME ".eh_frame"TARGET_SUB_SECTION_SEPARATOR
807
808diff -Naur gcc-4.4.1.orig/gcc/config/i386/sse.md gcc-4.4.1/gcc/config/i386/sse.md
809--- gcc-4.4.1.orig/gcc/config/i386/sse.md 2009-05-06 06:20:41.000000000 -0700
810+++ gcc-4.4.1/gcc/config/i386/sse.md 2009-08-16 12:34:49.000000000 -0700
811@@ -64,6 +64,10 @@
812 (define_mode_iterator SSEMODE4S [V4SF V4SI])
813 (define_mode_iterator SSEMODE2D [V2DF V2DI])
814
815+;; Modes handled by integer vcond pattern
816+(define_mode_iterator SSEMODE124C8 [V16QI V8HI V4SI
817+ (V2DI "TARGET_SSE4_2 || TARGET_SSE5")])
818+
819 ;; Mapping from float mode to required SSE level
820 (define_mode_attr sse [(SF "sse") (DF "sse2") (V4SF "sse") (V2DF "sse2")])
821
822@@ -1493,10 +1497,9 @@
823 (match_operand:SSEMODEF2P 2 "general_operand" "")))]
824 "SSE_VEC_FLOAT_MODE_P (<MODE>mode)"
825 {
826- if (ix86_expand_fp_vcond (operands))
827- DONE;
828- else
829- FAIL;
830+ bool ok = ix86_expand_fp_vcond (operands);
831+ gcc_assert (ok);
832+ DONE;
833 })
834
835 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
836@@ -5837,35 +5840,33 @@
837 (set_attr "mode" "TI")])
838
839 (define_expand "vcond<mode>"
840- [(set (match_operand:SSEMODEI 0 "register_operand" "")
841- (if_then_else:SSEMODEI
842+ [(set (match_operand:SSEMODE124C8 0 "register_operand" "")
843+ (if_then_else:SSEMODE124C8
844 (match_operator 3 ""
845- [(match_operand:SSEMODEI 4 "nonimmediate_operand" "")
846- (match_operand:SSEMODEI 5 "nonimmediate_operand" "")])
847- (match_operand:SSEMODEI 1 "general_operand" "")
848- (match_operand:SSEMODEI 2 "general_operand" "")))]
849+ [(match_operand:SSEMODE124C8 4 "nonimmediate_operand" "")
850+ (match_operand:SSEMODE124C8 5 "nonimmediate_operand" "")])
851+ (match_operand:SSEMODE124C8 1 "general_operand" "")
852+ (match_operand:SSEMODE124C8 2 "general_operand" "")))]
853 "TARGET_SSE2"
854 {
855- if (ix86_expand_int_vcond (operands))
856- DONE;
857- else
858- FAIL;
859+ bool ok = ix86_expand_int_vcond (operands);
860+ gcc_assert (ok);
861+ DONE;
862 })
863
864 (define_expand "vcondu<mode>"
865- [(set (match_operand:SSEMODEI 0 "register_operand" "")
866- (if_then_else:SSEMODEI
867+ [(set (match_operand:SSEMODE124C8 0 "register_operand" "")
868+ (if_then_else:SSEMODE124C8
869 (match_operator 3 ""
870- [(match_operand:SSEMODEI 4 "nonimmediate_operand" "")
871- (match_operand:SSEMODEI 5 "nonimmediate_operand" "")])
872- (match_operand:SSEMODEI 1 "general_operand" "")
873- (match_operand:SSEMODEI 2 "general_operand" "")))]
874+ [(match_operand:SSEMODE124C8 4 "nonimmediate_operand" "")
875+ (match_operand:SSEMODE124C8 5 "nonimmediate_operand" "")])
876+ (match_operand:SSEMODE124C8 1 "general_operand" "")
877+ (match_operand:SSEMODE124C8 2 "general_operand" "")))]
878 "TARGET_SSE2"
879 {
880- if (ix86_expand_int_vcond (operands))
881- DONE;
882- else
883- FAIL;
884+ bool ok = ix86_expand_int_vcond (operands);
885+ gcc_assert (ok);
886+ DONE;
887 })
888
889 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
890diff -Naur gcc-4.4.1.orig/gcc/config/pa/pa.c gcc-4.4.1/gcc/config/pa/pa.c
891--- gcc-4.4.1.orig/gcc/config/pa/pa.c 2009-02-20 07:20:38.000000000 -0800
892+++ gcc-4.4.1/gcc/config/pa/pa.c 2009-07-27 08:26:05.000000000 -0700
893@@ -2217,9 +2217,9 @@
894 else
895 {
896 /* Find the width of the bitstring in IMM. */
897- for (len = 5; len < 32; len++)
898+ for (len = 5; len < 32 - lsb; len++)
899 {
900- if ((imm & (1 << len)) == 0)
901+ if ((imm & ((unsigned HOST_WIDE_INT) 1 << len)) == 0)
902 break;
903 }
904
905@@ -2238,10 +2238,12 @@
906 void
907 compute_zdepdi_operands (unsigned HOST_WIDE_INT imm, unsigned *op)
908 {
909- HOST_WIDE_INT lsb, len;
910+ int lsb, len, maxlen;
911+
912+ maxlen = MIN (HOST_BITS_PER_WIDE_INT, 64);
913
914 /* Find the least significant set bit in IMM. */
915- for (lsb = 0; lsb < HOST_BITS_PER_WIDE_INT; lsb++)
916+ for (lsb = 0; lsb < maxlen; lsb++)
917 {
918 if ((imm & 1) != 0)
919 break;
920@@ -2250,17 +2252,20 @@
921
922 /* Choose variants based on *sign* of the 5-bit field. */
923 if ((imm & 0x10) == 0)
924- len = ((lsb <= HOST_BITS_PER_WIDE_INT - 4)
925- ? 4 : HOST_BITS_PER_WIDE_INT - lsb);
926+ len = (lsb <= maxlen - 4) ? 4 : maxlen - lsb;
927 else
928 {
929 /* Find the width of the bitstring in IMM. */
930- for (len = 5; len < HOST_BITS_PER_WIDE_INT; len++)
931+ for (len = 5; len < maxlen - lsb; len++)
932 {
933 if ((imm & ((unsigned HOST_WIDE_INT) 1 << len)) == 0)
934 break;
935 }
936
937+ /* Extend length if host is narrow and IMM is negative. */
938+ if (HOST_BITS_PER_WIDE_INT == 32 && len == maxlen - lsb)
939+ len += 32;
940+
941 /* Sign extend IMM as a 5-bit value. */
942 imm = (imm & 0xf) - 0x10;
943 }
944diff -Naur gcc-4.4.1.orig/gcc/config/rs6000/freebsd.h gcc-4.4.1/gcc/config/rs6000/freebsd.h
945--- gcc-4.4.1.orig/gcc/config/rs6000/freebsd.h 2007-08-02 03:49:31.000000000 -0700
946+++ gcc-4.4.1/gcc/config/rs6000/freebsd.h 2009-08-10 11:22:22.000000000 -0700
947@@ -1,5 +1,5 @@
948 /* Definitions for PowerPC running FreeBSD using the ELF format
949- Copyright (C) 2001, 2003, 2007 Free Software Foundation, Inc.
950+ Copyright (C) 2001, 2003, 2007, 2009 Free Software Foundation, Inc.
951 Contributed by David E. O'Brien <obrien@FreeBSD.org> and BSDi.
952
953 This file is part of GCC.
954@@ -69,3 +69,6 @@
955 /* Override rs6000.h definition. */
956 #undef ASM_APP_OFF
957 #define ASM_APP_OFF "#NO_APP\n"
958+/* Define SVR4_ASM_SPEC, we use GAS by default. See svr4.h for details. */
959+#define SVR4_ASM_SPEC \
960+ "%{v:-V} %{Wa,*:%*}"
961diff -Naur gcc-4.4.1.orig/gcc/config/rs6000/rs6000.c gcc-4.4.1/gcc/config/rs6000/rs6000.c
962--- gcc-4.4.1.orig/gcc/config/rs6000/rs6000.c 2009-03-17 13:18:21.000000000 -0700
963+++ gcc-4.4.1/gcc/config/rs6000/rs6000.c 2009-08-18 04:43:16.000000000 -0700
964@@ -3808,6 +3808,8 @@
965 rs6000_legitimize_address (rtx x, rtx oldx ATTRIBUTE_UNUSED,
966 enum machine_mode mode)
967 {
968+ unsigned int extra = 0;
969+
970 if (GET_CODE (x) == SYMBOL_REF)
971 {
972 enum tls_model model = SYMBOL_REF_TLS_MODEL (x);
973@@ -3815,10 +3817,32 @@
974 return rs6000_legitimize_tls_address (x, model);
975 }
976
977+ switch (mode)
978+ {
979+ case DFmode:
980+ case DDmode:
981+ extra = 4;
982+ break;
983+ case DImode:
984+ if (!TARGET_POWERPC64)
985+ extra = 4;
986+ break;
987+ case TFmode:
988+ case TDmode:
989+ extra = 12;
990+ break;
991+ case TImode:
992+ extra = TARGET_POWERPC64 ? 8 : 12;
993+ break;
994+ default:
995+ break;
996+ }
997+
998 if (GET_CODE (x) == PLUS
999 && GET_CODE (XEXP (x, 0)) == REG
1000 && GET_CODE (XEXP (x, 1)) == CONST_INT
1001- && (unsigned HOST_WIDE_INT) (INTVAL (XEXP (x, 1)) + 0x8000) >= 0x10000
1002+ && ((unsigned HOST_WIDE_INT) (INTVAL (XEXP (x, 1)) + 0x8000)
1003+ >= 0x10000 - extra)
1004 && !((TARGET_POWERPC64
1005 && (mode == DImode || mode == TImode)
1006 && (INTVAL (XEXP (x, 1)) & 3) != 0)
1007@@ -3831,10 +3855,12 @@
1008 HOST_WIDE_INT high_int, low_int;
1009 rtx sum;
1010 low_int = ((INTVAL (XEXP (x, 1)) & 0xffff) ^ 0x8000) - 0x8000;
1011+ if (low_int >= 0x8000 - extra)
1012+ low_int = 0;
1013 high_int = INTVAL (XEXP (x, 1)) - low_int;
1014 sum = force_operand (gen_rtx_PLUS (Pmode, XEXP (x, 0),
1015 GEN_INT (high_int)), 0);
1016- return gen_rtx_PLUS (Pmode, sum, GEN_INT (low_int));
1017+ return plus_constant (sum, low_int);
1018 }
1019 else if (GET_CODE (x) == PLUS
1020 && GET_CODE (XEXP (x, 0)) == REG
1021diff -Naur gcc-4.4.1.orig/gcc/config/s390/2084.md gcc-4.4.1/gcc/config/s390/2084.md
1022--- gcc-4.4.1.orig/gcc/config/s390/2084.md 2009-02-20 07:20:38.000000000 -0800
1023+++ gcc-4.4.1/gcc/config/s390/2084.md 2009-09-04 03:05:45.000000000 -0700
1024@@ -163,17 +163,17 @@
1025
1026 (define_insn_reservation "x_fsimptf" 7
1027 (and (eq_attr "cpu" "z990,z9_109")
1028- (eq_attr "type" "fsimptf"))
1029+ (eq_attr "type" "fsimptf,fhex"))
1030 "x_e1_t*2,x-wr-fp")
1031
1032 (define_insn_reservation "x_fsimpdf" 6
1033 (and (eq_attr "cpu" "z990,z9_109")
1034- (eq_attr "type" "fsimpdf,fmuldf"))
1035+ (eq_attr "type" "fsimpdf,fmuldf,fhex"))
1036 "x_e1_t,x-wr-fp")
1037
1038 (define_insn_reservation "x_fsimpsf" 6
1039 (and (eq_attr "cpu" "z990,z9_109")
1040- (eq_attr "type" "fsimpsf,fmulsf"))
1041+ (eq_attr "type" "fsimpsf,fmulsf,fhex"))
1042 "x_e1_t,x-wr-fp")
1043
1044
1045diff -Naur gcc-4.4.1.orig/gcc/config/s390/2097.md gcc-4.4.1/gcc/config/s390/2097.md
1046--- gcc-4.4.1.orig/gcc/config/s390/2097.md 2008-08-15 00:36:40.000000000 -0700
1047+++ gcc-4.4.1/gcc/config/s390/2097.md 2009-09-04 03:05:45.000000000 -0700
1048@@ -463,29 +463,34 @@
1049
1050 ; BFP multiplication and general instructions
1051
1052-(define_insn_reservation "z10_fsimpdf" 12
1053+(define_insn_reservation "z10_fsimpdf" 6
1054 (and (eq_attr "cpu" "z10")
1055 (eq_attr "type" "fsimpdf,fmuldf"))
1056 "z10_e1_BOTH, z10_Gate_FP")
1057-; Wg "z10_e1_T, z10_Gate_FP")
1058
1059-(define_insn_reservation "z10_fsimpsf" 12
1060+; LOAD ZERO produces a hex value but we need bin. Using the stage 7
1061+; bypass causes an exception for format conversion which is very
1062+; expensive. So, make sure subsequent instructions only get the zero
1063+; in the normal way.
1064+(define_insn_reservation "z10_fhex" 12
1065+ (and (eq_attr "cpu" "z10")
1066+ (eq_attr "type" "fhex"))
1067+ "z10_e1_BOTH, z10_Gate_FP")
1068+
1069+(define_insn_reservation "z10_fsimpsf" 6
1070 (and (eq_attr "cpu" "z10")
1071 (eq_attr "type" "fsimpsf,fmulsf"))
1072 "z10_e1_BOTH, z10_Gate_FP")
1073-; Wg "z10_e1_T, z10_Gate_FP")
1074
1075 (define_insn_reservation "z10_fmultf" 52
1076 (and (eq_attr "cpu" "z10")
1077 (eq_attr "type" "fmultf"))
1078 "z10_e1_BOTH*4, z10_Gate_FP")
1079-; Wg "z10_e1_T*4, z10_Gate_FP")
1080
1081 (define_insn_reservation "z10_fsimptf" 14
1082 (and (eq_attr "cpu" "z10")
1083 (eq_attr "type" "fsimptf"))
1084 "z10_e1_BOTH*2, z10_Gate_FP")
1085-; Wg "z10_e1_T*2, z10_Gate_FP")
1086
1087
1088 ; BFP division
1089@@ -531,12 +536,12 @@
1090 (eq_attr "type" "floadtf"))
1091 "z10_e1_T, z10_Gate_FP")
1092
1093-(define_insn_reservation "z10_floaddf" 12
1094+(define_insn_reservation "z10_floaddf" 1
1095 (and (eq_attr "cpu" "z10")
1096 (eq_attr "type" "floaddf"))
1097 "z10_e1_T, z10_Gate_FP")
1098
1099-(define_insn_reservation "z10_floadsf" 12
1100+(define_insn_reservation "z10_floadsf" 1
1101 (and (eq_attr "cpu" "z10")
1102 (eq_attr "type" "floadsf"))
1103 "z10_e1_T, z10_Gate_FP")
1104@@ -553,12 +558,12 @@
1105
1106
1107 ; BFP truncate
1108-(define_insn_reservation "z10_ftrunctf" 12
1109+(define_insn_reservation "z10_ftrunctf" 16
1110 (and (eq_attr "cpu" "z10")
1111 (eq_attr "type" "ftrunctf"))
1112 "z10_e1_T, z10_Gate_FP")
1113
1114-(define_insn_reservation "z10_ftruncdf" 16
1115+(define_insn_reservation "z10_ftruncdf" 12
1116 (and (eq_attr "cpu" "z10")
1117 (eq_attr "type" "ftruncdf"))
1118 "z10_e1_T, z10_Gate_FP")
1119@@ -585,8 +590,8 @@
1120 ; BFP-related bypasses. There is no bypass for extended mode.
1121 (define_bypass 1 "z10_fsimpdf" "z10_fstoredf")
1122 (define_bypass 1 "z10_fsimpsf" "z10_fstoresf")
1123-(define_bypass 1 "z10_floaddf" "z10_fsimpdf, z10_fstoredf, z10_floaddf")
1124-(define_bypass 1 "z10_floadsf" "z10_fsimpsf, z10_fstoresf, z10_floadsf")
1125+(define_bypass 1 "z10_floaddf" "z10_fsimpdf, z10_fstoredf")
1126+(define_bypass 1 "z10_floadsf" "z10_fsimpsf, z10_fstoresf")
1127
1128
1129 ;
1130diff -Naur gcc-4.4.1.orig/gcc/config/s390/constraints.md gcc-4.4.1/gcc/config/s390/constraints.md
1131--- gcc-4.4.1.orig/gcc/config/s390/constraints.md 2009-04-24 07:51:17.000000000 -0700
1132+++ gcc-4.4.1/gcc/config/s390/constraints.md 2009-07-30 05:32:19.000000000 -0700
1133@@ -66,9 +66,14 @@
1134 ;; B -- Multiple letter constraint followed by Q, R, S, or T:
1135 ;; Memory reference of the type specified by second letter that
1136 ;; does *not* refer to a literal pool entry.
1137-;; U -- Pointer with short displacement.
1138-;; W -- Pointer with long displacement.
1139+;; U -- Pointer with short displacement. (deprecated - use ZQZR)
1140+;; W -- Pointer with long displacement. (deprecated - use ZSZT)
1141 ;; Y -- Shift count operand.
1142+;; ZQ -- Pointer without index register and with short displacement.
1143+;; ZR -- Pointer with index register and short displacement.
1144+;; ZS -- Pointer without index register but with long displacement.
1145+;; ZT -- Pointer with index register and long displacement.
1146+;;
1147 ;;
1148
1149
1150@@ -462,11 +467,26 @@
1151
1152
1153 (define_address_constraint "U"
1154- "Pointer with short displacement"
1155+ "Pointer with short displacement. (deprecated - use ZQZR)"
1156 (match_test "s390_mem_constraint (\"U\", op)"))
1157
1158-
1159-
1160 (define_address_constraint "W"
1161- "Pointer with long displacement"
1162+ "Pointer with long displacement. (deprecated - use ZSZT)"
1163 (match_test "s390_mem_constraint (\"W\", op)"))
1164+
1165+
1166+(define_address_constraint "ZQ"
1167+ "Pointer without index register and with short displacement."
1168+ (match_test "s390_mem_constraint (\"ZQ\", op)"))
1169+
1170+(define_address_constraint "ZR"
1171+ "Pointer with index register and short displacement."
1172+ (match_test "s390_mem_constraint (\"ZR\", op)"))
1173+
1174+(define_address_constraint "ZS"
1175+ "Pointer without index register but with long displacement."
1176+ (match_test "s390_mem_constraint (\"ZS\", op)"))
1177+
1178+(define_address_constraint "ZT"
1179+ "Pointer with index register and long displacement."
1180+ (match_test "s390_mem_constraint (\"ZT\", op)"))
1181diff -Naur gcc-4.4.1.orig/gcc/config/s390/s390.c gcc-4.4.1/gcc/config/s390/s390.c
1182--- gcc-4.4.1.orig/gcc/config/s390/s390.c 2009-02-27 06:56:19.000000000 -0800
1183+++ gcc-4.4.1/gcc/config/s390/s390.c 2009-09-04 03:05:45.000000000 -0700
1184@@ -52,6 +52,7 @@
1185 #include "optabs.h"
1186 #include "gimple.h"
1187 #include "df.h"
1188+#include "params.h"
1189
1190
1191 /* Define the specific costs for a given cpu. */
1192@@ -204,13 +205,13 @@
1193 COSTS_N_INSNS (10), /* MSGFR */
1194 COSTS_N_INSNS (10), /* MSGR */
1195 COSTS_N_INSNS (10), /* MSR */
1196- COSTS_N_INSNS (10), /* multiplication in DFmode */
1197+ COSTS_N_INSNS (1) , /* multiplication in DFmode */
1198 COSTS_N_INSNS (50), /* MXBR */
1199 COSTS_N_INSNS (120), /* SQXBR */
1200 COSTS_N_INSNS (52), /* SQDBR */
1201 COSTS_N_INSNS (38), /* SQEBR */
1202- COSTS_N_INSNS (10), /* MADBR */
1203- COSTS_N_INSNS (10), /* MAEBR */
1204+ COSTS_N_INSNS (1), /* MADBR */
1205+ COSTS_N_INSNS (1), /* MAEBR */
1206 COSTS_N_INSNS (111), /* DXBR */
1207 COSTS_N_INSNS (39), /* DDBR */
1208 COSTS_N_INSNS (32), /* DEBR */
1209@@ -352,6 +353,10 @@
1210 #define REGNO_PAIR_OK(REGNO, MODE) \
1211 (HARD_REGNO_NREGS ((REGNO), (MODE)) == 1 || !((REGNO) & 1))
1212
1213+/* That's the read ahead of the dynamic branch prediction unit in
1214+ bytes on a z10 CPU. */
1215+#define Z10_PREDICT_DISTANCE 384
1216+
1217 static enum machine_mode
1218 s390_libgcc_cmp_return_mode (void)
1219 {
1220@@ -1641,6 +1646,10 @@
1221 if (!(target_flags_explicit & MASK_LONG_DOUBLE_128))
1222 target_flags |= MASK_LONG_DOUBLE_128;
1223 #endif
1224+
1225+ if (s390_tune == PROCESSOR_2097_Z10
1226+ && !PARAM_SET_P (PARAM_MAX_UNROLLED_INSNS))
1227+ set_param_value ("max-unrolled-insns", 100);
1228 }
1229
1230 /* Map for smallest class containing reg regno. */
1231@@ -1678,6 +1687,11 @@
1232 if (!disp)
1233 return true;
1234
1235+ /* Without the long displacement facility we don't need to
1236+ distingiush between long and short displacement. */
1237+ if (!TARGET_LONG_DISPLACEMENT)
1238+ return true;
1239+
1240 /* Integer displacement in range. */
1241 if (GET_CODE (disp) == CONST_INT)
1242 return INTVAL (disp) >= 0 && INTVAL (disp) < 4096;
1243@@ -2046,79 +2060,93 @@
1244 }
1245
1246
1247-/* Evaluates constraint strings described by the regular expression
1248- ([A|B](Q|R|S|T))|U|W and returns 1 if OP is a valid operand for the
1249- constraint given in STR, or 0 else. */
1250+/* Return true if ADDR is of kind symbol_ref or symbol_ref + const_int
1251+ and return these parts in SYMREF and ADDEND. You can pass NULL in
1252+ SYMREF and/or ADDEND if you are not interested in these values. */
1253
1254-int
1255-s390_mem_constraint (const char *str, rtx op)
1256+static bool
1257+s390_symref_operand_p (rtx addr, rtx *symref, HOST_WIDE_INT *addend)
1258 {
1259- struct s390_address addr;
1260- char c = str[0];
1261+ HOST_WIDE_INT tmpaddend = 0;
1262
1263- /* Check for offsettable variants of memory constraints. */
1264- if (c == 'A')
1265+ if (GET_CODE (addr) == CONST)
1266+ addr = XEXP (addr, 0);
1267+
1268+ if (GET_CODE (addr) == PLUS)
1269 {
1270- /* Only accept non-volatile MEMs. */
1271- if (!MEM_P (op) || MEM_VOLATILE_P (op))
1272- return 0;
1273+ if (GET_CODE (XEXP (addr, 0)) == SYMBOL_REF
1274+ && CONST_INT_P (XEXP (addr, 1)))
1275+ {
1276+ tmpaddend = INTVAL (XEXP (addr, 1));
1277+ addr = XEXP (addr, 0);
1278+ }
1279+ else
1280+ return false;
1281+ }
1282+ else
1283+ if (GET_CODE (addr) != SYMBOL_REF)
1284+ return false;
1285
1286- if ((reload_completed || reload_in_progress)
1287- ? !offsettable_memref_p (op) : !offsettable_nonstrict_memref_p (op))
1288- return 0;
1289+ if (symref)
1290+ *symref = addr;
1291+ if (addend)
1292+ *addend = tmpaddend;
1293+
1294+ return true;
1295+}
1296
1297- c = str[1];
1298- }
1299
1300- /* Check for non-literal-pool variants of memory constraints. */
1301- else if (c == 'B')
1302+/* Return true if the address in OP is valid for constraint letter C
1303+ if wrapped in a MEM rtx. Set LIT_POOL_OK to true if it literal
1304+ pool MEMs should be accepted. Only the Q, R, S, T constraint
1305+ letters are allowed for C. */
1306+
1307+static int
1308+s390_check_qrst_address (char c, rtx op, bool lit_pool_ok)
1309+{
1310+ struct s390_address addr;
1311+ bool decomposed = false;
1312+
1313+ /* This check makes sure that no symbolic address (except literal
1314+ pool references) are accepted by the R or T constraints. */
1315+ if (s390_symref_operand_p (op, NULL, NULL))
1316 {
1317- if (GET_CODE (op) != MEM)
1318+ if (!lit_pool_ok)
1319 return 0;
1320- if (!s390_decompose_address (XEXP (op, 0), &addr))
1321+ if (!s390_decompose_address (op, &addr))
1322 return 0;
1323- if (addr.literal_pool)
1324+ if (!addr.literal_pool)
1325 return 0;
1326-
1327- c = str[1];
1328+ decomposed = true;
1329 }
1330
1331 switch (c)
1332 {
1333- case 'Q':
1334- if (GET_CODE (op) != MEM)
1335- return 0;
1336- if (!s390_decompose_address (XEXP (op, 0), &addr))
1337+ case 'Q': /* no index short displacement */
1338+ if (!decomposed && !s390_decompose_address (op, &addr))
1339 return 0;
1340 if (addr.indx)
1341 return 0;
1342-
1343- if (TARGET_LONG_DISPLACEMENT)
1344- {
1345- if (!s390_short_displacement (addr.disp))
1346- return 0;
1347- }
1348- break;
1349-
1350- case 'R':
1351- if (GET_CODE (op) != MEM)
1352+ if (!s390_short_displacement (addr.disp))
1353 return 0;
1354+ break;
1355
1356+ case 'R': /* with index short displacement */
1357 if (TARGET_LONG_DISPLACEMENT)
1358 {
1359- if (!s390_decompose_address (XEXP (op, 0), &addr))
1360+ if (!decomposed && !s390_decompose_address (op, &addr))
1361 return 0;
1362 if (!s390_short_displacement (addr.disp))
1363 return 0;
1364 }
1365+ /* Any invalid address here will be fixed up by reload,
1366+ so accept it for the most generic constraint. */
1367 break;
1368
1369- case 'S':
1370+ case 'S': /* no index long displacement */
1371 if (!TARGET_LONG_DISPLACEMENT)
1372 return 0;
1373- if (GET_CODE (op) != MEM)
1374- return 0;
1375- if (!s390_decompose_address (XEXP (op, 0), &addr))
1376+ if (!decomposed && !s390_decompose_address (op, &addr))
1377 return 0;
1378 if (addr.indx)
1379 return 0;
1380@@ -2126,52 +2154,74 @@
1381 return 0;
1382 break;
1383
1384- case 'T':
1385+ case 'T': /* with index long displacement */
1386 if (!TARGET_LONG_DISPLACEMENT)
1387 return 0;
1388- if (GET_CODE (op) != MEM)
1389- return 0;
1390- if (!s390_decompose_address (XEXP (op, 0), &addr))
1391- return 0;
1392- if (s390_short_displacement (addr.disp))
1393+ /* Any invalid address here will be fixed up by reload,
1394+ so accept it for the most generic constraint. */
1395+ if ((decomposed || s390_decompose_address (op, &addr))
1396+ && s390_short_displacement (addr.disp))
1397 return 0;
1398 break;
1399+ default:
1400+ return 0;
1401+ }
1402+ return 1;
1403+}
1404
1405- case 'U':
1406- if (TARGET_LONG_DISPLACEMENT)
1407- {
1408- if (!s390_decompose_address (op, &addr))
1409- return 0;
1410- if (!s390_short_displacement (addr.disp))
1411- return 0;
1412- }
1413- break;
1414
1415- case 'W':
1416- if (!TARGET_LONG_DISPLACEMENT)
1417+/* Evaluates constraint strings described by the regular expression
1418+ ([A|B|Z](Q|R|S|T))|U|W|Y and returns 1 if OP is a valid operand for
1419+ the constraint given in STR, or 0 else. */
1420+
1421+int
1422+s390_mem_constraint (const char *str, rtx op)
1423+{
1424+ char c = str[0];
1425+
1426+ switch (c)
1427+ {
1428+ case 'A':
1429+ /* Check for offsettable variants of memory constraints. */
1430+ if (!MEM_P (op) || MEM_VOLATILE_P (op))
1431 return 0;
1432- if (!s390_decompose_address (op, &addr))
1433+ if ((reload_completed || reload_in_progress)
1434+ ? !offsettable_memref_p (op) : !offsettable_nonstrict_memref_p (op))
1435 return 0;
1436- if (s390_short_displacement (addr.disp))
1437+ return s390_check_qrst_address (str[1], XEXP (op, 0), true);
1438+ case 'B':
1439+ /* Check for non-literal-pool variants of memory constraints. */
1440+ if (!MEM_P (op))
1441 return 0;
1442- break;
1443-
1444+ return s390_check_qrst_address (str[1], XEXP (op, 0), false);
1445+ case 'Q':
1446+ case 'R':
1447+ case 'S':
1448+ case 'T':
1449+ if (GET_CODE (op) != MEM)
1450+ return 0;
1451+ return s390_check_qrst_address (c, XEXP (op, 0), true);
1452+ case 'U':
1453+ return (s390_check_qrst_address ('Q', op, true)
1454+ || s390_check_qrst_address ('R', op, true));
1455+ case 'W':
1456+ return (s390_check_qrst_address ('S', op, true)
1457+ || s390_check_qrst_address ('T', op, true));
1458 case 'Y':
1459 /* Simply check for the basic form of a shift count. Reload will
1460 take care of making sure we have a proper base register. */
1461 if (!s390_decompose_shift_count (op, NULL, NULL))
1462 return 0;
1463 break;
1464-
1465+ case 'Z':
1466+ return s390_check_qrst_address (str[1], op, true);
1467 default:
1468 return 0;
1469 }
1470-
1471 return 1;
1472 }
1473
1474
1475-
1476 /* Evaluates constraint strings starting with letter O. Input
1477 parameter C is the second letter following the "O" in the constraint
1478 string. Returns 1 if VALUE meets the respective constraint and 0
1479@@ -2789,41 +2839,6 @@
1480 return rclass;
1481 }
1482
1483-/* Return true if ADDR is of kind symbol_ref or symbol_ref + const_int
1484- and return these parts in SYMREF and ADDEND. You can pass NULL in
1485- SYMREF and/or ADDEND if you are not interested in these values. */
1486-
1487-static bool
1488-s390_symref_operand_p (rtx addr, rtx *symref, HOST_WIDE_INT *addend)
1489-{
1490- HOST_WIDE_INT tmpaddend = 0;
1491-
1492- if (GET_CODE (addr) == CONST)
1493- addr = XEXP (addr, 0);
1494-
1495- if (GET_CODE (addr) == PLUS)
1496- {
1497- if (GET_CODE (XEXP (addr, 0)) == SYMBOL_REF
1498- && CONST_INT_P (XEXP (addr, 1)))
1499- {
1500- tmpaddend = INTVAL (XEXP (addr, 1));
1501- addr = XEXP (addr, 0);
1502- }
1503- else
1504- return false;
1505- }
1506- else
1507- if (GET_CODE (addr) != SYMBOL_REF)
1508- return false;
1509-
1510- if (symref)
1511- *symref = addr;
1512- if (addend)
1513- *addend = tmpaddend;
1514-
1515- return true;
1516-}
1517-
1518 /* Return true if ADDR is SYMBOL_REF + addend with addend being a
1519 multiple of ALIGNMENT and the SYMBOL_REF being naturally
1520 aligned. */
1521@@ -5276,6 +5291,7 @@
1522 A STD instruction should be scheduled earlier,
1523 in order to use the bypass. */
1524
1525+
1526 static int
1527 s390_adjust_priority (rtx insn ATTRIBUTE_UNUSED, int priority)
1528 {
1529@@ -5283,7 +5299,8 @@
1530 return priority;
1531
1532 if (s390_tune != PROCESSOR_2084_Z990
1533- && s390_tune != PROCESSOR_2094_Z9_109)
1534+ && s390_tune != PROCESSOR_2094_Z9_109
1535+ && s390_tune != PROCESSOR_2097_Z10)
1536 return priority;
1537
1538 switch (s390_safe_attr_type (insn))
1539@@ -5302,6 +5319,7 @@
1540 return priority;
1541 }
1542
1543+
1544 /* The number of instructions that can be issued per cycle. */
1545
1546 static int
1547@@ -9589,6 +9607,66 @@
1548 }
1549 }
1550
1551+/* On z10 the dynamic branch prediction must see the backward jump in
1552+ a window of 384 bytes. If not it falls back to the static
1553+ prediction. This function rearranges the loop backward branch in a
1554+ way which makes the static prediction always correct. The function
1555+ returns true if it added an instruction. */
1556+static bool
1557+s390_z10_fix_long_loop_prediction (rtx insn)
1558+{
1559+ rtx set = single_set (insn);
1560+ rtx code_label, label_ref, new_label;
1561+ rtx uncond_jump;
1562+ rtx cur_insn;
1563+ rtx tmp;
1564+ int distance;
1565+
1566+ /* This will exclude branch on count and branch on index patterns
1567+ since these are correctly statically predicted. */
1568+ if (!set
1569+ || SET_DEST (set) != pc_rtx
1570+ || GET_CODE (SET_SRC(set)) != IF_THEN_ELSE)
1571+ return false;
1572+
1573+ label_ref = (GET_CODE (XEXP (SET_SRC (set), 1)) == LABEL_REF ?
1574+ XEXP (SET_SRC (set), 1) : XEXP (SET_SRC (set), 2));
1575+
1576+ gcc_assert (GET_CODE (label_ref) == LABEL_REF);
1577+
1578+ code_label = XEXP (label_ref, 0);
1579+
1580+ if (INSN_ADDRESSES (INSN_UID (code_label)) == -1
1581+ || INSN_ADDRESSES (INSN_UID (insn)) == -1
1582+ || (INSN_ADDRESSES (INSN_UID (insn))
1583+ - INSN_ADDRESSES (INSN_UID (code_label)) < Z10_PREDICT_DISTANCE))
1584+ return false;
1585+
1586+ for (distance = 0, cur_insn = PREV_INSN (insn);
1587+ distance < Z10_PREDICT_DISTANCE - 6;
1588+ distance += get_attr_length (cur_insn), cur_insn = PREV_INSN (cur_insn))
1589+ if (!cur_insn || JUMP_P (cur_insn) || LABEL_P (cur_insn))
1590+ return false;
1591+
1592+ new_label = gen_label_rtx ();
1593+ uncond_jump = emit_jump_insn_after (
1594+ gen_rtx_SET (VOIDmode, pc_rtx,
1595+ gen_rtx_LABEL_REF (VOIDmode, code_label)),
1596+ insn);
1597+ emit_label_after (new_label, uncond_jump);
1598+
1599+ tmp = XEXP (SET_SRC (set), 1);
1600+ XEXP (SET_SRC (set), 1) = XEXP (SET_SRC (set), 2);
1601+ XEXP (SET_SRC (set), 2) = tmp;
1602+ INSN_CODE (insn) = -1;
1603+
1604+ XEXP (label_ref, 0) = new_label;
1605+ JUMP_LABEL (insn) = new_label;
1606+ JUMP_LABEL (uncond_jump) = code_label;
1607+
1608+ return true;
1609+}
1610+
1611 /* Returns 1 if INSN reads the value of REG for purposes not related
1612 to addressing of memory, and 0 otherwise. */
1613 static int
1614@@ -9671,97 +9749,87 @@
1615 if that register's value is delivered via a bypass, then the
1616 pipeline recycles, thereby causing significant performance decline.
1617 This function locates such situations and exchanges the two
1618- operands of the compare. */
1619-static void
1620-s390_z10_optimize_cmp (void)
1621+ operands of the compare. The function return true whenever it
1622+ added an insn. */
1623+static bool
1624+s390_z10_optimize_cmp (rtx insn)
1625 {
1626- rtx insn, prev_insn, next_insn;
1627- int added_NOPs = 0;
1628+ rtx prev_insn, next_insn;
1629+ bool insn_added_p = false;
1630+ rtx cond, *op0, *op1;
1631
1632- for (insn = get_insns (); insn; insn = NEXT_INSN (insn))
1633+ if (GET_CODE (PATTERN (insn)) == PARALLEL)
1634 {
1635- rtx cond, *op0, *op1;
1636-
1637- if (!INSN_P (insn) || INSN_CODE (insn) <= 0)
1638- continue;
1639-
1640- if (GET_CODE (PATTERN (insn)) == PARALLEL)
1641- {
1642- /* Handle compare and branch and branch on count
1643- instructions. */
1644- rtx pattern = single_set (insn);
1645-
1646- if (!pattern
1647- || SET_DEST (pattern) != pc_rtx
1648- || GET_CODE (SET_SRC (pattern)) != IF_THEN_ELSE)
1649- continue;
1650+ /* Handle compare and branch and branch on count
1651+ instructions. */
1652+ rtx pattern = single_set (insn);
1653+
1654+ if (!pattern
1655+ || SET_DEST (pattern) != pc_rtx
1656+ || GET_CODE (SET_SRC (pattern)) != IF_THEN_ELSE)
1657+ return false;
1658
1659- cond = XEXP (SET_SRC (pattern), 0);
1660- op0 = &XEXP (cond, 0);
1661- op1 = &XEXP (cond, 1);
1662- }
1663- else if (GET_CODE (PATTERN (insn)) == SET)
1664- {
1665- rtx src, dest;
1666+ cond = XEXP (SET_SRC (pattern), 0);
1667+ op0 = &XEXP (cond, 0);
1668+ op1 = &XEXP (cond, 1);
1669+ }
1670+ else if (GET_CODE (PATTERN (insn)) == SET)
1671+ {
1672+ rtx src, dest;
1673
1674- /* Handle normal compare instructions. */
1675- src = SET_SRC (PATTERN (insn));
1676- dest = SET_DEST (PATTERN (insn));
1677+ /* Handle normal compare instructions. */
1678+ src = SET_SRC (PATTERN (insn));
1679+ dest = SET_DEST (PATTERN (insn));
1680
1681- if (!REG_P (dest)
1682- || !CC_REGNO_P (REGNO (dest))
1683- || GET_CODE (src) != COMPARE)
1684- continue;
1685+ if (!REG_P (dest)
1686+ || !CC_REGNO_P (REGNO (dest))
1687+ || GET_CODE (src) != COMPARE)
1688+ return false;
1689
1690- /* s390_swap_cmp will try to find the conditional
1691- jump when passing NULL_RTX as condition. */
1692- cond = NULL_RTX;
1693- op0 = &XEXP (src, 0);
1694- op1 = &XEXP (src, 1);
1695- }
1696- else
1697- continue;
1698+ /* s390_swap_cmp will try to find the conditional
1699+ jump when passing NULL_RTX as condition. */
1700+ cond = NULL_RTX;
1701+ op0 = &XEXP (src, 0);
1702+ op1 = &XEXP (src, 1);
1703+ }
1704+ else
1705+ return false;
1706
1707- if (!REG_P (*op0) || !REG_P (*op1))
1708- continue;
1709+ if (!REG_P (*op0) || !REG_P (*op1))
1710+ return false;
1711
1712- /* Swap the COMPARE arguments and its mask if there is a
1713- conflicting access in the previous insn. */
1714- prev_insn = PREV_INSN (insn);
1715+ /* Swap the COMPARE arguments and its mask if there is a
1716+ conflicting access in the previous insn. */
1717+ prev_insn = PREV_INSN (insn);
1718+ if (prev_insn != NULL_RTX && INSN_P (prev_insn)
1719+ && reg_referenced_p (*op1, PATTERN (prev_insn)))
1720+ s390_swap_cmp (cond, op0, op1, insn);
1721+
1722+ /* Check if there is a conflict with the next insn. If there
1723+ was no conflict with the previous insn, then swap the
1724+ COMPARE arguments and its mask. If we already swapped
1725+ the operands, or if swapping them would cause a conflict
1726+ with the previous insn, issue a NOP after the COMPARE in
1727+ order to separate the two instuctions. */
1728+ next_insn = NEXT_INSN (insn);
1729+ if (next_insn != NULL_RTX && INSN_P (next_insn)
1730+ && s390_non_addr_reg_read_p (*op1, next_insn))
1731+ {
1732 if (prev_insn != NULL_RTX && INSN_P (prev_insn)
1733- && reg_referenced_p (*op1, PATTERN (prev_insn)))
1734- s390_swap_cmp (cond, op0, op1, insn);
1735-
1736- /* Check if there is a conflict with the next insn. If there
1737- was no conflict with the previous insn, then swap the
1738- COMPARE arguments and its mask. If we already swapped
1739- the operands, or if swapping them would cause a conflict
1740- with the previous insn, issue a NOP after the COMPARE in
1741- order to separate the two instuctions. */
1742- next_insn = NEXT_INSN (insn);
1743- if (next_insn != NULL_RTX && INSN_P (next_insn)
1744- && s390_non_addr_reg_read_p (*op1, next_insn))
1745+ && s390_non_addr_reg_read_p (*op0, prev_insn))
1746 {
1747- if (prev_insn != NULL_RTX && INSN_P (prev_insn)
1748- && s390_non_addr_reg_read_p (*op0, prev_insn))
1749- {
1750- if (REGNO (*op1) == 0)
1751- emit_insn_after (gen_nop1 (), insn);
1752- else
1753- emit_insn_after (gen_nop (), insn);
1754- added_NOPs = 1;
1755- }
1756+ if (REGNO (*op1) == 0)
1757+ emit_insn_after (gen_nop1 (), insn);
1758 else
1759- s390_swap_cmp (cond, op0, op1, insn);
1760+ emit_insn_after (gen_nop (), insn);
1761+ insn_added_p = true;
1762 }
1763+ else
1764+ s390_swap_cmp (cond, op0, op1, insn);
1765 }
1766-
1767- /* Adjust branches if we added new instructions. */
1768- if (added_NOPs)
1769- shorten_branches (get_insns ());
1770+ return insn_added_p;
1771 }
1772
1773-
1774 /* Perform machine-dependent processing. */
1775
1776 static void
1777@@ -9872,10 +9940,33 @@
1778 /* Try to optimize prologue and epilogue further. */
1779 s390_optimize_prologue ();
1780
1781- /* Eliminate z10-specific pipeline recycles related to some compare
1782- instructions. */
1783+ /* Walk over the insns and do some z10 specific changes. */
1784 if (s390_tune == PROCESSOR_2097_Z10)
1785- s390_z10_optimize_cmp ();
1786+ {
1787+ rtx insn;
1788+ bool insn_added_p = false;
1789+
1790+ /* The insn lengths and addresses have to be up to date for the
1791+ following manipulations. */
1792+ shorten_branches (get_insns ());
1793+
1794+ for (insn = get_insns (); insn; insn = NEXT_INSN (insn))
1795+ {
1796+ if (!INSN_P (insn) || INSN_CODE (insn) <= 0)
1797+ continue;
1798+
1799+ if (JUMP_P (insn))
1800+ insn_added_p |= s390_z10_fix_long_loop_prediction (insn);
1801+
1802+ if (GET_CODE (PATTERN (insn)) == PARALLEL
1803+ || GET_CODE (PATTERN (insn)) == SET)
1804+ insn_added_p |= s390_z10_optimize_cmp (insn);
1805+ }
1806+
1807+ /* Adjust branches if we added new instructions. */
1808+ if (insn_added_p)
1809+ shorten_branches (get_insns ());
1810+ }
1811 }
1812
1813
1814diff -Naur gcc-4.4.1.orig/gcc/config/s390/s390.md gcc-4.4.1/gcc/config/s390/s390.md
1815--- gcc-4.4.1.orig/gcc/config/s390/s390.md 2009-06-15 02:27:22.000000000 -0700
1816+++ gcc-4.4.1/gcc/config/s390/s390.md 2009-09-04 03:05:45.000000000 -0700
1817@@ -202,7 +202,7 @@
1818 (define_attr "type" "none,integer,load,lr,la,larl,lm,stm,
1819 cs,vs,store,sem,idiv,
1820 imulhi,imulsi,imuldi,
1821- branch,jsr,fsimptf,fsimpdf,fsimpsf,
1822+ branch,jsr,fsimptf,fsimpdf,fsimpsf,fhex,
1823 floadtf,floaddf,floadsf,fstoredf,fstoresf,
1824 fmultf,fmuldf,fmulsf,fdivtf,fdivdf,fdivsf,
1825 ftoi,fsqrttf,fsqrtdf,fsqrtsf,
1826@@ -1076,6 +1076,64 @@
1827 (const_int 6) (const_int 12)))]) ; 8 byte for clr/jg
1828 ; 10 byte for clgr/jg
1829
1830+; And now the same two patterns as above but with a negated CC mask.
1831+
1832+; cij, cgij, crj, cgrj, cfi, cgfi, cr, cgr
1833+; The following instructions do a complementary access of their second
1834+; operand (z01 only): crj_c, cgrjc, cr, cgr
1835+(define_insn "*icmp_and_br_signed_<mode>"
1836+ [(set (pc)
1837+ (if_then_else (match_operator 0 "s390_signed_integer_comparison"
1838+ [(match_operand:GPR 1 "register_operand" "d,d")
1839+ (match_operand:GPR 2 "nonmemory_operand" "d,C")])
1840+ (pc)
1841+ (label_ref (match_operand 3 "" ""))))
1842+ (clobber (reg:CC CC_REGNUM))]
1843+ "TARGET_Z10"
1844+{
1845+ if (get_attr_length (insn) == 6)
1846+ return which_alternative ?
1847+ "c<g>ij%D0\t%1,%c2,%l3" : "c<g>rj%D0\t%1,%2,%l3";
1848+ else
1849+ return which_alternative ?
1850+ "c<g>fi\t%1,%c2\;jg%D0\t%l3" : "c<g>r\t%1,%2\;jg%D0\t%l3";
1851+}
1852+ [(set_attr "op_type" "RIE")
1853+ (set_attr "type" "branch")
1854+ (set_attr "z10prop" "z10_super_c,z10_super")
1855+ (set (attr "length")
1856+ (if_then_else (lt (abs (minus (pc) (match_dup 3))) (const_int 60000))
1857+ (const_int 6) (const_int 12)))]) ; 8 byte for cr/jg
1858+ ; 10 byte for cgr/jg
1859+
1860+; clij, clgij, clrj, clgrj, clfi, clgfi, clr, clgr
1861+; The following instructions do a complementary access of their second
1862+; operand (z10 only): clrj, clgrj, clr, clgr
1863+(define_insn "*icmp_and_br_unsigned_<mode>"
1864+ [(set (pc)
1865+ (if_then_else (match_operator 0 "s390_unsigned_integer_comparison"
1866+ [(match_operand:GPR 1 "register_operand" "d,d")
1867+ (match_operand:GPR 2 "nonmemory_operand" "d,I")])
1868+ (pc)
1869+ (label_ref (match_operand 3 "" ""))))
1870+ (clobber (reg:CC CC_REGNUM))]
1871+ "TARGET_Z10"
1872+{
1873+ if (get_attr_length (insn) == 6)
1874+ return which_alternative ?
1875+ "cl<g>ij%D0\t%1,%b2,%l3" : "cl<g>rj%D0\t%1,%2,%l3";
1876+ else
1877+ return which_alternative ?
1878+ "cl<g>fi\t%1,%b2\;jg%D0\t%l3" : "cl<g>r\t%1,%2\;jg%D0\t%l3";
1879+}
1880+ [(set_attr "op_type" "RIE")
1881+ (set_attr "type" "branch")
1882+ (set_attr "z10prop" "z10_super_c,z10_super")
1883+ (set (attr "length")
1884+ (if_then_else (lt (abs (minus (pc) (match_dup 3))) (const_int 60000))
1885+ (const_int 6) (const_int 12)))]) ; 8 byte for clr/jg
1886+ ; 10 byte for clgr/jg
1887+
1888 ;;
1889 ;;- Move instructions.
1890 ;;
1891@@ -1470,7 +1528,7 @@
1892
1893 (define_insn "*la_64"
1894 [(set (match_operand:DI 0 "register_operand" "=d,d")
1895- (match_operand:QI 1 "address_operand" "U,W"))]
1896+ (match_operand:QI 1 "address_operand" "ZQZR,ZSZT"))]
1897 "TARGET_64BIT"
1898 "@
1899 la\t%0,%a1
1900@@ -1653,7 +1711,7 @@
1901
1902 (define_insn "*la_31"
1903 [(set (match_operand:SI 0 "register_operand" "=d,d")
1904- (match_operand:QI 1 "address_operand" "U,W"))]
1905+ (match_operand:QI 1 "address_operand" "ZQZR,ZSZT"))]
1906 "!TARGET_64BIT && legitimate_la_operand_p (operands[1])"
1907 "@
1908 la\t%0,%a1
1909@@ -1688,7 +1746,7 @@
1910
1911 (define_insn "*la_31_and"
1912 [(set (match_operand:SI 0 "register_operand" "=d,d")
1913- (and:SI (match_operand:QI 1 "address_operand" "U,W")
1914+ (and:SI (match_operand:QI 1 "address_operand" "ZQZR,ZSZT")
1915 (const_int 2147483647)))]
1916 "!TARGET_64BIT"
1917 "@
1918@@ -1714,7 +1772,7 @@
1919
1920 (define_insn "force_la_31"
1921 [(set (match_operand:SI 0 "register_operand" "=d,d")
1922- (match_operand:QI 1 "address_operand" "U,W"))
1923+ (match_operand:QI 1 "address_operand" "ZQZR,ZSZT"))
1924 (use (const_int 0))]
1925 "!TARGET_64BIT"
1926 "@
1927@@ -1909,7 +1967,7 @@
1928 #
1929 #"
1930 [(set_attr "op_type" "RRE,RRE,*,*,RSY,RSY,*,*")
1931- (set_attr "type" "fsimptf,fsimptf,*,*,lm,stm,*,*")])
1932+ (set_attr "type" "fhex,fsimptf,*,*,lm,stm,*,*")])
1933
1934 (define_insn "*mov<mode>_31"
1935 [(set (match_operand:TD_TF 0 "nonimmediate_operand" "=f,f,f,o")
1936@@ -1921,7 +1979,7 @@
1937 #
1938 #"
1939 [(set_attr "op_type" "RRE,RRE,*,*")
1940- (set_attr "type" "fsimptf,fsimptf,*,*")])
1941+ (set_attr "type" "fhex,fsimptf,*,*")])
1942
1943 ; TFmode in GPRs splitters
1944
1945@@ -2029,7 +2087,7 @@
1946 lg\t%0,%1
1947 stg\t%1,%0"
1948 [(set_attr "op_type" "RRE,RR,RRE,RRE,RX,RXY,RX,RXY,RRE,RXY,RXY")
1949- (set_attr "type" "fsimpdf,floaddf,floaddf,floaddf,floaddf,floaddf,
1950+ (set_attr "type" "fhex,floaddf,floaddf,floaddf,floaddf,floaddf,
1951 fstoredf,fstoredf,lr,load,store")
1952 (set_attr "z10prop" "*,
1953 *,
1954@@ -2059,7 +2117,7 @@
1955 lg\t%0,%1
1956 stg\t%1,%0"
1957 [(set_attr "op_type" "RRE,RR,RX,RXY,RX,RXY,RRE,RXY,RXY")
1958- (set_attr "type" "fsimp<mode>,fload<mode>,fload<mode>,fload<mode>,
1959+ (set_attr "type" "fhex,fload<mode>,fload<mode>,fload<mode>,
1960 fstore<mode>,fstore<mode>,lr,load,store")
1961 (set_attr "z10prop" "*,
1962 *,
1963@@ -2091,7 +2149,7 @@
1964 #
1965 #"
1966 [(set_attr "op_type" "RRE,RR,RX,RXY,RX,RXY,RS,RSY,RS,RSY,*,*")
1967- (set_attr "type" "fsimp<mode>,fload<mode>,fload<mode>,fload<mode>,
1968+ (set_attr "type" "fhex,fload<mode>,fload<mode>,fload<mode>,
1969 fstore<mode>,fstore<mode>,lm,lm,stm,stm,*,*")])
1970
1971 (define_split
1972@@ -2158,7 +2216,7 @@
1973 st\t%1,%0
1974 sty\t%1,%0"
1975 [(set_attr "op_type" "RRE,RR,RX,RXY,RX,RXY,RR,RX,RXY,RX,RXY")
1976- (set_attr "type" "fsimp<mode>,fload<mode>,fload<mode>,fload<mode>,
1977+ (set_attr "type" "fhex,fload<mode>,fload<mode>,fload<mode>,
1978 fstore<mode>,fstore<mode>,lr,load,load,store,store")
1979 (set_attr "z10prop" "*,
1980 *,
1981@@ -7407,7 +7465,7 @@
1982 [(set (pc)
1983 (if_then_else
1984 (match_operator 1 "s390_comparison" [(reg CC_REGNUM) (const_int 0)])
1985- (match_operand 0 "address_operand" "U")
1986+ (match_operand 0 "address_operand" "ZQZR")
1987 (pc)))]
1988 ""
1989 {
1990@@ -7471,7 +7529,7 @@
1991 (if_then_else
1992 (match_operator 1 "s390_comparison" [(reg CC_REGNUM) (const_int 0)])
1993 (pc)
1994- (match_operand 0 "address_operand" "U")))]
1995+ (match_operand 0 "address_operand" "ZQZR")))]
1996 ""
1997 {
1998 if (get_attr_op_type (insn) == OP_TYPE_RR)
1999@@ -7660,7 +7718,7 @@
2000 (if_then_else
2001 (ne (match_operand:SI 1 "register_operand" "d")
2002 (const_int 1))
2003- (match_operand 0 "address_operand" "U")
2004+ (match_operand 0 "address_operand" "ZQZR")
2005 (pc)))
2006 (set (match_operand:SI 2 "register_operand" "=1")
2007 (plus:SI (match_dup 1) (const_int -1)))
2008@@ -7771,7 +7829,7 @@
2009 ;
2010
2011 (define_insn "indirect_jump"
2012- [(set (pc) (match_operand 0 "address_operand" "U"))]
2013+ [(set (pc) (match_operand 0 "address_operand" "ZQZR"))]
2014 ""
2015 {
2016 if (get_attr_op_type (insn) == OP_TYPE_RR)
2017@@ -7790,7 +7848,7 @@
2018 ;
2019
2020 (define_insn "casesi_jump"
2021- [(set (pc) (match_operand 0 "address_operand" "U"))
2022+ [(set (pc) (match_operand 0 "address_operand" "ZQZR"))
2023 (use (label_ref (match_operand 1 "" "")))]
2024 ""
2025 {
2026@@ -8012,7 +8070,7 @@
2027 (set_attr "type" "jsr")])
2028
2029 (define_insn "*basr"
2030- [(call (mem:QI (match_operand 0 "address_operand" "U"))
2031+ [(call (mem:QI (match_operand 0 "address_operand" "ZQZR"))
2032 (match_operand 1 "const_int_operand" "n"))
2033 (clobber (match_operand 2 "register_operand" "=r"))]
2034 "!SIBLING_CALL_P (insn) && GET_MODE (operands[2]) == Pmode"
2035@@ -8070,7 +8128,7 @@
2036
2037 (define_insn "*basr_r"
2038 [(set (match_operand 0 "" "")
2039- (call (mem:QI (match_operand 1 "address_operand" "U"))
2040+ (call (mem:QI (match_operand 1 "address_operand" "ZQZR"))
2041 (match_operand 2 "const_int_operand" "n")))
2042 (clobber (match_operand 3 "register_operand" "=r"))]
2043 "!SIBLING_CALL_P (insn) && GET_MODE (operands[3]) == Pmode"
2044@@ -8170,7 +8228,7 @@
2045
2046 (define_insn "*basr_tls"
2047 [(set (match_operand 0 "" "")
2048- (call (mem:QI (match_operand 1 "address_operand" "U"))
2049+ (call (mem:QI (match_operand 1 "address_operand" "ZQZR"))
2050 (match_operand 2 "const_int_operand" "n")))
2051 (clobber (match_operand 3 "register_operand" "=r"))
2052 (use (match_operand 4 "" ""))]
2053@@ -8720,27 +8778,32 @@
2054 ;
2055
2056 (define_insn "prefetch"
2057- [(prefetch (match_operand 0 "address_operand" "UW,X")
2058- (match_operand:SI 1 "const_int_operand" "n,n")
2059- (match_operand:SI 2 "const_int_operand" "n,n"))]
2060- "TARGET_Z10"
2061+ [(prefetch (match_operand 0 "address_operand" "ZQZS,ZRZT,X")
2062+ (match_operand:SI 1 "const_int_operand" " n, n,n")
2063+ (match_operand:SI 2 "const_int_operand" " n, n,n"))]
2064+ "TARGET_ZARCH && s390_tune == PROCESSOR_2097_Z10"
2065 {
2066- if (larl_operand (operands[0], Pmode))
2067- return INTVAL (operands[1]) == 1 ? "pfdrl\t2,%a0" : "pfdrl\t1,%a0";
2068+ switch (which_alternative)
2069+ {
2070+ case 0:
2071+ return INTVAL (operands[1]) == 1 ? "stcmh\t2,0,%a0" : "stcmh\t1,0,%a0";
2072+ case 1:
2073+ return INTVAL (operands[1]) == 1 ? "pfd\t2,%a0" : "pfd\t1,%a0";
2074+ case 2:
2075+ if (larl_operand (operands[0], Pmode))
2076+ return INTVAL (operands[1]) == 1 ? "pfdrl\t2,%a0" : "pfdrl\t1,%a0";
2077+ default:
2078
2079- if (s390_mem_constraint ("W", operands[0])
2080- || s390_mem_constraint ("U", operands[0]))
2081- return INTVAL (operands[1]) == 1 ? "pfd\t2,%a0" : "pfd\t1,%a0";
2082-
2083- /* This point might be reached if op0 is a larl operand with an
2084- uneven addend. In this case we simply omit issuing a prefetch
2085- instruction. */
2086+ /* This might be reached for symbolic operands with an odd
2087+ addend. We simply omit the prefetch for such rare cases. */
2088
2089- return "";
2090+ return "";
2091+ }
2092 }
2093- [(set_attr "type" "load,larl")
2094- (set_attr "op_type" "RXY,RIL")
2095- (set_attr "z10prop" "z10_super")])
2096+ [(set_attr "type" "store,load,larl")
2097+ (set_attr "op_type" "RSY,RXY,RIL")
2098+ (set_attr "z10prop" "z10_super")
2099+ (set_attr "cpu_facility" "*,z10,z10")])
2100
2101
2102 ;
2103diff -Naur gcc-4.4.1.orig/gcc/cp/call.c gcc-4.4.1/gcc/cp/call.c
2104--- gcc-4.4.1.orig/gcc/cp/call.c 2009-07-12 23:06:27.000000000 -0700
2105+++ gcc-4.4.1/gcc/cp/call.c 2009-07-24 11:06:08.000000000 -0700
2106@@ -1211,7 +1211,21 @@
2107 lvalue_p = clk_ordinary;
2108 from = TREE_TYPE (from);
2109 }
2110- else if (expr)
2111+
2112+ if (expr && BRACE_ENCLOSED_INITIALIZER_P (expr))
2113+ {
2114+ maybe_warn_cpp0x ("extended initializer lists");
2115+ conv = implicit_conversion (to, from, expr, c_cast_p,
2116+ flags);
2117+ if (!CLASS_TYPE_P (to)
2118+ && CONSTRUCTOR_NELTS (expr) == 1)
2119+ {
2120+ expr = CONSTRUCTOR_ELT (expr, 0)->value;
2121+ from = TREE_TYPE (expr);
2122+ }
2123+ }
2124+
2125+ if (lvalue_p == clk_none && expr)
2126 lvalue_p = real_lvalue_p (expr);
2127
2128 tfrom = from;
2129@@ -1347,8 +1361,9 @@
2130 conversion operator). */
2131 flags |= LOOKUP_NO_TEMP_BIND;
2132
2133- conv = implicit_conversion (to, from, expr, c_cast_p,
2134- flags);
2135+ if (!conv)
2136+ conv = implicit_conversion (to, from, expr, c_cast_p,
2137+ flags);
2138 if (!conv)
2139 return NULL;
2140
2141@@ -6242,6 +6257,14 @@
2142 ref_conv1 = maybe_handle_ref_bind (&ics1);
2143 ref_conv2 = maybe_handle_ref_bind (&ics2);
2144
2145+ /* List-initialization sequence L1 is a better conversion sequence than
2146+ list-initialization sequence L2 if L1 converts to
2147+ std::initializer_list<X> for some X and L2 does not. */
2148+ if (ics1->kind == ck_list && ics2->kind != ck_list)
2149+ return 1;
2150+ if (ics2->kind == ck_list && ics1->kind != ck_list)
2151+ return -1;
2152+
2153 /* [over.ics.rank]
2154
2155 When comparing the basic forms of implicit conversion sequences (as
2156@@ -6292,26 +6315,13 @@
2157 conversion *t1;
2158 conversion *t2;
2159
2160- for (t1 = ics1; t1->kind != ck_user && t1->kind != ck_list; t1 = t1->u.next)
2161+ for (t1 = ics1; t1->kind != ck_user; t1 = t1->u.next)
2162 if (t1->kind == ck_ambig || t1->kind == ck_aggr)
2163 return 0;
2164- for (t2 = ics2; t2->kind != ck_user && t2->kind != ck_list; t2 = t2->u.next)
2165+ for (t2 = ics2; t2->kind != ck_user; t2 = t2->u.next)
2166 if (t2->kind == ck_ambig || t2->kind == ck_aggr)
2167 return 0;
2168
2169- /* Conversion to std::initializer_list is better than other
2170- user-defined conversions. */
2171- if (t1->kind == ck_list
2172- || t2->kind == ck_list)
2173- {
2174- if (t2->kind != ck_list)
2175- return 1;
2176- else if (t1->kind != ck_list)
2177- return -1;
2178- else
2179- return 0;
2180- }
2181-
2182 if (t1->cand->fn != t2->cand->fn)
2183 return 0;
2184
2185@@ -7288,6 +7298,7 @@
2186 if (!conv || conv->bad_p)
2187 {
2188 if (!(TYPE_QUALS (TREE_TYPE (type)) & TYPE_QUAL_CONST)
2189+ && !TYPE_REF_IS_RVALUE (type)
2190 && !real_lvalue_p (expr))
2191 error ("invalid initialization of non-const reference of "
2192 "type %qT from a temporary of type %qT",
2193diff -Naur gcc-4.4.1.orig/gcc/cp/decl.c gcc-4.4.1/gcc/cp/decl.c
2194--- gcc-4.4.1.orig/gcc/cp/decl.c 2009-07-07 15:08:01.000000000 -0700
2195+++ gcc-4.4.1/gcc/cp/decl.c 2009-07-26 09:05:22.000000000 -0700
2196@@ -4345,13 +4345,6 @@
2197 return NULL_TREE;
2198 }
2199
2200- if (TREE_CODE (init) == CONSTRUCTOR)
2201- {
2202- error ("ISO C++ forbids use of initializer list to "
2203- "initialize reference %qD", decl);
2204- return NULL_TREE;
2205- }
2206-
2207 if (TREE_CODE (init) == TREE_LIST)
2208 init = build_x_compound_expr_from_list (init, "initializer");
2209
2210@@ -7618,7 +7611,6 @@
2211 bool unsigned_p, signed_p, short_p, long_p, thread_p;
2212 bool type_was_error_mark_node = false;
2213 bool parameter_pack_p = declarator? declarator->parameter_pack_p : false;
2214- bool set_no_warning = false;
2215 bool template_type_arg = false;
2216
2217 signed_p = declspecs->specs[(int)ds_signed];
2218@@ -8297,7 +8289,6 @@
2219 /* We now know that the TYPE_QUALS don't apply to the
2220 decl, but to its return type. */
2221 type_quals = TYPE_UNQUALIFIED;
2222- set_no_warning = true;
2223 }
2224
2225 /* Error about some types functions can't return. */
2226@@ -9499,9 +9490,6 @@
2227 if (!processing_template_decl)
2228 cp_apply_type_quals_to_decl (type_quals, decl);
2229
2230- if (set_no_warning)
2231- TREE_NO_WARNING (decl) = 1;
2232-
2233 return decl;
2234 }
2235 }
2236diff -Naur gcc-4.4.1.orig/gcc/cp/error.c gcc-4.4.1/gcc/cp/error.c
2237--- gcc-4.4.1.orig/gcc/cp/error.c 2009-07-10 15:31:34.000000000 -0700
2238+++ gcc-4.4.1/gcc/cp/error.c 2009-08-04 05:28:27.000000000 -0700
2239@@ -2181,7 +2181,10 @@
2240 return decl_as_string (decl, TFF_DECL_SPECIFIERS);
2241
2242 reinit_cxx_pp ();
2243- if (v == 1 && DECL_CLASS_SCOPE_P (decl))
2244+ if (v == 1
2245+ && (DECL_CLASS_SCOPE_P (decl)
2246+ || (DECL_NAMESPACE_SCOPE_P (decl)
2247+ && CP_DECL_CONTEXT (decl) != global_namespace)))
2248 {
2249 dump_type (CP_DECL_CONTEXT (decl), TFF_PLAIN_IDENTIFIER);
2250 pp_cxx_colon_colon (cxx_pp);
2251diff -Naur gcc-4.4.1.orig/gcc/cp/init.c gcc-4.4.1/gcc/cp/init.c
2252--- gcc-4.4.1.orig/gcc/cp/init.c 2009-07-12 23:06:27.000000000 -0700
2253+++ gcc-4.4.1/gcc/cp/init.c 2009-08-06 10:22:19.000000000 -0700
2254@@ -2695,6 +2695,13 @@
2255 gcc_assert (!init);
2256
2257 inner_elt_type = strip_array_types (type);
2258+
2259+ /* Look through the TARGET_EXPR around a compound literal. */
2260+ if (init && TREE_CODE (init) == TARGET_EXPR
2261+ && TREE_CODE (TARGET_EXPR_INITIAL (init)) == CONSTRUCTOR
2262+ && from_array != 2)
2263+ init = TARGET_EXPR_INITIAL (init);
2264+
2265 if (init
2266 && TREE_CODE (atype) == ARRAY_TYPE
2267 && (from_array == 2
2268@@ -2763,6 +2770,17 @@
2269 base = get_temp_regvar (ptype, rval);
2270 iterator = get_temp_regvar (ptrdiff_type_node, maxindex);
2271
2272+ /* If initializing one array from another, initialize element by
2273+ element. We rely upon the below calls to do the argument
2274+ checking. Evaluate the initializer before entering the try block. */
2275+ if (from_array && init && TREE_CODE (init) != CONSTRUCTOR)
2276+ {
2277+ base2 = decay_conversion (init);
2278+ itype = TREE_TYPE (base2);
2279+ base2 = get_temp_regvar (itype, base2);
2280+ itype = TREE_TYPE (itype);
2281+ }
2282+
2283 /* Protect the entire array initialization so that we can destroy
2284 the partially constructed array if an exception is thrown.
2285 But don't do this if we're assigning. */
2286@@ -2805,16 +2823,8 @@
2287 }
2288 else if (from_array)
2289 {
2290- /* If initializing one array from another, initialize element by
2291- element. We rely upon the below calls the do argument
2292- checking. */
2293 if (init)
2294- {
2295- base2 = decay_conversion (init);
2296- itype = TREE_TYPE (base2);
2297- base2 = get_temp_regvar (itype, base2);
2298- itype = TREE_TYPE (itype);
2299- }
2300+ /* OK, we set base2 above. */;
2301 else if (TYPE_LANG_SPECIFIC (type)
2302 && TYPE_NEEDS_CONSTRUCTING (type)
2303 && ! TYPE_HAS_DEFAULT_CONSTRUCTOR (type))
2304diff -Naur gcc-4.4.1.orig/gcc/cp/Make-lang.in gcc-4.4.1/gcc/cp/Make-lang.in
2305--- gcc-4.4.1.orig/gcc/cp/Make-lang.in 2008-12-05 00:01:58.000000000 -0800
2306+++ gcc-4.4.1/gcc/cp/Make-lang.in 2009-09-09 01:46:32.000000000 -0700
2307@@ -72,8 +72,8 @@
2308 # Shared with C front end:
2309 CXX_C_OBJS = attribs.o c-common.o c-format.o c-pragma.o c-semantics.o c-lex.o \
2310 c-dump.o $(CXX_TARGET_OBJS) c-pretty-print.o c-opts.o c-pch.o \
2311- incpath.o cppdefault.o c-ppoutput.o c-cppbuiltin.o prefix.o \
2312- c-gimplify.o c-omp.o tree-inline.o
2313+ incpath.o c-ppoutput.o c-cppbuiltin.o prefix.o \
2314+ c-gimplify.o c-omp.o
2315
2316 # Language-specific object files for C++ and Objective C++.
2317 CXX_AND_OBJCXX_OBJS = cp/call.o cp/decl.o cp/expr.o cp/pt.o cp/typeck2.o \
2318diff -Naur gcc-4.4.1.orig/gcc/cp/parser.c gcc-4.4.1/gcc/cp/parser.c
2319--- gcc-4.4.1.orig/gcc/cp/parser.c 2009-06-08 21:23:00.000000000 -0700
2320+++ gcc-4.4.1/gcc/cp/parser.c 2009-08-31 14:20:07.000000000 -0700
2321@@ -11871,11 +11871,19 @@
2322 else
2323 identifier = make_anon_name ();
2324
2325- /* Check for the `:' that denotes a specified underlying type in C++0x. */
2326+ /* Check for the `:' that denotes a specified underlying type in C++0x.
2327+ Note that a ':' could also indicate a bitfield width, however. */
2328 if (cp_lexer_next_token_is (parser->lexer, CPP_COLON))
2329 {
2330 cp_decl_specifier_seq type_specifiers;
2331
2332+ /* Consume the `:'. */
2333+ cp_lexer_consume_token (parser->lexer);
2334+
2335+ /* Parse the type-specifier-seq. */
2336+ cp_parser_type_specifier_seq (parser, /*is_condition=*/false,
2337+ &type_specifiers);
2338+
2339 /* At this point this is surely not elaborated type specifier. */
2340 if (!cp_parser_parse_definitely (parser))
2341 return NULL_TREE;
2342@@ -11883,15 +11891,8 @@
2343 if (cxx_dialect == cxx98)
2344 maybe_warn_cpp0x ("scoped enums");
2345
2346- /* Consume the `:'. */
2347- cp_lexer_consume_token (parser->lexer);
2348-
2349 has_underlying_type = true;
2350
2351- /* Parse the type-specifier-seq. */
2352- cp_parser_type_specifier_seq (parser, /*is_condition=*/false,
2353- &type_specifiers);
2354-
2355 /* If that didn't work, stop. */
2356 if (type_specifiers.type != error_mark_node)
2357 {
2358diff -Naur gcc-4.4.1.orig/gcc/cp/pt.c gcc-4.4.1/gcc/cp/pt.c
2359--- gcc-4.4.1.orig/gcc/cp/pt.c 2009-07-09 11:00:58.000000000 -0700
2360+++ gcc-4.4.1/gcc/cp/pt.c 2009-08-04 12:59:48.000000000 -0700
2361@@ -8007,11 +8007,11 @@
2362 cp_function_chain->x_current_class_ref = saved_class_ref;
2363 }
2364
2365- pop_access_scope (fn);
2366-
2367 /* Make sure the default argument is reasonable. */
2368 arg = check_default_argument (type, arg);
2369
2370+ pop_access_scope (fn);
2371+
2372 return arg;
2373 }
2374
2375diff -Naur gcc-4.4.1.orig/gcc/cp/tree.c gcc-4.4.1/gcc/cp/tree.c
2376--- gcc-4.4.1.orig/gcc/cp/tree.c 2009-07-12 23:06:27.000000000 -0700
2377+++ gcc-4.4.1/gcc/cp/tree.c 2009-08-21 00:10:36.000000000 -0700
2378@@ -132,6 +132,12 @@
2379 return clk_ordinary;
2380
2381 case CONST_DECL:
2382+ /* CONST_DECL without TREE_STATIC are enumeration values and
2383+ thus not lvalues. With TREE_STATIC they are used by ObjC++
2384+ in objc_build_string_object and need to be considered as
2385+ lvalues. */
2386+ if (! TREE_STATIC (ref))
2387+ return clk_none;
2388 case VAR_DECL:
2389 if (TREE_READONLY (ref) && ! TREE_STATIC (ref)
2390 && DECL_LANG_SPECIFIC (ref)
2391diff -Naur gcc-4.4.1.orig/gcc/DATESTAMP gcc-4.4.1/gcc/DATESTAMP
2392--- gcc-4.4.1.orig/gcc/DATESTAMP 2009-07-21 17:16:36.000000000 -0700
2393+++ gcc-4.4.1/gcc/DATESTAMP 2009-09-11 17:16:45.000000000 -0700
2394@@ -1 +1 @@
2395-20090722
2396+20090912
2397diff -Naur gcc-4.4.1.orig/gcc/doc/install.texi gcc-4.4.1/gcc/doc/install.texi
2398--- gcc-4.4.1.orig/gcc/doc/install.texi 2009-03-16 06:23:13.000000000 -0700
2399+++ gcc-4.4.1/gcc/doc/install.texi 2009-08-31 02:09:29.000000000 -0700
2400@@ -2463,7 +2463,7 @@
2401 @samp{make pdf} in place of @samp{make dvi}, you can create documentation
2402 in the form of @file{.pdf} files; this requires @command{texi2pdf}, which
2403 is included with Texinfo version 4.8 and later. You can also
2404-@uref{http://www.gnu.org/order/order.html,,buy printed manuals from the
2405+@uref{http://shop.fsf.org/,,buy printed manuals from the
2406 Free Software Foundation}, though such manuals may not be for the most
2407 recent version of GCC@.
2408
2409diff -Naur gcc-4.4.1.orig/gcc/doc/invoke.texi gcc-4.4.1/gcc/doc/invoke.texi
2410--- gcc-4.4.1.orig/gcc/doc/invoke.texi 2009-04-01 00:18:47.000000000 -0700
2411+++ gcc-4.4.1/gcc/doc/invoke.texi 2009-09-12 08:46:57.000000000 -0700
2412@@ -456,7 +456,7 @@
2413 -mfix-cortex-m3-ldrd}
2414
2415 @emph{AVR Options}
2416-@gccoptlist{-mmcu=@var{mcu} -msize -minit-stack=@var{n} -mno-interrupts @gol
2417+@gccoptlist{-mmcu=@var{mcu} -msize -mno-interrupts @gol
2418 -mcall-prologues -mno-tablejump -mtiny-stack -mint8}
2419
2420 @emph{Blackfin Options}
2421@@ -6513,7 +6513,7 @@
2422
2423 @item -fstrict-aliasing
2424 @opindex fstrict-aliasing
2425-Allows the compiler to assume the strictest aliasing rules applicable to
2426+Allow the compiler to assume the strictest aliasing rules applicable to
2427 the language being compiled. For C (and C++), this activates
2428 optimizations based on the type of expressions. In particular, an
2429 object of one type is assumed never to reside at the same address as an
2430@@ -6530,7 +6530,7 @@
2431 @};
2432
2433 int f() @{
2434- a_union t;
2435+ union a_union t;
2436 t.d = 3.0;
2437 return t.i;
2438 @}
2439@@ -6543,7 +6543,7 @@
2440 implementation}. However, this code might not:
2441 @smallexample
2442 int f() @{
2443- a_union t;
2444+ union a_union t;
2445 int* ip;
2446 t.d = 3.0;
2447 ip = &t.i;
2448@@ -9277,11 +9277,6 @@
2449 @opindex msize
2450 Output instruction sizes to the asm file.
2451
2452-@item -minit-stack=@var{N}
2453-@opindex minit-stack
2454-Specify the initial stack address, which may be a symbol or numeric value,
2455-@samp{__stack} is the default.
2456-
2457 @item -mno-interrupts
2458 @opindex mno-interrupts
2459 Generated code is not compatible with hardware interrupts.
2460diff -Naur gcc-4.4.1.orig/gcc/doc/service.texi gcc-4.4.1/gcc/doc/service.texi
2461--- gcc-4.4.1.orig/gcc/doc/service.texi 2002-12-30 13:07:17.000000000 -0800
2462+++ gcc-4.4.1/gcc/doc/service.texi 2009-08-27 17:01:08.000000000 -0700
2463@@ -21,7 +21,7 @@
2464 @item
2465 Look in the service directory for someone who might help you for a fee.
2466 The service directory is found at
2467-@uref{http://www.gnu.org/prep/service.html}.
2468+@uref{http://www.fsf.org/resources/service}.
2469 @end itemize
2470
2471 For further information, see
2472diff -Naur gcc-4.4.1.orig/gcc/dse.c gcc-4.4.1/gcc/dse.c
2473--- gcc-4.4.1.orig/gcc/dse.c 2009-05-13 14:42:03.000000000 -0700
2474+++ gcc-4.4.1/gcc/dse.c 2009-08-05 05:54:21.000000000 -0700
2475@@ -1070,6 +1070,8 @@
2476 {
2477 rtx mem_address = XEXP (mem, 0);
2478 rtx expanded_address, address;
2479+ int expanded;
2480+
2481 /* Make sure that cselib is has initialized all of the operands of
2482 the address before asking it to do the subst. */
2483
2484@@ -1114,72 +1116,88 @@
2485 fprintf (dump_file, "\n");
2486 }
2487
2488- /* Use cselib to replace all of the reg references with the full
2489- expression. This will take care of the case where we have
2490+ /* First see if just canon_rtx (mem_address) is const or frame,
2491+ if not, try cselib_expand_value_rtx and call canon_rtx on that. */
2492+ address = NULL_RTX;
2493+ for (expanded = 0; expanded < 2; expanded++)
2494+ {
2495+ if (expanded)
2496+ {
2497+ /* Use cselib to replace all of the reg references with the full
2498+ expression. This will take care of the case where we have
2499
2500- r_x = base + offset;
2501- val = *r_x;
2502+ r_x = base + offset;
2503+ val = *r_x;
2504
2505- by making it into
2506-
2507- val = *(base + offset);
2508- */
2509-
2510- expanded_address = cselib_expand_value_rtx (mem_address, scratch, 5);
2511+ by making it into
2512
2513- /* If this fails, just go with the mem_address. */
2514- if (!expanded_address)
2515- expanded_address = mem_address;
2516+ val = *(base + offset); */
2517
2518- /* Split the address into canonical BASE + OFFSET terms. */
2519- address = canon_rtx (expanded_address);
2520+ expanded_address = cselib_expand_value_rtx (mem_address,
2521+ scratch, 5);
2522
2523- *offset = 0;
2524+ /* If this fails, just go with the address from first
2525+ iteration. */
2526+ if (!expanded_address)
2527+ break;
2528+ }
2529+ else
2530+ expanded_address = mem_address;
2531
2532- if (dump_file)
2533- {
2534- fprintf (dump_file, "\n after cselib_expand address: ");
2535- print_inline_rtx (dump_file, expanded_address, 0);
2536- fprintf (dump_file, "\n");
2537+ /* Split the address into canonical BASE + OFFSET terms. */
2538+ address = canon_rtx (expanded_address);
2539
2540- fprintf (dump_file, "\n after canon_rtx address: ");
2541- print_inline_rtx (dump_file, address, 0);
2542- fprintf (dump_file, "\n");
2543- }
2544+ *offset = 0;
2545
2546- if (GET_CODE (address) == CONST)
2547- address = XEXP (address, 0);
2548+ if (dump_file)
2549+ {
2550+ if (expanded)
2551+ {
2552+ fprintf (dump_file, "\n after cselib_expand address: ");
2553+ print_inline_rtx (dump_file, expanded_address, 0);
2554+ fprintf (dump_file, "\n");
2555+ }
2556
2557- if (GET_CODE (address) == PLUS && GET_CODE (XEXP (address, 1)) == CONST_INT)
2558- {
2559- *offset = INTVAL (XEXP (address, 1));
2560- address = XEXP (address, 0);
2561- }
2562+ fprintf (dump_file, "\n after canon_rtx address: ");
2563+ print_inline_rtx (dump_file, address, 0);
2564+ fprintf (dump_file, "\n");
2565+ }
2566
2567- if (const_or_frame_p (address))
2568- {
2569- group_info_t group = get_group_info (address);
2570+ if (GET_CODE (address) == CONST)
2571+ address = XEXP (address, 0);
2572
2573- if (dump_file)
2574- fprintf (dump_file, " gid=%d offset=%d \n", group->id, (int)*offset);
2575- *base = NULL;
2576- *group_id = group->id;
2577- }
2578- else
2579- {
2580- *base = cselib_lookup (address, Pmode, true);
2581- *group_id = -1;
2582+ if (GET_CODE (address) == PLUS
2583+ && GET_CODE (XEXP (address, 1)) == CONST_INT)
2584+ {
2585+ *offset = INTVAL (XEXP (address, 1));
2586+ address = XEXP (address, 0);
2587+ }
2588
2589- if (*base == NULL)
2590+ if (const_or_frame_p (address))
2591 {
2592+ group_info_t group = get_group_info (address);
2593+
2594 if (dump_file)
2595- fprintf (dump_file, " no cselib val - should be a wild read.\n");
2596- return false;
2597+ fprintf (dump_file, " gid=%d offset=%d \n",
2598+ group->id, (int)*offset);
2599+ *base = NULL;
2600+ *group_id = group->id;
2601+ return true;
2602 }
2603+ }
2604+
2605+ *base = cselib_lookup (address, Pmode, true);
2606+ *group_id = -1;
2607+
2608+ if (*base == NULL)
2609+ {
2610 if (dump_file)
2611- fprintf (dump_file, " varying cselib base=%d offset = %d\n",
2612- (*base)->value, (int)*offset);
2613+ fprintf (dump_file, " no cselib val - should be a wild read.\n");
2614+ return false;
2615 }
2616+ if (dump_file)
2617+ fprintf (dump_file, " varying cselib base=%d offset = %d\n",
2618+ (*base)->value, (int)*offset);
2619 return true;
2620 }
2621
2622diff -Naur gcc-4.4.1.orig/gcc/dwarf2out.c gcc-4.4.1/gcc/dwarf2out.c
2623--- gcc-4.4.1.orig/gcc/dwarf2out.c 2009-06-03 10:32:45.000000000 -0700
2624+++ gcc-4.4.1/gcc/dwarf2out.c 2009-08-16 02:07:40.000000000 -0700
2625@@ -14260,7 +14260,13 @@
2626 static void
2627 gen_inlined_subroutine_die (tree stmt, dw_die_ref context_die, int depth)
2628 {
2629- tree decl = block_ultimate_origin (stmt);
2630+ tree decl;
2631+
2632+ /* The instance of function that is effectively being inlined shall not
2633+ be abstract. */
2634+ gcc_assert (! BLOCK_ABSTRACT (stmt));
2635+
2636+ decl = block_ultimate_origin (stmt);
2637
2638 /* Emit info for the abstract instance first, if we haven't yet. We
2639 must emit this even if the block is abstract, otherwise when we
2640@@ -14281,20 +14287,6 @@
2641 decls_for_scope (stmt, subr_die, depth);
2642 current_function_has_inlines = 1;
2643 }
2644- else
2645- /* We may get here if we're the outer block of function A that was
2646- inlined into function B that was inlined into function C. When
2647- generating debugging info for C, dwarf2out_abstract_function(B)
2648- would mark all inlined blocks as abstract, including this one.
2649- So, we wouldn't (and shouldn't) expect labels to be generated
2650- for this one. Instead, just emit debugging info for
2651- declarations within the block. This is particularly important
2652- in the case of initializers of arguments passed from B to us:
2653- if they're statement expressions containing declarations, we
2654- wouldn't generate dies for their abstract variables, and then,
2655- when generating dies for the real variables, we'd die (pun
2656- intended :-) */
2657- gen_lexical_block_die (stmt, context_die, depth);
2658 }
2659
2660 /* Generate a DIE for a field in a record, or structure. */
2661@@ -14921,7 +14913,23 @@
2662 if (must_output_die)
2663 {
2664 if (inlined_func)
2665- gen_inlined_subroutine_die (stmt, context_die, depth);
2666+ {
2667+ /* If STMT block is abstract, that means we have been called
2668+ indirectly from dwarf2out_abstract_function.
2669+ That function rightfully marks the descendent blocks (of
2670+ the abstract function it is dealing with) as being abstract,
2671+ precisely to prevent us from emitting any
2672+ DW_TAG_inlined_subroutine DIE as a descendent
2673+ of an abstract function instance. So in that case, we should
2674+ not call gen_inlined_subroutine_die.
2675+
2676+ Later though, when cgraph asks dwarf2out to emit info
2677+ for the concrete instance of the function decl into which
2678+ the concrete instance of STMT got inlined, the later will lead
2679+ to the generation of a DW_TAG_inlined_subroutine DIE. */
2680+ if (! BLOCK_ABSTRACT (stmt))
2681+ gen_inlined_subroutine_die (stmt, context_die, depth);
2682+ }
2683 else
2684 gen_lexical_block_die (stmt, context_die, depth);
2685 }
2686diff -Naur gcc-4.4.1.orig/gcc/expr.c gcc-4.4.1/gcc/expr.c
2687--- gcc-4.4.1.orig/gcc/expr.c 2009-06-16 07:28:47.000000000 -0700
2688+++ gcc-4.4.1/gcc/expr.c 2009-08-19 15:52:11.000000000 -0700
2689@@ -7806,6 +7806,33 @@
2690 || mode1 == BLKmode
2691 || bitpos + bitsize > GET_MODE_BITSIZE (mode2));
2692
2693+ /* Handle CONCAT first. */
2694+ if (GET_CODE (op0) == CONCAT && !must_force_mem)
2695+ {
2696+ if (bitpos == 0
2697+ && bitsize == GET_MODE_BITSIZE (GET_MODE (op0)))
2698+ return op0;
2699+ if (bitpos == 0
2700+ && bitsize == GET_MODE_BITSIZE (GET_MODE (XEXP (op0, 0)))
2701+ && bitsize)
2702+ {
2703+ op0 = XEXP (op0, 0);
2704+ mode2 = GET_MODE (op0);
2705+ }
2706+ else if (bitpos == GET_MODE_BITSIZE (GET_MODE (XEXP (op0, 0)))
2707+ && bitsize == GET_MODE_BITSIZE (GET_MODE (XEXP (op0, 1)))
2708+ && bitpos
2709+ && bitsize)
2710+ {
2711+ op0 = XEXP (op0, 1);
2712+ bitpos = 0;
2713+ mode2 = GET_MODE (op0);
2714+ }
2715+ else
2716+ /* Otherwise force into memory. */
2717+ must_force_mem = 1;
2718+ }
2719+
2720 /* If this is a constant, put it in a register if it is a legitimate
2721 constant and we don't need a memory reference. */
2722 if (CONSTANT_P (op0)
2723@@ -7879,16 +7906,6 @@
2724 MEM_VOLATILE_P (op0) = 1;
2725 }
2726
2727- /* The following code doesn't handle CONCAT.
2728- Assume only bitpos == 0 can be used for CONCAT, due to
2729- one element arrays having the same mode as its element. */
2730- if (GET_CODE (op0) == CONCAT)
2731- {
2732- gcc_assert (bitpos == 0
2733- && bitsize == GET_MODE_BITSIZE (GET_MODE (op0)));
2734- return op0;
2735- }
2736-
2737 /* In cases where an aligned union has an unaligned object
2738 as a field, we might be extracting a BLKmode value from
2739 an integer-mode (e.g., SImode) object. Handle this case
2740diff -Naur gcc-4.4.1.orig/gcc/fortran/check.c gcc-4.4.1/gcc/fortran/check.c
2741--- gcc-4.4.1.orig/gcc/fortran/check.c 2009-01-09 15:47:55.000000000 -0800
2742+++ gcc-4.4.1/gcc/fortran/check.c 2009-07-23 17:28:43.000000000 -0700
2743@@ -813,6 +813,15 @@
2744 gfc_current_intrinsic, &y->where);
2745 return FAILURE;
2746 }
2747+
2748+ if (y->ts.type == BT_COMPLEX)
2749+ {
2750+ gfc_error ("'%s' argument of '%s' intrinsic at %L must have a type "
2751+ "of either REAL or INTEGER", gfc_current_intrinsic_arg[1],
2752+ gfc_current_intrinsic, &y->where);
2753+ return FAILURE;
2754+ }
2755+
2756 }
2757
2758 if (kind_check (kind, 2, BT_COMPLEX) == FAILURE)
2759@@ -937,6 +946,14 @@
2760 gfc_current_intrinsic, &y->where);
2761 return FAILURE;
2762 }
2763+
2764+ if (y->ts.type == BT_COMPLEX)
2765+ {
2766+ gfc_error ("'%s' argument of '%s' intrinsic at %L must have a type "
2767+ "of either REAL or INTEGER", gfc_current_intrinsic_arg[1],
2768+ gfc_current_intrinsic, &y->where);
2769+ return FAILURE;
2770+ }
2771 }
2772
2773 return SUCCESS;
2774diff -Naur gcc-4.4.1.orig/gcc/fortran/intrinsic.c gcc-4.4.1/gcc/fortran/intrinsic.c
2775--- gcc-4.4.1.orig/gcc/fortran/intrinsic.c 2009-01-09 15:47:55.000000000 -0800
2776+++ gcc-4.4.1/gcc/fortran/intrinsic.c 2009-09-11 15:11:06.000000000 -0700
2777@@ -836,13 +836,17 @@
2778 /* See if this intrinsic is allowed in the current standard. */
2779 if (gfc_check_intrinsic_standard (isym, &symstd, false, loc) == FAILURE)
2780 {
2781- if (gfc_option.warn_intrinsics_std)
2782- gfc_warning_now ("The intrinsic '%s' at %L is not included in the"
2783- " selected standard but %s and '%s' will be treated as"
2784- " if declared EXTERNAL. Use an appropriate -std=*"
2785- " option or define -fall-intrinsics to allow this"
2786- " intrinsic.", sym->name, &loc, symstd, sym->name);
2787- sym->attr.external = 1;
2788+ if (sym->attr.proc == PROC_UNKNOWN)
2789+ {
2790+ if (gfc_option.warn_intrinsics_std)
2791+ gfc_warning_now ("The intrinsic '%s' at %L is not included in the"
2792+ " selected standard but %s and '%s' will be"
2793+ " treated as if declared EXTERNAL. Use an"
2794+ " appropriate -std=* option or define"
2795+ " -fall-intrinsics to allow this intrinsic.",
2796+ sym->name, &loc, symstd, sym->name);
2797+ gfc_add_external (&sym->attr, &loc);
2798+ }
2799
2800 return false;
2801 }
2802diff -Naur gcc-4.4.1.orig/gcc/fortran/iresolve.c gcc-4.4.1/gcc/fortran/iresolve.c
2803--- gcc-4.4.1.orig/gcc/fortran/iresolve.c 2008-11-01 06:26:19.000000000 -0700
2804+++ gcc-4.4.1/gcc/fortran/iresolve.c 2009-08-16 13:04:40.000000000 -0700
2805@@ -2346,9 +2346,19 @@
2806 /* TODO: Make this do something meaningful. */
2807 static char transfer0[] = "__transfer0", transfer1[] = "__transfer1";
2808
2809- if (mold->ts.type == BT_CHARACTER && !mold->ts.cl->length
2810- && !(mold->expr_type == EXPR_VARIABLE && mold->symtree->n.sym->attr.dummy))
2811- mold->ts.cl->length = gfc_int_expr (mold->value.character.length);
2812+ if (mold->ts.type == BT_CHARACTER
2813+ && !mold->ts.cl->length
2814+ && gfc_is_constant_expr (mold))
2815+ {
2816+ int len;
2817+ if (mold->expr_type == EXPR_CONSTANT)
2818+ mold->ts.cl->length = gfc_int_expr (mold->value.character.length);
2819+ else
2820+ {
2821+ len = mold->value.constructor->expr->value.character.length;
2822+ mold->ts.cl->length = gfc_int_expr (len);
2823+ }
2824+ }
2825
2826 f->ts = mold->ts;
2827
2828diff -Naur gcc-4.4.1.orig/gcc/fortran/openmp.c gcc-4.4.1/gcc/fortran/openmp.c
2829--- gcc-4.4.1.orig/gcc/fortran/openmp.c 2008-07-19 09:22:12.000000000 -0700
2830+++ gcc-4.4.1/gcc/fortran/openmp.c 2009-07-28 09:33:08.000000000 -0700
2831@@ -396,12 +396,13 @@
2832 const char *p = gfc_extract_int (cexpr, &collapse);
2833 if (p)
2834 {
2835- gfc_error (p);
2836+ gfc_error_now (p);
2837 collapse = 1;
2838 }
2839 else if (collapse <= 0)
2840 {
2841- gfc_error ("COLLAPSE clause argument not constant positive integer at %C");
2842+ gfc_error_now ("COLLAPSE clause argument not"
2843+ " constant positive integer at %C");
2844 collapse = 1;
2845 }
2846 c->collapse = collapse;
2847diff -Naur gcc-4.4.1.orig/gcc/fortran/primary.c gcc-4.4.1/gcc/fortran/primary.c
2848--- gcc-4.4.1.orig/gcc/fortran/primary.c 2009-04-03 13:56:54.000000000 -0700
2849+++ gcc-4.4.1/gcc/fortran/primary.c 2009-09-05 07:25:39.000000000 -0700
2850@@ -1773,7 +1773,11 @@
2851 if (m != MATCH_YES)
2852 return MATCH_ERROR;
2853
2854- tbp = gfc_find_typebound_proc (sym, &t, name, false);
2855+ if (sym->f2k_derived)
2856+ tbp = gfc_find_typebound_proc (sym, &t, name, false);
2857+ else
2858+ tbp = NULL;
2859+
2860 if (tbp)
2861 {
2862 gfc_symbol* tbp_sym;
2863diff -Naur gcc-4.4.1.orig/gcc/fortran/resolve.c gcc-4.4.1/gcc/fortran/resolve.c
2864--- gcc-4.4.1.orig/gcc/fortran/resolve.c 2009-06-20 02:21:06.000000000 -0700
2865+++ gcc-4.4.1/gcc/fortran/resolve.c 2009-07-29 02:35:15.000000000 -0700
2866@@ -9414,7 +9414,7 @@
2867 if ((!a->save && !a->dummy && !a->pointer
2868 && !a->in_common && !a->use_assoc
2869 && !(a->function && sym != sym->result))
2870- || (a->dummy && a->intent == INTENT_OUT))
2871+ || (a->dummy && a->intent == INTENT_OUT && !a->pointer))
2872 apply_default_init (sym);
2873 }
2874
2875diff -Naur gcc-4.4.1.orig/gcc/fortran/trans-decl.c gcc-4.4.1/gcc/fortran/trans-decl.c
2876--- gcc-4.4.1.orig/gcc/fortran/trans-decl.c 2009-06-03 12:39:09.000000000 -0700
2877+++ gcc-4.4.1/gcc/fortran/trans-decl.c 2009-08-25 11:54:58.000000000 -0700
2878@@ -2826,7 +2826,8 @@
2879 gfc_init_block (&fnblock);
2880 for (f = proc_sym->formal; f; f = f->next)
2881 if (f->sym && f->sym->attr.intent == INTENT_OUT
2882- && f->sym->ts.type == BT_DERIVED)
2883+ && !f->sym->attr.pointer
2884+ && f->sym->ts.type == BT_DERIVED)
2885 {
2886 if (f->sym->ts.derived->attr.alloc_comp)
2887 {
2888@@ -3253,7 +3254,13 @@
2889 st = gfc_find_symtree (ns->sym_root,
2890 rent->local_name[0]
2891 ? rent->local_name : rent->use_name);
2892- gcc_assert (st && st->n.sym->attr.use_assoc);
2893+ gcc_assert (st);
2894+
2895+ /* Fixing-up doubly contained symbols, sometimes results in
2896+ ambiguity, which is caught here. */
2897+ if (!st->n.sym->attr.use_assoc)
2898+ continue;
2899+
2900 if (st->n.sym->backend_decl
2901 && DECL_P (st->n.sym->backend_decl)
2902 && st->n.sym->module
2903@@ -3573,6 +3580,7 @@
2904 automatic lengths. */
2905 if (sym->attr.dummy && !sym->attr.referenced
2906 && sym->ts.type == BT_DERIVED
2907+ && !sym->attr.pointer
2908 && sym->ts.derived->attr.alloc_comp
2909 && sym->attr.intent == INTENT_OUT)
2910 {
2911diff -Naur gcc-4.4.1.orig/gcc/java/lang.c gcc-4.4.1/gcc/java/lang.c
2912--- gcc-4.4.1.orig/gcc/java/lang.c 2008-09-17 14:39:13.000000000 -0700
2913+++ gcc-4.4.1/gcc/java/lang.c 2009-08-12 02:02:17.000000000 -0700
2914@@ -53,7 +53,7 @@
2915
2916 static int java_handle_option (size_t scode, const char *arg, int value);
2917 static void put_decl_string (const char *, int);
2918-static void put_decl_node (tree);
2919+static void put_decl_node (tree, int);
2920 static void java_print_error_function (diagnostic_context *, const char *,
2921 diagnostic_info *);
2922 static int merge_init_test_initialization (void * *, void *);
2923@@ -355,10 +355,13 @@
2924 decl_bufpos += len;
2925 }
2926
2927-/* Append to decl_buf a printable name for NODE. */
2928+/* Append to decl_buf a printable name for NODE.
2929+ Depending on VERBOSITY, more information about NODE
2930+ is printed. Read the comments of decl_printable_name in
2931+ langhooks.h for more. */
2932
2933 static void
2934-put_decl_node (tree node)
2935+put_decl_node (tree node, int verbosity)
2936 {
2937 int was_pointer = 0;
2938 if (TREE_CODE (node) == POINTER_TYPE)
2939@@ -370,17 +373,32 @@
2940 {
2941 if (TREE_CODE (node) == FUNCTION_DECL)
2942 {
2943+ if (verbosity == 0 && DECL_NAME (node))
2944+ /* We have been instructed to just print the bare name
2945+ of the function. */
2946+ {
2947+ put_decl_node (DECL_NAME (node), 0);
2948+ return;
2949+ }
2950+
2951 /* We want to print the type the DECL belongs to. We don't do
2952 that when we handle constructors. */
2953 if (! DECL_CONSTRUCTOR_P (node)
2954- && ! DECL_ARTIFICIAL (node) && DECL_CONTEXT (node))
2955+ && ! DECL_ARTIFICIAL (node) && DECL_CONTEXT (node)
2956+ /* We want to print qualified DECL names only
2957+ if verbosity is higher than 1. */
2958+ && verbosity >= 1)
2959 {
2960- put_decl_node (TYPE_NAME (DECL_CONTEXT (node)));
2961+ put_decl_node (TYPE_NAME (DECL_CONTEXT (node)),
2962+ verbosity);
2963 put_decl_string (".", 1);
2964 }
2965 if (! DECL_CONSTRUCTOR_P (node))
2966- put_decl_node (DECL_NAME (node));
2967- if (TREE_TYPE (node) != NULL_TREE)
2968+ put_decl_node (DECL_NAME (node), verbosity);
2969+ if (TREE_TYPE (node) != NULL_TREE
2970+ /* We want to print function parameters only if verbosity
2971+ is higher than 2. */
2972+ && verbosity >= 2)
2973 {
2974 int i = 0;
2975 tree args = TYPE_ARG_TYPES (TREE_TYPE (node));
2976@@ -391,19 +409,22 @@
2977 {
2978 if (i > 0)
2979 put_decl_string (",", 1);
2980- put_decl_node (TREE_VALUE (args));
2981+ put_decl_node (TREE_VALUE (args), verbosity);
2982 }
2983 put_decl_string (")", 1);
2984 }
2985 }
2986 else
2987- put_decl_node (DECL_NAME (node));
2988+ put_decl_node (DECL_NAME (node), verbosity);
2989 }
2990 else if (TYPE_P (node) && TYPE_NAME (node) != NULL_TREE)
2991 {
2992- if (TREE_CODE (node) == RECORD_TYPE && TYPE_ARRAY_P (node))
2993+ if (TREE_CODE (node) == RECORD_TYPE && TYPE_ARRAY_P (node)
2994+ /* Print detailed array information only if verbosity is higher
2995+ than 2. */
2996+ && verbosity >= 2)
2997 {
2998- put_decl_node (TYPE_ARRAY_ELEMENT (node));
2999+ put_decl_node (TYPE_ARRAY_ELEMENT (node), verbosity);
3000 put_decl_string("[]", 2);
3001 }
3002 else if (node == promoted_byte_type_node)
3003@@ -417,7 +438,7 @@
3004 else if (node == void_type_node && was_pointer)
3005 put_decl_string ("null", 4);
3006 else
3007- put_decl_node (TYPE_NAME (node));
3008+ put_decl_node (TYPE_NAME (node), verbosity);
3009 }
3010 else if (TREE_CODE (node) == IDENTIFIER_NODE)
3011 put_decl_string (IDENTIFIER_POINTER (node), IDENTIFIER_LENGTH (node));
3012@@ -434,10 +455,7 @@
3013 lang_printable_name (tree decl, int v)
3014 {
3015 decl_bufpos = 0;
3016- if (v == 0 && TREE_CODE (decl) == FUNCTION_DECL)
3017- put_decl_node (DECL_NAME (decl));
3018- else
3019- put_decl_node (decl);
3020+ put_decl_node (decl, v);
3021 put_decl_string ("", 1);
3022 return decl_buf;
3023 }
3024diff -Naur gcc-4.4.1.orig/gcc/longlong.h gcc-4.4.1/gcc/longlong.h
3025--- gcc-4.4.1.orig/gcc/longlong.h 2009-02-12 08:30:53.000000000 -0800
3026+++ gcc-4.4.1/gcc/longlong.h 2009-08-11 15:36:56.000000000 -0700
3027@@ -982,7 +982,7 @@
3028 " or r1,%0" \
3029 : "=r" (q), "=&z" (r) \
3030 : "1" (n1), "r" (n0), "rm" (d), "r" (&__udiv_qrnnd_16) \
3031- : "r1", "r2", "r4", "r5", "r6", "pr"); \
3032+ : "r1", "r2", "r4", "r5", "r6", "pr", "t"); \
3033 } while (0)
3034
3035 #define UDIV_TIME 80
3036@@ -990,7 +990,7 @@
3037 #define sub_ddmmss(sh, sl, ah, al, bh, bl) \
3038 __asm__ ("clrt;subc %5,%1; subc %4,%0" \
3039 : "=r" (sh), "=r" (sl) \
3040- : "0" (ah), "1" (al), "r" (bh), "r" (bl))
3041+ : "0" (ah), "1" (al), "r" (bh), "r" (bl) : "t")
3042
3043 #endif /* __sh__ */
3044
3045diff -Naur gcc-4.4.1.orig/gcc/Makefile.in gcc-4.4.1/gcc/Makefile.in
3046--- gcc-4.4.1.orig/gcc/Makefile.in 2009-05-21 16:17:37.000000000 -0700
3047+++ gcc-4.4.1/gcc/Makefile.in 2009-07-25 10:53:35.000000000 -0700
3048@@ -3975,7 +3975,7 @@
3049 # These next rules exist because the output name is not the same as
3050 # the input name, so our implicit %.pod rule will not work.
3051
3052-gcc.pod: invoke.texi cppenv.texi cppopts.texi
3053+gcc.pod: invoke.texi cppenv.texi cppopts.texi gcc-vers.texi
3054 $(STAMP) $@
3055 -$(TEXI2POD) $< > $@
3056 gfdl.pod: fdl.texi
3057diff -Naur gcc-4.4.1.orig/gcc/resource.c gcc-4.4.1/gcc/resource.c
3058--- gcc-4.4.1.orig/gcc/resource.c 2009-05-21 16:17:37.000000000 -0700
3059+++ gcc-4.4.1/gcc/resource.c 2009-07-22 16:22:24.000000000 -0700
3060@@ -945,10 +945,11 @@
3061
3062 /* If we found a basic block, get the live registers from it and update
3063 them with anything set or killed between its start and the insn before
3064- TARGET. Otherwise, we must assume everything is live. */
3065+ TARGET; this custom life analysis is really about registers so we need
3066+ to use the LR problem. Otherwise, we must assume everything is live. */
3067 if (b != -1)
3068 {
3069- regset regs_live = df_get_live_in (BASIC_BLOCK (b));
3070+ regset regs_live = DF_LR_IN (BASIC_BLOCK (b));
3071 rtx start_insn, stop_insn;
3072
3073 /* Compute hard regs live at start of block. */
3074@@ -1052,7 +1053,7 @@
3075 {
3076 HARD_REG_SET extra_live;
3077
3078- REG_SET_TO_HARD_REG_SET (extra_live, df_get_live_in (bb));
3079+ REG_SET_TO_HARD_REG_SET (extra_live, DF_LR_IN (bb));
3080 IOR_HARD_REG_SET (current_live_regs, extra_live);
3081 }
3082 }
3083diff -Naur gcc-4.4.1.orig/gcc/simplify-rtx.c gcc-4.4.1/gcc/simplify-rtx.c
3084--- gcc-4.4.1.orig/gcc/simplify-rtx.c 2009-02-20 07:20:38.000000000 -0800
3085+++ gcc-4.4.1/gcc/simplify-rtx.c 2009-09-07 13:25:52.000000000 -0700
3086@@ -2009,6 +2009,7 @@
3087 /* x*2 is x+x and x*(-1) is -x */
3088 if (GET_CODE (trueop1) == CONST_DOUBLE
3089 && SCALAR_FLOAT_MODE_P (GET_MODE (trueop1))
3090+ && !DECIMAL_FLOAT_MODE_P (GET_MODE (trueop1))
3091 && GET_MODE (op0) == mode)
3092 {
3093 REAL_VALUE_TYPE d;
3094@@ -5243,6 +5244,7 @@
3095 && GET_MODE_BITSIZE (innermode) >= (2 * GET_MODE_BITSIZE (outermode))
3096 && GET_CODE (XEXP (op, 1)) == CONST_INT
3097 && (INTVAL (XEXP (op, 1)) & (GET_MODE_BITSIZE (outermode) - 1)) == 0
3098+ && INTVAL (XEXP (op, 1)) >= 0
3099 && INTVAL (XEXP (op, 1)) < GET_MODE_BITSIZE (innermode)
3100 && byte == subreg_lowpart_offset (outermode, innermode))
3101 {
3102diff -Naur gcc-4.4.1.orig/gcc/testsuite/ada/acats/support/impdef.a gcc-4.4.1/gcc/testsuite/ada/acats/support/impdef.a
3103--- gcc-4.4.1.orig/gcc/testsuite/ada/acats/support/impdef.a 2006-01-26 12:39:16.000000000 -0800
3104+++ gcc-4.4.1/gcc/testsuite/ada/acats/support/impdef.a 2009-08-08 11:30:24.000000000 -0700
3105@@ -105,6 +105,8 @@
3106 Minimum_Task_Switch : constant Duration := 0.001;
3107 -- ^^^ --- MODIFY HERE AS NEEDED
3108
3109+ Long_Minimum_Task_Switch : constant Duration := 0.1;
3110+
3111 --=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====--
3112
3113 -- This is the time required to activate another task and allow it
3114@@ -117,13 +119,15 @@
3115 Switch_To_New_Task : constant Duration := 0.001;
3116 -- ^^^ -- MODIFY HERE AS NEEDED
3117
3118+ Long_Switch_To_New_Task : constant Duration := 0.1;
3119+
3120 --=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====--
3121
3122 -- This is the time which will clear the queues of other tasks
3123 -- waiting to run. It is expected that this will be about five
3124 -- times greater than Switch_To_New_Task.
3125
3126- Clear_Ready_Queue : constant Duration := 1.1;
3127+ Clear_Ready_Queue : constant Duration := 0.1;
3128 -- ^^^ --- MODIFY HERE AS NEEDED
3129
3130 --=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====--
3131diff -Naur gcc-4.4.1.orig/gcc/testsuite/ada/acats/tests/c9/c940005.a gcc-4.4.1/gcc/testsuite/ada/acats/tests/c9/c940005.a
3132--- gcc-4.4.1.orig/gcc/testsuite/ada/acats/tests/c9/c940005.a 2003-10-27 03:29:00.000000000 -0800
3133+++ gcc-4.4.1/gcc/testsuite/ada/acats/tests/c9/c940005.a 2009-08-08 11:30:24.000000000 -0700
3134@@ -85,7 +85,7 @@
3135 -- In reality one would expect a time of 5 to 10 seconds. In
3136 -- the interests of speeding up the test suite a shorter time
3137 -- is used
3138- Pulse_Time_Delta : constant duration := ImpDef.Switch_To_New_Task;
3139+ Pulse_Time_Delta : constant duration := ImpDef.Long_Switch_To_New_Task;
3140
3141 -- control over stopping tasks
3142 protected Control is
3143diff -Naur gcc-4.4.1.orig/gcc/testsuite/ada/acats/tests/c9/c940007.a gcc-4.4.1/gcc/testsuite/ada/acats/tests/c9/c940007.a
3144--- gcc-4.4.1.orig/gcc/testsuite/ada/acats/tests/c9/c940007.a 2003-10-27 03:29:00.000000000 -0800
3145+++ gcc-4.4.1/gcc/testsuite/ada/acats/tests/c9/c940007.a 2009-08-08 11:30:24.000000000 -0700
3146@@ -90,7 +90,7 @@
3147 -- In reality one would expect a time of 5 to 10 seconds. In
3148 -- the interests of speeding up the test suite a shorter time
3149 -- is used
3150- Pulse_Time_Delta : constant duration := ImpDef.Switch_To_New_Task;
3151+ Pulse_Time_Delta : constant duration := ImpDef.Long_Switch_To_New_Task;
3152
3153
3154 -- control over stopping tasks
3155diff -Naur gcc-4.4.1.orig/gcc/testsuite/ada/acats/tests/c9/c94001c.ada gcc-4.4.1/gcc/testsuite/ada/acats/tests/c9/c94001c.ada
3156--- gcc-4.4.1.orig/gcc/testsuite/ada/acats/tests/c9/c94001c.ada 2003-10-27 03:29:00.000000000 -0800
3157+++ gcc-4.4.1/gcc/testsuite/ada/acats/tests/c9/c94001c.ada 2009-08-08 11:30:24.000000000 -0700
3158@@ -209,7 +209,7 @@
3159
3160 BEGIN -- (E)
3161 WHILE NOT(OUT_TSK'TERMINATED) AND DELAY_COUNT < 60 LOOP
3162- DELAY 1.0 * Impdef.One_Second;
3163+ DELAY 1.0 * Impdef.One_Long_Second;
3164 DELAY_COUNT := DELAY_COUNT + 1;
3165 END LOOP;
3166 IF DELAY_COUNT = 60 THEN
3167@@ -252,7 +252,7 @@
3168
3169 BEGIN
3170 WHILE NOT(OUT_TSK'TERMINATED) AND DELAY_COUNT < 60 LOOP
3171- DELAY 1.0 * Impdef.One_Second;
3172+ DELAY 1.0 * Impdef.One_Long_Second;
3173 DELAY_COUNT := DELAY_COUNT + 1;
3174 END LOOP;
3175 IF DELAY_COUNT = 60 THEN
3176diff -Naur gcc-4.4.1.orig/gcc/testsuite/ada/acats/tests/c9/c94006a.ada gcc-4.4.1/gcc/testsuite/ada/acats/tests/c9/c94006a.ada
3177--- gcc-4.4.1.orig/gcc/testsuite/ada/acats/tests/c9/c94006a.ada 2003-10-27 03:29:00.000000000 -0800
3178+++ gcc-4.4.1/gcc/testsuite/ada/acats/tests/c9/c94006a.ada 2009-08-08 11:30:24.000000000 -0700
3179@@ -42,7 +42,7 @@
3180 SELECT
3181 ACCEPT E;
3182 OR
3183- DELAY 30.0 * Impdef.One_Second;
3184+ DELAY 30.0 * Impdef.One_Long_Second;
3185 END SELECT;
3186 END TT;
3187
3188diff -Naur gcc-4.4.1.orig/gcc/testsuite/ada/acats/tests/c9/c94008c.ada gcc-4.4.1/gcc/testsuite/ada/acats/tests/c9/c94008c.ada
3189--- gcc-4.4.1.orig/gcc/testsuite/ada/acats/tests/c9/c94008c.ada 2003-10-27 03:29:00.000000000 -0800
3190+++ gcc-4.4.1/gcc/testsuite/ada/acats/tests/c9/c94008c.ada 2009-08-08 11:30:24.000000000 -0700
3191@@ -202,7 +202,7 @@
3192 DELAY 10.0 * Impdef.One_Second;
3193
3194 IF TERMINATE_COUNT.GET /= 1 THEN
3195- DELAY 20.0 * Impdef.One_Second;
3196+ DELAY 20.0 * Impdef.One_Long_Second;
3197 END IF;
3198
3199 IF TERMINATE_COUNT.GET /= 1 THEN
3200@@ -243,7 +243,7 @@
3201 DELAY 10.0 * Impdef.One_Second; -- WAIT FOR T1, T2, AND T3 TO GET TO SELECT STMTS.
3202
3203 IF TERMINATE_COUNT.GET /= 3 THEN
3204- DELAY 20.0 * Impdef.One_Second;
3205+ DELAY 20.0 * Impdef.One_Long_Second;
3206 END IF;
3207
3208 IF TERMINATE_COUNT.GET /= 3 THEN
3209diff -Naur gcc-4.4.1.orig/gcc/testsuite/ada/acats/tests/c9/c951002.a gcc-4.4.1/gcc/testsuite/ada/acats/tests/c9/c951002.a
3210--- gcc-4.4.1.orig/gcc/testsuite/ada/acats/tests/c9/c951002.a 2003-10-27 03:29:00.000000000 -0800
3211+++ gcc-4.4.1/gcc/testsuite/ada/acats/tests/c9/c951002.a 2009-08-08 11:30:24.000000000 -0700
3212@@ -278,14 +278,14 @@
3213 -- Wait until the message is queued on the entry before starting
3214 -- the Credit_Task
3215 while not Hold.TC_Message_is_Queued loop
3216- delay ImpDef.Minimum_Task_Switch;
3217+ delay ImpDef.Long_Minimum_Task_Switch;
3218 end loop;
3219 --
3220 Credit_Task.TC_Start;
3221
3222 -- Ensure the first part of the test is complete before continuing
3223 while not (Credit_Message'terminated and Credit_Task'terminated) loop
3224- delay ImpDef.Minimum_Task_Switch;
3225+ delay ImpDef.Long_Minimum_Task_Switch;
3226 end loop;
3227
3228 --======================================================
3229@@ -298,12 +298,12 @@
3230 -- for it to reach the accept statement and call Hold.Set_DB_Overload
3231 -- before starting Debit_Message
3232 --
3233- delay ImpDef.Switch_To_New_Task;
3234+ delay ImpDef.Long_Switch_To_New_Task;
3235
3236 Debit_Message.TC_Start;
3237
3238 while not Debit_Task'terminated loop
3239- delay ImpDef.Minimum_Task_Switch;
3240+ delay ImpDef.Long_Minimum_Task_Switch;
3241 end loop;
3242
3243 Hold.Clear_DB_Overload; -- Allow completion
3244diff -Naur gcc-4.4.1.orig/gcc/testsuite/ada/acats/tests/c9/c954a01.a gcc-4.4.1/gcc/testsuite/ada/acats/tests/c9/c954a01.a
3245--- gcc-4.4.1.orig/gcc/testsuite/ada/acats/tests/c9/c954a01.a 2003-10-27 03:29:00.000000000 -0800
3246+++ gcc-4.4.1/gcc/testsuite/ada/acats/tests/c9/c954a01.a 2009-08-08 11:30:24.000000000 -0700
3247@@ -148,7 +148,7 @@
3248 end select;
3249
3250 -- Allow other tasks to get control
3251- delay ImpDef.Minimum_Task_Switch;
3252+ delay ImpDef.Long_Minimum_Task_Switch;
3253
3254 end loop;
3255
3256@@ -175,7 +175,7 @@
3257
3258 procedure C954A01 is
3259
3260- Long_Enough : constant Duration := ImpDef.Switch_To_New_Task;
3261+ Long_Enough : constant Duration := ImpDef.Long_Switch_To_New_Task;
3262
3263 --==============================================--
3264
3265diff -Naur gcc-4.4.1.orig/gcc/testsuite/ada/acats/tests/c9/c96001a.ada gcc-4.4.1/gcc/testsuite/ada/acats/tests/c9/c96001a.ada
3266--- gcc-4.4.1.orig/gcc/testsuite/ada/acats/tests/c9/c96001a.ada 2003-10-27 03:29:00.000000000 -0800
3267+++ gcc-4.4.1/gcc/testsuite/ada/acats/tests/c9/c96001a.ada 2009-08-08 11:30:24.000000000 -0700
3268@@ -51,7 +51,7 @@
3269 ---------------------------------------------
3270
3271 DECLARE -- (A)
3272- X : DURATION := 5.0;
3273+ X : DURATION := 5.0 * Impdef.One_Second;
3274 OLD_TIME : TIME;
3275 LAPSE : DURATION;
3276 BEGIN -- (A)
3277diff -Naur gcc-4.4.1.orig/gcc/testsuite/ada/acats/tests/c9/c97307a.ada gcc-4.4.1/gcc/testsuite/ada/acats/tests/c9/c97307a.ada
3278--- gcc-4.4.1.orig/gcc/testsuite/ada/acats/tests/c9/c97307a.ada 2003-10-27 03:29:00.000000000 -0800
3279+++ gcc-4.4.1/gcc/testsuite/ada/acats/tests/c9/c97307a.ada 2009-08-08 11:30:24.000000000 -0700
3280@@ -160,7 +160,7 @@
3281 EXPIRED.READ (EXPIRED_CALLS);
3282 EXIT WHEN E'COUNT >= DESIRED_QUEUE_LENGTH -
3283 EXPIRED_CALLS;
3284- DELAY 2.0 * Impdef.One_Second;
3285+ DELAY 2.0 * Impdef.One_Long_Second;
3286 END LOOP;
3287 EXIT WHEN DESIRED_QUEUE_LENGTH = 5;
3288 DISPATCH.READY;
3289@@ -171,7 +171,7 @@
3290 -- LET THE TIMED ENTRY CALLS ISSUED BY CALLER1,
3291 -- CALLER3, AND CALLER5 EXPIRE:
3292
3293- DELAY DELAY_TIME + 10.0 * Impdef.One_Second;
3294+ DELAY DELAY_TIME + 10.0 * Impdef.One_Long_Second;
3295
3296 -- AT THIS POINT, ALL THE TIMED ENTRY CALLS MUST HAVE
3297 -- EXPIRED AND BEEN REMOVED FROM THE ENTRY QUEUE FOR E,
3298diff -Naur gcc-4.4.1.orig/gcc/testsuite/gcc.c-torture/compile/limits-fndefn.c gcc-4.4.1/gcc/testsuite/gcc.c-torture/compile/limits-fndefn.c
3299--- gcc-4.4.1.orig/gcc/testsuite/gcc.c-torture/compile/limits-fndefn.c 2008-12-29 02:31:14.000000000 -0800
3300+++ gcc-4.4.1/gcc/testsuite/gcc.c-torture/compile/limits-fndefn.c 2009-08-28 02:57:51.000000000 -0700
3301@@ -1,4 +1,5 @@
3302 /* { dg-skip-if "too complex for avr and picochip" { picochip-*-* avr-*-* } { "*" } { "" } } */
3303+/* { dg-timeout-factor 4.0 } */
3304 #define LIM1(x) x##0, x##1, x##2, x##3, x##4, x##5, x##6, x##7, x##8, x##9,
3305 #define LIM2(x) LIM1(x##0) LIM1(x##1) LIM1(x##2) LIM1(x##3) LIM1(x##4) \
3306 LIM1(x##5) LIM1(x##6) LIM1(x##7) LIM1(x##8) LIM1(x##9)
3307diff -Naur gcc-4.4.1.orig/gcc/testsuite/gcc.c-torture/compile/pr40321.c gcc-4.4.1/gcc/testsuite/gcc.c-torture/compile/pr40321.c
3308--- gcc-4.4.1.orig/gcc/testsuite/gcc.c-torture/compile/pr40321.c 1969-12-31 16:00:00.000000000 -0800
3309+++ gcc-4.4.1/gcc/testsuite/gcc.c-torture/compile/pr40321.c 2009-07-22 07:45:21.000000000 -0700
3310@@ -0,0 +1,12 @@
3311+struct X { int flag; int pos; };
3312+int foo(struct X *a, struct X *b)
3313+{
3314+ while (1)
3315+ {
3316+ if (a->flag)
3317+ break;
3318+ ({ struct X *tmp = a; a = b; b = tmp; });
3319+ }
3320+
3321+ return a->pos + b->pos;
3322+}
3323diff -Naur gcc-4.4.1.orig/gcc/testsuite/gcc.c-torture/compile/pr40570.c gcc-4.4.1/gcc/testsuite/gcc.c-torture/compile/pr40570.c
3324--- gcc-4.4.1.orig/gcc/testsuite/gcc.c-torture/compile/pr40570.c 1969-12-31 16:00:00.000000000 -0800
3325+++ gcc-4.4.1/gcc/testsuite/gcc.c-torture/compile/pr40570.c 2009-08-05 07:45:15.000000000 -0700
3326@@ -0,0 +1,22 @@
3327+extern void anything(int);
3328+
3329+static int foo(int i);
3330+
3331+static int bar(int i) { foo(i); }
3332+
3333+extern int j;
3334+
3335+static int foo(int i)
3336+{
3337+ if (j)
3338+ anything(j);
3339+ return bar(i);
3340+}
3341+
3342+int baz()
3343+{
3344+ foo(0);
3345+ if (baz())
3346+ return 1;
3347+ return 0;
3348+}
3349diff -Naur gcc-4.4.1.orig/gcc/testsuite/gcc.c-torture/compile/pr40676.c gcc-4.4.1/gcc/testsuite/gcc.c-torture/compile/pr40676.c
3350--- gcc-4.4.1.orig/gcc/testsuite/gcc.c-torture/compile/pr40676.c 1969-12-31 16:00:00.000000000 -0800
3351+++ gcc-4.4.1/gcc/testsuite/gcc.c-torture/compile/pr40676.c 2009-07-23 10:50:56.000000000 -0700
3352@@ -0,0 +1,33 @@
3353+extern int f1();
3354+extern int f2(void*);
3355+extern void* f3(int);
3356+int xmsih;
3357+typedef unsigned short XWCHAR;
3358+
3359+inline unsigned int xstrlenW( const XWCHAR *str )
3360+{
3361+ const XWCHAR *s = str;
3362+ while (*s) s++;
3363+ return s - str;
3364+}
3365+
3366+
3367+static int msi_dialog_register_class( void )
3368+{
3369+ int cls;
3370+
3371+ if( !f2( &cls ) )
3372+ return 0;
3373+ if( !f2( &cls ) )
3374+ return 0;
3375+ xmsih = f1();
3376+ if( !xmsih )
3377+ return 0;
3378+ return 1;
3379+}
3380+
3381+void *xmsi_dialog_create(const XWCHAR* szDialogName)
3382+{
3383+ msi_dialog_register_class();
3384+ return f3(xstrlenW(szDialogName));
3385+}
3386diff -Naur gcc-4.4.1.orig/gcc/testsuite/gcc.c-torture/compile/pr40692.c gcc-4.4.1/gcc/testsuite/gcc.c-torture/compile/pr40692.c
3387--- gcc-4.4.1.orig/gcc/testsuite/gcc.c-torture/compile/pr40692.c 1969-12-31 16:00:00.000000000 -0800
3388+++ gcc-4.4.1/gcc/testsuite/gcc.c-torture/compile/pr40692.c 2009-07-23 10:50:56.000000000 -0700
3389@@ -0,0 +1,15 @@
3390+/* PR middle-end/40692 */
3391+
3392+#define M1(x) (((x) & 0x00000002) ? 0x2 : ((x) & 0x1))
3393+#define M2(x) (((x) & 0x0000000c) ? M1 ((x) >> 2) << 2 : M1 (x))
3394+#define M3(x) (((x) & 0x000000f0) ? M2 ((x) >> 4) << 4 : M2 (x))
3395+#define M4(x) (((x) & 0x0000ff00) ? M3 ((x) >> 8) << 8 : M3 (x))
3396+#define M5(x) (((x) & 0xffff0000) ? M4 ((x) >> 16) << 16 : M4 (x))
3397+
3398+struct A { char e; char f; };
3399+
3400+long
3401+foo (void)
3402+{
3403+ return M5 (4096UL - (long) &((struct A *) 0)->f);
3404+}
3405diff -Naur gcc-4.4.1.orig/gcc/testsuite/gcc.c-torture/compile/pr40753.c gcc-4.4.1/gcc/testsuite/gcc.c-torture/compile/pr40753.c
3406--- gcc-4.4.1.orig/gcc/testsuite/gcc.c-torture/compile/pr40753.c 1969-12-31 16:00:00.000000000 -0800
3407+++ gcc-4.4.1/gcc/testsuite/gcc.c-torture/compile/pr40753.c 2009-07-23 10:50:56.000000000 -0700
3408@@ -0,0 +1,20 @@
3409+typedef struct {
3410+ unsigned nargs;
3411+} ffi_cif;
3412+typedef struct {
3413+ char tramp[24];
3414+ ffi_cif *cif;
3415+} ffi_closure;
3416+extern void *memcpy (void *, const void *, __SIZE_TYPE__);
3417+extern void ffi_closure_LINUX64 (void);
3418+
3419+int
3420+ffi_prep_closure_loc (ffi_closure *closure, ffi_cif *cif)
3421+{
3422+ void **tramp = (void **) &closure->tramp[0];
3423+
3424+ memcpy (tramp, (char *) ffi_closure_LINUX64, 16);
3425+ closure->cif = cif;
3426+
3427+ return 0;
3428+}
3429diff -Naur gcc-4.4.1.orig/gcc/testsuite/gcc.c-torture/compile/pr40964.c gcc-4.4.1/gcc/testsuite/gcc.c-torture/compile/pr40964.c
3430--- gcc-4.4.1.orig/gcc/testsuite/gcc.c-torture/compile/pr40964.c 1969-12-31 16:00:00.000000000 -0800
3431+++ gcc-4.4.1/gcc/testsuite/gcc.c-torture/compile/pr40964.c 2009-08-16 13:23:57.000000000 -0700
3432@@ -0,0 +1,10 @@
3433+struct alloc2 {
3434+ int bla;
3435+ char * __restrict data;
3436+ char * __restrict data2;
3437+};
3438+struct alloc2 b;
3439+void * f (void)
3440+{
3441+ return b.data;
3442+}
3443diff -Naur gcc-4.4.1.orig/gcc/testsuite/gcc.c-torture/compile/pr41006-1.c gcc-4.4.1/gcc/testsuite/gcc.c-torture/compile/pr41006-1.c
3444--- gcc-4.4.1.orig/gcc/testsuite/gcc.c-torture/compile/pr41006-1.c 1969-12-31 16:00:00.000000000 -0800
3445+++ gcc-4.4.1/gcc/testsuite/gcc.c-torture/compile/pr41006-1.c 2009-08-16 13:23:57.000000000 -0700
3446@@ -0,0 +1,17 @@
3447+typedef int (*FARPROC)();
3448+
3449+typedef int (*LPFN_ACCEPTEX)(void*);
3450+static LPFN_ACCEPTEX acceptex_fn;
3451+
3452+int xWSAIoctl(void*);
3453+static void get_fn(FARPROC* fn)
3454+{
3455+ FARPROC func;
3456+ if (!xWSAIoctl( &func))
3457+ *fn = func;
3458+}
3459+
3460+void get_fn_pointers()
3461+{
3462+ get_fn((FARPROC*)&acceptex_fn);
3463+}
3464diff -Naur gcc-4.4.1.orig/gcc/testsuite/gcc.c-torture/compile/pr41006-2.c gcc-4.4.1/gcc/testsuite/gcc.c-torture/compile/pr41006-2.c
3465--- gcc-4.4.1.orig/gcc/testsuite/gcc.c-torture/compile/pr41006-2.c 1969-12-31 16:00:00.000000000 -0800
3466+++ gcc-4.4.1/gcc/testsuite/gcc.c-torture/compile/pr41006-2.c 2009-08-16 13:23:57.000000000 -0700
3467@@ -0,0 +1,15 @@
3468+typedef int *FARPROC;
3469+static int * __restrict__ acceptex_fn;
3470+
3471+int xWSAIoctl(void*);
3472+static void get_fn(FARPROC* fn)
3473+{
3474+ FARPROC func;
3475+ if (!xWSAIoctl( &func))
3476+ *fn = func;
3477+}
3478+
3479+void get_fn_pointers()
3480+{
3481+ get_fn((FARPROC*)&acceptex_fn);
3482+}
3483diff -Naur gcc-4.4.1.orig/gcc/testsuite/gcc.c-torture/compile/pr41016.c gcc-4.4.1/gcc/testsuite/gcc.c-torture/compile/pr41016.c
3484--- gcc-4.4.1.orig/gcc/testsuite/gcc.c-torture/compile/pr41016.c 1969-12-31 16:00:00.000000000 -0800
3485+++ gcc-4.4.1/gcc/testsuite/gcc.c-torture/compile/pr41016.c 2009-08-09 14:39:19.000000000 -0700
3486@@ -0,0 +1,17 @@
3487+typedef struct _IO_FILE FILE;
3488+void
3489+CompareRNAStructures (FILE * ofp, int start, int L, char *ss_true, char *ss)
3490+{
3491+ int i;
3492+ float agree = 0.;
3493+ float pairs = 0.;
3494+ float pairs_true = 0.;
3495+ for (i = 0; i < L; i++)
3496+ {
3497+ pairs_true += 1.;
3498+ agree += 1.;
3499+ }
3500+ if (((int) pairs % 2 != 0) || ((int) pairs_true % 2 != 0)
3501+ || ((int) agree % 2 != 0))
3502+ Die ("Error in CompareRNAStrutures(); odd number of paired nucleotides\n");
3503+}
3504diff -Naur gcc-4.4.1.orig/gcc/testsuite/gcc.c-torture/compile/pr41163.c gcc-4.4.1/gcc/testsuite/gcc.c-torture/compile/pr41163.c
3505--- gcc-4.4.1.orig/gcc/testsuite/gcc.c-torture/compile/pr41163.c 1969-12-31 16:00:00.000000000 -0800
3506+++ gcc-4.4.1/gcc/testsuite/gcc.c-torture/compile/pr41163.c 2009-08-29 19:06:32.000000000 -0700
3507@@ -0,0 +1,10 @@
3508+struct option {
3509+ void *value;
3510+};
3511+void parse_options (struct option *);
3512+void cmd_grep(void)
3513+{
3514+ struct option options[] = { { &options } };
3515+ parse_options(options);
3516+}
3517+
3518diff -Naur gcc-4.4.1.orig/gcc/testsuite/gcc.c-torture/compile/pr41181.c gcc-4.4.1/gcc/testsuite/gcc.c-torture/compile/pr41181.c
3519--- gcc-4.4.1.orig/gcc/testsuite/gcc.c-torture/compile/pr41181.c 1969-12-31 16:00:00.000000000 -0800
3520+++ gcc-4.4.1/gcc/testsuite/gcc.c-torture/compile/pr41181.c 2009-09-10 11:57:46.000000000 -0700
3521@@ -0,0 +1,10 @@
3522+char paths[1024];
3523+static void x264_slicetype_path(char (*best_paths)[250], int n, int length)
3524+{
3525+ __builtin_memcpy (best_paths[n], paths, length);
3526+}
3527+void x264_slicetype_analyse(int n, int length)
3528+{
3529+ char best_paths[250][250];
3530+ x264_slicetype_path (best_paths, n, length);
3531+}
3532diff -Naur gcc-4.4.1.orig/gcc/testsuite/gcc.c-torture/compile/pr41282.c gcc-4.4.1/gcc/testsuite/gcc.c-torture/compile/pr41282.c
3533--- gcc-4.4.1.orig/gcc/testsuite/gcc.c-torture/compile/pr41282.c 1969-12-31 16:00:00.000000000 -0800
3534+++ gcc-4.4.1/gcc/testsuite/gcc.c-torture/compile/pr41282.c 2009-09-10 11:57:46.000000000 -0700
3535@@ -0,0 +1,20 @@
3536+struct S
3537+{
3538+ unsigned int iu;
3539+};
3540+
3541+union U
3542+{
3543+ struct S s;
3544+ signed int is;
3545+};
3546+
3547+extern signed int bar ();
3548+
3549+struct S foo (void)
3550+{
3551+ union U u;
3552+
3553+ u.is = bar ();
3554+ return u.s;
3555+}
3556diff -Naur gcc-4.4.1.orig/gcc/testsuite/gcc.dg/20010912-1.c gcc-4.4.1/gcc/testsuite/gcc.dg/20010912-1.c
3557--- gcc-4.4.1.orig/gcc/testsuite/gcc.dg/20010912-1.c 2005-10-15 18:14:19.000000000 -0700
3558+++ gcc-4.4.1/gcc/testsuite/gcc.dg/20010912-1.c 2009-07-27 23:56:49.000000000 -0700
3559@@ -1,6 +1,5 @@
3560 /* { dg-do run { target fpic } } */
3561 /* { dg-options "-O2 -fpic" } */
3562-/* { dg-bogus "\[Uu\]nresolved symbol .(_GLOBAL_OFFSET_TABLE_|\[_.A-Za-z\]\[_.0-9A-Za-z\]*@(PLT|GOT|GOTOFF))" "PIC unsupported" { xfail *-*-netware* } 0 } */
3563
3564 extern void abort (void);
3565 extern void exit (int);
3566diff -Naur gcc-4.4.1.orig/gcc/testsuite/gcc.dg/20021018-1.c gcc-4.4.1/gcc/testsuite/gcc.dg/20021018-1.c
3567--- gcc-4.4.1.orig/gcc/testsuite/gcc.dg/20021018-1.c 2005-10-15 18:14:19.000000000 -0700
3568+++ gcc-4.4.1/gcc/testsuite/gcc.dg/20021018-1.c 2009-07-27 23:56:49.000000000 -0700
3569@@ -1,6 +1,5 @@
3570 /* { dg-do run { target fpic } } */
3571 /* { dg-options "-O2 -fpic" } */
3572-/* { dg-bogus "\[Uu\]nresolved symbol .(_GLOBAL_OFFSET_TABLE_|\[_.A-Za-z\]\[_.0-9A-Za-z\]*@(PLT|GOT|GOTOFF))" "PIC unsupported" { xfail *-*-netware* } 0 } */
3573
3574 extern void abort (void);
3575 extern void exit (int);
3576diff -Naur gcc-4.4.1.orig/gcc/testsuite/gcc.dg/20030213-1.c gcc-4.4.1/gcc/testsuite/gcc.dg/20030213-1.c
3577--- gcc-4.4.1.orig/gcc/testsuite/gcc.dg/20030213-1.c 2005-10-15 18:14:19.000000000 -0700
3578+++ gcc-4.4.1/gcc/testsuite/gcc.dg/20030213-1.c 2009-07-27 23:56:49.000000000 -0700
3579@@ -1,7 +1,6 @@
3580 /* Testcase for http://gcc.gnu.org/ml/gcc-patches/2003-02/msg01017.html */
3581 /* { dg-do link { target fpic } } */
3582 /* { dg-options "-O -fpic" } */
3583-/* { dg-bogus "\[Uu\]nresolved symbol .(_GLOBAL_OFFSET_TABLE_|\[_.A-Za-z\]\[_.0-9A-Za-z\]*@(PLT|GOT|GOTOFF))" "PIC unsupported" { xfail *-*-netware* } 0 } */
3584
3585 int *g;
3586
3587diff -Naur gcc-4.4.1.orig/gcc/testsuite/gcc.dg/20030225-1.c gcc-4.4.1/gcc/testsuite/gcc.dg/20030225-1.c
3588--- gcc-4.4.1.orig/gcc/testsuite/gcc.dg/20030225-1.c 2005-10-15 18:14:19.000000000 -0700
3589+++ gcc-4.4.1/gcc/testsuite/gcc.dg/20030225-1.c 2009-07-27 23:56:49.000000000 -0700
3590@@ -5,7 +5,6 @@
3591 and Benjamin Herrenschmidt <benh@kernel.crashing.org>. */
3592 /* { dg-do run { target fpic } } */
3593 /* { dg-options "-O2 -fPIC" } */
3594-/* { dg-bogus "\[Uu\]nresolved symbol .(_GLOBAL_OFFSET_TABLE_|\[_.A-Za-z\]\[_.0-9A-Za-z\]*@(PLT|GOT|GOTOFF))" "PIC unsupported" { xfail *-*-netware* } 0 } */
3595
3596 extern void exit (int);
3597
3598diff -Naur gcc-4.4.1.orig/gcc/testsuite/gcc.dg/20030708-1.c gcc-4.4.1/gcc/testsuite/gcc.dg/20030708-1.c
3599--- gcc-4.4.1.orig/gcc/testsuite/gcc.dg/20030708-1.c 2005-10-15 18:14:19.000000000 -0700
3600+++ gcc-4.4.1/gcc/testsuite/gcc.dg/20030708-1.c 2009-07-27 23:56:49.000000000 -0700
3601@@ -1,7 +1,6 @@
3602 /* PR c/11420 */
3603 /* { dg-do link { target fpic } } */
3604 /* { dg-options "-O2 -fpic" } */
3605-/* { dg-bogus "\[Uu\]nresolved symbol .(_GLOBAL_OFFSET_TABLE_|\[_.A-Za-z\]\[_.0-9A-Za-z\]*@(PLT|GOT|GOTOFF))" "PIC unsupported" { xfail *-*-netware* } 0 } */
3606
3607 void (* volatile fn) (void);
3608 static void foo (void)
3609diff -Naur gcc-4.4.1.orig/gcc/testsuite/gcc.dg/20050321-2.c gcc-4.4.1/gcc/testsuite/gcc.dg/20050321-2.c
3610--- gcc-4.4.1.orig/gcc/testsuite/gcc.dg/20050321-2.c 2006-04-13 16:14:25.000000000 -0700
3611+++ gcc-4.4.1/gcc/testsuite/gcc.dg/20050321-2.c 2009-07-27 23:56:49.000000000 -0700
3612@@ -5,7 +5,6 @@
3613 figure out branch to lab is too far. */
3614 /* { dg-do link { target fpic } } */
3615 /* { dg-options "-g1 -fpic" } */
3616-/* { dg-bogus "\[Uu\]nresolved symbol .(_GLOBAL_OFFSET_TABLE_|\[_.A-Za-z\]\[_.0-9A-Za-z\]*@(PLT|GOT|GOTOFF))" "PIC unsupported" { xfail *-*-netware* } 0 } */
3617 /* { dg-require-effective-target int32plus } */
3618
3619 #define A(n) \
3620diff -Naur gcc-4.4.1.orig/gcc/testsuite/gcc.dg/20090902-1.c gcc-4.4.1/gcc/testsuite/gcc.dg/20090902-1.c
3621--- gcc-4.4.1.orig/gcc/testsuite/gcc.dg/20090902-1.c 1969-12-31 16:00:00.000000000 -0800
3622+++ gcc-4.4.1/gcc/testsuite/gcc.dg/20090902-1.c 2009-09-02 11:47:29.000000000 -0700
3623@@ -0,0 +1,3 @@
3624+/* { dg-do compile } */
3625+#define STRING(x) #x
3626+char buf[] = STRING(L'\x123');
3627diff -Naur gcc-4.4.1.orig/gcc/testsuite/gcc.dg/bitfld-15.c gcc-4.4.1/gcc/testsuite/gcc.dg/bitfld-15.c
3628--- gcc-4.4.1.orig/gcc/testsuite/gcc.dg/bitfld-15.c 2009-01-25 12:15:44.000000000 -0800
3629+++ gcc-4.4.1/gcc/testsuite/gcc.dg/bitfld-15.c 2009-07-27 23:56:49.000000000 -0700
3630@@ -1,6 +1,7 @@
3631 /* { dg-do compile } */
3632 /* Remove pedantic. Allow the GCC extension to use char for bitfields. */
3633 /* { dg-options "" } */
3634+/* { dg-options "-mno-ms-bitfields" { target i?86-*-netware } } */
3635
3636 struct t
3637 {
3638diff -Naur gcc-4.4.1.orig/gcc/testsuite/gcc.dg/bitfld-16.c gcc-4.4.1/gcc/testsuite/gcc.dg/bitfld-16.c
3639--- gcc-4.4.1.orig/gcc/testsuite/gcc.dg/bitfld-16.c 2009-01-22 22:29:54.000000000 -0800
3640+++ gcc-4.4.1/gcc/testsuite/gcc.dg/bitfld-16.c 2009-07-27 23:56:49.000000000 -0700
3641@@ -1,5 +1,6 @@
3642 /* { dg-do compile } */
3643 /* { dg-options "-Wno-packed-bitfield-compat" } */
3644+/* { dg-options "-Wno-packed-bitfield-compat -mno-ms-bitfields" { target i?86-*-netware } } */
3645
3646 struct t
3647 {
3648diff -Naur gcc-4.4.1.orig/gcc/testsuite/gcc.dg/bitfld-17.c gcc-4.4.1/gcc/testsuite/gcc.dg/bitfld-17.c
3649--- gcc-4.4.1.orig/gcc/testsuite/gcc.dg/bitfld-17.c 2009-01-25 12:15:44.000000000 -0800
3650+++ gcc-4.4.1/gcc/testsuite/gcc.dg/bitfld-17.c 2009-07-27 23:56:49.000000000 -0700
3651@@ -1,5 +1,6 @@
3652 /* { dg-do compile } */
3653 /* { dg-options "" } */
3654+/* { dg-options "-mno-ms-bitfields" { target i?86-*-netware } } */
3655
3656 struct t
3657 {
3658diff -Naur gcc-4.4.1.orig/gcc/testsuite/gcc.dg/bitfld-18.c gcc-4.4.1/gcc/testsuite/gcc.dg/bitfld-18.c
3659--- gcc-4.4.1.orig/gcc/testsuite/gcc.dg/bitfld-18.c 2009-01-22 22:29:54.000000000 -0800
3660+++ gcc-4.4.1/gcc/testsuite/gcc.dg/bitfld-18.c 2009-07-27 23:56:49.000000000 -0700
3661@@ -1,5 +1,6 @@
3662 /* { dg-do compile } */
3663 /* { dg-options "-Wno-packed-bitfield-compat" } */
3664+/* { dg-options "-Wno-packed-bitfield-compat -mno-ms-bitfields" { target i?86-*-netware } } */
3665
3666 struct t
3667 {
3668diff -Naur gcc-4.4.1.orig/gcc/testsuite/gcc.dg/builtins-10.c gcc-4.4.1/gcc/testsuite/gcc.dg/builtins-10.c
3669--- gcc-4.4.1.orig/gcc/testsuite/gcc.dg/builtins-10.c 2005-03-09 12:11:48.000000000 -0800
3670+++ gcc-4.4.1/gcc/testsuite/gcc.dg/builtins-10.c 2009-08-24 02:52:03.000000000 -0700
3671@@ -25,7 +25,7 @@
3672 link_error ();
3673
3674 if (pow(pow(x,4.0),0.25) != x)
3675- link_error ();
3676+ /* XFAIL. PR41098. */;
3677 }
3678
3679 void test2(double x, double y, double z)
3680@@ -42,7 +42,7 @@
3681 if (pow(sqrt(x),y) != pow(x,y*0.5))
3682 link_error ();
3683
3684- if (pow(pow(x,y),z) != pow(x,y*z))
3685+ if (pow(pow(fabs(x),y),z) != pow(fabs(x),y*z))
3686 link_error ();
3687 }
3688
3689diff -Naur gcc-4.4.1.orig/gcc/testsuite/gcc.dg/builtins-config.h gcc-4.4.1/gcc/testsuite/gcc.dg/builtins-config.h
3690--- gcc-4.4.1.orig/gcc/testsuite/gcc.dg/builtins-config.h 2008-06-18 14:41:13.000000000 -0700
3691+++ gcc-4.4.1/gcc/testsuite/gcc.dg/builtins-config.h 2009-08-30 15:45:18.000000000 -0700
3692@@ -1,4 +1,4 @@
3693-/* Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation.
3694+/* Copyright (C) 2003, 2004, 2005, 2006, 2009 Free Software Foundation.
3695
3696 Define macros useful in tests for bulitin functions. */
3697
3698@@ -15,8 +15,8 @@
3699 /* Irix6 doesn't have the entire C99 runtime. */
3700 #elif defined(__AVR__)
3701 /* AVR doesn't have the entire C99 runtime. */
3702-#elif defined(__FreeBSD__) && (__FreeBSD__ < 5)
3703-/* FreeBSD before version 5 doesn't have the entire C99 runtime. */
3704+#elif defined(__FreeBSD__)
3705+/* FreeBSD up to at least version 8 lacks support for cexp and friends. */
3706 #elif defined(__netware__)
3707 /* NetWare doesn't have the entire C99 runtime. */
3708 #elif defined(__vxworks)
3709diff -Naur gcc-4.4.1.orig/gcc/testsuite/gcc.dg/c90-const-expr-2.c gcc-4.4.1/gcc/testsuite/gcc.dg/c90-const-expr-2.c
3710--- gcc-4.4.1.orig/gcc/testsuite/gcc.dg/c90-const-expr-2.c 2008-04-25 01:40:10.000000000 -0700
3711+++ gcc-4.4.1/gcc/testsuite/gcc.dg/c90-const-expr-2.c 2009-09-08 12:10:43.000000000 -0700
3712@@ -14,8 +14,10 @@
3713 int b;
3714 long *c;
3715
3716-#if defined(_LP64) || defined(_WIN64)
3717+#if defined(_LP64)
3718 #define ZERO 0L
3719+#elif defined(_WIN64)
3720+#define ZERO 0LL
3721 #else
3722 #define ZERO 0
3723 #endif
3724diff -Naur gcc-4.4.1.orig/gcc/testsuite/gcc.dg/c99-const-expr-2.c gcc-4.4.1/gcc/testsuite/gcc.dg/c99-const-expr-2.c
3725--- gcc-4.4.1.orig/gcc/testsuite/gcc.dg/c99-const-expr-2.c 2008-04-25 01:40:10.000000000 -0700
3726+++ gcc-4.4.1/gcc/testsuite/gcc.dg/c99-const-expr-2.c 2009-09-08 12:10:43.000000000 -0700
3727@@ -14,8 +14,10 @@
3728 int b;
3729 long *c;
3730
3731-#if defined(_LP64) || defined(_WIN64)
3732+#if defined(_LP64)
3733 #define ZERO 0L
3734+#elif defined(_WIN64)
3735+#define ZERO 0LL
3736 #else
3737 #define ZERO 0
3738 #endif
3739diff -Naur gcc-4.4.1.orig/gcc/testsuite/gcc.dg/cdce1.c gcc-4.4.1/gcc/testsuite/gcc.dg/cdce1.c
3740--- gcc-4.4.1.orig/gcc/testsuite/gcc.dg/cdce1.c 2009-02-05 03:59:20.000000000 -0800
3741+++ gcc-4.4.1/gcc/testsuite/gcc.dg/cdce1.c 2009-07-28 09:11:21.000000000 -0700
3742@@ -1,7 +1,8 @@
3743 /* { dg-do run } */
3744 /* { dg-skip-if "doubles are floats" { "avr-*-*" "m32c-*-*" } { "*" } { "" } } */
3745 /* { dg-options "-O2 -fmath-errno -fdump-tree-cdce-details -lm" } */
3746-/* { dg-final { scan-tree-dump "cdce1.c:16: note: function call is shrink-wrapped into error conditions\." "cdce" } } */
3747+/* { dg-options "-O2 -fmath-errno -fdump-tree-cdce-details" { target *-*-netware* } } */
3748+/* { dg-final { scan-tree-dump "cdce1.c:17: note: function call is shrink-wrapped into error conditions\." "cdce" } } */
3749 /* { dg-final { cleanup-tree-dump "cdce" } } */
3750
3751 #include <stdlib.h>
3752diff -Naur gcc-4.4.1.orig/gcc/testsuite/gcc.dg/cdce2.c gcc-4.4.1/gcc/testsuite/gcc.dg/cdce2.c
3753--- gcc-4.4.1.orig/gcc/testsuite/gcc.dg/cdce2.c 2008-06-18 14:41:13.000000000 -0700
3754+++ gcc-4.4.1/gcc/testsuite/gcc.dg/cdce2.c 2009-07-28 09:11:21.000000000 -0700
3755@@ -1,7 +1,8 @@
3756 /* { dg-do run } */
3757 /* { dg-skip-if "doubles are floats" { "avr-*-*" } { "*" } { "" } } */
3758 /* { dg-options "-O2 -fmath-errno -fdump-tree-cdce-details -lm" } */
3759-/* { dg-final { scan-tree-dump "cdce2.c:16: note: function call is shrink-wrapped into error conditions\." "cdce" } }*/
3760+/* { dg-options "-O2 -fmath-errno -fdump-tree-cdce-details" { target *-*-netware* } } */
3761+/* { dg-final { scan-tree-dump "cdce2.c:17: note: function call is shrink-wrapped into error conditions\." "cdce" } }*/
3762 /* { dg-final { cleanup-tree-dump "cdce" } } */
3763
3764 #include <stdlib.h>
3765diff -Naur gcc-4.4.1.orig/gcc/testsuite/gcc.dg/debug/20020224-1.c gcc-4.4.1/gcc/testsuite/gcc.dg/debug/20020224-1.c
3766--- gcc-4.4.1.orig/gcc/testsuite/gcc.dg/debug/20020224-1.c 2002-02-26 11:05:26.000000000 -0800
3767+++ gcc-4.4.1/gcc/testsuite/gcc.dg/debug/20020224-1.c 2009-08-16 02:07:40.000000000 -0700
3768@@ -1,9 +1,13 @@
3769+/* { dg-options "-g3 -O" } */
3770 /* { dg-do compile } */
3771
3772-/* Here's the deal: f3 is not inlined because it's too big, but f2 and
3773- f1 are inlined into it. We used to fail to emit debugging info for
3774- t1, because it was moved inside the (inlined) block of f1, marked
3775- as abstract, then we'd crash. */
3776+/* Here's the deal: f4 is inlined into main, f3 is inlined into f4, f2 is
3777+ inlined into f1. The DIE of main should contain DW_TAG_inlined_subroutines
3778+ children for f4, f3, f2 and f1. Also, there should be a DIE representing
3779+ and out of line instance of f4, aside the DIE representing its abstract
3780+ instance.
3781+ We used to fail to emit debugging info for t1, because it was moved
3782+ inside the (inlined) block of f1, marked as abstract, then we'd crash. */
3783
3784 #define UNUSED __attribute__((unused))
3785 #define EXT __extension__
3786@@ -58,3 +62,10 @@
3787
3788 return;
3789 }
3790+
3791+int
3792+main ()
3793+{
3794+ int foo = 1;
3795+ f4 ();
3796+}
3797diff -Naur gcc-4.4.1.orig/gcc/testsuite/gcc.dg/debug/dwarf2/inline2.c gcc-4.4.1/gcc/testsuite/gcc.dg/debug/dwarf2/inline2.c
3798--- gcc-4.4.1.orig/gcc/testsuite/gcc.dg/debug/dwarf2/inline2.c 1969-12-31 16:00:00.000000000 -0800
3799+++ gcc-4.4.1/gcc/testsuite/gcc.dg/debug/dwarf2/inline2.c 2009-08-17 03:04:21.000000000 -0700
3800@@ -0,0 +1,70 @@
3801+/* Contributed by Dodji Seketeli <dodji@redhat.com>
3802+ Origin: PR debug/37801
3803+
3804+ Abstract instances (DW_TAG_subroutines having the DW_AT_inline attribute)
3805+ of second and first were having a DW_TAG_lexical_block DIE wrongly
3806+ representing the inlined calls to third (in second) and to
3807+ second (in first). At the same time, main didn't have children
3808+ DW_TAG_inlined_subroutine DIEs representing the inlined calls to
3809+ first, second and third.
3810+
3811+ The ideal goal here is to test that we have no superfluous
3812+ DW_TAG_lexical_block DIE anymore, that abstract instances DIEs have
3813+ no descendant DIE with a DW_AT_abstract_origin attribute, and that main has
3814+ properly nested DW_TAG_inlined_subroutine DIEs for third, second and first.
3815+*/
3816+
3817+/* { dg-options "-O -g3 -dA" } */
3818+/* { dg-do compile } */
3819+
3820+/* There are 6 inlined subroutines:
3821+ - One for each subroutine inlined into main, that's 3.
3822+ - One for earch subroutine inline into the out of line instances
3823+ of third, second and first. */
3824+/* { dg-final { scan-assembler-times "\\(DIE \\(.*?\\) DW_TAG_inlined_subroutine" 6 } } */
3825+
3826+/* Likewise we should have 6 DW_TAG_lexical_block DIEs:
3827+ - One for each subroutine inlined into main, so that's 3.
3828+ - One for each subroutine inlined in the out of line instances
3829+ of third, second and first, that's 3.
3830+*/
3831+/* { dg-final { scan-assembler-times "\\(DIE \\(.*?\\) DW_TAG_lexical_block" 6 } } */
3832+
3833+
3834+/* There are 3 DW_AT_inline attributes: one per abstract inline instance.
3835+ The value of the attribute must be 0x3, meaning the function was
3836+ actually inlined. */
3837+/* { dg-final { scan-assembler-times "byte.*?0x3.*? DW_AT_inline" 3 } } */
3838+
3839+
3840+inline void
3841+third (int arg3)
3842+{
3843+ int var3 = arg3;
3844+ int* a = 0;
3845+ a[0] = var3;
3846+}
3847+
3848+inline void
3849+second (int arg2)
3850+{
3851+ int var2 = arg2;
3852+ third (var2+1);
3853+}
3854+
3855+inline void
3856+first (int arg1)
3857+{
3858+ int var1 = arg1;
3859+ second (var1+1);
3860+}
3861+
3862+int
3863+main ()
3864+{
3865+ int some_int = 1;
3866+ first (some_int);
3867+ return 0;
3868+}
3869+
3870+
3871diff -Naur gcc-4.4.1.orig/gcc/testsuite/gcc.dg/dfp/pr39902.c gcc-4.4.1/gcc/testsuite/gcc.dg/dfp/pr39902.c
3872--- gcc-4.4.1.orig/gcc/testsuite/gcc.dg/dfp/pr39902.c 2009-06-29 10:13:33.000000000 -0700
3873+++ gcc-4.4.1/gcc/testsuite/gcc.dg/dfp/pr39902.c 2009-07-30 10:08:09.000000000 -0700
3874@@ -189,7 +189,7 @@
3875 if (COMPARE128 (a128, p128_2_0))
3876 FAILURE
3877
3878- a128.d = p128_2_0.d * 1.0DD;
3879+ a128.d = p128_2_0.d * 1.0DL;
3880 if (COMPARE128 (a128, p128_2_0))
3881 FAILURE
3882
3883@@ -197,7 +197,7 @@
3884 if (COMPARE128 (a128, m128_2_0))
3885 FAILURE
3886
3887- a128.d = p128_2_0.d * -1.0DD;
3888+ a128.d = p128_2_0.d * -1.0DL;
3889 if (COMPARE128 (a128, m128_2_0))
3890 FAILURE
3891
3892@@ -208,7 +208,7 @@
3893 if (! (COMPARE128 (a128, p128_2_0)))
3894 FAILURE
3895
3896- a128.d = p128_2_0.d * 1.DD;
3897+ a128.d = p128_2_0.d * 1.DL;
3898 if (! (COMPARE128 (a128, p128_2_0)))
3899 FAILURE
3900
3901@@ -216,7 +216,7 @@
3902 if (! (COMPARE128 (a128, m128_2_0)))
3903 FAILURE
3904
3905- a128.d = p128_2_0.d * -1.DD;
3906+ a128.d = p128_2_0.d * -1.DL;
3907 if (! (COMPARE128 (a128, m128_2_0)))
3908 FAILURE
3909 }
3910diff -Naur gcc-4.4.1.orig/gcc/testsuite/gcc.dg/large-size-array-2.c gcc-4.4.1/gcc/testsuite/gcc.dg/large-size-array-2.c
3911--- gcc-4.4.1.orig/gcc/testsuite/gcc.dg/large-size-array-2.c 2008-04-26 12:14:46.000000000 -0700
3912+++ gcc-4.4.1/gcc/testsuite/gcc.dg/large-size-array-2.c 2009-09-08 12:10:43.000000000 -0700
3913@@ -4,4 +4,4 @@
3914 static char * name[] = {
3915 [0x80000000] = "bar"
3916 };
3917-/* { dg-error "too large" "" { target { { ! lp64 } || x86_64-*-mingw* } } 6 } */
3918+/* { dg-error "too large" "" { target { { ! lp64 } && { ! llp64 } } } 6 } */
3919diff -Naur gcc-4.4.1.orig/gcc/testsuite/gcc.dg/large-size-array-4.c gcc-4.4.1/gcc/testsuite/gcc.dg/large-size-array-4.c
3920--- gcc-4.4.1.orig/gcc/testsuite/gcc.dg/large-size-array-4.c 2008-04-26 12:14:46.000000000 -0700
3921+++ gcc-4.4.1/gcc/testsuite/gcc.dg/large-size-array-4.c 2009-09-08 12:10:43.000000000 -0700
3922@@ -4,4 +4,4 @@
3923 static char * name[] = {
3924 [0x80000000] = "bar"
3925 };
3926-/* { dg-error "too large" "" { target { { ! lp64 } || x86_64-*-mingw* } } 6 } */
3927+/* { dg-error "too large" "" { target { { ! lp64 } && { ! llp64 } } } 6 } */
3928diff -Naur gcc-4.4.1.orig/gcc/testsuite/gcc.dg/pr40861.c gcc-4.4.1/gcc/testsuite/gcc.dg/pr40861.c
3929--- gcc-4.4.1.orig/gcc/testsuite/gcc.dg/pr40861.c 1969-12-31 16:00:00.000000000 -0800
3930+++ gcc-4.4.1/gcc/testsuite/gcc.dg/pr40861.c 2009-09-07 13:25:52.000000000 -0700
3931@@ -0,0 +1,7 @@
3932+/* { dg-do compile } */
3933+/* { dg-options "-O" } */
3934+
3935+int foo(int i)
3936+{
3937+ return (1LL >> 128 * i) && i;
3938+}
3939diff -Naur gcc-4.4.1.orig/gcc/testsuite/gcc.dg/pr40971.c gcc-4.4.1/gcc/testsuite/gcc.dg/pr40971.c
3940--- gcc-4.4.1.orig/gcc/testsuite/gcc.dg/pr40971.c 1969-12-31 16:00:00.000000000 -0800
3941+++ gcc-4.4.1/gcc/testsuite/gcc.dg/pr40971.c 2009-08-18 04:43:16.000000000 -0700
3942@@ -0,0 +1,23 @@
3943+/* PR target/40971 */
3944+/* { dg-do compile } */
3945+/* { dg-options "-O -fstack-protector -fno-strict-aliasing" } */
3946+/* { dg-require-effective-target fstack_protector } */
3947+
3948+extern void bar (char *);
3949+
3950+void
3951+foo (int f, long a)
3952+{
3953+ {
3954+ char d[32768];
3955+ bar (d);
3956+ }
3957+ double b = f;
3958+ while (a)
3959+ {
3960+ char c[sizeof (double)];
3961+ __builtin_memcpy (c, &b, sizeof (c));
3962+ if (*(double *) c != 2.0)
3963+ break;
3964+ }
3965+}
3966diff -Naur gcc-4.4.1.orig/gcc/testsuite/gcc.dg/pr41033.c gcc-4.4.1/gcc/testsuite/gcc.dg/pr41033.c
3967--- gcc-4.4.1.orig/gcc/testsuite/gcc.dg/pr41033.c 1969-12-31 16:00:00.000000000 -0800
3968+++ gcc-4.4.1/gcc/testsuite/gcc.dg/pr41033.c 2009-08-12 23:28:28.000000000 -0700
3969@@ -0,0 +1,24 @@
3970+/* { dg-options "-O1 -fno-strict-aliasing" } */
3971+/* PR rtl-optimization/41033 */
3972+
3973+struct X {
3974+ int i;
3975+ int j;
3976+};
3977+
3978+int foo(struct X *p, struct X *q)
3979+{
3980+ p->j = 1;
3981+ q->i = 0;
3982+ return p->j;
3983+}
3984+
3985+extern void abort (void);
3986+
3987+int main()
3988+{
3989+ struct X x;
3990+ if (foo (&x, (struct X *)&x.j) != 0)
3991+ abort ();
3992+ return 0;
3993+}
3994diff -Naur gcc-4.4.1.orig/gcc/testsuite/gcc.dg/pr41123.c gcc-4.4.1/gcc/testsuite/gcc.dg/pr41123.c
3995--- gcc-4.4.1.orig/gcc/testsuite/gcc.dg/pr41123.c 1969-12-31 16:00:00.000000000 -0800
3996+++ gcc-4.4.1/gcc/testsuite/gcc.dg/pr41123.c 2009-08-19 15:52:11.000000000 -0700
3997@@ -0,0 +1,46 @@
3998+/* PR middle-end/41123 */
3999+/* { dg-do compile } */
4000+/* { dg-options "-O2 -fno-strict-aliasing" } */
4001+
4002+struct S { char a, b, c, d, e, f, g, h; };
4003+struct T { int a, b; };
4004+
4005+struct S
4006+f1 (float _Complex x)
4007+{
4008+ return *(struct S *) & x;
4009+}
4010+
4011+int
4012+f2 (float _Complex x)
4013+{
4014+ struct S f = f1 (x);
4015+ return f.b;
4016+}
4017+
4018+struct T
4019+f3 (float _Complex x)
4020+{
4021+ return *(struct T *) & x;
4022+}
4023+
4024+int
4025+f4 (float _Complex x)
4026+{
4027+ struct T f = f3 (x);
4028+ return f.a;
4029+}
4030+
4031+int
4032+f5 (float _Complex x)
4033+{
4034+ struct T f = f3 (x);
4035+ return f.b;
4036+}
4037+
4038+struct T
4039+f6 (float _Complex x)
4040+{
4041+ struct T f = f3 (x);
4042+ return f;
4043+}
4044diff -Naur gcc-4.4.1.orig/gcc/testsuite/gcc.dg/pr41232.c gcc-4.4.1/gcc/testsuite/gcc.dg/pr41232.c
4045--- gcc-4.4.1.orig/gcc/testsuite/gcc.dg/pr41232.c 1969-12-31 16:00:00.000000000 -0800
4046+++ gcc-4.4.1/gcc/testsuite/gcc.dg/pr41232.c 2009-09-10 11:57:46.000000000 -0700
4047@@ -0,0 +1,14 @@
4048+/* { dg-do compile } */
4049+/* { dg-options "-O1 -g" } */
4050+extern int atoi (const char *);
4051+extern int sprintf (char *, const char *, ...);
4052+void malloc_init() {
4053+ char *cptr;
4054+ char buf[1];
4055+ int tmbd = atoi(cptr);
4056+ if (tmbd > 0)
4057+ tmbd = (tmbd <= 124) ? tmbd : 124;
4058+ else
4059+ tmbd = 0;
4060+ sprintf(buf, "%d\n", tmbd);
4061+}
4062diff -Naur gcc-4.4.1.orig/gcc/testsuite/gcc.dg/special/gcsec-1.c gcc-4.4.1/gcc/testsuite/gcc.dg/special/gcsec-1.c
4063--- gcc-4.4.1.orig/gcc/testsuite/gcc.dg/special/gcsec-1.c 2007-05-07 11:28:41.000000000 -0700
4064+++ gcc-4.4.1/gcc/testsuite/gcc.dg/special/gcsec-1.c 2009-07-25 06:54:21.000000000 -0700
4065@@ -3,10 +3,8 @@
4066 /* { dg-do run { xfail rs6000-*-aix* powerpc*-*-aix* } } */
4067 /* { dg-require-gc-sections "" } */
4068
4069-/* { dg-options "-ffunction-sections -fdata-sections -Wl,--gc-sections -static" } */
4070-/* { dg-options "-ffunction-sections -fdata-sections -Wl,--gc-sections -static" { target native } } */
4071-/* Solaris 10 does not support static linking; there is no libc.a. */
4072-/* { dg-options "-ffunction-sections -fdata-sections -Wl,--gc-sections" { target *-*-netware* i?86-*-solaris2.1[0-9] } } */
4073+/* { dg-options "-ffunction-sections -fdata-sections -Wl,--gc-sections" } */
4074+/* { dg-options "-ffunction-sections -fdata-sections -Wl,--gc-sections -static" { target static } } */
4075
4076 #include <stdlib.h>
4077
4078diff -Naur gcc-4.4.1.orig/gcc/testsuite/gcc.dg/ssp-1.c gcc-4.4.1/gcc/testsuite/gcc.dg/ssp-1.c
4079--- gcc-4.4.1.orig/gcc/testsuite/gcc.dg/ssp-1.c 2007-03-28 16:08:26.000000000 -0700
4080+++ gcc-4.4.1/gcc/testsuite/gcc.dg/ssp-1.c 2009-08-10 10:35:05.000000000 -0700
4081@@ -4,7 +4,7 @@
4082
4083 #include <stdlib.h>
4084
4085-static void
4086+void
4087 __stack_chk_fail (void)
4088 {
4089 exit (0); /* pass */
4090diff -Naur gcc-4.4.1.orig/gcc/testsuite/gcc.dg/torture/builtin-power-1.c gcc-4.4.1/gcc/testsuite/gcc.dg/torture/builtin-power-1.c
4091--- gcc-4.4.1.orig/gcc/testsuite/gcc.dg/torture/builtin-power-1.c 2007-09-22 01:25:43.000000000 -0700
4092+++ gcc-4.4.1/gcc/testsuite/gcc.dg/torture/builtin-power-1.c 2009-08-24 02:52:03.000000000 -0700
4093@@ -77,9 +77,9 @@
4094 /* Test pow(pow(x,y),z) -> pow(x,y*z). */
4095 #define POW_POW \
4096 extern void link_failure_pow_pow(void); \
4097- if (pow(pow(d1, d2), d3) != pow(d1,d2*d3) \
4098- || powf(powf(f1,f2),f3) != powf(f1,f2*f3) \
4099- || powl(powl(ld1,ld2),ld3) != powl(ld1,ld2*ld3)) \
4100+ if (pow(pow(fabs(d1), d2), d3) != pow(fabs(d1),d2*d3) \
4101+ || powf(powf(fabs(f1),f2),f3) != powf(fabs(f1),f2*f3) \
4102+ || powl(powl(fabs(ld1),ld2),ld3) != powl(fabs(ld1),ld2*ld3)) \
4103 link_failure_pow_pow()
4104
4105 POW_POW;
4106diff -Naur gcc-4.4.1.orig/gcc/testsuite/gcc.dg/torture/pr39074.c gcc-4.4.1/gcc/testsuite/gcc.dg/torture/pr39074.c
4107--- gcc-4.4.1.orig/gcc/testsuite/gcc.dg/torture/pr39074.c 2009-02-19 02:12:25.000000000 -0800
4108+++ gcc-4.4.1/gcc/testsuite/gcc.dg/torture/pr39074.c 2009-09-08 12:10:43.000000000 -0700
4109@@ -2,9 +2,11 @@
4110 /* { dg-options "-fdump-tree-alias" } */
4111 /* { dg-skip-if "" { *-*-* } { "-O0" } { "" } } */
4112
4113+typedef __PTRDIFF_TYPE__ intptr_t;
4114+
4115 int i;
4116 void __attribute__((noinline))
4117-foo(long b, long q)
4118+foo(long b, intptr_t q)
4119 {
4120 int *y;
4121 int **a = &y, **x;
4122diff -Naur gcc-4.4.1.orig/gcc/testsuite/gcc.dg/torture/pr41094.c gcc-4.4.1/gcc/testsuite/gcc.dg/torture/pr41094.c
4123--- gcc-4.4.1.orig/gcc/testsuite/gcc.dg/torture/pr41094.c 1969-12-31 16:00:00.000000000 -0800
4124+++ gcc-4.4.1/gcc/testsuite/gcc.dg/torture/pr41094.c 2009-08-24 02:52:03.000000000 -0700
4125@@ -0,0 +1,19 @@
4126+/* { dg-do run } */
4127+/* { dg-options "-ffast-math" } */
4128+
4129+#include <math.h>
4130+
4131+extern void abort (void);
4132+
4133+double foo(void)
4134+{
4135+ double x = -4.0;
4136+ return pow (x * x, 0.25);
4137+}
4138+
4139+int main()
4140+{
4141+ if (foo() != 2.0)
4142+ abort ();
4143+ return 0;
4144+}
4145diff -Naur gcc-4.4.1.orig/gcc/testsuite/gcc.dg/torture/pr41261.c gcc-4.4.1/gcc/testsuite/gcc.dg/torture/pr41261.c
4146--- gcc-4.4.1.orig/gcc/testsuite/gcc.dg/torture/pr41261.c 1969-12-31 16:00:00.000000000 -0800
4147+++ gcc-4.4.1/gcc/testsuite/gcc.dg/torture/pr41261.c 2009-09-10 11:57:46.000000000 -0700
4148@@ -0,0 +1,8 @@
4149+/* { dg-do compile } */
4150+/* { dg-options "-fprofile-arcs" } */
4151+
4152+extern void relocate_kernel();
4153+void machine_kexec(void *control_page)
4154+{
4155+ __builtin_memcpy(control_page, relocate_kernel, 2048);
4156+}
4157diff -Naur gcc-4.4.1.orig/gcc/testsuite/gcc.dg/tree-ssa/pr33920.c gcc-4.4.1/gcc/testsuite/gcc.dg/tree-ssa/pr33920.c
4158--- gcc-4.4.1.orig/gcc/testsuite/gcc.dg/tree-ssa/pr33920.c 2009-02-05 03:59:20.000000000 -0800
4159+++ gcc-4.4.1/gcc/testsuite/gcc.dg/tree-ssa/pr33920.c 2009-09-08 12:10:43.000000000 -0700
4160@@ -2,6 +2,7 @@
4161 /* { dg-do compile } */
4162 /* { dg-options "-O3" } */
4163
4164+typedef __PTRDIFF_TYPE__ intptr_t;
4165 typedef union lispunion *object;
4166 struct character
4167 {
4168@@ -22,14 +23,14 @@
4169 object V659;
4170 object _x, _y;
4171 object V643;
4172- long V648;
4173+ intptr_t V648;
4174 unsigned char V653;
4175 object V651;
4176 object V654;
4177 object V658;
4178
4179 T1240:
4180-if (V648 >= (long)V651) /* { dg-warning "cast from pointer to integer of different size" "" { target { ! int32plus } } } */
4181+if (V648 >= (intptr_t)V651) /* { dg-warning "cast from pointer to integer of different size" "" { target { ! int32plus } } } */
4182 goto T1243;
4183 V653 = ((char *) V654->v.v_self)[V648];
4184 V659 = (object) V654 + V653;
4185@@ -41,7 +42,7 @@
4186 goto T1249;
4187 goto T1224;
4188 T1249:
4189- V648 = (long) V648 + 1;
4190+ V648 = (intptr_t) V648 + 1;
4191 goto T1240;
4192 T1243:
4193 V643 = (object) & Cnil_body;
4194diff -Naur gcc-4.4.1.orig/gcc/testsuite/gcc.dg/tree-ssa/ssa-ccp-27.c gcc-4.4.1/gcc/testsuite/gcc.dg/tree-ssa/ssa-ccp-27.c
4195--- gcc-4.4.1.orig/gcc/testsuite/gcc.dg/tree-ssa/ssa-ccp-27.c 1969-12-31 16:00:00.000000000 -0800
4196+++ gcc-4.4.1/gcc/testsuite/gcc.dg/tree-ssa/ssa-ccp-27.c 2009-08-16 13:23:57.000000000 -0700
4197@@ -0,0 +1,24 @@
4198+/* { dg-do compile } */
4199+/* { dg-options "-O2 -fdump-tree-ccp1" } */
4200+
4201+#include <string.h>
4202+
4203+char c[10];
4204+
4205+void
4206+f1 ()
4207+{
4208+ const char *p = "123456";
4209+ memcpy (c, p, 6);
4210+}
4211+
4212+void
4213+f2 ()
4214+{
4215+ const char *p = "12345678";
4216+ p += 2;
4217+ memcpy (c, p, 6);
4218+}
4219+
4220+/* { dg-final { scan-tree-dump-times "memcpy\[^\n\]*123456" 2 "ccp1" } } */
4221+/* { dg-final { cleanup-tree-dump "ccp1" } } */
4222diff -Naur gcc-4.4.1.orig/gcc/testsuite/gcc.dg/uninit-6.c gcc-4.4.1/gcc/testsuite/gcc.dg/uninit-6.c
4223--- gcc-4.4.1.orig/gcc/testsuite/gcc.dg/uninit-6.c 2008-08-20 15:23:45.000000000 -0700
4224+++ gcc-4.4.1/gcc/testsuite/gcc.dg/uninit-6.c 2009-08-03 12:27:32.000000000 -0700
4225@@ -39,7 +39,7 @@
4226 rv = malloc (sizeof (struct tree));
4227 rv->car = 0;
4228
4229- APPEND(rv, field, INTEGER_T, a); /* { dg-bogus "field" "uninitialized variable warning" } */
4230+ APPEND(rv, field, INTEGER_T, a); /* { dg-bogus "field" "uninitialized variable warning" { xfail *-*-* } } */
4231 APPEND(rv, field, PTR_T, b);
4232 APPEND(rv, field, INTEGER_T, c);
4233
4234diff -Naur gcc-4.4.1.orig/gcc/testsuite/gcc.dg/uninit-6-O0.c gcc-4.4.1/gcc/testsuite/gcc.dg/uninit-6-O0.c
4235--- gcc-4.4.1.orig/gcc/testsuite/gcc.dg/uninit-6-O0.c 2008-08-20 15:23:45.000000000 -0700
4236+++ gcc-4.4.1/gcc/testsuite/gcc.dg/uninit-6-O0.c 2009-08-03 12:27:32.000000000 -0700
4237@@ -39,7 +39,7 @@
4238 rv = malloc (sizeof (struct tree));
4239 rv->car = 0;
4240
4241- APPEND(rv, field, INTEGER_T, a); /* { dg-bogus "field" "uninitialized variable warning" } */
4242+ APPEND(rv, field, INTEGER_T, a); /* { dg-bogus "field" "uninitialized variable warning" { xfail *-*-* } } */
4243 APPEND(rv, field, PTR_T, b);
4244 APPEND(rv, field, INTEGER_T, c);
4245
4246diff -Naur gcc-4.4.1.orig/gcc/testsuite/gcc.dg/uninit-pr40943.c gcc-4.4.1/gcc/testsuite/gcc.dg/uninit-pr40943.c
4247--- gcc-4.4.1.orig/gcc/testsuite/gcc.dg/uninit-pr40943.c 1969-12-31 16:00:00.000000000 -0800
4248+++ gcc-4.4.1/gcc/testsuite/gcc.dg/uninit-pr40943.c 2009-08-03 12:27:32.000000000 -0700
4249@@ -0,0 +1,10 @@
4250+/* PR middle-end/40943 */
4251+/* { dg-do compile } */
4252+/* { dg-options "-O2 -Wuninitialized" } */
4253+
4254+void
4255+foo (void)
4256+{
4257+ int *p;
4258+ *p = 3; /* { dg-warning "is used uninitialized" } */
4259+}
4260diff -Naur gcc-4.4.1.orig/gcc/testsuite/gcc.dg/vect/no-scevccp-noreassoc-outer-2.c gcc-4.4.1/gcc/testsuite/gcc.dg/vect/no-scevccp-noreassoc-outer-2.c
4261--- gcc-4.4.1.orig/gcc/testsuite/gcc.dg/vect/no-scevccp-noreassoc-outer-2.c 2007-09-04 06:05:19.000000000 -0700
4262+++ gcc-4.4.1/gcc/testsuite/gcc.dg/vect/no-scevccp-noreassoc-outer-2.c 2009-07-28 09:51:19.000000000 -0700
4263@@ -4,7 +4,7 @@
4264 #include "tree-vect.h"
4265
4266 #define N 40
4267-int a[200*N];
4268+int a[200*N+N];
4269
4270 __attribute__ ((noinline)) void
4271 foo (){
4272diff -Naur gcc-4.4.1.orig/gcc/testsuite/gcc.dg/vect/O1-pr33854.c gcc-4.4.1/gcc/testsuite/gcc.dg/vect/O1-pr33854.c
4273--- gcc-4.4.1.orig/gcc/testsuite/gcc.dg/vect/O1-pr33854.c 2007-10-22 05:05:36.000000000 -0700
4274+++ gcc-4.4.1/gcc/testsuite/gcc.dg/vect/O1-pr33854.c 2009-09-08 12:10:43.000000000 -0700
4275@@ -1,7 +1,7 @@
4276 /* Testcase by Martin Michlmayr <tbm@cyrius.com> */
4277 /* { dg-do compile } */
4278
4279-extern void *malloc (long unsigned int __size);
4280+extern void *malloc (__SIZE_TYPE__ __size);
4281 typedef struct VMatrix_ VMatrix;
4282 struct VMatrix_
4283 {
4284diff -Naur gcc-4.4.1.orig/gcc/testsuite/gcc.dg/vect/O1-pr41008.c gcc-4.4.1/gcc/testsuite/gcc.dg/vect/O1-pr41008.c
4285--- gcc-4.4.1.orig/gcc/testsuite/gcc.dg/vect/O1-pr41008.c 1969-12-31 16:00:00.000000000 -0800
4286+++ gcc-4.4.1/gcc/testsuite/gcc.dg/vect/O1-pr41008.c 2009-08-16 13:23:57.000000000 -0700
4287@@ -0,0 +1,23 @@
4288+/* { dg-do compile } */
4289+
4290+double heating[2][2];
4291+
4292+void foo (int, int);
4293+
4294+void map_do()
4295+{
4296+ int jsav, ksav, k, j;
4297+
4298+ for(k = 0; k < 2; k++)
4299+ for(j = 0; j < 2; j++)
4300+ if (heating[k][j] > 0.)
4301+ {
4302+ jsav = j;
4303+ ksav = k;
4304+ }
4305+
4306+ foo (jsav, ksav);
4307+}
4308+
4309+/* { dg-final { cleanup-tree-dump "vect" } } */
4310+
4311diff -Naur gcc-4.4.1.orig/gcc/testsuite/gcc.dg/vect/pr33833.c gcc-4.4.1/gcc/testsuite/gcc.dg/vect/pr33833.c
4312--- gcc-4.4.1.orig/gcc/testsuite/gcc.dg/vect/pr33833.c 2007-10-25 09:41:45.000000000 -0700
4313+++ gcc-4.4.1/gcc/testsuite/gcc.dg/vect/pr33833.c 2009-09-08 12:10:43.000000000 -0700
4314@@ -1,6 +1,10 @@
4315 /* Testcase by Martin Michlmayr <tbm@cyrius.com> */
4316 /* { dg-do compile } */
4317
4318+#define signed
4319+typedef unsigned __PTRDIFF_TYPE__ uintptr_t;
4320+#undef signed
4321+
4322 struct list_head
4323 {
4324 struct list_head *prev;
4325@@ -14,7 +18,7 @@
4326 struct prio_array *active, arrays[2];
4327 } per_cpu__runqueues;
4328
4329-void sched_init (unsigned long __ptr)
4330+void sched_init (uintptr_t __ptr)
4331 {
4332 int j, k;
4333 struct prio_array *array;
4334diff -Naur gcc-4.4.1.orig/gcc/testsuite/gcc.dg/vect/pr33846.c gcc-4.4.1/gcc/testsuite/gcc.dg/vect/pr33846.c
4335--- gcc-4.4.1.orig/gcc/testsuite/gcc.dg/vect/pr33846.c 2007-10-23 13:15:04.000000000 -0700
4336+++ gcc-4.4.1/gcc/testsuite/gcc.dg/vect/pr33846.c 2009-09-08 12:10:43.000000000 -0700
4337@@ -7,7 +7,9 @@
4338 return ~i >> 31;
4339 }
4340
4341-void _mix_some_samples (long buf, int *mix_buffer, int mix_size)
4342+typedef __PTRDIFF_TYPE__ intptr_t;
4343+
4344+void _mix_some_samples (intptr_t buf, int *mix_buffer, int mix_size)
4345 {
4346 int i;
4347 signed int *p = mix_buffer;
4348diff -Naur gcc-4.4.1.orig/gcc/testsuite/gcc.target/i386/avx-vtestpd-1.c gcc-4.4.1/gcc/testsuite/gcc.target/i386/avx-vtestpd-1.c
4349--- gcc-4.4.1.orig/gcc/testsuite/gcc.target/i386/avx-vtestpd-1.c 2008-08-28 12:36:58.000000000 -0700
4350+++ gcc-4.4.1/gcc/testsuite/gcc.target/i386/avx-vtestpd-1.c 2009-07-28 00:01:40.000000000 -0700
4351@@ -1,6 +1,8 @@
4352 /* { dg-do run } */
4353 /* { dg-require-effective-target avx } */
4354-/* { dg-options "-O2 -mavx" } */
4355+/* { dg-options "-O2 -mavx -DNEED_IEEE754_DOUBLE" } */
4356+/* { dg-warning "attribute ignored" "" { target default_packed } 164 } */
4357+/* { dg-message " from " "include chain" { target default_packed } 0 } */
4358
4359 #include "avx-check.h"
4360
4361diff -Naur gcc-4.4.1.orig/gcc/testsuite/gcc.target/i386/avx-vtestpd-256-1.c gcc-4.4.1/gcc/testsuite/gcc.target/i386/avx-vtestpd-256-1.c
4362--- gcc-4.4.1.orig/gcc/testsuite/gcc.target/i386/avx-vtestpd-256-1.c 2008-08-28 12:36:58.000000000 -0700
4363+++ gcc-4.4.1/gcc/testsuite/gcc.target/i386/avx-vtestpd-256-1.c 2009-07-28 00:01:40.000000000 -0700
4364@@ -1,6 +1,8 @@
4365 /* { dg-do run } */
4366 /* { dg-require-effective-target avx } */
4367-/* { dg-options "-O2 -mavx" } */
4368+/* { dg-options "-O2 -mavx -DNEED_IEEE754_DOUBLE" } */
4369+/* { dg-warning "attribute ignored" "" { target default_packed } 164 } */
4370+/* { dg-message " from " "include chain" { target default_packed } 0 } */
4371
4372 #include "avx-check.h"
4373
4374diff -Naur gcc-4.4.1.orig/gcc/testsuite/gcc.target/i386/avx-vtestpd-256-2.c gcc-4.4.1/gcc/testsuite/gcc.target/i386/avx-vtestpd-256-2.c
4375--- gcc-4.4.1.orig/gcc/testsuite/gcc.target/i386/avx-vtestpd-256-2.c 2008-08-28 12:36:58.000000000 -0700
4376+++ gcc-4.4.1/gcc/testsuite/gcc.target/i386/avx-vtestpd-256-2.c 2009-07-28 00:01:40.000000000 -0700
4377@@ -1,6 +1,8 @@
4378 /* { dg-do run } */
4379 /* { dg-require-effective-target avx } */
4380-/* { dg-options "-O2 -mavx" } */
4381+/* { dg-options "-O2 -mavx -DNEED_IEEE754_DOUBLE" } */
4382+/* { dg-warning "attribute ignored" "" { target default_packed } 164 } */
4383+/* { dg-message " from " "include chain" { target default_packed } 0 } */
4384
4385 #include "avx-check.h"
4386
4387diff -Naur gcc-4.4.1.orig/gcc/testsuite/gcc.target/i386/avx-vtestpd-256-3.c gcc-4.4.1/gcc/testsuite/gcc.target/i386/avx-vtestpd-256-3.c
4388--- gcc-4.4.1.orig/gcc/testsuite/gcc.target/i386/avx-vtestpd-256-3.c 2008-08-28 12:36:58.000000000 -0700
4389+++ gcc-4.4.1/gcc/testsuite/gcc.target/i386/avx-vtestpd-256-3.c 2009-07-28 00:01:40.000000000 -0700
4390@@ -1,6 +1,8 @@
4391 /* { dg-do run } */
4392 /* { dg-require-effective-target avx } */
4393-/* { dg-options "-O2 -mavx" } */
4394+/* { dg-options "-O2 -mavx -DNEED_IEEE754_DOUBLE" } */
4395+/* { dg-warning "attribute ignored" "" { target default_packed } 164 } */
4396+/* { dg-message " from " "include chain" { target default_packed } 0 } */
4397
4398 #include "avx-check.h"
4399
4400diff -Naur gcc-4.4.1.orig/gcc/testsuite/gcc.target/i386/avx-vtestpd-2.c gcc-4.4.1/gcc/testsuite/gcc.target/i386/avx-vtestpd-2.c
4401--- gcc-4.4.1.orig/gcc/testsuite/gcc.target/i386/avx-vtestpd-2.c 2008-08-28 12:36:58.000000000 -0700
4402+++ gcc-4.4.1/gcc/testsuite/gcc.target/i386/avx-vtestpd-2.c 2009-07-28 00:01:40.000000000 -0700
4403@@ -1,6 +1,8 @@
4404 /* { dg-do run } */
4405 /* { dg-require-effective-target avx } */
4406-/* { dg-options "-O2 -mavx" } */
4407+/* { dg-options "-O2 -mavx -DNEED_IEEE754_DOUBLE" } */
4408+/* { dg-warning "attribute ignored" "" { target default_packed } 164 } */
4409+/* { dg-message " from " "include chain" { target default_packed } 0 } */
4410
4411 #include "avx-check.h"
4412
4413diff -Naur gcc-4.4.1.orig/gcc/testsuite/gcc.target/i386/avx-vtestpd-3.c gcc-4.4.1/gcc/testsuite/gcc.target/i386/avx-vtestpd-3.c
4414--- gcc-4.4.1.orig/gcc/testsuite/gcc.target/i386/avx-vtestpd-3.c 2008-08-28 12:36:58.000000000 -0700
4415+++ gcc-4.4.1/gcc/testsuite/gcc.target/i386/avx-vtestpd-3.c 2009-07-28 00:01:40.000000000 -0700
4416@@ -1,6 +1,8 @@
4417 /* { dg-do run } */
4418 /* { dg-require-effective-target avx } */
4419-/* { dg-options "-O2 -mavx" } */
4420+/* { dg-options "-O2 -mavx -DNEED_IEEE754_DOUBLE" } */
4421+/* { dg-warning "attribute ignored" "" { target default_packed } 164 } */
4422+/* { dg-message " from " "include chain" { target default_packed } 0 } */
4423
4424 #include "avx-check.h"
4425
4426diff -Naur gcc-4.4.1.orig/gcc/testsuite/gcc.target/i386/avx-vtestps-1.c gcc-4.4.1/gcc/testsuite/gcc.target/i386/avx-vtestps-1.c
4427--- gcc-4.4.1.orig/gcc/testsuite/gcc.target/i386/avx-vtestps-1.c 2008-08-28 12:36:58.000000000 -0700
4428+++ gcc-4.4.1/gcc/testsuite/gcc.target/i386/avx-vtestps-1.c 2009-07-28 00:01:40.000000000 -0700
4429@@ -1,6 +1,8 @@
4430 /* { dg-do run } */
4431 /* { dg-require-effective-target avx } */
4432-/* { dg-options "-O2 -mavx" } */
4433+/* { dg-options "-O2 -mavx -DNEED_IEEE754_FLOAT" } */
4434+/* { dg-warning "attribute ignored" "" { target default_packed } 150 } */
4435+/* { dg-message " from " "include chain" { target default_packed } 0 } */
4436
4437 #include "avx-check.h"
4438
4439diff -Naur gcc-4.4.1.orig/gcc/testsuite/gcc.target/i386/avx-vtestps-256-1.c gcc-4.4.1/gcc/testsuite/gcc.target/i386/avx-vtestps-256-1.c
4440--- gcc-4.4.1.orig/gcc/testsuite/gcc.target/i386/avx-vtestps-256-1.c 2008-08-28 12:36:58.000000000 -0700
4441+++ gcc-4.4.1/gcc/testsuite/gcc.target/i386/avx-vtestps-256-1.c 2009-07-28 00:01:40.000000000 -0700
4442@@ -1,6 +1,8 @@
4443 /* { dg-do run } */
4444 /* { dg-require-effective-target avx } */
4445-/* { dg-options "-O2 -mavx" } */
4446+/* { dg-options "-O2 -mavx -DNEED_IEEE754_FLOAT" } */
4447+/* { dg-warning "attribute ignored" "" { target default_packed } 150 } */
4448+/* { dg-message " from " "include chain" { target default_packed } 0 } */
4449
4450 #include "avx-check.h"
4451
4452diff -Naur gcc-4.4.1.orig/gcc/testsuite/gcc.target/i386/avx-vtestps-256-2.c gcc-4.4.1/gcc/testsuite/gcc.target/i386/avx-vtestps-256-2.c
4453--- gcc-4.4.1.orig/gcc/testsuite/gcc.target/i386/avx-vtestps-256-2.c 2008-08-28 12:36:58.000000000 -0700
4454+++ gcc-4.4.1/gcc/testsuite/gcc.target/i386/avx-vtestps-256-2.c 2009-07-28 00:01:40.000000000 -0700
4455@@ -1,6 +1,8 @@
4456 /* { dg-do run } */
4457 /* { dg-require-effective-target avx } */
4458-/* { dg-options "-O2 -mavx" } */
4459+/* { dg-options "-O2 -mavx -DNEED_IEEE754_FLOAT" } */
4460+/* { dg-warning "attribute ignored" "" { target default_packed } 150 } */
4461+/* { dg-message " from " "include chain" { target default_packed } 0 } */
4462
4463 #include "avx-check.h"
4464
4465diff -Naur gcc-4.4.1.orig/gcc/testsuite/gcc.target/i386/avx-vtestps-256-3.c gcc-4.4.1/gcc/testsuite/gcc.target/i386/avx-vtestps-256-3.c
4466--- gcc-4.4.1.orig/gcc/testsuite/gcc.target/i386/avx-vtestps-256-3.c 2008-08-28 12:36:58.000000000 -0700
4467+++ gcc-4.4.1/gcc/testsuite/gcc.target/i386/avx-vtestps-256-3.c 2009-07-28 00:01:40.000000000 -0700
4468@@ -1,6 +1,8 @@
4469 /* { dg-do run } */
4470 /* { dg-require-effective-target avx } */
4471-/* { dg-options "-O2 -mavx" } */
4472+/* { dg-options "-O2 -mavx -DNEED_IEEE754_FLOAT" } */
4473+/* { dg-warning "attribute ignored" "" { target default_packed } 150 } */
4474+/* { dg-message " from " "include chain" { target default_packed } 0 } */
4475
4476 #include "avx-check.h"
4477
4478diff -Naur gcc-4.4.1.orig/gcc/testsuite/gcc.target/i386/avx-vtestps-2.c gcc-4.4.1/gcc/testsuite/gcc.target/i386/avx-vtestps-2.c
4479--- gcc-4.4.1.orig/gcc/testsuite/gcc.target/i386/avx-vtestps-2.c 2008-08-28 12:36:58.000000000 -0700
4480+++ gcc-4.4.1/gcc/testsuite/gcc.target/i386/avx-vtestps-2.c 2009-07-28 00:01:40.000000000 -0700
4481@@ -1,6 +1,8 @@
4482 /* { dg-do run } */
4483 /* { dg-require-effective-target avx } */
4484-/* { dg-options "-O2 -mavx" } */
4485+/* { dg-options "-O2 -mavx -DNEED_IEEE754_FLOAT" } */
4486+/* { dg-warning "attribute ignored" "" { target default_packed } 150 } */
4487+/* { dg-message " from " "include chain" { target default_packed } 0 } */
4488
4489 #include "avx-check.h"
4490
4491diff -Naur gcc-4.4.1.orig/gcc/testsuite/gcc.target/i386/avx-vtestps-3.c gcc-4.4.1/gcc/testsuite/gcc.target/i386/avx-vtestps-3.c
4492--- gcc-4.4.1.orig/gcc/testsuite/gcc.target/i386/avx-vtestps-3.c 2008-08-28 12:36:58.000000000 -0700
4493+++ gcc-4.4.1/gcc/testsuite/gcc.target/i386/avx-vtestps-3.c 2009-07-28 00:01:40.000000000 -0700
4494@@ -1,6 +1,8 @@
4495 /* { dg-do run } */
4496 /* { dg-require-effective-target avx } */
4497-/* { dg-options "-O2 -mavx" } */
4498+/* { dg-options "-O2 -mavx -DNEED_IEEE754_FLOAT" } */
4499+/* { dg-warning "attribute ignored" "" { target default_packed } 150 } */
4500+/* { dg-message " from " "include chain" { target default_packed } 0 } */
4501
4502 #include "avx-check.h"
4503
4504diff -Naur gcc-4.4.1.orig/gcc/testsuite/gcc.target/i386/m128-check.h gcc-4.4.1/gcc/testsuite/gcc.target/i386/m128-check.h
4505--- gcc-4.4.1.orig/gcc/testsuite/gcc.target/i386/m128-check.h 2008-08-28 12:36:58.000000000 -0700
4506+++ gcc-4.4.1/gcc/testsuite/gcc.target/i386/m128-check.h 2009-07-28 00:01:40.000000000 -0700
4507@@ -138,6 +138,7 @@
4508 CHECK_FP_ARRAY (d, double, ESP_DOUBLE, "%f")
4509 CHECK_FP_ARRAY (f, float, ESP_FLOAT, "%f")
4510
4511+#ifdef NEED_IEEE754_FLOAT
4512 union ieee754_float
4513 {
4514 float d;
4515@@ -148,7 +149,9 @@
4516 unsigned sign : 1;
4517 } bits __attribute__((packed));
4518 };
4519+#endif
4520
4521+#ifdef NEED_IEEE754_DOUBLE
4522 union ieee754_double
4523 {
4524 double d;
4525@@ -160,3 +163,4 @@
4526 unsigned sign : 1;
4527 } bits __attribute__((packed));
4528 };
4529+#endif
4530diff -Naur gcc-4.4.1.orig/gcc/testsuite/gcc.target/i386/pr37248-2.c gcc-4.4.1/gcc/testsuite/gcc.target/i386/pr37248-2.c
4531--- gcc-4.4.1.orig/gcc/testsuite/gcc.target/i386/pr37248-2.c 2008-12-09 09:38:09.000000000 -0800
4532+++ gcc-4.4.1/gcc/testsuite/gcc.target/i386/pr37248-2.c 2009-07-27 23:56:49.000000000 -0700
4533@@ -1,5 +1,5 @@
4534 /* PR middle-end/37248 */
4535-/* { dg-do compile } */
4536+/* { dg-do compile { target { ! default_packed } } } */
4537 /* { dg-options "-O2 -fdump-tree-optimized" } */
4538
4539 struct S
4540diff -Naur gcc-4.4.1.orig/gcc/testsuite/gcc.target/i386/pr37248-3.c gcc-4.4.1/gcc/testsuite/gcc.target/i386/pr37248-3.c
4541--- gcc-4.4.1.orig/gcc/testsuite/gcc.target/i386/pr37248-3.c 2008-12-09 09:38:09.000000000 -0800
4542+++ gcc-4.4.1/gcc/testsuite/gcc.target/i386/pr37248-3.c 2009-07-27 23:56:49.000000000 -0700
4543@@ -1,6 +1,6 @@
4544 /* PR middle-end/37248 */
4545-/* { dg-do compile } */
4546-/* { dg-options "-O2 -fdump-tree-optimized" } */
4547+/* { dg-do compile { target { ! default_packed } } } */
4548+/* { dg-options "-O2 -fdump-tree-optimized -mno-ms-bitfields" } */
4549
4550 struct S
4551 {
4552diff -Naur gcc-4.4.1.orig/gcc/testsuite/gcc.target/i386/pr40718.c gcc-4.4.1/gcc/testsuite/gcc.target/i386/pr40718.c
4553--- gcc-4.4.1.orig/gcc/testsuite/gcc.target/i386/pr40718.c 1969-12-31 16:00:00.000000000 -0800
4554+++ gcc-4.4.1/gcc/testsuite/gcc.target/i386/pr40718.c 2009-08-23 05:37:53.000000000 -0700
4555@@ -0,0 +1,36 @@
4556+/* { dg-do run } */
4557+/* { dg-require-effective-target ilp32 } */
4558+/* { dg-options "-O1 -foptimize-sibling-calls" } */
4559+
4560+void abort (void);
4561+
4562+struct S
4563+{
4564+ void (__attribute__((__stdcall__)) *f) (struct S *);
4565+ int i;
4566+};
4567+
4568+void __attribute__((__stdcall__))
4569+foo (struct S *s)
4570+{
4571+ s->i++;
4572+}
4573+
4574+void __attribute__((__stdcall__))
4575+bar (struct S *s)
4576+{
4577+ foo(s);
4578+ s->f(s);
4579+}
4580+
4581+int main (void)
4582+{
4583+ struct S s = { foo, 0 };
4584+
4585+ bar (&s);
4586+ if (s.i != 2)
4587+ abort ();
4588+
4589+ return 0;
4590+}
4591+
4592diff -Naur gcc-4.4.1.orig/gcc/testsuite/gcc.target/i386/pr40906-1.c gcc-4.4.1/gcc/testsuite/gcc.target/i386/pr40906-1.c
4593--- gcc-4.4.1.orig/gcc/testsuite/gcc.target/i386/pr40906-1.c 1969-12-31 16:00:00.000000000 -0800
4594+++ gcc-4.4.1/gcc/testsuite/gcc.target/i386/pr40906-1.c 2009-08-05 11:04:42.000000000 -0700
4595@@ -0,0 +1,26 @@
4596+/* { dg-do run } */
4597+/* { dg-require-effective-target ilp32 } */
4598+/* { dg-options "-O2 -fomit-frame-pointer -mpush-args -mno-accumulate-outgoing-args" } */
4599+
4600+void abort (void);
4601+
4602+void __attribute__((noinline))
4603+f (long double a)
4604+{
4605+ if (a != 1.23L)
4606+ abort ();
4607+}
4608+
4609+int __attribute__((noinline))
4610+g (long double b)
4611+{
4612+ f (b);
4613+ return 0;
4614+}
4615+
4616+int
4617+main (void)
4618+{
4619+ g (1.23L);
4620+ return 0;
4621+}
4622diff -Naur gcc-4.4.1.orig/gcc/testsuite/gcc.target/i386/pr40906-2.c gcc-4.4.1/gcc/testsuite/gcc.target/i386/pr40906-2.c
4623--- gcc-4.4.1.orig/gcc/testsuite/gcc.target/i386/pr40906-2.c 1969-12-31 16:00:00.000000000 -0800
4624+++ gcc-4.4.1/gcc/testsuite/gcc.target/i386/pr40906-2.c 2009-08-05 11:04:42.000000000 -0700
4625@@ -0,0 +1,26 @@
4626+/* { dg-do run } */
4627+/* { dg-require-effective-target ilp32 } */
4628+/* { dg-options "-O2 -fomit-frame-pointer -mpush-args -mno-accumulate-outgoing-args -m128bit-long-double" } */
4629+
4630+void abort (void);
4631+
4632+void __attribute__((noinline))
4633+f (long double a)
4634+{
4635+ if (a != 1.23L)
4636+ abort ();
4637+}
4638+
4639+int __attribute__((noinline))
4640+g (long double b)
4641+{
4642+ f (b);
4643+ return 0;
4644+}
4645+
4646+int
4647+main (void)
4648+{
4649+ g (1.23L);
4650+ return 0;
4651+}
4652diff -Naur gcc-4.4.1.orig/gcc/testsuite/gcc.target/i386/pr40906-3.c gcc-4.4.1/gcc/testsuite/gcc.target/i386/pr40906-3.c
4653--- gcc-4.4.1.orig/gcc/testsuite/gcc.target/i386/pr40906-3.c 1969-12-31 16:00:00.000000000 -0800
4654+++ gcc-4.4.1/gcc/testsuite/gcc.target/i386/pr40906-3.c 2009-08-05 11:04:42.000000000 -0700
4655@@ -0,0 +1,25 @@
4656+/* { dg-do run { target *-*-linux* } } */
4657+/* { dg-require-effective-target ilp32 } */
4658+/* { dg-options "-O2 -fomit-frame-pointer -msse2 -mpush-args -mno-accumulate-outgoing-args" } */
4659+
4660+#include "sse2-check.h"
4661+
4662+void __attribute__((noinline))
4663+f (__float128 a)
4664+{
4665+ if (a != 1.23Q)
4666+ abort ();
4667+}
4668+
4669+int __attribute__((noinline))
4670+g (__float128 b)
4671+{
4672+ f (b);
4673+ return 0;
4674+}
4675+
4676+static void
4677+sse2_test (void)
4678+{
4679+ g (1.23Q);
4680+}
4681diff -Naur gcc-4.4.1.orig/gcc/testsuite/gcc.target/i386/pr40934.c gcc-4.4.1/gcc/testsuite/gcc.target/i386/pr40934.c
4682--- gcc-4.4.1.orig/gcc/testsuite/gcc.target/i386/pr40934.c 1969-12-31 16:00:00.000000000 -0800
4683+++ gcc-4.4.1/gcc/testsuite/gcc.target/i386/pr40934.c 2009-08-16 13:23:57.000000000 -0700
4684@@ -0,0 +1,15 @@
4685+/* { dg-do compile } */
4686+/* { dg-require-effective-target ilp32 } */
4687+/* { dg-options "-O2 -march=i586 -ffast-math" } */
4688+
4689+extern double host_frametime;
4690+extern float pitchvel;
4691+V_DriftPitch (float delta, float move)
4692+{
4693+ if (!delta)
4694+ move = host_frametime;
4695+ if (delta > 0)
4696+ ;
4697+ else if (delta < 0 && move > -delta)
4698+ pitchvel = 0;
4699+}
4700diff -Naur gcc-4.4.1.orig/gcc/testsuite/gcc.target/i386/pr40957.c gcc-4.4.1/gcc/testsuite/gcc.target/i386/pr40957.c
4701--- gcc-4.4.1.orig/gcc/testsuite/gcc.target/i386/pr40957.c 1969-12-31 16:00:00.000000000 -0800
4702+++ gcc-4.4.1/gcc/testsuite/gcc.target/i386/pr40957.c 2009-08-16 13:23:57.000000000 -0700
4703@@ -0,0 +1,18 @@
4704+/* { dg-do compile } */
4705+/* { dg-require-effective-target avx } */
4706+/* { dg-options "-O2 -mavx" } */
4707+
4708+typedef int __v8si __attribute__((__vector_size__(32)));
4709+typedef long long __m256i __attribute__((__vector_size__(32), __may_alias__));
4710+
4711+static __m256i
4712+_mm256_set1_epi32 (int __A)
4713+{
4714+ return __extension__ (__m256i)(__v8si){ __A, __A, __A, __A,
4715+ __A, __A, __A, __A };
4716+}
4717+__m256i
4718+foo ()
4719+{
4720+ return _mm256_set1_epi32 (-1);
4721+}
4722diff -Naur gcc-4.4.1.orig/gcc/testsuite/gcc.target/i386/pr41019.c gcc-4.4.1/gcc/testsuite/gcc.target/i386/pr41019.c
4723--- gcc-4.4.1.orig/gcc/testsuite/gcc.target/i386/pr41019.c 1969-12-31 16:00:00.000000000 -0800
4724+++ gcc-4.4.1/gcc/testsuite/gcc.target/i386/pr41019.c 2009-08-16 12:34:49.000000000 -0700
4725@@ -0,0 +1,19 @@
4726+/* { dg-do run } */
4727+/* { dg-options "-O2 -msse2 -ftree-vectorize" } */
4728+
4729+#include "sse2-check.h"
4730+
4731+long long int a[64];
4732+
4733+void
4734+sse2_test (void)
4735+{
4736+ int k;
4737+
4738+ for (k = 0; k < 64; k++)
4739+ a[k] = a[k] != 5 ? 12 : 10;
4740+
4741+ for (k = 0; k < 64; k++)
4742+ if (a[k] != 12)
4743+ abort ();
4744+}
4745diff -Naur gcc-4.4.1.orig/gcc/testsuite/gcc.target/powerpc/pr39902-2.c gcc-4.4.1/gcc/testsuite/gcc.target/powerpc/pr39902-2.c
4746--- gcc-4.4.1.orig/gcc/testsuite/gcc.target/powerpc/pr39902-2.c 1969-12-31 16:00:00.000000000 -0800
4747+++ gcc-4.4.1/gcc/testsuite/gcc.target/powerpc/pr39902-2.c 2009-08-03 14:43:32.000000000 -0700
4748@@ -0,0 +1,28 @@
4749+/* Check that simplification "x*(-1)" -> "-x" is not performed for decimal
4750+ float types. */
4751+
4752+/* { dg-do compile { target { powerpc*-*-linux* && powerpc_fprs } } } */
4753+/* { dg-options "-std=gnu99 -O -mcpu=power6" } */
4754+/* { dg-final { scan-assembler-not "fneg" } } */
4755+
4756+extern _Decimal32 a32, b32;
4757+extern _Decimal64 a64, b64;
4758+extern _Decimal128 a128, b128;
4759+
4760+void
4761+foo32 (void)
4762+{
4763+ b32 = a32 * -1.0DF;
4764+}
4765+
4766+void
4767+foo64 (void)
4768+{
4769+ b64 = a64 * -1.0DD;
4770+}
4771+
4772+void
4773+foo128 (void)
4774+{
4775+ b128 = a128 * -1.0DL;
4776+}
4777diff -Naur gcc-4.4.1.orig/gcc/testsuite/g++.dg/cdce3.C gcc-4.4.1/gcc/testsuite/g++.dg/cdce3.C
4778--- gcc-4.4.1.orig/gcc/testsuite/g++.dg/cdce3.C 2008-09-23 14:27:17.000000000 -0700
4779+++ gcc-4.4.1/gcc/testsuite/g++.dg/cdce3.C 2009-08-28 02:57:51.000000000 -0700
4780@@ -2,14 +2,14 @@
4781 /* { dg-require-effective-target c99_runtime } */
4782 /* { dg-options "-O2 -fmath-errno -fdump-tree-cdce-details -DGNU_EXTENSION -DLARGE_LONG_DOUBLE -lm" { target { pow10 && large_long_double } } } */
4783 /* { dg-options "-O2 -fmath-errno -fdump-tree-cdce-details -DLARGE_LONG_DOUBLE -lm" { target { {! pow10 } && large_long_double } } } */
4784-/* { dg-options "-O2 -fmath-errno -fdump-tree-cdce-details -DGNU_EXTENSION -lm" { target {pow10 && {! large_long_double } } } } */
4785+/* { dg-options "-O2 -fmath-errno -fdump-tree-cdce-details -DGNU_EXTENSION -lm" { target { pow10 && {! large_long_double } } } } */
4786 /* { dg-options "-O2 -fmath-errno -fdump-tree-cdce-details -lm" { target { {! pow10 } && {! large_long_double } } } } */
4787-/* { dg-final { scan-tree-dump "cdce3.C:91: note: function call is shrink-wrapped into error conditions\." "cdce" { target { pow10 } } } } */
4788-/* { dg-final { scan-tree-dump "cdce3.C:92: note: function call is shrink-wrapped into error conditions\." "cdce" { target { pow10 } } } } */
4789-/* { dg-final { scan-tree-dump "cdce3.C:94: note: function call is shrink-wrapped into error conditions\." "cdce" } } */
4790-/* { dg-final { scan-tree-dump "cdce3.C:95: note: function call is shrink-wrapped into error conditions\." "cdce" } } */
4791-/* { dg-final { scan-tree-dump "cdce3.C:96: note: function call is shrink-wrapped into error conditions\." "cdce" } } */
4792-/* { dg-final { scan-tree-dump "cdce3.C:97: note: function call is shrink-wrapped into error conditions\." "cdce" } } */
4793+/* { dg-options "-mieee -O2 -fmath-errno -fdump-tree-cdce-details -DGNU_EXTENSION -DLARGE_LONG_DOUBLE -lm" { target { alpha*-*-* && { pow10 && large_long_double } } } } */
4794+/* { dg-options "-mieee -O2 -fmath-errno -fdump-tree-cdce-details -DLARGE_LONG_DOUBLE -lm" { target { alpha*-*-* && { {! pow10 } && large_long_double } } } } */
4795+/* { dg-options "-mieee -O2 -fmath-errno -fdump-tree-cdce-details -DGNU_EXTENSION -lm" { target { alpha*-*-* && { pow10 && {! large_long_double } } } } } */
4796+/* { dg-options "-mieee -O2 -fmath-errno -fdump-tree-cdce-details -lm" { target { alpha*-*-* && { {! pow10 } && {! large_long_double } } } } } */
4797+/* { dg-final { scan-tree-dump "cdce3.C:95: note: function call is shrink-wrapped into error conditions\." "cdce" { target { pow10 } } } } */
4798+/* { dg-final { scan-tree-dump "cdce3.C:96: note: function call is shrink-wrapped into error conditions\." "cdce" { target { pow10 } } } } */
4799 /* { dg-final { scan-tree-dump "cdce3.C:98: note: function call is shrink-wrapped into error conditions\." "cdce" } } */
4800 /* { dg-final { scan-tree-dump "cdce3.C:99: note: function call is shrink-wrapped into error conditions\." "cdce" } } */
4801 /* { dg-final { scan-tree-dump "cdce3.C:100: note: function call is shrink-wrapped into error conditions\." "cdce" } } */
4802@@ -20,6 +20,10 @@
4803 /* { dg-final { scan-tree-dump "cdce3.C:105: note: function call is shrink-wrapped into error conditions\." "cdce" } } */
4804 /* { dg-final { scan-tree-dump "cdce3.C:106: note: function call is shrink-wrapped into error conditions\." "cdce" } } */
4805 /* { dg-final { scan-tree-dump "cdce3.C:107: note: function call is shrink-wrapped into error conditions\." "cdce" } } */
4806+/* { dg-final { scan-tree-dump "cdce3.C:108: note: function call is shrink-wrapped into error conditions\." "cdce" } } */
4807+/* { dg-final { scan-tree-dump "cdce3.C:109: note: function call is shrink-wrapped into error conditions\." "cdce" } } */
4808+/* { dg-final { scan-tree-dump "cdce3.C:110: note: function call is shrink-wrapped into error conditions\." "cdce" } } */
4809+/* { dg-final { scan-tree-dump "cdce3.C:111: note: function call is shrink-wrapped into error conditions\." "cdce" } } */
4810 /* { dg-final { cleanup-tree-dump "cdce" } } */
4811 #include <stdlib.h>
4812 #include <math.h>
4813diff -Naur gcc-4.4.1.orig/gcc/testsuite/g++.dg/cpp0x/enum1.C gcc-4.4.1/gcc/testsuite/g++.dg/cpp0x/enum1.C
4814--- gcc-4.4.1.orig/gcc/testsuite/g++.dg/cpp0x/enum1.C 2008-11-10 05:41:37.000000000 -0800
4815+++ gcc-4.4.1/gcc/testsuite/g++.dg/cpp0x/enum1.C 2009-08-31 14:20:07.000000000 -0700
4816@@ -2,5 +2,5 @@
4817 // { dg-do compile }
4818 // { dg-options "-std=gnu++0x" }
4819
4820-enum : { }; // { dg-error "expected type-specifier" }
4821+enum : { }; // { dg-error "expected" }
4822 enum : 3 { }; // { dg-error "expected" }
4823diff -Naur gcc-4.4.1.orig/gcc/testsuite/g++.dg/cpp0x/initlist22.C gcc-4.4.1/gcc/testsuite/g++.dg/cpp0x/initlist22.C
4824--- gcc-4.4.1.orig/gcc/testsuite/g++.dg/cpp0x/initlist22.C 1969-12-31 16:00:00.000000000 -0800
4825+++ gcc-4.4.1/gcc/testsuite/g++.dg/cpp0x/initlist22.C 2009-07-24 11:06:08.000000000 -0700
4826@@ -0,0 +1,24 @@
4827+// Core issue 934
4828+// { dg-options "-std=c++0x" }
4829+
4830+int i;
4831+
4832+int& r1{ i }; // OK, direct binding
4833+int&& r2{ i }; // OK, direct binding
4834+
4835+int& r3{ }; // { dg-error "" } reference to temporary
4836+int&& r4{ }; // OK, reference to temporary
4837+
4838+struct A { int i; } a;
4839+
4840+A& r5 { i }; // { dg-error "" } reference to temporary
4841+A&& r6 { i }; // OK, aggregate initialization of temporary
4842+A& r7 { a }; // { dg-error "" } invalid aggregate initializer for A
4843+A&& r8 { a }; // { dg-error "" } invalid aggregate initializer for A
4844+
4845+struct B { B(int); int i; } b(0);
4846+
4847+B& r9 { i }; // { dg-error "" } reference to temporary
4848+B&& r10 { i }; // OK, make temporary with B(int) constructor
4849+B& r11 { b }; // { dg-error "" } reference to temporary
4850+B&& r12 { b }; // OK, make temporary with copy constructor
4851diff -Naur gcc-4.4.1.orig/gcc/testsuite/g++.dg/cpp0x/initlist23.C gcc-4.4.1/gcc/testsuite/g++.dg/cpp0x/initlist23.C
4852--- gcc-4.4.1.orig/gcc/testsuite/g++.dg/cpp0x/initlist23.C 1969-12-31 16:00:00.000000000 -0800
4853+++ gcc-4.4.1/gcc/testsuite/g++.dg/cpp0x/initlist23.C 2009-07-24 11:06:08.000000000 -0700
4854@@ -0,0 +1,15 @@
4855+// { dg-options "-std=c++0x" }
4856+
4857+#include <initializer_list>
4858+
4859+struct A
4860+{
4861+ A& operator=(int i);
4862+ A& operator=(std::initializer_list<int> l) { return *this; }
4863+};
4864+
4865+int main()
4866+{
4867+ A a;
4868+ a = { };
4869+}
4870diff -Naur gcc-4.4.1.orig/gcc/testsuite/g++.dg/debug/dwarf2/pubnames-1.C gcc-4.4.1/gcc/testsuite/g++.dg/debug/dwarf2/pubnames-1.C
4871--- gcc-4.4.1.orig/gcc/testsuite/g++.dg/debug/dwarf2/pubnames-1.C 1969-12-31 16:00:00.000000000 -0800
4872+++ gcc-4.4.1/gcc/testsuite/g++.dg/debug/dwarf2/pubnames-1.C 2009-08-04 05:28:27.000000000 -0700
4873@@ -0,0 +1,14 @@
4874+// Contributed by Dodji Seketeli <dodji@redhat.com>
4875+// Origin PR debug/39706
4876+// { dg-options "-g -dA" }
4877+// { dg-do compile }
4878+// { dg-final { scan-assembler-times ".debug_pubnames" 1 } }
4879+// { dg-final { scan-assembler-times "\"main\".*external name" 1 } }
4880+// { dg-final { scan-assembler-times "\"ns::ns_x.*external name" 1 } }
4881+// { dg-final { scan-assembler-times "\"y::y_x.*external name" 1 } }
4882+
4883+namespace ns { int ns_x; }
4884+class y { public: static int y_x; };
4885+int y::y_x;
4886+int main() { return ns::ns_x; }
4887+
4888diff -Naur gcc-4.4.1.orig/gcc/testsuite/g++.dg/debug/dwarf2/typedef1.C gcc-4.4.1/gcc/testsuite/g++.dg/debug/dwarf2/typedef1.C
4889--- gcc-4.4.1.orig/gcc/testsuite/g++.dg/debug/dwarf2/typedef1.C 1969-12-31 16:00:00.000000000 -0800
4890+++ gcc-4.4.1/gcc/testsuite/g++.dg/debug/dwarf2/typedef1.C 2009-07-23 10:50:56.000000000 -0700
4891@@ -0,0 +1,33 @@
4892+// Contributed by Dodji Seketeli <dodji@redhat.com>
4893+// Origin: PR c++/40705
4894+// { dg-options "-g -dA" }
4895+// { dg-do compile }
4896+// { dg-final { scan-assembler-times "DW_TAG_structure_type" 2 } }
4897+// { dg-final { scan-assembler-times "DW_AT_name: \"foo<1u>\"" 1 } }
4898+// { dg-final { scan-assembler-times "DW_TAG_enumeration_type" 2 } }
4899+// { dg-final { scan-assembler-times "DW_AT_name: \"typedef foo<1u>::type type\"" 1 } }
4900+// { dg-final { scan-assembler-times "DIE (.*) DW_TAG_enumeration_type" 2 } }
4901+// { dg-final { scan-assembler-times "\"e0..\".*DW_AT_name" 1 } }
4902+// { dg-final { scan-assembler-times "\"e1..\".*DW_AT_name" 1 } }
4903+
4904+template <unsigned int n>
4905+struct foo
4906+{
4907+public:
4908+ typedef
4909+ unsigned char type;
4910+};
4911+
4912+template<>
4913+struct foo<1>
4914+{
4915+ typedef enum { e0, e1 } type;
4916+};
4917+
4918+int
4919+main()
4920+{
4921+ foo<1> f;
4922+ foo<1>::type t = foo<1>::e1;
4923+ return t;
4924+}
4925diff -Naur gcc-4.4.1.orig/gcc/testsuite/g++.dg/expr/stmt-expr-1.C gcc-4.4.1/gcc/testsuite/g++.dg/expr/stmt-expr-1.C
4926--- gcc-4.4.1.orig/gcc/testsuite/g++.dg/expr/stmt-expr-1.C 1969-12-31 16:00:00.000000000 -0800
4927+++ gcc-4.4.1/gcc/testsuite/g++.dg/expr/stmt-expr-1.C 2009-08-16 13:23:57.000000000 -0700
4928@@ -0,0 +1,36 @@
4929+// Contributed by Dodji Seketeli <dodji@redhat.com>
4930+// Origin PR c++/40866
4931+// { dg-options "-std=gnu++98" }
4932+// { dg-do "compile" }
4933+
4934+template <typename T> class QForeachContainer {
4935+public:
4936+ QForeachContainer();
4937+ int brk;
4938+ typename T::const_iterator i;
4939+};
4940+
4941+template <typename T> class QList {
4942+public:
4943+ class const_iterator {
4944+ public:
4945+ const_iterator(const const_iterator &o);
4946+ const_iterator &operator++();
4947+ };
4948+};
4949+
4950+class QAction;
4951+class QWidget {
4952+public:
4953+ QList<QAction*> actions() const;
4954+};
4955+class myDialog : public QWidget {
4956+ myDialog();
4957+};
4958+
4959+myDialog::myDialog()
4960+{
4961+ QForeachContainer<__typeof__(actions())> _container_;
4962+ ({++_container_.brk; ++_container_.i;});
4963+}
4964+
4965diff -Naur gcc-4.4.1.orig/gcc/testsuite/g++.dg/expr/unary3.C gcc-4.4.1/gcc/testsuite/g++.dg/expr/unary3.C
4966--- gcc-4.4.1.orig/gcc/testsuite/g++.dg/expr/unary3.C 1969-12-31 16:00:00.000000000 -0800
4967+++ gcc-4.4.1/gcc/testsuite/g++.dg/expr/unary3.C 2009-08-21 00:10:36.000000000 -0700
4968@@ -0,0 +1,11 @@
4969+// PR c++/41131
4970+// { dg-do compile }
4971+
4972+struct X { enum E { a = 100 }; };
4973+
4974+int
4975+main ()
4976+{
4977+ X x;
4978+ (void) &x.a; // { dg-error "lvalue required" }
4979+}
4980diff -Naur gcc-4.4.1.orig/gcc/testsuite/g++.dg/ext/bitfield2.C gcc-4.4.1/gcc/testsuite/g++.dg/ext/bitfield2.C
4981--- gcc-4.4.1.orig/gcc/testsuite/g++.dg/ext/bitfield2.C 2009-01-25 12:15:44.000000000 -0800
4982+++ gcc-4.4.1/gcc/testsuite/g++.dg/ext/bitfield2.C 2009-07-27 23:56:49.000000000 -0700
4983@@ -1,6 +1,7 @@
4984 /* { dg-do compile } */
4985 /* Remove pedantic. Allow the GCC extension to use char for bitfields. */
4986 /* { dg-options "" } */
4987+/* { dg-options "-mno-ms-bitfields" { target i?86-*-netware } } */
4988
4989 struct t
4990 { /* { dg-message "note: Offset of packed bit-field 't::b' has changed in GCC 4.4" "" { target pcc_bitfield_type_matters } } */
4991diff -Naur gcc-4.4.1.orig/gcc/testsuite/g++.dg/ext/bitfield3.C gcc-4.4.1/gcc/testsuite/g++.dg/ext/bitfield3.C
4992--- gcc-4.4.1.orig/gcc/testsuite/g++.dg/ext/bitfield3.C 2009-01-22 22:29:54.000000000 -0800
4993+++ gcc-4.4.1/gcc/testsuite/g++.dg/ext/bitfield3.C 2009-07-27 23:56:49.000000000 -0700
4994@@ -1,5 +1,6 @@
4995 /* { dg-do compile } */
4996 /* { dg-options "-Wno-packed-bitfield-compat" } */
4997+/* { dg-options "-Wno-packed-bitfield-compat -mno-ms-bitfields" { target i?86-*-netware } } */
4998
4999 struct t
5000 {
5001diff -Naur gcc-4.4.1.orig/gcc/testsuite/g++.dg/ext/bitfield4.C gcc-4.4.1/gcc/testsuite/g++.dg/ext/bitfield4.C
5002--- gcc-4.4.1.orig/gcc/testsuite/g++.dg/ext/bitfield4.C 2009-01-25 12:15:44.000000000 -0800
5003+++ gcc-4.4.1/gcc/testsuite/g++.dg/ext/bitfield4.C 2009-07-27 23:56:49.000000000 -0700
5004@@ -1,5 +1,6 @@
5005 /* { dg-do compile } */
5006 /* { dg-options "" } */
5007+/* { dg-options "-mno-ms-bitfields" { target i?86-*-netware } } */
5008
5009 struct t
5010 { /* { dg-message "note: Offset of packed bit-field 't::b' has changed in GCC 4.4" "" { target pcc_bitfield_type_matters } } */
5011diff -Naur gcc-4.4.1.orig/gcc/testsuite/g++.dg/ext/bitfield5.C gcc-4.4.1/gcc/testsuite/g++.dg/ext/bitfield5.C
5012--- gcc-4.4.1.orig/gcc/testsuite/g++.dg/ext/bitfield5.C 2009-01-22 22:29:54.000000000 -0800
5013+++ gcc-4.4.1/gcc/testsuite/g++.dg/ext/bitfield5.C 2009-07-27 23:56:49.000000000 -0700
5014@@ -1,5 +1,6 @@
5015 /* { dg-do compile } */
5016 /* { dg-options "-Wno-packed-bitfield-compat" } */
5017+/* { dg-options "-Wno-packed-bitfield-compat -mno-ms-bitfields" { target i?86-*-netware } } */
5018
5019 struct t
5020 {
5021diff -Naur gcc-4.4.1.orig/gcc/testsuite/g++.dg/ext/complit12.C gcc-4.4.1/gcc/testsuite/g++.dg/ext/complit12.C
5022--- gcc-4.4.1.orig/gcc/testsuite/g++.dg/ext/complit12.C 1969-12-31 16:00:00.000000000 -0800
5023+++ gcc-4.4.1/gcc/testsuite/g++.dg/ext/complit12.C 2009-08-06 10:22:19.000000000 -0700
5024@@ -0,0 +1,65 @@
5025+// PR c++/40948
5026+// { dg-do run }
5027+// { dg-options "" }
5028+
5029+int c;
5030+struct M
5031+{
5032+ M () { ++c; }
5033+ M (const M&) { ++c; }
5034+ ~M () { --c; }
5035+};
5036+
5037+struct S
5038+{
5039+ S ();
5040+ M m[1];
5041+};
5042+
5043+S::S () : m ((M[1]) { M () })
5044+{
5045+}
5046+
5047+struct T
5048+{
5049+ T ();
5050+ M m[4];
5051+};
5052+
5053+T::T () : m ((M[4]) { M (), M (), M (), M () })
5054+{
5055+}
5056+
5057+typedef M MA[1];
5058+MA &bar (MA, MA& r) { return r; }
5059+
5060+M f(M m) { return m; }
5061+
5062+int main ()
5063+{
5064+ {
5065+ M m[1] = (M[1]) { M () };
5066+ if (c != 1)
5067+ return 1;
5068+ M n = (M) { M () };
5069+ if (c != 2)
5070+ return 2;
5071+ M o[4] = (M[4]) { M (), M (), M (), M () };
5072+ if (c != 6)
5073+ return 3;
5074+ S s;
5075+ if (c != 7)
5076+ return 4;
5077+ T t;
5078+ if (c != 11)
5079+ return 5;
5080+ MA ma = bar ((M[2]) { M(), M() }, m);
5081+ if (c != 12)
5082+ return 7;
5083+ M mm[2] = ((M[2]) { f(M()), f(M()) });
5084+ if (c != 14)
5085+ return 8;
5086+ }
5087+ if (c != 0)
5088+ return 6;
5089+}
5090diff -Naur gcc-4.4.1.orig/gcc/testsuite/g++.dg/lookup/using21.C gcc-4.4.1/gcc/testsuite/g++.dg/lookup/using21.C
5091--- gcc-4.4.1.orig/gcc/testsuite/g++.dg/lookup/using21.C 1969-12-31 16:00:00.000000000 -0800
5092+++ gcc-4.4.1/gcc/testsuite/g++.dg/lookup/using21.C 2009-07-23 10:50:56.000000000 -0700
5093@@ -0,0 +1,13 @@
5094+// PR c++/40799
5095+
5096+namespace Bar {
5097+ typedef int A;
5098+}
5099+class CollectionDeleteGuard {
5100+public:
5101+ CollectionDeleteGuard(int);
5102+};
5103+CollectionDeleteGuard::CollectionDeleteGuard(int)
5104+{
5105+ using Bar::A;
5106+}
5107diff -Naur gcc-4.4.1.orig/gcc/testsuite/g++.dg/opt/pr40496.C gcc-4.4.1/gcc/testsuite/g++.dg/opt/pr40496.C
5108--- gcc-4.4.1.orig/gcc/testsuite/g++.dg/opt/pr40496.C 1969-12-31 16:00:00.000000000 -0800
5109+++ gcc-4.4.1/gcc/testsuite/g++.dg/opt/pr40496.C 2009-07-23 10:50:56.000000000 -0700
5110@@ -0,0 +1,18 @@
5111+// { dg-do compile }
5112+// { dg-options "-O2 -fprefetch-loop-arrays -msse2" { target i?86-*-* x86_64-*-* } }
5113+
5114+struct DOMStringHandle
5115+{
5116+ unsigned int fLength;
5117+ int fRefCount;
5118+};
5119+static void *freeListPtr;
5120+void foo(DOMStringHandle *dsg)
5121+{
5122+ int i;
5123+ for (i = 1; i < 1023; i++)
5124+ {
5125+ *(void **) &dsg[i] = freeListPtr;
5126+ freeListPtr = &dsg[i];
5127+ }
5128+}
5129diff -Naur gcc-4.4.1.orig/gcc/testsuite/g++.dg/other/gc4.C gcc-4.4.1/gcc/testsuite/g++.dg/other/gc4.C
5130--- gcc-4.4.1.orig/gcc/testsuite/g++.dg/other/gc4.C 1969-12-31 16:00:00.000000000 -0800
5131+++ gcc-4.4.1/gcc/testsuite/g++.dg/other/gc4.C 2009-08-29 19:06:32.000000000 -0700
5132@@ -0,0 +1,14 @@
5133+// PR c++/41120
5134+// { dg-options "--param ggc-min-heapsize=0 --param ggc-min-expand=0" }
5135+
5136+struct A
5137+{
5138+ A();
5139+};
5140+
5141+struct B
5142+{
5143+ A a;
5144+};
5145+
5146+B b;
5147diff -Naur gcc-4.4.1.orig/gcc/testsuite/g++.dg/other/typedef3.C gcc-4.4.1/gcc/testsuite/g++.dg/other/typedef3.C
5148--- gcc-4.4.1.orig/gcc/testsuite/g++.dg/other/typedef3.C 1969-12-31 16:00:00.000000000 -0800
5149+++ gcc-4.4.1/gcc/testsuite/g++.dg/other/typedef3.C 2009-07-23 10:50:56.000000000 -0700
5150@@ -0,0 +1,12 @@
5151+// Contributed by Dodji Seketeli <dodji@redhat.com>
5152+// Origin: PR c++/40357
5153+// { dg-do compile }
5154+
5155+struct XalanCProcessor
5156+{
5157+ typedef enum {eInvalid, eXalanSourceTree, eXercesDOM} ParseOptionType;
5158+ ParseOptionType getParseOption(void);
5159+};
5160+typedef XalanCProcessor::ParseOptionType ParseOptionType;
5161+ParseOptionType XalanCProcessor::getParseOption(void) {}
5162+
5163diff -Naur gcc-4.4.1.orig/gcc/testsuite/g++.dg/overload/defarg4.C gcc-4.4.1/gcc/testsuite/g++.dg/overload/defarg4.C
5164--- gcc-4.4.1.orig/gcc/testsuite/g++.dg/overload/defarg4.C 1969-12-31 16:00:00.000000000 -0800
5165+++ gcc-4.4.1/gcc/testsuite/g++.dg/overload/defarg4.C 2009-08-07 06:15:43.000000000 -0700
5166@@ -0,0 +1,26 @@
5167+// Contributed by Dodji Seketeli <dodji@redhat.com>
5168+// Origin PR c++/39987
5169+// { dg-do "compile" }
5170+
5171+class foo
5172+{
5173+ template<typename U>
5174+ static bool func(const U& x)
5175+ {}
5176+public:
5177+ template<typename U>
5178+ unsigned int Find(const U& x, bool (*pFunc) (const U&) = func) const
5179+ {}
5180+};
5181+
5182+class bar {
5183+ bool Initialize();
5184+protected:
5185+ foo b;
5186+};
5187+
5188+bool bar::Initialize()
5189+{
5190+ b.Find(b);
5191+}
5192+
5193diff -Naur gcc-4.4.1.orig/gcc/testsuite/g++.dg/parse/enum5.C gcc-4.4.1/gcc/testsuite/g++.dg/parse/enum5.C
5194--- gcc-4.4.1.orig/gcc/testsuite/g++.dg/parse/enum5.C 1969-12-31 16:00:00.000000000 -0800
5195+++ gcc-4.4.1/gcc/testsuite/g++.dg/parse/enum5.C 2009-08-31 14:20:07.000000000 -0700
5196@@ -0,0 +1,17 @@
5197+// PR c++/41127
5198+
5199+#define CHAR_BIT 8
5200+enum EE {ee};
5201+typedef unsigned int T;
5202+
5203+struct D {
5204+ T : sizeof(unsigned int) * CHAR_BIT; // OK
5205+ EE : sizeof(EE) * CHAR_BIT; // OK
5206+ enum EE : sizeof(EE) * CHAR_BIT; // not OK
5207+ enum EE xxxx : sizeof(EE) * CHAR_BIT; // OK
5208+ T x : sizeof(unsigned int) * CHAR_BIT; // OK
5209+ enum FF {ff} : sizeof(int) * CHAR_BIT; // OK
5210+} element;
5211+
5212+enum EE xx;
5213+EE yy;
5214diff -Naur gcc-4.4.1.orig/gcc/testsuite/g++.dg/torture/pr40321.C gcc-4.4.1/gcc/testsuite/g++.dg/torture/pr40321.C
5215--- gcc-4.4.1.orig/gcc/testsuite/g++.dg/torture/pr40321.C 1969-12-31 16:00:00.000000000 -0800
5216+++ gcc-4.4.1/gcc/testsuite/g++.dg/torture/pr40321.C 2009-07-22 07:45:21.000000000 -0700
5217@@ -0,0 +1,25 @@
5218+/* { dg-do compile } */
5219+
5220+struct VectorD2
5221+{
5222+ VectorD2() : x(0), y(0) { }
5223+ VectorD2(int _x, int _y) : x(_x), y(_y) { }
5224+ int x, y;
5225+ int GetLength2() const { return x*x + y*y; };
5226+ VectorD2 operator+(const VectorD2 vec) const {
5227+ return VectorD2(x+vec.x,y+vec.y);
5228+ }
5229+};
5230+struct Shape
5231+{
5232+ enum Type { ST_RECT, ST_CIRCLE } type;
5233+ VectorD2 pos;
5234+ VectorD2 radius;
5235+ bool CollisionWith(const Shape& s) const;
5236+};
5237+bool Shape::CollisionWith(const Shape& s) const
5238+{
5239+ if(type == ST_CIRCLE && s.type == ST_RECT)
5240+ return s.CollisionWith(*this);
5241+ return (pos + s.pos).GetLength2() < (radius + s.radius).GetLength2();
5242+}
5243diff -Naur gcc-4.4.1.orig/gcc/testsuite/g++.dg/torture/pr40834.C gcc-4.4.1/gcc/testsuite/g++.dg/torture/pr40834.C
5244--- gcc-4.4.1.orig/gcc/testsuite/g++.dg/torture/pr40834.C 1969-12-31 16:00:00.000000000 -0800
5245+++ gcc-4.4.1/gcc/testsuite/g++.dg/torture/pr40834.C 2009-08-05 07:45:15.000000000 -0700
5246@@ -0,0 +1,52 @@
5247+/* { dg-do run } */
5248+
5249+extern "C" void abort (void);
5250+class XalanDOMString
5251+{
5252+public:
5253+ int y;
5254+};
5255+
5256+class XObject
5257+{
5258+public:
5259+ const XalanDOMString& str() const { return x; }
5260+ XalanDOMString x;
5261+};
5262+
5263+class XObjectPtr
5264+{
5265+public:
5266+ XObjectPtr(const XObjectPtr& theSource)
5267+ {
5268+ m_xobjectPtr = theSource.m_xobjectPtr;
5269+ }
5270+ const XObject* operator->() const
5271+ {
5272+ return m_xobjectPtr;
5273+ };
5274+ XObjectPtr(XObject *p) { m_xobjectPtr = p; }
5275+ XObject* m_xobjectPtr;
5276+};
5277+
5278+class FunctionSubstringBefore
5279+{
5280+public:
5281+ int execute( const XObjectPtr arg1) const
5282+ {
5283+ const XalanDOMString& theFirstString = arg1->str();
5284+ return theFirstString.y;
5285+ }
5286+};
5287+
5288+int
5289+main ()
5290+{
5291+ XObject x;
5292+ XObjectPtr y (&x);
5293+ x.x.y = -1;
5294+ FunctionSubstringBefore z;
5295+ if (z.execute (y) != -1)
5296+ abort ();
5297+ return 0;
5298+}
5299diff -Naur gcc-4.4.1.orig/gcc/testsuite/g++.dg/torture/pr40924.C gcc-4.4.1/gcc/testsuite/g++.dg/torture/pr40924.C
5300--- gcc-4.4.1.orig/gcc/testsuite/g++.dg/torture/pr40924.C 1969-12-31 16:00:00.000000000 -0800
5301+++ gcc-4.4.1/gcc/testsuite/g++.dg/torture/pr40924.C 2009-08-05 05:54:21.000000000 -0700
5302@@ -0,0 +1,111 @@
5303+// PR rtl-optimization/40924
5304+// { dg-do run }
5305+
5306+extern "C" void abort (void);
5307+
5308+#define MAY_ALIAS __attribute__((__may_alias__))
5309+
5310+typedef struct { float v[2]; } floata;
5311+typedef struct { int v[2]; } inta;
5312+
5313+typedef unsigned int uint MAY_ALIAS;
5314+typedef signed int sint MAY_ALIAS;
5315+typedef float flt MAY_ALIAS;
5316+
5317+static inline unsigned short
5318+less_than (inta a, inta b)
5319+{
5320+ unsigned short r = 0;
5321+ const uint *p1 = (const uint *) &a;
5322+ const uint *p2 = (const uint *) &b;
5323+ for (int i=0; i < 2; i++)
5324+ if (p1[i] < p2[i]) r |= (1 << i);
5325+ return r;
5326+}
5327+
5328+static inline inta
5329+multiply (inta b, inta c)
5330+{
5331+ inta r;
5332+ sint *p3 = (sint *) &c;
5333+ for (int i=0; i < 2; i++)
5334+ r.v[i] = (int) (b.v[i] * p3[i] & 0xFFFFFFFF);
5335+ return r;
5336+}
5337+
5338+static inline floata
5339+gather (inta indexes, const void *baseAddr)
5340+{
5341+ floata r;
5342+
5343+ sint *idx = (sint *) &indexes;
5344+ flt *src = (flt *) baseAddr;
5345+ for (int i=0; i < 2; i++)
5346+ r.v[i] = *(src + idx[i]);
5347+ return r;
5348+}
5349+
5350+static inline inta
5351+add (const inta &b, const inta &c)
5352+{
5353+ inta result;
5354+ sint *r = (sint *) &result;
5355+
5356+ for (int i=0; i < 2; i++)
5357+ r[i] = b.v[i] + c.v[i];
5358+ return result;
5359+}
5360+
5361+struct uintv
5362+{
5363+ inta data;
5364+ inline uintv () { data.v[0] = 0; data.v[1] = 1; }
5365+ inline uintv (unsigned int a)
5366+ {
5367+ for (int i=0; i < 2; i++)
5368+ *(uint *) &data.v[i] = a;
5369+ }
5370+ inline uintv (inta x) : data (x) {}
5371+ inline uintv operator* (const uintv &x) const
5372+ { return multiply (data, x.data); }
5373+ inline uintv operator+ (const uintv &x) const
5374+ { return uintv (add (data, x.data)); }
5375+ inline unsigned short operator< (const uintv &x) const
5376+ { return less_than (data, x.data); }
5377+};
5378+
5379+struct floatv
5380+{
5381+ floata data;
5382+ explicit inline floatv (const uintv &x)
5383+ {
5384+ uint *p2 = (uint *) &x.data;
5385+ for (int i=0; i < 2; i++)
5386+ data.v[i] = p2[i];
5387+ }
5388+ inline floatv (const float *array, const uintv &indexes)
5389+ {
5390+ const uintv &offsets = indexes * uintv (1);
5391+ data = gather (offsets.data, array);
5392+ }
5393+ unsigned short operator== (const floatv &x) const
5394+ {
5395+ unsigned short r = 0;
5396+ for (int i=0; i < 2; i++)
5397+ if (data.v[i] == x.data.v[i]) r |= (1 << i);
5398+ return r;
5399+ }
5400+};
5401+
5402+int
5403+main ()
5404+{
5405+ const float array[2] = { 2, 3 };
5406+ for (uintv i; (i < 2) == 3; i = i + 2)
5407+ {
5408+ const floatv ii (i + 2);
5409+ floatv a (array, i);
5410+ if ((a == ii) != 3)
5411+ abort ();
5412+ }
5413+}
5414diff -Naur gcc-4.4.1.orig/gcc/testsuite/g++.dg/torture/pr40991.C gcc-4.4.1/gcc/testsuite/g++.dg/torture/pr40991.C
5415--- gcc-4.4.1.orig/gcc/testsuite/g++.dg/torture/pr40991.C 1969-12-31 16:00:00.000000000 -0800
5416+++ gcc-4.4.1/gcc/testsuite/g++.dg/torture/pr40991.C 2009-08-16 13:23:57.000000000 -0700
5417@@ -0,0 +1,113 @@
5418+/* { dg-options "-std=gnu++0x" } */
5419+
5420+typedef __SIZE_TYPE__ size_t;
5421+namespace std __attribute__ ((__visibility__ ("default"))) {
5422+ using ::size_t;
5423+ void __throw_bad_function_call() __attribute__((__noreturn__));
5424+}
5425+inline void* operator new(std::size_t, void* __p) throw() {
5426+ return __p;
5427+}
5428+namespace std {
5429+ class type_info {
5430+ public:
5431+ bool operator==(const type_info& __arg) const { }
5432+ };
5433+ namespace tr1 {
5434+ template<typename _Tp, _Tp __v> struct integral_constant { };
5435+ typedef integral_constant<bool, true> true_type;
5436+ template<typename _Res, typename... _ArgTypes>
5437+ struct _Maybe_unary_or_binary_function { };
5438+ class _Undefined_class;
5439+ union _Nocopy_types {
5440+ void (_Undefined_class::*_M_member_pointer)();
5441+ };
5442+ union _Any_data {
5443+ void* _M_access() {
5444+ return &_M_pod_data[0];
5445+ }
5446+ char _M_pod_data[sizeof(_Nocopy_types)];
5447+ };
5448+ enum _Manager_operation { __get_type_info, __get_functor_ptr, __clone_functor, __destroy_functor };
5449+ template<typename _Tp> struct _Simple_type_wrapper {
5450+ _Simple_type_wrapper(_Tp __value) : __value(__value) { }
5451+ _Tp __value;
5452+ };
5453+ template<typename _Signature> class function;
5454+ class _Function_base {
5455+ public:
5456+ static const std::size_t _M_max_size = sizeof(_Nocopy_types);
5457+ static const std::size_t _M_max_align = __alignof__(_Nocopy_types);
5458+ template<typename _Functor> class _Base_manager {
5459+ static const bool __stored_locally = (sizeof(_Functor) <= _M_max_size && __alignof__(_Functor) <= _M_max_align && (_M_max_align % __alignof__(_Functor) == 0));
5460+ typedef integral_constant<bool, __stored_locally> _Local_storage;
5461+ public:
5462+ static bool _M_manager(_Any_data& __dest, const _Any_data& __source, _Manager_operation __op) { }
5463+ static void _M_init_functor(_Any_data& __functor, const _Functor& __f) {
5464+ _M_init_functor(__functor, __f, _Local_storage());
5465+ }
5466+ template<typename _Class, typename _Tp> static bool _M_not_empty_function(_Tp _Class::* const& __mp) {
5467+ return __mp;
5468+ }
5469+ static void _M_init_functor(_Any_data& __functor, const _Functor& __f, true_type) {
5470+ new (__functor._M_access()) _Functor(__f);
5471+ }
5472+ };
5473+ ~_Function_base() {
5474+ if (_M_manager) _M_manager(_M_functor, _M_functor, __destroy_functor);
5475+ }
5476+ bool _M_empty() const {
5477+ return !_M_manager;
5478+ }
5479+ typedef bool (*_Manager_type)(_Any_data&, const _Any_data&, _Manager_operation);
5480+ _Any_data _M_functor;
5481+ _Manager_type _M_manager;
5482+ };
5483+ template<typename _Signature, typename _Functor> class _Function_handler;
5484+ template<typename _Class, typename _Member, typename _Res, typename... _ArgTypes> class _Function_handler<_Res(_ArgTypes...), _Member _Class::*> : public _Function_handler<void(_ArgTypes...), _Member _Class::*> {
5485+ public:
5486+ static _Res _M_invoke(const _Any_data& __functor, _ArgTypes... __args) { }
5487+ };
5488+ template<typename _Class, typename _Member, typename... _ArgTypes> class _Function_handler<void(_ArgTypes...), _Member _Class::*> : public _Function_base::_Base_manager< _Simple_type_wrapper< _Member _Class::* > > { };
5489+ template<typename _Res, typename... _ArgTypes> class function<_Res(_ArgTypes...)> : public _Maybe_unary_or_binary_function<_Res, _ArgTypes...>, private _Function_base {
5490+ typedef _Res _Signature_type(_ArgTypes...);
5491+ struct _Useless { };
5492+ public:
5493+ template<typename _Functor> function(_Functor __f, _Useless = _Useless());
5494+ _Res operator()(_ArgTypes... __args) const;
5495+ const type_info& target_type() const;
5496+ typedef _Res (*_Invoker_type)(const _Any_data&, _ArgTypes...);
5497+ _Invoker_type _M_invoker;
5498+ };
5499+ template<typename _Res, typename... _ArgTypes> template<typename _Functor> function<_Res(_ArgTypes...)>:: function(_Functor __f, _Useless) : _Function_base() {
5500+ typedef _Function_handler<_Signature_type, _Functor> _My_handler;
5501+ if (_My_handler::_M_not_empty_function(__f)) {
5502+ _M_invoker = &_My_handler::_M_invoke;
5503+ _M_manager = &_My_handler::_M_manager;
5504+ _My_handler::_M_init_functor(_M_functor, __f);
5505+ }
5506+ }
5507+ template<typename _Res, typename... _ArgTypes> _Res function<_Res(_ArgTypes...)>:: operator()(_ArgTypes... __args) const {
5508+ if (_M_empty()) {
5509+ __throw_bad_function_call();
5510+ }
5511+ return _M_invoker(_M_functor, __args...);
5512+ }
5513+ template<typename _Res, typename... _ArgTypes> const type_info& function<_Res(_ArgTypes...)>:: target_type() const {
5514+ if (_M_manager) {
5515+ _Any_data __typeinfo_result;
5516+ _M_manager(__typeinfo_result, _M_functor, __get_type_info);
5517+ }
5518+ }
5519+ }
5520+}
5521+struct X {
5522+ int bar;
5523+};
5524+void test05() {
5525+ using std::tr1::function;
5526+ X x;
5527+ function<int(X&)> frm(&X::bar);
5528+ frm(x) == 17;
5529+ typeid(int X::*) == frm.target_type();
5530+}
5531diff -Naur gcc-4.4.1.orig/gcc/testsuite/g++.dg/torture/pr41144.C gcc-4.4.1/gcc/testsuite/g++.dg/torture/pr41144.C
5532--- gcc-4.4.1.orig/gcc/testsuite/g++.dg/torture/pr41144.C 1969-12-31 16:00:00.000000000 -0800
5533+++ gcc-4.4.1/gcc/testsuite/g++.dg/torture/pr41144.C 2009-09-10 11:57:46.000000000 -0700
5534@@ -0,0 +1,23 @@
5535+/* { dg-do compile } */
5536+
5537+struct rgba8;
5538+template<class ColorT> class span_gouraud {
5539+public:
5540+ struct coord_type { };
5541+ coord_type m_coord[3];
5542+};
5543+template<class ColorT> class span_gouraud_rgba : public span_gouraud<ColorT>
5544+{
5545+ typedef ColorT color_type;
5546+ typedef span_gouraud<color_type> base_type;
5547+ typedef typename base_type::coord_type coord_type;
5548+public:
5549+ void prepare() {
5550+ coord_type coord[3];
5551+ }
5552+};
5553+void the_application() {
5554+ typedef span_gouraud_rgba<rgba8> gouraud_span_gen_type;
5555+ gouraud_span_gen_type span_gouraud;
5556+ span_gouraud.prepare();
5557+}
5558diff -Naur gcc-4.4.1.orig/gcc/testsuite/g++.dg/torture/pr41257-2.C gcc-4.4.1/gcc/testsuite/g++.dg/torture/pr41257-2.C
5559--- gcc-4.4.1.orig/gcc/testsuite/g++.dg/torture/pr41257-2.C 1969-12-31 16:00:00.000000000 -0800
5560+++ gcc-4.4.1/gcc/testsuite/g++.dg/torture/pr41257-2.C 2009-09-10 11:57:46.000000000 -0700
5561@@ -0,0 +1,16 @@
5562+/* { dg-do link } */
5563+
5564+struct A
5565+{
5566+ virtual ~A();
5567+};
5568+
5569+struct B : virtual A
5570+{
5571+ virtual ~B() {}
5572+};
5573+
5574+int main()
5575+{
5576+ return 0;
5577+}
5578diff -Naur gcc-4.4.1.orig/gcc/testsuite/g++.dg/torture/pr41257.C gcc-4.4.1/gcc/testsuite/g++.dg/torture/pr41257.C
5579--- gcc-4.4.1.orig/gcc/testsuite/g++.dg/torture/pr41257.C 1969-12-31 16:00:00.000000000 -0800
5580+++ gcc-4.4.1/gcc/testsuite/g++.dg/torture/pr41257.C 2009-09-10 11:57:46.000000000 -0700
5581@@ -0,0 +1,20 @@
5582+/* { dg-do compile } */
5583+
5584+struct A
5585+{
5586+ virtual void foo();
5587+ virtual ~A();
5588+ int i;
5589+};
5590+
5591+struct B : virtual A {};
5592+
5593+struct C : B
5594+{
5595+ virtual void foo();
5596+};
5597+
5598+void bar()
5599+{
5600+ C().foo();
5601+}
5602diff -Naur gcc-4.4.1.orig/gcc/testsuite/g++.dg/torture/pr41273.C gcc-4.4.1/gcc/testsuite/g++.dg/torture/pr41273.C
5603--- gcc-4.4.1.orig/gcc/testsuite/g++.dg/torture/pr41273.C 1969-12-31 16:00:00.000000000 -0800
5604+++ gcc-4.4.1/gcc/testsuite/g++.dg/torture/pr41273.C 2009-09-10 11:57:46.000000000 -0700
5605@@ -0,0 +1,18 @@
5606+/* { dg-do compile } */
5607+/* { dg-options "-g" } */
5608+
5609+long *H2_ipX_ener_sort;
5610+double H2_old_populations[2];
5611+double H2_total;
5612+
5613+void H2_LevelPops()
5614+{
5615+ double sum_pop = 0.;
5616+ long nEner = 0;
5617+ while( nEner < 3 && sum_pop/H2_total < 0.99999 )
5618+ {
5619+ long ip = H2_ipX_ener_sort[nEner];
5620+ sum_pop += H2_old_populations[ip];
5621+ ++nEner;
5622+ }
5623+}
5624diff -Naur gcc-4.4.1.orig/gcc/testsuite/g++.dg/warn/Wreturn-type-6.C gcc-4.4.1/gcc/testsuite/g++.dg/warn/Wreturn-type-6.C
5625--- gcc-4.4.1.orig/gcc/testsuite/g++.dg/warn/Wreturn-type-6.C 1969-12-31 16:00:00.000000000 -0800
5626+++ gcc-4.4.1/gcc/testsuite/g++.dg/warn/Wreturn-type-6.C 2009-07-26 09:05:22.000000000 -0700
5627@@ -0,0 +1,13 @@
5628+/* PR c++/40749 */
5629+/* { dg-do "compile" } */
5630+/* { dg-options "-Wreturn-type" } */
5631+
5632+struct A {};
5633+const A a() {} /* { dg-warning "no return statement" } */
5634+const A& b() {} /* { dg-warning "no return statement" } */
5635+
5636+const int c() {} /* { dg-warning "no return statement" } */
5637+
5638+template<class T>
5639+const int foo(T t) {} /* { dg-warning "no return statement" } */
5640+int d = foo<int>(0), e = foo<int>(1);
5641diff -Naur gcc-4.4.1.orig/gcc/testsuite/gfortran.dg/altreturn_7.f90 gcc-4.4.1/gcc/testsuite/gfortran.dg/altreturn_7.f90
5642--- gcc-4.4.1.orig/gcc/testsuite/gfortran.dg/altreturn_7.f90 1969-12-31 16:00:00.000000000 -0800
5643+++ gcc-4.4.1/gcc/testsuite/gfortran.dg/altreturn_7.f90 2009-07-28 09:51:19.000000000 -0700
5644@@ -0,0 +1,34 @@
5645+! { dg-do compile }
5646+!
5647+! PR 40848: [4.5 Regression] ICE with alternate returns
5648+!
5649+! Contributed by Joost VandeVondele <jv244@cam.ac.uk>
5650+
5651+MODULE TT
5652+
5653+INTERFACE M
5654+ MODULE PROCEDURE M1,M2
5655+END INTERFACE
5656+
5657+CONTAINS
5658+
5659+ SUBROUTINE M1(I,*)
5660+ INTEGER :: I
5661+ RETURN 1
5662+ END SUBROUTINE
5663+
5664+ SUBROUTINE M2(I,J)
5665+ INTEGER :: I,J
5666+ END SUBROUTINE
5667+
5668+END MODULE
5669+
5670+
5671+ USE TT
5672+ CALL M(1,*2)
5673+ CALL ABORT()
5674+2 CONTINUE
5675+END
5676+
5677+! { dg-final { cleanup-modules "tt" } }
5678+
5679diff -Naur gcc-4.4.1.orig/gcc/testsuite/gfortran.dg/c_f_pointer_tests_4.f90 gcc-4.4.1/gcc/testsuite/gfortran.dg/c_f_pointer_tests_4.f90
5680--- gcc-4.4.1.orig/gcc/testsuite/gfortran.dg/c_f_pointer_tests_4.f90 1969-12-31 16:00:00.000000000 -0800
5681+++ gcc-4.4.1/gcc/testsuite/gfortran.dg/c_f_pointer_tests_4.f90 2009-08-20 13:42:38.000000000 -0700
5682@@ -0,0 +1,15 @@
5683+! { dg-do run }
5684+program main
5685+ use iso_c_binding, only: c_ptr, c_loc, c_f_pointer
5686+ implicit none
5687+ integer, dimension(2,1,2), target :: table
5688+ table = reshape ( (/ 1,2,-1,-2/), (/2,1,2/))
5689+ call set_table (c_loc (table))
5690+contains
5691+ subroutine set_table (cptr)
5692+ type(c_ptr), intent(in) :: cptr
5693+ integer, dimension(:,:,:), pointer :: table_tmp
5694+ call c_f_pointer (cptr, table_tmp, (/2,1,2/))
5695+ if (any(table_tmp /= table)) call abort
5696+ end subroutine set_table
5697+end program main
5698diff -Naur gcc-4.4.1.orig/gcc/testsuite/gfortran.dg/char_length_16.f90 gcc-4.4.1/gcc/testsuite/gfortran.dg/char_length_16.f90
5699--- gcc-4.4.1.orig/gcc/testsuite/gfortran.dg/char_length_16.f90 1969-12-31 16:00:00.000000000 -0800
5700+++ gcc-4.4.1/gcc/testsuite/gfortran.dg/char_length_16.f90 2009-07-28 09:51:19.000000000 -0700
5701@@ -0,0 +1,12 @@
5702+! { dg-do compile }
5703+!
5704+! PR 40822: [4.5 Regression] Internal compiler error when Fortran intrinsic LEN referenced before explicit declaration
5705+!
5706+! Contributed by Mat Cross <mathewc@nag.co.uk>
5707+
5708+SUBROUTINE SEARCH(ITEMVAL)
5709+ CHARACTER (*) :: ITEMVAL
5710+ CHARACTER (LEN(ITEMVAL)) :: ITEM
5711+ INTRINSIC LEN
5712+END
5713+
5714diff -Naur gcc-4.4.1.orig/gcc/testsuite/gfortran.dg/derived_init_3.f90 gcc-4.4.1/gcc/testsuite/gfortran.dg/derived_init_3.f90
5715--- gcc-4.4.1.orig/gcc/testsuite/gfortran.dg/derived_init_3.f90 1969-12-31 16:00:00.000000000 -0800
5716+++ gcc-4.4.1/gcc/testsuite/gfortran.dg/derived_init_3.f90 2009-07-29 02:35:15.000000000 -0700
5717@@ -0,0 +1,34 @@
5718+! { dg-do run }
5719+!
5720+! PR fortran/40851
5721+!
5722+! Make sure the an INTENT(OUT) dummy is not initialized
5723+! when it is a pointer.
5724+!
5725+! Contributed by Juergen Reuter <juergen.reuter@desy.de>.
5726+!
5727+program main
5728+
5729+ type :: string
5730+ character,dimension(:),allocatable :: chars
5731+ end type string
5732+
5733+ type :: string_container
5734+ type(string) :: string
5735+ end type string_container
5736+
5737+ type(string_container), target :: tgt
5738+ type(string_container), pointer :: ptr
5739+
5740+ ptr => tgt
5741+ call set_ptr (ptr)
5742+ if (associated(ptr)) call abort()
5743+
5744+contains
5745+
5746+ subroutine set_ptr (ptr)
5747+ type(string_container), pointer, intent(out) :: ptr
5748+ ptr => null ()
5749+ end subroutine set_ptr
5750+
5751+end program main
5752diff -Naur gcc-4.4.1.orig/gcc/testsuite/gfortran.dg/fmt_cache_1.f gcc-4.4.1/gcc/testsuite/gfortran.dg/fmt_cache_1.f
5753--- gcc-4.4.1.orig/gcc/testsuite/gfortran.dg/fmt_cache_1.f 1969-12-31 16:00:00.000000000 -0800
5754+++ gcc-4.4.1/gcc/testsuite/gfortran.dg/fmt_cache_1.f 2009-07-23 10:50:56.000000000 -0700
5755@@ -0,0 +1,33 @@
5756+! { dg-do run { target fd_truncate } }
5757+! pr40662 segfaults when specific format is invoked twice.
5758+! pr40330 incorrect io.
5759+! test case derived from pr40662, <jvdelisle@gcc.gnu.org>
5760+ program astap
5761+ character(40) teststring
5762+ arlxca = 0.0
5763+ open(10)
5764+ write(10,40) arlxca
5765+ write(10,40) arlxca
5766+40 format(t4,"arlxca = ",1pg13.6,t27,"arlxcc = ",g13.6,t53,
5767+ . "atmpca = ",g13.6,t79,"atmpcc = ",g13.6,t105,
5768+ . "backup = ",g13.6,/,
5769+ . t4,"csgfac = ",g13.6,t27,"csgmax = ",g13.6,t53,
5770+ . "csgmin = ",g13.6,t79,"drlxca = ",g13.6,t105,
5771+ . "drlxcc = ",g13.6,/,
5772+ . t4,"dtimeh = ",g13.6,t27,"dtimei = ",g13.6,t53,
5773+ . "dtimel = ",g13.6,t79,"dtimeu = ",g13.6,t105,
5774+ . "dtmpca = ",g13.6,/,
5775+ . t4,"dtmpcc = ",g13.6,t27,"ebalna = ",g13.6,t53,
5776+ . "ebalnc = ",g13.6,t79,"ebalsa = ",g13.6,t105,
5777+ . "ebalsc = ",g13.6)
5778+ rewind 10
5779+ rewind 10
5780+ teststring = ""
5781+ read(10,'(a)') teststring
5782+ if (teststring.ne." arlxca = 0.00000 arlxcc = ")call abort
5783+ teststring = ""
5784+ read(10,'(a)') teststring
5785+ if (teststring.ne." arlxca = 0.00000 arlxcc = ")call abort
5786+ end program astap
5787+
5788+
5789diff -Naur gcc-4.4.1.orig/gcc/testsuite/gfortran.dg/gomp/pr40878-1.f90 gcc-4.4.1/gcc/testsuite/gfortran.dg/gomp/pr40878-1.f90
5790--- gcc-4.4.1.orig/gcc/testsuite/gfortran.dg/gomp/pr40878-1.f90 1969-12-31 16:00:00.000000000 -0800
5791+++ gcc-4.4.1/gcc/testsuite/gfortran.dg/gomp/pr40878-1.f90 2009-07-28 09:33:08.000000000 -0700
5792@@ -0,0 +1,63 @@
5793+! PR fortran/40878
5794+! { dg-do compile }
5795+! { dg-options "-fopenmp" }
5796+
5797+subroutine test1
5798+ integer :: j, k
5799+ integer :: m = 2
5800+!$omp parallel do collapse(m) schedule (static,1) ! { dg-error "Constant expression required" }
5801+ do k = 1, 2
5802+ do j = 1, 6
5803+ enddo
5804+ enddo
5805+!$omp end parallel do
5806+end
5807+subroutine test2
5808+ integer :: j, k
5809+ integer :: m
5810+ m = 2
5811+!$omp parallel do collapse(m) schedule (static,1) ! { dg-error "Constant expression required" }
5812+ do k = 1, 2
5813+ do j = 1, 6
5814+ enddo
5815+ enddo
5816+!$omp end parallel do
5817+end
5818+subroutine test3
5819+ integer :: j, k
5820+ integer, parameter :: m = 0
5821+!$omp parallel do collapse(m) schedule (static,1) ! { dg-error "not constant positive integer" }
5822+ do k = 1, 2
5823+ do j = 1, 6
5824+ enddo
5825+ enddo
5826+!$omp end parallel do
5827+end
5828+subroutine test4
5829+ integer :: j, k
5830+ integer, parameter :: m = -2
5831+!$omp parallel do collapse(m) schedule (static,1) ! { dg-error "not constant positive integer" }
5832+ do k = 1, 2
5833+ do j = 1, 6
5834+ enddo
5835+ enddo
5836+!$omp end parallel do
5837+end
5838+subroutine test5
5839+ integer :: j, k
5840+!$omp parallel do collapse(0) schedule (static,1) ! { dg-error "not constant positive integer" }
5841+ do k = 1, 2
5842+ do j = 1, 6
5843+ enddo
5844+ enddo
5845+!$omp end parallel do
5846+end
5847+subroutine test6
5848+ integer :: j, k
5849+!$omp parallel do collapse(-1) schedule (static,1) ! { dg-error "not constant positive integer" }
5850+ do k = 1, 2
5851+ do j = 1, 6
5852+ enddo
5853+ enddo
5854+!$omp end parallel do
5855+end
5856diff -Naur gcc-4.4.1.orig/gcc/testsuite/gfortran.dg/gomp/pr40878-2.f90 gcc-4.4.1/gcc/testsuite/gfortran.dg/gomp/pr40878-2.f90
5857--- gcc-4.4.1.orig/gcc/testsuite/gfortran.dg/gomp/pr40878-2.f90 1969-12-31 16:00:00.000000000 -0800
5858+++ gcc-4.4.1/gcc/testsuite/gfortran.dg/gomp/pr40878-2.f90 2009-07-28 09:33:08.000000000 -0700
5859@@ -0,0 +1,23 @@
5860+! PR fortran/40878
5861+! { dg-do compile }
5862+! { dg-options "-fopenmp" }
5863+
5864+subroutine test1
5865+ integer :: j, k
5866+ integer, parameter :: m = 2
5867+!$omp parallel do collapse(m) schedule (static,1)
5868+ do k = 1, 2
5869+ do j = 1, 6
5870+ enddo
5871+ enddo
5872+!$omp end parallel do
5873+end
5874+subroutine test2
5875+ integer :: j, k
5876+!$omp parallel do collapse(2) schedule (static,1)
5877+ do k = 1, 2
5878+ do j = 1, 6
5879+ enddo
5880+ enddo
5881+!$omp end parallel do
5882+end
5883diff -Naur gcc-4.4.1.orig/gcc/testsuite/gfortran.dg/intrinsic_3.f90 gcc-4.4.1/gcc/testsuite/gfortran.dg/intrinsic_3.f90
5884--- gcc-4.4.1.orig/gcc/testsuite/gfortran.dg/intrinsic_3.f90 1969-12-31 16:00:00.000000000 -0800
5885+++ gcc-4.4.1/gcc/testsuite/gfortran.dg/intrinsic_3.f90 2009-09-11 15:11:06.000000000 -0700
5886@@ -0,0 +1,40 @@
5887+! { dg-do compile }
5888+! { dg-options "-std=f95" }
5889+!
5890+! PR 39876: module procedure name that collides with the GNU intrinsic
5891+!
5892+! Contributed by Alexei Matveev <alexei.matveev+gcc@gmail.com>
5893+
5894+module p
5895+ implicit none
5896+
5897+ contains
5898+
5899+ subroutine test()
5900+ implicit none
5901+ print *, avg(erfc)
5902+ end subroutine test
5903+
5904+ function avg(f)
5905+ implicit none
5906+ double precision :: avg
5907+ interface
5908+ double precision function f(x)
5909+ implicit none
5910+ double precision, intent(in) :: x
5911+ end function f
5912+ end interface
5913+ avg = ( f(1.0D0) + f(2.0D0) ) / 2
5914+ end function avg
5915+
5916+ function erfc(x)
5917+ implicit none
5918+ double precision, intent(in) :: x
5919+ double precision :: erfc
5920+ erfc = x
5921+ end function erfc
5922+
5923+end module p
5924+
5925+! { dg-final { cleanup-modules "p" } }
5926+
5927diff -Naur gcc-4.4.1.orig/gcc/testsuite/gfortran.dg/intrinsic_4.f90 gcc-4.4.1/gcc/testsuite/gfortran.dg/intrinsic_4.f90
5928--- gcc-4.4.1.orig/gcc/testsuite/gfortran.dg/intrinsic_4.f90 1969-12-31 16:00:00.000000000 -0800
5929+++ gcc-4.4.1/gcc/testsuite/gfortran.dg/intrinsic_4.f90 2009-08-16 13:23:57.000000000 -0700
5930@@ -0,0 +1,12 @@
5931+! { dg-do compile }
5932+! { dg-options "-Wsurprising" }
5933+!
5934+! PR 40995: [4.5 Regression] Spurious "Type specified for intrinsic function...ignored" message
5935+!
5936+! Contributed by Mat Cross <mathewc@nag.co.uk>
5937+
5938+subroutine sub(n,x)
5939+ intrinsic abs
5940+ integer n, x(abs(n))
5941+end
5942+
5943diff -Naur gcc-4.4.1.orig/gcc/testsuite/gfortran.dg/intrinsic_5.f90 gcc-4.4.1/gcc/testsuite/gfortran.dg/intrinsic_5.f90
5944--- gcc-4.4.1.orig/gcc/testsuite/gfortran.dg/intrinsic_5.f90 1969-12-31 16:00:00.000000000 -0800
5945+++ gcc-4.4.1/gcc/testsuite/gfortran.dg/intrinsic_5.f90 2009-08-29 19:06:32.000000000 -0700
5946@@ -0,0 +1,13 @@
5947+! { dg-do compile }
5948+! { dg-options "-fimplicit-none" }
5949+!
5950+! PR 41121: [4.5 Regression] compile-time error when building BLAS with -fimplicit-none
5951+!
5952+! Original test case: http://www.netlib.org/blas/dgbmv.f
5953+! Reduced by Joost VandeVondele <jv244@cam.ac.uk>
5954+
5955+ INTRINSIC MIN
5956+ INTEGER :: I,J
5957+ print *,MIN(I,J)
5958+END
5959+
5960diff -Naur gcc-4.4.1.orig/gcc/testsuite/gfortran.dg/intrinsic_cmplx.f90 gcc-4.4.1/gcc/testsuite/gfortran.dg/intrinsic_cmplx.f90
5961--- gcc-4.4.1.orig/gcc/testsuite/gfortran.dg/intrinsic_cmplx.f90 1969-12-31 16:00:00.000000000 -0800
5962+++ gcc-4.4.1/gcc/testsuite/gfortran.dg/intrinsic_cmplx.f90 2009-07-23 17:28:43.000000000 -0700
5963@@ -0,0 +1,9 @@
5964+! { dg-do compile }
5965+! PR fortran/40727
5966+program test
5967+ integer, parameter :: sp = kind(1.e0), dp = kind(1.d0)
5968+ complex(sp) :: s
5969+ complex(dp) :: d
5970+ s = cmplx(0.e0, cmplx(0.e0,0.e0)) ! { dg-error "either REAL or INTEGER" }
5971+ d = dcmplx(0.d0, cmplx(0.d0,0.d0)) ! { dg-error "either REAL or INTEGER" }
5972+end program test
5973diff -Naur gcc-4.4.1.orig/gcc/testsuite/gfortran.dg/namelist_40.f90 gcc-4.4.1/gcc/testsuite/gfortran.dg/namelist_40.f90
5974--- gcc-4.4.1.orig/gcc/testsuite/gfortran.dg/namelist_40.f90 2008-03-04 16:59:34.000000000 -0800
5975+++ gcc-4.4.1/gcc/testsuite/gfortran.dg/namelist_40.f90 2009-08-04 20:17:52.000000000 -0700
5976@@ -1,4 +1,4 @@
5977-! { dg-do run { target fd_truncate } }
5978+! { dg-do run }
5979 ! PR33672 Additional runtime checks needed for namelist reads
5980 ! Submitted by Jerry DeLisle <jvdelisle@gcc.gnu.org>
5981
5982@@ -47,7 +47,7 @@
5983 end subroutine writenml
5984
5985 end program namelist_40
5986-! { dg-output "Multiple sub-objects with non-zero rank in namelist object x(\n|\r\n|\r)" }
5987+! { dg-output "Multiple sub-objects with non-zero rank in namelist object x%m%ch(\n|\r\n|\r)" }
5988 ! { dg-output "Missing colon in substring qualifier for namelist variable x%m%ch(\n|\r\n|\r)" }
5989 ! { dg-output "Substring out of range for namelist variable x%m%ch(\n|\r\n|\r)" }
5990 ! { dg-output "Bad character in substring qualifier for namelist variable x%m%ch(\n|\r\n|\r)" }
5991diff -Naur gcc-4.4.1.orig/gcc/testsuite/gfortran.dg/namelist_47.f90 gcc-4.4.1/gcc/testsuite/gfortran.dg/namelist_47.f90
5992--- gcc-4.4.1.orig/gcc/testsuite/gfortran.dg/namelist_47.f90 2008-05-16 07:07:37.000000000 -0700
5993+++ gcc-4.4.1/gcc/testsuite/gfortran.dg/namelist_47.f90 2009-08-04 20:17:52.000000000 -0700
5994@@ -1,4 +1,4 @@
5995-! { dg-do run { target fd_truncate } }
5996+! { dg-do run }
5997
5998 module nml_47
5999 type :: mt
6000@@ -45,7 +45,7 @@
6001 end subroutine writenml
6002
6003 end program namelist_47
6004-! { dg-output "Multiple sub-objects with non-zero rank in namelist object x(\n|\r\n|\r)" }
6005+! { dg-output "Multiple sub-objects with non-zero rank in namelist object x%m%c012345678901234567890123456789012345678901234567890123456789h(\n|\r\n|\r)" }
6006 ! { dg-output "Missing colon in substring qualifier for namelist variable x%m%c012345678901234567890123456789012345678901234567890123456789h(\n|\r\n|\r)" }
6007 ! { dg-output "Substring out of range for namelist variable x%m%c012345678901234567890123456789012345678901234567890123456789h(\n|\r\n|\r)" }
6008 ! { dg-output "Bad character in substring qualifier for namelist variable x%m%c012345678901234567890123456789012345678901234567890123456789h(\n|\r\n|\r)" }
6009diff -Naur gcc-4.4.1.orig/gcc/testsuite/gfortran.dg/namelist_58.f90 gcc-4.4.1/gcc/testsuite/gfortran.dg/namelist_58.f90
6010--- gcc-4.4.1.orig/gcc/testsuite/gfortran.dg/namelist_58.f90 1969-12-31 16:00:00.000000000 -0800
6011+++ gcc-4.4.1/gcc/testsuite/gfortran.dg/namelist_58.f90 2009-08-04 20:17:52.000000000 -0700
6012@@ -0,0 +1,25 @@
6013+! { dg-do run }
6014+! PR40853 Error in namelist IO.
6015+! Test case derived from example given in PR. < jvdelisle@gcc.gnu.org >
6016+program test
6017+ implicit none
6018+ type tao_title_struct
6019+ character(2) justify
6020+ end type
6021+ type tao_plot_page_struct
6022+ real shape_height_max
6023+ type (tao_title_struct) title ! Comment this line out and the bug goes away.
6024+ real size(2)
6025+ end type
6026+ type (tao_plot_page_struct) plot_page
6027+ namelist / params / plot_page
6028+ open (10, status="scratch")
6029+ write(10,'(a)')" &params"
6030+ write(10,'(a)')" plot_page%size=5 , 2,"
6031+ write(10,'(a)')"/"
6032+ rewind(10)
6033+ read (10, nml = params)
6034+ if (any(plot_page%size .ne. (/ 5, 2 /))) call abort
6035+ close (10)
6036+end program
6037+
6038diff -Naur gcc-4.4.1.orig/gcc/testsuite/gfortran.dg/pr41126.f90 gcc-4.4.1/gcc/testsuite/gfortran.dg/pr41126.f90
6039--- gcc-4.4.1.orig/gcc/testsuite/gfortran.dg/pr41126.f90 1969-12-31 16:00:00.000000000 -0800
6040+++ gcc-4.4.1/gcc/testsuite/gfortran.dg/pr41126.f90 2009-08-29 19:06:32.000000000 -0700
6041@@ -0,0 +1,6 @@
6042+! { dg-do compile }
6043+SUBROUTINE write_cputime( checkpoint )
6044+ CHARACTER(LEN=*), INTENT(IN) :: checkpoint
6045+ CHARACTER(LEN=LEN_TRIM(checkpoint)+7) :: string1
6046+ string1 = ADJUSTL(string1)
6047+END SUBROUTINE write_cputime
6048diff -Naur gcc-4.4.1.orig/gcc/testsuite/gfortran.dg/pr41162.f gcc-4.4.1/gcc/testsuite/gfortran.dg/pr41162.f
6049--- gcc-4.4.1.orig/gcc/testsuite/gfortran.dg/pr41162.f 1969-12-31 16:00:00.000000000 -0800
6050+++ gcc-4.4.1/gcc/testsuite/gfortran.dg/pr41162.f 2009-08-29 19:06:32.000000000 -0700
6051@@ -0,0 +1,5 @@
6052+! { dg-do compile }
6053+! PRs 41154/41162
6054+ write (*,'(1PD24.15,F4.2,0P)') 1.0d0
6055+ write (*,'(1PD24.15,F4.2,0P/)') 1.0d0
6056+ end
6057diff -Naur gcc-4.4.1.orig/gcc/testsuite/gfortran.dg/pr41225.f90 gcc-4.4.1/gcc/testsuite/gfortran.dg/pr41225.f90
6058--- gcc-4.4.1.orig/gcc/testsuite/gfortran.dg/pr41225.f90 1969-12-31 16:00:00.000000000 -0800
6059+++ gcc-4.4.1/gcc/testsuite/gfortran.dg/pr41225.f90 2009-09-10 11:57:46.000000000 -0700
6060@@ -0,0 +1,20 @@
6061+! { dg-do compile }
6062+! { dg-options "-O2 -ffast-math -funroll-loops -ftree-vectorize -g" }
6063+ SUBROUTINE block_15_1_1_1(kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale)
6064+ INTEGER, PARAMETER :: dp=8
6065+ REAL(KIND=dp) :: kbd(1*1), kbc(1*1), kad(15*1), kac(15*1), pbd(1*1), &
6066+ pbc(1*1), pad(15*1), pac(15*1), prim(15*1*1*1), scale
6067+ INTEGER :: ma, mb, mc, md, p_index
6068+ DO md = 1,1
6069+ DO mc = 1,1
6070+ DO mb = 1,1
6071+ DO ma = 1,15
6072+ p_index=p_index+1
6073+ tmp = scale*prim(p_index)
6074+ ks_bd = ks_bd + tmp* pac((mc-1)*15+ma)
6075+ END DO
6076+ kbd((md-1)*1+mb) = kbd((md-1)*1+mb) - ks_bd
6077+ END DO
6078+ END DO
6079+ END DO
6080+ END SUBROUTINE block_15_1_1_1
6081diff -Naur gcc-4.4.1.orig/gcc/testsuite/gfortran.dg/pr41229.f90 gcc-4.4.1/gcc/testsuite/gfortran.dg/pr41229.f90
6082--- gcc-4.4.1.orig/gcc/testsuite/gfortran.dg/pr41229.f90 1969-12-31 16:00:00.000000000 -0800
6083+++ gcc-4.4.1/gcc/testsuite/gfortran.dg/pr41229.f90 2009-09-10 11:57:46.000000000 -0700
6084@@ -0,0 +1,10 @@
6085+! { dg-do compile }
6086+! { dg-options "-O2 -g" }
6087+SUBROUTINE cp_fm_triangular_multiply()
6088+ INTEGER, PARAMETER :: dp=KIND(0.0D0)
6089+ REAL(dp), ALLOCATABLE, DIMENSION(:) :: tau, work
6090+ REAL(KIND=dp), DIMENSION(:, :), POINTER :: a
6091+ ndim = SIZE(a,2)
6092+ ALLOCATE(tau(ndim),STAT=istat)
6093+ ALLOCATE(work(2*ndim),STAT=istat)
6094+END SUBROUTINE
6095diff -Naur gcc-4.4.1.orig/gcc/testsuite/gfortran.dg/proc_ptr_25.f90 gcc-4.4.1/gcc/testsuite/gfortran.dg/proc_ptr_25.f90
6096--- gcc-4.4.1.orig/gcc/testsuite/gfortran.dg/proc_ptr_25.f90 1969-12-31 16:00:00.000000000 -0800
6097+++ gcc-4.4.1/gcc/testsuite/gfortran.dg/proc_ptr_25.f90 2009-08-29 19:06:32.000000000 -0700
6098@@ -0,0 +1,36 @@
6099+! { dg-do run }
6100+!
6101+! PR 41139: [4.5 Regression] a procedure pointer call as actual argument
6102+!
6103+! Original test case by Barron Bichon <barron.bichon@swri.org>
6104+! Modified by Janus Weil <janus@gcc.gnu.org>
6105+
6106+PROGRAM test
6107+
6108+ PROCEDURE(add), POINTER :: f
6109+ logical :: g
6110+
6111+ ! Passing the function works
6112+ g=greater(4.,add(1.,2.))
6113+ if (.not. g) call abort()
6114+
6115+ ! Passing the procedure pointer fails
6116+ f => add
6117+ g=greater(4.,f(1.,2.))
6118+ if (.not. g) call abort()
6119+
6120+CONTAINS
6121+
6122+ REAL FUNCTION add(x,y)
6123+ REAL, INTENT(in) :: x,y
6124+ print *,"add:",x,y
6125+ add = x+y
6126+ END FUNCTION add
6127+
6128+ LOGICAL FUNCTION greater(x,y)
6129+ REAL, INTENT(in) :: x, y
6130+ greater = (x > y)
6131+ END FUNCTION greater
6132+
6133+END PROGRAM test
6134+
6135diff -Naur gcc-4.4.1.orig/gcc/testsuite/gfortran.dg/structure_constructor_10.f90 gcc-4.4.1/gcc/testsuite/gfortran.dg/structure_constructor_10.f90
6136--- gcc-4.4.1.orig/gcc/testsuite/gfortran.dg/structure_constructor_10.f90 1969-12-31 16:00:00.000000000 -0800
6137+++ gcc-4.4.1/gcc/testsuite/gfortran.dg/structure_constructor_10.f90 2009-08-16 13:23:57.000000000 -0700
6138@@ -0,0 +1,28 @@
6139+! { dg-do compile }
6140+!
6141+! PR 41070: [4.5 Regression] Error: Components of structure constructor '' at (1) are PRIVATE
6142+!
6143+! Contributed by Michael Richmond <michael.a.richmond@nasa.gov>
6144+
6145+MODULE cdf_aux_mod
6146+IMPLICIT NONE
6147+
6148+TYPE :: one_parameter
6149+ CHARACTER (8) :: name
6150+END TYPE one_parameter
6151+
6152+TYPE :: the_distribution
6153+ CHARACTER (8) :: name
6154+END TYPE the_distribution
6155+
6156+TYPE (the_distribution), PARAMETER :: the_beta = the_distribution('cdf_beta')
6157+END MODULE cdf_aux_mod
6158+
6159+SUBROUTINE cdf_beta()
6160+ USE cdf_aux_mod
6161+ IMPLICIT NONE
6162+ CALL check_complements(the_beta%name)
6163+END SUBROUTINE cdf_beta
6164+
6165+! { dg-final { cleanup-modules "cdf_aux_mod" } }
6166+
6167diff -Naur gcc-4.4.1.orig/gcc/testsuite/gfortran.dg/transfer_resolve_1.f90 gcc-4.4.1/gcc/testsuite/gfortran.dg/transfer_resolve_1.f90
6168--- gcc-4.4.1.orig/gcc/testsuite/gfortran.dg/transfer_resolve_1.f90 1969-12-31 16:00:00.000000000 -0800
6169+++ gcc-4.4.1/gcc/testsuite/gfortran.dg/transfer_resolve_1.f90 2009-08-16 13:04:40.000000000 -0700
6170@@ -0,0 +1,21 @@
6171+! { dg-do run }
6172+! PR40847 - an error in gfc_resolve_transfer caused the character length
6173+! of 'mold' to be set incorrectly.
6174+!
6175+! Contributed by Joost VandeVondele <jv244@cam.ac.uk>
6176+!
6177+program test_elemental
6178+
6179+if (any (transfer_size((/0.,0./),(/'a','b'/)) .ne. [4 ,4])) call abort
6180+
6181+contains
6182+
6183+ elemental function transfer_size (source, mold)
6184+ real, intent(in) :: source
6185+ character(*), intent(in) :: mold
6186+ integer :: transfer_size
6187+ transfer_size = SIZE(TRANSFER(source, (/mold/)))
6188+ return
6189+ end function transfer_size
6190+
6191+end program test_elemental
6192diff -Naur gcc-4.4.1.orig/gcc/testsuite/gfortran.dg/typebound_proc_12.f90 gcc-4.4.1/gcc/testsuite/gfortran.dg/typebound_proc_12.f90
6193--- gcc-4.4.1.orig/gcc/testsuite/gfortran.dg/typebound_proc_12.f90 1969-12-31 16:00:00.000000000 -0800
6194+++ gcc-4.4.1/gcc/testsuite/gfortran.dg/typebound_proc_12.f90 2009-09-05 07:25:39.000000000 -0700
6195@@ -0,0 +1,12 @@
6196+! { dg-do compile }
6197+! Test the fix for PR41258, where an ICE was caused by a search
6198+! for a typebound procedure to resolve d%c%e
6199+!
6200+! Contributed by Joost VandeVondele <jv244@cam.ac.uk>
6201+!
6202+ TYPE a
6203+ TYPE(b), DIMENSION(:), POINTER :: c ! { dg-error "type that has not been declared" }
6204+ END TYPE
6205+ TYPE(a), POINTER :: d
6206+ CALL X(d%c%e) ! { dg-error "before it is defined" }
6207+end
6208diff -Naur gcc-4.4.1.orig/gcc/testsuite/gfortran.dg/use_only_4.f90 gcc-4.4.1/gcc/testsuite/gfortran.dg/use_only_4.f90
6209--- gcc-4.4.1.orig/gcc/testsuite/gfortran.dg/use_only_4.f90 1969-12-31 16:00:00.000000000 -0800
6210+++ gcc-4.4.1/gcc/testsuite/gfortran.dg/use_only_4.f90 2009-08-25 11:54:58.000000000 -0700
6211@@ -0,0 +1,34 @@
6212+! { dg-do compile }
6213+! Test the fix for PR41062, in which an ICE would ensue because
6214+! of confusion between the two 'one's in the creation of module
6215+! debug info.
6216+!
6217+! Reported by Norman S. Clerman <clerman@fuse.net>
6218+! Reduced testcase by Tobias Burnus <burnus@gcc.gnu.org>
6219+!
6220+module m1
6221+ interface one ! GENERIC "one"
6222+ module procedure one1
6223+ end interface
6224+contains
6225+ subroutine one1()
6226+ call abort
6227+ end subroutine one1
6228+end module m1
6229+
6230+module m2
6231+use m1, only : one ! USE generic "one"
6232+contains
6233+ subroutine two()
6234+ call one() ! Call internal "one"
6235+ contains
6236+ subroutine one() ! Internal "one"
6237+ print *, "m2"
6238+ end subroutine one
6239+ end subroutine two
6240+end module m2
6241+
6242+ use m2
6243+ call two
6244+end
6245+! { dg-final { cleanup-modules "m1 m2" } }
6246diff -Naur gcc-4.4.1.orig/gcc/testsuite/gnat.dg/array8.adb gcc-4.4.1/gcc/testsuite/gnat.dg/array8.adb
6247--- gcc-4.4.1.orig/gcc/testsuite/gnat.dg/array8.adb 1969-12-31 16:00:00.000000000 -0800
6248+++ gcc-4.4.1/gcc/testsuite/gnat.dg/array8.adb 2009-09-10 11:57:46.000000000 -0700
6249@@ -0,0 +1,34 @@
6250+-- { dg-do compile }
6251+-- { dg-options "-O2" }
6252+
6253+PROCEDURE Array8 IS
6254+
6255+ function ID (I : Integer) return Integer is
6256+ begin
6257+ return I;
6258+ end;
6259+
6260+ SUBTYPE STB IS INTEGER RANGE ID(-8) .. -5;
6261+
6262+ TYPE TB IS ARRAY (STB RANGE <>) OF INTEGER;
6263+
6264+ GENERIC
6265+ B1 : TB;
6266+ PROCEDURE PROC1;
6267+
6268+ PROCEDURE PROC1 IS
6269+ BEGIN
6270+ IF B1'FIRST /= -8 THEN
6271+ raise Program_Error;
6272+ ELSIF B1'LAST /= ID(-5) THEN
6273+ raise Program_Error;
6274+ ELSIF B1 /= (7, 6, 5, 4) THEN
6275+ raise Program_Error;
6276+ END IF;
6277+ END;
6278+
6279+ PROCEDURE PROC2 IS NEW PROC1 ((7, 6, ID(5), 4));
6280+
6281+BEGIN
6282+ PROC2;
6283+END;
6284diff -Naur gcc-4.4.1.orig/gcc/testsuite/g++.old-deja/g++.brendan/init4.C gcc-4.4.1/gcc/testsuite/g++.old-deja/g++.brendan/init4.C
6285--- gcc-4.4.1.orig/gcc/testsuite/g++.old-deja/g++.brendan/init4.C 2003-04-30 19:02:59.000000000 -0700
6286+++ gcc-4.4.1/gcc/testsuite/g++.old-deja/g++.brendan/init4.C 2009-07-24 11:06:08.000000000 -0700
6287@@ -2,4 +2,4 @@
6288 // GROUPS passed initialization
6289 struct CharList { int i; };
6290
6291-const CharList& terminals = { 1 };// { dg-error "" } .*
6292+const CharList& terminals = { 1 }; // { dg-error "initializer lists" } c++0x
6293diff -Naur gcc-4.4.1.orig/gcc/testsuite/g++.old-deja/g++.jason/thunk2.C gcc-4.4.1/gcc/testsuite/g++.old-deja/g++.jason/thunk2.C
6294--- gcc-4.4.1.orig/gcc/testsuite/g++.old-deja/g++.jason/thunk2.C 2009-03-11 10:52:06.000000000 -0700
6295+++ gcc-4.4.1/gcc/testsuite/g++.old-deja/g++.jason/thunk2.C 2009-07-27 23:56:49.000000000 -0700
6296@@ -1,6 +1,5 @@
6297 // { dg-do run { target fpic } }
6298 // { dg-options "-fPIC" }
6299-// { dg-bogus "\[Uu\]nresolved symbol .(_GLOBAL_OFFSET_TABLE_|\[_.A-Za-z\]\[_.0-9A-Za-z\]*@(PLT|GOT|GOTOFF))|\[Bb\]ad fixup at .DATA.:" "PIC unsupported" { xfail *-*-netware* } 0 }
6300 // { dg-skip-if "requires unsupported run-time relocation" { spu-*-* } { "*" } { "" } }
6301 // Test that non-variadic function calls using thunks and PIC work right.
6302
6303diff -Naur gcc-4.4.1.orig/gcc/testsuite/g++.old-deja/g++.law/weak.C gcc-4.4.1/gcc/testsuite/g++.old-deja/g++.law/weak.C
6304--- gcc-4.4.1.orig/gcc/testsuite/g++.old-deja/g++.law/weak.C 2005-12-09 15:34:09.000000000 -0800
6305+++ gcc-4.4.1/gcc/testsuite/g++.old-deja/g++.law/weak.C 2009-07-25 06:54:21.000000000 -0700
6306@@ -1,4 +1,5 @@
6307 // { dg-do link { target i?86-*-linux* x86_64-*-linux* } }
6308+// { dg-require-effective-target static }
6309 // { dg-options "-static" }
6310 // Bug: g++ fails to instantiate operator<<.
6311
6312diff -Naur gcc-4.4.1.orig/gcc/testsuite/lib/target-supports.exp gcc-4.4.1/gcc/testsuite/lib/target-supports.exp
6313--- gcc-4.4.1.orig/gcc/testsuite/lib/target-supports.exp 2009-07-21 00:22:51.000000000 -0700
6314+++ gcc-4.4.1/gcc/testsuite/lib/target-supports.exp 2009-08-28 02:57:51.000000000 -0700
6315@@ -611,6 +611,13 @@
6316 } "-pthread"]
6317 }
6318
6319+# Return 1 if the target supports -static
6320+proc check_effective_target_static {} {
6321+ return [check_no_compiler_messages static executable {
6322+ int main (void) { return 0; }
6323+ } "-static"]
6324+}
6325+
6326 # Return 1 if the target supports -fstack-protector
6327 proc check_effective_target_fstack_protector {} {
6328 return [check_runtime fstack_protector {
6329@@ -1269,7 +1276,8 @@
6330 verbose "check_effective_target_vect_cmdline_needed: using cached result" 2
6331 } else {
6332 set et_vect_cmdline_needed_saved 1
6333- if { [istarget ia64-*-*]
6334+ if { [istarget alpha*-*-*]
6335+ || [istarget ia64-*-*]
6336 || (([istarget x86_64-*-*] || [istarget i?86-*-*])
6337 && [check_effective_target_lp64])
6338 || ([istarget powerpc*-*-*]
6339diff -Naur gcc-4.4.1.orig/gcc/tree-ssa.c gcc-4.4.1/gcc/tree-ssa.c
6340--- gcc-4.4.1.orig/gcc/tree-ssa.c 2009-03-27 10:20:51.000000000 -0700
6341+++ gcc-4.4.1/gcc/tree-ssa.c 2009-08-03 12:27:32.000000000 -0700
6342@@ -1472,7 +1472,12 @@
6343
6344 /* We do not care about LHS. */
6345 if (wi->is_lhs)
6346- return NULL_TREE;
6347+ {
6348+ /* Except for operands of INDIRECT_REF. */
6349+ if (!INDIRECT_REF_P (t))
6350+ return NULL_TREE;
6351+ t = TREE_OPERAND (t, 0);
6352+ }
6353
6354 switch (TREE_CODE (t))
6355 {
6356diff -Naur gcc-4.4.1.orig/gcc/tree-ssa-ifcombine.c gcc-4.4.1/gcc/tree-ssa-ifcombine.c
6357--- gcc-4.4.1.orig/gcc/tree-ssa-ifcombine.c 2009-02-20 07:20:38.000000000 -0800
6358+++ gcc-4.4.1/gcc/tree-ssa-ifcombine.c 2009-08-09 14:39:19.000000000 -0700
6359@@ -151,7 +151,7 @@
6360 {
6361 gimple def_stmt = SSA_NAME_DEF_STMT (candidate);
6362 if (is_gimple_assign (def_stmt)
6363- && gimple_assign_cast_p (def_stmt))
6364+ && CONVERT_EXPR_CODE_P (gimple_assign_rhs_code (def_stmt)))
6365 {
6366 if (TYPE_PRECISION (TREE_TYPE (candidate))
6367 <= TYPE_PRECISION (TREE_TYPE (gimple_assign_rhs1 (def_stmt))))
6368@@ -162,21 +162,6 @@
6369 return candidate;
6370 }
6371
6372-/* Helpers for recognize_single_bit_test defined mainly for source code
6373- formating. */
6374-
6375-static int
6376-operand_precision (tree t)
6377-{
6378- return TYPE_PRECISION (TREE_TYPE (t));
6379-}
6380-
6381-static bool
6382-integral_operand_p (tree t)
6383-{
6384- return INTEGRAL_TYPE_P (TREE_TYPE (t));
6385-}
6386-
6387 /* Recognize a single bit test pattern in GIMPLE_COND and its defining
6388 statements. Store the name being tested in *NAME and the bit
6389 in *BIT. The GIMPLE_COND computes *NAME & (1 << *BIT).
6390@@ -212,15 +197,11 @@
6391 stmt = SSA_NAME_DEF_STMT (orig_name);
6392
6393 while (is_gimple_assign (stmt)
6394- && (gimple_assign_ssa_name_copy_p (stmt)
6395- || (gimple_assign_cast_p (stmt)
6396- && integral_operand_p (gimple_assign_lhs (stmt))
6397- && integral_operand_p (gimple_assign_rhs1 (stmt))
6398- && (operand_precision (gimple_assign_lhs (stmt))
6399- <= operand_precision (gimple_assign_rhs1 (stmt))))))
6400- {
6401- stmt = SSA_NAME_DEF_STMT (gimple_assign_rhs1 (stmt));
6402- }
6403+ && ((CONVERT_EXPR_CODE_P (gimple_assign_rhs_code (stmt))
6404+ && (TYPE_PRECISION (TREE_TYPE (gimple_assign_lhs (stmt)))
6405+ <= TYPE_PRECISION (TREE_TYPE (gimple_assign_rhs1 (stmt)))))
6406+ || gimple_assign_ssa_name_copy_p (stmt)))
6407+ stmt = SSA_NAME_DEF_STMT (gimple_assign_rhs1 (stmt));
6408
6409 /* If we found such, decompose it. */
6410 if (is_gimple_assign (stmt)
6411diff -Naur gcc-4.4.1.orig/gcc/tree-ssa-pre.c gcc-4.4.1/gcc/tree-ssa-pre.c
6412--- gcc-4.4.1.orig/gcc/tree-ssa-pre.c 2009-02-20 07:20:38.000000000 -0800
6413+++ gcc-4.4.1/gcc/tree-ssa-pre.c 2009-07-22 07:45:21.000000000 -0700
6414@@ -3507,11 +3507,7 @@
6415 }
6416
6417
6418-/* Add OP to EXP_GEN (block), and possibly to the maximal set if it is
6419- not defined by a phi node.
6420- PHI nodes can't go in the maximal sets because they are not in
6421- TMP_GEN, so it is possible to get into non-monotonic situations
6422- during ANTIC calculation, because it will *add* bits. */
6423+/* Add OP to EXP_GEN (block), and possibly to the maximal set. */
6424
6425 static void
6426 add_to_exp_gen (basic_block block, tree op)
6427@@ -3523,9 +3519,7 @@
6428 return;
6429 result = get_or_alloc_expr_for_name (op);
6430 bitmap_value_insert_into_set (EXP_GEN (block), result);
6431- if (TREE_CODE (op) != SSA_NAME
6432- || gimple_code (SSA_NAME_DEF_STMT (op)) != GIMPLE_PHI)
6433- bitmap_value_insert_into_set (maximal_set, result);
6434+ bitmap_value_insert_into_set (maximal_set, result);
6435 }
6436 }
6437
6438@@ -3544,6 +3538,20 @@
6439 add_to_value (get_expr_value_id (e), e);
6440 bitmap_insert_into_set (PHI_GEN (block), e);
6441 bitmap_value_insert_into_set (AVAIL_OUT (block), e);
6442+ if (!in_fre)
6443+ {
6444+ unsigned i;
6445+ for (i = 0; i < gimple_phi_num_args (phi); ++i)
6446+ {
6447+ tree arg = gimple_phi_arg_def (phi, i);
6448+ if (TREE_CODE (arg) == SSA_NAME)
6449+ {
6450+ e = get_or_alloc_expr_for_name (arg);
6451+ add_to_value (get_expr_value_id (e), e);
6452+ bitmap_value_insert_into_set (maximal_set, e);
6453+ }
6454+ }
6455+ }
6456 }
6457 }
6458
6459@@ -4254,11 +4262,12 @@
6460 FOR_ALL_BB (bb)
6461 {
6462 print_bitmap_set (dump_file, EXP_GEN (bb), "exp_gen", bb->index);
6463- print_bitmap_set (dump_file, TMP_GEN (bb), "tmp_gen",
6464- bb->index);
6465- print_bitmap_set (dump_file, AVAIL_OUT (bb), "avail_out",
6466- bb->index);
6467+ print_bitmap_set (dump_file, PHI_GEN (bb), "phi_gen", bb->index);
6468+ print_bitmap_set (dump_file, TMP_GEN (bb), "tmp_gen", bb->index);
6469+ print_bitmap_set (dump_file, AVAIL_OUT (bb), "avail_out", bb->index);
6470 }
6471+
6472+ print_bitmap_set (dump_file, maximal_set, "maximal", 0);
6473 }
6474
6475 /* Insert can get quite slow on an incredibly large number of basic
6476diff -Naur gcc-4.4.1.orig/gcc/version.c gcc-4.4.1/gcc/version.c
6477--- gcc-4.4.1.orig/gcc/version.c 2007-08-21 08:35:30.000000000 -0700
6478+++ gcc-4.4.1/gcc/version.c 2009-09-12 09:16:46.000000000 -0700
6479@@ -14,4 +14,4 @@
6480 Makefile. */
6481
6482 const char version_string[] = BASEVER DATESTAMP DEVPHASE REVISION;
6483-const char pkgversion_string[] = PKGVERSION;
6484+const char pkgversion_string[] = "(GCC for Cross-LFS 4.4.1.20090912) ";
6485diff -Naur gcc-4.4.1.orig/libcpp/macro.c gcc-4.4.1/libcpp/macro.c
6486--- gcc-4.4.1.orig/libcpp/macro.c 2009-04-09 16:23:07.000000000 -0700
6487+++ gcc-4.4.1/libcpp/macro.c 2009-09-02 11:47:29.000000000 -0700
6488@@ -375,7 +375,7 @@
6489 }
6490
6491 escape_it = (token->type == CPP_STRING || token->type == CPP_CHAR
6492- || token->type == CPP_WSTRING || token->type == CPP_STRING
6493+ || token->type == CPP_WSTRING || token->type == CPP_WCHAR
6494 || token->type == CPP_STRING32 || token->type == CPP_CHAR32
6495 || token->type == CPP_STRING16 || token->type == CPP_CHAR16);
6496
6497diff -Naur gcc-4.4.1.orig/libdecnumber/decCommon.c gcc-4.4.1/libdecnumber/decCommon.c
6498--- gcc-4.4.1.orig/libdecnumber/decCommon.c 2009-04-09 16:23:07.000000000 -0700
6499+++ gcc-4.4.1/libdecnumber/decCommon.c 2009-08-13 09:58:06.000000000 -0700
6500@@ -1089,6 +1089,7 @@
6501 return 10;
6502 } /* decFloatRadix */
6503
6504+#if (DECCHECK || DECTRACE)
6505 /* ------------------------------------------------------------------ */
6506 /* decFloatShow -- printf a decFloat in hexadecimal and decimal */
6507 /* df is the decFloat to show */
6508@@ -1115,6 +1116,7 @@
6509 printf(">%s> %s [big-endian] %s\n", tag, hexbuf, buff);
6510 return;
6511 } /* decFloatShow */
6512+#endif
6513
6514 /* ------------------------------------------------------------------ */
6515 /* decFloatToBCD -- get sign, exponent, and BCD8 from a decFloat */
6516diff -Naur gcc-4.4.1.orig/libgfortran/intrinsics/dtime.c gcc-4.4.1/libgfortran/intrinsics/dtime.c
6517--- gcc-4.4.1.orig/libgfortran/intrinsics/dtime.c 2009-04-09 16:23:07.000000000 -0700
6518+++ gcc-4.4.1/libgfortran/intrinsics/dtime.c 2009-08-24 20:30:25.000000000 -0700
6519@@ -38,9 +38,10 @@
6520 void
6521 dtime_sub (gfc_array_r4 *t, GFC_REAL_4 *result)
6522 {
6523- static GFC_REAL_4 tu = 0.0, ts = 0.0, tt = 0.0;
6524 GFC_REAL_4 *tp;
6525 long user_sec, user_usec, system_sec, system_usec;
6526+ static long us = 0, uu = 0, ss = 0 , su = 0;
6527+ GFC_REAL_4 tu, ts, tt;
6528
6529 if (((t->dim[0].ubound + 1 - t->dim[0].lbound)) < 2)
6530 runtime_error ("Insufficient number of elements in TARRAY.");
6531@@ -48,15 +49,19 @@
6532 __gthread_mutex_lock (&dtime_update_lock);
6533 if (__time_1 (&user_sec, &user_usec, &system_sec, &system_usec) == 0)
6534 {
6535- tu = (GFC_REAL_4)(user_sec + 1.e-6 * user_usec) - tu;
6536- ts = (GFC_REAL_4)(system_sec + 1.e-6 * system_usec) - ts;
6537+ tu = (GFC_REAL_4) ((user_sec - us) + 1.e-6 * (user_usec - uu));
6538+ ts = (GFC_REAL_4) ((system_sec - ss) + 1.e-6 * (system_usec - su));
6539 tt = tu + ts;
6540+ us = user_sec;
6541+ uu = user_usec;
6542+ ss = system_sec;
6543+ su = system_usec;
6544 }
6545 else
6546 {
6547- tu = (GFC_REAL_4)-1.0;
6548- ts = (GFC_REAL_4)-1.0;
6549- tt = (GFC_REAL_4)-1.0;
6550+ tu = -1;
6551+ ts = -1;
6552+ tt = -1;
6553 }
6554
6555 tp = t->data;
6556diff -Naur gcc-4.4.1.orig/libgfortran/intrinsics/iso_c_binding.c gcc-4.4.1/libgfortran/intrinsics/iso_c_binding.c
6557--- gcc-4.4.1.orig/libgfortran/intrinsics/iso_c_binding.c 2009-04-09 16:23:07.000000000 -0700
6558+++ gcc-4.4.1/libgfortran/intrinsics/iso_c_binding.c 2009-08-20 13:42:38.000000000 -0700
6559@@ -137,8 +137,8 @@
6560 f_ptr_out->offset = f_ptr_out->dim[0].lbound * f_ptr_out->dim[0].stride;
6561 for (i = 1; i < shapeSize; i++)
6562 {
6563- f_ptr_out->dim[i].stride = (f_ptr_out->dim[i-1].ubound + 1)
6564- - f_ptr_out->dim[i-1].lbound;
6565+ f_ptr_out->dim[i].stride = ((f_ptr_out->dim[i-1].ubound + 1)
6566+ - f_ptr_out->dim[i-1].lbound) * f_ptr_out->dim[i-1].stride;
6567 f_ptr_out->offset += f_ptr_out->dim[i].lbound
6568 * f_ptr_out->dim[i].stride;
6569 }
6570diff -Naur gcc-4.4.1.orig/libgfortran/intrinsics/time_1.h gcc-4.4.1/libgfortran/intrinsics/time_1.h
6571--- gcc-4.4.1.orig/libgfortran/intrinsics/time_1.h 2009-04-09 16:23:07.000000000 -0700
6572+++ gcc-4.4.1/libgfortran/intrinsics/time_1.h 2009-08-24 20:30:25.000000000 -0700
6573@@ -51,6 +51,10 @@
6574 # endif
6575 #endif
6576
6577+#ifdef HAVE_SYS_TYPES_H
6578+ #include <sys/types.h>
6579+#endif
6580+
6581 /* The most accurate way to get the CPU time is getrusage (). */
6582 #if defined (HAVE_GETRUSAGE) && defined (HAVE_SYS_RESOURCE_H)
6583 # include <sys/resource.h>
6584@@ -112,7 +116,7 @@
6585 {
6586 #if defined (HAVE_GETRUSAGE) && defined (HAVE_SYS_RESOURCE_H)
6587 struct rusage usage;
6588- getrusage (0, &usage);
6589+ getrusage (RUSAGE_SELF, &usage);
6590
6591 *user_sec = usage.ru_utime.tv_sec;
6592 *user_usec = usage.ru_utime.tv_usec;
6593diff -Naur gcc-4.4.1.orig/libgfortran/io/list_read.c gcc-4.4.1/libgfortran/io/list_read.c
6594--- gcc-4.4.1.orig/libgfortran/io/list_read.c 2009-06-08 20:15:04.000000000 -0700
6595+++ gcc-4.4.1/libgfortran/io/list_read.c 2009-08-04 20:15:18.000000000 -0700
6596@@ -2772,7 +2772,7 @@
6597
6598 if (nl->type == GFC_DTYPE_DERIVED)
6599 nml_touch_nodes (nl);
6600- if (component_flag && nl->var_rank > 0)
6601+ if (component_flag && nl->var_rank > 0 && nl->next)
6602 nl = first_nl;
6603
6604 /* Make sure no extraneous qualifiers are there. */
6605diff -Naur gcc-4.4.1.orig/libgomp/omp_lib.h.in gcc-4.4.1/libgomp/omp_lib.h.in
6606--- gcc-4.4.1.orig/libgomp/omp_lib.h.in 2009-04-09 16:23:07.000000000 -0700
6607+++ gcc-4.4.1/libgomp/omp_lib.h.in 2009-08-19 00:11:43.000000000 -0700
6608@@ -42,16 +42,16 @@
6609 external omp_set_num_threads
6610
6611 external omp_get_dynamic, omp_get_nested
6612- logical*4 omp_get_dynamic, omp_get_nested
6613+ logical(4) omp_get_dynamic, omp_get_nested
6614 external omp_test_lock, omp_in_parallel
6615- logical*4 omp_test_lock, omp_in_parallel
6616+ logical(4) omp_test_lock, omp_in_parallel
6617
6618 external omp_get_max_threads, omp_get_num_procs
6619- integer*4 omp_get_max_threads, omp_get_num_procs
6620+ integer(4) omp_get_max_threads, omp_get_num_procs
6621 external omp_get_num_threads, omp_get_thread_num
6622- integer*4 omp_get_num_threads, omp_get_thread_num
6623+ integer(4) omp_get_num_threads, omp_get_thread_num
6624 external omp_test_nest_lock
6625- integer*4 omp_test_nest_lock
6626+ integer(4) omp_test_nest_lock
6627
6628 external omp_get_wtick, omp_get_wtime
6629 double precision omp_get_wtick, omp_get_wtime
6630@@ -61,6 +61,6 @@
6631 external omp_get_max_active_levels, omp_get_level
6632 external omp_get_ancestor_thread_num, omp_get_team_size
6633 external omp_get_active_level
6634- integer*4 omp_get_thread_limit, omp_get_max_active_levels
6635- integer*4 omp_get_level, omp_get_ancestor_thread_num
6636- integer*4 omp_get_team_size, omp_get_active_level
6637+ integer(4) omp_get_thread_limit, omp_get_max_active_levels
6638+ integer(4) omp_get_level, omp_get_ancestor_thread_num
6639+ integer(4) omp_get_team_size, omp_get_active_level
6640diff -Naur gcc-4.4.1.orig/libjava/contrib/aotcompile.py.in gcc-4.4.1/libjava/contrib/aotcompile.py.in
6641--- gcc-4.4.1.orig/libjava/contrib/aotcompile.py.in 2009-04-26 07:24:38.000000000 -0700
6642+++ gcc-4.4.1/libjava/contrib/aotcompile.py.in 2009-07-23 07:27:31.000000000 -0700
6643@@ -15,7 +15,11 @@
6644
6645 import classfile
6646 import copy
6647-import md5
6648+# The md5 module is deprecated in Python 2.5
6649+try:
6650+ from hashlib import md5
6651+except ImportError:
6652+ from md5 import md5
6653 import operator
6654 import os
6655 import sys
6656@@ -182,7 +186,7 @@
6657 def addClass(self, bytes, name):
6658 """Subclasses call this from their __init__ method for
6659 every class they find."""
6660- digest = md5.new(bytes).digest()
6661+ digest = md5(bytes).digest()
6662 self.classes[digest] = bytes
6663 self.classnames[digest] = name
6664
6665diff -Naur gcc-4.4.1.orig/libstdc++-v3/config/abi/pre/gnu.ver gcc-4.4.1/libstdc++-v3/config/abi/pre/gnu.ver
6666--- gcc-4.4.1.orig/libstdc++-v3/config/abi/pre/gnu.ver 2009-05-05 14:44:27.000000000 -0700
6667+++ gcc-4.4.1/libstdc++-v3/config/abi/pre/gnu.ver 2009-08-26 12:04:11.000000000 -0700
6668@@ -32,7 +32,9 @@
6669 std::a[e-z]*;
6670 # std::ba[a-r]*;
6671 std::basic_[a-e]*;
6672- std::basic_f[a-r]*;
6673+ std::basic_f[a-h]*;
6674+# std::basic_filebuf;
6675+ std::basic_f[j-r]*;
6676 # std::basic_fstream;
6677 std::basic_f[t-z]*;
6678 std::basic_[g-h]*;
6679@@ -273,28 +275,40 @@
6680 _ZNSdC*;
6681 _ZNSdD*;
6682
6683+ # std::basic_filebuf
6684+ _ZNSt13basic_filebufI[cw]St11char_traitsI[cw]EEC*;
6685+ _ZNSt13basic_filebufI[cw]St11char_traitsI[cw]EED*;
6686+ _ZNSt13basic_filebufI[cw]St11char_traitsI[cw]EE[0-3]*;
6687+ _ZNSt13basic_filebufI[cw]St11char_traitsI[cw]EE4openEPKc*;
6688+ _ZNSt13basic_filebufI[cw]St11char_traitsI[cw]EE4sync*;
6689+ _ZNSt13basic_filebufI[cw]St11char_traitsI[cw]EE[5-9]*;
6690+ _ZNKSt13basic_filebufI[cw]St11char_traitsI[cw]EE7is_openEv;
6691+
6692 # std::basic_fstream
6693- _ZNSt13basic_fstreamI[cw]St11char_traitsI[cw]EEC*;
6694+ _ZNSt13basic_fstreamI[cw]St11char_traitsI[cw]EEC[12]Ev;
6695+ _ZNSt13basic_fstreamI[cw]St11char_traitsI[cw]EEC[12]EPKc*;
6696 _ZNSt13basic_fstreamI[cw]St11char_traitsI[cw]EED*;
6697 _ZNSt13basic_fstreamI[cw]St11char_traitsI[cw]EE5closeEv;
6698 _ZNSt13basic_fstreamI[cw]St11char_traitsI[cw]EE7is_openEv;
6699- _ZNSt13basic_fstreamI[cw]St11char_traitsI[cw]EE4open*;
6700+ _ZNSt13basic_fstreamI[cw]St11char_traitsI[cw]EE4openEPKc*;
6701 _ZNKSt13basic_fstreamI[cw]St11char_traitsI[cw]EE5rdbufEv;
6702
6703 # std::basic_ifstream
6704- _ZNSt14basic_ifstreamI[cw]St11char_traitsI[cw]EEC*;
6705+ _ZNSt14basic_ifstreamI[cw]St11char_traitsI[cw]EEC[12]Ev;
6706+ _ZNSt14basic_ifstreamI[cw]St11char_traitsI[cw]EEC[12]EPKc*;
6707 _ZNSt14basic_ifstreamI[cw]St11char_traitsI[cw]EED*;
6708 _ZNSt14basic_ifstreamI[cw]St11char_traitsI[cw]EE5closeEv;
6709 _ZNSt14basic_ifstreamI[cw]St11char_traitsI[cw]EE7is_openEv;
6710- _ZNSt14basic_ifstreamI[cw]St11char_traitsI[cw]EE4open*;
6711+ _ZNSt14basic_ifstreamI[cw]St11char_traitsI[cw]EE4openEPKc*;
6712 _ZNKSt14basic_ifstreamI[cw]St11char_traitsI[cw]EE5rdbufEv;
6713
6714 # std::basic_ofstream
6715- _ZNSt14basic_ofstreamI[cw]St11char_traitsI[cw]EEC*;
6716+ _ZNSt14basic_ofstreamI[cw]St11char_traitsI[cw]EEC[12]Ev;
6717+ _ZNSt14basic_ofstreamI[cw]St11char_traitsI[cw]EEC[12]EPKc*;
6718 _ZNSt14basic_ofstreamI[cw]St11char_traitsI[cw]EED*;
6719 _ZNSt14basic_ofstreamI[cw]St11char_traitsI[cw]EE5closeEv;
6720 _ZNSt14basic_ofstreamI[cw]St11char_traitsI[cw]EE7is_openEv;
6721- _ZNSt14basic_ofstreamI[cw]St11char_traitsI[cw]EE4open*;
6722+ _ZNSt14basic_ofstreamI[cw]St11char_traitsI[cw]EE4openEPKc*;
6723 _ZNKSt14basic_ofstreamI[cw]St11char_traitsI[cw]EE5rdbufEv;
6724
6725 # std::basic_istream<char>
6726@@ -966,6 +980,19 @@
6727
6728 } GLIBCXX_3.4.11;
6729
6730+GLIBCXX_3.4.13 {
6731+
6732+ # new fstream members
6733+ _ZNSt13basic_filebufI[cw]St11char_traitsI[cw]EE4openERKSsSt13_Ios_Openmode;
6734+ _ZNSt13basic_fstreamI[cw]St11char_traitsI[cw]EEC[12]ERKSsSt13_Ios_Openmode;
6735+ _ZNSt13basic_fstreamI[cw]St11char_traitsI[cw]EE4openERKSsSt13_Ios_Openmode;
6736+ _ZNSt14basic_ifstreamI[cw]St11char_traitsI[cw]EEC[12]ERKSsSt13_Ios_Openmode;
6737+ _ZNSt14basic_ifstreamI[cw]St11char_traitsI[cw]EE4openERKSsSt13_Ios_Openmode;
6738+ _ZNSt14basic_ofstreamI[cw]St11char_traitsI[cw]EEC[12]ERKSsSt13_Ios_Openmode;
6739+ _ZNSt14basic_ofstreamI[cw]St11char_traitsI[cw]EE4openERKSsSt13_Ios_Openmode;
6740+
6741+} GLIBCXX_3.4.12;
6742+
6743 # Symbols in the support library (libsupc++) have their own tag.
6744 CXXABI_1.3 {
6745
6746diff -Naur gcc-4.4.1.orig/libstdc++-v3/configure gcc-4.4.1/libstdc++-v3/configure
6747--- gcc-4.4.1.orig/libstdc++-v3/configure 2009-05-07 03:23:06.000000000 -0700
6748+++ gcc-4.4.1/libstdc++-v3/configure 2009-08-26 12:04:11.000000000 -0700
6749@@ -1567,7 +1567,7 @@
6750 ### am handles this now? ORIGINAL_LD_FOR_MULTILIBS=$LD
6751
6752 # For libtool versioning info, format is CURRENT:REVISION:AGE
6753-libtool_VERSION=6:12:0
6754+libtool_VERSION=6:13:0
6755
6756
6757 # Find the rest of the source tree framework.
6758diff -Naur gcc-4.4.1.orig/libstdc++-v3/configure.ac gcc-4.4.1/libstdc++-v3/configure.ac
6759--- gcc-4.4.1.orig/libstdc++-v3/configure.ac 2009-05-07 03:23:06.000000000 -0700
6760+++ gcc-4.4.1/libstdc++-v3/configure.ac 2009-08-26 12:04:11.000000000 -0700
6761@@ -12,7 +12,7 @@
6762 ### am handles this now? ORIGINAL_LD_FOR_MULTILIBS=$LD
6763
6764 # For libtool versioning info, format is CURRENT:REVISION:AGE
6765-libtool_VERSION=6:12:0
6766+libtool_VERSION=6:13:0
6767 AC_SUBST(libtool_VERSION)
6768
6769 # Find the rest of the source tree framework.
6770diff -Naur gcc-4.4.1.orig/libstdc++-v3/include/parallel/multiway_merge.h gcc-4.4.1/libstdc++-v3/include/parallel/multiway_merge.h
6771--- gcc-4.4.1.orig/libstdc++-v3/include/parallel/multiway_merge.h 2009-04-09 16:23:07.000000000 -0700
6772+++ gcc-4.4.1/libstdc++-v3/include/parallel/multiway_merge.h 2009-09-11 09:36:00.000000000 -0700
6773@@ -1224,7 +1224,7 @@
6774 offsets[num_threads - 1].begin(), comp);
6775 }
6776 }
6777-
6778+ delete[] borders;
6779
6780 for (int slab = 0; slab < num_threads; ++slab)
6781 {
6782@@ -1305,11 +1305,8 @@
6783 std::iterator_traits<RandomAccessIterator1>::value_type value_type;
6784
6785 // Leave only non-empty sequences.
6786- std::pair<RandomAccessIterator1, RandomAccessIterator1>* ne_seqs =
6787- static_cast<std::pair<RandomAccessIterator1, RandomAccessIterator1>*>(
6788- ::operator new(
6789- sizeof(std::pair<RandomAccessIterator1, RandomAccessIterator1>)
6790- * (seqs_end - seqs_begin)));
6791+ typedef std::pair<RandomAccessIterator1, RandomAccessIterator1> seq_type;
6792+ seq_type* ne_seqs = new seq_type[seqs_end - seqs_begin];
6793 int k = 0;
6794 difference_type total_length = 0;
6795 for (RandomAccessIteratorIterator raii = seqs_begin;
6796@@ -1319,9 +1316,7 @@
6797 if(seq_length > 0)
6798 {
6799 total_length += seq_length;
6800- //ne_seqs[k] = *raii;
6801- new(&(ne_seqs[k++]))
6802- std::pair<RandomAccessIterator1, RandomAccessIterator1>(*raii);
6803+ ne_seqs[k++] = *raii;
6804 }
6805 }
6806
6807@@ -1331,7 +1326,7 @@
6808
6809 if (total_length == 0 || k == 0)
6810 {
6811- ::operator delete(ne_seqs);
6812+ delete[] ne_seqs;
6813 return target;
6814 }
6815
6816@@ -1366,8 +1361,7 @@
6817 for (int c = 0; c < k; ++c)
6818 target_position += pieces[iam][c].first;
6819
6820- std::pair<RandomAccessIterator1, RandomAccessIterator1>* chunks
6821- = new std::pair<RandomAccessIterator1, RandomAccessIterator1>[k];
6822+ seq_type* chunks = new seq_type[k];
6823
6824 for (int s = 0; s < k; ++s)
6825 {
6826@@ -1399,6 +1393,7 @@
6827 }
6828
6829 delete[] pieces;
6830+ delete[] ne_seqs;
6831
6832 return target + length;
6833 }
6834diff -Naur gcc-4.4.1.orig/libstdc++-v3/include/std/valarray gcc-4.4.1/libstdc++-v3/include/std/valarray
6835--- gcc-4.4.1.orig/libstdc++-v3/include/std/valarray 2009-04-09 16:23:07.000000000 -0700
6836+++ gcc-4.4.1/libstdc++-v3/include/std/valarray 2009-07-22 03:25:53.000000000 -0700
6837@@ -1,7 +1,7 @@
6838 // The template and inlines for the -*- C++ -*- valarray class.
6839
6840 // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
6841-// 2006, 2007, 2009
6842+// 2006, 2007, 2008, 2009
6843 // Free Software Foundation, Inc.
6844 //
6845 // This file is part of the GNU ISO C++ Library. This library is free
6846@@ -647,7 +647,7 @@
6847 template<typename _Tp>
6848 inline
6849 valarray<_Tp>::valarray(initializer_list<_Tp> __l)
6850- : _M_size(__l.size()), _M_data(__valarray_get_storage<_Tp>(__l.size()))
6851+ : _M_size(__l.size()), _M_data(__valarray_get_storage<_Tp>(__l.size()))
6852 { std::__valarray_copy_construct (__l.begin(), __l.end(), _M_data); }
6853 #endif
6854
6855@@ -681,6 +681,7 @@
6856 {
6857 _GLIBCXX_DEBUG_ASSERT(_M_size == __l.size());
6858 std::__valarray_copy(__l.begin(), __l.size(), _M_data);
6859+ return *this;
6860 }
6861 #endif
6862
6863diff -Naur gcc-4.4.1.orig/libstdc++-v3/src/Makefile.am gcc-4.4.1/libstdc++-v3/src/Makefile.am
6864--- gcc-4.4.1.orig/libstdc++-v3/src/Makefile.am 2009-04-09 16:23:07.000000000 -0700
6865+++ gcc-4.4.1/libstdc++-v3/src/Makefile.am 2009-08-26 12:04:11.000000000 -0700
6866@@ -277,6 +277,11 @@
6867 atomic.o: atomic.cc
6868 $(CXXCOMPILE) -std=gnu++0x -c $<
6869
6870+fstream-inst.lo: fstream-inst.cc
6871+ $(LTCXXCOMPILE) -std=gnu++0x -c $<
6872+fstream-inst.o: fstream-inst.cc
6873+ $(CXXCOMPILE) -std=gnu++0x -c $<
6874+
6875 string-inst.lo: string-inst.cc
6876 $(LTCXXCOMPILE) -std=gnu++0x -c $<
6877 string-inst.o: string-inst.cc
6878diff -Naur gcc-4.4.1.orig/libstdc++-v3/src/Makefile.in gcc-4.4.1/libstdc++-v3/src/Makefile.in
6879--- gcc-4.4.1.orig/libstdc++-v3/src/Makefile.in 2009-01-16 18:03:25.000000000 -0800
6880+++ gcc-4.4.1/libstdc++-v3/src/Makefile.in 2009-08-26 12:04:11.000000000 -0700
6881@@ -888,6 +888,11 @@
6882 atomic.o: atomic.cc
6883 $(CXXCOMPILE) -std=gnu++0x -c $<
6884
6885+fstream-inst.lo: fstream-inst.cc
6886+ $(LTCXXCOMPILE) -std=gnu++0x -c $<
6887+fstream-inst.o: fstream-inst.cc
6888+ $(CXXCOMPILE) -std=gnu++0x -c $<
6889+
6890 string-inst.lo: string-inst.cc
6891 $(LTCXXCOMPILE) -std=gnu++0x -c $<
6892 string-inst.o: string-inst.cc
6893diff -Naur gcc-4.4.1.orig/libstdc++-v3/testsuite/util/testsuite_abi.cc gcc-4.4.1/libstdc++-v3/testsuite/util/testsuite_abi.cc
6894--- gcc-4.4.1.orig/libstdc++-v3/testsuite/util/testsuite_abi.cc 2009-05-05 14:44:27.000000000 -0700
6895+++ gcc-4.4.1/libstdc++-v3/testsuite/util/testsuite_abi.cc 2009-08-26 12:04:11.000000000 -0700
6896@@ -184,6 +184,7 @@
6897 known_versions.push_back("GLIBCXX_3.4.10");
6898 known_versions.push_back("GLIBCXX_3.4.11");
6899 known_versions.push_back("GLIBCXX_3.4.12");
6900+ known_versions.push_back("GLIBCXX_3.4.13");
6901 known_versions.push_back("GLIBCXX_LDBL_3.4");
6902 known_versions.push_back("GLIBCXX_LDBL_3.4.7");
6903 known_versions.push_back("GLIBCXX_LDBL_3.4.10");
Note: See TracBrowser for help on using the repository browser.