]> git.pld-linux.org Git - packages/gcc.git/blob - gcc-branch.diff
- updated
[packages/gcc.git] / gcc-branch.diff
1 Index: configure
2 ===================================================================
3 --- configure   (.../tags/gcc_4_6_2_release)    (wersja 182550)
4 +++ configure   (.../branches/gcc-4_6-branch)   (wersja 182550)
5 @@ -5117,7 +5117,7 @@
6  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_cv_cc_gcc_supports_ada" >&5
7  $as_echo "$acx_cv_cc_gcc_supports_ada" >&6; }
8  
9 -if test x$GNATBIND != xno && test x$GNATMAKE != xno && test x$acx_cv_cc_gcc_supports_ada != xno; then
10 +if test "x$GNATBIND" != xno && test "x$GNATMAKE" != xno && test x$acx_cv_cc_gcc_supports_ada != xno; then
11    have_gnat=yes
12  else
13    have_gnat=no
14 @@ -6944,10 +6944,6 @@
15      extra_arflags_for_target=" -X32_64"
16      extra_nmflags_for_target=" -B -X32_64"
17      ;;
18 -  *-*-darwin[3-9]*)
19 -    # ranlib before Darwin10 requires the -c flag to look at common symbols.
20 -    extra_ranlibflags_for_target=" -c"
21 -    ;;
22    mips*-*-pe | sh*-*-pe | *arm-wince-pe)
23      target_makefile_frag="config/mt-wince"
24      ;;
25 Index: libgcc/config.host
26 ===================================================================
27 --- libgcc/config.host  (.../tags/gcc_4_6_2_release)    (wersja 182550)
28 +++ libgcc/config.host  (.../branches/gcc-4_6-branch)   (wersja 182550)
29 @@ -145,15 +145,6 @@
30    asm_hidden_op=.private_extern
31    tmake_file="t-darwin ${cpu_type}/t-darwin t-slibgcc-darwin"
32    ;;
33 -*-*-freebsd[12] | *-*-freebsd[12].* | *-*-freebsd*aout*)
34 -  # This is the place-holder for the generic a.out configuration
35 -  # of FreeBSD.  No actual configuration resides here since
36 -  # there was only ever a bare-bones ix86 configuration for
37 -  # a.out and it exists solely in the machine-specific section.
38 -  # This place-holder must exist to avoid dropping into
39 -  # the generic ELF configuration of FreeBSD (i.e. it must be
40 -  # ordered before that section).
41 -  ;;
42  *-*-freebsd*)
43    # This is the generic ELF configuration of FreeBSD.  Later
44    # machine-specific sections may refine and add to this
45 Index: libgcc/generic-morestack.c
46 ===================================================================
47 --- libgcc/generic-morestack.c  (.../tags/gcc_4_6_2_release)    (wersja 182550)
48 +++ libgcc/generic-morestack.c  (.../branches/gcc-4_6-branch)   (wersja 182550)
49 @@ -459,8 +459,8 @@
50    sigemptyset (&__morestack_initial_sp.mask);
51  
52    sigfillset (&__morestack_fullmask);
53 -#ifdef __linux__
54 -  /* On Linux, the first two real time signals are used by the NPTL
55 +#ifdef __GLIBC__
56 +  /* In glibc, the first two real time signals are used by the NPTL
57       threading library.  By taking them out of the set of signals, we
58       avoiding copying the signal mask in pthread_sigmask.  More
59       importantly, pthread_sigmask uses less stack space on x86_64.  */
60 Index: libgcc/ChangeLog
61 ===================================================================
62 --- libgcc/ChangeLog    (.../tags/gcc_4_6_2_release)    (wersja 182550)
63 +++ libgcc/ChangeLog    (.../branches/gcc-4_6-branch)   (wersja 182550)
64 @@ -1,3 +1,16 @@
65 +2011-12-15  H.J. Lu  <hongjiu.lu@intel.com>
66 +
67 +       Backport from mainline
68 +       2011-12-14  H.J. Lu  <hongjiu.lu@intel.com>
69 +
70 +       * generic-morestack.c (__generic_morestack_set_initial_sp): Check
71 +       __GLIBC__ instead of __linux__ when using __SIGRTMIN.
72 +
73 +2011-11-23  Gerald Pfeifer  <gerald@pfeifer.com>
74 +
75 +       * config.host (*-*-freebsd[12], *-*-freebsd[12].*,
76 +       *-*-freebsd*aout*): Remove.
77 +
78  2011-10-26  Release Manager
79  
80         * GCC 4.6.2 released.
81 Index: libtool.m4
82 ===================================================================
83 --- libtool.m4  (.../tags/gcc_4_6_2_release)    (wersja 182550)
84 +++ libtool.m4  (.../branches/gcc-4_6-branch)   (wersja 182550)
85 @@ -2273,7 +2273,7 @@
86      objformat=`/usr/bin/objformat`
87    else
88      case $host_os in
89 -    freebsd[[123]]*) objformat=aout ;;
90 +    freebsd[[23]].*) objformat=aout ;;
91      *) objformat=elf ;;
92      esac
93    fi
94 @@ -2291,7 +2291,7 @@
95    esac
96    shlibpath_var=LD_LIBRARY_PATH
97    case $host_os in
98 -  freebsd2*)
99 +  freebsd2.*)
100      shlibpath_overrides_runpath=yes
101      ;;
102    freebsd3.[[01]]* | freebsdelf3.[[01]]*)
103 @@ -4804,7 +4804,7 @@
104        ;;
105  
106      # Unfortunately, older versions of FreeBSD 2 do not have this feature.
107 -    freebsd2*)
108 +    freebsd2.*)
109        _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
110        _LT_TAGVAR(hardcode_direct, $1)=yes
111        _LT_TAGVAR(hardcode_minus_L, $1)=yes
112 @@ -5751,7 +5751,7 @@
113          esac
114          ;;
115  
116 -      freebsd[[12]]*)
117 +      freebsd2.*)
118          # C++ shared libraries reported to be fairly broken before
119         # switch to ELF
120          _LT_TAGVAR(ld_shlibs, $1)=no
121 Index: libgomp/configure
122 ===================================================================
123 --- libgomp/configure   (.../tags/gcc_4_6_2_release)    (wersja 182550)
124 +++ libgomp/configure   (.../branches/gcc-4_6-branch)   (wersja 182550)
125 @@ -9317,7 +9317,7 @@
126        ;;
127  
128      # Unfortunately, older versions of FreeBSD 2 do not have this feature.
129 -    freebsd2*)
130 +    freebsd2.*)
131        archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
132        hardcode_direct=yes
133        hardcode_minus_L=yes
134 @@ -10230,7 +10230,7 @@
135      objformat=`/usr/bin/objformat`
136    else
137      case $host_os in
138 -    freebsd[123]*) objformat=aout ;;
139 +    freebsd[23].*) objformat=aout ;;
140      *) objformat=elf ;;
141      esac
142    fi
143 @@ -10248,7 +10248,7 @@
144    esac
145    shlibpath_var=LD_LIBRARY_PATH
146    case $host_os in
147 -  freebsd2*)
148 +  freebsd2.*)
149      shlibpath_overrides_runpath=yes
150      ;;
151    freebsd3.[01]* | freebsdelf3.[01]*)
152 @@ -13164,7 +13164,7 @@
153        ;;
154  
155      # Unfortunately, older versions of FreeBSD 2 do not have this feature.
156 -    freebsd2*)
157 +    freebsd2.*)
158        archive_cmds_FC='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
159        hardcode_direct_FC=yes
160        hardcode_minus_L_FC=yes
161 @@ -13869,7 +13869,7 @@
162      objformat=`/usr/bin/objformat`
163    else
164      case $host_os in
165 -    freebsd[123]*) objformat=aout ;;
166 +    freebsd[23].*) objformat=aout ;;
167      *) objformat=elf ;;
168      esac
169    fi
170 @@ -13887,7 +13887,7 @@
171    esac
172    shlibpath_var=LD_LIBRARY_PATH
173    case $host_os in
174 -  freebsd2*)
175 +  freebsd2.*)
176      shlibpath_overrides_runpath=yes
177      ;;
178    freebsd3.[01]* | freebsdelf3.[01]*)
179 Index: libgomp/ChangeLog
180 ===================================================================
181 --- libgomp/ChangeLog   (.../tags/gcc_4_6_2_release)    (wersja 182550)
182 +++ libgomp/ChangeLog   (.../branches/gcc-4_6-branch)   (wersja 182550)
183 @@ -1,3 +1,7 @@
184 +2011-11-20  Andreas Tobler  <andreast@fgznet.ch>
185 +
186 +       * configure: Regenerate.
187 +
188  2011-10-26  Release Manager
189  
190         * GCC 4.6.2 released.
191 Index: libquadmath/configure
192 ===================================================================
193 --- libquadmath/configure       (.../tags/gcc_4_6_2_release)    (wersja 182550)
194 +++ libquadmath/configure       (.../branches/gcc-4_6-branch)   (wersja 182550)
195 @@ -8727,7 +8727,7 @@
196        ;;
197  
198      # Unfortunately, older versions of FreeBSD 2 do not have this feature.
199 -    freebsd2*)
200 +    freebsd2.*)
201        archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
202        hardcode_direct=yes
203        hardcode_minus_L=yes
204 @@ -9643,7 +9643,7 @@
205      objformat=`/usr/bin/objformat`
206    else
207      case $host_os in
208 -    freebsd[123]*) objformat=aout ;;
209 +    freebsd[23].*) objformat=aout ;;
210      *) objformat=elf ;;
211      esac
212    fi
213 @@ -9661,7 +9661,7 @@
214    esac
215    shlibpath_var=LD_LIBRARY_PATH
216    case $host_os in
217 -  freebsd2*)
218 +  freebsd2.*)
219      shlibpath_overrides_runpath=yes
220      ;;
221    freebsd3.[01]* | freebsdelf3.[01]*)
222 Index: libquadmath/ChangeLog
223 ===================================================================
224 --- libquadmath/ChangeLog       (.../tags/gcc_4_6_2_release)    (wersja 182550)
225 +++ libquadmath/ChangeLog       (.../branches/gcc-4_6-branch)   (wersja 182550)
226 @@ -1,3 +1,7 @@
227 +2011-11-20  Andreas Tobler  <andreast@fgznet.ch>
228 +
229 +       * configure: Regenerate.
230 +
231  2011-10-26  Release Manager
232  
233         * GCC 4.6.2 released.
234 Index: gcc/c-family/ChangeLog
235 ===================================================================
236 --- gcc/c-family/ChangeLog      (.../tags/gcc_4_6_2_release)    (wersja 182550)
237 +++ gcc/c-family/ChangeLog      (.../branches/gcc-4_6-branch)   (wersja 182550)
238 @@ -1,3 +1,15 @@
239 +2011-11-04  Eric Botcazou  <ebotcazou@adacore.com>
240 +
241 +       PR c++/50608
242 +       * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Call fold_offsetof_1.
243 +       (fold_offsetof_1): Make global.  Remove STOP_REF argument and adjust.
244 +       <INDIRECT_REF>: Return the argument.
245 +       <ARRAY_REF>: Remove special code for negative offset.
246 +       Call fold_build_pointer_plus instead of size_binop.
247 +       (fold_offsetof): Remove STOP_REF argument and adjust.
248 +       * c-common.h (fold_offsetof_1): Declare.
249 +       (fold_offsetof): Remove STOP_REF argument.
250 +
251  2011-10-26  Release Manager
252  
253         * GCC 4.6.2 released.
254 Index: gcc/c-family/c-common.c
255 ===================================================================
256 --- gcc/c-family/c-common.c     (.../tags/gcc_4_6_2_release)    (wersja 182550)
257 +++ gcc/c-family/c-common.c     (.../branches/gcc-4_6-branch)   (wersja 182550)
258 @@ -1236,13 +1236,7 @@
259           && (op1 = get_base_address (op0)) != NULL_TREE
260           && TREE_CODE (op1) == INDIRECT_REF
261           && TREE_CONSTANT (TREE_OPERAND (op1, 0)))
262 -       {
263 -         tree offset = fold_offsetof (op0, op1);
264 -         op1
265 -           = fold_convert_loc (loc, TREE_TYPE (expr), TREE_OPERAND (op1, 0));
266 -         ret = fold_build2_loc (loc, POINTER_PLUS_EXPR, TREE_TYPE (expr), op1,
267 -                                offset);
268 -       }
269 +       ret = fold_convert_loc (loc, TREE_TYPE (expr), fold_offsetof_1 (op0));
270        else if (op0 != orig_op0 || in_init)
271         ret = in_init
272           ? fold_build1_initializer_loc (loc, code, TREE_TYPE (expr), op0)
273 @@ -8459,20 +8453,15 @@
274      return uc;
275  }
276  
277 -/* Build the result of __builtin_offsetof.  EXPR is a nested sequence of
278 -   component references, with STOP_REF, or alternatively an INDIRECT_REF of
279 -   NULL, at the bottom; much like the traditional rendering of offsetof as a
280 -   macro.  Returns the folded and properly cast result.  */
281 +/* Fold an offsetof-like expression.  EXPR is a nested sequence of component
282 +   references with an INDIRECT_REF of a constant at the bottom; much like the
283 +   traditional rendering of offsetof as a macro.  Return the folded result.  */
284  
285 -static tree
286 -fold_offsetof_1 (tree expr, tree stop_ref)
287 +tree
288 +fold_offsetof_1 (tree expr)
289  {
290 -  enum tree_code code = PLUS_EXPR;
291    tree base, off, t;
292  
293 -  if (expr == stop_ref && TREE_CODE (expr) != ERROR_MARK)
294 -    return size_zero_node;
295 -
296    switch (TREE_CODE (expr))
297      {
298      case ERROR_MARK:
299 @@ -8489,15 +8478,15 @@
300  
301      case NOP_EXPR:
302      case INDIRECT_REF:
303 -      if (!integer_zerop (TREE_OPERAND (expr, 0)))
304 +      if (!TREE_CONSTANT (TREE_OPERAND (expr, 0)))
305         {
306           error ("cannot apply %<offsetof%> to a non constant address");
307           return error_mark_node;
308         }
309 -      return size_zero_node;
310 +      return TREE_OPERAND (expr, 0);
311  
312      case COMPONENT_REF:
313 -      base = fold_offsetof_1 (TREE_OPERAND (expr, 0), stop_ref);
314 +      base = fold_offsetof_1 (TREE_OPERAND (expr, 0));
315        if (base == error_mark_node)
316         return base;
317  
318 @@ -8515,21 +8504,14 @@
319        break;
320  
321      case ARRAY_REF:
322 -      base = fold_offsetof_1 (TREE_OPERAND (expr, 0), stop_ref);
323 +      base = fold_offsetof_1 (TREE_OPERAND (expr, 0));
324        if (base == error_mark_node)
325         return base;
326  
327        t = TREE_OPERAND (expr, 1);
328 -      if (TREE_CODE (t) == INTEGER_CST && tree_int_cst_sgn (t) < 0)
329 -       {
330 -         code = MINUS_EXPR;
331 -         t = fold_build1_loc (input_location, NEGATE_EXPR, TREE_TYPE (t), t);
332 -       }
333 -      t = convert (sizetype, t);
334 -      off = size_binop (MULT_EXPR, TYPE_SIZE_UNIT (TREE_TYPE (expr)), t);
335  
336        /* Check if the offset goes beyond the upper bound of the array.  */
337 -      if (code == PLUS_EXPR && TREE_CODE (t) == INTEGER_CST)
338 +      if (TREE_CODE (t) == INTEGER_CST && tree_int_cst_sgn (t) >= 0)
339         {
340           tree upbound = array_ref_up_bound (expr);
341           if (upbound != NULL_TREE
342 @@ -8569,26 +8551,30 @@
343                 }
344             }
345         }
346 +
347 +      t = convert (sizetype, t);
348 +      off = size_binop (MULT_EXPR, TYPE_SIZE_UNIT (TREE_TYPE (expr)), t);
349        break;
350  
351      case COMPOUND_EXPR:
352        /* Handle static members of volatile structs.  */
353        t = TREE_OPERAND (expr, 1);
354        gcc_assert (TREE_CODE (t) == VAR_DECL);
355 -      return fold_offsetof_1 (t, stop_ref);
356 +      return fold_offsetof_1 (t);
357  
358      default:
359        gcc_unreachable ();
360      }
361  
362 -  return size_binop (code, base, off);
363 +  return fold_build2 (POINTER_PLUS_EXPR, TREE_TYPE (base), base, off);
364  }
365  
366 +/* Likewise, but convert it to the return type of offsetof.  */
367 +
368  tree
369 -fold_offsetof (tree expr, tree stop_ref)
370 +fold_offsetof (tree expr)
371  {
372 -  /* Convert back from the internal sizetype to size_t.  */
373 -  return convert (size_type_node, fold_offsetof_1 (expr, stop_ref));
374 +  return convert (size_type_node, fold_offsetof_1 (expr));
375  }
376  
377  /* Warn for A ?: C expressions (with B omitted) where A is a boolean 
378 Index: gcc/c-family/c-common.h
379 ===================================================================
380 --- gcc/c-family/c-common.h     (.../tags/gcc_4_6_2_release)    (wersja 182550)
381 +++ gcc/c-family/c-common.h     (.../branches/gcc-4_6-branch)   (wersja 182550)
382 @@ -916,7 +916,8 @@
383  
384  extern void verify_sequence_points (tree);
385  
386 -extern tree fold_offsetof (tree, tree);
387 +extern tree fold_offsetof_1 (tree);
388 +extern tree fold_offsetof (tree);
389  
390  /* Places where an lvalue, or modifiable lvalue, may be required.
391     Used to select diagnostic messages in lvalue_error and
392 Index: gcc/DATESTAMP
393 ===================================================================
394 --- gcc/DATESTAMP       (.../tags/gcc_4_6_2_release)    (wersja 182550)
395 +++ gcc/DATESTAMP       (.../branches/gcc-4_6-branch)   (wersja 182550)
396 @@ -1 +1 @@
397 -20111026
398 +20111220
399 Index: gcc/configure
400 ===================================================================
401 --- gcc/configure       (.../tags/gcc_4_6_2_release)    (wersja 182550)
402 +++ gcc/configure       (.../branches/gcc-4_6-branch)   (wersja 182550)
403 @@ -7442,17 +7442,7 @@
404    RANLIB="$ac_cv_prog_RANLIB"
405  fi
406  
407 -case "${host}" in
408 -*-*-darwin*)
409 -  # By default, the Darwin ranlib will not treat common symbols as
410 -  # definitions when  building the archive table of contents.  Other
411 -  # ranlibs do that; pass an option to the Darwin ranlib that makes
412 -  # it behave similarly.
413 -  ranlib_flags="-c"
414 -  ;;
415 -*)
416 -  ranlib_flags=""
417 -esac
418 +ranlib_flags=""
419  
420  
421  # Find a good install program.  We prefer a C program (faster),
422 @@ -15740,7 +15730,7 @@
423        ;;
424  
425      # Unfortunately, older versions of FreeBSD 2 do not have this feature.
426 -    freebsd2*)
427 +    freebsd2.*)
428        archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
429        hardcode_direct=yes
430        hardcode_minus_L=yes
431 @@ -16653,7 +16643,7 @@
432      objformat=`/usr/bin/objformat`
433    else
434      case $host_os in
435 -    freebsd[123]*) objformat=aout ;;
436 +    freebsd[23].*) objformat=aout ;;
437      *) objformat=elf ;;
438      esac
439    fi
440 @@ -16671,7 +16661,7 @@
441    esac
442    shlibpath_var=LD_LIBRARY_PATH
443    case $host_os in
444 -  freebsd2*)
445 +  freebsd2.*)
446      shlibpath_overrides_runpath=yes
447      ;;
448    freebsd3.[01]* | freebsdelf3.[01]*)
449 @@ -17505,7 +17495,7 @@
450    lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
451    lt_status=$lt_dlunknown
452    cat > conftest.$ac_ext <<_LT_EOF
453 -#line 17508 "configure"
454 +#line 17498 "configure"
455  #include "confdefs.h"
456  
457  #if HAVE_DLFCN_H
458 @@ -17611,7 +17601,7 @@
459    lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
460    lt_status=$lt_dlunknown
461    cat > conftest.$ac_ext <<_LT_EOF
462 -#line 17614 "configure"
463 +#line 17604 "configure"
464  #include "confdefs.h"
465  
466  #if HAVE_DLFCN_H
467 @@ -18537,7 +18527,7 @@
468          esac
469          ;;
470  
471 -      freebsd[12]*)
472 +      freebsd2.*)
473          # C++ shared libraries reported to be fairly broken before
474         # switch to ELF
475          ld_shlibs_CXX=no
476 @@ -20312,7 +20302,7 @@
477      objformat=`/usr/bin/objformat`
478    else
479      case $host_os in
480 -    freebsd[123]*) objformat=aout ;;
481 +    freebsd[23].*) objformat=aout ;;
482      *) objformat=elf ;;
483      esac
484    fi
485 @@ -20330,7 +20320,7 @@
486    esac
487    shlibpath_var=LD_LIBRARY_PATH
488    case $host_os in
489 -  freebsd2*)
490 +  freebsd2.*)
491      shlibpath_overrides_runpath=yes
492      ;;
493    freebsd3.[01]* | freebsdelf3.[01]*)
494 Index: gcc/objc/objc-next-runtime-abi-01.c
495 ===================================================================
496 --- gcc/objc/objc-next-runtime-abi-01.c (.../tags/gcc_4_6_2_release)    (wersja 182550)
497 +++ gcc/objc/objc-next-runtime-abi-01.c (.../branches/gcc-4_6-branch)   (wersja 182550)
498 @@ -2871,12 +2871,15 @@
499    return eh_id;
500  }
501  
502 +/* For NeXT ABI 0 and 1, the personality routines are just those of the 
503 +   underlying language.  */
504 +
505  static tree
506  objc_eh_personality (void)
507  {
508    if (!objc_eh_personality_decl)
509  #ifndef OBJCPLUS
510 -    objc_eh_personality_decl = build_personality_function ("objc");
511 +    objc_eh_personality_decl = build_personality_function ("gcc");
512  #else
513      objc_eh_personality_decl = build_personality_function ("gxx");
514  #endif
515 Index: gcc/objc/objc-act.c
516 ===================================================================
517 --- gcc/objc/objc-act.c (.../tags/gcc_4_6_2_release)    (wersja 182550)
518 +++ gcc/objc/objc-act.c (.../branches/gcc-4_6-branch)   (wersja 182550)
519 @@ -3136,9 +3136,8 @@
520    struct string_descriptor *desc, key;
521    void **loc;
522  
523 -  /* Prep the string argument.  */
524 -  string = fix_string_type (string);
525 -  TREE_SET_CODE (string, STRING_CST);
526 +  /* We should be passed a STRING_CST.  */
527 +  gcc_checking_assert (TREE_CODE (string) == STRING_CST);
528    length = TREE_STRING_LENGTH (string) - 1;
529  
530    /* The target may have different ideas on how to construct an ObjC string 
531 Index: gcc/objc/ChangeLog
532 ===================================================================
533 --- gcc/objc/ChangeLog  (.../tags/gcc_4_6_2_release)    (wersja 182550)
534 +++ gcc/objc/ChangeLog  (.../branches/gcc-4_6-branch)   (wersja 182550)
535 @@ -1,3 +1,18 @@
536 +2011-11-12  Iain Sandoe  <iains@gcc.gnu.org>
537 +
538 +       Backport from mainline
539 +       2011-10-29  Iain Sandoe  <iains@gcc.gnu.org>
540 +       
541 +       PR target/47997
542 +       * objc-act.c (objc_build_string_object): Remove redundant second
543 +       call to fix_string_type ().  Add a checking assert that we are,
544 +       indeed, passed a STRING_CST.
545 +
546 +2011-11-12  Iain Sandoe  <iains@gcc.gnu.org>
547 +
548 +       * objc-next-runtime-abi-01.c (objc_eh_personality): Use gcc personality
549 +       for Objective-C m32.
550 +
551  2011-10-26  Release Manager
552  
553         * GCC 4.6.2 released.
554 Index: gcc/reorg.c
555 ===================================================================
556 --- gcc/reorg.c (.../tags/gcc_4_6_2_release)    (wersja 182550)
557 +++ gcc/reorg.c (.../branches/gcc-4_6-branch)   (wersja 182550)
558 @@ -3554,9 +3554,11 @@
559             }
560         }
561  
562 +      /* See if we have a simple (conditional) jump that is useless.  */
563        if (! INSN_ANNULLED_BRANCH_P (delay_insn)
564 +         && ! condjump_in_parallel_p (delay_insn)
565           && prev_active_insn (target_label) == insn
566 -         && ! condjump_in_parallel_p (delay_insn)
567 +         && ! BARRIER_P (prev_nonnote_insn (target_label))
568  #ifdef HAVE_cc0
569           /* If the last insn in the delay slot sets CC0 for some insn,
570              various code assumes that it is in a delay slot.  We could
571 Index: gcc/DEV-PHASE
572 ===================================================================
573 --- gcc/DEV-PHASE       (.../tags/gcc_4_6_2_release)    (wersja 182550)
574 +++ gcc/DEV-PHASE       (.../branches/gcc-4_6-branch)   (wersja 182550)
575 @@ -0,0 +1 @@
576 +prerelease
577 Index: gcc/ChangeLog
578 ===================================================================
579 --- gcc/ChangeLog       (.../tags/gcc_4_6_2_release)    (wersja 182550)
580 +++ gcc/ChangeLog       (.../branches/gcc-4_6-branch)   (wersja 182550)
581 @@ -1,3 +1,380 @@
582 +2011-12-19  Martin Jambor  <mjambor@suse.cz>
583 +
584 +       PR tree-optimization/51583
585 +       * tree-sra.c (load_assign_lhs_subreplacements): Call
586 +       force_gimple_operand_gsi when necessary also in case of no
587 +       corresponding replacement on the RHS.
588 +
589 +2011-12-16  Eric Botcazou  <ebotcazou@adacore.com>
590 +
591 +       * config/sparc/sparc.md (UNSPEC_FRAME_BLOCKAGE): New constant.
592 +       (frame_blockage): New expander.
593 +       (frame_blockage<P:mode>): New instruction.
594 +       * config/sparc/sparc.c (sparc_expand_prologue): When the sequence of
595 +       instructions establishing the frame isn't atomic, emit frame blockage.
596 +
597 +2011-12-15  H.J. Lu  <hongjiu.lu@intel.com>
598 +
599 +       Backport from mainline.
600 +       2011-10-28  Chung-Lin Tang  <cltang@codesourcery.com>
601 +
602 +       PR rtl-optimization/49720
603 +       * simplify-rtx.c (simplify_relational_operation_1): Detect
604 +       infinite recursion condition in "(eq/ne (plus x cst1) cst2)
605 +       simplifies to (eq/ne x (cst2 - cst1))" case.
606 +
607 +2011-12-15  Andreas Tobler  <andreast@fgznet.ch>
608 +
609 +       Backport from mainline.
610 +       2011-12-15  Andreas Tobler  <andreast@fgznet.ch>
611 +
612 +       * config/i386/freebsd.h (TARGET_ASM_FILE_END): Define.
613 +
614 +2011-12-13  Eric Botcazou  <ebotcazou@adacore.com>
615 +
616 +       * lto-streamer-out.c (write_symbol): Use proper 64-bit host type.
617 +       * lto-cgraph.c (input_cgraph_opt_section): Use 'int' for offsets.
618 +       * lto-streamer-in.c (lto_read_body): Likewise.
619 +       (lto_input_toplevel_asms): Likewise.
620 +       * lto-section-in.c (lto_create_simple_input_block): Likewise.
621 +       * lto-opts.c (lto_read_file_options): Likewise.
622 +       * ipa-prop.c (ipa_prop_read_section): Likewise.
623 +
624 +       * df.h (DF_NOTE): Fix typo in comment.
625 +
626 +2011-12-13  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
627 +
628 +       * regmove.c (fixup_match_2): Only access call_used_regs with hard
629 +       regs.
630 +
631 +2011-12-12  Jakub Jelinek  <jakub@redhat.com>
632 +
633 +       PR middle-end/51510
634 +       * calls.c (internal_arg_pointer_based_exp_scan): Don't use
635 +       VEC_safe_grow_cleared if idx is smaller than VEC_length.
636 +
637 +       Backported from mainline
638 +       2011-12-11  Jakub Jelinek  <jakub@redhat.com>
639 +
640 +       PR tree-optimization/51485
641 +       * tree-vect-data-refs.c (vect_analyze_data_refs): Give up on
642 +       DRs in call stmts.
643 +
644 +2011-12-12  Eric Botcazou  <ebotcazou@adacore.com>
645 +
646 +       PR tree-optimization/50569
647 +       * tree-sra.c (build_ref_for_model): Replicate a chain of COMPONENT_REFs
648 +       in the expression of MODEL instead of just the last one.
649 +
650 +2011-12-09  Michael Meissner  <meissner@the-meissners.org>
651 +
652 +       Backport from mainline
653 +       2011-12-09  Michael Meissner  <meissner@the-meissners.org>
654 +
655 +       PR rtl-optimization/51469
656 +       * varasm.c (default_binds_local_p_1): If the symbol is a gnu
657 +       indirect function, mark the symbol as non-local.
658 +
659 +2011-12-09  Jakub Jelinek  <jakub@redhat.com>
660 +
661 +       Backport from mainline
662 +       2011-12-08  Jakub Jelinek  <jakub@redhat.com>
663 +
664 +       PR tree-optimization/51466
665 +       * tree-ssa-forwprop.c (forward_propagate_addr_expr_1): Also copy
666 +       TREE_SIDE_EFFECTS.
667 +
668 +       2011-11-28  Jakub Jelinek  <jakub@redhat.com>
669 +
670 +       PR tree-optimization/50078
671 +       * tree-ssa-forwprop.c (forward_propagate_addr_expr_1): Copy over
672 +       TREE_THIS_VOLATILE also from the old to new lhs resp. rhs.
673 +
674 +2011-12-09  Kazu Hirata  <kazu@codesourcery.com>
675 +
676 +       Backport from mainline:
677 +
678 +       2011-12-05  Kazu Hirata  <kazu@codesourcery.com>
679 +
680 +       PR target/51408
681 +       * config/arm/arm.md (*minmax_arithsi): Always require the else
682 +       clause in the MINUS case.
683 +
684 +2011-12-08  Teresa Johnson  <tejohnson@google.com>
685 +
686 +       Backport from mainline:
687 +
688 +       2011-08-05  Uros Bizjak  <ubizjak@gmail.com>
689 +
690 +       * config/i386/i386.md (*movdi_internal_rex64): Use "!o" constraint
691 +       instead of "!m" for operand 0, alternative 4.
692 +       (*movdf_internal_rex64): Ditto for operand 0, alernative 6.
693 +
694 +2011-12-08  Jakub Jelinek  <jakub@redhat.com>
695 +
696 +       Backport from mainline
697 +       2011-12-05  Jakub Jelinek  <jakub@redhat.com>
698 +
699 +       PR debug/51410
700 +       * c-decl.c (pop_scope): Don't add DECL_EXTERNAL decls
701 +       for debug info if scope is file_scope.
702 +
703 +       PR c/51339
704 +       * c-decl.c (c_finish_incomplete_decl, finish_decl): Call
705 +       relayout_decl instead of layout_decl.
706 +
707 +       2011-12-05  Jakub Jelinek  <jakub@redhat.com>
708 +                   Eric Botcazou  <ebotcazou@adacore.com>
709 +
710 +       PR middle-end/51323
711 +       PR middle-end/50074
712 +       * calls.c (internal_arg_pointer_exp_state): New variable.
713 +       (internal_arg_pointer_based_exp_1,
714 +       internal_arg_pointer_exp_scan): New functions.
715 +       (internal_arg_pointer_based_exp): New function.
716 +       (mem_overlaps_already_clobbered_arg_p): Use it.
717 +       (expand_call): Free internal_arg_pointer_exp_state.cache vector
718 +       and clear internal_arg_pointer_exp_state.scan_start.
719 +
720 +       2011-11-30  Jakub Jelinek  <jakub@redhat.com>
721 +
722 +       PR rtl-optimization/48721
723 +       * sched-deps.c (sched_analyze_insn): For SIBLING_CALL_P set
724 +       reg_pending_barrier to TRUE_BARRIER.
725 +
726 +       2011-11-26  Joern Rennecke  <joern.rennecke@embecosm.com>
727 +
728 +       PR middle-end/50074
729 +       * calls.c (mem_overlaps_already_clobbered_arg_p):
730 +       Return false if no outgoing arguments have been stored so far.
731 +
732 +2011-12-08  Eric Botcazou  <ebotcazou@adacore.com>
733 +
734 +       PR tree-optimization/51315
735 +       * tree-sra.c (tree_non_mode_aligned_mem_p): Rename to...
736 +       (tree_non_aligned_mem_p): ...this.  Add ALIGN parameter.  Look into
737 +       MEM_REFs and use get_object_or_type_alignment for them.
738 +       (build_accesses_from_assign): Adjust for above change.
739 +       (access_precludes_ipa_sra_p): Likewise.
740 +
741 +2011-12-06  Martin Jambor  <mjambor@suse.cz>
742 +
743 +       Backport from mainline:
744 +
745 +       2011-12-02  Martin Jambor  <mjambor@suse.cz>
746 +
747 +       PR tree-optimization/50622
748 +       * tree-sra.c (load_assign_lhs_subreplacements): Force gimple operand
749 +       if both lacc and racc are grp_partial_lhs.
750 +
751 +2011-12-06  Iain Sandoe  <iains@gcc.gnu.org>
752 +
753 +       * config/rs6000/rs6000.c (darwin_rs6000_override_options): Initialize
754 +       rs6000_current_abi.
755 +
756 +2011-12-06  Alan Modra  <amodra@gmail.com>
757 +
758 +       PR target/50906
759 +       * config/rs6000/rs6000.c (rs6000_emit_prologue <TARGET_SPE_ABI>):
760 +       Do not mark r11 setup as frame-related.  Pass correct offset to
761 +       rs6000_emit_savres_rtx.  Correct out-of-line rs6000_frame_related
762 +       arguments.  Correct sp_offset.  Remove "offset" fudge from
763 +       in-line rs6000_frame_related call.  Rename misleading variable.
764 +       Fix comments and whitespace.  Tidy some expressions.
765 +       (rs6000_emit_epilogue <TARGET_SPE_ABI>): Always set frame_reg_rtx
766 +       to r11 in out-of-line case.  Correct sp_offset.  Pass correct
767 +       offset to rs6000_emit_savres_rtx.  Rename misleading variable.
768 +       Fix comments and whitespace.  Tidy some expressions.
769 +       (rs6000_emit_epilogue <non-TARGET_SPE_ABI>): Add sp_offset
770 +       adjustment when !saving_GPRs_inline.  Correct register mode
771 +       used in address calcs.
772 +       (rs6000_emit_epilogue <non-TARGET_SPE_ABI>): Similarly when
773 +       !restoring_GPRs_inline.
774 +
775 +2011-12-04  Jérémie Detrey  <Jeremie.Detrey@loria.fr>
776 +
777 +       PR target/51393
778 +       * config/i386/avxintrin.h (_mm256_insert_epi64): Declare second
779 +       parameter as long long.
780 +
781 +2011-12-02  Georg-Johann Lay  <avr@gjlay.de>
782 +
783 +       PR target/51002
784 +       PR target/51345
785 +       * config/avr/libgcc.S (__prologue_saves__, __epilogue_restores__):
786 +       Enclose parts using __SP_H__ in !defined (__AVR_HAVE_8BIT_SP__).
787 +       Add FIXME comments.
788 +       * config/avr/avr.md (movhi_sp_r_irq_off, movhi_sp_r_irq_on): Set
789 +       insn condition to !AVR_HAVE_8BIT_SP.
790 +       * config/avr/avr.c (output_movhi): "clr%B0" instead of "in
791 +       %B0,__SP_H__" if AVR_HAVE_8BIT_SP.
792 +       (avr_file_start): Only print "__SP_H__ = 0x3e" if !AVR_HAVE_8BIT_SP.
793 +       * config/avr/avr-devices.c (avr_mcu_types): ATtiny4313 and
794 +       AT86RF401 have a 16-bit SP (their manual is bogus).
795 +
796 +2011-11-25  Richard Sandiford  <richard.sandiford@linaro.org>
797 +
798 +       Backport from mainline:
799 +
800 +       2011-03-29  Richard Sandiford  <richard.sandiford@linaro.org>
801 +
802 +       PR debug/48190
803 +       * dwarf2out.c (dw_loc_list_node): Add resolved_addr and replaced.
804 +       (cached_dw_loc_list_def): New structure.
805 +       (cached_dw_loc_list): New typedef.
806 +       (cached_dw_loc_list_table): New variable.
807 +       (cached_dw_loc_list_table_hash): New function.
808 +       (cached_dw_loc_list_table_eq): Likewise.
809 +       (add_location_or_const_value_attribute): Take a bool cache_p.
810 +       Cache the list when the parameter is true.
811 +       (gen_formal_parameter_die): Update caller.
812 +       (gen_variable_die): Likewise.
813 +       (dwarf2out_finish): Likewise.
814 +       (dwarf2out_abstract_function): Nullify cached_dw_loc_list_table
815 +       while generating debug info for the decl.
816 +       (dwarf2out_function_decl): Clear cached_dw_loc_list_table.
817 +       (dwarf2out_init): Initialize cached_dw_loc_list_table.
818 +       (resolve_addr): Cache the result of resolving a chain of
819 +       location lists.
820 +
821 +2011-11-24  Enkovich Ilya  <ilya.enkovich@intel.com>
822 +
823 +       PR target/51287
824 +       * i386.c (distance_non_agu_define): Fix insn attr check.
825 +
826 +2011-11-20  Andreas Tobler  <andreast@fgznet.ch>
827 +
828 +       * configure: Regenerate.
829 +
830 +2011-11-19  Eric Botcazou  <ebotcazou@adacore.com>
831 +
832 +       PR rtl-optimization/51187
833 +       * reorg.c (relax_delay_slots): Do not consider a jump useless if there
834 +       is a barrier between the jump and its target label.
835 +
836 +2011-11-19  Richard Earnshaw  <rearnsha@arm.com>
837 +
838 +       PR target/50493
839 +       * config/arm/arm.c (neon_disambiguate_copy): Correctly handle partial
840 +       overlap of src and dest operands.
841 +
842 +2011-11-18  Iain Sandoe  <iains@gcc.gnu.org>
843 +
844 +       PR target/49992
845 +       * configure.ac: Remove ranlib special-casing for Darwin.
846 +       * configure: Regenerate.
847 +
848 +2011-11-16  Richard Earnshaw  <rearnsha@arm.com>
849 +           Bernd Schmidt <bernds@coudesourcery.com>
850 +           Sebastian Huber <sebastian.huber@embedded-brains.de>
851 +
852 +       PR target/49641
853 +       * config/arm/arm.c (store_multiple_sequence): Avoid cases where
854 +       the base reg is stored iff compiling for Thumb1.
855 +
856 +2011-11-13  Iain Sandoe  <iains@gcc.gnu.org>
857 +
858 +       PR target/48108
859 +       Backport from mainline r180523
860 +       * config/darwin.c (top level): Amend comments concerning LTO output.
861 +       (lto_section_num): New variable.  (darwin_lto_section_e): New GTY.
862 +       (LTO_SECTS_SECTION, LTO_INDEX_SECTION): New.
863 +       (LTO_NAMES_SECTION): Rename.
864 +       (darwin_asm_named_section): Record LTO section counts and switches
865 +       in a vec of darwin_lto_section_e.
866 +       (darwin_file_start): Remove unused code.
867 +       (darwin_file_end): Put an LTO section termination label.  Handle
868 +       output of the wrapped LTO sections, index and names table.
869 +
870 +2011-11-12  Iain Sandoe  <iains@gcc.gnu.org>
871 +
872 +       PR target/45233
873 +       * config/rs6000/rs6000.c (rs6000_legitimize_reload_address):
874 +       Only expand a symbol ref. into an access when the entity is defined
875 +       in the TU.
876 +
877 +2011-11-10  Jakub Jelinek  <jakub@redhat.com>
878 +
879 +       PR middle-end/51077
880 +       * tree-object-size.c (addr_object_size): Check TREE_CODE of
881 +       MEM_REF's operand rather than code of the MEM_REF itself.
882 +
883 +2011-11-07  Alan Modra  <amodra@gmail.com>
884 +
885 +       PR target/30282
886 +       * config/rs6000/rs6000.c (rs6000_emit_stack_reset): Always emit
887 +       blockage for ABI_V4.
888 +
889 +2011-11-04  Eric Botcazou  <ebotcazou@adacore.com>
890 +
891 +       PR c++/50608
892 +       * c-parser.c (c_parser_postfix_expression) <RID_OFFSETOF>: Adjust call
893 +       to fold_offsetof.
894 +       * c-typeck.c (build_unary_op) <ADDR_EXPR>: Call fold_offsetof_1.
895 +
896 +2011-11-04  Eric Botcazou  <ebotcazou@adacore.com>
897 +
898 +       PR target/50979
899 +       * config/sparc/sparc.h (ASM_CPU_SPEC): Pass -Av8 if -mcpu=v8.
900 +
901 +2011-11-03  Uros Bizjak  <ubizjak@gmail.com>
902 +
903 +       * config/i386/i386.md (lround<X87MODEF:mode><SWI248x:mode>2,
904 +       rint<mode>2, floor<mode>2, lfloor<MODEF:mode><SWI48:mode>2,
905 +       btrunc<mode>2, lwp_lwpval<mode>3): Use operands[N] instead of operandN.
906 +
907 +2011-11-02  Eric Botcazou  <ebotcazou@adacore.com>
908 +
909 +       PR target/50945
910 +       * config/sparc/sparc.md (movsf_insn): Reindent constraints.
911 +       (movsf_insn_no_fpu): Likewise.
912 +       (movdf_insn_sp32): Likewise.
913 +       (movdf_insn_sp32_no_fpu): Likewise.
914 +       (movdf_insn_sp32_v9): Likewise.  Remove redundant GY constraint.
915 +       (movdf_insn_sp32_v9_no_fpu): Likewise.
916 +       (movdf_insn_sp64): Likewise.
917 +       (movdf_insn_sp64_no_fpu): Likewise.
918 +       (movtf_insn_sp32): Likewise.
919 +       (movtf_insn_sp32_no_fpu): Likewise.
920 +       (movtf_insn_sp64): Likewise.
921 +       (movtf_insn_sp64_hq): Likewise.
922 +       (movtf_insn_sp64_no_fpu): Likewise.
923 +
924 +2011-11-02  Bernd Schmidt  <bernds@codesourcery.com>
925 +
926 +       * cfgcleanup.c (try_head_merge_bb): If get_condition returns
927 +       NULL for a jump that is a cc0 insn, pick the previous insn for
928 +       move_before.
929 +
930 +2011-11-01  Uros Bizjak  <ubizjak@gmail.com>
931 +
932 +       * config/i386/i386.md (splitters for int-float conversion): Use
933 +       SUBREG_REG on SUBREGs in splitter constraints.
934 +
935 +2011-11-01  Julian Brown  <julian@codesourcery.com>
936 +
937 +       PR rtl-optimization/47918
938 +       * reload1.c (set_initial_label_offsets): Use initial offsets
939 +       for labels on the nonlocal_goto_handler_labels chain.
940 +
941 +2011-10-29  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
942 +
943 +       PR target/50691
944 +       * config/pa/pa.c (emit_move_sequence): Legitimize TLS symbol references.
945 +       * config/pa/pa.h (LEGITIMATE_CONSTANT_P): Return false for
946 +       TLS_MODEL_GLOBAL_DYNAMIC and TLS_MODEL_LOCAL_DYNAMIC symbol references.
947 +
948 +2011-10-27  Uros Bizjak  <ubizjak@gmail.com>
949 +
950 +       PR target/50875
951 +       * config/i386/sse.md (*avx_unpcklpd256): Remove extra insn
952 +       constraints.  Change alternative 1 to "x,m,1".
953 +
954 +2011-10-26  Jakub Jelinek  <jakub@redhat.com>
955 +
956 +       * BASE-VER: Set to 4.6.3.
957 +       * DEV-PHASE: Set to prerelease.
958 +
959  2011-10-26  Release Manager
960  
961         * GCC 4.6.2 released.
962 @@ -144,8 +521,8 @@
963  
964  2011-10-07  Bernd Schmidt  <bernds@codesourcery.com>
965  
966 -       PR target/49049
967 -       * config/arm/arm.md (arm_subsi3_insn): Lose the last alternative.
968 +       PR target/49049
969 +       * config/arm/arm.md (arm_subsi3_insn): Lose the last alternative.
970  
971  2011-10-06  Jakub Jelinek  <jakub@redhat.com>
972  
973 @@ -252,7 +629,7 @@
974         * config/rs6000/rs6000.md (probe_stack): Use explicit operand.
975         * config/rs6000/rs6000.c (output_probe_stack_range): Likewise.
976  
977 -2011-09-14   Diego Novillo  <dnovillo@google.com>
978 +2011-09-14  Diego Novillo  <dnovillo@google.com>
979  
980         * tree-vect-stmts.c (vect_transform_stmt): Remove unused
981         local variable ORIG_SCALAR_STMT.
982 Index: gcc/testsuite/gcc.target/arm/pr49641.c
983 ===================================================================
984 --- gcc/testsuite/gcc.target/arm/pr49641.c      (.../tags/gcc_4_6_2_release)    (wersja 0)
985 +++ gcc/testsuite/gcc.target/arm/pr49641.c      (.../branches/gcc-4_6-branch)   (wersja 182550)
986 @@ -0,0 +1,18 @@
987 +/* { dg-do compile } */
988 +/* { dg-options "-mthumb -O2" } */
989 +/* { dg-require-effective-target arm_thumb1_ok } */
990 +/* { dg-final { scan-assembler-not "stmia\[\\t \]*r3!\[^\\n]*r3" } } */
991 +typedef struct {
992 +  void *t1, *t2, *t3;
993 +} z;
994 +extern volatile int y;
995 +static inline void foo(z *x) {
996 +  x->t1 = &x->t2;
997 +  x->t2 = ((void *)0);
998 +  x->t3 = &x->t1;
999 +}
1000 +extern z v;
1001 +void bar (void) {
1002 +   y = 0;
1003 +   foo(&v);
1004 +}
1005 Index: gcc/testsuite/gcc.target/i386/pr51393.c
1006 ===================================================================
1007 --- gcc/testsuite/gcc.target/i386/pr51393.c     (.../tags/gcc_4_6_2_release)    (wersja 0)
1008 +++ gcc/testsuite/gcc.target/i386/pr51393.c     (.../branches/gcc-4_6-branch)   (wersja 182550)
1009 @@ -0,0 +1,22 @@
1010 +/* { dg-do run } */
1011 +/* { dg-require-effective-target avx } */
1012 +/* { dg-require-effective-target lp64 } */
1013 +/* { dg-options "-O -mavx" } */
1014 +
1015 +#include "avx-check.h"
1016 +#include <immintrin.h>
1017 +
1018 +static void
1019 +__attribute__((noinline))
1020 +avx_test (void)
1021 +{
1022 +  long long in = 0x800000000ll;
1023 +  long long out;
1024 +
1025 +  __m256i zero = _mm256_setzero_si256();
1026 +  __m256i tmp  = _mm256_insert_epi64 (zero, in, 0);
1027 +  out = _mm256_extract_epi64(tmp, 0);
1028 +
1029 +  if (in != out)
1030 +    abort ();
1031 +}
1032 Index: gcc/testsuite/gcc.target/i386/pr48721.c
1033 ===================================================================
1034 --- gcc/testsuite/gcc.target/i386/pr48721.c     (.../tags/gcc_4_6_2_release)    (wersja 0)
1035 +++ gcc/testsuite/gcc.target/i386/pr48721.c     (.../branches/gcc-4_6-branch)   (wersja 182550)
1036 @@ -0,0 +1,51 @@
1037 +/* PR rtl-optimization/48721 */
1038 +/* { dg-do compile } */
1039 +/* { dg-options "-O -foptimize-sibling-calls -fsched2-use-superblocks -fschedule-insns2 -mtune=core2" } */
1040 +
1041 +extern unsigned char a[];
1042 +extern int b[], d[], e[], f[], g[], *h[], m[], *n[], o[];
1043 +extern char c[];
1044 +
1045 +struct S
1046 +{
1047 +  unsigned char s1;
1048 +  int s2, s3, s4, s5, s6, s7, s8;
1049 +};
1050 +
1051 +__attribute__((noinline, noclone)) int
1052 +foo (int x)
1053 +{
1054 +  return 0;
1055 +}
1056 +
1057 +int
1058 +bar (int x, struct S *y)
1059 +{
1060 +  int z;
1061 +  switch (x)
1062 +    {
1063 +    case 1:
1064 +    case 2:
1065 +      {
1066 +       int t2, t4, t5, t6, t7, t8;
1067 +       z = o[y->s8 * 6];
1068 +       t8 = *n[m[x] * 5];
1069 +       t4 = *h[y->s7];
1070 +       t7 = z;
1071 +       z = g[f[x] + y->s6];
1072 +       t6 = e[y->s5];
1073 +       t5 = d[c[x] + y->s3 * 17];
1074 +       if (z)
1075 +         t2 = b[z];
1076 +       if (a[z] != y->s1)
1077 +         return foo (x);
1078 +       y->s8 = t8;
1079 +       y->s4 = t4;
1080 +       y->s7 = t7;
1081 +       y->s6 = t6;
1082 +       y->s5 = t5;
1083 +       y->s2 = t2;
1084 +      }
1085 +    }
1086 +  return 0;
1087 +}
1088 Index: gcc/testsuite/gcc.target/i386/movdi-rex64.c
1089 ===================================================================
1090 --- gcc/testsuite/gcc.target/i386/movdi-rex64.c (.../tags/gcc_4_6_2_release)    (wersja 0)
1091 +++ gcc/testsuite/gcc.target/i386/movdi-rex64.c (.../branches/gcc-4_6-branch)   (wersja 182550)
1092 @@ -0,0 +1,11 @@
1093 +/* { dg-do compile { target *-*-linux* } } */
1094 +/* { dg-options "-fPIE" } */
1095 +
1096 +char *strcpy (char *dest, const char *src);
1097 +
1098 +static __thread char buffer[25];
1099 +const char * error_message (void)
1100 +{
1101 +    strcpy (buffer, "Unknown code ");
1102 +    return 0;
1103 +}
1104 Index: gcc/testsuite/gfortran.dg/whole_file_35.f90
1105 ===================================================================
1106 --- gcc/testsuite/gfortran.dg/whole_file_35.f90 (.../tags/gcc_4_6_2_release)    (wersja 0)
1107 +++ gcc/testsuite/gfortran.dg/whole_file_35.f90 (.../branches/gcc-4_6-branch)   (wersja 182550)
1108 @@ -0,0 +1,28 @@
1109 +! { dg-do compile }
1110 +!
1111 +! PR fortran/50408
1112 +!
1113 +! Contributed by Vittorio Zecca
1114 +!
1115 +       module m
1116 +         type int
1117 +           integer  :: val
1118 +         end type int
1119 +         interface ichar
1120 +           module procedure uch
1121 +        end interface
1122 +       contains
1123 +         function uch (c)
1124 +           character (len=1), intent (in) :: c
1125 +           type (int)                     :: uch
1126 +           intrinsic ichar
1127 +           uch%val = 127 - ichar (c)
1128 +         end function uch 
1129 +       end module m
1130 +
1131 +      program p
1132 +        use m
1133 +        print *,ichar('~') ! must print "1"
1134 +      end program p
1135 +
1136 +! { dg-final { cleanup-modules "m" } }
1137 Index: gcc/testsuite/gfortran.dg/move_alloc_8.f90
1138 ===================================================================
1139 --- gcc/testsuite/gfortran.dg/move_alloc_8.f90  (.../tags/gcc_4_6_2_release)    (wersja 0)
1140 +++ gcc/testsuite/gfortran.dg/move_alloc_8.f90  (.../branches/gcc-4_6-branch)   (wersja 182550)
1141 @@ -0,0 +1,106 @@
1142 +! { dg-do compile }
1143 +!
1144 +! PR fortran/50684
1145 +!
1146 +! Module "bug" contributed by Martin Steghöfer.
1147 +!
1148 +
1149 +MODULE BUG
1150 +  TYPE MY_TYPE
1151 +    INTEGER, ALLOCATABLE :: VALUE
1152 +  END TYPE
1153 +CONTAINS
1154 +  SUBROUTINE POINTER_INTENT_IN_BUG_WORKING(POINTER_INTENT_IN_VARIABLE)
1155 +    TYPE(MY_TYPE), POINTER, INTENT(IN) :: POINTER_INTENT_IN_VARIABLE
1156 +    TYPE(MY_TYPE), POINTER :: POINTER_VARIABLE_LOCAL
1157 +    INTEGER, ALLOCATABLE :: LOCAL_VALUE
1158 +    
1159 +    POINTER_VARIABLE_LOCAL=>POINTER_INTENT_IN_VARIABLE
1160 +    CALL MOVE_ALLOC(POINTER_VARIABLE_LOCAL%VALUE, LOCAL_VALUE)
1161 +    
1162 +    RETURN
1163 +  END SUBROUTINE POINTER_INTENT_IN_BUG_WORKING
1164 +  
1165 +  SUBROUTINE POINTER_INTENT_IN_BUG_FAILING(POINTER_INTENT_IN_VARIABLE)
1166 +    TYPE(MY_TYPE), POINTER, INTENT(IN) :: POINTER_INTENT_IN_VARIABLE
1167 +    INTEGER, ALLOCATABLE :: LOCAL_VALUE
1168 +    
1169 +    CALL MOVE_ALLOC(POINTER_INTENT_IN_VARIABLE%VALUE, LOCAL_VALUE)
1170 +    
1171 +    RETURN
1172 +  END SUBROUTINE POINTER_INTENT_IN_BUG_FAILING
1173 +end module bug
1174 +
1175 +subroutine test1()
1176 +  TYPE MY_TYPE
1177 +    INTEGER, ALLOCATABLE :: VALUE
1178 +  END TYPE
1179 +CONTAINS
1180 +  SUBROUTINE sub (dt)
1181 +    type(MY_TYPE), intent(in) :: dt
1182 +    INTEGER, ALLOCATABLE :: lv
1183 +    call move_alloc(dt%VALUE, lv) ! { dg-error "cannot be INTENT.IN." }
1184 +  END SUBROUTINE
1185 +end subroutine test1
1186 +
1187 +subroutine test2 (x, px)
1188 +  implicit none
1189 +  type t
1190 +    integer, allocatable :: a
1191 +  end type t
1192 +
1193 +  type t2
1194 +    type(t), pointer :: ptr
1195 +    integer, allocatable :: a
1196 +  end type t2
1197 +
1198 +  type(t2), intent(in) :: x
1199 +  type(t2), pointer, intent(in) :: px
1200 +
1201 +  integer, allocatable :: a
1202 +  type(t2), pointer :: ta
1203 +
1204 +  call move_alloc (px, ta)      ! { dg-error "cannot be INTENT.IN." }
1205 +  call move_alloc (x%a, a)      ! { dg-error "cannot be INTENT.IN." }
1206 +  call move_alloc (x%ptr%a, a)  ! OK (3)
1207 +  call move_alloc (px%a, a)     ! OK (4)
1208 +  call move_alloc (px%ptr%a, a) ! OK (5)
1209 +end subroutine test2
1210 +
1211 +subroutine test3 (x, px)
1212 +  implicit none
1213 +  type t
1214 +    integer, allocatable :: a
1215 +  end type t
1216 +
1217 +  type t2
1218 +    class(t), pointer :: ptr
1219 +    integer, allocatable :: a
1220 +  end type t2
1221 +
1222 +  type(t2), intent(in) :: x
1223 +  class(t2), pointer, intent(in) :: px
1224 +
1225 +  integer, allocatable :: a
1226 +  class(t2), pointer :: ta
1227 +
1228 +  call move_alloc (px, ta)      ! { dg-error "cannot be INTENT.IN." }
1229 +  call move_alloc (x%a, a)      ! { dg-error "cannot be INTENT.IN." }
1230 +  call move_alloc (x%ptr%a, a)  ! OK (6)
1231 +  call move_alloc (px%a, a)     ! OK (7)
1232 +  call move_alloc (px%ptr%a, a) ! OK (8)
1233 +end subroutine test3
1234 +
1235 +subroutine test4()
1236 +  TYPE MY_TYPE
1237 +    INTEGER, ALLOCATABLE :: VALUE
1238 +  END TYPE
1239 +CONTAINS
1240 +  SUBROUTINE sub (dt)
1241 +    CLASS(MY_TYPE), intent(in) :: dt
1242 +    INTEGER, ALLOCATABLE :: lv
1243 +    call move_alloc(dt%VALUE, lv) ! { dg-error "cannot be INTENT.IN." }
1244 +  END SUBROUTINE
1245 +end subroutine test4
1246 +
1247 +! { dg-final { cleanup-modules "bug" } }
1248 Index: gcc/testsuite/gfortran.dg/realloc_on_assign_8.f90
1249 ===================================================================
1250 --- gcc/testsuite/gfortran.dg/realloc_on_assign_8.f90   (.../tags/gcc_4_6_2_release)    (wersja 0)
1251 +++ gcc/testsuite/gfortran.dg/realloc_on_assign_8.f90   (.../branches/gcc-4_6-branch)   (wersja 182550)
1252 @@ -0,0 +1,17 @@
1253 +! { dg-do compile }
1254 +!
1255 +! PR fortran/51448
1256 +!
1257 +! Contribued by François Willot
1258 +!
1259 +  PROGRAM MAIN
1260 +  IMPLICIT NONE
1261 +  TYPE mytype
1262 +    REAL b(2)
1263 +  END TYPE mytype
1264 +  TYPE(mytype) a
1265 +  DOUBLE PRECISION, ALLOCATABLE :: x(:)
1266 +  ALLOCATE(x(2))
1267 +  a%b=0.0E0
1268 +  x=a%b
1269 +  END
1270 Index: gcc/testsuite/gfortran.dg/default_initialization_5.f90
1271 ===================================================================
1272 --- gcc/testsuite/gfortran.dg/default_initialization_5.f90      (.../tags/gcc_4_6_2_release)    (wersja 0)
1273 +++ gcc/testsuite/gfortran.dg/default_initialization_5.f90      (.../branches/gcc-4_6-branch)   (wersja 182550)
1274 @@ -0,0 +1,66 @@
1275 +! { dg-do  run }
1276 +! { dg-options "-fdump-tree-original" }
1277 +!
1278 +! PR fortran/51435
1279 +!
1280 +! Contributed by darmar.xxl@gmail.com
1281 +!
1282 +module arr_m
1283 +    type arr_t
1284 +        real(8), dimension(:), allocatable :: rsk
1285 +    end type
1286 +    type arr_t2
1287 +        integer :: a = 77
1288 +    end type
1289 +end module arr_m
1290 +!*********************
1291 +module list_m
1292 +    use arr_m
1293 +    implicit none
1294 +
1295 +    type(arr_t2), target :: tgt
1296 +
1297 +    type my_list
1298 +        type(arr_t), pointer :: head => null()
1299 +    end type my_list
1300 +    type my_list2
1301 +        type(arr_t2), pointer :: head => tgt
1302 +    end type my_list2
1303 +end module list_m
1304 +!***********************
1305 +module worker_mod
1306 +    use list_m
1307 +    implicit none
1308 +
1309 +    type data_all_t
1310 +        type(my_list) :: my_data
1311 +    end type data_all_t
1312 +    type data_all_t2
1313 +        type(my_list2) :: my_data
1314 +    end type data_all_t2
1315 +contains
1316 +    subroutine do_job()
1317 +        type(data_all_t) :: dum
1318 +        type(data_all_t2) :: dum2
1319 +
1320 +        if (associated(dum%my_data%head)) then
1321 +          call abort()
1322 +        else
1323 +            print *, 'OK: do_job my_data%head is NOT associated'
1324 +        end if
1325 +
1326 +        if (dum2%my_data%head%a /= 77) &
1327 +          call abort()
1328 +    end subroutine
1329 +end module
1330 +!***************
1331 +program hello
1332 +    use worker_mod
1333 +    implicit none
1334 +    call do_job()
1335 +end program
1336 +
1337 +! { dg-final { scan-tree-dump-times "my_data.head = 0B" 1 "original" } }
1338 +! { dg-final { scan-tree-dump-times "my_data.head = &tgt" 1 "original" } }
1339 +! { dg-final { cleanup-tree-dump "original" } }
1340 +! { dg-final { cleanup-modules "arr_m list_m worker_mod" } }
1341 Index: gcc/testsuite/gfortran.dg/pr50875.f90
1342 ===================================================================
1343 --- gcc/testsuite/gfortran.dg/pr50875.f90       (.../tags/gcc_4_6_2_release)    (wersja 0)
1344 +++ gcc/testsuite/gfortran.dg/pr50875.f90       (.../branches/gcc-4_6-branch)   (wersja 182550)
1345 @@ -0,0 +1,39 @@
1346 +! { dg-do compile { target { i?86-*-* x86_64-*-* } } }
1347 +! { dg-options "-O3 -mavx" }
1348 +!
1349 +! PR fortran/50875.f90
1350 +
1351 +module test
1352 +
1353 +  implicit none
1354 +
1355 +  integer, parameter :: dp=kind(1.d0)
1356 +
1357 +  integer :: P = 2
1358 +
1359 +  real(kind=dp), allocatable :: real_array_A(:),real_array_B(:,:)
1360 +  complex(kind=dp), allocatable :: cmplx_array_A(:) 
1361 +
1362 +contains
1363 +
1364 +  subroutine routine_A
1365 +
1366 +    integer :: i
1367 +
1368 +    allocate(cmplx_array_A(P),real_array_B(P,P),real_array_A(P))
1369 +
1370 +    real_array_A = 1
1371 +    real_array_B = 1
1372 +
1373 +    do i = 1, p
1374 +       cmplx_array_A = cmplx(real_array_B(:,i),0.0_dp,dp)
1375 +       cmplx_array_A = cmplx_array_A * exp(cmplx(0.0_dp,real_array_A+1))
1376 +    end do
1377 +
1378 +    deallocate(cmplx_array_A,real_array_B,real_array_A)
1379 +
1380 +  end subroutine routine_A
1381 +
1382 +end module test
1383 +
1384 +! { dg-final { cleanup-modules "test" } }
1385 Index: gcc/testsuite/gfortran.dg/warn_function_without_result_2.f90
1386 ===================================================================
1387 --- gcc/testsuite/gfortran.dg/warn_function_without_result_2.f90        (.../tags/gcc_4_6_2_release)    (wersja 0)
1388 +++ gcc/testsuite/gfortran.dg/warn_function_without_result_2.f90        (.../branches/gcc-4_6-branch)   (wersja 182550)
1389 @@ -0,0 +1,19 @@
1390 +! { dg-do compile }
1391 +! { dg-options "-Wall" }
1392 +!
1393 +! PR fortran/50923
1394 +!
1395 +module m
1396 +contains
1397 +  integer pure function f() ! { dg-warning "Return value of function 'f' at .1. not set" }
1398 +  end function f
1399 +  integer pure function g() result(h) ! { dg-warning "Return value 'h' of function 'g' declared at .1. not set" }
1400 +  end function g
1401 +  integer pure function i()
1402 +    i = 7
1403 +  end function i
1404 +  integer pure function j() result(k)
1405 +    k = 8
1406 +  end function j
1407 +end module m
1408 +! { dg-final { cleanup-modules "mod" } }
1409 Index: gcc/testsuite/gfortran.dg/implicit_pure_1.f90
1410 ===================================================================
1411 --- gcc/testsuite/gfortran.dg/implicit_pure_1.f90       (.../tags/gcc_4_6_2_release)    (wersja 0)
1412 +++ gcc/testsuite/gfortran.dg/implicit_pure_1.f90       (.../branches/gcc-4_6-branch)   (wersja 182550)
1413 @@ -0,0 +1,53 @@
1414 +! { dg-do run }
1415 +!
1416 +! PR fortran/51218
1417 +!
1418 +! Contributed by Harald Anlauf
1419 +!
1420 +
1421 +module a
1422 +  implicit none
1423 +  integer :: neval = 0
1424 +contains
1425 +  subroutine inc_eval
1426 +    neval = neval + 1
1427 +  end subroutine inc_eval
1428 +end module a
1429 +
1430 +module b
1431 +  use a
1432 +  implicit none
1433 +contains
1434 +  function f(x) ! Should be implicit pure
1435 +    real :: f
1436 +    real, intent(in) :: x
1437 +    f = x
1438 +  end function f
1439 +
1440 +  function g(x) ! Should NOT be implicit pure
1441 +    real :: g
1442 +    real, intent(in) :: x
1443 +    call inc_eval
1444 +    g = x
1445 +  end function g
1446 +end module b
1447 +
1448 +program gfcbug114a
1449 +  use a
1450 +  use b
1451 +  implicit none
1452 +  real :: x = 1, y = 1, t, u, v, w
1453 +  if (neval /= 0) call abort ()
1454 +  t = f(x)*f(y)
1455 +  if (neval /= 0) call abort ()
1456 +  u = f(x)*f(y) + f(x)*f(y)
1457 +  if (neval /= 0) call abort ()
1458 +  v = g(x)*g(y)
1459 +  if (neval /= 2) call abort ()
1460 +  w = g(x)*g(y) + g(x)*g(y)
1461 +  if (neval /= 6) call abort ()
1462 +  if (t /= 1.0 .or. u /= 2.0 .or. v /= 1.0 .or. w /= 2) call abort ()
1463 +end program gfcbug114a
1464 +
1465 +! { dg-final { scan-module "b" "IMPLICIT_PURE" } }
1466 +! { dg-final { cleanup-modules "b" } }
1467 Index: gcc/testsuite/gcc.c-torture/execute/pr51466.c
1468 ===================================================================
1469 --- gcc/testsuite/gcc.c-torture/execute/pr51466.c       (.../tags/gcc_4_6_2_release)    (wersja 0)
1470 +++ gcc/testsuite/gcc.c-torture/execute/pr51466.c       (.../branches/gcc-4_6-branch)   (wersja 182550)
1471 @@ -0,0 +1,43 @@
1472 +/* PR tree-optimization/51466 */
1473 +
1474 +extern void abort (void);
1475 +
1476 +__attribute__((noinline, noclone)) int
1477 +foo (int i)
1478 +{
1479 +  volatile int v[4];
1480 +  int *p;
1481 +  v[i] = 6;
1482 +  p = (int *) &v[i];
1483 +  return *p;
1484 +}
1485 +
1486 +__attribute__((noinline, noclone)) int
1487 +bar (int i)
1488 +{
1489 +  volatile int v[4];
1490 +  int *p;
1491 +  v[i] = 6;
1492 +  p = (int *) &v[i];
1493 +  *p = 8;
1494 +  return v[i];
1495 +}
1496 +
1497 +__attribute__((noinline, noclone)) int
1498 +baz (int i)
1499 +{
1500 +  volatile int v[4];
1501 +  int *p;
1502 +  v[i] = 6;
1503 +  p = (int *) &v[0];
1504 +  *p = 8;
1505 +  return v[i];
1506 +}
1507 +
1508 +int
1509 +main ()
1510 +{
1511 +  if (foo (3) != 6 || bar (2) != 8 || baz (0) != 8 || baz (1) != 6)
1512 +    abort ();
1513 +  return 0;
1514 +}
1515 Index: gcc/testsuite/gcc.c-torture/execute/20111212-1.c
1516 ===================================================================
1517 --- gcc/testsuite/gcc.c-torture/execute/20111212-1.c    (.../tags/gcc_4_6_2_release)    (wersja 0)
1518 +++ gcc/testsuite/gcc.c-torture/execute/20111212-1.c    (.../branches/gcc-4_6-branch)   (wersja 182550)
1519 @@ -0,0 +1,34 @@
1520 +/* PR tree-optimization/50569 */
1521 +/* Reported by Paul Koning <pkoning@gcc.gnu.org> */
1522 +/* Reduced testcase by Mikael Pettersson <mikpe@it.uu.se> */
1523 +
1524 +struct event {
1525 +    struct {
1526 +       unsigned int sec;
1527 +    } sent __attribute__((packed));
1528 +};
1529 +
1530 +void __attribute__((noinline,noclone)) frob_entry(char *buf)
1531 +{
1532 +    struct event event;
1533 +
1534 +    __builtin_memcpy(&event, buf, sizeof(event));
1535 +    if (event.sent.sec < 64) {
1536 +       event.sent.sec = -1U;
1537 +       __builtin_memcpy(buf, &event, sizeof(event));
1538 +    }
1539 +}
1540 +
1541 +int main(void)
1542 +{
1543 +    union {
1544 +       char buf[1 + sizeof(struct event)];
1545 +       int align;
1546 +    } u;
1547 +
1548 +    __builtin_memset(&u, 0, sizeof u);
1549 +
1550 +    frob_entry(&u.buf[1]);
1551 +
1552 +    return 0;
1553 +}
1554 Index: gcc/testsuite/gcc.c-torture/execute/pr51323.c
1555 ===================================================================
1556 --- gcc/testsuite/gcc.c-torture/execute/pr51323.c       (.../tags/gcc_4_6_2_release)    (wersja 0)
1557 +++ gcc/testsuite/gcc.c-torture/execute/pr51323.c       (.../branches/gcc-4_6-branch)   (wersja 182550)
1558 @@ -0,0 +1,35 @@
1559 +/* PR middle-end/51323 */
1560 +
1561 +extern void abort (void);
1562 +struct S { int a, b, c; };
1563 +int v;
1564 +
1565 +__attribute__((noinline, noclone)) void
1566 +foo (int x, int y, int z)
1567 +{
1568 +  if (x != v || y != 0 || z != 9)
1569 +    abort ();
1570 +}
1571 +
1572 +static inline int
1573 +baz (const struct S *p)
1574 +{
1575 +  return p->b;
1576 +}
1577 +
1578 +__attribute__((noinline, noclone)) void
1579 +bar (int x, struct S y)
1580 +{
1581 +  foo (baz (&y), 0, x);
1582 +}
1583 +
1584 +int
1585 +main ()
1586 +{
1587 +  struct S s;
1588 +  v = 3; s.a = v - 1; s.b = v; s.c = v + 1;
1589 +  bar (9, s);
1590 +  v = 17; s.a = v - 1; s.b = v; s.c = v + 1;
1591 +  bar (9, s);
1592 +  return 0;
1593 +}
1594 Index: gcc/testsuite/gcc.c-torture/execute/20111208-1.c
1595 ===================================================================
1596 --- gcc/testsuite/gcc.c-torture/execute/20111208-1.c    (.../tags/gcc_4_6_2_release)    (wersja 0)
1597 +++ gcc/testsuite/gcc.c-torture/execute/20111208-1.c    (.../branches/gcc-4_6-branch)   (wersja 182550)
1598 @@ -0,0 +1,94 @@
1599 +/* PR tree-optimization/51315 */
1600 +/* Reported by Jurij Smakov <jurij@wooyd.org> */
1601 +
1602 +typedef unsigned int size_t;
1603 +
1604 +extern void *memcpy (void *__restrict __dest,
1605 +       __const void *__restrict __src, size_t __n)
1606 +     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
1607 +
1608 +extern size_t strlen (__const char *__s)
1609 +     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
1610 +
1611 +typedef short int int16_t;
1612 +typedef int int32_t;
1613 +
1614 +extern void abort (void);
1615 +
1616 +int a;
1617 +
1618 +static void __attribute__ ((noinline,noclone))
1619 +do_something (int item)
1620 +{
1621 +  a = item;
1622 +}
1623 +
1624 +int
1625 +pack_unpack (char *s, char *p)
1626 +{
1627 +  char *send, *pend;
1628 +  char type;
1629 +  int integer_size;
1630 +
1631 +  send = s + strlen (s);
1632 +  pend = p + strlen (p);
1633 +
1634 +  while (p < pend)
1635 +    {
1636 +      type = *p++;
1637 +
1638 +      switch (type)
1639 + {
1640 + case 's':
1641 +   integer_size = 2;
1642 +   goto unpack_integer;
1643 +
1644 + case 'l':
1645 +   integer_size = 4;
1646 +   goto unpack_integer;
1647 +
1648 + unpack_integer:
1649 +   switch (integer_size)
1650 +     {
1651 +     case 2:
1652 +       {
1653 +  union
1654 +  {
1655 +    int16_t i;
1656 +    char a[sizeof (int16_t)];
1657 +  }
1658 +  v;
1659 +  memcpy (v.a, s, sizeof (int16_t));
1660 +  s += sizeof (int16_t);
1661 +  do_something (v.i);
1662 +       }
1663 +       break;
1664 +
1665 +     case 4:
1666 +       {
1667 +  union
1668 +  {
1669 +    int32_t i;
1670 +    char a[sizeof (int32_t)];
1671 +  }
1672 +  v;
1673 +  memcpy (v.a, s, sizeof (int32_t));
1674 +  s += sizeof (int32_t);
1675 +  do_something (v.i);
1676 +       }
1677 +       break;
1678 +     }
1679 +   break;
1680 + }
1681 +    }
1682 +  return (int) *s;
1683 +}
1684 +
1685 +int
1686 +main (void)
1687 +{
1688 +  int n = pack_unpack ("\200\001\377\376\035\300", "sl");
1689 +  if (n != 0)
1690 +    abort ();
1691 +  return 0;
1692 +}
1693 Index: gcc/testsuite/gcc.c-torture/compile/pr51077.c
1694 ===================================================================
1695 --- gcc/testsuite/gcc.c-torture/compile/pr51077.c       (.../tags/gcc_4_6_2_release)    (wersja 0)
1696 +++ gcc/testsuite/gcc.c-torture/compile/pr51077.c       (.../branches/gcc-4_6-branch)   (wersja 182550)
1697 @@ -0,0 +1,15 @@
1698 +/* PR middle-end/51077 */
1699 +
1700 +struct S { unsigned char s, t[256]; };
1701 +
1702 +void
1703 +foo (const struct S *x, struct S *y, int z)
1704 +{
1705 +  int i;
1706 +  for (i = 0; i < 8; i++)
1707 +    {
1708 +      const struct S *a = &x[i];
1709 +      __builtin___memcpy_chk (y->t, a->t, z, __builtin_object_size (y->t, 0));
1710 +      y = (struct S *) &y->t[z];
1711 +    }
1712 +}
1713 Index: gcc/testsuite/gcc.c-torture/compile/20110913-1.c
1714 ===================================================================
1715 --- gcc/testsuite/gcc.c-torture/compile/20110913-1.c    (.../tags/gcc_4_6_2_release)    (wersja 0)
1716 +++ gcc/testsuite/gcc.c-torture/compile/20110913-1.c    (.../branches/gcc-4_6-branch)   (wersja 182550)
1717 @@ -0,0 +1,26 @@
1718 +struct ieee754_double {
1719 +  double d;
1720 +};
1721 +extern const float __exp_deltatable[178];
1722 +float __ieee754_expf (float x)
1723 +{
1724 +  static const float himark = 88.72283935546875;
1725 +  static const float lomark = -103.972084045410;
1726 +  if (__builtin_isless(x, himark) && __builtin_isgreater(x, lomark))
1727 +    {
1728 +      int tval;
1729 +      double x22, t, result, dx;
1730 +      float delta;
1731 +      struct ieee754_double ex2_u;
1732 +      dx -= t;
1733 +      tval = (int) (t * 512.0);
1734 +      if (t >= 0)
1735 +       delta = - __exp_deltatable[tval];
1736 +      else
1737 +       delta = __exp_deltatable[-tval];
1738 +      x22 = (0.5000000496709180453 * dx + 1.0000001192102037084) * dx + delta;
1739 +      result = x22 * ex2_u.d + ex2_u.d;
1740 +      return (float) result;
1741 +    }
1742 +  return x;
1743 +}
1744 Index: gcc/testsuite/gnat.dg/frame_overflow.adb
1745 ===================================================================
1746 --- gcc/testsuite/gnat.dg/frame_overflow.adb    (.../tags/gcc_4_6_2_release)    (wersja 182550)
1747 +++ gcc/testsuite/gnat.dg/frame_overflow.adb    (.../branches/gcc-4_6-branch)   (wersja 182550)
1748 @@ -1,27 +1,20 @@
1749  -- { dg-do compile }
1750  
1751 -with System;
1752 +package body Frame_Overflow is
1753  
1754 -procedure frame_overflow is
1755 -
1756 -   type Bitpos_Range_T is range 1..2**(System.Word_Size-1)-1;
1757 -   type Bitmap_Array_T is array (Bitpos_Range_T) of Boolean;
1758 -
1759 -   type Bitmap_T is record
1760 -      Bits : Bitmap_Array_T := (others => False);
1761 -   end record;
1762 -
1763 -   function
1764 +   function -- { dg-error "too large" }
1765       Set_In (Bitmap : Bitmap_T; Bitpos : Bitpos_Range_T)  return Bitmap_T
1766     is
1767 -      Result: Bitmap_T := Bitmap; -- { dg-error "Storage_Error" }
1768 +      Result: Bitmap_T := Bitmap;
1769     begin
1770        Result.Bits (Bitpos) := True;
1771        return Result;
1772     end;
1773  
1774 -   function Negate (Bitmap : Bitmap_T) return Bitmap_T is
1775 -      Result: Bitmap_T; -- { dg-error "Storage_Error" }
1776 +   function -- { dg-error "too large" }
1777 +     Negate (Bitmap : Bitmap_T) return Bitmap_T
1778 +   is
1779 +      Result: Bitmap_T;
1780     begin
1781        for E in Bitpos_Range_T loop
1782          Result.Bits (E) := not Bitmap.Bits (E);
1783 @@ -29,6 +22,4 @@
1784        return Result;
1785    end;
1786  
1787 -begin
1788 -   null;
1789 -end;
1790 +end Frame_Overflow;
1791 Index: gcc/testsuite/gnat.dg/frame_overflow.ads
1792 ===================================================================
1793 --- gcc/testsuite/gnat.dg/frame_overflow.ads    (.../tags/gcc_4_6_2_release)    (wersja 0)
1794 +++ gcc/testsuite/gnat.dg/frame_overflow.ads    (.../branches/gcc-4_6-branch)   (wersja 182550)
1795 @@ -0,0 +1,17 @@
1796 +with System;
1797 +
1798 +package Frame_Overflow is
1799 +
1800 +   type Bitpos_Range_T is range 1..2**(System.Word_Size-1)-1;
1801 +   type Bitmap_Array_T is array (Bitpos_Range_T) of Boolean;
1802 +
1803 +   type Bitmap_T is record
1804 +      Bits : Bitmap_Array_T := (others => False);
1805 +   end record;
1806 +
1807 +   function
1808 +     Set_In (Bitmap : Bitmap_T; Bitpos : Bitpos_Range_T)  return Bitmap_T;
1809 +
1810 +   function Negate (Bitmap : Bitmap_T) return Bitmap_T;
1811 +
1812 +end Frame_Overflow;
1813 Index: gcc/testsuite/gnat.dg/specs/addr1.ads
1814 ===================================================================
1815 --- gcc/testsuite/gnat.dg/specs/addr1.ads       (.../tags/gcc_4_6_2_release)    (wersja 182550)
1816 +++ gcc/testsuite/gnat.dg/specs/addr1.ads       (.../branches/gcc-4_6-branch)   (wersja 182550)
1817 @@ -15,7 +15,7 @@
1818    end record;
1819    for Rec2'Size use 64;
1820  
1821 -  A: Arr (1 .. 12);
1822 +  A: Arr (1 .. 4);
1823  
1824    Obj1: Rec1;
1825    for Obj1'Address use A'Address; -- { dg-bogus "alignment" }
1826 Index: gcc/testsuite/gcc.dg/pr45819.c
1827 ===================================================================
1828 --- gcc/testsuite/gcc.dg/pr45819.c      (.../tags/gcc_4_6_2_release)    (wersja 182550)
1829 +++ gcc/testsuite/gcc.dg/pr45819.c      (.../branches/gcc-4_6-branch)   (wersja 182550)
1830 @@ -1,5 +1,5 @@
1831  /* { dg-do compile } */
1832 -/* { dg-options "-O2 -fdump-tree-optimized" } */
1833 +/* { dg-options "-O2 -fdump-tree-optimized -w" } */
1834  
1835  struct ehci_regs {
1836      char x;
1837 Index: gcc/testsuite/gcc.dg/gomp/pr51339.c
1838 ===================================================================
1839 --- gcc/testsuite/gcc.dg/gomp/pr51339.c (.../tags/gcc_4_6_2_release)    (wersja 0)
1840 +++ gcc/testsuite/gcc.dg/gomp/pr51339.c (.../branches/gcc-4_6-branch)   (wersja 182550)
1841 @@ -0,0 +1,15 @@
1842 +/* PR c/51339 */
1843 +/* { dg-do compile } */
1844 +/* { dg-options "-fopenmp" } */
1845 +
1846 +char g[] = "g";
1847 +
1848 +void
1849 +foo (void)
1850 +{
1851 +#pragma omp parallel sections firstprivate (g) lastprivate (g)
1852 +  {
1853 +  #pragma omp section
1854 +    g[0] = 'h';
1855 +  }
1856 +}
1857 Index: gcc/testsuite/gcc.dg/cpp/assert4.c
1858 ===================================================================
1859 --- gcc/testsuite/gcc.dg/cpp/assert4.c  (.../tags/gcc_4_6_2_release)    (wersja 182550)
1860 +++ gcc/testsuite/gcc.dg/cpp/assert4.c  (.../branches/gcc-4_6-branch)   (wersja 182550)
1861 @@ -1,4 +1,4 @@
1862 -/* Copyright (C) 2003, 2006, 2008 Free Software Foundation, Inc.
1863 +/* Copyright (C) 2003, 2006, 2008, 2009, 2011 Free Software Foundation, Inc.
1864     Test builtin preprocessor assertions.
1865     By Kaveh Ghazi <ghazi@caip.rutgers.edu>.  */
1866  
1867 @@ -7,7 +7,7 @@
1868  
1869  /* Check for #system assertions.  */
1870  
1871 -#if defined __gnu_linux__
1872 +#if defined __linux__
1873  # if !#system(linux) || !#system(unix) || !#system(posix)
1874  #  error
1875  # endif
1876 Index: gcc/testsuite/gcc.dg/pr50078.c
1877 ===================================================================
1878 --- gcc/testsuite/gcc.dg/pr50078.c      (.../tags/gcc_4_6_2_release)    (wersja 0)
1879 +++ gcc/testsuite/gcc.dg/pr50078.c      (.../branches/gcc-4_6-branch)   (wersja 182550)
1880 @@ -0,0 +1,14 @@
1881 +/* PR tree-optimization/50078 */
1882 +/* { dg-do compile } */
1883 +/* { dg-options "-O2" } */
1884 +
1885 +unsigned nonvolvar[2];
1886 +
1887 +void
1888 +test (int arg)
1889 +{
1890 +  unsigned v = *(volatile unsigned *) (&nonvolvar[arg]);
1891 +  *(volatile unsigned *) (&nonvolvar[arg]) = v;
1892 +}
1893 +
1894 +/* { dg-final { scan-assembler-times "movl\[^\n\r\]*nonvolvar" 2 { target { { i?86-*-* x86_64-*-* } && nonpic } } } } */
1895 Index: gcc/testsuite/gcc.dg/debug/dwarf2/pr51410.c
1896 ===================================================================
1897 --- gcc/testsuite/gcc.dg/debug/dwarf2/pr51410.c (.../tags/gcc_4_6_2_release)    (wersja 0)
1898 +++ gcc/testsuite/gcc.dg/debug/dwarf2/pr51410.c (.../branches/gcc-4_6-branch)   (wersja 182550)
1899 @@ -0,0 +1,13 @@
1900 +/* PR debug/51410 */
1901 +/* { dg-do compile } */
1902 +/* { dg-options "-O0 -gdwarf-2 -dA -fno-merge-debug-strings" } */
1903 +
1904 +int x;
1905 +
1906 +int
1907 +foo (void)
1908 +{
1909 +  return x;
1910 +}
1911 +
1912 +/* { dg-final { scan-assembler-times "\\(DIE\[^\\r\\n\]*DW_TAG_variable\\)" 1 } } */
1913 Index: gcc/testsuite/gcc.dg/pr51408.c
1914 ===================================================================
1915 --- gcc/testsuite/gcc.dg/pr51408.c      (.../tags/gcc_4_6_2_release)    (wersja 0)
1916 +++ gcc/testsuite/gcc.dg/pr51408.c      (.../branches/gcc-4_6-branch)   (wersja 182550)
1917 @@ -0,0 +1,22 @@
1918 +/* This testcase used to fail because of a bug in 
1919 +   arm.md:*minmax_arithsi.  */
1920 +
1921 +/* { dg-do run } */
1922 +/* { dg-options "-O1" } */
1923 +
1924 +extern void abort (void);
1925 +
1926 +int __attribute__((noinline))
1927 +foo (int a, int b)
1928 +{
1929 +  int max = (b > 0) ? b : 0;
1930 +  return max - a;
1931 +}
1932 +
1933 +int
1934 +main (void)
1935 +{
1936 +  if (foo (3, -1) != -3)
1937 +    abort ();
1938 +  return 0;
1939 +}
1940 Index: gcc/testsuite/gcc.dg/tree-ssa/pr51583.c
1941 ===================================================================
1942 --- gcc/testsuite/gcc.dg/tree-ssa/pr51583.c     (.../tags/gcc_4_6_2_release)    (wersja 0)
1943 +++ gcc/testsuite/gcc.dg/tree-ssa/pr51583.c     (.../branches/gcc-4_6-branch)   (wersja 182550)
1944 @@ -0,0 +1,34 @@
1945 +/* { dg-do compile } */
1946 +/* { dg-options "-O1" } */
1947 +
1948 +typedef __complex__ double Value;
1949 +
1950 +union U
1951 +{
1952 +  Value v;
1953 +  char c[sizeof(Value)];
1954 +};
1955 +
1956 +struct S
1957 +{
1958 +  union U u;
1959 +  int i,j;
1960 +};
1961 +
1962 +Value gv;
1963 +int gi, gj;
1964 +
1965 +Value foo (void)
1966 +{
1967 +  struct S s,t;
1968 +
1969 +  t.i = gi;
1970 +  t.j = gj;
1971 +  t.u.v = gv;
1972 +  t.u.c[0] = 0;
1973 +
1974 +  s = t;
1975 +  __imag__ s.u.v += s.i;
1976 +
1977 +  return s.u.v;
1978 +}
1979 Index: gcc/testsuite/gcc.dg/delay-slot-2.c
1980 ===================================================================
1981 --- gcc/testsuite/gcc.dg/delay-slot-2.c (.../tags/gcc_4_6_2_release)    (wersja 0)
1982 +++ gcc/testsuite/gcc.dg/delay-slot-2.c (.../branches/gcc-4_6-branch)   (wersja 182550)
1983 @@ -0,0 +1,116 @@
1984 +/* PR rtl-optimization/51187 */
1985 +/* Reported by Jurij Smakov <jurij@wooyd.org> */
1986 +
1987 +/* { dg-do compile } */
1988 +/* { dg-options "-g -O2" } */
1989 +
1990 +extern int printf (__const char *__restrict __format, ...);
1991 +extern void print_c_condition (const char *);
1992 +
1993 +enum decision_type
1994 +{
1995 +  DT_num_insns,
1996 +  DT_mode, DT_code, DT_veclen,
1997 +  DT_elt_zero_int, DT_elt_one_int, DT_elt_zero_wide, DT_elt_zero_wide_safe,
1998 +  DT_const_int,
1999 +  DT_veclen_ge, DT_dup, DT_pred, DT_c_test,
2000 +  DT_accept_op, DT_accept_insn
2001 +};
2002 +
2003 +struct decision_test
2004 +{
2005 +  struct decision_test *next;
2006 +  enum decision_type type;
2007 +
2008 +  union
2009 +  {
2010 +    int num_insns;
2011 +
2012 +    struct
2013 +    {
2014 +      const char *name;
2015 +    } pred;
2016 +
2017 +    const char *c_test;
2018 +    int veclen;
2019 +    int dup;
2020 +    long intval;
2021 +    int opno;
2022 +
2023 +    struct {
2024 +      int code_number;
2025 +      int lineno;
2026 +      int num_clobbers_to_add;
2027 +    } insn;
2028 +  } u;
2029 +};
2030 +
2031 +enum routine_type {
2032 +  RECOG, SPLIT, PEEPHOLE2
2033 +};
2034 +
2035 +void
2036 +write_cond (struct decision_test *p, int depth,
2037 +     enum routine_type subroutine_type)
2038 +{
2039 +  switch (p->type)
2040 +    {
2041 +    case DT_num_insns:
2042 +      printf ("peep2_current_count >= %d", p->u.num_insns);
2043 +      break;
2044 +
2045 +    case DT_code:
2046 +      printf ("GET_CODE (x%d) == ", depth);
2047 +      break;
2048 +
2049 +    case DT_veclen:
2050 +      printf ("XVECLEN (x%d, 0) == %d", depth, p->u.veclen);
2051 +      break;
2052 +
2053 +    case DT_elt_zero_int:
2054 +      printf ("XINT (x%d, 0) == %d", depth, (int) p->u.intval);
2055 +      break;
2056 +
2057 +    case DT_elt_one_int:
2058 +      printf ("XINT (x%d, 1) == %d", depth, (int) p->u.intval);
2059 +      break;
2060 +
2061 +    case DT_elt_zero_wide:
2062 +    case DT_elt_zero_wide_safe:
2063 +      printf ("XWINT (x%d, 0) == ", depth);
2064 +      print_host_wide_int (p->u.intval);
2065 +      break;
2066 +
2067 +    case DT_const_int:
2068 +      printf ("x%d == const_int_rtx[MAX_SAVED_CONST_INT + (%d)]",
2069 +       depth, (int) p->u.intval);
2070 +      break;
2071 +
2072 +    case DT_veclen_ge:
2073 +      printf ("XVECLEN (x%d, 0) >= %d", depth, p->u.veclen);
2074 +      break;
2075 +
2076 +    case DT_dup:
2077 +      printf ("rtx_equal_p (x%d, operands[%d])", depth, p->u.dup);
2078 +      break;
2079 +
2080 +    case DT_pred:
2081 +      printf ("%s (x%d)", p->u.pred.name, depth);
2082 +      break;
2083 +
2084 +    case DT_c_test:
2085 +      print_c_condition (p->u.c_test);
2086 +      break;
2087 +
2088 +    case DT_accept_insn:
2089 +      ((void)(__builtin_expect(!(subroutine_type == RECOG), 0) ? __builtin_unreachable(), 0 : 0));
2090 +      ((void)(__builtin_expect(!(p->u.insn.num_clobbers_to_add), 0) ? __builtin_unreachable(), 0 : 0));
2091 +      printf ("pnum_clobbers != NULL");
2092 +      break;
2093 +
2094 +    default:
2095 +      __builtin_unreachable();
2096 +    }
2097 +}
2098 +
2099 +/* { dg-final { scan-assembler "printf" } } */
2100 Index: gcc/testsuite/ChangeLog
2101 ===================================================================
2102 --- gcc/testsuite/ChangeLog     (.../tags/gcc_4_6_2_release)    (wersja 182550)
2103 +++ gcc/testsuite/ChangeLog     (.../branches/gcc-4_6-branch)   (wersja 182550)
2104 @@ -1,3 +1,226 @@
2105 +2011-12-19  Martin Jambor  <mjambor@suse.cz>
2106 +
2107 +       PR tree-optimization/51583
2108 +       * gcc.dg/tree-ssa/pr51583.c: New test.
2109 +
2110 +2011-12-16  Jason Merrill  <jason@redhat.com>
2111 +
2112 +       PR c++/51416
2113 +       * g++.dg/cpp0x/auto31.C: New.
2114 +
2115 +2011-12-16  Jason Merrill  <jason@redhat.com>
2116 +
2117 +       PR c++/51331
2118 +       * g++.dg/init/value10.C: New.
2119 +
2120 +2011-12-15  H.J. Lu  <hongjiu.lu@intel.com>
2121 +
2122 +       Backport from mainline.
2123 +       2011-10-28  Chung-Lin Tang  <cltang@codesourcery.com>
2124 +
2125 +       PR rtl-optimization/49720
2126 +       * g++.dg/torture/pr49720.C: New test.
2127 +
2128 +2011-12-14  Jason Merrill  <jason@redhat.com>
2129 +
2130 +       PR c++/51248
2131 +       * g++.dg/other/enum2.C: New.
2132 +
2133 +2011-12-13  Jason Merrill  <jason@redhat.com>
2134 +
2135 +       PR c++/51406
2136 +       PR c++/51161
2137 +       * g++.dg/cpp0x/rv-cast3.C: New.
2138 +       * g++.dg/cpp0x/rv-cast4.C: New.
2139 +
2140 +2011-12-12  Jakub Jelinek  <jakub@redhat.com>
2141 +
2142 +       PR testsuite/51511
2143 +       * gcc.dg/pr45819.c: Add -w to dg-options.
2144 +
2145 +       Backported from mainline
2146 +       2011-12-11  Jakub Jelinek  <jakub@redhat.com>
2147 +
2148 +       PR tree-optimization/51485
2149 +       * g++.dg/vect/pr51485.cc: New test.
2150 +
2151 +2011-12-12  Eric Botcazou  <ebotcazou@adacore.com>
2152 +
2153 +       * gcc.c-torture/execute/20111212-1.c: New test.
2154 +
2155 +2011-12-11  Tobias Burnus  <burnus@net-b.de>
2156 +
2157 +       PR fortran/50923
2158 +       * gfortran.dg/warn_function_without_result_2.f90: New.
2159 +
2160 +2011-12-11  Thomas Koenig  <tkoenig@gcc.gnu.org>
2161 +
2162 +       PR fortran/51338
2163 +       Backport from trunk
2164 +       * gfortran.dg/assumed_charlen_substring_1.f90:  New test.
2165 +
2166 +2011-12-09  Jakub Jelinek  <jakub@redhat.com>
2167 +
2168 +       Backport from mainline
2169 +       2011-12-08  Jakub Jelinek  <jakub@redhat.com>
2170 +
2171 +       PR tree-optimization/51466
2172 +       * gcc.c-torture/execute/pr51466.c: New test.
2173 +
2174 +       2011-11-28  Jakub Jelinek  <jakub@redhat.com>
2175 +
2176 +       PR tree-optimization/50078
2177 +       * gcc.dg/pr50078.c: New test.
2178 +
2179 +2011-12-09  Kazu Hirata  <kazu@codesourcery.com>
2180 +
2181 +       Backport from mainline:
2182 +
2183 +       2011-12-05  Kazu Hirata  <kazu@codesourcery.com>
2184 +
2185 +       PR target/51408
2186 +       * gcc.dg/pr51408.c: New.
2187 +
2188 +2011-12-08  Tobias Burnus  <burnus@net-b.de>
2189 +
2190 +       PR fortran/51448
2191 +       * gfortran.dg/realloc_on_assign_8.f90: New.
2192 +
2193 +2011-12-08  Teresa Johnson  <tejohnson@google.com>
2194 +
2195 +       * gcc.target/i386/movdi-rex64.c: Remove unnecessary
2196 +       unused label.
2197 +
2198 +2011-12-08  Teresa Johnson  <tejohnson@google.com>
2199 +
2200 +       * gcc.target/i386/movdi-rex64.c: Remove unnecessary
2201 +       -Wwrite-strings option.
2202 +
2203 +2011-12-08  Teresa Johnson  <tejohnson@google.com>
2204 +
2205 +       * gcc.target/i386/movdi-rex64.c: New.
2206 +
2207 +2011-12-08  Jakub Jelinek  <jakub@redhat.com>
2208 +
2209 +       Backport from mainline
2210 +       2011-12-05  Jakub Jelinek  <jakub@redhat.com>
2211 +
2212 +       PR debug/51410
2213 +       * gcc.dg/debug/dwarf2/pr51410.c: New test.
2214 +
2215 +       PR c/51339
2216 +       * gcc.dg/gomp/pr51339.c: New test.
2217 +
2218 +       2011-12-05  Jakub Jelinek  <jakub@redhat.com>
2219 +                   Eric Botcazou  <ebotcazou@adacore.com>
2220 +
2221 +       PR middle-end/51323
2222 +       PR middle-end/50074
2223 +       * gcc.c-torture/execute/pr51323.c: New test.
2224 +
2225 +       2011-11-30  Jakub Jelinek  <jakub@redhat.com>
2226 +
2227 +       PR rtl-optimization/48721
2228 +       * gcc.target/i386/pr48721.c: New test.
2229 +
2230 +2011-12-08  Eric Botcazou  <ebotcazou@adacore.com>
2231 +
2232 +       * gcc.c-torture/execute/20111208-1.c: New test.
2233 +
2234 +       Backport from mainline
2235 +       2011-09-25  Eric Botcazou  <ebotcazou@adacore.com>
2236 +
2237 +       * gnat.dg/frame_overflow.ads: New.
2238 +       * gnat.dg/frame_overflow.adb: Adjust.
2239 +       * gnat.dg/specs/addr1.ads: Likewise.
2240 +
2241 +2011-12-06  Tobias Burnus  <burnus@net-b.de>
2242 +
2243 +       PR fortran/51435
2244 +       * gfortran.dg/default_initialization_5.f90: New.
2245 +
2246 +2011-12-06  Martin Jambor  <mjambor@suse.cz>
2247 +
2248 +       PR tree-optimization/50622
2249 +       * g++.dg/tree-ssa/pr50622.C: New test.
2250 +
2251 +2011-12-04  Uros Bizjak  <ubizjak@gmail.com>
2252 +           Jérémie Detrey  <Jeremie.Detrey@loria.fr>
2253 +
2254 +       PR target/51393
2255 +       * gcc.target/i386/pr51393.c: New test.
2256 +
2257 +2011-12-03  Tobias Burnus  <burnus@net-b.de>
2258 +
2259 +       PR fortran/50684
2260 +       * gfortran.dg/move_alloc_8.f90: New.
2261 +
2262 +2011-11-25  Tobias Burnus  <burnus@net-b.de>
2263 +
2264 +       PR fortran/50408
2265 +       * gfortran.dg/whole_file_35.f90: New.
2266 +
2267 +2011-11-24  Tobias Burnus  <burnus@net-b.de>
2268 +
2269 +       PR fortran/51218
2270 +       * resolve.c (pure_subroutine): If called subroutine is
2271 +       impure, unset implicit_pure.
2272 +       (resolve_function): Move impure check to simplify code.
2273 +
2274 +2011-11-22  Paolo Carlini  <paolo.carlini@oracle.com>
2275 +
2276 +       PR c++/51265
2277 +       * g++.dg/cpp0x/decltype36.C: New.
2278 +
2279 +2011-11-19  Eric Botcazou  <ebotcazou@adacore.com>
2280 +
2281 +       * gcc.dg/delay-slot-2.c: New test.
2282 +
2283 +2011-11-18  Joseph Myers  <joseph@codesourcery.com>
2284 +
2285 +       * gcc.dg/cpp/assert4.c: Test __linux__, not __gnu_linux__.
2286 +
2287 +2011-11-18  Paolo Carlini  <paolo.carlini@oracle.com>
2288 +
2289 +       PR c++/51150
2290 +       * g++.dg/cpp0x/pr51150.C: New.
2291 +
2292 +2011-11-16  Richard Earnshaw  <rearnsha@arm.com>
2293 +           Bernd Schmidt <bernds@coudesourcery.com>
2294 +           Sebastian Huber <sebastian.huber@embedded-brains.de>
2295 +
2296 +       PR target/49641
2297 +       * gcc.target/arm/pr49641.c: New test.
2298 +
2299 +2011-11-10  Jakub Jelinek  <jakub@redhat.com>
2300 +
2301 +       PR middle-end/51077
2302 +       * gcc.c-torture/compile/pr51077.c: New test.
2303 +
2304 +2011-11-07  Jason Merrill  <jason@redhat.com>
2305 +
2306 +       PR c++/50870
2307 +       * g++.dg/cpp0x/decltype35.C: New.
2308 +
2309 +2011-11-04  Eric Botcazou  <ebotcazou@adacore.com>
2310 +
2311 +       * g++.dg/other/offsetof7.C: New test.
2312 +
2313 +2011-11-02  Bernd Schmidt  <bernds@codesourcery.com>
2314 +
2315 +       * gcc.c-torture/compile/20110907.c: New file.
2316 +
2317 +2011-10-29  Paolo Carlini  <paolo.carlini@oracle.com>
2318 +
2319 +       PR c++/50901
2320 +       * g++.dg/cpp0x/pr50901.C: New.
2321 +
2322 +2011-10-27  Uros Bizjak  <ubizjak@gmail.com>
2323 +           Steven G. Kargl  <kargl@gcc.gnu.org>
2324 +
2325 +       PR target/50875
2326 +       * gfortran.dg/pr50875.f90: New test.
2327 +
2328  2011-10-26  Release Manager
2329  
2330         * GCC 4.6.2 released.
2331 @@ -9,9 +232,9 @@
2332  
2333  2011-10-20  Uros Bizjak  <ubizjak@gmail.com>
2334  
2335 -       * gcc.dg/ipa/ipa-sra-2.c: Add dg-require-effective-target
2336 -       non_strict_align.
2337 -       * gcc.dg/ipa/ipa-sra-6.c: Ditto.
2338 +       * gcc.dg/ipa/ipa-sra-2.c: Add dg-require-effective-target
2339 +       non_strict_align.
2340 +       * gcc.dg/ipa/ipa-sra-6.c: Ditto.
2341  
2342  2011-10-19  Jason Merrill  <jason@redhat.com>
2343  
2344 Index: gcc/testsuite/g++.dg/vect/pr51485.cc
2345 ===================================================================
2346 --- gcc/testsuite/g++.dg/vect/pr51485.cc        (.../tags/gcc_4_6_2_release)    (wersja 0)
2347 +++ gcc/testsuite/g++.dg/vect/pr51485.cc        (.../branches/gcc-4_6-branch)   (wersja 182550)
2348 @@ -0,0 +1,14 @@
2349 +/* { dg-do compile } */
2350 +
2351 +struct A { A (); unsigned int a; };
2352 +double bar (A a) throw () __attribute__((pure));
2353 +
2354 +void
2355 +foo (unsigned int x, double *y, A *z)
2356 +{
2357 +  unsigned int i;
2358 +  for (i = 0; i < x; i++)
2359 +    y[i] = bar (z[i]);
2360 +}
2361 +
2362 +/* { dg-final { cleanup-tree-dump "vect" } } */
2363 Index: gcc/testsuite/g++.dg/init/value10.C
2364 ===================================================================
2365 --- gcc/testsuite/g++.dg/init/value10.C (.../tags/gcc_4_6_2_release)    (wersja 0)
2366 +++ gcc/testsuite/g++.dg/init/value10.C (.../branches/gcc-4_6-branch)   (wersja 182550)
2367 @@ -0,0 +1,27 @@
2368 +// PR c++/51331
2369 +// { dg-do run }
2370 +
2371 +struct A {
2372 +  A(): x(10) {}
2373 +  virtual ~A() {}
2374 +
2375 +  int x;
2376 +};
2377 +
2378 +struct B: public virtual A {
2379 +};
2380 +
2381 +struct C: public virtual A {
2382 +};
2383 +
2384 +struct D: public B, virtual public C {
2385 +  D(): B(), C() {}  // note an explicit call to C() which is auto-generated
2386 +};
2387 +
2388 +int main() {
2389 +  D* d = new D();
2390 +
2391 +  // Crashes here with the following message:
2392 +  // *** glibc detected *** ./test: free(): invalid next size (fast)
2393 +  delete d;
2394 +}
2395 Index: gcc/testsuite/g++.dg/other/enum2.C
2396 ===================================================================
2397 --- gcc/testsuite/g++.dg/other/enum2.C  (.../tags/gcc_4_6_2_release)    (wersja 0)
2398 +++ gcc/testsuite/g++.dg/other/enum2.C  (.../branches/gcc-4_6-branch)   (wersja 182550)
2399 @@ -0,0 +1,3 @@
2400 +// PR c++/51248
2401 +
2402 +enum E { e = sizeof(const E*) };
2403 Index: gcc/testsuite/g++.dg/other/offsetof7.C
2404 ===================================================================
2405 --- gcc/testsuite/g++.dg/other/offsetof7.C      (.../tags/gcc_4_6_2_release)    (wersja 0)
2406 +++ gcc/testsuite/g++.dg/other/offsetof7.C      (.../branches/gcc-4_6-branch)   (wersja 182550)
2407 @@ -0,0 +1,17 @@
2408 +// PR c++/50608
2409 +// Testcase by <dberger@oubliette.org>
2410 +// { dg-do compile }
2411 +
2412 +struct A {
2413 +    int offset;
2414 +};
2415 +
2416 +struct B: public A {
2417 +};
2418 +
2419 +struct C {
2420 +    A a;
2421 +    B b;
2422 +};
2423 +
2424 +int fails = __builtin_offsetof (C, b.offset);
2425 Index: gcc/testsuite/g++.dg/tree-ssa/pr50622.C
2426 ===================================================================
2427 --- gcc/testsuite/g++.dg/tree-ssa/pr50622.C     (.../tags/gcc_4_6_2_release)    (wersja 0)
2428 +++ gcc/testsuite/g++.dg/tree-ssa/pr50622.C     (.../branches/gcc-4_6-branch)   (wersja 182550)
2429 @@ -0,0 +1,30 @@
2430 +// { dg-do compile }
2431 +// { dg-options "-O2" }
2432 +
2433 +typedef __complex__ double Value;
2434 +struct LorentzVector
2435 +{
2436 +  LorentzVector & operator+=(const LorentzVector & a) {
2437 +    theX += a.theX;
2438 +    theY += a.theY;
2439 +    theZ += a.theZ;
2440 +    theT += a.theT;
2441 +    return *this;
2442 +  }
2443 +
2444 +  Value theX;
2445 +  Value theY;
2446 +  Value theZ;
2447 +  Value theT;
2448 +};
2449 +
2450 +inline LorentzVector
2451 +operator+(LorentzVector a, const LorentzVector & b) {
2452 +  return a += b;
2453 +}
2454 +
2455 +Value ex, et;
2456 +LorentzVector sum() {
2457 +  LorentzVector v1; v1.theX =ex; v1.theY =ex+et; v1.theZ =ex-et;   v1.theT =et;
2458 +  return v1+v1;
2459 +}
2460 Index: gcc/testsuite/g++.dg/cpp0x/auto31.C
2461 ===================================================================
2462 --- gcc/testsuite/g++.dg/cpp0x/auto31.C (.../tags/gcc_4_6_2_release)    (wersja 0)
2463 +++ gcc/testsuite/g++.dg/cpp0x/auto31.C (.../branches/gcc-4_6-branch)   (wersja 182550)
2464 @@ -0,0 +1,12 @@
2465 +// PR c++/51416
2466 +// { dg-options "-std=c++0x" }
2467 +
2468 +template<typename T, typename... U> void foo(T, U... u)
2469 +{
2470 +  auto foo(u...);              // { dg-error "auto" }
2471 +}
2472 +
2473 +void bar()
2474 +{
2475 +  foo(0);
2476 +}
2477 Index: gcc/testsuite/g++.dg/cpp0x/pr50901.C
2478 ===================================================================
2479 --- gcc/testsuite/g++.dg/cpp0x/pr50901.C        (.../tags/gcc_4_6_2_release)    (wersja 0)
2480 +++ gcc/testsuite/g++.dg/cpp0x/pr50901.C        (.../branches/gcc-4_6-branch)   (wersja 182550)
2481 @@ -0,0 +1,9 @@
2482 +// { dg-options "-std=c++0x" }
2483 +
2484 +template<class T> int foo(int a)
2485 +{
2486 +  const unsigned b = a < 0 ? -a : a;
2487 +  return 0;
2488 +}
2489 +
2490 +int i = foo<float>(1);
2491 Index: gcc/testsuite/g++.dg/cpp0x/variadic103.C
2492 ===================================================================
2493 --- gcc/testsuite/g++.dg/cpp0x/variadic103.C    (.../tags/gcc_4_6_2_release)    (wersja 182550)
2494 +++ gcc/testsuite/g++.dg/cpp0x/variadic103.C    (.../branches/gcc-4_6-branch)   (wersja 182550)
2495 @@ -5,7 +5,7 @@
2496  
2497  template<class T, class... Args>
2498  void test() {
2499 -  T t(create<Args>()...);      // { dg-error "unknown bound" }
2500 +  T t(create<Args>()...);      // { dg-error "incomplete" }
2501    (void) t;
2502  }
2503  
2504 Index: gcc/testsuite/g++.dg/cpp0x/decltype35.C
2505 ===================================================================
2506 --- gcc/testsuite/g++.dg/cpp0x/decltype35.C     (.../tags/gcc_4_6_2_release)    (wersja 0)
2507 +++ gcc/testsuite/g++.dg/cpp0x/decltype35.C     (.../branches/gcc-4_6-branch)   (wersja 182550)
2508 @@ -0,0 +1,15 @@
2509 +// PR c++/50870
2510 +// { dg-options -std=c++0x }
2511 +
2512 +template <class V>
2513 +  struct impl
2514 +  {
2515 +    template <class T> static T create();
2516 +  };
2517 +
2518 +template <class T, class U, class V, class
2519 +      = decltype(impl<V>::template create<T>()
2520 +             -> impl<V>::template create<U>())>
2521 +struct tester { };
2522 +
2523 +tester<impl<float>*, int, float> ti;
2524 Index: gcc/testsuite/g++.dg/cpp0x/decltype36.C
2525 ===================================================================
2526 --- gcc/testsuite/g++.dg/cpp0x/decltype36.C     (.../tags/gcc_4_6_2_release)    (wersja 0)
2527 +++ gcc/testsuite/g++.dg/cpp0x/decltype36.C     (.../branches/gcc-4_6-branch)   (wersja 182550)
2528 @@ -0,0 +1,21 @@
2529 +// PR c++/51265
2530 +// { dg-options -std=c++0x }
2531 +
2532 +struct Funny
2533 +{
2534 +  int print(int);
2535 +};
2536 +
2537 +template<typename X>
2538 +void c();
2539 +
2540 +template<typename X, X ff>
2541 +void xx()
2542 +{
2543 +  c<decltype(ff)>();
2544 +}
2545 +
2546 +int main()
2547 +{
2548 +  xx<int(Funny::*)(int), &Funny::print>();
2549 +}
2550 Index: gcc/testsuite/g++.dg/cpp0x/pr51150.C
2551 ===================================================================
2552 --- gcc/testsuite/g++.dg/cpp0x/pr51150.C        (.../tags/gcc_4_6_2_release)    (wersja 0)
2553 +++ gcc/testsuite/g++.dg/cpp0x/pr51150.C        (.../branches/gcc-4_6-branch)   (wersja 182550)
2554 @@ -0,0 +1,20 @@
2555 +// PR c++/51150
2556 +// { dg-options "-std=c++0x" }
2557 +
2558 +struct Clock {
2559 +  double Now();
2560 +};
2561 +template <class T> void Foo(Clock* clock) {
2562 +  const int now = clock->Now();
2563 +}
2564 +
2565 +template void Foo<float>(Clock*);
2566 +
2567 +template <class T> void Boo(int val) {
2568 +  const int now1 = (double)(val);
2569 +  const int now2 = const_cast<double>(val); // { dg-error "invalid" }
2570 +  const int now3 = static_cast<double>(val);
2571 +  const int now4 = reinterpret_cast<double>(val); // { dg-error "invalid" }
2572 +}
2573 +
2574 +template void Boo<float>(int);
2575 Index: gcc/testsuite/g++.dg/cpp0x/rv-cast3.C
2576 ===================================================================
2577 --- gcc/testsuite/g++.dg/cpp0x/rv-cast3.C       (.../tags/gcc_4_6_2_release)    (wersja 0)
2578 +++ gcc/testsuite/g++.dg/cpp0x/rv-cast3.C       (.../branches/gcc-4_6-branch)   (wersja 182550)
2579 @@ -0,0 +1,18 @@
2580 +// PR c++/51406
2581 +// { dg-do run }
2582 +// { dg-options "-std=c++0x" }
2583 +
2584 +extern "C" int printf(const char *,...);
2585 +extern "C" void abort();
2586 +
2587 +struct A { int a; A() : a(1) {} };
2588 +struct B { int b; B() : b(2) {} };
2589 +struct X : A, B {};
2590 +
2591 +int main() {
2592 +    X x;
2593 +    int a=static_cast<A&&>(x).a;
2594 +    int b=static_cast<B&&>(x).b;
2595 +    // printf ("%d %d\n", a, b);
2596 +    if (a!=1 || b!=2) abort();
2597 +}
2598 Index: gcc/testsuite/g++.dg/cpp0x/rv-cast4.C
2599 ===================================================================
2600 --- gcc/testsuite/g++.dg/cpp0x/rv-cast4.C       (.../tags/gcc_4_6_2_release)    (wersja 0)
2601 +++ gcc/testsuite/g++.dg/cpp0x/rv-cast4.C       (.../branches/gcc-4_6-branch)   (wersja 182550)
2602 @@ -0,0 +1,13 @@
2603 +// PR c++/51161
2604 +// { dg-options "-std=c++0x" }
2605 +
2606 +struct A{};
2607 +struct B : A{};
2608 +struct C : A{};
2609 +struct D : B, C{};
2610 +
2611 +int main()
2612 +{
2613 +  D d;
2614 +  static_cast<A &&>(d);                // { dg-error "ambiguous" }
2615 +}
2616 Index: gcc/testsuite/g++.dg/torture/pr49720.C
2617 ===================================================================
2618 --- gcc/testsuite/g++.dg/torture/pr49720.C      (.../tags/gcc_4_6_2_release)    (wersja 0)
2619 +++ gcc/testsuite/g++.dg/torture/pr49720.C      (.../branches/gcc-4_6-branch)   (wersja 182550)
2620 @@ -0,0 +1,8 @@
2621 +/* { dg-do compile } */
2622 +
2623 +extern char t_start[], t_end[], t_size[];
2624 +bool foo (void)
2625 +{
2626 +  long size = reinterpret_cast<long>(t_size);
2627 +  return (size == t_end - t_start);
2628 +}
2629 Index: gcc/cp/typeck.c
2630 ===================================================================
2631 --- gcc/cp/typeck.c     (.../tags/gcc_4_6_2_release)    (wersja 182550)
2632 +++ gcc/cp/typeck.c     (.../branches/gcc-4_6-branch)   (wersja 182550)
2633 @@ -4835,9 +4835,7 @@
2634        && TREE_CONSTANT (TREE_OPERAND (val, 0)))
2635      {
2636        tree type = build_pointer_type (argtype);
2637 -      tree op0 = fold_convert (type, TREE_OPERAND (val, 0));
2638 -      tree op1 = fold_convert (sizetype, fold_offsetof (arg, val));
2639 -      return fold_build2 (POINTER_PLUS_EXPR, type, op0, op1);
2640 +      return fold_convert (type, fold_offsetof_1 (arg));
2641      }
2642  
2643    /* Handle complex lvalues (when permitted)
2644 @@ -5772,8 +5770,18 @@
2645        && reference_related_p (TREE_TYPE (type), intype)
2646        && (c_cast_p || at_least_as_qualified_p (TREE_TYPE (type), intype)))
2647      {
2648 -      expr = build_typed_address (expr, type);
2649 -      return convert_from_reference (expr);
2650 +      /* Handle the lvalue case here by casting to lvalue reference and
2651 +        then changing it to an rvalue reference.  Casting an xvalue to
2652 +        rvalue reference will be handled by the main code path.  */
2653 +      tree lref = cp_build_reference_type (TREE_TYPE (type), false);
2654 +      result = (perform_direct_initialization_if_possible
2655 +               (lref, expr, c_cast_p, complain));
2656 +      result = cp_fold_convert (type, result);
2657 +      /* Make sure we don't fold back down to a named rvalue reference,
2658 +        because that would be an lvalue.  */
2659 +      if (DECL_P (result))
2660 +       result = build1 (NON_LVALUE_EXPR, type, result);
2661 +      return convert_from_reference (result);
2662      }
2663  
2664    /* Resolve overloaded address here rather than once in
2665 Index: gcc/cp/init.c
2666 ===================================================================
2667 --- gcc/cp/init.c       (.../tags/gcc_4_6_2_release)    (wersja 182550)
2668 +++ gcc/cp/init.c       (.../branches/gcc-4_6-branch)   (wersja 182550)
2669 @@ -141,7 +141,9 @@
2670     zero-initialization does not simply mean filling the storage with
2671     zero bytes.  FIELD_SIZE, if non-NULL, is the bit size of the field,
2672     subfields with bit positions at or above that bit size shouldn't
2673 -   be added.  */
2674 +   be added.  Note that this only works when the result is assigned
2675 +   to a base COMPONENT_REF; if we only have a pointer to the base subobject,
2676 +   expand_assignment will end up clearing the full size of TYPE.  */
2677  
2678  static tree
2679  build_zero_init_1 (tree type, tree nelts, bool static_storage_p,
2680 @@ -368,6 +370,12 @@
2681  tree
2682  build_value_init_noctor (tree type, tsubst_flags_t complain)
2683  {
2684 +  if (!COMPLETE_TYPE_P (type))
2685 +    {
2686 +      if (complain & tf_error)
2687 +       error ("value-initialization of incomplete type %qT", type);
2688 +      return error_mark_node;
2689 +    }
2690    if (CLASS_TYPE_P (type))
2691      {
2692        gcc_assert (!TYPE_NEEDS_CONSTRUCTING (type));
2693 Index: gcc/cp/class.c
2694 ===================================================================
2695 --- gcc/cp/class.c      (.../tags/gcc_4_6_2_release)    (wersja 182550)
2696 +++ gcc/cp/class.c      (.../branches/gcc-4_6-branch)   (wersja 182550)
2697 @@ -464,7 +464,14 @@
2698      /* Is this the base field created by build_base_field?  */
2699      if (TREE_CODE (field) == FIELD_DECL
2700         && DECL_FIELD_IS_BASE (field)
2701 -       && TREE_TYPE (field) == type)
2702 +       && TREE_TYPE (field) == type
2703 +       /* If we're looking for a field in the most-derived class,
2704 +          also check the field offset; we can have two base fields
2705 +          of the same type if one is an indirect virtual base and one
2706 +          is a direct non-virtual base.  */
2707 +       && (BINFO_INHERITANCE_CHAIN (d_binfo)
2708 +           || tree_int_cst_equal (byte_position (field),
2709 +                                  BINFO_OFFSET (binfo))))
2710        {
2711         /* We don't use build_class_member_access_expr here, as that
2712            has unnecessary checks, and more importantly results in
2713 @@ -541,6 +548,10 @@
2714      {
2715        tree pointer_type;
2716  
2717 +      /* If this is a non-empty base, use a COMPONENT_REF.  */
2718 +      if (!is_empty_class (BINFO_TYPE (base)))
2719 +       return build_simple_base_path (expr, base);
2720 +
2721        pointer_type = build_pointer_type (expr_type);
2722  
2723        /* We use fold_build2 and fold_convert below to simplify the trees
2724 Index: gcc/cp/decl.c
2725 ===================================================================
2726 --- gcc/cp/decl.c       (.../tags/gcc_4_6_2_release)    (wersja 182550)
2727 +++ gcc/cp/decl.c       (.../branches/gcc-4_6-branch)   (wersja 182550)
2728 @@ -11540,15 +11540,19 @@
2729  static void
2730  copy_type_enum (tree dst, tree src)
2731  {
2732 -  TYPE_MIN_VALUE (dst) = TYPE_MIN_VALUE (src);
2733 -  TYPE_MAX_VALUE (dst) = TYPE_MAX_VALUE (src);
2734 -  TYPE_SIZE (dst) = TYPE_SIZE (src);
2735 -  TYPE_SIZE_UNIT (dst) = TYPE_SIZE_UNIT (src);
2736 -  SET_TYPE_MODE (dst, TYPE_MODE (src));
2737 -  TYPE_PRECISION (dst) = TYPE_PRECISION (src);
2738 -  TYPE_ALIGN (dst) = TYPE_ALIGN (src);
2739 -  TYPE_USER_ALIGN (dst) = TYPE_USER_ALIGN (src);
2740 -  TYPE_UNSIGNED (dst) = TYPE_UNSIGNED (src);
2741 +  tree t;
2742 +  for (t = dst; t; t = TYPE_NEXT_VARIANT (t))
2743 +    {
2744 +      TYPE_MIN_VALUE (t) = TYPE_MIN_VALUE (src);
2745 +      TYPE_MAX_VALUE (t) = TYPE_MAX_VALUE (src);
2746 +      TYPE_SIZE (t) = TYPE_SIZE (src);
2747 +      TYPE_SIZE_UNIT (t) = TYPE_SIZE_UNIT (src);
2748 +      SET_TYPE_MODE (dst, TYPE_MODE (src));
2749 +      TYPE_PRECISION (t) = TYPE_PRECISION (src);
2750 +      TYPE_ALIGN (t) = TYPE_ALIGN (src);
2751 +      TYPE_USER_ALIGN (t) = TYPE_USER_ALIGN (src);
2752 +      TYPE_UNSIGNED (t) = TYPE_UNSIGNED (src);
2753 +    }
2754  }
2755  
2756  /* Begin compiling the definition of an enumeration type.
2757 @@ -11903,9 +11907,12 @@
2758        return;
2759      }
2760  
2761 -  /* Here there should not be any variants of this type.  */
2762 +  /* If this is a forward declaration, there should not be any variants,
2763 +     though we can get a variant in the middle of an enum-specifier with
2764 +     wacky code like 'enum E { e = sizeof(const E*) };'  */
2765    gcc_assert (enumtype == TYPE_MAIN_VARIANT (enumtype)
2766 -             && !TYPE_NEXT_VARIANT (enumtype));
2767 +             && (TYPE_VALUES (enumtype)
2768 +                 || !TYPE_NEXT_VARIANT (enumtype)));
2769  }
2770  
2771  /* Build and install a CONST_DECL for an enumeration constant of the
2772 Index: gcc/cp/ChangeLog
2773 ===================================================================
2774 --- gcc/cp/ChangeLog    (.../tags/gcc_4_6_2_release)    (wersja 182550)
2775 +++ gcc/cp/ChangeLog    (.../branches/gcc-4_6-branch)   (wersja 182550)
2776 @@ -1,3 +1,57 @@
2777 +2011-12-16  Jason Merrill  <jason@redhat.com>
2778 +
2779 +       PR c++/51416
2780 +       * init.c (build_value_init_noctor): Check for incomplete type.
2781 +
2782 +2011-12-16  Jason Merrill  <jason@redhat.com>
2783 +
2784 +       PR c++/51331
2785 +       * class.c (convert_to_base_statically): Just call
2786 +       build_simple_base_path.
2787 +       (build_simple_base_path): Check field offset.
2788 +
2789 +2011-12-14  Jason Merrill  <jason@redhat.com>
2790 +
2791 +       PR c++/51248
2792 +       * decl.c (copy_type_enum): Also update variants.
2793 +       (finish_enum): Allow variants of complete enums.
2794 +
2795 +2011-12-13  Jason Merrill  <jason@redhat.com>
2796 +
2797 +       PR c++/51406
2798 +       PR c++/51161
2799 +       * typeck.c (build_static_cast_1): Fix cast of lvalue to
2800 +       base rvalue reference.
2801 +
2802 +2011-11-22  Paolo Carlini  <paolo.carlini@oracle.com>
2803 +
2804 +       PR c++/51265
2805 +       * semantics.c (finish_decltype_type): Handle PTRMEM_CST.
2806 +
2807 +2011-11-18  Paolo Carlini  <paolo.carlini@oracle.com>
2808 +
2809 +       PR c++/51150
2810 +       * pt.c (tsubst_copy_and_build): Handle FIX_TRUNC_EXPR.
2811 +
2812 +2011-11-07  Jason Merrill  <jason@redhat.com>
2813 +
2814 +       PR c++/50870
2815 +       * pt.c (tsubst_copy): Handle NAMESPACE_DECL.
2816 +       (tsubst_copy_and_build) [COMPONENT_REF]: Handle a still-dependent
2817 +       object.
2818 +
2819 +2011-11-04  Eric Botcazou  <ebotcazou@adacore.com>
2820 +
2821 +       PR c++/50608
2822 +       * semantics.c (finish_offsetof): Adjust call to fold_offsetof.
2823 +       * typeck.c (cp_build_addr_expr_1): Call fold_offsetof_1.
2824 +
2825 +2011-10-29  Paolo Carlini  <paolo.carlini@oracle.com>
2826 +
2827 +       PR c++/50901
2828 +       * call.c (build_new_op_1): Handle ABS_EXPR together with the
2829 +       other unary EXPR.
2830 +
2831  2011-10-26  Release Manager
2832  
2833         * GCC 4.6.2 released.
2834 Index: gcc/cp/pt.c
2835 ===================================================================
2836 --- gcc/cp/pt.c (.../tags/gcc_4_6_2_release)    (wersja 182550)
2837 +++ gcc/cp/pt.c (.../branches/gcc-4_6-branch)   (wersja 182550)
2838 @@ -11439,6 +11439,9 @@
2839        mark_used (t);
2840        return t;
2841  
2842 +    case NAMESPACE_DECL:
2843 +      return t;
2844 +
2845      case OVERLOAD:
2846        /* An OVERLOAD will always be a non-dependent overload set; an
2847          overload set from function scope will just be represented with an
2848 @@ -12704,6 +12707,10 @@
2849        return build_x_unary_op (TREE_CODE (t), RECUR (TREE_OPERAND (t, 0)),
2850                                 complain);
2851  
2852 +    case FIX_TRUNC_EXPR:
2853 +      return cp_build_unary_op (FIX_TRUNC_EXPR, RECUR (TREE_OPERAND (t, 0)),
2854 +                               0, complain);
2855 +
2856      case ADDR_EXPR:
2857        op1 = TREE_OPERAND (t, 0);
2858        if (TREE_CODE (op1) == LABEL_DECL)
2859 @@ -13179,7 +13186,9 @@
2860         if (member == error_mark_node)
2861           return error_mark_node;
2862  
2863 -       if (object_type && !CLASS_TYPE_P (object_type))
2864 +       if (type_dependent_expression_p (object))
2865 +         /* We can't do much here.  */;
2866 +       else if (!CLASS_TYPE_P (object_type))
2867           {
2868             if (SCALAR_TYPE_P (object_type))
2869               {
2870 Index: gcc/cp/semantics.c
2871 ===================================================================
2872 --- gcc/cp/semantics.c  (.../tags/gcc_4_6_2_release)    (wersja 182550)
2873 +++ gcc/cp/semantics.c  (.../branches/gcc-4_6-branch)   (wersja 182550)
2874 @@ -3348,7 +3348,7 @@
2875      }
2876    if (TREE_CODE (expr) == INDIRECT_REF && REFERENCE_REF_P (expr))
2877      expr = TREE_OPERAND (expr, 0);
2878 -  return fold_offsetof (expr, NULL_TREE);
2879 +  return fold_offsetof (expr);
2880  }
2881  
2882  /* Replace the AGGR_INIT_EXPR at *TP with an equivalent CALL_EXPR.  This
2883 @@ -4927,8 +4927,9 @@
2884            gcc_unreachable ();
2885  
2886          case INTEGER_CST:
2887 +       case PTRMEM_CST:
2888            /* We can get here when the id-expression refers to an
2889 -             enumerator.  */
2890 +             enumerator or non-type template parameter.  */
2891            type = TREE_TYPE (expr);
2892            break;
2893  
2894 Index: gcc/cp/call.c
2895 ===================================================================
2896 --- gcc/cp/call.c       (.../tags/gcc_4_6_2_release)    (wersja 182550)
2897 +++ gcc/cp/call.c       (.../branches/gcc-4_6-branch)   (wersja 182550)
2898 @@ -4996,6 +4996,7 @@
2899      case POSTDECREMENT_EXPR:
2900      case REALPART_EXPR:
2901      case IMAGPART_EXPR:
2902 +    case ABS_EXPR:
2903        return cp_build_unary_op (code, arg1, candidates != 0, complain);
2904  
2905      case ARRAY_REF:
2906 Index: gcc/lto-cgraph.c
2907 ===================================================================
2908 --- gcc/lto-cgraph.c    (.../tags/gcc_4_6_2_release)    (wersja 182550)
2909 +++ gcc/lto-cgraph.c    (.../branches/gcc-4_6-branch)   (wersja 182550)
2910 @@ -1792,9 +1792,9 @@
2911  {
2912    const struct lto_function_header *header =
2913      (const struct lto_function_header *) data;
2914 -  const int32_t cfg_offset = sizeof (struct lto_function_header);
2915 -  const int32_t main_offset = cfg_offset + header->cfg_size;
2916 -  const int32_t string_offset = main_offset + header->main_size;
2917 +  const int cfg_offset = sizeof (struct lto_function_header);
2918 +  const int main_offset = cfg_offset + header->cfg_size;
2919 +  const int string_offset = main_offset + header->main_size;
2920    struct data_in *data_in;
2921    struct lto_input_block ib_main;
2922    unsigned int i;
2923 Index: gcc/lto-streamer-out.c
2924 ===================================================================
2925 --- gcc/lto-streamer-out.c      (.../tags/gcc_4_6_2_release)    (wersja 182550)
2926 +++ gcc/lto-streamer-out.c      (.../branches/gcc-4_6-branch)   (wersja 182550)
2927 @@ -2408,7 +2408,7 @@
2928    enum gcc_plugin_symbol_kind kind;
2929    enum gcc_plugin_symbol_visibility visibility;
2930    int slot_num;
2931 -  uint64_t size;
2932 +  unsigned HOST_WIDEST_INT size;
2933    const char *comdat;
2934    unsigned char c;
2935  
2936 @@ -2466,7 +2466,7 @@
2937       when symbol has attribute (visibility("hidden")) specified.
2938       targetm.binds_local_p check DECL_VISIBILITY_SPECIFIED and gets this
2939       right. */
2940 -     
2941 +
2942    if (DECL_EXTERNAL (t)
2943        && !targetm.binds_local_p (t))
2944      visibility = GCCPV_DEFAULT;
2945 @@ -2488,14 +2488,9 @@
2946        }
2947  
2948    if (kind == GCCPK_COMMON
2949 -      && DECL_SIZE (t)
2950 -      && TREE_CODE (DECL_SIZE (t)) == INTEGER_CST)
2951 -    {
2952 -      size = (HOST_BITS_PER_WIDE_INT >= 64)
2953 -       ? (uint64_t) int_size_in_bytes (TREE_TYPE (t))
2954 -       : (((uint64_t) TREE_INT_CST_HIGH (DECL_SIZE_UNIT (t))) << 32)
2955 -               | TREE_INT_CST_LOW (DECL_SIZE_UNIT (t));
2956 -    }
2957 +      && DECL_SIZE_UNIT (t)
2958 +      && TREE_CODE (DECL_SIZE_UNIT (t)) == INTEGER_CST)
2959 +    size = TREE_INT_CST_LOW (DECL_SIZE_UNIT (t));
2960    else
2961      size = 0;
2962  
2963 Index: gcc/dwarf2out.c
2964 ===================================================================
2965 --- gcc/dwarf2out.c     (.../tags/gcc_4_6_2_release)    (wersja 182550)
2966 +++ gcc/dwarf2out.c     (.../branches/gcc-4_6-branch)   (wersja 182550)
2967 @@ -4431,6 +4431,11 @@
2968    const char *section; /* Section this loclist is relative to */
2969    dw_loc_descr_ref expr;
2970    hashval_t hash;
2971 +  /* True if all addresses in this and subsequent lists are known to be
2972 +     resolved.  */
2973 +  bool resolved_addr;
2974 +  /* True if this list has been replaced by dw_loc_next.  */
2975 +  bool replaced;
2976    bool emitted;
2977  } dw_loc_list_node;
2978  
2979 @@ -6091,6 +6096,19 @@
2980  /* Table of decl location linked lists.  */
2981  static GTY ((param_is (var_loc_list))) htab_t decl_loc_table;
2982  
2983 +/* A cached location list.  */
2984 +struct GTY (()) cached_dw_loc_list_def {
2985 +  /* The DECL_UID of the decl that this entry describes.  */
2986 +  unsigned int decl_id;
2987 +
2988 +  /* The cached location list.  */
2989 +  dw_loc_list_ref loc_list;
2990 +};
2991 +typedef struct cached_dw_loc_list_def cached_dw_loc_list;
2992 +
2993 +/* Table of cached location lists.  */
2994 +static GTY ((param_is (cached_dw_loc_list))) htab_t cached_dw_loc_list_table;
2995 +
2996  /* A pointer to the base of a list of references to DIE's that
2997     are uniquely identified by their tag, presence/absence of
2998     children DIE's, and list of attribute/value pairs.  */
2999 @@ -6439,7 +6457,7 @@
3000  static void insert_double (double_int, unsigned char *);
3001  static void insert_float (const_rtx, unsigned char *);
3002  static rtx rtl_for_decl_location (tree);
3003 -static bool add_location_or_const_value_attribute (dw_die_ref, tree,
3004 +static bool add_location_or_const_value_attribute (dw_die_ref, tree, bool,
3005                                                    enum dwarf_attribute);
3006  static bool tree_add_const_value_attribute (dw_die_ref, tree);
3007  static bool tree_add_const_value_attribute_for_decl (dw_die_ref, tree);
3008 @@ -8173,6 +8191,24 @@
3009      htab_find_with_hash (decl_loc_table, decl, DECL_UID (decl));
3010  }
3011  
3012 +/* Returns a hash value for X (which really is a cached_dw_loc_list_list).  */
3013 +
3014 +static hashval_t
3015 +cached_dw_loc_list_table_hash (const void *x)
3016 +{
3017 +  return (hashval_t) ((const cached_dw_loc_list *) x)->decl_id;
3018 +}
3019 +
3020 +/* Return nonzero if decl_id of cached_dw_loc_list X is the same as
3021 +   UID of decl *Y.  */
3022 +
3023 +static int
3024 +cached_dw_loc_list_table_eq (const void *x, const void *y)
3025 +{
3026 +  return (((const cached_dw_loc_list *) x)->decl_id
3027 +         == DECL_UID ((const_tree) y));
3028 +}
3029 +
3030  /* Equate a DIE to a particular declaration.  */
3031  
3032  static void
3033 @@ -16995,15 +17031,22 @@
3034     these things can crop up in other ways also.)  Note that one type of
3035     constant value which can be passed into an inlined function is a constant
3036     pointer.  This can happen for example if an actual argument in an inlined
3037 -   function call evaluates to a compile-time constant address.  */
3038 +   function call evaluates to a compile-time constant address.
3039  
3040 +   CACHE_P is true if it is worth caching the location list for DECL,
3041 +   so that future calls can reuse it rather than regenerate it from scratch.
3042 +   This is true for BLOCK_NONLOCALIZED_VARS in inlined subroutines,
3043 +   since we will need to refer to them each time the function is inlined.  */
3044 +
3045  static bool
3046 -add_location_or_const_value_attribute (dw_die_ref die, tree decl,
3047 +add_location_or_const_value_attribute (dw_die_ref die, tree decl, bool cache_p,
3048                                        enum dwarf_attribute attr)
3049  {
3050    rtx rtl;
3051    dw_loc_list_ref list;
3052    var_loc_list *loc_list;
3053 +  cached_dw_loc_list *cache;
3054 +  void **slot;
3055  
3056    if (TREE_CODE (decl) == ERROR_MARK)
3057      return false;
3058 @@ -17040,7 +17083,33 @@
3059           && add_const_value_attribute (die, rtl))
3060          return true;
3061      }
3062 -  list = loc_list_from_tree (decl, decl_by_reference_p (decl) ? 0 : 2);
3063 +  /* If this decl is from BLOCK_NONLOCALIZED_VARS, we might need its
3064 +     list several times.  See if we've already cached the contents.  */
3065 +  list = NULL;
3066 +  if (loc_list == NULL || cached_dw_loc_list_table == NULL)
3067 +    cache_p = false;
3068 +  if (cache_p)
3069 +    {
3070 +      cache = (cached_dw_loc_list *)
3071 +       htab_find_with_hash (cached_dw_loc_list_table, decl, DECL_UID (decl));
3072 +      if (cache)
3073 +       list = cache->loc_list;
3074 +    }
3075 +  if (list == NULL)
3076 +    {
3077 +      list = loc_list_from_tree (decl, decl_by_reference_p (decl) ? 0 : 2);
3078 +      /* It is usually worth caching this result if the decl is from
3079 +        BLOCK_NONLOCALIZED_VARS and if the list has at least two elements.  */
3080 +      if (cache_p && list && list->dw_loc_next)
3081 +       {
3082 +         slot = htab_find_slot_with_hash (cached_dw_loc_list_table, decl,
3083 +                                          DECL_UID (decl), INSERT);
3084 +         cache = ggc_alloc_cleared_cached_dw_loc_list ();
3085 +         cache->decl_id = DECL_UID (decl);
3086 +         cache->loc_list = list;
3087 +         *slot = cache;
3088 +       }
3089 +    }
3090    if (list)
3091      {
3092        add_AT_location_description (die, attr, list);
3093 @@ -18738,7 +18807,7 @@
3094          equate_decl_number_to_die (node, parm_die);
3095        if (! DECL_ABSTRACT (node_or_origin))
3096         add_location_or_const_value_attribute (parm_die, node_or_origin,
3097 -                                              DW_AT_location);
3098 +                                              node == NULL, DW_AT_location);
3099  
3100        break;
3101  
3102 @@ -18923,6 +18992,7 @@
3103    tree context;
3104    int was_abstract;
3105    htab_t old_decl_loc_table;
3106 +  htab_t old_cached_dw_loc_list_table;
3107  
3108    /* Make sure we have the actual abstract inline, not a clone.  */
3109    decl = DECL_ORIGIN (decl);
3110 @@ -18937,6 +19007,8 @@
3111       get locations in abstract instantces.  */
3112    old_decl_loc_table = decl_loc_table;
3113    decl_loc_table = NULL;
3114 +  old_cached_dw_loc_list_table = cached_dw_loc_list_table;
3115 +  cached_dw_loc_list_table = NULL;
3116  
3117    /* Be sure we've emitted the in-class declaration DIE (if any) first, so
3118       we don't get confused by DECL_ABSTRACT.  */
3119 @@ -18961,6 +19033,7 @@
3120  
3121    current_function_decl = save_fn;
3122    decl_loc_table = old_decl_loc_table;
3123 +  cached_dw_loc_list_table = old_cached_dw_loc_list_table;
3124    pop_cfun ();
3125  }
3126  
3127 @@ -19745,9 +19818,8 @@
3128            && !TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl_or_origin)))
3129         defer_location (decl_or_origin, var_die);
3130        else
3131 -        add_location_or_const_value_attribute (var_die,
3132 -                                              decl_or_origin,
3133 -                                              DW_AT_location);
3134 +        add_location_or_const_value_attribute (var_die, decl_or_origin,
3135 +                                              decl == NULL, DW_AT_location);
3136        add_pubname (decl_or_origin, var_die);
3137      }
3138    else
3139 @@ -21534,6 +21606,7 @@
3140    dwarf2out_decl (decl);
3141  
3142    htab_empty (decl_loc_table);
3143 +  htab_empty (cached_dw_loc_list_table);
3144  }
3145  
3146  /* Output a marker (i.e. a label) for the beginning of the generated code for
3147 @@ -22267,6 +22340,11 @@
3148    decl_loc_table = htab_create_ggc (10, decl_loc_table_hash,
3149                                     decl_loc_table_eq, NULL);
3150  
3151 +  /* Allocate the cached_dw_loc_list_table.  */
3152 +  cached_dw_loc_list_table
3153 +    = htab_create_ggc (10, cached_dw_loc_list_table_hash,
3154 +                      cached_dw_loc_list_table_eq, NULL);
3155 +
3156    /* Allocate the initial hunk of the decl_scope_table.  */
3157    decl_scope_table = VEC_alloc (tree, gc, 256);
3158  
3159 @@ -22907,30 +22985,53 @@
3160  {
3161    dw_die_ref c;
3162    dw_attr_ref a;
3163 -  dw_loc_list_ref *curr;
3164 +  dw_loc_list_ref *curr, *start, loc;
3165    unsigned ix;
3166  
3167    FOR_EACH_VEC_ELT (dw_attr_node, die->die_attr, ix, a)
3168      switch (AT_class (a))
3169        {
3170        case dw_val_class_loc_list:
3171 -       curr = AT_loc_list_ptr (a);
3172 -       while (*curr)
3173 +       start = curr = AT_loc_list_ptr (a);
3174 +       loc = *curr;
3175 +       gcc_assert (loc);
3176 +       /* The same list can be referenced more than once.  See if we have
3177 +          already recorded the result from a previous pass.  */
3178 +       if (loc->replaced)
3179 +         *curr = loc->dw_loc_next;
3180 +       else if (!loc->resolved_addr)
3181           {
3182 -           if (!resolve_addr_in_expr ((*curr)->expr))
3183 +           /* As things stand, we do not expect or allow one die to
3184 +              reference a suffix of another die's location list chain.
3185 +              References must be identical or completely separate.
3186 +              There is therefore no need to cache the result of this
3187 +              pass on any list other than the first; doing so
3188 +              would lead to unnecessary writes.  */
3189 +           while (*curr)
3190               {
3191 -               dw_loc_list_ref next = (*curr)->dw_loc_next;
3192 -               if (next && (*curr)->ll_symbol)
3193 +               gcc_assert (!(*curr)->replaced && !(*curr)->resolved_addr);
3194 +               if (!resolve_addr_in_expr ((*curr)->expr))
3195                   {
3196 -                   gcc_assert (!next->ll_symbol);
3197 -                   next->ll_symbol = (*curr)->ll_symbol;
3198 +                   dw_loc_list_ref next = (*curr)->dw_loc_next;
3199 +                   if (next && (*curr)->ll_symbol)
3200 +                     {
3201 +                       gcc_assert (!next->ll_symbol);
3202 +                       next->ll_symbol = (*curr)->ll_symbol;
3203 +                     }
3204 +                   *curr = next;
3205                   }
3206 -               *curr = next;
3207 +               else
3208 +                 curr = &(*curr)->dw_loc_next;
3209               }
3210 +           if (loc == *start)
3211 +             loc->resolved_addr = 1;
3212             else
3213 -             curr = &(*curr)->dw_loc_next;
3214 +             {
3215 +               loc->replaced = 1;
3216 +               loc->dw_loc_next = *start;
3217 +             }
3218           }
3219 -       if (!AT_loc_list (a))
3220 +       if (!*start)
3221           {
3222             remove_AT (die, a->dw_attr);
3223             ix--;
3224 @@ -23359,6 +23460,7 @@
3225        add_location_or_const_value_attribute (
3226          VEC_index (deferred_locations, deferred_locations_list, i)->die,
3227          VEC_index (deferred_locations, deferred_locations_list, i)->variable,
3228 +       false,
3229         DW_AT_location);
3230      }
3231  
3232 Index: gcc/ada/mlib-tgt-specific-darwin.adb
3233 ===================================================================
3234 --- gcc/ada/mlib-tgt-specific-darwin.adb        (.../tags/gcc_4_6_2_release)    (wersja 182550)
3235 +++ gcc/ada/mlib-tgt-specific-darwin.adb        (.../branches/gcc-4_6-branch)   (wersja 182550)
3236 @@ -36,8 +36,6 @@
3237  
3238     --  Non default subprograms
3239  
3240 -   function Archive_Indexer_Options return String_List_Access;
3241 -
3242     procedure Build_Dynamic_Library
3243       (Ofiles       : Argument_List;
3244        Options      : Argument_List;
3245 @@ -67,15 +65,6 @@
3246                        (1 => Flat_Namespace'Access,
3247                         2 => Shared_Libgcc'Access);
3248  
3249 -   -----------------------------
3250 -   -- Archive_Indexer_Options --
3251 -   -----------------------------
3252 -
3253 -   function Archive_Indexer_Options return String_List_Access is
3254 -   begin
3255 -      return new String_List'(1 => new String'("-c"));
3256 -   end Archive_Indexer_Options;
3257 -
3258     ---------------------------
3259     -- Build_Dynamic_Library --
3260     ---------------------------
3261 @@ -180,7 +169,6 @@
3262     end Is_Archive_Ext;
3263  
3264  begin
3265 -   Archive_Indexer_Options_Ptr := Archive_Indexer_Options'Access;
3266     Build_Dynamic_Library_Ptr := Build_Dynamic_Library'Access;
3267     DLL_Ext_Ptr := DLL_Ext'Access;
3268     Dynamic_Option_Ptr := Dynamic_Option'Access;
3269 Index: gcc/ada/init.c
3270 ===================================================================
3271 --- gcc/ada/init.c      (.../tags/gcc_4_6_2_release)    (wersja 182550)
3272 +++ gcc/ada/init.c      (.../branches/gcc-4_6-branch)   (wersja 182550)
3273 @@ -2216,12 +2216,33 @@
3274    return 0;
3275  }
3276  
3277 +#define HAVE_GNAT_ADJUST_CONTEXT_FOR_RAISE
3278 +
3279 +void
3280 +__gnat_adjust_context_for_raise (int signo ATTRIBUTE_UNUSED,
3281 +                                void *ucontext ATTRIBUTE_UNUSED)
3282 +{
3283 +#if defined (__x86_64__)
3284 +  /* Work around radar #10302855/pr50678, where the unwinders (libunwind or
3285 +     libgcc_s depending on the system revision) and the DWARF unwind data for
3286 +     the sigtramp have different ideas about register numbering (causing rbx
3287 +     and rdx to be transposed)..  */
3288 +  ucontext_t *uc = (ucontext_t *)ucontext ;
3289 +  unsigned long t = uc->uc_mcontext->__ss.__rbx;
3290 +
3291 +  uc->uc_mcontext->__ss.__rbx = uc->uc_mcontext->__ss.__rdx;
3292 +  uc->uc_mcontext->__ss.__rdx = t;
3293 +#endif
3294 +}
3295 +
3296  static void
3297 -__gnat_error_handler (int sig, siginfo_t *si, void *ucontext ATTRIBUTE_UNUSED)
3298 +__gnat_error_handler (int sig, siginfo_t *si, void *ucontext)
3299  {
3300    struct Exception_Data *exception;
3301    const char *msg;
3302  
3303 +  __gnat_adjust_context_for_raise (sig, ucontext);
3304 +
3305    switch (sig)
3306      {
3307      case SIGSEGV:
3308 Index: gcc/ada/ChangeLog
3309 ===================================================================
3310 --- gcc/ada/ChangeLog   (.../tags/gcc_4_6_2_release)    (wersja 182550)
3311 +++ gcc/ada/ChangeLog   (.../branches/gcc-4_6-branch)   (wersja 182550)
3312 @@ -1,3 +1,42 @@
3313 +2011-12-08  Eric Botcazou  <ebotcazou@adacore.com>
3314 +
3315 +       PR tree-optimization/51315
3316 +       Backport from mainline
3317 +       2011-09-25  Eric Botcazou  <ebotcazou@adacore.com>
3318 +
3319 +       * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Do not promote
3320 +       the alignment if this doesn't prevent BLKmode access to the object.
3321 +
3322 +2011-11-13  Iain Sandoe  <iains@gcc.gnu.org>
3323 +
3324 +       Backport from mainline r181474
3325 +       PR target/50678
3326 +       * init.c (__gnat_error_handler) [Darwin]: Move work-around to the
3327 +       bug filed as radar #10302855 from __gnat_error_handler ...
3328 +       ... to (__gnat_adjust_context_for_raise) [Darwin]: New.
3329 +       (HAVE_GNAT_ADJUST_CONTEXT_FOR_RAISE) [Darwin]: Define.
3330 +       (__gnat_error_handler) [Darwin]: Use __gnat_adjust_context_for_raise.
3331 +       
3332 +2011-11-18  Tristan Gingold  <gingold@adacore.com>
3333 +           Iain Sandoe  <iains@gcc.gnu.org>
3334 +
3335 +       PR target/49992
3336 +       * mlib-tgt-specific-darwin.adb (Archive_Indexer_Options): Remove.
3337 +       * gcc-interface/Makefile.in (darwin): Remove ranlib special-casing
3338 +       for Darwin.
3339 +
3340 +2011-11-13  Iain Sandoe  <iains@gcc.gnu.org>
3341 +
3342 +       Backport from mainline r181319
3343 +       * gcc-interface/Makefile.in (stamp-gnatlib-$(RTSDIR)): Don't link
3344 +       s-oscons.ads.
3345 +       (OSCONS_CPP, OSCONS_EXTRACT): New.
3346 +       (./bldtools/oscons/xoscons): New Target.
3347 +       ($(RTSDIR)/s-oscons.ads): New Target.
3348 +       (gnatlib): Depend on  $(RTSDIR)/s-oscons.ads.
3349 +       * Make-generated.in: Remove machinery to generate xoscons and
3350 +       ada/s-oscons.ads.
3351 +       
3352  2011-10-26  Release Manager
3353  
3354         * GCC 4.6.2 released.
3355 Index: gcc/ada/gcc-interface/Makefile.in
3356 ===================================================================
3357 --- gcc/ada/gcc-interface/Makefile.in   (.../tags/gcc_4_6_2_release)    (wersja 182550)
3358 +++ gcc/ada/gcc-interface/Makefile.in   (.../branches/gcc-4_6-branch)   (wersja 182550)
3359 @@ -2189,7 +2189,6 @@
3360  
3361    EH_MECHANISM=-gcc
3362    GNATLIB_SHARED = gnatlib-shared-darwin
3363 -  RANLIB = ranlib -c
3364    GMEM_LIB = gmemlib
3365    LIBRARY_VERSION := $(LIB_VERSION)
3366    soext = .dylib
3367 @@ -2447,21 +2446,52 @@
3368         $(foreach PAIR,$(LIBGNAT_TARGET_PAIRS), \
3369                   $(LN_S) $(fsrcpfx)ada/$(word 2,$(subst <, ,$(PAIR))) \
3370                         $(RTSDIR)/$(word 1,$(subst <, ,$(PAIR)));)
3371 -# Copy generated target dependent sources
3372 -       $(RM) $(RTSDIR)/s-oscons.ads
3373 -       (cd $(RTSDIR); $(LN_S) ../s-oscons.ads s-oscons.ads)
3374 +# Copy tsystem.h
3375 +       $(CP) $(srcdir)/tsystem.h $(RTSDIR)
3376         $(RM) ../stamp-gnatlib-$(RTSDIR)
3377         touch ../stamp-gnatlib1-$(RTSDIR)
3378  
3379  # GNULLI End #############################################################
3380  
3381 +ifeq ($(strip $(filter-out alpha64 ia64 dec hp vms% openvms% alphavms%,$(subst -, ,$(host)))),)
3382 +OSCONS_CPP=../../$(DECC) -E /comment=as_is -DNATIVE \
3383 +             -DTARGET='""$(target)""' $(fsrcpfx)ada/s-oscons-tmplt.c
3384 +
3385 +OSCONS_EXTRACT=../../$(DECC) -DNATIVE \
3386 +                 -DTARGET='""$(target)""' $(fsrcpfx)ada/s-oscons-tmplt.c ; \
3387 +  ld -o s-oscons-tmplt.exe s-oscons-tmplt.obj; \
3388 +  ./s-oscons-tmplt.exe > s-oscons-tmplt.s
3389 +
3390 +else
3391 +# GCC_FOR_TARGET has paths relative to the gcc directory, so we need to adjust
3392 +# for running it from $(RTSDIR)
3393 +OSCONS_CC=`echo "$(GCC_FOR_TARGET)" \
3394 +  | sed -e 's^\./xgcc^../../xgcc^' -e 's^-B./^-B../../^'`
3395 +OSCONS_CPP=$(OSCONS_CC) $(GNATLIBCFLAGS) -E -C \
3396 +  -DTARGET=\"$(target)\" $(fsrcpfx)ada/s-oscons-tmplt.c > s-oscons-tmplt.i
3397 +OSCONS_EXTRACT=$(OSCONS_CC) -S s-oscons-tmplt.i
3398 +endif
3399 +
3400 +./bldtools/oscons/xoscons: xoscons.adb xutil.ads xutil.adb
3401 +       -$(MKDIR) ./bldtools/oscons
3402 +       $(RM) $(addprefix ./bldtools/oscons/,$(notdir $^))
3403 +       $(CP) $^ ./bldtools/oscons
3404 +       (cd ./bldtools/oscons ; gnatmake -q xoscons)
3405 +
3406 +$(RTSDIR)/s-oscons.ads: ../stamp-gnatlib1-$(RTSDIR) s-oscons-tmplt.c gsocket.h ./bldtools/oscons/xoscons
3407 +       $(RM) $(RTSDIR)/s-oscons-tmplt.i $(RTSDIR)/s-oscons-tmplt.s
3408 +       (cd $(RTSDIR) ; \
3409 +           $(OSCONS_CPP) ; \
3410 +           $(OSCONS_EXTRACT) ; \
3411 +           ../bldtools/oscons/xoscons)
3412 +
3413  # Don't use semicolon separated shell commands that involve list expansions.
3414  # The semicolon triggers a call to DCL on VMS and DCL can't handle command
3415  # line lengths in excess of 256 characters.
3416  # Example: cd $(RTSDIR); ar rc libfoo.a $(LONG_LIST_OF_OBJS)
3417  # is guaranteed to overflow the buffer.
3418  
3419 -gnatlib: ../stamp-gnatlib1-$(RTSDIR) ../stamp-gnatlib2-$(RTSDIR)
3420 +gnatlib: ../stamp-gnatlib1-$(RTSDIR) ../stamp-gnatlib2-$(RTSDIR) $(RTSDIR)/s-oscons.ads
3421         $(MAKE) -C $(RTSDIR) \
3422                 CC="`echo \"$(GCC_FOR_TARGET)\" \
3423                 | sed -e 's,\./xgcc,../../xgcc,' -e 's,-B\./,-B../../,'`" \
3424 Index: gcc/ada/gcc-interface/decl.c
3425 ===================================================================
3426 --- gcc/ada/gcc-interface/decl.c        (.../tags/gcc_4_6_2_release)    (wersja 182550)
3427 +++ gcc/ada/gcc-interface/decl.c        (.../branches/gcc-4_6-branch)   (wersja 182550)
3428 @@ -808,16 +808,30 @@
3429                     && No (Address_Clause (gnat_entity))))
3430             && TREE_CODE (TYPE_SIZE (gnu_type)) == INTEGER_CST)
3431           {
3432 -           /* No point in jumping through all the hoops needed in order
3433 +           unsigned int size_cap, align_cap;
3434 +
3435 +           /* No point in promoting the alignment if this doesn't prevent
3436 +              BLKmode access to the object, in particular block copy, as
3437 +              this will for example disable the NRV optimization for it.
3438 +              No point in jumping through all the hoops needed in order
3439                to support BIGGEST_ALIGNMENT if we don't really have to.
3440                So we cap to the smallest alignment that corresponds to
3441                a known efficient memory access pattern of the target.  */
3442 -           unsigned int align_cap = Is_Atomic (gnat_entity)
3443 -                                    ? BIGGEST_ALIGNMENT
3444 -                                    : get_mode_alignment (ptr_mode);
3445 +           if (Is_Atomic (gnat_entity))
3446 +             {
3447 +               size_cap = UINT_MAX;
3448 +               align_cap = BIGGEST_ALIGNMENT;
3449 +             }
3450 +           else
3451 +             {
3452 +               size_cap = MAX_FIXED_MODE_SIZE;
3453 +               align_cap = get_mode_alignment (ptr_mode);
3454 +             }
3455  
3456             if (!host_integerp (TYPE_SIZE (gnu_type), 1)
3457 -               || compare_tree_int (TYPE_SIZE (gnu_type), align_cap) >= 0)
3458 +               || compare_tree_int (TYPE_SIZE (gnu_type), size_cap) > 0)
3459 +             align = 0;
3460 +           else if (compare_tree_int (TYPE_SIZE (gnu_type), align_cap) > 0)
3461               align = align_cap;
3462             else
3463               align = ceil_alignment (tree_low_cst (TYPE_SIZE (gnu_type), 1));
3464 Index: gcc/ada/Make-generated.in
3465 ===================================================================
3466 --- gcc/ada/Make-generated.in   (.../tags/gcc_4_6_2_release)    (wersja 182550)
3467 +++ gcc/ada/Make-generated.in   (.../branches/gcc-4_6-branch)   (wersja 182550)
3468 @@ -64,37 +64,6 @@
3469         $(CP) $^ $(ADA_GEN_SUBDIR)/bldtools/nmake_s
3470         (cd $(ADA_GEN_SUBDIR)/bldtools/nmake_s; gnatmake -q xnmake ; ./xnmake -s ../../nmake.ads )
3471  
3472 -ifeq ($(strip $(filter-out alpha64 ia64 dec hp vms% openvms% alphavms%,$(subst -, ,$(host)))),)
3473 -OSCONS_CPP=../../../$(DECC) -E /comment=as_is -DNATIVE \
3474 -             -DTARGET='""$(target)""' s-oscons-tmplt.c
3475 -
3476 -OSCONS_EXTRACT=../../../$(DECC) -DNATIVE \
3477 -                 -DTARGET='""$(target)""' s-oscons-tmplt.c ; \
3478 -  ld -o s-oscons-tmplt.exe s-oscons-tmplt.obj; \
3479 -  ./s-oscons-tmplt.exe > s-oscons-tmplt.s
3480 -
3481 -else
3482 -# GCC_FOR_TARGET has paths relative to the gcc directory, so we need to ajust
3483 -# for running it from $(ADA_GEN_SUBDIR)/bldtools/oscons
3484 -OSCONS_CC=`echo "$(GCC_FOR_TARGET)" \
3485 -  | sed -e 's^\./xgcc^../../../xgcc^' -e 's^-B./^-B../../../^'`
3486 -OSCONS_CPP=$(OSCONS_CC) $(GNATLIBCFLAGS) -E -C \
3487 -  -DTARGET=\"$(target)\" s-oscons-tmplt.c > s-oscons-tmplt.i
3488 -OSCONS_EXTRACT=$(OSCONS_CC) -S s-oscons-tmplt.i
3489 -endif
3490 -
3491 -$(ADA_GEN_SUBDIR)/s-oscons.ads : $(ADA_GEN_SUBDIR)/s-oscons-tmplt.c $(ADA_GEN_SUBDIR)/gsocket.h $(ADA_GEN_SUBDIR)/xoscons.adb $(ADA_GEN_SUBDIR)/xutil.ads $(ADA_GEN_SUBDIR)/xutil.adb
3492 -       -$(MKDIR) $(ADA_GEN_SUBDIR)/bldtools/oscons
3493 -       $(RM) $(addprefix $(ADA_GEN_SUBDIR)/bldtools/oscons/,$(notdir $^))
3494 -       $(CP) $^ $(ADA_GEN_SUBDIR)/bldtools/oscons
3495 -       (cd $(ADA_GEN_SUBDIR)/bldtools/oscons ; gnatmake -q xoscons ; \
3496 -               $(RM) s-oscons-tmplt.i s-oscons-tmplt.s ; \
3497 -               $(OSCONS_CPP) ; \
3498 -               $(OSCONS_EXTRACT) ; \
3499 -               ./xoscons ; \
3500 -               $(RM) ../../s-oscons.ads ; \
3501 -               $(CP) s-oscons.ads s-oscons.h ../../)
3502 -
3503  $(ADA_GEN_SUBDIR)/sdefault.adb: $(ADA_GEN_SUBDIR)/stamp-sdefault ; @true
3504  $(ADA_GEN_SUBDIR)/stamp-sdefault : $(srcdir)/version.c Makefile
3505         $(ECHO) "pragma Style_Checks (Off);" >tmp-sdefault.adb
3506 Index: gcc/lto-streamer-in.c
3507 ===================================================================
3508 --- gcc/lto-streamer-in.c       (.../tags/gcc_4_6_2_release)    (wersja 182550)
3509 +++ gcc/lto-streamer-in.c       (.../branches/gcc-4_6-branch)   (wersja 182550)
3510 @@ -1366,9 +1366,9 @@
3511  {
3512    const struct lto_function_header *header;
3513    struct data_in *data_in;
3514 -  int32_t cfg_offset;
3515 -  int32_t main_offset;
3516 -  int32_t string_offset;
3517 +  int cfg_offset;
3518 +  int main_offset;
3519 +  int string_offset;
3520    struct lto_input_block ib_cfg;
3521    struct lto_input_block ib_main;
3522  
3523 Index: gcc/c-decl.c
3524 ===================================================================
3525 --- gcc/c-decl.c        (.../tags/gcc_4_6_2_release)    (wersja 182550)
3526 +++ gcc/c-decl.c        (.../branches/gcc-4_6-branch)   (wersja 182550)
3527 @@ -721,7 +721,7 @@
3528  
3529           complete_array_type (&TREE_TYPE (decl), NULL_TREE, true);
3530  
3531 -         layout_decl (decl, 0);
3532 +         relayout_decl (decl);
3533         }
3534      }
3535  }
3536 @@ -1200,7 +1200,7 @@
3537               DECL_CHAIN (p) = BLOCK_VARS (block);
3538               BLOCK_VARS (block) = p;
3539             }
3540 -         else if (VAR_OR_FUNCTION_DECL_P (p))
3541 +         else if (VAR_OR_FUNCTION_DECL_P (p) && scope != file_scope)
3542             {
3543               /* For block local externs add a special
3544                  DECL_EXTERNAL decl for debug info generation.  */
3545 @@ -4261,7 +4261,7 @@
3546        if (DECL_INITIAL (decl))
3547         TREE_TYPE (DECL_INITIAL (decl)) = type;
3548  
3549 -      layout_decl (decl, 0);
3550 +      relayout_decl (decl);
3551      }
3552  
3553    if (TREE_CODE (decl) == VAR_DECL)
3554 Index: gcc/fortran/trans-array.c
3555 ===================================================================
3556 --- gcc/fortran/trans-array.c   (.../tags/gcc_4_6_2_release)    (wersja 182550)
3557 +++ gcc/fortran/trans-array.c   (.../branches/gcc-4_6-branch)   (wersja 182550)
3558 @@ -6772,8 +6772,17 @@
3559                               gfc_array_index_type, cond,
3560                               lbound, gfc_index_one_node);
3561      }
3562 -  else if (expr->expr_type == EXPR_VARIABLE)
3563 +
3564 +  if (expr->expr_type == EXPR_FUNCTION)
3565      {
3566 +      /* A conversion function, so use the argument.  */
3567 +      gcc_assert (expr->value.function.isym
3568 +                 && expr->value.function.isym->conversion);
3569 +      expr = expr->value.function.actual->expr;
3570 +    }
3571 +
3572 +  if (expr->expr_type == EXPR_VARIABLE)
3573 +    {
3574        tmp = TREE_TYPE (expr->symtree->n.sym->backend_decl);
3575        for (ref = expr->ref; ref; ref = ref->next)
3576         {
3577 @@ -6785,15 +6794,6 @@
3578         }
3579        return GFC_TYPE_ARRAY_LBOUND(tmp, dim);
3580      }
3581 -  else if (expr->expr_type == EXPR_FUNCTION)
3582 -    {
3583 -      /* A conversion function, so use the argument.  */
3584 -      expr = expr->value.function.actual->expr;
3585 -      if (expr->expr_type != EXPR_VARIABLE)
3586 -       return gfc_index_one_node;
3587 -      desc = TREE_TYPE (expr->symtree->n.sym->backend_decl);
3588 -      return get_std_lbound (expr, desc, dim, assumed_size);
3589 -    }
3590  
3591    return gfc_index_one_node;
3592  }
3593 Index: gcc/fortran/ChangeLog
3594 ===================================================================
3595 --- gcc/fortran/ChangeLog       (.../tags/gcc_4_6_2_release)    (wersja 182550)
3596 +++ gcc/fortran/ChangeLog       (.../branches/gcc-4_6-branch)   (wersja 182550)
3597 @@ -1,3 +1,64 @@
3598 +2011-12-15  Tobias Burnus  <burnus@net-b.de>
3599 +
3600 +       PR fortran/51550
3601 +       PR fortran/47545
3602 +       PR fortran/49050
3603 +       PR fortran/51075
3604 +       * resolve.c (resolve_fl_derived0): Print not-implemented error
3605 +       for deferred-length character components.
3606 +
3607 +2011-12-11  Tobias Burnus  <burnus@net-b.de>
3608 +
3609 +       PR fortran/50923
3610 +       * trans-decl.c (generate_local_decl): Set TREE_NO_WARNING only
3611 +       if the front end has printed a warning.
3612 +       (gfc_generate_function_code): Fix unset-result warning.
3613 +
3614 +2011-12-11  Thomas Koenig  <tkoenig@gcc.gnu.org>
3615 +
3616 +       PR fortran/51338
3617 +       Backport from trunk
3618 +       * dependency.c (are_identical_variables):  Handle case where
3619 +       end fields of substring references are NULL.
3620 +
3621 +2011-12-08  Toon Moene  <toon@moene.org>
3622 +
3623 +       PR fortran/51310
3624 +       * invoke.texi: Itemize the cases for which
3625 +       -finit-<type>=<constant> doesn't work.
3626 +
3627 +2011-12-08  Tobias Burnus  <burnus@net-b.de>
3628 +
3629 +       PR fortran/51448
3630 +       * fortran/trans-array.c (get_std_lbound): Fix handling of
3631 +       conversion functions.
3632 +
3633 +2011-12-06  Tobias Burnus  <burnus@net-b.de>
3634 +
3635 +       PR fortran/51435
3636 +       * expr.c (gfc_has_default_initializer): Fix handling of
3637 +       DT with initialized pointer components.
3638 +
3639 +2011-12-03  Tobias Burnus  <burnus@net-b.de>
3640 +
3641 +       PR fortran/50684
3642 +       * check.c (variable_check): Fix intent(in) check.
3643 +
3644 +2011-11-25  Tobias Burnus  <burnus@net-b.de>
3645 +
3646 +       PR fortran/50408
3647 +       * trans-decl.c (gfc_get_module_backend_decl): Also copy
3648 +       ts.u.derived from the gsym if the ts.type is BT_CLASS.
3649 +       (gfc_get_extern_function_decl): Copy also the backend_decl
3650 +       for the symbol's ts.u.{derived,cl} from the gsym.
3651 +       * trans-types.c (gfc_copy_dt_decls_ifequal): Directly
3652 +       return if "from" and "to" are the same.
3653 +
3654 +2011-11-24  Tobias Burnus  <burnus@net-b.de>
3655 +
3656 +       PR fortran/51218
3657 +       * gfortran.dg/implicit_pure_1.f90: New.
3658 +
3659  2011-10-26  Release Manager
3660  
3661         * GCC 4.6.2 released.
3662 Index: gcc/fortran/expr.c
3663 ===================================================================
3664 --- gcc/fortran/expr.c  (.../tags/gcc_4_6_2_release)    (wersja 182550)
3665 +++ gcc/fortran/expr.c  (.../branches/gcc-4_6-branch)   (wersja 182550)
3666 @@ -3679,6 +3679,8 @@
3667          if (!c->attr.pointer
3668              && gfc_has_default_initializer (c->ts.u.derived))
3669           return true;
3670 +       if (c->attr.pointer && c->initializer)
3671 +         return true;
3672        }
3673      else
3674        {
3675 @@ -3689,6 +3691,7 @@
3676    return false;
3677  }
3678  
3679 +
3680  /* Get an expression for a default initializer.  */
3681  
3682  gfc_expr *
3683 Index: gcc/fortran/invoke.texi
3684 ===================================================================
3685 --- gcc/fortran/invoke.texi     (.../tags/gcc_4_6_2_release)    (wersja 182550)
3686 +++ gcc/fortran/invoke.texi     (.../branches/gcc-4_6-branch)   (wersja 182550)
3687 @@ -1438,10 +1438,18 @@
3688  the real and imaginary parts of local @code{COMPLEX} variables),
3689  @option{-finit-logical=@var{<true|false>}}, and
3690  @option{-finit-character=@var{n}} (where @var{n} is an ASCII character
3691 -value) options.  These options do not initialize components of derived
3692 -type variables, nor do they initialize variables that appear in an
3693 -@code{EQUIVALENCE} statement.  (This limitation may be removed in
3694 -future releases).
3695 +value) options.  These options do not initialize
3696 +@itemize @bullet
3697 +@item
3698 +automatic arrays
3699 +@item
3700 +allocatable arrays
3701 +@item
3702 +components of derived type variables
3703 +@item
3704 +variables that appear in an @code{EQUIVALENCE} statement.
3705 +@end itemize
3706 +(These limitations may be removed in future releases).
3707  
3708  Note that the @option{-finit-real=nan} option initializes @code{REAL}
3709  and @code{COMPLEX} variables with a quiet NaN. For a signalling NaN
3710 Index: gcc/fortran/trans-types.c
3711 ===================================================================
3712 --- gcc/fortran/trans-types.c   (.../tags/gcc_4_6_2_release)    (wersja 182550)
3713 +++ gcc/fortran/trans-types.c   (.../branches/gcc-4_6-branch)   (wersja 182550)
3714 @@ -2092,6 +2092,9 @@
3715    gfc_component *to_cm;
3716    gfc_component *from_cm;
3717  
3718 +  if (from == to)
3719 +    return 1;
3720 +
3721    if (from->backend_decl == NULL
3722         || !gfc_compare_derived_types (from, to))
3723      return 0;
3724 Index: gcc/fortran/resolve.c
3725 ===================================================================
3726 --- gcc/fortran/resolve.c       (.../tags/gcc_4_6_2_release)    (wersja 182550)
3727 +++ gcc/fortran/resolve.c       (.../branches/gcc-4_6-branch)   (wersja 182550)
3728 @@ -3132,11 +3132,11 @@
3729                      "procedure within a PURE procedure", name, &expr->where);
3730           t = FAILURE;
3731         }
3732 +
3733 +      if (gfc_implicit_pure (NULL))
3734 +       gfc_current_ns->proc_name->attr.implicit_pure = 0;
3735      }
3736  
3737 -  if (!pure_function (expr, &name) && name && gfc_implicit_pure (NULL))
3738 -    gfc_current_ns->proc_name->attr.implicit_pure = 0;
3739 -
3740    /* Functions without the RECURSIVE attribution are not allowed to
3741     * call themselves.  */
3742    if (expr->value.function.esym && !expr->value.function.esym->attr.recursive)
3743 @@ -3195,6 +3195,9 @@
3744    else if (gfc_pure (NULL))
3745      gfc_error ("Subroutine call to '%s' at %L is not PURE", sym->name,
3746                &c->loc);
3747 +
3748 +  if (gfc_implicit_pure (NULL))
3749 +    gfc_current_ns->proc_name->attr.implicit_pure = 0;
3750  }
3751  
3752  
3753 @@ -11394,6 +11397,14 @@
3754  
3755    for (c = sym->components; c != NULL; c = c->next)
3756      {
3757 +      /* See PRs 51550, 47545, 48654, 49050, 51075 - and 45170.  */
3758 +      if (c->ts.type == BT_CHARACTER && c->ts.deferred)
3759 +       {
3760 +         gfc_error ("Deferred-length character component '%s' at %L is not "
3761 +                    "yet supported", c->name, &c->loc);
3762 +         return FAILURE;
3763 +       }
3764 +
3765        /* F2008, C442.  */
3766        if (c->attr.codimension /* FIXME: c->as check due to PR 43412.  */
3767           && (!c->attr.allocatable || (c->as && c->as->type != AS_DEFERRED)))
3768 Index: gcc/fortran/trans-decl.c
3769 ===================================================================
3770 --- gcc/fortran/trans-decl.c    (.../tags/gcc_4_6_2_release)    (wersja 182550)
3771 +++ gcc/fortran/trans-decl.c    (.../branches/gcc-4_6-branch)   (wersja 182550)
3772 @@ -677,7 +677,7 @@
3773         }
3774        else if (s->backend_decl)
3775         {
3776 -         if (sym->ts.type == BT_DERIVED)
3777 +         if (sym->ts.type == BT_DERIVED || sym->ts.type == BT_CLASS)
3778             gfc_copy_dt_decls_ifequal (s->ts.u.derived, sym->ts.u.derived,
3779                                        true);
3780           else if (sym->ts.type == BT_CHARACTER)
3781 @@ -1602,6 +1602,11 @@
3782        gfc_find_symbol (sym->name, gsym->ns, 0, &s);
3783        if (s && s->backend_decl)
3784         {
3785 +         if (sym->ts.type == BT_DERIVED || sym->ts.type == BT_CLASS)
3786 +           gfc_copy_dt_decls_ifequal (s->ts.u.derived, sym->ts.u.derived,
3787 +                                      true);
3788 +         else if (sym->ts.type == BT_CHARACTER)
3789 +           sym->ts.u.cl->backend_decl = s->ts.u.cl->backend_decl;
3790           sym->backend_decl = s->backend_decl;
3791           return sym->backend_decl;
3792         }
3793 @@ -4179,10 +4184,16 @@
3794                              "declared INTENT(OUT) but was not set and "
3795                              "does not have a default initializer",
3796                              sym->name, &sym->declared_at);
3797 +             if (sym->backend_decl != NULL_TREE)
3798 +               TREE_NO_WARNING(sym->backend_decl) = 1;
3799             }
3800           else if (gfc_option.warn_unused_dummy_argument)
3801 -           gfc_warning ("Unused dummy argument '%s' at %L", sym->name,
3802 +           {
3803 +             gfc_warning ("Unused dummy argument '%s' at %L", sym->name,
3804                          &sym->declared_at);
3805 +             if (sym->backend_decl != NULL_TREE)
3806 +               TREE_NO_WARNING(sym->backend_decl) = 1;
3807 +           }
3808         }
3809  
3810        /* Warn for unused variables, but not if they're inside a common
3811 @@ -4227,11 +4238,6 @@
3812         mark the symbol now, as well as in traverse_ns, to prevent
3813         getting stuck in a circular dependency.  */
3814        sym->mark = 1;
3815 -
3816 -      /* We do not want the middle-end to warn about unused parameters
3817 -         as this was already done above.  */
3818 -      if (sym->attr.dummy && sym->backend_decl != NULL_TREE)
3819 -         TREE_NO_WARNING(sym->backend_decl) = 1;
3820      }
3821    else if (sym->attr.flavor == FL_PARAMETER)
3822      {
3823 @@ -4846,11 +4852,11 @@
3824        if (result == NULL_TREE)
3825         {
3826           /* TODO: move to the appropriate place in resolve.c.  */
3827 -         if (warn_return_type && !sym->attr.referenced && sym == sym->result)
3828 +         if (warn_return_type && sym == sym->result)
3829             gfc_warning ("Return value of function '%s' at %L not set",
3830                          sym->name, &sym->declared_at);
3831 -
3832 -         TREE_NO_WARNING(sym->backend_decl) = 1;
3833 +         if (warn_return_type)
3834 +           TREE_NO_WARNING(sym->backend_decl) = 1;
3835         }
3836        else
3837         gfc_add_expr_to_block (&body, gfc_generate_return ());
3838 Index: gcc/fortran/check.c
3839 ===================================================================
3840 --- gcc/fortran/check.c (.../tags/gcc_4_6_2_release)    (wersja 182550)
3841 +++ gcc/fortran/check.c (.../branches/gcc-4_6-branch)   (wersja 182550)
3842 @@ -485,10 +485,31 @@
3843        && (gfc_current_intrinsic_arg[n]->intent == INTENT_OUT
3844           || gfc_current_intrinsic_arg[n]->intent == INTENT_INOUT))
3845      {
3846 -      gfc_error ("'%s' argument of '%s' intrinsic at %L cannot be INTENT(IN)",
3847 -                gfc_current_intrinsic_arg[n]->name, gfc_current_intrinsic,
3848 -                &e->where);
3849 -      return FAILURE;
3850 +      gfc_ref *ref;
3851 +      bool pointer = e->symtree->n.sym->ts.type == BT_CLASS
3852 +                    && CLASS_DATA (e->symtree->n.sym)
3853 +                    ? CLASS_DATA (e->symtree->n.sym)->attr.class_pointer
3854 +                    : e->symtree->n.sym->attr.pointer;
3855 +
3856 +      for (ref = e->ref; ref; ref = ref->next)
3857 +       {
3858 +         if (pointer && ref->type == REF_COMPONENT)
3859 +           break;
3860 +         if (ref->type == REF_COMPONENT
3861 +             && ((ref->u.c.component->ts.type == BT_CLASS
3862 +                  && CLASS_DATA (ref->u.c.component)->attr.class_pointer)
3863 +                 || (ref->u.c.component->ts.type != BT_CLASS
3864 +                     && ref->u.c.component->attr.pointer)))
3865 +           break;
3866 +       } 
3867 +
3868 +      if (!ref)
3869 +       {
3870 +         gfc_error ("'%s' argument of '%s' intrinsic at %L cannot be "
3871 +                    "INTENT(IN)", gfc_current_intrinsic_arg[n]->name,
3872 +                    gfc_current_intrinsic, &e->where);
3873 +         return FAILURE;
3874 +       }
3875      }
3876  
3877    if (e->expr_type == EXPR_VARIABLE
3878 Index: gcc/fortran/dependency.c
3879 ===================================================================
3880 --- gcc/fortran/dependency.c    (.../tags/gcc_4_6_2_release)    (wersja 182550)
3881 +++ gcc/fortran/dependency.c    (.../branches/gcc-4_6-branch)   (wersja 182550)
3882 @@ -163,9 +163,19 @@
3883           break;
3884  
3885         case REF_SUBSTRING:
3886 -         if (gfc_dep_compare_expr (r1->u.ss.start, r2->u.ss.start) != 0
3887 -             || gfc_dep_compare_expr (r1->u.ss.end, r2->u.ss.end) != 0)
3888 +         if (gfc_dep_compare_expr (r1->u.ss.start, r2->u.ss.start) != 0)
3889             return false;
3890 +
3891 +         /* If both are NULL, the end length compares equal, because we
3892 +            are looking at the same variable. This can only happen for
3893 +            assumed- or deferred-length character arguments.  */ 
3894 +
3895 +         if (r1->u.ss.end == NULL && r2->u.ss.end == NULL)
3896 +           break;
3897 +
3898 +         if (gfc_dep_compare_expr (r1->u.ss.end, r2->u.ss.end) != 0)
3899 +           return false;
3900 +         
3901           break;
3902  
3903         default:
3904 Index: gcc/regmove.c
3905 ===================================================================
3906 --- gcc/regmove.c       (.../tags/gcc_4_6_2_release)    (wersja 182550)
3907 +++ gcc/regmove.c       (.../branches/gcc-4_6-branch)   (wersja 182550)
3908 @@ -860,7 +860,7 @@
3909           if (REG_N_CALLS_CROSSED (REGNO (src)) == 0)
3910             break;
3911  
3912 -         if (call_used_regs [REGNO (dst)]
3913 +         if ((HARD_REGISTER_P (dst) && call_used_regs [REGNO (dst)])
3914               || find_reg_fusage (p, CLOBBER, dst))
3915             break;
3916         }
3917 Index: gcc/configure.ac
3918 ===================================================================
3919 --- gcc/configure.ac    (.../tags/gcc_4_6_2_release)    (wersja 182550)
3920 +++ gcc/configure.ac    (.../branches/gcc-4_6-branch)   (wersja 182550)
3921 @@ -807,17 +807,7 @@
3922  gcc_AC_PROG_LN_S
3923  ACX_PROG_LN($LN_S)
3924  AC_PROG_RANLIB
3925 -case "${host}" in
3926 -*-*-darwin*)
3927 -  # By default, the Darwin ranlib will not treat common symbols as
3928 -  # definitions when  building the archive table of contents.  Other 
3929 -  # ranlibs do that; pass an option to the Darwin ranlib that makes
3930 -  # it behave similarly.
3931 -  ranlib_flags="-c" 
3932 -  ;;
3933 -*)
3934 -  ranlib_flags=""
3935 -esac
3936 +ranlib_flags=""
3937  AC_SUBST(ranlib_flags)
3938       
3939  gcc_AC_PROG_INSTALL
3940 Index: gcc/BASE-VER
3941 ===================================================================
3942 --- gcc/BASE-VER        (.../tags/gcc_4_6_2_release)    (wersja 182550)
3943 +++ gcc/BASE-VER        (.../branches/gcc-4_6-branch)   (wersja 182550)
3944 @@ -1 +1 @@
3945 -4.6.2
3946 +4.6.3
3947 Index: gcc/df.h
3948 ===================================================================
3949 --- gcc/df.h    (.../tags/gcc_4_6_2_release)    (wersja 182550)
3950 +++ gcc/df.h    (.../branches/gcc-4_6-branch)   (wersja 182550)
3951 @@ -53,7 +53,7 @@
3952  #define DF_RD      3      /* Reaching Defs. */
3953  #define DF_CHAIN   4      /* Def-Use and/or Use-Def Chains. */
3954  #define DF_WORD_LR 5      /* Subreg tracking lr.  */
3955 -#define DF_NOTE    6      /* REG_DEF and REG_UNUSED notes. */
3956 +#define DF_NOTE    6      /* REG_DEAD and REG_UNUSED notes.  */
3957  #define DF_MD      7      /* Multiple Definitions. */
3958  
3959  #define DF_LAST_PROBLEM_PLUS1 (DF_MD + 1)
3960 Index: gcc/lto-section-in.c
3961 ===================================================================
3962 --- gcc/lto-section-in.c        (.../tags/gcc_4_6_2_release)    (wersja 182550)
3963 +++ gcc/lto-section-in.c        (.../branches/gcc-4_6-branch)   (wersja 182550)
3964 @@ -296,7 +296,7 @@
3965      = (const struct lto_simple_header *) data;
3966  
3967    struct lto_input_block* ib_main;
3968 -  int32_t main_offset = sizeof (struct lto_simple_header);
3969 +  int main_offset = sizeof (struct lto_simple_header);
3970  
3971    if (!data)
3972      return NULL;
3973 Index: gcc/tree-vect-data-refs.c
3974 ===================================================================
3975 --- gcc/tree-vect-data-refs.c   (.../tags/gcc_4_6_2_release)    (wersja 182550)
3976 +++ gcc/tree-vect-data-refs.c   (.../branches/gcc-4_6-branch)   (wersja 182550)
3977 @@ -2631,6 +2631,16 @@
3978            return false;
3979          }
3980  
3981 +      if (is_gimple_call (stmt))
3982 +       {
3983 +         if (vect_print_dump_info (REPORT_UNVECTORIZED_LOCATIONS))
3984 +           {
3985 +             fprintf (vect_dump, "not vectorized: dr in a call ");
3986 +             print_gimple_stmt (vect_dump, stmt, 0, TDF_SLIM);
3987 +           }
3988 +         return false;
3989 +       }
3990 +
3991        /* Update DR field in stmt_vec_info struct.  */
3992  
3993        /* If the dataref is in an inner-loop of the loop that is considered for
3994 Index: gcc/c-typeck.c
3995 ===================================================================
3996 --- gcc/c-typeck.c      (.../tags/gcc_4_6_2_release)    (wersja 182550)
3997 +++ gcc/c-typeck.c      (.../branches/gcc-4_6-branch)   (wersja 182550)
3998 @@ -3802,11 +3802,7 @@
3999        if (val && TREE_CODE (val) == INDIRECT_REF
4000            && TREE_CONSTANT (TREE_OPERAND (val, 0)))
4001         {
4002 -         tree op0 = fold_convert_loc (location, sizetype,
4003 -                                      fold_offsetof (arg, val)), op1;
4004 -
4005 -         op1 = fold_convert_loc (location, argtype, TREE_OPERAND (val, 0));
4006 -         ret = fold_build2_loc (location, POINTER_PLUS_EXPR, argtype, op1, op0);
4007 +         ret = fold_convert_loc (location, argtype, fold_offsetof_1 (arg));
4008           goto return_build_unary_op;
4009         }
4010  
4011 Index: gcc/calls.c
4012 ===================================================================
4013 --- gcc/calls.c (.../tags/gcc_4_6_2_release)    (wersja 182550)
4014 +++ gcc/calls.c (.../branches/gcc-4_6-branch)   (wersja 182550)
4015 @@ -1548,6 +1548,131 @@
4016    return funexp;
4017  }
4018  
4019 +/* Internal state for internal_arg_pointer_based_exp and its helpers.  */
4020 +static struct
4021 +{
4022 +  /* Last insn that has been scanned by internal_arg_pointer_based_exp_scan,
4023 +     or NULL_RTX if none has been scanned yet.  */
4024 +  rtx scan_start;
4025 +  /* Vector indexed by REGNO - FIRST_PSEUDO_REGISTER, recording if a pseudo is
4026 +     based on crtl->args.internal_arg_pointer.  The element is NULL_RTX if the
4027 +     pseudo isn't based on it, a CONST_INT offset if the pseudo is based on it
4028 +     with fixed offset, or PC if this is with variable or unknown offset.  */
4029 +  VEC(rtx, heap) *cache;
4030 +} internal_arg_pointer_exp_state;
4031 +
4032 +static rtx internal_arg_pointer_based_exp (rtx, bool);
4033 +
4034 +/* Helper function for internal_arg_pointer_based_exp.  Scan insns in
4035 +   the tail call sequence, starting with first insn that hasn't been
4036 +   scanned yet, and note for each pseudo on the LHS whether it is based
4037 +   on crtl->args.internal_arg_pointer or not, and what offset from that
4038 +   that pointer it has.  */
4039 +
4040 +static void
4041 +internal_arg_pointer_based_exp_scan (void)
4042 +{
4043 +  rtx insn, scan_start = internal_arg_pointer_exp_state.scan_start;
4044 +
4045 +  if (scan_start == NULL_RTX)
4046 +    insn = get_insns ();
4047 +  else
4048 +    insn = NEXT_INSN (scan_start);
4049 +
4050 +  while (insn)
4051 +    {
4052 +      rtx set = single_set (insn);
4053 +      if (set && REG_P (SET_DEST (set)) && !HARD_REGISTER_P (SET_DEST (set)))
4054 +       {
4055 +         rtx val = NULL_RTX;
4056 +         unsigned int idx = REGNO (SET_DEST (set)) - FIRST_PSEUDO_REGISTER;
4057 +         /* Punt on pseudos set multiple times.  */
4058 +         if (idx < VEC_length (rtx, internal_arg_pointer_exp_state.cache)
4059 +             && (VEC_index (rtx, internal_arg_pointer_exp_state.cache, idx)
4060 +                 != NULL_RTX))
4061 +           val = pc_rtx;
4062 +         else
4063 +           val = internal_arg_pointer_based_exp (SET_SRC (set), false);
4064 +         if (val != NULL_RTX)
4065 +           {
4066 +             if (idx
4067 +                 >= VEC_length (rtx, internal_arg_pointer_exp_state.cache))
4068 +               VEC_safe_grow_cleared (rtx, heap,
4069 +                                      internal_arg_pointer_exp_state.cache,
4070 +                                      idx + 1);
4071 +             VEC_replace (rtx, internal_arg_pointer_exp_state.cache,
4072 +                          idx, val);
4073 +           }
4074 +       }
4075 +      if (NEXT_INSN (insn) == NULL_RTX)
4076 +       scan_start = insn;
4077 +      insn = NEXT_INSN (insn);
4078 +    }
4079 +
4080 +  internal_arg_pointer_exp_state.scan_start = scan_start;
4081 +}
4082 +
4083 +/* Helper function for internal_arg_pointer_based_exp, called through
4084 +   for_each_rtx.  Return 1 if *LOC is a register based on
4085 +   crtl->args.internal_arg_pointer.  Return -1 if *LOC is not based on it
4086 +   and the subexpressions need not be examined.  Otherwise return 0.  */
4087 +
4088 +static int
4089 +internal_arg_pointer_based_exp_1 (rtx *loc, void *data ATTRIBUTE_UNUSED)
4090 +{
4091 +  if (REG_P (*loc) && internal_arg_pointer_based_exp (*loc, false) != NULL_RTX)
4092 +    return 1;
4093 +  if (MEM_P (*loc))
4094 +    return -1;
4095 +  return 0;
4096 +}
4097 +
4098 +/* Compute whether RTL is based on crtl->args.internal_arg_pointer.  Return
4099 +   NULL_RTX if RTL isn't based on it, a CONST_INT offset if RTL is based on
4100 +   it with fixed offset, or PC if this is with variable or unknown offset.
4101 +   TOPLEVEL is true if the function is invoked at the topmost level.  */
4102 +
4103 +static rtx
4104 +internal_arg_pointer_based_exp (rtx rtl, bool toplevel)
4105 +{
4106 +  if (CONSTANT_P (rtl))
4107 +    return NULL_RTX;
4108 +
4109 +  if (rtl == crtl->args.internal_arg_pointer)
4110 +    return const0_rtx;
4111 +
4112 +  if (REG_P (rtl) && HARD_REGISTER_P (rtl))
4113 +    return NULL_RTX;
4114 +
4115 +  if (GET_CODE (rtl) == PLUS && CONST_INT_P (XEXP (rtl, 1)))
4116 +    {
4117 +      rtx val = internal_arg_pointer_based_exp (XEXP (rtl, 0), toplevel);
4118 +      if (val == NULL_RTX || val == pc_rtx)
4119 +       return val;
4120 +      return plus_constant (val, INTVAL (XEXP (rtl, 1)));
4121 +    }
4122 +
4123 +  /* When called at the topmost level, scan pseudo assignments in between the
4124 +     last scanned instruction in the tail call sequence and the latest insn
4125 +     in that sequence.  */
4126 +  if (toplevel)
4127 +    internal_arg_pointer_based_exp_scan ();
4128 +
4129 +  if (REG_P (rtl))
4130 +    {
4131 +      unsigned int idx = REGNO (rtl) - FIRST_PSEUDO_REGISTER;
4132 +      if (idx < VEC_length (rtx, internal_arg_pointer_exp_state.cache))
4133 +       return VEC_index (rtx, internal_arg_pointer_exp_state.cache, idx);
4134 +
4135 +      return NULL_RTX;
4136 +    }
4137 +
4138 +  if (for_each_rtx (&rtl, internal_arg_pointer_based_exp_1, NULL))
4139 +    return pc_rtx;
4140 +
4141 +  return NULL_RTX;
4142 +}
4143 +
4144  /* Return true if and only if SIZE storage units (usually bytes)
4145     starting from address ADDR overlap with already clobbered argument
4146     area.  This function is used to determine if we should give up a
4147 @@ -1557,20 +1682,17 @@
4148  mem_overlaps_already_clobbered_arg_p (rtx addr, unsigned HOST_WIDE_INT size)
4149  {
4150    HOST_WIDE_INT i;
4151 +  rtx val;
4152  
4153 -  if (addr == crtl->args.internal_arg_pointer)
4154 -    i = 0;
4155 -  else if (GET_CODE (addr) == PLUS
4156 -          && XEXP (addr, 0) == crtl->args.internal_arg_pointer
4157 -          && CONST_INT_P (XEXP (addr, 1)))
4158 -    i = INTVAL (XEXP (addr, 1));
4159 -  /* Return true for arg pointer based indexed addressing.  */
4160 -  else if (GET_CODE (addr) == PLUS
4161 -          && (XEXP (addr, 0) == crtl->args.internal_arg_pointer
4162 -              || XEXP (addr, 1) == crtl->args.internal_arg_pointer))
4163 +  if (sbitmap_empty_p (stored_args_map))
4164 +    return false;
4165 +  val = internal_arg_pointer_based_exp (addr, true);
4166 +  if (val == NULL_RTX)
4167 +    return false;
4168 +  else if (val == pc_rtx)
4169      return true;
4170    else
4171 -    return false;
4172 +    i = INTVAL (val);
4173  
4174  #ifdef ARGS_GROW_DOWNWARD
4175    i = -i - size;
4176 @@ -3175,6 +3297,8 @@
4177             }
4178  
4179           sbitmap_free (stored_args_map);
4180 +         internal_arg_pointer_exp_state.scan_start = NULL_RTX;
4181 +         VEC_free (rtx, heap, internal_arg_pointer_exp_state.cache);
4182         }
4183        else
4184         {
4185 Index: gcc/cfgcleanup.c
4186 ===================================================================
4187 --- gcc/cfgcleanup.c    (.../tags/gcc_4_6_2_release)    (wersja 182550)
4188 +++ gcc/cfgcleanup.c    (.../branches/gcc-4_6-branch)   (wersja 182550)
4189 @@ -1969,7 +1969,14 @@
4190  
4191    cond = get_condition (jump, &move_before, true, false);
4192    if (cond == NULL_RTX)
4193 -    move_before = jump;
4194 +    {
4195 +#ifdef HAVE_cc0
4196 +      if (reg_mentioned_p (cc0_rtx, jump))
4197 +       move_before = prev_nonnote_nondebug_insn (jump);
4198 +      else
4199 +#endif
4200 +       move_before = jump;
4201 +    }
4202  
4203    for (ix = 0; ix < nedges; ix++)
4204      if (EDGE_SUCC (bb, ix)->dest == EXIT_BLOCK_PTR)
4205 @@ -2131,7 +2138,14 @@
4206        jump = BB_END (final_dest_bb);
4207        cond = get_condition (jump, &move_before, true, false);
4208        if (cond == NULL_RTX)
4209 -       move_before = jump;
4210 +       {
4211 +#ifdef HAVE_cc0
4212 +         if (reg_mentioned_p (cc0_rtx, jump))
4213 +           move_before = prev_nonnote_nondebug_insn (jump);
4214 +         else
4215 +#endif
4216 +           move_before = jump;
4217 +       }
4218      }
4219  
4220    do
4221 Index: gcc/simplify-rtx.c
4222 ===================================================================
4223 --- gcc/simplify-rtx.c  (.../tags/gcc_4_6_2_release)    (wersja 182550)
4224 +++ gcc/simplify-rtx.c  (.../branches/gcc-4_6-branch)   (wersja 182550)
4225 @@ -4177,10 +4177,20 @@
4226      {
4227        rtx x = XEXP (op0, 0);
4228        rtx c = XEXP (op0, 1);
4229 +      enum rtx_code invcode = op0code == PLUS ? MINUS : PLUS;
4230 +      rtx tem = simplify_gen_binary (invcode, cmp_mode, op1, c);
4231  
4232 -      c = simplify_gen_binary (op0code == PLUS ? MINUS : PLUS,
4233 -                              cmp_mode, op1, c);
4234 -      return simplify_gen_relational (code, mode, cmp_mode, x, c);
4235 +      /* Detect an infinite recursive condition, where we oscillate at this
4236 +        simplification case between:
4237 +           A + B == C  <--->  C - B == A,
4238 +        where A, B, and C are all constants with non-simplifiable expressions,
4239 +        usually SYMBOL_REFs.  */
4240 +      if (GET_CODE (tem) == invcode
4241 +         && CONSTANT_P (x)
4242 +         && rtx_equal_p (c, XEXP (tem, 1)))
4243 +       return NULL_RTX;
4244 +
4245 +      return simplify_gen_relational (code, mode, cmp_mode, x, tem);
4246      }
4247  
4248    /* (ne:SI (zero_extract:SI FOO (const_int 1) BAR) (const_int 0))) is
4249 Index: gcc/tree-sra.c
4250 ===================================================================
4251 --- gcc/tree-sra.c      (.../tags/gcc_4_6_2_release)    (wersja 182550)
4252 +++ gcc/tree-sra.c      (.../branches/gcc-4_6-branch)   (wersja 182550)
4253 @@ -1020,26 +1020,28 @@
4254    return false;
4255  }
4256  
4257 -/* Return true iff type of EXP is not sufficiently aligned.  */
4258 +/* Return true if EXP is a memory reference less aligned than ALIGN.  This is
4259 +   invoked only on strict-alignment targets.  */
4260  
4261  static bool
4262 -tree_non_mode_aligned_mem_p (tree exp)
4263 +tree_non_aligned_mem_p (tree exp, unsigned int align)
4264  {
4265 -  enum machine_mode mode = TYPE_MODE (TREE_TYPE (exp));
4266 -  unsigned int align;
4267 +  unsigned int exp_align;
4268  
4269    if (TREE_CODE (exp) == VIEW_CONVERT_EXPR)
4270      exp = TREE_OPERAND (exp, 0);
4271  
4272 -  if (TREE_CODE (exp) == SSA_NAME
4273 -      || TREE_CODE (exp) == MEM_REF
4274 -      || mode == BLKmode
4275 -      || is_gimple_min_invariant (exp)
4276 -      || !STRICT_ALIGNMENT)
4277 +  if (TREE_CODE (exp) == SSA_NAME || is_gimple_min_invariant (exp))
4278      return false;
4279  
4280 -  align = get_object_alignment (exp, BIGGEST_ALIGNMENT);
4281 -  if (GET_MODE_ALIGNMENT (mode) > align)
4282 +  /* get_object_alignment will fall back to BITS_PER_UNIT if it cannot
4283 +     compute an explicit alignment.  Pretend that dereferenced pointers
4284 +     are always aligned on strict-alignment targets.  */
4285 +  exp_align = get_object_alignment (exp, BIGGEST_ALIGNMENT);
4286 +  if (TREE_CODE (exp) == MEM_REF || TREE_CODE (exp) == TARGET_MEM_REF)
4287 +    exp_align = MAX (TYPE_ALIGN (TREE_TYPE (exp)), exp_align);
4288 +
4289 +  if (exp_align < align)
4290      return true;
4291  
4292    return false;
4293 @@ -1071,7 +1073,11 @@
4294    if (lacc)
4295      {
4296        lacc->grp_assignment_write = 1;
4297 -      lacc->grp_unscalarizable_region |= tree_non_mode_aligned_mem_p (rhs);
4298 +      if (STRICT_ALIGNMENT
4299 +         && tree_non_aligned_mem_p (rhs,
4300 +                                    get_object_alignment (lhs,
4301 +                                                          BIGGEST_ALIGNMENT)))
4302 +        lacc->grp_unscalarizable_region = 1;
4303      }
4304  
4305    if (racc)
4306 @@ -1080,7 +1086,11 @@
4307        if (should_scalarize_away_bitmap && !gimple_has_volatile_ops (stmt)
4308           && !is_gimple_reg_type (racc->type))
4309         bitmap_set_bit (should_scalarize_away_bitmap, DECL_UID (racc->base));
4310 -      racc->grp_unscalarizable_region |= tree_non_mode_aligned_mem_p (lhs);
4311 +      if (STRICT_ALIGNMENT
4312 +         && tree_non_aligned_mem_p (lhs,
4313 +                                    get_object_alignment (rhs,
4314 +                                                          BIGGEST_ALIGNMENT)))
4315 +        racc->grp_unscalarizable_region = 1;
4316      }
4317  
4318    if (lacc && racc
4319 @@ -1435,29 +1445,61 @@
4320    return fold_build2_loc (loc, MEM_REF, exp_type, base, off);
4321  }
4322  
4323 +DEF_VEC_ALLOC_P_STACK (tree);
4324 +#define VEC_tree_stack_alloc(alloc) VEC_stack_alloc (tree, alloc)
4325 +
4326  /* Construct a memory reference to a part of an aggregate BASE at the given
4327 -   OFFSET and of the same type as MODEL.  In case this is a reference to a
4328 -   component, the function will replicate the last COMPONENT_REF of model's
4329 -   expr to access it.  GSI and INSERT_AFTER have the same meaning as in
4330 -   build_ref_for_offset.  */
4331 +   OFFSET and of the type of MODEL.  In case this is a chain of references
4332 +   to component, the function will replicate the chain of COMPONENT_REFs of
4333 +   the expression of MODEL to access it.  GSI and INSERT_AFTER have the same
4334 +   meaning as in build_ref_for_offset.  */
4335  
4336  static tree
4337  build_ref_for_model (location_t loc, tree base, HOST_WIDE_INT offset,
4338                      struct access *model, gimple_stmt_iterator *gsi,
4339                      bool insert_after)
4340  {
4341 +  tree type = model->type, t;
4342 +  VEC(tree,stack) *cr_stack = NULL;
4343 +
4344    if (TREE_CODE (model->expr) == COMPONENT_REF)
4345      {
4346 -      tree t, exp_type, fld = TREE_OPERAND (model->expr, 1);
4347 -      offset -= int_bit_position (fld);
4348 -      exp_type = TREE_TYPE (TREE_OPERAND (model->expr, 0));
4349 -      t = build_ref_for_offset (loc, base, offset, exp_type, gsi, insert_after);
4350 -      return fold_build3_loc (loc, COMPONENT_REF, TREE_TYPE (fld), t, fld,
4351 -                             NULL_TREE);
4352 +      tree expr = model->expr;
4353 +
4354 +      /* Create a stack of the COMPONENT_REFs so later we can walk them in
4355 +        order from inner to outer.  */
4356 +      cr_stack = VEC_alloc (tree, stack, 6);
4357 +
4358 +      do {
4359 +       tree field = TREE_OPERAND (expr, 1);
4360 +       offset -= int_bit_position (field);
4361 +
4362 +       VEC_safe_push (tree, stack, cr_stack, expr);
4363 +
4364 +       expr = TREE_OPERAND (expr, 0);
4365 +       type = TREE_TYPE (expr);
4366 +      } while (TREE_CODE (expr) == COMPONENT_REF);
4367      }
4368 -  else
4369 -    return build_ref_for_offset (loc, base, offset, model->type,
4370 -                                gsi, insert_after);
4371 +
4372 +  t = build_ref_for_offset (loc, base, offset, type, gsi, insert_after);
4373 +
4374 +  if (TREE_CODE (model->expr) == COMPONENT_REF)
4375 +    {
4376 +      unsigned i;
4377 +      tree expr;
4378 +
4379 +      /* Now replicate the chain of COMPONENT_REFs from inner to outer.  */
4380 +      FOR_EACH_VEC_ELT_REVERSE (tree, cr_stack, i, expr)
4381 +       {
4382 +         tree field = TREE_OPERAND (expr, 1);
4383 +         t = fold_build3_loc (loc, COMPONENT_REF, TREE_TYPE (field), t, field,
4384 +                              NULL_TREE);
4385 +       }
4386 +
4387 +      VEC_free (tree, stack, cr_stack);
4388 +    }
4389 +
4390 +  return t;
4391  }
4392  
4393  /* Construct a memory reference consisting of component_refs and array_refs to
4394 @@ -2594,6 +2636,10 @@
4395               rhs = get_access_replacement (racc);
4396               if (!useless_type_conversion_p (lacc->type, racc->type))
4397                 rhs = fold_build1_loc (loc, VIEW_CONVERT_EXPR, lacc->type, rhs);
4398 +
4399 +             if (racc->grp_partial_lhs && lacc->grp_partial_lhs)
4400 +               rhs = force_gimple_operand_gsi (old_gsi, rhs, true, NULL_TREE,
4401 +                                               true, GSI_SAME_STMT);
4402             }
4403           else
4404             {
4405 @@ -2609,6 +2655,9 @@
4406               else
4407                 rhs = build_ref_for_model (loc, top_racc->base, offset, lacc,
4408                                             new_gsi, true);
4409 +             if (lacc->grp_partial_lhs)
4410 +               rhs = force_gimple_operand_gsi (new_gsi, rhs, true, NULL_TREE,
4411 +                                               false, GSI_NEW_STMT);
4412             }
4413  
4414           stmt = gimple_build_assign (get_access_replacement (lacc), rhs);
4415 @@ -3604,7 +3653,8 @@
4416           || gimple_code (access->stmt) == GIMPLE_ASM))
4417      return true;
4418  
4419 -  if (tree_non_mode_aligned_mem_p (access->expr))
4420 +  if (STRICT_ALIGNMENT
4421 +      && tree_non_aligned_mem_p (access->expr, TYPE_ALIGN (access->type)))
4422      return true;
4423  
4424    return false;
4425 Index: gcc/lto/lto.c
4426 ===================================================================
4427 --- gcc/lto/lto.c       (.../tags/gcc_4_6_2_release)    (wersja 182550)
4428 +++ gcc/lto/lto.c       (.../branches/gcc-4_6-branch)   (wersja 182550)
4429 @@ -198,7 +198,7 @@
4430    uint32_t ix;
4431    tree decl;
4432    uint32_t i, j;
4433 -  
4434 +
4435    ix = *data++;
4436    decl = lto_streamer_cache_get (data_in->reader_cache, (int) ix);
4437    if (TREE_CODE (decl) != FUNCTION_DECL)
4438 @@ -241,9 +241,9 @@
4439                 VEC(ld_plugin_symbol_resolution_t,heap) *resolutions)
4440  {
4441    const struct lto_decl_header *header = (const struct lto_decl_header *) data;
4442 -  const int32_t decl_offset = sizeof (struct lto_decl_header);
4443 -  const int32_t main_offset = decl_offset + header->decl_state_size;
4444 -  const int32_t string_offset = main_offset + header->main_size;
4445 +  const int decl_offset = sizeof (struct lto_decl_header);
4446 +  const int main_offset = decl_offset + header->decl_state_size;
4447 +  const int string_offset = main_offset + header->main_size;
4448    struct lto_input_block ib_main;
4449    struct data_in *data_in;
4450    unsigned int i;
4451 @@ -291,17 +291,20 @@
4452  
4453    if (data_ptr != data_end)
4454      internal_error ("bytecode stream: garbage at the end of symbols section");
4455 -  
4456 +
4457    /* Set the current decl state to be the global state. */
4458    decl_data->current_decl_state = decl_data->global_decl_state;
4459  
4460    lto_data_in_delete (data_in);
4461  }
4462  
4463 -/* strtoll is not portable. */
4464 -int64_t
4465 -lto_parse_hex (const char *p) {
4466 -  uint64_t ret = 0;
4467 +/* Custom version of strtoll, which is not portable.  */
4468 +
4469 +static HOST_WIDEST_INT
4470 +lto_parse_hex (const char *p)
4471 +{
4472 +  HOST_WIDEST_INT ret = 0;
4473 +
4474    for (; *p != '\0'; ++p)
4475      {
4476        char c = *p;
4477 @@ -317,6 +320,7 @@
4478          internal_error ("could not parse hex number");
4479        ret |= part;
4480      }
4481 +
4482    return ret;
4483  }
4484  
4485 @@ -352,7 +356,7 @@
4486      {
4487        int t;
4488        char offset_p[17];
4489 -      int64_t offset;
4490 +      HOST_WIDEST_INT offset;
4491        t = fscanf (resolution, "@0x%16s", offset_p);
4492        if (t != 1)
4493          internal_error ("could not parse file offset");
4494 Index: gcc/lto/lto.h
4495 ===================================================================
4496 --- gcc/lto/lto.h       (.../tags/gcc_4_6_2_release)    (wersja 182550)
4497 +++ gcc/lto/lto.h       (.../branches/gcc-4_6-branch)   (wersja 182550)
4498 @@ -60,6 +60,4 @@
4499    size_t len;
4500  };
4501  
4502 -int64_t lto_parse_hex (const char *p);
4503 -
4504  #endif /* LTO_H */
4505 Index: gcc/lto/ChangeLog
4506 ===================================================================
4507 --- gcc/lto/ChangeLog   (.../tags/gcc_4_6_2_release)    (wersja 182550)
4508 +++ gcc/lto/ChangeLog   (.../branches/gcc-4_6-branch)   (wersja 182550)
4509 @@ -1,3 +1,10 @@
4510 +2011-12-13  Eric Botcazou  <ebotcazou@adacore.com>
4511 +
4512 +       * lto.h (lto_parse_hex): Delete.
4513 +       * lto.c (lto_read_decls): Use 'int' for offsets.
4514 +       (lto_parse_hex): Make static and return proper 64-bit host type.
4515 +       (lto_resolution_read): Use proper 64-bit host type.
4516 +
4517  2011-10-26  Release Manager
4518  
4519         * GCC 4.6.2 released.
4520 Index: gcc/ipa-prop.c
4521 ===================================================================
4522 --- gcc/ipa-prop.c      (.../tags/gcc_4_6_2_release)    (wersja 182550)
4523 +++ gcc/ipa-prop.c      (.../branches/gcc-4_6-branch)   (wersja 182550)
4524 @@ -2868,9 +2868,9 @@
4525  {
4526    const struct lto_function_header *header =
4527      (const struct lto_function_header *) data;
4528 -  const int32_t cfg_offset = sizeof (struct lto_function_header);
4529 -  const int32_t main_offset = cfg_offset + header->cfg_size;
4530 -  const int32_t string_offset = main_offset + header->main_size;
4531 +  const int cfg_offset = sizeof (struct lto_function_header);
4532 +  const int main_offset = cfg_offset + header->cfg_size;
4533 +  const int string_offset = main_offset + header->main_size;
4534    struct data_in *data_in;
4535    struct lto_input_block ib_main;
4536    unsigned int i;
4537 Index: gcc/po/ChangeLog
4538 ===================================================================
4539 --- gcc/po/ChangeLog    (.../tags/gcc_4_6_2_release)    (wersja 182550)
4540 +++ gcc/po/ChangeLog    (.../branches/gcc-4_6-branch)   (wersja 182550)
4541 @@ -1,3 +1,7 @@
4542 +2011-10-30  Joseph Myers  <joseph@codesourcery.com>
4543 +
4544 +       * ja.po: Update.
4545 +
4546  2011-10-26  Release Manager
4547  
4548         * GCC 4.6.2 released.
4549 Index: gcc/po/ja.po
4550 ===================================================================
4551 --- gcc/po/ja.po        (.../tags/gcc_4_6_2_release)    (wersja 182550)
4552 +++ gcc/po/ja.po        (.../branches/gcc-4_6-branch)   (wersja 182550)
4553 @@ -20,7 +20,7 @@
4554  "Project-Id-Version: gcc 4.6.1\n"
4555  "Report-Msgid-Bugs-To: http://gcc.gnu.org/bugs.html\n"
4556  "POT-Creation-Date: 2011-06-21 10:27+0000\n"
4557 -"PO-Revision-Date: 2011-10-25 22:36+0900\n"
4558 +"PO-Revision-Date: 2011-10-30 18:48+0900\n"
4559  "Last-Translator: Yasuaki Taniguchi <yasuakit@gmail.com>\n"
4560  "Language-Team: Japanese <translation-team-ja@lists.sourceforge.net>\n"
4561  "Language: ja\n"
4562 @@ -834,12 +834,12 @@
4563  #: gcov.c:420
4564  #, c-format
4565  msgid "  -a, --all-blocks                Show information for every basic block\n"
4566 -msgstr ""
4567 +msgstr "  -a, --all-blocks                各基本ブロックに関する情報を表示する\n"
4568  
4569  #: gcov.c:421
4570  #, c-format
4571  msgid "  -b, --branch-probabilities      Include branch probabilities in output\n"
4572 -msgstr ""
4573 +msgstr "  -b, --branch-probabilities      出力に分岐可能性情報を含める\n"
4574  
4575  #: gcov.c:422
4576  #, c-format
4577 @@ -847,6 +847,8 @@
4578  "  -c, --branch-counts             Given counts of branches taken\n"
4579  "                                    rather than percentages\n"
4580  msgstr ""
4581 +"  -c, --branch-counts             分岐に関する百分率では無く行われた\n"
4582 +"                                    回数を取得する\n"
4583  
4584  #: gcov.c:424
4585  #, c-format
4586 @@ -859,21 +861,23 @@
4587  "  -l, --long-file-names           Use long output file names for included\n"
4588  "                                    source files\n"
4589  msgstr ""
4590 +"  -l, --long-file-names           インクルードされたソースファイルに関する長い\n"
4591 +"                                    出力ファイル名を使用する\n"
4592  
4593  #: gcov.c:427
4594  #, c-format
4595  msgid "  -f, --function-summaries        Output summaries for each function\n"
4596 -msgstr ""
4597 +msgstr "  -f, --function-summaries        各関数に関する要約を出力する\n"
4598  
4599  #: gcov.c:428
4600  #, c-format
4601  msgid "  -o, --object-directory DIR|FILE Search for object files in DIR or called FILE\n"
4602 -msgstr ""
4603 +msgstr "  -o, --object-directory DIR|FILE オブジェクトファイルを DIR 内または呼び出し用 FILE 内で検索する\n"
4604  
4605  #: gcov.c:429
4606  #, c-format
4607  msgid "  -p, --preserve-paths            Preserve all pathname components\n"
4608 -msgstr ""
4609 +msgstr "  -p, --preserve-paths            すべてのパス名要素を保護する\n"
4610  
4611  #: gcov.c:430
4612  #, c-format
4613 @@ -977,7 +981,7 @@
4614  #: gcov.c:1045
4615  #, c-format
4616  msgid "%s:cannot open data file, assuming not executed\n"
4617 -msgstr ""
4618 +msgstr "%s:データファイルを開けません。実行されていないと見なします\n"
4619  
4620  #: gcov.c:1052
4621  #, c-format
4622 @@ -1027,7 +1031,7 @@
4623  #: gcov.c:1379
4624  #, c-format
4625  msgid "%s:graph is unsolvable for '%s'\n"
4626 -msgstr ""
4627 +msgstr "%s: '%s' 用のグラフが解決できません\n"
4628  
4629  #: gcov.c:1459
4630  #, c-format
4631 @@ -1037,7 +1041,7 @@
4632  #: gcov.c:1462
4633  #, c-format
4634  msgid "Lines executed:%s of %d\n"
4635 -msgstr ""
4636 +msgstr "実行された行:%s of %d\n"
4637  
4638  #: gcov.c:1466
4639  #, c-format
4640 @@ -1047,7 +1051,7 @@
4641  #: gcov.c:1472
4642  #, c-format
4643  msgid "Branches executed:%s of %d\n"
4644 -msgstr ""
4645 +msgstr "実行された分岐:%s of %d\n"
4646  
4647  #: gcov.c:1476
4648  #, c-format
4649 @@ -1057,12 +1061,12 @@
4650  #: gcov.c:1482
4651  #, c-format
4652  msgid "No branches\n"
4653 -msgstr ""
4654 +msgstr "分岐がありません\n"
4655  
4656  #: gcov.c:1484
4657  #, c-format
4658  msgid "Calls executed:%s of %d\n"
4659 -msgstr ""
4660 +msgstr "実行された呼び出し:%s of %d\n"
4661  
4662  #: gcov.c:1488
4663  #, c-format
4664 @@ -1075,24 +1079,24 @@
4665  msgstr "%s: '%s' に対する行がありません\n"
4666  
4667  #: gcov.c:1843
4668 -#, fuzzy, c-format
4669 +#, c-format
4670  msgid "call   %2d returned %s\n"
4671 -msgstr "呼び出し %d の戻り = %d\n"
4672 +msgstr ""
4673  
4674  #: gcov.c:1848
4675 -#, fuzzy, c-format
4676 +#, c-format
4677  msgid "call   %2d never executed\n"
4678 -msgstr "呼び出し %d は一度も実行せず\n"
4679 +msgstr ""
4680  
4681  #: gcov.c:1853
4682 -#, fuzzy, c-format
4683 +#, c-format
4684  msgid "branch %2d taken %s%s\n"
4685 -msgstr "ブランチ %d 受理 = %d%%\n"
4686 +msgstr ""
4687  
4688  #: gcov.c:1857
4689 -#, fuzzy, c-format
4690 +#, c-format
4691  msgid "branch %2d never executed\n"
4692 -msgstr "ブランチ %d は一度も実行されず\n"
4693 +msgstr ""
4694  
4695  #: gcov.c:1862
4696  #, c-format
4697 @@ -1100,9 +1104,9 @@
4698  msgstr ""
4699  
4700  #: gcov.c:1865
4701 -#, fuzzy, c-format
4702 +#, c-format
4703  msgid "unconditional %2d never executed\n"
4704 -msgstr "呼び出し %d は一度も実行せず\n"
4705 +msgstr ""
4706  
4707  #: gcov.c:1901
4708  #, c-format
4709 @@ -1412,11 +1416,11 @@
4710  
4711  #: opts.c:1183
4712  msgid "The following options take separate arguments"
4713 -msgstr ""
4714 +msgstr "次のオプションは分離した引数を取ります"
4715  
4716  #: opts.c:1185
4717  msgid "The following options take joined arguments"
4718 -msgstr ""
4719 +msgstr "次のオプションは結合した引数を取ります"
4720  
4721  #: opts.c:1196
4722  msgid "The following options are language-related"
4723 @@ -1472,7 +1476,7 @@
4724  #: targhooks.c:1469
4725  #, c-format
4726  msgid "created and used with differing settings of '%s'"
4727 -msgstr ""
4728 +msgstr "作成時と使用時で '%s' の設定が異なります"
4729  
4730  #: targhooks.c:1471
4731  msgid "out of memory"
4732 @@ -1480,11 +1484,11 @@
4733  
4734  #: targhooks.c:1486
4735  msgid "created and used with different settings of -fpic"
4736 -msgstr ""
4737 +msgstr "作成時と使用時で -fpic の設定が異なります"
4738  
4739  #: targhooks.c:1488
4740  msgid "created and used with different settings of -fpie"
4741 -msgstr ""
4742 +msgstr "作成時と使用時で -fpie の設定が異なります"
4743  
4744  #: tlink.c:386
4745  #, c-format
4746 @@ -1717,11 +1721,11 @@
4747  
4748  #: params.def:100
4749  msgid "The maximum depth of recursive inlining for inline functions"
4750 -msgstr ""
4751 +msgstr "インライン関数を再帰的にインライン化する時の最大深度"
4752  
4753  #: params.def:105
4754  msgid "The maximum depth of recursive inlining for non-inline functions"
4755 -msgstr ""
4756 +msgstr "非インライン関数を再帰的にインライン化する時の最大深度"
4757  
4758  #: params.def:110
4759  msgid "Inline recursively only when the probability of call being executed exceeds the parameter"
4760 @@ -1761,16 +1765,15 @@
4761  
4762  #: params.def:180
4763  msgid "The size of function body to be considered large"
4764 -msgstr ""
4765 +msgstr "大きいと見なされる関数本体のサイズ"
4766  
4767  #: params.def:184
4768  msgid "Maximal growth due to inlining of large function (in percent)"
4769  msgstr ""
4770  
4771  #: params.def:188
4772 -#, fuzzy
4773  msgid "The size of translation unit to be considered large"
4774 -msgstr "翻訳単位全体をファイルにダンプする"
4775 +msgstr "大きいと見なされる翻訳単位のサイズ"
4776  
4777  #: params.def:192
4778  msgid "How much can given compilation unit grow because of the inlining (in percent)"
4779 @@ -1786,20 +1789,19 @@
4780  
4781  #: params.def:204
4782  msgid "The size of stack frame to be considered large"
4783 -msgstr ""
4784 +msgstr "大きいと見なされるスタックフレームのサイズ"
4785  
4786  #: params.def:208
4787  msgid "Maximal stack frame growth due to inlining (in percent)"
4788 -msgstr ""
4789 +msgstr "インライン化によって増加するスタックフレームの最大量 (百分率)"
4790  
4791  #: params.def:215
4792  msgid "The maximum amount of memory to be allocated by GCSE"
4793 -msgstr ""
4794 +msgstr "GCSE によって配置されるメモリの最大量"
4795  
4796  #: params.def:222
4797 -#, fuzzy
4798  msgid "The maximum ratio of insertions to deletions of expressions in GCSE"
4799 -msgstr "RPTS 用の最大反復数を指定する"
4800 +msgstr ""
4801  
4802  #: params.def:233
4803  msgid "The threshold ratio for performing partial redundancy elimination after reload"
4804 @@ -1963,9 +1965,8 @@
4805  msgstr ""
4806  
4807  #: params.def:470
4808 -#, fuzzy
4809  msgid "Bound on number of iv uses in loop optimized in iv optimizations"
4810 -msgstr "目立たない、コストのかかる最適化を行なう"
4811 +msgstr ""
4812  
4813  #: params.def:478
4814  msgid "If number of candidates in the set is smaller, we always try to remove unused ivs during its optimization"
4815 @@ -2044,9 +2045,8 @@
4816  msgstr ""
4817  
4818  #: params.def:594
4819 -#, fuzzy
4820  msgid "The maximum number of iterations through CFG to extend regions"
4821 -msgstr "RPTS 用の最大反復数を指定する"
4822 +msgstr ""
4823  
4824  #: params.def:599
4825  msgid "The maximum conflict delay for an insn to be considered for speculative motion"
4826 @@ -2077,9 +2077,8 @@
4827  msgstr ""
4828  
4829  #: params.def:637
4830 -#, fuzzy
4831  msgid "The upper bound for sharing integer constants"
4832 -msgstr "`%s' の列挙値が整数定数ではありません"
4833 +msgstr "整数定数を共有するための上限値"
4834  
4835  #: params.def:656
4836  msgid "Minimum number of virtual mappings to consider switching to full virtual renames"
4837 @@ -2111,11 +2110,11 @@
4838  
4839  #: params.def:714
4840  msgid "The number of insns executed before prefetch is completed"
4841 -msgstr ""
4842 +msgstr "プリフェッチが完了する前に実行される命令数"
4843  
4844  #: params.def:721
4845  msgid "The number of prefetches that can run at the same time"
4846 -msgstr ""
4847 +msgstr "同時に実行可能なプリフェッチの数"
4848  
4849  #: params.def:728
4850  msgid "The size of L1 cache"
4851 @@ -2162,9 +2161,8 @@
4852  msgstr ""
4853  
4854  #: params.def:806
4855 -#, fuzzy
4856  msgid "maximum number of parameters in a SCoP"
4857 -msgstr "RPTS 用の最大反復数を指定する"
4858 +msgstr "SCoP 内のパラメータの最大数"
4859  
4860  #: params.def:813
4861  msgid "maximum number of basic blocks per function to be analyzed by Graphite"
4862 @@ -2597,9 +2595,9 @@
4863  msgstr "無効な %%E 値"
4864  
4865  #: config/alpha/alpha.c:5431 config/alpha/alpha.c:5479
4866 -#, fuzzy, c-format
4867 +#, c-format
4868  msgid "unknown relocation unspec"
4869 -msgstr "不明な設定済コンストラクタ型です"
4870 +msgstr ""
4871  
4872  #: config/alpha/alpha.c:5440 config/crx/crx.c:1119
4873  #: config/rs6000/rs6000.c:16490 config/spu/spu.c:1726
4874 @@ -3000,32 +2998,32 @@
4875  #: config/i386/i386.c:14106 config/i386/i386.c:14146
4876  #, c-format
4877  msgid "operand is not a condition code, invalid operand code 'D'"
4878 -msgstr ""
4879 +msgstr "被演算子は条件コードではありません。無効な被演算子コード 'D' です"
4880  
4881  #: config/i386/i386.c:14172
4882  #, c-format
4883  msgid "operand is neither a constant nor a condition code, invalid operand code 'C'"
4884 -msgstr ""
4885 +msgstr "被演算子は定数でも条件コードでもありません。無効な被演算子コード 'C' です"
4886  
4887  #: config/i386/i386.c:14182
4888  #, c-format
4889  msgid "operand is neither a constant nor a condition code, invalid operand code 'F'"
4890 -msgstr ""
4891 +msgstr "被演算子は定数でも条件コードでもありません。無効な被演算子コード 'F' です"
4892  
4893  #: config/i386/i386.c:14200
4894  #, c-format
4895  msgid "operand is neither a constant nor a condition code, invalid operand code 'c'"
4896 -msgstr ""
4897 +msgstr "被演算子は定数でも条件コードでもありません。無効な被演算子コード 'c' です"
4898  
4899  #: config/i386/i386.c:14210
4900  #, c-format
4901  msgid "operand is neither a constant nor a condition code, invalid operand code 'f'"
4902 -msgstr ""
4903 +msgstr "被演算子は定数でも条件コードでもありません。無効な被演算子コード 'f' です"
4904  
4905  #: config/i386/i386.c:14313
4906  #, c-format
4907  msgid "operand is not a condition code, invalid operand code 'Y'"
4908 -msgstr ""
4909 +msgstr "被演算子は条件コードではありません。無効な被演算子コード 'Y' です"
4910  
4911  #: config/i386/i386.c:14339
4912  #, c-format
4913 @@ -3098,7 +3096,7 @@
4914  #: config/lm32/lm32.c:529
4915  #, c-format
4916  msgid "only 0.0 can be loaded as an immediate"
4917 -msgstr ""
4918 +msgstr "即値としてロードできるのは 0.0 のみです"
4919  
4920  #: config/lm32/lm32.c:599
4921  msgid "bad operand"
4922 @@ -3138,15 +3136,15 @@
4923  
4924  #: config/m32r/m32r.c:2290
4925  msgid "pre-increment address is not a register"
4926 -msgstr ""
4927 +msgstr "前置増分アドレスがレジスタではありません"
4928  
4929  #: config/m32r/m32r.c:2297
4930  msgid "pre-decrement address is not a register"
4931 -msgstr ""
4932 +msgstr "前置減分アドレスがレジスタではありません"
4933  
4934  #: config/m32r/m32r.c:2304
4935  msgid "post-increment address is not a register"
4936 -msgstr ""
4937 +msgstr "後置増分アドレスがレジスタではありません"
4938  
4939  #: config/m32r/m32r.c:2380 config/m32r/m32r.c:2394
4940  #: config/rs6000/rs6000.c:25500
4941 @@ -3252,7 +3250,7 @@
4942  
4943  #: config/mmix/mmix.c:1589 config/mmix/mmix.c:1719
4944  msgid "MMIX Internal: Expected a CONST_INT, not this"
4945 -msgstr ""
4946 +msgstr "MMIX 内部: CONST_INT が予期されますが、異なっています"
4947  
4948  #: config/mmix/mmix.c:1668
4949  msgid "MMIX Internal: Bad value for 'm', not a CONST_INT"
4950 @@ -3260,11 +3258,11 @@
4951  
4952  #: config/mmix/mmix.c:1687
4953  msgid "MMIX Internal: Expected a register, not this"
4954 -msgstr ""
4955 +msgstr "MMIX 内部: レジスタが予期されますが、異なっています"
4956  
4957  #: config/mmix/mmix.c:1697
4958  msgid "MMIX Internal: Expected a constant, not this"
4959 -msgstr ""
4960 +msgstr "MMIX 内部: 定数が予期されますが、異なっています"
4961  
4962  #. We need the original here.
4963  #: config/mmix/mmix.c:1781
4964 @@ -3301,7 +3299,7 @@
4965  
4966  #: config/picochip/picochip.c:2983 config/picochip/picochip.c:3015
4967  msgid "Bad address, not (reg+disp):"
4968 -msgstr ""
4969 +msgstr "誤ったアドレスです。 (reg+disp) ではありません:"
4970  
4971  #: config/picochip/picochip.c:3029
4972  msgid "Bad address, not register:"
4973 @@ -3526,15 +3524,15 @@
4974  
4975  #: config/sh/sh.c:9271
4976  msgid "created and used with different architectures / ABIs"
4977 -msgstr ""
4978 +msgstr "作成時と使用時で アーキテクチャ/ABI が異なります"
4979  
4980  #: config/sh/sh.c:9273
4981  msgid "created and used with different ABIs"
4982 -msgstr ""
4983 +msgstr "作成時と使用時で ABI が異なります"
4984  
4985  #: config/sh/sh.c:9275
4986  msgid "created and used with different endianness"
4987 -msgstr ""
4988 +msgstr "作成時と使用時でエンディアンが異なります"
4989  
4990  #: config/sparc/sparc.c:7445 config/sparc/sparc.c:7451
4991  #, c-format
4992 @@ -3617,7 +3615,7 @@
4993  #: config/vax/vax.c:427
4994  #, c-format
4995  msgid "symbol with offset used in PIC mode"
4996 -msgstr ""
4997 +msgstr "PIC モードで使用されるオフセット付きのシンボルです"
4998  
4999  #: config/vax/vax.c:513
5000  #, c-format
5001 @@ -3837,19 +3835,19 @@
5002  msgstr "%s:%d:%d:   ここから再帰的に実体化されました"
5003  
5004  #: cp/error.c:2913
5005 -#, fuzzy, c-format
5006 +#, c-format
5007  msgid "%s:%d:%d:   instantiated from here"
5008  msgstr "%s:%d:%d:   ここから実体化されました"
5009  
5010  #: cp/error.c:2918
5011  #, c-format
5012  msgid "%s:%d:   recursively instantiated from here"
5013 -msgstr ""
5014 +msgstr "%s:%d:   ここから再帰的に実体化されました"
5015  
5016  #: cp/error.c:2919
5017 -#, fuzzy, c-format
5018 +#, c-format
5019  msgid "%s:%d:   instantiated from here"
5020 -msgstr "%s:%d:   ここで実体化されました\n"
5021 +msgstr "%s:%d:   ここから実体化されました"
5022  
5023  #: cp/error.c:2962
5024  #, c-format
5025 @@ -4029,22 +4027,21 @@
5026  #: fortran/expr.c:607
5027  #, c-format
5028  msgid "Constant expression required at %C"
5029 -msgstr ""
5030 +msgstr "%C では定数式が要求されます"
5031  
5032  #: fortran/expr.c:610
5033  #, c-format
5034  msgid "Integer expression required at %C"
5035 -msgstr ""
5036 +msgstr "%C では整数式が要求されます"
5037  
5038  #: fortran/expr.c:615
5039 -#, fuzzy, c-format
5040 +#, c-format
5041  msgid "Integer value too large in expression at %C"
5042 -msgstr "式の整数がオーバーフローしました"
5043 +msgstr "%C の式内で整数値が大きすぎます"
5044  
5045  #: fortran/expr.c:3147
5046 -#, fuzzy
5047  msgid "array assignment"
5048 -msgstr "代入"
5049 +msgstr "配列代入"
5050  
5051  #: fortran/gfortranspec.c:303
5052  #, c-format
5053 @@ -4080,7 +4077,7 @@
5054  
5055  #: fortran/io.c:551
5056  msgid "Unexpected element '%c' in format string at %L"
5057 -msgstr ""
5058 +msgstr "予期しない要素 '%c' が書式文字列内 (位置 %L) にあります"
5059  
5060  #: fortran/io.c:553
5061  msgid "Unexpected end of format string"
5062 @@ -4088,15 +4085,15 @@
5063  
5064  #: fortran/io.c:554
5065  msgid "Zero width in format descriptor"
5066 -msgstr ""
5067 +msgstr "幅 0 の書式記述子です"
5068  
5069  #: fortran/io.c:574
5070  msgid "Missing leading left parenthesis"
5071 -msgstr ""
5072 +msgstr "前に左小括弧がありません"
5073  
5074  #: fortran/io.c:603
5075  msgid "Left parenthesis required after '*'"
5076 -msgstr ""
5077 +msgstr "'*' の後には左小括弧が必要です"
5078  
5079  #: fortran/io.c:634
5080  msgid "Expected P edit descriptor"
5081 @@ -4116,9 +4113,8 @@
5082  msgstr ""
5083  
5084  #: fortran/io.c:844
5085 -#, fuzzy
5086  msgid "E specifier not allowed with g0 descriptor"
5087 -msgstr "型指定子 `%s' は struct や class の後には使えません"
5088 +msgstr ""
5089  
5090  #: fortran/io.c:914
5091  msgid "Positive exponent width required"
5092 @@ -4362,9 +4358,8 @@
5093  msgstr ""
5094  
5095  #: fortran/resolve.c:6233
5096 -#, fuzzy
5097  msgid "End expression in DO loop"
5098 -msgstr "オペランドとして無効な式"
5099 +msgstr ""
5100  
5101  #: fortran/resolve.c:6237
5102  msgid "Step expression in DO loop"
5103 @@ -4564,7 +4559,7 @@
5104  #: java/jcf-dump.c:1148
5105  #, c-format
5106  msgid "  --extdirs PATH          Set extensions directory path\n"
5107 -msgstr ""
5108 +msgstr "  --extdirs PATH          拡張のディレクトリパスを設定する\n"
5109  
5110  #: java/jcf-dump.c:1149
5111  #, c-format
5112 @@ -4734,18 +4729,18 @@
5113  #: config/pa/pa-hpux11.h:111 config/pa/pa64-hpux.h:30 config/pa/pa64-hpux.h:33
5114  #: config/pa/pa64-hpux.h:42 config/pa/pa64-hpux.h:45
5115  msgid "warning: consider linking with '-static' as system libraries with"
5116 -msgstr ""
5117 +msgstr "警告: システムライブラリとリンクする時は '-static' を指定することを検討してください"
5118  
5119  #: config/pa/pa-hpux10.h:90 config/pa/pa-hpux10.h:93 config/pa/pa-hpux10.h:101
5120  #: config/pa/pa-hpux10.h:104 config/pa/pa-hpux11.h:109
5121  #: config/pa/pa-hpux11.h:112 config/pa/pa64-hpux.h:31 config/pa/pa64-hpux.h:34
5122  #: config/pa/pa64-hpux.h:43 config/pa/pa64-hpux.h:46
5123  msgid "  profiling support are only provided in archive format"
5124 -msgstr ""
5125 +msgstr "  プロファイリングサポートは書庫フォーマット内でのみ提供されます"
5126  
5127  #: config/rs6000/darwin.h:99
5128  msgid " conflicting code gen style switches are used"
5129 -msgstr ""
5130 +msgstr " 競合しているコード生成スタイルスイッチが使用されています"
5131  
5132  #: config/arm/arm.h:178
5133  msgid "-msoft-float and -mhard_float may not be used together"
5134 @@ -4805,7 +4800,7 @@
5135  
5136  #: config/i386/linux-unwind.h:186
5137  msgid "ax ; {int $0x80 | syscall"
5138 -msgstr ""
5139 +msgstr "ax ; {int $0x80 | syscall"
5140  
5141  #: config/s390/tpf.h:120
5142  msgid "static is not supported on TPF-OS"
5143 @@ -4869,7 +4864,7 @@
5144  
5145  #: java/lang.opt:206
5146  msgid "--extdirs=<path>\tSet the extension directory path"
5147 -msgstr ""
5148 +msgstr "--extdirs=<path>\t拡張のディレクトリパスを設定する"
5149  
5150  #: java/lang.opt:216
5151  msgid "Input file is a file with a list of filenames to compile"
5152 @@ -5388,7 +5383,7 @@
5153  
5154  #: config/frv/frv.opt:31
5155  msgid "Enable label alignment optimizations"
5156 -msgstr ""
5157 +msgstr "ラベル整列最適化を有効にする"
5158  
5159  #: config/frv/frv.opt:35
5160  msgid "Dynamically allocate cc registers"
5161 @@ -5452,7 +5447,7 @@
5162  
5163  #: config/frv/frv.opt:116
5164  msgid "Enable use of GPREL for read-only data in FDPIC"
5165 -msgstr ""
5166 +msgstr "FDPIC 内の読み取り専用データ用 GPREL の使用を有効にする"
5167  
5168  #: config/frv/frv.opt:120 config/rs6000/rs6000.opt:216
5169  #: config/pdp11/pdp11.opt:67
5170 @@ -5460,9 +5455,8 @@
5171  msgstr "ハードウェア浮動小数点を利用する"
5172  
5173  #: config/frv/frv.opt:124 config/bfin/bfin.opt:77
5174 -#, fuzzy
5175  msgid "Enable inlining of PLT in function calls"
5176 -msgstr "関数呼び出しの前後でレジスタの保存を有効にする"
5177 +msgstr "関数呼び出し内で PLT のインライン化を有効にする"
5178  
5179  #: config/frv/frv.opt:128
5180  msgid "Enable PIC support for building libraries"
5181 @@ -5478,7 +5472,7 @@
5182  
5183  #: config/frv/frv.opt:140
5184  msgid "Use media instructions"
5185 -msgstr ""
5186 +msgstr "media 命令を使用する"
5187  
5188  #: config/frv/frv.opt:144
5189  msgid "Use multiply add/subtract instructions"
5190 @@ -5494,7 +5488,7 @@
5191  
5192  #: config/frv/frv.opt:157
5193  msgid "Do not mark ABI switches in e_flags"
5194 -msgstr ""
5195 +msgstr "e_flags 内の ABI スイッチをマークしない"
5196  
5197  #: config/frv/frv.opt:161
5198  msgid "Remove redundant membars"
5199 @@ -5506,7 +5500,7 @@
5200  
5201  #: config/frv/frv.opt:169
5202  msgid "Enable setting GPRs to the result of comparisons"
5203 -msgstr ""
5204 +msgstr "比較結果を汎用レジスタに設定することを有効にする"
5205  
5206  #: config/frv/frv.opt:173
5207  msgid "Change the amount of scheduler lookahead"
5208 @@ -5565,9 +5559,8 @@
5209  msgstr ""
5210  
5211  #: config/mn10300/mn10300.opt:56
5212 -#, fuzzy
5213  msgid "Allow gcc to generate LIW instructions"
5214 -msgstr "gcc が repeat/erepeat 命令を使用することを許可する"
5215 +msgstr "gcc が LIW 命令を生成することを許可する"
5216  
5217  #: config/s390/tpf.opt:23
5218  msgid "Enable TPF-OS tracing code"
5219 @@ -5640,11 +5633,11 @@
5220  
5221  #: config/s390/s390.opt:91
5222  msgid "Warn if a function uses alloca or creates an array with dynamic size"
5223 -msgstr ""
5224 +msgstr "関数で alloca を使用するか、または動的サイズの配列を作成した場合に、警告する"
5225  
5226  #: config/s390/s390.opt:95
5227  msgid "Warn if a single function's framesize exceeds the given framesize"
5228 -msgstr ""
5229 +msgstr "一つの関数のフレームサイズが与えられたフレームサイズを超過する場合に警告する"
5230  
5231  #: config/s390/s390.opt:99
5232  msgid "z/Architecture"
5233 @@ -5692,7 +5685,7 @@
5234  
5235  #: config/ia64/ia64.opt:56
5236  msgid "gp is constant (but save/restore gp on indirect calls)"
5237 -msgstr "gp を定数とする(但、間接呼び出しでは gp を save/restore する)"
5238 +msgstr "gp を定数とする(ただし、間接呼び出しでは gp を save/restore する)"
5239  
5240  #: config/ia64/ia64.opt:60
5241  msgid "Generate self-relocatable code"
5242 @@ -5741,39 +5734,39 @@
5243  #: config/ia64/ia64.opt:107 config/spu/spu.opt:72 config/sh/sh.opt:258
5244  #: config/pa/pa.opt:51
5245  msgid "Specify range of registers to make fixed"
5246 -msgstr ""
5247 +msgstr "固定するレジスタの範囲を指定する"
5248  
5249  #: config/ia64/ia64.opt:119
5250  msgid "Use data speculation before reload"
5251 -msgstr ""
5252 +msgstr "reload 前にデータ投機を使用する"
5253  
5254  #: config/ia64/ia64.opt:123
5255  msgid "Use data speculation after reload"
5256 -msgstr ""
5257 +msgstr "reload 後にデータ投機を使用する"
5258  
5259  #: config/ia64/ia64.opt:127
5260  msgid "Use control speculation"
5261 -msgstr ""
5262 +msgstr "制御投機を使用する"
5263  
5264  #: config/ia64/ia64.opt:131
5265  msgid "Use in block data speculation before reload"
5266 -msgstr ""
5267 +msgstr "reload 前にブロック内データ投機を使用する"
5268  
5269  #: config/ia64/ia64.opt:135
5270  msgid "Use in block data speculation after reload"
5271 -msgstr ""
5272 +msgstr "reload 後にブロック内データ投機を使用する"
5273  
5274  #: config/ia64/ia64.opt:139
5275  msgid "Use in block control speculation"
5276 -msgstr ""
5277 +msgstr "ブロック内制御投機を使用する"
5278  
5279  #: config/ia64/ia64.opt:143
5280  msgid "Use simple data speculation check"
5281 -msgstr ""
5282 +msgstr "単純データ投機検査を使用する"
5283  
5284  #: config/ia64/ia64.opt:147
5285  msgid "Use simple data speculation check for control speculation"
5286 -msgstr ""
5287 +msgstr "制御投機用の単純データ投機検査を使用する"
5288  
5289  #: config/ia64/ia64.opt:151
5290  msgid "If set, data speculative instructions will be chosen for schedule only if there are no other choices at the moment "
5291 @@ -5789,7 +5782,7 @@
5292  
5293  #: config/ia64/ia64.opt:163
5294  msgid "Place a stop bit after every cycle when scheduling"
5295 -msgstr ""
5296 +msgstr "スケジューリング時の各サイクル後にストップビットを配置する"
5297  
5298  #: config/ia64/ia64.opt:167
5299  msgid "Assume that floating-point stores and loads are not likely to cause conflict when placed into one instruction group"
5300 @@ -5805,7 +5798,7 @@
5301  
5302  #: config/ia64/ia64.opt:179
5303  msgid "Don't generate checks for control speculation in selective scheduling"
5304 -msgstr ""
5305 +msgstr "選択的スケジューリング内では制御投機用の検査を生成しない"
5306  
5307  #: config/ia64/vms_symvec_libgcc_s.opt:3
5308  msgid "! It would be better to auto-generate this file."
5309 @@ -6109,7 +6102,7 @@
5310  
5311  #: config/m68k/m68k.opt:160 config/bfin/bfin.opt:61
5312  msgid "Enable separate data segment"
5313 -msgstr ""
5314 +msgstr "分離データセグメントを有効にする"
5315  
5316  #: config/m68k/m68k.opt:164 config/bfin/bfin.opt:57
5317  msgid "ID of shared library to build"
5318 @@ -6149,7 +6142,7 @@
5319  
5320  #: config/i386/mingw.opt:23
5321  msgid "Warn about none ISO msvcrt scanf/printf width extensions"
5322 -msgstr ""
5323 +msgstr "非 ISO の msvcrt scanf/printf の幅拡張に関して警告する"
5324  
5325  #: config/i386/mingw.opt:27
5326  msgid "For nested functions on stack executable permission is set."
5327 @@ -6201,7 +6194,7 @@
5328  
5329  #: config/i386/i386.opt:114
5330  msgid "Data greater than given threshold will go into .ldata section in x86-64 medium model"
5331 -msgstr ""
5332 +msgstr "x86-64 メディアモデルでは与えられた閾値より大きいデータを .ldata セクションに配置する"
5333  
5334  #: config/i386/i386.opt:118
5335  msgid "Use given x86-64 code model"
5336 @@ -6217,16 +6210,15 @@
5337  
5338  #: config/i386/i386.opt:129
5339  msgid "Always use Dynamic Realigned Argument Pointer (DRAP) to realign stack"
5340 -msgstr ""
5341 +msgstr "スタックを再整列するために動的再整列引数ポインタ (Dynamic Realigned Argument Pointer, DRAP) を常に使用する"
5342  
5343  #: config/i386/i386.opt:133
5344  msgid "Return values of functions in FPU registers"
5345  msgstr "FPU レジスタ内の機能の値を返す"
5346  
5347  #: config/i386/i386.opt:137
5348 -#, fuzzy
5349  msgid "Generate floating point mathematics using given instruction set"
5350 -msgstr "ハードウェア浮動小数点命令を使用する"
5351 +msgstr "与えられた命令集合を使用して浮動小数数値計算を生成する"
5352  
5353  #: config/i386/i386.opt:149
5354  msgid "Inline all known string operations"
5355 @@ -6314,8 +6306,9 @@
5356  msgstr "8 バイトベクトルをメモリに返す"
5357  
5358  #: config/i386/i386.opt:253
5359 +#, fuzzy
5360  msgid "Generate reciprocals instead of divss and sqrtss."
5361 -msgstr ""
5362 +msgstr "divss および sqrtss の代わりに逆数 (reciprocal) を生成する"
5363  
5364  #: config/i386/i386.opt:257
5365  msgid "Generate cld instruction in the function prologue."
5366 @@ -6331,7 +6324,7 @@
5367  
5368  #: config/i386/i386.opt:271
5369  msgid "Use 128-bit AVX instructions instead of 256-bit AVX instructions in the auto-vectorizer."
5370 -msgstr ""
5371 +msgstr "自動ベクトル化で 256 ビット AVX 命令の代わりに 128 ビット AVX 命令を使用する"
5372  
5373  #: config/i386/i386.opt:277
5374  msgid "Generate 32bit i386 code"
5375 @@ -6382,9 +6375,8 @@
5376  msgstr "SSE4.1 と SSE4.2 の組み込み関数とコード生成をサポートしない"
5377  
5378  #: config/i386/i386.opt:328
5379 -#, fuzzy
5380  msgid "%<-msse5%> was removed"
5381 -msgstr "'-msse5' は削除されました"
5382 +msgstr "%<-msse5%> は削除されました"
5383  
5384  #: config/i386/i386.opt:333
5385  msgid "Support MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2 and AVX built-in functions and code generation"
5386 @@ -6544,7 +6536,7 @@
5387  
5388  #: config/rs6000/rs6000.opt:152
5389  msgid "Use PowerPC General Purpose group optional instructions"
5390 -msgstr "PowerPC 一般用途グループオプション命令を使用する"
5391 +msgstr "PowerPC 汎用グループオプション命令を使用する"
5392  
5393  #: config/rs6000/rs6000.opt:156
5394  msgid "Use PowerPC Graphics group optional instructions"
5395 @@ -7002,7 +6994,7 @@
5396  
5397  #: config/mcore/mcore.opt:56 config/fr30/fr30.opt:27
5398  msgid "Assume that run-time support has been provided, so omit -lsim from the linker command line"
5399 -msgstr ""
5400 +msgstr "実行時サポートが提供されると見なし、リンカコマンドラインに -lsim を含めない"
5401  
5402  #: config/mcore/mcore.opt:60
5403  msgid "Use arbitrary sized immediates in bit operations"
5404 @@ -7014,7 +7006,7 @@
5405  
5406  #: config/mcore/mcore.opt:71
5407  msgid "Set the maximum amount for a single stack increment operation"
5408 -msgstr "単一のスタックインクリメント操作の最大値を設定する"
5409 +msgstr "単一のスタック増分操作の最大値を設定する"
5410  
5411  #: config/mcore/mcore.opt:75
5412  msgid "Always treat bitfields as int-sized"
5413 @@ -7234,7 +7226,7 @@
5414  
5415  #: config/sh/sh.opt:246
5416  msgid "Division strategy, one of: call, call2, fp, inv, inv:minlat, inv20u, inv20l, inv:call, inv:call2, inv:fp, call-div1, call-fp, call-table"
5417 -msgstr ""
5418 +msgstr "除算戦略、次のいずれか: call, call2, fp, inv, inv:minlat, inv20u, inv20l, inv:call, inv:call2, inv:fp, call-div1, call-fp, call-table"
5419  
5420  #: config/sh/sh.opt:250
5421  msgid "Specify name for 32 bit signed division function"
5422 @@ -7282,7 +7274,7 @@
5423  
5424  #: config/sh/sh.opt:298
5425  msgid "Mark MAC register as call-clobbered"
5426 -msgstr ""
5427 +msgstr "MAC レジスタを呼び出しで破壊されるとマークする"
5428  
5429  #: config/sh/sh.opt:304
5430  msgid "Make structs a multiple of 4 bytes (warning: ABI altered)"
5431 @@ -7960,7 +7952,7 @@
5432  
5433  #: config/m68hc11/m68hc11.opt:49
5434  msgid "Auto pre/post decrement increment allowed"
5435 -msgstr "自動 pre/post デクリメント インクリメントを許容する"
5436 +msgstr "自動 前置/後置 減分/増分 を許容する"
5437  
5438  #: config/m68hc11/m68hc11.opt:53
5439  msgid "Min/max instructions allowed"
5440 @@ -7972,7 +7964,7 @@
5441  
5442  #: config/m68hc11/m68hc11.opt:61
5443  msgid "Auto pre/post decrement increment not allowed"
5444 -msgstr "自動 pre/post デクリメント インクリメントを許容しない"
5445 +msgstr "自動 前置/後置 減分/増分を許容しない"
5446  
5447  #: config/m68hc11/m68hc11.opt:65
5448  msgid "Use jsr and rts for function calls and returns"
5449 @@ -8346,7 +8338,7 @@
5450  
5451  #: config/bfin/bfin.opt:69
5452  msgid "Link with the fast floating-point library"
5453 -msgstr ""
5454 +msgstr "高速な浮動小数ライブラリとリンクする"
5455  
5456  #: config/bfin/bfin.opt:81
5457  msgid "Do stack checking using bounds in L1 scratch memory"
5458 @@ -8382,7 +8374,7 @@
5459  
5460  #: config/picochip/picochip.opt:31
5461  msgid "Specify whether the byte access instructions should be used. Enabled by default."
5462 -msgstr ""
5463 +msgstr "バイトアクセス命令を使用するかどうかを指定する。デフォルトでは有効となる"
5464  
5465  #: config/picochip/picochip.opt:35
5466  msgid "Enable debug output to be generated."
5467 @@ -8390,11 +8382,11 @@
5468  
5469  #: config/picochip/picochip.opt:39
5470  msgid "Allow a symbol value to be used as an immediate value in an instruction."
5471 -msgstr ""
5472 +msgstr "命令内でシンボル値が即値として使用されることを許可する"
5473  
5474  #: config/picochip/picochip.opt:43
5475  msgid "Generate warnings when inefficient code is known to be generated."
5476 -msgstr ""
5477 +msgstr "非効率なコードが生成された時に警告する"
5478  
5479  #: config/vxworks.opt:36
5480  msgid "Assume the VxWorks RTP environment"
5481 @@ -8418,7 +8410,7 @@
5482  
5483  #: config/darwin.opt:205
5484  msgid "Warn if constant CFString objects contain non-portable characters"
5485 -msgstr ""
5486 +msgstr "定数 CFString オブジェクトが移植性の無い文字を含む場合に警告する"
5487  
5488  #: config/darwin.opt:210
5489  msgid "Generate AT&T-style stubs for Mach-O"
5490 @@ -8430,7 +8422,7 @@
5491  
5492  #: config/darwin.opt:218
5493  msgid "Generate code suitable for fast turn around debugging"
5494 -msgstr ""
5495 +msgstr "デバッグを高速に行うために適したコードを生成する"
5496  
5497  #: config/darwin.opt:227
5498  msgid "The earliest MacOS X version on which this program will run"
5499 @@ -8442,15 +8434,15 @@
5500  
5501  #: config/darwin.opt:235
5502  msgid "Generate code for darwin loadable kernel extensions"
5503 -msgstr ""
5504 +msgstr "darwin ロード可能カーネル拡張用のコードを生成する"
5505  
5506  #: config/darwin.opt:239
5507  msgid "Generate code for the kernel or loadable kernel extensions"
5508 -msgstr ""
5509 +msgstr "カーネル用、またはロード可能カーネル拡張用のコードを生成する"
5510  
5511  #: config/darwin.opt:243
5512  msgid "-iframework <dir>\tAdd <dir> to the end of the system framework include path"
5513 -msgstr ""
5514 +msgstr "-iframework <dir>\t<dir> をシステムフレームワークインクルードパスの末尾に加える"
5515  
5516  #: config/lynx.opt:23
5517  msgid "Support legacy multi-threading"
5518 @@ -8737,7 +8729,6 @@
5519  msgstr ""
5520  
5521  #: config/microblaze/microblaze.opt:92
5522 -#, fuzzy
5523  msgid "Use hardware floating point conversion instructions"
5524  msgstr "ハードウェア浮動小数点変換命令を使用する"
5525  
5526 @@ -8862,7 +8853,7 @@
5527  
5528  #: c-family/c.opt:249
5529  msgid "-MT <target>\tAdd an unquoted target"
5530 -msgstr ""
5531 +msgstr "-MT <target>\tターゲット (引用符を付けない) を追加する"
5532  
5533  #: c-family/c.opt:253
5534  msgid "Do not generate #line directives"
5535 @@ -8898,11 +8889,11 @@
5536  
5537  #: c-family/c.opt:288
5538  msgid "Warn about C constructs that are not in the common subset of C and C++"
5539 -msgstr ""
5540 +msgstr "C と C++ の共通部分集合では無い C 構文に関して警告する"
5541  
5542  #: c-family/c.opt:292
5543  msgid "Warn about C++ constructs whose meaning differs between ISO C++ 1998 and ISO C++ 200x"
5544 -msgstr ""
5545 +msgstr "ISO C++ 1998 と ISO C++ 200x で意味が異なる C++ 構文に関して警告する"
5546  
5547  #: c-family/c.opt:296
5548  msgid "Warn about casts which discard qualifiers"
5549 @@ -8962,7 +8953,7 @@
5550  
5551  #: c-family/c.opt:352
5552  msgid "Warn about stray tokens after #elif and #endif"
5553 -msgstr ""
5554 +msgstr "#elif および #endif の後にあるはぐれたトークンに関して警告する"
5555  
5556  #: c-family/c.opt:356
5557  msgid "Warn about comparison of different enum types"
5558 @@ -8977,9 +8968,8 @@
5559  msgstr "浮動小数点数の等価比較に関して警告する"
5560  
5561  #: c-family/c.opt:372
5562 -#, fuzzy
5563  msgid "Warn about printf/scanf/strftime/strfmon format string anomalies"
5564 -msgstr "printf/scanf/strftime/strfmon 形式の変則的なものに関して警告する"
5565 +msgstr "printf/scanf/strftime/strfmon 書式文字列異常に関して警告する"
5566  
5567  #: c-family/c.opt:376
5568  msgid "Warn if passing too many arguments to a function for its format string"
5569 @@ -8998,9 +8988,8 @@
5570  msgstr "セキュリティ問題になる可能性がある書式関数に関して警告する"
5571  
5572  #: c-family/c.opt:392
5573 -#, fuzzy
5574  msgid "Warn about strftime formats yielding 2-digit years"
5575 -msgstr "strftime 形式が二桁で年を表している時の警告しない"
5576 +msgstr "strftime 書式が 2 桁の年の場合に警告する"
5577  
5578  #: c-family/c.opt:396
5579  msgid "Warn about zero-length formats"
5580 @@ -9409,7 +9398,7 @@
5581  
5582  #: c-family/c.opt:823
5583  msgid "Don't emit dllexported inline functions unless needed"
5584 -msgstr ""
5585 +msgstr "必要が無い限り dllexported インライン関数を発行しない"
5586  
5587  #: c-family/c.opt:830
5588  msgid "Allow implicit conversions between vectors with differing numbers of subparts and/or differing element types."
5589 @@ -9501,7 +9490,7 @@
5590  
5591  #: c-family/c.opt:942
5592  msgid "Generate run time type descriptor information"
5593 -msgstr ""
5594 +msgstr "実行時型記述子情報を生成する"
5595  
5596  #: c-family/c.opt:946
5597  msgid "Use the same size for double as for float"
5598 @@ -9889,19 +9878,16 @@
5599  msgstr "関数が __attribute__((pure)) の候補となりそうな場合に警告する"
5600  
5601  #: common.opt:608
5602 -#, fuzzy
5603  msgid "Warn about enumerated switches, with no default, missing a case"
5604 -msgstr "列挙定数の switch で case 指定が欠けているものに関して警告する"
5605 +msgstr "列挙定数を使用した switch 文で default 文が無いか特定の case が無い場合に警告する"
5606  
5607  #: common.opt:612
5608 -#, fuzzy
5609  msgid "Warn about enumerated switches missing a \"default:\" statement"
5610 -msgstr "列挙定数の switch で case 指定が欠けているものに関して警告する"
5611 +msgstr "列挙定数を使用した switch 文で \"default:\" 文が無い場合に警告する"
5612  
5613  #: common.opt:616
5614 -#, fuzzy
5615  msgid "Warn about all enumerated switches missing a specific case"
5616 -msgstr "列挙定数の switch で case 指定が欠けているものに関して警告する"
5617 +msgstr "列挙定数を使用した switch 文で特定の case が無い場合に警告する"
5618  
5619  #: common.opt:620
5620  msgid "Do not suppress warnings from system headers"
5621 @@ -10000,9 +9986,8 @@
5622  msgstr "自動増加/減少命令を生成する"
5623  
5624  #: common.opt:821
5625 -#, fuzzy
5626  msgid "Generate code to check bounds before indexing arrays"
5627 -msgstr "配列の添字と添字境界を検査するコードを生成する"
5628 +msgstr "配列の添え字を使用する前に境界検査を行うコードを生成する"
5629  
5630  #: common.opt:825
5631  #, fuzzy
5632 @@ -10043,7 +10028,7 @@
5633  
5634  #: common.opt:864
5635  msgid "Looks for opportunities to reduce stack adjustments and stack references."
5636 -msgstr ""
5637 +msgstr "スタック調整およびスタック参照を削減する機会を探す"
5638  
5639  #: common.opt:868
5640  msgid "Do not put uninitialized globals in the common section"
5641 @@ -10058,18 +10043,16 @@
5642  msgstr ""
5643  
5644  #: common.opt:884
5645 -#, fuzzy
5646  msgid "Perform comparison elimination after register allocation has finished"
5647 -msgstr "グローバル共通部分式を除去する"
5648 +msgstr "レジスタは位置が完了した後に比較の除去を行う"
5649  
5650  #: common.opt:888
5651  msgid "Do not perform optimizations increasing noticeably stack usage"
5652 -msgstr ""
5653 +msgstr "スタック使用量を著しく増加させる最適化を行わない"
5654  
5655  #: common.opt:892
5656 -#, fuzzy
5657  msgid "Perform a register copy-propagation optimization pass"
5658 -msgstr "最適化過程のレジスタつけ変えを行なう"
5659 +msgstr ""
5660  
5661  #: common.opt:896
5662  msgid "Perform cross-jumping optimization"
5663 @@ -10101,7 +10084,7 @@
5664  
5665  #: common.opt:928
5666  msgid "Map one directory name to another in debug information"
5667 -msgstr ""
5668 +msgstr "デバッグ情報内のディレクトリー名を他のものにマップする"
5669  
5670  #: common.opt:934
5671  msgid "Defer popping functions args from stack until later"
5672 @@ -10116,9 +10099,8 @@
5673  msgstr "無意味な null ポインタ検査を削除する"
5674  
5675  #: common.opt:946
5676 -#, fuzzy
5677  msgid "Try to convert virtual calls to direct ones."
5678 -msgstr "リンカが PIC 呼び出しを直接呼び出しに変更することを許可するように試みる"
5679 +msgstr "仮想呼び出しを直接呼び出しに変換することを試みる"
5680  
5681  #: common.opt:950
5682  #, fuzzy
5683 @@ -10137,7 +10119,7 @@
5684  
5685  #: common.opt:978
5686  msgid "-fdump-final-insns=filename\tDump to filename the insns at the end of translation"
5687 -msgstr ""
5688 +msgstr "-fdump-final-insns=filename\t翻訳終了時に filename へ命令をダンプする"
5689  
5690  #: common.opt:982
5691  msgid "-fdump-go-spec=filename\tWrite all declarations to file as Go code"
5692 @@ -10173,7 +10155,7 @@
5693  
5694  #: common.opt:1014 common.opt:1018
5695  msgid "Perform unused type elimination in debug info"
5696 -msgstr ""
5697 +msgstr "デバッグ情報内で使用されていない型の除去を行う"
5698  
5699  #: common.opt:1022
5700  msgid "Do not suppress C++ class debug information."
5701 @@ -10181,25 +10163,24 @@
5702  
5703  #: common.opt:1026
5704  msgid "Generate debug information to support Identical Code Folding (ICF)"
5705 -msgstr ""
5706 +msgstr "Identical Code Folding (ICF) をサポートするためのデバッグ情報を生成する"
5707  
5708  #: common.opt:1030
5709  msgid "Enable exception handling"
5710  msgstr "例外処理を有効にする"
5711  
5712  #: common.opt:1034
5713 -#, fuzzy
5714  msgid "Perform a number of minor, expensive optimizations"
5715 -msgstr "目立たない、コストのかかる最適化を行なう"
5716 +msgstr "多くの、目立たないがコストが高い最適化を行う"
5717  
5718  #: common.opt:1038
5719  msgid "-fexcess-precision=[fast|standard]\tSpecify handling of excess floating-point precision"
5720 -msgstr ""
5721 +msgstr "-fexcess-precision=[fast|standard]\t余分な浮動小数点精度の取り扱いを指定する"
5722  
5723  #: common.opt:1041
5724  #, c-format
5725  msgid "unknown excess precision style %qs"
5726 -msgstr ""
5727 +msgstr "不明な余分な精度スタイル %qs です"
5728  
5729  #: common.opt:1054
5730  msgid "Assume no NaNs or infinities are generated"
5731 @@ -10222,52 +10203,45 @@
5732  msgstr ""
5733  
5734  #: common.opt:1077
5735 -#, fuzzy, c-format
5736 +#, c-format
5737  msgid "unknown floating point contraction style %qs"
5738 -msgstr "浮動小数点定数を TOC 内に配置する"
5739 +msgstr "不明な浮動小数短縮形 %qs です"
5740  
5741  #: common.opt:1094
5742  msgid "Allow function addresses to be held in registers"
5743  msgstr "関数アドレスをレジスタに持たせる事を許可する"
5744  
5745  #: common.opt:1098
5746 -#, fuzzy
5747  msgid "Place each function into its own section"
5748 -msgstr "各々の関数をそれ自身のセクションに配置する"
5749 +msgstr "それぞれの関数をそれ自身のセクションに配置する"
5750  
5751  #: common.opt:1102
5752 -#, fuzzy
5753  msgid "Perform global common subexpression elimination"
5754 -msgstr "グローバル共通部分式を除去する"
5755 +msgstr "大域共通部分式の除去を行う"
5756  
5757  #: common.opt:1106
5758 -#, fuzzy
5759  msgid "Perform enhanced load motion during global common subexpression elimination"
5760 -msgstr "グローバル共通部分式を除去する"
5761 +msgstr ""
5762  
5763  #: common.opt:1110
5764 -#, fuzzy
5765  msgid "Perform store motion after global common subexpression elimination"
5766 -msgstr "グローバル共通部分式を除去する"
5767 +msgstr ""
5768  
5769  #: common.opt:1114
5770  msgid "Perform redundant load after store elimination in global common subexpression"
5771  msgstr ""
5772  
5773  #: common.opt:1119
5774 -#, fuzzy
5775  msgid "Perform global common subexpression elimination after register allocation"
5776 -msgstr "グローバル共通部分式を除去する"
5777 +msgstr "レジスタ配置後に大域共通部分式の除去を行う"
5778  
5779  #: common.opt:1125
5780 -#, fuzzy
5781  msgid "Enable in and out of Graphite representation"
5782 -msgstr "自動テンプレート実体化を有効にする"
5783 +msgstr ""
5784  
5785  #: common.opt:1129
5786 -#, fuzzy
5787  msgid "Enable Graphite Identity transformation"
5788 -msgstr "呼び出しグラフ情報を送出する"
5789 +msgstr ""
5790  
5791  #: common.opt:1133
5792  msgid "Mark all loops as parallel"
5793 @@ -10306,9 +10280,8 @@
5794  msgstr ""
5795  
5796  #: common.opt:1173
5797 -#, fuzzy
5798  msgid "Perform conversion of conditional jumps to conditional execution"
5799 -msgstr "条件的な実行への変更のための閾値を変更する"
5800 +msgstr ""
5801  
5802  #: common.opt:1177
5803  msgid "Convert conditional jumps in innermost loops to branchless equivalents"
5804 @@ -10376,13 +10349,12 @@
5805  msgstr ""
5806  
5807  #: common.opt:1253
5808 -#, fuzzy
5809  msgid "Discover pure and const functions"
5810 -msgstr "使われない仮想関数を切り捨てる"
5811 +msgstr "純粋および定数関数を見つける"
5812  
5813  #: common.opt:1257
5814  msgid "Discover readonly and non addressable static variables"
5815 -msgstr ""
5816 +msgstr "読み取り専用およびアドレス付けできない静的変数を見つける"
5817  
5818  #: common.opt:1261
5819  msgid "Perform matrix layout flattening and transposing based"
5820 @@ -10415,9 +10387,8 @@
5821  msgstr ""
5822  
5823  #: common.opt:1305
5824 -#, fuzzy
5825  msgid "Share slots for saving different hard registers."
5826 -msgstr "引数レジスタにローカルのものを格納する"
5827 +msgstr ""
5828  
5829  #: common.opt:1309
5830  msgid "Share stack slots for spilled pseudo-registers."
5831 @@ -10621,19 +10592,19 @@
5832  
5833  #: common.opt:1521
5834  msgid "Enable basic program profiling code"
5835 -msgstr ""
5836 +msgstr "基本プログラムプロファイリングコードを有効にする"
5837  
5838  #: common.opt:1525
5839  msgid "Insert arc-based program profiling code"
5840 -msgstr ""
5841 +msgstr "円弧ベースプログラムプロファイリングコードを挿入する"
5842  
5843  #: common.opt:1529
5844  msgid "Set the top-level directory for storing the profile data."
5845 -msgstr ""
5846 +msgstr "プロファイルデータ保存用の最上位ディレクリーを設定する"
5847  
5848  #: common.opt:1534
5849  msgid "Enable correction of flow inconsistent profile data input"
5850 -msgstr ""
5851 +msgstr "フロー一貫性が無いデータ入力の訂正を有効にする"
5852  
5853  #: common.opt:1538
5854  msgid "Enable common options for generating profile info for profile feedback directed optimizations"
5855 @@ -10653,7 +10624,7 @@
5856  
5857  #: common.opt:1554
5858  msgid "Insert code to profile values of expressions"
5859 -msgstr ""
5860 +msgstr "式の値をプロファイルするためのコードを挿入する"
5861  
5862  #: common.opt:1561
5863  msgid "-frandom-seed=<string>\tMake compile reproducible using <string>"
5864 @@ -11836,7 +11807,7 @@
5865  #: c-decl.c:1150
5866  #, gcc-internal-format
5867  msgid "nested function %q+D declared but never defined"
5868 -msgstr ""
5869 +msgstr "入れ子になった関数 %q+D が宣言されましたが定義されていません"
5870  
5871  #: c-decl.c:1162
5872  #, gcc-internal-format
5873 @@ -11893,7 +11864,7 @@
5874  #: c-decl.c:1613
5875  #, gcc-internal-format
5876  msgid "prototype for %q+D follows non-prototype definition"
5877 -msgstr ""
5878 +msgstr "非プロトタイプ定義に続いて %q+D 用のプロトタイプがあります"
5879  
5880  #: c-decl.c:1628
5881  #, gcc-internal-format
5882 @@ -11969,9 +11940,9 @@
5883  msgstr "%q+D が異なる型で再定義されました"
5884  
5885  #: c-decl.c:1818
5886 -#, fuzzy, gcc-internal-format
5887 +#, gcc-internal-format
5888  msgid "redefinition of typedef %q+D with variably modified type"
5889 -msgstr "%q+D が異なる型で再定義されました"
5890 +msgstr ""
5891  
5892  #: c-decl.c:1825
5893  #, gcc-internal-format
5894 @@ -12016,17 +11987,17 @@
5895  #: c-decl.c:2001
5896  #, gcc-internal-format
5897  msgid "extern declaration of %q+D follows declaration with no linkage"
5898 -msgstr ""
5899 +msgstr "リンク無し宣言の後に %q+D の extern 宣言が続いています"
5900  
5901  #: c-decl.c:2037
5902  #, gcc-internal-format
5903  msgid "declaration of %q+D with no linkage follows extern declaration"
5904 -msgstr ""
5905 +msgstr "extern 宣言の後にリンク無し %q+D の宣言が続いています"
5906  
5907  #: c-decl.c:2043
5908  #, gcc-internal-format
5909  msgid "redeclaration of %q+D with no linkage"
5910 -msgstr ""
5911 +msgstr "リンク無し %q+D の再定義です"
5912  
5913  #: c-decl.c:2069
5914  #, gcc-internal-format
5915 @@ -12354,7 +12325,7 @@
5916  #: c-decl.c:4614
5917  #, gcc-internal-format
5918  msgid "defining a type in a compound literal is invalid in C++"
5919 -msgstr ""
5920 +msgstr "複合リテラル内での型定義は C++ では無効です"
5921  
5922  #: c-decl.c:4666 c-decl.c:4681
5923  #, gcc-internal-format
5924 @@ -13393,23 +13364,23 @@
5925  #: c-parser.c:1829
5926  #, gcc-internal-format
5927  msgid "expression in static assertion is not an integer"
5928 -msgstr ""
5929 +msgstr "静的アサーション内の式が整数ではありません"
5930  
5931  #: c-parser.c:1836
5932  #, gcc-internal-format
5933  msgid "expression in static assertion is not an integer constant expression"
5934 -msgstr ""
5935 +msgstr "静的アサーション内の式が整数定数式ではありません"
5936  
5937  #: c-parser.c:1841
5938  #, gcc-internal-format
5939  msgid "expression in static assertion is not constant"
5940 -msgstr ""
5941 +msgstr "静的アサーション内の式が定数ではありません"
5942  
5943  #. Report the error.
5944  #: c-parser.c:1846 cp/semantics.c:4719
5945  #, gcc-internal-format
5946  msgid "static assertion failed: %E"
5947 -msgstr ""
5948 +msgstr "静的アサーションに失敗しました: %E"
5949  
5950  #: c-parser.c:2207 c-parser.c:3063 c-parser.c:3709 c-parser.c:3983
5951  #: c-parser.c:5084 c-parser.c:5175 c-parser.c:5800 c-parser.c:6083
5952 @@ -14125,12 +14096,12 @@
5953  #: c-typeck.c:3578
5954  #, gcc-internal-format
5955  msgid "increment of enumeration value is invalid in C++"
5956 -msgstr "列挙値のインクリメントは C++ では無効です"
5957 +msgstr "列挙値の増分は C++ では無効です"
5958  
5959  #: c-typeck.c:3581
5960  #, gcc-internal-format
5961  msgid "decrement of enumeration value is invalid in C++"
5962 -msgstr "列挙値のデクリメントは C++ では無効です"
5963 +msgstr "列挙値の減分は C++ では無効です"
5964  
5965  #: c-typeck.c:3594
5966  #, gcc-internal-format
5967 @@ -14140,22 +14111,22 @@
5968  #: c-typeck.c:3613 c-typeck.c:3645
5969  #, gcc-internal-format
5970  msgid "wrong type argument to increment"
5971 -msgstr "インクリメントする引数の型が間違っています"
5972 +msgstr "増分する引数の型が間違っています"
5973  
5974  #: c-typeck.c:3615 c-typeck.c:3648
5975  #, gcc-internal-format
5976  msgid "wrong type argument to decrement"
5977 -msgstr "デクリメントする引数の型が間違っています"
5978 +msgstr "減分する引数の型が間違っています"
5979  
5980  #: c-typeck.c:3635
5981  #, gcc-internal-format
5982  msgid "increment of pointer to unknown structure"
5983 -msgstr "不明な構造体へのポインタのインクリメントです"
5984 +msgstr "不明な構造体へのポインタの増分です"
5985  
5986  #: c-typeck.c:3638
5987  #, gcc-internal-format
5988  msgid "decrement of pointer to unknown structure"
5989 -msgstr "不明な構造体へのポインタのデクリメントです"
5990 +msgstr "不明な構造体へのポインタの減分です"
5991  
5992  #: c-typeck.c:3722
5993  #, gcc-internal-format
5994 @@ -14170,12 +14141,12 @@
5995  #: c-typeck.c:3895 c-family/c-common.c:8658
5996  #, gcc-internal-format
5997  msgid "increment of read-only location %qE"
5998 -msgstr "読み取り専用位置 %qE のインクリメントです"
5999 +msgstr "読み取り専用位置 %qE の増分です"
6000  
6001  #: c-typeck.c:3898 c-family/c-common.c:8659
6002  #, gcc-internal-format
6003  msgid "decrement of read-only location %qE"
6004 -msgstr "読み取り専用位置 %qE のデクリメントです"
6005 +msgstr "読み取り専用位置 %qE の減分です"
6006  
6007  #: c-typeck.c:3939
6008  #, gcc-internal-format
6009 @@ -19787,12 +19758,12 @@
6010  #: c-family/c-common.c:8611
6011  #, gcc-internal-format
6012  msgid "increment of member %qD in read-only object"
6013 -msgstr "読み取り専用オブジェクト内のメンバ %qD のインクリメントです"
6014 +msgstr "読み取り専用オブジェクト内のメンバ %qD の増分です"
6015  
6016  #: c-family/c-common.c:8613
6017  #, gcc-internal-format
6018  msgid "decrement of member %qD in read-only object"
6019 -msgstr "読み取り専用オブジェクト内のメンバ %qD のデクリメントです"
6020 +msgstr "読み取り専用オブジェクト内のメンバ %qD の減分です"
6021  
6022  #: c-family/c-common.c:8615
6023  #, gcc-internal-format
6024 @@ -19807,12 +19778,12 @@
6025  #: c-family/c-common.c:8620
6026  #, gcc-internal-format
6027  msgid "increment of read-only member %qD"
6028 -msgstr "読み取り専用メンバ %qD のインクリメントです"
6029 +msgstr "読み取り専用メンバ %qD の増分です"
6030  
6031  #: c-family/c-common.c:8621
6032  #, gcc-internal-format
6033  msgid "decrement of read-only member %qD"
6034 -msgstr "読み取り専用メンバ %qD のデクリメントです"
6035 +msgstr "読み取り専用メンバ %qD の減分です"
6036  
6037  #: c-family/c-common.c:8622
6038  #, gcc-internal-format
6039 @@ -19827,12 +19798,12 @@
6040  #: c-family/c-common.c:8627
6041  #, gcc-internal-format
6042  msgid "increment of read-only variable %qD"
6043 -msgstr "読み取り専用変数 %qD のインクリメントです"
6044 +msgstr "読み取り専用変数 %qD の増分です"
6045  
6046  #: c-family/c-common.c:8628
6047  #, gcc-internal-format
6048  msgid "decrement of read-only variable %qD"
6049 -msgstr "読み取り専用変数 %qD のデクリメントです"
6050 +msgstr "読み取り専用変数 %qD の減分です"
6051  
6052  #: c-family/c-common.c:8629
6053  #, gcc-internal-format
6054 @@ -19847,12 +19818,12 @@
6055  #: c-family/c-common.c:8633
6056  #, gcc-internal-format
6057  msgid "increment of read-only parameter %qD"
6058 -msgstr "読み取り専用パラメータ %qD のインクリメントです"
6059 +msgstr "読み取り専用パラメータ %qD の増分です"
6060  
6061  #: c-family/c-common.c:8634
6062  #, gcc-internal-format
6063  msgid "decrement of read-only parameter %qD"
6064 -msgstr "読み取り専用パラメータ %qD のデクリメントです"
6065 +msgstr "読み取り専用パラメータ %qD の減分です"
6066  
6067  #: c-family/c-common.c:8635
6068  #, gcc-internal-format
6069 @@ -19867,12 +19838,12 @@
6070  #: c-family/c-common.c:8642
6071  #, gcc-internal-format
6072  msgid "increment of read-only named return value %qD"
6073 -msgstr "読み取り専用名前付き戻り値 %qD のインクリメントです"
6074 +msgstr "読み取り専用名前付き戻り値 %qD の増分です"
6075  
6076  #: c-family/c-common.c:8644
6077  #, gcc-internal-format
6078  msgid "decrement of read-only named return value %qD"
6079 -msgstr "読み取り専用名前付き戻り値 %qD のデクリメントです"
6080 +msgstr "読み取り専用名前付き戻り値 %qD の減分です"
6081  
6082  #: c-family/c-common.c:8646
6083  #, gcc-internal-format
6084 @@ -19887,12 +19858,12 @@
6085  #: c-family/c-common.c:8652
6086  #, gcc-internal-format
6087  msgid "increment of function %qD"
6088 -msgstr "関数 %qD のインクリメントです"
6089 +msgstr "関数 %qD の増分です"
6090  
6091  #: c-family/c-common.c:8653
6092  #, gcc-internal-format
6093  msgid "decrement of function %qD"
6094 -msgstr "関数 %qD のデクリメントです"
6095 +msgstr "関数 %qD の減分です"
6096  
6097  #: c-family/c-common.c:8654
6098  #, gcc-internal-format
6099 @@ -19912,12 +19883,12 @@
6100  #: c-family/c-common.c:8677
6101  #, gcc-internal-format
6102  msgid "lvalue required as increment operand"
6103 -msgstr "インクリメントの被演算子として左辺値が必要です"
6104 +msgstr "増分の被演算子として左辺値が必要です"
6105  
6106  #: c-family/c-common.c:8680
6107  #, gcc-internal-format
6108  msgid "lvalue required as decrement operand"
6109 -msgstr "デクリメントの被演算子として左辺値が必要です"
6110 +msgstr "減分の被演算子として左辺値が必要です"
6111  
6112  #: c-family/c-common.c:8683
6113  #, gcc-internal-format
6114 @@ -20556,12 +20527,12 @@
6115  #: c-family/c-omp.c:375 cp/semantics.c:4431
6116  #, gcc-internal-format
6117  msgid "missing increment expression"
6118 -msgstr "インクリメント式がありません"
6119 +msgstr "増分式がありません"
6120  
6121  #: c-family/c-omp.c:444 cp/semantics.c:4287
6122  #, gcc-internal-format
6123  msgid "invalid increment expression"
6124 -msgstr "無効なインクリメント式です"
6125 +msgstr "無効な増分式です"
6126  
6127  #: c-family/c-opts.c:303
6128  #, gcc-internal-format
6129 @@ -20571,7 +20542,7 @@
6130  #: c-family/c-opts.c:306
6131  #, gcc-internal-format
6132  msgid "obsolete option -I- used, please use -iquote instead"
6133 -msgstr "廃止あれたオプション -I- が使用されています。代わりに -iquote を使用してください"
6134 +msgstr "廃止されたオプション -I- が使用されています。代わりに -iquote を使用してください"
6135  
6136  #: c-family/c-opts.c:486
6137  #, gcc-internal-format
6138 Index: gcc/tree-ssa-forwprop.c
6139 ===================================================================
6140 --- gcc/tree-ssa-forwprop.c     (.../tags/gcc_4_6_2_release)    (wersja 182550)
6141 +++ gcc/tree-ssa-forwprop.c     (.../branches/gcc-4_6-branch)   (wersja 182550)
6142 @@ -872,7 +872,7 @@
6143                      TREE_TYPE (gimple_assign_rhs1 (use_stmt))))
6144         {
6145           tree *def_rhs_basep = &TREE_OPERAND (def_rhs, 0);
6146 -         tree new_offset, new_base, saved;
6147 +         tree new_offset, new_base, saved, new_lhs;
6148           while (handled_component_p (*def_rhs_basep))
6149             def_rhs_basep = &TREE_OPERAND (*def_rhs_basep, 0);
6150           saved = *def_rhs_basep;
6151 @@ -891,9 +891,12 @@
6152           *def_rhs_basep = build2 (MEM_REF, TREE_TYPE (*def_rhs_basep),
6153                                    new_base, new_offset);
6154           TREE_THIS_VOLATILE (*def_rhs_basep) = TREE_THIS_VOLATILE (lhs);
6155 +         TREE_SIDE_EFFECTS (*def_rhs_basep) = TREE_SIDE_EFFECTS (lhs);
6156           TREE_THIS_NOTRAP (*def_rhs_basep) = TREE_THIS_NOTRAP (lhs);
6157 -         gimple_assign_set_lhs (use_stmt,
6158 -                                unshare_expr (TREE_OPERAND (def_rhs, 0)));
6159 +         new_lhs = unshare_expr (TREE_OPERAND (def_rhs, 0));
6160 +         gimple_assign_set_lhs (use_stmt, new_lhs);
6161 +         TREE_THIS_VOLATILE (new_lhs) = TREE_THIS_VOLATILE (lhs);
6162 +         TREE_SIDE_EFFECTS (new_lhs) = TREE_SIDE_EFFECTS (lhs);
6163           *def_rhs_basep = saved;
6164           tidy_after_forward_propagate_addr (use_stmt);
6165           /* Continue propagating into the RHS if this was not the
6166 @@ -953,7 +956,7 @@
6167                      TREE_TYPE (TREE_OPERAND (def_rhs, 0))))
6168         {
6169           tree *def_rhs_basep = &TREE_OPERAND (def_rhs, 0);
6170 -         tree new_offset, new_base, saved;
6171 +         tree new_offset, new_base, saved, new_rhs;
6172           while (handled_component_p (*def_rhs_basep))
6173             def_rhs_basep = &TREE_OPERAND (*def_rhs_basep, 0);
6174           saved = *def_rhs_basep;
6175 @@ -972,9 +975,12 @@
6176           *def_rhs_basep = build2 (MEM_REF, TREE_TYPE (*def_rhs_basep),
6177                                    new_base, new_offset);
6178           TREE_THIS_VOLATILE (*def_rhs_basep) = TREE_THIS_VOLATILE (rhs);
6179 +         TREE_SIDE_EFFECTS (*def_rhs_basep) = TREE_SIDE_EFFECTS (rhs);
6180           TREE_THIS_NOTRAP (*def_rhs_basep) = TREE_THIS_NOTRAP (rhs);
6181 -         gimple_assign_set_rhs1 (use_stmt,
6182 -                                 unshare_expr (TREE_OPERAND (def_rhs, 0)));
6183 +         new_rhs = unshare_expr (TREE_OPERAND (def_rhs, 0));
6184 +         gimple_assign_set_rhs1 (use_stmt, new_rhs);
6185 +         TREE_THIS_VOLATILE (new_rhs) = TREE_THIS_VOLATILE (rhs);
6186 +         TREE_SIDE_EFFECTS (new_rhs) = TREE_SIDE_EFFECTS (rhs);
6187           *def_rhs_basep = saved;
6188           fold_stmt_inplace (use_stmt);
6189           tidy_after_forward_propagate_addr (use_stmt);
6190 Index: gcc/varasm.c
6191 ===================================================================
6192 --- gcc/varasm.c        (.../tags/gcc_4_6_2_release)    (wersja 182550)
6193 +++ gcc/varasm.c        (.../branches/gcc-4_6-branch)   (wersja 182550)
6194 @@ -6751,11 +6751,14 @@
6195    /* A non-decl is an entry in the constant pool.  */
6196    if (!DECL_P (exp))
6197      local_p = true;
6198 -  /* Weakrefs may not bind locally, even though the weakref itself is
6199 -     always static and therefore local.
6200 -     FIXME: We can resolve this more curefuly by looking at the weakref
6201 -     alias.  */
6202 -  else if (lookup_attribute ("weakref", DECL_ATTRIBUTES (exp)))
6203 +  /* Weakrefs may not bind locally, even though the weakref itself is always
6204 +     static and therefore local.  Similarly, the resolver for ifunc functions
6205 +     might resolve to a non-local function.
6206 +     FIXME: We can resolve the weakref case more curefuly by looking at the
6207 +     weakref alias.  */
6208 +  else if (lookup_attribute ("weakref", DECL_ATTRIBUTES (exp))
6209 +          || (TREE_CODE (exp) == FUNCTION_DECL
6210 +              && lookup_attribute ("ifunc", DECL_ATTRIBUTES (exp))))
6211      local_p = false;
6212    /* Static variables are always local.  */
6213    else if (! TREE_PUBLIC (exp))
6214 Index: gcc/sched-deps.c
6215 ===================================================================
6216 --- gcc/sched-deps.c    (.../tags/gcc_4_6_2_release)    (wersja 182550)
6217 +++ gcc/sched-deps.c    (.../branches/gcc-4_6-branch)   (wersja 182550)
6218 @@ -2687,7 +2687,11 @@
6219           else
6220             sched_analyze_2 (deps, XEXP (link, 0), insn);
6221         }
6222 -      if (find_reg_note (insn, REG_SETJMP, NULL))
6223 +      /* Don't schedule anything after a tail call, tail call needs
6224 +        to use at least all call-saved registers.  */
6225 +      if (SIBLING_CALL_P (insn))
6226 +       reg_pending_barrier = TRUE_BARRIER;
6227 +      else if (find_reg_note (insn, REG_SETJMP, NULL))
6228         reg_pending_barrier = MOVE_BARRIER;
6229      }
6230  
6231 Index: gcc/tree-object-size.c
6232 ===================================================================
6233 --- gcc/tree-object-size.c      (.../tags/gcc_4_6_2_release)    (wersja 182550)
6234 +++ gcc/tree-object-size.c      (.../branches/gcc-4_6-branch)   (wersja 182550)
6235 @@ -175,7 +175,7 @@
6236        unsigned HOST_WIDE_INT sz;
6237  
6238        if (!osi || (object_size_type & 1) != 0
6239 -         || TREE_CODE (pt_var) != SSA_NAME)
6240 +         || TREE_CODE (TREE_OPERAND (pt_var, 0)) != SSA_NAME)
6241         {
6242           sz = compute_builtin_object_size (TREE_OPERAND (pt_var, 0),
6243                                             object_size_type & ~1);
6244 Index: gcc/lto-opts.c
6245 ===================================================================
6246 --- gcc/lto-opts.c      (.../tags/gcc_4_6_2_release)    (wersja 182550)
6247 +++ gcc/lto-opts.c      (.../branches/gcc-4_6-branch)   (wersja 182550)
6248 @@ -358,7 +358,7 @@
6249    size_t len, l, skip;
6250    const char *data, *p;
6251    const struct lto_simple_header *header;
6252 -  int32_t opts_offset;
6253 +  int opts_offset;
6254    struct lto_input_block ib;
6255  
6256    data = lto_get_section_data (file_data, LTO_section_opts, NULL, &len);
6257 @@ -379,10 +379,10 @@
6258  
6259        lto_check_version (header->lto_header.major_version,
6260                          header->lto_header.minor_version);
6261 -      
6262 +
6263        LTO_INIT_INPUT_BLOCK (ib, p + opts_offset, 0, header->main_size);
6264        input_options (&ib);
6265 -      
6266 +
6267        skip = header->main_size + opts_offset;
6268        l -= skip;
6269        p += skip;
6270 Index: gcc/c-parser.c
6271 ===================================================================
6272 --- gcc/c-parser.c      (.../tags/gcc_4_6_2_release)    (wersja 182550)
6273 +++ gcc/c-parser.c      (.../branches/gcc-4_6-branch)   (wersja 182550)
6274 @@ -6294,7 +6294,7 @@
6275               c_parser_error (parser, "expected identifier");
6276             c_parser_skip_until_found (parser, CPP_CLOSE_PAREN,
6277                                        "expected %<)%>");
6278 -           expr.value = fold_offsetof (offsetof_ref, NULL_TREE);
6279 +           expr.value = fold_offsetof (offsetof_ref);
6280           }
6281           break;
6282         case RID_CHOOSE_EXPR:
6283 Index: gcc/config/sparc/sparc.md
6284 ===================================================================
6285 --- gcc/config/sparc/sparc.md   (.../tags/gcc_4_6_2_release)    (wersja 182550)
6286 +++ gcc/config/sparc/sparc.md   (.../branches/gcc-4_6-branch)   (wersja 182550)
6287 @@ -28,6 +28,7 @@
6288    [(UNSPEC_MOVE_PIC            0)
6289     (UNSPEC_UPDATE_RETURN       1)
6290     (UNSPEC_LOAD_PCREL_SYM      2)
6291 +   (UNSPEC_FRAME_BLOCKAGE      3)
6292     (UNSPEC_MOVE_PIC_LABEL      5)
6293     (UNSPEC_SETH44              6)
6294     (UNSPEC_SETM44              7)
6295 @@ -1813,8 +1814,8 @@
6296  })
6297  
6298  (define_insn "*movsf_insn"
6299 -  [(set (match_operand:V32 0 "nonimmediate_operand" "=d,f,*r,*r,*r,f,*r,m,m")
6300 -       (match_operand:V32 1 "input_operand"        "GY,f,*rRY,Q,S,m,m,f,*rGY"))]
6301 +  [(set (match_operand:V32 0 "nonimmediate_operand" "=d,f,  *r,*r,*r,f,*r,m,   m")
6302 +       (match_operand:V32 1 "input_operand"        "GY,f,*rRY, Q, S,m, m,f,*rGY"))]
6303    "TARGET_FPU
6304     && (register_operand (operands[0], <V32:MODE>mode)
6305         || register_or_zero_operand (operands[1], <V32:MODE>mode))"
6306 @@ -1861,8 +1862,8 @@
6307  ;; when -mno-fpu.
6308  
6309  (define_insn "*movsf_insn_no_fpu"
6310 -  [(set (match_operand:SF 0 "nonimmediate_operand" "=r,r,r,r,m")
6311 -       (match_operand:SF 1 "input_operand"    "rR,Q,S,m,rG"))]
6312 +  [(set (match_operand:SF 0 "nonimmediate_operand" "=r,r,r,r, m")
6313 +       (match_operand:SF 1 "input_operand"        "rR,Q,S,m,rG"))]
6314    "! TARGET_FPU
6315     && (register_operand (operands[0], SFmode)
6316         || register_or_zero_operand (operands[1], SFmode))"
6317 @@ -1948,8 +1949,8 @@
6318  
6319  ;; Be careful, fmovd does not exist when !v9.
6320  (define_insn "*movdf_insn_sp32"
6321 -  [(set (match_operand:DF 0 "nonimmediate_operand" "=e,W,U,T,o,e,*r,o,e,o")
6322 -       (match_operand:DF 1 "input_operand"    "W#F,e,T,U,G,e,*rFo,*r,o#F,e"))]
6323 +  [(set (match_operand:DF 0 "nonimmediate_operand" "= e,W,U,T,o,e,  *r, o,  e,o")
6324 +       (match_operand:DF 1 "input_operand"        "W#F,e,T,U,G,e,*rFo,*r,o#F,e"))]
6325    "TARGET_FPU
6326     && ! TARGET_V9
6327     && (register_operand (operands[0], DFmode)
6328 @@ -1969,8 +1970,8 @@
6329    (set_attr "length" "*,*,*,*,2,2,2,2,2,2")])
6330  
6331  (define_insn "*movdf_insn_sp32_no_fpu"
6332 -  [(set (match_operand:DF 0 "nonimmediate_operand" "=U,T,o,r,o")
6333 -       (match_operand:DF 1 "input_operand"    "T,U,G,ro,r"))]
6334 +  [(set (match_operand:DF 0 "nonimmediate_operand" "=U,T,o, r,o")
6335 +       (match_operand:DF 1 "input_operand"        " T,U,G,ro,r"))]
6336    "! TARGET_FPU
6337     && ! TARGET_V9
6338     && (register_operand (operands[0], DFmode)
6339 @@ -1986,8 +1987,8 @@
6340  
6341  ;; We have available v9 double floats but not 64-bit integer registers.
6342  (define_insn "*movdf_insn_sp32_v9"
6343 -  [(set (match_operand:V64 0 "nonimmediate_operand" "=b,e,e,T,W,U,T,f,*r,o")
6344 -        (match_operand:V64 1 "input_operand" "GY,e,W#F,GY,e,T,U,o#F,*roGYDF,*rGYf"))]
6345 +  [(set (match_operand:V64 0 "nonimmediate_operand" "=b,e,  e, T,W,U,T,  f,   *r,    o")
6346 +       (match_operand:V64 1 "input_operand"        "GY,e,W#F,GY,e,T,U,o#F,*roFD,*rGYf"))]
6347    "TARGET_FPU
6348     && TARGET_V9
6349     && ! TARGET_ARCH64
6350 @@ -2009,8 +2010,8 @@
6351     (set_attr "fptype" "double,double,*,*,*,*,*,*,*,*")])
6352  
6353  (define_insn "*movdf_insn_sp32_v9_no_fpu"
6354 -  [(set (match_operand:DF 0 "nonimmediate_operand" "=U,T,T,r,o")
6355 -       (match_operand:DF 1 "input_operand"    "T,U,G,ro,rG"))]
6356 +  [(set (match_operand:DF 0 "nonimmediate_operand" "=U,T,T, r, o")
6357 +       (match_operand:DF 1 "input_operand"        " T,U,G,ro,rG"))]
6358    "! TARGET_FPU
6359     && TARGET_V9
6360     && ! TARGET_ARCH64
6361 @@ -2027,8 +2028,8 @@
6362  
6363  ;; We have available both v9 double floats and 64-bit integer registers.
6364  (define_insn "*movdf_insn_sp64"
6365 -  [(set (match_operand:V64 0 "nonimmediate_operand" "=b,e,e,W,*r,*r,m,*r")
6366 -        (match_operand:V64 1 "input_operand"    "GY,e,W#F,e,*rGY,m,*rGY,DF"))]
6367 +  [(set (match_operand:V64 0 "nonimmediate_operand" "=b,e,  e,W,  *r,*r,   m,*r")
6368 +       (match_operand:V64 1 "input_operand"        "GY,e,W#F,e,*rGY, m,*rGY,FD"))]
6369    "TARGET_FPU
6370     && TARGET_ARCH64
6371     && (register_operand (operands[0], <V64:MODE>mode)
6372 @@ -2047,8 +2048,8 @@
6373     (set_attr "fptype" "double,double,*,*,*,*,*,*")])
6374  
6375  (define_insn "*movdf_insn_sp64_no_fpu"
6376 -  [(set (match_operand:DF 0 "nonimmediate_operand" "=r,r,m")
6377 -        (match_operand:DF 1 "input_operand"    "r,m,rG"))]
6378 +  [(set (match_operand:DF 0 "nonimmediate_operand" "=r,r, m")
6379 +       (match_operand:DF 1 "input_operand"         "r,m,rG"))]
6380    "! TARGET_FPU
6381     && TARGET_ARCH64
6382     && (register_operand (operands[0], DFmode)
6383 @@ -2288,8 +2289,8 @@
6384  })
6385  
6386  (define_insn "*movtf_insn_sp32"
6387 -  [(set (match_operand:TF 0 "nonimmediate_operand" "=b,e,o,U,r")
6388 -       (match_operand:TF 1 "input_operand"    "G,oe,GeUr,o,roG"))]
6389 +  [(set (match_operand:TF 0 "nonimmediate_operand" "=b, e,   o,U,  r")
6390 +       (match_operand:TF 1 "input_operand"        " G,oe,GeUr,o,roG"))]
6391    "TARGET_FPU
6392     && ! TARGET_ARCH64
6393     && (register_operand (operands[0], TFmode)
6394 @@ -2302,8 +2303,8 @@
6395  ;; when -mno-fpu.
6396  
6397  (define_insn "*movtf_insn_sp32_no_fpu"
6398 -  [(set (match_operand:TF 0 "nonimmediate_operand" "=o,U,o,r,o")
6399 -       (match_operand:TF 1 "input_operand"    "G,o,U,roG,r"))]
6400 +  [(set (match_operand:TF 0 "nonimmediate_operand" "=o,U,o,  r,o")
6401 +       (match_operand:TF 1 "input_operand"        " G,o,U,roG,r"))]
6402    "! TARGET_FPU
6403     && ! TARGET_ARCH64
6404     && (register_operand (operands[0], TFmode)
6405 @@ -2312,8 +2313,8 @@
6406    [(set_attr "length" "4")])
6407  
6408  (define_insn "*movtf_insn_sp64"
6409 -  [(set (match_operand:TF 0 "nonimmediate_operand" "=b,e,o,r")
6410 -        (match_operand:TF 1 "input_operand"    "G,oe,Ger,roG"))]
6411 +  [(set (match_operand:TF 0 "nonimmediate_operand" "=b, e,  o,  r")
6412 +       (match_operand:TF 1 "input_operand"         "G,oe,Ger,roG"))]
6413    "TARGET_FPU
6414     && TARGET_ARCH64
6415     && ! TARGET_HARD_QUAD
6416 @@ -2323,8 +2324,8 @@
6417    [(set_attr "length" "2")])
6418  
6419  (define_insn "*movtf_insn_sp64_hq"
6420 -  [(set (match_operand:TF 0 "nonimmediate_operand" "=b,e,e,m,o,r")
6421 -        (match_operand:TF 1 "input_operand"    "G,e,m,e,rG,roG"))]
6422 +  [(set (match_operand:TF 0 "nonimmediate_operand" "=b,e,e,m, o,  r")
6423 +       (match_operand:TF 1 "input_operand"         "G,e,m,e,rG,roG"))]
6424    "TARGET_FPU
6425     && TARGET_ARCH64
6426     && TARGET_HARD_QUAD
6427 @@ -2341,8 +2342,8 @@
6428     (set_attr "length" "2,*,*,*,2,2")])
6429  
6430  (define_insn "*movtf_insn_sp64_no_fpu"
6431 -  [(set (match_operand:TF 0 "nonimmediate_operand" "=r,o")
6432 -        (match_operand:TF 1 "input_operand"    "orG,rG"))]
6433 +  [(set (match_operand:TF 0 "nonimmediate_operand" "=  r, o")
6434 +       (match_operand:TF 1 "input_operand"         "orG,rG"))]
6435    "! TARGET_FPU
6436     && TARGET_ARCH64
6437     && (register_operand (operands[0], TFmode)
6438 @@ -6338,6 +6339,25 @@
6439    ""
6440    [(set_attr "length" "0")])
6441  
6442 +;; Do not schedule instructions accessing memory before this point.
6443 +
6444 +(define_expand "frame_blockage"
6445 +  [(set (match_dup 0)
6446 +       (unspec:BLK [(match_dup 1)] UNSPEC_FRAME_BLOCKAGE))]
6447 +  ""
6448 +{
6449 +  operands[0] = gen_rtx_MEM (BLKmode, gen_rtx_SCRATCH (Pmode));
6450 +  MEM_VOLATILE_P (operands[0]) = 1;
6451 +  operands[1] = stack_pointer_rtx;
6452 +})
6453 +
6454 +(define_insn "*frame_blockage<P:mode>"
6455 +  [(set (match_operand:BLK 0 "" "")
6456 +       (unspec:BLK [(match_operand:P 1 "" "")] UNSPEC_FRAME_BLOCKAGE))]
6457 +  ""
6458 +  ""
6459 +  [(set_attr "length" "0")])
6460 +
6461  (define_expand "probe_stack"
6462    [(set (match_operand 0 "memory_operand" "") (const_int 0))]
6463    ""
6464 Index: gcc/config/sparc/sparc.c
6465 ===================================================================
6466 --- gcc/config/sparc/sparc.c    (.../tags/gcc_4_6_2_release)    (wersja 182550)
6467 +++ gcc/config/sparc/sparc.c    (.../branches/gcc-4_6-branch)   (wersja 182550)
6468 @@ -4569,8 +4569,9 @@
6469        else if (actual_fsize <= 8192)
6470         {
6471           insn = emit_insn (gen_stack_pointer_inc (GEN_INT (-4096)));
6472 +         RTX_FRAME_RELATED_P (insn) = 1;
6473 +
6474           /* %sp is still the CFA register.  */
6475 -         RTX_FRAME_RELATED_P (insn) = 1;
6476           insn
6477             = emit_insn (gen_stack_pointer_inc (GEN_INT (4096-actual_fsize)));
6478         }
6479 @@ -4592,8 +4593,18 @@
6480        else if (actual_fsize <= 8192)
6481         {
6482           insn = emit_insn (gen_save_register_window (GEN_INT (-4096)));
6483 +
6484           /* %sp is not the CFA register anymore.  */
6485           emit_insn (gen_stack_pointer_inc (GEN_INT (4096-actual_fsize)));
6486 +
6487 +         /* Make sure no %fp-based store is issued until after the frame is
6488 +            established.  The offset between the frame pointer and the stack
6489 +            pointer is calculated relative to the value of the stack pointer
6490 +            at the end of the function prologue, and moving instructions that
6491 +            access the stack via the frame pointer between the instructions
6492 +            that decrement the stack pointer could result in accessing the
6493 +            register window save area, which is volatile.  */
6494 +         emit_insn (gen_frame_blockage ());
6495         }
6496        else
6497         {
6498 Index: gcc/config/sparc/sparc.h
6499 ===================================================================
6500 --- gcc/config/sparc/sparc.h    (.../tags/gcc_4_6_2_release)    (wersja 182550)
6501 +++ gcc/config/sparc/sparc.h    (.../branches/gcc-4_6-branch)   (wersja 182550)
6502 @@ -408,6 +408,7 @@
6503  %{mcpu=sparclite:-Asparclite} \
6504  %{mcpu=sparclite86x:-Asparclite} \
6505  %{mcpu=f930:-Asparclite} %{mcpu=f934:-Asparclite} \
6506 +%{mcpu=v8:-Av8} \
6507  %{mv8plus:-Av8plus} \
6508  %{mcpu=v9:-Av9} \
6509  %{mcpu=ultrasparc:%{!mv8plus:-Av9a}} \
6510 Index: gcc/config/i386/i386.md
6511 ===================================================================
6512 --- gcc/config/i386/i386.md     (.../tags/gcc_4_6_2_release)    (wersja 182550)
6513 +++ gcc/config/i386/i386.md     (.../branches/gcc-4_6-branch)   (wersja 182550)
6514 @@ -1960,7 +1960,7 @@
6515  
6516  (define_insn "*movdi_internal_rex64"
6517    [(set (match_operand:DI 0 "nonimmediate_operand"
6518 -         "=r,r  ,r,m ,!m,*y,*y,?r ,m ,?*Ym,?*y,*x,*x,?r ,m,?*Yi,*x,?*x,?*Ym")
6519 +         "=r,r  ,r,m ,!o,*y,*y,?r ,m ,?*Ym,?*y,*x,*x,?r ,m,?*Yi,*x,?*x,?*Ym")
6520         (match_operand:DI 1 "general_operand"
6521           "Z ,rem,i,re,n ,C ,*y,*Ym,*y,r   ,m  ,C ,*x,*Yi,*x,r  ,m ,*Ym,*x"))]
6522    "TARGET_64BIT && !(MEM_P (operands[0]) && MEM_P (operands[1]))"
6523 @@ -2905,7 +2905,7 @@
6524  
6525  (define_insn "*movdf_internal_rex64"
6526    [(set (match_operand:DF 0 "nonimmediate_operand"
6527 -               "=f,m,f,r ,m,!r,!m,Y2*x,Y2*x,Y2*x,m   ,Yi,r ")
6528 +               "=f,m,f,r ,m,!r,!o,Y2*x,Y2*x,Y2*x,m   ,Yi,r ")
6529         (match_operand:DF 1 "general_operand"
6530                 "fm,f,G,rm,r,F ,F ,C   ,Y2*x,m   ,Y2*x,r ,Yi"))]
6531    "TARGET_64BIT && !(MEM_P (operands[0]) && MEM_P (operands[1]))
6532 @@ -5103,7 +5103,7 @@
6533     && reload_completed
6534     && (SSE_REG_P (operands[0])
6535         || (GET_CODE (operands[0]) == SUBREG
6536 -          && SSE_REG_P (operands[0])))"
6537 +          && SSE_REG_P (SUBREG_REG (operands[0]))))"
6538    [(set (match_dup 0) (float:MODEF (match_dup 1)))])
6539  
6540  (define_split
6541 @@ -5116,7 +5116,7 @@
6542     && reload_completed
6543     && (SSE_REG_P (operands[0])
6544         || (GET_CODE (operands[0]) == SUBREG
6545 -          && SSE_REG_P (operands[0])))"
6546 +          && SSE_REG_P (SUBREG_REG (operands[0]))))"
6547    [(set (match_dup 2) (match_dup 1))
6548     (set (match_dup 0) (float:MODEF (match_dup 2)))])
6549  
6550 @@ -5207,7 +5207,7 @@
6551     && reload_completed
6552     && (SSE_REG_P (operands[0])
6553         || (GET_CODE (operands[0]) == SUBREG
6554 -          && SSE_REG_P (operands[0])))"
6555 +          && SSE_REG_P (SUBREG_REG (operands[0]))))"
6556    [(const_int 0)]
6557  {
6558    rtx op1 = operands[1];
6559 @@ -5248,7 +5248,7 @@
6560     && reload_completed
6561     && (SSE_REG_P (operands[0])
6562         || (GET_CODE (operands[0]) == SUBREG
6563 -          && SSE_REG_P (operands[0])))"
6564 +          && SSE_REG_P (SUBREG_REG (operands[0]))))"
6565    [(const_int 0)]
6566  {
6567    operands[3] = simplify_gen_subreg (<ssevecmode>mode, operands[0],
6568 @@ -5270,7 +5270,7 @@
6569     && reload_completed
6570     && (SSE_REG_P (operands[0])
6571         || (GET_CODE (operands[0]) == SUBREG
6572 -          && SSE_REG_P (operands[0])))"
6573 +          && SSE_REG_P (SUBREG_REG (operands[0]))))"
6574    [(const_int 0)]
6575  {
6576    rtx op1 = operands[1];
6577 @@ -5314,7 +5314,7 @@
6578     && reload_completed
6579     && (SSE_REG_P (operands[0])
6580         || (GET_CODE (operands[0]) == SUBREG
6581 -          && SSE_REG_P (operands[0])))"
6582 +          && SSE_REG_P (SUBREG_REG (operands[0]))))"
6583    [(const_int 0)]
6584  {
6585    operands[3] = simplify_gen_subreg (<ssevecmode>mode, operands[0],
6586 @@ -5375,7 +5375,7 @@
6587     && reload_completed
6588     && (SSE_REG_P (operands[0])
6589         || (GET_CODE (operands[0]) == SUBREG
6590 -          && SSE_REG_P (operands[0])))"
6591 +          && SSE_REG_P (SUBREG_REG (operands[0]))))"
6592    [(set (match_dup 0) (float:MODEF (match_dup 1)))])
6593  
6594  (define_insn "*float<SSEMODEI24:mode><MODEF:mode>2_sse_nointerunit"
6595 @@ -5410,7 +5410,7 @@
6596     && reload_completed
6597     && (SSE_REG_P (operands[0])
6598         || (GET_CODE (operands[0]) == SUBREG
6599 -          && SSE_REG_P (operands[0])))"
6600 +          && SSE_REG_P (SUBREG_REG (operands[0]))))"
6601    [(set (match_dup 2) (match_dup 1))
6602     (set (match_dup 0) (float:MODEF (match_dup 2)))])
6603  
6604 @@ -5423,7 +5423,7 @@
6605     && reload_completed
6606     && (SSE_REG_P (operands[0])
6607         || (GET_CODE (operands[0]) == SUBREG
6608 -          && SSE_REG_P (operands[0])))"
6609 +          && SSE_REG_P (SUBREG_REG (operands[0]))))"
6610    [(set (match_dup 0) (float:MODEF (match_dup 1)))])
6611  
6612  (define_insn "*float<SSEMODEI24:mode><X87MODEF:mode>2_i387_with_temp"
6613 @@ -14625,7 +14625,7 @@
6614         emit_insn (gen_sse4_1_round<mode>2
6615                    (operands[0], operands[1], GEN_INT (0x04)));
6616        else
6617 -       ix86_expand_rint (operand0, operand1);
6618 +       ix86_expand_rint (operands[0], operands[1]);
6619      }
6620    else
6621      {
6622 @@ -14649,9 +14649,9 @@
6623    if (optimize_insn_for_size_p ())
6624      FAIL;
6625    if (TARGET_64BIT || (<MODE>mode != DFmode))
6626 -    ix86_expand_round (operand0, operand1);
6627 +    ix86_expand_round (operands[0], operands[1]);
6628    else
6629 -    ix86_expand_rounddf_32 (operand0, operand1);
6630 +    ix86_expand_rounddf_32 (operands[0], operands[1]);
6631    DONE;
6632  })
6633  
6634 @@ -14796,7 +14796,7 @@
6635  {
6636    if (optimize_insn_for_size_p ())
6637      FAIL;
6638 -  ix86_expand_lround (operand0, operand1);
6639 +  ix86_expand_lround (operands[0], operands[1]);
6640    DONE;
6641  })
6642  
6643 @@ -14871,9 +14871,9 @@
6644         emit_insn (gen_sse4_1_round<mode>2
6645                    (operands[0], operands[1], GEN_INT (0x01)));
6646        else if (TARGET_64BIT || (<MODE>mode != DFmode))
6647 -       ix86_expand_floorceil (operand0, operand1, true);
6648 +       ix86_expand_floorceil (operands[0], operands[1], true);
6649        else
6650 -       ix86_expand_floorceildf_32 (operand0, operand1, true);
6651 +       ix86_expand_floorceildf_32 (operands[0], operands[1], true);
6652      }
6653    else
6654      {
6655 @@ -15053,7 +15053,7 @@
6656  {
6657    if (TARGET_64BIT && optimize_insn_for_size_p ())
6658      FAIL;
6659 -  ix86_expand_lfloorceil (operand0, operand1, true);
6660 +  ix86_expand_lfloorceil (operands[0], operands[1], true);
6661    DONE;
6662  })
6663  
6664 @@ -15128,9 +15128,9 @@
6665        else if (optimize_insn_for_size_p ())
6666         FAIL;
6667        else if (TARGET_64BIT || (<MODE>mode != DFmode))
6668 -       ix86_expand_floorceil (operand0, operand1, false);
6669 +       ix86_expand_floorceil (operands[0], operands[1], false);
6670        else
6671 -       ix86_expand_floorceildf_32 (operand0, operand1, false);
6672 +       ix86_expand_floorceildf_32 (operands[0], operands[1], false);
6673      }
6674    else
6675      {
6676 @@ -15308,7 +15308,7 @@
6677    "SSE_FLOAT_MODE_P (<MODEF:MODE>mode) && TARGET_SSE_MATH
6678     && !flag_trapping_math"
6679  {
6680 -  ix86_expand_lfloorceil (operand0, operand1, false);
6681 +  ix86_expand_lfloorceil (operands[0], operands[1], false);
6682    DONE;
6683  })
6684  
6685 @@ -15383,9 +15383,9 @@
6686        else if (optimize_insn_for_size_p ())
6687         FAIL;
6688        else if (TARGET_64BIT || (<MODE>mode != DFmode))
6689 -       ix86_expand_trunc (operand0, operand1);
6690 +       ix86_expand_trunc (operands[0], operands[1]);
6691        else
6692 -       ix86_expand_truncdf_32 (operand0, operand1);
6693 +       ix86_expand_truncdf_32 (operands[0], operands[1]);
6694      }
6695    else
6696      {
6697 @@ -18285,8 +18285,8 @@
6698                      (match_operand:SI 3 "const_int_operand" "i")]
6699                     UNSPECV_LWPVAL_INTRINSIC)]
6700    "TARGET_LWP"
6701 -  "/* Avoid unused variable warning.  */
6702 -   (void) operand0;")
6703 +  ;; Avoid unused variable warning.
6704 +  "(void) operands[0];")
6705  
6706  (define_insn "*lwp_lwpval<mode>3_1"
6707    [(unspec_volatile [(match_operand:SWI48 0 "register_operand" "r")
6708 Index: gcc/config/i386/sse.md
6709 ===================================================================
6710 --- gcc/config/i386/sse.md      (.../tags/gcc_4_6_2_release)    (wersja 182550)
6711 +++ gcc/config/i386/sse.md      (.../branches/gcc-4_6-branch)   (wersja 182550)
6712 @@ -4521,15 +4521,14 @@
6713    [(set (match_operand:V4DF 0 "register_operand"         "=x,x")
6714         (vec_select:V4DF
6715           (vec_concat:V8DF
6716 -           (match_operand:V4DF 1 "nonimmediate_operand" "xm,x")
6717 -           (match_operand:V4DF 2 "nonimmediate_operand" " 1,xm"))
6718 +           (match_operand:V4DF 1 "nonimmediate_operand" " x,m")
6719 +           (match_operand:V4DF 2 "nonimmediate_operand" "xm,1"))
6720           (parallel [(const_int 0) (const_int 4)
6721                      (const_int 2) (const_int 6)])))]
6722 -  "TARGET_AVX
6723 -   && (!MEM_P (operands[1]) || rtx_equal_p (operands[1], operands[2]))"
6724 +  "TARGET_AVX"
6725    "@
6726 -   vmovddup\t{%1, %0|%0, %1}
6727 -   vunpcklpd\t{%2, %1, %0|%0, %1, %2}"
6728 +   vunpcklpd\t{%2, %1, %0|%0, %1, %2}
6729 +   vmovddup\t{%1, %0|%0, %1}"
6730    [(set_attr "type" "sselog")
6731     (set_attr "prefix" "vex")
6732     (set_attr "mode" "V4DF")])
6733 Index: gcc/config/i386/freebsd.h
6734 ===================================================================
6735 --- gcc/config/i386/freebsd.h   (.../tags/gcc_4_6_2_release)    (wersja 182550)
6736 +++ gcc/config/i386/freebsd.h   (.../branches/gcc-4_6-branch)   (wersja 182550)
6737 @@ -147,3 +147,6 @@
6738  #if FBSD_MAJOR >= 6
6739  #define SUBTARGET32_DEFAULT_CPU "i486"
6740  #endif
6741 +
6742 +#define TARGET_ASM_FILE_END file_end_indicate_exec_stack
6743 +
6744 Index: gcc/config/i386/avxintrin.h
6745 ===================================================================
6746 --- gcc/config/i386/avxintrin.h (.../tags/gcc_4_6_2_release)    (wersja 182550)
6747 +++ gcc/config/i386/avxintrin.h (.../branches/gcc-4_6-branch)   (wersja 182550)
6748 @@ -759,7 +759,7 @@
6749  
6750  #ifdef __x86_64__
6751  extern __inline __m256i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
6752 -_mm256_insert_epi64 (__m256i __X, int __D, int const __N)
6753 +_mm256_insert_epi64 (__m256i __X, long long __D, int const __N)
6754  {
6755    __m128i __Y = _mm256_extractf128_si256 (__X, __N >> 1);
6756    __Y = _mm_insert_epi64 (__Y, __D, __N % 2);
6757 Index: gcc/config/i386/i386.c
6758 ===================================================================
6759 --- gcc/config/i386/i386.c      (.../tags/gcc_4_6_2_release)    (wersja 182550)
6760 +++ gcc/config/i386/i386.c      (.../branches/gcc-4_6-branch)   (wersja 182550)
6761 @@ -16329,7 +16329,6 @@
6762    basic_block bb = BLOCK_FOR_INSN (insn);
6763    int distance = 0;
6764    df_ref *def_rec;
6765 -  enum attr_type insn_type;
6766  
6767    if (insn != BB_HEAD (bb))
6768      {
6769 @@ -16345,8 +16344,8 @@
6770                      && (regno1 == DF_REF_REGNO (*def_rec)
6771                         || regno2 == DF_REF_REGNO (*def_rec)))
6772                   {
6773 -                   insn_type = get_attr_type (prev);
6774 -                   if (insn_type != TYPE_LEA)
6775 +                   if (recog_memoized (prev) < 0
6776 +                       || get_attr_type (prev) != TYPE_LEA)
6777                       goto done;
6778                   }
6779             }
6780 @@ -16385,8 +16384,8 @@
6781                         && (regno1 == DF_REF_REGNO (*def_rec)
6782                             || regno2 == DF_REF_REGNO (*def_rec)))
6783                       {
6784 -                       insn_type = get_attr_type (prev);
6785 -                       if (insn_type != TYPE_LEA)
6786 +                       if (recog_memoized (prev) < 0
6787 +                           || get_attr_type (prev) != TYPE_LEA)
6788                           goto done;
6789                       }
6790                 }
6791 Index: gcc/config/avr/libgcc.S
6792 ===================================================================
6793 --- gcc/config/avr/libgcc.S     (.../tags/gcc_4_6_2_release)    (wersja 182550)
6794 +++ gcc/config/avr/libgcc.S     (.../branches/gcc-4_6-branch)   (wersja 182550)
6795 @@ -582,7 +582,16 @@
6796         push r17
6797         push r28
6798         push r29
6799 +#if defined (__AVR_HAVE_8BIT_SP__)
6800 +;; FIXME: __AVR_HAVE_8BIT_SP__ is set on device level, not on core level
6801 +;;        so this lines are dead code.  To make it work, devices without
6802 +;;        SP_H must get their own multilib(s), see PR51345.
6803         in      r28,__SP_L__
6804 +       sub     r28,r26
6805 +       clr     r29
6806 +       out     __SP_L__,r28
6807 +#else
6808 +       in      r28,__SP_L__
6809         in      r29,__SP_H__
6810         sub     r28,r26
6811         sbc     r29,r27
6812 @@ -591,6 +600,7 @@
6813         out     __SP_H__,r29
6814         out     __SREG__,__tmp_reg__
6815         out     __SP_L__,r28
6816 +#endif
6817  #if defined (__AVR_HAVE_EIJMP_EICALL__)
6818         eijmp
6819  #else
6820 @@ -625,6 +635,15 @@
6821         ldd     r16,Y+4
6822         ldd     r17,Y+3
6823         ldd     r26,Y+2
6824 +#if defined (__AVR_HAVE_8BIT_SP__)
6825 +;; FIXME: __AVR_HAVE_8BIT_SP__ is set on device level, not on core level
6826 +;;        so this lines are dead code.  To make it work, devices without
6827 +;;        SP_H must get their own multilib(s).
6828 +       ldd     r29,Y+1
6829 +       add     r28,r30
6830 +       out     __SP_L__,r28
6831 +       mov     r28, r26
6832 +#else
6833         ldd     r27,Y+1
6834         add     r28,r30
6835         adc     r29,__zero_reg__
6836 @@ -635,6 +654,7 @@
6837         out     __SP_L__,r28
6838         mov_l   r28, r26
6839         mov_h   r29, r27
6840 +#endif
6841         ret
6842  .endfunc
6843  #endif /* defined (L_epilogue) */
6844 Index: gcc/config/avr/avr.md
6845 ===================================================================
6846 --- gcc/config/avr/avr.md       (.../tags/gcc_4_6_2_release)    (wersja 182550)
6847 +++ gcc/config/avr/avr.md       (.../branches/gcc-4_6-branch)   (wersja 182550)
6848 @@ -299,7 +299,7 @@
6849    [(set (match_operand:HI 0 "stack_register_operand" "=q")
6850          (unspec_volatile:HI [(match_operand:HI 1 "register_operand"  "r")] 
6851                             UNSPECV_WRITE_SP_IRQ_OFF))]
6852 -  ""
6853 +  "!AVR_HAVE_8BIT_SP"
6854    "out __SP_H__, %B1
6855         out __SP_L__, %A1"
6856    [(set_attr "length" "2")
6857 @@ -309,7 +309,7 @@
6858    [(set (match_operand:HI 0 "stack_register_operand" "=q")
6859          (unspec_volatile:HI [(match_operand:HI 1 "register_operand"  "r")] 
6860                             UNSPECV_WRITE_SP_IRQ_ON))]
6861 -  ""
6862 +  "!AVR_HAVE_8BIT_SP"
6863    "cli
6864          out __SP_H__, %B1
6865         sei
6866 Index: gcc/config/avr/avr-devices.c
6867 ===================================================================
6868 --- gcc/config/avr/avr-devices.c        (.../tags/gcc_4_6_2_release)    (wersja 182550)
6869 +++ gcc/config/avr/avr-devices.c        (.../branches/gcc-4_6-branch)   (wersja 182550)
6870 @@ -70,7 +70,7 @@
6871    { "attiny2313a",          ARCH_AVR25, "__AVR_ATtiny2313A__",      1, 0x0060, "tn2313a" },
6872    { "attiny24",             ARCH_AVR25, "__AVR_ATtiny24__",         1, 0x0060, "tn24" },
6873    { "attiny24a",            ARCH_AVR25, "__AVR_ATtiny24A__",        1, 0x0060, "tn24a" },
6874 -  { "attiny4313",           ARCH_AVR25, "__AVR_ATtiny4313__",       1, 0x0060, "tn4313" },
6875 +  { "attiny4313",           ARCH_AVR25, "__AVR_ATtiny4313__",       0, 0x0060, "tn4313" },
6876    { "attiny44",             ARCH_AVR25, "__AVR_ATtiny44__",         0, 0x0060, "tn44" },
6877    { "attiny44a",            ARCH_AVR25, "__AVR_ATtiny44A__",        0, 0x0060, "tn44a" },
6878    { "attiny84",             ARCH_AVR25, "__AVR_ATtiny84__",         0, 0x0060, "tn84" },
6879 @@ -88,7 +88,7 @@
6880    { "attiny87",             ARCH_AVR25, "__AVR_ATtiny87__",         0, 0x0100, "tn87" },
6881    { "attiny48",             ARCH_AVR25, "__AVR_ATtiny48__",         0, 0x0100, "tn48" },
6882    { "attiny88",             ARCH_AVR25, "__AVR_ATtiny88__",         0, 0x0100, "tn88" },
6883 -  { "at86rf401",            ARCH_AVR25, "__AVR_AT86RF401__",        1, 0x0060, "86401" },
6884 +  { "at86rf401",            ARCH_AVR25, "__AVR_AT86RF401__",        0, 0x0060, "86401" },
6885      /* Classic, > 8K, <= 64K.  */
6886    { "avr3",                 ARCH_AVR3, NULL,                        0, 0x0060, "43355" },
6887    { "at43usb355",           ARCH_AVR3, "__AVR_AT43USB355__",        0, 0x0060, "43355" },
6888 Index: gcc/config/avr/avr.c
6889 ===================================================================
6890 --- gcc/config/avr/avr.c        (.../tags/gcc_4_6_2_release)    (wersja 182550)
6891 +++ gcc/config/avr/avr.c        (.../branches/gcc-4_6-branch)   (wersja 182550)
6892 @@ -1879,9 +1879,12 @@
6893             }
6894           else if (test_hard_reg_class (STACK_REG, src))
6895             {
6896 -             *l = 2;   
6897 -             return (AS2 (in,%A0,__SP_L__) CR_TAB
6898 -                     AS2 (in,%B0,__SP_H__));
6899 +              *l = 2;
6900 +              return AVR_HAVE_8BIT_SP
6901 +                ? (AS2 (in,%A0,__SP_L__) CR_TAB
6902 +                   AS1 (clr,%B0))
6903 +                : (AS2 (in,%A0,__SP_L__) CR_TAB
6904 +                   AS2 (in,%B0,__SP_H__));
6905             }
6906  
6907           if (AVR_HAVE_MOVW)
6908 @@ -5173,10 +5176,10 @@
6909  
6910    default_file_start ();
6911  
6912 -/*  fprintf (asm_out_file, "\t.arch %s\n", avr_mcu_name);*/
6913 -  fputs ("__SREG__ = 0x3f\n"
6914 -        "__SP_H__ = 0x3e\n"
6915 -        "__SP_L__ = 0x3d\n", asm_out_file);
6916 +  fputs ("__SREG__ = 0x3f\n", asm_out_file);
6917 +  if (!AVR_HAVE_8BIT_SP)
6918 +    fputs ("__SP_H__ = 0x3e\n", asm_out_file);
6919 +  fputs ("__SP_L__ = 0x3d\n", asm_out_file);
6920    
6921    fputs ("__tmp_reg__ = 0\n" 
6922           "__zero_reg__ = 1\n", asm_out_file);
6923 Index: gcc/config/rs6000/rs6000.c
6924 ===================================================================
6925 --- gcc/config/rs6000/rs6000.c  (.../tags/gcc_4_6_2_release)    (wersja 182550)
6926 +++ gcc/config/rs6000/rs6000.c  (.../branches/gcc-4_6-branch)   (wersja 182550)
6927 @@ -2612,6 +2612,7 @@
6928       off.  */
6929    rs6000_altivec_abi = 1;
6930    TARGET_ALTIVEC_VRSAVE = 1;
6931 +  rs6000_current_abi = ABI_DARWIN;
6932  
6933    if (DEFAULT_ABI == ABI_DARWIN
6934        && TARGET_64BIT)
6935 @@ -6824,6 +6825,7 @@
6936  #if TARGET_MACHO
6937        && DEFAULT_ABI == ABI_DARWIN
6938        && (flag_pic || MACHO_DYNAMIC_NO_PIC_P)
6939 +      && machopic_symbol_defined_p (x)
6940  #else
6941        && DEFAULT_ABI == ABI_V4
6942        && !flag_pic
6943 @@ -20227,7 +20229,7 @@
6944  {
6945    /* This blockage is needed so that sched doesn't decide to move
6946       the sp change before the register restores.  */
6947 -  if (frame_reg_rtx != sp_reg_rtx
6948 +  if (DEFAULT_ABI == ABI_V4
6949        || (TARGET_SPE_ABI
6950           && info->spe_64bit_regs_used != 0
6951           && info->first_gp_reg_save != 32))
6952 @@ -20644,56 +20646,52 @@
6953      {
6954        int i;
6955        rtx spe_save_area_ptr;
6956
6957 +      int save_ptr_to_sp;
6958 +      int ool_adjust = 0;
6959 +
6960        /* Determine whether we can address all of the registers that need
6961 -        to be saved with an offset from the stack pointer that fits in
6962 +        to be saved with an offset from frame_reg_rtx that fits in
6963          the small const field for SPE memory instructions.  */
6964 -      int spe_regs_addressable_via_sp
6965 -       = (SPE_CONST_OFFSET_OK(info->spe_gp_save_offset + sp_offset
6966 -                              + (32 - info->first_gp_reg_save - 1) * reg_size)
6967 +      int spe_regs_addressable
6968 +       = (SPE_CONST_OFFSET_OK (info->spe_gp_save_offset + sp_offset
6969 +                               + reg_size * (32 - info->first_gp_reg_save - 1))
6970            && saving_GPRs_inline);
6971        int spe_offset;
6972
6973 -      if (spe_regs_addressable_via_sp)
6974 +
6975 +      if (spe_regs_addressable)
6976         {
6977           spe_save_area_ptr = frame_reg_rtx;
6978 +         save_ptr_to_sp = info->total_size - sp_offset;
6979           spe_offset = info->spe_gp_save_offset + sp_offset;
6980         }
6981        else
6982         {
6983           /* Make r11 point to the start of the SPE save area.  We need
6984              to be careful here if r11 is holding the static chain.  If
6985 -            it is, then temporarily save it in r0.  We would use r0 as
6986 -            our base register here, but using r0 as a base register in
6987 -            loads and stores means something different from what we
6988 -            would like.  */
6989 -         int ool_adjust = (saving_GPRs_inline
6990 -                           ? 0
6991 -                           : (info->first_gp_reg_save
6992 -                              - (FIRST_SAVRES_REGISTER+1))*8);
6993 -         HOST_WIDE_INT offset = (info->spe_gp_save_offset
6994 -                                 + sp_offset - ool_adjust);
6995 +            it is, then temporarily save it in r0.  */
6996 +         int offset;
6997  
6998 +         if (!saving_GPRs_inline)
6999 +           ool_adjust = 8 * (info->first_gp_reg_save
7000 +                             - (FIRST_SAVRES_REGISTER + 1));
7001 +         offset = info->spe_gp_save_offset + sp_offset - ool_adjust;
7002 +         spe_save_area_ptr = gen_rtx_REG (Pmode, 11);
7003 +         save_ptr_to_sp = info->total_size - sp_offset + offset;
7004 +         spe_offset = 0;
7005 +
7006           if (using_static_chain_p)
7007             {
7008               rtx r0 = gen_rtx_REG (Pmode, 0);
7009               gcc_assert (info->first_gp_reg_save > 11);
7010
7011 -             emit_move_insn (r0, gen_rtx_REG (Pmode, 11));
7012 +
7013 +             emit_move_insn (r0, spe_save_area_ptr);
7014             }
7015
7016 -         spe_save_area_ptr = gen_rtx_REG (Pmode, 11);
7017 -         insn = emit_insn (gen_addsi3 (spe_save_area_ptr,
7018 -                                       frame_reg_rtx,
7019 -                                       GEN_INT (offset)));
7020 -         /* We need to make sure the move to r11 gets noted for
7021 -            properly outputting unwind information.  */
7022 -         if (!saving_GPRs_inline)
7023 -           rs6000_frame_related (insn, frame_reg_rtx, offset,
7024 -                                 NULL_RTX, NULL_RTX);
7025 -         spe_offset = 0;
7026 +         emit_insn (gen_addsi3 (spe_save_area_ptr,
7027 +                                frame_reg_rtx, GEN_INT (offset)));
7028 +         if (REGNO (frame_reg_rtx) == 11)
7029 +           sp_offset = -info->spe_gp_save_offset + ool_adjust;
7030         }
7031
7032 +
7033        if (saving_GPRs_inline)
7034         {
7035           for (i = 0; i < 32 - info->first_gp_reg_save; i++)
7036 @@ -20705,36 +20703,34 @@
7037                 /* We're doing all this to ensure that the offset fits into
7038                    the immediate offset of 'evstdd'.  */
7039                 gcc_assert (SPE_CONST_OFFSET_OK (reg_size * i + spe_offset));
7040
7041 +
7042                 offset = GEN_INT (reg_size * i + spe_offset);
7043                 addr = gen_rtx_PLUS (Pmode, spe_save_area_ptr, offset);
7044                 mem = gen_rtx_MEM (V2SImode, addr);
7045 -  
7046 +
7047                 insn = emit_move_insn (mem, reg);
7048 -          
7049 -               rs6000_frame_related (insn, spe_save_area_ptr,
7050 -                                     info->spe_gp_save_offset
7051 -                                     + sp_offset + reg_size * i,
7052 -                                     offset, const0_rtx);
7053 +
7054 +               rs6000_frame_related (insn,
7055 +                                     spe_save_area_ptr, save_ptr_to_sp,
7056 +                                     NULL_RTX, NULL_RTX);
7057               }
7058         }
7059        else
7060         {
7061           rtx par;
7062  
7063 -         par = rs6000_make_savres_rtx (info, gen_rtx_REG (Pmode, 11),
7064 -                                       0, reg_mode,
7065 +         par = rs6000_make_savres_rtx (info, spe_save_area_ptr,
7066 +                                       ool_adjust, reg_mode,
7067                                         /*savep=*/true, /*gpr=*/true,
7068                                         /*lr=*/false);
7069           insn = emit_insn (par);
7070 -         rs6000_frame_related (insn, frame_ptr_rtx, info->total_size,
7071 +         rs6000_frame_related (insn, spe_save_area_ptr, save_ptr_to_sp,
7072                                 NULL_RTX, NULL_RTX);
7073         }
7074 -                                       
7075
7076 +
7077        /* Move the static chain pointer back.  */
7078 -      if (using_static_chain_p && !spe_regs_addressable_via_sp)
7079 -       emit_move_insn (gen_rtx_REG (Pmode, 11), gen_rtx_REG (Pmode, 0));
7080 +      if (using_static_chain_p && !spe_regs_addressable)
7081 +       emit_move_insn (spe_save_area_ptr, gen_rtx_REG (Pmode, 0));
7082      }
7083    else if (!WORLD_SAVE_P (info) && !saving_GPRs_inline)
7084      {
7085 @@ -20743,10 +20739,12 @@
7086        /* Need to adjust r11 (r12) if we saved any FPRs.  */
7087        if (info->first_fp_reg_save != 64)
7088          {
7089 -         rtx dest_reg = gen_rtx_REG (reg_mode, DEFAULT_ABI == ABI_AIX
7090 -                                     ? 12 : 11);
7091 -         rtx offset = GEN_INT (sp_offset
7092 -                                + (-8 * (64-info->first_fp_reg_save)));
7093 +         rtx dest_reg = gen_rtx_REG (Pmode, DEFAULT_ABI == ABI_AIX ? 12 : 11);
7094 +         int save_off = 8 * (64 - info->first_fp_reg_save);
7095 +         rtx offset = GEN_INT (sp_offset - save_off);
7096 +
7097 +         if (REGNO (dest_reg) == REGNO (frame_reg_rtx))
7098 +           sp_offset = save_off;
7099           emit_insn (gen_add3_insn (dest_reg, frame_reg_rtx, offset));
7100          }
7101  
7102 @@ -21622,40 +21620,39 @@
7103        && info->first_gp_reg_save != 32)
7104      {
7105        /* Determine whether we can address all of the registers that need
7106 -         to be saved with an offset from the stack pointer that fits in
7107 -         the small const field for SPE memory instructions.  */
7108 -      int spe_regs_addressable_via_sp
7109 -       = (SPE_CONST_OFFSET_OK(info->spe_gp_save_offset + sp_offset
7110 -                              + (32 - info->first_gp_reg_save - 1) * reg_size)
7111 +        to be saved with an offset from frame_reg_rtx that fits in
7112 +        the small const field for SPE memory instructions.  */
7113 +      int spe_regs_addressable
7114 +       = (SPE_CONST_OFFSET_OK (info->spe_gp_save_offset + sp_offset
7115 +                               + reg_size * (32 - info->first_gp_reg_save - 1))
7116            && restoring_GPRs_inline);
7117        int spe_offset;
7118 +      int ool_adjust = 0;
7119  
7120 -      if (spe_regs_addressable_via_sp)
7121 +      if (spe_regs_addressable)
7122         spe_offset = info->spe_gp_save_offset + sp_offset;
7123        else
7124 -        {
7125 +       {
7126           rtx old_frame_reg_rtx = frame_reg_rtx;
7127 -          /* Make r11 point to the start of the SPE save area.  We worried about
7128 -             not clobbering it when we were saving registers in the prologue.
7129 -             There's no need to worry here because the static chain is passed
7130 -             anew to every function.  */
7131 -         int ool_adjust = (restoring_GPRs_inline
7132 -                           ? 0
7133 -                           : (info->first_gp_reg_save
7134 -                              - (FIRST_SAVRES_REGISTER+1))*8);
7135 +         /* Make r11 point to the start of the SPE save area.  We worried about
7136 +            not clobbering it when we were saving registers in the prologue.
7137 +            There's no need to worry here because the static chain is passed
7138 +            anew to every function.  */
7139  
7140 -         if (frame_reg_rtx == sp_reg_rtx)
7141 -           frame_reg_rtx = gen_rtx_REG (Pmode, 11);
7142 -          emit_insn (gen_addsi3 (frame_reg_rtx, old_frame_reg_rtx,
7143 +         if (!restoring_GPRs_inline)
7144 +           ool_adjust = 8 * (info->first_gp_reg_save
7145 +                             - (FIRST_SAVRES_REGISTER + 1));
7146 +         frame_reg_rtx = gen_rtx_REG (Pmode, 11);
7147 +         emit_insn (gen_addsi3 (frame_reg_rtx, old_frame_reg_rtx,
7148                                  GEN_INT (info->spe_gp_save_offset
7149                                           + sp_offset
7150                                           - ool_adjust)));
7151           /* Keep the invariant that frame_reg_rtx + sp_offset points
7152              at the top of the stack frame.  */
7153 -         sp_offset = -info->spe_gp_save_offset;
7154 +         sp_offset = -info->spe_gp_save_offset + ool_adjust;
7155  
7156 -          spe_offset = 0;
7157 -        }
7158 +         spe_offset = 0;
7159 +       }
7160  
7161        if (restoring_GPRs_inline)
7162         {
7163 @@ -21695,8 +21692,8 @@
7164         {
7165           rtx par;
7166  
7167 -         par = rs6000_make_savres_rtx (info, gen_rtx_REG (Pmode, 11),
7168 -                                       0, reg_mode,
7169 +         par = rs6000_make_savres_rtx (info, frame_reg_rtx,
7170 +                                       ool_adjust, reg_mode,
7171                                         /*savep=*/false, /*gpr=*/true,
7172                                         /*lr=*/true);
7173           emit_jump_insn (par);
7174 @@ -21717,12 +21714,12 @@
7175                                  sp_offset, can_use_exit);
7176        else
7177         {
7178 -         emit_insn (gen_add3_insn (gen_rtx_REG (Pmode, DEFAULT_ABI == ABI_AIX
7179 -                                                       ? 12 : 11),
7180 -                                   frame_reg_rtx,
7181 +         rtx src_reg = gen_rtx_REG (Pmode, DEFAULT_ABI == ABI_AIX ? 12 : 11);
7182 +
7183 +         emit_insn (gen_add3_insn (src_reg, frame_reg_rtx,
7184                                     GEN_INT (sp_offset - info->fp_size)));
7185 -         if (REGNO (frame_reg_rtx) == 11)
7186 -           sp_offset += info->fp_size;
7187 +         if (REGNO (frame_reg_rtx) == REGNO (src_reg))
7188 +           sp_offset = info->fp_size;
7189         }
7190  
7191        par = rs6000_make_savres_rtx (info, frame_reg_rtx,
7192 Index: gcc/config/darwin.c
7193 ===================================================================
7194 --- gcc/config/darwin.c (.../tags/gcc_4_6_2_release)    (wersja 182550)
7195 +++ gcc/config/darwin.c (.../branches/gcc-4_6-branch)   (wersja 182550)
7196 @@ -1753,19 +1753,51 @@
7197    return (!strncmp ((const char *)p, "_OBJC_", 6));
7198  }
7199  
7200 -/* LTO support for Mach-O.  */
7201 +/* LTO support for Mach-O.
7202  
7203 -/* Section names for LTO sections.  */
7204 -static unsigned int lto_section_names_offset = 0;
7205 +   This version uses three mach-o sections to encapsulate the (unlimited
7206 +   number of) lto sections.
7207  
7208 -/* This is the obstack which we use to allocate the many strings.  */
7209 -static struct obstack lto_section_names_obstack;
7210 +   __GNU_LTO, __lto_sections  contains the concatented GNU LTO section data.
7211 +   __GNU_LTO, __section_names contains the GNU LTO section names.
7212 +   __GNU_LTO, __section_index contains an array of values that index these.
7213  
7214 -/* Segment name for LTO sections.  */
7215 +   Indexed thus:
7216 +     <section offset from the start of __GNU_LTO, __lto_sections>,
7217 +     <section length>
7218 +     <name offset from the start of __GNU_LTO, __section_names,
7219 +     <name length>.
7220 +
7221 +   At present, for both m32 and m64 mach-o files each of these fields is
7222 +   represented  by a uint32_t.  This is because, AFAICT, a mach-o object
7223 +   cannot exceed 4Gb because the section_64 offset field (see below) is 32bits.
7224 +
7225 +    uint32_t offset;
7226 +   "offset  An integer specifying the offset to this section in the file."  */
7227 +
7228 +/* Count lto section numbers.  */
7229 +static unsigned int lto_section_num = 0;
7230 +
7231 +/* A vector of information about LTO sections, at present, we only have
7232 +   the name.  TODO: see if we can get the data length somehow.  */
7233 +typedef struct GTY (()) darwin_lto_section_e {
7234 +  const char *sectname;
7235 +} darwin_lto_section_e ;
7236 +DEF_VEC_O(darwin_lto_section_e);
7237 +DEF_VEC_ALLOC_O(darwin_lto_section_e, gc);
7238 +
7239 +static GTY (()) VEC (darwin_lto_section_e, gc) * lto_section_names;
7240 +
7241 +/* Segment for LTO data.  */
7242  #define LTO_SEGMENT_NAME "__GNU_LTO"
7243  
7244 -/* Section name for LTO section names section.  */
7245 -#define LTO_NAMES_SECTION "__section_names"
7246 +/* Section wrapper scheme (used here to wrap the unlimited number of LTO
7247 +   sections into three Mach-O ones).
7248 +   NOTE: These names MUST be kept in sync with those in
7249 +        libiberty/simple-object-mach-o.  */
7250 +#define LTO_SECTS_SECTION "__wrapper_sects"
7251 +#define LTO_NAMES_SECTION "__wrapper_names"
7252 +#define LTO_INDEX_SECTION "__wrapper_index"
7253  
7254  /* File to temporarily store LTO data.  This is appended to asm_out_file
7255     in darwin_end_file.  */
7256 @@ -1808,37 +1840,38 @@
7257                           unsigned int flags,
7258                           tree decl ATTRIBUTE_UNUSED)
7259  {
7260 -  /* LTO sections go in a special segment __GNU_LTO.  We want to replace the
7261 -     section name with something we can use to represent arbitrary-length
7262 -     names (section names in Mach-O are at most 16 characters long).  */
7263 +  /* LTO sections go in a special section that encapsulates the (unlimited)
7264 +     number of GNU LTO sections within a single mach-o one.  */
7265    if (strncmp (name, LTO_SECTION_NAME_PREFIX,
7266                strlen (LTO_SECTION_NAME_PREFIX)) == 0)
7267      {
7268 +      darwin_lto_section_e e;
7269        /* We expect certain flags to be set...  */
7270        gcc_assert ((flags & (SECTION_DEBUG | SECTION_NAMED))
7271                   == (SECTION_DEBUG | SECTION_NAMED));
7272  
7273 -      /* Add the section name to the things to output when we end the
7274 -        current assembler output file.
7275 -        This is all not very efficient, but that doesn't matter -- this
7276 -        shouldn't be a hot path in the compiler...  */
7277 -      obstack_1grow (&lto_section_names_obstack, '\t');
7278 -      obstack_grow (&lto_section_names_obstack, ".ascii ", 7);
7279 -      obstack_1grow (&lto_section_names_obstack, '"');
7280 -      obstack_grow (&lto_section_names_obstack, name, strlen (name));
7281 -      obstack_grow (&lto_section_names_obstack, "\\0\"\n", 4);
7282 -
7283 -      /* Output the dummy section name.  */
7284 -      fprintf (asm_out_file, "\t# %s\n", name);
7285 -      fprintf (asm_out_file, "\t.section %s,__%08X,regular,debug\n",
7286 -              LTO_SEGMENT_NAME, lto_section_names_offset);
7287 -
7288 -      /* Update the offset for the next section name.  Make sure we stay
7289 -        within reasonable length.  */  
7290 -      lto_section_names_offset += strlen (name) + 1;
7291 -      gcc_assert (lto_section_names_offset > 0
7292 -                 && lto_section_names_offset < ((unsigned) 1 << 31));
7293 -    }
7294 +      /* Switch to our combined section.  */
7295 +      fprintf (asm_out_file, "\t.section %s,%s,regular,debug\n",
7296 +              LTO_SEGMENT_NAME, LTO_SECTS_SECTION);
7297 +      /* Output a label for the start of this sub-section.  */
7298 +      fprintf (asm_out_file, "L_GNU_LTO%d:\t;# %s\n",
7299 +              lto_section_num, name);
7300 +      /* We have to jump through hoops to get the values of the intra-section
7301 +         offsets... */
7302 +      fprintf (asm_out_file, "\t.set L$gnu$lto$offs%d,L_GNU_LTO%d-L_GNU_LTO0\n",
7303 +              lto_section_num, lto_section_num);
7304 +      fprintf (asm_out_file,
7305 +              "\t.set L$gnu$lto$size%d,L_GNU_LTO%d-L_GNU_LTO%d\n",
7306 +              lto_section_num, lto_section_num+1, lto_section_num);
7307 +      lto_section_num++;
7308 +      e.sectname = xstrdup (name);
7309 +      /* Keep the names, we'll need to make a table later.
7310 +         TODO: check that we do not revisit sections, that would break
7311 +         the assumption of how this is done.  */
7312 +      if (lto_section_names == NULL)
7313 +        lto_section_names = VEC_alloc (darwin_lto_section_e, gc, 16);
7314 +      VEC_safe_push (darwin_lto_section_e, gc, lto_section_names, &e);
7315 +   }
7316    else if (strncmp (name, "__DWARF,", 8) == 0)
7317      darwin_asm_dwarf_section (name, flags, decl);
7318    else
7319 @@ -2711,16 +2744,12 @@
7320    darwin_asm_output_dwarf_delta (file, size, lab, sname);
7321  }
7322  
7323 -/* Called from the within the TARGET_ASM_FILE_START for each target. 
7324 -  Initialize the stuff we need for LTO long section names support.  */
7325 +/* Called from the within the TARGET_ASM_FILE_START for each target.  */
7326  
7327  void
7328  darwin_file_start (void)
7329  {
7330 -  /* We fill this obstack with the complete section text for the lto section
7331 -     names to write in darwin_file_end.  */
7332 -  obstack_init (&lto_section_names_obstack);
7333 -  lto_section_names_offset = 0;
7334 +  /* Nothing to do.  */
7335  }
7336  
7337  /* Called for the TARGET_ASM_FILE_END hook.
7338 @@ -2731,8 +2760,6 @@
7339  void
7340  darwin_file_end (void)
7341  {
7342 -  const char *lto_section_names;
7343 -
7344    machopic_finish (asm_out_file);
7345    if (strcmp (lang_hooks.name, "GNU C++") == 0)
7346      {
7347 @@ -2762,6 +2789,13 @@
7348           lto_asm_txt = buf = (char *) xmalloc (n + 1);
7349           while (fgets (lto_asm_txt, n, lto_asm_out_file))
7350             fputs (lto_asm_txt, asm_out_file);
7351 +         /* Put a termination label.  */
7352 +         fprintf (asm_out_file, "\t.section %s,%s,regular,debug\n",
7353 +                  LTO_SEGMENT_NAME, LTO_SECTS_SECTION);
7354 +         fprintf (asm_out_file, "L_GNU_LTO%d:\t;# end of lto\n",
7355 +                  lto_section_num);
7356 +         /* Make sure our termination label stays in this section.  */
7357 +         fputs ("\t.space\t1\n", asm_out_file);
7358         }
7359  
7360        /* Remove the temporary file.  */
7361 @@ -2770,21 +2804,50 @@
7362        free (lto_asm_out_name);
7363      }
7364  
7365 -  /* Finish the LTO section names obstack.  Don't output anything if
7366 -     there are no recorded section names.  */
7367 -  obstack_1grow (&lto_section_names_obstack, '\0');
7368 -  lto_section_names = XOBFINISH (&lto_section_names_obstack, const char *);
7369 -  if (strlen (lto_section_names) > 0)
7370 +  /* Output the names and indices.  */
7371 +  if (lto_section_names && VEC_length (darwin_lto_section_e, lto_section_names))
7372      {
7373 -      fprintf (asm_out_file,
7374 -              "\t.section %s,%s,regular,debug\n",
7375 +      int count;
7376 +      darwin_lto_section_e *ref;
7377 +      /* For now, we'll make the offsets 4 bytes and unaligned - we'll fix
7378 +         the latter up ourselves.  */
7379 +      const char *op = integer_asm_op (4,0);
7380 +
7381 +      /* Emit the names.  */
7382 +      fprintf (asm_out_file, "\t.section %s,%s,regular,debug\n",
7383                LTO_SEGMENT_NAME, LTO_NAMES_SECTION);
7384 -      fprintf (asm_out_file,
7385 -              "\t# Section names in %s are offsets into this table\n",
7386 -              LTO_SEGMENT_NAME);
7387 -      fprintf (asm_out_file, "%s\n", lto_section_names);
7388 +      FOR_EACH_VEC_ELT (darwin_lto_section_e, lto_section_names, count, ref)
7389 +       {
7390 +         fprintf (asm_out_file, "L_GNU_LTO_NAME%d:\n", count);
7391 +         /* We have to jump through hoops to get the values of the intra-section
7392 +            offsets... */
7393 +         fprintf (asm_out_file,
7394 +                  "\t.set L$gnu$lto$noff%d,L_GNU_LTO_NAME%d-L_GNU_LTO_NAME0\n",
7395 +                  count, count);
7396 +         fprintf (asm_out_file,
7397 +                  "\t.set L$gnu$lto$nsiz%d,L_GNU_LTO_NAME%d-L_GNU_LTO_NAME%d\n",
7398 +                  count, count+1, count);
7399 +         fprintf (asm_out_file, "\t.asciz\t\"%s\"\n", ref->sectname);
7400 +       }
7401 +      fprintf (asm_out_file, "L_GNU_LTO_NAME%d:\t;# end\n", lto_section_num);
7402 +      /* make sure our termination label stays in this section.  */
7403 +      fputs ("\t.space\t1\n", asm_out_file);
7404 +
7405 +      /* Emit the Index.  */
7406 +      fprintf (asm_out_file, "\t.section %s,%s,regular,debug\n",
7407 +              LTO_SEGMENT_NAME, LTO_INDEX_SECTION);
7408 +      fputs ("\t.align\t2\n", asm_out_file);
7409 +      fputs ("# Section offset, Section length, Name offset, Name length\n",
7410 +            asm_out_file);
7411 +      FOR_EACH_VEC_ELT (darwin_lto_section_e, lto_section_names, count, ref)
7412 +       {
7413 +         fprintf (asm_out_file, "%s L$gnu$lto$offs%d\t;# %s\n",
7414 +                  op, count, ref->sectname);
7415 +         fprintf (asm_out_file, "%s L$gnu$lto$size%d\n", op, count);
7416 +         fprintf (asm_out_file, "%s L$gnu$lto$noff%d\n", op, count);
7417 +         fprintf (asm_out_file, "%s L$gnu$lto$nsiz%d\n", op, count);
7418 +       }
7419      }
7420 -  obstack_free (&lto_section_names_obstack, NULL);
7421  
7422    /* If we have section anchors, then we must prevent the linker from
7423       re-arranging data.  */
7424 Index: gcc/config/arm/arm.c
7425 ===================================================================
7426 --- gcc/config/arm/arm.c        (.../tags/gcc_4_6_2_release)    (wersja 182550)
7427 +++ gcc/config/arm/arm.c        (.../branches/gcc-4_6-branch)   (wersja 182550)
7428 @@ -9812,6 +9812,9 @@
7429    rtx base_reg_rtx = NULL;
7430    int i, stm_case;
7431  
7432 +  /* Write back of base register is currently only supported for Thumb 1.  */
7433 +  int base_writeback = TARGET_THUMB1;
7434 +
7435    /* Can only handle up to MAX_LDM_STM_OPS insns at present, though could be
7436       easily extended if required.  */
7437    gcc_assert (nops >= 2 && nops <= MAX_LDM_STM_OPS);
7438 @@ -9869,7 +9872,9 @@
7439           /* If it isn't an integer register, then we can't do this.  */
7440           if (unsorted_regs[i] < 0
7441               || (TARGET_THUMB1 && unsorted_regs[i] > LAST_LO_REGNUM)
7442 -             || (TARGET_THUMB2 && unsorted_regs[i] == base_reg)
7443 +             /* The effects are unpredictable if the base register is
7444 +                both updated and stored.  */
7445 +             || (base_writeback && unsorted_regs[i] == base_reg)
7446               || (TARGET_THUMB2 && unsorted_regs[i] == SP_REGNUM)
7447               || unsorted_regs[i] > 14)
7448             return 0;
7449 @@ -19571,39 +19576,34 @@
7450    emit_move_insn (mem, tmp2);
7451  }
7452  
7453 -/* Set up operands for a register copy from src to dest, taking care not to
7454 -   clobber registers in the process.
7455 -   FIXME: This has rather high polynomial complexity (O(n^3)?) but shouldn't
7456 -   be called with a large N, so that should be OK.  */
7457 +/* Set up OPERANDS for a register copy from SRC to DEST, taking care
7458 +   not to early-clobber SRC registers in the process.
7459  
7460 +   We assume that the operands described by SRC and DEST represent a
7461 +   decomposed copy of OPERANDS[1] into OPERANDS[0].  COUNT is the
7462 +   number of components into which the copy has been decomposed.  */
7463  void
7464  neon_disambiguate_copy (rtx *operands, rtx *dest, rtx *src, unsigned int count)
7465  {
7466 -  unsigned int copied = 0, opctr = 0;
7467 -  unsigned int done = (1 << count) - 1;
7468 -  unsigned int i, j;
7469 +  unsigned int i;
7470  
7471 -  while (copied != done)
7472 +  if (!reg_overlap_mentioned_p (operands[0], operands[1])
7473 +      || REGNO (operands[0]) < REGNO (operands[1]))
7474      {
7475        for (i = 0; i < count; i++)
7476 -        {
7477 -          int good = 1;
7478 -
7479 -          for (j = 0; good && j < count; j++)
7480 -            if (i != j && (copied & (1 << j)) == 0
7481 -                && reg_overlap_mentioned_p (src[j], dest[i]))
7482 -              good = 0;
7483 -
7484 -          if (good)
7485 -            {
7486 -              operands[opctr++] = dest[i];
7487 -              operands[opctr++] = src[i];
7488 -              copied |= 1 << i;
7489 -            }
7490 -        }
7491 +       {
7492 +         operands[2 * i] = dest[i];
7493 +         operands[2 * i + 1] = src[i];
7494 +       }
7495      }
7496 -
7497 -  gcc_assert (opctr == count * 2);
7498 +  else
7499 +    {
7500 +      for (i = 0; i < count; i++)
7501 +       {
7502 +         operands[2 * i] = dest[count - i - 1];
7503 +         operands[2 * i + 1] = src[count - i - 1];
7504 +       }
7505 +    }
7506  }
7507  
7508  /* Expand an expression EXP that calls a built-in function,
7509 Index: gcc/config/arm/arm.md
7510 ===================================================================
7511 --- gcc/config/arm/arm.md       (.../tags/gcc_4_6_2_release)    (wersja 182550)
7512 +++ gcc/config/arm/arm.md       (.../branches/gcc-4_6-branch)   (wersja 182550)
7513 @@ -3272,7 +3272,7 @@
7514      bool need_else;
7515  
7516      if (which_alternative != 0 || operands[3] != const0_rtx
7517 -        || (code != PLUS && code != MINUS && code != IOR && code != XOR))
7518 +        || (code != PLUS && code != IOR && code != XOR))
7519        need_else = true;
7520      else
7521        need_else = false;
7522 Index: gcc/config/pa/pa.c
7523 ===================================================================
7524 --- gcc/config/pa/pa.c  (.../tags/gcc_4_6_2_release)    (wersja 182550)
7525 +++ gcc/config/pa/pa.c  (.../branches/gcc-4_6-branch)   (wersja 182550)
7526 @@ -1863,6 +1863,11 @@
7527    /* Handle the most common case: storing into a register.  */
7528    else if (register_operand (operand0, mode))
7529      {
7530 +      /* Legitimize TLS symbol references.  This happens for references
7531 +        that aren't a legitimate constant.  */
7532 +      if (PA_SYMBOL_REF_TLS_P (operand1))
7533 +       operand1 = legitimize_tls_address (operand1);
7534 +
7535        if (register_operand (operand1, mode)
7536           || (GET_CODE (operand1) == CONST_INT
7537               && cint_ok_for_move (INTVAL (operand1)))
7538 Index: gcc/config/pa/pa.h
7539 ===================================================================
7540 --- gcc/config/pa/pa.h  (.../tags/gcc_4_6_2_release)    (wersja 182550)
7541 +++ gcc/config/pa/pa.h  (.../branches/gcc-4_6-branch)   (wersja 182550)
7542 @@ -848,6 +848,9 @@
7543     && (NEW_HP_ASSEMBLER                                                \
7544         || TARGET_GAS                                           \
7545         || GET_CODE (X) != LABEL_REF)                           \
7546 +   && (!PA_SYMBOL_REF_TLS_P (X)                                        \
7547 +       || (SYMBOL_REF_TLS_MODEL (X) != TLS_MODEL_GLOBAL_DYNAMIC                \
7548 +          && SYMBOL_REF_TLS_MODEL (X) != TLS_MODEL_LOCAL_DYNAMIC))     \
7549     && (!TARGET_64BIT                                           \
7550         || GET_CODE (X) != CONST_DOUBLE)                                \
7551     && (!TARGET_64BIT                                           \
7552 Index: gcc/reload1.c
7553 ===================================================================
7554 --- gcc/reload1.c       (.../tags/gcc_4_6_2_release)    (wersja 182550)
7555 +++ gcc/reload1.c       (.../branches/gcc-4_6-branch)   (wersja 182550)
7556 @@ -3899,6 +3899,10 @@
7557      if (XEXP (x, 0))
7558        set_label_offsets (XEXP (x, 0), NULL_RTX, 1);
7559  
7560 +  for (x = nonlocal_goto_handler_labels; x; x = XEXP (x, 1))
7561 +    if (XEXP (x, 0))
7562 +      set_label_offsets (XEXP (x, 0), NULL_RTX, 1);
7563 +
7564    for_each_eh_label (set_initial_eh_label_offset);
7565  }
7566  
7567 Index: zlib/configure
7568 ===================================================================
7569 --- zlib/configure      (.../tags/gcc_4_6_2_release)    (wersja 182550)
7570 +++ zlib/configure      (.../branches/gcc-4_6-branch)   (wersja 182550)
7571 @@ -8600,7 +8600,7 @@
7572        ;;
7573  
7574      # Unfortunately, older versions of FreeBSD 2 do not have this feature.
7575 -    freebsd2*)
7576 +    freebsd2.*)
7577        archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
7578        hardcode_direct=yes
7579        hardcode_minus_L=yes
7580 @@ -9516,7 +9516,7 @@
7581      objformat=`/usr/bin/objformat`
7582    else
7583      case $host_os in
7584 -    freebsd[123]*) objformat=aout ;;
7585 +    freebsd[23].*) objformat=aout ;;
7586      *) objformat=elf ;;
7587      esac
7588    fi
7589 @@ -9534,7 +9534,7 @@
7590    esac
7591    shlibpath_var=LD_LIBRARY_PATH
7592    case $host_os in
7593 -  freebsd2*)
7594 +  freebsd2.*)
7595      shlibpath_overrides_runpath=yes
7596      ;;
7597    freebsd3.[01]* | freebsdelf3.[01]*)
7598 Index: zlib/ChangeLog
7599 ===================================================================
7600 --- zlib/ChangeLog      (.../tags/gcc_4_6_2_release)    (wersja 182550)
7601 +++ zlib/ChangeLog      (.../branches/gcc-4_6-branch)   (wersja 182550)
7602 @@ -1,3 +1,7 @@
7603 +2011-11-20  Andreas Tobler  <andreast@fgznet.ch>
7604 +
7605 +       * configure: Regenerate.
7606 +
7607  2011-10-26  Release Manager
7608  
7609         * GCC 4.6.2 released.
7610 Index: libstdc++-v3/configure
7611 ===================================================================
7612 --- libstdc++-v3/configure      (.../tags/gcc_4_6_2_release)    (wersja 182550)
7613 +++ libstdc++-v3/configure      (.../branches/gcc-4_6-branch)   (wersja 182550)
7614 @@ -9698,7 +9698,7 @@
7615        ;;
7616  
7617      # Unfortunately, older versions of FreeBSD 2 do not have this feature.
7618 -    freebsd2*)
7619 +    freebsd2.*)
7620        archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
7621        hardcode_direct=yes
7622        hardcode_minus_L=yes
7623 @@ -10614,7 +10614,7 @@
7624      objformat=`/usr/bin/objformat`
7625    else
7626      case $host_os in
7627 -    freebsd[123]*) objformat=aout ;;
7628 +    freebsd[23].*) objformat=aout ;;
7629      *) objformat=elf ;;
7630      esac
7631    fi
7632 @@ -10632,7 +10632,7 @@
7633    esac
7634    shlibpath_var=LD_LIBRARY_PATH
7635    case $host_os in
7636 -  freebsd2*)
7637 +  freebsd2.*)
7638      shlibpath_overrides_runpath=yes
7639      ;;
7640    freebsd3.[01]* | freebsdelf3.[01]*)
7641 @@ -12522,7 +12522,7 @@
7642          esac
7643          ;;
7644  
7645 -      freebsd[12]*)
7646 +      freebsd2.*)
7647          # C++ shared libraries reported to be fairly broken before
7648         # switch to ELF
7649          ld_shlibs_CXX=no
7650 @@ -14297,7 +14297,7 @@
7651      objformat=`/usr/bin/objformat`
7652    else
7653      case $host_os in
7654 -    freebsd[123]*) objformat=aout ;;
7655 +    freebsd[23].*) objformat=aout ;;
7656      *) objformat=elf ;;
7657      esac
7658    fi
7659 @@ -14315,7 +14315,7 @@
7660    esac
7661    shlibpath_var=LD_LIBRARY_PATH
7662    case $host_os in
7663 -  freebsd2*)
7664 +  freebsd2.*)
7665      shlibpath_overrides_runpath=yes
7666      ;;
7667    freebsd3.[01]* | freebsdelf3.[01]*)
7668 Index: libstdc++-v3/include/debug/unordered_map
7669 ===================================================================
7670 --- libstdc++-v3/include/debug/unordered_map    (.../tags/gcc_4_6_2_release)    (wersja 182550)
7671 +++ libstdc++-v3/include/debug/unordered_map    (.../branches/gcc-4_6-branch)   (wersja 182550)
7672 @@ -276,6 +276,10 @@
7673        }
7674  
7675        iterator
7676 +      erase(iterator __it)
7677 +      { return erase(const_iterator(__it)); }
7678 +
7679 +      iterator
7680        erase(const_iterator __first, const_iterator __last)
7681        {
7682         __glibcxx_check_erase_range(__first, __last);
7683 @@ -558,6 +562,10 @@
7684        }
7685  
7686        iterator
7687 +      erase(iterator __it)
7688 +      { return erase(const_iterator(__it)); }
7689 +
7690 +      iterator
7691        erase(const_iterator __first, const_iterator __last)
7692        {
7693         __glibcxx_check_erase_range(__first, __last);
7694 Index: libstdc++-v3/include/debug/unordered_set
7695 ===================================================================
7696 --- libstdc++-v3/include/debug/unordered_set    (.../tags/gcc_4_6_2_release)    (wersja 182550)
7697 +++ libstdc++-v3/include/debug/unordered_set    (.../branches/gcc-4_6-branch)   (wersja 182550)
7698 @@ -269,6 +269,10 @@
7699        }
7700  
7701        iterator
7702 +      erase(iterator __it)
7703 +      { return erase(const_iterator(__it)); }
7704 +
7705 +      iterator
7706        erase(const_iterator __first, const_iterator __last)
7707        {
7708         __glibcxx_check_erase_range(__first, __last);
7709 @@ -539,6 +543,10 @@
7710        }
7711  
7712        iterator
7713 +      erase(iterator __it)
7714 +      { return erase(const_iterator(__it)); }
7715 +
7716 +      iterator
7717        erase(const_iterator __first, const_iterator __last)
7718        {
7719         __glibcxx_check_erase_range(__first, __last);
7720 Index: libstdc++-v3/include/debug/map.h
7721 ===================================================================
7722 --- libstdc++-v3/include/debug/map.h    (.../tags/gcc_4_6_2_release)    (wersja 182550)
7723 +++ libstdc++-v3/include/debug/map.h    (.../branches/gcc-4_6-branch)   (wersja 182550)
7724 @@ -273,6 +273,10 @@
7725         this->_M_invalidate_if(_Equal(__position.base()));
7726         return iterator(_Base::erase(__position.base()), this);
7727        }
7728 +
7729 +      iterator
7730 +      erase(iterator __position)
7731 +      { return erase(const_iterator(__position)); }
7732  #else
7733        void
7734        erase(iterator __position)
7735 Index: libstdc++-v3/include/debug/multimap.h
7736 ===================================================================
7737 --- libstdc++-v3/include/debug/multimap.h       (.../tags/gcc_4_6_2_release)    (wersja 182550)
7738 +++ libstdc++-v3/include/debug/multimap.h       (.../branches/gcc-4_6-branch)   (wersja 182550)
7739 @@ -254,6 +254,10 @@
7740         this->_M_invalidate_if(_Equal(__position.base()));
7741         return iterator(_Base::erase(__position.base()), this);
7742        }
7743 +
7744 +      iterator
7745 +      erase(iterator __position)
7746 +      { return erase(const_iterator(__position)); }
7747  #else
7748        void
7749        erase(iterator __position)
7750 Index: libstdc++-v3/include/std/condition_variable
7751 ===================================================================
7752 --- libstdc++-v3/include/std/condition_variable (.../tags/gcc_4_6_2_release)    (wersja 182550)
7753 +++ libstdc++-v3/include/std/condition_variable (.../branches/gcc-4_6-branch)   (wersja 182550)
7754 @@ -198,10 +198,25 @@
7755        void
7756        wait(_Lock& __lock)
7757        {
7758 -        unique_lock<mutex> __my_lock(_M_mutex);
7759 -        __lock.unlock();
7760 -        _M_cond.wait(__my_lock);
7761 -        __lock.lock();
7762 +       // scoped unlock - unlocks in ctor, re-locks in dtor
7763 +       struct _Unlock {
7764 +         explicit _Unlock(_Lock& __lk) : _M_lock(__lk) { __lk.unlock(); }
7765 +         ~_Unlock() noexcept(false)
7766 +         {
7767 +           if (uncaught_exception())
7768 +             __try { _M_lock.lock(); } __catch(...) { }
7769 +           else
7770 +             _M_lock.lock();
7771 +         }
7772 +         _Lock& _M_lock;
7773 +       };
7774 +
7775 +       unique_lock<mutex> __my_lock(_M_mutex);
7776 +       _Unlock __unlock(__lock);
7777 +       // _M_mutex must be unlocked before re-locking __lock so move
7778 +       // ownership of _M_mutex lock to an object with shorter lifetime.
7779 +       unique_lock<mutex> __my_lock2(std::move(__my_lock));
7780 +       _M_cond.wait(__my_lock2);
7781        }
7782        
7783  
7784 Index: libstdc++-v3/include/std/complex
7785 ===================================================================
7786 --- libstdc++-v3/include/std/complex    (.../tags/gcc_4_6_2_release)    (wersja 182550)
7787 +++ libstdc++-v3/include/std/complex    (.../branches/gcc-4_6-branch)   (wersja 182550)
7788 @@ -1,7 +1,7 @@
7789  // The template and inlines for the -*- C++ -*- complex number classes.
7790  
7791  // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
7792 -// 2006, 2007, 2008, 2009, 2010
7793 +// 2006, 2007, 2008, 2009, 2010, 2011
7794  // Free Software Foundation, Inc.
7795  //
7796  // This file is part of the GNU ISO C++ Library.  This library is free
7797 @@ -1695,12 +1695,9 @@
7798      std::complex<_Tp>
7799      __complex_acosh(const std::complex<_Tp>& __z)
7800      {
7801 -      std::complex<_Tp> __t((__z.real() - __z.imag())
7802 -                           * (__z.real() + __z.imag()) - _Tp(1.0),
7803 -                           _Tp(2.0) * __z.real() * __z.imag());
7804 -      __t = std::sqrt(__t);
7805 -
7806 -      return std::log(__t + __z);
7807 +      // Kahan's formula.
7808 +      return _Tp(2.0) * std::log(std::sqrt(_Tp(0.5) * (__z + _Tp(1.0)))
7809 +                                + std::sqrt(_Tp(0.5) * (__z - _Tp(1.0))));
7810      }
7811  
7812  #if _GLIBCXX_USE_C99_COMPLEX_TR1
7813 Index: libstdc++-v3/include/ext/type_traits.h
7814 ===================================================================
7815 --- libstdc++-v3/include/ext/type_traits.h      (.../tags/gcc_4_6_2_release)    (wersja 182550)
7816 +++ libstdc++-v3/include/ext/type_traits.h      (.../branches/gcc-4_6-branch)   (wersja 182550)
7817 @@ -1,6 +1,7 @@
7818  // -*- C++ -*-
7819  
7820 -// Copyright (C) 2005, 2006, 2007, 2009 Free Software Foundation, Inc.
7821 +// Copyright (C) 2005, 2006, 2007, 2009, 2010, 2011
7822 +// Free Software Foundation, Inc.
7823  //
7824  // This file is part of the GNU ISO C++ Library.  This library is free
7825  // software; you can redistribute it and/or modify it under the terms
7826 @@ -161,44 +162,50 @@
7827      struct __promote
7828      { typedef double __type; };
7829  
7830 +  // No nested __type member for non-integer non-floating point types,
7831 +  // allows this type to be used for SFINAE to constrain overloads in
7832 +  // <cmath> and <complex> to only the intended types.
7833    template<typename _Tp>
7834      struct __promote<_Tp, false>
7835 -    { typedef _Tp __type; };
7836 +    { };
7837  
7838 -  template<typename _Tp, typename _Up>
7839 +  template<>
7840 +    struct __promote<long double>
7841 +    { typedef long double __type; };
7842 +
7843 +  template<>
7844 +    struct __promote<double>
7845 +    { typedef double __type; };
7846 +
7847 +  template<>
7848 +    struct __promote<float>
7849 +    { typedef float __type; };
7850 +
7851 +  template<typename _Tp, typename _Up,
7852 +           typename _Tp2 = typename __promote<_Tp>::__type,
7853 +           typename _Up2 = typename __promote<_Up>::__type>
7854      struct __promote_2
7855      {
7856 -    private:
7857 -      typedef typename __promote<_Tp>::__type __type1;
7858 -      typedef typename __promote<_Up>::__type __type2;
7859 -
7860 -    public:
7861 -      typedef __typeof__(__type1() + __type2()) __type;
7862 +      typedef __typeof__(_Tp2() + _Up2()) __type;
7863      };
7864  
7865 -  template<typename _Tp, typename _Up, typename _Vp>
7866 +  template<typename _Tp, typename _Up, typename _Vp,
7867 +           typename _Tp2 = typename __promote<_Tp>::__type,
7868 +           typename _Up2 = typename __promote<_Up>::__type,
7869 +           typename _Vp2 = typename __promote<_Vp>::__type>
7870      struct __promote_3
7871      {
7872 -    private:
7873 -      typedef typename __promote<_Tp>::__type __type1;
7874 -      typedef typename __promote<_Up>::__type __type2;
7875 -      typedef typename __promote<_Vp>::__type __type3;
7876 -
7877 -    public:
7878 -      typedef __typeof__(__type1() + __type2() + __type3()) __type;
7879 +      typedef __typeof__(_Tp2() + _Up2() + _Vp2()) __type;
7880      };
7881  
7882 -  template<typename _Tp, typename _Up, typename _Vp, typename _Wp>
7883 +  template<typename _Tp, typename _Up, typename _Vp, typename _Wp,
7884 +           typename _Tp2 = typename __promote<_Tp>::__type,
7885 +           typename _Up2 = typename __promote<_Up>::__type,
7886 +           typename _Vp2 = typename __promote<_Vp>::__type,
7887 +           typename _Wp2 = typename __promote<_Wp>::__type>
7888      struct __promote_4
7889      {
7890 -    private:
7891 -      typedef typename __promote<_Tp>::__type __type1;
7892 -      typedef typename __promote<_Up>::__type __type2;
7893 -      typedef typename __promote<_Vp>::__type __type3;
7894 -      typedef typename __promote<_Wp>::__type __type4;
7895 -
7896 -    public:
7897 -      typedef __typeof__(__type1() + __type2() + __type3() + __type4()) __type;
7898 +      typedef __typeof__(_Tp2() + _Up2() + _Vp2() + _Wp2()) __type;
7899      };
7900  
7901  _GLIBCXX_END_NAMESPACE_VERSION
7902 Index: libstdc++-v3/include/profile/map.h
7903 ===================================================================
7904 --- libstdc++-v3/include/profile/map.h  (.../tags/gcc_4_6_2_release)    (wersja 182550)
7905 +++ libstdc++-v3/include/profile/map.h  (.../branches/gcc-4_6-branch)   (wersja 182550)
7906 @@ -326,6 +326,10 @@
7907          __profcxx_map_to_unordered_map_erase(this, size(), 1);
7908          return __i;
7909        }
7910 +
7911 +      iterator
7912 +      erase(iterator __position)
7913 +      { return erase(const_iterator(__position)); }
7914  #else
7915        void
7916        erase(iterator __position)
7917 Index: libstdc++-v3/include/profile/multimap.h
7918 ===================================================================
7919 --- libstdc++-v3/include/profile/multimap.h     (.../tags/gcc_4_6_2_release)    (wersja 182550)
7920 +++ libstdc++-v3/include/profile/multimap.h     (.../branches/gcc-4_6-branch)   (wersja 182550)
7921 @@ -225,6 +225,10 @@
7922        iterator
7923        erase(const_iterator __position)
7924        { return iterator(_Base::erase(__position)); }
7925 +
7926 +      iterator
7927 +      erase(iterator __position)
7928 +      { return iterator(_Base::erase(__position)); }
7929  #else
7930        void
7931        erase(iterator __position)
7932 Index: libstdc++-v3/include/bits/hashtable.h
7933 ===================================================================
7934 --- libstdc++-v3/include/bits/hashtable.h       (.../tags/gcc_4_6_2_release)    (wersja 182550)
7935 +++ libstdc++-v3/include/bits/hashtable.h       (.../branches/gcc-4_6-branch)   (wersja 182550)
7936 @@ -440,6 +440,11 @@
7937        iterator
7938        erase(const_iterator);
7939  
7940 +      // LWG 2059.
7941 +      iterator
7942 +      erase(iterator __it)
7943 +      { return erase(const_iterator(__it)); }
7944 +
7945        size_type
7946        erase(const key_type&);
7947  
7948 Index: libstdc++-v3/include/bits/stl_map.h
7949 ===================================================================
7950 --- libstdc++-v3/include/bits/stl_map.h (.../tags/gcc_4_6_2_release)    (wersja 182550)
7951 +++ libstdc++-v3/include/bits/stl_map.h (.../branches/gcc-4_6-branch)   (wersja 182550)
7952 @@ -612,6 +612,11 @@
7953        iterator
7954        erase(const_iterator __position)
7955        { return _M_t.erase(__position); }
7956 +
7957 +      // LWG 2059.
7958 +      iterator
7959 +      erase(iterator __position)
7960 +      { return _M_t.erase(__position); }
7961  #else
7962        /**
7963         *  @brief Erases an element from a %map.
7964 Index: libstdc++-v3/include/bits/stl_multimap.h
7965 ===================================================================
7966 --- libstdc++-v3/include/bits/stl_multimap.h    (.../tags/gcc_4_6_2_release)    (wersja 182550)
7967 +++ libstdc++-v3/include/bits/stl_multimap.h    (.../branches/gcc-4_6-branch)   (wersja 182550)
7968 @@ -533,6 +533,11 @@
7969        iterator
7970        erase(const_iterator __position)
7971        { return _M_t.erase(__position); }
7972 +
7973 +      // LWG 2059.
7974 +      iterator
7975 +      erase(iterator __position)
7976 +      { return _M_t.erase(__position); }
7977  #else
7978        /**
7979         *  @brief Erases an element from a %multimap.
7980 Index: libstdc++-v3/include/bits/stl_numeric.h
7981 ===================================================================
7982 --- libstdc++-v3/include/bits/stl_numeric.h     (.../tags/gcc_4_6_2_release)    (wersja 182550)
7983 +++ libstdc++-v3/include/bits/stl_numeric.h     (.../branches/gcc-4_6-branch)   (wersja 182550)
7984 @@ -222,10 +222,10 @@
7985    /**
7986     *  @brief  Return list of partial sums
7987     *
7988 -   *  Accumulates the values in the range [first,last) using operator+().
7989 +   *  Accumulates the values in the range [first,last) using the @c + operator.
7990     *  As each successive input value is added into the total, that partial sum
7991 -   *  is written to @a result.  Therefore, the first value in result is the
7992 -   *  first value of the input, the second value in result is the sum of the
7993 +   *  is written to @p result.  Therefore, the first value in @p result is the
7994 +   *  first value of the input, the second value in @p result is the sum of the
7995     *  first and second input values, and so on.
7996     *
7997     *  @param  first  Start of input range.
7998 @@ -261,15 +261,16 @@
7999    /**
8000     *  @brief  Return list of partial sums
8001     *
8002 -   *  Accumulates the values in the range [first,last) using operator+().
8003 +   *  Accumulates the values in the range [first,last) using @p binary_op.
8004     *  As each successive input value is added into the total, that partial sum
8005 -   *  is written to @a result.  Therefore, the first value in result is the
8006 -   *  first value of the input, the second value in result is the sum of the
8007 +   *  is written to @a result.  Therefore, the first value in @p result is the
8008 +   *  first value of the input, the second value in @p result is the sum of the
8009     *  first and second input values, and so on.
8010     *
8011     *  @param  first  Start of input range.
8012     *  @param  last  End of input range.
8013     *  @param  result  Output to write sums to.
8014 +   *  @param  binary_op  Function object.
8015     *  @return  Iterator pointing just beyond the values written to result.
8016     */
8017    template<typename _InputIterator, typename _OutputIterator,
8018 Index: libstdc++-v3/include/bits/stl_tree.h
8019 ===================================================================
8020 --- libstdc++-v3/include/bits/stl_tree.h        (.../tags/gcc_4_6_2_release)    (wersja 182550)
8021 +++ libstdc++-v3/include/bits/stl_tree.h        (.../branches/gcc-4_6-branch)   (wersja 182550)
8022 @@ -760,6 +760,16 @@
8023         _M_erase_aux(__position);
8024         return __result._M_const_cast();
8025        }
8026 +
8027 +      // LWG 2059.
8028 +      iterator
8029 +      erase(iterator __position)
8030 +      {
8031 +       iterator __result = __position;
8032 +       ++__result;
8033 +       _M_erase_aux(__position);
8034 +       return __result;
8035 +      }
8036  #else
8037        void
8038        erase(iterator __position)
8039 Index: libstdc++-v3/include/c_global/cmath
8040 ===================================================================
8041 --- libstdc++-v3/include/c_global/cmath (.../tags/gcc_4_6_2_release)    (wersja 182550)
8042 +++ libstdc++-v3/include/c_global/cmath (.../branches/gcc-4_6-branch)   (wersja 182550)
8043 @@ -1,7 +1,7 @@
8044  // -*- C++ -*- C forwarding header.
8045  
8046  // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
8047 -// 2006, 2007, 2008, 2009, 2010
8048 +// 2006, 2007, 2008, 2009, 2010, 2011
8049  // Free Software Foundation, Inc.
8050  //
8051  // This file is part of the GNU ISO C++ Library.  This library is free
8052 @@ -156,10 +156,7 @@
8053  
8054    template<typename _Tp, typename _Up>
8055      inline
8056 -    typename __gnu_cxx::__promote_2<
8057 -    typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value
8058 -                                   && __is_arithmetic<_Up>::__value,
8059 -                                   _Tp>::__type, _Up>::__type
8060 +    typename __gnu_cxx::__promote_2<_Tp, _Up>::__type
8061      atan2(_Tp __y, _Up __x)
8062      {
8063        typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type;
8064 @@ -374,10 +371,7 @@
8065  
8066    template<typename _Tp, typename _Up>
8067      inline
8068 -    typename __gnu_cxx::__promote_2<
8069 -    typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value
8070 -                                   && __is_arithmetic<_Up>::__value,
8071 -                                   _Tp>::__type, _Up>::__type
8072 +    typename __gnu_cxx::__promote_2<_Tp, _Up>::__type
8073      pow(_Tp __x, _Up __y)
8074      {
8075        typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type;
8076 Index: libstdc++-v3/include/tr1/complex
8077 ===================================================================
8078 --- libstdc++-v3/include/tr1/complex    (.../tags/gcc_4_6_2_release)    (wersja 182550)
8079 +++ libstdc++-v3/include/tr1/complex    (.../branches/gcc-4_6-branch)   (wersja 182550)
8080 @@ -185,12 +185,9 @@
8081      std::complex<_Tp>
8082      __complex_acosh(const std::complex<_Tp>& __z)
8083      {
8084 -      std::complex<_Tp> __t((__z.real() - __z.imag())
8085 -                           * (__z.real() + __z.imag()) - _Tp(1.0),
8086 -                           _Tp(2.0) * __z.real() * __z.imag());
8087 -      __t = std::sqrt(__t);
8088 -
8089 -      return std::log(__t + __z);
8090 +      // Kahan's formula.
8091 +      return _Tp(2.0) * std::log(std::sqrt(_Tp(0.5) * (__z + _Tp(1.0)))
8092 +                                + std::sqrt(_Tp(0.5) * (__z - _Tp(1.0))));
8093      }
8094  
8095  #if _GLIBCXX_USE_C99_COMPLEX_TR1
8096 Index: libstdc++-v3/include/tr1/poly_hermite.tcc
8097 ===================================================================
8098 --- libstdc++-v3/include/tr1/poly_hermite.tcc   (.../tags/gcc_4_6_2_release)    (wersja 182550)
8099 +++ libstdc++-v3/include/tr1/poly_hermite.tcc   (.../branches/gcc-4_6-branch)   (wersja 182550)
8100 @@ -1,6 +1,6 @@
8101  // Special functions -*- C++ -*-
8102  
8103 -// Copyright (C) 2006, 2007, 2008, 2009, 2010
8104 +// Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011
8105  // Free Software Foundation, Inc.
8106  //
8107  // This file is part of the GNU ISO C++ Library.  This library is free
8108 @@ -84,7 +84,7 @@
8109        unsigned int __i;
8110        for  (__H_nm2 = __H_0, __H_nm1 = __H_1, __i = 2; __i <= __n; ++__i)
8111          {
8112 -          __H_n = 2 * (__x * __H_nm1 + (__i - 1) * __H_nm2);
8113 +          __H_n = 2 * (__x * __H_nm1 - (__i - 1) * __H_nm2);
8114            __H_nm2 = __H_nm1;
8115            __H_nm1 = __H_n;
8116          }
8117 Index: libstdc++-v3/ChangeLog
8118 ===================================================================
8119 --- libstdc++-v3/ChangeLog      (.../tags/gcc_4_6_2_release)    (wersja 182550)
8120 +++ libstdc++-v3/ChangeLog      (.../branches/gcc-4_6-branch)   (wersja 182550)
8121 @@ -1,3 +1,103 @@
8122 +2011-12-19  Jonathan Wakely  <jwakely.gcc@gmail.com>
8123 +
8124 +       * testsuite/ext/type_traits/remove_unsigned_integer_neg.cc: Adjust
8125 +       dg-error line numbers.
8126 +       * testsuite/ext/type_traits/add_unsigned_floating_neg.cc: Likewise.
8127 +       * testsuite/ext/type_traits/remove_unsigned_floating_neg.cc: Likewise.
8128 +       * testsuite/ext/type_traits/add_unsigned_integer_neg.cc: Likewise.
8129 +
8130 +2011-12-19  Jonathan Wakely  <jwakely.gcc@gmail.com>
8131 +
8132 +       * include/c_global/cmath: Update copyright years.
8133 +       * include/ext/type_traits.h: Likewise.
8134 +
8135 +2011-12-19  Jonathan Wakely  <jwakely.gcc@gmail.com>
8136 +
8137 +       Backport from mainline
8138 +       2011-11-13  Paolo Carlini  <paolo.carlini@oracle.com>
8139 +
8140 +       * include/c_global/cmath (atan2, pow): Simplify constraining on the
8141 +       return type.
8142 +
8143 +       Backport from mainline
8144 +       2011-11-12  Jonathan Wakely  <jwakely.gcc@gmail.com>
8145 +
8146 +       PR libstdc++/51083
8147 +       * include/ext/type_traits.h (__promote): Only define __type member
8148 +       for integral and floating point types, to prevent math functions
8149 +       participating in overload resolution for other types.
8150 +       (__promote_2, __promote_3, __promote_4): Use __promote in default
8151 +       template argument values, so deduction only succeeds for integral and
8152 +       floating point types.
8153 +       * testsuite/26_numerics/cmath/51083.cc: New.
8154 +       * testsuite/26_numerics/complex/51083.cc: New.
8155 +       * testsuite/tr1/8_c_compatibility/cmath/51083.cc: New.
8156 +       * testsuite/tr1/8_c_compatibility/complex/51083.cc: New.
8157 +
8158 +2011-12-19  Jonathan Wakely  <jwakely.gcc@gmail.com>
8159 +
8160 +       PR libstdc++/50862
8161 +       * include/std/condition_variable (condition_variable_any::wait): Fix
8162 +       deadlock and ensure _Lock::lock() is called on exit.
8163 +       * testsuite/30_threads/condition_variable_any/50862.cc: New.
8164 +
8165 +2011-12-18  Jonathan Wakely  <jwakely.gcc@gmail.com>
8166 +
8167 +       PR libstdc++/51540
8168 +       * include/bits/stl_numeric.h (partial_sum): Adjust doxygen comments.
8169 +
8170 +2011-11-20  Andreas Tobler  <andreast@fgznet.ch>
8171 +
8172 +       * configure: Regenerate.
8173 +
8174 +2011-11-16  Paolo Carlini  <paolo.carlini@oracle.com>
8175 +
8176 +       PR libstdc++/51142
8177 +       * include/debug/unordered_map (unordered_map<>::erase(iterator),
8178 +       unordered_multimap<>::erase(iterator)): Add, consistently with
8179 +       LWG 2059.
8180 +       * include/debug/unordered_set (unordered_set<>::erase(iterator),
8181 +       unordered_multiset<>::erase(iterator)): Likewise.
8182 +       * include/debug/map.h (map<>::erase(iterator)): Likewise.
8183 +       * include/debug/multimap.h (multimap<>::erase(iterator)): Likewise.
8184 +       * include/profile/map.h (map<>::erase(iterator)): Likewise.
8185 +       * include/profile/multimap.h (multimap<>::erase(iterator)): Likewise.
8186 +       * include/bits/hashtable.h (_Hashtable<>::erase(iterator)): Likewise.
8187 +       * include/bits/stl_map.h (map<>::erase(iterator)): Likewise.
8188 +       * include/bits/stl_multimap.h (multimap<>::erase(iterator)): Likewise.
8189 +       * include/bits/stl_tree.h (_Rb_tree<>::erase(iterator)): Likewise.
8190 +       * testsuite/23_containers/unordered_map/erase/51142.cc: New.
8191 +       * testsuite/23_containers/multimap/modifiers/erase/51142.cc: Likewise.
8192 +       * testsuite/23_containers/set/modifiers/erase/51142.cc: Likewise.
8193 +       * testsuite/23_containers/unordered_multimap/erase/51142.cc: Likewise.
8194 +       * testsuite/23_containers/unordered_set/erase/51142.cc: Likewise.
8195 +       * testsuite/23_containers/multiset/modifiers/erase/51142.cc: Likewise.
8196 +       * testsuite/23_containers/unordered_multiset/erase/51142.cc: Likewise.
8197 +       * testsuite/23_containers/map/modifiers/erase/51142.cc: Likewise.
8198 +
8199 +2011-11-15  Jason Dick  <dickphd@gmail.com>
8200 +
8201 +       PR libstdc++/51133
8202 +       * include/tr1/poly_hermite.tcc (__poly_hermite_recursion): Fix
8203 +       wrong sign in recursion relation.
8204 +
8205 +2011-11-02  Richard B. Kreckel  <kreckel@ginac.de>
8206 +           Paolo Carlini  <paolo.carlini@oracle.com>
8207 +
8208 +       PR libstdc++/50880
8209 +       * include/std/complex (__complex_acosh): Fix in a better way,
8210 +       use Kahan's formula.
8211 +       * include/tr1/complex (__complex_acosh): Likewise.
8212 +
8213 +2011-11-02  Richard B. Kreckel  <kreckel@ginac.de>
8214 +           Paolo Carlini  <paolo.carlini@oracle.com>
8215 +
8216 +       PR libstdc++/50880
8217 +       * include/std/complex (__complex_acosh): Fix for __z.real() < 0.
8218 +       * include/tr1/complex (__complex_acosh): Likewise.
8219 +       * testsuite/26_numerics/complex/50880.cc: New.
8220 +       * testsuite/tr1/8_c_compatibility/complex/50880.cc: Likewise.
8221 +
8222  2011-10-26  Release Manager
8223  
8224         * GCC 4.6.2 released.
8225 Index: libstdc++-v3/testsuite/26_numerics/complex/51083.cc
8226 ===================================================================
8227 --- libstdc++-v3/testsuite/26_numerics/complex/51083.cc (.../tags/gcc_4_6_2_release)    (wersja 0)
8228 +++ libstdc++-v3/testsuite/26_numerics/complex/51083.cc (.../branches/gcc-4_6-branch)   (wersja 182550)
8229 @@ -0,0 +1,54 @@
8230 +// { dg-options "-std=gnu++0x" }
8231 +//
8232 +// Copyright (C) 2011 Free Software Foundation, Inc.
8233 +//
8234 +// This file is part of the GNU ISO C++ Library.  This library is free
8235 +// software; you can redistribute it and/or modify it under the
8236 +// terms of the GNU General Public License as published by the
8237 +// Free Software Foundation; either version 3, or (at your option)
8238 +// any later version.
8239 +//
8240 +// This library is distributed in the hope that it will be useful,
8241 +// but WITHOUT ANY WARRANTY; without even the implied warranty of
8242 +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
8243 +// GNU General Public License for more details.
8244 +//
8245 +// You should have received a copy of the GNU General Public License along
8246 +// with this library; see the file COPYING3.  If not see
8247 +// <http://www.gnu.org/licenses/>.
8248 +
8249 +#include <complex>
8250 +
8251 +namespace a
8252 +{
8253 +  template<typename> class Mat { };
8254 +
8255 +  template<typename T> struct Mat2 : Mat<T> { };
8256 +
8257 +  template<typename T> int arg(Mat<T>) { return 1; }
8258 +  template<typename T> int conj(Mat<T>) { return 1; }
8259 +  template<typename T> int imag(Mat<T>) { return 1; }
8260 +  template<typename T> int norm(Mat<T>) { return 1; }
8261 +  template<typename T> int proj(Mat<T>) { return 1; }
8262 +  template<typename T> int real(Mat<T>) { return 1; }
8263 +
8264 +  template<typename T, typename U> int pow(Mat<T>, U) { return 1; }
8265 +  template<typename T, typename U> int pow(T, Mat<U>) { return 1; }
8266 +}
8267 +
8268 +int main()
8269 +{
8270 +  int __attribute__((unused)) i;
8271 +
8272 +  using namespace std;
8273 +
8274 +  a::Mat2< std::complex<double> > c;
8275 +  i = arg(c);
8276 +  i = conj(c);
8277 +  i = imag(c);
8278 +  i = norm(c);
8279 +  i = proj(c);
8280 +  i = real(c);
8281 +  i = pow(std::complex<float>(), c);
8282 +  i = pow(c, std::complex<float>());
8283 +}
8284 Index: libstdc++-v3/testsuite/26_numerics/complex/50880.cc
8285 ===================================================================
8286 --- libstdc++-v3/testsuite/26_numerics/complex/50880.cc (.../tags/gcc_4_6_2_release)    (wersja 0)
8287 +++ libstdc++-v3/testsuite/26_numerics/complex/50880.cc (.../branches/gcc-4_6-branch)   (wersja 182550)
8288 @@ -0,0 +1,53 @@
8289 +// { dg-options "-std=gnu++0x" }
8290 +//
8291 +// Copyright (C) 2011 Free Software Foundation, Inc.
8292 +//
8293 +// This file is part of the GNU ISO C++ Library.  This library is free
8294 +// software; you can redistribute it and/or modify it under the
8295 +// terms of the GNU General Public License as published by the
8296 +// Free Software Foundation; either version 3, or (at your option)
8297 +// any later version.
8298 +//
8299 +// This library is distributed in the hope that it will be useful,
8300 +// but WITHOUT ANY WARRANTY; without even the implied warranty of
8301 +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
8302 +// GNU General Public License for more details.
8303 +//
8304 +// You should have received a copy of the GNU General Public License along
8305 +// with this library; see the file COPYING3.  If not see
8306 +// <http://www.gnu.org/licenses/>.
8307 +
8308 +#include <complex>
8309 +#include <testsuite_hooks.h> 
8310 +
8311 +template<typename T>
8312 +  void test01_do()
8313 +  {
8314 +    bool test __attribute__((unused)) = true;
8315 +
8316 +    const std::complex<T> ca(T(-2), T(2));
8317 +    const std::complex<T> cb(T(-2), T(0));
8318 +    const std::complex<T> cc(T(-2), T(-2));
8319 +
8320 +    std::complex<T> cra = std::acosh(ca);
8321 +    std::complex<T> crb = std::acosh(cb);
8322 +    std::complex<T> crc = std::acosh(cc);
8323 +
8324 +    VERIFY( cra.real() > T(0) );
8325 +    VERIFY( crb.real() > T(0) );
8326 +    VERIFY( crc.real() > T(0) );
8327 +  }
8328 +
8329 +// libstdc++/50880
8330 +void test01()
8331 +{
8332 +  test01_do<float>();
8333 +  test01_do<double>();
8334 +  test01_do<long double>();
8335 +}
8336 +
8337 +int main()
8338 +{
8339 +  test01();
8340 +  return 0;
8341 +}
8342 Index: libstdc++-v3/testsuite/26_numerics/cmath/51083.cc
8343 ===================================================================
8344 --- libstdc++-v3/testsuite/26_numerics/cmath/51083.cc   (.../tags/gcc_4_6_2_release)    (wersja 0)
8345 +++ libstdc++-v3/testsuite/26_numerics/cmath/51083.cc   (.../branches/gcc-4_6-branch)   (wersja 182550)
8346 @@ -0,0 +1,62 @@
8347 +// { dg-options "-std=gnu++0x" }
8348 +//
8349 +// Copyright (C) 2011 Free Software Foundation, Inc.
8350 +//
8351 +// This file is part of the GNU ISO C++ Library.  This library is free
8352 +// software; you can redistribute it and/or modify it under the
8353 +// terms of the GNU General Public License as published by the
8354 +// Free Software Foundation; either version 3, or (at your option)
8355 +// any later version.
8356 +//
8357 +// This library is distributed in the hope that it will be useful,
8358 +// but WITHOUT ANY WARRANTY; without even the implied warranty of
8359 +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
8360 +// GNU General Public License for more details.
8361 +//
8362 +// You should have received a copy of the GNU General Public License along
8363 +// with this library; see the file COPYING3.  If not see
8364 +// <http://www.gnu.org/licenses/>.
8365 +
8366 +#include <cmath>
8367 +
8368 +namespace a
8369 +{
8370 +  template<typename> class Mat { };
8371 +
8372 +  template<typename T> struct Mat2 : Mat<T> { };
8373 +
8374 +  template<typename T>
8375 +    int fdim(Mat<T>) { return 1; }
8376 +
8377 +  template<typename T, typename U>
8378 +    int floor(Mat<T>, U) { return 1; }
8379 +  template<typename T, typename U>
8380 +    int floor(T, Mat<U>) { return 1; }
8381 +
8382 +  template<typename T, typename U, typename V>
8383 +    int fma(Mat<T>, U, V) { return 1; }
8384 +  template<typename T, typename U, typename V>
8385 +    int fma(T, Mat<U>, V) { return 1; }
8386 +  template<typename T, typename U, typename V>
8387 +    int fma(T, U, Mat<V>) { return 1; }
8388 +}
8389 +
8390 +int main()
8391 +{
8392 +  int __attribute__((unused)) i;
8393 +
8394 +  using namespace std;
8395 +
8396 +  a::Mat2<double> c;
8397 +  i = fdim(c);
8398 +  i = floor(c, 0.);
8399 +  i = floor(0., c);
8400 +  i = floor(c, 1);
8401 +  i = floor(1, c);
8402 +  i = fma(c, 0., 1.);
8403 +  i = fma(0., c, 1.);
8404 +  i = fma(0., 1., c);
8405 +  i = fma(c, 0., 1);
8406 +  i = fma(0., c, 1);
8407 +  i = fma(0., 1, c);
8408 +}
8409 Index: libstdc++-v3/testsuite/30_threads/condition_variable_any/50862.cc
8410 ===================================================================
8411 --- libstdc++-v3/testsuite/30_threads/condition_variable_any/50862.cc   (.../tags/gcc_4_6_2_release)    (wersja 0)
8412 +++ libstdc++-v3/testsuite/30_threads/condition_variable_any/50862.cc   (.../branches/gcc-4_6-branch)   (wersja 182550)
8413 @@ -0,0 +1,80 @@
8414 +// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* } }
8415 +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* } }
8416 +// { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } }
8417 +// { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } }
8418 +// { dg-require-cstdint "" }
8419 +// { dg-require-gthreads "" }
8420 +// { dg-require-sched-yield "" }
8421
8422 +// Copyright (C) 2011 Free Software Foundation, Inc.
8423 +//
8424 +// This file is part of the GNU ISO C++ Library.  This library is free
8425 +// software; you can redistribute it and/or modify it under the
8426 +// terms of the GNU General Public License as published by the
8427 +// Free Software Foundation; either version 3, or (at your option)
8428 +// any later version.
8429 +
8430 +// This library is distributed in the hope that it will be useful,
8431 +// but WITHOUT ANY WARRANTY; without even the implied warranty of
8432 +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
8433 +// GNU General Public License for more details.
8434 +
8435 +// You should have received a copy of the GNU General Public License along
8436 +// with this library; see the file COPYING3.  If not see
8437 +// <http://www.gnu.org/licenses/>. 
8438 +
8439 +#include <condition_variable>
8440 +#include <thread>
8441 +#include <mutex>
8442 +#include <array>
8443 +#include <sstream>
8444 +
8445 +struct scoped_thread
8446 +{
8447 +  ~scoped_thread() { if (t.joinable()) t.join(); }
8448 +  std::thread t;
8449 +};
8450 +
8451 +int main()
8452 +{
8453 +  typedef std::unique_lock<std::mutex> Lock;
8454 +
8455 +  std::mutex                  m;
8456 +  std::condition_variable_any cond;
8457 +  unsigned int                product = 0;
8458 +  const unsigned int          count = 10;
8459 +
8460 +  // writing to stream causes timing changes which makes deadlock easier
8461 +  // to reproduce - do not remove
8462 +  std::ostringstream out;
8463 +
8464 +  // create consumers
8465 +  std::array<scoped_thread, 2> threads;
8466 +  for (std::size_t i = 0; i < threads.size(); ++i)
8467 +    threads[i].t
8468 +      = std::thread( [&]
8469 +                    {
8470 +                      for (unsigned int i = 0; i < count; ++i)
8471 +                        {
8472 +                          std::this_thread::yield();
8473 +                          Lock lock(m);
8474 +                          while(product == 0)
8475 +                            cond.wait(lock);
8476 +                          out << "got product "
8477 +                              << std::this_thread::get_id()
8478 +                              << ' ' << product << std::endl;
8479 +                          --product;
8480 +                        }
8481 +                    } );
8482 +
8483 +  // single producer
8484 +  for (std::size_t i = 0; i < threads.size() * count; ++i)
8485 +    {
8486 +      std::this_thread::yield();
8487 +      Lock lock(m);
8488 +      ++product;
8489 +      out << "setting product " << std::this_thread::get_id()
8490 +         << ' ' << product << std::endl;
8491 +      cond.notify_one();
8492 +    }
8493 +}
8494 Index: libstdc++-v3/testsuite/ext/type_traits/remove_unsigned_integer_neg.cc
8495 ===================================================================
8496 --- libstdc++-v3/testsuite/ext/type_traits/remove_unsigned_integer_neg.cc       (.../tags/gcc_4_6_2_release)    (wersja 182550)
8497 +++ libstdc++-v3/testsuite/ext/type_traits/remove_unsigned_integer_neg.cc       (.../branches/gcc-4_6-branch)   (wersja 182550)
8498 @@ -36,4 +36,4 @@
8499  }
8500  
8501  // { dg-error "invalid use of incomplete" "" { target *-*-* } 28 } 
8502 -// { dg-error "declaration of" "" { target *-*-* } 106 }
8503 +// { dg-error "declaration of" "" { target *-*-* } 107 }
8504 Index: libstdc++-v3/testsuite/ext/type_traits/add_unsigned_floating_neg.cc
8505 ===================================================================
8506 --- libstdc++-v3/testsuite/ext/type_traits/add_unsigned_floating_neg.cc (.../tags/gcc_4_6_2_release)    (wersja 182550)
8507 +++ libstdc++-v3/testsuite/ext/type_traits/add_unsigned_floating_neg.cc (.../branches/gcc-4_6-branch)   (wersja 182550)
8508 @@ -35,4 +35,4 @@
8509  }
8510  
8511  // { dg-error "instantiated from" "" { target *-*-* } 28 } 
8512 -// { dg-error "no type" "" { target *-*-* } 69 } 
8513 +// { dg-error "no type" "" { target *-*-* } 70 } 
8514 Index: libstdc++-v3/testsuite/ext/type_traits/remove_unsigned_floating_neg.cc
8515 ===================================================================
8516 --- libstdc++-v3/testsuite/ext/type_traits/remove_unsigned_floating_neg.cc      (.../tags/gcc_4_6_2_release)    (wersja 182550)
8517 +++ libstdc++-v3/testsuite/ext/type_traits/remove_unsigned_floating_neg.cc      (.../branches/gcc-4_6-branch)   (wersja 182550)
8518 @@ -35,4 +35,4 @@
8519  }
8520  
8521  // { dg-error "instantiated from" "" { target *-*-* } 28 }
8522 -// { dg-error "no type" "" { target *-*-* } 112 }
8523 +// { dg-error "no type" "" { target *-*-* } 113 }
8524 Index: libstdc++-v3/testsuite/ext/type_traits/add_unsigned_integer_neg.cc
8525 ===================================================================
8526 --- libstdc++-v3/testsuite/ext/type_traits/add_unsigned_integer_neg.cc  (.../tags/gcc_4_6_2_release)    (wersja 182550)
8527 +++ libstdc++-v3/testsuite/ext/type_traits/add_unsigned_integer_neg.cc  (.../branches/gcc-4_6-branch)   (wersja 182550)
8528 @@ -36,4 +36,4 @@
8529  }
8530  
8531  // { dg-error "invalid use of incomplete" "" { target *-*-* } 28 } 
8532 -// { dg-error "declaration of" "" { target *-*-* } 63 }
8533 +// { dg-error "declaration of" "" { target *-*-* } 64 }
8534 Index: libstdc++-v3/testsuite/tr1/8_c_compatibility/complex/51083.cc
8535 ===================================================================
8536 --- libstdc++-v3/testsuite/tr1/8_c_compatibility/complex/51083.cc       (.../tags/gcc_4_6_2_release)    (wersja 0)
8537 +++ libstdc++-v3/testsuite/tr1/8_c_compatibility/complex/51083.cc       (.../branches/gcc-4_6-branch)   (wersja 182550)
8538 @@ -0,0 +1,54 @@
8539 +// { dg-options "-std=gnu++0x" }
8540 +//
8541 +// Copyright (C) 2011 Free Software Foundation, Inc.
8542 +//
8543 +// This file is part of the GNU ISO C++ Library.  This library is free
8544 +// software; you can redistribute it and/or modify it under the
8545 +// terms of the GNU General Public License as published by the
8546 +// Free Software Foundation; either version 3, or (at your option)
8547 +// any later version.
8548 +//
8549 +// This library is distributed in the hope that it will be useful,
8550 +// but WITHOUT ANY WARRANTY; without even the implied warranty of
8551 +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
8552 +// GNU General Public License for more details.
8553 +//
8554 +// You should have received a copy of the GNU General Public License along
8555 +// with this library; see the file COPYING3.  If not see
8556 +// <http://www.gnu.org/licenses/>.
8557 +
8558 +#include <tr1/complex>
8559 +
8560 +namespace a
8561 +{
8562 +  template<typename> class Mat { };
8563 +
8564 +  template<typename T> struct Mat2 : Mat<T> { };
8565 +
8566 +  template<typename T> int arg(Mat<T>) { return 1; }
8567 +  template<typename T> int conj(Mat<T>) { return 1; }
8568 +  template<typename T> int imag(Mat<T>) { return 1; }
8569 +  template<typename T> int norm(Mat<T>) { return 1; }
8570 +  template<typename T> int proj(Mat<T>) { return 1; }
8571 +  template<typename T> int real(Mat<T>) { return 1; }
8572 +
8573 +  template<typename T, typename U> int pow(Mat<T>, U) { return 1; }
8574 +  template<typename T, typename U> int pow(T, Mat<U>) { return 1; }
8575 +}
8576 +
8577 +int main()
8578 +{
8579 +  int __attribute__((unused)) i;
8580 +
8581 +  using namespace std::tr1;
8582 +
8583 +  a::Mat2< std::complex<double> > c;
8584 +  i = arg(c);
8585 +  i = conj(c);
8586 +  i = imag(c);
8587 +  i = norm(c);
8588 +  i = proj(c);
8589 +  i = real(c);
8590 +  i = pow(std::complex<float>(), c);
8591 +  i = pow(c, std::complex<float>());
8592 +}
8593 Index: libstdc++-v3/testsuite/tr1/8_c_compatibility/complex/50880.cc
8594 ===================================================================
8595 --- libstdc++-v3/testsuite/tr1/8_c_compatibility/complex/50880.cc       (.../tags/gcc_4_6_2_release)    (wersja 0)
8596 +++ libstdc++-v3/testsuite/tr1/8_c_compatibility/complex/50880.cc       (.../branches/gcc-4_6-branch)   (wersja 182550)
8597 @@ -0,0 +1,51 @@
8598 +// Copyright (C) 2011 Free Software Foundation, Inc.
8599 +//
8600 +// This file is part of the GNU ISO C++ Library.  This library is free
8601 +// software; you can redistribute it and/or modify it under the
8602 +// terms of the GNU General Public License as published by the
8603 +// Free Software Foundation; either version 3, or (at your option)
8604 +// any later version.
8605 +//
8606 +// This library is distributed in the hope that it will be useful,
8607 +// but WITHOUT ANY WARRANTY; without even the implied warranty of
8608 +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
8609 +// GNU General Public License for more details.
8610 +//
8611 +// You should have received a copy of the GNU General Public License along
8612 +// with this library; see the file COPYING3.  If not see
8613 +// <http://www.gnu.org/licenses/>.
8614 +
8615 +#include <tr1/complex>
8616 +#include <testsuite_hooks.h> 
8617 +
8618 +template<typename T>
8619 +  void test01_do()
8620 +  {
8621 +    bool test __attribute__((unused)) = true;
8622 +
8623 +    const std::complex<T> ca(T(-2), T(2));
8624 +    const std::complex<T> cb(T(-2), T(0));
8625 +    const std::complex<T> cc(T(-2), T(-2));
8626 +
8627 +    std::complex<T> cra = std::tr1::acosh(ca);
8628 +    std::complex<T> crb = std::tr1::acosh(cb);
8629 +    std::complex<T> crc = std::tr1::acosh(cc);
8630 +
8631 +    VERIFY( cra.real() > T(0) );
8632 +    VERIFY( crb.real() > T(0) );
8633 +    VERIFY( crc.real() > T(0) );
8634 +  }
8635 +
8636 +// libstdc++/50880
8637 +void test01()
8638 +{
8639 +  test01_do<float>();
8640 +  test01_do<double>();
8641 +  test01_do<long double>();
8642 +}
8643 +
8644 +int main()
8645 +{
8646 +  test01();
8647 +  return 0;
8648 +}
8649 Index: libstdc++-v3/testsuite/tr1/8_c_compatibility/cmath/51083.cc
8650 ===================================================================
8651 --- libstdc++-v3/testsuite/tr1/8_c_compatibility/cmath/51083.cc (.../tags/gcc_4_6_2_release)    (wersja 0)
8652 +++ libstdc++-v3/testsuite/tr1/8_c_compatibility/cmath/51083.cc (.../branches/gcc-4_6-branch)   (wersja 182550)
8653 @@ -0,0 +1,62 @@
8654 +// { dg-options "-std=gnu++0x" }
8655 +//
8656 +// Copyright (C) 2011 Free Software Foundation, Inc.
8657 +//
8658 +// This file is part of the GNU ISO C++ Library.  This library is free
8659 +// software; you can redistribute it and/or modify it under the
8660 +// terms of the GNU General Public License as published by the
8661 +// Free Software Foundation; either version 3, or (at your option)
8662 +// any later version.
8663 +//
8664 +// This library is distributed in the hope that it will be useful,
8665 +// but WITHOUT ANY WARRANTY; without even the implied warranty of
8666 +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
8667 +// GNU General Public License for more details.
8668 +//
8669 +// You should have received a copy of the GNU General Public License along
8670 +// with this library; see the file COPYING3.  If not see
8671 +// <http://www.gnu.org/licenses/>.
8672 +
8673 +#include <tr1/cmath>
8674 +
8675 +namespace a
8676 +{
8677 +  template<typename> class Mat { };
8678 +
8679 +  template<typename T> struct Mat2 : Mat<T> { };
8680 +
8681 +  template<typename T>
8682 +    int fdim(Mat<T>) { return 1; }
8683 +
8684 +  template<typename T, typename U>
8685 +    int floor(Mat<T>, U) { return 1; }
8686 +  template<typename T, typename U>
8687 +    int floor(T, Mat<U>) { return 1; }
8688 +
8689 +  template<typename T, typename U, typename V>
8690 +    int fma(Mat<T>, U, V) { return 1; }
8691 +  template<typename T, typename U, typename V>
8692 +    int fma(T, Mat<U>, V) { return 1; }
8693 +  template<typename T, typename U, typename V>
8694 +    int fma(T, U, Mat<V>) { return 1; }
8695 +}
8696 +
8697 +int main()
8698 +{
8699 +  int __attribute__((unused)) i;
8700 +
8701 +  using namespace std::tr1;
8702 +
8703 +  a::Mat2<double> c;
8704 +  i = fdim(c);
8705 +  i = floor(c, 0.);
8706 +  i = floor(0., c);
8707 +  i = floor(c, 1);
8708 +  i = floor(1, c);
8709 +  i = fma(c, 0., 1.);
8710 +  i = fma(0., c, 1.);
8711 +  i = fma(0., 1., c);
8712 +  i = fma(c, 0., 1);
8713 +  i = fma(0., c, 1);
8714 +  i = fma(0., 1, c);
8715 +}
8716 Index: libstdc++-v3/testsuite/23_containers/unordered_map/erase/51142.cc
8717 ===================================================================
8718 --- libstdc++-v3/testsuite/23_containers/unordered_map/erase/51142.cc   (.../tags/gcc_4_6_2_release)    (wersja 0)
8719 +++ libstdc++-v3/testsuite/23_containers/unordered_map/erase/51142.cc   (.../branches/gcc-4_6-branch)   (wersja 182550)
8720 @@ -0,0 +1,38 @@
8721 +// Copyright (C) 2011 Free Software Foundation, Inc.
8722 +//
8723 +// This file is part of the GNU ISO C++ Library.  This library is free
8724 +// software; you can redistribute it and/or modify it under the
8725 +// terms of the GNU General Public License as published by the
8726 +// Free Software Foundation; either version 3, or (at your option)
8727 +// any later version.
8728 +//
8729 +// This library is distributed in the hope that it will be useful,
8730 +// but WITHOUT ANY WARRANTY; without even the implied warranty of
8731 +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
8732 +// GNU General Public License for more details.
8733 +//
8734 +// You should have received a copy of the GNU General Public License along
8735 +// with this library; see the file COPYING3.  If not see
8736 +// <http://www.gnu.org/licenses/>.
8737 +//
8738 +
8739 +// { dg-do compile }
8740 +// { dg-options "-std=gnu++0x" }
8741 +
8742 +#include <unordered_map>
8743 +
8744 +struct X
8745 +{
8746 +  template<typename T>
8747 +  X(T&) {}
8748 +};
8749 +
8750 +bool operator==(const X&, const X&) { return false; }
8751 +
8752 +// LWG 2059.
8753 +void erasor(std::unordered_map<X, int>& s, X x)
8754 +{
8755 +  std::unordered_map<X, int>::iterator it = s.find(x);
8756 +  if (it != s.end())
8757 +    s.erase(it);
8758 +}
8759 Index: libstdc++-v3/testsuite/23_containers/multimap/modifiers/erase/51142.cc
8760 ===================================================================
8761 --- libstdc++-v3/testsuite/23_containers/multimap/modifiers/erase/51142.cc      (.../tags/gcc_4_6_2_release)    (wersja 0)
8762 +++ libstdc++-v3/testsuite/23_containers/multimap/modifiers/erase/51142.cc      (.../branches/gcc-4_6-branch)   (wersja 182550)
8763 @@ -0,0 +1,38 @@
8764 +// Copyright (C) 2011 Free Software Foundation, Inc.
8765 +//
8766 +// This file is part of the GNU ISO C++ Library.  This library is free
8767 +// software; you can redistribute it and/or modify it under the
8768 +// terms of the GNU General Public License as published by the
8769 +// Free Software Foundation; either version 3, or (at your option)
8770 +// any later version.
8771 +//
8772 +// This library is distributed in the hope that it will be useful,
8773 +// but WITHOUT ANY WARRANTY; without even the implied warranty of
8774 +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
8775 +// GNU General Public License for more details.
8776 +//
8777 +// You should have received a copy of the GNU General Public License along
8778 +// with this library; see the file COPYING3.  If not see
8779 +// <http://www.gnu.org/licenses/>.
8780 +//
8781 +
8782 +// { dg-do compile }
8783 +// { dg-options "-std=gnu++0x" }
8784 +
8785 +#include <map>
8786 +
8787 +struct X
8788 +{
8789 +  template<typename T>
8790 +  X(T&) {}
8791 +};
8792 +
8793 +bool operator<(const X&, const X&) { return false; }
8794 +
8795 +// LWG 2059.
8796 +void erasor(std::multimap<X, int>& s, X x)
8797 +{
8798 +  std::multimap<X, int>::iterator it = s.find(x);
8799 +  if (it != s.end())
8800 +    s.erase(it);
8801 +}
8802 Index: libstdc++-v3/testsuite/23_containers/set/modifiers/erase/51142.cc
8803 ===================================================================
8804 --- libstdc++-v3/testsuite/23_containers/set/modifiers/erase/51142.cc   (.../tags/gcc_4_6_2_release)    (wersja 0)
8805 +++ libstdc++-v3/testsuite/23_containers/set/modifiers/erase/51142.cc   (.../branches/gcc-4_6-branch)   (wersja 182550)
8806 @@ -0,0 +1,38 @@
8807 +// Copyright (C) 2011 Free Software Foundation, Inc.
8808 +//
8809 +// This file is part of the GNU ISO C++ Library.  This library is free
8810 +// software; you can redistribute it and/or modify it under the
8811 +// terms of the GNU General Public License as published by the
8812 +// Free Software Foundation; either version 3, or (at your option)
8813 +// any later version.
8814 +//
8815 +// This library is distributed in the hope that it will be useful,
8816 +// but WITHOUT ANY WARRANTY; without even the implied warranty of
8817 +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
8818 +// GNU General Public License for more details.
8819 +//
8820 +// You should have received a copy of the GNU General Public License along
8821 +// with this library; see the file COPYING3.  If not see
8822 +// <http://www.gnu.org/licenses/>.
8823 +//
8824 +
8825 +// { dg-do compile }
8826 +// { dg-options "-std=gnu++0x" }
8827 +
8828 +#include <set>
8829 +
8830 +struct X
8831 +{
8832 +  template<typename T>
8833 +  X(T&) {}
8834 +};
8835 +
8836 +bool operator<(const X&, const X&) { return false; }
8837 +
8838 +// LWG 2059.
8839 +void erasor(std::set<X>& s, X x)
8840 +{
8841 +  std::set<X>::iterator it = s.find(x);
8842 +  if (it != s.end())
8843 +    s.erase(it);
8844 +}
8845 Index: libstdc++-v3/testsuite/23_containers/unordered_multimap/erase/51142.cc
8846 ===================================================================
8847 --- libstdc++-v3/testsuite/23_containers/unordered_multimap/erase/51142.cc      (.../tags/gcc_4_6_2_release)    (wersja 0)
8848 +++ libstdc++-v3/testsuite/23_containers/unordered_multimap/erase/51142.cc      (.../branches/gcc-4_6-branch)   (wersja 182550)
8849 @@ -0,0 +1,38 @@
8850 +// Copyright (C) 2011 Free Software Foundation, Inc.
8851 +//
8852 +// This file is part of the GNU ISO C++ Library.  This library is free
8853 +// software; you can redistribute it and/or modify it under the
8854 +// terms of the GNU General Public License as published by the
8855 +// Free Software Foundation; either version 3, or (at your option)
8856 +// any later version.
8857 +//
8858 +// This library is distributed in the hope that it will be useful,
8859 +// but WITHOUT ANY WARRANTY; without even the implied warranty of
8860 +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
8861 +// GNU General Public License for more details.
8862 +//
8863 +// You should have received a copy of the GNU General Public License along
8864 +// with this library; see the file COPYING3.  If not see
8865 +// <http://www.gnu.org/licenses/>.
8866 +//
8867 +
8868 +// { dg-do compile }
8869 +// { dg-options "-std=gnu++0x" }
8870 +
8871 +#include <unordered_map>
8872 +
8873 +struct X
8874 +{
8875 +  template<typename T>
8876 +  X(T&) {}
8877 +};
8878 +
8879 +bool operator==(const X&, const X&) { return false; }
8880 +
8881 +// LWG 2059.
8882 +void erasor(std::unordered_multimap<X, int>& s, X x)
8883 +{
8884 +  std::unordered_multimap<X, int>::iterator it = s.find(x);
8885 +  if (it != s.end())
8886 +    s.erase(it);
8887 +}
8888 Index: libstdc++-v3/testsuite/23_containers/unordered_set/erase/51142.cc
8889 ===================================================================
8890 --- libstdc++-v3/testsuite/23_containers/unordered_set/erase/51142.cc   (.../tags/gcc_4_6_2_release)    (wersja 0)
8891 +++ libstdc++-v3/testsuite/23_containers/unordered_set/erase/51142.cc   (.../branches/gcc-4_6-branch)   (wersja 182550)
8892 @@ -0,0 +1,38 @@
8893 +// Copyright (C) 2011 Free Software Foundation, Inc.
8894 +//
8895 +// This file is part of the GNU ISO C++ Library.  This library is free
8896 +// software; you can redistribute it and/or modify it under the
8897 +// terms of the GNU General Public License as published by the
8898 +// Free Software Foundation; either version 3, or (at your option)
8899 +// any later version.
8900 +//
8901 +// This library is distributed in the hope that it will be useful,
8902 +// but WITHOUT ANY WARRANTY; without even the implied warranty of
8903 +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
8904 +// GNU General Public License for more details.
8905 +//
8906 +// You should have received a copy of the GNU General Public License along
8907 +// with this library; see the file COPYING3.  If not see
8908 +// <http://www.gnu.org/licenses/>.
8909 +//
8910 +
8911 +// { dg-do compile }
8912 +// { dg-options "-std=gnu++0x" }
8913 +
8914 +#include <unordered_set>
8915 +
8916 +struct X
8917 +{
8918 +  template<typename T>
8919 +  X(T&) {}
8920 +};
8921 +
8922 +bool operator==(const X&, const X&) { return false; }
8923 +
8924 +// LWG 2059.
8925 +void erasor(std::unordered_set<X>& s, X x)
8926 +{
8927 +  std::unordered_set<X>::iterator it = s.find(x);
8928 +  if (it != s.end())
8929 +    s.erase(it);
8930 +}
8931 Index: libstdc++-v3/testsuite/23_containers/multiset/modifiers/erase/51142.cc
8932 ===================================================================
8933 --- libstdc++-v3/testsuite/23_containers/multiset/modifiers/erase/51142.cc      (.../tags/gcc_4_6_2_release)    (wersja 0)
8934 +++ libstdc++-v3/testsuite/23_containers/multiset/modifiers/erase/51142.cc      (.../branches/gcc-4_6-branch)   (wersja 182550)
8935 @@ -0,0 +1,38 @@
8936 +// Copyright (C) 2011 Free Software Foundation, Inc.
8937 +//
8938 +// This file is part of the GNU ISO C++ Library.  This library is free
8939 +// software; you can redistribute it and/or modify it under the
8940 +// terms of the GNU General Public License as published by the
8941 +// Free Software Foundation; either version 3, or (at your option)
8942 +// any later version.
8943 +//
8944 +// This library is distributed in the hope that it will be useful,
8945 +// but WITHOUT ANY WARRANTY; without even the implied warranty of
8946 +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
8947 +// GNU General Public License for more details.
8948 +//
8949 +// You should have received a copy of the GNU General Public License along
8950 +// with this library; see the file COPYING3.  If not see
8951 +// <http://www.gnu.org/licenses/>.
8952 +//
8953 +
8954 +// { dg-do compile }
8955 +// { dg-options "-std=gnu++0x" }
8956 +
8957 +#include <set>
8958 +
8959 +struct X
8960 +{
8961 +  template<typename T>
8962 +  X(T&) {}
8963 +};
8964 +
8965 +bool operator<(const X&, const X&) { return false; }
8966 +
8967 +// LWG 2059.
8968 +void erasor(std::multiset<X>& s, X x)
8969 +{
8970 +  std::multiset<X>::iterator it = s.find(x);
8971 +  if (it != s.end())
8972 +    s.erase(it);
8973 +}
8974 Index: libstdc++-v3/testsuite/23_containers/unordered_multiset/erase/51142.cc
8975 ===================================================================
8976 --- libstdc++-v3/testsuite/23_containers/unordered_multiset/erase/51142.cc      (.../tags/gcc_4_6_2_release)    (wersja 0)
8977 +++ libstdc++-v3/testsuite/23_containers/unordered_multiset/erase/51142.cc      (.../branches/gcc-4_6-branch)   (wersja 182550)
8978 @@ -0,0 +1,38 @@
8979 +// Copyright (C) 2011 Free Software Foundation, Inc.
8980 +//
8981 +// This file is part of the GNU ISO C++ Library.  This library is free
8982 +// software; you can redistribute it and/or modify it under the
8983 +// terms of the GNU General Public License as published by the
8984 +// Free Software Foundation; either version 3, or (at your option)
8985 +// any later version.
8986 +//
8987 +// This library is distributed in the hope that it will be useful,
8988 +// but WITHOUT ANY WARRANTY; without even the implied warranty of
8989 +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
8990 +// GNU General Public License for more details.
8991 +//
8992 +// You should have received a copy of the GNU General Public License along
8993 +// with this library; see the file COPYING3.  If not see
8994 +// <http://www.gnu.org/licenses/>.
8995 +//
8996 +
8997 +// { dg-do compile }
8998 +// { dg-options "-std=gnu++0x" }
8999 +
9000 +#include <unordered_set>
9001 +
9002 +struct X
9003 +{
9004 +  template<typename T>
9005 +  X(T&) {}
9006 +};
9007 +
9008 +bool operator==(const X&, const X&) { return false; }
9009 +
9010 +// LWG 2059.
9011 +void erasor(std::unordered_multiset<X>& s, X x)
9012 +{
9013 +  std::unordered_multiset<X>::iterator it = s.find(x);
9014 +  if (it != s.end())
9015 +    s.erase(it);
9016 +}
9017 Index: libstdc++-v3/testsuite/23_containers/map/modifiers/erase/51142.cc
9018 ===================================================================
9019 --- libstdc++-v3/testsuite/23_containers/map/modifiers/erase/51142.cc   (.../tags/gcc_4_6_2_release)    (wersja 0)
9020 +++ libstdc++-v3/testsuite/23_containers/map/modifiers/erase/51142.cc   (.../branches/gcc-4_6-branch)   (wersja 182550)
9021 @@ -0,0 +1,38 @@
9022 +// Copyright (C) 2011 Free Software Foundation, Inc.
9023 +//
9024 +// This file is part of the GNU ISO C++ Library.  This library is free
9025 +// software; you can redistribute it and/or modify it under the
9026 +// terms of the GNU General Public License as published by the
9027 +// Free Software Foundation; either version 3, or (at your option)
9028 +// any later version.
9029 +//
9030 +// This library is distributed in the hope that it will be useful,
9031 +// but WITHOUT ANY WARRANTY; without even the implied warranty of
9032 +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
9033 +// GNU General Public License for more details.
9034 +//
9035 +// You should have received a copy of the GNU General Public License along
9036 +// with this library; see the file COPYING3.  If not see
9037 +// <http://www.gnu.org/licenses/>.
9038 +//
9039 +
9040 +// { dg-do compile }
9041 +// { dg-options "-std=gnu++0x" }
9042 +
9043 +#include <map>
9044 +
9045 +struct X
9046 +{
9047 +  template<typename T>
9048 +  X(T&) {}
9049 +};
9050 +
9051 +bool operator<(const X&, const X&) { return false; }
9052 +
9053 +// LWG 2059.
9054 +void erasor(std::map<X, int>& s, X x)
9055 +{
9056 +  std::map<X, int>::iterator it = s.find(x);
9057 +  if (it != s.end())
9058 +    s.erase(it);
9059 +}
9060 Index: configure.ac
9061 ===================================================================
9062 --- configure.ac        (.../tags/gcc_4_6_2_release)    (wersja 182550)
9063 +++ configure.ac        (.../branches/gcc-4_6-branch)   (wersja 182550)
9064 @@ -2428,10 +2428,6 @@
9065      extra_arflags_for_target=" -X32_64"
9066      extra_nmflags_for_target=" -B -X32_64"
9067      ;;
9068 -  *-*-darwin[[3-9]]*)
9069 -    # ranlib before Darwin10 requires the -c flag to look at common symbols.
9070 -    extra_ranlibflags_for_target=" -c"
9071 -    ;;
9072    mips*-*-pe | sh*-*-pe | *arm-wince-pe)
9073      target_makefile_frag="config/mt-wince"
9074      ;;
9075 Index: libobjc/configure
9076 ===================================================================
9077 --- libobjc/configure   (.../tags/gcc_4_6_2_release)    (wersja 182550)
9078 +++ libobjc/configure   (.../branches/gcc-4_6-branch)   (wersja 182550)
9079 @@ -8797,7 +8797,7 @@
9080        ;;
9081  
9082      # Unfortunately, older versions of FreeBSD 2 do not have this feature.
9083 -    freebsd2*)
9084 +    freebsd2.*)
9085        archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
9086        hardcode_direct=yes
9087        hardcode_minus_L=yes
9088 @@ -9713,7 +9713,7 @@
9089      objformat=`/usr/bin/objformat`
9090    else
9091      case $host_os in
9092 -    freebsd[123]*) objformat=aout ;;
9093 +    freebsd[23].*) objformat=aout ;;
9094      *) objformat=elf ;;
9095      esac
9096    fi
9097 @@ -9731,7 +9731,7 @@
9098    esac
9099    shlibpath_var=LD_LIBRARY_PATH
9100    case $host_os in
9101 -  freebsd2*)
9102 +  freebsd2.*)
9103      shlibpath_overrides_runpath=yes
9104      ;;
9105    freebsd3.[01]* | freebsdelf3.[01]*)
9106 Index: libobjc/ChangeLog
9107 ===================================================================
9108 --- libobjc/ChangeLog   (.../tags/gcc_4_6_2_release)    (wersja 182550)
9109 +++ libobjc/ChangeLog   (.../branches/gcc-4_6-branch)   (wersja 182550)
9110 @@ -1,3 +1,7 @@
9111 +2011-11-20  Andreas Tobler  <andreast@fgznet.ch>
9112 +
9113 +       * configure: Regenerate.
9114 +
9115  2011-10-26  Release Manager
9116  
9117         * GCC 4.6.2 released.
9118 Index: libgfortran/configure
9119 ===================================================================
9120 --- libgfortran/configure       (.../tags/gcc_4_6_2_release)    (wersja 182550)
9121 +++ libgfortran/configure       (.../branches/gcc-4_6-branch)   (wersja 182550)
9122 @@ -10326,7 +10326,7 @@
9123        ;;
9124  
9125      # Unfortunately, older versions of FreeBSD 2 do not have this feature.
9126 -    freebsd2*)
9127 +    freebsd2.*)
9128        archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
9129        hardcode_direct=yes
9130        hardcode_minus_L=yes
9131 @@ -11242,7 +11242,7 @@
9132      objformat=`/usr/bin/objformat`
9133    else
9134      case $host_os in
9135 -    freebsd[123]*) objformat=aout ;;
9136 +    freebsd[23].*) objformat=aout ;;
9137      *) objformat=elf ;;
9138      esac
9139    fi
9140 @@ -11260,7 +11260,7 @@
9141    esac
9142    shlibpath_var=LD_LIBRARY_PATH
9143    case $host_os in
9144 -  freebsd2*)
9145 +  freebsd2.*)
9146      shlibpath_overrides_runpath=yes
9147      ;;
9148    freebsd3.[01]* | freebsdelf3.[01]*)
9149 @@ -14162,7 +14162,7 @@
9150        ;;
9151  
9152      # Unfortunately, older versions of FreeBSD 2 do not have this feature.
9153 -    freebsd2*)
9154 +    freebsd2.*)
9155        archive_cmds_FC='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
9156        hardcode_direct_FC=yes
9157        hardcode_minus_L_FC=yes
9158 @@ -14870,7 +14870,7 @@
9159      objformat=`/usr/bin/objformat`
9160    else
9161      case $host_os in
9162 -    freebsd[123]*) objformat=aout ;;
9163 +    freebsd[23].*) objformat=aout ;;
9164      *) objformat=elf ;;
9165      esac
9166    fi
9167 @@ -14888,7 +14888,7 @@
9168    esac
9169    shlibpath_var=LD_LIBRARY_PATH
9170    case $host_os in
9171 -  freebsd2*)
9172 +  freebsd2.*)
9173      shlibpath_overrides_runpath=yes
9174      ;;
9175    freebsd3.[01]* | freebsdelf3.[01]*)
9176 Index: libgfortran/ChangeLog
9177 ===================================================================
9178 --- libgfortran/ChangeLog       (.../tags/gcc_4_6_2_release)    (wersja 182550)
9179 +++ libgfortran/ChangeLog       (.../branches/gcc-4_6-branch)   (wersja 182550)
9180 @@ -1,3 +1,7 @@
9181 +2011-11-20  Andreas Tobler  <andreast@fgznet.ch>
9182 +
9183 +       * configure: Regenerate.
9184 +
9185  2011-10-26  Release Manager
9186  
9187         * GCC 4.6.2 released.
9188 Index: libada/Makefile.in
9189 ===================================================================
9190 --- libada/Makefile.in  (.../tags/gcc_4_6_2_release)    (wersja 182550)
9191 +++ libada/Makefile.in  (.../branches/gcc-4_6-branch)   (wersja 182550)
9192 @@ -70,6 +70,7 @@
9193  version := $(shell cat $(srcdir)/../gcc/BASE-VER)
9194  libsubdir := $(libdir)/gcc/$(target_noncanonical)/$(version)$(MULTISUBDIR)
9195  ADA_RTS_DIR=$(GCC_DIR)/ada/rts$(subst /,_,$(MULTISUBDIR))
9196 +ADA_RTS_SUBDIR=./rts$(subst /,_,$(MULTISUBDIR))
9197  
9198  # exeext should not be used because it's the *host* exeext.  We're building
9199  # a *target* library, aren't we?!?  Likewise for CC.  Still, provide bogus
9200 @@ -96,10 +97,10 @@
9201          "CFLAGS=$(CFLAGS) $(WARN_CFLAGS)"
9202  
9203  # Rules to build gnatlib.
9204 -.PHONY: gnatlib gnatlib-plain gnatlib-sjlj gnatlib-zcx gnatlib-shared oscons
9205 +.PHONY: gnatlib gnatlib-plain gnatlib-sjlj gnatlib-zcx gnatlib-shared osconstool
9206  gnatlib: @default_gnatlib_target@
9207  
9208 -gnatlib-plain: oscons $(GCC_DIR)/ada/Makefile
9209 +gnatlib-plain: osconstool $(GCC_DIR)/ada/Makefile
9210         test -f stamp-libada || \
9211         $(MAKE) -C $(GCC_DIR)/ada $(LIBADA_FLAGS_TO_PASS) gnatlib \
9212         && touch stamp-libada
9213 @@ -108,7 +109,7 @@
9214         $(LN_S) $(ADA_RTS_DIR) adainclude
9215         $(LN_S) $(ADA_RTS_DIR) adalib
9216  
9217 -gnatlib-sjlj gnatlib-zcx gnatlib-shared: oscons $(GCC_DIR)/ada/Makefile
9218 +gnatlib-sjlj gnatlib-zcx gnatlib-shared: osconstool $(GCC_DIR)/ada/Makefile
9219         test -f stamp-libada || \
9220         $(MAKE) -C $(GCC_DIR)/ada $(LIBADA_FLAGS_TO_PASS) $@ \
9221         && touch stamp-libada
9222 @@ -117,8 +118,8 @@
9223         $(LN_S) $(ADA_RTS_DIR) adainclude
9224         $(LN_S) $(ADA_RTS_DIR) adalib
9225  
9226 -oscons:
9227 -       $(MAKE) -C $(GCC_DIR) $(LIBADA_FLAGS_TO_PASS) ada/s-oscons.ads
9228 +osconstool:
9229 +       $(MAKE) -C $(GCC_DIR)/ada $(LIBADA_FLAGS_TO_PASS) ./bldtools/oscons/xoscons
9230  
9231  install-gnatlib: $(GCC_DIR)/ada/Makefile
9232         $(MAKE) -C $(GCC_DIR)/ada $(LIBADA_FLAGS_TO_PASS) install-gnatlib
9233 Index: libada/ChangeLog
9234 ===================================================================
9235 --- libada/ChangeLog    (.../tags/gcc_4_6_2_release)    (wersja 182550)
9236 +++ libada/ChangeLog    (.../branches/gcc-4_6-branch)   (wersja 182550)
9237 @@ -1,3 +1,9 @@
9238 +2011-11-13  Iain Sandoe  <iains@gcc.gnu.org>
9239 +
9240 +       Backport from mainline r181319
9241 +       Makefile.in: Change dependency on oscons to depend on the generator
9242 +       tool.
9243 +
9244  2011-10-26  Release Manager
9245  
9246         * GCC 4.6.2 released.
9247 Index: libmudflap/configure
9248 ===================================================================
9249 --- libmudflap/configure        (.../tags/gcc_4_6_2_release)    (wersja 182550)
9250 +++ libmudflap/configure        (.../branches/gcc-4_6-branch)   (wersja 182550)
9251 @@ -8818,7 +8818,7 @@
9252        ;;
9253  
9254      # Unfortunately, older versions of FreeBSD 2 do not have this feature.
9255 -    freebsd2*)
9256 +    freebsd2.*)
9257        archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
9258        hardcode_direct=yes
9259        hardcode_minus_L=yes
9260 @@ -9731,7 +9731,7 @@
9261      objformat=`/usr/bin/objformat`
9262    else
9263      case $host_os in
9264 -    freebsd[123]*) objformat=aout ;;
9265 +    freebsd[23].*) objformat=aout ;;
9266      *) objformat=elf ;;
9267      esac
9268    fi
9269 @@ -9749,7 +9749,7 @@
9270    esac
9271    shlibpath_var=LD_LIBRARY_PATH
9272    case $host_os in
9273 -  freebsd2*)
9274 +  freebsd2.*)
9275      shlibpath_overrides_runpath=yes
9276      ;;
9277    freebsd3.[01]* | freebsdelf3.[01]*)
9278 Index: libmudflap/ChangeLog
9279 ===================================================================
9280 --- libmudflap/ChangeLog        (.../tags/gcc_4_6_2_release)    (wersja 182550)
9281 +++ libmudflap/ChangeLog        (.../branches/gcc-4_6-branch)   (wersja 182550)
9282 @@ -1,3 +1,7 @@
9283 +2011-11-20  Andreas Tobler  <andreast@fgznet.ch>
9284 +
9285 +       * configure: Regenerate.
9286 +
9287  2011-10-26  Release Manager
9288  
9289         * GCC 4.6.2 released.
9290 Index: boehm-gc/ChangeLog
9291 ===================================================================
9292 --- boehm-gc/ChangeLog  (.../tags/gcc_4_6_2_release)    (wersja 182550)
9293 +++ boehm-gc/ChangeLog  (.../branches/gcc-4_6-branch)   (wersja 182550)
9294 @@ -1,3 +1,7 @@
9295 +2011-11-20  Andreas Tobler  <andreast@fgznet.ch>
9296 +
9297 +       * configure: Regenerate.
9298 +
9299  2011-10-26  Release Manager
9300  
9301         * GCC 4.6.2 released.
9302 Index: boehm-gc/configure
9303 ===================================================================
9304 --- boehm-gc/configure  (.../tags/gcc_4_6_2_release)    (wersja 182550)
9305 +++ boehm-gc/configure  (.../branches/gcc-4_6-branch)   (wersja 182550)
9306 @@ -9604,7 +9604,7 @@
9307        ;;
9308  
9309      # Unfortunately, older versions of FreeBSD 2 do not have this feature.
9310 -    freebsd2*)
9311 +    freebsd2.*)
9312        archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
9313        hardcode_direct=yes
9314        hardcode_minus_L=yes
9315 @@ -10520,7 +10520,7 @@
9316      objformat=`/usr/bin/objformat`
9317    else
9318      case $host_os in
9319 -    freebsd[123]*) objformat=aout ;;
9320 +    freebsd[23].*) objformat=aout ;;
9321      *) objformat=elf ;;
9322      esac
9323    fi
9324 @@ -10538,7 +10538,7 @@
9325    esac
9326    shlibpath_var=LD_LIBRARY_PATH
9327    case $host_os in
9328 -  freebsd2*)
9329 +  freebsd2.*)
9330      shlibpath_overrides_runpath=yes
9331      ;;
9332    freebsd3.[01]* | freebsdelf3.[01]*)
9333 @@ -12428,7 +12428,7 @@
9334          esac
9335          ;;
9336  
9337 -      freebsd[12]*)
9338 +      freebsd2.*)
9339          # C++ shared libraries reported to be fairly broken before
9340         # switch to ELF
9341          ld_shlibs_CXX=no
9342 @@ -14203,7 +14203,7 @@
9343      objformat=`/usr/bin/objformat`
9344    else
9345      case $host_os in
9346 -    freebsd[123]*) objformat=aout ;;
9347 +    freebsd[23].*) objformat=aout ;;
9348      *) objformat=elf ;;
9349      esac
9350    fi
9351 @@ -14221,7 +14221,7 @@
9352    esac
9353    shlibpath_var=LD_LIBRARY_PATH
9354    case $host_os in
9355 -  freebsd2*)
9356 +  freebsd2.*)
9357      shlibpath_overrides_runpath=yes
9358      ;;
9359    freebsd3.[01]* | freebsdelf3.[01]*)
9360 Index: libiberty/ChangeLog
9361 ===================================================================
9362 --- libiberty/ChangeLog (.../tags/gcc_4_6_2_release)    (wersja 182550)
9363 +++ libiberty/ChangeLog (.../branches/gcc-4_6-branch)   (wersja 182550)
9364 @@ -1,3 +1,17 @@
9365 +2011-11-13  Iain Sandoe  <iains@gcc.gnu.org>
9366 +
9367 +       PR target/48108
9368 +       Backport from mainline r180523
9369 +       * simple-object-mach-o.c  (GNU_WRAPPER_SECTS, GNU_WRAPPER_INDEX,
9370 +       GNU_WRAPPER_NAMES): New macros.
9371 +       (simple_object_mach_o_segment): Handle wrapper scheme.
9372 +       (simple_object_mach_o_write_section_header): Allow the segment name
9373 +       to be supplied.
9374 +       (simple_object_mach_o_write_segment): Handle wrapper scheme.  Ensure
9375 +       that the top-level segment name in the load command is empty.
9376 +       (simple_object_mach_o_write_to_file): Determine the number of
9377 +       sections during segment output, use that in writing the header.
9378 +
9379  2011-10-26  Release Manager
9380  
9381         * GCC 4.6.2 released.
9382 Index: libiberty/simple-object-mach-o.c
9383 ===================================================================
9384 --- libiberty/simple-object-mach-o.c    (.../tags/gcc_4_6_2_release)    (wersja 182550)
9385 +++ libiberty/simple-object-mach-o.c    (.../branches/gcc-4_6-branch)   (wersja 182550)
9386 @@ -1,5 +1,5 @@
9387  /* simple-object-mach-o.c -- routines to manipulate Mach-O object files.
9388 -   Copyright 2010 Free Software Foundation, Inc.
9389 +   Copyright 2010, 2011 Free Software Foundation, Inc.
9390     Written by Ian Lance Taylor, Google.
9391  
9392  This program is free software; you can redistribute it and/or modify it
9393 @@ -174,6 +174,15 @@
9394  
9395  #define GNU_SECTION_NAMES "__section_names"
9396  
9397 +/* A GNU-specific extension to wrap multiple sections using three
9398 +   mach-o sections within a given segment.  The section '__wrapper_sects'
9399 +   is subdivided according to the index '__wrapper_index' and each sub
9400 +   sect is named according to the names supplied in '__wrapper_names'.  */
9401 +
9402 +#define GNU_WRAPPER_SECTS "__wrapper_sects"
9403 +#define GNU_WRAPPER_INDEX "__wrapper_index"
9404 +#define GNU_WRAPPER_NAMES "__wrapper_names"
9405 +
9406  /* Private data for an simple_object_read.  */
9407  
9408  struct simple_object_mach_o_read
9409 @@ -214,8 +223,19 @@
9410    unsigned int reserved;
9411  };
9412  
9413 -/* See if we have a Mach-O file.  */
9414 +/* See if we have a Mach-O MH_OBJECT file:
9415  
9416 +   A standard MH_OBJECT (from as) will have three load commands:
9417 +   0 - LC_SEGMENT/LC_SEGMENT64
9418 +   1 - LC_SYMTAB
9419 +   2 - LC_DYSYMTAB
9420 +
9421 +   The LC_SEGMENT/LC_SEGMENT64 will introduce a single anonymous segment
9422 +   containing all the sections.
9423 +
9424 +   Files written by simple-object will have only the segment command
9425 +   (no symbol tables).  */
9426 +
9427  static void *
9428  simple_object_mach_o_match (
9429      unsigned char header[SIMPLE_OBJECT_MATCH_HEADER_LEN],
9430 @@ -356,9 +376,30 @@
9431      }
9432  }
9433  
9434 -/* Handle a segment in a Mach-O file.  Return 1 if we should continue,
9435 -   0 if the caller should return.  */
9436 +/* Handle a segment in a Mach-O Object file.
9437  
9438 +   This will callback to the function pfn for each "section found" the meaning
9439 +   of which depends on gnu extensions to mach-o:
9440 +
9441 +   If we find mach-o sections (with the segment name as specified) which also
9442 +   contain: a 'sects' wrapper, an index, and a  name table, we expand this into
9443 +   as many sections as are specified in the index.  In this case, there will
9444 +   be a callback for each of these.
9445 +
9446 +   We will also allow an extension that permits long names (more than 16
9447 +   characters) to be used with mach-o.  In this case, the section name has
9448 +   a specific format embedding an index into a name table, and the file must
9449 +   contain such name table.
9450 +
9451 +   Return 1 if we should continue, 0 if the caller should return.  */
9452 +
9453 +#define SOMO_SECTS_PRESENT 0x01
9454 +#define SOMO_INDEX_PRESENT 0x02
9455 +#define SOMO_NAMES_PRESENT 0x04
9456 +#define SOMO_LONGN_PRESENT 0x08
9457 +#define SOMO_WRAPPING (SOMO_SECTS_PRESENT | SOMO_INDEX_PRESENT \
9458 +                      | SOMO_NAMES_PRESENT)
9459 +
9460  static int
9461  simple_object_mach_o_segment (simple_object_read *sobj, off_t offset,
9462                               const unsigned char *segbuf,
9463 @@ -378,9 +419,20 @@
9464    unsigned int nsects;
9465    unsigned char *secdata;
9466    unsigned int i;
9467 +  unsigned int gnu_sections_found;
9468    unsigned int strtab_index;
9469 +  unsigned int index_index;
9470 +  unsigned int nametab_index;
9471 +  unsigned int sections_index;
9472    char *strtab;
9473 +  char *nametab;
9474 +  unsigned char *index;
9475    size_t strtab_size;
9476 +  size_t nametab_size;
9477 +  size_t index_size;
9478 +  unsigned int n_wrapped_sects;
9479 +  size_t wrapper_sect_size;
9480 +  off_t wrapper_sect_offset;
9481  
9482    fetch_32 = (omr->is_big_endian
9483               ? simple_object_fetch_big_32
9484 @@ -409,6 +461,8 @@
9485                                         nsects));
9486      }
9487  
9488 +  /* Fetch the section headers from the segment command.  */
9489 +
9490    secdata = XNEWVEC (unsigned char, nsects * sechdrsize);
9491    if (!simple_object_internal_read (sobj->descriptor, offset + seghdrsize,
9492                                     secdata, nsects * sechdrsize, errmsg, err))
9493 @@ -417,9 +471,13 @@
9494        return 0;
9495      }
9496  
9497 -  /* Scan for a __section_names section.  This is in effect a GNU
9498 -     extension that permits section names longer than 16 chars.  */
9499 +  /* Scan for special sections that signal GNU extensions to the format.  */
9500  
9501 +  gnu_sections_found = 0;
9502 +  index_index = nsects;
9503 +  sections_index = nsects;
9504 +  strtab_index = nsects;
9505 +  nametab_index = nsects;
9506    for (i = 0; i < nsects; ++i)
9507      {
9508        size_t nameoff;
9509 @@ -427,19 +485,104 @@
9510        nameoff = i * sechdrsize + segname_offset;
9511        if (strcmp ((char *) secdata + nameoff, omr->segment_name) != 0)
9512         continue;
9513 +
9514        nameoff = i * sechdrsize + sectname_offset;
9515 -      if (strcmp ((char *) secdata + nameoff, GNU_SECTION_NAMES) == 0)
9516 -       break;
9517 +      if (strcmp ((char *) secdata + nameoff, GNU_WRAPPER_NAMES) == 0)
9518 +       {
9519 +         nametab_index = i;
9520 +         gnu_sections_found |= SOMO_NAMES_PRESENT;
9521 +       }
9522 +      else if (strcmp ((char *) secdata + nameoff, GNU_WRAPPER_INDEX) == 0)
9523 +       {
9524 +         index_index = i;
9525 +         gnu_sections_found |= SOMO_INDEX_PRESENT;
9526 +       }
9527 +      else if (strcmp ((char *) secdata + nameoff, GNU_WRAPPER_SECTS) == 0)
9528 +       {
9529 +         sections_index = i;
9530 +         gnu_sections_found |= SOMO_SECTS_PRESENT;
9531 +       }
9532 +      else if (strcmp ((char *) secdata + nameoff, GNU_SECTION_NAMES) == 0)
9533 +       {
9534 +         strtab_index = i;
9535 +         gnu_sections_found |= SOMO_LONGN_PRESENT;
9536 +       }
9537      }
9538  
9539 -  strtab_index = i;
9540 -  if (strtab_index >= nsects)
9541 +  /* If any of the special wrapper section components is present, then
9542 +     they all should be.  */
9543 +
9544 +  if ((gnu_sections_found & SOMO_WRAPPING) != 0)
9545      {
9546 -      strtab = NULL;
9547 -      strtab_size = 0;
9548 +      off_t nametab_offset;
9549 +      off_t index_offset;
9550 +
9551 +      if ((gnu_sections_found & SOMO_WRAPPING) != SOMO_WRAPPING)
9552 +       {
9553 +         *errmsg = "GNU Mach-o section wrapper: required section missing";
9554 +         *err = 0; /* No useful errno.  */
9555 +         XDELETEVEC (secdata);
9556 +         return 0;
9557 +       }
9558 +
9559 +      /* Fetch the name table.  */
9560 +
9561 +      simple_object_mach_o_section_info (omr->is_big_endian, is_32,
9562 +                                        secdata + nametab_index * sechdrsize,
9563 +                                        &nametab_offset, &nametab_size);
9564 +      nametab = XNEWVEC (char, nametab_size);
9565 +      if (!simple_object_internal_read (sobj->descriptor,
9566 +                                       sobj->offset + nametab_offset,
9567 +                                       (unsigned char *) nametab, nametab_size,
9568 +                                       errmsg, err))
9569 +       {
9570 +         XDELETEVEC (nametab);
9571 +         XDELETEVEC (secdata);
9572 +         return 0;
9573 +       }
9574 +
9575 +      /* Fetch the index.  */
9576 +
9577 +      simple_object_mach_o_section_info (omr->is_big_endian, is_32,
9578 +                                        secdata + index_index * sechdrsize,
9579 +                                        &index_offset, &index_size);
9580 +      index = XNEWVEC (unsigned char, index_size);
9581 +      if (!simple_object_internal_read (sobj->descriptor,
9582 +                                       sobj->offset + index_offset,
9583 +                                       index, index_size,
9584 +                                       errmsg, err))
9585 +       {
9586 +         XDELETEVEC (index);
9587 +         XDELETEVEC (nametab);
9588 +         XDELETEVEC (secdata);
9589 +         return 0;
9590 +       }
9591 +
9592 +      /* The index contains 4 unsigned ints per sub-section:
9593 +        sub-section offset/length, sub-section name/length.
9594 +        We fix this for both 32 and 64 bit mach-o for now, since
9595 +        other fields limit the maximum size of an object to 4G.  */
9596 +      n_wrapped_sects = index_size / 16;
9597 +
9598 +      /* Get the parameters for the wrapper too.  */
9599 +      simple_object_mach_o_section_info (omr->is_big_endian, is_32,
9600 +                                        secdata + sections_index * sechdrsize,
9601 +                                        &wrapper_sect_offset,
9602 +                                        &wrapper_sect_size);
9603      }
9604    else
9605      {
9606 +      index = NULL;
9607 +      index_size = 0;
9608 +      nametab = NULL;
9609 +      nametab_size = 0;
9610 +      n_wrapped_sects = 0;
9611 +    }
9612 +
9613 +  /* If we have a long names section, fetch it.  */
9614 +
9615 +  if ((gnu_sections_found & SOMO_LONGN_PRESENT) != 0)
9616 +    {
9617        off_t strtab_offset;
9618  
9619        simple_object_mach_o_section_info (omr->is_big_endian, is_32,
9620 @@ -452,52 +595,120 @@
9621                                         errmsg, err))
9622         {
9623           XDELETEVEC (strtab);
9624 +         XDELETEVEC (index);
9625 +         XDELETEVEC (nametab);
9626           XDELETEVEC (secdata);
9627           return 0;
9628         }
9629      }
9630 +  else
9631 +    {
9632 +      strtab = NULL;
9633 +      strtab_size = 0;
9634 +      strtab_index = nsects;
9635 +    }
9636  
9637    /* Process the sections.  */
9638  
9639    for (i = 0; i < nsects; ++i)
9640      {
9641        const unsigned char *sechdr;
9642 -      char namebuf[MACH_O_NAME_LEN + 1];
9643 +      char namebuf[MACH_O_NAME_LEN * 2 + 2];
9644        char *name;
9645        off_t secoffset;
9646        size_t secsize;
9647 +      int l;
9648  
9649 -      if (i == strtab_index)
9650 +      sechdr = secdata + i * sechdrsize;
9651 +
9652 +      /* We've already processed the long section names.  */
9653 +
9654 +      if ((gnu_sections_found & SOMO_LONGN_PRESENT) != 0
9655 +         && i == strtab_index)
9656         continue;
9657  
9658 -      sechdr = secdata + i * sechdrsize;
9659 +      /* We only act on the segment named.  */
9660  
9661        if (strcmp ((char *) sechdr + segname_offset, omr->segment_name) != 0)
9662         continue;
9663  
9664 -      memcpy (namebuf, sechdr + sectname_offset, MACH_O_NAME_LEN);
9665 -      namebuf[MACH_O_NAME_LEN] = '\0';
9666 +      /* Process sections associated with the wrapper.  */
9667  
9668 -      name = &namebuf[0];
9669 -      if (strtab != NULL && name[0] == '_' && name[1] == '_')
9670 +      if ((gnu_sections_found & SOMO_WRAPPING) != 0)
9671         {
9672 -         unsigned long stringoffset;
9673 +         if (i == nametab_index || i == index_index)
9674 +           continue;
9675  
9676 -         if (sscanf (name + 2, "%08lX", &stringoffset) == 1)
9677 +         if (i == sections_index)
9678             {
9679 -             if (stringoffset >= strtab_size)
9680 +             unsigned int j;
9681 +             for (j = 0; j < n_wrapped_sects; ++j)
9682                 {
9683 -                 *errmsg = "section name offset out of range";
9684 -                 *err = 0;
9685 -                 XDELETEVEC (strtab);
9686 -                 XDELETEVEC (secdata);
9687 -                 return 0;
9688 +                 unsigned int subsect_offset, subsect_length, name_offset;
9689 +                 subsect_offset = (*fetch_32) (index + 16 * j);
9690 +                 subsect_length = (*fetch_32) (index + 16 * j + 4);
9691 +                 name_offset = (*fetch_32) (index + 16 * j + 8);
9692 +                 /* We don't need the name_length yet.  */
9693 +
9694 +                 secoffset = wrapper_sect_offset + subsect_offset;
9695 +                 secsize = subsect_length;
9696 +                 name = nametab + name_offset;
9697 +
9698 +                 if (!(*pfn) (data, name, secoffset, secsize))
9699 +                   {
9700 +                     *errmsg = NULL;
9701 +                     *err = 0;
9702 +                     XDELETEVEC (index);
9703 +                     XDELETEVEC (nametab);
9704 +                     XDELETEVEC (strtab);
9705 +                     XDELETEVEC (secdata);
9706 +                     return 0;
9707 +                   }
9708                 }
9709 -
9710 -             name = strtab + stringoffset;
9711 +             continue;
9712             }
9713         }
9714  
9715 +      if ((gnu_sections_found & SOMO_LONGN_PRESENT) != 0)
9716 +       {
9717 +         memcpy (namebuf, sechdr + sectname_offset, MACH_O_NAME_LEN);
9718 +         namebuf[MACH_O_NAME_LEN] = '\0';
9719 +
9720 +         name = &namebuf[0];
9721 +         if (strtab != NULL && name[0] == '_' && name[1] == '_')
9722 +           {
9723 +             unsigned long stringoffset;
9724 +
9725 +             if (sscanf (name + 2, "%08lX", &stringoffset) == 1)
9726 +               {
9727 +                 if (stringoffset >= strtab_size)
9728 +                   {
9729 +                     *errmsg = "section name offset out of range";
9730 +                     *err = 0;
9731 +                     XDELETEVEC (index);
9732 +                     XDELETEVEC (nametab);
9733 +                     XDELETEVEC (strtab);
9734 +                     XDELETEVEC (secdata);
9735 +                     return 0;
9736 +                   }
9737 +
9738 +                 name = strtab + stringoffset;
9739 +               }
9740 +         }
9741 +       }
9742 +      else
9743 +       {
9744 +          /* Otherwise, make a name like __segment,__section as per the
9745 +             convention in mach-o asm.  */
9746 +         name = &namebuf[0];
9747 +         memset (namebuf, 0, MACH_O_NAME_LEN * 2 + 2);
9748 +         memcpy (namebuf, (char *) sechdr + segname_offset, MACH_O_NAME_LEN);
9749 +         l = strlen (namebuf);
9750 +         namebuf[l] = ',';
9751 +         memcpy (namebuf + l + 1, (char *) sechdr + sectname_offset,
9752 +                 MACH_O_NAME_LEN);
9753 +       }
9754 +
9755        simple_object_mach_o_section_info (omr->is_big_endian, is_32, sechdr,
9756                                          &secoffset, &secsize);
9757  
9758 @@ -505,12 +716,16 @@
9759         {
9760           *errmsg = NULL;
9761           *err = 0;
9762 +         XDELETEVEC (index);
9763 +         XDELETEVEC (nametab);
9764           XDELETEVEC (strtab);
9765           XDELETEVEC (secdata);
9766           return 0;
9767         }
9768      }
9769  
9770 +  XDELETEVEC (index);
9771 +  XDELETEVEC (nametab);
9772    XDELETEVEC (strtab);
9773    XDELETEVEC (secdata);
9774  
9775 @@ -724,9 +939,9 @@
9776  simple_object_mach_o_write_section_header (simple_object_write *sobj,
9777                                            int descriptor,
9778                                            size_t sechdr_offset,
9779 -                                          const char *name, size_t secaddr,
9780 -                                          size_t secsize, size_t offset,
9781 -                                          unsigned int align,
9782 +                                          const char *name, const char *segn,
9783 +                                          size_t secaddr, size_t secsize,
9784 +                                          size_t offset, unsigned int align,
9785                                            const char **errmsg, int *err)
9786  {
9787    struct simple_object_mach_o_attributes *attrs =
9788 @@ -748,7 +963,7 @@
9789        strncpy ((char *) hdr + offsetof (struct mach_o_section_32, sectname),
9790                name, MACH_O_NAME_LEN);
9791        strncpy ((char *) hdr + offsetof (struct mach_o_section_32, segname),
9792 -              sobj->segment_name, MACH_O_NAME_LEN);
9793 +              segn, MACH_O_NAME_LEN);
9794        set_32 (hdr + offsetof (struct mach_o_section_32, addr), secaddr);
9795        set_32 (hdr + offsetof (struct mach_o_section_32, size), secsize);
9796        set_32 (hdr + offsetof (struct mach_o_section_32, offset), offset);
9797 @@ -773,7 +988,7 @@
9798        strncpy ((char *) hdr + offsetof (struct mach_o_section_64, sectname),
9799                name, MACH_O_NAME_LEN);
9800        strncpy ((char *) hdr + offsetof (struct mach_o_section_64, segname),
9801 -              sobj->segment_name, MACH_O_NAME_LEN);
9802 +              segn, MACH_O_NAME_LEN);
9803        set_64 (hdr + offsetof (struct mach_o_section_64, addr), secaddr);
9804        set_64 (hdr + offsetof (struct mach_o_section_64, size), secsize);
9805        set_32 (hdr + offsetof (struct mach_o_section_64, offset), offset);
9806 @@ -793,11 +1008,25 @@
9807                                        sechdrsize, errmsg, err);
9808  }
9809  
9810 -/* Write out the single segment and the sections of a Mach-O file.  */
9811 +/* Write out the single (anonymous) segment containing the sections of a Mach-O
9812 +   Object file.
9813  
9814 +   As a GNU extension to mach-o, when the caller specifies a segment name in
9815 +   sobj->segment_name, all the sections passed will be output under a single
9816 +   mach-o section header.  The caller's sections are indexed within this
9817 +   'wrapper' section by a table stored in a second mach-o section.  Finally,
9818 +   arbitrary length section names are permitted by the extension and these are
9819 +   stored in a table in a third mach-o section.
9820 +
9821 +   Note that this is only likely to make any sense for the __GNU_LTO segment
9822 +   at present.
9823 +
9824 +   If the wrapper extension is not in force, we assume that the section name
9825 +   is in the form __SEGMENT_NAME,__section_name as per Mach-O asm.  */
9826 +
9827  static int
9828  simple_object_mach_o_write_segment (simple_object_write *sobj, int descriptor,
9829 -                                   size_t nsects, const char **errmsg,
9830 +                                   size_t *nsects, const char **errmsg,
9831                                     int *err)
9832  {
9833    struct simple_object_mach_o_attributes *attrs =
9834 @@ -814,6 +1043,10 @@
9835    simple_object_write_section *section;
9836    unsigned char hdrbuf[sizeof (struct mach_o_segment_command_64)];
9837    unsigned char *hdr;
9838 +  size_t nsects_in;
9839 +  unsigned int *index;
9840 +  char *snames;
9841 +  unsigned int sect;
9842  
9843    set_32 = (attrs->is_big_endian
9844             ? simple_object_set_big_32
9845 @@ -834,19 +1067,62 @@
9846        sechdrsize = sizeof (struct mach_o_section_64);
9847      }
9848  
9849 +  name_offset = 0;
9850 +  *nsects = nsects_in = 0;
9851 +
9852 +  /* Count the number of sections we start with.  */
9853 +
9854 +  for (section = sobj->sections; section != NULL; section = section->next)
9855 +    nsects_in++;
9856 +
9857 +  if (sobj->segment_name != NULL)
9858 +    {
9859 +      /* We will only write 3 sections: wrapped data, index and names.  */
9860 +
9861 +      *nsects = 3;
9862 +
9863 +      /* The index has four entries per wrapped section:
9864 +          Section Offset, length,  Name offset, length.
9865 +        Where the offsets are based at the start of the wrapper and name
9866 +        sections respectively.
9867 +        The values are stored as 32 bit int for both 32 and 64 bit mach-o
9868 +        since the size of a mach-o MH_OBJECT cannot exceed 4G owing to
9869 +        other constraints.  */
9870 +
9871 +      index = XNEWVEC (unsigned int, nsects_in * 4);
9872 +
9873 +      /* We now need to figure out the size of the names section.  This just
9874 +        stores the names as null-terminated c strings, packed without any
9875 +        alignment padding.  */
9876 +
9877 +      for (section = sobj->sections, sect = 0; section != NULL;
9878 +          section = section->next, sect++)
9879 +       {
9880 +         index[sect*4+2] = name_offset;
9881 +         index[sect*4+3] = strlen (section->name) + 1;
9882 +         name_offset += strlen (section->name) + 1;
9883 +       }
9884 +      snames = XNEWVEC (char, name_offset);
9885 +    }
9886 +  else
9887 +    {
9888 +      *nsects = nsects_in;
9889 +      index = NULL;
9890 +      snames = NULL;
9891 +    }
9892 +
9893    sechdr_offset = hdrsize + seghdrsize;
9894 -  cmdsize = seghdrsize + nsects * sechdrsize;
9895 +  cmdsize = seghdrsize + *nsects * sechdrsize;
9896    offset = hdrsize + cmdsize;
9897 -  name_offset = 0;
9898    secaddr = 0;
9899  
9900 -  for (section = sobj->sections; section != NULL; section = section->next)
9901 +  for (section = sobj->sections, sect = 0;
9902 +       section != NULL; section = section->next, sect++)
9903      {
9904        size_t mask;
9905        size_t new_offset;
9906        size_t secsize;
9907        struct simple_object_write_section_buffer *buffer;
9908 -      char namebuf[MACH_O_NAME_LEN + 1];
9909  
9910        mask = (1U << section->align) - 1;
9911        new_offset = offset + mask;
9912 @@ -877,39 +1153,126 @@
9913           secsize += buffer->size;
9914         }
9915  
9916 -      snprintf (namebuf, sizeof namebuf, "__%08X", name_offset);
9917 +      if (sobj->segment_name != NULL)
9918 +       {
9919 +         index[sect*4+0] = (unsigned int) offset;
9920 +         index[sect*4+1] = secsize;
9921 +         /* Stash the section name in our table.  */
9922 +         memcpy (snames + index[sect * 4 + 2], section->name,
9923 +                 index[sect * 4 + 3]);
9924 +       }
9925 +      else
9926 +       {
9927 +         char namebuf[MACH_O_NAME_LEN + 1];
9928 +         char segnbuf[MACH_O_NAME_LEN + 1];
9929 +         char *comma;
9930 +
9931 +         /* Try to extract segment,section from the input name.  */
9932 +
9933 +         memset (namebuf, 0, sizeof namebuf);
9934 +         memset (segnbuf, 0, sizeof segnbuf);
9935 +         comma = strchr (section->name, ',');
9936 +         if (comma != NULL)
9937 +           {
9938 +             int len = comma - section->name;
9939 +             len = len > MACH_O_NAME_LEN ? MACH_O_NAME_LEN : len;
9940 +             strncpy (namebuf, section->name, len);
9941 +             strncpy (segnbuf, comma + 1, MACH_O_NAME_LEN);
9942 +           }
9943 +         else /* just try to copy the name, leave segment blank.  */
9944 +           strncpy (namebuf, section->name, MACH_O_NAME_LEN);
9945 +
9946 +         if (!simple_object_mach_o_write_section_header (sobj, descriptor,
9947 +                                                         sechdr_offset,
9948 +                                                         namebuf, segnbuf,
9949 +                                                         secaddr, secsize,
9950 +                                                         offset,
9951 +                                                         section->align,
9952 +                                                         errmsg, err))
9953 +           return 0;
9954 +         sechdr_offset += sechdrsize;
9955 +       }
9956 +
9957 +      offset += secsize;
9958 +      secaddr += secsize;
9959 +    }
9960 +
9961 +  if (sobj->segment_name != NULL)
9962 +    {
9963 +      size_t secsize;
9964 +      unsigned int i;
9965 +
9966 +      /* Write the section header for the wrapper.  */
9967 +      /* Account for any initial aligment - which becomes the alignment for this
9968 +        created section.  */
9969 +
9970 +      secsize = (offset - index[0]);
9971        if (!simple_object_mach_o_write_section_header (sobj, descriptor,
9972 -                                                     sechdr_offset, namebuf,
9973 -                                                     secaddr, secsize, offset,
9974 -                                                     section->align,
9975 +                                                     sechdr_offset,
9976 +                                                     GNU_WRAPPER_SECTS,
9977 +                                                     sobj->segment_name,
9978 +                                                     0 /*secaddr*/,
9979 +                                                     secsize, index[0],
9980 +                                                     sobj->sections->align,
9981                                                       errmsg, err))
9982         return 0;
9983  
9984 +      /* Subtract the wrapper section start from the begining of each sub
9985 +        section.  */
9986 +
9987 +      for (i = 1; i < nsects_in; ++i)
9988 +       index[4 * i] -= index[0];
9989 +      index[0] = 0;
9990 +
9991        sechdr_offset += sechdrsize;
9992 -      offset += secsize;
9993 -      name_offset += strlen (section->name) + 1;
9994 -      secaddr += secsize;
9995 -    }
9996  
9997 -  /* Write out the section names.  */
9998 +      /* Write out the section names.
9999 +        ... the header ...
10000 +        name_offset contains the length of the section.  It is not aligned.  */
10001  
10002 -  if (!simple_object_mach_o_write_section_header (sobj, descriptor,
10003 -                                                 sechdr_offset,
10004 -                                                 GNU_SECTION_NAMES, secaddr,
10005 -                                                 name_offset, offset, 0,
10006 -                                                 errmsg, err))
10007 -    return 0;
10008 +      if (!simple_object_mach_o_write_section_header (sobj, descriptor,
10009 +                                                     sechdr_offset,
10010 +                                                     GNU_WRAPPER_NAMES,
10011 +                                                     sobj->segment_name,
10012 +                                                     0 /*secaddr*/,
10013 +                                                     name_offset,
10014 +                                                     offset,
10015 +                                                     0, errmsg, err))
10016 +       return 0;
10017  
10018 -  for (section = sobj->sections; section != NULL; section = section->next)
10019 -    {
10020 -      size_t namelen;
10021 +      /* ... and the content.. */
10022 +      if (!simple_object_internal_write (descriptor, offset,
10023 +                                        (const unsigned char *) snames,
10024 +                                        name_offset, errmsg, err))
10025 +       return 0;
10026  
10027 -      namelen = strlen (section->name) + 1;
10028 +      sechdr_offset += sechdrsize;
10029 +      secaddr += name_offset;
10030 +      offset += name_offset;
10031 +
10032 +      /* Now do the index, we'll align this to 4 bytes although the read code
10033 +        will handle unaligned.  */
10034 +
10035 +      offset += 3;
10036 +      offset &= ~0x03;
10037 +      if (!simple_object_mach_o_write_section_header (sobj, descriptor,
10038 +                                                     sechdr_offset,
10039 +                                                     GNU_WRAPPER_INDEX,
10040 +                                                     sobj->segment_name,
10041 +                                                     0 /*secaddr*/,
10042 +                                                     nsects_in * 16,
10043 +                                                     offset,
10044 +                                                     2, errmsg, err))
10045 +       return 0;
10046 +
10047 +      /* ... and the content.. */
10048        if (!simple_object_internal_write (descriptor, offset,
10049 -                                        (const unsigned char *) section->name,
10050 -                                        namelen, errmsg, err))
10051 +                                        (const unsigned char *) index,
10052 +                                        nsects_in*16, errmsg, err))
10053         return 0;
10054 -      offset += namelen;
10055 +
10056 +      XDELETEVEC (index);
10057 +      XDELETEVEC (snames);
10058      }
10059  
10060    /* Write out the segment header.  */
10061 @@ -923,9 +1286,8 @@
10062               MACH_O_LC_SEGMENT);
10063        set_32 (hdr + offsetof (struct mach_o_segment_command_32, cmdsize),
10064               cmdsize);
10065 -      strncpy (((char *) hdr
10066 -               + offsetof (struct mach_o_segment_command_32, segname)),
10067 -              sobj->segment_name, MACH_O_NAME_LEN);
10068 +     /* MH_OBJECTS have a single, anonymous, segment - so the segment name
10069 +        is left empty.  */
10070        /* vmaddr left as zero.  */
10071        /* vmsize left as zero.  */
10072        set_32 (hdr + offsetof (struct mach_o_segment_command_32, fileoff),
10073 @@ -935,7 +1297,7 @@
10074        /* maxprot left as zero.  */
10075        /* initprot left as zero.  */
10076        set_32 (hdr + offsetof (struct mach_o_segment_command_32, nsects),
10077 -             nsects);
10078 +             *nsects);
10079        /* flags left as zero.  */
10080      }
10081    else
10082 @@ -951,9 +1313,8 @@
10083               MACH_O_LC_SEGMENT);
10084        set_32 (hdr + offsetof (struct mach_o_segment_command_64, cmdsize),
10085               cmdsize);
10086 -      strncpy (((char *) hdr
10087 -               + offsetof (struct mach_o_segment_command_64, segname)),
10088 -              sobj->segment_name, MACH_O_NAME_LEN);
10089 +      /* MH_OBJECTS have a single, anonymous, segment - so the segment name
10090 +        is left empty.  */
10091        /* vmaddr left as zero.  */
10092        /* vmsize left as zero.  */
10093        set_64 (hdr + offsetof (struct mach_o_segment_command_64, fileoff),
10094 @@ -963,7 +1324,7 @@
10095        /* maxprot left as zero.  */
10096        /* initprot left as zero.  */
10097        set_32 (hdr + offsetof (struct mach_o_segment_command_64, nsects),
10098 -             nsects);
10099 +             *nsects);
10100        /* flags left as zero.  */
10101  #endif
10102      }
10103 @@ -978,23 +1339,17 @@
10104  simple_object_mach_o_write_to_file (simple_object_write *sobj, int descriptor,
10105                                     int *err)
10106  {
10107 -  size_t nsects;
10108 -  simple_object_write_section *section;
10109 +  size_t nsects = 0;
10110    const char *errmsg;
10111  
10112 -  /* Start at 1 for symbol_names section.  */
10113 -  nsects = 1;
10114 -  for (section = sobj->sections; section != NULL; section = section->next)
10115 -    ++nsects;
10116 +  if (!simple_object_mach_o_write_segment (sobj, descriptor, &nsects,
10117 +                                          &errmsg, err))
10118 +    return errmsg;
10119  
10120    if (!simple_object_mach_o_write_header (sobj, descriptor, nsects,
10121                                           &errmsg, err))
10122      return errmsg;
10123  
10124 -  if (!simple_object_mach_o_write_segment (sobj, descriptor, nsects,
10125 -                                          &errmsg, err))
10126 -    return errmsg;
10127 -
10128    return NULL;
10129  }
10130  
10131 Index: ChangeLog
10132 ===================================================================
10133 --- ChangeLog   (.../tags/gcc_4_6_2_release)    (wersja 182550)
10134 +++ ChangeLog   (.../branches/gcc-4_6-branch)   (wersja 182550)
10135 @@ -1,3 +1,17 @@
10136 +2011-12-18  Eric Botcazou  <ebotcazou@adacore.com>
10137 +
10138 +       * configure: Regenerate.
10139 +
10140 +2011-11-20  Andreas Tobler  <andreast@fgznet.ch>
10141 +
10142 +       * libtool.m4: Additional FreeBSD 10 fixes.
10143 +
10144 +2011-11-18  Iain Sandoe  <iains@gcc.gnu.org>
10145 +
10146 +       PR target/49992
10147 +       * configure.ac: Remove ranlib special-casing for Darwin.
10148 +       * configure: Regenerate.
10149 +
10150  2011-10-26  Release Manager
10151  
10152         * GCC 4.6.2 released.
10153 Index: lto-plugin/configure
10154 ===================================================================
10155 --- lto-plugin/configure        (.../tags/gcc_4_6_2_release)    (wersja 182550)
10156 +++ lto-plugin/configure        (.../branches/gcc-4_6-branch)   (wersja 182550)
10157 @@ -8733,7 +8733,7 @@
10158        ;;
10159  
10160      # Unfortunately, older versions of FreeBSD 2 do not have this feature.
10161 -    freebsd2*)
10162 +    freebsd2.*)
10163        archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
10164        hardcode_direct=yes
10165        hardcode_minus_L=yes
10166 @@ -9646,7 +9646,7 @@
10167      objformat=`/usr/bin/objformat`
10168    else
10169      case $host_os in
10170 -    freebsd[123]*) objformat=aout ;;
10171 +    freebsd[23].*) objformat=aout ;;
10172      *) objformat=elf ;;
10173      esac
10174    fi
10175 @@ -9664,7 +9664,7 @@
10176    esac
10177    shlibpath_var=LD_LIBRARY_PATH
10178    case $host_os in
10179 -  freebsd2*)
10180 +  freebsd2.*)
10181      shlibpath_overrides_runpath=yes
10182      ;;
10183    freebsd3.[01]* | freebsdelf3.[01]*)
10184 Index: lto-plugin/ChangeLog
10185 ===================================================================
10186 --- lto-plugin/ChangeLog        (.../tags/gcc_4_6_2_release)    (wersja 182550)
10187 +++ lto-plugin/ChangeLog        (.../branches/gcc-4_6-branch)   (wersja 182550)
10188 @@ -1,3 +1,7 @@
10189 +2011-11-20  Andreas Tobler  <andreast@fgznet.ch>
10190 +
10191 +       * configure: Regenerate.
10192 +
10193  2011-10-26  Release Manager
10194  
10195         * GCC 4.6.2 released.
10196 Index: libffi/configure
10197 ===================================================================
10198 --- libffi/configure    (.../tags/gcc_4_6_2_release)    (wersja 182550)
10199 +++ libffi/configure    (.../branches/gcc-4_6-branch)   (wersja 182550)
10200 @@ -9001,7 +9001,7 @@
10201        ;;
10202  
10203      # Unfortunately, older versions of FreeBSD 2 do not have this feature.
10204 -    freebsd2*)
10205 +    freebsd2.*)
10206        archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
10207        hardcode_direct=yes
10208        hardcode_minus_L=yes
10209 @@ -9914,7 +9914,7 @@
10210      objformat=`/usr/bin/objformat`
10211    else
10212      case $host_os in
10213 -    freebsd[123]*) objformat=aout ;;
10214 +    freebsd[23].*) objformat=aout ;;
10215      *) objformat=elf ;;
10216      esac
10217    fi
10218 @@ -9932,7 +9932,7 @@
10219    esac
10220    shlibpath_var=LD_LIBRARY_PATH
10221    case $host_os in
10222 -  freebsd2*)
10223 +  freebsd2.*)
10224      shlibpath_overrides_runpath=yes
10225      ;;
10226    freebsd3.[01]* | freebsdelf3.[01]*)
10227 Index: libffi/ChangeLog
10228 ===================================================================
10229 --- libffi/ChangeLog    (.../tags/gcc_4_6_2_release)    (wersja 182550)
10230 +++ libffi/ChangeLog    (.../branches/gcc-4_6-branch)   (wersja 182550)
10231 @@ -1,3 +1,7 @@
10232 +2011-11-20  Andreas Tobler  <andreast@fgznet.ch>
10233 +
10234 +       * configure: Regenerate.
10235 +
10236  2011-10-26  Release Manager
10237  
10238         * GCC 4.6.2 released.
10239 Index: libssp/configure
10240 ===================================================================
10241 --- libssp/configure    (.../tags/gcc_4_6_2_release)    (wersja 182550)
10242 +++ libssp/configure    (.../branches/gcc-4_6-branch)   (wersja 182550)
10243 @@ -8864,7 +8864,7 @@
10244        ;;
10245  
10246      # Unfortunately, older versions of FreeBSD 2 do not have this feature.
10247 -    freebsd2*)
10248 +    freebsd2.*)
10249        archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
10250        hardcode_direct=yes
10251        hardcode_minus_L=yes
10252 @@ -9780,7 +9780,7 @@
10253      objformat=`/usr/bin/objformat`
10254    else
10255      case $host_os in
10256 -    freebsd[123]*) objformat=aout ;;
10257 +    freebsd[23].*) objformat=aout ;;
10258      *) objformat=elf ;;
10259      esac
10260    fi
10261 @@ -9798,7 +9798,7 @@
10262    esac
10263    shlibpath_var=LD_LIBRARY_PATH
10264    case $host_os in
10265 -  freebsd2*)
10266 +  freebsd2.*)
10267      shlibpath_overrides_runpath=yes
10268      ;;
10269    freebsd3.[01]* | freebsdelf3.[01]*)
10270 Index: libssp/ChangeLog
10271 ===================================================================
10272 --- libssp/ChangeLog    (.../tags/gcc_4_6_2_release)    (wersja 182550)
10273 +++ libssp/ChangeLog    (.../branches/gcc-4_6-branch)   (wersja 182550)
10274 @@ -1,3 +1,7 @@
10275 +2011-11-20  Andreas Tobler  <andreast@fgznet.ch>
10276 +
10277 +       * configure: Regenerate.
10278 +
10279  2011-10-26  Release Manager
10280  
10281         * GCC 4.6.2 released.
10282 Index: config/ChangeLog
10283 ===================================================================
10284 --- config/ChangeLog    (.../tags/gcc_4_6_2_release)    (wersja 182550)
10285 +++ config/ChangeLog    (.../branches/gcc-4_6-branch)   (wersja 182550)
10286 @@ -1,3 +1,7 @@
10287 +2011-12-18  Eric Botcazou  <ebotcazou@adacore.com>
10288 +
10289 +       * acx.m4 (Test for GNAT): Update comment and add quotes in final test.
10290 +
10291  2011-10-26  Release Manager
10292  
10293         * GCC 4.6.2 released.
10294 Index: config/acx.m4
10295 ===================================================================
10296 --- config/acx.m4       (.../tags/gcc_4_6_2_release)    (wersja 182550)
10297 +++ config/acx.m4       (.../branches/gcc-4_6-branch)   (wersja 182550)
10298 @@ -356,9 +356,9 @@
10299  ac_c_preproc_warn_flag=yes])# AC_PROG_CPP_WERROR
10300  
10301  # Test for GNAT.
10302 -# We require the gnatbind program, and a compiler driver that
10303 -# understands Ada.  We use the user's CC setting, already found,
10304 -# and possibly add $1 to the command-line parameters.
10305 +# We require the gnatbind & gnatmake programs, as well as a compiler driver
10306 +# that understands Ada.  We use the user's CC setting, already found, and
10307 +# possibly add $1 to the command-line parameters.
10308  #
10309  # Sets the shell variable have_gnat to yes or no as appropriate, and
10310  # substitutes GNATBIND and GNATMAKE.
10311 @@ -387,7 +387,7 @@
10312  fi
10313  rm -f conftest.*])
10314  
10315 -if test x$GNATBIND != xno && test x$GNATMAKE != xno && test x$acx_cv_cc_gcc_supports_ada != xno; then
10316 +if test "x$GNATBIND" != xno && test "x$GNATMAKE" != xno && test x$acx_cv_cc_gcc_supports_ada != xno; then
10317    have_gnat=yes
10318  else
10319    have_gnat=no
10320 Index: libjava/libltdl/configure
10321 ===================================================================
10322 --- libjava/libltdl/configure   (.../tags/gcc_4_6_2_release)    (wersja 182550)
10323 +++ libjava/libltdl/configure   (.../branches/gcc-4_6-branch)   (wersja 182550)
10324 @@ -7355,7 +7355,7 @@
10325        ;;
10326  
10327      # Unfortunately, older versions of FreeBSD 2 do not have this feature.
10328 -    freebsd2*)
10329 +    freebsd2.*)
10330        archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
10331        hardcode_direct=yes
10332        hardcode_minus_L=yes
10333 @@ -7968,7 +7968,7 @@
10334    esac
10335    shlibpath_var=LD_LIBRARY_PATH
10336    case $host_os in
10337 -  freebsd2*)
10338 +  freebsd2.*)
10339      shlibpath_overrides_runpath=yes
10340      ;;
10341    freebsd3.[01]* | freebsdelf3.[01]*)
10342 Index: libjava/libltdl/ChangeLog
10343 ===================================================================
10344 --- libjava/libltdl/ChangeLog   (.../tags/gcc_4_6_2_release)    (wersja 182550)
10345 +++ libjava/libltdl/ChangeLog   (.../branches/gcc-4_6-branch)   (wersja 182550)
10346 @@ -1,3 +1,8 @@
10347 +2011-11-20  Andreas Tobler  <andreast@fgznet.ch>
10348 +
10349 +       * acinclude.m4: Additional FreeBSD 10 fixes.
10350 +       * configure: Regenerate.
10351 +
10352  2011-10-26  Release Manager
10353  
10354         * GCC 4.6.2 released.
10355 Index: libjava/libltdl/acinclude.m4
10356 ===================================================================
10357 --- libjava/libltdl/acinclude.m4        (.../tags/gcc_4_6_2_release)    (wersja 182550)
10358 +++ libjava/libltdl/acinclude.m4        (.../branches/gcc-4_6-branch)   (wersja 182550)
10359 @@ -1377,7 +1377,7 @@
10360    esac
10361    shlibpath_var=LD_LIBRARY_PATH
10362    case $host_os in
10363 -  freebsd2*)
10364 +  freebsd2.*)
10365      shlibpath_overrides_runpath=yes
10366      ;;
10367    freebsd3.[[01]]* | freebsdelf3.[[01]]*)
10368 @@ -3035,7 +3035,7 @@
10369         ;;
10370      esac
10371      ;;
10372 -  freebsd[[12]]*)
10373 +  freebsd2.*)
10374      # C++ shared libraries reported to be fairly broken before switch to ELF
10375      _LT_AC_TAGVAR(ld_shlibs, $1)=no
10376      ;;
10377 @@ -5669,7 +5669,7 @@
10378        ;;
10379  
10380      # Unfortunately, older versions of FreeBSD 2 do not have this feature.
10381 -    freebsd2*)
10382 +    freebsd2.*)
10383        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
10384        _LT_AC_TAGVAR(hardcode_direct, $1)=yes
10385        _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
10386 Index: libjava/configure.ac
10387 ===================================================================
10388 --- libjava/configure.ac        (.../tags/gcc_4_6_2_release)    (wersja 182550)
10389 +++ libjava/configure.ac        (.../branches/gcc-4_6-branch)   (wersja 182550)
10390 @@ -1060,7 +1060,7 @@
10391       *-*-cygwin*)
10392         # Don't set THREADLIBS here.  Cygwin doesn't have -lpthread.
10393         ;;
10394 -     *-*-freebsd[[1234]]*)
10395 +     *-*-freebsd[[34]].*)
10396         # Before FreeBSD 5, it didn't have -lpthread (or any library which
10397         # merely adds pthread_* functions) but it does have a -pthread switch
10398         # which is required at link-time to select -lc_r *instead* of -lc.
10399 Index: libjava/classpath/config.rpath
10400 ===================================================================
10401 --- libjava/classpath/config.rpath      (.../tags/gcc_4_6_2_release)    (wersja 182550)
10402 +++ libjava/classpath/config.rpath      (.../branches/gcc-4_6-branch)   (wersja 182550)
10403 @@ -361,7 +361,7 @@
10404        hardcode_libdir_flag_spec='-R$libdir'
10405        hardcode_direct=yes
10406        ;;
10407 -    freebsd2*)
10408 +    freebsd2.*)
10409        hardcode_direct=yes
10410        hardcode_minus_L=yes
10411        ;;
10412 @@ -533,7 +533,7 @@
10413      ;;
10414    freebsd* | dragonfly*)
10415      case "$host_os" in
10416 -      freebsd[123]*)
10417 +      freebsd[23].*)
10418          library_names_spec='$libname$shrext$versuffix' ;;
10419        *)
10420          library_names_spec='$libname$shrext' ;;
10421 Index: libjava/classpath/configure
10422 ===================================================================
10423 --- libjava/classpath/configure (.../tags/gcc_4_6_2_release)    (wersja 182550)
10424 +++ libjava/classpath/configure (.../branches/gcc-4_6-branch)   (wersja 182550)
10425 @@ -10025,7 +10025,7 @@
10426        ;;
10427  
10428      # Unfortunately, older versions of FreeBSD 2 do not have this feature.
10429 -    freebsd2*)
10430 +    freebsd2.*)
10431        archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
10432        hardcode_direct=yes
10433        hardcode_minus_L=yes
10434 @@ -10941,7 +10941,7 @@
10435      objformat=`/usr/bin/objformat`
10436    else
10437      case $host_os in
10438 -    freebsd[123]*) objformat=aout ;;
10439 +    freebsd[23].*) objformat=aout ;;
10440      *) objformat=elf ;;
10441      esac
10442    fi
10443 @@ -10959,7 +10959,7 @@
10444    esac
10445    shlibpath_var=LD_LIBRARY_PATH
10446    case $host_os in
10447 -  freebsd2*)
10448 +  freebsd2.*)
10449      shlibpath_overrides_runpath=yes
10450      ;;
10451    freebsd3.[01]* | freebsdelf3.[01]*)
10452 @@ -14225,7 +14225,7 @@
10453          esac
10454          ;;
10455  
10456 -      freebsd[12]*)
10457 +      freebsd2.*)
10458          # C++ shared libraries reported to be fairly broken before
10459         # switch to ELF
10460          ld_shlibs_CXX=no
10461 @@ -16000,7 +16000,7 @@
10462      objformat=`/usr/bin/objformat`
10463    else
10464      case $host_os in
10465 -    freebsd[123]*) objformat=aout ;;
10466 +    freebsd[23].*) objformat=aout ;;
10467      *) objformat=elf ;;
10468      esac
10469    fi
10470 @@ -16018,7 +16018,7 @@
10471    esac
10472    shlibpath_var=LD_LIBRARY_PATH
10473    case $host_os in
10474 -  freebsd2*)
10475 +  freebsd2.*)
10476      shlibpath_overrides_runpath=yes
10477      ;;
10478    freebsd3.[01]* | freebsdelf3.[01]*)
10479 Index: libjava/classpath/ChangeLog.gcj
10480 ===================================================================
10481 --- libjava/classpath/ChangeLog.gcj     (.../tags/gcc_4_6_2_release)    (wersja 182550)
10482 +++ libjava/classpath/ChangeLog.gcj     (.../branches/gcc-4_6-branch)   (wersja 182550)
10483 @@ -1,3 +1,9 @@
10484 +2011-11-29  Andreas Tobler  <andreast@fgznet.ch>
10485 +
10486 +       * config.rpath (ld_shlibs): Fix detection of FreeBSD-10 and up.
10487 +       (libname_spec): Likewise.
10488 +       * configure: Regenerate with autoconf -I ../../.
10489 +
10490  2011-02-13  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10491  
10492         * config.rpath, ltcf-c.sh, ltcf-gcj.sh, ltconfig: Remove
10493 Index: libjava/ChangeLog
10494 ===================================================================
10495 --- libjava/ChangeLog   (.../tags/gcc_4_6_2_release)    (wersja 182550)
10496 +++ libjava/ChangeLog   (.../branches/gcc-4_6-branch)   (wersja 182550)
10497 @@ -1,3 +1,16 @@
10498 +2011-11-24  Jakub Jelinek  <jakub@redhat.com>
10499 +
10500 +       PR bootstrap/50888
10501 +       * prims.cc: Don't include ctype.h.
10502 +       (c_isspace): Define.
10503 +       (next_property_key, next_property_value): Use it instead
10504 +       of isspace.
10505 +
10506 +2011-11-20  Andreas Tobler  <andreast@fgznet.ch>
10507 +
10508 +       * configure.ac: Fix FreeBSD 10 detection.
10509 +       * configure: Regenerate.
10510 +
10511  2011-10-26  Release Manager
10512  
10513         * GCC 4.6.2 released.
10514 Index: libjava/prims.cc
10515 ===================================================================
10516 --- libjava/prims.cc    (.../tags/gcc_4_6_2_release)    (wersja 182550)
10517 +++ libjava/prims.cc    (.../branches/gcc-4_6-branch)   (wersja 182550)
10518 @@ -38,7 +38,6 @@
10519  #endif
10520  
10521  #ifndef DISABLE_GETENV_PROPERTIES
10522 -#include <ctype.h>
10523  #include <java-props.h>
10524  #define PROCESS_GCJ_PROPERTIES process_gcj_properties()
10525  #else
10526 @@ -985,6 +984,8 @@
10527  
10528  #ifndef DISABLE_GETENV_PROPERTIES
10529  
10530 +#define c_isspace(c) (memchr (" \t\n\r\v\f", c, 6) != NULL)
10531 +
10532  static char *
10533  next_property_key (char *s, size_t *length)
10534  {
10535 @@ -993,7 +994,7 @@
10536    JvAssert (s);
10537  
10538    // Skip over whitespace
10539 -  while (isspace (*s))
10540 +  while (c_isspace (*s))
10541      s++;
10542  
10543    // If we've reached the end, return NULL.  Also return NULL if for
10544 @@ -1005,7 +1006,7 @@
10545  
10546    // Determine the length of the property key.
10547    while (s[l] != 0
10548 -        && ! isspace (s[l])
10549 +        && ! c_isspace (s[l])
10550          && s[l] != ':'
10551          && s[l] != '=')
10552      {
10553 @@ -1027,19 +1028,19 @@
10554  
10555    JvAssert (s);
10556  
10557 -  while (isspace (*s))
10558 +  while (c_isspace (*s))
10559      s++;
10560  
10561    if (*s == ':'
10562        || *s == '=')
10563      s++;
10564  
10565 -  while (isspace (*s))
10566 +  while (c_isspace (*s))
10567      s++;
10568  
10569    // Determine the length of the property value.
10570    while (s[l] != 0
10571 -        && ! isspace (s[l])
10572 +        && ! c_isspace (s[l])
10573          && s[l] != ':'
10574          && s[l] != '=')
10575      {
10576 Index: libjava/configure
10577 ===================================================================
10578 --- libjava/configure   (.../tags/gcc_4_6_2_release)    (wersja 182550)
10579 +++ libjava/configure   (.../branches/gcc-4_6-branch)   (wersja 182550)
10580 @@ -11560,7 +11560,7 @@
10581        ;;
10582  
10583      # Unfortunately, older versions of FreeBSD 2 do not have this feature.
10584 -    freebsd2*)
10585 +    freebsd2.*)
10586        archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
10587        hardcode_direct=yes
10588        hardcode_minus_L=yes
10589 @@ -12476,7 +12476,7 @@
10590      objformat=`/usr/bin/objformat`
10591    else
10592      case $host_os in
10593 -    freebsd[123]*) objformat=aout ;;
10594 +    freebsd[23].*) objformat=aout ;;
10595      *) objformat=elf ;;
10596      esac
10597    fi
10598 @@ -12494,7 +12494,7 @@
10599    esac
10600    shlibpath_var=LD_LIBRARY_PATH
10601    case $host_os in
10602 -  freebsd2*)
10603 +  freebsd2.*)
10604      shlibpath_overrides_runpath=yes
10605      ;;
10606    freebsd3.[01]* | freebsdelf3.[01]*)
10607 @@ -14384,7 +14384,7 @@
10608          esac
10609          ;;
10610  
10611 -      freebsd[12]*)
10612 +      freebsd2.*)
10613          # C++ shared libraries reported to be fairly broken before
10614         # switch to ELF
10615          ld_shlibs_CXX=no
10616 @@ -16159,7 +16159,7 @@
10617      objformat=`/usr/bin/objformat`
10618    else
10619      case $host_os in
10620 -    freebsd[123]*) objformat=aout ;;
10621 +    freebsd[23].*) objformat=aout ;;
10622      *) objformat=elf ;;
10623      esac
10624    fi
10625 @@ -16177,7 +16177,7 @@
10626    esac
10627    shlibpath_var=LD_LIBRARY_PATH
10628    case $host_os in
10629 -  freebsd2*)
10630 +  freebsd2.*)
10631      shlibpath_overrides_runpath=yes
10632      ;;
10633    freebsd3.[01]* | freebsdelf3.[01]*)
10634 @@ -18520,7 +18520,7 @@
10635        ;;
10636  
10637      # Unfortunately, older versions of FreeBSD 2 do not have this feature.
10638 -    freebsd2*)
10639 +    freebsd2.*)
10640        archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
10641        hardcode_direct_GCJ=yes
10642        hardcode_minus_L_GCJ=yes
10643 @@ -20715,7 +20715,7 @@
10644       *-*-cygwin*)
10645         # Don't set THREADLIBS here.  Cygwin doesn't have -lpthread.
10646         ;;
10647 -     *-*-freebsd[1234]*)
10648 +     *-*-freebsd[34].*)
10649         # Before FreeBSD 5, it didn't have -lpthread (or any library which
10650         # merely adds pthread_* functions) but it does have a -pthread switch
10651         # which is required at link-time to select -lc_r *instead* of -lc.
10652 Index: maintainer-scripts/ChangeLog
10653 ===================================================================
10654 --- maintainer-scripts/ChangeLog        (.../tags/gcc_4_6_2_release)    (wersja 182550)
10655 +++ maintainer-scripts/ChangeLog        (.../branches/gcc-4_6-branch)   (wersja 182550)
10656 @@ -1,3 +1,8 @@
10657 +2011-11-23  Gerald Pfeifer  <gerald@pfeifer.com>
10658 +
10659 +       * update_web_docs_svn: Make $DOCSDIR group writable after
10660 +       creating it.
10661 +
10662  2011-10-26  Release Manager
10663  
10664         * GCC 4.6.2 released.
10665 Index: maintainer-scripts/update_web_docs_svn
10666 ===================================================================
10667 --- maintainer-scripts/update_web_docs_svn      (.../tags/gcc_4_6_2_release)    (wersja 182550)
10668 +++ maintainer-scripts/update_web_docs_svn      (.../branches/gcc-4_6-branch)   (wersja 182550)
10669 @@ -93,6 +93,7 @@
10670  
10671  if [ ! -d $DOCSDIR ]; then
10672    mkdir $DOCSDIR
10673 +  chmod g+w $DOCSDIR
10674  fi
10675  
10676  if [ -z "$RELEASE" ]; then
This page took 1.211335 seconds and 3 git commands to generate.