]> TLD Linux GIT Repositories - packages/gcc.git/blob - gcc-branch.diff
- err... commit modifed files as well
[packages/gcc.git] / gcc-branch.diff
1 Index: gcc/targhooks.c
2 ===================================================================
3 --- gcc/targhooks.c     (.../tags/gcc_4_6_3_release)    (wersja 185440)
4 +++ gcc/targhooks.c     (.../branches/gcc-4_6-branch)   (wersja 185440)
5 @@ -529,6 +529,7 @@
6        case scalar_to_vec:
7        case cond_branch_not_taken:
8        case vec_perm:
9 +      case vec_promote_demote:
10          return 1;
11  
12        case unaligned_load:
13 Index: gcc/DATESTAMP
14 ===================================================================
15 --- gcc/DATESTAMP       (.../tags/gcc_4_6_3_release)    (wersja 185440)
16 +++ gcc/DATESTAMP       (.../branches/gcc-4_6-branch)   (wersja 185440)
17 @@ -1 +1 @@
18 -20120301
19 +20120315
20 Index: gcc/target.h
21 ===================================================================
22 --- gcc/target.h        (.../tags/gcc_4_6_3_release)    (wersja 185440)
23 +++ gcc/target.h        (.../branches/gcc-4_6-branch)   (wersja 185440)
24 @@ -128,7 +128,8 @@
25    scalar_to_vec,
26    cond_branch_not_taken,
27    cond_branch_taken,
28 -  vec_perm
29 +  vec_perm,
30 +  vec_promote_demote
31  };
32  
33  /* Sets of optimization levels at which an option may be enabled by
34 Index: gcc/DEV-PHASE
35 ===================================================================
36 --- gcc/DEV-PHASE       (.../tags/gcc_4_6_3_release)    (wersja 185440)
37 +++ gcc/DEV-PHASE       (.../branches/gcc-4_6-branch)   (wersja 185440)
38 @@ -0,0 +1 @@
39 +prerelease
40 Index: gcc/ChangeLog
41 ===================================================================
42 --- gcc/ChangeLog       (.../tags/gcc_4_6_3_release)    (wersja 185440)
43 +++ gcc/ChangeLog       (.../branches/gcc-4_6-branch)   (wersja 185440)
44 @@ -1,3 +1,101 @@
45 +2012-03-15  Chung-Lin Tang  <cltang@codesourcery.com>
46 +
47 +       Backport from mainline
48 +       2012-03-10  Chung-Lin Tang  <cltang@codesourcery.com>
49 +
50 +       PR rtl-optimization/52528
51 +       * combine.c (can_combine_p): Add setting of subst_low_luid
52 +       before call to expand_field_assignment().
53 +
54 +2012-03-12  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
55 +
56 +       Backport from mainline
57 +       2011-09-03  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
58 +
59 +       PR Bug middle-end/50232
60 +       * config/pa/pa.md (return): Define "return" insn pattern.
61 +       (epilogue): Use it when no epilogue is needed.
62 +       * config/pa/pa.c (pa_can_use_return_insn): New function.
63 +       * config/pa/pa-protos.h (pa_can_use_return_insn): Declare.
64 +
65 +       Backport for mainline
66 +       2012-01-28  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
67 +
68 +       PR target/51871
69 +       * config/pa/pa.c (pa_return_addr_rtx): Add support for PA2.0 export
70 +       stubs.
71 +
72 +2012-03-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
73 +
74 +       Backport from mainline
75 +       PR target/50310
76 +       * config/rs6000/vector.md (vector_uneq<mode>): Add support for
77 +       UNEQ, LTGT, ORDERED, and UNORDERED IEEE vector comparisons.
78 +       (vector_ltgt<mode>): Likewise.
79 +       (vector_ordered<mode>): Likewise.
80 +       (vector_unordered<mode>): Likewise.
81 +       * config/rs6000/rs6000.c (rs6000_emit_vector_compare_inner):
82 +       Likewise.
83 +
84 +2012-03-04  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
85 +
86 +       Backport from mainline
87 +       2012-03-01  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
88 +
89 +       PR target/52408
90 +       * config/pa/pa.md (zvdep_imm32): Change type of variable x from int to
91 +       unsigned HOST_WIDE_INT.
92 +       (zvdep_imm64): Likewise.
93 +       (vdepi_ior): Change type of variable x from int to HOST_WIDE_INT.
94 +       (vdepi_and): Likewise.
95 +       Likewise for unamed 64-bit patterns.
96 +       * config/pa/predicates.md (lhs_lshift_cint_operand): Update comment.
97 +
98 +2012-03-03  Eric Botcazou  <ebotcazou@adacore.com>
99 +
100 +       PR target/52425
101 +       Backport from mainline
102 +       2011-05-22  Eric Botcazou  <ebotcazou@adacore.com>
103 +
104 +       * config/sparc/sparc.c (sparc_delegitimize_address): Handle
105 +       UNSPEC_MOVE_PIC pattern.
106 +
107 +2012-03-02  Peter Bergner  <bergner@vnet.ibm.com>
108 +
109 +       Backport from mainline
110 +       2012-03-02  Peter Bergner  <bergner@vnet.ibm.com>
111 +
112 +       * config/rs6000/vsx.md (vsx_set_<mode>): Reorder operands.
113 +
114 +2012-03-02  Bill Schmidt <wschmidt@linux.vnet.ibm.com>
115 +           Ira Rosen <irar@il.ibm.com>
116 +
117 +       PR tree-optimization/50031
118 +       PR tree-optimization/50969
119 +       * targhooks.c (default_builtin_vectorization_cost): Handle
120 +       vec_promote_demote.
121 +       * target.h (enum vect_cost_for_stmt): Add vec_promote_demote.
122 +       * tree-vect-loop.c (vect_get_single_scalar_iteraion_cost): Handle
123 +       all types of reduction and pattern statements.
124 +       (vect_estimate_min_profitable_iters): Likewise.
125 +       * tree-vect-stmts.c (vect_model_promotion_demotion_cost): New function.
126 +       (vect_model_store_cost): Use vec_perm rather than vector_stmt for
127 +       statement cost.
128 +       (vect_model_load_cost): Likewise.
129 +       (vect_get_load_cost): Likewise; add dump logic for explicit realigns.
130 +       (vectorizable_type_demotion): Call vect_model_promotion_demotion_cost.
131 +       (vectorizable_type_promotion): Likewise.
132 +       * config/spu/spu.c (spu_builtin_vectorization_cost): Handle
133 +       vec_promote_demote.
134 +       * config/i386/i386.c (ix86_builtin_vectorization_cost): Likewise.
135 +       * config/rs6000/rs6000.c (rs6000_builtin_vectorization_cost): Update
136 +       vec_perm for VSX and handle vec_promote_demote.
137 +
138 +2012-03-01  Jakub Jelinek  <jakub@redhat.com>
139 +
140 +       * BASE-VER: Set to 4.6.4.
141 +       * DEV-PHASE: Set to prerelease.
142 +
143  2012-03-01  Release Manager
144  
145         * GCC 4.6.3 released.
146 Index: gcc/testsuite/gcc.target/powerpc/pr52457.c
147 ===================================================================
148 --- gcc/testsuite/gcc.target/powerpc/pr52457.c  (.../tags/gcc_4_6_3_release)    (wersja 0)
149 +++ gcc/testsuite/gcc.target/powerpc/pr52457.c  (.../branches/gcc-4_6-branch)   (wersja 185440)
150 @@ -0,0 +1,34 @@
151 +/* { dg-do run { target { powerpc*-*-linux* } } } */
152 +/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
153 +/* { dg-skip-if "" { powerpc*-*-*spe* } { "*" } { "" } } */
154 +/* { dg-require-effective-target vsx_hw } */
155 +/* { dg-options "-O1 -mcpu=power7" } */
156 +
157 +extern void abort (void);
158 +
159 +typedef long long T;
160 +typedef T vl_t __attribute__((vector_size(2 * sizeof (T))));
161 +
162 +vl_t
163 +buggy_func (T x)
164 +{
165 +  vl_t w;
166 +  T *p = (T *)&w;
167 +  p[0] = p[1] = x;
168 +  return w;
169 +}
170 +
171 +int
172 +main(void)
173 +{
174 +  vl_t rval;
175 +  T *pl;
176 +
177 +  pl = (T *) &rval;
178 +  rval = buggy_func (2);
179 +
180 +  if (pl[0] != 2 || pl[1] != 2)
181 +    abort ();
182 +
183 +  return 0;
184 +}
185 Index: gcc/testsuite/gfortran.dg/intrinsic_8.f90
186 ===================================================================
187 --- gcc/testsuite/gfortran.dg/intrinsic_8.f90   (.../tags/gcc_4_6_3_release)    (wersja 0)
188 +++ gcc/testsuite/gfortran.dg/intrinsic_8.f90   (.../branches/gcc-4_6-branch)   (wersja 185440)
189 @@ -0,0 +1,23 @@
190 +! { dg-do compile }
191 +!
192 +! PR fortran/52452
193 +!
194 +! Contributed by Roger Ferrer Ibanez
195 +!
196 +PROGRAM test_etime
197 +    IMPLICIT NONE
198 +    INTRINSIC :: etime
199 +    REAL(4) :: tarray(1:2)
200 +    REAL(4) :: result
201 +
202 +    CALL etime(tarray, result)
203 +END PROGRAM test_etime
204 +
205 +subroutine test_etime2
206 +    IMPLICIT NONE
207 +    INTRINSIC :: etime
208 +    REAL(4) :: tarray(1:2)
209 +    REAL(4) :: result
210 +
211 +    result = etime(tarray)
212 +END subroutine test_etime2
213 Index: gcc/testsuite/gfortran.dg/proc_ptr_34.f90
214 ===================================================================
215 --- gcc/testsuite/gfortran.dg/proc_ptr_34.f90   (.../tags/gcc_4_6_3_release)    (wersja 0)
216 +++ gcc/testsuite/gfortran.dg/proc_ptr_34.f90   (.../branches/gcc-4_6-branch)   (wersja 185440)
217 @@ -0,0 +1,79 @@
218 +! { dg-do compile }
219 +!
220 +! PR fortran/52469
221 +!
222 +! This was failing as the DECL of the proc pointer "func"
223 +! was used for the interface of the proc-pointer component "my_f_ptr"
224 +! rather than the decl of the proc-pointer target
225 +!
226 +! Contributed by palott@gmail.com
227 +!
228 +
229 +module ExampleFuncs
230 +  implicit none
231 +
232 +  ! NOTE: "func" is a procedure pointer!
233 +  pointer :: func
234 +  interface
235 +     function func (z)
236 +        real :: func
237 +        real, intent (in) :: z
238 +     end function func
239 +  end interface
240 +
241 +  type Contains_f_ptr
242 +     procedure (func), pointer, nopass :: my_f_ptr
243 +  end type Contains_f_ptr
244 +contains
245 +
246 +function f1 (x)
247 +  real :: f1
248 +  real, intent (in) :: x
249 +
250 +  f1 = 2.0 * x
251 +
252 +  return
253 +end function f1
254 +
255 +function f2 (x)
256 +   real :: f2
257 +   real, intent (in) :: x
258 +
259 +   f2 = 3.0 * x**2
260 +
261 +   return
262 +end function f2
263 +
264 +function fancy (func, x)
265 +   real :: fancy
266 +   real, intent (in) :: x
267 +
268 +   interface AFunc
269 +      function func (y)
270 +         real :: func
271 +         real, intent (in) ::y
272 +      end function func
273 +   end interface AFunc
274 +
275 +   fancy = func (x) + 3.3 * x
276 +end function fancy
277 +
278 +end module  ExampleFuncs
279 +
280 +
281 +program test_proc_ptr
282 +  use ExampleFuncs
283 +  implicit none
284 +
285 +  type (Contains_f_ptr), dimension (2) :: NewType
286
287 +  !NewType(1) % my_f_ptr => f1
288 +  NewType(2) % my_f_ptr => f2
289 +
290 +  !write (*, *) NewType(1) % my_f_ptr (3.0), NewType(2) % my_f_ptr (3.0)
291 +  write (6, *)  NewType(2) % my_f_ptr (3.0) ! < Shall print '27.0'
292 +
293 +  stop
294 +end program test_proc_ptr
295 +
296 +! { dg-final { cleanup-modules "examplefuncs" } }
297 Index: gcc/testsuite/ChangeLog
298 ===================================================================
299 --- gcc/testsuite/ChangeLog     (.../tags/gcc_4_6_3_release)    (wersja 185440)
300 +++ gcc/testsuite/ChangeLog     (.../branches/gcc-4_6-branch)   (wersja 185440)
301 @@ -1,3 +1,23 @@
302 +2012-03-10  Tobias Burnus  <burnus@net-b.de>
303 +
304 +       PR fortran/52469
305 +       * gfortran.dg/proc_ptr_34.f90: New.
306 +
307 +2012-03-06  Tobias Burnus  <burnus@net-b.de>
308 +
309 +       Backport from mainline
310 +       2012-03-02  Tobias Burnus  <burnus@net-b.de>
311 +
312 +       PR fortran/52452
313 +       * gfortran.dg/intrinsic_8.f90: New.
314 +
315 +2012-03-02  Peter Bergner  <bergner@vnet.ibm.com>
316 +
317 +       Backport from mainline
318 +       2012-03-02  Peter Bergner  <bergner@vnet.ibm.com>
319 +
320 +       * gcc.target/powerpc/pr52457.c: New test.
321 +
322  2012-03-01  Release Manager
323  
324         * GCC 4.6.3 released.
325 Index: gcc/fortran/ChangeLog
326 ===================================================================
327 --- gcc/fortran/ChangeLog       (.../tags/gcc_4_6_3_release)    (wersja 185440)
328 +++ gcc/fortran/ChangeLog       (.../branches/gcc-4_6-branch)   (wersja 185440)
329 @@ -1,3 +1,18 @@
330 +2012-03-10  Tobias Burnus  <burnus@net-b.de>
331 +
332 +       PR fortran/52469
333 +       * trans-types.c (gfc_get_function_type): Handle backend_decl
334 +       of a procedure pointer.
335 +
336 +2012-03-06  Tobias Burnus  <burnus@net-b.de>
337 +
338 +       Backport from mainline
339 +       2012-03-02  Tobias Burnus  <burnus@net-b.de>
340 +
341 +       PR fortran/52452
342 +       * resolve.c (resolve_intrinsic): Don't search for a
343 +       function if we know that it is a subroutine.
344 +
345  2012-03-01  Release Manager
346  
347         * GCC 4.6.3 released.
348 Index: gcc/fortran/trans-types.c
349 ===================================================================
350 --- gcc/fortran/trans-types.c   (.../tags/gcc_4_6_3_release)    (wersja 185440)
351 +++ gcc/fortran/trans-types.c   (.../branches/gcc-4_6-branch)   (wersja 185440)
352 @@ -2519,7 +2519,11 @@
353               || sym->attr.flavor == FL_PROGRAM);
354  
355    if (sym->backend_decl)
356 -    return TREE_TYPE (sym->backend_decl);
357 +    {
358 +      if (sym->attr.proc_pointer)
359 +       return TREE_TYPE (TREE_TYPE (sym->backend_decl));
360 +      return TREE_TYPE (sym->backend_decl);
361 +    }
362  
363    alternate_return = 0;
364    typelist = NULL_TREE;
365 Index: gcc/fortran/resolve.c
366 ===================================================================
367 --- gcc/fortran/resolve.c       (.../tags/gcc_4_6_3_release)    (wersja 185440)
368 +++ gcc/fortran/resolve.c       (.../branches/gcc-4_6-branch)   (wersja 185440)
369 @@ -1452,7 +1452,7 @@
370  
371    if (sym->intmod_sym_id)
372      isym = gfc_intrinsic_function_by_id ((gfc_isym_id) sym->intmod_sym_id);
373 -  else
374 +  else if (!sym->attr.subroutine)
375      isym = gfc_find_function (sym->name);
376  
377    if (isym)
378 Index: gcc/BASE-VER
379 ===================================================================
380 --- gcc/BASE-VER        (.../tags/gcc_4_6_3_release)    (wersja 185440)
381 +++ gcc/BASE-VER        (.../branches/gcc-4_6-branch)   (wersja 185440)
382 @@ -1 +1 @@
383 -4.6.3
384 +4.6.4
385 Index: gcc/tree-vect-loop.c
386 ===================================================================
387 --- gcc/tree-vect-loop.c        (.../tags/gcc_4_6_3_release)    (wersja 185440)
388 +++ gcc/tree-vect-loop.c        (.../branches/gcc-4_6-branch)   (wersja 185440)
389 @@ -2104,7 +2104,8 @@
390            if (stmt_info
391                && !STMT_VINFO_RELEVANT_P (stmt_info)
392                && (!STMT_VINFO_LIVE_P (stmt_info)
393 -                  || STMT_VINFO_DEF_TYPE (stmt_info) != vect_reduction_def))
394 +                  || !VECTORIZABLE_CYCLE_DEF (STMT_VINFO_DEF_TYPE (stmt_info)))
395 +             && !STMT_VINFO_IN_PATTERN_P (stmt_info))
396              continue;
397  
398            if (STMT_VINFO_DATA_REF (vinfo_for_stmt (stmt)))
399 @@ -2251,11 +2252,19 @@
400         {
401           gimple stmt = gsi_stmt (si);
402           stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
403 +
404 +         if (STMT_VINFO_IN_PATTERN_P (stmt_info))
405 +           {
406 +             stmt = STMT_VINFO_RELATED_STMT (stmt_info);
407 +             stmt_info = vinfo_for_stmt (stmt);
408 +           }
409 +
410           /* Skip stmts that are not vectorized inside the loop.  */
411           if (!STMT_VINFO_RELEVANT_P (stmt_info)
412               && (!STMT_VINFO_LIVE_P (stmt_info)
413 -                 || STMT_VINFO_DEF_TYPE (stmt_info) != vect_reduction_def))
414 +                 || !VECTORIZABLE_CYCLE_DEF (STMT_VINFO_DEF_TYPE (stmt_info))))
415             continue;
416 +
417           vec_inside_cost += STMT_VINFO_INSIDE_OF_LOOP_COST (stmt_info) * factor;
418           /* FIXME: for stmts in the inner-loop in outer-loop vectorization,
419              some of the "outside" costs are generated inside the outer-loop.  */
420 Index: gcc/tree-vect-stmts.c
421 ===================================================================
422 --- gcc/tree-vect-stmts.c       (.../tags/gcc_4_6_3_release)    (wersja 185440)
423 +++ gcc/tree-vect-stmts.c       (.../branches/gcc-4_6-branch)   (wersja 185440)
424 @@ -623,6 +623,46 @@
425  }
426  
427  
428 +/* Model cost for type demotion and promotion operations.  PWR is normally
429 +   zero for single-step promotions and demotions.  It will be one if 
430 +   two-step promotion/demotion is required, and so on.  Each additional
431 +   step doubles the number of instructions required.  */
432 +
433 +static void
434 +vect_model_promotion_demotion_cost (stmt_vec_info stmt_info,
435 +                                   enum vect_def_type *dt, int pwr)
436 +{
437 +  int i, tmp;
438 +  int inside_cost = 0, outside_cost = 0, single_stmt_cost;
439 +
440 +  /* The SLP costs were already calculated during SLP tree build.  */
441 +  if (PURE_SLP_STMT (stmt_info))
442 +    return;
443 +
444 +  single_stmt_cost = vect_get_stmt_cost (vec_promote_demote);
445 +  for (i = 0; i < pwr + 1; i++)
446 +    {
447 +      tmp = (STMT_VINFO_TYPE (stmt_info) == type_promotion_vec_info_type) ?
448 +       (i + 1) : i;
449 +      inside_cost += vect_pow2 (tmp) * single_stmt_cost;
450 +    }
451 +
452 +  /* FORNOW: Assuming maximum 2 args per stmts.  */
453 +  for (i = 0; i < 2; i++)
454 +    {
455 +      if (dt[i] == vect_constant_def || dt[i] == vect_external_def)
456 +        outside_cost += vect_get_stmt_cost (vector_stmt);
457 +    }
458 +
459 +  if (vect_print_dump_info (REPORT_COST))
460 +    fprintf (vect_dump, "vect_model_promotion_demotion_cost: inside_cost = %d, "
461 +             "outside_cost = %d .", inside_cost, outside_cost);
462 +
463 +  /* Set the costs in STMT_INFO.  */
464 +  stmt_vinfo_set_inside_of_loop_cost (stmt_info, NULL, inside_cost);
465 +  stmt_vinfo_set_outside_of_loop_cost (stmt_info, NULL, outside_cost);
466 +}
467 +
468  /* Function vect_cost_strided_group_size
469  
470     For strided load or store, return the group_size only if it is the first
471 @@ -691,7 +731,7 @@
472      {
473        /* Uses a high and low interleave operation for each needed permute.  */
474        inside_cost = ncopies * exact_log2(group_size) * group_size
475 -        * vect_get_stmt_cost (vector_stmt);
476 +        * vect_get_stmt_cost (vec_perm);
477  
478        if (vect_print_dump_info (REPORT_COST))
479          fprintf (vect_dump, "vect_model_store_cost: strided group_size = %d .",
480 @@ -795,7 +835,7 @@
481      {
482        /* Uses an even and odd extract operations for each needed permute.  */
483        inside_cost = ncopies * exact_log2(group_size) * group_size
484 -       * vect_get_stmt_cost (vector_stmt);
485 +       * vect_get_stmt_cost (vec_perm);
486  
487        if (vect_print_dump_info (REPORT_COST))
488          fprintf (vect_dump, "vect_model_load_cost: strided group_size = %d .",
489 @@ -855,7 +895,7 @@
490      case dr_explicit_realign:
491        {
492          *inside_cost += ncopies * (2 * vect_get_stmt_cost (vector_load)
493 -           + vect_get_stmt_cost (vector_stmt));
494 +                                  + vect_get_stmt_cost (vec_perm));
495  
496          /* FIXME: If the misalignment remains fixed across the iterations of
497             the containing loop, the following cost should be added to the
498 @@ -863,6 +903,9 @@
499          if (targetm.vectorize.builtin_mask_for_load)
500            *inside_cost += vect_get_stmt_cost (vector_stmt);
501  
502 +        if (vect_print_dump_info (REPORT_COST))
503 +          fprintf (vect_dump, "vect_model_load_cost: explicit realign");
504 +
505          break;
506        }
507      case dr_explicit_realign_optimized:
508 @@ -886,7 +929,12 @@
509            }
510  
511          *inside_cost += ncopies * (vect_get_stmt_cost (vector_load)
512 -          + vect_get_stmt_cost (vector_stmt));
513 +                                  + vect_get_stmt_cost (vec_perm));
514 +
515 +        if (vect_print_dump_info (REPORT_COST))
516 +          fprintf (vect_dump,
517 +                  "vect_model_load_cost: explicit realign optimized");
518 +
519          break;
520        }
521  
522 @@ -2919,7 +2967,7 @@
523        STMT_VINFO_TYPE (stmt_info) = type_demotion_vec_info_type;
524        if (vect_print_dump_info (REPORT_DETAILS))
525          fprintf (vect_dump, "=== vectorizable_demotion ===");
526 -      vect_model_simple_cost (stmt_info, ncopies, dt, NULL);
527 +      vect_model_promotion_demotion_cost (stmt_info, dt, multi_step_cvt);
528        return true;
529      }
530  
531 @@ -3217,7 +3265,7 @@
532        STMT_VINFO_TYPE (stmt_info) = type_promotion_vec_info_type;
533        if (vect_print_dump_info (REPORT_DETAILS))
534          fprintf (vect_dump, "=== vectorizable_promotion ===");
535 -      vect_model_simple_cost (stmt_info, 2*ncopies, dt, NULL);
536 +      vect_model_promotion_demotion_cost (stmt_info, dt, multi_step_cvt);
537        return true;
538      }
539  
540 Index: gcc/combine.c
541 ===================================================================
542 --- gcc/combine.c       (.../tags/gcc_4_6_3_release)    (wersja 185440)
543 +++ gcc/combine.c       (.../branches/gcc-4_6-branch)   (wersja 185440)
544 @@ -1788,6 +1788,10 @@
545    if (set == 0)
546      return 0;
547  
548 +  /* The simplification in expand_field_assignment may call back to
549 +     get_last_value, so set safe guard here.  */
550 +  subst_low_luid = DF_INSN_LUID (insn);
551 +
552    set = expand_field_assignment (set);
553    src = SET_SRC (set), dest = SET_DEST (set);
554  
555 Index: gcc/config/spu/spu.c
556 ===================================================================
557 --- gcc/config/spu/spu.c        (.../tags/gcc_4_6_3_release)    (wersja 185440)
558 +++ gcc/config/spu/spu.c        (.../branches/gcc-4_6-branch)   (wersja 185440)
559 @@ -6794,6 +6794,7 @@
560        case scalar_to_vec:
561        case cond_branch_not_taken:
562        case vec_perm:
563 +      case vec_promote_demote:
564          return 1;
565  
566        case scalar_store:
567 Index: gcc/config/sparc/sparc.c
568 ===================================================================
569 --- gcc/config/sparc/sparc.c    (.../tags/gcc_4_6_3_release)    (wersja 185440)
570 +++ gcc/config/sparc/sparc.c    (.../branches/gcc-4_6-branch)   (wersja 185440)
571 @@ -3658,13 +3658,17 @@
572  {
573    x = delegitimize_mem_from_attrs (x);
574  
575 -  if (GET_CODE (x) == LO_SUM
576 -      && GET_CODE (XEXP (x, 1)) == UNSPEC
577 -      && XINT (XEXP (x, 1), 1) == UNSPEC_TLSLE)
578 -    {
579 -      x = XVECEXP (XEXP (x, 1), 0, 0);
580 -      gcc_assert (GET_CODE (x) == SYMBOL_REF);
581 -    }
582 +  if (GET_CODE (x) == LO_SUM && GET_CODE (XEXP (x, 1)) == UNSPEC)
583 +    switch (XINT (XEXP (x, 1), 1))
584 +      {
585 +      case UNSPEC_MOVE_PIC:
586 +      case UNSPEC_TLSLE:
587 +       x = XVECEXP (XEXP (x, 1), 0, 0);
588 +       gcc_assert (GET_CODE (x) == SYMBOL_REF);
589 +       break;
590 +      default:
591 +       break;
592 +      }
593  
594    return x;
595  }
596 Index: gcc/config/i386/i386.c
597 ===================================================================
598 --- gcc/config/i386/i386.c      (.../tags/gcc_4_6_3_release)    (wersja 185440)
599 +++ gcc/config/i386/i386.c      (.../branches/gcc-4_6-branch)   (wersja 185440)
600 @@ -32823,7 +32823,8 @@
601          return ix86_cost->cond_not_taken_branch_cost;
602  
603        case vec_perm:
604 -        return 1;
605 +      case vec_promote_demote:
606 +        return ix86_cost->vec_stmt_cost;
607  
608        default:
609          gcc_unreachable ();
610 Index: gcc/config/rs6000/vector.md
611 ===================================================================
612 --- gcc/config/rs6000/vector.md (.../tags/gcc_4_6_3_release)    (wersja 185440)
613 +++ gcc/config/rs6000/vector.md (.../branches/gcc-4_6-branch)   (wersja 185440)
614 @@ -448,6 +448,94 @@
615    "VECTOR_UNIT_ALTIVEC_P (<MODE>mode)"
616    "")
617  
618 +(define_insn_and_split "*vector_uneq<mode>"
619 +  [(set (match_operand:VEC_F 0 "vfloat_operand" "")
620 +       (uneq:VEC_F (match_operand:VEC_F 1 "vfloat_operand" "")
621 +                   (match_operand:VEC_F 2 "vfloat_operand" "")))]
622 +  "VECTOR_UNIT_ALTIVEC_OR_VSX_P (<MODE>mode)"
623 +  "#"
624 +  ""
625 +  [(set (match_dup 3)
626 +       (gt:VEC_F (match_dup 1)
627 +                 (match_dup 2)))
628 +   (set (match_dup 4)
629 +       (gt:VEC_F (match_dup 2)
630 +                 (match_dup 1)))
631 +   (set (match_dup 0)
632 +       (not:VEC_F (ior:VEC_F (match_dup 3)
633 +                             (match_dup 4))))]
634 +  "
635 +{
636 +  operands[3] = gen_reg_rtx (<MODE>mode);
637 +  operands[4] = gen_reg_rtx (<MODE>mode);
638 +}")
639 +
640 +(define_insn_and_split "*vector_ltgt<mode>"
641 +  [(set (match_operand:VEC_F 0 "vfloat_operand" "")
642 +       (ltgt:VEC_F (match_operand:VEC_F 1 "vfloat_operand" "")
643 +                   (match_operand:VEC_F 2 "vfloat_operand" "")))]
644 +  "VECTOR_UNIT_ALTIVEC_OR_VSX_P (<MODE>mode)"
645 +  "#"
646 +  ""
647 +  [(set (match_dup 3)
648 +       (gt:VEC_F (match_dup 1)
649 +                 (match_dup 2)))
650 +   (set (match_dup 4)
651 +       (gt:VEC_F (match_dup 2)
652 +                 (match_dup 1)))
653 +   (set (match_dup 0)
654 +       (ior:VEC_F (match_dup 3)
655 +                  (match_dup 4)))]
656 +  "
657 +{
658 +  operands[3] = gen_reg_rtx (<MODE>mode);
659 +  operands[4] = gen_reg_rtx (<MODE>mode);
660 +}")
661 +
662 +(define_insn_and_split "*vector_ordered<mode>"
663 +  [(set (match_operand:VEC_F 0 "vfloat_operand" "")
664 +       (ordered:VEC_F (match_operand:VEC_F 1 "vfloat_operand" "")
665 +                      (match_operand:VEC_F 2 "vfloat_operand" "")))]
666 +  "VECTOR_UNIT_ALTIVEC_OR_VSX_P (<MODE>mode)"
667 +  "#"
668 +  ""
669 +  [(set (match_dup 3)
670 +       (ge:VEC_F (match_dup 1)
671 +                 (match_dup 2)))
672 +   (set (match_dup 4)
673 +       (ge:VEC_F (match_dup 2)
674 +                 (match_dup 1)))
675 +   (set (match_dup 0)
676 +       (ior:VEC_F (match_dup 3)
677 +                  (match_dup 4)))]
678 +  "
679 +{
680 +  operands[3] = gen_reg_rtx (<MODE>mode);
681 +  operands[4] = gen_reg_rtx (<MODE>mode);
682 +}")
683 +
684 +(define_insn_and_split "*vector_unordered<mode>"
685 +  [(set (match_operand:VEC_F 0 "vfloat_operand" "")
686 +       (unordered:VEC_F (match_operand:VEC_F 1 "vfloat_operand" "")
687 +                        (match_operand:VEC_F 2 "vfloat_operand" "")))]
688 +  "VECTOR_UNIT_ALTIVEC_OR_VSX_P (<MODE>mode)"
689 +  "#"
690 +  ""
691 +  [(set (match_dup 3)
692 +       (ge:VEC_F (match_dup 1)
693 +                 (match_dup 2)))
694 +   (set (match_dup 4)
695 +       (ge:VEC_F (match_dup 2)
696 +                 (match_dup 1)))
697 +   (set (match_dup 0)
698 +       (not:VEC_F (ior:VEC_F (match_dup 3)
699 +                             (match_dup 4))))]
700 +  "
701 +{
702 +  operands[3] = gen_reg_rtx (<MODE>mode);
703 +  operands[4] = gen_reg_rtx (<MODE>mode);
704 +}")
705 +
706  ;; Note the arguments for __builtin_altivec_vsel are op2, op1, mask
707  ;; which is in the reverse order that we want
708  (define_expand "vector_select_<mode>"
709 Index: gcc/config/rs6000/rs6000.c
710 ===================================================================
711 --- gcc/config/rs6000/rs6000.c  (.../tags/gcc_4_6_3_release)    (wersja 185440)
712 +++ gcc/config/rs6000/rs6000.c  (.../branches/gcc-4_6-branch)   (wersja 185440)
713 @@ -3695,12 +3695,23 @@
714        case vec_to_scalar:
715        case scalar_to_vec:
716        case cond_branch_not_taken:
717 -      case vec_perm:
718          return 1;
719  
720        case cond_branch_taken:
721          return 3;
722  
723 +      case vec_perm:
724 +       if (TARGET_VSX)
725 +         return 4;
726 +       else
727 +         return 1;
728 +
729 +      case vec_promote_demote:
730 +       if (TARGET_VSX)
731 +         return 5;
732 +       else
733 +         return 1;
734 +
735        case unaligned_load:
736          if (TARGET_VSX && TARGET_ALLOW_MOVMISALIGN)
737            {
738 @@ -17229,6 +17240,10 @@
739      case EQ:
740      case GT:
741      case GTU:
742 +    case ORDERED:
743 +    case UNORDERED:
744 +    case UNEQ:
745 +    case LTGT:
746        mask = gen_reg_rtx (mode);
747        emit_insn (gen_rtx_SET (VOIDmode,
748                               mask,
749 Index: gcc/config/rs6000/vsx.md
750 ===================================================================
751 --- gcc/config/rs6000/vsx.md    (.../tags/gcc_4_6_3_release)    (wersja 185440)
752 +++ gcc/config/rs6000/vsx.md    (.../branches/gcc-4_6-branch)   (wersja 185440)
753 @@ -1006,9 +1006,9 @@
754    "VECTOR_MEM_VSX_P (<MODE>mode)"
755  {
756    if (INTVAL (operands[3]) == 0)
757 -    return \"xxpermdi %x0,%x1,%x2,1\";
758 +    return \"xxpermdi %x0,%x2,%x1,1\";
759    else if (INTVAL (operands[3]) == 1)
760 -    return \"xxpermdi %x0,%x2,%x1,0\";
761 +    return \"xxpermdi %x0,%x1,%x2,0\";
762    else
763      gcc_unreachable ();
764  }
765 Index: gcc/config/pa/predicates.md
766 ===================================================================
767 --- gcc/config/pa/predicates.md (.../tags/gcc_4_6_3_release)    (wersja 185440)
768 +++ gcc/config/pa/predicates.md (.../branches/gcc-4_6-branch)   (wersja 185440)
769 @@ -421,9 +421,9 @@
770    (ior (match_operand 0 "register_operand")
771         (match_operand 0 "cint_ior_operand")))
772  
773 -;; True iff OP is a CONST_INT of the forms 0...0xxxx or
774 -;; 0...01...1xxxx. Such values can be the left hand side x in (x <<
775 -;; r), using the zvdepi instruction.
776 +;; True iff OP is a CONST_INT of the forms 0...0xxxx, 0...01...1xxxx,
777 +;; or 1...1xxxx. Such values can be the left hand side x in (x << r),
778 +;; using the zvdepi instruction.
779  
780  (define_predicate "lhs_lshift_cint_operand"
781    (match_code "const_int")
782 Index: gcc/config/pa/pa.md
783 ===================================================================
784 --- gcc/config/pa/pa.md (.../tags/gcc_4_6_3_release)    (wersja 185440)
785 +++ gcc/config/pa/pa.md (.../branches/gcc-4_6-branch)   (wersja 185440)
786 @@ -6348,7 +6348,7 @@
787    ""
788    "*
789  {
790 -  int x = INTVAL (operands[1]);
791 +  unsigned HOST_WIDE_INT x = UINTVAL (operands[1]);
792    operands[2] = GEN_INT (4 + exact_log2 ((x >> 4) + 1));
793    operands[1] = GEN_INT ((x & 0xf) - 0x10);
794    return \"{zvdepi %1,%2,%0|depwi,z %1,%%sar,%2,%0}\";
795 @@ -6366,7 +6366,7 @@
796    "exact_log2 (INTVAL (operands[1]) + 1) > 0"
797    "*
798  {
799 -  int x = INTVAL (operands[1]);
800 +  HOST_WIDE_INT x = INTVAL (operands[1]);
801    operands[2] = GEN_INT (exact_log2 (x + 1));
802    return \"{vdepi -1,%2,%0|depwi -1,%%sar,%2,%0}\";
803  }"
804 @@ -6383,7 +6383,7 @@
805    "INTVAL (operands[1]) == -2"
806    "*
807  {
808 -  int x = INTVAL (operands[1]);
809 +  HOST_WIDE_INT x = INTVAL (operands[1]);
810    operands[2] = GEN_INT (exact_log2 ((~x) + 1));
811    return \"{vdepi 0,%2,%0|depwi 0,%%sar,%2,%0}\";
812  }"
813 @@ -6447,7 +6447,7 @@
814    "TARGET_64BIT"
815    "*
816  {
817 -  int x = INTVAL (operands[1]);
818 +  unsigned HOST_WIDE_INT x = UINTVAL (operands[1]);
819    operands[2] = GEN_INT (4 + exact_log2 ((x >> 4) + 1));
820    operands[1] = GEN_INT ((x & 0x1f) - 0x20);
821    return \"depdi,z %1,%%sar,%2,%0\";
822 @@ -6465,7 +6465,7 @@
823    "TARGET_64BIT && exact_log2 (INTVAL (operands[1]) + 1) > 0"
824    "*
825  {
826 -  int x = INTVAL (operands[1]);
827 +  HOST_WIDE_INT x = INTVAL (operands[1]);
828    operands[2] = GEN_INT (exact_log2 (x + 1));
829    return \"depdi -1,%%sar,%2,%0\";
830  }"
831 @@ -6482,7 +6482,7 @@
832    "TARGET_64BIT && INTVAL (operands[1]) == -2"
833    "*
834  {
835 -  int x = INTVAL (operands[1]);
836 +  HOST_WIDE_INT x = INTVAL (operands[1]);
837    operands[2] = GEN_INT (exact_log2 ((~x) + 1));
838    return \"depdi 0,%%sar,%2,%0\";
839  }"
840 @@ -6671,6 +6671,20 @@
841  \f
842  ;; Unconditional and other jump instructions.
843  
844 +;; Trivial return used when no epilogue is needed.
845 +(define_insn "return"
846 +  [(return)
847 +   (use (reg:SI 2))]
848 +  "pa_can_use_return_insn ()"
849 +  "*
850 +{
851 +  if (TARGET_PA_20)
852 +    return \"bve%* (%%r2)\";
853 +  return \"bv%* %%r0(%%r2)\";
854 +}"
855 +  [(set_attr "type" "branch")
856 +   (set_attr "length" "4")])
857 +
858  ;; This is used for most returns.
859  (define_insn "return_internal"
860    [(return)
861 @@ -6719,11 +6733,8 @@
862    rtx x;
863  
864    /* Try to use the trivial return first.  Else use the full epilogue.  */
865 -  if (reload_completed
866 -      && !frame_pointer_needed
867 -      && !df_regs_ever_live_p (2)
868 -      && (compute_frame_size (get_frame_size (), 0) ? 0 : 1))
869 -    x = gen_return_internal ();
870 +  if (pa_can_use_return_insn ())
871 +    x = gen_return ();
872    else
873      {
874        hppa_expand_epilogue ();
875 Index: gcc/config/pa/pa-protos.h
876 ===================================================================
877 --- gcc/config/pa/pa-protos.h   (.../tags/gcc_4_6_3_release)    (wersja 185440)
878 +++ gcc/config/pa/pa-protos.h   (.../branches/gcc-4_6-branch)   (wersja 185440)
879 @@ -136,6 +136,7 @@
880  extern int cint_ok_for_move (HOST_WIDE_INT);
881  extern void hppa_expand_prologue (void);
882  extern void hppa_expand_epilogue (void);
883 +extern bool pa_can_use_return_insn (void);
884  extern int ior_mask_p (unsigned HOST_WIDE_INT);
885  extern void compute_zdepdi_operands (unsigned HOST_WIDE_INT,
886                                      unsigned *);
887 Index: gcc/config/pa/pa.c
888 ===================================================================
889 --- gcc/config/pa/pa.c  (.../tags/gcc_4_6_3_release)    (wersja 185440)
890 +++ gcc/config/pa/pa.c  (.../branches/gcc-4_6-branch)   (wersja 185440)
891 @@ -4442,6 +4442,24 @@
892      }
893  }
894  
895 +bool
896 +pa_can_use_return_insn (void)
897 +{
898 +  if (!reload_completed)
899 +    return false;
900 +
901 +  if (frame_pointer_needed)
902 +    return false;
903 +
904 +  if (df_regs_ever_live_p (2))
905 +    return false;
906 +
907 +  if (crtl->profile)
908 +    return false;
909 +
910 +  return compute_frame_size (get_frame_size (), 0) == 0;
911 +}
912 +
913  rtx
914  hppa_pic_save_rtx (void)
915  {
916 @@ -4586,7 +4604,7 @@
917    rtx saved_rp;
918    rtx ins;
919  
920 -  /* Instruction stream at the normal return address for the export stub:
921 +  /* The instruction stream at the return address of a PA1.X export stub is:
922  
923         0x4bc23fd1 | stub+8:   ldw -18(sr0,sp),rp
924         0x004010a1 | stub+12:  ldsid (sr0,rp),r1
925 @@ -4594,11 +4612,17 @@
926         0xe0400002 | stub+20:  be,n 0(sr0,rp)
927  
928       0xe0400002 must be specified as -532676606 so that it won't be
929 -     rejected as an invalid immediate operand on 64-bit hosts.  */
930 +     rejected as an invalid immediate operand on 64-bit hosts.
931  
932 -  HOST_WIDE_INT insns[4] = {0x4bc23fd1, 0x004010a1, 0x00011820, -532676606};
933 -  int i;
934 +     The instruction stream at the return address of a PA2.0 export stub is:
935  
936 +       0x4bc23fd1 | stub+8:   ldw -18(sr0,sp),rp
937 +       0xe840d002 | stub+12:  bve,n (rp)
938 +  */
939 +
940 +  HOST_WIDE_INT insns[4];
941 +  int i, len;
942 +
943    if (count != 0)
944      return NULL_RTX;
945  
946 @@ -4620,11 +4644,26 @@
947    ins = copy_to_reg (gen_rtx_AND (Pmode, rp, MASK_RETURN_ADDR));
948    label = gen_label_rtx ();
949  
950 +  if (TARGET_PA_20)
951 +    {
952 +      insns[0] = 0x4bc23fd1;
953 +      insns[1] = -398405630;
954 +      len = 2;
955 +    }
956 +  else
957 +    {
958 +      insns[0] = 0x4bc23fd1;
959 +      insns[1] = 0x004010a1;
960 +      insns[2] = 0x00011820;
961 +      insns[3] = -532676606;
962 +      len = 4;
963 +    }
964 +
965    /* Check the instruction stream at the normal return address for the
966       export stub.  If it is an export stub, than our return address is
967       really in -24[frameaddr].  */
968  
969 -  for (i = 0; i < 3; i++)
970 +  for (i = 0; i < len; i++)
971      {
972        rtx op0 = gen_rtx_MEM (SImode, plus_constant (ins, i * 4)); 
973        rtx op1 = GEN_INT (insns[i]);
974 Index: libstdc++-v3/include/debug/safe_iterator.h
975 ===================================================================
976 --- libstdc++-v3/include/debug/safe_iterator.h  (.../tags/gcc_4_6_3_release)    (wersja 185440)
977 +++ libstdc++-v3/include/debug/safe_iterator.h  (.../branches/gcc-4_6-branch)   (wersja 185440)
978 @@ -1,6 +1,6 @@
979  // Safe iterator implementation  -*- C++ -*-
980  
981 -// Copyright (C) 2003, 2004, 2005, 2006, 2009, 2010, 2011
982 +// Copyright (C) 2003, 2004, 2005, 2006, 2009, 2010, 2011, 2012
983  // Free Software Foundation, Inc.
984  //
985  // This file is part of the GNU ISO C++ Library.  This library is free
986 @@ -142,7 +142,25 @@
987                               ._M_iterator(__x, "other"));
988        }
989  
990 +#ifdef __GXX_EXPERIMENTAL_CXX0X__
991        /**
992 +       * @brief Move construction.
993 +       * @post __x is singular and unattached
994 +       */
995 +      _Safe_iterator(_Safe_iterator&& __x) : _M_current()
996 +      {
997 +       _GLIBCXX_DEBUG_VERIFY(!__x._M_singular()
998 +                             || __x._M_current == _Iterator(),
999 +                             _M_message(__msg_init_copy_singular)
1000 +                             ._M_iterator(*this, "this")
1001 +                             ._M_iterator(__x, "other"));
1002 +       std::swap(_M_current, __x._M_current);
1003 +       this->_M_attach(__x._M_sequence);
1004 +       __x._M_detach();
1005 +      }
1006 +#endif
1007 +
1008 +      /**
1009         *  @brief Converting constructor from a mutable iterator to a
1010         *  constant iterator.
1011        */
1012 @@ -181,7 +199,28 @@
1013         return *this;
1014        }
1015  
1016 +#ifdef __GXX_EXPERIMENTAL_CXX0X__
1017        /**
1018 +       * @brief Move assignment.
1019 +       * @post __x is singular and unattached
1020 +       */
1021 +      _Safe_iterator&
1022 +      operator=(_Safe_iterator&& __x)
1023 +      {
1024 +       _GLIBCXX_DEBUG_VERIFY(!__x._M_singular()
1025 +                             || __x._M_current == _Iterator(),
1026 +                             _M_message(__msg_copy_singular)
1027 +                             ._M_iterator(*this, "this")
1028 +                             ._M_iterator(__x, "other"));
1029 +       _M_current = __x._M_current;
1030 +       _M_attach(__x._M_sequence);
1031 +       __x._M_detach();
1032 +       __x._M_current = _Iterator();
1033 +       return *this;
1034 +      }
1035 +#endif
1036 +
1037 +      /**
1038         *  @brief Iterator dereference.
1039         *  @pre iterator is dereferenceable
1040         */
1041 @@ -415,7 +454,9 @@
1042        /// Is this iterator equal to the sequence's before_begin() iterator if
1043        /// any?
1044        bool _M_is_before_begin() const
1045 -      { return _BeforeBeginHelper<_Sequence>::_M_Is(base(), _M_get_sequence()); }
1046 +      {
1047 +       return _BeforeBeginHelper<_Sequence>::_M_Is(base(), _M_get_sequence());
1048 +      }
1049      };
1050  
1051    template<typename _IteratorL, typename _IteratorR, typename _Sequence>
1052 Index: libstdc++-v3/ChangeLog
1053 ===================================================================
1054 --- libstdc++-v3/ChangeLog      (.../tags/gcc_4_6_3_release)    (wersja 185440)
1055 +++ libstdc++-v3/ChangeLog      (.../branches/gcc-4_6-branch)   (wersja 185440)
1056 @@ -1,3 +1,10 @@
1057 +2012-03-08  Jonathan Wakely  <jwakely.gcc@gmail.com>
1058 +
1059 +       PR libstdc++/52433
1060 +       * include/debug/safe_iterator.h (_Safe_iterator): Add move
1061 +       constructor and move assignment operator.
1062 +       * testsuite/23_containers/vector/debug/52433.cc: New.
1063 +
1064  2012-03-01  Release Manager
1065  
1066         * GCC 4.6.3 released.
1067 Index: libstdc++-v3/testsuite/23_containers/vector/debug/52433.cc
1068 ===================================================================
1069 --- libstdc++-v3/testsuite/23_containers/vector/debug/52433.cc  (.../tags/gcc_4_6_3_release)    (wersja 0)
1070 +++ libstdc++-v3/testsuite/23_containers/vector/debug/52433.cc  (.../branches/gcc-4_6-branch)   (wersja 185440)
1071 @@ -0,0 +1,43 @@
1072 +// Copyright (C) 2012 Free Software Foundation, Inc.
1073 +//
1074 +// This file is part of the GNU ISO C++ Library.  This library is free
1075 +// software; you can redistribute it and/or modify it under the
1076 +// terms of the GNU General Public License as published by the
1077 +// Free Software Foundation; either version 3, or (at your option)
1078 +// any later version.
1079 +//
1080 +// This library is distributed in the hope that it will be useful,
1081 +// but WITHOUT ANY WARRANTY; without even the implied warranty of
1082 +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1083 +// GNU General Public License for more details.
1084 +//
1085 +// You should have received a copy of the GNU General Public License along
1086 +// with this library; see the file COPYING3.  If not see
1087 +// <http://www.gnu.org/licenses/>.
1088 +//
1089 +// { dg-require-debug-mode "" }
1090 +// { dg-options "-std=gnu++0x" }
1091 +// { dg-do compile }
1092 +
1093 +// PR libstdc++/52433
1094 +
1095 +#include <vector>
1096 +
1097 +struct X
1098 +{
1099 +    std::vector<int>::iterator i;
1100 +
1101 +    X() = default;
1102 +    X(const X&) = default;
1103 +    X(X&&) = default;
1104 +    X& operator=(const X&) = default;
1105 +    X& operator=(X&&) = default;
1106 +};
1107 +
1108 +X test01()
1109 +{
1110 +    X x;
1111 +    x = X();
1112 +    return x;
1113 +}
1114 +
1115 Index: boehm-gc/configure.ac
1116 ===================================================================
1117 --- boehm-gc/configure.ac       (.../tags/gcc_4_6_3_release)    (wersja 185440)
1118 +++ boehm-gc/configure.ac       (.../branches/gcc-4_6-branch)   (wersja 185440)
1119 @@ -392,6 +392,7 @@
1120  oldLIBS="$LIBS"
1121  LIBS="$LIBS $THREADLIBS"
1122  AC_CHECK_FUNCS([pthread_getattr_np])
1123 +AC_CHECK_FUNCS([pthread_get_stackaddr_np])
1124  LIBS="$oldLIBS"
1125  
1126  # Configuration of machine-dependent code
1127 Index: boehm-gc/include/gc_config.h.in
1128 ===================================================================
1129 --- boehm-gc/include/gc_config.h.in     (.../tags/gcc_4_6_3_release)    (wersja 185440)
1130 +++ boehm-gc/include/gc_config.h.in     (.../branches/gcc-4_6-branch)   (wersja 185440)
1131 @@ -87,6 +87,9 @@
1132  /* Define to 1 if you have the `pthread_getattr_np' function. */
1133  #undef HAVE_PTHREAD_GETATTR_NP
1134  
1135 +/* Define to 1 if you have the `pthread_get_stackaddr_np_np' function. */
1136 +#undef HAVE_PTHREAD_GET_STACKADDR_NP
1137 +
1138  /* Define to 1 if you have the <stdint.h> header file. */
1139  #undef HAVE_STDINT_H
1140  
1141 Index: boehm-gc/include/private/gcconfig.h
1142 ===================================================================
1143 --- boehm-gc/include/private/gcconfig.h (.../tags/gcc_4_6_3_release)    (wersja 185440)
1144 +++ boehm-gc/include/private/gcconfig.h (.../branches/gcc-4_6-branch)   (wersja 185440)
1145 @@ -1331,7 +1331,11 @@
1146          These aren't used when dyld support is enabled (it is by default) */
1147  #     define DATASTART ((ptr_t) get_etext())
1148  #     define DATAEND   ((ptr_t) get_end())
1149 -#     define STACKBOTTOM ((ptr_t) 0xc0000000)
1150 +#     ifdef HAVE_PTHREAD_GET_STACKADDR_NP
1151 +#       define STACKBOTTOM (ptr_t)pthread_get_stackaddr_np(pthread_self())
1152 +#     else
1153 +#       define STACKBOTTOM ((ptr_t) 0xc0000000)
1154 +#     endif
1155  #     define USE_MMAP
1156  #     define USE_MMAP_ANON
1157  #     define USE_ASM_PUSH_REGS
1158 @@ -2011,7 +2015,11 @@
1159          These aren't used when dyld support is enabled (it is by default) */
1160  #     define DATASTART ((ptr_t) get_etext())
1161  #     define DATAEND   ((ptr_t) get_end())
1162 -#     define STACKBOTTOM ((ptr_t) 0x7fff5fc00000)
1163 +#     ifdef HAVE_PTHREAD_GET_STACKADDR_NP
1164 +#       define STACKBOTTOM (ptr_t)pthread_get_stackaddr_np(pthread_self())
1165 +#     else
1166 +#       define STACKBOTTOM ((ptr_t) 0x7fff5fc00000)
1167 +#     endif
1168  #     define USE_MMAP
1169  #     define USE_MMAP_ANON
1170  #     ifdef GC_DARWIN_THREADS
1171 Index: boehm-gc/ChangeLog
1172 ===================================================================
1173 --- boehm-gc/ChangeLog  (.../tags/gcc_4_6_3_release)    (wersja 185440)
1174 +++ boehm-gc/ChangeLog  (.../branches/gcc-4_6-branch)   (wersja 185440)
1175 @@ -1,3 +1,17 @@
1176 +2012-03-02  Jack Howarth  <howarth@bromo.med.uc.edu>
1177 +
1178 +       Backport from mainline
1179 +       2012-02-23  Patrick Marlier  <patrick.marlier@gmail.com>
1180 +                   Jack Howarth  <howarth@bromo.med.uc.edu>
1181 +
1182 +       PR boehm-gc/52179
1183 +       * include/gc_config.h.in: Undefine HAVE_PTHREAD_GET_STACKADDR_NP.
1184 +       * include/private/gcconfig.h (DARWIN): Define STACKBOTTOM with
1185 +       pthread_get_stackaddr_np when available.
1186 +       * configure.ac (THREADS): Check availability of
1187 +       pthread_get_stackaddr_np.
1188 +       * configure: Regenerate.
1189 +
1190  2012-03-01  Release Manager
1191  
1192         * GCC 4.6.3 released.
1193 Index: boehm-gc/configure
1194 ===================================================================
1195 --- boehm-gc/configure  (.../tags/gcc_4_6_3_release)    (wersja 185440)
1196 +++ boehm-gc/configure  (.../branches/gcc-4_6-branch)   (wersja 185440)
1197 @@ -15246,6 +15246,17 @@
1198  fi
1199  done
1200  
1201 +for ac_func in pthread_get_stackaddr_np
1202 +do :
1203 +  ac_fn_c_check_func "$LINENO" "pthread_get_stackaddr_np" "ac_cv_func_pthread_get_stackaddr_np"
1204 +if test "x$ac_cv_func_pthread_get_stackaddr_np" = x""yes; then :
1205 +  cat >>confdefs.h <<_ACEOF
1206 +#define HAVE_PTHREAD_GET_STACKADDR_NP 1
1207 +_ACEOF
1208 +
1209 +fi
1210 +done
1211 +
1212  LIBS="$oldLIBS"
1213  
1214  # Configuration of machine-dependent code
1215 Index: libjava/configure.ac
1216 ===================================================================
1217 --- libjava/configure.ac        (.../tags/gcc_4_6_3_release)    (wersja 185440)
1218 +++ libjava/configure.ac        (.../branches/gcc-4_6-branch)   (wersja 185440)
1219 @@ -886,14 +886,9 @@
1220          SYSTEMSPEC="-lunicows $SYSTEMSPEC"
1221        fi
1222      ;;
1223 -    *-*-darwin9*)
1224 +    *-*-darwin[[912]]*)
1225        SYSTEMSPEC="%{!Zdynamiclib:%{!Zbundle:-allow_stack_execute}}"
1226      ;;
1227 -    *-*-darwin[[12]]*)
1228 -      # Something is incompatible with pie, would be nice to fix it and
1229 -      # remove -no_pie.  PR49461
1230 -      SYSTEMSPEC="-no_pie %{!Zdynamiclib:%{!Zbundle:-allow_stack_execute}}"
1231 -    ;;
1232      *)
1233        SYSTEMSPEC=
1234      ;;
1235 Index: libjava/ChangeLog
1236 ===================================================================
1237 --- libjava/ChangeLog   (.../tags/gcc_4_6_3_release)    (wersja 185440)
1238 +++ libjava/ChangeLog   (.../branches/gcc-4_6-branch)   (wersja 185440)
1239 @@ -1,3 +1,13 @@
1240 +2012-03-02  Jack Howarth  <howarth@bromo.med.uc.edu>
1241 +
1242 +       Backport from mainline
1243 +       2012-02-23  Patrick Marlier  <patrick.marlier@gmail.com>
1244 +                   Jack Howarth  <howarth@bromo.med.uc.edu>
1245 +
1246 +       PR target/49461
1247 +       * configure.ac (SYSTEMSPEC): No longer pass -no_pie for darwin11.
1248 +       * configure: Regenerate.
1249 +
1250  2012-03-01  Release Manager
1251  
1252         * GCC 4.6.3 released.
1253 Index: libjava/configure
1254 ===================================================================
1255 --- libjava/configure   (.../tags/gcc_4_6_3_release)    (wersja 185440)
1256 +++ libjava/configure   (.../branches/gcc-4_6-branch)   (wersja 185440)
1257 @@ -19775,14 +19775,9 @@
1258          SYSTEMSPEC="-lunicows $SYSTEMSPEC"
1259        fi
1260      ;;
1261 -    *-*-darwin9*)
1262 +    *-*-darwin[912]*)
1263        SYSTEMSPEC="%{!Zdynamiclib:%{!Zbundle:-allow_stack_execute}}"
1264      ;;
1265 -    *-*-darwin[12]*)
1266 -      # Something is incompatible with pie, would be nice to fix it and
1267 -      # remove -no_pie.  PR49461
1268 -      SYSTEMSPEC="-no_pie %{!Zdynamiclib:%{!Zbundle:-allow_stack_execute}}"
1269 -    ;;
1270      *)
1271        SYSTEMSPEC=
1272      ;;