]> git.pld-linux.org Git - packages/crossmingw32-gcc.git/blob - gcc-branch.diff
Updated to 4.6.3
[packages/crossmingw32-gcc.git] / gcc-branch.diff
1 Index: gcc/doc/invoke.texi
2 ===================================================================
3 --- gcc/doc/invoke.texi (.../tags/gcc_4_6_3_release)    (revision 190226)
4 +++ gcc/doc/invoke.texi (.../branches/gcc-4_6-branch)   (revision 190226)
5 @@ -853,8 +853,8 @@
6  -m5-compact  -m5-compact-nofpu @gol
7  -mb  -ml  -mdalign  -mrelax @gol
8  -mbigtable -mfmovd -mhitachi -mrenesas -mno-renesas -mnomacsave @gol
9 --mieee  -mbitops  -misize  -minline-ic_invalidate -mpadstruct  -mspace @gol
10 --mprefergot  -musermode -multcost=@var{number} -mdiv=@var{strategy} @gol
11 +-mieee -mno-ieee -mbitops  -misize  -minline-ic_invalidate -mpadstruct @gol
12 +-mspace -mprefergot  -musermode -multcost=@var{number} -mdiv=@var{strategy} @gol
13  -mdivsi3_libfunc=@var{name} -mfixed-range=@var{register-range} @gol
14  -madjust-unroll -mindexed-addressing -mgettrcost=@var{number} -mpt-fixed @gol
15  -maccumulate-outgoing-args -minvalid-symbols}
16 @@ -16938,13 +16938,15 @@
17  @option{-mhitachi} is given.
18  
19  @item -mieee
20 +@item -mno-ieee
21  @opindex mieee
22 -Increase IEEE-compliance of floating-point code.
23 -At the moment, this is equivalent to @option{-fno-finite-math-only}.
24 -When generating 16 bit SH opcodes, getting IEEE-conforming results for
25 -comparisons of NANs / infinities incurs extra overhead in every
26 -floating point comparison, therefore the default is set to
27 -@option{-ffinite-math-only}.
28 +@opindex mnoieee
29 +Control the IEEE compliance of floating-point comparisons, which affects the
30 +handling of cases where the result of a comparison is unordered.  By default
31 +@option{-mieee} is implicitly enabled.  If @option{-ffinite-math-only} is
32 +enabled @option{-mno-ieee} is implicitly set, which results in faster
33 +floating-point greater-equal and less-equal comparisons.  The implcit settings
34 +can be overridden by specifying either @option{-mieee} or @option{-mno-ieee}.
35  
36  @item -minline-ic_invalidate
37  @opindex minline-ic_invalidate
38 Index: gcc/doc/install.texi
39 ===================================================================
40 --- gcc/doc/install.texi        (.../tags/gcc_4_6_3_release)    (revision 190226)
41 +++ gcc/doc/install.texi        (.../branches/gcc-4_6-branch)   (revision 190226)
42 @@ -1208,7 +1208,7 @@
43  
44  @item --with-llsc
45  On MIPS targets, make @option{-mllsc} the default when no
46 -@option{-mno-lsc} option is passed.  This is the default for
47 +@option{-mno-llsc} option is passed.  This is the default for
48  Linux-based targets, as the kernel will emulate them if the ISA does
49  not provide them.
50  
51 Index: gcc/targhooks.c
52 ===================================================================
53 --- gcc/targhooks.c     (.../tags/gcc_4_6_3_release)    (revision 190226)
54 +++ gcc/targhooks.c     (.../branches/gcc-4_6-branch)   (revision 190226)
55 @@ -529,6 +529,7 @@
56        case scalar_to_vec:
57        case cond_branch_not_taken:
58        case vec_perm:
59 +      case vec_promote_demote:
60          return 1;
61  
62        case unaligned_load:
63 Index: gcc/tree-pretty-print.c
64 ===================================================================
65 --- gcc/tree-pretty-print.c     (.../tags/gcc_4_6_3_release)    (revision 190226)
66 +++ gcc/tree-pretty-print.c     (.../branches/gcc-4_6-branch)   (revision 190226)
67 @@ -805,6 +805,8 @@
68                infer them and MEM_ATTR caching will share MEM_REFs
69                with differently-typed op0s.  */
70             && TREE_CODE (TREE_OPERAND (node, 0)) != INTEGER_CST
71 +           /* Released SSA_NAMES have no TREE_TYPE.  */
72 +           && TREE_TYPE (TREE_OPERAND (node, 0)) != NULL_TREE
73             /* Same pointer types, but ignoring POINTER_TYPE vs.
74                REFERENCE_TYPE.  */
75             && (TREE_TYPE (TREE_TYPE (TREE_OPERAND (node, 0)))
76 @@ -1171,6 +1173,8 @@
77                      can't infer them and MEM_ATTR caching will share
78                      MEM_REFs with differently-typed op0s.  */
79                   && TREE_CODE (TREE_OPERAND (op0, 0)) != INTEGER_CST
80 +                 /* Released SSA_NAMES have no TREE_TYPE.  */
81 +                 && TREE_TYPE (TREE_OPERAND (op0, 0)) != NULL_TREE
82                   /* Same pointer types, but ignoring POINTER_TYPE vs.
83                      REFERENCE_TYPE.  */
84                   && (TREE_TYPE (TREE_TYPE (TREE_OPERAND (op0, 0)))
85 Index: gcc/cgraph.c
86 ===================================================================
87 --- gcc/cgraph.c        (.../tags/gcc_4_6_3_release)    (revision 190226)
88 +++ gcc/cgraph.c        (.../branches/gcc-4_6-branch)   (revision 190226)
89 @@ -1700,19 +1700,27 @@
90    free_nodes = node;
91  }
92  
93 -/* Remove the node from cgraph.  */
94 +/* Remove the node from cgraph and all inline clones inlined into it.
95 +   Skip however removal of FORBIDDEN_NODE and return true if it needs to be
96 +   removed.  This allows to call the function from outer loop walking clone
97 +   tree.  */
98  
99 -void
100 -cgraph_remove_node_and_inline_clones (struct cgraph_node *node)
101 +bool
102 +cgraph_remove_node_and_inline_clones (struct cgraph_node *node, struct cgraph_node *forbidden_node)
103  {
104    struct cgraph_edge *e, *next;
105 +  bool found = false;
106 +
107 +  if (node == forbidden_node)
108 +    return true;
109    for (e = node->callees; e; e = next)
110      {
111        next = e->next_callee;
112        if (!e->inline_failed)
113 -        cgraph_remove_node_and_inline_clones (e->callee);
114 +        found |= cgraph_remove_node_and_inline_clones (e->callee, forbidden_node);
115      }
116    cgraph_remove_node (node);
117 +  return found;
118  }
119  
120  /* Notify finalize_compilation_unit that given node is reachable.  */
121 Index: gcc/cgraph.h
122 ===================================================================
123 --- gcc/cgraph.h        (.../tags/gcc_4_6_3_release)    (revision 190226)
124 +++ gcc/cgraph.h        (.../branches/gcc-4_6-branch)   (revision 190226)
125 @@ -547,7 +547,7 @@
126  void cgraph_insert_node_to_hashtable (struct cgraph_node *node);
127  void cgraph_remove_edge (struct cgraph_edge *);
128  void cgraph_remove_node (struct cgraph_node *);
129 -void cgraph_remove_node_and_inline_clones (struct cgraph_node *);
130 +bool cgraph_remove_node_and_inline_clones (struct cgraph_node *, struct cgraph_node *);
131  void cgraph_release_function_body (struct cgraph_node *);
132  void cgraph_node_remove_callees (struct cgraph_node *node);
133  struct cgraph_edge *cgraph_create_edge (struct cgraph_node *,
134 Index: gcc/DATESTAMP
135 ===================================================================
136 --- gcc/DATESTAMP       (.../tags/gcc_4_6_3_release)    (revision 190226)
137 +++ gcc/DATESTAMP       (.../branches/gcc-4_6-branch)   (revision 190226)
138 @@ -1 +1 @@
139 -20120301
140 +20120808
141 Index: gcc/target.h
142 ===================================================================
143 --- gcc/target.h        (.../tags/gcc_4_6_3_release)    (revision 190226)
144 +++ gcc/target.h        (.../branches/gcc-4_6-branch)   (revision 190226)
145 @@ -128,7 +128,8 @@
146    scalar_to_vec,
147    cond_branch_not_taken,
148    cond_branch_taken,
149 -  vec_perm
150 +  vec_perm,
151 +  vec_promote_demote
152  };
153  
154  /* Sets of optimization levels at which an option may be enabled by
155 Index: gcc/configure
156 ===================================================================
157 --- gcc/configure       (.../tags/gcc_4_6_3_release)    (revision 190226)
158 +++ gcc/configure       (.../branches/gcc-4_6-branch)   (revision 190226)
159 @@ -4842,7 +4842,7 @@
160  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_cv_cc_gcc_supports_ada" >&5
161  $as_echo "$acx_cv_cc_gcc_supports_ada" >&6; }
162  
163 -if test x$GNATBIND != xno && test x$GNATMAKE != xno && test x$acx_cv_cc_gcc_supports_ada != xno; then
164 +if test "x$GNATBIND" != xno && test "x$GNATMAKE" != xno && test x$acx_cv_cc_gcc_supports_ada != xno; then
165    have_gnat=yes
166  else
167    have_gnat=no
168 Index: gcc/toplev.c
169 ===================================================================
170 --- gcc/toplev.c        (.../tags/gcc_4_6_3_release)    (revision 190226)
171 +++ gcc/toplev.c        (.../branches/gcc-4_6-branch)   (revision 190226)
172 @@ -1326,6 +1326,13 @@
173            "and -ftree-loop-linear)");
174  #endif
175  
176 +  if (flag_strict_volatile_bitfields > 0 && !abi_version_at_least (2))
177 +    {
178 +      warning (0, "-fstrict-volatile-bitfields disabled; "
179 +              "it is incompatible with ABI versions < 2");
180 +      flag_strict_volatile_bitfields = 0;
181 +    }
182 +
183    /* Unrolling all loops implies that standard loop unrolling must also
184       be done.  */
185    if (flag_unroll_all_loops)
186 Index: gcc/DEV-PHASE
187 ===================================================================
188 --- gcc/DEV-PHASE       (.../tags/gcc_4_6_3_release)    (revision 190226)
189 +++ gcc/DEV-PHASE       (.../branches/gcc-4_6-branch)   (revision 190226)
190 @@ -0,0 +1 @@
191 +prerelease
192 Index: gcc/cgraphunit.c
193 ===================================================================
194 --- gcc/cgraphunit.c    (.../tags/gcc_4_6_3_release)    (revision 190226)
195 +++ gcc/cgraphunit.c    (.../branches/gcc-4_6-branch)   (revision 190226)
196 @@ -2157,8 +2157,19 @@
197              first_clone->ipa_transforms_to_apply);
198    first_clone->ipa_transforms_to_apply = NULL;
199  
200 +  /* When doing recursive inlining, the clone may become unnecessary.
201 +     This is possible i.e. in the case when the recursive function is proved to be
202 +     non-throwing and the recursion happens only in the EH landing pad.
203 +     We can not remove the clone until we are done with saving the body.
204 +     Remove it now.  */
205 +  if (!first_clone->callers)
206 +    {
207 +      cgraph_remove_node_and_inline_clones (first_clone, NULL);
208 +      first_clone = NULL;
209 +    }
210  #ifdef ENABLE_CHECKING
211 -  verify_cgraph_node (first_clone);
212 +  else
213 +    verify_cgraph_node (first_clone);
214  #endif
215    return first_clone;
216  }
217 Index: gcc/ChangeLog
218 ===================================================================
219 --- gcc/ChangeLog       (.../tags/gcc_4_6_3_release)    (revision 190226)
220 +++ gcc/ChangeLog       (.../branches/gcc-4_6-branch)   (revision 190226)
221 @@ -1,3 +1,530 @@
222 +2012-07-22  Oleg Endo  <olegendo@gcc.gnu.org>
223 +
224 +       PR target/33135
225 +       * config/sh/sh.opt (mieee): Use Var instead of Mask.  Correct
226 +       description.
227 +       * config/sh/sh.c (sh_option_override): Do not change 
228 +       flag_finite_math_only.  Set TARGET_IEEE to complement of
229 +       flag_finite_math_only.
230 +       * doc/invoke.texi (SH options): Add mno-ieee.  Correct
231 +       description of mieee and mno-ieee behavior.
232 +
233 +2012-07-16  Steven Bosscher  <steven@gcc.gnu.org>
234 +
235 +       Backported from trunk:
236 +       2012-07-13  Richard Sandiford  <rdsandiford@googlemail.com>
237 +                   Steven Bosscher  <steven@gcc.gnu.org>
238 +                   Bernd Schmidt  <bernds@codesourcery.com>
239 +
240 +       PR rtl-optimization/53908
241 +       * df-problems.c (can_move_insns_across): When doing
242 +       memory-reference book-keeping, handle call insns.
243 +
244 +2012-07-06  Nick Clifton  <nickc@redhat.com>
245 +
246 +       * config/mn10300/mn10300.c (mn10300_encode_section_info): Call
247 +       default_encode_section_info.
248 +
249 +2012-07-04  Richard Guenther  <rguenther@suse.de>
250 +
251 +       PR middle-end/53433
252 +       * tree-ssa-ccp.c (get_base_constructor): Do not return an
253 +       error_mark_node DECL_INITIAL.
254 +
255 +2012-07-02  Martin Jambor  <mjambor@suse.cz>
256 +
257 +       PR middle-end/38474
258 +       * ipa-prop.c (compute_known_type_jump_func): Check for a BINFO before
259 +       checking for a dynamic type change.
260 +
261 +2012-06-28  Richard Guenther  <rguenther@suse.de>
262 +
263 +       PR middle-end/53790
264 +       * expr.c (expand_expr_real_1): Verify if the type is complete
265 +       before inspecting its size.
266 +
267 +2012-06-22  Richard Guenther  <rguenther@suse.de>
268 +
269 +       * gcov-iov.c: Include bconfig.h and system.h.
270 +
271 +2012-06-22  Richard Guenther  <rguenther@suse.de>
272 +
273 +       PR gcov-profile/53744
274 +       * gcov-iov.c (main): Treat "" and "prerelease" the same.
275 +
276 +2012-06-19  Joey Ye  <joey.ye@arm.com>
277 +
278 +       Backported from mainline
279 +       2011-10-14  David Alan Gilbert  <david.gilbert@linaro.org>
280 +
281 +       * config/arm/arm.h (TARGET_HAVE_DMB_MCR): MCR Not available in Thumb1.
282 +
283 +2012-06-18  Joey Ye  <joey.ye@arm.com>
284 +
285 +       Backported from mainline
286 +       2011-10-14  David Alan Gilbert  <david.gilbert@linaro.org>
287 +
288 +       PR target/48126
289 +       * config/arm/arm.c (arm_output_sync_loop): Move label before barrier.
290 +
291 +2012-06-17  Uros Bizjak  <ubizjak@gmail.com>
292 +
293 +       Backport from mainline:
294 +       2012-06-17  Uros Bizjak  <ubizjak@gmail.com>
295 +
296 +       * config/i386/sse.md (vcvtph2ps): Fix vec_select selector.
297 +
298 +2012-06-16  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
299 +
300 +       Backport from mainline:
301 +       2012-06-03  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
302 +
303 +       * config/pa/pa.h (MAX_PCREL17F_OFFSET): Define.
304 +       * config/pa/pa.c (pa_attr_length_millicode_call): Use
305 +       MAX_PCREL17F_OFFSET instead of fixed offset.
306 +       (pa_attr_length_call): Likewise.
307 +       (pa_attr_length_indirect_call): Likewise.
308 +
309 +2012-06-12  Christian Bruel  <christian.bruel@st.com>
310 +
311 +       PR target/53621
312 +       * config/sh/sh.c (sh_option_override): Don't force
313 +        flag_omit_frame_pointer and maccumulate_outgoing_args.
314 +       * config/sh/sh.opt (maccumulate-outgoing-args): Init as Var.
315 +
316 +2012-06-05  Peter Bergner  <bergner@vnet.ibm.com>
317 +
318 +       Backport from mainline
319 +       2011-08-29  Jakub Jelinek  <jakub@redhat.com>
320 +
321 +       * gthr-posix.h (__gthread_active_p): Do not use preprocessor
322 +       conditionals and comments inside macro arguments.
323 +
324 +2012-06-04  Edmar Wienskoski  <edmar@freescale.com>
325 +
326 +       PR target/53559
327 +       * config/rs6000/altivec.md (altivec_stvlx): Change machine mode of
328 +       operands.
329 +       (altivec_stvlxl): Ditto.
330 +       (altivec_stvrx): Ditto.
331 +       (altivec_stvrxl): Ditto.
332 +
333 +2012-06-04  Georg-Johann Lay  <avr@gjlay.de>
334 +
335 +       Backport from 2012-06-04 mainline r188172
336 +
337 +       PR target/46261
338 +       * config/avr/avr-stdint.h: New file.
339 +       * config.gcc (avr-*-*,tm_file): Use avr/avr-stdint.h instead of
340 +       newlib-stdint.h
341 +
342 +2012-06-03  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
343 +
344 +       PR target/52999
345 +       * config/pa/pa.c (TARGET_SECTION_TYPE_FLAGS): Define.
346 +       (pa_section_type_flags): New.
347 +       * config/pa/pa.h (LEGITIMATE_CONSTANT_P): Revert previous change.
348 +
349 +2012-05-31  Richard Guenther  <rguenther@suse.de>
350 +
351 +       PR middle-end/53541
352 +       * tree-pretty-print.c (dump_generic_node): Guard against
353 +       NULL_TREE TREE_TYPE when dumping MEM_REF offset type.
354 +
355 +2012-05-24  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
356 +
357 +       Backport from mainline
358 +       2012-05-18  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
359 +
360 +       PR target/53385
361 +       * config/rs6000/rs6000.c (print_operand): Revise code that unsafely
362 +       relied on signed overflow behavior.
363 +
364 +2012-05-22  Richard Guenther  <rguenther@suse.de>
365 +
366 +       Backport from mainline
367 +       2011-11-10  Richard Guenther  <rguenther@suse.de>
368 +
369 +       PR middle-end/51071
370 +       * gimple.c (gimple_has_side_effects): Remove checking code
371 +       that doesn't belong here.
372 +
373 +2012-05-22  Richard Guenther  <rguenther@suse.de>
374 +
375 +       Backport from mainline
376 +       2012-02-28  Richard Guenther  <rguenther@suse.de>
377 +
378 +       PR target/52407
379 +       * config/i386/i386.c (ix86_expand_vector_set): Fix element
380 +       ordering for the VEC_CONCAT for two element vectors for
381 +       V2SFmode, V2SImode and V2DImode.
382 +
383 +2012-05-22  Richard Guenther  <rguenther@suse.de>
384 +
385 +       Backport from mainline
386 +       2012-04-12  Richard Guenther  <rguenther@suse.de>
387 +
388 +       PR c/52862
389 +       * convert.c (convert_to_pointer): Remove special-casing of zero.
390 +
391 +2012-05-21  Joseph Myers  <joseph@codesourcery.com>
392 +
393 +       PR c/53418
394 +       * c-typeck.c (build_conditional_expr): Remove C_MAYBE_CONST_EXPR
395 +       from folded operands before wrapping another around the
396 +       conditional expression.
397 +
398 +2012-05-21  H.J. Lu  <hongjiu.lu@intel.com>
399 +
400 +       Backport from mainline
401 +       2012-05-21  H.J. Lu  <hongjiu.lu@intel.com>
402 +
403 +       PR target/53416
404 +       * config/i386/i386.md (UNSPEC_RDRAND): Renamed to ...
405 +       (UNSPECV_RDRAND): This.
406 +       (rdrand<mode>_1): Updated.
407 +
408 +2012-05-20  H.J. Lu  <hongjiu.lu@intel.com>
409 +
410 +       Backport from mainline
411 +       2012-05-20  H.J. Lu  <hongjiu.lu@intel.com>
412 +
413 +       * config/i386/driver-i386.c (host_detect_local_cpu): Support
414 +       RDRND, F16C and FSGSBASE.
415 +
416 +2012-05-16  Eric Botcazou  <ebotcazou@adacore.com>
417 +
418 +       * configure: Regenerate.
419 +
420 +2012-05-14  Uros Bizjak  <ubizjak@gmail.com>
421 +
422 +       PR target/46098
423 +       * config/i386/i386.c (ix86_expand_special_args_builtin): Always
424 +       generate target register for "load" class builtins.
425 +
426 +       Revert:
427 +       2010-10-22  Uros Bizjak  <ubizjak@gmail.com>
428 +
429 +       PR target/46098
430 +       * config/i386/sse.md (*avx_movu<ssemodesuffix><avxmodesuffix>):
431 +       Rename from avx_movu<ssemodesuffix><avxmodesuffix>.
432 +       (avx_movu<ssemodesuffix><avxmodesuffix>): New expander.
433 +       (*<sse>_movu<ssemodesuffix>): Rename from <sse>_movu<ssemodesuffix>.
434 +       (<sse>_movu<ssemodesuffix>): New expander.
435 +       (*avx_movdqu<avxmodesuffix>): Rename from avx_movdqu<avxmodesuffix>.
436 +       (avx_movdqu<avxmodesuffix>): New expander.
437 +       (*sse2_movdqu): Rename from sse2_movdqu.
438 +       (sse2_movdqu): New expander.
439 +
440 +2012-05-13  Uros Bizjak  <ubizjak@gmail.com>
441 +
442 +       Backport from mainline
443 +       2012-05-12  Uros Bizjak  <ubizjak@gmail.com>
444 +
445 +       * config/alpha/alpha.c (alpha_emit_conditional_branch): Handle
446 +       ORDERED and UNORDERED conditions.
447 +
448 +2012-05-06  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
449 +
450 +       PR target/52999
451 +       * config/pa/pa.h (LEGITIMATE_CONSTANT_P): Don't put function labels
452 +       in constant pool.
453 +
454 +2012-05-04  Uros Bizjak  <ubizjak@gmail.com>
455 +
456 +       Backport from mainline
457 +       2012-05-04  Uros Bizjak  <ubizjak@gmail.com>
458 +
459 +       PR target/53228
460 +       * config/i386/i386.h (X86_ARCH_CMOV): Rename from X86_ARCH_CMOVE.
461 +       (TARGET_CMOV): Rename from TARGET_CMOVE.
462 +       (TARGET_CMOVE): New define.
463 +       * config/i386/i386.c (ix86_option_override_internal): Use TARGET_CMOV.
464 +       Do not set TARGET_CMOVE here.
465 +
466 +2012-05-03  Michael Meissner  <meissner@linux.vnet.ibm.com>
467 +
468 +       Backport from the mainline
469 +       2012-05-03  Michael Meissner  <meissner@linux.vnet.ibm.com>
470 +
471 +       PR target/53199
472 +       * config/rs6000/rs6000.md (bswapdi splitters): If
473 +       -mavoid-indexed-addresses (or -mcpu=power6 which sets it by
474 +       default) is used, generate an alternate sequence that does not
475 +       depend on using indexed addressing.
476 +
477 +2012-04-30  Uros Bizjak  <ubizjak@gmail.com>
478 +
479 +       Backport from mainline
480 +       2012-04-27  Paolo Bonzini  <bonzini@gnu.org>
481 +
482 +       PR target/53138
483 +       * config/i386/i386.md (x86_mov<mode>cc_0_m1_neg): Add clobber.
484 +
485 +2012-04-24  Jakub Jelinek  <jakub@redhat.com>
486 +
487 +       PR middle-end/53084
488 +       * varasm.c (compute_reloc_for_constant): Handle ADDR_EXPR of MEM_REF.
489 +       (output_addressed_constants): Likewise.
490 +
491 +2012-04-20  Thomas Schwinge  <thomas@codesourcery.com>
492 +
493 +       struct siginfo vs. siginfo_t
494 +
495 +       Backport from trunk (but apply to gcc/):
496 +
497 +       2012-04-20  Thomas Schwinge  <thomas@codesourcery.com>
498 +
499 +       * config/alpha/linux-unwind.h (alpha_fallback_frame_state): Use
500 +       siginfo_t instead of struct siginfo.
501 +       * config/bfin/linux-unwind.h (bfin_fallback_frame_state): Likewise.
502 +       * config/i386/linux-unwind.h (x86_fallback_frame_state): Likewise.
503 +       * config/ia64/linux-unwind.h (ia64_fallback_frame_state)
504 +       (ia64_handle_unwabi): Likewise.
505 +       * config/mips/linux-unwind.h (mips_fallback_frame_state): Likewise.
506 +       * config/pa/linux-unwind.h (pa32_fallback_frame_state): Likewise.
507 +       * config/sh/linux-unwind.h (shmedia_fallback_frame_state)
508 +       (sh_fallback_frame_state): Likewise.
509 +       * config/xtensa/linux-unwind.h (xtensa_fallback_frame_state): Likewise.
510 +
511 +2012-04-13  Michael Meissner  <meissner@linux.vnet.ibm.com>
512 +
513 +       Backport from mainline
514 +       2012-04-12  Michael Meissner  <meissner@linux.vnet.ibm.com>
515 +
516 +       PR target/52775
517 +       * config/rs6000/rs6000.h (TARGET_FCFID): Add TARGET_PPC_GPOPT to
518 +       the list of options to enable the FCFID instruction.
519 +
520 +2012-04-12  Richard Earnshaw  <rearnsha@arm.com>
521 +
522 +       PR target/49448
523 +       * config.gcc (arm*-*-linux*): Use an unambiguous pattern for
524 +       detecting big-endian triplets.
525 +
526 +2012-04-10  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
527 +
528 +       PR middle-end/52894
529 +       * varasm.c (process_pending_assemble_externals): Set
530 +       pending_assemble_externals_processed true.
531 +       (assemble_external): Call assemble_external_real if the pending
532 +       assemble externals have been processed.
533 +
534 +2012-04-09  Eric Botcazou  <ebotcazou@adacore.com>
535 +
536 +       PR target/52717
537 +       * config/sparc/sparc.c (sparc_file_end): Set TREE_PUBLIC explicitly on
538 +       the DECL generated for the special GOT helper.
539 +
540 +2012-04-06  Matt Turner  <mattst88@gmail.com>
541 +
542 +       * doc/install.texi: Correct typo "-mno-lsc" -> "-mno-llsc".
543 +
544 +2012-03-29  Uros Bizjak  <ubizjak@gmail.com>
545 +
546 +       * config/i386/sse.md (avx_h<plusminus_insn>v4df3): Fix results
547 +       crossing 128bit lane boundary.
548 +
549 +2012-03-29  Uros Bizjak  <ubizjak@gmail.com>
550 +
551 +       Backported from mainline
552 +       2012-03-27  Uros Bizjak  <ubizjak@gmail.com>
553 +
554 +       PR target/52698
555 +       * config/i386/i386-protos.h (ix86_legitimize_reload_address):
556 +       New prototype.
557 +       * config/i386/i386.h (LEGITIMIZE_RELOAD_ADDRESS): New define.
558 +       * config/i386/i386.c: Include reload.h.
559 +       (ix86_legitimize_reload_address): New function.
560 +
561 +2012-03-28  Joey Ye  <joey.ye@arm.com>
562 +
563 +       Backported from mainline
564 +       2011-12-20  Bernd Schmidt  <bernds@codesourcery.com>
565 +
566 +       PR middle-end/51200
567 +       * expr.c (store_field): Avoid a direct store if the mode is larger
568 +       than the size of the bit field.
569 +       * stor-layout.c (layout_decl): If flag_strict_volatile_bitfields,
570 +       treat non-volatile bit fields like volatile ones.
571 +       * toplev.c (process_options): Disallow combination of
572 +       -fstrict-volatile-bitfields and ABI versions less than 2.
573 +       * config/arm/arm.c (arm_option_override): Don't enable
574 +       flag_strict_volatile_bitfields if the ABI version is less than 2.
575 +       * config/h8300/h8300.c (h8300_option_override): Likewise.
576 +       * config/rx/rx.c (rx_option_override): Likewise.
577 +       * config/m32c/m32c.c (m32c_option_override): Likewise.
578 +       * config/sh/sh.c (sh_option_override): Likewise.
579 +
580 +       2011-12-22  Joey Ye  <joey.ye@arm.com>
581 +
582 +       * toplev.c (process_options): Fix typo.
583 +
584 +2012-03-28  Martin Jambor  <mjambor@suse.cz>
585 +
586 +       Backported from mainline
587 +       2012-03-27  Martin Jambor  <mjambor@suse.cz>
588 +
589 +       PR middle-end/52693
590 +       * tree-sra.c (sra_modify_assign): Do not call
591 +       load_assign_lhs_subreplacements when working with an unscalarizable
592 +       region.
593 +
594 +2012-03-28  Georg-Johann Lay  <avr@gjlay.de>
595 +
596 +       PR target/52741
597 +
598 +       Revert r181936 from 2011-12-02 for:
599 +       * config/avr/libgcc.S (__prologue_saves__, __epilogue_restores__)
600 +       * config/avr/avr.md (movhi_sp_r_irq_off, movhi_sp_r_irq_on)
601 +       * config/avr/avr.c (output_movhi, avr_file_start)
602 +
603 +2012-03-28  Jakub Jelinek  <jakub@redhat.com>
604 +
605 +       PR target/52736
606 +       * config/i386/sse.md (sse2_loadlpd splitter): Use offset 0
607 +       instead of 8 in adjust_address.
608 +
609 +2012-03-24  Jan Hubicka  <jh@suse.cz>
610 +
611 +       Backport from mainline
612 +       PR regression/52696
613 +       * predict.c (predict_paths_for_bb): Fix typo.
614 +
615 +2012-03-24  Jan Hubicka  <jh@suse.cz>
616 +
617 +       Backport from mainline
618 +       PR middle-end/51737
619 +       * cgraph.c (cgraph_remove_node_and_inline_clones): Add FORBIDDEN_NODE
620 +       parameter.
621 +       * cgraph.h (cgraph_remove_node_and_inline_clones): Update prototype.
622 +       * ipa-inline-transform.c (save_inline_function_body): Remove copied
623 +       clone if needed.
624 +       * tree-inline.c (delete_unreachable_blocks_update_callgraph): Update.
625 +
626 +2012-03-24  Steven Bosscher  <steven@gcc.gnu.org>
627 +
628 +       PR middle-end/52640
629 +       * varasm.c: Include pointer-set.h.
630 +       (pending_assemble_externals_set): New pointer set.
631 +       (process_pending_assemble_externals): Destroy the pointer set.
632 +       (assemble_external): See if decl is in pending_assemble_externals_set,
633 +       and add it to pending_assemble_externals if necessary.
634 +       (init_varasm_once): Allocate pending_assemble_externals_set.
635 +
636 +2012-03-16  Jan Hubicka  <jh@suse.cz>
637 +
638 +       Backport from mainline
639 +       PR middle-end/48600
640 +       * predict.c (predict_paths_for_bb): Prevent looping.
641 +       (predict_paths_leading_to_edge, predict_paths_leading_to): Update.
642 +
643 +2012-03-16  Michael Hope  <michael.hope@linaro.org>
644 +
645 +       Backport from mainline
646 +       2011-05-05  Michael Hope  <michael.hope@linaro.org>
647 +
648 +       PR pch/45979
649 +       * config/host-linux.c (TRY_EMPTY_VM_SPACE): Define for
650 +       __ARM_EABI__ hosts.
651 +
652 +2012-03-15  Chung-Lin Tang  <cltang@codesourcery.com>
653 +
654 +       Backport from mainline
655 +       2012-03-10  Chung-Lin Tang  <cltang@codesourcery.com>
656 +
657 +       PR rtl-optimization/52528
658 +       * combine.c (can_combine_p): Add setting of subst_low_luid
659 +       before call to expand_field_assignment().
660 +
661 +2012-03-12  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
662 +
663 +       Backport from mainline
664 +       2011-09-03  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
665 +
666 +       PR Bug middle-end/50232
667 +       * config/pa/pa.md (return): Define "return" insn pattern.
668 +       (epilogue): Use it when no epilogue is needed.
669 +       * config/pa/pa.c (pa_can_use_return_insn): New function.
670 +       * config/pa/pa-protos.h (pa_can_use_return_insn): Declare.
671 +
672 +       Backport for mainline
673 +       2012-01-28  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
674 +
675 +       PR target/51871
676 +       * config/pa/pa.c (pa_return_addr_rtx): Add support for PA2.0 export
677 +       stubs.
678 +
679 +2012-03-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
680 +
681 +       Backport from mainline
682 +       PR target/50310
683 +       * config/rs6000/vector.md (vector_uneq<mode>): Add support for
684 +       UNEQ, LTGT, ORDERED, and UNORDERED IEEE vector comparisons.
685 +       (vector_ltgt<mode>): Likewise.
686 +       (vector_ordered<mode>): Likewise.
687 +       (vector_unordered<mode>): Likewise.
688 +       * config/rs6000/rs6000.c (rs6000_emit_vector_compare_inner): Likewise.
689 +
690 +2012-03-04  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
691 +
692 +       Backport from mainline
693 +       2012-03-01  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
694 +
695 +       PR target/52408
696 +       * config/pa/pa.md (zvdep_imm32): Change type of variable x from int to
697 +       unsigned HOST_WIDE_INT.
698 +       (zvdep_imm64): Likewise.
699 +       (vdepi_ior): Change type of variable x from int to HOST_WIDE_INT.
700 +       (vdepi_and): Likewise.
701 +       Likewise for unamed 64-bit patterns.
702 +       * config/pa/predicates.md (lhs_lshift_cint_operand): Update comment.
703 +
704 +2012-03-03  Eric Botcazou  <ebotcazou@adacore.com>
705 +
706 +       PR target/52425
707 +       Backport from mainline
708 +       2011-05-22  Eric Botcazou  <ebotcazou@adacore.com>
709 +
710 +       * config/sparc/sparc.c (sparc_delegitimize_address): Handle
711 +       UNSPEC_MOVE_PIC pattern.
712 +
713 +2012-03-02  Peter Bergner  <bergner@vnet.ibm.com>
714 +
715 +       Backport from mainline
716 +       2012-03-02  Peter Bergner  <bergner@vnet.ibm.com>
717 +
718 +       * config/rs6000/vsx.md (vsx_set_<mode>): Reorder operands.
719 +
720 +2012-03-02  Bill Schmidt <wschmidt@linux.vnet.ibm.com>
721 +           Ira Rosen <irar@il.ibm.com>
722 +
723 +       PR tree-optimization/50031
724 +       PR tree-optimization/50969
725 +       * targhooks.c (default_builtin_vectorization_cost): Handle
726 +       vec_promote_demote.
727 +       * target.h (enum vect_cost_for_stmt): Add vec_promote_demote.
728 +       * tree-vect-loop.c (vect_get_single_scalar_iteraion_cost): Handle
729 +       all types of reduction and pattern statements.
730 +       (vect_estimate_min_profitable_iters): Likewise.
731 +       * tree-vect-stmts.c (vect_model_promotion_demotion_cost): New function.
732 +       (vect_model_store_cost): Use vec_perm rather than vector_stmt for
733 +       statement cost.
734 +       (vect_model_load_cost): Likewise.
735 +       (vect_get_load_cost): Likewise; add dump logic for explicit realigns.
736 +       (vectorizable_type_demotion): Call vect_model_promotion_demotion_cost.
737 +       (vectorizable_type_promotion): Likewise.
738 +       * config/spu/spu.c (spu_builtin_vectorization_cost): Handle
739 +       vec_promote_demote.
740 +       * config/i386/i386.c (ix86_builtin_vectorization_cost): Likewise.
741 +       * config/rs6000/rs6000.c (rs6000_builtin_vectorization_cost): Update
742 +       vec_perm for VSX and handle vec_promote_demote.
743 +
744 +2012-03-01  Jakub Jelinek  <jakub@redhat.com>
745 +
746 +       * BASE-VER: Set to 4.6.4.
747 +       * DEV-PHASE: Set to prerelease.
748 +
749  2012-03-01  Release Manager
750  
751         * GCC 4.6.3 released.
752 Index: gcc/testsuite/gcc.target/arm/volatile-bitfields-4.c
753 ===================================================================
754 --- gcc/testsuite/gcc.target/arm/volatile-bitfields-4.c (.../tags/gcc_4_6_3_release)    (revision 0)
755 +++ gcc/testsuite/gcc.target/arm/volatile-bitfields-4.c (.../branches/gcc-4_6-branch)   (revision 190226)
756 @@ -0,0 +1,30 @@
757 +/* { dg-require-effective-target arm_eabi } */
758 +/* { dg-do compile } */
759 +/* { dg-options "-O2" } */
760 +/* { dg-final { scan-assembler-times "ldr\[\\t \]+\[^\n\]*,\[\\t \]*\\\[\[^\n\]*\\\]" 2 } } */
761 +/* { dg-final { scan-assembler-times "str\[\\t \]+\[^\n\]*,\[\\t \]*\\\[\[^\n\]*\\\]" 2 } } */
762 +/* { dg-final { scan-assembler-not "strb" } } */
763 +
764 +struct thing {
765 +  unsigned a: 8;
766 +  unsigned b: 8;
767 +  unsigned c: 8;
768 +  unsigned d: 8;
769 +};
770 +
771 +struct thing2 {
772 +  volatile unsigned a: 8;
773 +  volatile unsigned b: 8;
774 +  volatile unsigned c: 8;
775 +  volatile unsigned d: 8;
776 +};
777 +
778 +void test1(volatile struct thing *t)
779 +{
780 +  t->a = 5;
781 +}
782 +
783 +void test2(struct thing2 *t)
784 +{
785 +  t->a = 5;
786 +}
787 Index: gcc/testsuite/gcc.target/powerpc/cell_builtin-7.c
788 ===================================================================
789 --- gcc/testsuite/gcc.target/powerpc/cell_builtin-7.c   (.../tags/gcc_4_6_3_release)    (revision 0)
790 +++ gcc/testsuite/gcc.target/powerpc/cell_builtin-7.c   (.../branches/gcc-4_6-branch)   (revision 190226)
791 @@ -0,0 +1,48 @@
792 +/* { dg-do compile { target { powerpc*-*-* } } } */
793 +/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
794 +/* { dg-require-effective-target powerpc_altivec_ok } */
795 +/* { dg-options "-O2 -maltivec -mcpu=cell" } */
796 +/* { dg-final { scan-assembler-times "stvrx" 19 } } */
797 +
798 +#include <altivec.h>
799 +
800 +typedef __vector signed char vsc;
801 +typedef __vector signed short vss;
802 +typedef __vector signed int vsi;
803 +typedef __vector unsigned char vuc;
804 +typedef __vector unsigned short vus;
805 +typedef __vector unsigned int vui;
806 +typedef __vector bool char vbc;
807 +typedef __vector bool short vbs;
808 +typedef __vector bool int vbi;
809 +typedef __vector float vsf;
810 +typedef __vector pixel vp;
811 +typedef signed char sc;
812 +typedef signed short ss;
813 +typedef signed int si;
814 +typedef signed long sl;
815 +typedef unsigned char uc;
816 +typedef unsigned short us;
817 +typedef unsigned int ui;
818 +typedef unsigned long ul;
819 +typedef float sf;
820 +
821 +void sc3(vsc v, long a, void *p)    { __builtin_altivec_stvrx (v,a,p); }
822 +void srx01(vsf v, long a, vsf *p)   { __builtin_vec_stvrx (v,a,p); }
823 +void srx02(vsf v, long a, sf *p)    { __builtin_vec_stvrx (v,a,p); }
824 +void srx03(vbi v, long a, vbi *p)   { __builtin_vec_stvrx (v,a,p); }
825 +void srx04(vsi v, long a, vsi *p)   { __builtin_vec_stvrx (v,a,p); }
826 +void srx05(vsi v, long a, si *p)    { __builtin_vec_stvrx (v,a,p); }
827 +void srx06(vui v, long a, vui *p)   { __builtin_vec_stvrx (v,a,p); }
828 +void srx07(vui v, long a, ui *p)    { __builtin_vec_stvrx (v,a,p); }
829 +void srx08(vbs v, long a, vbs *p)   { __builtin_vec_stvrx (v,a,p); }
830 +void srx09(vp v, long a, vp *p)     { __builtin_vec_stvrx (v,a,p); }
831 +void srx10(vss v, long a, vss *p)   { __builtin_vec_stvrx (v,a,p); }
832 +void srx11(vss v, long a, ss *p)    { __builtin_vec_stvrx (v,a,p); }
833 +void srx12(vus v, long a, vus *p)   { __builtin_vec_stvrx (v,a,p); }
834 +void srx13(vus v, long a, us *p)    { __builtin_vec_stvrx (v,a,p); }
835 +void srx14(vbc v, long a, vbc *p)   { __builtin_vec_stvrx (v,a,p); }
836 +void srx15(vsc v, long a, vsc *p)   { __builtin_vec_stvrx (v,a,p); }
837 +void srx16(vsc v, long a, sc *p)    { __builtin_vec_stvrx (v,a,p); }
838 +void srx17(vuc v, long a, vuc *p)   { __builtin_vec_stvrx (v,a,p); }
839 +void srx18(vuc v, long a, uc *p)    { __builtin_vec_stvrx (v,a,p); }
840 Index: gcc/testsuite/gcc.target/powerpc/cell_builtin-8.c
841 ===================================================================
842 --- gcc/testsuite/gcc.target/powerpc/cell_builtin-8.c   (.../tags/gcc_4_6_3_release)    (revision 0)
843 +++ gcc/testsuite/gcc.target/powerpc/cell_builtin-8.c   (.../branches/gcc-4_6-branch)   (revision 190226)
844 @@ -0,0 +1,48 @@
845 +/* { dg-do compile { target { powerpc*-*-* } } } */
846 +/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
847 +/* { dg-require-effective-target powerpc_altivec_ok } */
848 +/* { dg-options "-O2 -maltivec -mcpu=cell" } */
849 +/* { dg-final { scan-assembler-times "stvrxl" 19 } } */
850 +
851 +#include <altivec.h>
852 +
853 +typedef __vector signed char vsc;
854 +typedef __vector signed short vss;
855 +typedef __vector signed int vsi;
856 +typedef __vector unsigned char vuc;
857 +typedef __vector unsigned short vus;
858 +typedef __vector unsigned int vui;
859 +typedef __vector bool char vbc;
860 +typedef __vector bool short vbs;
861 +typedef __vector bool int vbi;
862 +typedef __vector float vsf;
863 +typedef __vector pixel vp;
864 +typedef signed char sc;
865 +typedef signed short ss;
866 +typedef signed int si;
867 +typedef signed long sl;
868 +typedef unsigned char uc;
869 +typedef unsigned short us;
870 +typedef unsigned int ui;
871 +typedef unsigned long ul;
872 +typedef float sf;
873 +
874 +void sc4(vsc v, long a, void *p)    { __builtin_altivec_stvrxl (v,a,p); }
875 +void srxl01(vsf v, long a, vsf *p)  { __builtin_vec_stvrxl (v,a,p); }
876 +void srxl02(vsf v, long a, sf *p)   { __builtin_vec_stvrxl (v,a,p); }
877 +void srxl03(vbi v, long a, vbi *p)  { __builtin_vec_stvrxl (v,a,p); }
878 +void srxl04(vsi v, long a, vsi *p)  { __builtin_vec_stvrxl (v,a,p); }
879 +void srxl05(vsi v, long a, si *p)   { __builtin_vec_stvrxl (v,a,p); }
880 +void srxl06(vui v, long a, vui *p)  { __builtin_vec_stvrxl (v,a,p); }
881 +void srxl07(vui v, long a, ui *p)   { __builtin_vec_stvrxl (v,a,p); }
882 +void srxl08(vbs v, long a, vbs *p)  { __builtin_vec_stvrxl (v,a,p); }
883 +void srxl09(vp v, long a, vp *p)    { __builtin_vec_stvrxl (v,a,p); }
884 +void srxl10(vss v, long a, vss *p)  { __builtin_vec_stvrxl (v,a,p); }
885 +void srxl11(vss v, long a, ss *p)   { __builtin_vec_stvrxl (v,a,p); }
886 +void srxl12(vus v, long a, vus *p)  { __builtin_vec_stvrxl (v,a,p); }
887 +void srxl13(vus v, long a, us *p)   { __builtin_vec_stvrxl (v,a,p); }
888 +void srxl14(vbc v, long a, vbc *p)  { __builtin_vec_stvrxl (v,a,p); }
889 +void srxl15(vsc v, long a, vsc *p)  { __builtin_vec_stvrxl (v,a,p); }
890 +void srxl16(vsc v, long a, sc *p)   { __builtin_vec_stvrxl (v,a,p); }
891 +void srxl17(vuc v, long a, vuc *p)  { __builtin_vec_stvrxl (v,a,p); }
892 +void srxl18(vuc v, long a, uc *p)   { __builtin_vec_stvrxl (v,a,p); }
893 Index: gcc/testsuite/gcc.target/powerpc/pr52775.c
894 ===================================================================
895 --- gcc/testsuite/gcc.target/powerpc/pr52775.c  (.../tags/gcc_4_6_3_release)    (revision 0)
896 +++ gcc/testsuite/gcc.target/powerpc/pr52775.c  (.../branches/gcc-4_6-branch)   (revision 190226)
897 @@ -0,0 +1,16 @@
898 +/* { dg-do compile { target { powerpc*-*-* && ilp32 } } } */
899 +/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
900 +/* { dg-options "-O1 -mcpu=power4" } */
901 +/* { dg-final { scan-assembler-times "fcfid" 2 } } */
902 +
903 +double
904 +int_to_double (int *p)
905 +{
906 +  return (double)*p;
907 +}
908 +
909 +double
910 +long_long_to_double (long long *p)
911 +{
912 +  return (double)*p;
913 +}
914 Index: gcc/testsuite/gcc.target/powerpc/cell_builtin-1.c
915 ===================================================================
916 --- gcc/testsuite/gcc.target/powerpc/cell_builtin-1.c   (.../tags/gcc_4_6_3_release)    (revision 0)
917 +++ gcc/testsuite/gcc.target/powerpc/cell_builtin-1.c   (.../branches/gcc-4_6-branch)   (revision 190226)
918 @@ -0,0 +1,48 @@
919 +/* { dg-do compile { target { powerpc*-*-* } } } */
920 +/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
921 +/* { dg-require-effective-target powerpc_altivec_ok } */
922 +/* { dg-options "-O2 -maltivec -mcpu=cell" } */
923 +/* { dg-final { scan-assembler-times "lvlx" 19 } } */
924 +
925 +#include <altivec.h>
926 +
927 +typedef __vector signed char vsc;
928 +typedef __vector signed short vss;
929 +typedef __vector signed int vsi;
930 +typedef __vector unsigned char vuc;
931 +typedef __vector unsigned short vus;
932 +typedef __vector unsigned int vui;
933 +typedef __vector bool char vbc;
934 +typedef __vector bool short vbs;
935 +typedef __vector bool int vbi;
936 +typedef __vector float vsf;
937 +typedef __vector pixel vp;
938 +typedef signed char sc;
939 +typedef signed short ss;
940 +typedef signed int si;
941 +typedef signed long sl;
942 +typedef unsigned char uc;
943 +typedef unsigned short us;
944 +typedef unsigned int ui;
945 +typedef unsigned long ul;
946 +typedef float sf;
947 +
948 +vsc  lc1(long a, void *p)           { return __builtin_altivec_lvlx (a,p); }
949 +vsf  llx01(long a, vsf *p)          { return __builtin_vec_lvlx (a,p); }
950 +vsf  llx02(long a, sf *p)           { return __builtin_vec_lvlx (a,p); }
951 +vbi  llx03(long a, vbi *p)          { return __builtin_vec_lvlx (a,p); }
952 +vsi  llx04(long a, vsi *p)          { return __builtin_vec_lvlx (a,p); }
953 +vsi  llx05(long a, si *p)           { return __builtin_vec_lvlx (a,p); }
954 +vui  llx06(long a, vui *p)          { return __builtin_vec_lvlx (a,p); }
955 +vui  llx07(long a, ui *p)           { return __builtin_vec_lvlx (a,p); }
956 +vbs  llx08(long a, vbs *p)          { return __builtin_vec_lvlx (a,p); }
957 +vp   llx09(long a, vp *p)           { return __builtin_vec_lvlx (a,p); }
958 +vss  llx10(long a, vss *p)          { return __builtin_vec_lvlx (a,p); }
959 +vss  llx11(long a, ss *p)           { return __builtin_vec_lvlx (a,p); }
960 +vus  llx12(long a, vus *p)          { return __builtin_vec_lvlx (a,p); }
961 +vus  llx13(long a, us *p)           { return __builtin_vec_lvlx (a,p); }
962 +vbc  llx14(long a, vbc *p)          { return __builtin_vec_lvlx (a,p); }
963 +vsc  llx15(long a, vsc *p)          { return __builtin_vec_lvlx (a,p); }
964 +vsc  llx16(long a, sc *p)           { return __builtin_vec_lvlx (a,p); }
965 +vuc  llx17(long a, vuc *p)          { return __builtin_vec_lvlx (a,p); }
966 +vuc  llx18(long a, uc *p)           { return __builtin_vec_lvlx (a,p); }
967 Index: gcc/testsuite/gcc.target/powerpc/pr52457.c
968 ===================================================================
969 --- gcc/testsuite/gcc.target/powerpc/pr52457.c  (.../tags/gcc_4_6_3_release)    (revision 0)
970 +++ gcc/testsuite/gcc.target/powerpc/pr52457.c  (.../branches/gcc-4_6-branch)   (revision 190226)
971 @@ -0,0 +1,34 @@
972 +/* { dg-do run { target { powerpc*-*-linux* } } } */
973 +/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
974 +/* { dg-skip-if "" { powerpc*-*-*spe* } { "*" } { "" } } */
975 +/* { dg-require-effective-target vsx_hw } */
976 +/* { dg-options "-O1 -mcpu=power7" } */
977 +
978 +extern void abort (void);
979 +
980 +typedef long long T;
981 +typedef T vl_t __attribute__((vector_size(2 * sizeof (T))));
982 +
983 +vl_t
984 +buggy_func (T x)
985 +{
986 +  vl_t w;
987 +  T *p = (T *)&w;
988 +  p[0] = p[1] = x;
989 +  return w;
990 +}
991 +
992 +int
993 +main(void)
994 +{
995 +  vl_t rval;
996 +  T *pl;
997 +
998 +  pl = (T *) &rval;
999 +  rval = buggy_func (2);
1000 +
1001 +  if (pl[0] != 2 || pl[1] != 2)
1002 +    abort ();
1003 +
1004 +  return 0;
1005 +}
1006 Index: gcc/testsuite/gcc.target/powerpc/cell_builtin-2.c
1007 ===================================================================
1008 --- gcc/testsuite/gcc.target/powerpc/cell_builtin-2.c   (.../tags/gcc_4_6_3_release)    (revision 0)
1009 +++ gcc/testsuite/gcc.target/powerpc/cell_builtin-2.c   (.../branches/gcc-4_6-branch)   (revision 190226)
1010 @@ -0,0 +1,48 @@
1011 +/* { dg-do compile { target { powerpc*-*-* } } } */
1012 +/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
1013 +/* { dg-require-effective-target powerpc_altivec_ok } */
1014 +/* { dg-options "-O2 -maltivec -mcpu=cell" } */
1015 +/* { dg-final { scan-assembler-times "lvlxl" 19 } } */
1016 +
1017 +#include <altivec.h>
1018 +
1019 +typedef __vector signed char vsc;
1020 +typedef __vector signed short vss;
1021 +typedef __vector signed int vsi;
1022 +typedef __vector unsigned char vuc;
1023 +typedef __vector unsigned short vus;
1024 +typedef __vector unsigned int vui;
1025 +typedef __vector bool char vbc;
1026 +typedef __vector bool short vbs;
1027 +typedef __vector bool int vbi;
1028 +typedef __vector float vsf;
1029 +typedef __vector pixel vp;
1030 +typedef signed char sc;
1031 +typedef signed short ss;
1032 +typedef signed int si;
1033 +typedef signed long sl;
1034 +typedef unsigned char uc;
1035 +typedef unsigned short us;
1036 +typedef unsigned int ui;
1037 +typedef unsigned long ul;
1038 +typedef float sf;
1039 +
1040 +vsc  lc2(long a, void *p)           { return __builtin_altivec_lvlxl (a,p); }
1041 +vsf  llxl01(long a, vsf *p)         { return __builtin_vec_lvlxl (a,p); }
1042 +vsf  llxl02(long a, sf *p)          { return __builtin_vec_lvlxl (a,p); }
1043 +vbi  llxl03(long a, vbi *p)         { return __builtin_vec_lvlxl (a,p); }
1044 +vsi  llxl04(long a, vsi *p)         { return __builtin_vec_lvlxl (a,p); }
1045 +vsi  llxl05(long a, si *p)          { return __builtin_vec_lvlxl (a,p); }
1046 +vui  llxl06(long a, vui *p)         { return __builtin_vec_lvlxl (a,p); }
1047 +vui  llxl07(long a, ui *p)          { return __builtin_vec_lvlxl (a,p); }
1048 +vbs  llxl08(long a, vbs *p)         { return __builtin_vec_lvlxl (a,p); }
1049 +vp   llxl09(long a, vp *p)          { return __builtin_vec_lvlxl (a,p); }
1050 +vss  llxl10(long a, vss *p)         { return __builtin_vec_lvlxl (a,p); }
1051 +vss  llxl11(long a, ss *p)          { return __builtin_vec_lvlxl (a,p); }
1052 +vus  llxl12(long a, vus *p)         { return __builtin_vec_lvlxl (a,p); }
1053 +vus  llxl13(long a, us *p)          { return __builtin_vec_lvlxl (a,p); }
1054 +vbc  llxl14(long a, vbc *p)         { return __builtin_vec_lvlxl (a,p); }
1055 +vsc  llxl15(long a, vsc *p)         { return __builtin_vec_lvlxl (a,p); }
1056 +vsc  llxl16(long a, sc *p)          { return __builtin_vec_lvlxl (a,p); }
1057 +vuc  llxl17(long a, vuc *p)         { return __builtin_vec_lvlxl (a,p); }
1058 +vuc  llxl18(long a, uc *p)          { return __builtin_vec_lvlxl (a,p); }
1059 Index: gcc/testsuite/gcc.target/powerpc/cell_builtin-3.c
1060 ===================================================================
1061 --- gcc/testsuite/gcc.target/powerpc/cell_builtin-3.c   (.../tags/gcc_4_6_3_release)    (revision 0)
1062 +++ gcc/testsuite/gcc.target/powerpc/cell_builtin-3.c   (.../branches/gcc-4_6-branch)   (revision 190226)
1063 @@ -0,0 +1,48 @@
1064 +/* { dg-do compile { target { powerpc*-*-* } } } */
1065 +/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
1066 +/* { dg-require-effective-target powerpc_altivec_ok } */
1067 +/* { dg-options "-O2 -maltivec -mcpu=cell" } */
1068 +/* { dg-final { scan-assembler-times "lvrx" 19 } } */
1069 +
1070 +#include <altivec.h>
1071 +
1072 +typedef __vector signed char vsc;
1073 +typedef __vector signed short vss;
1074 +typedef __vector signed int vsi;
1075 +typedef __vector unsigned char vuc;
1076 +typedef __vector unsigned short vus;
1077 +typedef __vector unsigned int vui;
1078 +typedef __vector bool char vbc;
1079 +typedef __vector bool short vbs;
1080 +typedef __vector bool int vbi;
1081 +typedef __vector float vsf;
1082 +typedef __vector pixel vp;
1083 +typedef signed char sc;
1084 +typedef signed short ss;
1085 +typedef signed int si;
1086 +typedef signed long sl;
1087 +typedef unsigned char uc;
1088 +typedef unsigned short us;
1089 +typedef unsigned int ui;
1090 +typedef unsigned long ul;
1091 +typedef float sf;
1092 +
1093 +vsc  lc3(long a, void *p)           { return __builtin_altivec_lvrx (a,p); }
1094 +vsf  lrx01(long a, vsf *p)          { return __builtin_vec_lvrx (a,p); }
1095 +vsf  lrx02(long a, sf *p)           { return __builtin_vec_lvrx (a,p); }
1096 +vbi  lrx03(long a, vbi *p)          { return __builtin_vec_lvrx (a,p); }
1097 +vsi  lrx04(long a, vsi *p)          { return __builtin_vec_lvrx (a,p); }
1098 +vsi  lrx05(long a, si *p)           { return __builtin_vec_lvrx (a,p); }
1099 +vui  lrx06(long a, vui *p)          { return __builtin_vec_lvrx (a,p); }
1100 +vui  lrx07(long a, ui *p)           { return __builtin_vec_lvrx (a,p); }
1101 +vbs  lrx08(long a, vbs *p)          { return __builtin_vec_lvrx (a,p); }
1102 +vp   lrx09(long a, vp *p)           { return __builtin_vec_lvrx (a,p); }
1103 +vss  lrx10(long a, vss *p)          { return __builtin_vec_lvrx (a,p); }
1104 +vss  lrx11(long a, ss *p)           { return __builtin_vec_lvrx (a,p); }
1105 +vus  lrx12(long a, vus *p)          { return __builtin_vec_lvrx (a,p); }
1106 +vus  lrx13(long a, us *p)           { return __builtin_vec_lvrx (a,p); }
1107 +vbc  lrx14(long a, vbc *p)          { return __builtin_vec_lvrx (a,p); }
1108 +vsc  lrx15(long a, vsc *p)          { return __builtin_vec_lvrx (a,p); }
1109 +vsc  lrx16(long a, sc *p)           { return __builtin_vec_lvrx (a,p); }
1110 +vuc  lrx17(long a, vuc *p)          { return __builtin_vec_lvrx (a,p); }
1111 +vuc  lrx18(long a, uc *p)           { return __builtin_vec_lvrx (a,p); }
1112 Index: gcc/testsuite/gcc.target/powerpc/cell_builtin-4.c
1113 ===================================================================
1114 --- gcc/testsuite/gcc.target/powerpc/cell_builtin-4.c   (.../tags/gcc_4_6_3_release)    (revision 0)
1115 +++ gcc/testsuite/gcc.target/powerpc/cell_builtin-4.c   (.../branches/gcc-4_6-branch)   (revision 190226)
1116 @@ -0,0 +1,48 @@
1117 +/* { dg-do compile { target { powerpc*-*-* } } } */
1118 +/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
1119 +/* { dg-require-effective-target powerpc_altivec_ok } */
1120 +/* { dg-options "-O2 -maltivec -mcpu=cell" } */
1121 +/* { dg-final { scan-assembler-times "lvrxl" 19 } } */
1122 +
1123 +#include <altivec.h>
1124 +
1125 +typedef __vector signed char vsc;
1126 +typedef __vector signed short vss;
1127 +typedef __vector signed int vsi;
1128 +typedef __vector unsigned char vuc;
1129 +typedef __vector unsigned short vus;
1130 +typedef __vector unsigned int vui;
1131 +typedef __vector bool char vbc;
1132 +typedef __vector bool short vbs;
1133 +typedef __vector bool int vbi;
1134 +typedef __vector float vsf;
1135 +typedef __vector pixel vp;
1136 +typedef signed char sc;
1137 +typedef signed short ss;
1138 +typedef signed int si;
1139 +typedef signed long sl;
1140 +typedef unsigned char uc;
1141 +typedef unsigned short us;
1142 +typedef unsigned int ui;
1143 +typedef unsigned long ul;
1144 +typedef float sf;
1145 +
1146 +vsc  lc4(long a, void *p)           { return __builtin_altivec_lvrxl (a,p); }
1147 +vsf  lrxl01(long a, vsf *p)         { return __builtin_vec_lvrxl (a,p); }
1148 +vsf  lrxl02(long a, sf *p)          { return __builtin_vec_lvrxl (a,p); }
1149 +vbi  lrxl03(long a, vbi *p)         { return __builtin_vec_lvrxl (a,p); }
1150 +vsi  lrxl04(long a, vsi *p)         { return __builtin_vec_lvrxl (a,p); }
1151 +vsi  lrxl05(long a, si *p)          { return __builtin_vec_lvrxl (a,p); }
1152 +vui  lrxl06(long a, vui *p)         { return __builtin_vec_lvrxl (a,p); }
1153 +vui  lrxl07(long a, ui *p)          { return __builtin_vec_lvrxl (a,p); }
1154 +vbs  lrxl08(long a, vbs *p)         { return __builtin_vec_lvrxl (a,p); }
1155 +vp   lrxl09(long a, vp *p)          { return __builtin_vec_lvrxl (a,p); }
1156 +vss  lrxl10(long a, vss *p)         { return __builtin_vec_lvrxl (a,p); }
1157 +vss  lrxl11(long a, ss *p)          { return __builtin_vec_lvrxl (a,p); }
1158 +vus  lrxl12(long a, vus *p)         { return __builtin_vec_lvrxl (a,p); }
1159 +vus  lrxl13(long a, us *p)          { return __builtin_vec_lvrxl (a,p); }
1160 +vbc  lrxl14(long a, vbc *p)         { return __builtin_vec_lvrxl (a,p); }
1161 +vsc  lrxl15(long a, vsc *p)         { return __builtin_vec_lvrxl (a,p); }
1162 +vsc  lrxl16(long a, sc *p)          { return __builtin_vec_lvrxl (a,p); }
1163 +vuc  lrxl17(long a, vuc *p)         { return __builtin_vec_lvrxl (a,p); }
1164 +vuc  lrxl18(long a, uc *p)          { return __builtin_vec_lvrxl (a,p); }
1165 Index: gcc/testsuite/gcc.target/powerpc/cell_builtin-5.c
1166 ===================================================================
1167 --- gcc/testsuite/gcc.target/powerpc/cell_builtin-5.c   (.../tags/gcc_4_6_3_release)    (revision 0)
1168 +++ gcc/testsuite/gcc.target/powerpc/cell_builtin-5.c   (.../branches/gcc-4_6-branch)   (revision 190226)
1169 @@ -0,0 +1,48 @@
1170 +/* { dg-do compile { target { powerpc*-*-* } } } */
1171 +/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
1172 +/* { dg-require-effective-target powerpc_altivec_ok } */
1173 +/* { dg-options "-O2 -maltivec -mcpu=cell" } */
1174 +/* { dg-final { scan-assembler-times "stvlx" 19 } } */
1175 +
1176 +#include <altivec.h>
1177 +
1178 +typedef __vector signed char vsc;
1179 +typedef __vector signed short vss;
1180 +typedef __vector signed int vsi;
1181 +typedef __vector unsigned char vuc;
1182 +typedef __vector unsigned short vus;
1183 +typedef __vector unsigned int vui;
1184 +typedef __vector bool char vbc;
1185 +typedef __vector bool short vbs;
1186 +typedef __vector bool int vbi;
1187 +typedef __vector float vsf;
1188 +typedef __vector pixel vp;
1189 +typedef signed char sc;
1190 +typedef signed short ss;
1191 +typedef signed int si;
1192 +typedef signed long sl;
1193 +typedef unsigned char uc;
1194 +typedef unsigned short us;
1195 +typedef unsigned int ui;
1196 +typedef unsigned long ul;
1197 +typedef float sf;
1198 +
1199 +void sc1(vsc v, long a, void *p)    { __builtin_altivec_stvlx (v,a,p); }
1200 +void slx01(vsf v, long a, vsf *p)   { __builtin_vec_stvlx (v,a,p); }
1201 +void slx02(vsf v, long a, sf *p)    { __builtin_vec_stvlx (v,a,p); }
1202 +void slx03(vbi v, long a, vbi *p)   { __builtin_vec_stvlx (v,a,p); }
1203 +void slx04(vsi v, long a, vsi *p)   { __builtin_vec_stvlx (v,a,p); }
1204 +void slx05(vsi v, long a, si *p)    { __builtin_vec_stvlx (v,a,p); }
1205 +void slx06(vui v, long a, vui *p)   { __builtin_vec_stvlx (v,a,p); }
1206 +void slx07(vui v, long a, ui *p)    { __builtin_vec_stvlx (v,a,p); }
1207 +void slx08(vbs v, long a, vbs *p)   { __builtin_vec_stvlx (v,a,p); }
1208 +void slx09(vp v, long a, vp *p)     { __builtin_vec_stvlx (v,a,p); }
1209 +void slx10(vss v, long a, vss *p)   { __builtin_vec_stvlx (v,a,p); }
1210 +void slx11(vss v, long a, ss *p)    { __builtin_vec_stvlx (v,a,p); }
1211 +void slx12(vus v, long a, vus *p)   { __builtin_vec_stvlx (v,a,p); }
1212 +void slx13(vus v, long a, us *p)    { __builtin_vec_stvlx (v,a,p); }
1213 +void slx14(vbc v, long a, vbc *p)   { __builtin_vec_stvlx (v,a,p); }
1214 +void slx15(vsc v, long a, vsc *p)   { __builtin_vec_stvlx (v,a,p); }
1215 +void slx16(vsc v, long a, sc *p)    { __builtin_vec_stvlx (v,a,p); }
1216 +void slx17(vuc v, long a, vuc *p)   { __builtin_vec_stvlx (v,a,p); }
1217 +void slx18(vuc v, long a, uc *p)    { __builtin_vec_stvlx (v,a,p); }
1218 Index: gcc/testsuite/gcc.target/powerpc/pr53199.c
1219 ===================================================================
1220 --- gcc/testsuite/gcc.target/powerpc/pr53199.c  (.../tags/gcc_4_6_3_release)    (revision 0)
1221 +++ gcc/testsuite/gcc.target/powerpc/pr53199.c  (.../branches/gcc-4_6-branch)   (revision 190226)
1222 @@ -0,0 +1,50 @@
1223 +/* { dg-do compile { target { powerpc*-*-* } } } */
1224 +/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
1225 +/* { dg-options "-O2 -mcpu=power6 -mavoid-indexed-addresses" } */
1226 +/* { dg-final { scan-assembler-times "lwbrx" 6 } } */
1227 +/* { dg-final { scan-assembler-times "stwbrx" 6 } } */
1228 +
1229 +/* PR 51399: bswap gets an error if -mavoid-indexed-addresses was used in
1230 +   creating the two lwbrx instructions.  */
1231 +
1232 +long long
1233 +load64_reverse_1 (long long *p)
1234 +{
1235 +  return __builtin_bswap64 (*p);
1236 +}
1237 +
1238 +long long
1239 +load64_reverse_2 (long long *p)
1240 +{
1241 +  return __builtin_bswap64 (p[1]);
1242 +}
1243 +
1244 +long long
1245 +load64_reverse_3 (long long *p, int i)
1246 +{
1247 +  return __builtin_bswap64 (p[i]);
1248 +}
1249 +
1250 +void
1251 +store64_reverse_1 (long long *p, long long x)
1252 +{
1253 +  *p = __builtin_bswap64 (x);
1254 +}
1255 +
1256 +void
1257 +store64_reverse_2 (long long *p, long long x)
1258 +{
1259 +  p[1] = __builtin_bswap64 (x);
1260 +}
1261 +
1262 +void
1263 +store64_reverse_3 (long long *p, long long x, int i)
1264 +{
1265 +  p[i] = __builtin_bswap64 (x);
1266 +}
1267 +
1268 +long long
1269 +reg_reverse (long long x)
1270 +{
1271 +  return __builtin_bswap64 (x);
1272 +}
1273 Index: gcc/testsuite/gcc.target/powerpc/cell_builtin-6.c
1274 ===================================================================
1275 --- gcc/testsuite/gcc.target/powerpc/cell_builtin-6.c   (.../tags/gcc_4_6_3_release)    (revision 0)
1276 +++ gcc/testsuite/gcc.target/powerpc/cell_builtin-6.c   (.../branches/gcc-4_6-branch)   (revision 190226)
1277 @@ -0,0 +1,48 @@
1278 +/* { dg-do compile { target { powerpc*-*-* } } } */
1279 +/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
1280 +/* { dg-require-effective-target powerpc_altivec_ok } */
1281 +/* { dg-options "-O2 -maltivec -mcpu=cell" } */
1282 +/* { dg-final { scan-assembler-times "stvlxl" 19 } } */
1283 +
1284 +#include <altivec.h>
1285 +
1286 +typedef __vector signed char vsc;
1287 +typedef __vector signed short vss;
1288 +typedef __vector signed int vsi;
1289 +typedef __vector unsigned char vuc;
1290 +typedef __vector unsigned short vus;
1291 +typedef __vector unsigned int vui;
1292 +typedef __vector bool char vbc;
1293 +typedef __vector bool short vbs;
1294 +typedef __vector bool int vbi;
1295 +typedef __vector float vsf;
1296 +typedef __vector pixel vp;
1297 +typedef signed char sc;
1298 +typedef signed short ss;
1299 +typedef signed int si;
1300 +typedef signed long sl;
1301 +typedef unsigned char uc;
1302 +typedef unsigned short us;
1303 +typedef unsigned int ui;
1304 +typedef unsigned long ul;
1305 +typedef float sf;
1306 +
1307 +void sc2(vsc v, long a, void *p)    { __builtin_altivec_stvlxl (v,a,p); }
1308 +void slxl01(vsf v, long a, vsf *p)  { __builtin_vec_stvlxl (v,a,p); }
1309 +void slxl02(vsf v, long a, sf *p)   { __builtin_vec_stvlxl (v,a,p); }
1310 +void slxl03(vbi v, long a, vbi *p)  { __builtin_vec_stvlxl (v,a,p); }
1311 +void slxl04(vsi v, long a, vsi *p)  { __builtin_vec_stvlxl (v,a,p); }
1312 +void slxl05(vsi v, long a, si *p)   { __builtin_vec_stvlxl (v,a,p); }
1313 +void slxl06(vui v, long a, vui *p)  { __builtin_vec_stvlxl (v,a,p); }
1314 +void slxl07(vui v, long a, ui *p)   { __builtin_vec_stvlxl (v,a,p); }
1315 +void slxl08(vbs v, long a, vbs *p)  { __builtin_vec_stvlxl (v,a,p); }
1316 +void slxl09(vp v, long a, vp *p)    { __builtin_vec_stvlxl (v,a,p); }
1317 +void slxl10(vss v, long a, vss *p)  { __builtin_vec_stvlxl (v,a,p); }
1318 +void slxl11(vss v, long a, ss *p)   { __builtin_vec_stvlxl (v,a,p); }
1319 +void slxl12(vus v, long a, vus *p)  { __builtin_vec_stvlxl (v,a,p); }
1320 +void slxl13(vus v, long a, us *p)   { __builtin_vec_stvlxl (v,a,p); }
1321 +void slxl14(vbc v, long a, vbc *p)  { __builtin_vec_stvlxl (v,a,p); }
1322 +void slxl15(vsc v, long a, vsc *p)  { __builtin_vec_stvlxl (v,a,p); }
1323 +void slxl16(vsc v, long a, sc *p)   { __builtin_vec_stvlxl (v,a,p); }
1324 +void slxl17(vuc v, long a, vuc *p)  { __builtin_vec_stvlxl (v,a,p); }
1325 +void slxl18(vuc v, long a, uc *p)   { __builtin_vec_stvlxl (v,a,p); }
1326 Index: gcc/testsuite/gcc.target/i386/avx256-unaligned-load-1.c
1327 ===================================================================
1328 --- gcc/testsuite/gcc.target/i386/avx256-unaligned-load-1.c     (.../tags/gcc_4_6_3_release)    (revision 190226)
1329 +++ gcc/testsuite/gcc.target/i386/avx256-unaligned-load-1.c     (.../branches/gcc-4_6-branch)   (revision 190226)
1330 @@ -14,6 +14,6 @@
1331      c[i] = a[i] * b[i+3];
1332  }
1333  
1334 -/* { dg-final { scan-assembler-not "\\*avx_movups256/1" } } */
1335 -/* { dg-final { scan-assembler "\\*avx_movups/1" } } */
1336 +/* { dg-final { scan-assembler-not "avx_movups256/1" } } */
1337 +/* { dg-final { scan-assembler "avx_movups/1" } } */
1338  /* { dg-final { scan-assembler "vinsertf128" } } */
1339 Index: gcc/testsuite/gcc.target/i386/avx256-unaligned-load-3.c
1340 ===================================================================
1341 --- gcc/testsuite/gcc.target/i386/avx256-unaligned-load-3.c     (.../tags/gcc_4_6_3_release)    (revision 190226)
1342 +++ gcc/testsuite/gcc.target/i386/avx256-unaligned-load-3.c     (.../branches/gcc-4_6-branch)   (revision 190226)
1343 @@ -14,6 +14,6 @@
1344      c[i] = a[i] * b[i+3];
1345  }
1346  
1347 -/* { dg-final { scan-assembler-not "\\*avx_movupd256/1" } } */
1348 -/* { dg-final { scan-assembler "\\*avx_movupd/1" } } */
1349 +/* { dg-final { scan-assembler-not "avx_movupd256/1" } } */
1350 +/* { dg-final { scan-assembler "avx_movupd/1" } } */
1351  /* { dg-final { scan-assembler "vinsertf128" } } */
1352 Index: gcc/testsuite/gcc.target/i386/avx256-unaligned-store-1.c
1353 ===================================================================
1354 --- gcc/testsuite/gcc.target/i386/avx256-unaligned-store-1.c    (.../tags/gcc_4_6_3_release)    (revision 190226)
1355 +++ gcc/testsuite/gcc.target/i386/avx256-unaligned-store-1.c    (.../branches/gcc-4_6-branch)   (revision 190226)
1356 @@ -17,6 +17,6 @@
1357      d[i] = c[i] * 20.0;
1358  }
1359  
1360 -/* { dg-final { scan-assembler-not "\\*avx_movups256/2" } } */
1361 +/* { dg-final { scan-assembler-not "avx_movups256/2" } } */
1362  /* { dg-final { scan-assembler "movups.*\\*avx_movv4sf_internal/3" } } */
1363  /* { dg-final { scan-assembler "vextractf128" } } */
1364 Index: gcc/testsuite/gcc.target/i386/avx256-unaligned-store-3.c
1365 ===================================================================
1366 --- gcc/testsuite/gcc.target/i386/avx256-unaligned-store-3.c    (.../tags/gcc_4_6_3_release)    (revision 190226)
1367 +++ gcc/testsuite/gcc.target/i386/avx256-unaligned-store-3.c    (.../branches/gcc-4_6-branch)   (revision 190226)
1368 @@ -17,6 +17,6 @@
1369      d[i] = c[i] * 20.0;
1370  }
1371  
1372 -/* { dg-final { scan-assembler-not "\\*avx_movupd256/2" } } */
1373 +/* { dg-final { scan-assembler-not "avx_movupd256/2" } } */
1374  /* { dg-final { scan-assembler "movupd.*\\*avx_movv2df_internal/3" } } */
1375  /* { dg-final { scan-assembler "vextractf128" } } */
1376 Index: gcc/testsuite/gcc.target/i386/avx256-unaligned-load-2.c
1377 ===================================================================
1378 --- gcc/testsuite/gcc.target/i386/avx256-unaligned-load-2.c     (.../tags/gcc_4_6_3_release)    (revision 190226)
1379 +++ gcc/testsuite/gcc.target/i386/avx256-unaligned-load-2.c     (.../branches/gcc-4_6-branch)   (revision 190226)
1380 @@ -24,6 +24,6 @@
1381      }
1382  }
1383  
1384 -/* { dg-final { scan-assembler-not "\\*avx_movdqu256/1" } } */
1385 -/* { dg-final { scan-assembler "\\*avx_movdqu/1" } } */
1386 +/* { dg-final { scan-assembler-not "avx_movdqu256/1" } } */
1387 +/* { dg-final { scan-assembler "avx_movdqu/1" } } */
1388  /* { dg-final { scan-assembler "vinsertf128" } } */
1389 Index: gcc/testsuite/gcc.target/i386/pr53416.c
1390 ===================================================================
1391 --- gcc/testsuite/gcc.target/i386/pr53416.c     (.../tags/gcc_4_6_3_release)    (revision 0)
1392 +++ gcc/testsuite/gcc.target/i386/pr53416.c     (.../branches/gcc-4_6-branch)   (revision 190226)
1393 @@ -0,0 +1,17 @@
1394 +/* PR target/53416 */
1395 +/* { dg-options "-O2 -mrdrnd" } */
1396 +
1397 +int test (void)
1398 +{
1399 +  unsigned int number = 0;
1400 +  int result0, result1, result2, result3;
1401 +
1402 +  result0 = __builtin_ia32_rdrand32_step (&number);
1403 +  result1 = __builtin_ia32_rdrand32_step (&number);
1404 +  result2 = __builtin_ia32_rdrand32_step (&number);
1405 +  result3 = __builtin_ia32_rdrand32_step (&number);
1406 +
1407 +  return result0 + result1 +result2 + result3;
1408 +}
1409 +
1410 +/* { dg-final { scan-assembler-times "rdrand" 4 } } */
1411 Index: gcc/testsuite/gcc.target/i386/avx256-unaligned-load-4.c
1412 ===================================================================
1413 --- gcc/testsuite/gcc.target/i386/avx256-unaligned-load-4.c     (.../tags/gcc_4_6_3_release)    (revision 190226)
1414 +++ gcc/testsuite/gcc.target/i386/avx256-unaligned-load-4.c     (.../branches/gcc-4_6-branch)   (revision 190226)
1415 @@ -14,6 +14,6 @@
1416      b[i] = a[i+3] * 2;
1417  }
1418  
1419 -/* { dg-final { scan-assembler "\\*avx_movups256/1" } } */
1420 -/* { dg-final { scan-assembler-not "\\*avx_movups/1" } } */
1421 +/* { dg-final { scan-assembler "avx_movups256/1" } } */
1422 +/* { dg-final { scan-assembler-not "avx_movups/1" } } */
1423  /* { dg-final { scan-assembler-not "vinsertf128" } } */
1424 Index: gcc/testsuite/gcc.target/i386/avx256-unaligned-store-2.c
1425 ===================================================================
1426 --- gcc/testsuite/gcc.target/i386/avx256-unaligned-store-2.c    (.../tags/gcc_4_6_3_release)    (revision 190226)
1427 +++ gcc/testsuite/gcc.target/i386/avx256-unaligned-store-2.c    (.../branches/gcc-4_6-branch)   (revision 190226)
1428 @@ -24,6 +24,6 @@
1429      }
1430  }
1431  
1432 -/* { dg-final { scan-assembler-not "\\*avx_movdqu256/2" } } */
1433 +/* { dg-final { scan-assembler-not "avx_movdqu256/2" } } */
1434  /* { dg-final { scan-assembler "movdqu.*\\*avx_movv16qi_internal/3" } } */
1435  /* { dg-final { scan-assembler "vextractf128" } } */
1436 Index: gcc/testsuite/gcc.target/i386/avx256-unaligned-store-4.c
1437 ===================================================================
1438 --- gcc/testsuite/gcc.target/i386/avx256-unaligned-store-4.c    (.../tags/gcc_4_6_3_release)    (revision 190226)
1439 +++ gcc/testsuite/gcc.target/i386/avx256-unaligned-store-4.c    (.../branches/gcc-4_6-branch)   (revision 190226)
1440 @@ -14,7 +14,7 @@
1441      b[i+3] = a[i] * c[i];
1442  }
1443  
1444 -/* { dg-final { scan-assembler "\\*avx_movups256/2" } } */
1445 -/* { dg-final { scan-assembler-not "\\*avx_movups/2" } } */
1446 +/* { dg-final { scan-assembler "avx_movups256/2" } } */
1447 +/* { dg-final { scan-assembler-not "avx_movups/2" } } */
1448  /* { dg-final { scan-assembler-not "\\*avx_movv4sf_internal/3" } } */
1449  /* { dg-final { scan-assembler-not "vextractf128" } } */
1450 Index: gcc/testsuite/gcc.target/i386/pr52736.c
1451 ===================================================================
1452 --- gcc/testsuite/gcc.target/i386/pr52736.c     (.../tags/gcc_4_6_3_release)    (revision 0)
1453 +++ gcc/testsuite/gcc.target/i386/pr52736.c     (.../branches/gcc-4_6-branch)   (revision 190226)
1454 @@ -0,0 +1,29 @@
1455 +/* PR target/52736 */
1456 +/* { dg-do run } */
1457 +/* { dg-options "-O1 -msse2" } */
1458 +/* { dg-require-effective-target sse2_runtime } */
1459 +
1460 +#include <x86intrin.h>
1461 +
1462 +typedef double D __attribute__((may_alias));
1463 +__attribute__((aligned(16))) static const double r[4] = { 1., 5., 1., 3. };
1464 +
1465 +__attribute__((noinline, noclone))
1466 +void
1467 +foo (int x)
1468 +{
1469 +  asm volatile ("" : "+g" (x) : : "memory");
1470 +  if (x != 3)
1471 +    __builtin_abort ();
1472 +}
1473 +
1474 +int
1475 +main ()
1476 +{
1477 +  __m128d t = _mm_set1_pd (5.);
1478 +  ((D *)(&t))[0] = 1.;
1479 +  foo (_mm_movemask_pd (_mm_cmpeq_pd (t, _mm_load_pd (&r[0]))));
1480 +  ((D *)(&t))[1] = 3.;
1481 +  foo (_mm_movemask_pd (_mm_cmpeq_pd (t, _mm_load_pd (&r[2]))));
1482 +  return 0;
1483 +}
1484 Index: gcc/testsuite/gfortran.dg/init_flag_10.f90
1485 ===================================================================
1486 --- gcc/testsuite/gfortran.dg/init_flag_10.f90  (.../tags/gcc_4_6_3_release)    (revision 0)
1487 +++ gcc/testsuite/gfortran.dg/init_flag_10.f90  (.../branches/gcc-4_6-branch)   (revision 190226)
1488 @@ -0,0 +1,43 @@
1489 +! { dg-do run }
1490 +! { dg-options "-finit-real=NAN" }
1491 +! { dg-add-options ieee }
1492 +! { dg-skip-if "NaN not supported" { spu-*-* } { "*" } { "" } }
1493 +!
1494 +! PR fortran/50619
1495 +!
1496 +! Contributed by Fred Krogh
1497 +!
1498 +! The NaN initialization used to set the associate name to NaN!
1499 +!
1500 +
1501 +module testa2
1502 +type, public ::  test_ty
1503 +  real :: rmult = 1.0e0
1504 +end type test_ty
1505 +
1506 +contains
1507 +  subroutine test(e, var1)
1508 +    type(test_ty) :: e
1509 +    real :: var1, var2 ! Should get NaN initialized
1510 +
1511 +    ! Should be the default value
1512 +    if (e%rmult /= 1.0) call abort ()
1513 +
1514 +    ! Check that NaN initialization is really turned on
1515 +    if (var1 == var1) call abort () 
1516 +    if (var2 == var2) call abort () 
1517 +
1518 +    ! The following was failing:
1519 +    associate (rmult=>e%rmult)
1520 +      if (e%rmult /= 1.0) call abort ()
1521 +    end associate
1522 +  end subroutine test
1523 +end module testa2
1524 +
1525 +program testa1
1526 +  use testa2
1527 +  type(test_ty) :: e
1528 +  real :: var1 ! Should get NaN initialized
1529 +  call test(e, var1)
1530 +  stop
1531 +end program testa1
1532 Index: gcc/testsuite/gfortran.dg/intrinsic_8.f90
1533 ===================================================================
1534 --- gcc/testsuite/gfortran.dg/intrinsic_8.f90   (.../tags/gcc_4_6_3_release)    (revision 0)
1535 +++ gcc/testsuite/gfortran.dg/intrinsic_8.f90   (.../branches/gcc-4_6-branch)   (revision 190226)
1536 @@ -0,0 +1,23 @@
1537 +! { dg-do compile }
1538 +!
1539 +! PR fortran/52452
1540 +!
1541 +! Contributed by Roger Ferrer Ibanez
1542 +!
1543 +PROGRAM test_etime
1544 +    IMPLICIT NONE
1545 +    INTRINSIC :: etime
1546 +    REAL(4) :: tarray(1:2)
1547 +    REAL(4) :: result
1548 +
1549 +    CALL etime(tarray, result)
1550 +END PROGRAM test_etime
1551 +
1552 +subroutine test_etime2
1553 +    IMPLICIT NONE
1554 +    INTRINSIC :: etime
1555 +    REAL(4) :: tarray(1:2)
1556 +    REAL(4) :: result
1557 +
1558 +    result = etime(tarray)
1559 +END subroutine test_etime2
1560 Index: gcc/testsuite/gfortran.dg/optional_absent_2.f90
1561 ===================================================================
1562 --- gcc/testsuite/gfortran.dg/optional_absent_2.f90     (.../tags/gcc_4_6_3_release)    (revision 0)
1563 +++ gcc/testsuite/gfortran.dg/optional_absent_2.f90     (.../branches/gcc-4_6-branch)   (revision 190226)
1564 @@ -0,0 +1,53 @@
1565 +! { dg-do run }
1566 +!
1567 +! PR fortran/51758
1568 +!
1569 +! Contributed by Mikael Morin
1570 +!
1571 +! Check whether passing NULL() to an elemental procedure works,
1572 +! where NULL() denotes an absent optional argument.
1573 +!
1574 +program p
1575 +
1576 +  integer :: a(2)
1577 +  integer :: b
1578 +
1579 +  a = 0
1580 +  a = foo((/ 1, 1 /), null())
1581 +!  print *, a
1582 +  if (any(a /= 2)) call abort
1583 +
1584 +  a = 0
1585 +  a = bar((/ 1, 1 /), null())
1586 +!  print *, a
1587 +  if (any(a /= 2)) call abort
1588 +
1589 +  b = 0
1590 +  b = bar(1, null())
1591 +!  print *, b
1592 +  if (b /= 2) call abort
1593 +
1594 +contains
1595 +
1596 +  function foo(a, b)
1597 +    integer           :: a(:)
1598 +    integer, optional :: b(:)
1599 +    integer           :: foo(size(a))
1600 +
1601 +    if (present(b)) call abort
1602 +
1603 +    foo = 2
1604 +  end function foo
1605 +
1606 +  elemental function bar(a, b)
1607 +    integer, intent(in)           :: a
1608 +    integer, intent(in), optional :: b
1609 +    integer                       :: bar
1610 +
1611 +    bar = 2
1612 +
1613 +    if (present(b)) bar = 1
1614 +
1615 +  end function bar
1616 +
1617 +end program p
1618 Index: gcc/testsuite/gfortran.dg/save_4.f90
1619 ===================================================================
1620 --- gcc/testsuite/gfortran.dg/save_4.f90        (.../tags/gcc_4_6_3_release)    (revision 0)
1621 +++ gcc/testsuite/gfortran.dg/save_4.f90        (.../branches/gcc-4_6-branch)   (revision 190226)
1622 @@ -0,0 +1,13 @@
1623 +! { dg-do compile }
1624 +! { dg-options "-std=f2003" }
1625 +!
1626 +! PR fortran/53597
1627 +!
1628 +MODULE somemodule
1629 +  IMPLICIT NONE
1630 +  TYPE sometype
1631 +    INTEGER :: i
1632 +    DOUBLE PRECISION, POINTER, DIMENSION(:,:) :: coef => NULL()
1633 +  END TYPE sometype
1634 +  TYPE(sometype) :: somevariable ! { dg-error "Fortran 2008: Implied SAVE for module variable 'somevariable' at .1., needed due to the default initialization" }
1635 +END MODULE somemodule
1636 Index: gcc/testsuite/gfortran.dg/proc_ptr_34.f90
1637 ===================================================================
1638 --- gcc/testsuite/gfortran.dg/proc_ptr_34.f90   (.../tags/gcc_4_6_3_release)    (revision 0)
1639 +++ gcc/testsuite/gfortran.dg/proc_ptr_34.f90   (.../branches/gcc-4_6-branch)   (revision 190226)
1640 @@ -0,0 +1,79 @@
1641 +! { dg-do compile }
1642 +!
1643 +! PR fortran/52469
1644 +!
1645 +! This was failing as the DECL of the proc pointer "func"
1646 +! was used for the interface of the proc-pointer component "my_f_ptr"
1647 +! rather than the decl of the proc-pointer target
1648 +!
1649 +! Contributed by palott@gmail.com
1650 +!
1651 +
1652 +module ExampleFuncs
1653 +  implicit none
1654 +
1655 +  ! NOTE: "func" is a procedure pointer!
1656 +  pointer :: func
1657 +  interface
1658 +     function func (z)
1659 +        real :: func
1660 +        real, intent (in) :: z
1661 +     end function func
1662 +  end interface
1663 +
1664 +  type Contains_f_ptr
1665 +     procedure (func), pointer, nopass :: my_f_ptr
1666 +  end type Contains_f_ptr
1667 +contains
1668 +
1669 +function f1 (x)
1670 +  real :: f1
1671 +  real, intent (in) :: x
1672 +
1673 +  f1 = 2.0 * x
1674 +
1675 +  return
1676 +end function f1
1677 +
1678 +function f2 (x)
1679 +   real :: f2
1680 +   real, intent (in) :: x
1681 +
1682 +   f2 = 3.0 * x**2
1683 +
1684 +   return
1685 +end function f2
1686 +
1687 +function fancy (func, x)
1688 +   real :: fancy
1689 +   real, intent (in) :: x
1690 +
1691 +   interface AFunc
1692 +      function func (y)
1693 +         real :: func
1694 +         real, intent (in) ::y
1695 +      end function func
1696 +   end interface AFunc
1697 +
1698 +   fancy = func (x) + 3.3 * x
1699 +end function fancy
1700 +
1701 +end module  ExampleFuncs
1702 +
1703 +
1704 +program test_proc_ptr
1705 +  use ExampleFuncs
1706 +  implicit none
1707 +
1708 +  type (Contains_f_ptr), dimension (2) :: NewType
1709
1710 +  !NewType(1) % my_f_ptr => f1
1711 +  NewType(2) % my_f_ptr => f2
1712 +
1713 +  !write (*, *) NewType(1) % my_f_ptr (3.0), NewType(2) % my_f_ptr (3.0)
1714 +  write (6, *)  NewType(2) % my_f_ptr (3.0) ! < Shall print '27.0'
1715 +
1716 +  stop
1717 +end program test_proc_ptr
1718 +
1719 +! { dg-final { cleanup-modules "examplefuncs" } }
1720 Index: gcc/testsuite/gfortran.dg/pointer_intent_6.f90
1721 ===================================================================
1722 --- gcc/testsuite/gfortran.dg/pointer_intent_6.f90      (.../tags/gcc_4_6_3_release)    (revision 0)
1723 +++ gcc/testsuite/gfortran.dg/pointer_intent_6.f90      (.../branches/gcc-4_6-branch)   (revision 190226)
1724 @@ -0,0 +1,19 @@
1725 +! { dg-do compile }
1726 +!
1727 +! PR fortran/52864
1728 +!
1729 +! Assigning to an intent(in) pointer (which is valid).
1730 +!
1731 +      program test
1732 +         type PoisFFT_Solver3D
1733 +           complex, dimension(:,:,:), &
1734 +                           pointer :: work => null()
1735 +         end type PoisFFT_Solver3D
1736 +      contains
1737 +        subroutine PoisFFT_Solver3D_FullPeriodic(D, p)
1738 +          type(PoisFFT_Solver3D), intent(in) :: D
1739 +          real, intent(in), pointer :: p(:)
1740 +          D%work(i,j,k) = 0.0
1741 +          p = 0.0
1742 +        end subroutine
1743 +      end
1744 Index: gcc/testsuite/gfortran.dg/realloc_on_assign_15.f90
1745 ===================================================================
1746 --- gcc/testsuite/gfortran.dg/realloc_on_assign_15.f90  (.../tags/gcc_4_6_3_release)    (revision 0)
1747 +++ gcc/testsuite/gfortran.dg/realloc_on_assign_15.f90  (.../branches/gcc-4_6-branch)   (revision 190226)
1748 @@ -0,0 +1,40 @@
1749 +! { dg-do run }
1750 +!
1751 +! PR fortran/53389
1752 +!
1753 +! The program was leaking memory before due to
1754 +! realloc on assignment and nested functions.
1755 +!
1756 +module foo
1757 +  implicit none
1758 +  contains
1759 +
1760 +  function filler(array, val)
1761 +    real, dimension(:), intent(in):: array
1762 +    real, dimension(size(array)):: filler
1763 +    real, intent(in):: val
1764 +
1765 +    filler=val
1766 +
1767 +  end function filler
1768 +end module
1769 +
1770 +program test
1771 +  use foo
1772 +  implicit none
1773 +
1774 +  real, dimension(:), allocatable:: x, y
1775 +  integer, parameter:: N=1000 !*1000
1776 +  integer:: i
1777 +
1778 +!  allocate( x(N) )
1779 +  allocate( y(N) )
1780 +  y=0.0
1781 +
1782 +  do i=1, N
1783 +!    print *,i
1784 +    x=filler(filler(y, real(2*i)), real(i))
1785 +    y=y+x
1786 +  end do
1787 +
1788 +end program test
1789 Index: gcc/testsuite/gcc.c-torture/execute/pr53084.c
1790 ===================================================================
1791 --- gcc/testsuite/gcc.c-torture/execute/pr53084.c       (.../tags/gcc_4_6_3_release)    (revision 0)
1792 +++ gcc/testsuite/gcc.c-torture/execute/pr53084.c       (.../branches/gcc-4_6-branch)   (revision 190226)
1793 @@ -0,0 +1,18 @@
1794 +/* PR middle-end/53084 */
1795 +
1796 +extern void abort (void);
1797 +
1798 +__attribute__((noinline, noclone)) void
1799 +bar (const char *p)
1800 +{
1801 +  if (p[0] != 'o' || p[1] != 'o' || p[2])
1802 +    abort ();
1803 +}
1804 +
1805 +int
1806 +main ()
1807 +{
1808 +  static const char *const foo[] = {"foo" + 1};
1809 +  bar (foo[0]);
1810 +  return 0;
1811 +}
1812 Index: gcc/testsuite/gcc.c-torture/execute/20120427-1.c
1813 ===================================================================
1814 --- gcc/testsuite/gcc.c-torture/execute/20120427-1.c    (.../tags/gcc_4_6_3_release)    (revision 0)
1815 +++ gcc/testsuite/gcc.c-torture/execute/20120427-1.c    (.../branches/gcc-4_6-branch)   (revision 190226)
1816 @@ -0,0 +1,36 @@
1817 +typedef struct sreal
1818 +{
1819 +  unsigned sig;                /* Significant.  */
1820 +  int exp;             /* Exponent.  */
1821 +} sreal;
1822 +
1823 +sreal_compare (sreal *a, sreal *b)
1824 +{
1825 +  if (a->exp > b->exp)
1826 +    return 1;
1827 +  if (a->exp < b->exp)
1828 +    return -1;
1829 +  if (a->sig > b->sig)
1830 +    return 1;
1831 +  return -(a->sig < b->sig);
1832 +}
1833 +
1834 +sreal a[] = {
1835 +   { 0, 0 },
1836 +   { 1, 0 },
1837 +   { 0, 1 },
1838 +   { 1, 1 }
1839 +};
1840 +
1841 +int main()
1842 +{
1843 +  int i, j;
1844 +  for (i = 0; i <= 3; i++) {
1845 +    for (j = 0; j < 3; j++) {
1846 +      if (i < j && sreal_compare(&a[i], &a[j]) != -1) abort();
1847 +      if (i == j && sreal_compare(&a[i], &a[j]) != 0) abort();
1848 +      if (i > j && sreal_compare(&a[i], &a[j]) != 1) abort();
1849 +    }
1850 +  }
1851 +  return 0;
1852 +}
1853 Index: gcc/testsuite/gcc.c-torture/compile/pr53418-1.c
1854 ===================================================================
1855 --- gcc/testsuite/gcc.c-torture/compile/pr53418-1.c     (.../tags/gcc_4_6_3_release)    (revision 0)
1856 +++ gcc/testsuite/gcc.c-torture/compile/pr53418-1.c     (.../branches/gcc-4_6-branch)   (revision 190226)
1857 @@ -0,0 +1,5 @@
1858 +void
1859 +f (void)
1860 +{
1861 +  int i = (0 ? 1 : 0U / 0);
1862 +}
1863 Index: gcc/testsuite/gcc.c-torture/compile/limits-externdecl.c
1864 ===================================================================
1865 --- gcc/testsuite/gcc.c-torture/compile/limits-externdecl.c     (.../tags/gcc_4_6_3_release)    (revision 0)
1866 +++ gcc/testsuite/gcc.c-torture/compile/limits-externdecl.c     (.../branches/gcc-4_6-branch)   (revision 190226)
1867 @@ -0,0 +1,56 @@
1868 +/* Inspired by the test case for PR middle-end/52640.  */
1869 +
1870 +typedef struct
1871 +{
1872 +    char *value;
1873 +} REFERENCE;
1874 +
1875 +/* Add a few "extern int Xxxxxx ();" declarations.  */
1876 +#undef DEF
1877 +#undef LIM1
1878 +#undef LIM2
1879 +#undef LIM3
1880 +#undef LIM4
1881 +#undef LIM5
1882 +#undef LIM6
1883 +#define DEF(x)         extern int x ()
1884 +#define LIM1(x) DEF(x##0); DEF(x##1); DEF(x##2); DEF(x##3); DEF(x##4); \
1885 +               DEF(x##5); DEF(x##6); DEF(x##7); DEF(x##8); DEF(x##9);
1886 +#define LIM2(x) LIM1(x##0) LIM1(x##1) LIM1(x##2) LIM1(x##3) LIM1(x##4) \
1887 +               LIM1(x##5) LIM1(x##6) LIM1(x##7) LIM1(x##8) LIM1(x##9)
1888 +#define LIM3(x) LIM2(x##0) LIM2(x##1) LIM2(x##2) LIM2(x##3) LIM2(x##4) \
1889 +               LIM2(x##5) LIM2(x##6) LIM2(x##7) LIM2(x##8) LIM2(x##9)
1890 +#define LIM4(x) LIM3(x##0) LIM3(x##1) LIM3(x##2) LIM3(x##3) LIM3(x##4) \
1891 +               LIM3(x##5) LIM3(x##6) LIM3(x##7) LIM3(x##8) LIM3(x##9)
1892 +#define LIM5(x) LIM4(x##0) LIM4(x##1) LIM4(x##2) LIM4(x##3) LIM4(x##4) \
1893 +               LIM4(x##5) LIM4(x##6) LIM4(x##7) LIM4(x##8) LIM4(x##9)
1894 +#define LIM6(x) LIM5(x##0) LIM5(x##1) LIM5(x##2) LIM5(x##3) LIM5(x##4) \
1895 +               LIM5(x##5) LIM5(x##6) LIM5(x##7) LIM5(x##8) LIM5(x##9)
1896 +LIM5 (X);
1897 +
1898 +/* Add references to them, or GCC will simply ignore the extern decls.  */
1899 +#undef DEF
1900 +#undef LIM1
1901 +#undef LIM2
1902 +#undef LIM3
1903 +#undef LIM4
1904 +#undef LIM5
1905 +#undef LIM6
1906 +#define DEF(x) (char *) x
1907 +#define LIM1(x) DEF(x##0), DEF(x##1), DEF(x##2), DEF(x##3), DEF(x##4), \
1908 +               DEF(x##5), DEF(x##6), DEF(x##7), DEF(x##8), DEF(x##9),
1909 +#define LIM2(x) LIM1(x##0) LIM1(x##1) LIM1(x##2) LIM1(x##3) LIM1(x##4) \
1910 +               LIM1(x##5) LIM1(x##6) LIM1(x##7) LIM1(x##8) LIM1(x##9)
1911 +#define LIM3(x) LIM2(x##0) LIM2(x##1) LIM2(x##2) LIM2(x##3) LIM2(x##4) \
1912 +               LIM2(x##5) LIM2(x##6) LIM2(x##7) LIM2(x##8) LIM2(x##9)
1913 +#define LIM4(x) LIM3(x##0) LIM3(x##1) LIM3(x##2) LIM3(x##3) LIM3(x##4) \
1914 +               LIM3(x##5) LIM3(x##6) LIM3(x##7) LIM3(x##8) LIM3(x##9)
1915 +#define LIM5(x) LIM4(x##0) LIM4(x##1) LIM4(x##2) LIM4(x##3) LIM4(x##4) \
1916 +               LIM4(x##5) LIM4(x##6) LIM4(x##7) LIM4(x##8) LIM4(x##9)
1917 +#define LIM6(x) LIM5(x##0) LIM5(x##1) LIM5(x##2) LIM5(x##3) LIM5(x##4) \
1918 +               LIM5(x##5) LIM5(x##6) LIM5(x##7) LIM5(x##8) LIM5(x##9)
1919 +REFERENCE references[] = {
1920 +  LIM5 (X)
1921 +  0
1922 +};
1923 +
1924 Index: gcc/testsuite/gcc.c-torture/compile/pr53418-2.c
1925 ===================================================================
1926 --- gcc/testsuite/gcc.c-torture/compile/pr53418-2.c     (.../tags/gcc_4_6_3_release)    (revision 0)
1927 +++ gcc/testsuite/gcc.c-torture/compile/pr53418-2.c     (.../branches/gcc-4_6-branch)   (revision 190226)
1928 @@ -0,0 +1,5 @@
1929 +void
1930 +f (void)
1931 +{
1932 +  int i = (1 ? 0U / 0 : 1);
1933 +}
1934 Index: gcc/testsuite/gcc.dg/pr52862.c
1935 ===================================================================
1936 --- gcc/testsuite/gcc.dg/pr52862.c      (.../tags/gcc_4_6_3_release)    (revision 0)
1937 +++ gcc/testsuite/gcc.dg/pr52862.c      (.../branches/gcc-4_6-branch)   (revision 190226)
1938 @@ -0,0 +1,9 @@
1939 +/* { dg-do compile } */
1940 +/* { dg-options "-O" } */
1941 +
1942 +void ASMAtomicWritePtrVoid(const void *pv);
1943 +void rtThreadDestroy(void)
1944 +{
1945 +  void * const pvTypeChecked = ((void *)0);
1946 +  ASMAtomicWritePtrVoid((void *)(pvTypeChecked));
1947 +}
1948 Index: gcc/testsuite/gcc.dg/stack-usage-1.c
1949 ===================================================================
1950 --- gcc/testsuite/gcc.dg/stack-usage-1.c        (.../tags/gcc_4_6_3_release)    (revision 190226)
1951 +++ gcc/testsuite/gcc.dg/stack-usage-1.c        (.../branches/gcc-4_6-branch)   (revision 190226)
1952 @@ -41,6 +41,8 @@
1953  #  define SIZE 160 /* 256 -  96 bytes for register save area */
1954  #elif defined (__SPU__)
1955  #  define SIZE 224
1956 +#elif defined (__sh__)
1957 +#  define SIZE 252
1958  #else
1959  #  define SIZE 256
1960  #endif
1961 Index: gcc/testsuite/gcc.dg/torture/pr53908.c
1962 ===================================================================
1963 --- gcc/testsuite/gcc.dg/torture/pr53908.c      (.../tags/gcc_4_6_3_release)    (revision 0)
1964 +++ gcc/testsuite/gcc.dg/torture/pr53908.c      (.../branches/gcc-4_6-branch)   (revision 190226)
1965 @@ -0,0 +1,288 @@
1966 +/* { dg-do run } */
1967 +/* SEGV at comment below.  */
1968 +typedef unsigned int size_t;
1969 +typedef enum har {
1970 +  he_fatal = (-199),
1971 +  he_not_initialized,
1972 +  he_bad_input,
1973 +  he_memory_too_small,
1974 +  he_bad_action,
1975 +  he_duplicate,
1976 +  he_bad_nonce,
1977 +  he_stale_nonce,
1978 +  he_bad_credentials,
1979 +  he_bad_user,
1980 +  he_no_such_user,
1981 +  he_bad_passwd,
1982 +  he_unknown_auth_scheme,
1983 +  he_not_found,
1984 +  he_failed_digest_file_check,
1985 +  he_failed_digest_file_save,
1986 +  he_process_not_privileged,
1987 +  he_other,
1988 +  he_end_of_range,
1989 +  ha_no_error = 0,
1990 +  ha_no_value = 1
1991 +} har;
1992 +typedef enum realm_type
1993 +{
1994 +  axis_realm = 0,
1995 +  ws_realm
1996 +} realm_type;
1997 +
1998 +__attribute__((__noclone__, __noinline__))
1999 +har has_www_auth(char *, size_t, realm_type, har);
2000 +
2001 +__attribute__((__noclone__, __noinline__))
2002 +har has_auth_user(const char *, const char *, realm_type, char *, size_t);
2003 +
2004 +__attribute__((__noclone__, __noinline__))
2005 +char *ha_get_string_value(void);
2006 +
2007 +typedef struct
2008 +{
2009 +  unsigned int track_id;
2010 +  char* user;
2011 +  char* realm;
2012 +  char* authent;
2013 +  int internal_realm;
2014 +} request;
2015 +enum user_response {
2016 +  file_not_found_user_response = -3,
2017 +  access_denied_user_response = -2,
2018 +  no_user_response = -1,
2019 +  ok_user_response = 0
2020 +};
2021 +struct realm_group {
2022 +  char *name;
2023 +  int id;
2024 +  struct realm_group *next;
2025 +};
2026 +struct realm {
2027 +  char *name;
2028 +  char *space;
2029 +  struct realm_group *groups;
2030 +  struct realm *next;
2031 +};
2032 +struct user_info {
2033 +  char *name;
2034 +  int no_groups;
2035 +  int groups[128];
2036 +  struct user_info *next;
2037 +};
2038 +static struct user_info *find_user(const char *user_name);
2039 +static int is_member_of_groups(const struct user_info *user_item,
2040 +                                const struct realm_group *groups);
2041 +int authent_author(request *req);
2042 +struct realm *realms = ((void *)0);
2043 +struct user_info *users = ((void *)0);
2044 +static struct user_info*
2045 +find_user(const char *user_name)
2046 +{
2047 +  struct user_info *user_item;
2048 +  user_item = users;
2049 +  while (user_item != ((void *)0)) {
2050 +    /* SEGV due to NULL access here on user_name.  See also comment below.  */
2051 +    if ((__builtin_strcmp(user_item->name, user_name) == 0))
2052 +      break;
2053 +    user_item = user_item->next;
2054 +  }
2055 +  return user_item;
2056 +}
2057 +static int
2058 +is_member_of_groups(const struct user_info *user_item,
2059 +                    const struct realm_group *groups)
2060 +{
2061 +  const struct realm_group *group_item;
2062 +  int i;
2063 +  group_item = groups;
2064 +  while (group_item != ((void *)0)) {
2065 +    for (i = 0; i < user_item->no_groups; i++)
2066 +      if (user_item->groups[i] == group_item->id)
2067 +       return 0;
2068 +    group_item = group_item->next;
2069 +  }
2070 +  return -1;
2071 +}
2072 +char *foo (void) __attribute__((__noclone__, __noinline__));
2073 +char* g_strdup (const char *str) __attribute__((__malloc__, __noclone__, __noinline__));
2074 +int g_strcmp0 (const char *str1, const char *str2);
2075 +static int
2076 +is_basic(char **user)
2077 +{
2078 +  char *passwd_ptr;
2079 +  char *authent = foo();
2080 +  passwd_ptr = __builtin_strchr(authent, ':');
2081 +  if (passwd_ptr != ((void *)0)) {
2082 +    *user = g_strdup(authent);
2083 +    return 0;
2084 +  }
2085 +  return -1;
2086 +}
2087 +static int
2088 +is_digest(char **user)
2089 +{
2090 +  int ret_val = -1;
2091 +  char *authent;
2092 +  authent = ha_get_string_value();
2093 +  if (authent) {
2094 +    *user = g_strdup(authent);
2095 +    ret_val = 0;
2096 +  }
2097 +  return ret_val;
2098 +}
2099 +__attribute__((__noclone__, __noinline__))
2100 +void g_free (void * mem);
2101 +static enum user_response
2102 +get_user_info_from_header(const realm_type type,
2103 +                          char **user_name,
2104 +                          struct user_info **user_item)
2105 +{
2106 +  int ret_val = no_user_response;
2107 +  if ((type == ws_realm)) {
2108 +    if (is_basic(user_name) == 0)
2109 +      ret_val = access_denied_user_response;
2110 +    if (is_digest(user_name) == 0)
2111 +      ret_val = ok_user_response;
2112 +  } else {
2113 +    if (is_basic(user_name) < 0 &&
2114 +       /* Load of *user_name here, but not after the is_digest call.  */
2115 +       is_digest(user_name) < 0)
2116 +      ;
2117 +    else if ((*user_item = find_user(*user_name)) != ((void *)0))
2118 +      ret_val = ok_user_response;
2119 +    else
2120 +      ret_val = access_denied_user_response;
2121 +    if (ret_val != ok_user_response)
2122 +      g_free(*user_name);
2123 +  }
2124 +  return ret_val;
2125 +}
2126 +static enum user_response
2127 +authenticate_user(request *req,
2128 +                  char **user_name,
2129 +                  struct user_info **user_item)
2130 +{
2131 +  char *authent = ((void *)0);
2132 +  har resp = ha_no_value;
2133 +  enum user_response user_resp;
2134 +  int ret_val = no_user_response;
2135 +  if (req->authent && __builtin_strlen(req->authent)) {
2136 +    authent = req->authent;
2137 +    user_resp = get_user_info_from_header(req->internal_realm,
2138 +                                          user_name,
2139 +                                          user_item);
2140 +    if (user_resp == ok_user_response) {
2141 +      resp = has_auth_user(authent, 0, req->internal_realm, "", 1);
2142 +      if (resp == ha_no_error)
2143 +       ret_val = ok_user_response;
2144 +      else if (resp != he_stale_nonce)
2145 +       ret_val = access_denied_user_response;
2146 +    } else if (user_resp == access_denied_user_response)
2147 +      ret_val = access_denied_user_response;
2148 +  }
2149 +  if (resp != he_memory_too_small && resp != ha_no_error)
2150 +    resp = has_www_auth("", 1, req->internal_realm, resp);
2151 +  return ret_val;
2152 +}
2153 +
2154 +int __attribute__ ((__noinline__, __noclone__))
2155 +authent_author(request *req)
2156 +{
2157 +  struct realm *realm;
2158 +  char *user_name = ((void *)0);
2159 +  struct user_info *user_item = ((void *)0);
2160 +  int res = 0;
2161 +  asm ("");
2162 +  realm = realms;
2163 +  if (__builtin_strcmp("Wsd", realm->name) == 0) {
2164 +    req->internal_realm = ws_realm;
2165 +    is_digest(&user_name);
2166 +  }
2167 +  if (authenticate_user(req, &user_name, &user_item) < 0) {
2168 +    if (user_name != ((void *)0))
2169 +      req->user = user_name;
2170 +    res = -2;
2171 +    goto authent_author_return;
2172 +  }
2173 +  if (is_member_of_groups(user_item, realm->groups) < 0)
2174 +    res = -1;
2175 +authent_author_return:
2176 +  return res;
2177 +}
2178 +
2179 +int good0, good1, good2;
2180 +
2181 +__attribute__ ((__noinline__, __noclone__))
2182 +char *foo(void)
2183 +{
2184 +  asm ("");
2185 +  good0++;
2186 +  return "";
2187 +}
2188 +
2189 +__attribute__ ((__noinline__, __noclone__))
2190 +char *ha_get_string_value(void)
2191 +{
2192 +  asm ("");
2193 +  good1++;
2194 +  return "f";
2195 +}
2196 +
2197 +__attribute__ ((__noinline__, __noclone__))
2198 +har has_auth_user(const char *a, const char *b, realm_type c, char *d, size_t e)
2199 +{
2200 +  asm ("");
2201 +  if (*a != 'z' || a[1] != 0 || b != 0 || c != axis_realm || *d != 0
2202 +      || e != 1)
2203 +    __builtin_abort ();
2204 +  return ha_no_error;
2205 +}
2206 +
2207 +__attribute__ ((__noinline__, __noclone__))
2208 +har has_www_auth(char *a, size_t b, realm_type c, har d)
2209 +{
2210 +  (void)(*a+b+c+d);
2211 +  asm ("");
2212 +  __builtin_abort ();
2213 +}
2214 +
2215 +
2216 +char *strdupped_user = "me";
2217 +__attribute__((__malloc__, __noclone__, __noinline__))
2218 +char* g_strdup (const char *str)
2219 +{
2220 +  asm ("");
2221 +  if (*str != 'f')
2222 +    __builtin_abort ();
2223 +  good2++;
2224 +  return strdupped_user;
2225 +}
2226 +
2227 +__attribute__((__noclone__, __noinline__))
2228 +void g_free (void * mem)
2229 +{
2230 +  (void)mem;
2231 +  asm ("");
2232 +  __builtin_abort ();
2233 +}
2234 +
2235 +struct user_info me = { .name = "me", .no_groups = 1, .groups = {42}, .next = 0};
2236 +struct user_info you = { .name = "you", .next = &me};
2237 +struct realm_group xgroups = { .name = "*", .id = 42, .next = 0};
2238 +
2239 +int main(void)
2240 +{
2241 +  char *orig_user = "?";
2242 +  struct realm r = { .name = "x", .space = "space?", .groups = &xgroups, .next = 0};
2243 +  request req = { .user = orig_user, .realm = "!", .authent = "z",
2244 +                 .internal_realm = axis_realm};
2245 +  realms = &r;
2246 +  users = &you;
2247 +  if (authent_author (&req) != 0 || good0 != 1 || good1 != 1 || good2 != 1
2248 +      || req.user != orig_user
2249 +      || req.internal_realm != axis_realm)
2250 +    __builtin_abort ();
2251 +  __builtin_exit (0);
2252 +}
2253 +
2254 Index: gcc/testsuite/gcc.dg/torture/pr52693.c
2255 ===================================================================
2256 --- gcc/testsuite/gcc.dg/torture/pr52693.c      (.../tags/gcc_4_6_3_release)    (revision 0)
2257 +++ gcc/testsuite/gcc.dg/torture/pr52693.c      (.../branches/gcc-4_6-branch)   (revision 190226)
2258 @@ -0,0 +1,33 @@
2259 +/* { dg-do run } */
2260 +
2261 +struct pair
2262 +{
2263 +  int x;
2264 +  int y;
2265 +};
2266 +
2267 +struct array
2268 +{
2269 +  struct pair elems[ 2 ];
2270 +  unsigned index;
2271 +};
2272 +
2273 +extern void abort ();
2274 +
2275 +void __attribute__ ((noinline,noclone))
2276 +test_results (int x1, int y1, int x2, int y2)
2277 +{
2278 +  if (x1 != x2 || y1 != y2)
2279 +    abort ();
2280 +}
2281 +
2282 +int
2283 +main (void)
2284 +{
2285 +  struct array arr = {{{1,2}, {3,4}}, 1};
2286 +  struct pair last = arr.elems[arr.index];
2287 +
2288 +  test_results ( last.x, last.y, arr.elems[1].x, arr.elems[1].y);
2289 +
2290 +  return 0;
2291 +}
2292 Index: gcc/testsuite/gcc.dg/torture/pr53790.c
2293 ===================================================================
2294 --- gcc/testsuite/gcc.dg/torture/pr53790.c      (.../tags/gcc_4_6_3_release)    (revision 0)
2295 +++ gcc/testsuite/gcc.dg/torture/pr53790.c      (.../branches/gcc-4_6-branch)   (revision 190226)
2296 @@ -0,0 +1,17 @@
2297 +/* { dg-do compile } */
2298 +
2299 +typedef struct s {
2300 +    int value;
2301 +} s_t;
2302 +
2303 +static inline int 
2304 +read(s_t const *var)
2305 +{
2306 +  return var->value;
2307 +}
2308 +
2309 +int main()
2310 +{
2311 +  extern union u extern_var;
2312 +  return read((s_t *)&extern_var);
2313 +}
2314 Index: gcc/testsuite/gcc.dg/torture/pr52407.c
2315 ===================================================================
2316 --- gcc/testsuite/gcc.dg/torture/pr52407.c      (.../tags/gcc_4_6_3_release)    (revision 0)
2317 +++ gcc/testsuite/gcc.dg/torture/pr52407.c      (.../branches/gcc-4_6-branch)   (revision 190226)
2318 @@ -0,0 +1,33 @@
2319 +/* { dg-do run } */
2320 +
2321 +extern void abort (void);
2322 +
2323 +typedef long long T;
2324 +typedef T vl_t __attribute__((vector_size(2 * sizeof (T))));
2325 +
2326 +vl_t   ul[4], vl[4] = { { 1, 2 }, { 3, 4 }, { 5, 6 }, { 7, 8 } };
2327 +
2328 +static void
2329 +mul_vl_l(vl_t *u, vl_t *v, T x, int m)
2330 +{
2331 +  vl_t  w;
2332 +  T *p = (T *)&w;
2333 +  p[0] = p[1] = x;
2334 +  while (m--)
2335 +    *u++ = *v++ * w;
2336 +}
2337 +
2338 +int
2339 +main(int argc, char *argv[])
2340 +{
2341 +  int i;
2342 +  T *pl;
2343 +
2344 +  pl = (T *) &ul;
2345 +  mul_vl_l(ul, vl, 2, 4);
2346 +  for (i = 0; i < 8; i++)
2347 +    if (pl[i] != 2 * (i + 1))
2348 +      abort ();
2349 +
2350 +  return 0;
2351 +}
2352 Index: gcc/testsuite/gcc.dg/torture/pr51071-2.c
2353 ===================================================================
2354 --- gcc/testsuite/gcc.dg/torture/pr51071-2.c    (.../tags/gcc_4_6_3_release)    (revision 0)
2355 +++ gcc/testsuite/gcc.dg/torture/pr51071-2.c    (.../branches/gcc-4_6-branch)   (revision 190226)
2356 @@ -0,0 +1,38 @@
2357 +/* { dg-do compile } */
2358 +/* { dg-options "-fno-delete-null-pointer-checks" } */
2359 +
2360 +extern struct module __this_module;
2361 +static inline void
2362 +trace_module_get  (struct module *mod, unsigned long ip) { }
2363 +struct module;
2364 +static inline __attribute__((no_instrument_function))
2365 +int try_module_get(struct module *module)
2366 +{
2367 +  int ret = 1;
2368 +  if (module)
2369 +    {
2370 +      if (module_is_live(module))
2371 +       {
2372 +         __label__ __here;
2373 +         asm("");
2374 +         __here:
2375 +         trace_module_get(module, (unsigned long)&&__here);
2376 +       }
2377 +      else
2378 +       ret = 0;
2379 +    }
2380 +  return ret;
2381 +}
2382 +struct net_device;
2383 +struct net_device_ops {
2384 +    int (*ndo_open)(struct net_device *dev);
2385 +};
2386 +int t3e3_open(struct net_device *dev)
2387 +{
2388 +  int ret = hdlc_open(dev);
2389 +  if (ret)
2390 +    return ret;
2391 +  try_module_get((&__this_module));
2392 +  return 0;
2393 +}
2394 +const struct net_device_ops t3e3_ops = { .ndo_open = t3e3_open };
2395 Index: gcc/testsuite/gcc.dg/torture/pr51071.c
2396 ===================================================================
2397 --- gcc/testsuite/gcc.dg/torture/pr51071.c      (.../tags/gcc_4_6_3_release)    (revision 0)
2398 +++ gcc/testsuite/gcc.dg/torture/pr51071.c      (.../branches/gcc-4_6-branch)   (revision 190226)
2399 @@ -0,0 +1,33 @@
2400 +/* { dg-do compile } */
2401 +
2402 +void foo (void);
2403 +void bar (void *);
2404 +extern int t;
2405 +
2406 +static void kmalloc_large (int size, int flags)
2407 +{
2408 +  (void) size;
2409 +  (void) flags;
2410 +  foo ();
2411 +  bar (({__here:&&__here;}));
2412 +}
2413 +
2414 +static void kmalloc (int size, int flags)
2415 +{
2416 +  if (size)
2417 +    {
2418 +      if ((unsigned long) size > 0x1000)
2419 +       kmalloc_large (size, flags);
2420 +
2421 +      if (flags)
2422 +       bar (({__here:&&__here;}));
2423 +    }
2424 +}
2425 +
2426 +void compress_file_range (int i, int j, int k)
2427 +{
2428 +  int nr_pages = ({j < k;});
2429 +
2430 +  if (i || t)
2431 +    kmalloc (0x1000UL * nr_pages, 0x40UL);
2432 +}
2433 Index: gcc/testsuite/gcc.dg/volatile-bitfields-2.c
2434 ===================================================================
2435 --- gcc/testsuite/gcc.dg/volatile-bitfields-2.c (.../tags/gcc_4_6_3_release)    (revision 0)
2436 +++ gcc/testsuite/gcc.dg/volatile-bitfields-2.c (.../branches/gcc-4_6-branch)   (revision 190226)
2437 @@ -0,0 +1,15 @@
2438 +/* { dg-do run } */
2439 +/* { dg-options "-fstrict-volatile-bitfields" } */
2440 +
2441 +extern void abort(void);
2442 +struct thing {
2443 +  volatile unsigned short a: 8;
2444 +  volatile unsigned short b: 8;
2445 +} t = {1,2};
2446 +
2447 +int main()
2448 +{
2449 +  t.a = 3;
2450 +  if (t.a !=3 || t.b !=2) abort();
2451 +  return 0;
2452 +}
2453 Index: gcc/testsuite/gcc.dg/20020201-1.c
2454 ===================================================================
2455 --- gcc/testsuite/gcc.dg/20020201-1.c   (.../tags/gcc_4_6_3_release)    (revision 190226)
2456 +++ gcc/testsuite/gcc.dg/20020201-1.c   (.../branches/gcc-4_6-branch)   (revision 190226)
2457 @@ -7,12 +7,8 @@
2458  /* { dg-options "-fprofile-arcs" } */
2459  /* { dg-do run { target native } } */
2460  
2461 -extern void abort (void);
2462 -extern void exit (int);
2463 +#include <stdlib.h>
2464  
2465 -int rand (void);
2466 -void srand (unsigned int seed);
2467 -
2468  int globvar;
2469  
2470  void
2471 Index: gcc/testsuite/ChangeLog
2472 ===================================================================
2473 --- gcc/testsuite/ChangeLog     (.../tags/gcc_4_6_3_release)    (revision 190226)
2474 +++ gcc/testsuite/ChangeLog     (.../branches/gcc-4_6-branch)   (revision 190226)
2475 @@ -1,3 +1,232 @@
2476 +2012-08-06  Anna Tikhonova  <anna.m.tikhonova@gmail.com>
2477 +
2478 +       * gcc.dg/20020201-1.c: Remove declarations for exit, abort,
2479 +       rand, srand. Include <stdlib.h>.
2480 +
2481 +2012-07-16  Steven Bosscher  <steven@gcc.gnu.org>
2482 +
2483 +       Backport from trunk:
2484 +       2012-07-13  Hans-Peter Nilsson  <hp@axis.com>
2485 +
2486 +       PR rtl-optimization/53908
2487 +       * gcc.dg/torture/pr53908.c: New test.
2488 +
2489 +2012-07-14  Mikael Morin  <mikael.morin@gcc.gnu.org>
2490 +
2491 +       Backport from trunk:
2492 +       2012-01-09  Tobias Burnus  <burnus@net-b.de>
2493 +
2494 +       PR fortran/51758
2495 +       * gfortran.dg/optional_absent_2.f90: New.
2496 +
2497 +2012-07-03  Michael Hope  <michael.hope@linaro.org>
2498 +
2499 +       PR c++/53814
2500 +       * g++.dg/cpp0x/nullptr28.C: Change selector for explicit
2501 +       options.
2502 +
2503 +2012-06-28  Richard Guenther  <rguenther@suse.de>
2504 +
2505 +       PR middle-end/53790
2506 +       * gcc.dg/torture/pr53790.c: New testcase.
2507 +
2508 +2012-06-25  Jason Merrill  <jason@redhat.com>
2509 +
2510 +       PR c++/52988
2511 +       * g++.dg/cpp0x/nullptr28.C: New.
2512 +
2513 +2012-06-19  Kaz Kojima  <kkojima@gcc.gnu.org>
2514 +
2515 +       * gcc.dg/stack-usage-1.c: Remove dg-options line for sh targets
2516 +       and add __sh__ case.
2517 +
2518 +2012-06-14  Tobias Burnus  <burnus@net-b.de>
2519 +
2520 +       PR fortran/53597
2521 +       * gfortran.dg/save_4.f90: New.
2522 +
2523 +2012-06-13  Christian Bruel  <christian.bruel@st.com>
2524 +
2525 +       PR target/53621
2526 +       * gcc.dg/stack-usage-1.c: Force -fomit-frame-pointer on SH.
2527 +
2528 +2012-06-05  Tobias Burnus  <burnus@net-b.de>
2529 +
2530 +       PR fortran/50619
2531 +       * gfortran.dg/init_flag_10.f90: New.
2532 +
2533 +2012-06-04  Edmar Wienskoski  <edmar@freescale.com>
2534 +
2535 +       PR target/53559
2536 +       * gcc.target/powerpc/cell_builtin_1.c: New test case.
2537 +       * gcc.target/powerpc/cell_builtin_2.c: Ditto.
2538 +       * gcc.target/powerpc/cell_builtin_3.c: Ditto.
2539 +       * gcc.target/powerpc/cell_builtin_4.c: Ditto.
2540 +       * gcc.target/powerpc/cell_builtin_5.c: Ditto.
2541 +       * gcc.target/powerpc/cell_builtin_6.c: Ditto.
2542 +       * gcc.target/powerpc/cell_builtin_7.c: Ditto.
2543 +       * gcc.target/powerpc/cell_builtin_8.c: Ditto.
2544 +
2545 +2012-05-23  Michael Hope  <michael.hope@linaro.org>
2546 +
2547 +       PR c++/52796
2548 +       * g++.dg/cpp0x/variadic-value1.C: Change selector for explicit
2549 +       options.
2550 +
2551 +2012-05-23  Tobias Burnus  <burnus@net-b.de>
2552 +
2553 +       PR fortran/53389
2554 +       * gfortran.dg/realloc_on_assign_15.f90: New.
2555 +
2556 +2012-05-22  Richard Guenther  <rguenther@suse.de>
2557 +
2558 +       Backport from mainline
2559 +       2011-11-10  Richard Guenther  <rguenther@suse.de>
2560 +
2561 +       PR middle-end/51071
2562 +       * gcc.dg/torture/pr51071.c: New testcase.
2563 +       * gcc.dg/torture/pr51071-2.c: Likewise.
2564 +
2565 +2012-05-22  Richard Guenther  <rguenther@suse.de>
2566 +
2567 +       Backport from mainline
2568 +       2012-02-28  Richard Guenther  <rguenther@suse.de>
2569 +
2570 +       PR target/52407
2571 +       * gcc.dg/torture/pr52407.c: New testcase.
2572 +
2573 +2012-05-22  Richard Guenther  <rguenther@suse.de>
2574 +
2575 +       Backport from mainline
2576 +       2012-04-12  Richard Guenther  <rguenther@suse.de>
2577 +
2578 +       PR c/52862
2579 +       * gcc.dg/pr52862.c: New testcase.
2580 +
2581 +2012-05-21  Joseph Myers  <joseph@codesourcery.com>
2582 +
2583 +       PR c/53418
2584 +       * gcc.c-torture/compile/pr53418-1.c,
2585 +       gcc.c-torture/compile/pr53418-2.c: New tests.
2586 +
2587 +2012-05-21  H.J. Lu  <hongjiu.lu@intel.com>
2588 +
2589 +       Backport from mainline
2590 +       2012-05-21  Uros Bizjak  <ubizjak@gmail.com>
2591 +                   H.J. Lu  <hongjiu.lu@intel.com>
2592 +
2593 +       PR target/53416
2594 +       * gcc.target/i386/pr53416.c: New file.
2595 +
2596 +2012-05-14  Uros Bizjak  <ubizjak@gmail.com>
2597 +
2598 +       * gcc.target/i386/avx256-unaligned-load-[1234].c: Update scan strings.
2599 +       * gcc.target/i386/avx256-unaligned-store-[1234].c: Ditto.
2600 +
2601 +2012-05-03  Michael Meissner  <meissner@linux.vnet.ibm.com>
2602 +
2603 +       Backport from mainline
2604 +       2012-05-03  Michael Meissner  <meissner@linux.vnet.ibm.com>
2605 +
2606 +       PR target/53199
2607 +       * gcc.target/powwerpc/pr53199.c: New file.
2608 +
2609 +2012-05-02  Tobias Burnus  <burnus@net-b.de>
2610 +
2611 +       Backport from mainline
2612 +       2012-04-16  Tobias Burnus  <burnus@net-b.de>
2613 +
2614 +       PR fortran/52864
2615 +       * gfortran.dg/pointer_intent_6.f90: New.
2616 +
2617 +2012-04-30  Uros Bizjak  <ubizjak@gmail.com>
2618 +
2619 +       Backport from mainline
2620 +       2012-04-27  Paolo Bonzini  <bonzini@gnu.org>
2621 +
2622 +       PR target/53138
2623 +       * gcc.c-torture/execute/20120427-1.c: New testcase.
2624 +
2625 +2012-04-24  Jakub Jelinek  <jakub@redhat.com>
2626 +
2627 +       PR middle-end/53084
2628 +       * gcc.c-torture/execute/pr53084.c: New test.
2629 +
2630 +2012-04-13  Michael Meissner  <meissner@linux.vnet.ibm.com>
2631 +
2632 +       Backport from mainline
2633 +       2012-04-12  Michael Meissner  <meissner@linux.vnet.ibm.com>
2634 +
2635 +       PR target/52775
2636 +       * gcc.target/powerpc/pr52775.c: New file.
2637 +
2638 +2012-04-03  Jason Merrill  <jason@redhat.com>
2639 +
2640 +       PR c++/52796
2641 +       * g++.dg/cpp0x/variadic-value1.C: New.
2642 +
2643 +2012-03-28  Joey Ye  <joey.ye@arm.com>
2644 +
2645 +       Backported from mainline
2646 +       2011-12-20  Bernd Schmidt  <bernds@codesourcery.com>
2647 +
2648 +       PR middle-end/51200
2649 +       * gcc.target/arm/volatile-bitfields-4.c: New test.
2650 +       * c-c++-common/abi-bf.c: New test.
2651 +
2652 +       2011-12-26  Joey Ye  <joey.ye@arm.com>
2653 +
2654 +       PR middle-end/51200
2655 +       * gcc.dg/volatile-bitfields-2.c: New test.
2656 +
2657 +2012-03-28  Martin Jambor  <mjambor@suse.cz>
2658 +
2659 +       Backported from mainline
2660 +       2012-03-27  Martin Jambor  <mjambor@suse.cz>
2661 +
2662 +       PR middle-end/52693
2663 +       * gcc.dg/torture/pr52693.c: New test.
2664 +
2665 +2012-03-28  Jakub Jelinek  <jakub@redhat.com>
2666 +
2667 +       PR target/52736
2668 +       * gcc.target/i386/pr52736.c: New test.
2669 +
2670 +2012-03-24  Jan Hubicka  <jh@suse.cz>
2671 +
2672 +       PR middle-end/51737
2673 +       * g++.dg/torture/pr51737.C: New testcase
2674 +
2675 +2012-03-24  Steven Bosscher  <steven@gcc.gnu.org>
2676 +
2677 +       PR middle-end/52640
2678 +       * gcc.c-torture/compile/limits-externdecl.c: New test.
2679 +
2680 +2012-03-16  Jan Hubicka  <jh@suse.cz>
2681 +
2682 +       PR middle-end/48600
2683 +       * g++.dg/torture/pr48600.C: New testcase.
2684 +
2685 +2012-03-10  Tobias Burnus  <burnus@net-b.de>
2686 +
2687 +       PR fortran/52469
2688 +       * gfortran.dg/proc_ptr_34.f90: New.
2689 +
2690 +2012-03-06  Tobias Burnus  <burnus@net-b.de>
2691 +
2692 +       Backport from mainline
2693 +       2012-03-02  Tobias Burnus  <burnus@net-b.de>
2694 +
2695 +       PR fortran/52452
2696 +       * gfortran.dg/intrinsic_8.f90: New.
2697 +
2698 +2012-03-02  Peter Bergner  <bergner@vnet.ibm.com>
2699 +
2700 +       Backport from mainline
2701 +       2012-03-02  Peter Bergner  <bergner@vnet.ibm.com>
2702 +
2703 +       * gcc.target/powerpc/pr52457.c: New test.
2704 +
2705  2012-03-01  Release Manager
2706  
2707         * GCC 4.6.3 released.
2708 Index: gcc/testsuite/g++.dg/cpp0x/variadic-value1.C
2709 ===================================================================
2710 --- gcc/testsuite/g++.dg/cpp0x/variadic-value1.C        (.../tags/gcc_4_6_3_release)    (revision 0)
2711 +++ gcc/testsuite/g++.dg/cpp0x/variadic-value1.C        (.../branches/gcc-4_6-branch)   (revision 190226)
2712 @@ -0,0 +1,24 @@
2713 +// PR c++/52796
2714 +// { dg-options "-std=c++0x -pedantic-errors" }
2715 +
2716 +inline void *operator new(__SIZE_TYPE__ s, void *p) { return p; }
2717 +
2718 +struct A
2719 +{
2720 +  int i;
2721 +  template<class... Ts>
2722 +  A(Ts&&... ts): i(ts...) { }
2723 +};
2724 +
2725 +static union {
2726 +  unsigned char c[sizeof(A)];
2727 +  int i;
2728 +};
2729 +
2730 +int main()
2731 +{
2732 +  i = 0xdeadbeef;
2733 +  new(c) A;
2734 +  if (i != 0)
2735 +    __builtin_abort();
2736 +}
2737 Index: gcc/testsuite/g++.dg/cpp0x/nullptr28.C
2738 ===================================================================
2739 --- gcc/testsuite/g++.dg/cpp0x/nullptr28.C      (.../tags/gcc_4_6_3_release)    (revision 0)
2740 +++ gcc/testsuite/g++.dg/cpp0x/nullptr28.C      (.../branches/gcc-4_6-branch)   (revision 190226)
2741 @@ -0,0 +1,17 @@
2742 +// { dg-do run }
2743 +// { dg-options "-std=c++0x -pedantic-errors" }
2744 +
2745 +typedef decltype(nullptr) nullptr_t;
2746 +
2747 +int i;
2748 +nullptr_t n;
2749 +const nullptr_t& f() { ++i; return n; }
2750 +
2751 +nullptr_t g() { return f(); }
2752 +
2753 +int main()
2754 +{
2755 +  g();
2756 +  if (i != 1)
2757 +    __builtin_abort ();
2758 +}
2759 Index: gcc/testsuite/c-c++-common/abi-bf.c
2760 ===================================================================
2761 --- gcc/testsuite/c-c++-common/abi-bf.c (.../tags/gcc_4_6_3_release)    (revision 0)
2762 +++ gcc/testsuite/c-c++-common/abi-bf.c (.../branches/gcc-4_6-branch)   (revision 190226)
2763 @@ -0,0 +1,3 @@
2764 +/* { dg-warning "incompatible" } */
2765 +/* { dg-do compile } */
2766 +/* { dg-options "-fstrict-volatile-bitfields -fabi-version=1" } */
2767 Index: gcc/cp/typeck.c
2768 ===================================================================
2769 --- gcc/cp/typeck.c     (.../tags/gcc_4_6_3_release)    (revision 190226)
2770 +++ gcc/cp/typeck.c     (.../branches/gcc-4_6-branch)   (revision 190226)
2771 @@ -1822,7 +1822,7 @@
2772    if (error_operand_p (exp))
2773      return error_mark_node;
2774  
2775 -  if (NULLPTR_TYPE_P (type))
2776 +  if (NULLPTR_TYPE_P (type) && !TREE_SIDE_EFFECTS (exp))
2777      return nullptr_node;
2778  
2779    /* build_c_cast puts on a NOP_EXPR to make the result not an lvalue.
2780 Index: gcc/cp/decl.c
2781 ===================================================================
2782 --- gcc/cp/decl.c       (.../tags/gcc_4_6_3_release)    (revision 190226)
2783 +++ gcc/cp/decl.c       (.../branches/gcc-4_6-branch)   (revision 190226)
2784 @@ -3636,7 +3636,7 @@
2785      TYPE_SIZE_UNIT (nullptr_type_node) = size_int (GET_MODE_SIZE (ptr_mode));
2786      TYPE_UNSIGNED (nullptr_type_node) = 1;
2787      TYPE_PRECISION (nullptr_type_node) = GET_MODE_BITSIZE (ptr_mode);
2788 -    SET_TYPE_MODE (nullptr_type_node, Pmode);
2789 +    SET_TYPE_MODE (nullptr_type_node, ptr_mode);
2790      record_builtin_type (RID_MAX, "decltype(nullptr)", nullptr_type_node);
2791      nullptr_node = build_int_cst (nullptr_type_node, 0);
2792    }
2793 Index: gcc/cp/ChangeLog
2794 ===================================================================
2795 --- gcc/cp/ChangeLog    (.../tags/gcc_4_6_3_release)    (revision 190226)
2796 +++ gcc/cp/ChangeLog    (.../branches/gcc-4_6-branch)   (revision 190226)
2797 @@ -1,3 +1,20 @@
2798 +2012-06-25  Jason Merrill  <jason@redhat.com>
2799 +
2800 +       PR c++/52988
2801 +       * typeck.c (decay_conversion): Don't discard side-effects from
2802 +       expressions of nullptr_t.
2803 +
2804 +2012-04-04  Steve Ellcey <sje@cup.hp.com>
2805 +
2806 +       Backported from mainline.
2807 +       * decl.c (cxx_init_decl_processing): Use ptr_mode instead of Pmode.
2808 +
2809 +2012-04-03  Jason Merrill  <jason@redhat.com>
2810 +
2811 +       PR c++/52796
2812 +       * pt.c (tsubst_initializer_list): A pack expansion with no elements
2813 +       means value-initialization.
2814 +
2815  2012-03-01  Release Manager
2816  
2817         * GCC 4.6.3 released.
2818 Index: gcc/cp/pt.c
2819 ===================================================================
2820 --- gcc/cp/pt.c (.../tags/gcc_4_6_3_release)    (revision 190226)
2821 +++ gcc/cp/pt.c (.../branches/gcc-4_6-branch)   (revision 190226)
2822 @@ -17785,6 +17785,7 @@
2823              }
2824            else
2825              {
2826 +             tree tmp;
2827                decl = tsubst_copy (TREE_PURPOSE (t), argvec, 
2828                                    tf_warning_or_error, NULL_TREE);
2829  
2830 @@ -17793,10 +17794,17 @@
2831                  in_base_initializer = 1;
2832  
2833               init = TREE_VALUE (t);
2834 +             tmp = init;
2835               if (init != void_type_node)
2836                 init = tsubst_expr (init, argvec,
2837                                     tf_warning_or_error, NULL_TREE,
2838                                     /*integral_constant_expression_p=*/false);
2839 +             if (init == NULL_TREE && tmp != NULL_TREE)
2840 +               /* If we had an initializer but it instantiated to nothing,
2841 +                  value-initialize the object.  This will only occur when
2842 +                  the initializer was a pack expansion where the parameter
2843 +                  packs used in that expansion were of length zero.  */
2844 +               init = void_type_node;
2845                in_base_initializer = 0;
2846              }
2847  
2848 Index: gcc/cp/semantics.c
2849 ===================================================================
2850 --- gcc/cp/semantics.c  (.../tags/gcc_4_6_3_release)    (revision 190226)
2851 +++ gcc/cp/semantics.c  (.../branches/gcc-4_6-branch)   (revision 190226)
2852 @@ -6763,7 +6763,6 @@
2853  
2854    STRIP_NOPS (sub);
2855    subtype = TREE_TYPE (sub);
2856 -  gcc_assert (POINTER_TYPE_P (subtype));
2857  
2858    if (TREE_CODE (sub) == ADDR_EXPR)
2859      {
2860 Index: gcc/tree-ssa-ccp.c
2861 ===================================================================
2862 --- gcc/tree-ssa-ccp.c  (.../tags/gcc_4_6_3_release)    (revision 190226)
2863 +++ gcc/tree-ssa-ccp.c  (.../branches/gcc-4_6-branch)   (revision 190226)
2864 @@ -1364,6 +1364,10 @@
2865        if (!DECL_INITIAL (base)
2866           && (TREE_STATIC (base) || DECL_EXTERNAL (base)))
2867          return error_mark_node;
2868 +      /* Do not return an error_mark_node DECL_INITIAL.  LTO uses this
2869 +        as special marker (_not_ zero ...) for its own purposes.  */
2870 +      if (DECL_INITIAL (base) == error_mark_node)
2871 +       return NULL_TREE;
2872        return DECL_INITIAL (base);
2873  
2874      case ARRAY_REF:
2875 Index: gcc/expr.c
2876 ===================================================================
2877 --- gcc/expr.c  (.../tags/gcc_4_6_3_release)    (revision 190226)
2878 +++ gcc/expr.c  (.../branches/gcc-4_6-branch)   (revision 190226)
2879 @@ -5971,6 +5971,8 @@
2880                 || bitpos % GET_MODE_ALIGNMENT (mode))
2881                && SLOW_UNALIGNED_ACCESS (mode, MEM_ALIGN (target)))
2882               || (bitpos % BITS_PER_UNIT != 0)))
2883 +      || (bitsize >= 0 && mode != BLKmode
2884 +         && GET_MODE_BITSIZE (mode) > bitsize)
2885        /* If the RHS and field are a constant size and the size of the
2886          RHS isn't the same size as the bitfield, we must use bitfield
2887          operations.  */
2888 @@ -9182,6 +9184,7 @@
2889         orig_op0 = op0
2890           = expand_expr (tem,
2891                          (TREE_CODE (TREE_TYPE (tem)) == UNION_TYPE
2892 +                         && COMPLETE_TYPE_P (TREE_TYPE (tem))
2893                           && (TREE_CODE (TYPE_SIZE (TREE_TYPE (tem)))
2894                               != INTEGER_CST)
2895                           && modifier != EXPAND_STACK_PARM
2896 Index: gcc/gcov-iov.c
2897 ===================================================================
2898 --- gcc/gcov-iov.c      (.../tags/gcc_4_6_3_release)    (revision 190226)
2899 +++ gcc/gcov-iov.c      (.../branches/gcc-4_6-branch)   (revision 190226)
2900 @@ -19,8 +19,8 @@
2901  along with GCC; see the file COPYING3.  If not see
2902  <http://www.gnu.org/licenses/>.  */
2903  
2904 -#include <stdio.h>
2905 -#include <stdlib.h>
2906 +#include "bconfig.h"
2907 +#include "system.h"
2908  
2909  /* Command line arguments are the base GCC version and the development
2910     phase (the latter may be an empty string).  */
2911 @@ -48,8 +48,14 @@
2912    if (*ptr == '.')
2913      minor = strtoul (ptr + 1, 0, 10);
2914  
2915 +  /* For releases the development phase is an empty string, for
2916 +     prerelease versions on a release branch it is "prerelease".
2917 +     Consider both equal as patch-level releases do not change
2918 +     the GCOV version either.
2919 +     On the trunk the development phase is "experimental".  */
2920    phase = argv[2][0];
2921 -  if (phase == '\0')
2922 +  if (phase == '\0'
2923 +      || strcmp (argv[2], "prerelease") == 0)
2924      phase = '*';
2925  
2926    v[0] = (major < 10 ? '0' : 'A' - 10) + major;
2927 Index: gcc/predict.c
2928 ===================================================================
2929 --- gcc/predict.c       (.../tags/gcc_4_6_3_release)    (revision 190226)
2930 +++ gcc/predict.c       (.../branches/gcc-4_6-branch)   (revision 190226)
2931 @@ -1790,7 +1790,8 @@
2932  static void
2933  predict_paths_for_bb (basic_block cur, basic_block bb,
2934                       enum br_predictor pred,
2935 -                     enum prediction taken)
2936 +                     enum prediction taken,
2937 +                     bitmap visited)
2938  {
2939    edge e;
2940    edge_iterator ei;
2941 @@ -1811,7 +1812,7 @@
2942         continue;
2943        gcc_assert (bb == cur || dominated_by_p (CDI_POST_DOMINATORS, cur, bb));
2944  
2945 -      /* See if there is how many edge from e->src that is not abnormal
2946 +      /* See if there is an edge from e->src that is not abnormal
2947          and does not lead to BB.  */
2948        FOR_EACH_EDGE (e2, ei2, e->src->succs)
2949         if (e2 != e
2950 @@ -1824,16 +1825,20 @@
2951  
2952        /* If there is non-abnormal path leaving e->src, predict edge
2953          using predictor.  Otherwise we need to look for paths
2954 -        leading to e->src.  */
2955 +        leading to e->src.
2956 +
2957 +        The second may lead to infinite loop in the case we are predicitng
2958 +        regions that are only reachable by abnormal edges.  We simply
2959 +        prevent visiting given BB twice.  */
2960        if (found)
2961          predict_edge_def (e, pred, taken);
2962 -      else
2963 -       predict_paths_for_bb (e->src, e->src, pred, taken);
2964 +      else if (bitmap_set_bit (visited, e->src->index))
2965 +       predict_paths_for_bb (e->src, e->src, pred, taken, visited);
2966      }
2967    for (son = first_dom_son (CDI_POST_DOMINATORS, cur);
2968         son;
2969         son = next_dom_son (CDI_POST_DOMINATORS, son))
2970 -    predict_paths_for_bb (son, bb, pred, taken);
2971 +    predict_paths_for_bb (son, bb, pred, taken, visited);
2972  }
2973  
2974  /* Sets branch probabilities according to PREDiction and
2975 @@ -1843,7 +1848,9 @@
2976  predict_paths_leading_to (basic_block bb, enum br_predictor pred,
2977                           enum prediction taken)
2978  {
2979 -  predict_paths_for_bb (bb, bb, pred, taken);
2980 +  bitmap visited = BITMAP_ALLOC (NULL);
2981 +  predict_paths_for_bb (bb, bb, pred, taken, visited);
2982 +  BITMAP_FREE (visited);
2983  }
2984  
2985  /* Like predict_paths_leading_to but take edge instead of basic block.  */
2986 @@ -1866,7 +1873,11 @@
2987         break;
2988        }
2989    if (!has_nonloop_edge)
2990 -    predict_paths_for_bb (bb, bb, pred, taken);
2991 +    {
2992 +      bitmap visited = BITMAP_ALLOC (NULL);
2993 +      predict_paths_for_bb (bb, bb, pred, taken, visited);
2994 +      BITMAP_FREE (visited);
2995 +    }
2996    else
2997      predict_edge_def (e, pred, taken);
2998  }
2999 Index: gcc/ada/ChangeLog
3000 ===================================================================
3001 --- gcc/ada/ChangeLog   (.../tags/gcc_4_6_3_release)    (revision 190226)
3002 +++ gcc/ada/ChangeLog   (.../branches/gcc-4_6-branch)   (revision 190226)
3003 @@ -1,3 +1,12 @@
3004 +2012-05-26  Eric Botcazou  <ebotcazou@adacore.com>
3005 +
3006 +       * gcc-interface/decl.c (variant_desc): Rename 'record' to 'new_type'.
3007 +       (build_variant_list): Adjust to above renaming.
3008 +       (gnat_to_gnu_entity) <E_Record_Subtype>: Likewise.  Give a unique name
3009 +       to the type of the variant containers.
3010 +       (create_variant_part_from): Likewise.  Give a unique name to the type
3011 +       of the variant part.
3012 +
3013  2012-03-01  Release Manager
3014  
3015         * GCC 4.6.3 released.
3016 Index: gcc/ada/gcc-interface/decl.c
3017 ===================================================================
3018 --- gcc/ada/gcc-interface/decl.c        (.../tags/gcc_4_6_3_release)    (revision 190226)
3019 +++ gcc/ada/gcc-interface/decl.c        (.../branches/gcc-4_6-branch)   (revision 190226)
3020 @@ -120,8 +120,8 @@
3021    /* The value of the qualifier.  */
3022    tree qual;
3023  
3024 -  /* The record associated with this variant.  */
3025 -  tree record;
3026 +  /* The type of the variant after transformation.  */
3027 +  tree new_type;
3028  } variant_desc;
3029  
3030  DEF_VEC_O(variant_desc);
3031 @@ -3157,11 +3157,16 @@
3032                       {
3033                         tree old_variant = v->type;
3034                         tree new_variant = make_node (RECORD_TYPE);
3035 +                       tree suffix
3036 +                         = concat_name (DECL_NAME (gnu_variant_part),
3037 +                                        IDENTIFIER_POINTER
3038 +                                        (DECL_NAME (v->field)));
3039                         TYPE_NAME (new_variant)
3040 -                         = DECL_NAME (TYPE_NAME (old_variant));
3041 +                         = concat_name (TYPE_NAME (gnu_type),
3042 +                                        IDENTIFIER_POINTER (suffix));
3043                         copy_and_substitute_in_size (new_variant, old_variant,
3044                                                      gnu_subst_list);
3045 -                       v->record = new_variant;
3046 +                       v->new_type = new_variant;
3047                       }
3048                 }
3049               else
3050 @@ -3265,7 +3270,7 @@
3051                             if (selected_variant)
3052                               gnu_cont_type = gnu_type;
3053                             else
3054 -                             gnu_cont_type = v->record;
3055 +                             gnu_cont_type = v->new_type;
3056                           }
3057                         else
3058                           /* The front-end may pass us "ghost" components if
3059 @@ -7704,7 +7709,7 @@
3060           v->type = variant_type;
3061           v->field = gnu_field;
3062           v->qual = qual;
3063 -         v->record = NULL_TREE;
3064 +         v->new_type = NULL_TREE;
3065  
3066           /* Recurse on the variant subpart of the variant, if any.  */
3067           variant_subpart = get_variant_part (variant_type);
3068 @@ -8457,7 +8462,9 @@
3069  
3070    /* First create the type of the variant part from that of the old one.  */
3071    new_union_type = make_node (QUAL_UNION_TYPE);
3072 -  TYPE_NAME (new_union_type) = DECL_NAME (TYPE_NAME (old_union_type));
3073 +  TYPE_NAME (new_union_type)
3074 +    = concat_name (TYPE_NAME (record_type),
3075 +                  IDENTIFIER_POINTER (DECL_NAME (old_variant_part)));
3076  
3077    /* If the position of the variant part is constant, subtract it from the
3078       size of the type of the parent to get the new size.  This manual CSE
3079 @@ -8491,7 +8498,7 @@
3080         continue;
3081  
3082        /* Retrieve the list of fields already added to the new variant.  */
3083 -      new_variant = v->record;
3084 +      new_variant = v->new_type;
3085        field_list = TYPE_FIELDS (new_variant);
3086  
3087        /* If the old variant had a variant subpart, we need to create a new
3088 Index: gcc/fortran/trans-array.c
3089 ===================================================================
3090 --- gcc/fortran/trans-array.c   (.../tags/gcc_4_6_3_release)    (revision 190226)
3091 +++ gcc/fortran/trans-array.c   (.../branches/gcc-4_6-branch)   (revision 190226)
3092 @@ -2056,6 +2056,11 @@
3093    gfc_se se;
3094    int n;
3095  
3096 +  /* Don't evaluate the arguments for realloc_lhs_loop_for_fcn_call; otherwise,
3097 +     arguments could get evaluated multiple times.  */
3098 +  if (ss->is_alloc_lhs)
3099 +    return;
3100 +
3101    /* TODO: This can generate bad code if there are ordering dependencies,
3102       e.g., a callee allocated function and an unknown size constructor.  */
3103    gcc_assert (ss != NULL);
3104 @@ -7548,7 +7553,7 @@
3105    scalar = 1;
3106    for (; arg; arg = arg->next)
3107      {
3108 -      if (!arg->expr)
3109 +      if (!arg->expr || arg->expr->expr_type == EXPR_NULL)
3110         continue;
3111  
3112        newss = gfc_walk_subexpr (head, arg->expr);
3113 Index: gcc/fortran/decl.c
3114 ===================================================================
3115 --- gcc/fortran/decl.c  (.../tags/gcc_4_6_3_release)    (revision 190226)
3116 +++ gcc/fortran/decl.c  (.../branches/gcc-4_6-branch)   (revision 190226)
3117 @@ -3623,8 +3623,9 @@
3118         }
3119      }
3120  
3121 -  /* Module variables implicitly have the SAVE attribute.  */
3122 -  if (gfc_current_state () == COMP_MODULE && !current_attr.save)
3123 +  /* Since Fortran 2008 module variables implicitly have the SAVE attribute.  */
3124 +  if (gfc_current_state () == COMP_MODULE && !current_attr.save
3125 +      && (gfc_option.allow_std & GFC_STD_F2008) != 0)
3126      current_attr.save = SAVE_IMPLICIT;
3127  
3128    colon_seen = 1;
3129 Index: gcc/fortran/ChangeLog
3130 ===================================================================
3131 --- gcc/fortran/ChangeLog       (.../tags/gcc_4_6_3_release)    (revision 190226)
3132 +++ gcc/fortran/ChangeLog       (.../branches/gcc-4_6-branch)   (revision 190226)
3133 @@ -1,3 +1,60 @@
3134 +2012-07-14  Mikael Morin  <mikael@gcc.gnu.org>
3135 +
3136 +       Backport from trunk:
3137 +       2012-01-09  Mikael Morin  <mikael@gcc.gnu.org>
3138 +
3139 +       PR fortran/51758
3140 +       * trans-array.c (gfc_walk_elemental_function_args):
3141 +       Skip over NULL() actual arguments.
3142 +
3143 +2012-06-14  Tobias Burnus  <burnus@net-b.de>
3144 +
3145 +       PR fortran/53597
3146 +       * decl.c (match_attr_spec): Only mark module variables
3147 +       as SAVE_IMPLICIT for Fortran 2008 and later.
3148 +
3149 +2012-06-05  Tobias Burnus  <burnus@net-b.de>
3150 +
3151 +       PR fortran/50619
3152 +       * resolve.c (build_default_init_expr): Don't initialize
3153 +       ASSOCIATE names.
3154 +
3155 +2012-06-01  Tobias Burnus  <burnus@net-b.de>
3156 +
3157 +       PR fortran/53521
3158 +       * trans.c (gfc_deallocate_scalar_with_status): Properly
3159 +       handle the case size == 0.
3160 +
3161 +2012-05-23  Tobias Burnus  <burnus@net-b.de>
3162 +
3163 +       PR fortran/53389
3164 +       * trans-array.c (gfc_add_loop_ss_code): Don't evaluate
3165 +       expression, if ss->is_alloc_lhs is set.
3166 +
3167 +2012-05-02  Tobias Burnus  <burnus@net-b.de>
3168 +
3169 +       Backport from mainline
3170 +       2012-04-12  Tobias Burnus  <burnus@net-b.de>
3171 +
3172 +       PR fortran/52864
3173 +       * expr.c (gfc_check_vardef_context): Fix assignment check for
3174 +       pointer components.
3175 +
3176 +2012-03-10  Tobias Burnus  <burnus@net-b.de>
3177 +
3178 +       PR fortran/52469
3179 +       * trans-types.c (gfc_get_function_type): Handle backend_decl
3180 +       of a procedure pointer.
3181 +
3182 +2012-03-06  Tobias Burnus  <burnus@net-b.de>
3183 +
3184 +       Backport from mainline
3185 +       2012-03-02  Tobias Burnus  <burnus@net-b.de>
3186 +
3187 +       PR fortran/52452
3188 +       * resolve.c (resolve_intrinsic): Don't search for a
3189 +       function if we know that it is a subroutine.
3190 +
3191  2012-03-01  Release Manager
3192  
3193         * GCC 4.6.3 released.
3194 Index: gcc/fortran/expr.c
3195 ===================================================================
3196 --- gcc/fortran/expr.c  (.../tags/gcc_4_6_3_release)    (revision 190226)
3197 +++ gcc/fortran/expr.c  (.../branches/gcc-4_6-branch)   (revision 190226)
3198 @@ -4474,7 +4474,11 @@
3199        if (ptr_component && ref->type == REF_COMPONENT)
3200         check_intentin = false;
3201        if (ref->type == REF_COMPONENT && ref->u.c.component->attr.pointer)
3202 -       ptr_component = true;
3203 +       {
3204 +         ptr_component = true;
3205 +         if (!pointer)
3206 +           check_intentin = false;
3207 +       }
3208      }
3209    if (check_intentin && sym->attr.intent == INTENT_IN)
3210      {
3211 Index: gcc/fortran/trans.c
3212 ===================================================================
3213 --- gcc/fortran/trans.c (.../tags/gcc_4_6_3_release)    (revision 190226)
3214 +++ gcc/fortran/trans.c (.../branches/gcc-4_6-branch)   (revision 190226)
3215 @@ -1005,15 +1005,12 @@
3216    if (!res && size != 0)
3217      _gfortran_os_error ("Allocation would exceed memory limit");
3218  
3219 -  if (size == 0)
3220 -    return NULL;
3221 -
3222    return res;
3223  }  */
3224  tree
3225  gfc_call_realloc (stmtblock_t * block, tree mem, tree size)
3226  {
3227 -  tree msg, res, nonzero, zero, null_result, tmp;
3228 +  tree msg, res, nonzero, null_result, tmp;
3229    tree type = TREE_TYPE (mem);
3230  
3231    size = gfc_evaluate_now (size, block);
3232 @@ -1044,15 +1041,6 @@
3233                          build_empty_stmt (input_location));
3234    gfc_add_expr_to_block (block, tmp);
3235  
3236 -  /* if (size == 0) then the result is NULL.  */
3237 -  tmp = fold_build2_loc (input_location, MODIFY_EXPR, type, res,
3238 -                        build_int_cst (type, 0));
3239 -  zero = fold_build1_loc (input_location, TRUTH_NOT_EXPR, boolean_type_node,
3240 -                         nonzero);
3241 -  tmp = fold_build3_loc (input_location, COND_EXPR, void_type_node, zero, tmp,
3242 -                        build_empty_stmt (input_location));
3243 -  gfc_add_expr_to_block (block, tmp);
3244 -
3245    return res;
3246  }
3247  
3248 Index: gcc/fortran/trans-types.c
3249 ===================================================================
3250 --- gcc/fortran/trans-types.c   (.../tags/gcc_4_6_3_release)    (revision 190226)
3251 +++ gcc/fortran/trans-types.c   (.../branches/gcc-4_6-branch)   (revision 190226)
3252 @@ -2519,7 +2519,11 @@
3253               || sym->attr.flavor == FL_PROGRAM);
3254  
3255    if (sym->backend_decl)
3256 -    return TREE_TYPE (sym->backend_decl);
3257 +    {
3258 +      if (sym->attr.proc_pointer)
3259 +       return TREE_TYPE (TREE_TYPE (sym->backend_decl));
3260 +      return TREE_TYPE (sym->backend_decl);
3261 +    }
3262  
3263    alternate_return = 0;
3264    typelist = NULL_TREE;
3265 Index: gcc/fortran/resolve.c
3266 ===================================================================
3267 --- gcc/fortran/resolve.c       (.../tags/gcc_4_6_3_release)    (revision 190226)
3268 +++ gcc/fortran/resolve.c       (.../branches/gcc-4_6-branch)   (revision 190226)
3269 @@ -1452,7 +1452,7 @@
3270  
3271    if (sym->intmod_sym_id)
3272      isym = gfc_intrinsic_function_by_id ((gfc_isym_id) sym->intmod_sym_id);
3273 -  else
3274 +  else if (!sym->attr.subroutine)
3275      isym = gfc_find_function (sym->name);
3276  
3277    if (isym)
3278 @@ -9700,7 +9700,8 @@
3279        || sym->attr.data
3280        || sym->module
3281        || sym->attr.cray_pointee
3282 -      || sym->attr.cray_pointer)
3283 +      || sym->attr.cray_pointer
3284 +      || sym->assoc)
3285      return NULL;
3286  
3287    /* Now we'll try to build an initializer expression.  */
3288 Index: gcc/BASE-VER
3289 ===================================================================
3290 --- gcc/BASE-VER        (.../tags/gcc_4_6_3_release)    (revision 190226)
3291 +++ gcc/BASE-VER        (.../branches/gcc-4_6-branch)   (revision 190226)
3292 @@ -1 +1 @@
3293 -4.6.3
3294 +4.6.4
3295 Index: gcc/stor-layout.c
3296 ===================================================================
3297 --- gcc/stor-layout.c   (.../tags/gcc_4_6_3_release)    (revision 190226)
3298 +++ gcc/stor-layout.c   (.../branches/gcc-4_6-branch)   (revision 190226)
3299 @@ -660,12 +660,13 @@
3300           /* See if we can use an ordinary integer mode for a bit-field.
3301              Conditions are: a fixed size that is correct for another mode,
3302              occupying a complete byte or bytes on proper boundary,
3303 -            and not volatile or not -fstrict-volatile-bitfields.  */
3304 +            and not -fstrict-volatile-bitfields.  If the latter is set,
3305 +            we unfortunately can't check TREE_THIS_VOLATILE, as a cast
3306 +            may make a volatile object later.  */
3307           if (TYPE_SIZE (type) != 0
3308               && TREE_CODE (TYPE_SIZE (type)) == INTEGER_CST
3309               && GET_MODE_CLASS (TYPE_MODE (type)) == MODE_INT
3310 -             && !(TREE_THIS_VOLATILE (decl)
3311 -                  && flag_strict_volatile_bitfields > 0))
3312 +             && flag_strict_volatile_bitfields <= 0)
3313             {
3314               enum machine_mode xmode
3315                 = mode_for_size_tree (DECL_SIZE (decl), MODE_INT, 1);
3316 Index: gcc/tree-vect-loop.c
3317 ===================================================================
3318 --- gcc/tree-vect-loop.c        (.../tags/gcc_4_6_3_release)    (revision 190226)
3319 +++ gcc/tree-vect-loop.c        (.../branches/gcc-4_6-branch)   (revision 190226)
3320 @@ -2104,7 +2104,8 @@
3321            if (stmt_info
3322                && !STMT_VINFO_RELEVANT_P (stmt_info)
3323                && (!STMT_VINFO_LIVE_P (stmt_info)
3324 -                  || STMT_VINFO_DEF_TYPE (stmt_info) != vect_reduction_def))
3325 +                  || !VECTORIZABLE_CYCLE_DEF (STMT_VINFO_DEF_TYPE (stmt_info)))
3326 +             && !STMT_VINFO_IN_PATTERN_P (stmt_info))
3327              continue;
3328  
3329            if (STMT_VINFO_DATA_REF (vinfo_for_stmt (stmt)))
3330 @@ -2251,11 +2252,19 @@
3331         {
3332           gimple stmt = gsi_stmt (si);
3333           stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
3334 +
3335 +         if (STMT_VINFO_IN_PATTERN_P (stmt_info))
3336 +           {
3337 +             stmt = STMT_VINFO_RELATED_STMT (stmt_info);
3338 +             stmt_info = vinfo_for_stmt (stmt);
3339 +           }
3340 +
3341           /* Skip stmts that are not vectorized inside the loop.  */
3342           if (!STMT_VINFO_RELEVANT_P (stmt_info)
3343               && (!STMT_VINFO_LIVE_P (stmt_info)
3344 -                 || STMT_VINFO_DEF_TYPE (stmt_info) != vect_reduction_def))
3345 +                 || !VECTORIZABLE_CYCLE_DEF (STMT_VINFO_DEF_TYPE (stmt_info))))
3346             continue;
3347 +
3348           vec_inside_cost += STMT_VINFO_INSIDE_OF_LOOP_COST (stmt_info) * factor;
3349           /* FIXME: for stmts in the inner-loop in outer-loop vectorization,
3350              some of the "outside" costs are generated inside the outer-loop.  */
3351 Index: gcc/c-typeck.c
3352 ===================================================================
3353 --- gcc/c-typeck.c      (.../tags/gcc_4_6_3_release)    (revision 190226)
3354 +++ gcc/c-typeck.c      (.../branches/gcc-4_6-branch)   (revision 190226)
3355 @@ -4315,6 +4315,11 @@
3356      ret = fold_build3_loc (colon_loc, COND_EXPR, result_type, ifexp, op1, op2);
3357    else
3358      {
3359 +      if (int_operands)
3360 +       {
3361 +         op1 = remove_c_maybe_const_expr (op1);
3362 +         op2 = remove_c_maybe_const_expr (op2);
3363 +       }
3364        ret = build3 (COND_EXPR, result_type, ifexp, op1, op2);
3365        if (int_operands)
3366         ret = note_integer_operands (ret);
3367 Index: gcc/tree-sra.c
3368 ===================================================================
3369 --- gcc/tree-sra.c      (.../tags/gcc_4_6_3_release)    (revision 190226)
3370 +++ gcc/tree-sra.c      (.../branches/gcc-4_6-branch)   (revision 190226)
3371 @@ -2937,7 +2937,13 @@
3372      }
3373    else
3374      {
3375 -      if (access_has_children_p (lacc) && access_has_children_p (racc))
3376 +      if (access_has_children_p (lacc)
3377 +         && access_has_children_p (racc)
3378 +         /* When an access represents an unscalarizable region, it usually
3379 +            represents accesses with variable offset and thus must not be used
3380 +            to generate new memory accesses.  */
3381 +         && !lacc->grp_unscalarizable_region
3382 +         && !racc->grp_unscalarizable_region)
3383         {
3384           gimple_stmt_iterator orig_gsi = *gsi;
3385           enum unscalarized_data_handling refreshed;
3386 Index: gcc/lto/lto.c
3387 ===================================================================
3388 --- gcc/lto/lto.c       (.../tags/gcc_4_6_3_release)    (revision 190226)
3389 +++ gcc/lto/lto.c       (.../branches/gcc-4_6-branch)   (revision 190226)
3390 @@ -893,7 +893,8 @@
3391  
3392    for (node = cgraph_nodes; node; node = node->next)
3393      {
3394 -      if (!partition_cgraph_node_p (node))
3395 +      if (!partition_cgraph_node_p (node)
3396 +         || node->aux)
3397         continue;
3398  
3399        file_data = node->local.lto_file_data;
3400 @@ -923,13 +924,13 @@
3401           npartitions++;
3402         }
3403  
3404 -      if (!node->aux)
3405 -        add_cgraph_node_to_partition (partition, node);
3406 +      add_cgraph_node_to_partition (partition, node);
3407      }
3408  
3409    for (vnode = varpool_nodes; vnode; vnode = vnode->next)
3410      {
3411 -      if (!partition_varpool_node_p (vnode))
3412 +      if (!partition_varpool_node_p (vnode)
3413 +         || vnode->aux)
3414         continue;
3415        file_data = vnode->lto_file_data;
3416        slot = pointer_map_contains (pmap, file_data);
3417 @@ -943,8 +944,7 @@
3418           npartitions++;
3419         }
3420  
3421 -      if (!vnode->aux)
3422 -        add_varpool_node_to_partition (partition, vnode);
3423 +      add_varpool_node_to_partition (partition, vnode);
3424      }
3425    for (node = cgraph_nodes; node; node = node->next)
3426      node->aux = NULL;
3427 @@ -1050,8 +1050,9 @@
3428  
3429    for (i = 0; i < n_nodes; i++)
3430      {
3431 -      if (!order[i]->aux)
3432 -        add_cgraph_node_to_partition (partition, order[i]);
3433 +      if (order[i]->aux)
3434 +       continue;
3435 +      add_cgraph_node_to_partition (partition, order[i]);
3436        total_size -= order[i]->global.size;
3437  
3438        /* Once we added a new node to the partition, we also want to add
3439 @@ -1231,6 +1232,8 @@
3440             }
3441           i = best_i;
3442           /* When we are finished, avoid creating empty partition.  */
3443 +         while (i < n_nodes - 1 && order[i + 1]->aux)
3444 +           i++;
3445           if (i == n_nodes - 1)
3446             break;
3447           partition = new_partition ("");
3448 Index: gcc/lto/ChangeLog
3449 ===================================================================
3450 --- gcc/lto/ChangeLog   (.../tags/gcc_4_6_3_release)    (revision 190226)
3451 +++ gcc/lto/ChangeLog   (.../branches/gcc-4_6-branch)   (revision 190226)
3452 @@ -1,3 +1,12 @@
3453 +2012-04-23  Peter Bergner  <bergner@vnet.ibm.com>
3454 +
3455 +       Backport from mainline
3456 +       2011-06-11  Jan Hubicka  <jh@suse.cz>
3457 +
3458 +       PR lto/48246
3459 +       * lto.c (lto_1_to_1_map): Don't create empty partitions.
3460 +       (lto_balanced_map): Likewise.
3461 +
3462  2012-03-01  Release Manager
3463  
3464         * GCC 4.6.3 released.
3465 Index: gcc/ipa-prop.c
3466 ===================================================================
3467 --- gcc/ipa-prop.c      (.../tags/gcc_4_6_3_release)    (revision 190226)
3468 +++ gcc/ipa-prop.c      (.../branches/gcc-4_6-branch)   (revision 190226)
3469 @@ -704,12 +704,11 @@
3470        || is_global_var (base))
3471      return;
3472  
3473 -  if (detect_type_change (op, base, call, jfunc, offset))
3474 +  binfo = TYPE_BINFO (TREE_TYPE (base));
3475 +  if (!binfo
3476 +      || detect_type_change (op, base, call, jfunc, offset))
3477      return;
3478  
3479 -  binfo = TYPE_BINFO (TREE_TYPE (base));
3480 -  if (!binfo)
3481 -    return;
3482    binfo = get_binfo_at_offset (binfo, offset, TREE_TYPE (op));
3483    if (binfo)
3484      {
3485 Index: gcc/varasm.c
3486 ===================================================================
3487 --- gcc/varasm.c        (.../tags/gcc_4_6_3_release)    (revision 190226)
3488 +++ gcc/varasm.c        (.../branches/gcc-4_6-branch)   (revision 190226)
3489 @@ -1,7 +1,7 @@
3490  /* Output variables, constants and external declarations, for GNU compiler.
3491     Copyright (C) 1987, 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997,
3492     1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
3493 -   2010, 2011  Free Software Foundation, Inc.
3494 +   2010, 2011, 2012  Free Software Foundation, Inc.
3495  
3496  This file is part of GCC.
3497  
3498 @@ -30,6 +30,7 @@
3499  #include "config.h"
3500  #include "system.h"
3501  #include "coretypes.h"
3502 +#include "pointer-set.h"
3503  #include "tm.h"
3504  #include "rtl.h"
3505  #include "tree.h"
3506 @@ -2097,6 +2098,19 @@
3507     it all the way to final.  See PR 17982 for further discussion.  */
3508  static GTY(()) tree pending_assemble_externals;
3509  
3510 +/* FIXME: Trunk is at GCC 4.8 now and the above problem still hasn't been
3511 +   addressed properly.  This caused PR 52640 due to O(external_decls**2)
3512 +   lookups in the pending_assemble_externals TREE_LIST in assemble_external.
3513 +   Paper over with this pointer set, which we use to see if we have already
3514 +   added a decl to pending_assemble_externals without first traversing
3515 +   the entire pending_assemble_externals list.  See assemble_external().  */
3516 +static struct pointer_set_t *pending_assemble_externals_set;
3517 +
3518 +/* Some targets delay some output to final using TARGET_ASM_FILE_END.
3519 +   As a result, assemble_external can be called after the list of externals
3520 +   is processed and the pointer set destroyed.  */
3521 +static bool pending_assemble_externals_processed;
3522 +
3523  #ifdef ASM_OUTPUT_EXTERNAL
3524  /* True if DECL is a function decl for which no out-of-line copy exists.
3525     It is assumed that DECL's assembler name has been set.  */
3526 @@ -2146,6 +2160,8 @@
3527      assemble_external_real (TREE_VALUE (list));
3528  
3529    pending_assemble_externals = 0;
3530 +  pending_assemble_externals_processed = true;
3531 +  pointer_set_destroy (pending_assemble_externals_set);
3532  #endif
3533  }
3534  
3535 @@ -2186,7 +2202,13 @@
3536      weak_decls = tree_cons (NULL, decl, weak_decls);
3537  
3538  #ifdef ASM_OUTPUT_EXTERNAL
3539 -  if (value_member (decl, pending_assemble_externals) == NULL_TREE)
3540 +  if (pending_assemble_externals_processed)
3541 +    {
3542 +      assemble_external_real (decl);
3543 +      return;
3544 +    }
3545 +
3546 +  if (! pointer_set_insert (pending_assemble_externals_set, decl))
3547      pending_assemble_externals = tree_cons (NULL, decl,
3548                                             pending_assemble_externals);
3549  #endif
3550 @@ -3922,6 +3944,13 @@
3551            tem = TREE_OPERAND (tem, 0))
3552         ;
3553  
3554 +      if (TREE_CODE (tem) == MEM_REF
3555 +         && TREE_CODE (TREE_OPERAND (tem, 0)) == ADDR_EXPR)
3556 +       {
3557 +         reloc = compute_reloc_for_constant (TREE_OPERAND (tem, 0));
3558 +         break;
3559 +       }
3560 +
3561        if (TREE_PUBLIC (tem))
3562         reloc |= 2;
3563        else
3564 @@ -3990,6 +4019,9 @@
3565  
3566        if (CONSTANT_CLASS_P (tem) || TREE_CODE (tem) == CONSTRUCTOR)
3567         output_constant_def (tem, 0);
3568 +
3569 +      if (TREE_CODE (tem) == MEM_REF)
3570 +       output_addressed_constants (TREE_OPERAND (tem, 0));
3571        break;
3572  
3573      case PLUS_EXPR:
3574 @@ -6019,6 +6051,10 @@
3575  
3576    if (readonly_data_section == NULL)
3577      readonly_data_section = text_section;
3578 +
3579 +#ifdef ASM_OUTPUT_EXTERNAL
3580 +  pending_assemble_externals_set = pointer_set_create ();
3581 +#endif
3582  }
3583  
3584  enum tls_model
3585 Index: gcc/tree-vect-stmts.c
3586 ===================================================================
3587 --- gcc/tree-vect-stmts.c       (.../tags/gcc_4_6_3_release)    (revision 190226)
3588 +++ gcc/tree-vect-stmts.c       (.../branches/gcc-4_6-branch)   (revision 190226)
3589 @@ -623,6 +623,46 @@
3590  }
3591  
3592  
3593 +/* Model cost for type demotion and promotion operations.  PWR is normally
3594 +   zero for single-step promotions and demotions.  It will be one if 
3595 +   two-step promotion/demotion is required, and so on.  Each additional
3596 +   step doubles the number of instructions required.  */
3597 +
3598 +static void
3599 +vect_model_promotion_demotion_cost (stmt_vec_info stmt_info,
3600 +                                   enum vect_def_type *dt, int pwr)
3601 +{
3602 +  int i, tmp;
3603 +  int inside_cost = 0, outside_cost = 0, single_stmt_cost;
3604 +
3605 +  /* The SLP costs were already calculated during SLP tree build.  */
3606 +  if (PURE_SLP_STMT (stmt_info))
3607 +    return;
3608 +
3609 +  single_stmt_cost = vect_get_stmt_cost (vec_promote_demote);
3610 +  for (i = 0; i < pwr + 1; i++)
3611 +    {
3612 +      tmp = (STMT_VINFO_TYPE (stmt_info) == type_promotion_vec_info_type) ?
3613 +       (i + 1) : i;
3614 +      inside_cost += vect_pow2 (tmp) * single_stmt_cost;
3615 +    }
3616 +
3617 +  /* FORNOW: Assuming maximum 2 args per stmts.  */
3618 +  for (i = 0; i < 2; i++)
3619 +    {
3620 +      if (dt[i] == vect_constant_def || dt[i] == vect_external_def)
3621 +        outside_cost += vect_get_stmt_cost (vector_stmt);
3622 +    }
3623 +
3624 +  if (vect_print_dump_info (REPORT_COST))
3625 +    fprintf (vect_dump, "vect_model_promotion_demotion_cost: inside_cost = %d, "
3626 +             "outside_cost = %d .", inside_cost, outside_cost);
3627 +
3628 +  /* Set the costs in STMT_INFO.  */
3629 +  stmt_vinfo_set_inside_of_loop_cost (stmt_info, NULL, inside_cost);
3630 +  stmt_vinfo_set_outside_of_loop_cost (stmt_info, NULL, outside_cost);
3631 +}
3632 +
3633  /* Function vect_cost_strided_group_size
3634  
3635     For strided load or store, return the group_size only if it is the first
3636 @@ -691,7 +731,7 @@
3637      {
3638        /* Uses a high and low interleave operation for each needed permute.  */
3639        inside_cost = ncopies * exact_log2(group_size) * group_size
3640 -        * vect_get_stmt_cost (vector_stmt);
3641 +        * vect_get_stmt_cost (vec_perm);
3642  
3643        if (vect_print_dump_info (REPORT_COST))
3644          fprintf (vect_dump, "vect_model_store_cost: strided group_size = %d .",
3645 @@ -795,7 +835,7 @@
3646      {
3647        /* Uses an even and odd extract operations for each needed permute.  */
3648        inside_cost = ncopies * exact_log2(group_size) * group_size
3649 -       * vect_get_stmt_cost (vector_stmt);
3650 +       * vect_get_stmt_cost (vec_perm);
3651  
3652        if (vect_print_dump_info (REPORT_COST))
3653          fprintf (vect_dump, "vect_model_load_cost: strided group_size = %d .",
3654 @@ -855,7 +895,7 @@
3655      case dr_explicit_realign:
3656        {
3657          *inside_cost += ncopies * (2 * vect_get_stmt_cost (vector_load)
3658 -           + vect_get_stmt_cost (vector_stmt));
3659 +                                  + vect_get_stmt_cost (vec_perm));
3660  
3661          /* FIXME: If the misalignment remains fixed across the iterations of
3662             the containing loop, the following cost should be added to the
3663 @@ -863,6 +903,9 @@
3664          if (targetm.vectorize.builtin_mask_for_load)
3665            *inside_cost += vect_get_stmt_cost (vector_stmt);
3666  
3667 +        if (vect_print_dump_info (REPORT_COST))
3668 +          fprintf (vect_dump, "vect_model_load_cost: explicit realign");
3669 +
3670          break;
3671        }
3672      case dr_explicit_realign_optimized:
3673 @@ -886,7 +929,12 @@
3674            }
3675  
3676          *inside_cost += ncopies * (vect_get_stmt_cost (vector_load)
3677 -          + vect_get_stmt_cost (vector_stmt));
3678 +                                  + vect_get_stmt_cost (vec_perm));
3679 +
3680 +        if (vect_print_dump_info (REPORT_COST))
3681 +          fprintf (vect_dump,
3682 +                  "vect_model_load_cost: explicit realign optimized");
3683 +
3684          break;
3685        }
3686  
3687 @@ -2919,7 +2967,7 @@
3688        STMT_VINFO_TYPE (stmt_info) = type_demotion_vec_info_type;
3689        if (vect_print_dump_info (REPORT_DETAILS))
3690          fprintf (vect_dump, "=== vectorizable_demotion ===");
3691 -      vect_model_simple_cost (stmt_info, ncopies, dt, NULL);
3692 +      vect_model_promotion_demotion_cost (stmt_info, dt, multi_step_cvt);
3693        return true;
3694      }
3695  
3696 @@ -3217,7 +3265,7 @@
3697        STMT_VINFO_TYPE (stmt_info) = type_promotion_vec_info_type;
3698        if (vect_print_dump_info (REPORT_DETAILS))
3699          fprintf (vect_dump, "=== vectorizable_promotion ===");
3700 -      vect_model_simple_cost (stmt_info, 2*ncopies, dt, NULL);
3701 +      vect_model_promotion_demotion_cost (stmt_info, dt, multi_step_cvt);
3702        return true;
3703      }
3704  
3705 Index: gcc/tree-inline.c
3706 ===================================================================
3707 --- gcc/tree-inline.c   (.../tags/gcc_4_6_3_release)    (revision 190226)
3708 +++ gcc/tree-inline.c   (.../branches/gcc-4_6-branch)   (revision 190226)
3709 @@ -4947,7 +4947,7 @@
3710                 if ((e = cgraph_edge (id->dst_node, gsi_stmt (bsi))) != NULL)
3711                   {
3712                     if (!e->inline_failed)
3713 -                     cgraph_remove_node_and_inline_clones (e->callee);
3714 +                     cgraph_remove_node_and_inline_clones (e->callee, id->dst_node);
3715                     else
3716                       cgraph_remove_edge (e);
3717                   }
3718 @@ -4957,8 +4957,8 @@
3719                     {
3720                       if ((e = cgraph_edge (node, gsi_stmt (bsi))) != NULL)
3721                         {
3722 -                         if (!e->inline_failed)
3723 -                           cgraph_remove_node_and_inline_clones (e->callee);
3724 +                         if (!e->inline_failed && e->callee != id->src_node)
3725 +                           cgraph_remove_node_and_inline_clones (e->callee, id->dst_node);
3726                           else
3727                             cgraph_remove_edge (e);
3728                         }
3729 Index: gcc/combine.c
3730 ===================================================================
3731 --- gcc/combine.c       (.../tags/gcc_4_6_3_release)    (revision 190226)
3732 +++ gcc/combine.c       (.../branches/gcc-4_6-branch)   (revision 190226)
3733 @@ -1788,6 +1788,10 @@
3734    if (set == 0)
3735      return 0;
3736  
3737 +  /* The simplification in expand_field_assignment may call back to
3738 +     get_last_value, so set safe guard here.  */
3739 +  subst_low_luid = DF_INSN_LUID (insn);
3740 +
3741    set = expand_field_assignment (set);
3742    src = SET_SRC (set), dest = SET_DEST (set);
3743  
3744 Index: gcc/df-problems.c
3745 ===================================================================
3746 --- gcc/df-problems.c   (.../tags/gcc_4_6_3_release)    (revision 190226)
3747 +++ gcc/df-problems.c   (.../branches/gcc-4_6-branch)   (revision 190226)
3748 @@ -3956,6 +3956,19 @@
3749    df_simulate_initialize_backwards (merge_bb, test_use);
3750    for (insn = across_to; ; insn = next)
3751      {
3752 +      if (CALL_P (insn))
3753 +       {
3754 +         if (RTL_CONST_OR_PURE_CALL_P (insn))
3755 +           /* Pure functions can read from memory.  Const functions can
3756 +              read from arguments that the ABI has forced onto the stack.
3757 +              Neither sort of read can be volatile.  */
3758 +           memrefs_in_across |= MEMREF_NORMAL;
3759 +         else
3760 +           {
3761 +             memrefs_in_across |= MEMREF_VOLATILE;
3762 +             mem_sets_in_across |= MEMREF_VOLATILE;
3763 +           }
3764 +       }
3765        if (NONDEBUG_INSN_P (insn))
3766         {
3767           df_simulate_find_defs (insn, test_set);
3768 Index: gcc/config.gcc
3769 ===================================================================
3770 --- gcc/config.gcc      (.../tags/gcc_4_6_3_release)    (revision 190226)
3771 +++ gcc/config.gcc      (.../branches/gcc-4_6-branch)   (revision 190226)
3772 @@ -817,7 +817,7 @@
3773  arm*-*-linux*)                 # ARM GNU/Linux with ELF
3774         tm_file="dbxelf.h elfos.h gnu-user.h linux.h linux-android.h glibc-stdint.h arm/elf.h arm/linux-gas.h arm/linux-elf.h"
3775         case $target in
3776 -       arm*b-*)
3777 +       arm*b-*-linux*)
3778                 tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
3779                 ;;
3780         esac
3781 @@ -925,7 +925,7 @@
3782         extra_objs="avr-devices.o"
3783         ;;
3784  avr-*-*)
3785 -       tm_file="avr/avr.h dbxelf.h newlib-stdint.h"
3786 +       tm_file="avr/avr.h dbxelf.h avr/avr-stdint.h"
3787         use_gcc_stdint=wrap
3788         extra_gcc_objs="driver-avr.o avr-devices.o"
3789         extra_objs="avr-devices.o"
3790 Index: gcc/gimple.c
3791 ===================================================================
3792 --- gcc/gimple.c        (.../tags/gcc_4_6_3_release)    (revision 190226)
3793 +++ gcc/gimple.c        (.../branches/gcc-4_6-branch)   (revision 190226)
3794 @@ -2275,8 +2275,6 @@
3795  bool
3796  gimple_has_side_effects (const_gimple s)
3797  {
3798 -  unsigned i;
3799 -
3800    if (is_gimple_debug (s))
3801      return false;
3802  
3803 @@ -2292,45 +2290,15 @@
3804  
3805    if (is_gimple_call (s))
3806      {
3807 -      unsigned nargs = gimple_call_num_args (s);
3808 +      int flags = gimple_call_flags (s);
3809  
3810 -      if (!(gimple_call_flags (s) & (ECF_CONST | ECF_PURE)))
3811 -        return true;
3812 -      else if (gimple_call_flags (s) & ECF_LOOPING_CONST_OR_PURE)
3813 -       /* An infinite loop is considered a side effect.  */
3814 +      /* An infinite loop is considered a side effect.  */
3815 +      if (!(flags & (ECF_CONST | ECF_PURE))
3816 +         || (flags & ECF_LOOPING_CONST_OR_PURE))
3817         return true;
3818  
3819 -      if (gimple_call_lhs (s)
3820 -          && TREE_SIDE_EFFECTS (gimple_call_lhs (s)))
3821 -       {
3822 -         gcc_checking_assert (gimple_has_volatile_ops (s));
3823 -         return true;
3824 -       }
3825 -
3826 -      if (TREE_SIDE_EFFECTS (gimple_call_fn (s)))
3827 -        return true;
3828 -
3829 -      for (i = 0; i < nargs; i++)
3830 -        if (TREE_SIDE_EFFECTS (gimple_call_arg (s, i)))
3831 -         {
3832 -           gcc_checking_assert (gimple_has_volatile_ops (s));
3833 -           return true;
3834 -         }
3835 -
3836        return false;
3837      }
3838 -  else
3839 -    {
3840 -      for (i = 0; i < gimple_num_ops (s); i++)
3841 -       {
3842 -         tree op = gimple_op (s, i);
3843 -         if (op && TREE_SIDE_EFFECTS (op))
3844 -           {
3845 -             gcc_checking_assert (gimple_has_volatile_ops (s));
3846 -             return true;
3847 -           }
3848 -       }
3849 -    }
3850  
3851    return false;
3852  }
3853 Index: gcc/gthr-posix.h
3854 ===================================================================
3855 --- gcc/gthr-posix.h    (.../tags/gcc_4_6_3_release)    (revision 190226)
3856 +++ gcc/gthr-posix.h    (.../branches/gcc-4_6-branch)   (revision 190226)
3857 @@ -239,16 +239,15 @@
3858  static inline int
3859  __gthread_active_p (void)
3860  {
3861 -  static void *const __gthread_active_ptr
3862 -    = __extension__ (void *) &__gthrw_(
3863  /* Android's C library does not provide pthread_cancel, check for
3864     `pthread_create' instead.  */
3865  #ifndef __BIONIC__
3866 -                                      pthread_cancel
3867 +  static void *const __gthread_active_ptr
3868 +    = __extension__ (void *) &__gthrw_(pthread_cancel);
3869  #else
3870 -                                      pthread_create
3871 +  static void *const __gthread_active_ptr
3872 +    = __extension__ (void *) &__gthrw_(pthread_create);
3873  #endif
3874 -                                      );
3875    return __gthread_active_ptr != 0;
3876  }
3877  
3878 Index: gcc/config/alpha/linux-unwind.h
3879 ===================================================================
3880 --- gcc/config/alpha/linux-unwind.h     (.../tags/gcc_4_6_3_release)    (revision 190226)
3881 +++ gcc/config/alpha/linux-unwind.h     (.../branches/gcc-4_6-branch)   (revision 190226)
3882 @@ -1,5 +1,5 @@
3883  /* DWARF2 EH unwinding support for Alpha Linux.
3884 -   Copyright (C) 2004, 2005, 2009, 2011 Free Software Foundation, Inc.
3885 +   Copyright (C) 2004, 2005, 2009, 2011, 2012 Free Software Foundation, Inc.
3886  
3887  This file is part of GCC.
3888  
3889 @@ -49,7 +49,7 @@
3890    else if (pc[1] == 0x201f015f)                /* lda $0,NR_rt_sigreturn */
3891      {
3892        struct rt_sigframe {
3893 -       struct siginfo info;
3894 +       siginfo_t info;
3895         struct ucontext uc;
3896        } *rt_ = context->cfa;
3897        sc = &rt_->uc.uc_mcontext;
3898 Index: gcc/config/alpha/alpha.c
3899 ===================================================================
3900 --- gcc/config/alpha/alpha.c    (.../tags/gcc_4_6_3_release)    (revision 190226)
3901 +++ gcc/config/alpha/alpha.c    (.../branches/gcc-4_6-branch)   (revision 190226)
3902 @@ -2469,7 +2469,7 @@
3903      {
3904      case EQ:  case LE:  case LT:  case LEU:  case LTU:
3905      case UNORDERED:
3906 -      /* We have these compares: */
3907 +      /* We have these compares.  */
3908        cmp_code = code, branch_code = NE;
3909        break;
3910  
3911 @@ -2706,13 +2706,15 @@
3912        switch (code)
3913         {
3914         case EQ: case LE: case LT: case LEU: case LTU:
3915 +       case UNORDERED:
3916           /* We have these compares.  */
3917           cmp_code = code, code = NE;
3918           break;
3919  
3920         case NE:
3921 -         /* This must be reversed.  */
3922 -         cmp_code = EQ, code = EQ;
3923 +       case ORDERED:
3924 +         /* These must be reversed.  */
3925 +         cmp_code = reverse_condition (code), code = EQ;
3926           break;
3927  
3928         case GE: case GT: case GEU: case GTU:
3929 @@ -2732,6 +2734,14 @@
3930           gcc_unreachable ();
3931         }
3932  
3933 +      if (cmp_mode == DImode)
3934 +       {
3935 +         if (!reg_or_0_operand (op0, DImode))
3936 +           op0 = force_reg (DImode, op0);
3937 +         if (!reg_or_8bit_operand (op1, DImode))
3938 +           op1 = force_reg (DImode, op1);
3939 +       }
3940 +
3941        tem = gen_reg_rtx (cmp_mode);
3942        emit_insn (gen_rtx_SET (VOIDmode, tem,
3943                               gen_rtx_fmt_ee (cmp_code, cmp_mode,
3944 @@ -2743,6 +2753,14 @@
3945        local_fast_math = 1;
3946      }
3947  
3948 +  if (cmp_mode == DImode)
3949 +    {
3950 +      if (!reg_or_0_operand (op0, DImode))
3951 +       op0 = force_reg (DImode, op0);
3952 +      if (!reg_or_8bit_operand (op1, DImode))
3953 +       op1 = force_reg (DImode, op1);
3954 +    }
3955 +
3956    /* We may be able to use a conditional move directly.
3957       This avoids emitting spurious compares.  */
3958    if (signed_comparison_operator (cmp, VOIDmode)
3959 @@ -2761,11 +2779,13 @@
3960    switch (code)
3961      {
3962      case EQ:  case LE:  case LT:  case LEU:  case LTU:
3963 +    case UNORDERED:
3964        /* We have these compares: */
3965        break;
3966  
3967      case NE:
3968 -      /* This must be reversed.  */
3969 +    case ORDERED:
3970 +      /* These must be reversed.  */
3971        code = reverse_condition (code);
3972        cmov_code = EQ;
3973        break;
3974 Index: gcc/config/m32c/m32c.c
3975 ===================================================================
3976 --- gcc/config/m32c/m32c.c      (.../tags/gcc_4_6_3_release)    (revision 190226)
3977 +++ gcc/config/m32c/m32c.c      (.../branches/gcc-4_6-branch)   (revision 190226)
3978 @@ -447,7 +447,7 @@
3979      flag_ivopts = 0;
3980  
3981    /* This target defaults to strict volatile bitfields.  */
3982 -  if (flag_strict_volatile_bitfields < 0)
3983 +  if (flag_strict_volatile_bitfields < 0 && abi_version_at_least(2))
3984      flag_strict_volatile_bitfields = 1;
3985  
3986    /* r8c/m16c have no 16-bit indirect call, so thunks are involved.
3987 Index: gcc/config/spu/spu.c
3988 ===================================================================
3989 --- gcc/config/spu/spu.c        (.../tags/gcc_4_6_3_release)    (revision 190226)
3990 +++ gcc/config/spu/spu.c        (.../branches/gcc-4_6-branch)   (revision 190226)
3991 @@ -6794,6 +6794,7 @@
3992        case scalar_to_vec:
3993        case cond_branch_not_taken:
3994        case vec_perm:
3995 +      case vec_promote_demote:
3996          return 1;
3997  
3998        case scalar_store:
3999 Index: gcc/config/sparc/sparc.c
4000 ===================================================================
4001 --- gcc/config/sparc/sparc.c    (.../tags/gcc_4_6_3_release)    (revision 190226)
4002 +++ gcc/config/sparc/sparc.c    (.../branches/gcc-4_6-branch)   (revision 190226)
4003 @@ -3658,13 +3658,17 @@
4004  {
4005    x = delegitimize_mem_from_attrs (x);
4006  
4007 -  if (GET_CODE (x) == LO_SUM
4008 -      && GET_CODE (XEXP (x, 1)) == UNSPEC
4009 -      && XINT (XEXP (x, 1), 1) == UNSPEC_TLSLE)
4010 -    {
4011 -      x = XVECEXP (XEXP (x, 1), 0, 0);
4012 -      gcc_assert (GET_CODE (x) == SYMBOL_REF);
4013 -    }
4014 +  if (GET_CODE (x) == LO_SUM && GET_CODE (XEXP (x, 1)) == UNSPEC)
4015 +    switch (XINT (XEXP (x, 1), 1))
4016 +      {
4017 +      case UNSPEC_MOVE_PIC:
4018 +      case UNSPEC_TLSLE:
4019 +       x = XVECEXP (XEXP (x, 1), 0, 0);
4020 +       gcc_assert (GET_CODE (x) == SYMBOL_REF);
4021 +       break;
4022 +      default:
4023 +       break;
4024 +      }
4025  
4026    return x;
4027  }
4028 @@ -9634,6 +9638,7 @@
4029                                                        void_list_node));
4030           DECL_RESULT (decl) = build_decl (BUILTINS_LOCATION, RESULT_DECL,
4031                                            NULL_TREE, void_type_node);
4032 +         TREE_PUBLIC (decl) = 1;
4033           TREE_STATIC (decl) = 1;
4034           make_decl_one_only (decl, DECL_ASSEMBLER_NAME (decl));
4035           DECL_VISIBILITY (decl) = VISIBILITY_HIDDEN;
4036 Index: gcc/config/rx/rx.c
4037 ===================================================================
4038 --- gcc/config/rx/rx.c  (.../tags/gcc_4_6_3_release)    (revision 190226)
4039 +++ gcc/config/rx/rx.c  (.../branches/gcc-4_6-branch)   (revision 190226)
4040 @@ -2348,7 +2348,7 @@
4041  rx_option_override (void)
4042  {
4043    /* This target defaults to strict volatile bitfields.  */
4044 -  if (flag_strict_volatile_bitfields < 0)
4045 +  if (flag_strict_volatile_bitfields < 0 && abi_version_at_least(2))
4046      flag_strict_volatile_bitfields = 1;
4047  
4048    rx_override_options_after_change ();
4049 Index: gcc/config/i386/i386.h
4050 ===================================================================
4051 --- gcc/config/i386/i386.h      (.../tags/gcc_4_6_3_release)    (revision 190226)
4052 +++ gcc/config/i386/i386.h      (.../branches/gcc-4_6-branch)   (revision 190226)
4053 @@ -424,7 +424,7 @@
4054  
4055  /* Feature tests against the various architecture variations.  */
4056  enum ix86_arch_indices {
4057 -  X86_ARCH_CMOVE,              /* || TARGET_SSE */
4058 +  X86_ARCH_CMOV,
4059    X86_ARCH_CMPXCHG,
4060    X86_ARCH_CMPXCHG8B,
4061    X86_ARCH_XADD,
4062 @@ -435,12 +435,17 @@
4063  
4064  extern unsigned char ix86_arch_features[X86_ARCH_LAST];
4065  
4066 -#define TARGET_CMOVE           ix86_arch_features[X86_ARCH_CMOVE]
4067 +#define TARGET_CMOV            ix86_arch_features[X86_ARCH_CMOV]
4068  #define TARGET_CMPXCHG         ix86_arch_features[X86_ARCH_CMPXCHG]
4069  #define TARGET_CMPXCHG8B       ix86_arch_features[X86_ARCH_CMPXCHG8B]
4070  #define TARGET_XADD            ix86_arch_features[X86_ARCH_XADD]
4071  #define TARGET_BSWAP           ix86_arch_features[X86_ARCH_BSWAP]
4072  
4073 +/* For sane SSE instruction set generation we need fcomi instruction.
4074 +   It is safe to enable all CMOVE instructions.  Also, RDRAND intrinsic
4075 +   expands to a sequence that includes conditional move. */
4076 +#define TARGET_CMOVE           (TARGET_CMOV || TARGET_SSE || TARGET_RDRND)
4077 +
4078  #define TARGET_FISTTP          (TARGET_SSE3 && TARGET_80387)
4079  
4080  extern int x86_prefetch_sse;
4081 @@ -1668,6 +1673,17 @@
4082  
4083  #define LEGITIMATE_CONSTANT_P(X)  legitimate_constant_p (X)
4084  
4085 +/* Try a machine-dependent way of reloading an illegitimate address
4086 +   operand.  If we find one, push the reload and jump to WIN.  This
4087 +   macro is used in only one place: `find_reloads_address' in reload.c.  */
4088 +
4089 +#define LEGITIMIZE_RELOAD_ADDRESS(X, MODE, OPNUM, TYPE, INDL, WIN)     \
4090 +do {                                                                   \
4091 +  if (ix86_legitimize_reload_address ((X), (MODE), (OPNUM),            \
4092 +                                     (int)(TYPE), (INDL)))             \
4093 +    goto WIN;                                                          \
4094 +} while (0)
4095 +
4096  /* If defined, a C expression to determine the base term of address X.
4097     This macro is used in only one place: `find_base_term' in alias.c.
4098  
4099 Index: gcc/config/i386/i386.md
4100 ===================================================================
4101 --- gcc/config/i386/i386.md     (.../tags/gcc_4_6_3_release)    (revision 190226)
4102 +++ gcc/config/i386/i386.md     (.../branches/gcc-4_6-branch)   (revision 190226)
4103 @@ -233,9 +233,6 @@
4104  
4105    ;; For BMI support
4106    UNSPEC_BEXTR
4107 -
4108 -  ;; For RDRAND support
4109 -  UNSPEC_RDRAND
4110  ])
4111  
4112  (define_c_enum "unspecv" [
4113 @@ -270,6 +267,9 @@
4114    UNSPECV_WRFSBASE
4115    UNSPECV_WRGSBASE
4116    UNSPECV_SPLIT_STACK_RETURN
4117 +
4118 +  ;; For RDRAND support
4119 +  UNSPECV_RDRAND
4120  ])
4121  
4122  ;; Constants to represent pcomtrue/pcomfalse variants
4123 @@ -16349,7 +16349,8 @@
4124  (define_insn "*x86_mov<mode>cc_0_m1_neg"
4125    [(set (match_operand:SWI48 0 "register_operand" "=r")
4126         (neg:SWI48 (match_operator 1 "ix86_carry_flag_operator"
4127 -                   [(reg FLAGS_REG) (const_int 0)])))]
4128 +                   [(reg FLAGS_REG) (const_int 0)])))
4129 +   (clobber (reg:CC FLAGS_REG))]
4130    ""
4131    "sbb{<imodesuffix>}\t%0, %0"
4132    [(set_attr "type" "alu")
4133 @@ -18357,9 +18358,9 @@
4134  
4135  (define_insn "rdrand<mode>_1"
4136    [(set (match_operand:SWI248 0 "register_operand" "=r")
4137 -       (unspec:SWI248 [(const_int 0)] UNSPEC_RDRAND))
4138 +       (unspec_volatile:SWI248 [(const_int 0)] UNSPECV_RDRAND))
4139     (set (reg:CCC FLAGS_REG)
4140 -       (unspec:CCC [(const_int 0)] UNSPEC_RDRAND))]
4141 +       (unspec_volatile:CCC [(const_int 0)] UNSPECV_RDRAND))]
4142    "TARGET_RDRND"
4143    "rdrand\t%0"
4144    [(set_attr "type" "other")
4145 Index: gcc/config/i386/sse.md
4146 ===================================================================
4147 --- gcc/config/i386/sse.md      (.../tags/gcc_4_6_3_release)    (revision 190226)
4148 +++ gcc/config/i386/sse.md      (.../branches/gcc-4_6-branch)   (revision 190226)
4149 @@ -392,18 +392,7 @@
4150    DONE;
4151  })
4152  
4153 -(define_expand "avx_movu<ssemodesuffix><avxmodesuffix>"
4154 -  [(set (match_operand:AVXMODEF2P 0 "nonimmediate_operand" "")
4155 -       (unspec:AVXMODEF2P
4156 -         [(match_operand:AVXMODEF2P 1 "nonimmediate_operand" "")]
4157 -         UNSPEC_MOVU))]
4158 -  "AVX_VEC_FLOAT_MODE_P (<MODE>mode)"
4159 -{
4160 -  if (MEM_P (operands[0]) && MEM_P (operands[1]))
4161 -    operands[1] = force_reg (<MODE>mode, operands[1]);
4162 -})
4163 -
4164 -(define_insn "*avx_movu<ssemodesuffix><avxmodesuffix>"
4165 +(define_insn "avx_movu<ssemodesuffix><avxmodesuffix>"
4166    [(set (match_operand:AVXMODEF2P 0 "nonimmediate_operand" "=x,m")
4167         (unspec:AVXMODEF2P
4168           [(match_operand:AVXMODEF2P 1 "nonimmediate_operand" "xm,x")]
4169 @@ -429,18 +418,7 @@
4170     (set_attr "prefix" "maybe_vex")
4171     (set_attr "mode" "TI")])
4172  
4173 -(define_expand "<sse>_movu<ssemodesuffix>"
4174 -  [(set (match_operand:SSEMODEF2P 0 "nonimmediate_operand" "")
4175 -       (unspec:SSEMODEF2P
4176 -         [(match_operand:SSEMODEF2P 1 "nonimmediate_operand" "")]
4177 -         UNSPEC_MOVU))]
4178 -  "SSE_VEC_FLOAT_MODE_P (<MODE>mode)"
4179 -{
4180 -  if (MEM_P (operands[0]) && MEM_P (operands[1]))
4181 -    operands[1] = force_reg (<MODE>mode, operands[1]);
4182 -})
4183 -
4184 -(define_insn "*<sse>_movu<ssemodesuffix>"
4185 +(define_insn "<sse>_movu<ssemodesuffix>"
4186    [(set (match_operand:SSEMODEF2P 0 "nonimmediate_operand" "=x,m")
4187         (unspec:SSEMODEF2P
4188           [(match_operand:SSEMODEF2P 1 "nonimmediate_operand" "xm,x")]
4189 @@ -452,18 +430,7 @@
4190     (set_attr "movu" "1")
4191     (set_attr "mode" "<MODE>")])
4192  
4193 -(define_expand "avx_movdqu<avxmodesuffix>"
4194 -  [(set (match_operand:AVXMODEQI 0 "nonimmediate_operand" "")
4195 -       (unspec:AVXMODEQI
4196 -         [(match_operand:AVXMODEQI 1 "nonimmediate_operand" "")]
4197 -         UNSPEC_MOVU))]
4198 -  "TARGET_AVX"
4199 -{
4200 -  if (MEM_P (operands[0]) && MEM_P (operands[1]))
4201 -    operands[1] = force_reg (<MODE>mode, operands[1]);
4202 -})
4203 -
4204 -(define_insn "*avx_movdqu<avxmodesuffix>"
4205 +(define_insn "avx_movdqu<avxmodesuffix>"
4206    [(set (match_operand:AVXMODEQI 0 "nonimmediate_operand" "=x,m")
4207         (unspec:AVXMODEQI
4208           [(match_operand:AVXMODEQI 1 "nonimmediate_operand" "xm,x")]
4209 @@ -475,17 +442,7 @@
4210     (set_attr "prefix" "vex")
4211     (set_attr "mode" "<avxvecmode>")])
4212  
4213 -(define_expand "sse2_movdqu"
4214 -  [(set (match_operand:V16QI 0 "nonimmediate_operand" "")
4215 -       (unspec:V16QI [(match_operand:V16QI 1 "nonimmediate_operand" "")]
4216 -                     UNSPEC_MOVU))]
4217 -  "TARGET_SSE2"
4218 -{
4219 -  if (MEM_P (operands[0]) && MEM_P (operands[1]))
4220 -    operands[1] = force_reg (V16QImode, operands[1]);
4221 -})
4222 -
4223 -(define_insn "*sse2_movdqu"
4224 +(define_insn "sse2_movdqu"
4225    [(set (match_operand:V16QI 0 "nonimmediate_operand" "=x,m")
4226         (unspec:V16QI [(match_operand:V16QI 1 "nonimmediate_operand" "xm,x")]
4227                       UNSPEC_MOVU))]
4228 @@ -1324,15 +1281,15 @@
4229                 (parallel [(const_int 0)]))
4230               (vec_select:DF (match_dup 1) (parallel [(const_int 1)])))
4231             (plusminus:DF
4232 -             (vec_select:DF (match_dup 1) (parallel [(const_int 2)]))
4233 -             (vec_select:DF (match_dup 1) (parallel [(const_int 3)]))))
4234 -         (vec_concat:V2DF
4235 -           (plusminus:DF
4236               (vec_select:DF
4237                 (match_operand:V4DF 2 "nonimmediate_operand" "xm")
4238                 (parallel [(const_int 0)]))
4239 -             (vec_select:DF (match_dup 2) (parallel [(const_int 1)])))
4240 +             (vec_select:DF (match_dup 2) (parallel [(const_int 1)]))))
4241 +         (vec_concat:V2DF
4242             (plusminus:DF
4243 +             (vec_select:DF (match_dup 1) (parallel [(const_int 2)]))
4244 +             (vec_select:DF (match_dup 1) (parallel [(const_int 3)])))
4245 +           (plusminus:DF
4246               (vec_select:DF (match_dup 2) (parallel [(const_int 2)]))
4247               (vec_select:DF (match_dup 2) (parallel [(const_int 3)]))))))]
4248    "TARGET_AVX"
4249 @@ -5058,7 +5015,7 @@
4250           (vec_select:DF (match_dup 0) (parallel [(const_int 1)]))))]
4251    "TARGET_SSE2 && reload_completed"
4252    [(set (match_dup 0) (match_dup 1))]
4253 -  "operands[0] = adjust_address (operands[0], DFmode, 8);")
4254 +  "operands[0] = adjust_address (operands[0], DFmode, 0);")
4255  
4256  ;; Not sure these two are ever used, but it doesn't hurt to have
4257  ;; them. -aoliva
4258 @@ -12095,7 +12052,7 @@
4259           (unspec:V8SF [(match_operand:V8HI 1 "register_operand" "x")]
4260                        UNSPEC_VCVTPH2PS)
4261           (parallel [(const_int 0) (const_int 1)
4262 -                    (const_int 1) (const_int 2)])))]
4263 +                    (const_int 2) (const_int 3)])))]
4264    "TARGET_F16C"
4265    "vcvtph2ps\t{%1, %0|%0, %1}"
4266    [(set_attr "type" "ssecvt")
4267 Index: gcc/config/i386/linux-unwind.h
4268 ===================================================================
4269 --- gcc/config/i386/linux-unwind.h      (.../tags/gcc_4_6_3_release)    (revision 190226)
4270 +++ gcc/config/i386/linux-unwind.h      (.../branches/gcc-4_6-branch)   (revision 190226)
4271 @@ -1,5 +1,6 @@
4272  /* DWARF2 EH unwinding support for AMD x86-64 and x86.
4273 -   Copyright (C) 2004, 2005, 2006, 2009, 2010 Free Software Foundation, Inc.
4274 +   Copyright (C) 2004, 2005, 2006, 2009, 2010, 2012 Free Software Foundation,
4275 +   Inc.
4276  
4277  This file is part of GCC.
4278  
4279 @@ -133,9 +134,9 @@
4280      {
4281        struct rt_sigframe {
4282         int sig;
4283 -       struct siginfo *pinfo;
4284 +       siginfo_t *pinfo;
4285         void *puc;
4286 -       struct siginfo info;
4287 +       siginfo_t info;
4288         struct ucontext uc;
4289        } *rt_ = context->cfa;
4290        /* The void * cast is necessary to avoid an aliasing warning.
4291 Index: gcc/config/i386/i386-protos.h
4292 ===================================================================
4293 --- gcc/config/i386/i386-protos.h       (.../tags/gcc_4_6_3_release)    (revision 190226)
4294 +++ gcc/config/i386/i386-protos.h       (.../branches/gcc-4_6-branch)   (revision 190226)
4295 @@ -59,7 +59,8 @@
4296  extern bool constant_address_p (rtx);
4297  extern bool legitimate_pic_operand_p (rtx);
4298  extern bool legitimate_pic_address_disp_p (rtx);
4299 -
4300 +extern bool ix86_legitimize_reload_address (rtx, enum machine_mode,
4301 +                                           int, int, int);
4302  extern void print_reg (rtx, int, FILE*);
4303  extern void ix86_print_operand (FILE *, rtx, int);
4304  
4305 Index: gcc/config/i386/driver-i386.c
4306 ===================================================================
4307 --- gcc/config/i386/driver-i386.c       (.../tags/gcc_4_6_3_release)    (revision 190226)
4308 +++ gcc/config/i386/driver-i386.c       (.../branches/gcc-4_6-branch)   (revision 190226)
4309 @@ -397,6 +397,7 @@
4310    unsigned int has_pclmul = 0, has_abm = 0, has_lwp = 0;
4311    unsigned int has_fma = 0, has_fma4 = 0, has_xop = 0;
4312    unsigned int has_bmi = 0, has_tbm = 0;
4313 +  unsigned int has_rdrnd = 0, has_f16c = 0, has_fsgsbase = 0;
4314  
4315    bool arch;
4316  
4317 @@ -444,6 +445,8 @@
4318    has_aes = ecx & bit_AES;
4319    has_pclmul = ecx & bit_PCLMUL;
4320    has_fma = ecx & bit_FMA;
4321 +  has_f16c = ecx & bit_F16C;
4322 +  has_rdrnd = ecx & bit_RDRND;
4323  
4324    has_cmpxchg8b = edx & bit_CMPXCHG8B;
4325    has_cmov = edx & bit_CMOV;
4326 @@ -451,6 +454,13 @@
4327    has_sse = edx & bit_SSE;
4328    has_sse2 = edx & bit_SSE2;
4329  
4330 +  if (max_level >= 7)
4331 +    {
4332 +      __cpuid_count (7, 0, eax, ebx, ecx, edx);
4333 +
4334 +      has_fsgsbase = ebx & bit_FSGSBASE;
4335 +    }
4336 +
4337    /* Check cpuid level of extended features.  */
4338    __cpuid (0x80000000, ext_level, ebx, ecx, edx);
4339  
4340 @@ -711,10 +721,13 @@
4341        const char *avx = has_avx ? " -mavx" : " -mno-avx";
4342        const char *sse4_2 = has_sse4_2 ? " -msse4.2" : " -mno-sse4.2";
4343        const char *sse4_1 = has_sse4_1 ? " -msse4.1" : " -mno-sse4.1";
4344 +      const char *rdrnd = has_rdrnd ? " -mrdrnd" : " -mno-rdrnd";
4345 +      const char *f16c = has_f16c ? " -mf16c" : " -mno-f16c";
4346 +      const char *fsgsbase = has_fsgsbase ? " -mfsgsbase" : " -mno-fsgsbase";
4347  
4348        options = concat (options, cx16, sahf, movbe, ase, pclmul,
4349                         popcnt, abm, lwp, fma, fma4, xop, bmi, tbm,
4350 -                       avx, sse4_2, sse4_1, NULL);
4351 +                       avx, sse4_2, sse4_1, rdrnd, f16c, fsgsbase, NULL);
4352      }
4353  
4354  done:
4355 Index: gcc/config/i386/i386.c
4356 ===================================================================
4357 --- gcc/config/i386/i386.c      (.../tags/gcc_4_6_3_release)    (revision 190226)
4358 +++ gcc/config/i386/i386.c      (.../branches/gcc-4_6-branch)   (revision 190226)
4359 @@ -46,6 +46,7 @@
4360  #include "target.h"
4361  #include "target-def.h"
4362  #include "langhooks.h"
4363 +#include "reload.h"
4364  #include "cgraph.h"
4365  #include "gimple.h"
4366  #include "dwarf2.h"
4367 @@ -2094,7 +2095,7 @@
4368  /* Feature tests against the various architecture variations, used to create
4369     ix86_arch_features based on the processor mask.  */
4370  static unsigned int initial_ix86_arch_features[X86_ARCH_LAST] = {
4371 -  /* X86_ARCH_CMOVE: Conditional move was added for pentiumpro.  */
4372 +  /* X86_ARCH_CMOV: Conditional move was added for pentiumpro.  */
4373    ~(m_386 | m_486 | m_PENT | m_K6),
4374  
4375    /* X86_ARCH_CMPXCHG: Compare and exchange was added for 80486.  */
4376 @@ -3811,7 +3812,7 @@
4377            -mtune (rather than -march) points us to a processor that has them.
4378            However, the VIA C3 gives a SIGILL, so we only do that for i686 and
4379            higher processors.  */
4380 -       if (TARGET_CMOVE
4381 +       if (TARGET_CMOV
4382             && (processor_alias_table[i].flags & (PTA_PREFETCH_SSE | PTA_SSE)))
4383           x86_prefetch_sse = true;
4384         break;
4385 @@ -4181,12 +4182,6 @@
4386        target_flags |= MASK_ACCUMULATE_OUTGOING_ARGS;
4387      }
4388  
4389 -  /* For sane SSE instruction set generation we need fcomi instruction.
4390 -     It is safe to enable all CMOVE instructions.  Also, RDRAND intrinsic
4391 -     expands to a sequence that includes conditional move. */
4392 -  if (TARGET_SSE || TARGET_RDRND)
4393 -    TARGET_CMOVE = 1;
4394 -
4395    /* Figure out what ASM_GENERATE_INTERNAL_LABEL builds as a prefix.  */
4396    {
4397      char *p;
4398 @@ -12168,6 +12163,64 @@
4399    return false;
4400  }
4401  
4402 +/* Our implementation of LEGITIMIZE_RELOAD_ADDRESS.  Returns a value to
4403 +   replace the input X, or the original X if no replacement is called for.
4404 +   The output parameter *WIN is 1 if the calling macro should goto WIN,
4405 +   0 if it should not.  */
4406 +
4407 +bool
4408 +ix86_legitimize_reload_address (rtx x,
4409 +                               enum machine_mode mode ATTRIBUTE_UNUSED,
4410 +                               int opnum, int type,
4411 +                               int ind_levels ATTRIBUTE_UNUSED)
4412 +{
4413 +  /* Reload can generate:
4414 +
4415 +     (plus:DI (plus:DI (unspec:DI [(const_int 0 [0])] UNSPEC_TP)
4416 +                      (reg:DI 97))
4417 +             (reg:DI 2 cx))
4418 +
4419 +     This RTX is rejected from ix86_legitimate_address_p due to
4420 +     non-strictness of base register 97.  Following this rejection, 
4421 +     reload pushes all three components into separate registers,
4422 +     creating invalid memory address RTX.
4423 +
4424 +     Following code reloads only the invalid part of the
4425 +     memory address RTX.  */
4426 +
4427 +  if (GET_CODE (x) == PLUS
4428 +      && REG_P (XEXP (x, 1))
4429 +      && GET_CODE (XEXP (x, 0)) == PLUS
4430 +      && REG_P (XEXP (XEXP (x, 0), 1)))
4431 +    {
4432 +      rtx base, index;
4433 +      bool something_reloaded = false;
4434 +
4435 +      base = XEXP (XEXP (x, 0), 1);      
4436 +      if (!REG_OK_FOR_BASE_STRICT_P (base))
4437 +       {
4438 +         push_reload (base, NULL_RTX, &XEXP (XEXP (x, 0), 1), NULL,
4439 +                      BASE_REG_CLASS, GET_MODE (x), VOIDmode, 0, 0,
4440 +                      opnum, (enum reload_type)type);
4441 +         something_reloaded = true;
4442 +       }
4443 +
4444 +      index = XEXP (x, 1);
4445 +      if (!REG_OK_FOR_INDEX_STRICT_P (index))
4446 +       {
4447 +         push_reload (index, NULL_RTX, &XEXP (x, 1), NULL,
4448 +                      INDEX_REG_CLASS, GET_MODE (x), VOIDmode, 0, 0,
4449 +                      opnum, (enum reload_type)type);
4450 +         something_reloaded = true;
4451 +       }
4452 +
4453 +      gcc_assert (something_reloaded);
4454 +      return true;
4455 +    }
4456 +
4457 +  return false;
4458 +}
4459 +
4460  /* Recognizes RTL expressions that are valid memory addresses for an
4461     instruction.  The MODE argument is the machine mode for the MEM
4462     expression that wants to use this address.
4463 @@ -27177,8 +27230,8 @@
4464        arg_adjust = 0;
4465        if (optimize
4466           || target == 0
4467 -         || GET_MODE (target) != tmode
4468 -         || !insn_p->operand[0].predicate (target, tmode))
4469 +         || !register_operand (target, tmode)
4470 +         || GET_MODE (target) != tmode)
4471         target = gen_reg_rtx (tmode);
4472      }
4473  
4474 @@ -31377,9 +31430,9 @@
4475           tmp = gen_reg_rtx (GET_MODE_INNER (mode));
4476           ix86_expand_vector_extract (true, tmp, target, 1 - elt);
4477           if (elt == 0)
4478 +           tmp = gen_rtx_VEC_CONCAT (mode, val, tmp);
4479 +         else
4480             tmp = gen_rtx_VEC_CONCAT (mode, tmp, val);
4481 -         else
4482 -           tmp = gen_rtx_VEC_CONCAT (mode, val, tmp);
4483           emit_insn (gen_rtx_SET (VOIDmode, target, tmp));
4484           return;
4485         }
4486 @@ -31393,9 +31446,9 @@
4487        tmp = gen_reg_rtx (GET_MODE_INNER (mode));
4488        ix86_expand_vector_extract (false, tmp, target, 1 - elt);
4489        if (elt == 0)
4490 +       tmp = gen_rtx_VEC_CONCAT (mode, val, tmp);
4491 +      else
4492         tmp = gen_rtx_VEC_CONCAT (mode, tmp, val);
4493 -      else
4494 -       tmp = gen_rtx_VEC_CONCAT (mode, val, tmp);
4495        emit_insn (gen_rtx_SET (VOIDmode, target, tmp));
4496        return;
4497  
4498 @@ -32823,7 +32876,8 @@
4499          return ix86_cost->cond_not_taken_branch_cost;
4500  
4501        case vec_perm:
4502 -        return 1;
4503 +      case vec_promote_demote:
4504 +        return ix86_cost->vec_stmt_cost;
4505  
4506        default:
4507          gcc_unreachable ();
4508 Index: gcc/config/sh/linux-unwind.h
4509 ===================================================================
4510 --- gcc/config/sh/linux-unwind.h        (.../tags/gcc_4_6_3_release)    (revision 190226)
4511 +++ gcc/config/sh/linux-unwind.h        (.../branches/gcc-4_6-branch)   (revision 190226)
4512 @@ -1,5 +1,6 @@
4513  /* DWARF2 EH unwinding support for SH Linux.
4514 -   Copyright (C) 2004, 2005, 2006, 2007, 2009 Free Software Foundation, Inc.
4515 +   Copyright (C) 2004, 2005, 2006, 2007, 2009, 2012 Free Software Foundation,
4516 +   Inc.
4517  
4518  This file is part of GCC.
4519  
4520 @@ -80,9 +81,9 @@
4521            && (*(unsigned long *) (pc+11)  == 0x6ff0fff0))
4522      {
4523        struct rt_sigframe {
4524 -       struct siginfo *pinfo;
4525 +       siginfo_t *pinfo;
4526         void *puc;
4527 -       struct siginfo info;
4528 +       siginfo_t info;
4529         struct ucontext uc;
4530        } *rt_ = context->cfa;
4531        /* The void * cast is necessary to avoid an aliasing warning.
4532 @@ -179,7 +180,7 @@
4533                 && (*(unsigned short *) (pc+14)  == 0x00ad))))
4534      {
4535        struct rt_sigframe {
4536 -       struct siginfo info;
4537 +       siginfo_t info;
4538         struct ucontext uc;
4539        } *rt_ = context->cfa;
4540        /* The void * cast is necessary to avoid an aliasing warning.
4541 Index: gcc/config/sh/sh.c
4542 ===================================================================
4543 --- gcc/config/sh/sh.c  (.../tags/gcc_4_6_3_release)    (revision 190226)
4544 +++ gcc/config/sh/sh.c  (.../branches/gcc-4_6-branch)   (revision 190226)
4545 @@ -763,11 +763,6 @@
4546    SUBTARGET_OVERRIDE_OPTIONS;
4547    if (optimize > 1 && !optimize_size)
4548      target_flags |= MASK_SAVE_ALL_TARGET_REGS;
4549 -  if (flag_finite_math_only == 2)
4550 -    flag_finite_math_only
4551 -      = !flag_signaling_nans && TARGET_SH2E && ! TARGET_IEEE;
4552 -  if (TARGET_SH2E && !flag_finite_math_only)
4553 -    target_flags |= MASK_IEEE;
4554    sh_cpu = PROCESSOR_SH1;
4555    assembler_dialect = 0;
4556    if (TARGET_SH2)
4557 @@ -911,8 +906,6 @@
4558      if (! VALID_REGISTER_P (ADDREGNAMES_REGNO (regno)))
4559        sh_additional_register_names[regno][0] = '\0';
4560  
4561 -  flag_omit_frame_pointer = (PREFERRED_DEBUGGING_TYPE == DWARF2_DEBUG);
4562 -
4563    if ((flag_pic && ! TARGET_PREFERGOT)
4564        || (TARGET_SHMEDIA && !TARGET_PT_FIXED))
4565      flag_no_function_cse = 1;
4566 @@ -944,22 +937,17 @@
4567         flag_schedule_insns = 0;
4568      }
4569  
4570 -    if ((target_flags_explicit & MASK_ACCUMULATE_OUTGOING_ARGS) == 0)
4571 -       target_flags |= MASK_ACCUMULATE_OUTGOING_ARGS;
4572 -
4573    /* Unwind info is not correct around the CFG unless either a frame 
4574       pointer is present or M_A_O_A is set.  Fixing this requires rewriting 
4575       unwind info generation to be aware of the CFG and propagating states 
4576       around edges.  */
4577    if ((flag_unwind_tables || flag_asynchronous_unwind_tables
4578         || flag_exceptions || flag_non_call_exceptions)   
4579 -      && flag_omit_frame_pointer
4580 -      && !(target_flags & MASK_ACCUMULATE_OUTGOING_ARGS))
4581 +      && flag_omit_frame_pointer && !TARGET_ACCUMULATE_OUTGOING_ARGS)
4582      {
4583 -      if (target_flags_explicit & MASK_ACCUMULATE_OUTGOING_ARGS)
4584         warning (0, "unwind tables currently require either a frame pointer "
4585                  "or -maccumulate-outgoing-args for correctness");
4586 -      target_flags |= MASK_ACCUMULATE_OUTGOING_ARGS;
4587 +       TARGET_ACCUMULATE_OUTGOING_ARGS = 1;
4588      }
4589  
4590    /* Unwinding with -freorder-blocks-and-partition does not work on this
4591 @@ -1014,11 +1002,16 @@
4592         align_functions = min_align;
4593      }
4594  
4595 +  /* If the -mieee option was not explicitly set by the user, turn it on
4596 +     unless -ffinite-math-only was specified.  See also PR 33135.  */
4597 +  if (! global_options_set.x_TARGET_IEEE)
4598 +    TARGET_IEEE = ! flag_finite_math_only;
4599 +
4600    if (sh_fixed_range_str)
4601      sh_fix_range (sh_fixed_range_str);
4602  
4603    /* This target defaults to strict volatile bitfields.  */
4604 -  if (flag_strict_volatile_bitfields < 0)
4605 +  if (flag_strict_volatile_bitfields < 0 && abi_version_at_least(2))
4606      flag_strict_volatile_bitfields = 1;
4607  }
4608  \f
4609 Index: gcc/config/sh/sh.opt
4610 ===================================================================
4611 --- gcc/config/sh/sh.opt        (.../tags/gcc_4_6_3_release)    (revision 190226)
4612 +++ gcc/config/sh/sh.opt        (.../branches/gcc-4_6-branch)   (revision 190226)
4613 @@ -202,7 +202,7 @@
4614  Generate FPU-less SHcompact code
4615  
4616  maccumulate-outgoing-args
4617 -Target Report Mask(ACCUMULATE_OUTGOING_ARGS)
4618 +Target Report Var(TARGET_ACCUMULATE_OUTGOING_ARGS) Init(1)
4619  Reserve space for outgoing arguments in the function prologue
4620  
4621  madjust-unroll
4622 @@ -270,8 +270,8 @@
4623  Follow Renesas (formerly Hitachi) / SuperH calling conventions
4624  
4625  mieee
4626 -Target Report Mask(IEEE)
4627 -Increase the IEEE compliance for floating-point code
4628 +Target Var(TARGET_IEEE)
4629 +Increase the IEEE compliance for floating-point comparisons
4630  
4631  mindexed-addressing
4632  Target Report Mask(ALLOW_INDEXED_ADDRESS) Condition(SUPPORT_ANY_SH5_32MEDIA)
4633 Index: gcc/config/avr/avr-stdint.h
4634 ===================================================================
4635 --- gcc/config/avr/avr-stdint.h (.../tags/gcc_4_6_3_release)    (revision 0)
4636 +++ gcc/config/avr/avr-stdint.h (.../branches/gcc-4_6-branch)   (revision 190226)
4637 @@ -0,0 +1,66 @@
4638 +/* Definitions for <stdint.h> types on systems using newlib.
4639 +   Copyright (C) 2012 Free Software Foundation, Inc.
4640 +
4641 +This file is part of GCC.
4642 +
4643 +GCC is free software; you can redistribute it and/or modify
4644 +it under the terms of the GNU General Public License as published by
4645 +the Free Software Foundation; either version 3, or (at your option)
4646 +any later version.
4647 +
4648 +GCC is distributed in the hope that it will be useful,
4649 +but WITHOUT ANY WARRANTY; without even the implied warranty of
4650 +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
4651 +GNU General Public License for more details.
4652 +
4653 +You should have received a copy of the GNU General Public License
4654 +along with GCC; see the file COPYING3.  If not see
4655 +<http://www.gnu.org/licenses/>.  */
4656 +
4657 +/*
4658 +   The intention of this file is to supply definitions that work with
4659 +   avr-gcc's -mint8 that sets int to an 8-bit type.
4660 +
4661 +   This file is intended to yield the same results as newlib-stdint.h,
4662 +   but there are some differences to newlib-stdint.h:
4663 +
4664 +   - AVR is an 8-bit architecture that cannot access 16-bit values
4665 +     atomically, this SIG_ATOMIC_TYPE is "char".
4666 +
4667 +   - For the same reason, [u]int_fast8_t is defined as 8-bit type.
4668 +
4669 +*/
4670 +   
4671 +#define SIG_ATOMIC_TYPE "char"
4672 +
4673 +#define INT8_TYPE "signed char"
4674 +#define INT16_TYPE (INT_TYPE_SIZE == 16 ? "short int" : "long int")
4675 +#define INT32_TYPE (INT_TYPE_SIZE == 16 ? "long int" : "long long int")
4676 +#define INT64_TYPE (INT_TYPE_SIZE == 16 ? "long long int" : 0)
4677 +#define UINT8_TYPE "unsigned char"
4678 +#define UINT16_TYPE (INT_TYPE_SIZE == 16 ? "short unsigned int" : "long unsigned int")
4679 +#define UINT32_TYPE (INT_TYPE_SIZE == 16 ? "long unsigned int" : "long long unsigned int")
4680 +#define UINT64_TYPE (INT_TYPE_SIZE == 16 ? "long long unsigned int" : 0)
4681 +
4682 +#define INT_LEAST8_TYPE INT8_TYPE
4683 +#define INT_LEAST16_TYPE INT16_TYPE
4684 +#define INT_LEAST32_TYPE INT32_TYPE
4685 +#define INT_LEAST64_TYPE INT64_TYPE
4686 +#define UINT_LEAST8_TYPE UINT8_TYPE
4687 +#define UINT_LEAST16_TYPE UINT16_TYPE
4688 +#define UINT_LEAST32_TYPE UINT32_TYPE
4689 +#define UINT_LEAST64_TYPE UINT64_TYPE
4690 +
4691 +#define INT_FAST8_TYPE INT8_TYPE
4692 +#define INT_FAST16_TYPE (INT_TYPE_SIZE == 16 ? "int" : INT16_TYPE)
4693 +#define INT_FAST32_TYPE INT32_TYPE
4694 +#define INT_FAST64_TYPE INT64_TYPE
4695 +#define UINT_FAST8_TYPE UINT8_TYPE
4696 +#define UINT_FAST16_TYPE (INT_TYPE_SIZE == 16 ? "unsigned int" : UINT16_TYPE)
4697 +#define UINT_FAST32_TYPE UINT32_TYPE
4698 +#define UINT_FAST64_TYPE UINT64_TYPE
4699 +
4700 +#define INTPTR_TYPE PTRDIFF_TYPE
4701 +#ifndef UINTPTR_TYPE
4702 +#define UINTPTR_TYPE SIZE_TYPE
4703 +#endif
4704 Index: gcc/config/avr/libgcc.S
4705 ===================================================================
4706 --- gcc/config/avr/libgcc.S     (.../tags/gcc_4_6_3_release)    (revision 190226)
4707 +++ gcc/config/avr/libgcc.S     (.../branches/gcc-4_6-branch)   (revision 190226)
4708 @@ -582,16 +582,7 @@
4709         push r17
4710         push r28
4711         push r29
4712 -#if defined (__AVR_HAVE_8BIT_SP__)
4713 -;; FIXME: __AVR_HAVE_8BIT_SP__ is set on device level, not on core level
4714 -;;        so this lines are dead code.  To make it work, devices without
4715 -;;        SP_H must get their own multilib(s), see PR51345.
4716         in      r28,__SP_L__
4717 -       sub     r28,r26
4718 -       clr     r29
4719 -       out     __SP_L__,r28
4720 -#else
4721 -       in      r28,__SP_L__
4722         in      r29,__SP_H__
4723         sub     r28,r26
4724         sbc     r29,r27
4725 @@ -600,7 +591,6 @@
4726         out     __SP_H__,r29
4727         out     __SREG__,__tmp_reg__
4728         out     __SP_L__,r28
4729 -#endif
4730  #if defined (__AVR_HAVE_EIJMP_EICALL__)
4731         eijmp
4732  #else
4733 @@ -635,15 +625,6 @@
4734         ldd     r16,Y+4
4735         ldd     r17,Y+3
4736         ldd     r26,Y+2
4737 -#if defined (__AVR_HAVE_8BIT_SP__)
4738 -;; FIXME: __AVR_HAVE_8BIT_SP__ is set on device level, not on core level
4739 -;;        so this lines are dead code.  To make it work, devices without
4740 -;;        SP_H must get their own multilib(s).
4741 -       ldd     r29,Y+1
4742 -       add     r28,r30
4743 -       out     __SP_L__,r28
4744 -       mov     r28, r26
4745 -#else
4746         ldd     r27,Y+1
4747         add     r28,r30
4748         adc     r29,__zero_reg__
4749 @@ -654,7 +635,6 @@
4750         out     __SP_L__,r28
4751         mov_l   r28, r26
4752         mov_h   r29, r27
4753 -#endif
4754         ret
4755  .endfunc
4756  #endif /* defined (L_epilogue) */
4757 Index: gcc/config/avr/avr.md
4758 ===================================================================
4759 --- gcc/config/avr/avr.md       (.../tags/gcc_4_6_3_release)    (revision 190226)
4760 +++ gcc/config/avr/avr.md       (.../branches/gcc-4_6-branch)   (revision 190226)
4761 @@ -299,7 +299,7 @@
4762    [(set (match_operand:HI 0 "stack_register_operand" "=q")
4763          (unspec_volatile:HI [(match_operand:HI 1 "register_operand"  "r")] 
4764                             UNSPECV_WRITE_SP_IRQ_OFF))]
4765 -  "!AVR_HAVE_8BIT_SP"
4766 +  ""
4767    "out __SP_H__, %B1
4768         out __SP_L__, %A1"
4769    [(set_attr "length" "2")
4770 @@ -309,7 +309,7 @@
4771    [(set (match_operand:HI 0 "stack_register_operand" "=q")
4772          (unspec_volatile:HI [(match_operand:HI 1 "register_operand"  "r")] 
4773                             UNSPECV_WRITE_SP_IRQ_ON))]
4774 -  "!AVR_HAVE_8BIT_SP"
4775 +  ""
4776    "cli
4777          out __SP_H__, %B1
4778         sei
4779 Index: gcc/config/avr/avr.c
4780 ===================================================================
4781 --- gcc/config/avr/avr.c        (.../tags/gcc_4_6_3_release)    (revision 190226)
4782 +++ gcc/config/avr/avr.c        (.../branches/gcc-4_6-branch)   (revision 190226)
4783 @@ -1879,12 +1879,9 @@
4784             }
4785           else if (test_hard_reg_class (STACK_REG, src))
4786             {
4787 -              *l = 2;
4788 -              return AVR_HAVE_8BIT_SP
4789 -                ? (AS2 (in,%A0,__SP_L__) CR_TAB
4790 -                   AS1 (clr,%B0))
4791 -                : (AS2 (in,%A0,__SP_L__) CR_TAB
4792 -                   AS2 (in,%B0,__SP_H__));
4793 +             *l = 2;   
4794 +             return (AS2 (in,%A0,__SP_L__) CR_TAB
4795 +                     AS2 (in,%B0,__SP_H__));
4796             }
4797  
4798           if (AVR_HAVE_MOVW)
4799 @@ -5177,10 +5174,9 @@
4800  
4801    default_file_start ();
4802  
4803 -  fputs ("__SREG__ = 0x3f\n", asm_out_file);
4804 -  if (!AVR_HAVE_8BIT_SP)
4805 -    fputs ("__SP_H__ = 0x3e\n", asm_out_file);
4806 -  fputs ("__SP_L__ = 0x3d\n", asm_out_file);
4807 +  fputs ("__SREG__ = 0x3f\n"
4808 +        "__SP_H__ = 0x3e\n"
4809 +        "__SP_L__ = 0x3d\n", asm_out_file);
4810    
4811    fputs ("__tmp_reg__ = 0\n" 
4812           "__zero_reg__ = 1\n", asm_out_file);
4813 Index: gcc/config/xtensa/linux-unwind.h
4814 ===================================================================
4815 --- gcc/config/xtensa/linux-unwind.h    (.../tags/gcc_4_6_3_release)    (revision 190226)
4816 +++ gcc/config/xtensa/linux-unwind.h    (.../branches/gcc-4_6-branch)   (revision 190226)
4817 @@ -1,5 +1,5 @@
4818  /* DWARF2 EH unwinding support for Xtensa.
4819 -   Copyright (C) 2008, 2009 Free Software Foundation, Inc.
4820 +   Copyright (C) 2008, 2009, 2012 Free Software Foundation, Inc.
4821  
4822  This file is part of GCC.
4823  
4824 @@ -62,7 +62,7 @@
4825    struct sigcontext *sc;
4826  
4827    struct rt_sigframe {
4828 -    struct siginfo info;
4829 +    siginfo_t info;
4830      struct ucontext uc;
4831    } *rt_;
4832  
4833 Index: gcc/config/host-linux.c
4834 ===================================================================
4835 --- gcc/config/host-linux.c     (.../tags/gcc_4_6_3_release)    (revision 190226)
4836 +++ gcc/config/host-linux.c     (.../branches/gcc-4_6-branch)   (revision 190226)
4837 @@ -84,6 +84,8 @@
4838  # define TRY_EMPTY_VM_SPACE    0x60000000
4839  #elif defined(__mc68000__)
4840  # define TRY_EMPTY_VM_SPACE    0x40000000
4841 +#elif defined(__ARM_EABI__)
4842 +# define TRY_EMPTY_VM_SPACE     0x60000000
4843  #else
4844  # define TRY_EMPTY_VM_SPACE    0
4845  #endif
4846 Index: gcc/config/mn10300/mn10300.c
4847 ===================================================================
4848 --- gcc/config/mn10300/mn10300.c        (.../tags/gcc_4_6_3_release)    (revision 190226)
4849 +++ gcc/config/mn10300/mn10300.c        (.../branches/gcc-4_6-branch)   (revision 190226)
4850 @@ -2505,12 +2505,15 @@
4851     may access it using GOTOFF instead of GOT.  */
4852  
4853  static void
4854 -mn10300_encode_section_info (tree decl, rtx rtl, int first ATTRIBUTE_UNUSED)
4855 +mn10300_encode_section_info (tree decl, rtx rtl, int first)
4856  {
4857    rtx symbol;
4858  
4859 +  default_encode_section_info (decl, rtl, first);
4860 +
4861    if (! MEM_P (rtl))
4862      return;
4863 +
4864    symbol = XEXP (rtl, 0);
4865    if (GET_CODE (symbol) != SYMBOL_REF)
4866      return;
4867 Index: gcc/config/ia64/linux-unwind.h
4868 ===================================================================
4869 --- gcc/config/ia64/linux-unwind.h      (.../tags/gcc_4_6_3_release)    (revision 190226)
4870 +++ gcc/config/ia64/linux-unwind.h      (.../branches/gcc-4_6-branch)   (revision 190226)
4871 @@ -1,5 +1,5 @@
4872  /* DWARF2 EH unwinding support for IA64 Linux.
4873 -   Copyright (C) 2004, 2005, 2009 Free Software Foundation, Inc.
4874 +   Copyright (C) 2004, 2005, 2009, 2012 Free Software Foundation, Inc.
4875  
4876     This file is part of GCC.
4877  
4878 @@ -47,7 +47,7 @@
4879        struct sigframe {
4880         char scratch[16];
4881         unsigned long sig_number;
4882 -       struct siginfo *info;
4883 +       siginfo_t *info;
4884         struct sigcontext *sc;
4885        } *frame_ = (struct sigframe *)context->psp;
4886        struct sigcontext *sc = frame_->sc;
4887 @@ -137,7 +137,7 @@
4888        struct sigframe {
4889         char scratch[16];
4890         unsigned long sig_number;
4891 -       struct siginfo *info;
4892 +       siginfo_t *info;
4893         struct sigcontext *sc;
4894        } *frame = (struct sigframe *)context->psp;
4895        struct sigcontext *sc = frame->sc;
4896 Index: gcc/config/rs6000/vector.md
4897 ===================================================================
4898 --- gcc/config/rs6000/vector.md (.../tags/gcc_4_6_3_release)    (revision 190226)
4899 +++ gcc/config/rs6000/vector.md (.../branches/gcc-4_6-branch)   (revision 190226)
4900 @@ -448,6 +448,94 @@
4901    "VECTOR_UNIT_ALTIVEC_P (<MODE>mode)"
4902    "")
4903  
4904 +(define_insn_and_split "*vector_uneq<mode>"
4905 +  [(set (match_operand:VEC_F 0 "vfloat_operand" "")
4906 +       (uneq:VEC_F (match_operand:VEC_F 1 "vfloat_operand" "")
4907 +                   (match_operand:VEC_F 2 "vfloat_operand" "")))]
4908 +  "VECTOR_UNIT_ALTIVEC_OR_VSX_P (<MODE>mode)"
4909 +  "#"
4910 +  ""
4911 +  [(set (match_dup 3)
4912 +       (gt:VEC_F (match_dup 1)
4913 +                 (match_dup 2)))
4914 +   (set (match_dup 4)
4915 +       (gt:VEC_F (match_dup 2)
4916 +                 (match_dup 1)))
4917 +   (set (match_dup 0)
4918 +       (not:VEC_F (ior:VEC_F (match_dup 3)
4919 +                             (match_dup 4))))]
4920 +  "
4921 +{
4922 +  operands[3] = gen_reg_rtx (<MODE>mode);
4923 +  operands[4] = gen_reg_rtx (<MODE>mode);
4924 +}")
4925 +
4926 +(define_insn_and_split "*vector_ltgt<mode>"
4927 +  [(set (match_operand:VEC_F 0 "vfloat_operand" "")
4928 +       (ltgt:VEC_F (match_operand:VEC_F 1 "vfloat_operand" "")
4929 +                   (match_operand:VEC_F 2 "vfloat_operand" "")))]
4930 +  "VECTOR_UNIT_ALTIVEC_OR_VSX_P (<MODE>mode)"
4931 +  "#"
4932 +  ""
4933 +  [(set (match_dup 3)
4934 +       (gt:VEC_F (match_dup 1)
4935 +                 (match_dup 2)))
4936 +   (set (match_dup 4)
4937 +       (gt:VEC_F (match_dup 2)
4938 +                 (match_dup 1)))
4939 +   (set (match_dup 0)
4940 +       (ior:VEC_F (match_dup 3)
4941 +                  (match_dup 4)))]
4942 +  "
4943 +{
4944 +  operands[3] = gen_reg_rtx (<MODE>mode);
4945 +  operands[4] = gen_reg_rtx (<MODE>mode);
4946 +}")
4947 +
4948 +(define_insn_and_split "*vector_ordered<mode>"
4949 +  [(set (match_operand:VEC_F 0 "vfloat_operand" "")
4950 +       (ordered:VEC_F (match_operand:VEC_F 1 "vfloat_operand" "")
4951 +                      (match_operand:VEC_F 2 "vfloat_operand" "")))]
4952 +  "VECTOR_UNIT_ALTIVEC_OR_VSX_P (<MODE>mode)"
4953 +  "#"
4954 +  ""
4955 +  [(set (match_dup 3)
4956 +       (ge:VEC_F (match_dup 1)
4957 +                 (match_dup 2)))
4958 +   (set (match_dup 4)
4959 +       (ge:VEC_F (match_dup 2)
4960 +                 (match_dup 1)))
4961 +   (set (match_dup 0)
4962 +       (ior:VEC_F (match_dup 3)
4963 +                  (match_dup 4)))]
4964 +  "
4965 +{
4966 +  operands[3] = gen_reg_rtx (<MODE>mode);
4967 +  operands[4] = gen_reg_rtx (<MODE>mode);
4968 +}")
4969 +
4970 +(define_insn_and_split "*vector_unordered<mode>"
4971 +  [(set (match_operand:VEC_F 0 "vfloat_operand" "")
4972 +       (unordered:VEC_F (match_operand:VEC_F 1 "vfloat_operand" "")
4973 +                        (match_operand:VEC_F 2 "vfloat_operand" "")))]
4974 +  "VECTOR_UNIT_ALTIVEC_OR_VSX_P (<MODE>mode)"
4975 +  "#"
4976 +  ""
4977 +  [(set (match_dup 3)
4978 +       (ge:VEC_F (match_dup 1)
4979 +                 (match_dup 2)))
4980 +   (set (match_dup 4)
4981 +       (ge:VEC_F (match_dup 2)
4982 +                 (match_dup 1)))
4983 +   (set (match_dup 0)
4984 +       (not:VEC_F (ior:VEC_F (match_dup 3)
4985 +                             (match_dup 4))))]
4986 +  "
4987 +{
4988 +  operands[3] = gen_reg_rtx (<MODE>mode);
4989 +  operands[4] = gen_reg_rtx (<MODE>mode);
4990 +}")
4991 +
4992  ;; Note the arguments for __builtin_altivec_vsel are op2, op1, mask
4993  ;; which is in the reverse order that we want
4994  (define_expand "vector_select_<mode>"
4995 Index: gcc/config/rs6000/rs6000.c
4996 ===================================================================
4997 --- gcc/config/rs6000/rs6000.c  (.../tags/gcc_4_6_3_release)    (revision 190226)
4998 +++ gcc/config/rs6000/rs6000.c  (.../branches/gcc-4_6-branch)   (revision 190226)
4999 @@ -3695,12 +3695,23 @@
5000        case vec_to_scalar:
5001        case scalar_to_vec:
5002        case cond_branch_not_taken:
5003 -      case vec_perm:
5004          return 1;
5005  
5006        case cond_branch_taken:
5007          return 3;
5008  
5009 +      case vec_perm:
5010 +       if (TARGET_VSX)
5011 +         return 4;
5012 +       else
5013 +         return 1;
5014 +
5015 +      case vec_promote_demote:
5016 +       if (TARGET_VSX)
5017 +         return 5;
5018 +       else
5019 +         return 1;
5020 +
5021        case unaligned_load:
5022          if (TARGET_VSX && TARGET_ALLOW_MOVMISALIGN)
5023            {
5024 @@ -15811,7 +15822,6 @@
5025  print_operand (FILE *file, rtx x, int code)
5026  {
5027    int i;
5028 -  HOST_WIDE_INT val;
5029    unsigned HOST_WIDE_INT uval;
5030  
5031    switch (code)
5032 @@ -16252,34 +16262,17 @@
5033  
5034      case 'W':
5035        /* MB value for a PowerPC64 rldic operand.  */
5036 -      val = (GET_CODE (x) == CONST_INT
5037 -            ? INTVAL (x) : CONST_DOUBLE_HIGH (x));
5038 +      i = clz_hwi (GET_CODE (x) == CONST_INT
5039 +                  ? INTVAL (x) : CONST_DOUBLE_HIGH (x));
5040  
5041 -      if (val < 0)
5042 -       i = -1;
5043 -      else
5044 -       for (i = 0; i < HOST_BITS_PER_WIDE_INT; i++)
5045 -         if ((val <<= 1) < 0)
5046 -           break;
5047 -
5048  #if HOST_BITS_PER_WIDE_INT == 32
5049 -      if (GET_CODE (x) == CONST_INT && i >= 0)
5050 +      if (GET_CODE (x) == CONST_INT && i > 0)
5051         i += 32;  /* zero-extend high-part was all 0's */
5052        else if (GET_CODE (x) == CONST_DOUBLE && i == 32)
5053 -       {
5054 -         val = CONST_DOUBLE_LOW (x);
5055 -
5056 -         gcc_assert (val);
5057 -         if (val < 0)
5058 -           --i;
5059 -         else
5060 -           for ( ; i < 64; i++)
5061 -             if ((val <<= 1) < 0)
5062 -               break;
5063 -       }
5064 +       i = clz_hwi (CONST_DOUBLE_LOW (x)) + 32;
5065  #endif
5066  
5067 -      fprintf (file, "%d", i + 1);
5068 +      fprintf (file, "%d", i);
5069        return;
5070  
5071      case 'x':
5072 @@ -17229,6 +17222,10 @@
5073      case EQ:
5074      case GT:
5075      case GTU:
5076 +    case ORDERED:
5077 +    case UNORDERED:
5078 +    case UNEQ:
5079 +    case LTGT:
5080        mask = gen_reg_rtx (mode);
5081        emit_insn (gen_rtx_SET (VOIDmode,
5082                               mask,
5083 Index: gcc/config/rs6000/vsx.md
5084 ===================================================================
5085 --- gcc/config/rs6000/vsx.md    (.../tags/gcc_4_6_3_release)    (revision 190226)
5086 +++ gcc/config/rs6000/vsx.md    (.../branches/gcc-4_6-branch)   (revision 190226)
5087 @@ -1006,9 +1006,9 @@
5088    "VECTOR_MEM_VSX_P (<MODE>mode)"
5089  {
5090    if (INTVAL (operands[3]) == 0)
5091 -    return \"xxpermdi %x0,%x1,%x2,1\";
5092 +    return \"xxpermdi %x0,%x2,%x1,1\";
5093    else if (INTVAL (operands[3]) == 1)
5094 -    return \"xxpermdi %x0,%x2,%x1,0\";
5095 +    return \"xxpermdi %x0,%x1,%x2,0\";
5096    else
5097      gcc_unreachable ();
5098  }
5099 Index: gcc/config/rs6000/rs6000.h
5100 ===================================================================
5101 --- gcc/config/rs6000/rs6000.h  (.../tags/gcc_4_6_3_release)    (revision 190226)
5102 +++ gcc/config/rs6000/rs6000.h  (.../branches/gcc-4_6-branch)   (revision 190226)
5103 @@ -469,10 +469,11 @@
5104  /* ISA 2.01 allowed FCFID to be done in 32-bit, previously it was 64-bit only.
5105     Enable 32-bit fcfid's on any of the switches for newer ISA machines or
5106     XILINX.  */
5107 -#define TARGET_FCFID   (TARGET_POWERPC64 \
5108 -                        || TARGET_POPCNTB      /* ISA 2.02 */ \
5109 -                        || TARGET_CMPB         /* ISA 2.05 */ \
5110 -                        || TARGET_POPCNTD      /* ISA 2.06 */ \
5111 +#define TARGET_FCFID   (TARGET_POWERPC64                               \
5112 +                        || TARGET_PPC_GPOPT    /* 970/power4 */        \
5113 +                        || TARGET_POPCNTB      /* ISA 2.02 */          \
5114 +                        || TARGET_CMPB         /* ISA 2.05 */          \
5115 +                        || TARGET_POPCNTD      /* ISA 2.06 */          \
5116                          || TARGET_XILINX_FPU)
5117  
5118  #define TARGET_FCTIDZ  TARGET_FCFID
5119 Index: gcc/config/rs6000/altivec.md
5120 ===================================================================
5121 --- gcc/config/rs6000/altivec.md        (.../tags/gcc_4_6_3_release)    (revision 190226)
5122 +++ gcc/config/rs6000/altivec.md        (.../branches/gcc-4_6-branch)   (revision 190226)
5123 @@ -2394,8 +2394,8 @@
5124  
5125  (define_insn "altivec_stvlx"
5126    [(parallel
5127 -    [(set (match_operand:V4SI 0 "memory_operand" "=Z")
5128 -         (match_operand:V4SI 1 "register_operand" "v"))
5129 +    [(set (match_operand:V16QI 0 "memory_operand" "=Z")
5130 +         (match_operand:V16QI 1 "register_operand" "v"))
5131       (unspec [(const_int 0)] UNSPEC_STVLX)])]
5132    "TARGET_ALTIVEC && rs6000_cpu == PROCESSOR_CELL"
5133    "stvlx %1,%y0"
5134 @@ -2403,8 +2403,8 @@
5135  
5136  (define_insn "altivec_stvlxl"
5137    [(parallel
5138 -    [(set (match_operand:V4SI 0 "memory_operand" "=Z")
5139 -         (match_operand:V4SI 1 "register_operand" "v"))
5140 +    [(set (match_operand:V16QI 0 "memory_operand" "=Z")
5141 +         (match_operand:V16QI 1 "register_operand" "v"))
5142       (unspec [(const_int 0)] UNSPEC_STVLXL)])]
5143    "TARGET_ALTIVEC && rs6000_cpu == PROCESSOR_CELL"
5144    "stvlxl %1,%y0"
5145 @@ -2412,8 +2412,8 @@
5146  
5147  (define_insn "altivec_stvrx"
5148    [(parallel
5149 -    [(set (match_operand:V4SI 0 "memory_operand" "=Z")
5150 -         (match_operand:V4SI 1 "register_operand" "v"))
5151 +    [(set (match_operand:V16QI 0 "memory_operand" "=Z")
5152 +         (match_operand:V16QI 1 "register_operand" "v"))
5153       (unspec [(const_int 0)] UNSPEC_STVRX)])]
5154    "TARGET_ALTIVEC && rs6000_cpu == PROCESSOR_CELL"
5155    "stvrx %1,%y0"
5156 @@ -2421,8 +2421,8 @@
5157  
5158  (define_insn "altivec_stvrxl"
5159    [(parallel
5160 -    [(set (match_operand:V4SI 0 "memory_operand" "=Z")
5161 -         (match_operand:V4SI 1 "register_operand" "v"))
5162 +    [(set (match_operand:V16QI 0 "memory_operand" "=Z")
5163 +         (match_operand:V16QI 1 "register_operand" "v"))
5164       (unspec [(const_int 0)] UNSPEC_STVRXL)])]
5165    "TARGET_ALTIVEC && rs6000_cpu == PROCESSOR_CELL"
5166    "stvrxl %1,%y0"
5167 Index: gcc/config/rs6000/rs6000.md
5168 ===================================================================
5169 --- gcc/config/rs6000/rs6000.md (.../tags/gcc_4_6_3_release)    (revision 190226)
5170 +++ gcc/config/rs6000/rs6000.md (.../branches/gcc-4_6-branch)   (revision 190226)
5171 @@ -2524,8 +2524,19 @@
5172    if (GET_CODE (addr1) == PLUS)
5173      {
5174        emit_insn (gen_add3_insn (op2, XEXP (addr1, 0), GEN_INT (4)));
5175 -      addr2 = gen_rtx_PLUS (Pmode, op2, XEXP (addr1, 1));
5176 +      if (TARGET_AVOID_XFORM)
5177 +       {
5178 +         emit_insn (gen_add3_insn (op2, XEXP (addr1, 1), op2));
5179 +         addr2 = op2;
5180 +       }
5181 +      else
5182 +       addr2 = gen_rtx_PLUS (Pmode, op2, XEXP (addr1, 1));
5183      }
5184 +  else if (TARGET_AVOID_XFORM)
5185 +    {
5186 +      emit_insn (gen_add3_insn (op2, addr1, GEN_INT (4)));
5187 +      addr2 = op2;
5188 +    }
5189    else
5190      {
5191        emit_move_insn (op2, GEN_INT (4));
5192 @@ -2574,8 +2585,19 @@
5193    if (GET_CODE (addr1) == PLUS)
5194      {
5195        emit_insn (gen_add3_insn (op2, XEXP (addr1, 0), GEN_INT (4)));
5196 -      addr2 = gen_rtx_PLUS (Pmode, op2, XEXP (addr1, 1));
5197 +      if (TARGET_AVOID_XFORM)
5198 +       {
5199 +         emit_insn (gen_add3_insn (op2, XEXP (addr1, 1), op2));
5200 +         addr2 = op2;
5201 +       }
5202 +      else
5203 +       addr2 = gen_rtx_PLUS (Pmode, op2, XEXP (addr1, 1));
5204      }
5205 +  else if (TARGET_AVOID_XFORM)
5206 +    {
5207 +      emit_insn (gen_add3_insn (op2, addr1, GEN_INT (4)));
5208 +      addr2 = op2;
5209 +    }
5210    else
5211      {
5212        emit_move_insn (op2, GEN_INT (4));
5213 @@ -2655,8 +2677,19 @@
5214    if (GET_CODE (addr1) == PLUS)
5215      {
5216        emit_insn (gen_add3_insn (op2, XEXP (addr1, 0), GEN_INT (4)));
5217 -      addr2 = gen_rtx_PLUS (SImode, op2, XEXP (addr1, 1));
5218 +      if (TARGET_AVOID_XFORM)
5219 +       {
5220 +         emit_insn (gen_add3_insn (op2, XEXP (addr1, 1), op2));
5221 +         addr2 = op2;
5222 +       }
5223 +      else
5224 +       addr2 = gen_rtx_PLUS (SImode, op2, XEXP (addr1, 1));
5225      }
5226 +  else if (TARGET_AVOID_XFORM)
5227 +    {
5228 +      emit_insn (gen_add3_insn (op2, addr1, GEN_INT (4)));
5229 +      addr2 = op2;
5230 +    }
5231    else
5232      {
5233        emit_move_insn (op2, GEN_INT (4));
5234 @@ -2700,8 +2733,19 @@
5235    if (GET_CODE (addr1) == PLUS)
5236      {
5237        emit_insn (gen_add3_insn (op2, XEXP (addr1, 0), GEN_INT (4)));
5238 -      addr2 = gen_rtx_PLUS (SImode, op2, XEXP (addr1, 1));
5239 +      if (TARGET_AVOID_XFORM)
5240 +       {
5241 +         emit_insn (gen_add3_insn (op2, XEXP (addr1, 1), op2));
5242 +         addr2 = op2;
5243 +       }
5244 +      else
5245 +       addr2 = gen_rtx_PLUS (SImode, op2, XEXP (addr1, 1));
5246      }
5247 +  else if (TARGET_AVOID_XFORM)
5248 +    {
5249 +      emit_insn (gen_add3_insn (op2, addr1, GEN_INT (4)));
5250 +      addr2 = op2;
5251 +    }
5252    else
5253      {
5254        emit_move_insn (op2, GEN_INT (4));
5255
5256 Property changes on: gcc/config/rs6000/rs6000.md
5257 ___________________________________________________________________
5258 Added: svn:mergeinfo
5259    Merged /trunk/gcc/config/rs6000/rs6000.md:r187119
5260 Index: gcc/config/arm/arm.c
5261 ===================================================================
5262 --- gcc/config/arm/arm.c        (.../tags/gcc_4_6_3_release)    (revision 190226)
5263 +++ gcc/config/arm/arm.c        (.../branches/gcc-4_6-branch)   (revision 190226)
5264 @@ -2005,7 +2005,8 @@
5265                            global_options_set.x_param_values);
5266  
5267    /* ARM EABI defaults to strict volatile bitfields.  */
5268 -  if (TARGET_AAPCS_BASED && flag_strict_volatile_bitfields < 0)
5269 +  if (TARGET_AAPCS_BASED && flag_strict_volatile_bitfields < 0
5270 +      && abi_version_at_least(2))
5271      flag_strict_volatile_bitfields = 1;
5272  
5273    /* Enable sw prefetching at -O3 for CPUS that have prefetch, and we have deemed
5274 @@ -23422,8 +23423,11 @@
5275         }
5276      }
5277  
5278 +  /* Note: label is before barrier so that in cmp failure case we still get
5279 +     a barrier to stop subsequent loads floating upwards past the ldrex
5280 +     PR target/48126.  */
5281 +  arm_output_asm_insn (emit, 1, operands, "%sLSYB%%=:", LOCAL_LABEL_PREFIX);
5282    arm_process_output_memory_barrier (emit, NULL);
5283 -  arm_output_asm_insn (emit, 1, operands, "%sLSYB%%=:", LOCAL_LABEL_PREFIX);
5284  }
5285  
5286  static rtx
5287 Index: gcc/config/arm/arm.h
5288 ===================================================================
5289 --- gcc/config/arm/arm.h        (.../tags/gcc_4_6_3_release)    (revision 190226)
5290 +++ gcc/config/arm/arm.h        (.../branches/gcc-4_6-branch)   (revision 190226)
5291 @@ -294,7 +294,8 @@
5292  #define TARGET_HAVE_DMB                (arm_arch7)
5293  
5294  /* Nonzero if this chip implements a memory barrier via CP15.  */
5295 -#define TARGET_HAVE_DMB_MCR    (arm_arch6k && ! TARGET_HAVE_DMB)
5296 +#define TARGET_HAVE_DMB_MCR    (arm_arch6 && ! TARGET_HAVE_DMB \
5297 +                                && ! TARGET_THUMB1)
5298  
5299  /* Nonzero if this chip implements a memory barrier instruction.  */
5300  #define TARGET_HAVE_MEMORY_BARRIER (TARGET_HAVE_DMB || TARGET_HAVE_DMB_MCR)
5301 Index: gcc/config/pa/predicates.md
5302 ===================================================================
5303 --- gcc/config/pa/predicates.md (.../tags/gcc_4_6_3_release)    (revision 190226)
5304 +++ gcc/config/pa/predicates.md (.../branches/gcc-4_6-branch)   (revision 190226)
5305 @@ -421,9 +421,9 @@
5306    (ior (match_operand 0 "register_operand")
5307         (match_operand 0 "cint_ior_operand")))
5308  
5309 -;; True iff OP is a CONST_INT of the forms 0...0xxxx or
5310 -;; 0...01...1xxxx. Such values can be the left hand side x in (x <<
5311 -;; r), using the zvdepi instruction.
5312 +;; True iff OP is a CONST_INT of the forms 0...0xxxx, 0...01...1xxxx,
5313 +;; or 1...1xxxx. Such values can be the left hand side x in (x << r),
5314 +;; using the zvdepi instruction.
5315  
5316  (define_predicate "lhs_lshift_cint_operand"
5317    (match_code "const_int")
5318 Index: gcc/config/pa/linux-unwind.h
5319 ===================================================================
5320 --- gcc/config/pa/linux-unwind.h        (.../tags/gcc_4_6_3_release)    (revision 190226)
5321 +++ gcc/config/pa/linux-unwind.h        (.../branches/gcc-4_6-branch)   (revision 190226)
5322 @@ -1,5 +1,5 @@
5323  /* DWARF2 EH unwinding support for PA Linux.
5324 -   Copyright (C) 2004, 2005, 2009 Free Software Foundation, Inc.
5325 +   Copyright (C) 2004, 2005, 2009, 2012 Free Software Foundation, Inc.
5326  
5327  This file is part of GCC.
5328  
5329 @@ -63,7 +63,7 @@
5330    int i;
5331    struct sigcontext *sc;
5332    struct rt_sigframe {
5333 -    struct siginfo info;
5334 +    siginfo_t info;
5335      struct ucontext uc;
5336    } *frame;
5337  
5338 Index: gcc/config/pa/pa.md
5339 ===================================================================
5340 --- gcc/config/pa/pa.md (.../tags/gcc_4_6_3_release)    (revision 190226)
5341 +++ gcc/config/pa/pa.md (.../branches/gcc-4_6-branch)   (revision 190226)
5342 @@ -6348,7 +6348,7 @@
5343    ""
5344    "*
5345  {
5346 -  int x = INTVAL (operands[1]);
5347 +  unsigned HOST_WIDE_INT x = UINTVAL (operands[1]);
5348    operands[2] = GEN_INT (4 + exact_log2 ((x >> 4) + 1));
5349    operands[1] = GEN_INT ((x & 0xf) - 0x10);
5350    return \"{zvdepi %1,%2,%0|depwi,z %1,%%sar,%2,%0}\";
5351 @@ -6366,7 +6366,7 @@
5352    "exact_log2 (INTVAL (operands[1]) + 1) > 0"
5353    "*
5354  {
5355 -  int x = INTVAL (operands[1]);
5356 +  HOST_WIDE_INT x = INTVAL (operands[1]);
5357    operands[2] = GEN_INT (exact_log2 (x + 1));
5358    return \"{vdepi -1,%2,%0|depwi -1,%%sar,%2,%0}\";
5359  }"
5360 @@ -6383,7 +6383,7 @@
5361    "INTVAL (operands[1]) == -2"
5362    "*
5363  {
5364 -  int x = INTVAL (operands[1]);
5365 +  HOST_WIDE_INT x = INTVAL (operands[1]);
5366    operands[2] = GEN_INT (exact_log2 ((~x) + 1));
5367    return \"{vdepi 0,%2,%0|depwi 0,%%sar,%2,%0}\";
5368  }"
5369 @@ -6447,7 +6447,7 @@
5370    "TARGET_64BIT"
5371    "*
5372  {
5373 -  int x = INTVAL (operands[1]);
5374 +  unsigned HOST_WIDE_INT x = UINTVAL (operands[1]);
5375    operands[2] = GEN_INT (4 + exact_log2 ((x >> 4) + 1));
5376    operands[1] = GEN_INT ((x & 0x1f) - 0x20);
5377    return \"depdi,z %1,%%sar,%2,%0\";
5378 @@ -6465,7 +6465,7 @@
5379    "TARGET_64BIT && exact_log2 (INTVAL (operands[1]) + 1) > 0"
5380    "*
5381  {
5382 -  int x = INTVAL (operands[1]);
5383 +  HOST_WIDE_INT x = INTVAL (operands[1]);
5384    operands[2] = GEN_INT (exact_log2 (x + 1));
5385    return \"depdi -1,%%sar,%2,%0\";
5386  }"
5387 @@ -6482,7 +6482,7 @@
5388    "TARGET_64BIT && INTVAL (operands[1]) == -2"
5389    "*
5390  {
5391 -  int x = INTVAL (operands[1]);
5392 +  HOST_WIDE_INT x = INTVAL (operands[1]);
5393    operands[2] = GEN_INT (exact_log2 ((~x) + 1));
5394    return \"depdi 0,%%sar,%2,%0\";
5395  }"
5396 @@ -6671,6 +6671,20 @@
5397  \f
5398  ;; Unconditional and other jump instructions.
5399  
5400 +;; Trivial return used when no epilogue is needed.
5401 +(define_insn "return"
5402 +  [(return)
5403 +   (use (reg:SI 2))]
5404 +  "pa_can_use_return_insn ()"
5405 +  "*
5406 +{
5407 +  if (TARGET_PA_20)
5408 +    return \"bve%* (%%r2)\";
5409 +  return \"bv%* %%r0(%%r2)\";
5410 +}"
5411 +  [(set_attr "type" "branch")
5412 +   (set_attr "length" "4")])
5413 +
5414  ;; This is used for most returns.
5415  (define_insn "return_internal"
5416    [(return)
5417 @@ -6719,11 +6733,8 @@
5418    rtx x;
5419  
5420    /* Try to use the trivial return first.  Else use the full epilogue.  */
5421 -  if (reload_completed
5422 -      && !frame_pointer_needed
5423 -      && !df_regs_ever_live_p (2)
5424 -      && (compute_frame_size (get_frame_size (), 0) ? 0 : 1))
5425 -    x = gen_return_internal ();
5426 +  if (pa_can_use_return_insn ())
5427 +    x = gen_return ();
5428    else
5429      {
5430        hppa_expand_epilogue ();
5431 Index: gcc/config/pa/pa-protos.h
5432 ===================================================================
5433 --- gcc/config/pa/pa-protos.h   (.../tags/gcc_4_6_3_release)    (revision 190226)
5434 +++ gcc/config/pa/pa-protos.h   (.../branches/gcc-4_6-branch)   (revision 190226)
5435 @@ -136,6 +136,7 @@
5436  extern int cint_ok_for_move (HOST_WIDE_INT);
5437  extern void hppa_expand_prologue (void);
5438  extern void hppa_expand_epilogue (void);
5439 +extern bool pa_can_use_return_insn (void);
5440  extern int ior_mask_p (unsigned HOST_WIDE_INT);
5441  extern void compute_zdepdi_operands (unsigned HOST_WIDE_INT,
5442                                      unsigned *);
5443 Index: gcc/config/pa/pa.c
5444 ===================================================================
5445 --- gcc/config/pa/pa.c  (.../tags/gcc_4_6_3_release)    (revision 190226)
5446 +++ gcc/config/pa/pa.c  (.../branches/gcc-4_6-branch)   (revision 190226)
5447 @@ -185,6 +185,7 @@
5448  static void pa_conditional_register_usage (void);
5449  static enum machine_mode pa_c_mode_for_suffix (char);
5450  static section *pa_function_section (tree, enum node_frequency, bool, bool);
5451 +static unsigned int pa_section_type_flags (tree, const char *, int);
5452  
5453  /* The following extra sections are only used for SOM.  */
5454  static GTY(()) section *som_readonly_data_section;
5455 @@ -400,6 +401,9 @@
5456  #undef TARGET_ASM_FUNCTION_SECTION
5457  #define TARGET_ASM_FUNCTION_SECTION pa_function_section
5458  
5459 +#undef TARGET_SECTION_TYPE_FLAGS
5460 +#define TARGET_SECTION_TYPE_FLAGS pa_section_type_flags
5461 +
5462  struct gcc_target targetm = TARGET_INITIALIZER;
5463  \f
5464  /* Parse the -mfixed-range= option string.  */
5465 @@ -4442,6 +4446,24 @@
5466      }
5467  }
5468  
5469 +bool
5470 +pa_can_use_return_insn (void)
5471 +{
5472 +  if (!reload_completed)
5473 +    return false;
5474 +
5475 +  if (frame_pointer_needed)
5476 +    return false;
5477 +
5478 +  if (df_regs_ever_live_p (2))
5479 +    return false;
5480 +
5481 +  if (crtl->profile)
5482 +    return false;
5483 +
5484 +  return compute_frame_size (get_frame_size (), 0) == 0;
5485 +}
5486 +
5487  rtx
5488  hppa_pic_save_rtx (void)
5489  {
5490 @@ -4586,7 +4608,7 @@
5491    rtx saved_rp;
5492    rtx ins;
5493  
5494 -  /* Instruction stream at the normal return address for the export stub:
5495 +  /* The instruction stream at the return address of a PA1.X export stub is:
5496  
5497         0x4bc23fd1 | stub+8:   ldw -18(sr0,sp),rp
5498         0x004010a1 | stub+12:  ldsid (sr0,rp),r1
5499 @@ -4594,11 +4616,17 @@
5500         0xe0400002 | stub+20:  be,n 0(sr0,rp)
5501  
5502       0xe0400002 must be specified as -532676606 so that it won't be
5503 -     rejected as an invalid immediate operand on 64-bit hosts.  */
5504 +     rejected as an invalid immediate operand on 64-bit hosts.
5505  
5506 -  HOST_WIDE_INT insns[4] = {0x4bc23fd1, 0x004010a1, 0x00011820, -532676606};
5507 -  int i;
5508 +     The instruction stream at the return address of a PA2.0 export stub is:
5509  
5510 +       0x4bc23fd1 | stub+8:   ldw -18(sr0,sp),rp
5511 +       0xe840d002 | stub+12:  bve,n (rp)
5512 +  */
5513 +
5514 +  HOST_WIDE_INT insns[4];
5515 +  int i, len;
5516 +
5517    if (count != 0)
5518      return NULL_RTX;
5519  
5520 @@ -4620,11 +4648,26 @@
5521    ins = copy_to_reg (gen_rtx_AND (Pmode, rp, MASK_RETURN_ADDR));
5522    label = gen_label_rtx ();
5523  
5524 +  if (TARGET_PA_20)
5525 +    {
5526 +      insns[0] = 0x4bc23fd1;
5527 +      insns[1] = -398405630;
5528 +      len = 2;
5529 +    }
5530 +  else
5531 +    {
5532 +      insns[0] = 0x4bc23fd1;
5533 +      insns[1] = 0x004010a1;
5534 +      insns[2] = 0x00011820;
5535 +      insns[3] = -532676606;
5536 +      len = 4;
5537 +    }
5538 +
5539    /* Check the instruction stream at the normal return address for the
5540       export stub.  If it is an export stub, than our return address is
5541       really in -24[frameaddr].  */
5542  
5543 -  for (i = 0; i < 3; i++)
5544 +  for (i = 0; i < len; i++)
5545      {
5546        rtx op0 = gen_rtx_MEM (SImode, plus_constant (ins, i * 4)); 
5547        rtx op1 = GEN_INT (insns[i]);
5548 @@ -7501,7 +7544,7 @@
5549      return 24;
5550    else
5551      {
5552 -      if (!TARGET_LONG_CALLS && distance < 240000)
5553 +      if (!TARGET_LONG_CALLS && distance < MAX_PCREL17F_OFFSET)
5554         return 8;
5555  
5556        if (TARGET_LONG_ABS_CALL && !flag_pic)
5557 @@ -7714,7 +7757,7 @@
5558    /* pc-relative branch.  */
5559    if (!TARGET_LONG_CALLS
5560        && ((TARGET_PA_20 && !sibcall && distance < 7600000)
5561 -         || distance < 240000))
5562 +         || distance < MAX_PCREL17F_OFFSET))
5563      length += 8;
5564  
5565    /* 64-bit plabel sequence.  */
5566 @@ -8073,7 +8116,7 @@
5567    if (TARGET_FAST_INDIRECT_CALLS
5568        || (!TARGET_PORTABLE_RUNTIME
5569           && ((TARGET_PA_20 && !TARGET_SOM && distance < 7600000)
5570 -             || distance < 240000)))
5571 +             || distance < MAX_PCREL17F_OFFSET)))
5572      return 8;
5573  
5574    if (flag_pic)
5575 @@ -10392,4 +10435,23 @@
5576    return default_function_section (decl, freq, startup, exit);
5577  }
5578  
5579 +/* Implement TARGET_SECTION_TYPE_FLAGS.  */
5580 +
5581 +static unsigned int
5582 +pa_section_type_flags (tree decl, const char *name, int reloc)
5583 +{
5584 +  unsigned int flags;
5585 +
5586 +  flags = default_section_type_flags (decl, name, reloc);
5587 +
5588 +  /* Function labels are placed in the constant pool.  This can
5589 +     cause a section conflict if decls are put in ".data.rel.ro"
5590 +     or ".data.rel.ro.local" using the __attribute__ construct.  */
5591 +  if (strcmp (name, ".data.rel.ro") == 0
5592 +      || strcmp (name, ".data.rel.ro.local") == 0)
5593 +    flags |= SECTION_WRITE | SECTION_RELRO;
5594 +
5595 +  return flags;
5596 +}
5597 +
5598  #include "gt-pa.h"
5599 Index: gcc/config/pa/pa.h
5600 ===================================================================
5601 --- gcc/config/pa/pa.h  (.../tags/gcc_4_6_3_release)    (revision 190226)
5602 +++ gcc/config/pa/pa.h  (.../branches/gcc-4_6-branch)   (revision 190226)
5603 @@ -1563,3 +1563,12 @@
5604  #undef TARGET_HAVE_TLS
5605  #define TARGET_HAVE_TLS true
5606  #endif
5607 +
5608 +/* The maximum offset in bytes for a PA 1.X pc-relative call to the
5609 +   head of the preceding stub table.  The selected offsets have been
5610 +   chosen so that approximately one call stub is allocated for every
5611 +   86.7 instructions.  A long branch stub is two instructions when
5612 +   not generating PIC code.  For HP-UX and ELF targets, PIC stubs are
5613 +   seven and four instructions, respectively.  */  
5614 +#define MAX_PCREL17F_OFFSET \
5615 +  (flag_pic ? (TARGET_HPUX ? 198164 : 221312) : 240000)
5616 Index: gcc/config/mips/linux-unwind.h
5617 ===================================================================
5618 --- gcc/config/mips/linux-unwind.h      (.../tags/gcc_4_6_3_release)    (revision 190226)
5619 +++ gcc/config/mips/linux-unwind.h      (.../branches/gcc-4_6-branch)   (revision 190226)
5620 @@ -1,5 +1,6 @@
5621  /* DWARF2 EH unwinding support for MIPS Linux.
5622 -   Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
5623 +   Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2012 Free Software
5624 +   Foundation, Inc.
5625  
5626  This file is part of GCC.
5627  
5628 @@ -75,7 +76,7 @@
5629        struct rt_sigframe {
5630         u_int32_t ass[4];  /* Argument save space for o32.  */
5631         u_int32_t trampoline[2];
5632 -       struct siginfo info;
5633 +       siginfo_t info;
5634         _sig_ucontext_t uc;
5635        } *rt_ = context->cfa;
5636        sc = &rt_->uc.uc_mcontext;
5637 Index: gcc/config/h8300/h8300.c
5638 ===================================================================
5639 --- gcc/config/h8300/h8300.c    (.../tags/gcc_4_6_3_release)    (revision 190226)
5640 +++ gcc/config/h8300/h8300.c    (.../branches/gcc-4_6-branch)   (revision 190226)
5641 @@ -416,7 +416,7 @@
5642      }
5643  
5644    /* This target defaults to strict volatile bitfields.  */
5645 -  if (flag_strict_volatile_bitfields < 0)
5646 +  if (flag_strict_volatile_bitfields < 0 && abi_version_at_least(2))
5647      flag_strict_volatile_bitfields = 1;
5648  }
5649  
5650 Index: gcc/config/bfin/linux-unwind.h
5651 ===================================================================
5652 --- gcc/config/bfin/linux-unwind.h      (.../tags/gcc_4_6_3_release)    (revision 190226)
5653 +++ gcc/config/bfin/linux-unwind.h      (.../branches/gcc-4_6-branch)   (revision 190226)
5654 @@ -1,5 +1,5 @@
5655  /* DWARF2 EH unwinding support for Blackfin.
5656 -   Copyright (C) 2007, 2009 Free Software Foundation, Inc.
5657 +   Copyright (C) 2007, 2009, 2012 Free Software Foundation, Inc.
5658  
5659  This file is part of GCC.
5660  
5661 @@ -48,10 +48,10 @@
5662      {
5663        struct rt_sigframe {
5664         int sig;
5665 -       struct siginfo *pinfo;
5666 +       siginfo_t *pinfo;
5667         void *puc;
5668         char retcode[8];
5669 -       struct siginfo info;
5670 +       siginfo_t info;
5671         struct ucontext uc;
5672        } *rt_ = context->cfa;
5673  
5674 Index: gcc/convert.c
5675 ===================================================================
5676 --- gcc/convert.c       (.../tags/gcc_4_6_3_release)    (revision 190226)
5677 +++ gcc/convert.c       (.../branches/gcc-4_6-branch)   (revision 190226)
5678 @@ -44,11 +44,6 @@
5679    if (TREE_TYPE (expr) == type)
5680      return expr;
5681  
5682 -  /* Propagate overflow to the NULL pointer.  */
5683 -  if (integer_zerop (expr))
5684 -    return force_fit_type_double (type, double_int_zero, 0,
5685 -                                 TREE_OVERFLOW (expr));
5686 -
5687    switch (TREE_CODE (TREE_TYPE (expr)))
5688      {
5689      case POINTER_TYPE:
5690 Index: libstdc++-v3/configure
5691 ===================================================================
5692 --- libstdc++-v3/configure      (.../tags/gcc_4_6_3_release)    (revision 190226)
5693 +++ libstdc++-v3/configure      (.../branches/gcc-4_6-branch)   (revision 190226)
5694 @@ -19477,7 +19477,85 @@
5695  
5696  
5697  
5698 +# For copy-assignable gthreads types
5699  
5700 +
5701 +
5702 +  ac_ext=cpp
5703 +ac_cpp='$CXXCPP $CPPFLAGS'
5704 +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5705 +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5706 +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5707 +
5708 +  ac_save_CXXFLAGS="$CXXFLAGS"
5709 +  CXXFLAGS="$CXXFLAGS -std=c++0x -I${toplevel_srcdir}/gcc"
5710 +
5711 +  target_thread_file=`$CXX -v 2>&1 | sed -n 's/^Thread model: //p'`
5712 +  case $target_thread_file in
5713 +    posix)
5714 +      CXXFLAGS="$CXXFLAGS -DSUPPORTS_WEAK -DGTHREAD_USE_WEAK -D_PTHREADS"
5715 +  esac
5716 +
5717 +  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gthreads types are copy-assignable in C++11 mode" >&5
5718 +$as_echo_n "checking whether gthreads types are copy-assignable in C++11 mode... " >&6; }
5719 +
5720 +  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5721 +/* end confdefs.h.  */
5722 +#include "gthr.h"
5723 +int
5724 +main ()
5725 +{
5726 +
5727 +      #ifdef __GTHREAD_MUTEX_INIT
5728 +      __gthread_mutex_t m1;
5729 +      __gthread_mutex_t m2 = __GTHREAD_MUTEX_INIT;
5730 +      m1 = m2;
5731 +      #endif
5732 +      #ifdef __GTHREAD_RECURSIVE_MUTEX_INIT
5733 +      __gthread_recursive_mutex_t r1;
5734 +      __gthread_recursive_mutex_t r2 = __GTHREAD_RECURSIVE_MUTEX_INIT;
5735 +      r1 = r2;
5736 +      #endif
5737 +      #ifdef __GTHREAD_HAS_COND
5738 +      #ifdef __GTHREAD_COND_INIT
5739 +      __gthread_cond_t c1;
5740 +      __gthread_cond_t c2 = __GTHREAD_COND_INIT;
5741 +      c1 = c2;
5742 +      #endif
5743 +      #endif
5744 +
5745 +  ;
5746 +  return 0;
5747 +}
5748 +_ACEOF
5749 +if ac_fn_cxx_try_compile "$LINENO"; then :
5750 +  ac_gthread_cxx11_copy_assign=1
5751 +else
5752 +  ac_gthread_cxx11_copy_assign=0
5753 +fi
5754 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5755 +
5756 +  if test $ac_gthread_cxx11_copy_assign = 1 ; then res_gthr_copy_assign=yes ;
5757 +  else res_gthr_copy_assign=no ; fi
5758 +  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $res_gthr_copy_assign" >&5
5759 +$as_echo "$res_gthr_copy_assign" >&6; }
5760 +
5761 +  if test x"$res_gthr_copy_assign" = x"no"; then
5762 +
5763 +$as_echo "#define _GLIBCXX_GTHREADS_NO_COPY_ASSIGN_IN_CXX11 1" >>confdefs.h
5764 +
5765 +  fi
5766 +
5767 +  CXXFLAGS="$ac_save_CXXFLAGS"
5768 +  ac_ext=c
5769 +ac_cpp='$CPP $CPPFLAGS'
5770 +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5771 +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5772 +ac_compiler_gnu=$ac_cv_c_compiler_gnu
5773 +
5774 +
5775 +
5776 +
5777    ac_fn_c_check_header_mongrel "$LINENO" "locale.h" "ac_cv_header_locale_h" "$ac_includes_default"
5778  if test "x$ac_cv_header_locale_h" = x""yes; then :
5779  
5780 Index: libstdc++-v3/src/condition_variable.cc
5781 ===================================================================
5782 --- libstdc++-v3/src/condition_variable.cc      (.../tags/gcc_4_6_3_release)    (revision 190226)
5783 +++ libstdc++-v3/src/condition_variable.cc      (.../branches/gcc-4_6-branch)   (revision 190226)
5784 @@ -1,6 +1,6 @@
5785  // condition_variable -*- C++ -*-
5786  
5787 -// Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
5788 +// Copyright (C) 2008, 2009, 2010, 2012 Free Software Foundation, Inc.
5789  //
5790  // This file is part of the GNU ISO C++ Library.  This library is free
5791  // software; you can redistribute it and/or modify it under the
5792 @@ -34,7 +34,12 @@
5793    {
5794  #ifdef __GTHREAD_COND_INIT
5795      __native_type __tmp = __GTHREAD_COND_INIT;
5796 +#if defined __GXX_EXPERIMENTAL_CXX0X__ \
5797 +  && defined _GLIBCXX_GTHREADS_NO_COPY_ASSIGN_IN_CXX11
5798 +    __builtin_memcpy(&_M_cond, &__tmp, sizeof(_M_cond));
5799 +#else
5800      _M_cond = __tmp;
5801 +#endif
5802  #else
5803      int __e = __gthread_cond_init(&_M_cond, 0);
5804  
5805 Index: libstdc++-v3/configure.ac
5806 ===================================================================
5807 --- libstdc++-v3/configure.ac   (.../tags/gcc_4_6_3_release)    (revision 190226)
5808 +++ libstdc++-v3/configure.ac   (.../branches/gcc-4_6-branch)   (revision 190226)
5809 @@ -164,6 +164,9 @@
5810  # For gthread support
5811  GLIBCXX_CHECK_GTHREADS
5812  
5813 +# For copy-assignable gthreads types
5814 +GLIBCXX_GTHREADS_CXX11_COPY_ASSIGN
5815 +
5816  AC_LC_MESSAGES
5817  
5818  # Check for available headers.
5819 Index: libstdc++-v3/include/debug/safe_iterator.h
5820 ===================================================================
5821 --- libstdc++-v3/include/debug/safe_iterator.h  (.../tags/gcc_4_6_3_release)    (revision 190226)
5822 +++ libstdc++-v3/include/debug/safe_iterator.h  (.../branches/gcc-4_6-branch)   (revision 190226)
5823 @@ -1,6 +1,6 @@
5824  // Safe iterator implementation  -*- C++ -*-
5825  
5826 -// Copyright (C) 2003, 2004, 2005, 2006, 2009, 2010, 2011
5827 +// Copyright (C) 2003, 2004, 2005, 2006, 2009, 2010, 2011, 2012
5828  // Free Software Foundation, Inc.
5829  //
5830  // This file is part of the GNU ISO C++ Library.  This library is free
5831 @@ -142,7 +142,25 @@
5832                               ._M_iterator(__x, "other"));
5833        }
5834  
5835 +#ifdef __GXX_EXPERIMENTAL_CXX0X__
5836        /**
5837 +       * @brief Move construction.
5838 +       * @post __x is singular and unattached
5839 +       */
5840 +      _Safe_iterator(_Safe_iterator&& __x) : _M_current()
5841 +      {
5842 +       _GLIBCXX_DEBUG_VERIFY(!__x._M_singular()
5843 +                             || __x._M_current == _Iterator(),
5844 +                             _M_message(__msg_init_copy_singular)
5845 +                             ._M_iterator(*this, "this")
5846 +                             ._M_iterator(__x, "other"));
5847 +       std::swap(_M_current, __x._M_current);
5848 +       this->_M_attach(__x._M_sequence);
5849 +       __x._M_detach();
5850 +      }
5851 +#endif
5852 +
5853 +      /**
5854         *  @brief Converting constructor from a mutable iterator to a
5855         *  constant iterator.
5856        */
5857 @@ -181,7 +199,28 @@
5858         return *this;
5859        }
5860  
5861 +#ifdef __GXX_EXPERIMENTAL_CXX0X__
5862        /**
5863 +       * @brief Move assignment.
5864 +       * @post __x is singular and unattached
5865 +       */
5866 +      _Safe_iterator&
5867 +      operator=(_Safe_iterator&& __x)
5868 +      {
5869 +       _GLIBCXX_DEBUG_VERIFY(!__x._M_singular()
5870 +                             || __x._M_current == _Iterator(),
5871 +                             _M_message(__msg_copy_singular)
5872 +                             ._M_iterator(*this, "this")
5873 +                             ._M_iterator(__x, "other"));
5874 +       _M_current = __x._M_current;
5875 +       _M_attach(__x._M_sequence);
5876 +       __x._M_detach();
5877 +       __x._M_current = _Iterator();
5878 +       return *this;
5879 +      }
5880 +#endif
5881 +
5882 +      /**
5883         *  @brief Iterator dereference.
5884         *  @pre iterator is dereferenceable
5885         */
5886 @@ -415,7 +454,9 @@
5887        /// Is this iterator equal to the sequence's before_begin() iterator if
5888        /// any?
5889        bool _M_is_before_begin() const
5890 -      { return _BeforeBeginHelper<_Sequence>::_M_Is(base(), _M_get_sequence()); }
5891 +      {
5892 +       return _BeforeBeginHelper<_Sequence>::_M_Is(base(), _M_get_sequence());
5893 +      }
5894      };
5895  
5896    template<typename _IteratorL, typename _IteratorR, typename _Sequence>
5897 Index: libstdc++-v3/include/std/condition_variable
5898 ===================================================================
5899 --- libstdc++-v3/include/std/condition_variable (.../tags/gcc_4_6_3_release)    (revision 190226)
5900 +++ libstdc++-v3/include/std/condition_variable (.../branches/gcc-4_6-branch)   (revision 190226)
5901 @@ -1,6 +1,6 @@
5902  // <condition_variable> -*- C++ -*-
5903  
5904 -// Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
5905 +// Copyright (C) 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
5906  //
5907  // This file is part of the GNU ISO C++ Library.  This library is free
5908  // software; you can redistribute it and/or modify it under the
5909 @@ -171,6 +171,26 @@
5910      condition_variable                 _M_cond;
5911      mutex                              _M_mutex;
5912  
5913 +    // scoped unlock - unlocks in ctor, re-locks in dtor
5914 +    template<typename _Lock>
5915 +      struct _Unlock
5916 +      {
5917 +       explicit _Unlock(_Lock& __lk) : _M_lock(__lk) { __lk.unlock(); }
5918 +
5919 +       ~_Unlock() noexcept(false)
5920 +       {
5921 +         if (uncaught_exception())
5922 +           __try { _M_lock.lock(); } __catch(...) { }
5923 +         else
5924 +           _M_lock.lock();
5925 +       }
5926 +
5927 +       _Unlock(const _Unlock&) = delete;
5928 +       _Unlock& operator=(const _Unlock&) = delete;
5929 +
5930 +       _Lock& _M_lock;
5931 +      };
5932 +
5933    public:
5934      typedef condition_variable::native_handle_type     native_handle_type;
5935  
5936 @@ -198,21 +218,8 @@
5937        void
5938        wait(_Lock& __lock)
5939        {
5940 -       // scoped unlock - unlocks in ctor, re-locks in dtor
5941 -       struct _Unlock {
5942 -         explicit _Unlock(_Lock& __lk) : _M_lock(__lk) { __lk.unlock(); }
5943 -         ~_Unlock() noexcept(false)
5944 -         {
5945 -           if (uncaught_exception())
5946 -             __try { _M_lock.lock(); } __catch(...) { }
5947 -           else
5948 -             _M_lock.lock();
5949 -         }
5950 -         _Lock& _M_lock;
5951 -       };
5952 -
5953         unique_lock<mutex> __my_lock(_M_mutex);
5954 -       _Unlock __unlock(__lock);
5955 +       _Unlock<_Lock> __unlock(__lock);
5956         // _M_mutex must be unlocked before re-locking __lock so move
5957         // ownership of _M_mutex lock to an object with shorter lifetime.
5958         unique_lock<mutex> __my_lock2(std::move(__my_lock));
5959 @@ -233,11 +240,12 @@
5960        wait_until(_Lock& __lock,
5961                  const chrono::time_point<_Clock, _Duration>& __atime)
5962        {
5963 -        unique_lock<mutex> __my_lock(_M_mutex);
5964 -        __lock.unlock();
5965 -        cv_status __status = _M_cond.wait_until(__my_lock, __atime);
5966 -        __lock.lock();
5967 -        return __status;
5968 +       unique_lock<mutex> __my_lock(_M_mutex);
5969 +       _Unlock<_Lock> __unlock(__lock);
5970 +       // _M_mutex must be unlocked before re-locking __lock so move
5971 +       // ownership of _M_mutex lock to an object with shorter lifetime.
5972 +       unique_lock<mutex> __my_lock2(std::move(__my_lock));
5973 +       return _M_cond.wait_until(__my_lock2, __atime);
5974        }
5975  
5976      template<typename _Lock, typename _Clock,
5977 Index: libstdc++-v3/include/std/mutex
5978 ===================================================================
5979 --- libstdc++-v3/include/std/mutex      (.../tags/gcc_4_6_3_release)    (revision 190226)
5980 +++ libstdc++-v3/include/std/mutex      (.../branches/gcc-4_6-branch)   (revision 190226)
5981 @@ -130,7 +130,7 @@
5982    public:
5983      // matches a gthr-win32.h recursive mutex
5984      template<typename _Rm>
5985 -      static typename enable_if<sizeof(&_Rm::sema), void>::type
5986 +      static typename enable_if<(bool)sizeof(&_Rm::sema), void>::type
5987        _S_destroy(_Rm* __mx)
5988        {
5989          __gthread_mutex_t __tmp;
5990 @@ -139,7 +139,7 @@
5991  
5992      // matches a recursive mutex with a member 'actual'
5993      template<typename _Rm>
5994 -      static typename enable_if<sizeof(&_Rm::actual), void>::type
5995 +      static typename enable_if<(bool)sizeof(&_Rm::actual), void>::type
5996        _S_destroy(_Rm* __mx)
5997        { __gthread_mutex_destroy(&__mx->actual); }
5998  
5999 Index: libstdc++-v3/include/ext/concurrence.h
6000 ===================================================================
6001 --- libstdc++-v3/include/ext/concurrence.h      (.../tags/gcc_4_6_3_release)    (revision 190226)
6002 +++ libstdc++-v3/include/ext/concurrence.h      (.../branches/gcc-4_6-branch)   (revision 190226)
6003 @@ -1,6 +1,6 @@
6004  // Support for concurrent programing -*- C++ -*-
6005  
6006 -// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
6007 +// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012
6008  // Free Software Foundation, Inc.
6009  //
6010  // This file is part of the GNU ISO C++ Library.  This library is free
6011 @@ -140,6 +140,18 @@
6012    }
6013  #endif
6014   
6015 +  template<typename _Tp>
6016 +    static inline void
6017 +    __copy_gthr_type(_Tp& __to, const _Tp& __from)
6018 +    {
6019 +#if defined __GXX_EXPERIMENTAL_CXX0X__ \
6020 +  && defined _GLIBCXX_GTHREADS_NO_COPY_ASSIGN_IN_CXX11
6021 +      __builtin_memcpy(&__to, &__from, sizeof(__to));
6022 +#else
6023 +      __to = __from;
6024 +#endif
6025 +    }
6026 +
6027    class __mutex 
6028    {
6029    private:
6030 @@ -156,7 +168,7 @@
6031         {
6032  #if defined __GTHREAD_MUTEX_INIT
6033           __gthread_mutex_t __tmp = __GTHREAD_MUTEX_INIT;
6034 -         _M_mutex = __tmp;
6035 +         __copy_gthr_type(_M_mutex, __tmp);
6036  #else
6037           __GTHREAD_MUTEX_INIT_FUNCTION(&_M_mutex); 
6038  #endif
6039 @@ -214,7 +226,7 @@
6040         {
6041  #if defined __GTHREAD_RECURSIVE_MUTEX_INIT
6042           __gthread_recursive_mutex_t __tmp = __GTHREAD_RECURSIVE_MUTEX_INIT;
6043 -         _M_mutex = __tmp;
6044 +         __copy_gthr_type(_M_mutex, __tmp);
6045  #else
6046           __GTHREAD_RECURSIVE_MUTEX_INIT_FUNCTION(&_M_mutex); 
6047  #endif
6048 @@ -270,7 +282,7 @@
6049  
6050      // matches a gthr-win32.h recursive mutex
6051      template<typename _Rm>
6052 -      static typename __enable_if<sizeof(&_Rm::sema), void>::__type
6053 +      static typename __enable_if<(bool)sizeof(&_Rm::sema), void>::__type
6054        _S_destroy(_Rm* __mx)
6055        {
6056          __gthread_mutex_t __tmp;
6057 @@ -279,7 +291,7 @@
6058  
6059      // matches a recursive mutex with a member 'actual'
6060      template<typename _Rm>
6061 -      static typename __enable_if<sizeof(&_Rm::actual), void>::__type
6062 +      static typename __enable_if<(bool)sizeof(&_Rm::actual), void>::__type
6063        _S_destroy(_Rm* __mx)
6064        { __gthread_mutex_destroy(&__mx->actual); }
6065  
6066 @@ -332,7 +344,7 @@
6067         {
6068  #if defined __GTHREAD_COND_INIT
6069           __gthread_cond_t __tmp = __GTHREAD_COND_INIT;
6070 -         _M_cond = __tmp;
6071 +         __copy_gthr_type(_M_cond, __tmp);
6072  #else
6073           __GTHREAD_COND_INIT_FUNCTION(&_M_cond);
6074  #endif
6075 Index: libstdc++-v3/include/ext/rope
6076 ===================================================================
6077 --- libstdc++-v3/include/ext/rope       (.../tags/gcc_4_6_3_release)    (revision 190226)
6078 +++ libstdc++-v3/include/ext/rope       (.../branches/gcc-4_6-branch)   (revision 190226)
6079 @@ -1,7 +1,7 @@
6080  // SGI's rope class -*- C++ -*-
6081  
6082 -// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
6083 -// Free Software Foundation, Inc.
6084 +// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
6085 +// 2012 Free Software Foundation, Inc.
6086  //
6087  // This file is part of the GNU ISO C++ Library.  This library is free
6088  // software; you can redistribute it and/or modify it under the
6089 @@ -445,6 +445,17 @@
6090      identity_element(_Rope_Concat_fn<_CharT, _Alloc>)
6091      { return rope<_CharT, _Alloc>(); }
6092  
6093 +  static inline void
6094 +  __copy_gthr_mutex(__gthread_mutex_t& __to, const __gthread_mutex_t& __from)
6095 +  {
6096 +#if defined __GXX_EXPERIMENTAL_CXX0X__ \
6097 +  && defined _GLIBCXX_GTHREADS_NO_COPY_ASSIGN_IN_CXX11
6098 +    __builtin_memcpy(&__to, &__from, sizeof(__to));
6099 +#else
6100 +    __to = __from;
6101 +#endif
6102 +  }
6103 +
6104    // Class _Refcount_Base provides a type, _RC_t, a data member,
6105    // _M_ref_count, and member functions _M_incr and _M_decr, which perform
6106    // atomic preincrement/predecrement.  The constructor initializes
6107 @@ -464,7 +475,7 @@
6108      {
6109  #ifdef __GTHREAD_MUTEX_INIT
6110        __gthread_mutex_t __tmp = __GTHREAD_MUTEX_INIT;
6111 -      _M_ref_count_lock = __tmp;
6112 +      __copy_gthr_mutex(_M_ref_count_lock, __tmp);
6113  #elif defined(__GTHREAD_MUTEX_INIT_FUNCTION)
6114        __GTHREAD_MUTEX_INIT_FUNCTION (&_M_ref_count_lock);
6115  #else
6116 @@ -605,7 +616,7 @@
6117      {
6118        // Do not copy a POSIX/gthr mutex once in use.  However, bits are bits.
6119        __gthread_mutex_t __tmp = __GTHREAD_MUTEX_INIT;
6120 -      _M_c_string_lock = __tmp;
6121 +      __copy_gthr_mutex(_M_c_string_lock, __tmp);
6122      }
6123  #else
6124      { __GTHREAD_MUTEX_INIT_FUNCTION (&_M_c_string_lock); }
6125 Index: libstdc++-v3/include/bits/stl_algo.h
6126 ===================================================================
6127 --- libstdc++-v3/include/bits/stl_algo.h        (.../tags/gcc_4_6_3_release)    (revision 190226)
6128 +++ libstdc++-v3/include/bits/stl_algo.h        (.../branches/gcc-4_6-branch)   (revision 190226)
6129 @@ -1811,7 +1811,8 @@
6130           for (; __first != __last; ++__first)
6131             if (__pred(*__first))
6132               {
6133 -               *__result1 = _GLIBCXX_MOVE(*__first);
6134 +               if (__result1 != __first)
6135 +                 *__result1 = _GLIBCXX_MOVE(*__first);
6136                 ++__result1;
6137               }
6138             else
6139 Index: libstdc++-v3/ChangeLog
6140 ===================================================================
6141 --- libstdc++-v3/ChangeLog      (.../tags/gcc_4_6_3_release)    (revision 190226)
6142 +++ libstdc++-v3/ChangeLog      (.../branches/gcc-4_6-branch)   (revision 190226)
6143 @@ -1,3 +1,65 @@
6144 +2012-07-22  Jonathan Wakely  <jwakely.gcc@gmail.com>
6145 +
6146 +       PR libstdc++/53270
6147 +       * acinclude.m4 (GLIBCXX_GTHREADS_CXX11_COPY_ASSIGN): Define.
6148 +       * configure.ac (GLIBCXX_GTHREADS_CXX11_COPY_ASSIGN): Use it.
6149 +       * config.h.in: Regenerate.
6150 +       * configure: Likewise.
6151 +       * include/ext/concurrence.h (__copy_gthr_type): Define.
6152 +       (__mutex::__mutex, __recursive_mutex::__recursive_mutex,
6153 +       __cond::__cond): Use it.
6154 +       * include/ext/rope (__copy_gthr_mutex): Define.
6155 +       (_Refcount_Base::_Refcount_Base, _Rope_RopeRep::_Rope_RopeRep): Use
6156 +       it.
6157 +       * src/condition_variable.cc (condition_variable::condition_variable):
6158 +       Use memcpy instead of assignment.
6159 +
6160 +2012-07-07  Jonathan Wakely  <jwakely.gcc@gmail.com>
6161 +
6162 +       PR libstdc++/53578
6163 +       * include/ext/concurrence.h (__recursive_mutex::_S_destroy): Fix
6164 +       narrowing conversion.
6165 +       * include/std/mutex (__recursive_mutex_base::_S_destroy): Likewise.
6166 +
6167 +2012-07-05  Jonathan Wakely  <jwakely.gcc@gmail.com>
6168 +
6169 +       PR libstdc++/53830
6170 +       * include/std/condition_variable (condition_variable_any::wait):
6171 +       Move _Unlock type to class scope.
6172 +       (condition_variable_any::wait_until): Reuse it.
6173 +       * testsuite/30_threads/condition_variable_any/53830.cc: New.
6174 +
6175 +2012-06-20  Jörg Sonnenberger <joerg@britannica.bec.de>
6176 +           Jonathan Wakely  <jwakely.gcc@gmail.com>
6177 +
6178 +       PR libstdc++/53678
6179 +       * config/os/bsd/netbsd/ctype_base.h: Check for _CTYPE_U.
6180 +       * testsuite/22_locale/ctype_base/53678.cc: New.
6181 +
6182 +2012-04-12   Jeffrey Yasskin  <jyasskin@google.com>
6183 +
6184 +       PR libstdc++/52822
6185 +       * include/bits/stl_algo.h (__stable_partition_adaptive): Avoid
6186 +       move-assigning an object to itself by explicitly testing for
6187 +       identity.
6188 +       * testsuite/25_algorithms/stable_partition/pr52822.cc: Test
6189 +       vectors, which have a destructive self-move-assignment.
6190 +       * testsuite/25_algorithms/stable_partition/moveable.cc (test02):
6191 +       Test with rvalstruct, which explicitly checks
6192 +       self-move-assignment.
6193 +
6194 +2012-04-09  Terry Guo  <terry.guo@arm.com>
6195 +
6196 +       * testsuite/Makefile.am (TEST_GCC_EXEC_PREFIX): New.
6197 +       * testsuite/Makefile.in: Regenerated.
6198 +
6199 +2012-03-08  Jonathan Wakely  <jwakely.gcc@gmail.com>
6200 +
6201 +       PR libstdc++/52433
6202 +       * include/debug/safe_iterator.h (_Safe_iterator): Add move
6203 +       constructor and move assignment operator.
6204 +       * testsuite/23_containers/vector/debug/52433.cc: New.
6205 +
6206  2012-03-01  Release Manager
6207  
6208         * GCC 4.6.3 released.
6209 Index: libstdc++-v3/testsuite/25_algorithms/stable_partition/pr52822.cc
6210 ===================================================================
6211 --- libstdc++-v3/testsuite/25_algorithms/stable_partition/pr52822.cc    (.../tags/gcc_4_6_3_release)    (revision 0)
6212 +++ libstdc++-v3/testsuite/25_algorithms/stable_partition/pr52822.cc    (.../branches/gcc-4_6-branch)   (revision 190226)
6213 @@ -0,0 +1,43 @@
6214 +// { dg-options "-std=gnu++0x" }
6215 +
6216 +// Copyright (C) 2012 Free Software Foundation, Inc.
6217 +//
6218 +// This file is part of the GNU ISO C++ Library.  This library is free
6219 +// software; you can redistribute it and/or modify it under the
6220 +// terms of the GNU General Public License as published by the
6221 +// Free Software Foundation; either version 3, or (at your option)
6222 +// any later version.
6223 +
6224 +// This library is distributed in the hope that it will be useful,
6225 +// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
6226 +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
6227 +// GNU General Public License for more details.
6228 +
6229 +// You should have received a copy of the GNU General Public License along
6230 +// with this library; see the file COPYING3.  If not see
6231 +// <http://www.gnu.org/licenses/>.
6232 +
6233 +// 25.2.12 [lib.alg.partitions] Partitions.
6234 +
6235 +#include <algorithm>
6236 +#include <vector>
6237 +#include <testsuite_hooks.h>
6238 +
6239 +bool true_vector_pred(const std::vector<int>&) { return true; }
6240 +
6241 +void
6242 +test01()
6243 +{
6244 +  std::vector<std::vector<int> > v(1);
6245 +  v[0].push_back(7);
6246 +  VERIFY( v[0].size() == 1 );
6247 +  std::stable_partition(v.begin(), v.end(), &true_vector_pred);
6248 +  VERIFY( v[0].size() == 1 );
6249 +}
6250 +
6251 +int
6252 +main()
6253 +{
6254 +  test01();
6255 +  return 0;
6256 +}
6257 Index: libstdc++-v3/testsuite/25_algorithms/stable_partition/moveable.cc
6258 ===================================================================
6259 --- libstdc++-v3/testsuite/25_algorithms/stable_partition/moveable.cc   (.../tags/gcc_4_6_3_release)    (revision 190226)
6260 +++ libstdc++-v3/testsuite/25_algorithms/stable_partition/moveable.cc   (.../branches/gcc-4_6-branch)   (revision 190226)
6261 @@ -1,6 +1,6 @@
6262  // { dg-options "-std=gnu++0x" }
6263  
6264 -// Copyright (C) 2009, 2010 Free Software Foundation, Inc.
6265 +// Copyright (C) 2009, 2010, 2012 Free Software Foundation, Inc.
6266  //
6267  // This file is part of the GNU ISO C++ Library.  This library is free
6268  // software; you can redistribute it and/or modify it under the
6269 @@ -39,6 +39,11 @@
6270  const int B[] = {2, 4, 6, 8, 10, 12, 14, 16, 1, 3, 5, 7, 9, 11, 13, 15, 17};
6271  const int N = sizeof(A) / sizeof(int);
6272  
6273 +// Check that starting with a true predicate works too. (PR52822)
6274 +const int A2[] = {2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17};
6275 +const int B2[] = {2, 4, 6, 8, 10, 12, 14, 16, 3, 5, 7, 9, 11, 13, 15, 17};
6276 +const int N2 = sizeof(A2) / sizeof(int);
6277 +
6278  struct Pred
6279  {
6280    bool
6281 @@ -46,7 +51,7 @@
6282    { return (x.val % 2) == 0; }
6283  };
6284  
6285 -// 25.2.12 stable_partition()
6286 +// 25.2.12 stable_partition(), starting with a false predicate.
6287  void
6288  test01()
6289  {
6290 @@ -60,9 +65,24 @@
6291    VERIFY( std::equal(s1, s1 + N, B) );
6292  }
6293  
6294 +// 25.2.12 stable_partition(), starting with a true predicate.
6295 +void
6296 +test02()
6297 +{
6298 +  bool test __attribute__((unused)) = true;
6299 +
6300 +  rvalstruct s1[N2];
6301 +  std::copy(A2, A2 + N2, s1);
6302 +  Container con(s1, s1 + N2);
6303 +
6304 +  std::stable_partition(con.begin(), con.end(), Pred());
6305 +  VERIFY( std::equal(s1, s1 + N2, B2) );
6306 +}
6307 +
6308  int
6309  main()
6310  {
6311    test01();
6312 +  test02();
6313    return 0;
6314  }
6315 Index: libstdc++-v3/testsuite/Makefile.in
6316 ===================================================================
6317 --- libstdc++-v3/testsuite/Makefile.in  (.../tags/gcc_4_6_3_release)    (revision 190226)
6318 +++ libstdc++-v3/testsuite/Makefile.in  (.../branches/gcc-4_6-branch)   (revision 190226)
6319 @@ -502,6 +502,7 @@
6320         @echo 'set target_triplet $(target_triplet)' >>site.tmp
6321         @echo 'set libiconv "$(LIBICONV)"' >>site.tmp
6322         @echo 'set baseline_dir "$(baseline_dir)"' >> site.tmp
6323 +       @echo 'set TEST_GCC_EXEC_PREFIX "$(libdir)/gcc/"' >> site.tmp
6324         @echo '## All variables above are generated by configure. Do Not Edit ##' >>site.tmp
6325         @test ! -f site.exp || \
6326           sed '1,/^## All variables above are.*##/ d' site.exp >> site.tmp
6327 Index: libstdc++-v3/testsuite/30_threads/condition_variable_any/53830.cc
6328 ===================================================================
6329 --- libstdc++-v3/testsuite/30_threads/condition_variable_any/53830.cc   (.../tags/gcc_4_6_3_release)    (revision 0)
6330 +++ libstdc++-v3/testsuite/30_threads/condition_variable_any/53830.cc   (.../branches/gcc-4_6-branch)   (revision 190226)
6331 @@ -0,0 +1,68 @@
6332 +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* powerpc-ibm-aix* } }
6333 +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* powerpc-ibm-aix* } }
6334 +// { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } }
6335 +// { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } }
6336 +// { dg-require-cstdint "" }
6337 +// { dg-require-gthreads "" }
6338 +// { dg-require-sched-yield "" }
6339 +// { dg-require-nanosleep "" }
6340 +
6341 +// Copyright (C) 2012 Free Software Foundation, Inc.
6342 +//
6343 +// This file is part of the GNU ISO C++ Library.  This library is free
6344 +// software; you can redistribute it and/or modify it under the
6345 +// terms of the GNU General Public License as published by the
6346 +// Free Software Foundation; either version 3, or (at your option)
6347 +// any later version.
6348 +
6349 +// This library is distributed in the hope that it will be useful,
6350 +// but WITHOUT ANY WARRANTY; without even the implied warranty of
6351 +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
6352 +// GNU General Public License for more details.
6353 +
6354 +// You should have received a copy of the GNU General Public License along
6355 +// with this library; see the file COPYING3.  If not see
6356 +// <http://www.gnu.org/licenses/>.
6357 +
6358 +// PR libstdc++/53830
6359 +// Test for deadlock in condition_variable_any::wait_for
6360 +
6361 +#include <thread>
6362 +#include <mutex>
6363 +#include <condition_variable>
6364 +#include <chrono>
6365 +#include <atomic>
6366 +
6367 +std::mutex mutex;
6368 +std::condition_variable_any cv;
6369 +
6370 +std::atomic<int> barrier(0);
6371 +
6372 +// waits for data from another thread
6373 +void wait_for_data()
6374 +{
6375 +  std::unique_lock<std::mutex> lock(mutex);
6376 +  barrier = 1;
6377 +  cv.wait_for(lock, std::chrono::milliseconds(100), []{ return false; });
6378 +  // read data
6379 +}
6380 +
6381 +// passes data to waiting thread
6382 +void provide_data()
6383 +{
6384 +  while (barrier == 0)
6385 +    std::this_thread::yield();
6386 +  std::unique_lock<std::mutex> lock(mutex);
6387 +  // pass data
6388 +  std::this_thread::sleep_for(std::chrono::seconds(1));
6389 +  cv.notify_one();
6390 +}
6391 +
6392 +int main()
6393 +{
6394 +  std::thread thread1(wait_for_data);
6395 +  provide_data();
6396 +  thread1.join();
6397 +  return 0;
6398 +}
6399 +
6400 Index: libstdc++-v3/testsuite/22_locale/ctype_base/53678.cc
6401 ===================================================================
6402 --- libstdc++-v3/testsuite/22_locale/ctype_base/53678.cc        (.../tags/gcc_4_6_3_release)    (revision 0)
6403 +++ libstdc++-v3/testsuite/22_locale/ctype_base/53678.cc        (.../branches/gcc-4_6-branch)   (revision 190226)
6404 @@ -0,0 +1,28 @@
6405 +// Copyright (C) 2012 Free Software Foundation, Inc.
6406 +//
6407 +// This file is part of the GNU ISO C++ Library.  This library is free
6408 +// software; you can redistribute it and/or modify it under the
6409 +// terms of the GNU General Public License as published by the
6410 +// Free Software Foundation; either version 3, or (at your option)
6411 +// any later version.
6412 +
6413 +// This library is distributed in the hope that it will be useful,
6414 +// but WITHOUT ANY WARRANTY; without even the implied warranty of
6415 +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
6416 +// GNU General Public License for more details.
6417 +
6418 +// You should have received a copy of the GNU General Public License along
6419 +// with this library; see the file COPYING3.  If not see
6420 +// <http://www.gnu.org/licenses/>.
6421 +
6422 +// { dg-do compile }
6423 +
6424 +// 22.2.1 The ctype category
6425 +
6426 +#include <locale>
6427 +
6428 +// libstdc++/53678
6429 +void test01()
6430 +{
6431 +  bool NetBSD __attribute__((unused)) = true;
6432 +}
6433 Index: libstdc++-v3/testsuite/Makefile.am
6434 ===================================================================
6435 --- libstdc++-v3/testsuite/Makefile.am  (.../tags/gcc_4_6_3_release)    (revision 190226)
6436 +++ libstdc++-v3/testsuite/Makefile.am  (.../branches/gcc-4_6-branch)   (revision 190226)
6437 @@ -59,6 +59,7 @@
6438         @echo 'set target_triplet $(target_triplet)' >>site.tmp
6439         @echo 'set libiconv "$(LIBICONV)"' >>site.tmp
6440         @echo 'set baseline_dir "$(baseline_dir)"' >> site.tmp
6441 +       @echo 'set TEST_GCC_EXEC_PREFIX "$(libdir)/gcc/"' >> site.tmp
6442         @echo '## All variables above are generated by configure. Do Not Edit ##' >>site.tmp
6443         @test ! -f site.exp || \
6444           sed '1,/^## All variables above are.*##/ d' site.exp >> site.tmp
6445 Index: libstdc++-v3/testsuite/23_containers/vector/debug/52433.cc
6446 ===================================================================
6447 --- libstdc++-v3/testsuite/23_containers/vector/debug/52433.cc  (.../tags/gcc_4_6_3_release)    (revision 0)
6448 +++ libstdc++-v3/testsuite/23_containers/vector/debug/52433.cc  (.../branches/gcc-4_6-branch)   (revision 190226)
6449 @@ -0,0 +1,43 @@
6450 +// Copyright (C) 2012 Free Software Foundation, Inc.
6451 +//
6452 +// This file is part of the GNU ISO C++ Library.  This library is free
6453 +// software; you can redistribute it and/or modify it under the
6454 +// terms of the GNU General Public License as published by the
6455 +// Free Software Foundation; either version 3, or (at your option)
6456 +// any later version.
6457 +//
6458 +// This library is distributed in the hope that it will be useful,
6459 +// but WITHOUT ANY WARRANTY; without even the implied warranty of
6460 +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
6461 +// GNU General Public License for more details.
6462 +//
6463 +// You should have received a copy of the GNU General Public License along
6464 +// with this library; see the file COPYING3.  If not see
6465 +// <http://www.gnu.org/licenses/>.
6466 +//
6467 +// { dg-require-debug-mode "" }
6468 +// { dg-options "-std=gnu++0x" }
6469 +// { dg-do compile }
6470 +
6471 +// PR libstdc++/52433
6472 +
6473 +#include <vector>
6474 +
6475 +struct X
6476 +{
6477 +    std::vector<int>::iterator i;
6478 +
6479 +    X() = default;
6480 +    X(const X&) = default;
6481 +    X(X&&) = default;
6482 +    X& operator=(const X&) = default;
6483 +    X& operator=(X&&) = default;
6484 +};
6485 +
6486 +X test01()
6487 +{
6488 +    X x;
6489 +    x = X();
6490 +    return x;
6491 +}
6492 +
6493 Index: libstdc++-v3/config.h.in
6494 ===================================================================
6495 --- libstdc++-v3/config.h.in    (.../tags/gcc_4_6_3_release)    (revision 190226)
6496 +++ libstdc++-v3/config.h.in    (.../branches/gcc-4_6-branch)   (revision 190226)
6497 @@ -692,6 +692,9 @@
6498  /* Define if a fully dynamic basic_string is wanted. */
6499  #undef _GLIBCXX_FULLY_DYNAMIC_STRING
6500  
6501 +/* Define if gthreads types cannot be copy-assigned in C++11. */
6502 +#undef _GLIBCXX_GTHREADS_NO_COPY_ASSIGN_IN_CXX11
6503 +
6504  /* Define if gthreads library is available. */
6505  #undef _GLIBCXX_HAS_GTHREADS
6506  
6507 Index: libstdc++-v3/config/os/bsd/netbsd/ctype_base.h
6508 ===================================================================
6509 --- libstdc++-v3/config/os/bsd/netbsd/ctype_base.h      (.../tags/gcc_4_6_3_release)    (revision 190226)
6510 +++ libstdc++-v3/config/os/bsd/netbsd/ctype_base.h      (.../branches/gcc-4_6-branch)   (revision 190226)
6511 @@ -1,6 +1,6 @@
6512  // Locale support -*- C++ -*-
6513  
6514 -// Copyright (C) 2000, 2009 Free Software Foundation, Inc.
6515 +// Copyright (C) 2000, 2009, 2011, 2012 Free Software Foundation, Inc.
6516  //
6517  // This file is part of the GNU ISO C++ Library.  This library is free
6518  // software; you can redistribute it and/or modify it under the
6519 @@ -31,8 +31,6 @@
6520  //   anoncvs@anoncvs.netbsd.org:/cvsroot/basesrc/include/ctype.h
6521  // See www.netbsd.org for details of access.
6522    
6523 -#include <sys/param.h>
6524 -
6525  namespace std _GLIBCXX_VISIBILITY(default)
6526  {
6527  _GLIBCXX_BEGIN_NAMESPACE_VERSION
6528 @@ -47,7 +45,7 @@
6529      // on the mask type. Because of this, we don't use an enum.
6530      typedef unsigned char              mask;
6531  
6532 -#if __NetBSD_Version__ < 599004100
6533 +#ifndef _CTYPE_U
6534      static const mask upper            = _U;
6535      static const mask lower    = _L;
6536      static const mask alpha    = _U | _L;
6537 Index: libstdc++-v3/acinclude.m4
6538 ===================================================================
6539 --- libstdc++-v3/acinclude.m4   (.../tags/gcc_4_6_3_release)    (revision 190226)
6540 +++ libstdc++-v3/acinclude.m4   (.../branches/gcc-4_6-branch)   (revision 190226)
6541 @@ -3213,6 +3213,58 @@
6542    ])
6543  ])
6544  
6545 +dnl
6546 +dnl Check whether gthreads types can be copy-assigned in C++11 mode.
6547 +dnl
6548 +AC_DEFUN([GLIBCXX_GTHREADS_CXX11_COPY_ASSIGN], [
6549 +
6550 +  AC_LANG_SAVE
6551 +  AC_LANG_CPLUSPLUS
6552 +  ac_save_CXXFLAGS="$CXXFLAGS"
6553 +  CXXFLAGS="$CXXFLAGS -std=c++0x -I${toplevel_srcdir}/gcc"
6554 +
6555 +  target_thread_file=`$CXX -v 2>&1 | sed -n 's/^Thread model: //p'`
6556 +  case $target_thread_file in
6557 +    posix)
6558 +      CXXFLAGS="$CXXFLAGS -DSUPPORTS_WEAK -DGTHREAD_USE_WEAK -D_PTHREADS"
6559 +  esac
6560 +
6561 +  AC_MSG_CHECKING([whether gthreads types are copy-assignable in C++11 mode])
6562 +
6563 +  AC_TRY_COMPILE([#include "gthr.h"],
6564 +    [
6565 +      #ifdef __GTHREAD_MUTEX_INIT
6566 +      __gthread_mutex_t m1;
6567 +      __gthread_mutex_t m2 = __GTHREAD_MUTEX_INIT;
6568 +      m1 = m2;
6569 +      #endif
6570 +      #ifdef __GTHREAD_RECURSIVE_MUTEX_INIT
6571 +      __gthread_recursive_mutex_t r1;
6572 +      __gthread_recursive_mutex_t r2 = __GTHREAD_RECURSIVE_MUTEX_INIT;
6573 +      r1 = r2;
6574 +      #endif
6575 +      #ifdef __GTHREAD_HAS_COND
6576 +      #ifdef __GTHREAD_COND_INIT
6577 +      __gthread_cond_t c1;
6578 +      __gthread_cond_t c2 = __GTHREAD_COND_INIT;
6579 +      c1 = c2;
6580 +      #endif
6581 +      #endif
6582 +    ], [ac_gthread_cxx11_copy_assign=1], [ac_gthread_cxx11_copy_assign=0])
6583 +
6584 +  if test $ac_gthread_cxx11_copy_assign = 1 ; then res_gthr_copy_assign=yes ;
6585 +  else res_gthr_copy_assign=no ; fi
6586 +  AC_MSG_RESULT([$res_gthr_copy_assign])
6587 +
6588 +  if test x"$res_gthr_copy_assign" = x"no"; then
6589 +    AC_DEFINE(_GLIBCXX_GTHREADS_NO_COPY_ASSIGN_IN_CXX11, 1,
6590 +             [Define if gthreads types cannot be copy-assigned in C++11.])
6591 +  fi
6592 +
6593 +  CXXFLAGS="$ac_save_CXXFLAGS"
6594 +  AC_LANG_RESTORE
6595 +])
6596 +
6597  # Macros from the top-level gcc directory.
6598  m4_include([../config/gc++filt.m4])
6599  m4_include([../config/tls.m4])
6600 Index: libgfortran/intrinsics/eoshift2.c
6601 ===================================================================
6602 --- libgfortran/intrinsics/eoshift2.c   (.../tags/gcc_4_6_3_release)    (revision 190226)
6603 +++ libgfortran/intrinsics/eoshift2.c   (.../branches/gcc-4_6-branch)   (revision 190226)
6604 @@ -77,6 +77,12 @@
6605  
6606        ret->offset = 0;
6607        ret->dtype = array->dtype;
6608 +
6609 +      if (arraysize > 0)
6610 +       ret->data = internal_malloc_size (size * arraysize);
6611 +      else
6612 +       ret->data = internal_malloc_size (1);
6613 +
6614        for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
6615          {
6616           index_type ub, str;
6617 @@ -90,12 +96,6 @@
6618               * GFC_DESCRIPTOR_STRIDE(ret,i-1);
6619  
6620           GFC_DIMENSION_SET(ret->dim[i], 0, ub, str);
6621 -
6622 -         if (arraysize > 0)
6623 -           ret->data = internal_malloc_size (size * arraysize);
6624 -         else
6625 -           ret->data = internal_malloc_size (1);
6626 -
6627          }
6628      }
6629    else if (unlikely (compile_options.bounds_check))
6630 Index: libgfortran/ChangeLog
6631 ===================================================================
6632 --- libgfortran/ChangeLog       (.../tags/gcc_4_6_3_release)    (revision 190226)
6633 +++ libgfortran/ChangeLog       (.../branches/gcc-4_6-branch)   (revision 190226)
6634 @@ -1,3 +1,9 @@
6635 +2012-05-12  Tobias Burnus  <burnus@net-b.de>
6636 +
6637 +       PR fortran/53310
6638 +       * intrinsics/eoshift2.c (eoshift2): Do not leak
6639 +       memory by allocating it in the loop.
6640 +
6641  2012-03-01  Release Manager
6642  
6643         * GCC 4.6.3 released.
6644 Index: boehm-gc/configure.ac
6645 ===================================================================
6646 --- boehm-gc/configure.ac       (.../tags/gcc_4_6_3_release)    (revision 190226)
6647 +++ boehm-gc/configure.ac       (.../branches/gcc-4_6-branch)   (revision 190226)
6648 @@ -392,6 +392,7 @@
6649  oldLIBS="$LIBS"
6650  LIBS="$LIBS $THREADLIBS"
6651  AC_CHECK_FUNCS([pthread_getattr_np])
6652 +AC_CHECK_FUNCS([pthread_get_stackaddr_np])
6653  LIBS="$oldLIBS"
6654  
6655  # Configuration of machine-dependent code
6656 Index: boehm-gc/include/gc_config.h.in
6657 ===================================================================
6658 --- boehm-gc/include/gc_config.h.in     (.../tags/gcc_4_6_3_release)    (revision 190226)
6659 +++ boehm-gc/include/gc_config.h.in     (.../branches/gcc-4_6-branch)   (revision 190226)
6660 @@ -87,6 +87,9 @@
6661  /* Define to 1 if you have the `pthread_getattr_np' function. */
6662  #undef HAVE_PTHREAD_GETATTR_NP
6663  
6664 +/* Define to 1 if you have the `pthread_get_stackaddr_np_np' function. */
6665 +#undef HAVE_PTHREAD_GET_STACKADDR_NP
6666 +
6667  /* Define to 1 if you have the <stdint.h> header file. */
6668  #undef HAVE_STDINT_H
6669  
6670 Index: boehm-gc/include/private/gcconfig.h
6671 ===================================================================
6672 --- boehm-gc/include/private/gcconfig.h (.../tags/gcc_4_6_3_release)    (revision 190226)
6673 +++ boehm-gc/include/private/gcconfig.h (.../branches/gcc-4_6-branch)   (revision 190226)
6674 @@ -1331,7 +1331,11 @@
6675          These aren't used when dyld support is enabled (it is by default) */
6676  #     define DATASTART ((ptr_t) get_etext())
6677  #     define DATAEND   ((ptr_t) get_end())
6678 -#     define STACKBOTTOM ((ptr_t) 0xc0000000)
6679 +#     ifdef HAVE_PTHREAD_GET_STACKADDR_NP
6680 +#       define STACKBOTTOM (ptr_t)pthread_get_stackaddr_np(pthread_self())
6681 +#     else
6682 +#       define STACKBOTTOM ((ptr_t) 0xc0000000)
6683 +#     endif
6684  #     define USE_MMAP
6685  #     define USE_MMAP_ANON
6686  #     define USE_ASM_PUSH_REGS
6687 @@ -2011,7 +2015,11 @@
6688          These aren't used when dyld support is enabled (it is by default) */
6689  #     define DATASTART ((ptr_t) get_etext())
6690  #     define DATAEND   ((ptr_t) get_end())
6691 -#     define STACKBOTTOM ((ptr_t) 0x7fff5fc00000)
6692 +#     ifdef HAVE_PTHREAD_GET_STACKADDR_NP
6693 +#       define STACKBOTTOM (ptr_t)pthread_get_stackaddr_np(pthread_self())
6694 +#     else
6695 +#       define STACKBOTTOM ((ptr_t) 0x7fff5fc00000)
6696 +#     endif
6697  #     define USE_MMAP
6698  #     define USE_MMAP_ANON
6699  #     ifdef GC_DARWIN_THREADS
6700 Index: boehm-gc/ChangeLog
6701 ===================================================================
6702 --- boehm-gc/ChangeLog  (.../tags/gcc_4_6_3_release)    (revision 190226)
6703 +++ boehm-gc/ChangeLog  (.../branches/gcc-4_6-branch)   (revision 190226)
6704 @@ -1,3 +1,17 @@
6705 +2012-03-02  Jack Howarth  <howarth@bromo.med.uc.edu>
6706 +
6707 +       Backport from mainline
6708 +       2012-02-23  Patrick Marlier  <patrick.marlier@gmail.com>
6709 +                   Jack Howarth  <howarth@bromo.med.uc.edu>
6710 +
6711 +       PR boehm-gc/52179
6712 +       * include/gc_config.h.in: Undefine HAVE_PTHREAD_GET_STACKADDR_NP.
6713 +       * include/private/gcconfig.h (DARWIN): Define STACKBOTTOM with
6714 +       pthread_get_stackaddr_np when available.
6715 +       * configure.ac (THREADS): Check availability of
6716 +       pthread_get_stackaddr_np.
6717 +       * configure: Regenerate.
6718 +
6719  2012-03-01  Release Manager
6720  
6721         * GCC 4.6.3 released.
6722 Index: boehm-gc/configure
6723 ===================================================================
6724 --- boehm-gc/configure  (.../tags/gcc_4_6_3_release)    (revision 190226)
6725 +++ boehm-gc/configure  (.../branches/gcc-4_6-branch)   (revision 190226)
6726 @@ -15246,6 +15246,17 @@
6727  fi
6728  done
6729  
6730 +for ac_func in pthread_get_stackaddr_np
6731 +do :
6732 +  ac_fn_c_check_func "$LINENO" "pthread_get_stackaddr_np" "ac_cv_func_pthread_get_stackaddr_np"
6733 +if test "x$ac_cv_func_pthread_get_stackaddr_np" = x""yes; then :
6734 +  cat >>confdefs.h <<_ACEOF
6735 +#define HAVE_PTHREAD_GET_STACKADDR_NP 1
6736 +_ACEOF
6737 +
6738 +fi
6739 +done
6740 +
6741  LIBS="$oldLIBS"
6742  
6743  # Configuration of machine-dependent code
6744 Index: libffi/src/powerpc/aix.S
6745 ===================================================================
6746 --- libffi/src/powerpc/aix.S    (.../tags/gcc_4_6_3_release)    (revision 190226)
6747 +++ libffi/src/powerpc/aix.S    (.../branches/gcc-4_6-branch)   (revision 190226)
6748 @@ -1,5 +1,5 @@
6749  /* -----------------------------------------------------------------------
6750 -   aix.S - Copyright (c) 2002,2009 Free Software Foundation, Inc.
6751 +   aix.S - Copyright (c) 2002, 2009 Free Software Foundation, Inc.
6752     based on darwin.S by John Hornkvist
6753  
6754     PowerPC Assembly glue.
6755 @@ -79,6 +79,8 @@
6756         .set f20,20
6757         .set f21,21
6758  
6759 +       .extern .ffi_prep_args
6760 +
6761  #define LIBFFI_ASM
6762  #include <fficonfig.h>
6763  #include <ffi.h>
6764 @@ -125,6 +127,7 @@
6765         /* Call ffi_prep_args.  */
6766         mr      r4, r1
6767         bl      .ffi_prep_args
6768 +       nop
6769  
6770         /* Now do the call.  */
6771         ld      r0, 0(r29)
6772 @@ -226,6 +229,7 @@
6773         /* Call ffi_prep_args.  */
6774         mr      r4, r1
6775         bl      .ffi_prep_args
6776 +       nop
6777  
6778         /* Now do the call.  */
6779         lwz     r0, 0(r29)
6780 Index: libffi/src/powerpc/aix_closure.S
6781 ===================================================================
6782 --- libffi/src/powerpc/aix_closure.S    (.../tags/gcc_4_6_3_release)    (revision 190226)
6783 +++ libffi/src/powerpc/aix_closure.S    (.../branches/gcc-4_6-branch)   (revision 190226)
6784 @@ -79,6 +79,8 @@
6785         .set f20,20
6786         .set f21,21
6787  
6788 +       .extern .ffi_closure_helper_DARWIN
6789 +
6790  #define LIBFFI_ASM
6791  #define JUMPTARGET(name) name
6792  #define L(x) x
6793 @@ -165,6 +167,7 @@
6794  
6795         /* look up the proper starting point in table  */
6796         /* by using return type as offset */
6797 +       lhz     r3, 10(r3)      /* load type from return type */
6798         ld      r4, LC..60(2)   /* get address of jump table */
6799         sldi    r3, r3, 4       /* now multiply return type by 16 */
6800         ld      r0, 240+16(r1)  /* load return address */
6801 @@ -337,8 +340,9 @@
6802  
6803         /* look up the proper starting point in table  */
6804         /* by using return type as offset */
6805 +       lhz     r3, 6(r3)       /* load type from return type */
6806         lwz     r4, LC..60(2)   /* get address of jump table */
6807 -       slwi    r3, r3, 4       /* now multiply return type by 4 */
6808 +       slwi    r3, r3, 4       /* now multiply return type by 16 */
6809         lwz     r0, 176+8(r1)   /* load return address */
6810         add     r3, r3, r4      /* add contents of table to table address */
6811         mtctr   r3
6812 Index: libffi/ChangeLog
6813 ===================================================================
6814 --- libffi/ChangeLog    (.../tags/gcc_4_6_3_release)    (revision 190226)
6815 +++ libffi/ChangeLog    (.../branches/gcc-4_6-branch)   (revision 190226)
6816 @@ -1,3 +1,17 @@
6817 +2012-03-22  David Edelsohn  <dje.gcc@gmail.com>
6818 +
6819 +       Backport from mainline:
6820 +       2012-03-09  David Edelsohn  <dje.gcc@gmail.com>
6821 +
6822 +       * src/powerpc/aix_closure.S (ffi_closure_ASM): Adjust for Darwin64
6823 +       change to return value of ffi_closure_helper_DARWIN and load type
6824 +       from return type.
6825 +
6826 +       From Tom Honermann <tom.honermann@oracle.com>:
6827 +       * src/powerpc/aix.S: Declare .ffi_prep_args.  Insert nops after
6828 +       branch instructions.
6829 +       * src/powerpc/aix_closure.S: Declare .ffi_closure_helper_DARWIN.
6830 +
6831  2012-03-01  Release Manager
6832  
6833         * GCC 4.6.3 released.
6834 Index: libjava/configure.ac
6835 ===================================================================
6836 --- libjava/configure.ac        (.../tags/gcc_4_6_3_release)    (revision 190226)
6837 +++ libjava/configure.ac        (.../branches/gcc-4_6-branch)   (revision 190226)
6838 @@ -886,14 +886,9 @@
6839          SYSTEMSPEC="-lunicows $SYSTEMSPEC"
6840        fi
6841      ;;
6842 -    *-*-darwin9*)
6843 +    *-*-darwin[[912]]*)
6844        SYSTEMSPEC="%{!Zdynamiclib:%{!Zbundle:-allow_stack_execute}}"
6845      ;;
6846 -    *-*-darwin[[12]]*)
6847 -      # Something is incompatible with pie, would be nice to fix it and
6848 -      # remove -no_pie.  PR49461
6849 -      SYSTEMSPEC="-no_pie %{!Zdynamiclib:%{!Zbundle:-allow_stack_execute}}"
6850 -    ;;
6851      *)
6852        SYSTEMSPEC=
6853      ;;
6854 Index: libjava/ChangeLog
6855 ===================================================================
6856 --- libjava/ChangeLog   (.../tags/gcc_4_6_3_release)    (revision 190226)
6857 +++ libjava/ChangeLog   (.../branches/gcc-4_6-branch)   (revision 190226)
6858 @@ -1,3 +1,13 @@
6859 +2012-03-02  Jack Howarth  <howarth@bromo.med.uc.edu>
6860 +
6861 +       Backport from mainline
6862 +       2012-02-23  Patrick Marlier  <patrick.marlier@gmail.com>
6863 +                   Jack Howarth  <howarth@bromo.med.uc.edu>
6864 +
6865 +       PR target/49461
6866 +       * configure.ac (SYSTEMSPEC): No longer pass -no_pie for darwin11.
6867 +       * configure: Regenerate.
6868 +
6869  2012-03-01  Release Manager
6870  
6871         * GCC 4.6.3 released.
6872 Index: libjava/configure
6873 ===================================================================
6874 --- libjava/configure   (.../tags/gcc_4_6_3_release)    (revision 190226)
6875 +++ libjava/configure   (.../branches/gcc-4_6-branch)   (revision 190226)
6876 @@ -19775,14 +19775,9 @@
6877          SYSTEMSPEC="-lunicows $SYSTEMSPEC"
6878        fi
6879      ;;
6880 -    *-*-darwin9*)
6881 +    *-*-darwin[912]*)
6882        SYSTEMSPEC="%{!Zdynamiclib:%{!Zbundle:-allow_stack_execute}}"
6883      ;;
6884 -    *-*-darwin[12]*)
6885 -      # Something is incompatible with pie, would be nice to fix it and
6886 -      # remove -no_pie.  PR49461
6887 -      SYSTEMSPEC="-no_pie %{!Zdynamiclib:%{!Zbundle:-allow_stack_execute}}"
6888 -    ;;
6889      *)
6890        SYSTEMSPEC=
6891      ;;
This page took 2.655046 seconds and 3 git commands to generate.