]> git.pld-linux.org Git - packages/gcc.git/blame - gcc-branch.diff
- binutils epoch update to really satisfy 2.17.50.0.9
[packages/gcc.git] / gcc-branch.diff
CommitLineData
2e34247b
AM
1Index: configure
2===================================================================
a966c5b5
AM
3--- configure (.../tags/gcc_4_6_2_release) (wersja 182722)
4+++ configure (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
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 ;;
25Index: libgcc/config.host
26===================================================================
a966c5b5
AM
27--- libgcc/config.host (.../tags/gcc_4_6_2_release) (wersja 182722)
28+++ libgcc/config.host (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
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
45Index: libgcc/generic-morestack.c
46===================================================================
a966c5b5
AM
47--- libgcc/generic-morestack.c (.../tags/gcc_4_6_2_release) (wersja 182722)
48+++ libgcc/generic-morestack.c (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
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. */
60Index: libgcc/ChangeLog
61===================================================================
a966c5b5
AM
62--- libgcc/ChangeLog (.../tags/gcc_4_6_2_release) (wersja 182722)
63+++ libgcc/ChangeLog (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
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.
81Index: libtool.m4
82===================================================================
a966c5b5
AM
83--- libtool.m4 (.../tags/gcc_4_6_2_release) (wersja 182722)
84+++ libtool.m4 (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
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
121Index: libgomp/configure
122===================================================================
a966c5b5
AM
123--- libgomp/configure (.../tags/gcc_4_6_2_release) (wersja 182722)
124+++ libgomp/configure (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
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]*)
179Index: libgomp/ChangeLog
180===================================================================
a966c5b5
AM
181--- libgomp/ChangeLog (.../tags/gcc_4_6_2_release) (wersja 182722)
182+++ libgomp/ChangeLog (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
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.
191Index: libquadmath/configure
192===================================================================
a966c5b5
AM
193--- libquadmath/configure (.../tags/gcc_4_6_2_release) (wersja 182722)
194+++ libquadmath/configure (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
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]*)
222Index: libquadmath/ChangeLog
223===================================================================
a966c5b5
AM
224--- libquadmath/ChangeLog (.../tags/gcc_4_6_2_release) (wersja 182722)
225+++ libquadmath/ChangeLog (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
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.
6f35b5e4
AM
234Index: gcc/c-family/ChangeLog
235===================================================================
a966c5b5
AM
236--- gcc/c-family/ChangeLog (.../tags/gcc_4_6_2_release) (wersja 182722)
237+++ gcc/c-family/ChangeLog (.../branches/gcc-4_6-branch) (wersja 182722)
6f35b5e4
AM
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.
254Index: gcc/c-family/c-common.c
255===================================================================
a966c5b5
AM
256--- gcc/c-family/c-common.c (.../tags/gcc_4_6_2_release) (wersja 182722)
257+++ gcc/c-family/c-common.c (.../branches/gcc-4_6-branch) (wersja 182722)
6f35b5e4
AM
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
378Index: gcc/c-family/c-common.h
379===================================================================
a966c5b5
AM
380--- gcc/c-family/c-common.h (.../tags/gcc_4_6_2_release) (wersja 182722)
381+++ gcc/c-family/c-common.h (.../branches/gcc-4_6-branch) (wersja 182722)
6f35b5e4
AM
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
7700e675
AM
392Index: gcc/DATESTAMP
393===================================================================
a966c5b5
AM
394--- gcc/DATESTAMP (.../tags/gcc_4_6_2_release) (wersja 182722)
395+++ gcc/DATESTAMP (.../branches/gcc-4_6-branch) (wersja 182722)
7700e675 396@@ -1 +1 @@
31c681d2 397-20111026
a966c5b5 398+20111229
2e34247b
AM
399Index: gcc/configure
400===================================================================
a966c5b5
AM
401--- gcc/configure (.../tags/gcc_4_6_2_release) (wersja 182722)
402+++ gcc/configure (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
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]*)
494Index: gcc/objc/objc-next-runtime-abi-01.c
495===================================================================
a966c5b5
AM
496--- gcc/objc/objc-next-runtime-abi-01.c (.../tags/gcc_4_6_2_release) (wersja 182722)
497+++ gcc/objc/objc-next-runtime-abi-01.c (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
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
515Index: gcc/objc/objc-act.c
516===================================================================
a966c5b5
AM
517--- gcc/objc/objc-act.c (.../tags/gcc_4_6_2_release) (wersja 182722)
518+++ gcc/objc/objc-act.c (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
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
531Index: gcc/objc/ChangeLog
532===================================================================
a966c5b5
AM
533--- gcc/objc/ChangeLog (.../tags/gcc_4_6_2_release) (wersja 182722)
534+++ gcc/objc/ChangeLog (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
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.
554Index: gcc/reorg.c
555===================================================================
a966c5b5
AM
556--- gcc/reorg.c (.../tags/gcc_4_6_2_release) (wersja 182722)
557+++ gcc/reorg.c (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
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
cd666b14 571Index: gcc/DEV-PHASE
5052c277 572===================================================================
a966c5b5
AM
573--- gcc/DEV-PHASE (.../tags/gcc_4_6_2_release) (wersja 182722)
574+++ gcc/DEV-PHASE (.../branches/gcc-4_6-branch) (wersja 182722)
cd666b14
AM
575@@ -0,0 +1 @@
576+prerelease
577Index: gcc/ChangeLog
ef2100e1 578===================================================================
a966c5b5
AM
579--- gcc/ChangeLog (.../tags/gcc_4_6_2_release) (wersja 182722)
580+++ gcc/ChangeLog (.../branches/gcc-4_6-branch) (wersja 182722)
581@@ -1,3 +1,437 @@
582+2011-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
583+
584+ Backport from mainline
585+ 2011-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
586+
587+ PR target/51623
588+ * config/rs6000/rs6000.c (rs6000_assemble_integer): Don't call
589+ unlikely_text_section_p. Instead check for being in a code
590+ section.
591+
592+2011-12-23 Richard Guenther <rguenther@suse.de>
593+
594+ PR rtl-optimization/50396
595+ * simplify-rtx.c (simplify_binary_operation_1): Properly
596+ guard code that only works for integers.
597+
598+2011-12-22 Doug Kwan <dougkwan@google.com>
599+
600+ Backport from mainline
601+ 2011-03-23 Julian Brown <julian@codesourcery.com>
602+
603+ * expr.c (expand_expr_real_1): Only use BLKmode for volatile
604+ accesses which are not naturally aligned.
605+
606+ 2011-11-20 Joey Ye <joey.ye@arm.com>
607+
608+ * expr.c (expand_expr_real_1): Correctly handle strict volatile
609+ bitfield loads smaller than mode size.
610+
611+2011-12-21 Richard Earnshaw <rearnsha@arm.com>
612+
613+ PR target/51643
614+ * arm.c (arm_function_ok_for_sibcall): Use DECL_WEAK in previous
615+ change.
616+
617+2011-12-21 Richard Earnshaw <rearnsha@arm.com>
618+
619+ PR target/51643
620+ * arm.c (arm_function_ok_for_sibcall): Don't try to tailcall a
621+ weak function on bare-metal EABI targets.
622+
623+2011-12-21 Uros Bizjak <ubizjak@gmail.com>
624+
625+ Backport from mainline
626+ 2011-12-21 Richard Guenther <rguenther@suse.de>
627+
628+ PR lto/41159
629+ * tree-outof-ssa.c (insert_value_copy_on_edge): Use the
630+ mode of the pseudo as destination mode. Only assert that
631+ is equal to the promoted mode of the decl if it is a REG.
632+
633+2011-12-21 Uros Bizjak <ubizjak@gmail.com>
634+
635+ * config/alpha/linux-unwind.h: Update copyright years.
636+ (MD_FROB_UPDATE_CONTEXT): New define.
637+ (alpha_frob_update_context): New function.
638+
2e34247b
AM
639+2011-12-19 Martin Jambor <mjambor@suse.cz>
640+
641+ PR tree-optimization/51583
642+ * tree-sra.c (load_assign_lhs_subreplacements): Call
643+ force_gimple_operand_gsi when necessary also in case of no
644+ corresponding replacement on the RHS.
645+
646+2011-12-16 Eric Botcazou <ebotcazou@adacore.com>
647+
648+ * config/sparc/sparc.md (UNSPEC_FRAME_BLOCKAGE): New constant.
649+ (frame_blockage): New expander.
650+ (frame_blockage<P:mode>): New instruction.
651+ * config/sparc/sparc.c (sparc_expand_prologue): When the sequence of
652+ instructions establishing the frame isn't atomic, emit frame blockage.
653+
654+2011-12-15 H.J. Lu <hongjiu.lu@intel.com>
655+
656+ Backport from mainline.
657+ 2011-10-28 Chung-Lin Tang <cltang@codesourcery.com>
658+
659+ PR rtl-optimization/49720
660+ * simplify-rtx.c (simplify_relational_operation_1): Detect
661+ infinite recursion condition in "(eq/ne (plus x cst1) cst2)
662+ simplifies to (eq/ne x (cst2 - cst1))" case.
663+
664+2011-12-15 Andreas Tobler <andreast@fgznet.ch>
665+
666+ Backport from mainline.
667+ 2011-12-15 Andreas Tobler <andreast@fgznet.ch>
668+
669+ * config/i386/freebsd.h (TARGET_ASM_FILE_END): Define.
670+
671+2011-12-13 Eric Botcazou <ebotcazou@adacore.com>
672+
673+ * lto-streamer-out.c (write_symbol): Use proper 64-bit host type.
674+ * lto-cgraph.c (input_cgraph_opt_section): Use 'int' for offsets.
675+ * lto-streamer-in.c (lto_read_body): Likewise.
676+ (lto_input_toplevel_asms): Likewise.
677+ * lto-section-in.c (lto_create_simple_input_block): Likewise.
678+ * lto-opts.c (lto_read_file_options): Likewise.
679+ * ipa-prop.c (ipa_prop_read_section): Likewise.
680+
681+ * df.h (DF_NOTE): Fix typo in comment.
682+
683+2011-12-13 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
684+
685+ * regmove.c (fixup_match_2): Only access call_used_regs with hard
686+ regs.
687+
688+2011-12-12 Jakub Jelinek <jakub@redhat.com>
689+
690+ PR middle-end/51510
691+ * calls.c (internal_arg_pointer_based_exp_scan): Don't use
692+ VEC_safe_grow_cleared if idx is smaller than VEC_length.
693+
694+ Backported from mainline
695+ 2011-12-11 Jakub Jelinek <jakub@redhat.com>
696+
697+ PR tree-optimization/51485
698+ * tree-vect-data-refs.c (vect_analyze_data_refs): Give up on
699+ DRs in call stmts.
700+
701+2011-12-12 Eric Botcazou <ebotcazou@adacore.com>
702+
703+ PR tree-optimization/50569
704+ * tree-sra.c (build_ref_for_model): Replicate a chain of COMPONENT_REFs
705+ in the expression of MODEL instead of just the last one.
706+
707+2011-12-09 Michael Meissner <meissner@the-meissners.org>
708+
709+ Backport from mainline
710+ 2011-12-09 Michael Meissner <meissner@the-meissners.org>
711+
712+ PR rtl-optimization/51469
713+ * varasm.c (default_binds_local_p_1): If the symbol is a gnu
714+ indirect function, mark the symbol as non-local.
715+
716+2011-12-09 Jakub Jelinek <jakub@redhat.com>
717+
718+ Backport from mainline
719+ 2011-12-08 Jakub Jelinek <jakub@redhat.com>
720+
721+ PR tree-optimization/51466
722+ * tree-ssa-forwprop.c (forward_propagate_addr_expr_1): Also copy
723+ TREE_SIDE_EFFECTS.
724+
725+ 2011-11-28 Jakub Jelinek <jakub@redhat.com>
726+
727+ PR tree-optimization/50078
728+ * tree-ssa-forwprop.c (forward_propagate_addr_expr_1): Copy over
729+ TREE_THIS_VOLATILE also from the old to new lhs resp. rhs.
730+
731+2011-12-09 Kazu Hirata <kazu@codesourcery.com>
732+
733+ Backport from mainline:
734+
735+ 2011-12-05 Kazu Hirata <kazu@codesourcery.com>
736+
737+ PR target/51408
738+ * config/arm/arm.md (*minmax_arithsi): Always require the else
739+ clause in the MINUS case.
740+
741+2011-12-08 Teresa Johnson <tejohnson@google.com>
742+
743+ Backport from mainline:
744+
745+ 2011-08-05 Uros Bizjak <ubizjak@gmail.com>
746+
747+ * config/i386/i386.md (*movdi_internal_rex64): Use "!o" constraint
748+ instead of "!m" for operand 0, alternative 4.
749+ (*movdf_internal_rex64): Ditto for operand 0, alernative 6.
750+
751+2011-12-08 Jakub Jelinek <jakub@redhat.com>
752+
753+ Backport from mainline
754+ 2011-12-05 Jakub Jelinek <jakub@redhat.com>
755+
756+ PR debug/51410
757+ * c-decl.c (pop_scope): Don't add DECL_EXTERNAL decls
758+ for debug info if scope is file_scope.
759+
760+ PR c/51339
761+ * c-decl.c (c_finish_incomplete_decl, finish_decl): Call
762+ relayout_decl instead of layout_decl.
763+
764+ 2011-12-05 Jakub Jelinek <jakub@redhat.com>
765+ Eric Botcazou <ebotcazou@adacore.com>
766+
767+ PR middle-end/51323
768+ PR middle-end/50074
769+ * calls.c (internal_arg_pointer_exp_state): New variable.
770+ (internal_arg_pointer_based_exp_1,
771+ internal_arg_pointer_exp_scan): New functions.
772+ (internal_arg_pointer_based_exp): New function.
773+ (mem_overlaps_already_clobbered_arg_p): Use it.
774+ (expand_call): Free internal_arg_pointer_exp_state.cache vector
775+ and clear internal_arg_pointer_exp_state.scan_start.
776+
777+ 2011-11-30 Jakub Jelinek <jakub@redhat.com>
778+
779+ PR rtl-optimization/48721
780+ * sched-deps.c (sched_analyze_insn): For SIBLING_CALL_P set
781+ reg_pending_barrier to TRUE_BARRIER.
782+
783+ 2011-11-26 Joern Rennecke <joern.rennecke@embecosm.com>
784+
785+ PR middle-end/50074
786+ * calls.c (mem_overlaps_already_clobbered_arg_p):
787+ Return false if no outgoing arguments have been stored so far.
788+
789+2011-12-08 Eric Botcazou <ebotcazou@adacore.com>
790+
791+ PR tree-optimization/51315
792+ * tree-sra.c (tree_non_mode_aligned_mem_p): Rename to...
793+ (tree_non_aligned_mem_p): ...this. Add ALIGN parameter. Look into
794+ MEM_REFs and use get_object_or_type_alignment for them.
795+ (build_accesses_from_assign): Adjust for above change.
796+ (access_precludes_ipa_sra_p): Likewise.
797+
798+2011-12-06 Martin Jambor <mjambor@suse.cz>
799+
800+ Backport from mainline:
801+
802+ 2011-12-02 Martin Jambor <mjambor@suse.cz>
803+
804+ PR tree-optimization/50622
805+ * tree-sra.c (load_assign_lhs_subreplacements): Force gimple operand
806+ if both lacc and racc are grp_partial_lhs.
807+
808+2011-12-06 Iain Sandoe <iains@gcc.gnu.org>
809+
810+ * config/rs6000/rs6000.c (darwin_rs6000_override_options): Initialize
811+ rs6000_current_abi.
812+
813+2011-12-06 Alan Modra <amodra@gmail.com>
814+
815+ PR target/50906
816+ * config/rs6000/rs6000.c (rs6000_emit_prologue <TARGET_SPE_ABI>):
817+ Do not mark r11 setup as frame-related. Pass correct offset to
818+ rs6000_emit_savres_rtx. Correct out-of-line rs6000_frame_related
819+ arguments. Correct sp_offset. Remove "offset" fudge from
820+ in-line rs6000_frame_related call. Rename misleading variable.
821+ Fix comments and whitespace. Tidy some expressions.
822+ (rs6000_emit_epilogue <TARGET_SPE_ABI>): Always set frame_reg_rtx
823+ to r11 in out-of-line case. Correct sp_offset. Pass correct
824+ offset to rs6000_emit_savres_rtx. Rename misleading variable.
825+ Fix comments and whitespace. Tidy some expressions.
826+ (rs6000_emit_epilogue <non-TARGET_SPE_ABI>): Add sp_offset
827+ adjustment when !saving_GPRs_inline. Correct register mode
828+ used in address calcs.
829+ (rs6000_emit_epilogue <non-TARGET_SPE_ABI>): Similarly when
830+ !restoring_GPRs_inline.
831+
832+2011-12-04 Jérémie Detrey <Jeremie.Detrey@loria.fr>
833+
834+ PR target/51393
835+ * config/i386/avxintrin.h (_mm256_insert_epi64): Declare second
836+ parameter as long long.
837+
838+2011-12-02 Georg-Johann Lay <avr@gjlay.de>
839+
840+ PR target/51002
841+ PR target/51345
842+ * config/avr/libgcc.S (__prologue_saves__, __epilogue_restores__):
843+ Enclose parts using __SP_H__ in !defined (__AVR_HAVE_8BIT_SP__).
844+ Add FIXME comments.
845+ * config/avr/avr.md (movhi_sp_r_irq_off, movhi_sp_r_irq_on): Set
846+ insn condition to !AVR_HAVE_8BIT_SP.
847+ * config/avr/avr.c (output_movhi): "clr%B0" instead of "in
848+ %B0,__SP_H__" if AVR_HAVE_8BIT_SP.
849+ (avr_file_start): Only print "__SP_H__ = 0x3e" if !AVR_HAVE_8BIT_SP.
850+ * config/avr/avr-devices.c (avr_mcu_types): ATtiny4313 and
851+ AT86RF401 have a 16-bit SP (their manual is bogus).
852+
853+2011-11-25 Richard Sandiford <richard.sandiford@linaro.org>
854+
855+ Backport from mainline:
856+
857+ 2011-03-29 Richard Sandiford <richard.sandiford@linaro.org>
858+
859+ PR debug/48190
860+ * dwarf2out.c (dw_loc_list_node): Add resolved_addr and replaced.
861+ (cached_dw_loc_list_def): New structure.
862+ (cached_dw_loc_list): New typedef.
863+ (cached_dw_loc_list_table): New variable.
864+ (cached_dw_loc_list_table_hash): New function.
865+ (cached_dw_loc_list_table_eq): Likewise.
866+ (add_location_or_const_value_attribute): Take a bool cache_p.
867+ Cache the list when the parameter is true.
868+ (gen_formal_parameter_die): Update caller.
869+ (gen_variable_die): Likewise.
870+ (dwarf2out_finish): Likewise.
871+ (dwarf2out_abstract_function): Nullify cached_dw_loc_list_table
872+ while generating debug info for the decl.
873+ (dwarf2out_function_decl): Clear cached_dw_loc_list_table.
874+ (dwarf2out_init): Initialize cached_dw_loc_list_table.
875+ (resolve_addr): Cache the result of resolving a chain of
876+ location lists.
877+
878+2011-11-24 Enkovich Ilya <ilya.enkovich@intel.com>
879+
880+ PR target/51287
881+ * i386.c (distance_non_agu_define): Fix insn attr check.
882+
883+2011-11-20 Andreas Tobler <andreast@fgznet.ch>
884+
885+ * configure: Regenerate.
886+
887+2011-11-19 Eric Botcazou <ebotcazou@adacore.com>
888+
889+ PR rtl-optimization/51187
890+ * reorg.c (relax_delay_slots): Do not consider a jump useless if there
891+ is a barrier between the jump and its target label.
892+
893+2011-11-19 Richard Earnshaw <rearnsha@arm.com>
894+
895+ PR target/50493
896+ * config/arm/arm.c (neon_disambiguate_copy): Correctly handle partial
897+ overlap of src and dest operands.
898+
899+2011-11-18 Iain Sandoe <iains@gcc.gnu.org>
900+
901+ PR target/49992
902+ * configure.ac: Remove ranlib special-casing for Darwin.
903+ * configure: Regenerate.
904+
905+2011-11-16 Richard Earnshaw <rearnsha@arm.com>
906+ Bernd Schmidt <bernds@coudesourcery.com>
907+ Sebastian Huber <sebastian.huber@embedded-brains.de>
908+
909+ PR target/49641
910+ * config/arm/arm.c (store_multiple_sequence): Avoid cases where
911+ the base reg is stored iff compiling for Thumb1.
912+
913+2011-11-13 Iain Sandoe <iains@gcc.gnu.org>
914+
915+ PR target/48108
916+ Backport from mainline r180523
917+ * config/darwin.c (top level): Amend comments concerning LTO output.
918+ (lto_section_num): New variable. (darwin_lto_section_e): New GTY.
919+ (LTO_SECTS_SECTION, LTO_INDEX_SECTION): New.
920+ (LTO_NAMES_SECTION): Rename.
921+ (darwin_asm_named_section): Record LTO section counts and switches
922+ in a vec of darwin_lto_section_e.
923+ (darwin_file_start): Remove unused code.
924+ (darwin_file_end): Put an LTO section termination label. Handle
925+ output of the wrapped LTO sections, index and names table.
926+
927+2011-11-12 Iain Sandoe <iains@gcc.gnu.org>
928+
929+ PR target/45233
930+ * config/rs6000/rs6000.c (rs6000_legitimize_reload_address):
931+ Only expand a symbol ref. into an access when the entity is defined
932+ in the TU.
933+
6f35b5e4
AM
934+2011-11-10 Jakub Jelinek <jakub@redhat.com>
935+
936+ PR middle-end/51077
937+ * tree-object-size.c (addr_object_size): Check TREE_CODE of
938+ MEM_REF's operand rather than code of the MEM_REF itself.
939+
940+2011-11-07 Alan Modra <amodra@gmail.com>
941+
942+ PR target/30282
943+ * config/rs6000/rs6000.c (rs6000_emit_stack_reset): Always emit
944+ blockage for ABI_V4.
945+
946+2011-11-04 Eric Botcazou <ebotcazou@adacore.com>
947+
948+ PR c++/50608
949+ * c-parser.c (c_parser_postfix_expression) <RID_OFFSETOF>: Adjust call
950+ to fold_offsetof.
951+ * c-typeck.c (build_unary_op) <ADDR_EXPR>: Call fold_offsetof_1.
952+
953+2011-11-04 Eric Botcazou <ebotcazou@adacore.com>
954+
955+ PR target/50979
956+ * config/sparc/sparc.h (ASM_CPU_SPEC): Pass -Av8 if -mcpu=v8.
957+
958+2011-11-03 Uros Bizjak <ubizjak@gmail.com>
959+
960+ * config/i386/i386.md (lround<X87MODEF:mode><SWI248x:mode>2,
961+ rint<mode>2, floor<mode>2, lfloor<MODEF:mode><SWI48:mode>2,
962+ btrunc<mode>2, lwp_lwpval<mode>3): Use operands[N] instead of operandN.
963+
964+2011-11-02 Eric Botcazou <ebotcazou@adacore.com>
965+
966+ PR target/50945
967+ * config/sparc/sparc.md (movsf_insn): Reindent constraints.
968+ (movsf_insn_no_fpu): Likewise.
969+ (movdf_insn_sp32): Likewise.
970+ (movdf_insn_sp32_no_fpu): Likewise.
971+ (movdf_insn_sp32_v9): Likewise. Remove redundant GY constraint.
972+ (movdf_insn_sp32_v9_no_fpu): Likewise.
973+ (movdf_insn_sp64): Likewise.
974+ (movdf_insn_sp64_no_fpu): Likewise.
975+ (movtf_insn_sp32): Likewise.
976+ (movtf_insn_sp32_no_fpu): Likewise.
977+ (movtf_insn_sp64): Likewise.
978+ (movtf_insn_sp64_hq): Likewise.
979+ (movtf_insn_sp64_no_fpu): Likewise.
980+
981+2011-11-02 Bernd Schmidt <bernds@codesourcery.com>
982+
983+ * cfgcleanup.c (try_head_merge_bb): If get_condition returns
984+ NULL for a jump that is a cc0 insn, pick the previous insn for
985+ move_before.
986+
987+2011-11-01 Uros Bizjak <ubizjak@gmail.com>
988+
989+ * config/i386/i386.md (splitters for int-float conversion): Use
990+ SUBREG_REG on SUBREGs in splitter constraints.
991+
992+2011-11-01 Julian Brown <julian@codesourcery.com>
993+
994+ PR rtl-optimization/47918
995+ * reload1.c (set_initial_label_offsets): Use initial offsets
996+ for labels on the nonlocal_goto_handler_labels chain.
997+
998+2011-10-29 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
999+
1000+ PR target/50691
1001+ * config/pa/pa.c (emit_move_sequence): Legitimize TLS symbol references.
1002+ * config/pa/pa.h (LEGITIMATE_CONSTANT_P): Return false for
1003+ TLS_MODEL_GLOBAL_DYNAMIC and TLS_MODEL_LOCAL_DYNAMIC symbol references.
1004+
1005+2011-10-27 Uros Bizjak <ubizjak@gmail.com>
1006+
1007+ PR target/50875
1008+ * config/i386/sse.md (*avx_unpcklpd256): Remove extra insn
1009+ constraints. Change alternative 1 to "x,m,1".
1010+
31c681d2 1011+2011-10-26 Jakub Jelinek <jakub@redhat.com>
0c81a74a 1012+
31c681d2 1013+ * BASE-VER: Set to 4.6.3.
cd666b14 1014+ * DEV-PHASE: Set to prerelease.
1fc08f06 1015+
31c681d2 1016 2011-10-26 Release Manager
0c81a74a 1017
31c681d2 1018 * GCC 4.6.2 released.
a966c5b5 1019@@ -144,8 +578,8 @@
6f35b5e4
AM
1020
1021 2011-10-07 Bernd Schmidt <bernds@codesourcery.com>
1022
1023- PR target/49049
1024- * config/arm/arm.md (arm_subsi3_insn): Lose the last alternative.
1025+ PR target/49049
1026+ * config/arm/arm.md (arm_subsi3_insn): Lose the last alternative.
1027
1028 2011-10-06 Jakub Jelinek <jakub@redhat.com>
1029
a966c5b5 1030@@ -252,7 +686,7 @@
2e34247b
AM
1031 * config/rs6000/rs6000.md (probe_stack): Use explicit operand.
1032 * config/rs6000/rs6000.c (output_probe_stack_range): Likewise.
1033
1034-2011-09-14 Diego Novillo <dnovillo@google.com>
1035+2011-09-14 Diego Novillo <dnovillo@google.com>
1036
1037 * tree-vect-stmts.c (vect_transform_stmt): Remove unused
1038 local variable ORIG_SCALAR_STMT.
1039Index: gcc/testsuite/gcc.target/arm/pr49641.c
1040===================================================================
1041--- gcc/testsuite/gcc.target/arm/pr49641.c (.../tags/gcc_4_6_2_release) (wersja 0)
a966c5b5 1042+++ gcc/testsuite/gcc.target/arm/pr49641.c (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
1043@@ -0,0 +1,18 @@
1044+/* { dg-do compile } */
1045+/* { dg-options "-mthumb -O2" } */
1046+/* { dg-require-effective-target arm_thumb1_ok } */
1047+/* { dg-final { scan-assembler-not "stmia\[\\t \]*r3!\[^\\n]*r3" } } */
1048+typedef struct {
1049+ void *t1, *t2, *t3;
1050+} z;
1051+extern volatile int y;
1052+static inline void foo(z *x) {
1053+ x->t1 = &x->t2;
1054+ x->t2 = ((void *)0);
1055+ x->t3 = &x->t1;
1056+}
1057+extern z v;
1058+void bar (void) {
1059+ y = 0;
1060+ foo(&v);
1061+}
a966c5b5
AM
1062Index: gcc/testsuite/gcc.target/arm/sibcall-2.c
1063===================================================================
1064--- gcc/testsuite/gcc.target/arm/sibcall-2.c (.../tags/gcc_4_6_2_release) (wersja 0)
1065+++ gcc/testsuite/gcc.target/arm/sibcall-2.c (.../branches/gcc-4_6-branch) (wersja 182722)
1066@@ -0,0 +1,12 @@
1067+/* { dg-require-effective-target arm_eabi } */
1068+/* { dg-do compile } */
1069+/* { dg-options "-O2 -mabi=aapcs" } */
1070+
1071+
1072+extern void __attribute__((weak)) wfunc(void);
1073+void main(void)
1074+{
1075+ wfunc(); /* Must not tail-call. */
1076+}
1077+
1078+/* { dg-final { scan-assembler-not "b\[\\t \]+wfunc" } } */
1079Index: gcc/testsuite/gcc.target/powerpc/pr51623.c
1080===================================================================
1081--- gcc/testsuite/gcc.target/powerpc/pr51623.c (.../tags/gcc_4_6_2_release) (wersja 0)
1082+++ gcc/testsuite/gcc.target/powerpc/pr51623.c (.../branches/gcc-4_6-branch) (wersja 182722)
1083@@ -0,0 +1,123 @@
1084+/* PR target/51623 */
1085+/* { dg-do compile { target { { powerpc*-*-linux* && ilp32 } || { powerpc-*-eabi* } } } } */
1086+/* { dg-options "-mrelocatable -ffreestanding" } */
1087+
1088+/* This generated an error, since the compiler was calling
1089+ unlikely_text_section_p in a context where it wasn't valid. */
1090+
1091+typedef long long loff_t;
1092+typedef unsigned size_t;
1093+
1094+
1095+struct mtd_info {
1096+ unsigned writesize;
1097+ unsigned oobsize;
1098+ const char *name;
1099+};
1100+
1101+extern int strcmp(const char *,const char *);
1102+extern char * strchr(const char *,int);
1103+
1104+struct cmd_tbl_s {
1105+ char *name;
1106+};
1107+
1108+
1109+int printf(const char *fmt, ...) __attribute__ ((format (__printf__, 1, 2)));
1110+void* malloc(size_t);
1111+void free(void*);
1112+
1113+
1114+extern int nand_curr_device;
1115+extern struct mtd_info nand_info[];
1116+
1117+static int nand_dump(struct mtd_info *nand, unsigned long off, int only_oob)
1118+{
1119+ int i;
1120+ unsigned char *datbuf, *oobbuf, *p;
1121+
1122+ datbuf = malloc(nand->writesize + nand->oobsize);
1123+ oobbuf = malloc(nand->oobsize);
1124+ off &= ~(nand->writesize - 1);
1125+
1126+ printf("Page %08lx dump:\n", off);
1127+ i = nand->writesize >> 4;
1128+ p = datbuf;
1129+
1130+ while (i--) {
1131+ if (!only_oob)
1132+ printf("\t%02x %02x %02x %02x %02x %02x %02x %02x"
1133+ " %02x %02x %02x %02x %02x %02x %02x %02x\n",
1134+ p[0], p[1], p[2], p[3], p[4], p[5], p[6], p[7],
1135+ p[8], p[9], p[10], p[11], p[12], p[13], p[14],
1136+ p[15]);
1137+ p += 16;
1138+ }
1139+
1140+ i = nand->oobsize >> 3;
1141+ free(datbuf);
1142+ free(oobbuf);
1143+
1144+ return 0;
1145+}
1146+
1147+int do_nand(struct cmd_tbl_s * cmdtp, int flag, int argc, char *argv[])
1148+{
1149+ int dev;
1150+ unsigned long off;
1151+ char *cmd, *s;
1152+ struct mtd_info *nand;
1153+
1154+ if (argc < 2)
1155+ goto usage;
1156+
1157+ cmd = argv[1];
1158+
1159+ if (strcmp(cmd, "info") == 0) {
1160+ putc('\n');
1161+ return 0;
1162+ }
1163+
1164+ if (strcmp(cmd, "device") == 0) {
1165+ if (argc < 3) {
1166+ putc('\n');
1167+ }
1168+ dev = (int)simple_strtoul(argv[2], ((void *)0), 10);
1169+ nand_curr_device = dev;
1170+ return 0;
1171+ }
1172+
1173+ if (strcmp(cmd, "bad") != 0 && strcmp(cmd, "erase") != 0 )
1174+ goto usage;
1175+
1176+ if (nand_curr_device < 0 ) {
1177+ return 1;
1178+ }
1179+ nand = &nand_info[nand_curr_device];
1180+
1181+ if (strcmp(cmd, "erase") == 0 || strcmp(cmd, "scrub") == 0) {
1182+ int clean = argc > 2 && !strcmp("clean", argv[2]);
1183+ int scrub = !strcmp(cmd, "scrub");
1184+ return 0;
1185+ }
1186+
1187+ if (strncmp(cmd, "dump", 4) == 0) {
1188+ if (argc < 3)
1189+ goto usage;
1190+
1191+ s = strchr(cmd, '.');
1192+ off = (int)simple_strtoul(argv[2], ((void *)0), 16);
1193+
1194+ if (s != ((void *)0) && strcmp(s, ".oob") == 0)
1195+ nand_dump(nand, off, 1);
1196+ else
1197+ nand_dump(nand, off, 0);
1198+
1199+ return 0;
1200+ }
1201+usage:
1202+ cmd_usage(cmdtp);
1203+ return 1;
1204+}
1205+
1206+void *ptr = do_nand;
2e34247b
AM
1207Index: gcc/testsuite/gcc.target/i386/pr51393.c
1208===================================================================
1209--- gcc/testsuite/gcc.target/i386/pr51393.c (.../tags/gcc_4_6_2_release) (wersja 0)
a966c5b5 1210+++ gcc/testsuite/gcc.target/i386/pr51393.c (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
1211@@ -0,0 +1,22 @@
1212+/* { dg-do run } */
1213+/* { dg-require-effective-target avx } */
1214+/* { dg-require-effective-target lp64 } */
1215+/* { dg-options "-O -mavx" } */
1216+
1217+#include "avx-check.h"
1218+#include <immintrin.h>
1219+
1220+static void
1221+__attribute__((noinline))
1222+avx_test (void)
1223+{
1224+ long long in = 0x800000000ll;
1225+ long long out;
1226+
1227+ __m256i zero = _mm256_setzero_si256();
1228+ __m256i tmp = _mm256_insert_epi64 (zero, in, 0);
1229+ out = _mm256_extract_epi64(tmp, 0);
1230+
1231+ if (in != out)
1232+ abort ();
1233+}
1234Index: gcc/testsuite/gcc.target/i386/pr48721.c
1235===================================================================
1236--- gcc/testsuite/gcc.target/i386/pr48721.c (.../tags/gcc_4_6_2_release) (wersja 0)
a966c5b5 1237+++ gcc/testsuite/gcc.target/i386/pr48721.c (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
1238@@ -0,0 +1,51 @@
1239+/* PR rtl-optimization/48721 */
1240+/* { dg-do compile } */
1241+/* { dg-options "-O -foptimize-sibling-calls -fsched2-use-superblocks -fschedule-insns2 -mtune=core2" } */
1242+
1243+extern unsigned char a[];
1244+extern int b[], d[], e[], f[], g[], *h[], m[], *n[], o[];
1245+extern char c[];
1246+
1247+struct S
1248+{
1249+ unsigned char s1;
1250+ int s2, s3, s4, s5, s6, s7, s8;
1251+};
1252+
1253+__attribute__((noinline, noclone)) int
1254+foo (int x)
1255+{
1256+ return 0;
1257+}
1258+
1259+int
1260+bar (int x, struct S *y)
1261+{
1262+ int z;
1263+ switch (x)
1264+ {
1265+ case 1:
1266+ case 2:
1267+ {
1268+ int t2, t4, t5, t6, t7, t8;
1269+ z = o[y->s8 * 6];
1270+ t8 = *n[m[x] * 5];
1271+ t4 = *h[y->s7];
1272+ t7 = z;
1273+ z = g[f[x] + y->s6];
1274+ t6 = e[y->s5];
1275+ t5 = d[c[x] + y->s3 * 17];
1276+ if (z)
1277+ t2 = b[z];
1278+ if (a[z] != y->s1)
1279+ return foo (x);
1280+ y->s8 = t8;
1281+ y->s4 = t4;
1282+ y->s7 = t7;
1283+ y->s6 = t6;
1284+ y->s5 = t5;
1285+ y->s2 = t2;
1286+ }
1287+ }
1288+ return 0;
1289+}
1290Index: gcc/testsuite/gcc.target/i386/movdi-rex64.c
1291===================================================================
1292--- gcc/testsuite/gcc.target/i386/movdi-rex64.c (.../tags/gcc_4_6_2_release) (wersja 0)
a966c5b5 1293+++ gcc/testsuite/gcc.target/i386/movdi-rex64.c (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
1294@@ -0,0 +1,11 @@
1295+/* { dg-do compile { target *-*-linux* } } */
1296+/* { dg-options "-fPIE" } */
1297+
1298+char *strcpy (char *dest, const char *src);
1299+
1300+static __thread char buffer[25];
1301+const char * error_message (void)
1302+{
1303+ strcpy (buffer, "Unknown code ");
1304+ return 0;
1305+}
1306Index: gcc/testsuite/gfortran.dg/whole_file_35.f90
1307===================================================================
1308--- gcc/testsuite/gfortran.dg/whole_file_35.f90 (.../tags/gcc_4_6_2_release) (wersja 0)
a966c5b5 1309+++ gcc/testsuite/gfortran.dg/whole_file_35.f90 (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
1310@@ -0,0 +1,28 @@
1311+! { dg-do compile }
1312+!
1313+! PR fortran/50408
1314+!
1315+! Contributed by Vittorio Zecca
1316+!
1317+ module m
1318+ type int
1319+ integer :: val
1320+ end type int
1321+ interface ichar
1322+ module procedure uch
1323+ end interface
1324+ contains
1325+ function uch (c)
1326+ character (len=1), intent (in) :: c
1327+ type (int) :: uch
1328+ intrinsic ichar
1329+ uch%val = 127 - ichar (c)
1330+ end function uch
1331+ end module m
1332+
1333+ program p
1334+ use m
1335+ print *,ichar('~') ! must print "1"
1336+ end program p
1337+
1338+! { dg-final { cleanup-modules "m" } }
1339Index: gcc/testsuite/gfortran.dg/move_alloc_8.f90
1340===================================================================
1341--- gcc/testsuite/gfortran.dg/move_alloc_8.f90 (.../tags/gcc_4_6_2_release) (wersja 0)
a966c5b5 1342+++ gcc/testsuite/gfortran.dg/move_alloc_8.f90 (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
1343@@ -0,0 +1,106 @@
1344+! { dg-do compile }
1345+!
1346+! PR fortran/50684
1347+!
1348+! Module "bug" contributed by Martin Steghöfer.
1349+!
1350+
1351+MODULE BUG
1352+ TYPE MY_TYPE
1353+ INTEGER, ALLOCATABLE :: VALUE
1354+ END TYPE
1355+CONTAINS
1356+ SUBROUTINE POINTER_INTENT_IN_BUG_WORKING(POINTER_INTENT_IN_VARIABLE)
1357+ TYPE(MY_TYPE), POINTER, INTENT(IN) :: POINTER_INTENT_IN_VARIABLE
1358+ TYPE(MY_TYPE), POINTER :: POINTER_VARIABLE_LOCAL
1359+ INTEGER, ALLOCATABLE :: LOCAL_VALUE
1360+
1361+ POINTER_VARIABLE_LOCAL=>POINTER_INTENT_IN_VARIABLE
1362+ CALL MOVE_ALLOC(POINTER_VARIABLE_LOCAL%VALUE, LOCAL_VALUE)
1363+
1364+ RETURN
1365+ END SUBROUTINE POINTER_INTENT_IN_BUG_WORKING
1366+
1367+ SUBROUTINE POINTER_INTENT_IN_BUG_FAILING(POINTER_INTENT_IN_VARIABLE)
1368+ TYPE(MY_TYPE), POINTER, INTENT(IN) :: POINTER_INTENT_IN_VARIABLE
1369+ INTEGER, ALLOCATABLE :: LOCAL_VALUE
1370+
1371+ CALL MOVE_ALLOC(POINTER_INTENT_IN_VARIABLE%VALUE, LOCAL_VALUE)
1372+
1373+ RETURN
1374+ END SUBROUTINE POINTER_INTENT_IN_BUG_FAILING
1375+end module bug
1376+
1377+subroutine test1()
1378+ TYPE MY_TYPE
1379+ INTEGER, ALLOCATABLE :: VALUE
1380+ END TYPE
1381+CONTAINS
1382+ SUBROUTINE sub (dt)
1383+ type(MY_TYPE), intent(in) :: dt
1384+ INTEGER, ALLOCATABLE :: lv
1385+ call move_alloc(dt%VALUE, lv) ! { dg-error "cannot be INTENT.IN." }
1386+ END SUBROUTINE
1387+end subroutine test1
1388+
1389+subroutine test2 (x, px)
1390+ implicit none
1391+ type t
1392+ integer, allocatable :: a
1393+ end type t
1394+
1395+ type t2
1396+ type(t), pointer :: ptr
1397+ integer, allocatable :: a
1398+ end type t2
1399+
1400+ type(t2), intent(in) :: x
1401+ type(t2), pointer, intent(in) :: px
1402+
1403+ integer, allocatable :: a
1404+ type(t2), pointer :: ta
1405+
1406+ call move_alloc (px, ta) ! { dg-error "cannot be INTENT.IN." }
1407+ call move_alloc (x%a, a) ! { dg-error "cannot be INTENT.IN." }
1408+ call move_alloc (x%ptr%a, a) ! OK (3)
1409+ call move_alloc (px%a, a) ! OK (4)
1410+ call move_alloc (px%ptr%a, a) ! OK (5)
1411+end subroutine test2
1412+
1413+subroutine test3 (x, px)
1414+ implicit none
1415+ type t
1416+ integer, allocatable :: a
1417+ end type t
1418+
1419+ type t2
1420+ class(t), pointer :: ptr
1421+ integer, allocatable :: a
1422+ end type t2
1423+
1424+ type(t2), intent(in) :: x
1425+ class(t2), pointer, intent(in) :: px
1426+
1427+ integer, allocatable :: a
1428+ class(t2), pointer :: ta
1429+
1430+ call move_alloc (px, ta) ! { dg-error "cannot be INTENT.IN." }
1431+ call move_alloc (x%a, a) ! { dg-error "cannot be INTENT.IN." }
1432+ call move_alloc (x%ptr%a, a) ! OK (6)
1433+ call move_alloc (px%a, a) ! OK (7)
1434+ call move_alloc (px%ptr%a, a) ! OK (8)
1435+end subroutine test3
1436+
1437+subroutine test4()
1438+ TYPE MY_TYPE
1439+ INTEGER, ALLOCATABLE :: VALUE
1440+ END TYPE
1441+CONTAINS
1442+ SUBROUTINE sub (dt)
1443+ CLASS(MY_TYPE), intent(in) :: dt
1444+ INTEGER, ALLOCATABLE :: lv
1445+ call move_alloc(dt%VALUE, lv) ! { dg-error "cannot be INTENT.IN." }
1446+ END SUBROUTINE
1447+end subroutine test4
1448+
1449+! { dg-final { cleanup-modules "bug" } }
1450Index: gcc/testsuite/gfortran.dg/realloc_on_assign_8.f90
1451===================================================================
1452--- gcc/testsuite/gfortran.dg/realloc_on_assign_8.f90 (.../tags/gcc_4_6_2_release) (wersja 0)
a966c5b5 1453+++ gcc/testsuite/gfortran.dg/realloc_on_assign_8.f90 (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
1454@@ -0,0 +1,17 @@
1455+! { dg-do compile }
1456+!
1457+! PR fortran/51448
1458+!
1459+! Contribued by François Willot
1460+!
1461+ PROGRAM MAIN
1462+ IMPLICIT NONE
1463+ TYPE mytype
1464+ REAL b(2)
1465+ END TYPE mytype
1466+ TYPE(mytype) a
1467+ DOUBLE PRECISION, ALLOCATABLE :: x(:)
1468+ ALLOCATE(x(2))
1469+ a%b=0.0E0
1470+ x=a%b
1471+ END
1472Index: gcc/testsuite/gfortran.dg/default_initialization_5.f90
1473===================================================================
1474--- gcc/testsuite/gfortran.dg/default_initialization_5.f90 (.../tags/gcc_4_6_2_release) (wersja 0)
a966c5b5 1475+++ gcc/testsuite/gfortran.dg/default_initialization_5.f90 (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
1476@@ -0,0 +1,66 @@
1477+! { dg-do run }
1478+! { dg-options "-fdump-tree-original" }
1479+!
1480+! PR fortran/51435
1481+!
1482+! Contributed by darmar.xxl@gmail.com
1483+!
1484+module arr_m
1485+ type arr_t
1486+ real(8), dimension(:), allocatable :: rsk
1487+ end type
1488+ type arr_t2
1489+ integer :: a = 77
1490+ end type
1491+end module arr_m
1492+!*********************
1493+module list_m
1494+ use arr_m
1495+ implicit none
1496+
1497+ type(arr_t2), target :: tgt
1498+
1499+ type my_list
1500+ type(arr_t), pointer :: head => null()
1501+ end type my_list
1502+ type my_list2
1503+ type(arr_t2), pointer :: head => tgt
1504+ end type my_list2
1505+end module list_m
1506+!***********************
1507+module worker_mod
1508+ use list_m
1509+ implicit none
1510+
1511+ type data_all_t
1512+ type(my_list) :: my_data
1513+ end type data_all_t
1514+ type data_all_t2
1515+ type(my_list2) :: my_data
1516+ end type data_all_t2
1517+contains
1518+ subroutine do_job()
1519+ type(data_all_t) :: dum
1520+ type(data_all_t2) :: dum2
1521+
1522+ if (associated(dum%my_data%head)) then
1523+ call abort()
1524+ else
1525+ print *, 'OK: do_job my_data%head is NOT associated'
1526+ end if
1527+
1528+ if (dum2%my_data%head%a /= 77) &
1529+ call abort()
1530+ end subroutine
1531+end module
1532+!***************
1533+program hello
1534+ use worker_mod
1535+ implicit none
1536+ call do_job()
1537+end program
1538+
1539+! { dg-final { scan-tree-dump-times "my_data.head = 0B" 1 "original" } }
1540+! { dg-final { scan-tree-dump-times "my_data.head = &tgt" 1 "original" } }
1541+! { dg-final { cleanup-tree-dump "original" } }
1542+! { dg-final { cleanup-modules "arr_m list_m worker_mod" } }
6f35b5e4
AM
1543Index: gcc/testsuite/gfortran.dg/pr50875.f90
1544===================================================================
1545--- gcc/testsuite/gfortran.dg/pr50875.f90 (.../tags/gcc_4_6_2_release) (wersja 0)
a966c5b5 1546+++ gcc/testsuite/gfortran.dg/pr50875.f90 (.../branches/gcc-4_6-branch) (wersja 182722)
6f35b5e4
AM
1547@@ -0,0 +1,39 @@
1548+! { dg-do compile { target { i?86-*-* x86_64-*-* } } }
1549+! { dg-options "-O3 -mavx" }
1550+!
1551+! PR fortran/50875.f90
1552+
1553+module test
1554+
1555+ implicit none
1556+
1557+ integer, parameter :: dp=kind(1.d0)
1558+
1559+ integer :: P = 2
1560+
1561+ real(kind=dp), allocatable :: real_array_A(:),real_array_B(:,:)
1562+ complex(kind=dp), allocatable :: cmplx_array_A(:)
1563+
1564+contains
1565+
1566+ subroutine routine_A
1567+
1568+ integer :: i
1569+
1570+ allocate(cmplx_array_A(P),real_array_B(P,P),real_array_A(P))
1571+
1572+ real_array_A = 1
1573+ real_array_B = 1
1574+
1575+ do i = 1, p
1576+ cmplx_array_A = cmplx(real_array_B(:,i),0.0_dp,dp)
1577+ cmplx_array_A = cmplx_array_A * exp(cmplx(0.0_dp,real_array_A+1))
1578+ end do
1579+
1580+ deallocate(cmplx_array_A,real_array_B,real_array_A)
1581+
1582+ end subroutine routine_A
1583+
1584+end module test
1585+
1586+! { dg-final { cleanup-modules "test" } }
2e34247b 1587Index: gcc/testsuite/gfortran.dg/warn_function_without_result_2.f90
6f35b5e4 1588===================================================================
2e34247b 1589--- gcc/testsuite/gfortran.dg/warn_function_without_result_2.f90 (.../tags/gcc_4_6_2_release) (wersja 0)
a966c5b5 1590+++ gcc/testsuite/gfortran.dg/warn_function_without_result_2.f90 (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
1591@@ -0,0 +1,19 @@
1592+! { dg-do compile }
1593+! { dg-options "-Wall" }
1594+!
1595+! PR fortran/50923
1596+!
1597+module m
1598+contains
1599+ integer pure function f() ! { dg-warning "Return value of function 'f' at .1. not set" }
1600+ end function f
1601+ integer pure function g() result(h) ! { dg-warning "Return value 'h' of function 'g' declared at .1. not set" }
1602+ end function g
1603+ integer pure function i()
1604+ i = 7
1605+ end function i
1606+ integer pure function j() result(k)
1607+ k = 8
1608+ end function j
1609+end module m
1610+! { dg-final { cleanup-modules "mod" } }
1611Index: gcc/testsuite/gfortran.dg/implicit_pure_1.f90
1612===================================================================
1613--- gcc/testsuite/gfortran.dg/implicit_pure_1.f90 (.../tags/gcc_4_6_2_release) (wersja 0)
a966c5b5 1614+++ gcc/testsuite/gfortran.dg/implicit_pure_1.f90 (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
1615@@ -0,0 +1,53 @@
1616+! { dg-do run }
1617+!
1618+! PR fortran/51218
1619+!
1620+! Contributed by Harald Anlauf
1621+!
6f35b5e4 1622+
2e34247b
AM
1623+module a
1624+ implicit none
1625+ integer :: neval = 0
1626+contains
1627+ subroutine inc_eval
1628+ neval = neval + 1
1629+ end subroutine inc_eval
1630+end module a
6f35b5e4 1631+
2e34247b
AM
1632+module b
1633+ use a
1634+ implicit none
1635+contains
1636+ function f(x) ! Should be implicit pure
1637+ real :: f
1638+ real, intent(in) :: x
1639+ f = x
1640+ end function f
1641+
1642+ function g(x) ! Should NOT be implicit pure
1643+ real :: g
1644+ real, intent(in) :: x
1645+ call inc_eval
1646+ g = x
1647+ end function g
1648+end module b
1649+
1650+program gfcbug114a
1651+ use a
1652+ use b
1653+ implicit none
1654+ real :: x = 1, y = 1, t, u, v, w
1655+ if (neval /= 0) call abort ()
1656+ t = f(x)*f(y)
1657+ if (neval /= 0) call abort ()
1658+ u = f(x)*f(y) + f(x)*f(y)
1659+ if (neval /= 0) call abort ()
1660+ v = g(x)*g(y)
1661+ if (neval /= 2) call abort ()
1662+ w = g(x)*g(y) + g(x)*g(y)
1663+ if (neval /= 6) call abort ()
1664+ if (t /= 1.0 .or. u /= 2.0 .or. v /= 1.0 .or. w /= 2) call abort ()
1665+end program gfcbug114a
1666+
1667+! { dg-final { scan-module "b" "IMPLICIT_PURE" } }
1668+! { dg-final { cleanup-modules "b" } }
1669Index: gcc/testsuite/gcc.c-torture/execute/pr51466.c
1670===================================================================
1671--- gcc/testsuite/gcc.c-torture/execute/pr51466.c (.../tags/gcc_4_6_2_release) (wersja 0)
a966c5b5 1672+++ gcc/testsuite/gcc.c-torture/execute/pr51466.c (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
1673@@ -0,0 +1,43 @@
1674+/* PR tree-optimization/51466 */
1675+
1676+extern void abort (void);
1677+
1678+__attribute__((noinline, noclone)) int
1679+foo (int i)
6f35b5e4 1680+{
2e34247b
AM
1681+ volatile int v[4];
1682+ int *p;
1683+ v[i] = 6;
1684+ p = (int *) &v[i];
1685+ return *p;
6f35b5e4 1686+}
2e34247b
AM
1687+
1688+__attribute__((noinline, noclone)) int
1689+bar (int i)
6f35b5e4 1690+{
2e34247b
AM
1691+ volatile int v[4];
1692+ int *p;
1693+ v[i] = 6;
1694+ p = (int *) &v[i];
1695+ *p = 8;
1696+ return v[i];
1697+}
1698+
1699+__attribute__((noinline, noclone)) int
1700+baz (int i)
1701+{
1702+ volatile int v[4];
1703+ int *p;
1704+ v[i] = 6;
1705+ p = (int *) &v[0];
1706+ *p = 8;
1707+ return v[i];
1708+}
1709+
1710+int
1711+main ()
1712+{
1713+ if (foo (3) != 6 || bar (2) != 8 || baz (0) != 8 || baz (1) != 6)
1714+ abort ();
1715+ return 0;
1716+}
1717Index: gcc/testsuite/gcc.c-torture/execute/20111212-1.c
1718===================================================================
1719--- gcc/testsuite/gcc.c-torture/execute/20111212-1.c (.../tags/gcc_4_6_2_release) (wersja 0)
a966c5b5 1720+++ gcc/testsuite/gcc.c-torture/execute/20111212-1.c (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
1721@@ -0,0 +1,34 @@
1722+/* PR tree-optimization/50569 */
1723+/* Reported by Paul Koning <pkoning@gcc.gnu.org> */
1724+/* Reduced testcase by Mikael Pettersson <mikpe@it.uu.se> */
1725+
1726+struct event {
1727+ struct {
1728+ unsigned int sec;
1729+ } sent __attribute__((packed));
1730+};
1731+
1732+void __attribute__((noinline,noclone)) frob_entry(char *buf)
1733+{
1734+ struct event event;
1735+
1736+ __builtin_memcpy(&event, buf, sizeof(event));
1737+ if (event.sent.sec < 64) {
1738+ event.sent.sec = -1U;
1739+ __builtin_memcpy(buf, &event, sizeof(event));
1740+ }
1741+}
1742+
1743+int main(void)
1744+{
1745+ union {
1746+ char buf[1 + sizeof(struct event)];
1747+ int align;
1748+ } u;
1749+
1750+ __builtin_memset(&u, 0, sizeof u);
1751+
1752+ frob_entry(&u.buf[1]);
1753+
1754+ return 0;
1755+}
1756Index: gcc/testsuite/gcc.c-torture/execute/pr51323.c
1757===================================================================
1758--- gcc/testsuite/gcc.c-torture/execute/pr51323.c (.../tags/gcc_4_6_2_release) (wersja 0)
a966c5b5 1759+++ gcc/testsuite/gcc.c-torture/execute/pr51323.c (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
1760@@ -0,0 +1,35 @@
1761+/* PR middle-end/51323 */
1762+
1763+extern void abort (void);
1764+struct S { int a, b, c; };
1765+int v;
1766+
1767+__attribute__((noinline, noclone)) void
1768+foo (int x, int y, int z)
1769+{
1770+ if (x != v || y != 0 || z != 9)
1771+ abort ();
1772+}
1773+
1774+static inline int
1775+baz (const struct S *p)
1776+{
1777+ return p->b;
1778+}
1779+
1780+__attribute__((noinline, noclone)) void
1781+bar (int x, struct S y)
1782+{
1783+ foo (baz (&y), 0, x);
1784+}
1785+
1786+int
1787+main ()
1788+{
1789+ struct S s;
1790+ v = 3; s.a = v - 1; s.b = v; s.c = v + 1;
1791+ bar (9, s);
1792+ v = 17; s.a = v - 1; s.b = v; s.c = v + 1;
1793+ bar (9, s);
1794+ return 0;
1795+}
1796Index: gcc/testsuite/gcc.c-torture/execute/20111208-1.c
1797===================================================================
1798--- gcc/testsuite/gcc.c-torture/execute/20111208-1.c (.../tags/gcc_4_6_2_release) (wersja 0)
a966c5b5 1799+++ gcc/testsuite/gcc.c-torture/execute/20111208-1.c (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
1800@@ -0,0 +1,94 @@
1801+/* PR tree-optimization/51315 */
1802+/* Reported by Jurij Smakov <jurij@wooyd.org> */
1803+
1804+typedef unsigned int size_t;
1805+
1806+extern void *memcpy (void *__restrict __dest,
1807+ __const void *__restrict __src, size_t __n)
1808+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
1809+
1810+extern size_t strlen (__const char *__s)
1811+ __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
1812+
1813+typedef short int int16_t;
1814+typedef int int32_t;
1815+
1816+extern void abort (void);
1817+
1818+int a;
1819+
1820+static void __attribute__ ((noinline,noclone))
1821+do_something (int item)
1822+{
1823+ a = item;
1824+}
1825+
1826+int
1827+pack_unpack (char *s, char *p)
1828+{
1829+ char *send, *pend;
1830+ char type;
1831+ int integer_size;
1832+
1833+ send = s + strlen (s);
1834+ pend = p + strlen (p);
1835+
1836+ while (p < pend)
1837+ {
1838+ type = *p++;
1839+
1840+ switch (type)
1841+ {
1842+ case 's':
1843+ integer_size = 2;
1844+ goto unpack_integer;
1845+
1846+ case 'l':
1847+ integer_size = 4;
1848+ goto unpack_integer;
1849+
1850+ unpack_integer:
1851+ switch (integer_size)
1852+ {
1853+ case 2:
1854+ {
1855+ union
1856+ {
1857+ int16_t i;
1858+ char a[sizeof (int16_t)];
1859+ }
1860+ v;
1861+ memcpy (v.a, s, sizeof (int16_t));
1862+ s += sizeof (int16_t);
1863+ do_something (v.i);
1864+ }
1865+ break;
1866+
1867+ case 4:
1868+ {
1869+ union
1870+ {
1871+ int32_t i;
1872+ char a[sizeof (int32_t)];
1873+ }
1874+ v;
1875+ memcpy (v.a, s, sizeof (int32_t));
1876+ s += sizeof (int32_t);
1877+ do_something (v.i);
1878+ }
1879+ break;
1880+ }
1881+ break;
1882+ }
1883+ }
1884+ return (int) *s;
1885+}
1886+
1887+int
1888+main (void)
1889+{
1890+ int n = pack_unpack ("\200\001\377\376\035\300", "sl");
1891+ if (n != 0)
1892+ abort ();
1893+ return 0;
1894+}
1895Index: gcc/testsuite/gcc.c-torture/compile/pr51077.c
1896===================================================================
1897--- gcc/testsuite/gcc.c-torture/compile/pr51077.c (.../tags/gcc_4_6_2_release) (wersja 0)
a966c5b5 1898+++ gcc/testsuite/gcc.c-torture/compile/pr51077.c (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
1899@@ -0,0 +1,15 @@
1900+/* PR middle-end/51077 */
1901+
1902+struct S { unsigned char s, t[256]; };
1903+
1904+void
1905+foo (const struct S *x, struct S *y, int z)
1906+{
1907+ int i;
1908+ for (i = 0; i < 8; i++)
1909+ {
1910+ const struct S *a = &x[i];
1911+ __builtin___memcpy_chk (y->t, a->t, z, __builtin_object_size (y->t, 0));
1912+ y = (struct S *) &y->t[z];
1913+ }
1914+}
1915Index: gcc/testsuite/gcc.c-torture/compile/20110913-1.c
1916===================================================================
1917--- gcc/testsuite/gcc.c-torture/compile/20110913-1.c (.../tags/gcc_4_6_2_release) (wersja 0)
a966c5b5 1918+++ gcc/testsuite/gcc.c-torture/compile/20110913-1.c (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
1919@@ -0,0 +1,26 @@
1920+struct ieee754_double {
1921+ double d;
1922+};
1923+extern const float __exp_deltatable[178];
1924+float __ieee754_expf (float x)
1925+{
1926+ static const float himark = 88.72283935546875;
1927+ static const float lomark = -103.972084045410;
1928+ if (__builtin_isless(x, himark) && __builtin_isgreater(x, lomark))
6f35b5e4
AM
1929+ {
1930+ int tval;
1931+ double x22, t, result, dx;
1932+ float delta;
1933+ struct ieee754_double ex2_u;
1934+ dx -= t;
1935+ tval = (int) (t * 512.0);
1936+ if (t >= 0)
1937+ delta = - __exp_deltatable[tval];
1938+ else
1939+ delta = __exp_deltatable[-tval];
1940+ x22 = (0.5000000496709180453 * dx + 1.0000001192102037084) * dx + delta;
1941+ result = x22 * ex2_u.d + ex2_u.d;
1942+ return (float) result;
1943+ }
1944+ return x;
1945+}
2e34247b 1946Index: gcc/testsuite/gnat.dg/frame_overflow.adb
6f35b5e4 1947===================================================================
a966c5b5
AM
1948--- gcc/testsuite/gnat.dg/frame_overflow.adb (.../tags/gcc_4_6_2_release) (wersja 182722)
1949+++ gcc/testsuite/gnat.dg/frame_overflow.adb (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
1950@@ -1,27 +1,20 @@
1951 -- { dg-do compile }
1952
1953-with System;
1954+package body Frame_Overflow is
1955
1956-procedure frame_overflow is
1957-
1958- type Bitpos_Range_T is range 1..2**(System.Word_Size-1)-1;
1959- type Bitmap_Array_T is array (Bitpos_Range_T) of Boolean;
1960-
1961- type Bitmap_T is record
1962- Bits : Bitmap_Array_T := (others => False);
1963- end record;
1964-
1965- function
1966+ function -- { dg-error "too large" }
1967 Set_In (Bitmap : Bitmap_T; Bitpos : Bitpos_Range_T) return Bitmap_T
1968 is
1969- Result: Bitmap_T := Bitmap; -- { dg-error "Storage_Error" }
1970+ Result: Bitmap_T := Bitmap;
1971 begin
1972 Result.Bits (Bitpos) := True;
1973 return Result;
1974 end;
1975
1976- function Negate (Bitmap : Bitmap_T) return Bitmap_T is
1977- Result: Bitmap_T; -- { dg-error "Storage_Error" }
1978+ function -- { dg-error "too large" }
1979+ Negate (Bitmap : Bitmap_T) return Bitmap_T
1980+ is
1981+ Result: Bitmap_T;
1982 begin
1983 for E in Bitpos_Range_T loop
1984 Result.Bits (E) := not Bitmap.Bits (E);
1985@@ -29,6 +22,4 @@
1986 return Result;
1987 end;
1988
1989-begin
1990- null;
1991-end;
1992+end Frame_Overflow;
1993Index: gcc/testsuite/gnat.dg/frame_overflow.ads
1994===================================================================
1995--- gcc/testsuite/gnat.dg/frame_overflow.ads (.../tags/gcc_4_6_2_release) (wersja 0)
a966c5b5 1996+++ gcc/testsuite/gnat.dg/frame_overflow.ads (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
1997@@ -0,0 +1,17 @@
1998+with System;
6f35b5e4 1999+
2e34247b 2000+package Frame_Overflow is
6f35b5e4 2001+
2e34247b
AM
2002+ type Bitpos_Range_T is range 1..2**(System.Word_Size-1)-1;
2003+ type Bitmap_Array_T is array (Bitpos_Range_T) of Boolean;
6f35b5e4 2004+
2e34247b
AM
2005+ type Bitmap_T is record
2006+ Bits : Bitmap_Array_T := (others => False);
2007+ end record;
6f35b5e4 2008+
2e34247b
AM
2009+ function
2010+ Set_In (Bitmap : Bitmap_T; Bitpos : Bitpos_Range_T) return Bitmap_T;
6f35b5e4 2011+
2e34247b 2012+ function Negate (Bitmap : Bitmap_T) return Bitmap_T;
6f35b5e4 2013+
2e34247b
AM
2014+end Frame_Overflow;
2015Index: gcc/testsuite/gnat.dg/specs/addr1.ads
2016===================================================================
a966c5b5
AM
2017--- gcc/testsuite/gnat.dg/specs/addr1.ads (.../tags/gcc_4_6_2_release) (wersja 182722)
2018+++ gcc/testsuite/gnat.dg/specs/addr1.ads (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
2019@@ -15,7 +15,7 @@
2020 end record;
2021 for Rec2'Size use 64;
2022
2023- A: Arr (1 .. 12);
2024+ A: Arr (1 .. 4);
2025
2026 Obj1: Rec1;
2027 for Obj1'Address use A'Address; -- { dg-bogus "alignment" }
2028Index: gcc/testsuite/gcc.dg/pr45819.c
2029===================================================================
a966c5b5
AM
2030--- gcc/testsuite/gcc.dg/pr45819.c (.../tags/gcc_4_6_2_release) (wersja 182722)
2031+++ gcc/testsuite/gcc.dg/pr45819.c (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
2032@@ -1,5 +1,5 @@
2033 /* { dg-do compile } */
2034-/* { dg-options "-O2 -fdump-tree-optimized" } */
2035+/* { dg-options "-O2 -fdump-tree-optimized -w" } */
2036
2037 struct ehci_regs {
2038 char x;
2039Index: gcc/testsuite/gcc.dg/gomp/pr51339.c
2040===================================================================
2041--- gcc/testsuite/gcc.dg/gomp/pr51339.c (.../tags/gcc_4_6_2_release) (wersja 0)
a966c5b5 2042+++ gcc/testsuite/gcc.dg/gomp/pr51339.c (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
2043@@ -0,0 +1,15 @@
2044+/* PR c/51339 */
2045+/* { dg-do compile } */
2046+/* { dg-options "-fopenmp" } */
6f35b5e4 2047+
2e34247b 2048+char g[] = "g";
6f35b5e4 2049+
2e34247b
AM
2050+void
2051+foo (void)
2052+{
2053+#pragma omp parallel sections firstprivate (g) lastprivate (g)
2054+ {
2055+ #pragma omp section
2056+ g[0] = 'h';
2057+ }
2058+}
2059Index: gcc/testsuite/gcc.dg/cpp/assert4.c
2060===================================================================
a966c5b5
AM
2061--- gcc/testsuite/gcc.dg/cpp/assert4.c (.../tags/gcc_4_6_2_release) (wersja 182722)
2062+++ gcc/testsuite/gcc.dg/cpp/assert4.c (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
2063@@ -1,4 +1,4 @@
2064-/* Copyright (C) 2003, 2006, 2008 Free Software Foundation, Inc.
2065+/* Copyright (C) 2003, 2006, 2008, 2009, 2011 Free Software Foundation, Inc.
2066 Test builtin preprocessor assertions.
2067 By Kaveh Ghazi <ghazi@caip.rutgers.edu>. */
2068
2069@@ -7,7 +7,7 @@
2070
2071 /* Check for #system assertions. */
2072
2073-#if defined __gnu_linux__
2074+#if defined __linux__
2075 # if !#system(linux) || !#system(unix) || !#system(posix)
2076 # error
2077 # endif
2078Index: gcc/testsuite/gcc.dg/pr50078.c
2079===================================================================
2080--- gcc/testsuite/gcc.dg/pr50078.c (.../tags/gcc_4_6_2_release) (wersja 0)
a966c5b5 2081+++ gcc/testsuite/gcc.dg/pr50078.c (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
2082@@ -0,0 +1,14 @@
2083+/* PR tree-optimization/50078 */
2084+/* { dg-do compile } */
2085+/* { dg-options "-O2" } */
6f35b5e4 2086+
2e34247b 2087+unsigned nonvolvar[2];
6f35b5e4 2088+
2e34247b
AM
2089+void
2090+test (int arg)
2091+{
2092+ unsigned v = *(volatile unsigned *) (&nonvolvar[arg]);
2093+ *(volatile unsigned *) (&nonvolvar[arg]) = v;
2094+}
6f35b5e4 2095+
2e34247b
AM
2096+/* { dg-final { scan-assembler-times "movl\[^\n\r\]*nonvolvar" 2 { target { { i?86-*-* x86_64-*-* } && nonpic } } } } */
2097Index: gcc/testsuite/gcc.dg/debug/dwarf2/pr51410.c
2098===================================================================
2099--- gcc/testsuite/gcc.dg/debug/dwarf2/pr51410.c (.../tags/gcc_4_6_2_release) (wersja 0)
a966c5b5 2100+++ gcc/testsuite/gcc.dg/debug/dwarf2/pr51410.c (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
2101@@ -0,0 +1,13 @@
2102+/* PR debug/51410 */
2103+/* { dg-do compile } */
2104+/* { dg-options "-O0 -gdwarf-2 -dA -fno-merge-debug-strings" } */
6f35b5e4 2105+
2e34247b
AM
2106+int x;
2107+
2108+int
2109+foo (void)
2110+{
2111+ return x;
2112+}
2113+
2114+/* { dg-final { scan-assembler-times "\\(DIE\[^\\r\\n\]*DW_TAG_variable\\)" 1 } } */
a966c5b5
AM
2115Index: gcc/testsuite/gcc.dg/volatile-bitfields-1.c
2116===================================================================
2117--- gcc/testsuite/gcc.dg/volatile-bitfields-1.c (.../tags/gcc_4_6_2_release) (wersja 0)
2118+++ gcc/testsuite/gcc.dg/volatile-bitfields-1.c (.../branches/gcc-4_6-branch) (wersja 182722)
2119@@ -0,0 +1,23 @@
2120+/* { dg-options "-fstrict-volatile-bitfields" } */
2121+/* { dg-do run } */
2122+
2123+extern int puts(const char *);
2124+extern void abort(void) __attribute__((noreturn));
2125+
2126+typedef struct {
2127+ volatile unsigned short a:8, b:8;
2128+} BitStruct;
2129+
2130+BitStruct bits = {1, 2};
2131+
2132+void check(int i, int j)
2133+{
2134+ if (i != 1 || j != 2) puts("FAIL"), abort();
2135+}
2136+
2137+int main ()
2138+{
2139+ check(bits.a, bits.b);
2140+
2141+ return 0;
2142+}
2e34247b 2143Index: gcc/testsuite/gcc.dg/pr51408.c
6f35b5e4 2144===================================================================
2e34247b 2145--- gcc/testsuite/gcc.dg/pr51408.c (.../tags/gcc_4_6_2_release) (wersja 0)
a966c5b5 2146+++ gcc/testsuite/gcc.dg/pr51408.c (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
2147@@ -0,0 +1,22 @@
2148+/* This testcase used to fail because of a bug in
2149+ arm.md:*minmax_arithsi. */
6f35b5e4 2150+
2e34247b
AM
2151+/* { dg-do run } */
2152+/* { dg-options "-O1" } */
6f35b5e4 2153+
2e34247b
AM
2154+extern void abort (void);
2155+
2156+int __attribute__((noinline))
2157+foo (int a, int b)
2158+{
2159+ int max = (b > 0) ? b : 0;
2160+ return max - a;
2161+}
2162+
2163+int
2164+main (void)
2165+{
2166+ if (foo (3, -1) != -3)
2167+ abort ();
2168+ return 0;
2169+}
a966c5b5
AM
2170Index: gcc/testsuite/gcc.dg/torture/pr50396.c
2171===================================================================
2172--- gcc/testsuite/gcc.dg/torture/pr50396.c (.../tags/gcc_4_6_2_release) (wersja 0)
2173+++ gcc/testsuite/gcc.dg/torture/pr50396.c (.../branches/gcc-4_6-branch) (wersja 182722)
2174@@ -0,0 +1,22 @@
2175+/* { dg-do run } */
2176+/* { dg-add-options ieee } */
2177+
2178+extern void abort (void);
2179+typedef float vf128 __attribute__((vector_size(16)));
2180+typedef float vf64 __attribute__((vector_size(8)));
2181+int main()
2182+{
2183+#if !__FINITE_MATH_ONLY__
2184+#if __FLT_HAS_QUIET_NAN__
2185+ vf128 v = (vf128){ 0.f, 0.f, 0.f, 0.f };
2186+ vf64 u = (vf64){ 0.f, 0.f };
2187+ v = v / (vf128){ 0.f, 0.f, 0.f, 0.f };
2188+ if (v[0] == v[0])
2189+ abort ();
2190+ u = u / (vf64){ 0.f, 0.f };
2191+ if (u[0] == u[0])
2192+ abort ();
2193+#endif
2194+#endif
2195+ return 0;
2196+}
2e34247b
AM
2197Index: gcc/testsuite/gcc.dg/tree-ssa/pr51583.c
2198===================================================================
2199--- gcc/testsuite/gcc.dg/tree-ssa/pr51583.c (.../tags/gcc_4_6_2_release) (wersja 0)
a966c5b5 2200+++ gcc/testsuite/gcc.dg/tree-ssa/pr51583.c (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
2201@@ -0,0 +1,34 @@
2202+/* { dg-do compile } */
2203+/* { dg-options "-O1" } */
2204+
2205+typedef __complex__ double Value;
2206+
2207+union U
2208+{
2209+ Value v;
2210+ char c[sizeof(Value)];
6f35b5e4
AM
2211+};
2212+
2e34247b
AM
2213+struct S
2214+{
2215+ union U u;
2216+ int i,j;
6f35b5e4
AM
2217+};
2218+
2e34247b
AM
2219+Value gv;
2220+int gi, gj;
6f35b5e4 2221+
2e34247b 2222+Value foo (void)
6f35b5e4 2223+{
2e34247b 2224+ struct S s,t;
6f35b5e4 2225+
2e34247b
AM
2226+ t.i = gi;
2227+ t.j = gj;
2228+ t.u.v = gv;
2229+ t.u.c[0] = 0;
2230+
2231+ s = t;
2232+ __imag__ s.u.v += s.i;
2233+
2234+ return s.u.v;
2235+}
2236Index: gcc/testsuite/gcc.dg/delay-slot-2.c
6f35b5e4 2237===================================================================
2e34247b 2238--- gcc/testsuite/gcc.dg/delay-slot-2.c (.../tags/gcc_4_6_2_release) (wersja 0)
a966c5b5 2239+++ gcc/testsuite/gcc.dg/delay-slot-2.c (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
2240@@ -0,0 +1,116 @@
2241+/* PR rtl-optimization/51187 */
2242+/* Reported by Jurij Smakov <jurij@wooyd.org> */
6f35b5e4 2243+
2e34247b
AM
2244+/* { dg-do compile } */
2245+/* { dg-options "-g -O2" } */
2246+
2247+extern int printf (__const char *__restrict __format, ...);
2248+extern void print_c_condition (const char *);
2249+
2250+enum decision_type
2251+{
2252+ DT_num_insns,
2253+ DT_mode, DT_code, DT_veclen,
2254+ DT_elt_zero_int, DT_elt_one_int, DT_elt_zero_wide, DT_elt_zero_wide_safe,
2255+ DT_const_int,
2256+ DT_veclen_ge, DT_dup, DT_pred, DT_c_test,
2257+ DT_accept_op, DT_accept_insn
2258+};
2259+
2260+struct decision_test
2261+{
2262+ struct decision_test *next;
2263+ enum decision_type type;
2264+
2265+ union
6f35b5e4 2266+ {
2e34247b 2267+ int num_insns;
6f35b5e4 2268+
2e34247b
AM
2269+ struct
2270+ {
2271+ const char *name;
2272+ } pred;
6f35b5e4 2273+
2e34247b
AM
2274+ const char *c_test;
2275+ int veclen;
2276+ int dup;
2277+ long intval;
2278+ int opno;
6f35b5e4 2279+
2e34247b
AM
2280+ struct {
2281+ int code_number;
2282+ int lineno;
2283+ int num_clobbers_to_add;
2284+ } insn;
2285+ } u;
2286+};
6f35b5e4 2287+
2e34247b
AM
2288+enum routine_type {
2289+ RECOG, SPLIT, PEEPHOLE2
2290+};
6f35b5e4 2291+
2e34247b
AM
2292+void
2293+write_cond (struct decision_test *p, int depth,
2294+ enum routine_type subroutine_type)
2295+{
2296+ switch (p->type)
2297+ {
2298+ case DT_num_insns:
2299+ printf ("peep2_current_count >= %d", p->u.num_insns);
2300+ break;
6f35b5e4 2301+
2e34247b
AM
2302+ case DT_code:
2303+ printf ("GET_CODE (x%d) == ", depth);
2304+ break;
6f35b5e4 2305+
2e34247b
AM
2306+ case DT_veclen:
2307+ printf ("XVECLEN (x%d, 0) == %d", depth, p->u.veclen);
2308+ break;
6f35b5e4 2309+
2e34247b
AM
2310+ case DT_elt_zero_int:
2311+ printf ("XINT (x%d, 0) == %d", depth, (int) p->u.intval);
2312+ break;
6f35b5e4 2313+
2e34247b
AM
2314+ case DT_elt_one_int:
2315+ printf ("XINT (x%d, 1) == %d", depth, (int) p->u.intval);
2316+ break;
2317+
2318+ case DT_elt_zero_wide:
2319+ case DT_elt_zero_wide_safe:
2320+ printf ("XWINT (x%d, 0) == ", depth);
2321+ print_host_wide_int (p->u.intval);
2322+ break;
2323+
2324+ case DT_const_int:
2325+ printf ("x%d == const_int_rtx[MAX_SAVED_CONST_INT + (%d)]",
2326+ depth, (int) p->u.intval);
2327+ break;
2328+
2329+ case DT_veclen_ge:
2330+ printf ("XVECLEN (x%d, 0) >= %d", depth, p->u.veclen);
2331+ break;
2332+
2333+ case DT_dup:
2334+ printf ("rtx_equal_p (x%d, operands[%d])", depth, p->u.dup);
2335+ break;
2336+
2337+ case DT_pred:
2338+ printf ("%s (x%d)", p->u.pred.name, depth);
2339+ break;
2340+
2341+ case DT_c_test:
2342+ print_c_condition (p->u.c_test);
2343+ break;
2344+
2345+ case DT_accept_insn:
2346+ ((void)(__builtin_expect(!(subroutine_type == RECOG), 0) ? __builtin_unreachable(), 0 : 0));
2347+ ((void)(__builtin_expect(!(p->u.insn.num_clobbers_to_add), 0) ? __builtin_unreachable(), 0 : 0));
2348+ printf ("pnum_clobbers != NULL");
2349+ break;
2350+
2351+ default:
2352+ __builtin_unreachable();
6f35b5e4 2353+ }
2e34247b
AM
2354+}
2355+
2356+/* { dg-final { scan-assembler "printf" } } */
2357Index: gcc/testsuite/ChangeLog
6f35b5e4 2358===================================================================
a966c5b5
AM
2359--- gcc/testsuite/ChangeLog (.../tags/gcc_4_6_2_release) (wersja 182722)
2360+++ gcc/testsuite/ChangeLog (.../branches/gcc-4_6-branch) (wersja 182722)
2361@@ -1,3 +1,255 @@
2362+2011-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
2363+
2364+ Backport from mainline
2365+ 2011-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
2366+
2367+ PR target/51623
2368+ * gcc.target/powerpc/pr51623.c: New file.
2369+
2370+2011-12-28 Uros Bizjak <ubizjak@gmail.com>
2371+
2372+ * gcc.dg/torture/pr50396.c: Use dg-add-options ieee.
2373+
2374+2011-12-23 Richard Guenther <rguenther@suse.de>
2375+
2376+ PR rtl-optimization/50396
2377+ * gcc.dg/torture/pr50396.c: New testcase.
2378+
2379+2011-12-22 Doug Kwan <dougkwan@google.com>
2380+
2381+ Backport from mainline
2382+ 2011-11-20 Joey Ye <joey.ye@arm.com>
2383+
2384+ * gcc.dg/volatile-bitfields-1.c: New.
2385+
2386+2011-12-21 Richard Earnshaw <rearnsha@arm.com>
2387+
2388+ PR target/51643
2389+ * gcc.target/arm/sibcall-2.c: New test.
2390+
2e34247b 2391+2011-12-19 Martin Jambor <mjambor@suse.cz>
6f35b5e4 2392+
2e34247b
AM
2393+ PR tree-optimization/51583
2394+ * gcc.dg/tree-ssa/pr51583.c: New test.
2395+
2396+2011-12-16 Jason Merrill <jason@redhat.com>
2397+
2398+ PR c++/51416
2399+ * g++.dg/cpp0x/auto31.C: New.
2400+
2401+2011-12-16 Jason Merrill <jason@redhat.com>
2402+
2403+ PR c++/51331
2404+ * g++.dg/init/value10.C: New.
2405+
2406+2011-12-15 H.J. Lu <hongjiu.lu@intel.com>
2407+
2408+ Backport from mainline.
2409+ 2011-10-28 Chung-Lin Tang <cltang@codesourcery.com>
2410+
2411+ PR rtl-optimization/49720
2412+ * g++.dg/torture/pr49720.C: New test.
2413+
2414+2011-12-14 Jason Merrill <jason@redhat.com>
2415+
2416+ PR c++/51248
2417+ * g++.dg/other/enum2.C: New.
2418+
2419+2011-12-13 Jason Merrill <jason@redhat.com>
2420+
2421+ PR c++/51406
2422+ PR c++/51161
2423+ * g++.dg/cpp0x/rv-cast3.C: New.
2424+ * g++.dg/cpp0x/rv-cast4.C: New.
2425+
2426+2011-12-12 Jakub Jelinek <jakub@redhat.com>
2427+
2428+ PR testsuite/51511
2429+ * gcc.dg/pr45819.c: Add -w to dg-options.
2430+
2431+ Backported from mainline
2432+ 2011-12-11 Jakub Jelinek <jakub@redhat.com>
2433+
2434+ PR tree-optimization/51485
2435+ * g++.dg/vect/pr51485.cc: New test.
2436+
2437+2011-12-12 Eric Botcazou <ebotcazou@adacore.com>
2438+
2439+ * gcc.c-torture/execute/20111212-1.c: New test.
2440+
2441+2011-12-11 Tobias Burnus <burnus@net-b.de>
2442+
2443+ PR fortran/50923
2444+ * gfortran.dg/warn_function_without_result_2.f90: New.
2445+
2446+2011-12-11 Thomas Koenig <tkoenig@gcc.gnu.org>
2447+
2448+ PR fortran/51338
2449+ Backport from trunk
2450+ * gfortran.dg/assumed_charlen_substring_1.f90: New test.
2451+
2452+2011-12-09 Jakub Jelinek <jakub@redhat.com>
2453+
2454+ Backport from mainline
2455+ 2011-12-08 Jakub Jelinek <jakub@redhat.com>
2456+
2457+ PR tree-optimization/51466
2458+ * gcc.c-torture/execute/pr51466.c: New test.
2459+
2460+ 2011-11-28 Jakub Jelinek <jakub@redhat.com>
2461+
2462+ PR tree-optimization/50078
2463+ * gcc.dg/pr50078.c: New test.
2464+
2465+2011-12-09 Kazu Hirata <kazu@codesourcery.com>
2466+
2467+ Backport from mainline:
2468+
2469+ 2011-12-05 Kazu Hirata <kazu@codesourcery.com>
2470+
2471+ PR target/51408
2472+ * gcc.dg/pr51408.c: New.
2473+
2474+2011-12-08 Tobias Burnus <burnus@net-b.de>
2475+
2476+ PR fortran/51448
2477+ * gfortran.dg/realloc_on_assign_8.f90: New.
2478+
2479+2011-12-08 Teresa Johnson <tejohnson@google.com>
2480+
2481+ * gcc.target/i386/movdi-rex64.c: Remove unnecessary
2482+ unused label.
2483+
2484+2011-12-08 Teresa Johnson <tejohnson@google.com>
2485+
2486+ * gcc.target/i386/movdi-rex64.c: Remove unnecessary
2487+ -Wwrite-strings option.
2488+
2489+2011-12-08 Teresa Johnson <tejohnson@google.com>
2490+
2491+ * gcc.target/i386/movdi-rex64.c: New.
2492+
2493+2011-12-08 Jakub Jelinek <jakub@redhat.com>
2494+
2495+ Backport from mainline
2496+ 2011-12-05 Jakub Jelinek <jakub@redhat.com>
2497+
2498+ PR debug/51410
2499+ * gcc.dg/debug/dwarf2/pr51410.c: New test.
2500+
2501+ PR c/51339
2502+ * gcc.dg/gomp/pr51339.c: New test.
2503+
2504+ 2011-12-05 Jakub Jelinek <jakub@redhat.com>
2505+ Eric Botcazou <ebotcazou@adacore.com>
2506+
2507+ PR middle-end/51323
2508+ PR middle-end/50074
2509+ * gcc.c-torture/execute/pr51323.c: New test.
2510+
2511+ 2011-11-30 Jakub Jelinek <jakub@redhat.com>
2512+
2513+ PR rtl-optimization/48721
2514+ * gcc.target/i386/pr48721.c: New test.
2515+
2516+2011-12-08 Eric Botcazou <ebotcazou@adacore.com>
2517+
2518+ * gcc.c-torture/execute/20111208-1.c: New test.
2519+
2520+ Backport from mainline
2521+ 2011-09-25 Eric Botcazou <ebotcazou@adacore.com>
2522+
2523+ * gnat.dg/frame_overflow.ads: New.
2524+ * gnat.dg/frame_overflow.adb: Adjust.
2525+ * gnat.dg/specs/addr1.ads: Likewise.
2526+
2527+2011-12-06 Tobias Burnus <burnus@net-b.de>
2528+
2529+ PR fortran/51435
2530+ * gfortran.dg/default_initialization_5.f90: New.
2531+
2532+2011-12-06 Martin Jambor <mjambor@suse.cz>
2533+
2534+ PR tree-optimization/50622
2535+ * g++.dg/tree-ssa/pr50622.C: New test.
2536+
2537+2011-12-04 Uros Bizjak <ubizjak@gmail.com>
2538+ Jérémie Detrey <Jeremie.Detrey@loria.fr>
2539+
2540+ PR target/51393
2541+ * gcc.target/i386/pr51393.c: New test.
2542+
2543+2011-12-03 Tobias Burnus <burnus@net-b.de>
2544+
2545+ PR fortran/50684
2546+ * gfortran.dg/move_alloc_8.f90: New.
2547+
2548+2011-11-25 Tobias Burnus <burnus@net-b.de>
2549+
2550+ PR fortran/50408
2551+ * gfortran.dg/whole_file_35.f90: New.
2552+
2553+2011-11-24 Tobias Burnus <burnus@net-b.de>
2554+
2555+ PR fortran/51218
2556+ * resolve.c (pure_subroutine): If called subroutine is
2557+ impure, unset implicit_pure.
2558+ (resolve_function): Move impure check to simplify code.
2559+
2560+2011-11-22 Paolo Carlini <paolo.carlini@oracle.com>
2561+
2562+ PR c++/51265
2563+ * g++.dg/cpp0x/decltype36.C: New.
2564+
2565+2011-11-19 Eric Botcazou <ebotcazou@adacore.com>
2566+
2567+ * gcc.dg/delay-slot-2.c: New test.
2568+
2569+2011-11-18 Joseph Myers <joseph@codesourcery.com>
2570+
2571+ * gcc.dg/cpp/assert4.c: Test __linux__, not __gnu_linux__.
2572+
2573+2011-11-18 Paolo Carlini <paolo.carlini@oracle.com>
2574+
2575+ PR c++/51150
2576+ * g++.dg/cpp0x/pr51150.C: New.
2577+
2578+2011-11-16 Richard Earnshaw <rearnsha@arm.com>
2579+ Bernd Schmidt <bernds@coudesourcery.com>
2580+ Sebastian Huber <sebastian.huber@embedded-brains.de>
2581+
2582+ PR target/49641
2583+ * gcc.target/arm/pr49641.c: New test.
2584+
2585+2011-11-10 Jakub Jelinek <jakub@redhat.com>
2586+
2587+ PR middle-end/51077
2588+ * gcc.c-torture/compile/pr51077.c: New test.
2589+
2590+2011-11-07 Jason Merrill <jason@redhat.com>
2591+
2592+ PR c++/50870
2593+ * g++.dg/cpp0x/decltype35.C: New.
2594+
2595+2011-11-04 Eric Botcazou <ebotcazou@adacore.com>
2596+
2597+ * g++.dg/other/offsetof7.C: New test.
2598+
2599+2011-11-02 Bernd Schmidt <bernds@codesourcery.com>
2600+
2601+ * gcc.c-torture/compile/20110907.c: New file.
2602+
2603+2011-10-29 Paolo Carlini <paolo.carlini@oracle.com>
2604+
2605+ PR c++/50901
2606+ * g++.dg/cpp0x/pr50901.C: New.
2607+
2608+2011-10-27 Uros Bizjak <ubizjak@gmail.com>
2609+ Steven G. Kargl <kargl@gcc.gnu.org>
2610+
2611+ PR target/50875
2612+ * gfortran.dg/pr50875.f90: New test.
6f35b5e4
AM
2613+
2614 2011-10-26 Release Manager
2615
2616 * GCC 4.6.2 released.
a966c5b5 2617@@ -9,9 +261,9 @@
6f35b5e4 2618
2e34247b 2619 2011-10-20 Uros Bizjak <ubizjak@gmail.com>
6f35b5e4 2620
2e34247b
AM
2621- * gcc.dg/ipa/ipa-sra-2.c: Add dg-require-effective-target
2622- non_strict_align.
2623- * gcc.dg/ipa/ipa-sra-6.c: Ditto.
2624+ * gcc.dg/ipa/ipa-sra-2.c: Add dg-require-effective-target
2625+ non_strict_align.
2626+ * gcc.dg/ipa/ipa-sra-6.c: Ditto.
6f35b5e4 2627
2e34247b 2628 2011-10-19 Jason Merrill <jason@redhat.com>
6f35b5e4 2629
2e34247b
AM
2630Index: gcc/testsuite/g++.dg/vect/pr51485.cc
2631===================================================================
2632--- gcc/testsuite/g++.dg/vect/pr51485.cc (.../tags/gcc_4_6_2_release) (wersja 0)
a966c5b5 2633+++ gcc/testsuite/g++.dg/vect/pr51485.cc (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
2634@@ -0,0 +1,14 @@
2635+/* { dg-do compile } */
2636+
2637+struct A { A (); unsigned int a; };
2638+double bar (A a) throw () __attribute__((pure));
2639+
2640+void
2641+foo (unsigned int x, double *y, A *z)
2642+{
2643+ unsigned int i;
2644+ for (i = 0; i < x; i++)
2645+ y[i] = bar (z[i]);
2646+}
2647+
2648+/* { dg-final { cleanup-tree-dump "vect" } } */
2649Index: gcc/testsuite/g++.dg/init/value10.C
2650===================================================================
2651--- gcc/testsuite/g++.dg/init/value10.C (.../tags/gcc_4_6_2_release) (wersja 0)
a966c5b5 2652+++ gcc/testsuite/g++.dg/init/value10.C (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
2653@@ -0,0 +1,27 @@
2654+// PR c++/51331
2655+// { dg-do run }
2656+
2657+struct A {
2658+ A(): x(10) {}
2659+ virtual ~A() {}
2660+
2661+ int x;
2662+};
2663+
2664+struct B: public virtual A {
2665+};
2666+
2667+struct C: public virtual A {
2668+};
2669+
2670+struct D: public B, virtual public C {
2671+ D(): B(), C() {} // note an explicit call to C() which is auto-generated
2672+};
2673+
2674+int main() {
2675+ D* d = new D();
2676+
2677+ // Crashes here with the following message:
2678+ // *** glibc detected *** ./test: free(): invalid next size (fast)
2679+ delete d;
2680+}
2681Index: gcc/testsuite/g++.dg/other/enum2.C
2682===================================================================
2683--- gcc/testsuite/g++.dg/other/enum2.C (.../tags/gcc_4_6_2_release) (wersja 0)
a966c5b5 2684+++ gcc/testsuite/g++.dg/other/enum2.C (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
2685@@ -0,0 +1,3 @@
2686+// PR c++/51248
2687+
2688+enum E { e = sizeof(const E*) };
2689Index: gcc/testsuite/g++.dg/other/offsetof7.C
2690===================================================================
2691--- gcc/testsuite/g++.dg/other/offsetof7.C (.../tags/gcc_4_6_2_release) (wersja 0)
a966c5b5 2692+++ gcc/testsuite/g++.dg/other/offsetof7.C (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
2693@@ -0,0 +1,17 @@
2694+// PR c++/50608
2695+// Testcase by <dberger@oubliette.org>
2696+// { dg-do compile }
2697+
2698+struct A {
2699+ int offset;
2700+};
2701+
2702+struct B: public A {
2703+};
2704+
2705+struct C {
2706+ A a;
2707+ B b;
2708+};
2709+
2710+int fails = __builtin_offsetof (C, b.offset);
2711Index: gcc/testsuite/g++.dg/tree-ssa/pr50622.C
2712===================================================================
2713--- gcc/testsuite/g++.dg/tree-ssa/pr50622.C (.../tags/gcc_4_6_2_release) (wersja 0)
a966c5b5 2714+++ gcc/testsuite/g++.dg/tree-ssa/pr50622.C (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
2715@@ -0,0 +1,30 @@
2716+// { dg-do compile }
2717+// { dg-options "-O2" }
2718+
2719+typedef __complex__ double Value;
2720+struct LorentzVector
2721+{
2722+ LorentzVector & operator+=(const LorentzVector & a) {
2723+ theX += a.theX;
2724+ theY += a.theY;
2725+ theZ += a.theZ;
2726+ theT += a.theT;
2727+ return *this;
2728+ }
2729+
2730+ Value theX;
2731+ Value theY;
2732+ Value theZ;
2733+ Value theT;
2734+};
2735+
2736+inline LorentzVector
2737+operator+(LorentzVector a, const LorentzVector & b) {
2738+ return a += b;
2739+}
2740+
2741+Value ex, et;
2742+LorentzVector sum() {
2743+ LorentzVector v1; v1.theX =ex; v1.theY =ex+et; v1.theZ =ex-et; v1.theT =et;
2744+ return v1+v1;
2745+}
2746Index: gcc/testsuite/g++.dg/cpp0x/auto31.C
2747===================================================================
2748--- gcc/testsuite/g++.dg/cpp0x/auto31.C (.../tags/gcc_4_6_2_release) (wersja 0)
a966c5b5 2749+++ gcc/testsuite/g++.dg/cpp0x/auto31.C (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
2750@@ -0,0 +1,12 @@
2751+// PR c++/51416
2752+// { dg-options "-std=c++0x" }
2753+
2754+template<typename T, typename... U> void foo(T, U... u)
2755+{
2756+ auto foo(u...); // { dg-error "auto" }
2757+}
2758+
2759+void bar()
2760+{
2761+ foo(0);
2762+}
2763Index: gcc/testsuite/g++.dg/cpp0x/pr50901.C
2764===================================================================
2765--- gcc/testsuite/g++.dg/cpp0x/pr50901.C (.../tags/gcc_4_6_2_release) (wersja 0)
a966c5b5 2766+++ gcc/testsuite/g++.dg/cpp0x/pr50901.C (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
2767@@ -0,0 +1,9 @@
2768+// { dg-options "-std=c++0x" }
2769+
2770+template<class T> int foo(int a)
2771+{
2772+ const unsigned b = a < 0 ? -a : a;
2773+ return 0;
2774+}
2775+
2776+int i = foo<float>(1);
2777Index: gcc/testsuite/g++.dg/cpp0x/variadic103.C
2778===================================================================
a966c5b5
AM
2779--- gcc/testsuite/g++.dg/cpp0x/variadic103.C (.../tags/gcc_4_6_2_release) (wersja 182722)
2780+++ gcc/testsuite/g++.dg/cpp0x/variadic103.C (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
2781@@ -5,7 +5,7 @@
2782
2783 template<class T, class... Args>
2784 void test() {
2785- T t(create<Args>()...); // { dg-error "unknown bound" }
2786+ T t(create<Args>()...); // { dg-error "incomplete" }
2787 (void) t;
2788 }
6f35b5e4 2789
2e34247b
AM
2790Index: gcc/testsuite/g++.dg/cpp0x/decltype35.C
2791===================================================================
2792--- gcc/testsuite/g++.dg/cpp0x/decltype35.C (.../tags/gcc_4_6_2_release) (wersja 0)
a966c5b5 2793+++ gcc/testsuite/g++.dg/cpp0x/decltype35.C (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
2794@@ -0,0 +1,15 @@
2795+// PR c++/50870
2796+// { dg-options -std=c++0x }
2797+
2798+template <class V>
2799+ struct impl
2800+ {
2801+ template <class T> static T create();
2802+ };
2803+
2804+template <class T, class U, class V, class
2805+ = decltype(impl<V>::template create<T>()
2806+ -> impl<V>::template create<U>())>
2807+struct tester { };
2808+
2809+tester<impl<float>*, int, float> ti;
2810Index: gcc/testsuite/g++.dg/cpp0x/decltype36.C
2811===================================================================
2812--- gcc/testsuite/g++.dg/cpp0x/decltype36.C (.../tags/gcc_4_6_2_release) (wersja 0)
a966c5b5 2813+++ gcc/testsuite/g++.dg/cpp0x/decltype36.C (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
2814@@ -0,0 +1,21 @@
2815+// PR c++/51265
2816+// { dg-options -std=c++0x }
2817+
2818+struct Funny
2819+{
2820+ int print(int);
2821+};
2822+
2823+template<typename X>
2824+void c();
2825+
2826+template<typename X, X ff>
2827+void xx()
2828+{
2829+ c<decltype(ff)>();
2830+}
2831+
2832+int main()
2833+{
2834+ xx<int(Funny::*)(int), &Funny::print>();
2835+}
2836Index: gcc/testsuite/g++.dg/cpp0x/pr51150.C
2837===================================================================
2838--- gcc/testsuite/g++.dg/cpp0x/pr51150.C (.../tags/gcc_4_6_2_release) (wersja 0)
a966c5b5 2839+++ gcc/testsuite/g++.dg/cpp0x/pr51150.C (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
2840@@ -0,0 +1,20 @@
2841+// PR c++/51150
2842+// { dg-options "-std=c++0x" }
2843+
2844+struct Clock {
2845+ double Now();
2846+};
2847+template <class T> void Foo(Clock* clock) {
2848+ const int now = clock->Now();
2849+}
2850+
2851+template void Foo<float>(Clock*);
2852+
2853+template <class T> void Boo(int val) {
2854+ const int now1 = (double)(val);
2855+ const int now2 = const_cast<double>(val); // { dg-error "invalid" }
2856+ const int now3 = static_cast<double>(val);
2857+ const int now4 = reinterpret_cast<double>(val); // { dg-error "invalid" }
2858+}
2859+
2860+template void Boo<float>(int);
2861Index: gcc/testsuite/g++.dg/cpp0x/rv-cast3.C
2862===================================================================
2863--- gcc/testsuite/g++.dg/cpp0x/rv-cast3.C (.../tags/gcc_4_6_2_release) (wersja 0)
a966c5b5 2864+++ gcc/testsuite/g++.dg/cpp0x/rv-cast3.C (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
2865@@ -0,0 +1,18 @@
2866+// PR c++/51406
2867+// { dg-do run }
2868+// { dg-options "-std=c++0x" }
2869+
2870+extern "C" int printf(const char *,...);
2871+extern "C" void abort();
2872+
2873+struct A { int a; A() : a(1) {} };
2874+struct B { int b; B() : b(2) {} };
2875+struct X : A, B {};
2876+
2877+int main() {
2878+ X x;
2879+ int a=static_cast<A&&>(x).a;
2880+ int b=static_cast<B&&>(x).b;
2881+ // printf ("%d %d\n", a, b);
2882+ if (a!=1 || b!=2) abort();
2883+}
2884Index: gcc/testsuite/g++.dg/cpp0x/rv-cast4.C
2885===================================================================
2886--- gcc/testsuite/g++.dg/cpp0x/rv-cast4.C (.../tags/gcc_4_6_2_release) (wersja 0)
a966c5b5 2887+++ gcc/testsuite/g++.dg/cpp0x/rv-cast4.C (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
2888@@ -0,0 +1,13 @@
2889+// PR c++/51161
2890+// { dg-options "-std=c++0x" }
2891+
2892+struct A{};
2893+struct B : A{};
2894+struct C : A{};
2895+struct D : B, C{};
2896+
2897+int main()
2898+{
2899+ D d;
2900+ static_cast<A &&>(d); // { dg-error "ambiguous" }
2901+}
2902Index: gcc/testsuite/g++.dg/torture/pr49720.C
2903===================================================================
2904--- gcc/testsuite/g++.dg/torture/pr49720.C (.../tags/gcc_4_6_2_release) (wersja 0)
a966c5b5 2905+++ gcc/testsuite/g++.dg/torture/pr49720.C (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
2906@@ -0,0 +1,8 @@
2907+/* { dg-do compile } */
2908+
2909+extern char t_start[], t_end[], t_size[];
2910+bool foo (void)
2911+{
2912+ long size = reinterpret_cast<long>(t_size);
2913+ return (size == t_end - t_start);
2914+}
2915Index: gcc/cp/typeck.c
2916===================================================================
a966c5b5
AM
2917--- gcc/cp/typeck.c (.../tags/gcc_4_6_2_release) (wersja 182722)
2918+++ gcc/cp/typeck.c (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
2919@@ -4835,9 +4835,7 @@
2920 && TREE_CONSTANT (TREE_OPERAND (val, 0)))
2921 {
2922 tree type = build_pointer_type (argtype);
2923- tree op0 = fold_convert (type, TREE_OPERAND (val, 0));
2924- tree op1 = fold_convert (sizetype, fold_offsetof (arg, val));
2925- return fold_build2 (POINTER_PLUS_EXPR, type, op0, op1);
2926+ return fold_convert (type, fold_offsetof_1 (arg));
2927 }
6f35b5e4 2928
2e34247b
AM
2929 /* Handle complex lvalues (when permitted)
2930@@ -5772,8 +5770,18 @@
2931 && reference_related_p (TREE_TYPE (type), intype)
2932 && (c_cast_p || at_least_as_qualified_p (TREE_TYPE (type), intype)))
2933 {
2934- expr = build_typed_address (expr, type);
2935- return convert_from_reference (expr);
2936+ /* Handle the lvalue case here by casting to lvalue reference and
2937+ then changing it to an rvalue reference. Casting an xvalue to
2938+ rvalue reference will be handled by the main code path. */
2939+ tree lref = cp_build_reference_type (TREE_TYPE (type), false);
2940+ result = (perform_direct_initialization_if_possible
2941+ (lref, expr, c_cast_p, complain));
2942+ result = cp_fold_convert (type, result);
2943+ /* Make sure we don't fold back down to a named rvalue reference,
2944+ because that would be an lvalue. */
2945+ if (DECL_P (result))
2946+ result = build1 (NON_LVALUE_EXPR, type, result);
2947+ return convert_from_reference (result);
2948 }
6f35b5e4 2949
2e34247b
AM
2950 /* Resolve overloaded address here rather than once in
2951Index: gcc/cp/init.c
2952===================================================================
a966c5b5
AM
2953--- gcc/cp/init.c (.../tags/gcc_4_6_2_release) (wersja 182722)
2954+++ gcc/cp/init.c (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
2955@@ -141,7 +141,9 @@
2956 zero-initialization does not simply mean filling the storage with
2957 zero bytes. FIELD_SIZE, if non-NULL, is the bit size of the field,
2958 subfields with bit positions at or above that bit size shouldn't
2959- be added. */
2960+ be added. Note that this only works when the result is assigned
2961+ to a base COMPONENT_REF; if we only have a pointer to the base subobject,
2962+ expand_assignment will end up clearing the full size of TYPE. */
2963
2964 static tree
2965 build_zero_init_1 (tree type, tree nelts, bool static_storage_p,
2966@@ -368,6 +370,12 @@
2967 tree
2968 build_value_init_noctor (tree type, tsubst_flags_t complain)
2969 {
2970+ if (!COMPLETE_TYPE_P (type))
2971+ {
2972+ if (complain & tf_error)
2973+ error ("value-initialization of incomplete type %qT", type);
2974+ return error_mark_node;
2975+ }
2976 if (CLASS_TYPE_P (type))
2977 {
2978 gcc_assert (!TYPE_NEEDS_CONSTRUCTING (type));
2979Index: gcc/cp/class.c
2980===================================================================
a966c5b5
AM
2981--- gcc/cp/class.c (.../tags/gcc_4_6_2_release) (wersja 182722)
2982+++ gcc/cp/class.c (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
2983@@ -464,7 +464,14 @@
2984 /* Is this the base field created by build_base_field? */
2985 if (TREE_CODE (field) == FIELD_DECL
2986 && DECL_FIELD_IS_BASE (field)
2987- && TREE_TYPE (field) == type)
2988+ && TREE_TYPE (field) == type
2989+ /* If we're looking for a field in the most-derived class,
2990+ also check the field offset; we can have two base fields
2991+ of the same type if one is an indirect virtual base and one
2992+ is a direct non-virtual base. */
2993+ && (BINFO_INHERITANCE_CHAIN (d_binfo)
2994+ || tree_int_cst_equal (byte_position (field),
2995+ BINFO_OFFSET (binfo))))
2996 {
2997 /* We don't use build_class_member_access_expr here, as that
2998 has unnecessary checks, and more importantly results in
2999@@ -541,6 +548,10 @@
3000 {
3001 tree pointer_type;
6f35b5e4 3002
2e34247b
AM
3003+ /* If this is a non-empty base, use a COMPONENT_REF. */
3004+ if (!is_empty_class (BINFO_TYPE (base)))
3005+ return build_simple_base_path (expr, base);
3006+
3007 pointer_type = build_pointer_type (expr_type);
6f35b5e4 3008
2e34247b
AM
3009 /* We use fold_build2 and fold_convert below to simplify the trees
3010Index: gcc/cp/decl.c
3011===================================================================
a966c5b5
AM
3012--- gcc/cp/decl.c (.../tags/gcc_4_6_2_release) (wersja 182722)
3013+++ gcc/cp/decl.c (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
3014@@ -11540,15 +11540,19 @@
3015 static void
3016 copy_type_enum (tree dst, tree src)
3017 {
3018- TYPE_MIN_VALUE (dst) = TYPE_MIN_VALUE (src);
3019- TYPE_MAX_VALUE (dst) = TYPE_MAX_VALUE (src);
3020- TYPE_SIZE (dst) = TYPE_SIZE (src);
3021- TYPE_SIZE_UNIT (dst) = TYPE_SIZE_UNIT (src);
3022- SET_TYPE_MODE (dst, TYPE_MODE (src));
3023- TYPE_PRECISION (dst) = TYPE_PRECISION (src);
3024- TYPE_ALIGN (dst) = TYPE_ALIGN (src);
3025- TYPE_USER_ALIGN (dst) = TYPE_USER_ALIGN (src);
3026- TYPE_UNSIGNED (dst) = TYPE_UNSIGNED (src);
3027+ tree t;
3028+ for (t = dst; t; t = TYPE_NEXT_VARIANT (t))
3029+ {
3030+ TYPE_MIN_VALUE (t) = TYPE_MIN_VALUE (src);
3031+ TYPE_MAX_VALUE (t) = TYPE_MAX_VALUE (src);
3032+ TYPE_SIZE (t) = TYPE_SIZE (src);
3033+ TYPE_SIZE_UNIT (t) = TYPE_SIZE_UNIT (src);
3034+ SET_TYPE_MODE (dst, TYPE_MODE (src));
3035+ TYPE_PRECISION (t) = TYPE_PRECISION (src);
3036+ TYPE_ALIGN (t) = TYPE_ALIGN (src);
3037+ TYPE_USER_ALIGN (t) = TYPE_USER_ALIGN (src);
3038+ TYPE_UNSIGNED (t) = TYPE_UNSIGNED (src);
3039+ }
3040 }
6f35b5e4 3041
2e34247b
AM
3042 /* Begin compiling the definition of an enumeration type.
3043@@ -11903,9 +11907,12 @@
3044 return;
3045 }
6f35b5e4 3046
2e34247b
AM
3047- /* Here there should not be any variants of this type. */
3048+ /* If this is a forward declaration, there should not be any variants,
3049+ though we can get a variant in the middle of an enum-specifier with
3050+ wacky code like 'enum E { e = sizeof(const E*) };' */
3051 gcc_assert (enumtype == TYPE_MAIN_VARIANT (enumtype)
3052- && !TYPE_NEXT_VARIANT (enumtype));
3053+ && (TYPE_VALUES (enumtype)
3054+ || !TYPE_NEXT_VARIANT (enumtype)));
3055 }
6f35b5e4 3056
2e34247b
AM
3057 /* Build and install a CONST_DECL for an enumeration constant of the
3058Index: gcc/cp/ChangeLog
3059===================================================================
a966c5b5
AM
3060--- gcc/cp/ChangeLog (.../tags/gcc_4_6_2_release) (wersja 182722)
3061+++ gcc/cp/ChangeLog (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
3062@@ -1,3 +1,57 @@
3063+2011-12-16 Jason Merrill <jason@redhat.com>
3064+
3065+ PR c++/51416
3066+ * init.c (build_value_init_noctor): Check for incomplete type.
3067+
3068+2011-12-16 Jason Merrill <jason@redhat.com>
3069+
3070+ PR c++/51331
3071+ * class.c (convert_to_base_statically): Just call
3072+ build_simple_base_path.
3073+ (build_simple_base_path): Check field offset.
3074+
3075+2011-12-14 Jason Merrill <jason@redhat.com>
3076+
3077+ PR c++/51248
3078+ * decl.c (copy_type_enum): Also update variants.
3079+ (finish_enum): Allow variants of complete enums.
3080+
3081+2011-12-13 Jason Merrill <jason@redhat.com>
3082+
3083+ PR c++/51406
3084+ PR c++/51161
3085+ * typeck.c (build_static_cast_1): Fix cast of lvalue to
3086+ base rvalue reference.
3087+
3088+2011-11-22 Paolo Carlini <paolo.carlini@oracle.com>
3089+
3090+ PR c++/51265
3091+ * semantics.c (finish_decltype_type): Handle PTRMEM_CST.
3092+
3093+2011-11-18 Paolo Carlini <paolo.carlini@oracle.com>
3094+
3095+ PR c++/51150
3096+ * pt.c (tsubst_copy_and_build): Handle FIX_TRUNC_EXPR.
3097+
3098+2011-11-07 Jason Merrill <jason@redhat.com>
3099+
3100+ PR c++/50870
3101+ * pt.c (tsubst_copy): Handle NAMESPACE_DECL.
3102+ (tsubst_copy_and_build) [COMPONENT_REF]: Handle a still-dependent
3103+ object.
3104+
3105+2011-11-04 Eric Botcazou <ebotcazou@adacore.com>
3106+
3107+ PR c++/50608
3108+ * semantics.c (finish_offsetof): Adjust call to fold_offsetof.
3109+ * typeck.c (cp_build_addr_expr_1): Call fold_offsetof_1.
3110+
3111+2011-10-29 Paolo Carlini <paolo.carlini@oracle.com>
3112+
3113+ PR c++/50901
3114+ * call.c (build_new_op_1): Handle ABS_EXPR together with the
3115+ other unary EXPR.
3116+
3117 2011-10-26 Release Manager
6f35b5e4 3118
2e34247b
AM
3119 * GCC 4.6.2 released.
3120Index: gcc/cp/pt.c
3121===================================================================
a966c5b5
AM
3122--- gcc/cp/pt.c (.../tags/gcc_4_6_2_release) (wersja 182722)
3123+++ gcc/cp/pt.c (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
3124@@ -11439,6 +11439,9 @@
3125 mark_used (t);
3126 return t;
6f35b5e4 3127
2e34247b
AM
3128+ case NAMESPACE_DECL:
3129+ return t;
3130+
3131 case OVERLOAD:
3132 /* An OVERLOAD will always be a non-dependent overload set; an
3133 overload set from function scope will just be represented with an
3134@@ -12704,6 +12707,10 @@
3135 return build_x_unary_op (TREE_CODE (t), RECUR (TREE_OPERAND (t, 0)),
3136 complain);
6f35b5e4 3137
2e34247b
AM
3138+ case FIX_TRUNC_EXPR:
3139+ return cp_build_unary_op (FIX_TRUNC_EXPR, RECUR (TREE_OPERAND (t, 0)),
3140+ 0, complain);
3141+
3142 case ADDR_EXPR:
3143 op1 = TREE_OPERAND (t, 0);
3144 if (TREE_CODE (op1) == LABEL_DECL)
3145@@ -13179,7 +13186,9 @@
3146 if (member == error_mark_node)
3147 return error_mark_node;
6f35b5e4 3148
2e34247b
AM
3149- if (object_type && !CLASS_TYPE_P (object_type))
3150+ if (type_dependent_expression_p (object))
3151+ /* We can't do much here. */;
3152+ else if (!CLASS_TYPE_P (object_type))
3153 {
3154 if (SCALAR_TYPE_P (object_type))
3155 {
3156Index: gcc/cp/semantics.c
3157===================================================================
a966c5b5
AM
3158--- gcc/cp/semantics.c (.../tags/gcc_4_6_2_release) (wersja 182722)
3159+++ gcc/cp/semantics.c (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
3160@@ -3348,7 +3348,7 @@
3161 }
3162 if (TREE_CODE (expr) == INDIRECT_REF && REFERENCE_REF_P (expr))
3163 expr = TREE_OPERAND (expr, 0);
3164- return fold_offsetof (expr, NULL_TREE);
3165+ return fold_offsetof (expr);
3166 }
6f35b5e4 3167
2e34247b
AM
3168 /* Replace the AGGR_INIT_EXPR at *TP with an equivalent CALL_EXPR. This
3169@@ -4927,8 +4927,9 @@
3170 gcc_unreachable ();
6f35b5e4 3171
2e34247b
AM
3172 case INTEGER_CST:
3173+ case PTRMEM_CST:
3174 /* We can get here when the id-expression refers to an
3175- enumerator. */
3176+ enumerator or non-type template parameter. */
3177 type = TREE_TYPE (expr);
3178 break;
6f35b5e4 3179
2e34247b
AM
3180Index: gcc/cp/call.c
3181===================================================================
a966c5b5
AM
3182--- gcc/cp/call.c (.../tags/gcc_4_6_2_release) (wersja 182722)
3183+++ gcc/cp/call.c (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
3184@@ -4996,6 +4996,7 @@
3185 case POSTDECREMENT_EXPR:
3186 case REALPART_EXPR:
3187 case IMAGPART_EXPR:
3188+ case ABS_EXPR:
3189 return cp_build_unary_op (code, arg1, candidates != 0, complain);
6f35b5e4 3190
2e34247b
AM
3191 case ARRAY_REF:
3192Index: gcc/lto-cgraph.c
3193===================================================================
a966c5b5
AM
3194--- gcc/lto-cgraph.c (.../tags/gcc_4_6_2_release) (wersja 182722)
3195+++ gcc/lto-cgraph.c (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
3196@@ -1792,9 +1792,9 @@
3197 {
3198 const struct lto_function_header *header =
3199 (const struct lto_function_header *) data;
3200- const int32_t cfg_offset = sizeof (struct lto_function_header);
3201- const int32_t main_offset = cfg_offset + header->cfg_size;
3202- const int32_t string_offset = main_offset + header->main_size;
3203+ const int cfg_offset = sizeof (struct lto_function_header);
3204+ const int main_offset = cfg_offset + header->cfg_size;
3205+ const int string_offset = main_offset + header->main_size;
3206 struct data_in *data_in;
3207 struct lto_input_block ib_main;
3208 unsigned int i;
3209Index: gcc/lto-streamer-out.c
3210===================================================================
a966c5b5
AM
3211--- gcc/lto-streamer-out.c (.../tags/gcc_4_6_2_release) (wersja 182722)
3212+++ gcc/lto-streamer-out.c (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
3213@@ -2408,7 +2408,7 @@
3214 enum gcc_plugin_symbol_kind kind;
3215 enum gcc_plugin_symbol_visibility visibility;
3216 int slot_num;
3217- uint64_t size;
3218+ unsigned HOST_WIDEST_INT size;
3219 const char *comdat;
3220 unsigned char c;
3221
3222@@ -2466,7 +2466,7 @@
3223 when symbol has attribute (visibility("hidden")) specified.
3224 targetm.binds_local_p check DECL_VISIBILITY_SPECIFIED and gets this
3225 right. */
3226-
3227+
3228 if (DECL_EXTERNAL (t)
3229 && !targetm.binds_local_p (t))
3230 visibility = GCCPV_DEFAULT;
3231@@ -2488,14 +2488,9 @@
3232 }
3233
3234 if (kind == GCCPK_COMMON
3235- && DECL_SIZE (t)
3236- && TREE_CODE (DECL_SIZE (t)) == INTEGER_CST)
3237- {
3238- size = (HOST_BITS_PER_WIDE_INT >= 64)
3239- ? (uint64_t) int_size_in_bytes (TREE_TYPE (t))
3240- : (((uint64_t) TREE_INT_CST_HIGH (DECL_SIZE_UNIT (t))) << 32)
3241- | TREE_INT_CST_LOW (DECL_SIZE_UNIT (t));
3242- }
3243+ && DECL_SIZE_UNIT (t)
3244+ && TREE_CODE (DECL_SIZE_UNIT (t)) == INTEGER_CST)
3245+ size = TREE_INT_CST_LOW (DECL_SIZE_UNIT (t));
3246 else
3247 size = 0;
6f35b5e4 3248
2e34247b
AM
3249Index: gcc/dwarf2out.c
3250===================================================================
a966c5b5
AM
3251--- gcc/dwarf2out.c (.../tags/gcc_4_6_2_release) (wersja 182722)
3252+++ gcc/dwarf2out.c (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
3253@@ -4431,6 +4431,11 @@
3254 const char *section; /* Section this loclist is relative to */
3255 dw_loc_descr_ref expr;
3256 hashval_t hash;
3257+ /* True if all addresses in this and subsequent lists are known to be
3258+ resolved. */
3259+ bool resolved_addr;
3260+ /* True if this list has been replaced by dw_loc_next. */
3261+ bool replaced;
3262 bool emitted;
3263 } dw_loc_list_node;
3264
3265@@ -6091,6 +6096,19 @@
3266 /* Table of decl location linked lists. */
3267 static GTY ((param_is (var_loc_list))) htab_t decl_loc_table;
3268
3269+/* A cached location list. */
3270+struct GTY (()) cached_dw_loc_list_def {
3271+ /* The DECL_UID of the decl that this entry describes. */
3272+ unsigned int decl_id;
3273+
3274+ /* The cached location list. */
3275+ dw_loc_list_ref loc_list;
3276+};
3277+typedef struct cached_dw_loc_list_def cached_dw_loc_list;
3278+
3279+/* Table of cached location lists. */
3280+static GTY ((param_is (cached_dw_loc_list))) htab_t cached_dw_loc_list_table;
3281+
3282 /* A pointer to the base of a list of references to DIE's that
3283 are uniquely identified by their tag, presence/absence of
3284 children DIE's, and list of attribute/value pairs. */
3285@@ -6439,7 +6457,7 @@
3286 static void insert_double (double_int, unsigned char *);
3287 static void insert_float (const_rtx, unsigned char *);
3288 static rtx rtl_for_decl_location (tree);
3289-static bool add_location_or_const_value_attribute (dw_die_ref, tree,
3290+static bool add_location_or_const_value_attribute (dw_die_ref, tree, bool,
3291 enum dwarf_attribute);
3292 static bool tree_add_const_value_attribute (dw_die_ref, tree);
3293 static bool tree_add_const_value_attribute_for_decl (dw_die_ref, tree);
3294@@ -8173,6 +8191,24 @@
3295 htab_find_with_hash (decl_loc_table, decl, DECL_UID (decl));
3296 }
6f35b5e4 3297
2e34247b
AM
3298+/* Returns a hash value for X (which really is a cached_dw_loc_list_list). */
3299+
3300+static hashval_t
3301+cached_dw_loc_list_table_hash (const void *x)
3302+{
3303+ return (hashval_t) ((const cached_dw_loc_list *) x)->decl_id;
3304+}
3305+
3306+/* Return nonzero if decl_id of cached_dw_loc_list X is the same as
3307+ UID of decl *Y. */
3308+
3309+static int
3310+cached_dw_loc_list_table_eq (const void *x, const void *y)
3311+{
3312+ return (((const cached_dw_loc_list *) x)->decl_id
3313+ == DECL_UID ((const_tree) y));
3314+}
3315+
3316 /* Equate a DIE to a particular declaration. */
3317
3318 static void
3319@@ -16995,15 +17031,22 @@
3320 these things can crop up in other ways also.) Note that one type of
3321 constant value which can be passed into an inlined function is a constant
3322 pointer. This can happen for example if an actual argument in an inlined
3323- function call evaluates to a compile-time constant address. */
3324+ function call evaluates to a compile-time constant address.
3325
3326+ CACHE_P is true if it is worth caching the location list for DECL,
3327+ so that future calls can reuse it rather than regenerate it from scratch.
3328+ This is true for BLOCK_NONLOCALIZED_VARS in inlined subroutines,
3329+ since we will need to refer to them each time the function is inlined. */
3330+
3331 static bool
3332-add_location_or_const_value_attribute (dw_die_ref die, tree decl,
3333+add_location_or_const_value_attribute (dw_die_ref die, tree decl, bool cache_p,
3334 enum dwarf_attribute attr)
3335 {
3336 rtx rtl;
3337 dw_loc_list_ref list;
3338 var_loc_list *loc_list;
3339+ cached_dw_loc_list *cache;
3340+ void **slot;
3341
3342 if (TREE_CODE (decl) == ERROR_MARK)
3343 return false;
3344@@ -17040,7 +17083,33 @@
3345 && add_const_value_attribute (die, rtl))
3346 return true;
3347 }
3348- list = loc_list_from_tree (decl, decl_by_reference_p (decl) ? 0 : 2);
3349+ /* If this decl is from BLOCK_NONLOCALIZED_VARS, we might need its
3350+ list several times. See if we've already cached the contents. */
3351+ list = NULL;
3352+ if (loc_list == NULL || cached_dw_loc_list_table == NULL)
3353+ cache_p = false;
3354+ if (cache_p)
3355+ {
3356+ cache = (cached_dw_loc_list *)
3357+ htab_find_with_hash (cached_dw_loc_list_table, decl, DECL_UID (decl));
3358+ if (cache)
3359+ list = cache->loc_list;
3360+ }
3361+ if (list == NULL)
3362+ {
3363+ list = loc_list_from_tree (decl, decl_by_reference_p (decl) ? 0 : 2);
3364+ /* It is usually worth caching this result if the decl is from
3365+ BLOCK_NONLOCALIZED_VARS and if the list has at least two elements. */
3366+ if (cache_p && list && list->dw_loc_next)
3367+ {
3368+ slot = htab_find_slot_with_hash (cached_dw_loc_list_table, decl,
3369+ DECL_UID (decl), INSERT);
3370+ cache = ggc_alloc_cleared_cached_dw_loc_list ();
3371+ cache->decl_id = DECL_UID (decl);
3372+ cache->loc_list = list;
3373+ *slot = cache;
3374+ }
3375+ }
3376 if (list)
3377 {
3378 add_AT_location_description (die, attr, list);
3379@@ -18738,7 +18807,7 @@
3380 equate_decl_number_to_die (node, parm_die);
3381 if (! DECL_ABSTRACT (node_or_origin))
3382 add_location_or_const_value_attribute (parm_die, node_or_origin,
3383- DW_AT_location);
3384+ node == NULL, DW_AT_location);
6f35b5e4 3385
2e34247b 3386 break;
6f35b5e4 3387
2e34247b
AM
3388@@ -18923,6 +18992,7 @@
3389 tree context;
3390 int was_abstract;
3391 htab_t old_decl_loc_table;
3392+ htab_t old_cached_dw_loc_list_table;
3393
3394 /* Make sure we have the actual abstract inline, not a clone. */
3395 decl = DECL_ORIGIN (decl);
3396@@ -18937,6 +19007,8 @@
3397 get locations in abstract instantces. */
3398 old_decl_loc_table = decl_loc_table;
3399 decl_loc_table = NULL;
3400+ old_cached_dw_loc_list_table = cached_dw_loc_list_table;
3401+ cached_dw_loc_list_table = NULL;
3402
3403 /* Be sure we've emitted the in-class declaration DIE (if any) first, so
3404 we don't get confused by DECL_ABSTRACT. */
3405@@ -18961,6 +19033,7 @@
3406
3407 current_function_decl = save_fn;
3408 decl_loc_table = old_decl_loc_table;
3409+ cached_dw_loc_list_table = old_cached_dw_loc_list_table;
3410 pop_cfun ();
3411 }
6f35b5e4 3412
2e34247b
AM
3413@@ -19745,9 +19818,8 @@
3414 && !TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl_or_origin)))
3415 defer_location (decl_or_origin, var_die);
3416 else
3417- add_location_or_const_value_attribute (var_die,
3418- decl_or_origin,
3419- DW_AT_location);
3420+ add_location_or_const_value_attribute (var_die, decl_or_origin,
3421+ decl == NULL, DW_AT_location);
3422 add_pubname (decl_or_origin, var_die);
3423 }
3424 else
3425@@ -21534,6 +21606,7 @@
3426 dwarf2out_decl (decl);
6f35b5e4 3427
2e34247b
AM
3428 htab_empty (decl_loc_table);
3429+ htab_empty (cached_dw_loc_list_table);
3430 }
6f35b5e4 3431
2e34247b
AM
3432 /* Output a marker (i.e. a label) for the beginning of the generated code for
3433@@ -22267,6 +22340,11 @@
3434 decl_loc_table = htab_create_ggc (10, decl_loc_table_hash,
3435 decl_loc_table_eq, NULL);
6f35b5e4 3436
2e34247b
AM
3437+ /* Allocate the cached_dw_loc_list_table. */
3438+ cached_dw_loc_list_table
3439+ = htab_create_ggc (10, cached_dw_loc_list_table_hash,
3440+ cached_dw_loc_list_table_eq, NULL);
3441+
3442 /* Allocate the initial hunk of the decl_scope_table. */
3443 decl_scope_table = VEC_alloc (tree, gc, 256);
6f35b5e4 3444
2e34247b
AM
3445@@ -22907,30 +22985,53 @@
3446 {
3447 dw_die_ref c;
3448 dw_attr_ref a;
3449- dw_loc_list_ref *curr;
3450+ dw_loc_list_ref *curr, *start, loc;
3451 unsigned ix;
3452
3453 FOR_EACH_VEC_ELT (dw_attr_node, die->die_attr, ix, a)
3454 switch (AT_class (a))
3455 {
3456 case dw_val_class_loc_list:
3457- curr = AT_loc_list_ptr (a);
3458- while (*curr)
3459+ start = curr = AT_loc_list_ptr (a);
3460+ loc = *curr;
3461+ gcc_assert (loc);
3462+ /* The same list can be referenced more than once. See if we have
3463+ already recorded the result from a previous pass. */
3464+ if (loc->replaced)
3465+ *curr = loc->dw_loc_next;
3466+ else if (!loc->resolved_addr)
3467 {
3468- if (!resolve_addr_in_expr ((*curr)->expr))
3469+ /* As things stand, we do not expect or allow one die to
3470+ reference a suffix of another die's location list chain.
3471+ References must be identical or completely separate.
3472+ There is therefore no need to cache the result of this
3473+ pass on any list other than the first; doing so
3474+ would lead to unnecessary writes. */
3475+ while (*curr)
3476 {
3477- dw_loc_list_ref next = (*curr)->dw_loc_next;
3478- if (next && (*curr)->ll_symbol)
3479+ gcc_assert (!(*curr)->replaced && !(*curr)->resolved_addr);
3480+ if (!resolve_addr_in_expr ((*curr)->expr))
3481 {
3482- gcc_assert (!next->ll_symbol);
3483- next->ll_symbol = (*curr)->ll_symbol;
3484+ dw_loc_list_ref next = (*curr)->dw_loc_next;
3485+ if (next && (*curr)->ll_symbol)
3486+ {
3487+ gcc_assert (!next->ll_symbol);
3488+ next->ll_symbol = (*curr)->ll_symbol;
3489+ }
3490+ *curr = next;
3491 }
3492- *curr = next;
3493+ else
3494+ curr = &(*curr)->dw_loc_next;
3495 }
3496+ if (loc == *start)
3497+ loc->resolved_addr = 1;
3498 else
3499- curr = &(*curr)->dw_loc_next;
3500+ {
3501+ loc->replaced = 1;
3502+ loc->dw_loc_next = *start;
3503+ }
3504 }
3505- if (!AT_loc_list (a))
3506+ if (!*start)
3507 {
3508 remove_AT (die, a->dw_attr);
3509 ix--;
3510@@ -23359,6 +23460,7 @@
3511 add_location_or_const_value_attribute (
3512 VEC_index (deferred_locations, deferred_locations_list, i)->die,
3513 VEC_index (deferred_locations, deferred_locations_list, i)->variable,
3514+ false,
3515 DW_AT_location);
3516 }
6f35b5e4 3517
a966c5b5
AM
3518Index: gcc/expr.c
3519===================================================================
3520--- gcc/expr.c (.../tags/gcc_4_6_2_release) (wersja 182722)
3521+++ gcc/expr.c (.../branches/gcc-4_6-branch) (wersja 182722)
3522@@ -9189,8 +9189,16 @@
3523 && modifier != EXPAND_CONST_ADDRESS
3524 && modifier != EXPAND_INITIALIZER)
3525 /* If the field is volatile, we always want an aligned
3526- access. */
3527- || (volatilep && flag_strict_volatile_bitfields > 0)
3528+ access. Do this in following two situations:
3529+ 1. the access is not already naturally
3530+ aligned, otherwise "normal" (non-bitfield) volatile fields
3531+ become non-addressable.
3532+ 2. the bitsize is narrower than the access size. Need
3533+ to extract bitfields from the access. */
3534+ || (volatilep && flag_strict_volatile_bitfields > 0
3535+ && (bitpos % GET_MODE_ALIGNMENT (mode) != 0
3536+ || (mode1 != BLKmode
3537+ && bitsize < GET_MODE_SIZE (mode1) * BITS_PER_UNIT)))
3538 /* If the field isn't aligned enough to fetch as a memref,
3539 fetch it as a bit field. */
3540 || (mode1 != BLKmode
2e34247b
AM
3541Index: gcc/ada/mlib-tgt-specific-darwin.adb
3542===================================================================
a966c5b5
AM
3543--- gcc/ada/mlib-tgt-specific-darwin.adb (.../tags/gcc_4_6_2_release) (wersja 182722)
3544+++ gcc/ada/mlib-tgt-specific-darwin.adb (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b 3545@@ -36,8 +36,6 @@
6f35b5e4 3546
2e34247b 3547 -- Non default subprograms
6f35b5e4 3548
2e34247b
AM
3549- function Archive_Indexer_Options return String_List_Access;
3550-
3551 procedure Build_Dynamic_Library
3552 (Ofiles : Argument_List;
3553 Options : Argument_List;
3554@@ -67,15 +65,6 @@
3555 (1 => Flat_Namespace'Access,
3556 2 => Shared_Libgcc'Access);
3557
3558- -----------------------------
3559- -- Archive_Indexer_Options --
3560- -----------------------------
3561-
3562- function Archive_Indexer_Options return String_List_Access is
3563- begin
3564- return new String_List'(1 => new String'("-c"));
3565- end Archive_Indexer_Options;
3566-
3567 ---------------------------
3568 -- Build_Dynamic_Library --
3569 ---------------------------
3570@@ -180,7 +169,6 @@
3571 end Is_Archive_Ext;
3572
3573 begin
3574- Archive_Indexer_Options_Ptr := Archive_Indexer_Options'Access;
3575 Build_Dynamic_Library_Ptr := Build_Dynamic_Library'Access;
3576 DLL_Ext_Ptr := DLL_Ext'Access;
3577 Dynamic_Option_Ptr := Dynamic_Option'Access;
3578Index: gcc/ada/init.c
3579===================================================================
a966c5b5
AM
3580--- gcc/ada/init.c (.../tags/gcc_4_6_2_release) (wersja 182722)
3581+++ gcc/ada/init.c (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
3582@@ -2216,12 +2216,33 @@
3583 return 0;
3584 }
6f35b5e4 3585
2e34247b
AM
3586+#define HAVE_GNAT_ADJUST_CONTEXT_FOR_RAISE
3587+
3588+void
3589+__gnat_adjust_context_for_raise (int signo ATTRIBUTE_UNUSED,
3590+ void *ucontext ATTRIBUTE_UNUSED)
3591+{
3592+#if defined (__x86_64__)
3593+ /* Work around radar #10302855/pr50678, where the unwinders (libunwind or
3594+ libgcc_s depending on the system revision) and the DWARF unwind data for
3595+ the sigtramp have different ideas about register numbering (causing rbx
3596+ and rdx to be transposed).. */
3597+ ucontext_t *uc = (ucontext_t *)ucontext ;
3598+ unsigned long t = uc->uc_mcontext->__ss.__rbx;
3599+
3600+ uc->uc_mcontext->__ss.__rbx = uc->uc_mcontext->__ss.__rdx;
3601+ uc->uc_mcontext->__ss.__rdx = t;
3602+#endif
3603+}
3604+
3605 static void
3606-__gnat_error_handler (int sig, siginfo_t *si, void *ucontext ATTRIBUTE_UNUSED)
3607+__gnat_error_handler (int sig, siginfo_t *si, void *ucontext)
3608 {
3609 struct Exception_Data *exception;
3610 const char *msg;
6f35b5e4 3611
2e34247b
AM
3612+ __gnat_adjust_context_for_raise (sig, ucontext);
3613+
3614 switch (sig)
3615 {
3616 case SIGSEGV:
3617Index: gcc/ada/ChangeLog
3618===================================================================
a966c5b5
AM
3619--- gcc/ada/ChangeLog (.../tags/gcc_4_6_2_release) (wersja 182722)
3620+++ gcc/ada/ChangeLog (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
3621@@ -1,3 +1,42 @@
3622+2011-12-08 Eric Botcazou <ebotcazou@adacore.com>
3623+
3624+ PR tree-optimization/51315
3625+ Backport from mainline
3626+ 2011-09-25 Eric Botcazou <ebotcazou@adacore.com>
3627+
3628+ * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Do not promote
3629+ the alignment if this doesn't prevent BLKmode access to the object.
3630+
3631+2011-11-13 Iain Sandoe <iains@gcc.gnu.org>
3632+
3633+ Backport from mainline r181474
3634+ PR target/50678
3635+ * init.c (__gnat_error_handler) [Darwin]: Move work-around to the
3636+ bug filed as radar #10302855 from __gnat_error_handler ...
3637+ ... to (__gnat_adjust_context_for_raise) [Darwin]: New.
3638+ (HAVE_GNAT_ADJUST_CONTEXT_FOR_RAISE) [Darwin]: Define.
3639+ (__gnat_error_handler) [Darwin]: Use __gnat_adjust_context_for_raise.
3640+
3641+2011-11-18 Tristan Gingold <gingold@adacore.com>
3642+ Iain Sandoe <iains@gcc.gnu.org>
3643+
3644+ PR target/49992
3645+ * mlib-tgt-specific-darwin.adb (Archive_Indexer_Options): Remove.
3646+ * gcc-interface/Makefile.in (darwin): Remove ranlib special-casing
3647+ for Darwin.
3648+
3649+2011-11-13 Iain Sandoe <iains@gcc.gnu.org>
3650+
3651+ Backport from mainline r181319
3652+ * gcc-interface/Makefile.in (stamp-gnatlib-$(RTSDIR)): Don't link
3653+ s-oscons.ads.
3654+ (OSCONS_CPP, OSCONS_EXTRACT): New.
3655+ (./bldtools/oscons/xoscons): New Target.
3656+ ($(RTSDIR)/s-oscons.ads): New Target.
3657+ (gnatlib): Depend on $(RTSDIR)/s-oscons.ads.
3658+ * Make-generated.in: Remove machinery to generate xoscons and
3659+ ada/s-oscons.ads.
3660+
3661 2011-10-26 Release Manager
6f35b5e4 3662
2e34247b
AM
3663 * GCC 4.6.2 released.
3664Index: gcc/ada/gcc-interface/Makefile.in
3665===================================================================
a966c5b5
AM
3666--- gcc/ada/gcc-interface/Makefile.in (.../tags/gcc_4_6_2_release) (wersja 182722)
3667+++ gcc/ada/gcc-interface/Makefile.in (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
3668@@ -2189,7 +2189,6 @@
3669
3670 EH_MECHANISM=-gcc
3671 GNATLIB_SHARED = gnatlib-shared-darwin
3672- RANLIB = ranlib -c
3673 GMEM_LIB = gmemlib
3674 LIBRARY_VERSION := $(LIB_VERSION)
3675 soext = .dylib
3676@@ -2447,21 +2446,52 @@
3677 $(foreach PAIR,$(LIBGNAT_TARGET_PAIRS), \
3678 $(LN_S) $(fsrcpfx)ada/$(word 2,$(subst <, ,$(PAIR))) \
3679 $(RTSDIR)/$(word 1,$(subst <, ,$(PAIR)));)
3680-# Copy generated target dependent sources
3681- $(RM) $(RTSDIR)/s-oscons.ads
3682- (cd $(RTSDIR); $(LN_S) ../s-oscons.ads s-oscons.ads)
3683+# Copy tsystem.h
3684+ $(CP) $(srcdir)/tsystem.h $(RTSDIR)
3685 $(RM) ../stamp-gnatlib-$(RTSDIR)
3686 touch ../stamp-gnatlib1-$(RTSDIR)
3687
3688 # GNULLI End #############################################################
3689
3690+ifeq ($(strip $(filter-out alpha64 ia64 dec hp vms% openvms% alphavms%,$(subst -, ,$(host)))),)
3691+OSCONS_CPP=../../$(DECC) -E /comment=as_is -DNATIVE \
3692+ -DTARGET='""$(target)""' $(fsrcpfx)ada/s-oscons-tmplt.c
3693+
3694+OSCONS_EXTRACT=../../$(DECC) -DNATIVE \
3695+ -DTARGET='""$(target)""' $(fsrcpfx)ada/s-oscons-tmplt.c ; \
3696+ ld -o s-oscons-tmplt.exe s-oscons-tmplt.obj; \
3697+ ./s-oscons-tmplt.exe > s-oscons-tmplt.s
3698+
3699+else
3700+# GCC_FOR_TARGET has paths relative to the gcc directory, so we need to adjust
3701+# for running it from $(RTSDIR)
3702+OSCONS_CC=`echo "$(GCC_FOR_TARGET)" \
3703+ | sed -e 's^\./xgcc^../../xgcc^' -e 's^-B./^-B../../^'`
3704+OSCONS_CPP=$(OSCONS_CC) $(GNATLIBCFLAGS) -E -C \
3705+ -DTARGET=\"$(target)\" $(fsrcpfx)ada/s-oscons-tmplt.c > s-oscons-tmplt.i
3706+OSCONS_EXTRACT=$(OSCONS_CC) -S s-oscons-tmplt.i
3707+endif
3708+
3709+./bldtools/oscons/xoscons: xoscons.adb xutil.ads xutil.adb
3710+ -$(MKDIR) ./bldtools/oscons
3711+ $(RM) $(addprefix ./bldtools/oscons/,$(notdir $^))
3712+ $(CP) $^ ./bldtools/oscons
3713+ (cd ./bldtools/oscons ; gnatmake -q xoscons)
3714+
3715+$(RTSDIR)/s-oscons.ads: ../stamp-gnatlib1-$(RTSDIR) s-oscons-tmplt.c gsocket.h ./bldtools/oscons/xoscons
3716+ $(RM) $(RTSDIR)/s-oscons-tmplt.i $(RTSDIR)/s-oscons-tmplt.s
3717+ (cd $(RTSDIR) ; \
3718+ $(OSCONS_CPP) ; \
3719+ $(OSCONS_EXTRACT) ; \
3720+ ../bldtools/oscons/xoscons)
3721+
3722 # Don't use semicolon separated shell commands that involve list expansions.
3723 # The semicolon triggers a call to DCL on VMS and DCL can't handle command
3724 # line lengths in excess of 256 characters.
3725 # Example: cd $(RTSDIR); ar rc libfoo.a $(LONG_LIST_OF_OBJS)
3726 # is guaranteed to overflow the buffer.
3727
3728-gnatlib: ../stamp-gnatlib1-$(RTSDIR) ../stamp-gnatlib2-$(RTSDIR)
3729+gnatlib: ../stamp-gnatlib1-$(RTSDIR) ../stamp-gnatlib2-$(RTSDIR) $(RTSDIR)/s-oscons.ads
3730 $(MAKE) -C $(RTSDIR) \
3731 CC="`echo \"$(GCC_FOR_TARGET)\" \
3732 | sed -e 's,\./xgcc,../../xgcc,' -e 's,-B\./,-B../../,'`" \
3733Index: gcc/ada/gcc-interface/decl.c
3734===================================================================
a966c5b5
AM
3735--- gcc/ada/gcc-interface/decl.c (.../tags/gcc_4_6_2_release) (wersja 182722)
3736+++ gcc/ada/gcc-interface/decl.c (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
3737@@ -808,16 +808,30 @@
3738 && No (Address_Clause (gnat_entity))))
3739 && TREE_CODE (TYPE_SIZE (gnu_type)) == INTEGER_CST)
3740 {
3741- /* No point in jumping through all the hoops needed in order
3742+ unsigned int size_cap, align_cap;
3743+
3744+ /* No point in promoting the alignment if this doesn't prevent
3745+ BLKmode access to the object, in particular block copy, as
3746+ this will for example disable the NRV optimization for it.
3747+ No point in jumping through all the hoops needed in order
3748 to support BIGGEST_ALIGNMENT if we don't really have to.
3749 So we cap to the smallest alignment that corresponds to
3750 a known efficient memory access pattern of the target. */
3751- unsigned int align_cap = Is_Atomic (gnat_entity)
3752- ? BIGGEST_ALIGNMENT
3753- : get_mode_alignment (ptr_mode);
3754+ if (Is_Atomic (gnat_entity))
3755+ {
3756+ size_cap = UINT_MAX;
3757+ align_cap = BIGGEST_ALIGNMENT;
3758+ }
3759+ else
3760+ {
3761+ size_cap = MAX_FIXED_MODE_SIZE;
3762+ align_cap = get_mode_alignment (ptr_mode);
3763+ }
3764
3765 if (!host_integerp (TYPE_SIZE (gnu_type), 1)
3766- || compare_tree_int (TYPE_SIZE (gnu_type), align_cap) >= 0)
3767+ || compare_tree_int (TYPE_SIZE (gnu_type), size_cap) > 0)
3768+ align = 0;
3769+ else if (compare_tree_int (TYPE_SIZE (gnu_type), align_cap) > 0)
3770 align = align_cap;
3771 else
3772 align = ceil_alignment (tree_low_cst (TYPE_SIZE (gnu_type), 1));
3773Index: gcc/ada/Make-generated.in
3774===================================================================
a966c5b5
AM
3775--- gcc/ada/Make-generated.in (.../tags/gcc_4_6_2_release) (wersja 182722)
3776+++ gcc/ada/Make-generated.in (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
3777@@ -64,37 +64,6 @@
3778 $(CP) $^ $(ADA_GEN_SUBDIR)/bldtools/nmake_s
3779 (cd $(ADA_GEN_SUBDIR)/bldtools/nmake_s; gnatmake -q xnmake ; ./xnmake -s ../../nmake.ads )
3780
3781-ifeq ($(strip $(filter-out alpha64 ia64 dec hp vms% openvms% alphavms%,$(subst -, ,$(host)))),)
3782-OSCONS_CPP=../../../$(DECC) -E /comment=as_is -DNATIVE \
3783- -DTARGET='""$(target)""' s-oscons-tmplt.c
3784-
3785-OSCONS_EXTRACT=../../../$(DECC) -DNATIVE \
3786- -DTARGET='""$(target)""' s-oscons-tmplt.c ; \
3787- ld -o s-oscons-tmplt.exe s-oscons-tmplt.obj; \
3788- ./s-oscons-tmplt.exe > s-oscons-tmplt.s
3789-
3790-else
3791-# GCC_FOR_TARGET has paths relative to the gcc directory, so we need to ajust
3792-# for running it from $(ADA_GEN_SUBDIR)/bldtools/oscons
3793-OSCONS_CC=`echo "$(GCC_FOR_TARGET)" \
3794- | sed -e 's^\./xgcc^../../../xgcc^' -e 's^-B./^-B../../../^'`
3795-OSCONS_CPP=$(OSCONS_CC) $(GNATLIBCFLAGS) -E -C \
3796- -DTARGET=\"$(target)\" s-oscons-tmplt.c > s-oscons-tmplt.i
3797-OSCONS_EXTRACT=$(OSCONS_CC) -S s-oscons-tmplt.i
3798-endif
3799-
3800-$(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
3801- -$(MKDIR) $(ADA_GEN_SUBDIR)/bldtools/oscons
3802- $(RM) $(addprefix $(ADA_GEN_SUBDIR)/bldtools/oscons/,$(notdir $^))
3803- $(CP) $^ $(ADA_GEN_SUBDIR)/bldtools/oscons
3804- (cd $(ADA_GEN_SUBDIR)/bldtools/oscons ; gnatmake -q xoscons ; \
3805- $(RM) s-oscons-tmplt.i s-oscons-tmplt.s ; \
3806- $(OSCONS_CPP) ; \
3807- $(OSCONS_EXTRACT) ; \
3808- ./xoscons ; \
3809- $(RM) ../../s-oscons.ads ; \
3810- $(CP) s-oscons.ads s-oscons.h ../../)
3811-
3812 $(ADA_GEN_SUBDIR)/sdefault.adb: $(ADA_GEN_SUBDIR)/stamp-sdefault ; @true
3813 $(ADA_GEN_SUBDIR)/stamp-sdefault : $(srcdir)/version.c Makefile
3814 $(ECHO) "pragma Style_Checks (Off);" >tmp-sdefault.adb
3815Index: gcc/lto-streamer-in.c
3816===================================================================
a966c5b5
AM
3817--- gcc/lto-streamer-in.c (.../tags/gcc_4_6_2_release) (wersja 182722)
3818+++ gcc/lto-streamer-in.c (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
3819@@ -1366,9 +1366,9 @@
3820 {
3821 const struct lto_function_header *header;
3822 struct data_in *data_in;
3823- int32_t cfg_offset;
3824- int32_t main_offset;
3825- int32_t string_offset;
3826+ int cfg_offset;
3827+ int main_offset;
3828+ int string_offset;
3829 struct lto_input_block ib_cfg;
3830 struct lto_input_block ib_main;
3831
3832Index: gcc/c-decl.c
3833===================================================================
a966c5b5
AM
3834--- gcc/c-decl.c (.../tags/gcc_4_6_2_release) (wersja 182722)
3835+++ gcc/c-decl.c (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b 3836@@ -721,7 +721,7 @@
6f35b5e4 3837
2e34247b 3838 complete_array_type (&TREE_TYPE (decl), NULL_TREE, true);
6f35b5e4 3839
2e34247b
AM
3840- layout_decl (decl, 0);
3841+ relayout_decl (decl);
3842 }
3843 }
3844 }
3845@@ -1200,7 +1200,7 @@
3846 DECL_CHAIN (p) = BLOCK_VARS (block);
3847 BLOCK_VARS (block) = p;
3848 }
3849- else if (VAR_OR_FUNCTION_DECL_P (p))
3850+ else if (VAR_OR_FUNCTION_DECL_P (p) && scope != file_scope)
3851 {
3852 /* For block local externs add a special
3853 DECL_EXTERNAL decl for debug info generation. */
3854@@ -4261,7 +4261,7 @@
3855 if (DECL_INITIAL (decl))
3856 TREE_TYPE (DECL_INITIAL (decl)) = type;
3857
3858- layout_decl (decl, 0);
3859+ relayout_decl (decl);
3860 }
6f35b5e4 3861
2e34247b
AM
3862 if (TREE_CODE (decl) == VAR_DECL)
3863Index: gcc/fortran/trans-array.c
3864===================================================================
a966c5b5
AM
3865--- gcc/fortran/trans-array.c (.../tags/gcc_4_6_2_release) (wersja 182722)
3866+++ gcc/fortran/trans-array.c (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
3867@@ -6772,8 +6772,17 @@
3868 gfc_array_index_type, cond,
3869 lbound, gfc_index_one_node);
3870 }
3871- else if (expr->expr_type == EXPR_VARIABLE)
3872+
3873+ if (expr->expr_type == EXPR_FUNCTION)
3874 {
3875+ /* A conversion function, so use the argument. */
3876+ gcc_assert (expr->value.function.isym
3877+ && expr->value.function.isym->conversion);
3878+ expr = expr->value.function.actual->expr;
3879+ }
3880+
3881+ if (expr->expr_type == EXPR_VARIABLE)
3882+ {
3883 tmp = TREE_TYPE (expr->symtree->n.sym->backend_decl);
3884 for (ref = expr->ref; ref; ref = ref->next)
3885 {
3886@@ -6785,15 +6794,6 @@
3887 }
3888 return GFC_TYPE_ARRAY_LBOUND(tmp, dim);
3889 }
3890- else if (expr->expr_type == EXPR_FUNCTION)
3891- {
3892- /* A conversion function, so use the argument. */
3893- expr = expr->value.function.actual->expr;
3894- if (expr->expr_type != EXPR_VARIABLE)
3895- return gfc_index_one_node;
3896- desc = TREE_TYPE (expr->symtree->n.sym->backend_decl);
3897- return get_std_lbound (expr, desc, dim, assumed_size);
3898- }
3899
3900 return gfc_index_one_node;
3901 }
3902Index: gcc/fortran/ChangeLog
3903===================================================================
a966c5b5
AM
3904--- gcc/fortran/ChangeLog (.../tags/gcc_4_6_2_release) (wersja 182722)
3905+++ gcc/fortran/ChangeLog (.../branches/gcc-4_6-branch) (wersja 182722)
3906@@ -1,3 +1,73 @@
3907+2011-12-22 Toon Moene <toon@moene.org>
3908+
3909+ PR fortran/51310
3910+ * resolve.c (build_default_init_expr): Allow non-allocatable,
3911+ non-compile-time-constant-shape arrays to have a default
3912+ initializer.
3913+ * invoke.texi: Delete the restriction on automatic arrays not
3914+ being initialized by -finit-<type>=<constant>.
3915+
2e34247b
AM
3916+2011-12-15 Tobias Burnus <burnus@net-b.de>
3917+
3918+ PR fortran/51550
3919+ PR fortran/47545
3920+ PR fortran/49050
3921+ PR fortran/51075
3922+ * resolve.c (resolve_fl_derived0): Print not-implemented error
3923+ for deferred-length character components.
3924+
3925+2011-12-11 Tobias Burnus <burnus@net-b.de>
3926+
3927+ PR fortran/50923
3928+ * trans-decl.c (generate_local_decl): Set TREE_NO_WARNING only
3929+ if the front end has printed a warning.
3930+ (gfc_generate_function_code): Fix unset-result warning.
3931+
3932+2011-12-11 Thomas Koenig <tkoenig@gcc.gnu.org>
3933+
3934+ PR fortran/51338
3935+ Backport from trunk
3936+ * dependency.c (are_identical_variables): Handle case where
3937+ end fields of substring references are NULL.
3938+
3939+2011-12-08 Toon Moene <toon@moene.org>
3940+
3941+ PR fortran/51310
3942+ * invoke.texi: Itemize the cases for which
3943+ -finit-<type>=<constant> doesn't work.
3944+
3945+2011-12-08 Tobias Burnus <burnus@net-b.de>
3946+
3947+ PR fortran/51448
3948+ * fortran/trans-array.c (get_std_lbound): Fix handling of
3949+ conversion functions.
3950+
3951+2011-12-06 Tobias Burnus <burnus@net-b.de>
3952+
3953+ PR fortran/51435
3954+ * expr.c (gfc_has_default_initializer): Fix handling of
3955+ DT with initialized pointer components.
3956+
3957+2011-12-03 Tobias Burnus <burnus@net-b.de>
3958+
3959+ PR fortran/50684
3960+ * check.c (variable_check): Fix intent(in) check.
3961+
3962+2011-11-25 Tobias Burnus <burnus@net-b.de>
3963+
3964+ PR fortran/50408
3965+ * trans-decl.c (gfc_get_module_backend_decl): Also copy
3966+ ts.u.derived from the gsym if the ts.type is BT_CLASS.
3967+ (gfc_get_extern_function_decl): Copy also the backend_decl
3968+ for the symbol's ts.u.{derived,cl} from the gsym.
3969+ * trans-types.c (gfc_copy_dt_decls_ifequal): Directly
3970+ return if "from" and "to" are the same.
3971+
3972+2011-11-24 Tobias Burnus <burnus@net-b.de>
3973+
3974+ PR fortran/51218
3975+ * gfortran.dg/implicit_pure_1.f90: New.
3976+
3977 2011-10-26 Release Manager
6f35b5e4 3978
2e34247b
AM
3979 * GCC 4.6.2 released.
3980Index: gcc/fortran/expr.c
3981===================================================================
a966c5b5
AM
3982--- gcc/fortran/expr.c (.../tags/gcc_4_6_2_release) (wersja 182722)
3983+++ gcc/fortran/expr.c (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
3984@@ -3679,6 +3679,8 @@
3985 if (!c->attr.pointer
3986 && gfc_has_default_initializer (c->ts.u.derived))
3987 return true;
3988+ if (c->attr.pointer && c->initializer)
3989+ return true;
3990 }
3991 else
3992 {
3993@@ -3689,6 +3691,7 @@
3994 return false;
3995 }
6f35b5e4 3996
2e34247b
AM
3997+
3998 /* Get an expression for a default initializer. */
6f35b5e4 3999
2e34247b
AM
4000 gfc_expr *
4001Index: gcc/fortran/invoke.texi
4002===================================================================
a966c5b5
AM
4003--- gcc/fortran/invoke.texi (.../tags/gcc_4_6_2_release) (wersja 182722)
4004+++ gcc/fortran/invoke.texi (.../branches/gcc-4_6-branch) (wersja 182722)
4005@@ -1438,10 +1438,16 @@
2e34247b
AM
4006 the real and imaginary parts of local @code{COMPLEX} variables),
4007 @option{-finit-logical=@var{<true|false>}}, and
4008 @option{-finit-character=@var{n}} (where @var{n} is an ASCII character
4009-value) options. These options do not initialize components of derived
4010-type variables, nor do they initialize variables that appear in an
4011-@code{EQUIVALENCE} statement. (This limitation may be removed in
4012-future releases).
4013+value) options. These options do not initialize
4014+@itemize @bullet
4015+@item
2e34247b
AM
4016+allocatable arrays
4017+@item
4018+components of derived type variables
4019+@item
4020+variables that appear in an @code{EQUIVALENCE} statement.
4021+@end itemize
4022+(These limitations may be removed in future releases).
4023
4024 Note that the @option{-finit-real=nan} option initializes @code{REAL}
4025 and @code{COMPLEX} variables with a quiet NaN. For a signalling NaN
4026Index: gcc/fortran/trans-types.c
4027===================================================================
a966c5b5
AM
4028--- gcc/fortran/trans-types.c (.../tags/gcc_4_6_2_release) (wersja 182722)
4029+++ gcc/fortran/trans-types.c (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
4030@@ -2092,6 +2092,9 @@
4031 gfc_component *to_cm;
4032 gfc_component *from_cm;
4033
4034+ if (from == to)
4035+ return 1;
4036+
4037 if (from->backend_decl == NULL
4038 || !gfc_compare_derived_types (from, to))
4039 return 0;
4040Index: gcc/fortran/resolve.c
4041===================================================================
a966c5b5
AM
4042--- gcc/fortran/resolve.c (.../tags/gcc_4_6_2_release) (wersja 182722)
4043+++ gcc/fortran/resolve.c (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
4044@@ -3132,11 +3132,11 @@
4045 "procedure within a PURE procedure", name, &expr->where);
4046 t = FAILURE;
4047 }
4048+
4049+ if (gfc_implicit_pure (NULL))
4050+ gfc_current_ns->proc_name->attr.implicit_pure = 0;
4051 }
6f35b5e4 4052
2e34247b
AM
4053- if (!pure_function (expr, &name) && name && gfc_implicit_pure (NULL))
4054- gfc_current_ns->proc_name->attr.implicit_pure = 0;
4055-
4056 /* Functions without the RECURSIVE attribution are not allowed to
4057 * call themselves. */
4058 if (expr->value.function.esym && !expr->value.function.esym->attr.recursive)
4059@@ -3195,6 +3195,9 @@
4060 else if (gfc_pure (NULL))
4061 gfc_error ("Subroutine call to '%s' at %L is not PURE", sym->name,
4062 &c->loc);
4063+
4064+ if (gfc_implicit_pure (NULL))
4065+ gfc_current_ns->proc_name->attr.implicit_pure = 0;
4066 }
6f35b5e4 4067
6f35b5e4 4068
a966c5b5
AM
4069@@ -9687,7 +9690,7 @@
4070 int i;
4071
4072 /* These symbols should never have a default initialization. */
4073- if ((sym->attr.dimension && !gfc_is_compile_time_shape (sym->as))
4074+ if (sym->attr.allocatable
4075 || sym->attr.external
4076 || sym->attr.dummy
4077 || sym->attr.pointer
2e34247b 4078@@ -11394,6 +11397,14 @@
6f35b5e4 4079
2e34247b
AM
4080 for (c = sym->components; c != NULL; c = c->next)
4081 {
4082+ /* See PRs 51550, 47545, 48654, 49050, 51075 - and 45170. */
4083+ if (c->ts.type == BT_CHARACTER && c->ts.deferred)
4084+ {
4085+ gfc_error ("Deferred-length character component '%s' at %L is not "
4086+ "yet supported", c->name, &c->loc);
4087+ return FAILURE;
4088+ }
4089+
4090 /* F2008, C442. */
4091 if (c->attr.codimension /* FIXME: c->as check due to PR 43412. */
4092 && (!c->attr.allocatable || (c->as && c->as->type != AS_DEFERRED)))
4093Index: gcc/fortran/trans-decl.c
4094===================================================================
a966c5b5
AM
4095--- gcc/fortran/trans-decl.c (.../tags/gcc_4_6_2_release) (wersja 182722)
4096+++ gcc/fortran/trans-decl.c (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
4097@@ -677,7 +677,7 @@
4098 }
4099 else if (s->backend_decl)
4100 {
4101- if (sym->ts.type == BT_DERIVED)
4102+ if (sym->ts.type == BT_DERIVED || sym->ts.type == BT_CLASS)
4103 gfc_copy_dt_decls_ifequal (s->ts.u.derived, sym->ts.u.derived,
4104 true);
4105 else if (sym->ts.type == BT_CHARACTER)
4106@@ -1602,6 +1602,11 @@
4107 gfc_find_symbol (sym->name, gsym->ns, 0, &s);
4108 if (s && s->backend_decl)
4109 {
4110+ if (sym->ts.type == BT_DERIVED || sym->ts.type == BT_CLASS)
4111+ gfc_copy_dt_decls_ifequal (s->ts.u.derived, sym->ts.u.derived,
4112+ true);
4113+ else if (sym->ts.type == BT_CHARACTER)
4114+ sym->ts.u.cl->backend_decl = s->ts.u.cl->backend_decl;
4115 sym->backend_decl = s->backend_decl;
4116 return sym->backend_decl;
4117 }
4118@@ -4179,10 +4184,16 @@
4119 "declared INTENT(OUT) but was not set and "
4120 "does not have a default initializer",
4121 sym->name, &sym->declared_at);
4122+ if (sym->backend_decl != NULL_TREE)
4123+ TREE_NO_WARNING(sym->backend_decl) = 1;
4124 }
4125 else if (gfc_option.warn_unused_dummy_argument)
4126- gfc_warning ("Unused dummy argument '%s' at %L", sym->name,
4127+ {
4128+ gfc_warning ("Unused dummy argument '%s' at %L", sym->name,
4129 &sym->declared_at);
4130+ if (sym->backend_decl != NULL_TREE)
4131+ TREE_NO_WARNING(sym->backend_decl) = 1;
4132+ }
4133 }
6f35b5e4 4134
2e34247b
AM
4135 /* Warn for unused variables, but not if they're inside a common
4136@@ -4227,11 +4238,6 @@
4137 mark the symbol now, as well as in traverse_ns, to prevent
4138 getting stuck in a circular dependency. */
4139 sym->mark = 1;
4140-
4141- /* We do not want the middle-end to warn about unused parameters
4142- as this was already done above. */
4143- if (sym->attr.dummy && sym->backend_decl != NULL_TREE)
4144- TREE_NO_WARNING(sym->backend_decl) = 1;
4145 }
4146 else if (sym->attr.flavor == FL_PARAMETER)
4147 {
4148@@ -4846,11 +4852,11 @@
4149 if (result == NULL_TREE)
4150 {
4151 /* TODO: move to the appropriate place in resolve.c. */
4152- if (warn_return_type && !sym->attr.referenced && sym == sym->result)
4153+ if (warn_return_type && sym == sym->result)
4154 gfc_warning ("Return value of function '%s' at %L not set",
4155 sym->name, &sym->declared_at);
4156-
4157- TREE_NO_WARNING(sym->backend_decl) = 1;
4158+ if (warn_return_type)
4159+ TREE_NO_WARNING(sym->backend_decl) = 1;
4160 }
4161 else
4162 gfc_add_expr_to_block (&body, gfc_generate_return ());
4163Index: gcc/fortran/check.c
4164===================================================================
a966c5b5
AM
4165--- gcc/fortran/check.c (.../tags/gcc_4_6_2_release) (wersja 182722)
4166+++ gcc/fortran/check.c (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
4167@@ -485,10 +485,31 @@
4168 && (gfc_current_intrinsic_arg[n]->intent == INTENT_OUT
4169 || gfc_current_intrinsic_arg[n]->intent == INTENT_INOUT))
4170 {
4171- gfc_error ("'%s' argument of '%s' intrinsic at %L cannot be INTENT(IN)",
4172- gfc_current_intrinsic_arg[n]->name, gfc_current_intrinsic,
4173- &e->where);
4174- return FAILURE;
4175+ gfc_ref *ref;
4176+ bool pointer = e->symtree->n.sym->ts.type == BT_CLASS
4177+ && CLASS_DATA (e->symtree->n.sym)
4178+ ? CLASS_DATA (e->symtree->n.sym)->attr.class_pointer
4179+ : e->symtree->n.sym->attr.pointer;
4180+
4181+ for (ref = e->ref; ref; ref = ref->next)
4182+ {
4183+ if (pointer && ref->type == REF_COMPONENT)
4184+ break;
4185+ if (ref->type == REF_COMPONENT
4186+ && ((ref->u.c.component->ts.type == BT_CLASS
4187+ && CLASS_DATA (ref->u.c.component)->attr.class_pointer)
4188+ || (ref->u.c.component->ts.type != BT_CLASS
4189+ && ref->u.c.component->attr.pointer)))
4190+ break;
4191+ }
4192+
4193+ if (!ref)
4194+ {
4195+ gfc_error ("'%s' argument of '%s' intrinsic at %L cannot be "
4196+ "INTENT(IN)", gfc_current_intrinsic_arg[n]->name,
4197+ gfc_current_intrinsic, &e->where);
4198+ return FAILURE;
4199+ }
4200 }
6f35b5e4 4201
2e34247b
AM
4202 if (e->expr_type == EXPR_VARIABLE
4203Index: gcc/fortran/dependency.c
4204===================================================================
a966c5b5
AM
4205--- gcc/fortran/dependency.c (.../tags/gcc_4_6_2_release) (wersja 182722)
4206+++ gcc/fortran/dependency.c (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
4207@@ -163,9 +163,19 @@
4208 break;
6f35b5e4 4209
2e34247b
AM
4210 case REF_SUBSTRING:
4211- if (gfc_dep_compare_expr (r1->u.ss.start, r2->u.ss.start) != 0
4212- || gfc_dep_compare_expr (r1->u.ss.end, r2->u.ss.end) != 0)
4213+ if (gfc_dep_compare_expr (r1->u.ss.start, r2->u.ss.start) != 0)
4214 return false;
4215+
4216+ /* If both are NULL, the end length compares equal, because we
4217+ are looking at the same variable. This can only happen for
4218+ assumed- or deferred-length character arguments. */
4219+
4220+ if (r1->u.ss.end == NULL && r2->u.ss.end == NULL)
4221+ break;
4222+
4223+ if (gfc_dep_compare_expr (r1->u.ss.end, r2->u.ss.end) != 0)
4224+ return false;
4225+
4226 break;
6f35b5e4 4227
2e34247b
AM
4228 default:
4229Index: gcc/regmove.c
4230===================================================================
a966c5b5
AM
4231--- gcc/regmove.c (.../tags/gcc_4_6_2_release) (wersja 182722)
4232+++ gcc/regmove.c (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
4233@@ -860,7 +860,7 @@
4234 if (REG_N_CALLS_CROSSED (REGNO (src)) == 0)
4235 break;
4236
4237- if (call_used_regs [REGNO (dst)]
4238+ if ((HARD_REGISTER_P (dst) && call_used_regs [REGNO (dst)])
4239 || find_reg_fusage (p, CLOBBER, dst))
4240 break;
4241 }
4242Index: gcc/configure.ac
4243===================================================================
a966c5b5
AM
4244--- gcc/configure.ac (.../tags/gcc_4_6_2_release) (wersja 182722)
4245+++ gcc/configure.ac (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
4246@@ -807,17 +807,7 @@
4247 gcc_AC_PROG_LN_S
4248 ACX_PROG_LN($LN_S)
4249 AC_PROG_RANLIB
4250-case "${host}" in
4251-*-*-darwin*)
4252- # By default, the Darwin ranlib will not treat common symbols as
4253- # definitions when building the archive table of contents. Other
4254- # ranlibs do that; pass an option to the Darwin ranlib that makes
4255- # it behave similarly.
4256- ranlib_flags="-c"
4257- ;;
4258-*)
4259- ranlib_flags=""
4260-esac
4261+ranlib_flags=""
4262 AC_SUBST(ranlib_flags)
4263
4264 gcc_AC_PROG_INSTALL
4265Index: gcc/BASE-VER
4266===================================================================
a966c5b5
AM
4267--- gcc/BASE-VER (.../tags/gcc_4_6_2_release) (wersja 182722)
4268+++ gcc/BASE-VER (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
4269@@ -1 +1 @@
4270-4.6.2
4271+4.6.3
4272Index: gcc/df.h
4273===================================================================
a966c5b5
AM
4274--- gcc/df.h (.../tags/gcc_4_6_2_release) (wersja 182722)
4275+++ gcc/df.h (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
4276@@ -53,7 +53,7 @@
4277 #define DF_RD 3 /* Reaching Defs. */
4278 #define DF_CHAIN 4 /* Def-Use and/or Use-Def Chains. */
4279 #define DF_WORD_LR 5 /* Subreg tracking lr. */
4280-#define DF_NOTE 6 /* REG_DEF and REG_UNUSED notes. */
4281+#define DF_NOTE 6 /* REG_DEAD and REG_UNUSED notes. */
4282 #define DF_MD 7 /* Multiple Definitions. */
4283
4284 #define DF_LAST_PROBLEM_PLUS1 (DF_MD + 1)
4285Index: gcc/lto-section-in.c
4286===================================================================
a966c5b5
AM
4287--- gcc/lto-section-in.c (.../tags/gcc_4_6_2_release) (wersja 182722)
4288+++ gcc/lto-section-in.c (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
4289@@ -296,7 +296,7 @@
4290 = (const struct lto_simple_header *) data;
4291
4292 struct lto_input_block* ib_main;
4293- int32_t main_offset = sizeof (struct lto_simple_header);
4294+ int main_offset = sizeof (struct lto_simple_header);
4295
4296 if (!data)
4297 return NULL;
4298Index: gcc/tree-vect-data-refs.c
4299===================================================================
a966c5b5
AM
4300--- gcc/tree-vect-data-refs.c (.../tags/gcc_4_6_2_release) (wersja 182722)
4301+++ gcc/tree-vect-data-refs.c (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
4302@@ -2631,6 +2631,16 @@
4303 return false;
4304 }
6f35b5e4 4305
2e34247b
AM
4306+ if (is_gimple_call (stmt))
4307+ {
4308+ if (vect_print_dump_info (REPORT_UNVECTORIZED_LOCATIONS))
4309+ {
4310+ fprintf (vect_dump, "not vectorized: dr in a call ");
4311+ print_gimple_stmt (vect_dump, stmt, 0, TDF_SLIM);
4312+ }
4313+ return false;
4314+ }
4315+
4316 /* Update DR field in stmt_vec_info struct. */
6f35b5e4 4317
2e34247b
AM
4318 /* If the dataref is in an inner-loop of the loop that is considered for
4319Index: gcc/c-typeck.c
4320===================================================================
a966c5b5
AM
4321--- gcc/c-typeck.c (.../tags/gcc_4_6_2_release) (wersja 182722)
4322+++ gcc/c-typeck.c (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
4323@@ -3802,11 +3802,7 @@
4324 if (val && TREE_CODE (val) == INDIRECT_REF
4325 && TREE_CONSTANT (TREE_OPERAND (val, 0)))
4326 {
4327- tree op0 = fold_convert_loc (location, sizetype,
4328- fold_offsetof (arg, val)), op1;
4329-
4330- op1 = fold_convert_loc (location, argtype, TREE_OPERAND (val, 0));
4331- ret = fold_build2_loc (location, POINTER_PLUS_EXPR, argtype, op1, op0);
4332+ ret = fold_convert_loc (location, argtype, fold_offsetof_1 (arg));
4333 goto return_build_unary_op;
4334 }
6f35b5e4 4335
2e34247b
AM
4336Index: gcc/calls.c
4337===================================================================
a966c5b5
AM
4338--- gcc/calls.c (.../tags/gcc_4_6_2_release) (wersja 182722)
4339+++ gcc/calls.c (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
4340@@ -1548,6 +1548,131 @@
4341 return funexp;
4342 }
6f35b5e4 4343
2e34247b
AM
4344+/* Internal state for internal_arg_pointer_based_exp and its helpers. */
4345+static struct
4346+{
4347+ /* Last insn that has been scanned by internal_arg_pointer_based_exp_scan,
4348+ or NULL_RTX if none has been scanned yet. */
4349+ rtx scan_start;
4350+ /* Vector indexed by REGNO - FIRST_PSEUDO_REGISTER, recording if a pseudo is
4351+ based on crtl->args.internal_arg_pointer. The element is NULL_RTX if the
4352+ pseudo isn't based on it, a CONST_INT offset if the pseudo is based on it
4353+ with fixed offset, or PC if this is with variable or unknown offset. */
4354+ VEC(rtx, heap) *cache;
4355+} internal_arg_pointer_exp_state;
4356+
4357+static rtx internal_arg_pointer_based_exp (rtx, bool);
4358+
4359+/* Helper function for internal_arg_pointer_based_exp. Scan insns in
4360+ the tail call sequence, starting with first insn that hasn't been
4361+ scanned yet, and note for each pseudo on the LHS whether it is based
4362+ on crtl->args.internal_arg_pointer or not, and what offset from that
4363+ that pointer it has. */
4364+
4365+static void
4366+internal_arg_pointer_based_exp_scan (void)
4367+{
4368+ rtx insn, scan_start = internal_arg_pointer_exp_state.scan_start;
4369+
4370+ if (scan_start == NULL_RTX)
4371+ insn = get_insns ();
4372+ else
4373+ insn = NEXT_INSN (scan_start);
4374+
4375+ while (insn)
4376+ {
4377+ rtx set = single_set (insn);
4378+ if (set && REG_P (SET_DEST (set)) && !HARD_REGISTER_P (SET_DEST (set)))
4379+ {
4380+ rtx val = NULL_RTX;
4381+ unsigned int idx = REGNO (SET_DEST (set)) - FIRST_PSEUDO_REGISTER;
4382+ /* Punt on pseudos set multiple times. */
4383+ if (idx < VEC_length (rtx, internal_arg_pointer_exp_state.cache)
4384+ && (VEC_index (rtx, internal_arg_pointer_exp_state.cache, idx)
4385+ != NULL_RTX))
4386+ val = pc_rtx;
4387+ else
4388+ val = internal_arg_pointer_based_exp (SET_SRC (set), false);
4389+ if (val != NULL_RTX)
4390+ {
4391+ if (idx
4392+ >= VEC_length (rtx, internal_arg_pointer_exp_state.cache))
4393+ VEC_safe_grow_cleared (rtx, heap,
4394+ internal_arg_pointer_exp_state.cache,
4395+ idx + 1);
4396+ VEC_replace (rtx, internal_arg_pointer_exp_state.cache,
4397+ idx, val);
4398+ }
4399+ }
4400+ if (NEXT_INSN (insn) == NULL_RTX)
4401+ scan_start = insn;
4402+ insn = NEXT_INSN (insn);
4403+ }
4404+
4405+ internal_arg_pointer_exp_state.scan_start = scan_start;
4406+}
4407+
4408+/* Helper function for internal_arg_pointer_based_exp, called through
4409+ for_each_rtx. Return 1 if *LOC is a register based on
4410+ crtl->args.internal_arg_pointer. Return -1 if *LOC is not based on it
4411+ and the subexpressions need not be examined. Otherwise return 0. */
4412+
4413+static int
4414+internal_arg_pointer_based_exp_1 (rtx *loc, void *data ATTRIBUTE_UNUSED)
4415+{
4416+ if (REG_P (*loc) && internal_arg_pointer_based_exp (*loc, false) != NULL_RTX)
4417+ return 1;
4418+ if (MEM_P (*loc))
4419+ return -1;
4420+ return 0;
4421+}
4422+
4423+/* Compute whether RTL is based on crtl->args.internal_arg_pointer. Return
4424+ NULL_RTX if RTL isn't based on it, a CONST_INT offset if RTL is based on
4425+ it with fixed offset, or PC if this is with variable or unknown offset.
4426+ TOPLEVEL is true if the function is invoked at the topmost level. */
4427+
4428+static rtx
4429+internal_arg_pointer_based_exp (rtx rtl, bool toplevel)
4430+{
4431+ if (CONSTANT_P (rtl))
4432+ return NULL_RTX;
4433+
4434+ if (rtl == crtl->args.internal_arg_pointer)
4435+ return const0_rtx;
4436+
4437+ if (REG_P (rtl) && HARD_REGISTER_P (rtl))
4438+ return NULL_RTX;
4439+
4440+ if (GET_CODE (rtl) == PLUS && CONST_INT_P (XEXP (rtl, 1)))
4441+ {
4442+ rtx val = internal_arg_pointer_based_exp (XEXP (rtl, 0), toplevel);
4443+ if (val == NULL_RTX || val == pc_rtx)
4444+ return val;
4445+ return plus_constant (val, INTVAL (XEXP (rtl, 1)));
4446+ }
4447+
4448+ /* When called at the topmost level, scan pseudo assignments in between the
4449+ last scanned instruction in the tail call sequence and the latest insn
4450+ in that sequence. */
4451+ if (toplevel)
4452+ internal_arg_pointer_based_exp_scan ();
4453+
4454+ if (REG_P (rtl))
4455+ {
4456+ unsigned int idx = REGNO (rtl) - FIRST_PSEUDO_REGISTER;
4457+ if (idx < VEC_length (rtx, internal_arg_pointer_exp_state.cache))
4458+ return VEC_index (rtx, internal_arg_pointer_exp_state.cache, idx);
4459+
4460+ return NULL_RTX;
4461+ }
4462+
4463+ if (for_each_rtx (&rtl, internal_arg_pointer_based_exp_1, NULL))
4464+ return pc_rtx;
4465+
4466+ return NULL_RTX;
4467+}
4468+
4469 /* Return true if and only if SIZE storage units (usually bytes)
4470 starting from address ADDR overlap with already clobbered argument
4471 area. This function is used to determine if we should give up a
4472@@ -1557,20 +1682,17 @@
4473 mem_overlaps_already_clobbered_arg_p (rtx addr, unsigned HOST_WIDE_INT size)
4474 {
4475 HOST_WIDE_INT i;
4476+ rtx val;
4477
4478- if (addr == crtl->args.internal_arg_pointer)
4479- i = 0;
4480- else if (GET_CODE (addr) == PLUS
4481- && XEXP (addr, 0) == crtl->args.internal_arg_pointer
4482- && CONST_INT_P (XEXP (addr, 1)))
4483- i = INTVAL (XEXP (addr, 1));
4484- /* Return true for arg pointer based indexed addressing. */
4485- else if (GET_CODE (addr) == PLUS
4486- && (XEXP (addr, 0) == crtl->args.internal_arg_pointer
4487- || XEXP (addr, 1) == crtl->args.internal_arg_pointer))
4488+ if (sbitmap_empty_p (stored_args_map))
4489+ return false;
4490+ val = internal_arg_pointer_based_exp (addr, true);
4491+ if (val == NULL_RTX)
4492+ return false;
4493+ else if (val == pc_rtx)
4494 return true;
4495 else
4496- return false;
4497+ i = INTVAL (val);
6f35b5e4 4498
2e34247b
AM
4499 #ifdef ARGS_GROW_DOWNWARD
4500 i = -i - size;
4501@@ -3175,6 +3297,8 @@
4502 }
6f35b5e4 4503
2e34247b
AM
4504 sbitmap_free (stored_args_map);
4505+ internal_arg_pointer_exp_state.scan_start = NULL_RTX;
4506+ VEC_free (rtx, heap, internal_arg_pointer_exp_state.cache);
4507 }
4508 else
4509 {
4510Index: gcc/cfgcleanup.c
4511===================================================================
a966c5b5
AM
4512--- gcc/cfgcleanup.c (.../tags/gcc_4_6_2_release) (wersja 182722)
4513+++ gcc/cfgcleanup.c (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b 4514@@ -1969,7 +1969,14 @@
6f35b5e4 4515
2e34247b
AM
4516 cond = get_condition (jump, &move_before, true, false);
4517 if (cond == NULL_RTX)
4518- move_before = jump;
4519+ {
4520+#ifdef HAVE_cc0
4521+ if (reg_mentioned_p (cc0_rtx, jump))
4522+ move_before = prev_nonnote_nondebug_insn (jump);
4523+ else
4524+#endif
4525+ move_before = jump;
4526+ }
6f35b5e4 4527
2e34247b
AM
4528 for (ix = 0; ix < nedges; ix++)
4529 if (EDGE_SUCC (bb, ix)->dest == EXIT_BLOCK_PTR)
4530@@ -2131,7 +2138,14 @@
4531 jump = BB_END (final_dest_bb);
4532 cond = get_condition (jump, &move_before, true, false);
4533 if (cond == NULL_RTX)
4534- move_before = jump;
4535+ {
4536+#ifdef HAVE_cc0
4537+ if (reg_mentioned_p (cc0_rtx, jump))
4538+ move_before = prev_nonnote_nondebug_insn (jump);
4539+ else
4540+#endif
4541+ move_before = jump;
4542+ }
4543 }
6f35b5e4 4544
2e34247b
AM
4545 do
4546Index: gcc/simplify-rtx.c
4547===================================================================
a966c5b5
AM
4548--- gcc/simplify-rtx.c (.../tags/gcc_4_6_2_release) (wersja 182722)
4549+++ gcc/simplify-rtx.c (.../branches/gcc-4_6-branch) (wersja 182722)
4550@@ -2777,7 +2777,7 @@
4551 }
4552 }
4553 }
4554- else
4555+ else if (SCALAR_INT_MODE_P (mode))
4556 {
4557 /* 0/x is 0 (or x&0 if x has side-effects). */
4558 if (trueop0 == CONST0_RTX (mode)
2e34247b
AM
4559@@ -4177,10 +4177,20 @@
4560 {
4561 rtx x = XEXP (op0, 0);
4562 rtx c = XEXP (op0, 1);
4563+ enum rtx_code invcode = op0code == PLUS ? MINUS : PLUS;
4564+ rtx tem = simplify_gen_binary (invcode, cmp_mode, op1, c);
4565
4566- c = simplify_gen_binary (op0code == PLUS ? MINUS : PLUS,
4567- cmp_mode, op1, c);
4568- return simplify_gen_relational (code, mode, cmp_mode, x, c);
4569+ /* Detect an infinite recursive condition, where we oscillate at this
4570+ simplification case between:
4571+ A + B == C <---> C - B == A,
4572+ where A, B, and C are all constants with non-simplifiable expressions,
4573+ usually SYMBOL_REFs. */
4574+ if (GET_CODE (tem) == invcode
4575+ && CONSTANT_P (x)
4576+ && rtx_equal_p (c, XEXP (tem, 1)))
4577+ return NULL_RTX;
4578+
4579+ return simplify_gen_relational (code, mode, cmp_mode, x, tem);
4580 }
6f35b5e4 4581
2e34247b
AM
4582 /* (ne:SI (zero_extract:SI FOO (const_int 1) BAR) (const_int 0))) is
4583Index: gcc/tree-sra.c
4584===================================================================
a966c5b5
AM
4585--- gcc/tree-sra.c (.../tags/gcc_4_6_2_release) (wersja 182722)
4586+++ gcc/tree-sra.c (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
4587@@ -1020,26 +1020,28 @@
4588 return false;
4589 }
6f35b5e4 4590
2e34247b
AM
4591-/* Return true iff type of EXP is not sufficiently aligned. */
4592+/* Return true if EXP is a memory reference less aligned than ALIGN. This is
4593+ invoked only on strict-alignment targets. */
6f35b5e4 4594
2e34247b
AM
4595 static bool
4596-tree_non_mode_aligned_mem_p (tree exp)
4597+tree_non_aligned_mem_p (tree exp, unsigned int align)
4598 {
4599- enum machine_mode mode = TYPE_MODE (TREE_TYPE (exp));
4600- unsigned int align;
4601+ unsigned int exp_align;
4602
4603 if (TREE_CODE (exp) == VIEW_CONVERT_EXPR)
4604 exp = TREE_OPERAND (exp, 0);
4605
4606- if (TREE_CODE (exp) == SSA_NAME
4607- || TREE_CODE (exp) == MEM_REF
4608- || mode == BLKmode
4609- || is_gimple_min_invariant (exp)
4610- || !STRICT_ALIGNMENT)
4611+ if (TREE_CODE (exp) == SSA_NAME || is_gimple_min_invariant (exp))
4612 return false;
4613
4614- align = get_object_alignment (exp, BIGGEST_ALIGNMENT);
4615- if (GET_MODE_ALIGNMENT (mode) > align)
4616+ /* get_object_alignment will fall back to BITS_PER_UNIT if it cannot
4617+ compute an explicit alignment. Pretend that dereferenced pointers
4618+ are always aligned on strict-alignment targets. */
4619+ exp_align = get_object_alignment (exp, BIGGEST_ALIGNMENT);
4620+ if (TREE_CODE (exp) == MEM_REF || TREE_CODE (exp) == TARGET_MEM_REF)
4621+ exp_align = MAX (TYPE_ALIGN (TREE_TYPE (exp)), exp_align);
4622+
4623+ if (exp_align < align)
4624 return true;
6f35b5e4 4625
2e34247b
AM
4626 return false;
4627@@ -1071,7 +1073,11 @@
4628 if (lacc)
4629 {
4630 lacc->grp_assignment_write = 1;
4631- lacc->grp_unscalarizable_region |= tree_non_mode_aligned_mem_p (rhs);
4632+ if (STRICT_ALIGNMENT
4633+ && tree_non_aligned_mem_p (rhs,
4634+ get_object_alignment (lhs,
4635+ BIGGEST_ALIGNMENT)))
4636+ lacc->grp_unscalarizable_region = 1;
4637 }
6f35b5e4 4638
2e34247b
AM
4639 if (racc)
4640@@ -1080,7 +1086,11 @@
4641 if (should_scalarize_away_bitmap && !gimple_has_volatile_ops (stmt)
4642 && !is_gimple_reg_type (racc->type))
4643 bitmap_set_bit (should_scalarize_away_bitmap, DECL_UID (racc->base));
4644- racc->grp_unscalarizable_region |= tree_non_mode_aligned_mem_p (lhs);
4645+ if (STRICT_ALIGNMENT
4646+ && tree_non_aligned_mem_p (lhs,
4647+ get_object_alignment (rhs,
4648+ BIGGEST_ALIGNMENT)))
4649+ racc->grp_unscalarizable_region = 1;
4650 }
6f35b5e4 4651
2e34247b
AM
4652 if (lacc && racc
4653@@ -1435,29 +1445,61 @@
4654 return fold_build2_loc (loc, MEM_REF, exp_type, base, off);
4655 }
6f35b5e4 4656
2e34247b
AM
4657+DEF_VEC_ALLOC_P_STACK (tree);
4658+#define VEC_tree_stack_alloc(alloc) VEC_stack_alloc (tree, alloc)
4659+
4660 /* Construct a memory reference to a part of an aggregate BASE at the given
4661- OFFSET and of the same type as MODEL. In case this is a reference to a
4662- component, the function will replicate the last COMPONENT_REF of model's
4663- expr to access it. GSI and INSERT_AFTER have the same meaning as in
4664- build_ref_for_offset. */
4665+ OFFSET and of the type of MODEL. In case this is a chain of references
4666+ to component, the function will replicate the chain of COMPONENT_REFs of
4667+ the expression of MODEL to access it. GSI and INSERT_AFTER have the same
4668+ meaning as in build_ref_for_offset. */
4669
4670 static tree
4671 build_ref_for_model (location_t loc, tree base, HOST_WIDE_INT offset,
4672 struct access *model, gimple_stmt_iterator *gsi,
4673 bool insert_after)
4674 {
4675+ tree type = model->type, t;
4676+ VEC(tree,stack) *cr_stack = NULL;
4677+
4678 if (TREE_CODE (model->expr) == COMPONENT_REF)
4679 {
4680- tree t, exp_type, fld = TREE_OPERAND (model->expr, 1);
4681- offset -= int_bit_position (fld);
4682- exp_type = TREE_TYPE (TREE_OPERAND (model->expr, 0));
4683- t = build_ref_for_offset (loc, base, offset, exp_type, gsi, insert_after);
4684- return fold_build3_loc (loc, COMPONENT_REF, TREE_TYPE (fld), t, fld,
4685- NULL_TREE);
4686+ tree expr = model->expr;
4687+
4688+ /* Create a stack of the COMPONENT_REFs so later we can walk them in
4689+ order from inner to outer. */
4690+ cr_stack = VEC_alloc (tree, stack, 6);
4691+
4692+ do {
4693+ tree field = TREE_OPERAND (expr, 1);
4694+ offset -= int_bit_position (field);
4695+
4696+ VEC_safe_push (tree, stack, cr_stack, expr);
4697+
4698+ expr = TREE_OPERAND (expr, 0);
4699+ type = TREE_TYPE (expr);
4700+ } while (TREE_CODE (expr) == COMPONENT_REF);
4701 }
4702- else
4703- return build_ref_for_offset (loc, base, offset, model->type,
4704- gsi, insert_after);
4705+
4706+ t = build_ref_for_offset (loc, base, offset, type, gsi, insert_after);
4707+
4708+ if (TREE_CODE (model->expr) == COMPONENT_REF)
4709+ {
4710+ unsigned i;
4711+ tree expr;
4712+
4713+ /* Now replicate the chain of COMPONENT_REFs from inner to outer. */
4714+ FOR_EACH_VEC_ELT_REVERSE (tree, cr_stack, i, expr)
4715+ {
4716+ tree field = TREE_OPERAND (expr, 1);
4717+ t = fold_build3_loc (loc, COMPONENT_REF, TREE_TYPE (field), t, field,
4718+ NULL_TREE);
4719+ }
4720+
4721+ VEC_free (tree, stack, cr_stack);
4722+ }
4723+
4724+ return t;
4725 }
6f35b5e4 4726
2e34247b
AM
4727 /* Construct a memory reference consisting of component_refs and array_refs to
4728@@ -2594,6 +2636,10 @@
4729 rhs = get_access_replacement (racc);
4730 if (!useless_type_conversion_p (lacc->type, racc->type))
4731 rhs = fold_build1_loc (loc, VIEW_CONVERT_EXPR, lacc->type, rhs);
4732+
4733+ if (racc->grp_partial_lhs && lacc->grp_partial_lhs)
4734+ rhs = force_gimple_operand_gsi (old_gsi, rhs, true, NULL_TREE,
4735+ true, GSI_SAME_STMT);
4736 }
4737 else
4738 {
4739@@ -2609,6 +2655,9 @@
4740 else
4741 rhs = build_ref_for_model (loc, top_racc->base, offset, lacc,
4742 new_gsi, true);
4743+ if (lacc->grp_partial_lhs)
4744+ rhs = force_gimple_operand_gsi (new_gsi, rhs, true, NULL_TREE,
4745+ false, GSI_NEW_STMT);
4746 }
6f35b5e4 4747
2e34247b
AM
4748 stmt = gimple_build_assign (get_access_replacement (lacc), rhs);
4749@@ -3604,7 +3653,8 @@
4750 || gimple_code (access->stmt) == GIMPLE_ASM))
4751 return true;
6f35b5e4 4752
2e34247b
AM
4753- if (tree_non_mode_aligned_mem_p (access->expr))
4754+ if (STRICT_ALIGNMENT
4755+ && tree_non_aligned_mem_p (access->expr, TYPE_ALIGN (access->type)))
4756 return true;
6f35b5e4 4757
2e34247b
AM
4758 return false;
4759Index: gcc/lto/lto.c
4760===================================================================
a966c5b5
AM
4761--- gcc/lto/lto.c (.../tags/gcc_4_6_2_release) (wersja 182722)
4762+++ gcc/lto/lto.c (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
4763@@ -198,7 +198,7 @@
4764 uint32_t ix;
4765 tree decl;
4766 uint32_t i, j;
4767-
4768+
4769 ix = *data++;
4770 decl = lto_streamer_cache_get (data_in->reader_cache, (int) ix);
4771 if (TREE_CODE (decl) != FUNCTION_DECL)
4772@@ -241,9 +241,9 @@
4773 VEC(ld_plugin_symbol_resolution_t,heap) *resolutions)
4774 {
4775 const struct lto_decl_header *header = (const struct lto_decl_header *) data;
4776- const int32_t decl_offset = sizeof (struct lto_decl_header);
4777- const int32_t main_offset = decl_offset + header->decl_state_size;
4778- const int32_t string_offset = main_offset + header->main_size;
4779+ const int decl_offset = sizeof (struct lto_decl_header);
4780+ const int main_offset = decl_offset + header->decl_state_size;
4781+ const int string_offset = main_offset + header->main_size;
4782 struct lto_input_block ib_main;
4783 struct data_in *data_in;
4784 unsigned int i;
4785@@ -291,17 +291,20 @@
4786
4787 if (data_ptr != data_end)
4788 internal_error ("bytecode stream: garbage at the end of symbols section");
4789-
4790+
4791 /* Set the current decl state to be the global state. */
4792 decl_data->current_decl_state = decl_data->global_decl_state;
6f35b5e4 4793
2e34247b
AM
4794 lto_data_in_delete (data_in);
4795 }
6f35b5e4 4796
2e34247b
AM
4797-/* strtoll is not portable. */
4798-int64_t
4799-lto_parse_hex (const char *p) {
4800- uint64_t ret = 0;
4801+/* Custom version of strtoll, which is not portable. */
4802+
4803+static HOST_WIDEST_INT
4804+lto_parse_hex (const char *p)
4805+{
4806+ HOST_WIDEST_INT ret = 0;
4807+
4808 for (; *p != '\0'; ++p)
4809 {
4810 char c = *p;
4811@@ -317,6 +320,7 @@
4812 internal_error ("could not parse hex number");
4813 ret |= part;
4814 }
4815+
4816 return ret;
4817 }
6f35b5e4 4818
2e34247b
AM
4819@@ -352,7 +356,7 @@
4820 {
4821 int t;
4822 char offset_p[17];
4823- int64_t offset;
4824+ HOST_WIDEST_INT offset;
4825 t = fscanf (resolution, "@0x%16s", offset_p);
4826 if (t != 1)
4827 internal_error ("could not parse file offset");
4828Index: gcc/lto/lto.h
4829===================================================================
a966c5b5
AM
4830--- gcc/lto/lto.h (.../tags/gcc_4_6_2_release) (wersja 182722)
4831+++ gcc/lto/lto.h (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
4832@@ -60,6 +60,4 @@
4833 size_t len;
4834 };
6f35b5e4 4835
2e34247b
AM
4836-int64_t lto_parse_hex (const char *p);
4837-
4838 #endif /* LTO_H */
4839Index: gcc/lto/ChangeLog
4840===================================================================
a966c5b5
AM
4841--- gcc/lto/ChangeLog (.../tags/gcc_4_6_2_release) (wersja 182722)
4842+++ gcc/lto/ChangeLog (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
4843@@ -1,3 +1,10 @@
4844+2011-12-13 Eric Botcazou <ebotcazou@adacore.com>
4845+
4846+ * lto.h (lto_parse_hex): Delete.
4847+ * lto.c (lto_read_decls): Use 'int' for offsets.
4848+ (lto_parse_hex): Make static and return proper 64-bit host type.
4849+ (lto_resolution_read): Use proper 64-bit host type.
4850+
4851 2011-10-26 Release Manager
6f35b5e4 4852
2e34247b
AM
4853 * GCC 4.6.2 released.
4854Index: gcc/ipa-prop.c
4855===================================================================
a966c5b5
AM
4856--- gcc/ipa-prop.c (.../tags/gcc_4_6_2_release) (wersja 182722)
4857+++ gcc/ipa-prop.c (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
4858@@ -2868,9 +2868,9 @@
4859 {
4860 const struct lto_function_header *header =
4861 (const struct lto_function_header *) data;
4862- const int32_t cfg_offset = sizeof (struct lto_function_header);
4863- const int32_t main_offset = cfg_offset + header->cfg_size;
4864- const int32_t string_offset = main_offset + header->main_size;
4865+ const int cfg_offset = sizeof (struct lto_function_header);
4866+ const int main_offset = cfg_offset + header->cfg_size;
4867+ const int string_offset = main_offset + header->main_size;
4868 struct data_in *data_in;
4869 struct lto_input_block ib_main;
4870 unsigned int i;
4871Index: gcc/po/ChangeLog
4872===================================================================
a966c5b5
AM
4873--- gcc/po/ChangeLog (.../tags/gcc_4_6_2_release) (wersja 182722)
4874+++ gcc/po/ChangeLog (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
4875@@ -1,3 +1,7 @@
4876+2011-10-30 Joseph Myers <joseph@codesourcery.com>
4877+
4878+ * ja.po: Update.
4879+
4880 2011-10-26 Release Manager
6f35b5e4 4881
2e34247b
AM
4882 * GCC 4.6.2 released.
4883Index: gcc/po/ja.po
4884===================================================================
a966c5b5
AM
4885--- gcc/po/ja.po (.../tags/gcc_4_6_2_release) (wersja 182722)
4886+++ gcc/po/ja.po (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
4887@@ -20,7 +20,7 @@
4888 "Project-Id-Version: gcc 4.6.1\n"
4889 "Report-Msgid-Bugs-To: http://gcc.gnu.org/bugs.html\n"
4890 "POT-Creation-Date: 2011-06-21 10:27+0000\n"
4891-"PO-Revision-Date: 2011-10-25 22:36+0900\n"
4892+"PO-Revision-Date: 2011-10-30 18:48+0900\n"
4893 "Last-Translator: Yasuaki Taniguchi <yasuakit@gmail.com>\n"
4894 "Language-Team: Japanese <translation-team-ja@lists.sourceforge.net>\n"
4895 "Language: ja\n"
4896@@ -834,12 +834,12 @@
4897 #: gcov.c:420
4898 #, c-format
4899 msgid " -a, --all-blocks Show information for every basic block\n"
6f35b5e4 4900-msgstr ""
2e34247b 4901+msgstr " -a, --all-blocks 各基本ブロックに関する情報を表示する\n"
6f35b5e4 4902
2e34247b
AM
4903 #: gcov.c:421
4904 #, c-format
4905 msgid " -b, --branch-probabilities Include branch probabilities in output\n"
6f35b5e4 4906-msgstr ""
2e34247b 4907+msgstr " -b, --branch-probabilities 出力に分岐可能性情報を含める\n"
6f35b5e4 4908
2e34247b
AM
4909 #: gcov.c:422
4910 #, c-format
4911@@ -847,6 +847,8 @@
4912 " -c, --branch-counts Given counts of branches taken\n"
4913 " rather than percentages\n"
6f35b5e4 4914 msgstr ""
2e34247b
AM
4915+" -c, --branch-counts 分岐に関する百分率では無く行われた\n"
4916+" 回数を取得する\n"
6f35b5e4 4917
2e34247b
AM
4918 #: gcov.c:424
4919 #, c-format
4920@@ -859,21 +861,23 @@
4921 " -l, --long-file-names Use long output file names for included\n"
4922 " source files\n"
6f35b5e4 4923 msgstr ""
2e34247b
AM
4924+" -l, --long-file-names インクルードされたソースファイルに関する長い\n"
4925+" 出力ファイル名を使用する\n"
6f35b5e4 4926
2e34247b 4927 #: gcov.c:427
6f35b5e4 4928 #, c-format
2e34247b 4929 msgid " -f, --function-summaries Output summaries for each function\n"
6f35b5e4 4930-msgstr ""
2e34247b 4931+msgstr " -f, --function-summaries 各関数に関する要約を出力する\n"
6f35b5e4 4932
2e34247b 4933 #: gcov.c:428
6f35b5e4 4934 #, c-format
2e34247b 4935 msgid " -o, --object-directory DIR|FILE Search for object files in DIR or called FILE\n"
6f35b5e4 4936-msgstr ""
2e34247b 4937+msgstr " -o, --object-directory DIR|FILE オブジェクトファイルを DIR 内または呼び出し用 FILE 内で検索する\n"
6f35b5e4 4938
2e34247b
AM
4939 #: gcov.c:429
4940 #, c-format
4941 msgid " -p, --preserve-paths Preserve all pathname components\n"
6f35b5e4 4942-msgstr ""
2e34247b 4943+msgstr " -p, --preserve-paths すべてのパス名要素を保護する\n"
6f35b5e4 4944
2e34247b
AM
4945 #: gcov.c:430
4946 #, c-format
4947@@ -977,7 +981,7 @@
4948 #: gcov.c:1045
4949 #, c-format
4950 msgid "%s:cannot open data file, assuming not executed\n"
6f35b5e4 4951-msgstr ""
2e34247b 4952+msgstr "%s:データファイルを開けません。実行されていないと見なします\n"
6f35b5e4 4953
2e34247b
AM
4954 #: gcov.c:1052
4955 #, c-format
4956@@ -1027,7 +1031,7 @@
4957 #: gcov.c:1379
4958 #, c-format
4959 msgid "%s:graph is unsolvable for '%s'\n"
6f35b5e4 4960-msgstr ""
2e34247b 4961+msgstr "%s: '%s' 用のグラフが解決できません\n"
6f35b5e4 4962
2e34247b
AM
4963 #: gcov.c:1459
4964 #, c-format
4965@@ -1037,7 +1041,7 @@
4966 #: gcov.c:1462
4967 #, c-format
4968 msgid "Lines executed:%s of %d\n"
6f35b5e4 4969-msgstr ""
2e34247b 4970+msgstr "実行された行:%s of %d\n"
6f35b5e4 4971
2e34247b
AM
4972 #: gcov.c:1466
4973 #, c-format
4974@@ -1047,7 +1051,7 @@
4975 #: gcov.c:1472
4976 #, c-format
4977 msgid "Branches executed:%s of %d\n"
6f35b5e4 4978-msgstr ""
2e34247b 4979+msgstr "実行された分岐:%s of %d\n"
6f35b5e4 4980
2e34247b
AM
4981 #: gcov.c:1476
4982 #, c-format
4983@@ -1057,12 +1061,12 @@
4984 #: gcov.c:1482
4985 #, c-format
4986 msgid "No branches\n"
6f35b5e4 4987-msgstr ""
2e34247b 4988+msgstr "分岐がありません\n"
6f35b5e4 4989
2e34247b
AM
4990 #: gcov.c:1484
4991 #, c-format
4992 msgid "Calls executed:%s of %d\n"
6f35b5e4 4993-msgstr ""
2e34247b 4994+msgstr "実行された呼び出し:%s of %d\n"
6f35b5e4 4995
2e34247b
AM
4996 #: gcov.c:1488
4997 #, c-format
4998@@ -1075,24 +1079,24 @@
4999 msgstr "%s: '%s' に対する行がありません\n"
6f35b5e4 5000
2e34247b
AM
5001 #: gcov.c:1843
5002-#, fuzzy, c-format
5003+#, c-format
5004 msgid "call %2d returned %s\n"
5005-msgstr "呼び出し %d の戻り = %d\n"
5006+msgstr ""
6f35b5e4 5007
2e34247b
AM
5008 #: gcov.c:1848
5009-#, fuzzy, c-format
5010+#, c-format
5011 msgid "call %2d never executed\n"
5012-msgstr "呼び出し %d は一度も実行せず\n"
5013+msgstr ""
6f35b5e4 5014
2e34247b
AM
5015 #: gcov.c:1853
5016-#, fuzzy, c-format
5017+#, c-format
5018 msgid "branch %2d taken %s%s\n"
5019-msgstr "ブランチ %d 受理 = %d%%\n"
5020+msgstr ""
6f35b5e4 5021
2e34247b
AM
5022 #: gcov.c:1857
5023-#, fuzzy, c-format
5024+#, c-format
5025 msgid "branch %2d never executed\n"
5026-msgstr "ブランチ %d は一度も実行されず\n"
5027+msgstr ""
5028
5029 #: gcov.c:1862
5030 #, c-format
5031@@ -1100,9 +1104,9 @@
6f35b5e4
AM
5032 msgstr ""
5033
2e34247b
AM
5034 #: gcov.c:1865
5035-#, fuzzy, c-format
5036+#, c-format
5037 msgid "unconditional %2d never executed\n"
5038-msgstr "呼び出し %d は一度も実行せず\n"
5039+msgstr ""
6f35b5e4 5040
2e34247b
AM
5041 #: gcov.c:1901
5042 #, c-format
5043@@ -1412,11 +1416,11 @@
6f35b5e4 5044
2e34247b
AM
5045 #: opts.c:1183
5046 msgid "The following options take separate arguments"
6f35b5e4 5047-msgstr ""
2e34247b 5048+msgstr "次のオプションは分離した引数を取ります"
6f35b5e4 5049
2e34247b
AM
5050 #: opts.c:1185
5051 msgid "The following options take joined arguments"
6f35b5e4 5052-msgstr ""
2e34247b 5053+msgstr "次のオプションは結合した引数を取ります"
6f35b5e4 5054
2e34247b
AM
5055 #: opts.c:1196
5056 msgid "The following options are language-related"
5057@@ -1472,7 +1476,7 @@
5058 #: targhooks.c:1469
5059 #, c-format
5060 msgid "created and used with differing settings of '%s'"
5061-msgstr ""
5062+msgstr "作成時と使用時で '%s' の設定が異なります"
6f35b5e4 5063
2e34247b
AM
5064 #: targhooks.c:1471
5065 msgid "out of memory"
5066@@ -1480,11 +1484,11 @@
6f35b5e4 5067
2e34247b
AM
5068 #: targhooks.c:1486
5069 msgid "created and used with different settings of -fpic"
6f35b5e4 5070-msgstr ""
2e34247b 5071+msgstr "作成時と使用時で -fpic の設定が異なります"
6f35b5e4 5072
2e34247b
AM
5073 #: targhooks.c:1488
5074 msgid "created and used with different settings of -fpie"
6f35b5e4 5075-msgstr ""
2e34247b 5076+msgstr "作成時と使用時で -fpie の設定が異なります"
6f35b5e4 5077
2e34247b
AM
5078 #: tlink.c:386
5079 #, c-format
5080@@ -1717,11 +1721,11 @@
6f35b5e4 5081
2e34247b
AM
5082 #: params.def:100
5083 msgid "The maximum depth of recursive inlining for inline functions"
6f35b5e4 5084-msgstr ""
2e34247b 5085+msgstr "インライン関数を再帰的にインライン化する時の最大深度"
6f35b5e4 5086
2e34247b
AM
5087 #: params.def:105
5088 msgid "The maximum depth of recursive inlining for non-inline functions"
6f35b5e4 5089-msgstr ""
2e34247b 5090+msgstr "非インライン関数を再帰的にインライン化する時の最大深度"
6f35b5e4 5091
2e34247b
AM
5092 #: params.def:110
5093 msgid "Inline recursively only when the probability of call being executed exceeds the parameter"
5094@@ -1761,16 +1765,15 @@
6f35b5e4 5095
2e34247b
AM
5096 #: params.def:180
5097 msgid "The size of function body to be considered large"
6f35b5e4 5098-msgstr ""
2e34247b 5099+msgstr "大きいと見なされる関数本体のサイズ"
6f35b5e4 5100
2e34247b
AM
5101 #: params.def:184
5102 msgid "Maximal growth due to inlining of large function (in percent)"
5103 msgstr ""
6f35b5e4 5104
2e34247b
AM
5105 #: params.def:188
5106-#, fuzzy
5107 msgid "The size of translation unit to be considered large"
5108-msgstr "翻訳単位全体をファイルにダンプする"
5109+msgstr "大きいと見なされる翻訳単位のサイズ"
6f35b5e4 5110
2e34247b
AM
5111 #: params.def:192
5112 msgid "How much can given compilation unit grow because of the inlining (in percent)"
5113@@ -1786,20 +1789,19 @@
6f35b5e4 5114
2e34247b
AM
5115 #: params.def:204
5116 msgid "The size of stack frame to be considered large"
6f35b5e4 5117-msgstr ""
2e34247b 5118+msgstr "大きいと見なされるスタックフレームのサイズ"
6f35b5e4 5119
2e34247b
AM
5120 #: params.def:208
5121 msgid "Maximal stack frame growth due to inlining (in percent)"
6f35b5e4 5122-msgstr ""
2e34247b 5123+msgstr "インライン化によって増加するスタックフレームの最大量 (百分率)"
6f35b5e4 5124
2e34247b
AM
5125 #: params.def:215
5126 msgid "The maximum amount of memory to be allocated by GCSE"
6f35b5e4 5127-msgstr ""
2e34247b 5128+msgstr "GCSE によって配置されるメモリの最大量"
6f35b5e4 5129
2e34247b
AM
5130 #: params.def:222
5131-#, fuzzy
5132 msgid "The maximum ratio of insertions to deletions of expressions in GCSE"
5133-msgstr "RPTS 用の最大反復数を指定する"
5134+msgstr ""
6f35b5e4 5135
2e34247b
AM
5136 #: params.def:233
5137 msgid "The threshold ratio for performing partial redundancy elimination after reload"
5138@@ -1963,9 +1965,8 @@
5139 msgstr ""
6f35b5e4 5140
2e34247b
AM
5141 #: params.def:470
5142-#, fuzzy
5143 msgid "Bound on number of iv uses in loop optimized in iv optimizations"
5144-msgstr "目立たない、コストのかかる最適化を行なう"
5145+msgstr ""
6f35b5e4 5146
2e34247b
AM
5147 #: params.def:478
5148 msgid "If number of candidates in the set is smaller, we always try to remove unused ivs during its optimization"
5149@@ -2044,9 +2045,8 @@
5150 msgstr ""
6f35b5e4 5151
2e34247b
AM
5152 #: params.def:594
5153-#, fuzzy
5154 msgid "The maximum number of iterations through CFG to extend regions"
5155-msgstr "RPTS 用の最大反復数を指定する"
5156+msgstr ""
6f35b5e4 5157
2e34247b
AM
5158 #: params.def:599
5159 msgid "The maximum conflict delay for an insn to be considered for speculative motion"
5160@@ -2077,9 +2077,8 @@
5161 msgstr ""
6f35b5e4 5162
2e34247b 5163 #: params.def:637
6f35b5e4 5164-#, fuzzy
2e34247b
AM
5165 msgid "The upper bound for sharing integer constants"
5166-msgstr "`%s' の列挙値が整数定数ではありません"
5167+msgstr "整数定数を共有するための上限値"
6f35b5e4 5168
2e34247b
AM
5169 #: params.def:656
5170 msgid "Minimum number of virtual mappings to consider switching to full virtual renames"
5171@@ -2111,11 +2110,11 @@
6f35b5e4 5172
2e34247b
AM
5173 #: params.def:714
5174 msgid "The number of insns executed before prefetch is completed"
6f35b5e4 5175-msgstr ""
2e34247b 5176+msgstr "プリフェッチが完了する前に実行される命令数"
6f35b5e4 5177
2e34247b
AM
5178 #: params.def:721
5179 msgid "The number of prefetches that can run at the same time"
6f35b5e4 5180-msgstr ""
2e34247b 5181+msgstr "同時に実行可能なプリフェッチの数"
6f35b5e4 5182
2e34247b
AM
5183 #: params.def:728
5184 msgid "The size of L1 cache"
5185@@ -2162,9 +2161,8 @@
5186 msgstr ""
6f35b5e4 5187
2e34247b 5188 #: params.def:806
6f35b5e4 5189-#, fuzzy
2e34247b
AM
5190 msgid "maximum number of parameters in a SCoP"
5191-msgstr "RPTS 用の最大反復数を指定する"
5192+msgstr "SCoP 内のパラメータの最大数"
6f35b5e4 5193
2e34247b
AM
5194 #: params.def:813
5195 msgid "maximum number of basic blocks per function to be analyzed by Graphite"
5196@@ -2597,9 +2595,9 @@
5197 msgstr "無効な %%E 値"
6f35b5e4 5198
2e34247b
AM
5199 #: config/alpha/alpha.c:5431 config/alpha/alpha.c:5479
5200-#, fuzzy, c-format
5201+#, c-format
5202 msgid "unknown relocation unspec"
5203-msgstr "不明な設定済コンストラクタ型です"
5204+msgstr ""
6f35b5e4 5205
2e34247b
AM
5206 #: config/alpha/alpha.c:5440 config/crx/crx.c:1119
5207 #: config/rs6000/rs6000.c:16490 config/spu/spu.c:1726
5208@@ -3000,32 +2998,32 @@
5209 #: config/i386/i386.c:14106 config/i386/i386.c:14146
5210 #, c-format
5211 msgid "operand is not a condition code, invalid operand code 'D'"
5212-msgstr ""
5213+msgstr "被演算子は条件コードではありません。無効な被演算子コード 'D' です"
6f35b5e4 5214
2e34247b
AM
5215 #: config/i386/i386.c:14172
5216 #, c-format
5217 msgid "operand is neither a constant nor a condition code, invalid operand code 'C'"
6f35b5e4 5218-msgstr ""
2e34247b 5219+msgstr "被演算子は定数でも条件コードでもありません。無効な被演算子コード 'C' です"
6f35b5e4 5220
2e34247b
AM
5221 #: config/i386/i386.c:14182
5222 #, c-format
5223 msgid "operand is neither a constant nor a condition code, invalid operand code 'F'"
5224-msgstr ""
5225+msgstr "被演算子は定数でも条件コードでもありません。無効な被演算子コード 'F' です"
6f35b5e4 5226
2e34247b
AM
5227 #: config/i386/i386.c:14200
5228 #, c-format
5229 msgid "operand is neither a constant nor a condition code, invalid operand code 'c'"
5230-msgstr ""
5231+msgstr "被演算子は定数でも条件コードでもありません。無効な被演算子コード 'c' です"
6f35b5e4 5232
2e34247b
AM
5233 #: config/i386/i386.c:14210
5234 #, c-format
5235 msgid "operand is neither a constant nor a condition code, invalid operand code 'f'"
5236-msgstr ""
5237+msgstr "被演算子は定数でも条件コードでもありません。無効な被演算子コード 'f' です"
6f35b5e4 5238
2e34247b
AM
5239 #: config/i386/i386.c:14313
5240 #, c-format
5241 msgid "operand is not a condition code, invalid operand code 'Y'"
6f35b5e4 5242-msgstr ""
2e34247b 5243+msgstr "被演算子は条件コードではありません。無効な被演算子コード 'Y' です"
6f35b5e4 5244
2e34247b
AM
5245 #: config/i386/i386.c:14339
5246 #, c-format
5247@@ -3098,7 +3096,7 @@
5248 #: config/lm32/lm32.c:529
5249 #, c-format
5250 msgid "only 0.0 can be loaded as an immediate"
5251-msgstr ""
5252+msgstr "即値としてロードできるのは 0.0 のみです"
6f35b5e4 5253
2e34247b
AM
5254 #: config/lm32/lm32.c:599
5255 msgid "bad operand"
5256@@ -3138,15 +3136,15 @@
5257
5258 #: config/m32r/m32r.c:2290
5259 msgid "pre-increment address is not a register"
6f35b5e4 5260-msgstr ""
2e34247b 5261+msgstr "前置増分アドレスがレジスタではありません"
6f35b5e4 5262
2e34247b
AM
5263 #: config/m32r/m32r.c:2297
5264 msgid "pre-decrement address is not a register"
5265-msgstr ""
5266+msgstr "前置減分アドレスがレジスタではありません"
6f35b5e4 5267
2e34247b
AM
5268 #: config/m32r/m32r.c:2304
5269 msgid "post-increment address is not a register"
5270-msgstr ""
5271+msgstr "後置増分アドレスがレジスタではありません"
6f35b5e4 5272
2e34247b
AM
5273 #: config/m32r/m32r.c:2380 config/m32r/m32r.c:2394
5274 #: config/rs6000/rs6000.c:25500
5275@@ -3252,7 +3250,7 @@
6f35b5e4 5276
2e34247b
AM
5277 #: config/mmix/mmix.c:1589 config/mmix/mmix.c:1719
5278 msgid "MMIX Internal: Expected a CONST_INT, not this"
5279-msgstr ""
5280+msgstr "MMIX 内部: CONST_INT が予期されますが、異なっています"
6f35b5e4 5281
2e34247b
AM
5282 #: config/mmix/mmix.c:1668
5283 msgid "MMIX Internal: Bad value for 'm', not a CONST_INT"
5284@@ -3260,11 +3258,11 @@
6f35b5e4 5285
2e34247b
AM
5286 #: config/mmix/mmix.c:1687
5287 msgid "MMIX Internal: Expected a register, not this"
6f35b5e4 5288-msgstr ""
2e34247b 5289+msgstr "MMIX 内部: レジスタが予期されますが、異なっています"
6f35b5e4 5290
2e34247b
AM
5291 #: config/mmix/mmix.c:1697
5292 msgid "MMIX Internal: Expected a constant, not this"
6f35b5e4 5293-msgstr ""
2e34247b 5294+msgstr "MMIX 内部: 定数が予期されますが、異なっています"
6f35b5e4 5295
2e34247b
AM
5296 #. We need the original here.
5297 #: config/mmix/mmix.c:1781
5298@@ -3301,7 +3299,7 @@
6f35b5e4 5299
2e34247b
AM
5300 #: config/picochip/picochip.c:2983 config/picochip/picochip.c:3015
5301 msgid "Bad address, not (reg+disp):"
6f35b5e4 5302-msgstr ""
2e34247b 5303+msgstr "誤ったアドレスです。 (reg+disp) ではありません:"
6f35b5e4 5304
2e34247b
AM
5305 #: config/picochip/picochip.c:3029
5306 msgid "Bad address, not register:"
5307@@ -3526,15 +3524,15 @@
6f35b5e4 5308
2e34247b
AM
5309 #: config/sh/sh.c:9271
5310 msgid "created and used with different architectures / ABIs"
5311-msgstr ""
5312+msgstr "作成時と使用時で アーキテクチャ/ABI が異なります"
6f35b5e4 5313
2e34247b
AM
5314 #: config/sh/sh.c:9273
5315 msgid "created and used with different ABIs"
6f35b5e4 5316-msgstr ""
2e34247b 5317+msgstr "作成時と使用時で ABI が異なります"
6f35b5e4 5318
2e34247b
AM
5319 #: config/sh/sh.c:9275
5320 msgid "created and used with different endianness"
5321-msgstr ""
5322+msgstr "作成時と使用時でエンディアンが異なります"
6f35b5e4 5323
2e34247b
AM
5324 #: config/sparc/sparc.c:7445 config/sparc/sparc.c:7451
5325 #, c-format
5326@@ -3617,7 +3615,7 @@
5327 #: config/vax/vax.c:427
5328 #, c-format
5329 msgid "symbol with offset used in PIC mode"
6f35b5e4 5330-msgstr ""
2e34247b 5331+msgstr "PIC モードで使用されるオフセット付きのシンボルです"
6f35b5e4 5332
2e34247b
AM
5333 #: config/vax/vax.c:513
5334 #, c-format
5335@@ -3837,19 +3835,19 @@
5336 msgstr "%s:%d:%d: ここから再帰的に実体化されました"
6f35b5e4 5337
2e34247b
AM
5338 #: cp/error.c:2913
5339-#, fuzzy, c-format
5340+#, c-format
5341 msgid "%s:%d:%d: instantiated from here"
5342 msgstr "%s:%d:%d: ここから実体化されました"
5343
5344 #: cp/error.c:2918
5345 #, c-format
5346 msgid "%s:%d: recursively instantiated from here"
6f35b5e4 5347-msgstr ""
2e34247b 5348+msgstr "%s:%d: ここから再帰的に実体化されました"
6f35b5e4 5349
2e34247b
AM
5350 #: cp/error.c:2919
5351-#, fuzzy, c-format
5352+#, c-format
5353 msgid "%s:%d: instantiated from here"
5354-msgstr "%s:%d: ここで実体化されました\n"
5355+msgstr "%s:%d: ここから実体化されました"
5356
5357 #: cp/error.c:2962
5358 #, c-format
5359@@ -4029,22 +4027,21 @@
5360 #: fortran/expr.c:607
5361 #, c-format
5362 msgid "Constant expression required at %C"
6f35b5e4 5363-msgstr ""
2e34247b 5364+msgstr "%C では定数式が要求されます"
6f35b5e4 5365
2e34247b
AM
5366 #: fortran/expr.c:610
5367 #, c-format
5368 msgid "Integer expression required at %C"
6f35b5e4 5369-msgstr ""
2e34247b 5370+msgstr "%C では整数式が要求されます"
6f35b5e4 5371
2e34247b
AM
5372 #: fortran/expr.c:615
5373-#, fuzzy, c-format
5374+#, c-format
5375 msgid "Integer value too large in expression at %C"
5376-msgstr "式の整数がオーバーフローしました"
5377+msgstr "%C の式内で整数値が大きすぎます"
6f35b5e4 5378
2e34247b 5379 #: fortran/expr.c:3147
6f35b5e4 5380-#, fuzzy
2e34247b
AM
5381 msgid "array assignment"
5382-msgstr "代入"
5383+msgstr "配列代入"
6f35b5e4 5384
2e34247b
AM
5385 #: fortran/gfortranspec.c:303
5386 #, c-format
5387@@ -4080,7 +4077,7 @@
6f35b5e4 5388
2e34247b
AM
5389 #: fortran/io.c:551
5390 msgid "Unexpected element '%c' in format string at %L"
6f35b5e4 5391-msgstr ""
2e34247b 5392+msgstr "予期しない要素 '%c' が書式文字列内 (位置 %L) にあります"
6f35b5e4 5393
2e34247b
AM
5394 #: fortran/io.c:553
5395 msgid "Unexpected end of format string"
5396@@ -4088,15 +4085,15 @@
6f35b5e4 5397
2e34247b
AM
5398 #: fortran/io.c:554
5399 msgid "Zero width in format descriptor"
6f35b5e4 5400-msgstr ""
2e34247b 5401+msgstr "幅 0 の書式記述子です"
6f35b5e4 5402
2e34247b
AM
5403 #: fortran/io.c:574
5404 msgid "Missing leading left parenthesis"
6f35b5e4 5405-msgstr ""
2e34247b 5406+msgstr "前に左小括弧がありません"
6f35b5e4 5407
2e34247b
AM
5408 #: fortran/io.c:603
5409 msgid "Left parenthesis required after '*'"
6f35b5e4 5410-msgstr ""
2e34247b 5411+msgstr "'*' の後には左小括弧が必要です"
6f35b5e4 5412
2e34247b
AM
5413 #: fortran/io.c:634
5414 msgid "Expected P edit descriptor"
5415@@ -4116,9 +4113,8 @@
5416 msgstr ""
6f35b5e4 5417
2e34247b 5418 #: fortran/io.c:844
6f35b5e4 5419-#, fuzzy
2e34247b
AM
5420 msgid "E specifier not allowed with g0 descriptor"
5421-msgstr "型指定子 `%s' は struct や class の後には使えません"
5422+msgstr ""
6f35b5e4 5423
2e34247b
AM
5424 #: fortran/io.c:914
5425 msgid "Positive exponent width required"
5426@@ -4362,9 +4358,8 @@
5427 msgstr ""
6f35b5e4 5428
2e34247b 5429 #: fortran/resolve.c:6233
6f35b5e4 5430-#, fuzzy
2e34247b
AM
5431 msgid "End expression in DO loop"
5432-msgstr "オペランドとして無効な式"
5433+msgstr ""
6f35b5e4 5434
2e34247b
AM
5435 #: fortran/resolve.c:6237
5436 msgid "Step expression in DO loop"
5437@@ -4564,7 +4559,7 @@
5438 #: java/jcf-dump.c:1148
5439 #, c-format
5440 msgid " --extdirs PATH Set extensions directory path\n"
5441-msgstr ""
5442+msgstr " --extdirs PATH 拡張のディレクトリパスを設定する\n"
6f35b5e4 5443
2e34247b
AM
5444 #: java/jcf-dump.c:1149
5445 #, c-format
5446@@ -4734,18 +4729,18 @@
5447 #: config/pa/pa-hpux11.h:111 config/pa/pa64-hpux.h:30 config/pa/pa64-hpux.h:33
5448 #: config/pa/pa64-hpux.h:42 config/pa/pa64-hpux.h:45
5449 msgid "warning: consider linking with '-static' as system libraries with"
6f35b5e4 5450-msgstr ""
2e34247b 5451+msgstr "警告: システムライブラリとリンクする時は '-static' を指定することを検討してください"
6f35b5e4 5452
2e34247b
AM
5453 #: config/pa/pa-hpux10.h:90 config/pa/pa-hpux10.h:93 config/pa/pa-hpux10.h:101
5454 #: config/pa/pa-hpux10.h:104 config/pa/pa-hpux11.h:109
5455 #: config/pa/pa-hpux11.h:112 config/pa/pa64-hpux.h:31 config/pa/pa64-hpux.h:34
5456 #: config/pa/pa64-hpux.h:43 config/pa/pa64-hpux.h:46
5457 msgid " profiling support are only provided in archive format"
5458-msgstr ""
5459+msgstr " プロファイリングサポートは書庫フォーマット内でのみ提供されます"
6f35b5e4 5460
2e34247b
AM
5461 #: config/rs6000/darwin.h:99
5462 msgid " conflicting code gen style switches are used"
6f35b5e4 5463-msgstr ""
2e34247b 5464+msgstr " 競合しているコード生成スタイルスイッチが使用されています"
6f35b5e4 5465
2e34247b
AM
5466 #: config/arm/arm.h:178
5467 msgid "-msoft-float and -mhard_float may not be used together"
5468@@ -4805,7 +4800,7 @@
6f35b5e4 5469
2e34247b
AM
5470 #: config/i386/linux-unwind.h:186
5471 msgid "ax ; {int $0x80 | syscall"
5472-msgstr ""
5473+msgstr "ax ; {int $0x80 | syscall"
6f35b5e4 5474
2e34247b
AM
5475 #: config/s390/tpf.h:120
5476 msgid "static is not supported on TPF-OS"
5477@@ -4869,7 +4864,7 @@
6f35b5e4 5478
2e34247b
AM
5479 #: java/lang.opt:206
5480 msgid "--extdirs=<path>\tSet the extension directory path"
5481-msgstr ""
5482+msgstr "--extdirs=<path>\t拡張のディレクトリパスを設定する"
6f35b5e4 5483
2e34247b
AM
5484 #: java/lang.opt:216
5485 msgid "Input file is a file with a list of filenames to compile"
5486@@ -5388,7 +5383,7 @@
6f35b5e4 5487
2e34247b
AM
5488 #: config/frv/frv.opt:31
5489 msgid "Enable label alignment optimizations"
5490-msgstr ""
5491+msgstr "ラベル整列最適化を有効にする"
6f35b5e4 5492
2e34247b
AM
5493 #: config/frv/frv.opt:35
5494 msgid "Dynamically allocate cc registers"
5495@@ -5452,7 +5447,7 @@
6f35b5e4 5496
2e34247b
AM
5497 #: config/frv/frv.opt:116
5498 msgid "Enable use of GPREL for read-only data in FDPIC"
6f35b5e4 5499-msgstr ""
2e34247b 5500+msgstr "FDPIC 内の読み取り専用データ用 GPREL の使用を有効にする"
6f35b5e4 5501
2e34247b
AM
5502 #: config/frv/frv.opt:120 config/rs6000/rs6000.opt:216
5503 #: config/pdp11/pdp11.opt:67
5504@@ -5460,9 +5455,8 @@
5505 msgstr "ハードウェア浮動小数点を利用する"
6f35b5e4 5506
2e34247b 5507 #: config/frv/frv.opt:124 config/bfin/bfin.opt:77
6f35b5e4 5508-#, fuzzy
2e34247b
AM
5509 msgid "Enable inlining of PLT in function calls"
5510-msgstr "関数呼び出しの前後でレジスタの保存を有効にする"
5511+msgstr "関数呼び出し内で PLT のインライン化を有効にする"
6f35b5e4 5512
2e34247b
AM
5513 #: config/frv/frv.opt:128
5514 msgid "Enable PIC support for building libraries"
5515@@ -5478,7 +5472,7 @@
5516
5517 #: config/frv/frv.opt:140
5518 msgid "Use media instructions"
6f35b5e4 5519-msgstr ""
2e34247b 5520+msgstr "media 命令を使用する"
6f35b5e4 5521
2e34247b
AM
5522 #: config/frv/frv.opt:144
5523 msgid "Use multiply add/subtract instructions"
5524@@ -5494,7 +5488,7 @@
6f35b5e4 5525
2e34247b
AM
5526 #: config/frv/frv.opt:157
5527 msgid "Do not mark ABI switches in e_flags"
5528-msgstr ""
5529+msgstr "e_flags 内の ABI スイッチをマークしない"
6f35b5e4 5530
2e34247b
AM
5531 #: config/frv/frv.opt:161
5532 msgid "Remove redundant membars"
5533@@ -5506,7 +5500,7 @@
5534
5535 #: config/frv/frv.opt:169
5536 msgid "Enable setting GPRs to the result of comparisons"
6f35b5e4 5537-msgstr ""
2e34247b 5538+msgstr "比較結果を汎用レジスタに設定することを有効にする"
6f35b5e4 5539
2e34247b
AM
5540 #: config/frv/frv.opt:173
5541 msgid "Change the amount of scheduler lookahead"
5542@@ -5565,9 +5559,8 @@
5543 msgstr ""
6f35b5e4 5544
2e34247b 5545 #: config/mn10300/mn10300.opt:56
6f35b5e4 5546-#, fuzzy
2e34247b
AM
5547 msgid "Allow gcc to generate LIW instructions"
5548-msgstr "gcc が repeat/erepeat 命令を使用することを許可する"
5549+msgstr "gcc が LIW 命令を生成することを許可する"
6f35b5e4 5550
2e34247b
AM
5551 #: config/s390/tpf.opt:23
5552 msgid "Enable TPF-OS tracing code"
5553@@ -5640,11 +5633,11 @@
6f35b5e4 5554
2e34247b
AM
5555 #: config/s390/s390.opt:91
5556 msgid "Warn if a function uses alloca or creates an array with dynamic size"
6f35b5e4 5557-msgstr ""
2e34247b 5558+msgstr "関数で alloca を使用するか、または動的サイズの配列を作成した場合に、警告する"
6f35b5e4 5559
2e34247b
AM
5560 #: config/s390/s390.opt:95
5561 msgid "Warn if a single function's framesize exceeds the given framesize"
6f35b5e4 5562-msgstr ""
2e34247b 5563+msgstr "一つの関数のフレームサイズが与えられたフレームサイズを超過する場合に警告する"
6f35b5e4 5564
2e34247b
AM
5565 #: config/s390/s390.opt:99
5566 msgid "z/Architecture"
5567@@ -5692,7 +5685,7 @@
6f35b5e4 5568
2e34247b
AM
5569 #: config/ia64/ia64.opt:56
5570 msgid "gp is constant (but save/restore gp on indirect calls)"
5571-msgstr "gp を定数とする(但、間接呼び出しでは gp を save/restore する)"
5572+msgstr "gp を定数とする(ただし、間接呼び出しでは gp を save/restore する)"
6f35b5e4 5573
2e34247b
AM
5574 #: config/ia64/ia64.opt:60
5575 msgid "Generate self-relocatable code"
5576@@ -5741,39 +5734,39 @@
5577 #: config/ia64/ia64.opt:107 config/spu/spu.opt:72 config/sh/sh.opt:258
5578 #: config/pa/pa.opt:51
5579 msgid "Specify range of registers to make fixed"
5580-msgstr ""
5581+msgstr "固定するレジスタの範囲を指定する"
6f35b5e4 5582
2e34247b
AM
5583 #: config/ia64/ia64.opt:119
5584 msgid "Use data speculation before reload"
5585-msgstr ""
5586+msgstr "reload 前にデータ投機を使用する"
6f35b5e4 5587
2e34247b
AM
5588 #: config/ia64/ia64.opt:123
5589 msgid "Use data speculation after reload"
6f35b5e4 5590-msgstr ""
2e34247b 5591+msgstr "reload 後にデータ投機を使用する"
6f35b5e4 5592
2e34247b
AM
5593 #: config/ia64/ia64.opt:127
5594 msgid "Use control speculation"
6f35b5e4 5595-msgstr ""
2e34247b 5596+msgstr "制御投機を使用する"
6f35b5e4 5597
2e34247b
AM
5598 #: config/ia64/ia64.opt:131
5599 msgid "Use in block data speculation before reload"
5600-msgstr ""
5601+msgstr "reload 前にブロック内データ投機を使用する"
6f35b5e4 5602
2e34247b
AM
5603 #: config/ia64/ia64.opt:135
5604 msgid "Use in block data speculation after reload"
5605-msgstr ""
5606+msgstr "reload 後にブロック内データ投機を使用する"
6f35b5e4 5607
2e34247b
AM
5608 #: config/ia64/ia64.opt:139
5609 msgid "Use in block control speculation"
5610-msgstr ""
5611+msgstr "ブロック内制御投機を使用する"
6f35b5e4 5612
2e34247b
AM
5613 #: config/ia64/ia64.opt:143
5614 msgid "Use simple data speculation check"
5615-msgstr ""
5616+msgstr "単純データ投機検査を使用する"
6f35b5e4 5617
2e34247b
AM
5618 #: config/ia64/ia64.opt:147
5619 msgid "Use simple data speculation check for control speculation"
5620-msgstr ""
5621+msgstr "制御投機用の単純データ投機検査を使用する"
6f35b5e4 5622
2e34247b
AM
5623 #: config/ia64/ia64.opt:151
5624 msgid "If set, data speculative instructions will be chosen for schedule only if there are no other choices at the moment "
5625@@ -5789,7 +5782,7 @@
6f35b5e4 5626
2e34247b
AM
5627 #: config/ia64/ia64.opt:163
5628 msgid "Place a stop bit after every cycle when scheduling"
5629-msgstr ""
5630+msgstr "スケジューリング時の各サイクル後にストップビットを配置する"
6f35b5e4 5631
2e34247b
AM
5632 #: config/ia64/ia64.opt:167
5633 msgid "Assume that floating-point stores and loads are not likely to cause conflict when placed into one instruction group"
5634@@ -5805,7 +5798,7 @@
6f35b5e4 5635
2e34247b
AM
5636 #: config/ia64/ia64.opt:179
5637 msgid "Don't generate checks for control speculation in selective scheduling"
5638-msgstr ""
5639+msgstr "選択的スケジューリング内では制御投機用の検査を生成しない"
6f35b5e4 5640
2e34247b
AM
5641 #: config/ia64/vms_symvec_libgcc_s.opt:3
5642 msgid "! It would be better to auto-generate this file."
5643@@ -6109,7 +6102,7 @@
6f35b5e4 5644
2e34247b
AM
5645 #: config/m68k/m68k.opt:160 config/bfin/bfin.opt:61
5646 msgid "Enable separate data segment"
5647-msgstr ""
5648+msgstr "分離データセグメントを有効にする"
6f35b5e4 5649
2e34247b
AM
5650 #: config/m68k/m68k.opt:164 config/bfin/bfin.opt:57
5651 msgid "ID of shared library to build"
5652@@ -6149,7 +6142,7 @@
6f35b5e4 5653
2e34247b
AM
5654 #: config/i386/mingw.opt:23
5655 msgid "Warn about none ISO msvcrt scanf/printf width extensions"
5656-msgstr ""
5657+msgstr "非 ISO の msvcrt scanf/printf の幅拡張に関して警告する"
6f35b5e4 5658
2e34247b
AM
5659 #: config/i386/mingw.opt:27
5660 msgid "For nested functions on stack executable permission is set."
5661@@ -6201,7 +6194,7 @@
6f35b5e4 5662
2e34247b
AM
5663 #: config/i386/i386.opt:114
5664 msgid "Data greater than given threshold will go into .ldata section in x86-64 medium model"
5665-msgstr ""
5666+msgstr "x86-64 メディアモデルでは与えられた閾値より大きいデータを .ldata セクションに配置する"
6f35b5e4 5667
2e34247b
AM
5668 #: config/i386/i386.opt:118
5669 msgid "Use given x86-64 code model"
5670@@ -6217,16 +6210,15 @@
5671
5672 #: config/i386/i386.opt:129
5673 msgid "Always use Dynamic Realigned Argument Pointer (DRAP) to realign stack"
6f35b5e4 5674-msgstr ""
2e34247b 5675+msgstr "スタックを再整列するために動的再整列引数ポインタ (Dynamic Realigned Argument Pointer, DRAP) を常に使用する"
6f35b5e4 5676
2e34247b
AM
5677 #: config/i386/i386.opt:133
5678 msgid "Return values of functions in FPU registers"
5679 msgstr "FPU レジスタ内の機能の値を返す"
6f35b5e4 5680
2e34247b 5681 #: config/i386/i386.opt:137
6f35b5e4 5682-#, fuzzy
2e34247b
AM
5683 msgid "Generate floating point mathematics using given instruction set"
5684-msgstr "ハードウェア浮動小数点命令を使用する"
5685+msgstr "与えられた命令集合を使用して浮動小数数値計算を生成する"
6f35b5e4 5686
2e34247b
AM
5687 #: config/i386/i386.opt:149
5688 msgid "Inline all known string operations"
5689@@ -6314,8 +6306,9 @@
5690 msgstr "8 バイトベクトルをメモリに返す"
6f35b5e4 5691
2e34247b
AM
5692 #: config/i386/i386.opt:253
5693+#, fuzzy
5694 msgid "Generate reciprocals instead of divss and sqrtss."
6f35b5e4 5695-msgstr ""
2e34247b 5696+msgstr "divss および sqrtss の代わりに逆数 (reciprocal) を生成する"
6f35b5e4 5697
2e34247b
AM
5698 #: config/i386/i386.opt:257
5699 msgid "Generate cld instruction in the function prologue."
5700@@ -6331,7 +6324,7 @@
6f35b5e4 5701
2e34247b
AM
5702 #: config/i386/i386.opt:271
5703 msgid "Use 128-bit AVX instructions instead of 256-bit AVX instructions in the auto-vectorizer."
6f35b5e4 5704-msgstr ""
2e34247b 5705+msgstr "自動ベクトル化で 256 ビット AVX 命令の代わりに 128 ビット AVX 命令を使用する"
6f35b5e4 5706
2e34247b
AM
5707 #: config/i386/i386.opt:277
5708 msgid "Generate 32bit i386 code"
5709@@ -6382,9 +6375,8 @@
5710 msgstr "SSE4.1 と SSE4.2 の組み込み関数とコード生成をサポートしない"
6f35b5e4 5711
2e34247b
AM
5712 #: config/i386/i386.opt:328
5713-#, fuzzy
5714 msgid "%<-msse5%> was removed"
5715-msgstr "'-msse5' は削除されました"
5716+msgstr "%<-msse5%> は削除されました"
6f35b5e4 5717
2e34247b
AM
5718 #: config/i386/i386.opt:333
5719 msgid "Support MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2 and AVX built-in functions and code generation"
5720@@ -6544,7 +6536,7 @@
6f35b5e4 5721
2e34247b
AM
5722 #: config/rs6000/rs6000.opt:152
5723 msgid "Use PowerPC General Purpose group optional instructions"
5724-msgstr "PowerPC 一般用途グループオプション命令を使用する"
5725+msgstr "PowerPC 汎用グループオプション命令を使用する"
6f35b5e4 5726
2e34247b
AM
5727 #: config/rs6000/rs6000.opt:156
5728 msgid "Use PowerPC Graphics group optional instructions"
5729@@ -7002,7 +6994,7 @@
5730
5731 #: config/mcore/mcore.opt:56 config/fr30/fr30.opt:27
5732 msgid "Assume that run-time support has been provided, so omit -lsim from the linker command line"
6f35b5e4 5733-msgstr ""
2e34247b 5734+msgstr "実行時サポートが提供されると見なし、リンカコマンドラインに -lsim を含めない"
6f35b5e4 5735
2e34247b
AM
5736 #: config/mcore/mcore.opt:60
5737 msgid "Use arbitrary sized immediates in bit operations"
5738@@ -7014,7 +7006,7 @@
6f35b5e4 5739
2e34247b
AM
5740 #: config/mcore/mcore.opt:71
5741 msgid "Set the maximum amount for a single stack increment operation"
5742-msgstr "単一のスタックインクリメント操作の最大値を設定する"
5743+msgstr "単一のスタック増分操作の最大値を設定する"
6f35b5e4 5744
2e34247b
AM
5745 #: config/mcore/mcore.opt:75
5746 msgid "Always treat bitfields as int-sized"
5747@@ -7234,7 +7226,7 @@
6f35b5e4 5748
2e34247b
AM
5749 #: config/sh/sh.opt:246
5750 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"
6f35b5e4 5751-msgstr ""
2e34247b 5752+msgstr "除算戦略、次のいずれか: call, call2, fp, inv, inv:minlat, inv20u, inv20l, inv:call, inv:call2, inv:fp, call-div1, call-fp, call-table"
6f35b5e4 5753
2e34247b
AM
5754 #: config/sh/sh.opt:250
5755 msgid "Specify name for 32 bit signed division function"
5756@@ -7282,7 +7274,7 @@
6f35b5e4 5757
2e34247b
AM
5758 #: config/sh/sh.opt:298
5759 msgid "Mark MAC register as call-clobbered"
6f35b5e4 5760-msgstr ""
2e34247b 5761+msgstr "MAC レジスタを呼び出しで破壊されるとマークする"
6f35b5e4 5762
2e34247b
AM
5763 #: config/sh/sh.opt:304
5764 msgid "Make structs a multiple of 4 bytes (warning: ABI altered)"
5765@@ -7960,7 +7952,7 @@
6f35b5e4 5766
2e34247b
AM
5767 #: config/m68hc11/m68hc11.opt:49
5768 msgid "Auto pre/post decrement increment allowed"
5769-msgstr "自動 pre/post デクリメント インクリメントを許容する"
5770+msgstr "自動 前置/後置 減分/増分 を許容する"
6f35b5e4 5771
2e34247b
AM
5772 #: config/m68hc11/m68hc11.opt:53
5773 msgid "Min/max instructions allowed"
5774@@ -7972,7 +7964,7 @@
6f35b5e4 5775
2e34247b
AM
5776 #: config/m68hc11/m68hc11.opt:61
5777 msgid "Auto pre/post decrement increment not allowed"
5778-msgstr "自動 pre/post デクリメント インクリメントを許容しない"
5779+msgstr "自動 前置/後置 減分/増分を許容しない"
5780
5781 #: config/m68hc11/m68hc11.opt:65
5782 msgid "Use jsr and rts for function calls and returns"
5783@@ -8346,7 +8338,7 @@
5784
5785 #: config/bfin/bfin.opt:69
5786 msgid "Link with the fast floating-point library"
6f35b5e4 5787-msgstr ""
2e34247b 5788+msgstr "高速な浮動小数ライブラリとリンクする"
6f35b5e4 5789
2e34247b
AM
5790 #: config/bfin/bfin.opt:81
5791 msgid "Do stack checking using bounds in L1 scratch memory"
5792@@ -8382,7 +8374,7 @@
6f35b5e4 5793
2e34247b
AM
5794 #: config/picochip/picochip.opt:31
5795 msgid "Specify whether the byte access instructions should be used. Enabled by default."
5796-msgstr ""
5797+msgstr "バイトアクセス命令を使用するかどうかを指定する。デフォルトでは有効となる"
6f35b5e4 5798
2e34247b
AM
5799 #: config/picochip/picochip.opt:35
5800 msgid "Enable debug output to be generated."
5801@@ -8390,11 +8382,11 @@
6f35b5e4 5802
2e34247b
AM
5803 #: config/picochip/picochip.opt:39
5804 msgid "Allow a symbol value to be used as an immediate value in an instruction."
5805-msgstr ""
5806+msgstr "命令内でシンボル値が即値として使用されることを許可する"
6f35b5e4 5807
2e34247b
AM
5808 #: config/picochip/picochip.opt:43
5809 msgid "Generate warnings when inefficient code is known to be generated."
5810-msgstr ""
5811+msgstr "非効率なコードが生成された時に警告する"
6f35b5e4 5812
2e34247b
AM
5813 #: config/vxworks.opt:36
5814 msgid "Assume the VxWorks RTP environment"
5815@@ -8418,7 +8410,7 @@
6f35b5e4 5816
2e34247b
AM
5817 #: config/darwin.opt:205
5818 msgid "Warn if constant CFString objects contain non-portable characters"
5819-msgstr ""
5820+msgstr "定数 CFString オブジェクトが移植性の無い文字を含む場合に警告する"
6f35b5e4 5821
2e34247b
AM
5822 #: config/darwin.opt:210
5823 msgid "Generate AT&T-style stubs for Mach-O"
5824@@ -8430,7 +8422,7 @@
6f35b5e4 5825
2e34247b
AM
5826 #: config/darwin.opt:218
5827 msgid "Generate code suitable for fast turn around debugging"
5828-msgstr ""
5829+msgstr "デバッグを高速に行うために適したコードを生成する"
6f35b5e4 5830
2e34247b
AM
5831 #: config/darwin.opt:227
5832 msgid "The earliest MacOS X version on which this program will run"
5833@@ -8442,15 +8434,15 @@
6f35b5e4 5834
2e34247b
AM
5835 #: config/darwin.opt:235
5836 msgid "Generate code for darwin loadable kernel extensions"
5837-msgstr ""
5838+msgstr "darwin ロード可能カーネル拡張用のコードを生成する"
6f35b5e4 5839
2e34247b
AM
5840 #: config/darwin.opt:239
5841 msgid "Generate code for the kernel or loadable kernel extensions"
5842-msgstr ""
5843+msgstr "カーネル用、またはロード可能カーネル拡張用のコードを生成する"
6f35b5e4 5844
2e34247b
AM
5845 #: config/darwin.opt:243
5846 msgid "-iframework <dir>\tAdd <dir> to the end of the system framework include path"
5847-msgstr ""
5848+msgstr "-iframework <dir>\t<dir> をシステムフレームワークインクルードパスの末尾に加える"
6f35b5e4 5849
2e34247b
AM
5850 #: config/lynx.opt:23
5851 msgid "Support legacy multi-threading"
5852@@ -8737,7 +8729,6 @@
5853 msgstr ""
6f35b5e4 5854
2e34247b
AM
5855 #: config/microblaze/microblaze.opt:92
5856-#, fuzzy
5857 msgid "Use hardware floating point conversion instructions"
5858 msgstr "ハードウェア浮動小数点変換命令を使用する"
6f35b5e4 5859
2e34247b 5860@@ -8862,7 +8853,7 @@
6f35b5e4 5861
2e34247b
AM
5862 #: c-family/c.opt:249
5863 msgid "-MT <target>\tAdd an unquoted target"
5864-msgstr ""
5865+msgstr "-MT <target>\tターゲット (引用符を付けない) を追加する"
6f35b5e4 5866
2e34247b
AM
5867 #: c-family/c.opt:253
5868 msgid "Do not generate #line directives"
5869@@ -8898,11 +8889,11 @@
6f35b5e4 5870
2e34247b
AM
5871 #: c-family/c.opt:288
5872 msgid "Warn about C constructs that are not in the common subset of C and C++"
5873-msgstr ""
5874+msgstr "C と C++ の共通部分集合では無い C 構文に関して警告する"
6f35b5e4 5875
2e34247b
AM
5876 #: c-family/c.opt:292
5877 msgid "Warn about C++ constructs whose meaning differs between ISO C++ 1998 and ISO C++ 200x"
5878-msgstr ""
5879+msgstr "ISO C++ 1998 と ISO C++ 200x で意味が異なる C++ 構文に関して警告する"
6f35b5e4 5880
2e34247b
AM
5881 #: c-family/c.opt:296
5882 msgid "Warn about casts which discard qualifiers"
5883@@ -8962,7 +8953,7 @@
6f35b5e4 5884
2e34247b
AM
5885 #: c-family/c.opt:352
5886 msgid "Warn about stray tokens after #elif and #endif"
5887-msgstr ""
5888+msgstr "#elif および #endif の後にあるはぐれたトークンに関して警告する"
6f35b5e4 5889
2e34247b
AM
5890 #: c-family/c.opt:356
5891 msgid "Warn about comparison of different enum types"
5892@@ -8977,9 +8968,8 @@
5893 msgstr "浮動小数点数の等価比較に関して警告する"
6f35b5e4 5894
2e34247b
AM
5895 #: c-family/c.opt:372
5896-#, fuzzy
5897 msgid "Warn about printf/scanf/strftime/strfmon format string anomalies"
5898-msgstr "printf/scanf/strftime/strfmon 形式の変則的なものに関して警告する"
5899+msgstr "printf/scanf/strftime/strfmon 書式文字列異常に関して警告する"
6f35b5e4 5900
2e34247b
AM
5901 #: c-family/c.opt:376
5902 msgid "Warn if passing too many arguments to a function for its format string"
5903@@ -8998,9 +8988,8 @@
5904 msgstr "セキュリティ問題になる可能性がある書式関数に関して警告する"
6f35b5e4 5905
2e34247b
AM
5906 #: c-family/c.opt:392
5907-#, fuzzy
5908 msgid "Warn about strftime formats yielding 2-digit years"
5909-msgstr "strftime 形式が二桁で年を表している時の警告しない"
5910+msgstr "strftime 書式が 2 桁の年の場合に警告する"
5911
5912 #: c-family/c.opt:396
5913 msgid "Warn about zero-length formats"
5914@@ -9409,7 +9398,7 @@
5915
5916 #: c-family/c.opt:823
5917 msgid "Don't emit dllexported inline functions unless needed"
5918-msgstr ""
5919+msgstr "必要が無い限り dllexported インライン関数を発行しない"
5920
5921 #: c-family/c.opt:830
5922 msgid "Allow implicit conversions between vectors with differing numbers of subparts and/or differing element types."
5923@@ -9501,7 +9490,7 @@
5924
5925 #: c-family/c.opt:942
5926 msgid "Generate run time type descriptor information"
5927-msgstr ""
5928+msgstr "実行時型記述子情報を生成する"
5929
5930 #: c-family/c.opt:946
5931 msgid "Use the same size for double as for float"
5932@@ -9889,19 +9878,16 @@
5933 msgstr "関数が __attribute__((pure)) の候補となりそうな場合に警告する"
5934
5935 #: common.opt:608
5936-#, fuzzy
5937 msgid "Warn about enumerated switches, with no default, missing a case"
5938-msgstr "列挙定数の switch で case 指定が欠けているものに関して警告する"
5939+msgstr "列挙定数を使用した switch 文で default 文が無いか特定の case が無い場合に警告する"
5940
5941 #: common.opt:612
5942-#, fuzzy
5943 msgid "Warn about enumerated switches missing a \"default:\" statement"
5944-msgstr "列挙定数の switch で case 指定が欠けているものに関して警告する"
5945+msgstr "列挙定数を使用した switch 文で \"default:\" 文が無い場合に警告する"
5946
5947 #: common.opt:616
5948-#, fuzzy
5949 msgid "Warn about all enumerated switches missing a specific case"
5950-msgstr "列挙定数の switch で case 指定が欠けているものに関して警告する"
5951+msgstr "列挙定数を使用した switch 文で特定の case が無い場合に警告する"
5952
5953 #: common.opt:620
5954 msgid "Do not suppress warnings from system headers"
5955@@ -10000,9 +9986,8 @@
5956 msgstr "自動増加/減少命令を生成する"
5957
5958 #: common.opt:821
5959-#, fuzzy
5960 msgid "Generate code to check bounds before indexing arrays"
5961-msgstr "配列の添字と添字境界を検査するコードを生成する"
5962+msgstr "配列の添え字を使用する前に境界検査を行うコードを生成する"
5963
5964 #: common.opt:825
5965 #, fuzzy
5966@@ -10043,7 +10028,7 @@
5967
5968 #: common.opt:864
5969 msgid "Looks for opportunities to reduce stack adjustments and stack references."
5970-msgstr ""
5971+msgstr "スタック調整およびスタック参照を削減する機会を探す"
5972
5973 #: common.opt:868
5974 msgid "Do not put uninitialized globals in the common section"
5975@@ -10058,18 +10043,16 @@
5976 msgstr ""
5977
5978 #: common.opt:884
5979-#, fuzzy
5980 msgid "Perform comparison elimination after register allocation has finished"
5981-msgstr "グローバル共通部分式を除去する"
5982+msgstr "レジスタは位置が完了した後に比較の除去を行う"
5983
5984 #: common.opt:888
5985 msgid "Do not perform optimizations increasing noticeably stack usage"
5986-msgstr ""
5987+msgstr "スタック使用量を著しく増加させる最適化を行わない"
5988
5989 #: common.opt:892
5990-#, fuzzy
5991 msgid "Perform a register copy-propagation optimization pass"
5992-msgstr "最適化過程のレジスタつけ変えを行なう"
5993+msgstr ""
5994
5995 #: common.opt:896
5996 msgid "Perform cross-jumping optimization"
5997@@ -10101,7 +10084,7 @@
5998
5999 #: common.opt:928
6000 msgid "Map one directory name to another in debug information"
6001-msgstr ""
6002+msgstr "デバッグ情報内のディレクトリー名を他のものにマップする"
6003
6004 #: common.opt:934
6005 msgid "Defer popping functions args from stack until later"
6006@@ -10116,9 +10099,8 @@
6007 msgstr "無意味な null ポインタ検査を削除する"
6008
6009 #: common.opt:946
6010-#, fuzzy
6011 msgid "Try to convert virtual calls to direct ones."
6012-msgstr "リンカが PIC 呼び出しを直接呼び出しに変更することを許可するように試みる"
6013+msgstr "仮想呼び出しを直接呼び出しに変換することを試みる"
6014
6015 #: common.opt:950
6016 #, fuzzy
6017@@ -10137,7 +10119,7 @@
6018
6019 #: common.opt:978
6020 msgid "-fdump-final-insns=filename\tDump to filename the insns at the end of translation"
6021-msgstr ""
6022+msgstr "-fdump-final-insns=filename\t翻訳終了時に filename へ命令をダンプする"
6023
6024 #: common.opt:982
6025 msgid "-fdump-go-spec=filename\tWrite all declarations to file as Go code"
6026@@ -10173,7 +10155,7 @@
6027
6028 #: common.opt:1014 common.opt:1018
6029 msgid "Perform unused type elimination in debug info"
6030-msgstr ""
6031+msgstr "デバッグ情報内で使用されていない型の除去を行う"
6032
6033 #: common.opt:1022
6034 msgid "Do not suppress C++ class debug information."
6035@@ -10181,25 +10163,24 @@
6036
6037 #: common.opt:1026
6038 msgid "Generate debug information to support Identical Code Folding (ICF)"
6039-msgstr ""
6040+msgstr "Identical Code Folding (ICF) をサポートするためのデバッグ情報を生成する"
6041
6042 #: common.opt:1030
6043 msgid "Enable exception handling"
6044 msgstr "例外処理を有効にする"
6045
6046 #: common.opt:1034
6047-#, fuzzy
6048 msgid "Perform a number of minor, expensive optimizations"
6049-msgstr "目立たない、コストのかかる最適化を行なう"
6050+msgstr "多くの、目立たないがコストが高い最適化を行う"
6051
6052 #: common.opt:1038
6053 msgid "-fexcess-precision=[fast|standard]\tSpecify handling of excess floating-point precision"
6054-msgstr ""
6055+msgstr "-fexcess-precision=[fast|standard]\t余分な浮動小数点精度の取り扱いを指定する"
6056
6057 #: common.opt:1041
6058 #, c-format
6059 msgid "unknown excess precision style %qs"
6060-msgstr ""
6061+msgstr "不明な余分な精度スタイル %qs です"
6062
6063 #: common.opt:1054
6064 msgid "Assume no NaNs or infinities are generated"
6065@@ -10222,52 +10203,45 @@
6066 msgstr ""
6067
6068 #: common.opt:1077
6069-#, fuzzy, c-format
6070+#, c-format
6071 msgid "unknown floating point contraction style %qs"
6072-msgstr "浮動小数点定数を TOC 内に配置する"
6073+msgstr "不明な浮動小数短縮形 %qs です"
6074
6075 #: common.opt:1094
6076 msgid "Allow function addresses to be held in registers"
6077 msgstr "関数アドレスをレジスタに持たせる事を許可する"
6078
6079 #: common.opt:1098
6080-#, fuzzy
6081 msgid "Place each function into its own section"
6082-msgstr "各々の関数をそれ自身のセクションに配置する"
6083+msgstr "それぞれの関数をそれ自身のセクションに配置する"
6084
6085 #: common.opt:1102
6086-#, fuzzy
6087 msgid "Perform global common subexpression elimination"
6088-msgstr "グローバル共通部分式を除去する"
6089+msgstr "大域共通部分式の除去を行う"
6090
6091 #: common.opt:1106
6092-#, fuzzy
6093 msgid "Perform enhanced load motion during global common subexpression elimination"
6094-msgstr "グローバル共通部分式を除去する"
6095+msgstr ""
6096
6097 #: common.opt:1110
6098-#, fuzzy
6099 msgid "Perform store motion after global common subexpression elimination"
6100-msgstr "グローバル共通部分式を除去する"
6101+msgstr ""
6102
6103 #: common.opt:1114
6104 msgid "Perform redundant load after store elimination in global common subexpression"
6105 msgstr ""
6106
6107 #: common.opt:1119
6108-#, fuzzy
6109 msgid "Perform global common subexpression elimination after register allocation"
6110-msgstr "グローバル共通部分式を除去する"
6111+msgstr "レジスタ配置後に大域共通部分式の除去を行う"
6112
6113 #: common.opt:1125
6114-#, fuzzy
6115 msgid "Enable in and out of Graphite representation"
6116-msgstr "自動テンプレート実体化を有効にする"
6117+msgstr ""
6118
6119 #: common.opt:1129
6120-#, fuzzy
6121 msgid "Enable Graphite Identity transformation"
6122-msgstr "呼び出しグラフ情報を送出する"
6123+msgstr ""
6124
6125 #: common.opt:1133
6126 msgid "Mark all loops as parallel"
6127@@ -10306,9 +10280,8 @@
6128 msgstr ""
6129
6130 #: common.opt:1173
6131-#, fuzzy
6132 msgid "Perform conversion of conditional jumps to conditional execution"
6133-msgstr "条件的な実行への変更のための閾値を変更する"
6134+msgstr ""
6135
6136 #: common.opt:1177
6137 msgid "Convert conditional jumps in innermost loops to branchless equivalents"
6138@@ -10376,13 +10349,12 @@
6139 msgstr ""
6140
6141 #: common.opt:1253
6142-#, fuzzy
6143 msgid "Discover pure and const functions"
6144-msgstr "使われない仮想関数を切り捨てる"
6145+msgstr "純粋および定数関数を見つける"
6146
6147 #: common.opt:1257
6148 msgid "Discover readonly and non addressable static variables"
6149-msgstr ""
6150+msgstr "読み取り専用およびアドレス付けできない静的変数を見つける"
6151
6152 #: common.opt:1261
6153 msgid "Perform matrix layout flattening and transposing based"
6154@@ -10415,9 +10387,8 @@
6155 msgstr ""
6156
6157 #: common.opt:1305
6158-#, fuzzy
6159 msgid "Share slots for saving different hard registers."
6160-msgstr "引数レジスタにローカルのものを格納する"
6161+msgstr ""
6162
6163 #: common.opt:1309
6164 msgid "Share stack slots for spilled pseudo-registers."
6165@@ -10621,19 +10592,19 @@
6166
6167 #: common.opt:1521
6168 msgid "Enable basic program profiling code"
6169-msgstr ""
6170+msgstr "基本プログラムプロファイリングコードを有効にする"
6171
6172 #: common.opt:1525
6173 msgid "Insert arc-based program profiling code"
6174-msgstr ""
6175+msgstr "円弧ベースプログラムプロファイリングコードを挿入する"
6176
6177 #: common.opt:1529
6178 msgid "Set the top-level directory for storing the profile data."
6179-msgstr ""
6180+msgstr "プロファイルデータ保存用の最上位ディレクリーを設定する"
6181
6182 #: common.opt:1534
6183 msgid "Enable correction of flow inconsistent profile data input"
6184-msgstr ""
6185+msgstr "フロー一貫性が無いデータ入力の訂正を有効にする"
6186
6187 #: common.opt:1538
6188 msgid "Enable common options for generating profile info for profile feedback directed optimizations"
6189@@ -10653,7 +10624,7 @@
6190
6191 #: common.opt:1554
6192 msgid "Insert code to profile values of expressions"
6193-msgstr ""
6194+msgstr "式の値をプロファイルするためのコードを挿入する"
6195
6196 #: common.opt:1561
6197 msgid "-frandom-seed=<string>\tMake compile reproducible using <string>"
6198@@ -11836,7 +11807,7 @@
6199 #: c-decl.c:1150
6200 #, gcc-internal-format
6201 msgid "nested function %q+D declared but never defined"
6202-msgstr ""
6203+msgstr "入れ子になった関数 %q+D が宣言されましたが定義されていません"
6204
6205 #: c-decl.c:1162
6206 #, gcc-internal-format
6207@@ -11893,7 +11864,7 @@
6208 #: c-decl.c:1613
6209 #, gcc-internal-format
6210 msgid "prototype for %q+D follows non-prototype definition"
6211-msgstr ""
6212+msgstr "非プロトタイプ定義に続いて %q+D 用のプロトタイプがあります"
6213
6214 #: c-decl.c:1628
6215 #, gcc-internal-format
6216@@ -11969,9 +11940,9 @@
6217 msgstr "%q+D が異なる型で再定義されました"
6218
6219 #: c-decl.c:1818
6220-#, fuzzy, gcc-internal-format
6221+#, gcc-internal-format
6222 msgid "redefinition of typedef %q+D with variably modified type"
6223-msgstr "%q+D が異なる型で再定義されました"
6224+msgstr ""
6225
6226 #: c-decl.c:1825
6227 #, gcc-internal-format
6228@@ -12016,17 +11987,17 @@
6229 #: c-decl.c:2001
6230 #, gcc-internal-format
6231 msgid "extern declaration of %q+D follows declaration with no linkage"
6232-msgstr ""
6233+msgstr "リンク無し宣言の後に %q+D の extern 宣言が続いています"
6234
6235 #: c-decl.c:2037
6236 #, gcc-internal-format
6237 msgid "declaration of %q+D with no linkage follows extern declaration"
6238-msgstr ""
6239+msgstr "extern 宣言の後にリンク無し %q+D の宣言が続いています"
6240
6241 #: c-decl.c:2043
6242 #, gcc-internal-format
6243 msgid "redeclaration of %q+D with no linkage"
6244-msgstr ""
6245+msgstr "リンク無し %q+D の再定義です"
6246
6247 #: c-decl.c:2069
6248 #, gcc-internal-format
6249@@ -12354,7 +12325,7 @@
6250 #: c-decl.c:4614
6251 #, gcc-internal-format
6252 msgid "defining a type in a compound literal is invalid in C++"
6253-msgstr ""
6254+msgstr "複合リテラル内での型定義は C++ では無効です"
6255
6256 #: c-decl.c:4666 c-decl.c:4681
6257 #, gcc-internal-format
6258@@ -13393,23 +13364,23 @@
6259 #: c-parser.c:1829
6260 #, gcc-internal-format
6261 msgid "expression in static assertion is not an integer"
6262-msgstr ""
6263+msgstr "静的アサーション内の式が整数ではありません"
6264
6265 #: c-parser.c:1836
6266 #, gcc-internal-format
6267 msgid "expression in static assertion is not an integer constant expression"
6268-msgstr ""
6269+msgstr "静的アサーション内の式が整数定数式ではありません"
6270
6271 #: c-parser.c:1841
6272 #, gcc-internal-format
6273 msgid "expression in static assertion is not constant"
6274-msgstr ""
6275+msgstr "静的アサーション内の式が定数ではありません"
6276
6277 #. Report the error.
6278 #: c-parser.c:1846 cp/semantics.c:4719
6279 #, gcc-internal-format
6280 msgid "static assertion failed: %E"
6281-msgstr ""
6282+msgstr "静的アサーションに失敗しました: %E"
6283
6284 #: c-parser.c:2207 c-parser.c:3063 c-parser.c:3709 c-parser.c:3983
6285 #: c-parser.c:5084 c-parser.c:5175 c-parser.c:5800 c-parser.c:6083
6286@@ -14125,12 +14096,12 @@
6287 #: c-typeck.c:3578
6288 #, gcc-internal-format
6289 msgid "increment of enumeration value is invalid in C++"
6290-msgstr "列挙値のインクリメントは C++ では無効です"
6291+msgstr "列挙値の増分は C++ では無効です"
6292
6293 #: c-typeck.c:3581
6294 #, gcc-internal-format
6295 msgid "decrement of enumeration value is invalid in C++"
6296-msgstr "列挙値のデクリメントは C++ では無効です"
6297+msgstr "列挙値の減分は C++ では無効です"
6298
6299 #: c-typeck.c:3594
6300 #, gcc-internal-format
6301@@ -14140,22 +14111,22 @@
6302 #: c-typeck.c:3613 c-typeck.c:3645
6303 #, gcc-internal-format
6304 msgid "wrong type argument to increment"
6305-msgstr "インクリメントする引数の型が間違っています"
6306+msgstr "増分する引数の型が間違っています"
6307
6308 #: c-typeck.c:3615 c-typeck.c:3648
6309 #, gcc-internal-format
6310 msgid "wrong type argument to decrement"
6311-msgstr "デクリメントする引数の型が間違っています"
6312+msgstr "減分する引数の型が間違っています"
6313
6314 #: c-typeck.c:3635
6315 #, gcc-internal-format
6316 msgid "increment of pointer to unknown structure"
6317-msgstr "不明な構造体へのポインタのインクリメントです"
6318+msgstr "不明な構造体へのポインタの増分です"
6319
6320 #: c-typeck.c:3638
6321 #, gcc-internal-format
6322 msgid "decrement of pointer to unknown structure"
6323-msgstr "不明な構造体へのポインタのデクリメントです"
6324+msgstr "不明な構造体へのポインタの減分です"
6325
6326 #: c-typeck.c:3722
6327 #, gcc-internal-format
6328@@ -14170,12 +14141,12 @@
6329 #: c-typeck.c:3895 c-family/c-common.c:8658
6330 #, gcc-internal-format
6331 msgid "increment of read-only location %qE"
6332-msgstr "読み取り専用位置 %qE のインクリメントです"
6333+msgstr "読み取り専用位置 %qE の増分です"
6334
6335 #: c-typeck.c:3898 c-family/c-common.c:8659
6336 #, gcc-internal-format
6337 msgid "decrement of read-only location %qE"
6338-msgstr "読み取り専用位置 %qE のデクリメントです"
6339+msgstr "読み取り専用位置 %qE の減分です"
6340
6341 #: c-typeck.c:3939
6342 #, gcc-internal-format
6343@@ -19787,12 +19758,12 @@
6344 #: c-family/c-common.c:8611
6345 #, gcc-internal-format
6346 msgid "increment of member %qD in read-only object"
6347-msgstr "読み取り専用オブジェクト内のメンバ %qD のインクリメントです"
6348+msgstr "読み取り専用オブジェクト内のメンバ %qD の増分です"
6349
6350 #: c-family/c-common.c:8613
6351 #, gcc-internal-format
6352 msgid "decrement of member %qD in read-only object"
6353-msgstr "読み取り専用オブジェクト内のメンバ %qD のデクリメントです"
6354+msgstr "読み取り専用オブジェクト内のメンバ %qD の減分です"
6355
6356 #: c-family/c-common.c:8615
6357 #, gcc-internal-format
6358@@ -19807,12 +19778,12 @@
6359 #: c-family/c-common.c:8620
6360 #, gcc-internal-format
6361 msgid "increment of read-only member %qD"
6362-msgstr "読み取り専用メンバ %qD のインクリメントです"
6363+msgstr "読み取り専用メンバ %qD の増分です"
6364
6365 #: c-family/c-common.c:8621
6366 #, gcc-internal-format
6367 msgid "decrement of read-only member %qD"
6368-msgstr "読み取り専用メンバ %qD のデクリメントです"
6369+msgstr "読み取り専用メンバ %qD の減分です"
6370
6371 #: c-family/c-common.c:8622
6372 #, gcc-internal-format
6373@@ -19827,12 +19798,12 @@
6374 #: c-family/c-common.c:8627
6375 #, gcc-internal-format
6376 msgid "increment of read-only variable %qD"
6377-msgstr "読み取り専用変数 %qD のインクリメントです"
6378+msgstr "読み取り専用変数 %qD の増分です"
6379
6380 #: c-family/c-common.c:8628
6381 #, gcc-internal-format
6382 msgid "decrement of read-only variable %qD"
6383-msgstr "読み取り専用変数 %qD のデクリメントです"
6384+msgstr "読み取り専用変数 %qD の減分です"
6385
6386 #: c-family/c-common.c:8629
6387 #, gcc-internal-format
6388@@ -19847,12 +19818,12 @@
6389 #: c-family/c-common.c:8633
6390 #, gcc-internal-format
6391 msgid "increment of read-only parameter %qD"
6392-msgstr "読み取り専用パラメータ %qD のインクリメントです"
6393+msgstr "読み取り専用パラメータ %qD の増分です"
6394
6395 #: c-family/c-common.c:8634
6396 #, gcc-internal-format
6397 msgid "decrement of read-only parameter %qD"
6398-msgstr "読み取り専用パラメータ %qD のデクリメントです"
6399+msgstr "読み取り専用パラメータ %qD の減分です"
6400
6401 #: c-family/c-common.c:8635
6402 #, gcc-internal-format
6403@@ -19867,12 +19838,12 @@
6404 #: c-family/c-common.c:8642
6405 #, gcc-internal-format
6406 msgid "increment of read-only named return value %qD"
6407-msgstr "読み取り専用名前付き戻り値 %qD のインクリメントです"
6408+msgstr "読み取り専用名前付き戻り値 %qD の増分です"
6409
6410 #: c-family/c-common.c:8644
6411 #, gcc-internal-format
6412 msgid "decrement of read-only named return value %qD"
6413-msgstr "読み取り専用名前付き戻り値 %qD のデクリメントです"
6414+msgstr "読み取り専用名前付き戻り値 %qD の減分です"
6415
6416 #: c-family/c-common.c:8646
6417 #, gcc-internal-format
6418@@ -19887,12 +19858,12 @@
6419 #: c-family/c-common.c:8652
6420 #, gcc-internal-format
6421 msgid "increment of function %qD"
6422-msgstr "関数 %qD のインクリメントです"
6423+msgstr "関数 %qD の増分です"
6424
6425 #: c-family/c-common.c:8653
6426 #, gcc-internal-format
6427 msgid "decrement of function %qD"
6428-msgstr "関数 %qD のデクリメントです"
6429+msgstr "関数 %qD の減分です"
6430
6431 #: c-family/c-common.c:8654
6432 #, gcc-internal-format
6433@@ -19912,12 +19883,12 @@
6434 #: c-family/c-common.c:8677
6435 #, gcc-internal-format
6436 msgid "lvalue required as increment operand"
6437-msgstr "インクリメントの被演算子として左辺値が必要です"
6438+msgstr "増分の被演算子として左辺値が必要です"
6439
6440 #: c-family/c-common.c:8680
6441 #, gcc-internal-format
6442 msgid "lvalue required as decrement operand"
6443-msgstr "デクリメントの被演算子として左辺値が必要です"
6444+msgstr "減分の被演算子として左辺値が必要です"
6445
6446 #: c-family/c-common.c:8683
6447 #, gcc-internal-format
6448@@ -20556,12 +20527,12 @@
6449 #: c-family/c-omp.c:375 cp/semantics.c:4431
6450 #, gcc-internal-format
6451 msgid "missing increment expression"
6452-msgstr "インクリメント式がありません"
6453+msgstr "増分式がありません"
6454
6455 #: c-family/c-omp.c:444 cp/semantics.c:4287
6456 #, gcc-internal-format
6457 msgid "invalid increment expression"
6458-msgstr "無効なインクリメント式です"
6459+msgstr "無効な増分式です"
6460
6461 #: c-family/c-opts.c:303
6462 #, gcc-internal-format
6463@@ -20571,7 +20542,7 @@
6464 #: c-family/c-opts.c:306
6465 #, gcc-internal-format
6466 msgid "obsolete option -I- used, please use -iquote instead"
6467-msgstr "廃止あれたオプション -I- が使用されています。代わりに -iquote を使用してください"
6468+msgstr "廃止されたオプション -I- が使用されています。代わりに -iquote を使用してください"
6469
6470 #: c-family/c-opts.c:486
6471 #, gcc-internal-format
6472Index: gcc/tree-ssa-forwprop.c
6473===================================================================
a966c5b5
AM
6474--- gcc/tree-ssa-forwprop.c (.../tags/gcc_4_6_2_release) (wersja 182722)
6475+++ gcc/tree-ssa-forwprop.c (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
6476@@ -872,7 +872,7 @@
6477 TREE_TYPE (gimple_assign_rhs1 (use_stmt))))
6478 {
6479 tree *def_rhs_basep = &TREE_OPERAND (def_rhs, 0);
6480- tree new_offset, new_base, saved;
6481+ tree new_offset, new_base, saved, new_lhs;
6482 while (handled_component_p (*def_rhs_basep))
6483 def_rhs_basep = &TREE_OPERAND (*def_rhs_basep, 0);
6484 saved = *def_rhs_basep;
6485@@ -891,9 +891,12 @@
6486 *def_rhs_basep = build2 (MEM_REF, TREE_TYPE (*def_rhs_basep),
6487 new_base, new_offset);
6488 TREE_THIS_VOLATILE (*def_rhs_basep) = TREE_THIS_VOLATILE (lhs);
6489+ TREE_SIDE_EFFECTS (*def_rhs_basep) = TREE_SIDE_EFFECTS (lhs);
6490 TREE_THIS_NOTRAP (*def_rhs_basep) = TREE_THIS_NOTRAP (lhs);
6491- gimple_assign_set_lhs (use_stmt,
6492- unshare_expr (TREE_OPERAND (def_rhs, 0)));
6493+ new_lhs = unshare_expr (TREE_OPERAND (def_rhs, 0));
6494+ gimple_assign_set_lhs (use_stmt, new_lhs);
6495+ TREE_THIS_VOLATILE (new_lhs) = TREE_THIS_VOLATILE (lhs);
6496+ TREE_SIDE_EFFECTS (new_lhs) = TREE_SIDE_EFFECTS (lhs);
6497 *def_rhs_basep = saved;
6498 tidy_after_forward_propagate_addr (use_stmt);
6499 /* Continue propagating into the RHS if this was not the
6500@@ -953,7 +956,7 @@
6501 TREE_TYPE (TREE_OPERAND (def_rhs, 0))))
6502 {
6503 tree *def_rhs_basep = &TREE_OPERAND (def_rhs, 0);
6504- tree new_offset, new_base, saved;
6505+ tree new_offset, new_base, saved, new_rhs;
6506 while (handled_component_p (*def_rhs_basep))
6507 def_rhs_basep = &TREE_OPERAND (*def_rhs_basep, 0);
6508 saved = *def_rhs_basep;
6509@@ -972,9 +975,12 @@
6510 *def_rhs_basep = build2 (MEM_REF, TREE_TYPE (*def_rhs_basep),
6511 new_base, new_offset);
6512 TREE_THIS_VOLATILE (*def_rhs_basep) = TREE_THIS_VOLATILE (rhs);
6513+ TREE_SIDE_EFFECTS (*def_rhs_basep) = TREE_SIDE_EFFECTS (rhs);
6514 TREE_THIS_NOTRAP (*def_rhs_basep) = TREE_THIS_NOTRAP (rhs);
6515- gimple_assign_set_rhs1 (use_stmt,
6516- unshare_expr (TREE_OPERAND (def_rhs, 0)));
6517+ new_rhs = unshare_expr (TREE_OPERAND (def_rhs, 0));
6518+ gimple_assign_set_rhs1 (use_stmt, new_rhs);
6519+ TREE_THIS_VOLATILE (new_rhs) = TREE_THIS_VOLATILE (rhs);
6520+ TREE_SIDE_EFFECTS (new_rhs) = TREE_SIDE_EFFECTS (rhs);
6521 *def_rhs_basep = saved;
6522 fold_stmt_inplace (use_stmt);
6523 tidy_after_forward_propagate_addr (use_stmt);
6524Index: gcc/varasm.c
6525===================================================================
a966c5b5
AM
6526--- gcc/varasm.c (.../tags/gcc_4_6_2_release) (wersja 182722)
6527+++ gcc/varasm.c (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
6528@@ -6751,11 +6751,14 @@
6529 /* A non-decl is an entry in the constant pool. */
6530 if (!DECL_P (exp))
6531 local_p = true;
6532- /* Weakrefs may not bind locally, even though the weakref itself is
6533- always static and therefore local.
6534- FIXME: We can resolve this more curefuly by looking at the weakref
6535- alias. */
6536- else if (lookup_attribute ("weakref", DECL_ATTRIBUTES (exp)))
6537+ /* Weakrefs may not bind locally, even though the weakref itself is always
6538+ static and therefore local. Similarly, the resolver for ifunc functions
6539+ might resolve to a non-local function.
6540+ FIXME: We can resolve the weakref case more curefuly by looking at the
6541+ weakref alias. */
6542+ else if (lookup_attribute ("weakref", DECL_ATTRIBUTES (exp))
6543+ || (TREE_CODE (exp) == FUNCTION_DECL
6544+ && lookup_attribute ("ifunc", DECL_ATTRIBUTES (exp))))
6545 local_p = false;
6546 /* Static variables are always local. */
6547 else if (! TREE_PUBLIC (exp))
6548Index: gcc/sched-deps.c
6549===================================================================
a966c5b5
AM
6550--- gcc/sched-deps.c (.../tags/gcc_4_6_2_release) (wersja 182722)
6551+++ gcc/sched-deps.c (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
6552@@ -2687,7 +2687,11 @@
6553 else
6554 sched_analyze_2 (deps, XEXP (link, 0), insn);
6555 }
6556- if (find_reg_note (insn, REG_SETJMP, NULL))
6557+ /* Don't schedule anything after a tail call, tail call needs
6558+ to use at least all call-saved registers. */
6559+ if (SIBLING_CALL_P (insn))
6560+ reg_pending_barrier = TRUE_BARRIER;
6561+ else if (find_reg_note (insn, REG_SETJMP, NULL))
6562 reg_pending_barrier = MOVE_BARRIER;
6563 }
6564
6565Index: gcc/tree-object-size.c
6566===================================================================
a966c5b5
AM
6567--- gcc/tree-object-size.c (.../tags/gcc_4_6_2_release) (wersja 182722)
6568+++ gcc/tree-object-size.c (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
6569@@ -175,7 +175,7 @@
6570 unsigned HOST_WIDE_INT sz;
6571
6572 if (!osi || (object_size_type & 1) != 0
6573- || TREE_CODE (pt_var) != SSA_NAME)
6574+ || TREE_CODE (TREE_OPERAND (pt_var, 0)) != SSA_NAME)
6575 {
6576 sz = compute_builtin_object_size (TREE_OPERAND (pt_var, 0),
6577 object_size_type & ~1);
a966c5b5
AM
6578Index: gcc/tree-outof-ssa.c
6579===================================================================
6580--- gcc/tree-outof-ssa.c (.../tags/gcc_4_6_2_release) (wersja 182722)
6581+++ gcc/tree-outof-ssa.c (.../branches/gcc-4_6-branch) (wersja 182722)
6582@@ -237,9 +237,10 @@
6583
6584 var = SSA_NAME_VAR (partition_to_var (SA.map, dest));
6585 src_mode = TYPE_MODE (TREE_TYPE (src));
6586- dest_mode = promote_decl_mode (var, &unsignedp);
6587+ dest_mode = GET_MODE (SA.partition_to_pseudo[dest]);
6588 gcc_assert (src_mode == TYPE_MODE (TREE_TYPE (var)));
6589- gcc_assert (dest_mode == GET_MODE (SA.partition_to_pseudo[dest]));
6590+ gcc_assert (!REG_P (SA.partition_to_pseudo[dest])
6591+ || dest_mode == promote_decl_mode (var, &unsignedp));
6592
6593 if (src_mode != dest_mode)
6594 {
2e34247b
AM
6595Index: gcc/lto-opts.c
6596===================================================================
a966c5b5
AM
6597--- gcc/lto-opts.c (.../tags/gcc_4_6_2_release) (wersja 182722)
6598+++ gcc/lto-opts.c (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
6599@@ -358,7 +358,7 @@
6600 size_t len, l, skip;
6601 const char *data, *p;
6602 const struct lto_simple_header *header;
6603- int32_t opts_offset;
6604+ int opts_offset;
6605 struct lto_input_block ib;
6606
6607 data = lto_get_section_data (file_data, LTO_section_opts, NULL, &len);
6608@@ -379,10 +379,10 @@
6609
6610 lto_check_version (header->lto_header.major_version,
6611 header->lto_header.minor_version);
6612-
6613+
6614 LTO_INIT_INPUT_BLOCK (ib, p + opts_offset, 0, header->main_size);
6615 input_options (&ib);
6616-
6617+
6618 skip = header->main_size + opts_offset;
6619 l -= skip;
6620 p += skip;
6621Index: gcc/c-parser.c
6622===================================================================
a966c5b5
AM
6623--- gcc/c-parser.c (.../tags/gcc_4_6_2_release) (wersja 182722)
6624+++ gcc/c-parser.c (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
6625@@ -6294,7 +6294,7 @@
6626 c_parser_error (parser, "expected identifier");
6627 c_parser_skip_until_found (parser, CPP_CLOSE_PAREN,
6628 "expected %<)%>");
6629- expr.value = fold_offsetof (offsetof_ref, NULL_TREE);
6630+ expr.value = fold_offsetof (offsetof_ref);
6631 }
6632 break;
6633 case RID_CHOOSE_EXPR:
a966c5b5
AM
6634Index: gcc/config/alpha/linux-unwind.h
6635===================================================================
6636--- gcc/config/alpha/linux-unwind.h (.../tags/gcc_4_6_2_release) (wersja 182722)
6637+++ gcc/config/alpha/linux-unwind.h (.../branches/gcc-4_6-branch) (wersja 182722)
6638@@ -1,5 +1,5 @@
6639 /* DWARF2 EH unwinding support for Alpha Linux.
6640- Copyright (C) 2004, 2005, 2009 Free Software Foundation, Inc.
6641+ Copyright (C) 2004, 2005, 2009, 2011 Free Software Foundation, Inc.
6642
6643 This file is part of GCC.
6644
6645@@ -36,16 +36,17 @@
6646 {
6647 unsigned int *pc = context->ra;
6648 struct sigcontext *sc;
6649- long new_cfa, i;
6650+ long new_cfa;
6651+ int i;
6652
6653 if (pc[0] != 0x47fe0410 /* mov $30,$16 */
6654- || pc[2] != 0x00000083 /* callsys */)
6655+ || pc[2] != 0x00000083) /* callsys */
6656 return _URC_END_OF_STACK;
6657 if (context->cfa == 0)
6658 return _URC_END_OF_STACK;
6659 if (pc[1] == 0x201f0067) /* lda $0,NR_sigreturn */
6660 sc = context->cfa;
6661- else if (pc[1] == 0x201f015f) /* lda $0,NR_rt_sigreturn */
6662+ else if (pc[1] == 0x201f015f) /* lda $0,NR_rt_sigreturn */
6663 {
6664 struct rt_sigframe {
6665 struct siginfo info;
6666@@ -55,6 +56,7 @@
6667 }
6668 else
6669 return _URC_END_OF_STACK;
6670+
6671 new_cfa = sc->sc_regs[30];
6672 fs->regs.cfa_how = CFA_REG_OFFSET;
6673 fs->regs.cfa_reg = 30;
6674@@ -63,13 +65,13 @@
6675 {
6676 fs->regs.reg[i].how = REG_SAVED_OFFSET;
6677 fs->regs.reg[i].loc.offset
6678- = (long)&sc->sc_regs[i] - new_cfa;
6679+ = (long) &sc->sc_regs[i] - new_cfa;
6680 }
6681 for (i = 0; i < 31; ++i)
6682 {
6683 fs->regs.reg[i+32].how = REG_SAVED_OFFSET;
6684 fs->regs.reg[i+32].loc.offset
6685- = (long)&sc->sc_fpregs[i] - new_cfa;
6686+ = (long) &sc->sc_fpregs[i] - new_cfa;
6687 }
6688 fs->regs.reg[64].how = REG_SAVED_OFFSET;
6689 fs->regs.reg[64].loc.offset = (long)&sc->sc_pc - new_cfa;
6690@@ -78,3 +80,20 @@
6691
6692 return _URC_NO_REASON;
6693 }
6694+
6695+#define MD_FROB_UPDATE_CONTEXT alpha_frob_update_context
6696+
6697+/* Fix up for signal handlers that don't have S flag set. */
6698+
6699+static void
6700+alpha_frob_update_context (struct _Unwind_Context *context,
6701+ _Unwind_FrameState *fs ATTRIBUTE_UNUSED)
6702+{
6703+ unsigned int *pc = context->ra;
6704+
6705+ if (pc[0] == 0x47fe0410 /* mov $30,$16 */
6706+ && pc[2] == 0x00000083 /* callsys */
6707+ && (pc[1] == 0x201f0067 /* lda $0,NR_sigreturn */
6708+ || pc[1] == 0x201f015f)) /* lda $0,NR_rt_sigreturn */
6709+ _Unwind_SetSignalFrame (context, 1);
6710+}
2e34247b
AM
6711Index: gcc/config/sparc/sparc.md
6712===================================================================
a966c5b5
AM
6713--- gcc/config/sparc/sparc.md (.../tags/gcc_4_6_2_release) (wersja 182722)
6714+++ gcc/config/sparc/sparc.md (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
6715@@ -28,6 +28,7 @@
6716 [(UNSPEC_MOVE_PIC 0)
6717 (UNSPEC_UPDATE_RETURN 1)
6718 (UNSPEC_LOAD_PCREL_SYM 2)
6719+ (UNSPEC_FRAME_BLOCKAGE 3)
6720 (UNSPEC_MOVE_PIC_LABEL 5)
6721 (UNSPEC_SETH44 6)
6722 (UNSPEC_SETM44 7)
6723@@ -1813,8 +1814,8 @@
6724 })
6725
6726 (define_insn "*movsf_insn"
6727- [(set (match_operand:V32 0 "nonimmediate_operand" "=d,f,*r,*r,*r,f,*r,m,m")
6728- (match_operand:V32 1 "input_operand" "GY,f,*rRY,Q,S,m,m,f,*rGY"))]
6729+ [(set (match_operand:V32 0 "nonimmediate_operand" "=d,f, *r,*r,*r,f,*r,m, m")
6730+ (match_operand:V32 1 "input_operand" "GY,f,*rRY, Q, S,m, m,f,*rGY"))]
6731 "TARGET_FPU
6732 && (register_operand (operands[0], <V32:MODE>mode)
6733 || register_or_zero_operand (operands[1], <V32:MODE>mode))"
6734@@ -1861,8 +1862,8 @@
6735 ;; when -mno-fpu.
6736
6737 (define_insn "*movsf_insn_no_fpu"
6738- [(set (match_operand:SF 0 "nonimmediate_operand" "=r,r,r,r,m")
6739- (match_operand:SF 1 "input_operand" "rR,Q,S,m,rG"))]
6740+ [(set (match_operand:SF 0 "nonimmediate_operand" "=r,r,r,r, m")
6741+ (match_operand:SF 1 "input_operand" "rR,Q,S,m,rG"))]
6742 "! TARGET_FPU
6743 && (register_operand (operands[0], SFmode)
6744 || register_or_zero_operand (operands[1], SFmode))"
6745@@ -1948,8 +1949,8 @@
6746
6747 ;; Be careful, fmovd does not exist when !v9.
6748 (define_insn "*movdf_insn_sp32"
6749- [(set (match_operand:DF 0 "nonimmediate_operand" "=e,W,U,T,o,e,*r,o,e,o")
6750- (match_operand:DF 1 "input_operand" "W#F,e,T,U,G,e,*rFo,*r,o#F,e"))]
6751+ [(set (match_operand:DF 0 "nonimmediate_operand" "= e,W,U,T,o,e, *r, o, e,o")
6752+ (match_operand:DF 1 "input_operand" "W#F,e,T,U,G,e,*rFo,*r,o#F,e"))]
6753 "TARGET_FPU
6754 && ! TARGET_V9
6755 && (register_operand (operands[0], DFmode)
6756@@ -1969,8 +1970,8 @@
6757 (set_attr "length" "*,*,*,*,2,2,2,2,2,2")])
6758
6759 (define_insn "*movdf_insn_sp32_no_fpu"
6760- [(set (match_operand:DF 0 "nonimmediate_operand" "=U,T,o,r,o")
6761- (match_operand:DF 1 "input_operand" "T,U,G,ro,r"))]
6762+ [(set (match_operand:DF 0 "nonimmediate_operand" "=U,T,o, r,o")
6763+ (match_operand:DF 1 "input_operand" " T,U,G,ro,r"))]
6764 "! TARGET_FPU
6765 && ! TARGET_V9
6766 && (register_operand (operands[0], DFmode)
6767@@ -1986,8 +1987,8 @@
6768
6769 ;; We have available v9 double floats but not 64-bit integer registers.
6770 (define_insn "*movdf_insn_sp32_v9"
6771- [(set (match_operand:V64 0 "nonimmediate_operand" "=b,e,e,T,W,U,T,f,*r,o")
6772- (match_operand:V64 1 "input_operand" "GY,e,W#F,GY,e,T,U,o#F,*roGYDF,*rGYf"))]
6773+ [(set (match_operand:V64 0 "nonimmediate_operand" "=b,e, e, T,W,U,T, f, *r, o")
6774+ (match_operand:V64 1 "input_operand" "GY,e,W#F,GY,e,T,U,o#F,*roFD,*rGYf"))]
6775 "TARGET_FPU
6776 && TARGET_V9
6777 && ! TARGET_ARCH64
6778@@ -2009,8 +2010,8 @@
6779 (set_attr "fptype" "double,double,*,*,*,*,*,*,*,*")])
6780
6781 (define_insn "*movdf_insn_sp32_v9_no_fpu"
6782- [(set (match_operand:DF 0 "nonimmediate_operand" "=U,T,T,r,o")
6783- (match_operand:DF 1 "input_operand" "T,U,G,ro,rG"))]
6784+ [(set (match_operand:DF 0 "nonimmediate_operand" "=U,T,T, r, o")
6785+ (match_operand:DF 1 "input_operand" " T,U,G,ro,rG"))]
6786 "! TARGET_FPU
6787 && TARGET_V9
6788 && ! TARGET_ARCH64
6789@@ -2027,8 +2028,8 @@
6790
6791 ;; We have available both v9 double floats and 64-bit integer registers.
6792 (define_insn "*movdf_insn_sp64"
6793- [(set (match_operand:V64 0 "nonimmediate_operand" "=b,e,e,W,*r,*r,m,*r")
6794- (match_operand:V64 1 "input_operand" "GY,e,W#F,e,*rGY,m,*rGY,DF"))]
6795+ [(set (match_operand:V64 0 "nonimmediate_operand" "=b,e, e,W, *r,*r, m,*r")
6796+ (match_operand:V64 1 "input_operand" "GY,e,W#F,e,*rGY, m,*rGY,FD"))]
6797 "TARGET_FPU
6798 && TARGET_ARCH64
6799 && (register_operand (operands[0], <V64:MODE>mode)
6800@@ -2047,8 +2048,8 @@
6801 (set_attr "fptype" "double,double,*,*,*,*,*,*")])
6802
6803 (define_insn "*movdf_insn_sp64_no_fpu"
6804- [(set (match_operand:DF 0 "nonimmediate_operand" "=r,r,m")
6805- (match_operand:DF 1 "input_operand" "r,m,rG"))]
6806+ [(set (match_operand:DF 0 "nonimmediate_operand" "=r,r, m")
6807+ (match_operand:DF 1 "input_operand" "r,m,rG"))]
6808 "! TARGET_FPU
6809 && TARGET_ARCH64
6810 && (register_operand (operands[0], DFmode)
6811@@ -2288,8 +2289,8 @@
6812 })
6813
6814 (define_insn "*movtf_insn_sp32"
6815- [(set (match_operand:TF 0 "nonimmediate_operand" "=b,e,o,U,r")
6816- (match_operand:TF 1 "input_operand" "G,oe,GeUr,o,roG"))]
6817+ [(set (match_operand:TF 0 "nonimmediate_operand" "=b, e, o,U, r")
6818+ (match_operand:TF 1 "input_operand" " G,oe,GeUr,o,roG"))]
6819 "TARGET_FPU
6820 && ! TARGET_ARCH64
6821 && (register_operand (operands[0], TFmode)
6822@@ -2302,8 +2303,8 @@
6823 ;; when -mno-fpu.
6824
6825 (define_insn "*movtf_insn_sp32_no_fpu"
6826- [(set (match_operand:TF 0 "nonimmediate_operand" "=o,U,o,r,o")
6827- (match_operand:TF 1 "input_operand" "G,o,U,roG,r"))]
6828+ [(set (match_operand:TF 0 "nonimmediate_operand" "=o,U,o, r,o")
6829+ (match_operand:TF 1 "input_operand" " G,o,U,roG,r"))]
6830 "! TARGET_FPU
6831 && ! TARGET_ARCH64
6832 && (register_operand (operands[0], TFmode)
6833@@ -2312,8 +2313,8 @@
6834 [(set_attr "length" "4")])
6835
6836 (define_insn "*movtf_insn_sp64"
6837- [(set (match_operand:TF 0 "nonimmediate_operand" "=b,e,o,r")
6838- (match_operand:TF 1 "input_operand" "G,oe,Ger,roG"))]
6839+ [(set (match_operand:TF 0 "nonimmediate_operand" "=b, e, o, r")
6840+ (match_operand:TF 1 "input_operand" "G,oe,Ger,roG"))]
6841 "TARGET_FPU
6842 && TARGET_ARCH64
6843 && ! TARGET_HARD_QUAD
6844@@ -2323,8 +2324,8 @@
6845 [(set_attr "length" "2")])
6846
6847 (define_insn "*movtf_insn_sp64_hq"
6848- [(set (match_operand:TF 0 "nonimmediate_operand" "=b,e,e,m,o,r")
6849- (match_operand:TF 1 "input_operand" "G,e,m,e,rG,roG"))]
6850+ [(set (match_operand:TF 0 "nonimmediate_operand" "=b,e,e,m, o, r")
6851+ (match_operand:TF 1 "input_operand" "G,e,m,e,rG,roG"))]
6852 "TARGET_FPU
6853 && TARGET_ARCH64
6854 && TARGET_HARD_QUAD
6855@@ -2341,8 +2342,8 @@
6856 (set_attr "length" "2,*,*,*,2,2")])
6857
6858 (define_insn "*movtf_insn_sp64_no_fpu"
6859- [(set (match_operand:TF 0 "nonimmediate_operand" "=r,o")
6860- (match_operand:TF 1 "input_operand" "orG,rG"))]
6861+ [(set (match_operand:TF 0 "nonimmediate_operand" "= r, o")
6862+ (match_operand:TF 1 "input_operand" "orG,rG"))]
6863 "! TARGET_FPU
6864 && TARGET_ARCH64
6865 && (register_operand (operands[0], TFmode)
6866@@ -6338,6 +6339,25 @@
6867 ""
6868 [(set_attr "length" "0")])
6869
6870+;; Do not schedule instructions accessing memory before this point.
6871+
6872+(define_expand "frame_blockage"
6873+ [(set (match_dup 0)
6874+ (unspec:BLK [(match_dup 1)] UNSPEC_FRAME_BLOCKAGE))]
6875+ ""
6876+{
6877+ operands[0] = gen_rtx_MEM (BLKmode, gen_rtx_SCRATCH (Pmode));
6878+ MEM_VOLATILE_P (operands[0]) = 1;
6879+ operands[1] = stack_pointer_rtx;
6880+})
6881+
6882+(define_insn "*frame_blockage<P:mode>"
6883+ [(set (match_operand:BLK 0 "" "")
6884+ (unspec:BLK [(match_operand:P 1 "" "")] UNSPEC_FRAME_BLOCKAGE))]
6885+ ""
6886+ ""
6887+ [(set_attr "length" "0")])
6888+
6889 (define_expand "probe_stack"
6890 [(set (match_operand 0 "memory_operand" "") (const_int 0))]
6891 ""
6892Index: gcc/config/sparc/sparc.c
6893===================================================================
a966c5b5
AM
6894--- gcc/config/sparc/sparc.c (.../tags/gcc_4_6_2_release) (wersja 182722)
6895+++ gcc/config/sparc/sparc.c (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
6896@@ -4569,8 +4569,9 @@
6897 else if (actual_fsize <= 8192)
6898 {
6899 insn = emit_insn (gen_stack_pointer_inc (GEN_INT (-4096)));
6900+ RTX_FRAME_RELATED_P (insn) = 1;
6901+
6902 /* %sp is still the CFA register. */
6903- RTX_FRAME_RELATED_P (insn) = 1;
6904 insn
6905 = emit_insn (gen_stack_pointer_inc (GEN_INT (4096-actual_fsize)));
6906 }
6907@@ -4592,8 +4593,18 @@
6908 else if (actual_fsize <= 8192)
6909 {
6910 insn = emit_insn (gen_save_register_window (GEN_INT (-4096)));
6911+
6912 /* %sp is not the CFA register anymore. */
6913 emit_insn (gen_stack_pointer_inc (GEN_INT (4096-actual_fsize)));
6914+
6915+ /* Make sure no %fp-based store is issued until after the frame is
6916+ established. The offset between the frame pointer and the stack
6917+ pointer is calculated relative to the value of the stack pointer
6918+ at the end of the function prologue, and moving instructions that
6919+ access the stack via the frame pointer between the instructions
6920+ that decrement the stack pointer could result in accessing the
6921+ register window save area, which is volatile. */
6922+ emit_insn (gen_frame_blockage ());
6923 }
6924 else
6925 {
6926Index: gcc/config/sparc/sparc.h
6927===================================================================
a966c5b5
AM
6928--- gcc/config/sparc/sparc.h (.../tags/gcc_4_6_2_release) (wersja 182722)
6929+++ gcc/config/sparc/sparc.h (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
6930@@ -408,6 +408,7 @@
6931 %{mcpu=sparclite:-Asparclite} \
6932 %{mcpu=sparclite86x:-Asparclite} \
6933 %{mcpu=f930:-Asparclite} %{mcpu=f934:-Asparclite} \
6934+%{mcpu=v8:-Av8} \
6935 %{mv8plus:-Av8plus} \
6936 %{mcpu=v9:-Av9} \
6937 %{mcpu=ultrasparc:%{!mv8plus:-Av9a}} \
6938Index: gcc/config/i386/i386.md
6939===================================================================
a966c5b5
AM
6940--- gcc/config/i386/i386.md (.../tags/gcc_4_6_2_release) (wersja 182722)
6941+++ gcc/config/i386/i386.md (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
6942@@ -1960,7 +1960,7 @@
6943
6944 (define_insn "*movdi_internal_rex64"
6945 [(set (match_operand:DI 0 "nonimmediate_operand"
6946- "=r,r ,r,m ,!m,*y,*y,?r ,m ,?*Ym,?*y,*x,*x,?r ,m,?*Yi,*x,?*x,?*Ym")
6947+ "=r,r ,r,m ,!o,*y,*y,?r ,m ,?*Ym,?*y,*x,*x,?r ,m,?*Yi,*x,?*x,?*Ym")
6948 (match_operand:DI 1 "general_operand"
6949 "Z ,rem,i,re,n ,C ,*y,*Ym,*y,r ,m ,C ,*x,*Yi,*x,r ,m ,*Ym,*x"))]
6950 "TARGET_64BIT && !(MEM_P (operands[0]) && MEM_P (operands[1]))"
6951@@ -2905,7 +2905,7 @@
6952
6953 (define_insn "*movdf_internal_rex64"
6954 [(set (match_operand:DF 0 "nonimmediate_operand"
6955- "=f,m,f,r ,m,!r,!m,Y2*x,Y2*x,Y2*x,m ,Yi,r ")
6956+ "=f,m,f,r ,m,!r,!o,Y2*x,Y2*x,Y2*x,m ,Yi,r ")
6957 (match_operand:DF 1 "general_operand"
6958 "fm,f,G,rm,r,F ,F ,C ,Y2*x,m ,Y2*x,r ,Yi"))]
6959 "TARGET_64BIT && !(MEM_P (operands[0]) && MEM_P (operands[1]))
6960@@ -5103,7 +5103,7 @@
6961 && reload_completed
6962 && (SSE_REG_P (operands[0])
6963 || (GET_CODE (operands[0]) == SUBREG
6964- && SSE_REG_P (operands[0])))"
6965+ && SSE_REG_P (SUBREG_REG (operands[0]))))"
6966 [(set (match_dup 0) (float:MODEF (match_dup 1)))])
6967
6968 (define_split
6969@@ -5116,7 +5116,7 @@
6970 && reload_completed
6971 && (SSE_REG_P (operands[0])
6972 || (GET_CODE (operands[0]) == SUBREG
6973- && SSE_REG_P (operands[0])))"
6974+ && SSE_REG_P (SUBREG_REG (operands[0]))))"
6975 [(set (match_dup 2) (match_dup 1))
6976 (set (match_dup 0) (float:MODEF (match_dup 2)))])
6977
6978@@ -5207,7 +5207,7 @@
6979 && reload_completed
6980 && (SSE_REG_P (operands[0])
6981 || (GET_CODE (operands[0]) == SUBREG
6982- && SSE_REG_P (operands[0])))"
6983+ && SSE_REG_P (SUBREG_REG (operands[0]))))"
6984 [(const_int 0)]
6985 {
6986 rtx op1 = operands[1];
6987@@ -5248,7 +5248,7 @@
6988 && reload_completed
6989 && (SSE_REG_P (operands[0])
6990 || (GET_CODE (operands[0]) == SUBREG
6991- && SSE_REG_P (operands[0])))"
6992+ && SSE_REG_P (SUBREG_REG (operands[0]))))"
6993 [(const_int 0)]
6994 {
6995 operands[3] = simplify_gen_subreg (<ssevecmode>mode, operands[0],
6996@@ -5270,7 +5270,7 @@
6997 && reload_completed
6998 && (SSE_REG_P (operands[0])
6999 || (GET_CODE (operands[0]) == SUBREG
7000- && SSE_REG_P (operands[0])))"
7001+ && SSE_REG_P (SUBREG_REG (operands[0]))))"
7002 [(const_int 0)]
7003 {
7004 rtx op1 = operands[1];
7005@@ -5314,7 +5314,7 @@
7006 && reload_completed
7007 && (SSE_REG_P (operands[0])
7008 || (GET_CODE (operands[0]) == SUBREG
7009- && SSE_REG_P (operands[0])))"
7010+ && SSE_REG_P (SUBREG_REG (operands[0]))))"
7011 [(const_int 0)]
7012 {
7013 operands[3] = simplify_gen_subreg (<ssevecmode>mode, operands[0],
7014@@ -5375,7 +5375,7 @@
7015 && reload_completed
7016 && (SSE_REG_P (operands[0])
7017 || (GET_CODE (operands[0]) == SUBREG
7018- && SSE_REG_P (operands[0])))"
7019+ && SSE_REG_P (SUBREG_REG (operands[0]))))"
7020 [(set (match_dup 0) (float:MODEF (match_dup 1)))])
7021
7022 (define_insn "*float<SSEMODEI24:mode><MODEF:mode>2_sse_nointerunit"
7023@@ -5410,7 +5410,7 @@
7024 && reload_completed
7025 && (SSE_REG_P (operands[0])
7026 || (GET_CODE (operands[0]) == SUBREG
7027- && SSE_REG_P (operands[0])))"
7028+ && SSE_REG_P (SUBREG_REG (operands[0]))))"
7029 [(set (match_dup 2) (match_dup 1))
7030 (set (match_dup 0) (float:MODEF (match_dup 2)))])
7031
7032@@ -5423,7 +5423,7 @@
7033 && reload_completed
7034 && (SSE_REG_P (operands[0])
7035 || (GET_CODE (operands[0]) == SUBREG
7036- && SSE_REG_P (operands[0])))"
7037+ && SSE_REG_P (SUBREG_REG (operands[0]))))"
7038 [(set (match_dup 0) (float:MODEF (match_dup 1)))])
7039
7040 (define_insn "*float<SSEMODEI24:mode><X87MODEF:mode>2_i387_with_temp"
7041@@ -14625,7 +14625,7 @@
7042 emit_insn (gen_sse4_1_round<mode>2
7043 (operands[0], operands[1], GEN_INT (0x04)));
7044 else
7045- ix86_expand_rint (operand0, operand1);
7046+ ix86_expand_rint (operands[0], operands[1]);
7047 }
7048 else
7049 {
7050@@ -14649,9 +14649,9 @@
7051 if (optimize_insn_for_size_p ())
7052 FAIL;
7053 if (TARGET_64BIT || (<MODE>mode != DFmode))
7054- ix86_expand_round (operand0, operand1);
7055+ ix86_expand_round (operands[0], operands[1]);
7056 else
7057- ix86_expand_rounddf_32 (operand0, operand1);
7058+ ix86_expand_rounddf_32 (operands[0], operands[1]);
7059 DONE;
7060 })
7061
7062@@ -14796,7 +14796,7 @@
7063 {
7064 if (optimize_insn_for_size_p ())
7065 FAIL;
7066- ix86_expand_lround (operand0, operand1);
7067+ ix86_expand_lround (operands[0], operands[1]);
7068 DONE;
7069 })
7070
7071@@ -14871,9 +14871,9 @@
7072 emit_insn (gen_sse4_1_round<mode>2
7073 (operands[0], operands[1], GEN_INT (0x01)));
7074 else if (TARGET_64BIT || (<MODE>mode != DFmode))
7075- ix86_expand_floorceil (operand0, operand1, true);
7076+ ix86_expand_floorceil (operands[0], operands[1], true);
7077 else
7078- ix86_expand_floorceildf_32 (operand0, operand1, true);
7079+ ix86_expand_floorceildf_32 (operands[0], operands[1], true);
7080 }
7081 else
7082 {
7083@@ -15053,7 +15053,7 @@
7084 {
7085 if (TARGET_64BIT && optimize_insn_for_size_p ())
7086 FAIL;
7087- ix86_expand_lfloorceil (operand0, operand1, true);
7088+ ix86_expand_lfloorceil (operands[0], operands[1], true);
7089 DONE;
7090 })
7091
7092@@ -15128,9 +15128,9 @@
7093 else if (optimize_insn_for_size_p ())
7094 FAIL;
7095 else if (TARGET_64BIT || (<MODE>mode != DFmode))
7096- ix86_expand_floorceil (operand0, operand1, false);
7097+ ix86_expand_floorceil (operands[0], operands[1], false);
7098 else
7099- ix86_expand_floorceildf_32 (operand0, operand1, false);
7100+ ix86_expand_floorceildf_32 (operands[0], operands[1], false);
7101 }
7102 else
7103 {
7104@@ -15308,7 +15308,7 @@
7105 "SSE_FLOAT_MODE_P (<MODEF:MODE>mode) && TARGET_SSE_MATH
7106 && !flag_trapping_math"
7107 {
7108- ix86_expand_lfloorceil (operand0, operand1, false);
7109+ ix86_expand_lfloorceil (operands[0], operands[1], false);
7110 DONE;
7111 })
7112
7113@@ -15383,9 +15383,9 @@
7114 else if (optimize_insn_for_size_p ())
7115 FAIL;
7116 else if (TARGET_64BIT || (<MODE>mode != DFmode))
7117- ix86_expand_trunc (operand0, operand1);
7118+ ix86_expand_trunc (operands[0], operands[1]);
7119 else
7120- ix86_expand_truncdf_32 (operand0, operand1);
7121+ ix86_expand_truncdf_32 (operands[0], operands[1]);
7122 }
7123 else
7124 {
7125@@ -18285,8 +18285,8 @@
7126 (match_operand:SI 3 "const_int_operand" "i")]
7127 UNSPECV_LWPVAL_INTRINSIC)]
7128 "TARGET_LWP"
7129- "/* Avoid unused variable warning. */
7130- (void) operand0;")
7131+ ;; Avoid unused variable warning.
7132+ "(void) operands[0];")
7133
7134 (define_insn "*lwp_lwpval<mode>3_1"
7135 [(unspec_volatile [(match_operand:SWI48 0 "register_operand" "r")
7136Index: gcc/config/i386/sse.md
7137===================================================================
a966c5b5
AM
7138--- gcc/config/i386/sse.md (.../tags/gcc_4_6_2_release) (wersja 182722)
7139+++ gcc/config/i386/sse.md (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
7140@@ -4521,15 +4521,14 @@
7141 [(set (match_operand:V4DF 0 "register_operand" "=x,x")
7142 (vec_select:V4DF
7143 (vec_concat:V8DF
7144- (match_operand:V4DF 1 "nonimmediate_operand" "xm,x")
7145- (match_operand:V4DF 2 "nonimmediate_operand" " 1,xm"))
7146+ (match_operand:V4DF 1 "nonimmediate_operand" " x,m")
7147+ (match_operand:V4DF 2 "nonimmediate_operand" "xm,1"))
7148 (parallel [(const_int 0) (const_int 4)
7149 (const_int 2) (const_int 6)])))]
7150- "TARGET_AVX
7151- && (!MEM_P (operands[1]) || rtx_equal_p (operands[1], operands[2]))"
7152+ "TARGET_AVX"
7153 "@
7154- vmovddup\t{%1, %0|%0, %1}
7155- vunpcklpd\t{%2, %1, %0|%0, %1, %2}"
7156+ vunpcklpd\t{%2, %1, %0|%0, %1, %2}
7157+ vmovddup\t{%1, %0|%0, %1}"
7158 [(set_attr "type" "sselog")
7159 (set_attr "prefix" "vex")
7160 (set_attr "mode" "V4DF")])
7161Index: gcc/config/i386/freebsd.h
7162===================================================================
a966c5b5
AM
7163--- gcc/config/i386/freebsd.h (.../tags/gcc_4_6_2_release) (wersja 182722)
7164+++ gcc/config/i386/freebsd.h (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
7165@@ -147,3 +147,6 @@
7166 #if FBSD_MAJOR >= 6
7167 #define SUBTARGET32_DEFAULT_CPU "i486"
7168 #endif
7169+
7170+#define TARGET_ASM_FILE_END file_end_indicate_exec_stack
7171+
7172Index: gcc/config/i386/avxintrin.h
7173===================================================================
a966c5b5
AM
7174--- gcc/config/i386/avxintrin.h (.../tags/gcc_4_6_2_release) (wersja 182722)
7175+++ gcc/config/i386/avxintrin.h (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
7176@@ -759,7 +759,7 @@
7177
7178 #ifdef __x86_64__
7179 extern __inline __m256i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
7180-_mm256_insert_epi64 (__m256i __X, int __D, int const __N)
7181+_mm256_insert_epi64 (__m256i __X, long long __D, int const __N)
7182 {
7183 __m128i __Y = _mm256_extractf128_si256 (__X, __N >> 1);
7184 __Y = _mm_insert_epi64 (__Y, __D, __N % 2);
7185Index: gcc/config/i386/i386.c
7186===================================================================
a966c5b5
AM
7187--- gcc/config/i386/i386.c (.../tags/gcc_4_6_2_release) (wersja 182722)
7188+++ gcc/config/i386/i386.c (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
7189@@ -16329,7 +16329,6 @@
7190 basic_block bb = BLOCK_FOR_INSN (insn);
7191 int distance = 0;
7192 df_ref *def_rec;
7193- enum attr_type insn_type;
7194
7195 if (insn != BB_HEAD (bb))
7196 {
7197@@ -16345,8 +16344,8 @@
7198 && (regno1 == DF_REF_REGNO (*def_rec)
7199 || regno2 == DF_REF_REGNO (*def_rec)))
7200 {
7201- insn_type = get_attr_type (prev);
7202- if (insn_type != TYPE_LEA)
7203+ if (recog_memoized (prev) < 0
7204+ || get_attr_type (prev) != TYPE_LEA)
7205 goto done;
7206 }
7207 }
7208@@ -16385,8 +16384,8 @@
7209 && (regno1 == DF_REF_REGNO (*def_rec)
7210 || regno2 == DF_REF_REGNO (*def_rec)))
7211 {
7212- insn_type = get_attr_type (prev);
7213- if (insn_type != TYPE_LEA)
7214+ if (recog_memoized (prev) < 0
7215+ || get_attr_type (prev) != TYPE_LEA)
7216 goto done;
7217 }
7218 }
7219Index: gcc/config/avr/libgcc.S
7220===================================================================
a966c5b5
AM
7221--- gcc/config/avr/libgcc.S (.../tags/gcc_4_6_2_release) (wersja 182722)
7222+++ gcc/config/avr/libgcc.S (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
7223@@ -582,7 +582,16 @@
7224 push r17
7225 push r28
7226 push r29
7227+#if defined (__AVR_HAVE_8BIT_SP__)
7228+;; FIXME: __AVR_HAVE_8BIT_SP__ is set on device level, not on core level
7229+;; so this lines are dead code. To make it work, devices without
7230+;; SP_H must get their own multilib(s), see PR51345.
7231 in r28,__SP_L__
7232+ sub r28,r26
7233+ clr r29
7234+ out __SP_L__,r28
7235+#else
7236+ in r28,__SP_L__
7237 in r29,__SP_H__
7238 sub r28,r26
7239 sbc r29,r27
7240@@ -591,6 +600,7 @@
7241 out __SP_H__,r29
7242 out __SREG__,__tmp_reg__
7243 out __SP_L__,r28
7244+#endif
7245 #if defined (__AVR_HAVE_EIJMP_EICALL__)
7246 eijmp
7247 #else
7248@@ -625,6 +635,15 @@
7249 ldd r16,Y+4
7250 ldd r17,Y+3
7251 ldd r26,Y+2
7252+#if defined (__AVR_HAVE_8BIT_SP__)
7253+;; FIXME: __AVR_HAVE_8BIT_SP__ is set on device level, not on core level
7254+;; so this lines are dead code. To make it work, devices without
7255+;; SP_H must get their own multilib(s).
7256+ ldd r29,Y+1
7257+ add r28,r30
7258+ out __SP_L__,r28
7259+ mov r28, r26
7260+#else
7261 ldd r27,Y+1
7262 add r28,r30
7263 adc r29,__zero_reg__
7264@@ -635,6 +654,7 @@
7265 out __SP_L__,r28
7266 mov_l r28, r26
7267 mov_h r29, r27
7268+#endif
7269 ret
7270 .endfunc
7271 #endif /* defined (L_epilogue) */
7272Index: gcc/config/avr/avr.md
7273===================================================================
a966c5b5
AM
7274--- gcc/config/avr/avr.md (.../tags/gcc_4_6_2_release) (wersja 182722)
7275+++ gcc/config/avr/avr.md (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
7276@@ -299,7 +299,7 @@
7277 [(set (match_operand:HI 0 "stack_register_operand" "=q")
7278 (unspec_volatile:HI [(match_operand:HI 1 "register_operand" "r")]
7279 UNSPECV_WRITE_SP_IRQ_OFF))]
7280- ""
7281+ "!AVR_HAVE_8BIT_SP"
7282 "out __SP_H__, %B1
7283 out __SP_L__, %A1"
7284 [(set_attr "length" "2")
7285@@ -309,7 +309,7 @@
7286 [(set (match_operand:HI 0 "stack_register_operand" "=q")
7287 (unspec_volatile:HI [(match_operand:HI 1 "register_operand" "r")]
7288 UNSPECV_WRITE_SP_IRQ_ON))]
7289- ""
7290+ "!AVR_HAVE_8BIT_SP"
7291 "cli
7292 out __SP_H__, %B1
7293 sei
7294Index: gcc/config/avr/avr-devices.c
7295===================================================================
a966c5b5
AM
7296--- gcc/config/avr/avr-devices.c (.../tags/gcc_4_6_2_release) (wersja 182722)
7297+++ gcc/config/avr/avr-devices.c (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
7298@@ -70,7 +70,7 @@
7299 { "attiny2313a", ARCH_AVR25, "__AVR_ATtiny2313A__", 1, 0x0060, "tn2313a" },
7300 { "attiny24", ARCH_AVR25, "__AVR_ATtiny24__", 1, 0x0060, "tn24" },
7301 { "attiny24a", ARCH_AVR25, "__AVR_ATtiny24A__", 1, 0x0060, "tn24a" },
7302- { "attiny4313", ARCH_AVR25, "__AVR_ATtiny4313__", 1, 0x0060, "tn4313" },
7303+ { "attiny4313", ARCH_AVR25, "__AVR_ATtiny4313__", 0, 0x0060, "tn4313" },
7304 { "attiny44", ARCH_AVR25, "__AVR_ATtiny44__", 0, 0x0060, "tn44" },
7305 { "attiny44a", ARCH_AVR25, "__AVR_ATtiny44A__", 0, 0x0060, "tn44a" },
7306 { "attiny84", ARCH_AVR25, "__AVR_ATtiny84__", 0, 0x0060, "tn84" },
7307@@ -88,7 +88,7 @@
7308 { "attiny87", ARCH_AVR25, "__AVR_ATtiny87__", 0, 0x0100, "tn87" },
7309 { "attiny48", ARCH_AVR25, "__AVR_ATtiny48__", 0, 0x0100, "tn48" },
7310 { "attiny88", ARCH_AVR25, "__AVR_ATtiny88__", 0, 0x0100, "tn88" },
7311- { "at86rf401", ARCH_AVR25, "__AVR_AT86RF401__", 1, 0x0060, "86401" },
7312+ { "at86rf401", ARCH_AVR25, "__AVR_AT86RF401__", 0, 0x0060, "86401" },
7313 /* Classic, > 8K, <= 64K. */
7314 { "avr3", ARCH_AVR3, NULL, 0, 0x0060, "43355" },
7315 { "at43usb355", ARCH_AVR3, "__AVR_AT43USB355__", 0, 0x0060, "43355" },
7316Index: gcc/config/avr/avr.c
7317===================================================================
a966c5b5
AM
7318--- gcc/config/avr/avr.c (.../tags/gcc_4_6_2_release) (wersja 182722)
7319+++ gcc/config/avr/avr.c (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
7320@@ -1879,9 +1879,12 @@
7321 }
7322 else if (test_hard_reg_class (STACK_REG, src))
7323 {
7324- *l = 2;
7325- return (AS2 (in,%A0,__SP_L__) CR_TAB
7326- AS2 (in,%B0,__SP_H__));
7327+ *l = 2;
7328+ return AVR_HAVE_8BIT_SP
7329+ ? (AS2 (in,%A0,__SP_L__) CR_TAB
7330+ AS1 (clr,%B0))
7331+ : (AS2 (in,%A0,__SP_L__) CR_TAB
7332+ AS2 (in,%B0,__SP_H__));
7333 }
7334
7335 if (AVR_HAVE_MOVW)
7336@@ -5173,10 +5176,10 @@
7337
7338 default_file_start ();
7339
7340-/* fprintf (asm_out_file, "\t.arch %s\n", avr_mcu_name);*/
7341- fputs ("__SREG__ = 0x3f\n"
7342- "__SP_H__ = 0x3e\n"
7343- "__SP_L__ = 0x3d\n", asm_out_file);
7344+ fputs ("__SREG__ = 0x3f\n", asm_out_file);
7345+ if (!AVR_HAVE_8BIT_SP)
7346+ fputs ("__SP_H__ = 0x3e\n", asm_out_file);
7347+ fputs ("__SP_L__ = 0x3d\n", asm_out_file);
7348
7349 fputs ("__tmp_reg__ = 0\n"
7350 "__zero_reg__ = 1\n", asm_out_file);
7351Index: gcc/config/rs6000/rs6000.c
7352===================================================================
a966c5b5
AM
7353--- gcc/config/rs6000/rs6000.c (.../tags/gcc_4_6_2_release) (wersja 182722)
7354+++ gcc/config/rs6000/rs6000.c (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
7355@@ -2612,6 +2612,7 @@
7356 off. */
7357 rs6000_altivec_abi = 1;
7358 TARGET_ALTIVEC_VRSAVE = 1;
7359+ rs6000_current_abi = ABI_DARWIN;
7360
7361 if (DEFAULT_ABI == ABI_DARWIN
7362 && TARGET_64BIT)
7363@@ -6824,6 +6825,7 @@
7364 #if TARGET_MACHO
7365 && DEFAULT_ABI == ABI_DARWIN
7366 && (flag_pic || MACHO_DYNAMIC_NO_PIC_P)
7367+ && machopic_symbol_defined_p (x)
7368 #else
7369 && DEFAULT_ABI == ABI_V4
7370 && !flag_pic
a966c5b5
AM
7371@@ -16613,7 +16615,7 @@
7372 if (TARGET_RELOCATABLE
7373 && in_section != toc_section
7374 && in_section != text_section
7375- && !unlikely_text_section_p (in_section)
7376+ && (in_section && (in_section->common.flags & SECTION_CODE)) == 0
7377 && !recurse
7378 && GET_CODE (x) != CONST_INT
7379 && GET_CODE (x) != CONST_DOUBLE
2e34247b
AM
7380@@ -20227,7 +20229,7 @@
7381 {
7382 /* This blockage is needed so that sched doesn't decide to move
7383 the sp change before the register restores. */
7384- if (frame_reg_rtx != sp_reg_rtx
7385+ if (DEFAULT_ABI == ABI_V4
7386 || (TARGET_SPE_ABI
7387 && info->spe_64bit_regs_used != 0
7388 && info->first_gp_reg_save != 32))
7389@@ -20644,56 +20646,52 @@
7390 {
7391 int i;
7392 rtx spe_save_area_ptr;
7393-
7394+ int save_ptr_to_sp;
7395+ int ool_adjust = 0;
7396+
7397 /* Determine whether we can address all of the registers that need
7398- to be saved with an offset from the stack pointer that fits in
7399+ to be saved with an offset from frame_reg_rtx that fits in
7400 the small const field for SPE memory instructions. */
7401- int spe_regs_addressable_via_sp
7402- = (SPE_CONST_OFFSET_OK(info->spe_gp_save_offset + sp_offset
7403- + (32 - info->first_gp_reg_save - 1) * reg_size)
7404+ int spe_regs_addressable
7405+ = (SPE_CONST_OFFSET_OK (info->spe_gp_save_offset + sp_offset
7406+ + reg_size * (32 - info->first_gp_reg_save - 1))
7407 && saving_GPRs_inline);
7408 int spe_offset;
7409-
7410- if (spe_regs_addressable_via_sp)
7411+
7412+ if (spe_regs_addressable)
7413 {
7414 spe_save_area_ptr = frame_reg_rtx;
7415+ save_ptr_to_sp = info->total_size - sp_offset;
7416 spe_offset = info->spe_gp_save_offset + sp_offset;
7417 }
7418 else
7419 {
7420 /* Make r11 point to the start of the SPE save area. We need
7421 to be careful here if r11 is holding the static chain. If
7422- it is, then temporarily save it in r0. We would use r0 as
7423- our base register here, but using r0 as a base register in
7424- loads and stores means something different from what we
7425- would like. */
7426- int ool_adjust = (saving_GPRs_inline
7427- ? 0
7428- : (info->first_gp_reg_save
7429- - (FIRST_SAVRES_REGISTER+1))*8);
7430- HOST_WIDE_INT offset = (info->spe_gp_save_offset
7431- + sp_offset - ool_adjust);
7432+ it is, then temporarily save it in r0. */
7433+ int offset;
7434
7435+ if (!saving_GPRs_inline)
7436+ ool_adjust = 8 * (info->first_gp_reg_save
7437+ - (FIRST_SAVRES_REGISTER + 1));
7438+ offset = info->spe_gp_save_offset + sp_offset - ool_adjust;
7439+ spe_save_area_ptr = gen_rtx_REG (Pmode, 11);
7440+ save_ptr_to_sp = info->total_size - sp_offset + offset;
7441+ spe_offset = 0;
7442+
7443 if (using_static_chain_p)
7444 {
7445 rtx r0 = gen_rtx_REG (Pmode, 0);
7446 gcc_assert (info->first_gp_reg_save > 11);
7447-
7448- emit_move_insn (r0, gen_rtx_REG (Pmode, 11));
7449+
7450+ emit_move_insn (r0, spe_save_area_ptr);
7451 }
7452-
7453- spe_save_area_ptr = gen_rtx_REG (Pmode, 11);
7454- insn = emit_insn (gen_addsi3 (spe_save_area_ptr,
7455- frame_reg_rtx,
7456- GEN_INT (offset)));
7457- /* We need to make sure the move to r11 gets noted for
7458- properly outputting unwind information. */
7459- if (!saving_GPRs_inline)
7460- rs6000_frame_related (insn, frame_reg_rtx, offset,
7461- NULL_RTX, NULL_RTX);
7462- spe_offset = 0;
7463+ emit_insn (gen_addsi3 (spe_save_area_ptr,
7464+ frame_reg_rtx, GEN_INT (offset)));
7465+ if (REGNO (frame_reg_rtx) == 11)
7466+ sp_offset = -info->spe_gp_save_offset + ool_adjust;
7467 }
7468-
7469+
7470 if (saving_GPRs_inline)
7471 {
7472 for (i = 0; i < 32 - info->first_gp_reg_save; i++)
7473@@ -20705,36 +20703,34 @@
7474 /* We're doing all this to ensure that the offset fits into
7475 the immediate offset of 'evstdd'. */
7476 gcc_assert (SPE_CONST_OFFSET_OK (reg_size * i + spe_offset));
7477-
7478+
7479 offset = GEN_INT (reg_size * i + spe_offset);
7480 addr = gen_rtx_PLUS (Pmode, spe_save_area_ptr, offset);
7481 mem = gen_rtx_MEM (V2SImode, addr);
7482-
7483+
7484 insn = emit_move_insn (mem, reg);
7485-
7486- rs6000_frame_related (insn, spe_save_area_ptr,
7487- info->spe_gp_save_offset
7488- + sp_offset + reg_size * i,
7489- offset, const0_rtx);
7490+
7491+ rs6000_frame_related (insn,
7492+ spe_save_area_ptr, save_ptr_to_sp,
7493+ NULL_RTX, NULL_RTX);
7494 }
7495 }
7496 else
7497 {
7498 rtx par;
7499
7500- par = rs6000_make_savres_rtx (info, gen_rtx_REG (Pmode, 11),
7501- 0, reg_mode,
7502+ par = rs6000_make_savres_rtx (info, spe_save_area_ptr,
7503+ ool_adjust, reg_mode,
7504 /*savep=*/true, /*gpr=*/true,
7505 /*lr=*/false);
7506 insn = emit_insn (par);
7507- rs6000_frame_related (insn, frame_ptr_rtx, info->total_size,
7508+ rs6000_frame_related (insn, spe_save_area_ptr, save_ptr_to_sp,
7509 NULL_RTX, NULL_RTX);
7510 }
7511-
7512-
7513+
7514 /* Move the static chain pointer back. */
7515- if (using_static_chain_p && !spe_regs_addressable_via_sp)
7516- emit_move_insn (gen_rtx_REG (Pmode, 11), gen_rtx_REG (Pmode, 0));
7517+ if (using_static_chain_p && !spe_regs_addressable)
7518+ emit_move_insn (spe_save_area_ptr, gen_rtx_REG (Pmode, 0));
7519 }
7520 else if (!WORLD_SAVE_P (info) && !saving_GPRs_inline)
7521 {
7522@@ -20743,10 +20739,12 @@
7523 /* Need to adjust r11 (r12) if we saved any FPRs. */
7524 if (info->first_fp_reg_save != 64)
7525 {
7526- rtx dest_reg = gen_rtx_REG (reg_mode, DEFAULT_ABI == ABI_AIX
7527- ? 12 : 11);
7528- rtx offset = GEN_INT (sp_offset
7529- + (-8 * (64-info->first_fp_reg_save)));
7530+ rtx dest_reg = gen_rtx_REG (Pmode, DEFAULT_ABI == ABI_AIX ? 12 : 11);
7531+ int save_off = 8 * (64 - info->first_fp_reg_save);
7532+ rtx offset = GEN_INT (sp_offset - save_off);
7533+
7534+ if (REGNO (dest_reg) == REGNO (frame_reg_rtx))
7535+ sp_offset = save_off;
7536 emit_insn (gen_add3_insn (dest_reg, frame_reg_rtx, offset));
7537 }
7538
7539@@ -21622,40 +21620,39 @@
7540 && info->first_gp_reg_save != 32)
7541 {
7542 /* Determine whether we can address all of the registers that need
7543- to be saved with an offset from the stack pointer that fits in
7544- the small const field for SPE memory instructions. */
7545- int spe_regs_addressable_via_sp
7546- = (SPE_CONST_OFFSET_OK(info->spe_gp_save_offset + sp_offset
7547- + (32 - info->first_gp_reg_save - 1) * reg_size)
7548+ to be saved with an offset from frame_reg_rtx that fits in
7549+ the small const field for SPE memory instructions. */
7550+ int spe_regs_addressable
7551+ = (SPE_CONST_OFFSET_OK (info->spe_gp_save_offset + sp_offset
7552+ + reg_size * (32 - info->first_gp_reg_save - 1))
7553 && restoring_GPRs_inline);
7554 int spe_offset;
7555+ int ool_adjust = 0;
7556
7557- if (spe_regs_addressable_via_sp)
7558+ if (spe_regs_addressable)
7559 spe_offset = info->spe_gp_save_offset + sp_offset;
7560 else
7561- {
7562+ {
7563 rtx old_frame_reg_rtx = frame_reg_rtx;
7564- /* Make r11 point to the start of the SPE save area. We worried about
7565- not clobbering it when we were saving registers in the prologue.
7566- There's no need to worry here because the static chain is passed
7567- anew to every function. */
7568- int ool_adjust = (restoring_GPRs_inline
7569- ? 0
7570- : (info->first_gp_reg_save
7571- - (FIRST_SAVRES_REGISTER+1))*8);
7572+ /* Make r11 point to the start of the SPE save area. We worried about
7573+ not clobbering it when we were saving registers in the prologue.
7574+ There's no need to worry here because the static chain is passed
7575+ anew to every function. */
7576
7577- if (frame_reg_rtx == sp_reg_rtx)
7578- frame_reg_rtx = gen_rtx_REG (Pmode, 11);
7579- emit_insn (gen_addsi3 (frame_reg_rtx, old_frame_reg_rtx,
7580+ if (!restoring_GPRs_inline)
7581+ ool_adjust = 8 * (info->first_gp_reg_save
7582+ - (FIRST_SAVRES_REGISTER + 1));
7583+ frame_reg_rtx = gen_rtx_REG (Pmode, 11);
7584+ emit_insn (gen_addsi3 (frame_reg_rtx, old_frame_reg_rtx,
7585 GEN_INT (info->spe_gp_save_offset
7586 + sp_offset
7587 - ool_adjust)));
7588 /* Keep the invariant that frame_reg_rtx + sp_offset points
7589 at the top of the stack frame. */
7590- sp_offset = -info->spe_gp_save_offset;
7591+ sp_offset = -info->spe_gp_save_offset + ool_adjust;
7592
7593- spe_offset = 0;
7594- }
7595+ spe_offset = 0;
7596+ }
7597
7598 if (restoring_GPRs_inline)
7599 {
7600@@ -21695,8 +21692,8 @@
7601 {
7602 rtx par;
7603
7604- par = rs6000_make_savres_rtx (info, gen_rtx_REG (Pmode, 11),
7605- 0, reg_mode,
7606+ par = rs6000_make_savres_rtx (info, frame_reg_rtx,
7607+ ool_adjust, reg_mode,
7608 /*savep=*/false, /*gpr=*/true,
7609 /*lr=*/true);
7610 emit_jump_insn (par);
7611@@ -21717,12 +21714,12 @@
7612 sp_offset, can_use_exit);
7613 else
7614 {
7615- emit_insn (gen_add3_insn (gen_rtx_REG (Pmode, DEFAULT_ABI == ABI_AIX
7616- ? 12 : 11),
7617- frame_reg_rtx,
7618+ rtx src_reg = gen_rtx_REG (Pmode, DEFAULT_ABI == ABI_AIX ? 12 : 11);
7619+
7620+ emit_insn (gen_add3_insn (src_reg, frame_reg_rtx,
7621 GEN_INT (sp_offset - info->fp_size)));
7622- if (REGNO (frame_reg_rtx) == 11)
7623- sp_offset += info->fp_size;
7624+ if (REGNO (frame_reg_rtx) == REGNO (src_reg))
7625+ sp_offset = info->fp_size;
7626 }
7627
7628 par = rs6000_make_savres_rtx (info, frame_reg_rtx,
7629Index: gcc/config/darwin.c
7630===================================================================
a966c5b5
AM
7631--- gcc/config/darwin.c (.../tags/gcc_4_6_2_release) (wersja 182722)
7632+++ gcc/config/darwin.c (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
7633@@ -1753,19 +1753,51 @@
7634 return (!strncmp ((const char *)p, "_OBJC_", 6));
7635 }
7636
7637-/* LTO support for Mach-O. */
7638+/* LTO support for Mach-O.
7639
7640-/* Section names for LTO sections. */
7641-static unsigned int lto_section_names_offset = 0;
7642+ This version uses three mach-o sections to encapsulate the (unlimited
7643+ number of) lto sections.
7644
7645-/* This is the obstack which we use to allocate the many strings. */
7646-static struct obstack lto_section_names_obstack;
7647+ __GNU_LTO, __lto_sections contains the concatented GNU LTO section data.
7648+ __GNU_LTO, __section_names contains the GNU LTO section names.
7649+ __GNU_LTO, __section_index contains an array of values that index these.
7650
7651-/* Segment name for LTO sections. */
7652+ Indexed thus:
7653+ <section offset from the start of __GNU_LTO, __lto_sections>,
7654+ <section length>
7655+ <name offset from the start of __GNU_LTO, __section_names,
7656+ <name length>.
7657+
7658+ At present, for both m32 and m64 mach-o files each of these fields is
7659+ represented by a uint32_t. This is because, AFAICT, a mach-o object
7660+ cannot exceed 4Gb because the section_64 offset field (see below) is 32bits.
7661+
7662+ uint32_t offset;
7663+ "offset An integer specifying the offset to this section in the file." */
7664+
7665+/* Count lto section numbers. */
7666+static unsigned int lto_section_num = 0;
7667+
7668+/* A vector of information about LTO sections, at present, we only have
7669+ the name. TODO: see if we can get the data length somehow. */
7670+typedef struct GTY (()) darwin_lto_section_e {
7671+ const char *sectname;
7672+} darwin_lto_section_e ;
7673+DEF_VEC_O(darwin_lto_section_e);
7674+DEF_VEC_ALLOC_O(darwin_lto_section_e, gc);
7675+
7676+static GTY (()) VEC (darwin_lto_section_e, gc) * lto_section_names;
7677+
7678+/* Segment for LTO data. */
7679 #define LTO_SEGMENT_NAME "__GNU_LTO"
7680
7681-/* Section name for LTO section names section. */
7682-#define LTO_NAMES_SECTION "__section_names"
7683+/* Section wrapper scheme (used here to wrap the unlimited number of LTO
7684+ sections into three Mach-O ones).
7685+ NOTE: These names MUST be kept in sync with those in
7686+ libiberty/simple-object-mach-o. */
7687+#define LTO_SECTS_SECTION "__wrapper_sects"
7688+#define LTO_NAMES_SECTION "__wrapper_names"
7689+#define LTO_INDEX_SECTION "__wrapper_index"
7690
7691 /* File to temporarily store LTO data. This is appended to asm_out_file
7692 in darwin_end_file. */
7693@@ -1808,37 +1840,38 @@
7694 unsigned int flags,
7695 tree decl ATTRIBUTE_UNUSED)
7696 {
7697- /* LTO sections go in a special segment __GNU_LTO. We want to replace the
7698- section name with something we can use to represent arbitrary-length
7699- names (section names in Mach-O are at most 16 characters long). */
7700+ /* LTO sections go in a special section that encapsulates the (unlimited)
7701+ number of GNU LTO sections within a single mach-o one. */
7702 if (strncmp (name, LTO_SECTION_NAME_PREFIX,
7703 strlen (LTO_SECTION_NAME_PREFIX)) == 0)
7704 {
7705+ darwin_lto_section_e e;
7706 /* We expect certain flags to be set... */
7707 gcc_assert ((flags & (SECTION_DEBUG | SECTION_NAMED))
7708 == (SECTION_DEBUG | SECTION_NAMED));
7709
7710- /* Add the section name to the things to output when we end the
7711- current assembler output file.
7712- This is all not very efficient, but that doesn't matter -- this
7713- shouldn't be a hot path in the compiler... */
7714- obstack_1grow (&lto_section_names_obstack, '\t');
7715- obstack_grow (&lto_section_names_obstack, ".ascii ", 7);
7716- obstack_1grow (&lto_section_names_obstack, '"');
7717- obstack_grow (&lto_section_names_obstack, name, strlen (name));
7718- obstack_grow (&lto_section_names_obstack, "\\0\"\n", 4);
7719-
7720- /* Output the dummy section name. */
7721- fprintf (asm_out_file, "\t# %s\n", name);
7722- fprintf (asm_out_file, "\t.section %s,__%08X,regular,debug\n",
7723- LTO_SEGMENT_NAME, lto_section_names_offset);
7724-
7725- /* Update the offset for the next section name. Make sure we stay
7726- within reasonable length. */
7727- lto_section_names_offset += strlen (name) + 1;
7728- gcc_assert (lto_section_names_offset > 0
7729- && lto_section_names_offset < ((unsigned) 1 << 31));
7730- }
7731+ /* Switch to our combined section. */
7732+ fprintf (asm_out_file, "\t.section %s,%s,regular,debug\n",
7733+ LTO_SEGMENT_NAME, LTO_SECTS_SECTION);
7734+ /* Output a label for the start of this sub-section. */
7735+ fprintf (asm_out_file, "L_GNU_LTO%d:\t;# %s\n",
7736+ lto_section_num, name);
7737+ /* We have to jump through hoops to get the values of the intra-section
7738+ offsets... */
7739+ fprintf (asm_out_file, "\t.set L$gnu$lto$offs%d,L_GNU_LTO%d-L_GNU_LTO0\n",
7740+ lto_section_num, lto_section_num);
7741+ fprintf (asm_out_file,
7742+ "\t.set L$gnu$lto$size%d,L_GNU_LTO%d-L_GNU_LTO%d\n",
7743+ lto_section_num, lto_section_num+1, lto_section_num);
7744+ lto_section_num++;
7745+ e.sectname = xstrdup (name);
7746+ /* Keep the names, we'll need to make a table later.
7747+ TODO: check that we do not revisit sections, that would break
7748+ the assumption of how this is done. */
7749+ if (lto_section_names == NULL)
7750+ lto_section_names = VEC_alloc (darwin_lto_section_e, gc, 16);
7751+ VEC_safe_push (darwin_lto_section_e, gc, lto_section_names, &e);
7752+ }
7753 else if (strncmp (name, "__DWARF,", 8) == 0)
7754 darwin_asm_dwarf_section (name, flags, decl);
7755 else
7756@@ -2711,16 +2744,12 @@
7757 darwin_asm_output_dwarf_delta (file, size, lab, sname);
7758 }
7759
7760-/* Called from the within the TARGET_ASM_FILE_START for each target.
7761- Initialize the stuff we need for LTO long section names support. */
7762+/* Called from the within the TARGET_ASM_FILE_START for each target. */
7763
7764 void
7765 darwin_file_start (void)
7766 {
7767- /* We fill this obstack with the complete section text for the lto section
7768- names to write in darwin_file_end. */
7769- obstack_init (&lto_section_names_obstack);
7770- lto_section_names_offset = 0;
7771+ /* Nothing to do. */
7772 }
7773
7774 /* Called for the TARGET_ASM_FILE_END hook.
7775@@ -2731,8 +2760,6 @@
7776 void
7777 darwin_file_end (void)
7778 {
7779- const char *lto_section_names;
7780-
7781 machopic_finish (asm_out_file);
7782 if (strcmp (lang_hooks.name, "GNU C++") == 0)
7783 {
7784@@ -2762,6 +2789,13 @@
7785 lto_asm_txt = buf = (char *) xmalloc (n + 1);
7786 while (fgets (lto_asm_txt, n, lto_asm_out_file))
7787 fputs (lto_asm_txt, asm_out_file);
7788+ /* Put a termination label. */
7789+ fprintf (asm_out_file, "\t.section %s,%s,regular,debug\n",
7790+ LTO_SEGMENT_NAME, LTO_SECTS_SECTION);
7791+ fprintf (asm_out_file, "L_GNU_LTO%d:\t;# end of lto\n",
7792+ lto_section_num);
7793+ /* Make sure our termination label stays in this section. */
7794+ fputs ("\t.space\t1\n", asm_out_file);
7795 }
7796
7797 /* Remove the temporary file. */
7798@@ -2770,21 +2804,50 @@
7799 free (lto_asm_out_name);
7800 }
7801
7802- /* Finish the LTO section names obstack. Don't output anything if
7803- there are no recorded section names. */
7804- obstack_1grow (&lto_section_names_obstack, '\0');
7805- lto_section_names = XOBFINISH (&lto_section_names_obstack, const char *);
7806- if (strlen (lto_section_names) > 0)
7807+ /* Output the names and indices. */
7808+ if (lto_section_names && VEC_length (darwin_lto_section_e, lto_section_names))
7809 {
7810- fprintf (asm_out_file,
7811- "\t.section %s,%s,regular,debug\n",
7812+ int count;
7813+ darwin_lto_section_e *ref;
7814+ /* For now, we'll make the offsets 4 bytes and unaligned - we'll fix
7815+ the latter up ourselves. */
7816+ const char *op = integer_asm_op (4,0);
7817+
7818+ /* Emit the names. */
7819+ fprintf (asm_out_file, "\t.section %s,%s,regular,debug\n",
7820 LTO_SEGMENT_NAME, LTO_NAMES_SECTION);
7821- fprintf (asm_out_file,
7822- "\t# Section names in %s are offsets into this table\n",
7823- LTO_SEGMENT_NAME);
7824- fprintf (asm_out_file, "%s\n", lto_section_names);
7825+ FOR_EACH_VEC_ELT (darwin_lto_section_e, lto_section_names, count, ref)
7826+ {
7827+ fprintf (asm_out_file, "L_GNU_LTO_NAME%d:\n", count);
7828+ /* We have to jump through hoops to get the values of the intra-section
7829+ offsets... */
7830+ fprintf (asm_out_file,
7831+ "\t.set L$gnu$lto$noff%d,L_GNU_LTO_NAME%d-L_GNU_LTO_NAME0\n",
7832+ count, count);
7833+ fprintf (asm_out_file,
7834+ "\t.set L$gnu$lto$nsiz%d,L_GNU_LTO_NAME%d-L_GNU_LTO_NAME%d\n",
7835+ count, count+1, count);
7836+ fprintf (asm_out_file, "\t.asciz\t\"%s\"\n", ref->sectname);
7837+ }
7838+ fprintf (asm_out_file, "L_GNU_LTO_NAME%d:\t;# end\n", lto_section_num);
7839+ /* make sure our termination label stays in this section. */
7840+ fputs ("\t.space\t1\n", asm_out_file);
7841+
7842+ /* Emit the Index. */
7843+ fprintf (asm_out_file, "\t.section %s,%s,regular,debug\n",
7844+ LTO_SEGMENT_NAME, LTO_INDEX_SECTION);
7845+ fputs ("\t.align\t2\n", asm_out_file);
7846+ fputs ("# Section offset, Section length, Name offset, Name length\n",
7847+ asm_out_file);
7848+ FOR_EACH_VEC_ELT (darwin_lto_section_e, lto_section_names, count, ref)
7849+ {
7850+ fprintf (asm_out_file, "%s L$gnu$lto$offs%d\t;# %s\n",
7851+ op, count, ref->sectname);
7852+ fprintf (asm_out_file, "%s L$gnu$lto$size%d\n", op, count);
7853+ fprintf (asm_out_file, "%s L$gnu$lto$noff%d\n", op, count);
7854+ fprintf (asm_out_file, "%s L$gnu$lto$nsiz%d\n", op, count);
7855+ }
7856 }
7857- obstack_free (&lto_section_names_obstack, NULL);
7858
7859 /* If we have section anchors, then we must prevent the linker from
7860 re-arranging data. */
7861Index: gcc/config/arm/arm.c
7862===================================================================
a966c5b5
AM
7863--- gcc/config/arm/arm.c (.../tags/gcc_4_6_2_release) (wersja 182722)
7864+++ gcc/config/arm/arm.c (.../branches/gcc-4_6-branch) (wersja 182722)
7865@@ -5077,6 +5077,14 @@
7866 if (IS_STACKALIGN (func_type))
7867 return false;
7868
7869+ /* The AAPCS says that, on bare-metal, calls to unresolved weak
7870+ references should become a NOP. Don't convert such calls into
7871+ sibling calls. */
7872+ if (TARGET_AAPCS_BASED
7873+ && arm_abi == ARM_ABI_AAPCS
7874+ && DECL_WEAK (decl))
7875+ return false;
7876+
7877 /* Everything else is ok. */
7878 return true;
7879 }
7880@@ -9812,6 +9820,9 @@
2e34247b
AM
7881 rtx base_reg_rtx = NULL;
7882 int i, stm_case;
7883
7884+ /* Write back of base register is currently only supported for Thumb 1. */
7885+ int base_writeback = TARGET_THUMB1;
7886+
7887 /* Can only handle up to MAX_LDM_STM_OPS insns at present, though could be
7888 easily extended if required. */
7889 gcc_assert (nops >= 2 && nops <= MAX_LDM_STM_OPS);
a966c5b5 7890@@ -9869,7 +9880,9 @@
2e34247b
AM
7891 /* If it isn't an integer register, then we can't do this. */
7892 if (unsorted_regs[i] < 0
7893 || (TARGET_THUMB1 && unsorted_regs[i] > LAST_LO_REGNUM)
7894- || (TARGET_THUMB2 && unsorted_regs[i] == base_reg)
7895+ /* The effects are unpredictable if the base register is
7896+ both updated and stored. */
7897+ || (base_writeback && unsorted_regs[i] == base_reg)
7898 || (TARGET_THUMB2 && unsorted_regs[i] == SP_REGNUM)
7899 || unsorted_regs[i] > 14)
7900 return 0;
a966c5b5 7901@@ -19571,39 +19584,34 @@
2e34247b
AM
7902 emit_move_insn (mem, tmp2);
7903 }
7904
7905-/* Set up operands for a register copy from src to dest, taking care not to
7906- clobber registers in the process.
7907- FIXME: This has rather high polynomial complexity (O(n^3)?) but shouldn't
7908- be called with a large N, so that should be OK. */
7909+/* Set up OPERANDS for a register copy from SRC to DEST, taking care
7910+ not to early-clobber SRC registers in the process.
7911
7912+ We assume that the operands described by SRC and DEST represent a
7913+ decomposed copy of OPERANDS[1] into OPERANDS[0]. COUNT is the
7914+ number of components into which the copy has been decomposed. */
7915 void
7916 neon_disambiguate_copy (rtx *operands, rtx *dest, rtx *src, unsigned int count)
7917 {
7918- unsigned int copied = 0, opctr = 0;
7919- unsigned int done = (1 << count) - 1;
7920- unsigned int i, j;
7921+ unsigned int i;
7922
7923- while (copied != done)
7924+ if (!reg_overlap_mentioned_p (operands[0], operands[1])
7925+ || REGNO (operands[0]) < REGNO (operands[1]))
7926 {
7927 for (i = 0; i < count; i++)
7928- {
7929- int good = 1;
7930-
7931- for (j = 0; good && j < count; j++)
7932- if (i != j && (copied & (1 << j)) == 0
7933- && reg_overlap_mentioned_p (src[j], dest[i]))
7934- good = 0;
7935-
7936- if (good)
7937- {
7938- operands[opctr++] = dest[i];
7939- operands[opctr++] = src[i];
7940- copied |= 1 << i;
7941- }
7942- }
7943+ {
7944+ operands[2 * i] = dest[i];
7945+ operands[2 * i + 1] = src[i];
7946+ }
7947 }
7948-
7949- gcc_assert (opctr == count * 2);
7950+ else
7951+ {
7952+ for (i = 0; i < count; i++)
7953+ {
7954+ operands[2 * i] = dest[count - i - 1];
7955+ operands[2 * i + 1] = src[count - i - 1];
7956+ }
7957+ }
7958 }
7959
7960 /* Expand an expression EXP that calls a built-in function,
7961Index: gcc/config/arm/arm.md
7962===================================================================
a966c5b5
AM
7963--- gcc/config/arm/arm.md (.../tags/gcc_4_6_2_release) (wersja 182722)
7964+++ gcc/config/arm/arm.md (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
7965@@ -3272,7 +3272,7 @@
7966 bool need_else;
7967
7968 if (which_alternative != 0 || operands[3] != const0_rtx
7969- || (code != PLUS && code != MINUS && code != IOR && code != XOR))
7970+ || (code != PLUS && code != IOR && code != XOR))
7971 need_else = true;
7972 else
7973 need_else = false;
7974Index: gcc/config/pa/pa.c
7975===================================================================
a966c5b5
AM
7976--- gcc/config/pa/pa.c (.../tags/gcc_4_6_2_release) (wersja 182722)
7977+++ gcc/config/pa/pa.c (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
7978@@ -1863,6 +1863,11 @@
7979 /* Handle the most common case: storing into a register. */
7980 else if (register_operand (operand0, mode))
7981 {
7982+ /* Legitimize TLS symbol references. This happens for references
7983+ that aren't a legitimate constant. */
7984+ if (PA_SYMBOL_REF_TLS_P (operand1))
7985+ operand1 = legitimize_tls_address (operand1);
7986+
7987 if (register_operand (operand1, mode)
7988 || (GET_CODE (operand1) == CONST_INT
7989 && cint_ok_for_move (INTVAL (operand1)))
7990Index: gcc/config/pa/pa.h
7991===================================================================
a966c5b5
AM
7992--- gcc/config/pa/pa.h (.../tags/gcc_4_6_2_release) (wersja 182722)
7993+++ gcc/config/pa/pa.h (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
7994@@ -848,6 +848,9 @@
7995 && (NEW_HP_ASSEMBLER \
7996 || TARGET_GAS \
7997 || GET_CODE (X) != LABEL_REF) \
7998+ && (!PA_SYMBOL_REF_TLS_P (X) \
7999+ || (SYMBOL_REF_TLS_MODEL (X) != TLS_MODEL_GLOBAL_DYNAMIC \
8000+ && SYMBOL_REF_TLS_MODEL (X) != TLS_MODEL_LOCAL_DYNAMIC)) \
8001 && (!TARGET_64BIT \
8002 || GET_CODE (X) != CONST_DOUBLE) \
8003 && (!TARGET_64BIT \
8004Index: gcc/reload1.c
8005===================================================================
a966c5b5
AM
8006--- gcc/reload1.c (.../tags/gcc_4_6_2_release) (wersja 182722)
8007+++ gcc/reload1.c (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
8008@@ -3899,6 +3899,10 @@
8009 if (XEXP (x, 0))
8010 set_label_offsets (XEXP (x, 0), NULL_RTX, 1);
8011
8012+ for (x = nonlocal_goto_handler_labels; x; x = XEXP (x, 1))
8013+ if (XEXP (x, 0))
8014+ set_label_offsets (XEXP (x, 0), NULL_RTX, 1);
8015+
8016 for_each_eh_label (set_initial_eh_label_offset);
8017 }
8018
8019Index: zlib/configure
8020===================================================================
a966c5b5
AM
8021--- zlib/configure (.../tags/gcc_4_6_2_release) (wersja 182722)
8022+++ zlib/configure (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
8023@@ -8600,7 +8600,7 @@
8024 ;;
8025
8026 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
8027- freebsd2*)
8028+ freebsd2.*)
8029 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
8030 hardcode_direct=yes
8031 hardcode_minus_L=yes
8032@@ -9516,7 +9516,7 @@
8033 objformat=`/usr/bin/objformat`
8034 else
8035 case $host_os in
8036- freebsd[123]*) objformat=aout ;;
8037+ freebsd[23].*) objformat=aout ;;
8038 *) objformat=elf ;;
8039 esac
8040 fi
8041@@ -9534,7 +9534,7 @@
8042 esac
8043 shlibpath_var=LD_LIBRARY_PATH
8044 case $host_os in
8045- freebsd2*)
8046+ freebsd2.*)
8047 shlibpath_overrides_runpath=yes
8048 ;;
8049 freebsd3.[01]* | freebsdelf3.[01]*)
8050Index: zlib/ChangeLog
8051===================================================================
a966c5b5
AM
8052--- zlib/ChangeLog (.../tags/gcc_4_6_2_release) (wersja 182722)
8053+++ zlib/ChangeLog (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
8054@@ -1,3 +1,7 @@
8055+2011-11-20 Andreas Tobler <andreast@fgznet.ch>
8056+
8057+ * configure: Regenerate.
8058+
8059 2011-10-26 Release Manager
8060
8061 * GCC 4.6.2 released.
8062Index: libstdc++-v3/configure
8063===================================================================
a966c5b5
AM
8064--- libstdc++-v3/configure (.../tags/gcc_4_6_2_release) (wersja 182722)
8065+++ libstdc++-v3/configure (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
8066@@ -9698,7 +9698,7 @@
8067 ;;
8068
8069 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
8070- freebsd2*)
8071+ freebsd2.*)
8072 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
8073 hardcode_direct=yes
8074 hardcode_minus_L=yes
8075@@ -10614,7 +10614,7 @@
8076 objformat=`/usr/bin/objformat`
8077 else
8078 case $host_os in
8079- freebsd[123]*) objformat=aout ;;
8080+ freebsd[23].*) objformat=aout ;;
8081 *) objformat=elf ;;
8082 esac
8083 fi
8084@@ -10632,7 +10632,7 @@
8085 esac
8086 shlibpath_var=LD_LIBRARY_PATH
8087 case $host_os in
8088- freebsd2*)
8089+ freebsd2.*)
8090 shlibpath_overrides_runpath=yes
8091 ;;
8092 freebsd3.[01]* | freebsdelf3.[01]*)
8093@@ -12522,7 +12522,7 @@
8094 esac
8095 ;;
8096
8097- freebsd[12]*)
8098+ freebsd2.*)
8099 # C++ shared libraries reported to be fairly broken before
8100 # switch to ELF
8101 ld_shlibs_CXX=no
8102@@ -14297,7 +14297,7 @@
8103 objformat=`/usr/bin/objformat`
8104 else
8105 case $host_os in
8106- freebsd[123]*) objformat=aout ;;
8107+ freebsd[23].*) objformat=aout ;;
8108 *) objformat=elf ;;
8109 esac
8110 fi
8111@@ -14315,7 +14315,7 @@
8112 esac
8113 shlibpath_var=LD_LIBRARY_PATH
8114 case $host_os in
8115- freebsd2*)
8116+ freebsd2.*)
8117 shlibpath_overrides_runpath=yes
8118 ;;
8119 freebsd3.[01]* | freebsdelf3.[01]*)
8120Index: libstdc++-v3/include/debug/unordered_map
8121===================================================================
a966c5b5
AM
8122--- libstdc++-v3/include/debug/unordered_map (.../tags/gcc_4_6_2_release) (wersja 182722)
8123+++ libstdc++-v3/include/debug/unordered_map (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
8124@@ -276,6 +276,10 @@
8125 }
8126
8127 iterator
8128+ erase(iterator __it)
8129+ { return erase(const_iterator(__it)); }
8130+
8131+ iterator
8132 erase(const_iterator __first, const_iterator __last)
8133 {
8134 __glibcxx_check_erase_range(__first, __last);
8135@@ -558,6 +562,10 @@
8136 }
8137
8138 iterator
8139+ erase(iterator __it)
8140+ { return erase(const_iterator(__it)); }
8141+
8142+ iterator
8143 erase(const_iterator __first, const_iterator __last)
8144 {
8145 __glibcxx_check_erase_range(__first, __last);
8146Index: libstdc++-v3/include/debug/unordered_set
8147===================================================================
a966c5b5
AM
8148--- libstdc++-v3/include/debug/unordered_set (.../tags/gcc_4_6_2_release) (wersja 182722)
8149+++ libstdc++-v3/include/debug/unordered_set (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
8150@@ -269,6 +269,10 @@
8151 }
8152
8153 iterator
8154+ erase(iterator __it)
8155+ { return erase(const_iterator(__it)); }
8156+
8157+ iterator
8158 erase(const_iterator __first, const_iterator __last)
8159 {
8160 __glibcxx_check_erase_range(__first, __last);
8161@@ -539,6 +543,10 @@
8162 }
8163
8164 iterator
8165+ erase(iterator __it)
8166+ { return erase(const_iterator(__it)); }
8167+
8168+ iterator
8169 erase(const_iterator __first, const_iterator __last)
8170 {
8171 __glibcxx_check_erase_range(__first, __last);
8172Index: libstdc++-v3/include/debug/map.h
8173===================================================================
a966c5b5
AM
8174--- libstdc++-v3/include/debug/map.h (.../tags/gcc_4_6_2_release) (wersja 182722)
8175+++ libstdc++-v3/include/debug/map.h (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
8176@@ -273,6 +273,10 @@
8177 this->_M_invalidate_if(_Equal(__position.base()));
8178 return iterator(_Base::erase(__position.base()), this);
8179 }
8180+
8181+ iterator
8182+ erase(iterator __position)
8183+ { return erase(const_iterator(__position)); }
8184 #else
8185 void
8186 erase(iterator __position)
8187Index: libstdc++-v3/include/debug/multimap.h
8188===================================================================
a966c5b5
AM
8189--- libstdc++-v3/include/debug/multimap.h (.../tags/gcc_4_6_2_release) (wersja 182722)
8190+++ libstdc++-v3/include/debug/multimap.h (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
8191@@ -254,6 +254,10 @@
8192 this->_M_invalidate_if(_Equal(__position.base()));
8193 return iterator(_Base::erase(__position.base()), this);
8194 }
8195+
8196+ iterator
8197+ erase(iterator __position)
8198+ { return erase(const_iterator(__position)); }
8199 #else
8200 void
8201 erase(iterator __position)
8202Index: libstdc++-v3/include/std/condition_variable
8203===================================================================
a966c5b5
AM
8204--- libstdc++-v3/include/std/condition_variable (.../tags/gcc_4_6_2_release) (wersja 182722)
8205+++ libstdc++-v3/include/std/condition_variable (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
8206@@ -198,10 +198,25 @@
8207 void
8208 wait(_Lock& __lock)
8209 {
8210- unique_lock<mutex> __my_lock(_M_mutex);
8211- __lock.unlock();
8212- _M_cond.wait(__my_lock);
8213- __lock.lock();
8214+ // scoped unlock - unlocks in ctor, re-locks in dtor
8215+ struct _Unlock {
8216+ explicit _Unlock(_Lock& __lk) : _M_lock(__lk) { __lk.unlock(); }
8217+ ~_Unlock() noexcept(false)
8218+ {
8219+ if (uncaught_exception())
8220+ __try { _M_lock.lock(); } __catch(...) { }
8221+ else
8222+ _M_lock.lock();
8223+ }
8224+ _Lock& _M_lock;
8225+ };
8226+
8227+ unique_lock<mutex> __my_lock(_M_mutex);
8228+ _Unlock __unlock(__lock);
8229+ // _M_mutex must be unlocked before re-locking __lock so move
8230+ // ownership of _M_mutex lock to an object with shorter lifetime.
8231+ unique_lock<mutex> __my_lock2(std::move(__my_lock));
8232+ _M_cond.wait(__my_lock2);
8233 }
8234
8235
8236Index: libstdc++-v3/include/std/complex
8237===================================================================
a966c5b5
AM
8238--- libstdc++-v3/include/std/complex (.../tags/gcc_4_6_2_release) (wersja 182722)
8239+++ libstdc++-v3/include/std/complex (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
8240@@ -1,7 +1,7 @@
8241 // The template and inlines for the -*- C++ -*- complex number classes.
8242
8243 // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
8244-// 2006, 2007, 2008, 2009, 2010
8245+// 2006, 2007, 2008, 2009, 2010, 2011
8246 // Free Software Foundation, Inc.
8247 //
8248 // This file is part of the GNU ISO C++ Library. This library is free
8249@@ -1695,12 +1695,9 @@
8250 std::complex<_Tp>
8251 __complex_acosh(const std::complex<_Tp>& __z)
8252 {
8253- std::complex<_Tp> __t((__z.real() - __z.imag())
8254- * (__z.real() + __z.imag()) - _Tp(1.0),
8255- _Tp(2.0) * __z.real() * __z.imag());
8256- __t = std::sqrt(__t);
8257-
8258- return std::log(__t + __z);
8259+ // Kahan's formula.
8260+ return _Tp(2.0) * std::log(std::sqrt(_Tp(0.5) * (__z + _Tp(1.0)))
8261+ + std::sqrt(_Tp(0.5) * (__z - _Tp(1.0))));
8262 }
8263
8264 #if _GLIBCXX_USE_C99_COMPLEX_TR1
8265Index: libstdc++-v3/include/ext/type_traits.h
8266===================================================================
a966c5b5
AM
8267--- libstdc++-v3/include/ext/type_traits.h (.../tags/gcc_4_6_2_release) (wersja 182722)
8268+++ libstdc++-v3/include/ext/type_traits.h (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
8269@@ -1,6 +1,7 @@
8270 // -*- C++ -*-
8271
8272-// Copyright (C) 2005, 2006, 2007, 2009 Free Software Foundation, Inc.
8273+// Copyright (C) 2005, 2006, 2007, 2009, 2010, 2011
8274+// Free Software Foundation, Inc.
8275 //
8276 // This file is part of the GNU ISO C++ Library. This library is free
8277 // software; you can redistribute it and/or modify it under the terms
8278@@ -161,44 +162,50 @@
8279 struct __promote
8280 { typedef double __type; };
8281
8282+ // No nested __type member for non-integer non-floating point types,
8283+ // allows this type to be used for SFINAE to constrain overloads in
8284+ // <cmath> and <complex> to only the intended types.
8285 template<typename _Tp>
8286 struct __promote<_Tp, false>
8287- { typedef _Tp __type; };
8288+ { };
8289
8290- template<typename _Tp, typename _Up>
8291+ template<>
8292+ struct __promote<long double>
8293+ { typedef long double __type; };
8294+
8295+ template<>
8296+ struct __promote<double>
8297+ { typedef double __type; };
8298+
8299+ template<>
8300+ struct __promote<float>
8301+ { typedef float __type; };
8302+
8303+ template<typename _Tp, typename _Up,
8304+ typename _Tp2 = typename __promote<_Tp>::__type,
8305+ typename _Up2 = typename __promote<_Up>::__type>
8306 struct __promote_2
8307 {
8308- private:
8309- typedef typename __promote<_Tp>::__type __type1;
8310- typedef typename __promote<_Up>::__type __type2;
8311-
8312- public:
8313- typedef __typeof__(__type1() + __type2()) __type;
8314+ typedef __typeof__(_Tp2() + _Up2()) __type;
8315 };
8316
8317- template<typename _Tp, typename _Up, typename _Vp>
8318+ template<typename _Tp, typename _Up, typename _Vp,
8319+ typename _Tp2 = typename __promote<_Tp>::__type,
8320+ typename _Up2 = typename __promote<_Up>::__type,
8321+ typename _Vp2 = typename __promote<_Vp>::__type>
8322 struct __promote_3
8323 {
8324- private:
8325- typedef typename __promote<_Tp>::__type __type1;
8326- typedef typename __promote<_Up>::__type __type2;
8327- typedef typename __promote<_Vp>::__type __type3;
8328-
8329- public:
8330- typedef __typeof__(__type1() + __type2() + __type3()) __type;
8331+ typedef __typeof__(_Tp2() + _Up2() + _Vp2()) __type;
8332 };
8333
8334- template<typename _Tp, typename _Up, typename _Vp, typename _Wp>
8335+ template<typename _Tp, typename _Up, typename _Vp, typename _Wp,
8336+ typename _Tp2 = typename __promote<_Tp>::__type,
8337+ typename _Up2 = typename __promote<_Up>::__type,
8338+ typename _Vp2 = typename __promote<_Vp>::__type,
8339+ typename _Wp2 = typename __promote<_Wp>::__type>
8340 struct __promote_4
8341 {
8342- private:
8343- typedef typename __promote<_Tp>::__type __type1;
8344- typedef typename __promote<_Up>::__type __type2;
8345- typedef typename __promote<_Vp>::__type __type3;
8346- typedef typename __promote<_Wp>::__type __type4;
8347-
8348- public:
8349- typedef __typeof__(__type1() + __type2() + __type3() + __type4()) __type;
8350+ typedef __typeof__(_Tp2() + _Up2() + _Vp2() + _Wp2()) __type;
8351 };
8352
8353 _GLIBCXX_END_NAMESPACE_VERSION
8354Index: libstdc++-v3/include/profile/map.h
8355===================================================================
a966c5b5
AM
8356--- libstdc++-v3/include/profile/map.h (.../tags/gcc_4_6_2_release) (wersja 182722)
8357+++ libstdc++-v3/include/profile/map.h (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
8358@@ -326,6 +326,10 @@
8359 __profcxx_map_to_unordered_map_erase(this, size(), 1);
8360 return __i;
8361 }
8362+
8363+ iterator
8364+ erase(iterator __position)
8365+ { return erase(const_iterator(__position)); }
8366 #else
8367 void
8368 erase(iterator __position)
8369Index: libstdc++-v3/include/profile/multimap.h
8370===================================================================
a966c5b5
AM
8371--- libstdc++-v3/include/profile/multimap.h (.../tags/gcc_4_6_2_release) (wersja 182722)
8372+++ libstdc++-v3/include/profile/multimap.h (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
8373@@ -225,6 +225,10 @@
8374 iterator
8375 erase(const_iterator __position)
8376 { return iterator(_Base::erase(__position)); }
8377+
8378+ iterator
8379+ erase(iterator __position)
8380+ { return iterator(_Base::erase(__position)); }
8381 #else
8382 void
8383 erase(iterator __position)
8384Index: libstdc++-v3/include/bits/hashtable.h
8385===================================================================
a966c5b5
AM
8386--- libstdc++-v3/include/bits/hashtable.h (.../tags/gcc_4_6_2_release) (wersja 182722)
8387+++ libstdc++-v3/include/bits/hashtable.h (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
8388@@ -440,6 +440,11 @@
8389 iterator
8390 erase(const_iterator);
8391
8392+ // LWG 2059.
8393+ iterator
8394+ erase(iterator __it)
8395+ { return erase(const_iterator(__it)); }
8396+
8397 size_type
8398 erase(const key_type&);
8399
8400Index: libstdc++-v3/include/bits/stl_map.h
8401===================================================================
a966c5b5
AM
8402--- libstdc++-v3/include/bits/stl_map.h (.../tags/gcc_4_6_2_release) (wersja 182722)
8403+++ libstdc++-v3/include/bits/stl_map.h (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
8404@@ -612,6 +612,11 @@
8405 iterator
8406 erase(const_iterator __position)
8407 { return _M_t.erase(__position); }
8408+
8409+ // LWG 2059.
8410+ iterator
8411+ erase(iterator __position)
8412+ { return _M_t.erase(__position); }
8413 #else
8414 /**
8415 * @brief Erases an element from a %map.
8416Index: libstdc++-v3/include/bits/stl_multimap.h
8417===================================================================
a966c5b5
AM
8418--- libstdc++-v3/include/bits/stl_multimap.h (.../tags/gcc_4_6_2_release) (wersja 182722)
8419+++ libstdc++-v3/include/bits/stl_multimap.h (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
8420@@ -533,6 +533,11 @@
8421 iterator
8422 erase(const_iterator __position)
8423 { return _M_t.erase(__position); }
8424+
8425+ // LWG 2059.
8426+ iterator
8427+ erase(iterator __position)
8428+ { return _M_t.erase(__position); }
8429 #else
8430 /**
8431 * @brief Erases an element from a %multimap.
8432Index: libstdc++-v3/include/bits/stl_numeric.h
8433===================================================================
a966c5b5
AM
8434--- libstdc++-v3/include/bits/stl_numeric.h (.../tags/gcc_4_6_2_release) (wersja 182722)
8435+++ libstdc++-v3/include/bits/stl_numeric.h (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
8436@@ -222,10 +222,10 @@
8437 /**
8438 * @brief Return list of partial sums
8439 *
8440- * Accumulates the values in the range [first,last) using operator+().
8441+ * Accumulates the values in the range [first,last) using the @c + operator.
8442 * As each successive input value is added into the total, that partial sum
8443- * is written to @a result. Therefore, the first value in result is the
8444- * first value of the input, the second value in result is the sum of the
8445+ * is written to @p result. Therefore, the first value in @p result is the
8446+ * first value of the input, the second value in @p result is the sum of the
8447 * first and second input values, and so on.
8448 *
8449 * @param first Start of input range.
8450@@ -261,15 +261,16 @@
8451 /**
8452 * @brief Return list of partial sums
8453 *
8454- * Accumulates the values in the range [first,last) using operator+().
8455+ * Accumulates the values in the range [first,last) using @p binary_op.
8456 * As each successive input value is added into the total, that partial sum
8457- * is written to @a result. Therefore, the first value in result is the
8458- * first value of the input, the second value in result is the sum of the
8459+ * is written to @a result. Therefore, the first value in @p result is the
8460+ * first value of the input, the second value in @p result is the sum of the
8461 * first and second input values, and so on.
8462 *
8463 * @param first Start of input range.
8464 * @param last End of input range.
8465 * @param result Output to write sums to.
8466+ * @param binary_op Function object.
8467 * @return Iterator pointing just beyond the values written to result.
8468 */
8469 template<typename _InputIterator, typename _OutputIterator,
a966c5b5
AM
8470Index: libstdc++-v3/include/bits/stl_uninitialized.h
8471===================================================================
8472--- libstdc++-v3/include/bits/stl_uninitialized.h (.../tags/gcc_4_6_2_release) (wersja 182722)
8473+++ libstdc++-v3/include/bits/stl_uninitialized.h (.../branches/gcc-4_6-branch) (wersja 182722)
8474@@ -1,7 +1,7 @@
8475 // Raw memory manipulators -*- C++ -*-
8476
8477 // Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
8478-// 2009, 2010
8479+// 2009, 2010, 2011
8480 // Free Software Foundation, Inc.
8481 //
8482 // This file is part of the GNU ISO C++ Library. This library is free
8483@@ -530,7 +530,22 @@
8484 __uninit_default_n(__first, __n);
8485 }
8486
8487+ template<typename _Tp, typename _Allocator>
8488+ inline auto
8489+ _Construct_default_a_impl(_Tp* __ptr, _Allocator& __alloc, void*)
8490+ -> decltype(__alloc.construct(__ptr))
8491+ { return __alloc.construct(__ptr); }
8492
8493+ template<typename _Tp, typename _Allocator>
8494+ inline void
8495+ _Construct_default_a_impl(_Tp* __ptr, _Allocator& __alloc, ...)
8496+ { _Construct(__ptr); }
8497+
8498+ template<typename _Tp, typename _Allocator>
8499+ inline void
8500+ _Construct_default_a(_Tp* __ptr, _Allocator& __alloc)
8501+ { _Construct_default_a_impl(__ptr, __alloc, nullptr); }
8502+
8503 // __uninitialized_default_a
8504 // Fills [first, last) with std::distance(first, last) default
8505 // constructed value_types(s), constructed with the allocator alloc.
8506@@ -544,7 +559,7 @@
8507 __try
8508 {
8509 for (; __cur != __last; ++__cur)
8510- __alloc.construct(std::__addressof(*__cur));
8511+ _Construct_default_a(std::__addressof(*__cur), __alloc);
8512 }
8513 __catch(...)
8514 {
8515@@ -573,7 +588,7 @@
8516 __try
8517 {
8518 for (; __n > 0; --__n, ++__cur)
8519- __alloc.construct(std::__addressof(*__cur));
8520+ _Construct_default_a(std::__addressof(*__cur), __alloc);
8521 }
8522 __catch(...)
8523 {
2e34247b
AM
8524Index: libstdc++-v3/include/bits/stl_tree.h
8525===================================================================
a966c5b5
AM
8526--- libstdc++-v3/include/bits/stl_tree.h (.../tags/gcc_4_6_2_release) (wersja 182722)
8527+++ libstdc++-v3/include/bits/stl_tree.h (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
8528@@ -760,6 +760,16 @@
8529 _M_erase_aux(__position);
8530 return __result._M_const_cast();
8531 }
8532+
8533+ // LWG 2059.
8534+ iterator
8535+ erase(iterator __position)
8536+ {
8537+ iterator __result = __position;
8538+ ++__result;
8539+ _M_erase_aux(__position);
8540+ return __result;
8541+ }
8542 #else
8543 void
8544 erase(iterator __position)
8545Index: libstdc++-v3/include/c_global/cmath
8546===================================================================
a966c5b5
AM
8547--- libstdc++-v3/include/c_global/cmath (.../tags/gcc_4_6_2_release) (wersja 182722)
8548+++ libstdc++-v3/include/c_global/cmath (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
8549@@ -1,7 +1,7 @@
8550 // -*- C++ -*- C forwarding header.
8551
8552 // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
8553-// 2006, 2007, 2008, 2009, 2010
8554+// 2006, 2007, 2008, 2009, 2010, 2011
8555 // Free Software Foundation, Inc.
8556 //
8557 // This file is part of the GNU ISO C++ Library. This library is free
8558@@ -156,10 +156,7 @@
8559
8560 template<typename _Tp, typename _Up>
8561 inline
8562- typename __gnu_cxx::__promote_2<
8563- typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value
8564- && __is_arithmetic<_Up>::__value,
8565- _Tp>::__type, _Up>::__type
8566+ typename __gnu_cxx::__promote_2<_Tp, _Up>::__type
8567 atan2(_Tp __y, _Up __x)
8568 {
8569 typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type;
8570@@ -374,10 +371,7 @@
8571
8572 template<typename _Tp, typename _Up>
8573 inline
8574- typename __gnu_cxx::__promote_2<
8575- typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value
8576- && __is_arithmetic<_Up>::__value,
8577- _Tp>::__type, _Up>::__type
8578+ typename __gnu_cxx::__promote_2<_Tp, _Up>::__type
8579 pow(_Tp __x, _Up __y)
8580 {
8581 typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type;
8582Index: libstdc++-v3/include/tr1/complex
8583===================================================================
a966c5b5
AM
8584--- libstdc++-v3/include/tr1/complex (.../tags/gcc_4_6_2_release) (wersja 182722)
8585+++ libstdc++-v3/include/tr1/complex (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
8586@@ -185,12 +185,9 @@
8587 std::complex<_Tp>
8588 __complex_acosh(const std::complex<_Tp>& __z)
8589 {
8590- std::complex<_Tp> __t((__z.real() - __z.imag())
8591- * (__z.real() + __z.imag()) - _Tp(1.0),
8592- _Tp(2.0) * __z.real() * __z.imag());
8593- __t = std::sqrt(__t);
8594-
8595- return std::log(__t + __z);
8596+ // Kahan's formula.
8597+ return _Tp(2.0) * std::log(std::sqrt(_Tp(0.5) * (__z + _Tp(1.0)))
8598+ + std::sqrt(_Tp(0.5) * (__z - _Tp(1.0))));
8599 }
8600
8601 #if _GLIBCXX_USE_C99_COMPLEX_TR1
8602Index: libstdc++-v3/include/tr1/poly_hermite.tcc
8603===================================================================
a966c5b5
AM
8604--- libstdc++-v3/include/tr1/poly_hermite.tcc (.../tags/gcc_4_6_2_release) (wersja 182722)
8605+++ libstdc++-v3/include/tr1/poly_hermite.tcc (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
8606@@ -1,6 +1,6 @@
8607 // Special functions -*- C++ -*-
8608
8609-// Copyright (C) 2006, 2007, 2008, 2009, 2010
8610+// Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011
8611 // Free Software Foundation, Inc.
8612 //
8613 // This file is part of the GNU ISO C++ Library. This library is free
8614@@ -84,7 +84,7 @@
8615 unsigned int __i;
8616 for (__H_nm2 = __H_0, __H_nm1 = __H_1, __i = 2; __i <= __n; ++__i)
8617 {
8618- __H_n = 2 * (__x * __H_nm1 + (__i - 1) * __H_nm2);
8619+ __H_n = 2 * (__x * __H_nm1 - (__i - 1) * __H_nm2);
8620 __H_nm2 = __H_nm1;
8621 __H_nm1 = __H_n;
8622 }
8623Index: libstdc++-v3/ChangeLog
8624===================================================================
a966c5b5
AM
8625--- libstdc++-v3/ChangeLog (.../tags/gcc_4_6_2_release) (wersja 182722)
8626+++ libstdc++-v3/ChangeLog (.../branches/gcc-4_6-branch) (wersja 182722)
8627@@ -1,3 +1,114 @@
8628+2011-12-19 Jonathan Wakely <jwakely.gcc@gmail.com>
8629+
8630+ PR libstdc++/51626
8631+ * include/bits/stl_uninitialized.h (_Construct_default_a_impl): Define
8632+ overloaded functions to conditionally use allocator::construct.
8633+ (_Construct_default_a): Define to dispatch to appropriate
8634+ _Construct_default_a_impl overload.
8635+ (__uninitialized_default_a, __uninitialized_default_n_a): Use
8636+ _Construct_default_a.
8637+ * testsuite/20_util/allocator/51626.cc: New.
8638+
2e34247b
AM
8639+2011-12-19 Jonathan Wakely <jwakely.gcc@gmail.com>
8640+
8641+ * testsuite/ext/type_traits/remove_unsigned_integer_neg.cc: Adjust
8642+ dg-error line numbers.
8643+ * testsuite/ext/type_traits/add_unsigned_floating_neg.cc: Likewise.
8644+ * testsuite/ext/type_traits/remove_unsigned_floating_neg.cc: Likewise.
8645+ * testsuite/ext/type_traits/add_unsigned_integer_neg.cc: Likewise.
8646+
8647+2011-12-19 Jonathan Wakely <jwakely.gcc@gmail.com>
8648+
8649+ * include/c_global/cmath: Update copyright years.
8650+ * include/ext/type_traits.h: Likewise.
8651+
8652+2011-12-19 Jonathan Wakely <jwakely.gcc@gmail.com>
8653+
8654+ Backport from mainline
8655+ 2011-11-13 Paolo Carlini <paolo.carlini@oracle.com>
8656+
8657+ * include/c_global/cmath (atan2, pow): Simplify constraining on the
8658+ return type.
8659+
8660+ Backport from mainline
8661+ 2011-11-12 Jonathan Wakely <jwakely.gcc@gmail.com>
8662+
8663+ PR libstdc++/51083
8664+ * include/ext/type_traits.h (__promote): Only define __type member
8665+ for integral and floating point types, to prevent math functions
8666+ participating in overload resolution for other types.
8667+ (__promote_2, __promote_3, __promote_4): Use __promote in default
8668+ template argument values, so deduction only succeeds for integral and
8669+ floating point types.
8670+ * testsuite/26_numerics/cmath/51083.cc: New.
8671+ * testsuite/26_numerics/complex/51083.cc: New.
8672+ * testsuite/tr1/8_c_compatibility/cmath/51083.cc: New.
8673+ * testsuite/tr1/8_c_compatibility/complex/51083.cc: New.
8674+
8675+2011-12-19 Jonathan Wakely <jwakely.gcc@gmail.com>
8676+
8677+ PR libstdc++/50862
8678+ * include/std/condition_variable (condition_variable_any::wait): Fix
8679+ deadlock and ensure _Lock::lock() is called on exit.
8680+ * testsuite/30_threads/condition_variable_any/50862.cc: New.
8681+
8682+2011-12-18 Jonathan Wakely <jwakely.gcc@gmail.com>
8683+
8684+ PR libstdc++/51540
8685+ * include/bits/stl_numeric.h (partial_sum): Adjust doxygen comments.
8686+
8687+2011-11-20 Andreas Tobler <andreast@fgznet.ch>
8688+
8689+ * configure: Regenerate.
8690+
8691+2011-11-16 Paolo Carlini <paolo.carlini@oracle.com>
8692+
8693+ PR libstdc++/51142
8694+ * include/debug/unordered_map (unordered_map<>::erase(iterator),
8695+ unordered_multimap<>::erase(iterator)): Add, consistently with
8696+ LWG 2059.
8697+ * include/debug/unordered_set (unordered_set<>::erase(iterator),
8698+ unordered_multiset<>::erase(iterator)): Likewise.
8699+ * include/debug/map.h (map<>::erase(iterator)): Likewise.
8700+ * include/debug/multimap.h (multimap<>::erase(iterator)): Likewise.
8701+ * include/profile/map.h (map<>::erase(iterator)): Likewise.
8702+ * include/profile/multimap.h (multimap<>::erase(iterator)): Likewise.
8703+ * include/bits/hashtable.h (_Hashtable<>::erase(iterator)): Likewise.
8704+ * include/bits/stl_map.h (map<>::erase(iterator)): Likewise.
8705+ * include/bits/stl_multimap.h (multimap<>::erase(iterator)): Likewise.
8706+ * include/bits/stl_tree.h (_Rb_tree<>::erase(iterator)): Likewise.
8707+ * testsuite/23_containers/unordered_map/erase/51142.cc: New.
8708+ * testsuite/23_containers/multimap/modifiers/erase/51142.cc: Likewise.
8709+ * testsuite/23_containers/set/modifiers/erase/51142.cc: Likewise.
8710+ * testsuite/23_containers/unordered_multimap/erase/51142.cc: Likewise.
8711+ * testsuite/23_containers/unordered_set/erase/51142.cc: Likewise.
8712+ * testsuite/23_containers/multiset/modifiers/erase/51142.cc: Likewise.
8713+ * testsuite/23_containers/unordered_multiset/erase/51142.cc: Likewise.
8714+ * testsuite/23_containers/map/modifiers/erase/51142.cc: Likewise.
8715+
8716+2011-11-15 Jason Dick <dickphd@gmail.com>
8717+
8718+ PR libstdc++/51133
8719+ * include/tr1/poly_hermite.tcc (__poly_hermite_recursion): Fix
8720+ wrong sign in recursion relation.
8721+
8722+2011-11-02 Richard B. Kreckel <kreckel@ginac.de>
8723+ Paolo Carlini <paolo.carlini@oracle.com>
8724+
8725+ PR libstdc++/50880
8726+ * include/std/complex (__complex_acosh): Fix in a better way,
8727+ use Kahan's formula.
8728+ * include/tr1/complex (__complex_acosh): Likewise.
8729+
8730+2011-11-02 Richard B. Kreckel <kreckel@ginac.de>
8731+ Paolo Carlini <paolo.carlini@oracle.com>
8732+
8733+ PR libstdc++/50880
8734+ * include/std/complex (__complex_acosh): Fix for __z.real() < 0.
8735+ * include/tr1/complex (__complex_acosh): Likewise.
8736+ * testsuite/26_numerics/complex/50880.cc: New.
8737+ * testsuite/tr1/8_c_compatibility/complex/50880.cc: Likewise.
8738+
8739 2011-10-26 Release Manager
8740
8741 * GCC 4.6.2 released.
8742Index: libstdc++-v3/testsuite/26_numerics/complex/51083.cc
8743===================================================================
8744--- libstdc++-v3/testsuite/26_numerics/complex/51083.cc (.../tags/gcc_4_6_2_release) (wersja 0)
a966c5b5 8745+++ libstdc++-v3/testsuite/26_numerics/complex/51083.cc (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
8746@@ -0,0 +1,54 @@
8747+// { dg-options "-std=gnu++0x" }
8748+//
8749+// Copyright (C) 2011 Free Software Foundation, Inc.
8750+//
8751+// This file is part of the GNU ISO C++ Library. This library is free
8752+// software; you can redistribute it and/or modify it under the
8753+// terms of the GNU General Public License as published by the
8754+// Free Software Foundation; either version 3, or (at your option)
8755+// any later version.
8756+//
8757+// This library is distributed in the hope that it will be useful,
8758+// but WITHOUT ANY WARRANTY; without even the implied warranty of
8759+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
8760+// GNU General Public License for more details.
8761+//
8762+// You should have received a copy of the GNU General Public License along
8763+// with this library; see the file COPYING3. If not see
8764+// <http://www.gnu.org/licenses/>.
8765+
8766+#include <complex>
8767+
8768+namespace a
8769+{
8770+ template<typename> class Mat { };
8771+
8772+ template<typename T> struct Mat2 : Mat<T> { };
8773+
8774+ template<typename T> int arg(Mat<T>) { return 1; }
8775+ template<typename T> int conj(Mat<T>) { return 1; }
8776+ template<typename T> int imag(Mat<T>) { return 1; }
8777+ template<typename T> int norm(Mat<T>) { return 1; }
8778+ template<typename T> int proj(Mat<T>) { return 1; }
8779+ template<typename T> int real(Mat<T>) { return 1; }
8780+
8781+ template<typename T, typename U> int pow(Mat<T>, U) { return 1; }
8782+ template<typename T, typename U> int pow(T, Mat<U>) { return 1; }
8783+}
8784+
8785+int main()
8786+{
8787+ int __attribute__((unused)) i;
8788+
8789+ using namespace std;
8790+
8791+ a::Mat2< std::complex<double> > c;
8792+ i = arg(c);
8793+ i = conj(c);
8794+ i = imag(c);
8795+ i = norm(c);
8796+ i = proj(c);
8797+ i = real(c);
8798+ i = pow(std::complex<float>(), c);
8799+ i = pow(c, std::complex<float>());
8800+}
8801Index: libstdc++-v3/testsuite/26_numerics/complex/50880.cc
8802===================================================================
8803--- libstdc++-v3/testsuite/26_numerics/complex/50880.cc (.../tags/gcc_4_6_2_release) (wersja 0)
a966c5b5 8804+++ libstdc++-v3/testsuite/26_numerics/complex/50880.cc (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
8805@@ -0,0 +1,53 @@
8806+// { dg-options "-std=gnu++0x" }
8807+//
8808+// Copyright (C) 2011 Free Software Foundation, Inc.
8809+//
8810+// This file is part of the GNU ISO C++ Library. This library is free
8811+// software; you can redistribute it and/or modify it under the
8812+// terms of the GNU General Public License as published by the
8813+// Free Software Foundation; either version 3, or (at your option)
8814+// any later version.
8815+//
8816+// This library is distributed in the hope that it will be useful,
8817+// but WITHOUT ANY WARRANTY; without even the implied warranty of
8818+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
8819+// GNU General Public License for more details.
8820+//
8821+// You should have received a copy of the GNU General Public License along
8822+// with this library; see the file COPYING3. If not see
8823+// <http://www.gnu.org/licenses/>.
8824+
8825+#include <complex>
8826+#include <testsuite_hooks.h>
8827+
8828+template<typename T>
8829+ void test01_do()
8830+ {
8831+ bool test __attribute__((unused)) = true;
8832+
8833+ const std::complex<T> ca(T(-2), T(2));
8834+ const std::complex<T> cb(T(-2), T(0));
8835+ const std::complex<T> cc(T(-2), T(-2));
8836+
8837+ std::complex<T> cra = std::acosh(ca);
8838+ std::complex<T> crb = std::acosh(cb);
8839+ std::complex<T> crc = std::acosh(cc);
8840+
8841+ VERIFY( cra.real() > T(0) );
8842+ VERIFY( crb.real() > T(0) );
8843+ VERIFY( crc.real() > T(0) );
8844+ }
8845+
8846+// libstdc++/50880
8847+void test01()
8848+{
8849+ test01_do<float>();
8850+ test01_do<double>();
8851+ test01_do<long double>();
8852+}
8853+
8854+int main()
8855+{
8856+ test01();
8857+ return 0;
8858+}
8859Index: libstdc++-v3/testsuite/26_numerics/cmath/51083.cc
8860===================================================================
8861--- libstdc++-v3/testsuite/26_numerics/cmath/51083.cc (.../tags/gcc_4_6_2_release) (wersja 0)
a966c5b5 8862+++ libstdc++-v3/testsuite/26_numerics/cmath/51083.cc (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
8863@@ -0,0 +1,62 @@
8864+// { dg-options "-std=gnu++0x" }
8865+//
8866+// Copyright (C) 2011 Free Software Foundation, Inc.
8867+//
8868+// This file is part of the GNU ISO C++ Library. This library is free
8869+// software; you can redistribute it and/or modify it under the
8870+// terms of the GNU General Public License as published by the
8871+// Free Software Foundation; either version 3, or (at your option)
8872+// any later version.
8873+//
8874+// This library is distributed in the hope that it will be useful,
8875+// but WITHOUT ANY WARRANTY; without even the implied warranty of
8876+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
8877+// GNU General Public License for more details.
8878+//
8879+// You should have received a copy of the GNU General Public License along
8880+// with this library; see the file COPYING3. If not see
8881+// <http://www.gnu.org/licenses/>.
8882+
8883+#include <cmath>
8884+
8885+namespace a
8886+{
8887+ template<typename> class Mat { };
8888+
8889+ template<typename T> struct Mat2 : Mat<T> { };
8890+
8891+ template<typename T>
8892+ int fdim(Mat<T>) { return 1; }
8893+
8894+ template<typename T, typename U>
8895+ int floor(Mat<T>, U) { return 1; }
8896+ template<typename T, typename U>
8897+ int floor(T, Mat<U>) { return 1; }
8898+
8899+ template<typename T, typename U, typename V>
8900+ int fma(Mat<T>, U, V) { return 1; }
8901+ template<typename T, typename U, typename V>
8902+ int fma(T, Mat<U>, V) { return 1; }
8903+ template<typename T, typename U, typename V>
8904+ int fma(T, U, Mat<V>) { return 1; }
8905+}
8906+
8907+int main()
8908+{
8909+ int __attribute__((unused)) i;
8910+
8911+ using namespace std;
8912+
8913+ a::Mat2<double> c;
8914+ i = fdim(c);
8915+ i = floor(c, 0.);
8916+ i = floor(0., c);
8917+ i = floor(c, 1);
8918+ i = floor(1, c);
8919+ i = fma(c, 0., 1.);
8920+ i = fma(0., c, 1.);
8921+ i = fma(0., 1., c);
8922+ i = fma(c, 0., 1);
8923+ i = fma(0., c, 1);
8924+ i = fma(0., 1, c);
8925+}
8926Index: libstdc++-v3/testsuite/30_threads/condition_variable_any/50862.cc
8927===================================================================
8928--- libstdc++-v3/testsuite/30_threads/condition_variable_any/50862.cc (.../tags/gcc_4_6_2_release) (wersja 0)
a966c5b5 8929+++ libstdc++-v3/testsuite/30_threads/condition_variable_any/50862.cc (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
8930@@ -0,0 +1,80 @@
8931+// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* } }
8932+// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* } }
8933+// { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } }
8934+// { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } }
8935+// { dg-require-cstdint "" }
8936+// { dg-require-gthreads "" }
8937+// { dg-require-sched-yield "" }
8938+
8939+// Copyright (C) 2011 Free Software Foundation, Inc.
8940+//
8941+// This file is part of the GNU ISO C++ Library. This library is free
8942+// software; you can redistribute it and/or modify it under the
8943+// terms of the GNU General Public License as published by the
8944+// Free Software Foundation; either version 3, or (at your option)
8945+// any later version.
8946+
8947+// This library is distributed in the hope that it will be useful,
8948+// but WITHOUT ANY WARRANTY; without even the implied warranty of
8949+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
8950+// GNU General Public License for more details.
8951+
8952+// You should have received a copy of the GNU General Public License along
8953+// with this library; see the file COPYING3. If not see
8954+// <http://www.gnu.org/licenses/>.
8955+
8956+#include <condition_variable>
8957+#include <thread>
8958+#include <mutex>
8959+#include <array>
8960+#include <sstream>
8961+
8962+struct scoped_thread
8963+{
8964+ ~scoped_thread() { if (t.joinable()) t.join(); }
8965+ std::thread t;
8966+};
8967+
8968+int main()
8969+{
8970+ typedef std::unique_lock<std::mutex> Lock;
8971+
8972+ std::mutex m;
8973+ std::condition_variable_any cond;
8974+ unsigned int product = 0;
8975+ const unsigned int count = 10;
8976+
8977+ // writing to stream causes timing changes which makes deadlock easier
8978+ // to reproduce - do not remove
8979+ std::ostringstream out;
8980+
8981+ // create consumers
8982+ std::array<scoped_thread, 2> threads;
8983+ for (std::size_t i = 0; i < threads.size(); ++i)
8984+ threads[i].t
8985+ = std::thread( [&]
8986+ {
8987+ for (unsigned int i = 0; i < count; ++i)
8988+ {
8989+ std::this_thread::yield();
8990+ Lock lock(m);
8991+ while(product == 0)
8992+ cond.wait(lock);
8993+ out << "got product "
8994+ << std::this_thread::get_id()
8995+ << ' ' << product << std::endl;
8996+ --product;
8997+ }
8998+ } );
8999+
9000+ // single producer
9001+ for (std::size_t i = 0; i < threads.size() * count; ++i)
9002+ {
9003+ std::this_thread::yield();
9004+ Lock lock(m);
9005+ ++product;
9006+ out << "setting product " << std::this_thread::get_id()
9007+ << ' ' << product << std::endl;
9008+ cond.notify_one();
9009+ }
9010+}
9011Index: libstdc++-v3/testsuite/ext/type_traits/remove_unsigned_integer_neg.cc
9012===================================================================
a966c5b5
AM
9013--- libstdc++-v3/testsuite/ext/type_traits/remove_unsigned_integer_neg.cc (.../tags/gcc_4_6_2_release) (wersja 182722)
9014+++ libstdc++-v3/testsuite/ext/type_traits/remove_unsigned_integer_neg.cc (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
9015@@ -36,4 +36,4 @@
9016 }
9017
9018 // { dg-error "invalid use of incomplete" "" { target *-*-* } 28 }
9019-// { dg-error "declaration of" "" { target *-*-* } 106 }
9020+// { dg-error "declaration of" "" { target *-*-* } 107 }
9021Index: libstdc++-v3/testsuite/ext/type_traits/add_unsigned_floating_neg.cc
9022===================================================================
a966c5b5
AM
9023--- libstdc++-v3/testsuite/ext/type_traits/add_unsigned_floating_neg.cc (.../tags/gcc_4_6_2_release) (wersja 182722)
9024+++ libstdc++-v3/testsuite/ext/type_traits/add_unsigned_floating_neg.cc (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
9025@@ -35,4 +35,4 @@
9026 }
9027
9028 // { dg-error "instantiated from" "" { target *-*-* } 28 }
9029-// { dg-error "no type" "" { target *-*-* } 69 }
9030+// { dg-error "no type" "" { target *-*-* } 70 }
9031Index: libstdc++-v3/testsuite/ext/type_traits/remove_unsigned_floating_neg.cc
9032===================================================================
a966c5b5
AM
9033--- libstdc++-v3/testsuite/ext/type_traits/remove_unsigned_floating_neg.cc (.../tags/gcc_4_6_2_release) (wersja 182722)
9034+++ libstdc++-v3/testsuite/ext/type_traits/remove_unsigned_floating_neg.cc (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
9035@@ -35,4 +35,4 @@
9036 }
9037
9038 // { dg-error "instantiated from" "" { target *-*-* } 28 }
9039-// { dg-error "no type" "" { target *-*-* } 112 }
9040+// { dg-error "no type" "" { target *-*-* } 113 }
9041Index: libstdc++-v3/testsuite/ext/type_traits/add_unsigned_integer_neg.cc
9042===================================================================
a966c5b5
AM
9043--- libstdc++-v3/testsuite/ext/type_traits/add_unsigned_integer_neg.cc (.../tags/gcc_4_6_2_release) (wersja 182722)
9044+++ libstdc++-v3/testsuite/ext/type_traits/add_unsigned_integer_neg.cc (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
9045@@ -36,4 +36,4 @@
9046 }
9047
9048 // { dg-error "invalid use of incomplete" "" { target *-*-* } 28 }
9049-// { dg-error "declaration of" "" { target *-*-* } 63 }
9050+// { dg-error "declaration of" "" { target *-*-* } 64 }
9051Index: libstdc++-v3/testsuite/tr1/8_c_compatibility/complex/51083.cc
9052===================================================================
9053--- libstdc++-v3/testsuite/tr1/8_c_compatibility/complex/51083.cc (.../tags/gcc_4_6_2_release) (wersja 0)
a966c5b5 9054+++ libstdc++-v3/testsuite/tr1/8_c_compatibility/complex/51083.cc (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
9055@@ -0,0 +1,54 @@
9056+// { dg-options "-std=gnu++0x" }
9057+//
9058+// Copyright (C) 2011 Free Software Foundation, Inc.
9059+//
9060+// This file is part of the GNU ISO C++ Library. This library is free
9061+// software; you can redistribute it and/or modify it under the
9062+// terms of the GNU General Public License as published by the
9063+// Free Software Foundation; either version 3, or (at your option)
9064+// any later version.
9065+//
9066+// This library is distributed in the hope that it will be useful,
9067+// but WITHOUT ANY WARRANTY; without even the implied warranty of
9068+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9069+// GNU General Public License for more details.
9070+//
9071+// You should have received a copy of the GNU General Public License along
9072+// with this library; see the file COPYING3. If not see
9073+// <http://www.gnu.org/licenses/>.
9074+
9075+#include <tr1/complex>
9076+
9077+namespace a
9078+{
9079+ template<typename> class Mat { };
9080+
9081+ template<typename T> struct Mat2 : Mat<T> { };
9082+
9083+ template<typename T> int arg(Mat<T>) { return 1; }
9084+ template<typename T> int conj(Mat<T>) { return 1; }
9085+ template<typename T> int imag(Mat<T>) { return 1; }
9086+ template<typename T> int norm(Mat<T>) { return 1; }
9087+ template<typename T> int proj(Mat<T>) { return 1; }
9088+ template<typename T> int real(Mat<T>) { return 1; }
9089+
9090+ template<typename T, typename U> int pow(Mat<T>, U) { return 1; }
9091+ template<typename T, typename U> int pow(T, Mat<U>) { return 1; }
9092+}
9093+
9094+int main()
9095+{
9096+ int __attribute__((unused)) i;
9097+
9098+ using namespace std::tr1;
9099+
9100+ a::Mat2< std::complex<double> > c;
9101+ i = arg(c);
9102+ i = conj(c);
9103+ i = imag(c);
9104+ i = norm(c);
9105+ i = proj(c);
9106+ i = real(c);
9107+ i = pow(std::complex<float>(), c);
9108+ i = pow(c, std::complex<float>());
9109+}
9110Index: libstdc++-v3/testsuite/tr1/8_c_compatibility/complex/50880.cc
9111===================================================================
9112--- libstdc++-v3/testsuite/tr1/8_c_compatibility/complex/50880.cc (.../tags/gcc_4_6_2_release) (wersja 0)
a966c5b5 9113+++ libstdc++-v3/testsuite/tr1/8_c_compatibility/complex/50880.cc (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
9114@@ -0,0 +1,51 @@
9115+// Copyright (C) 2011 Free Software Foundation, Inc.
9116+//
9117+// This file is part of the GNU ISO C++ Library. This library is free
9118+// software; you can redistribute it and/or modify it under the
9119+// terms of the GNU General Public License as published by the
9120+// Free Software Foundation; either version 3, or (at your option)
9121+// any later version.
9122+//
9123+// This library is distributed in the hope that it will be useful,
9124+// but WITHOUT ANY WARRANTY; without even the implied warranty of
9125+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9126+// GNU General Public License for more details.
9127+//
9128+// You should have received a copy of the GNU General Public License along
9129+// with this library; see the file COPYING3. If not see
9130+// <http://www.gnu.org/licenses/>.
9131+
9132+#include <tr1/complex>
9133+#include <testsuite_hooks.h>
9134+
9135+template<typename T>
9136+ void test01_do()
9137+ {
9138+ bool test __attribute__((unused)) = true;
9139+
9140+ const std::complex<T> ca(T(-2), T(2));
9141+ const std::complex<T> cb(T(-2), T(0));
9142+ const std::complex<T> cc(T(-2), T(-2));
9143+
9144+ std::complex<T> cra = std::tr1::acosh(ca);
9145+ std::complex<T> crb = std::tr1::acosh(cb);
9146+ std::complex<T> crc = std::tr1::acosh(cc);
9147+
9148+ VERIFY( cra.real() > T(0) );
9149+ VERIFY( crb.real() > T(0) );
9150+ VERIFY( crc.real() > T(0) );
9151+ }
9152+
9153+// libstdc++/50880
9154+void test01()
9155+{
9156+ test01_do<float>();
9157+ test01_do<double>();
9158+ test01_do<long double>();
9159+}
9160+
9161+int main()
9162+{
9163+ test01();
9164+ return 0;
9165+}
9166Index: libstdc++-v3/testsuite/tr1/8_c_compatibility/cmath/51083.cc
9167===================================================================
9168--- libstdc++-v3/testsuite/tr1/8_c_compatibility/cmath/51083.cc (.../tags/gcc_4_6_2_release) (wersja 0)
a966c5b5 9169+++ libstdc++-v3/testsuite/tr1/8_c_compatibility/cmath/51083.cc (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
9170@@ -0,0 +1,62 @@
9171+// { dg-options "-std=gnu++0x" }
9172+//
9173+// Copyright (C) 2011 Free Software Foundation, Inc.
9174+//
9175+// This file is part of the GNU ISO C++ Library. This library is free
9176+// software; you can redistribute it and/or modify it under the
9177+// terms of the GNU General Public License as published by the
9178+// Free Software Foundation; either version 3, or (at your option)
9179+// any later version.
9180+//
9181+// This library is distributed in the hope that it will be useful,
9182+// but WITHOUT ANY WARRANTY; without even the implied warranty of
9183+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9184+// GNU General Public License for more details.
9185+//
9186+// You should have received a copy of the GNU General Public License along
9187+// with this library; see the file COPYING3. If not see
9188+// <http://www.gnu.org/licenses/>.
9189+
9190+#include <tr1/cmath>
9191+
9192+namespace a
9193+{
9194+ template<typename> class Mat { };
9195+
9196+ template<typename T> struct Mat2 : Mat<T> { };
9197+
9198+ template<typename T>
9199+ int fdim(Mat<T>) { return 1; }
9200+
9201+ template<typename T, typename U>
9202+ int floor(Mat<T>, U) { return 1; }
9203+ template<typename T, typename U>
9204+ int floor(T, Mat<U>) { return 1; }
9205+
9206+ template<typename T, typename U, typename V>
9207+ int fma(Mat<T>, U, V) { return 1; }
9208+ template<typename T, typename U, typename V>
9209+ int fma(T, Mat<U>, V) { return 1; }
9210+ template<typename T, typename U, typename V>
9211+ int fma(T, U, Mat<V>) { return 1; }
9212+}
9213+
9214+int main()
9215+{
9216+ int __attribute__((unused)) i;
9217+
9218+ using namespace std::tr1;
9219+
9220+ a::Mat2<double> c;
9221+ i = fdim(c);
9222+ i = floor(c, 0.);
9223+ i = floor(0., c);
9224+ i = floor(c, 1);
9225+ i = floor(1, c);
9226+ i = fma(c, 0., 1.);
9227+ i = fma(0., c, 1.);
9228+ i = fma(0., 1., c);
9229+ i = fma(c, 0., 1);
9230+ i = fma(0., c, 1);
9231+ i = fma(0., 1, c);
9232+}
9233Index: libstdc++-v3/testsuite/23_containers/unordered_map/erase/51142.cc
9234===================================================================
9235--- libstdc++-v3/testsuite/23_containers/unordered_map/erase/51142.cc (.../tags/gcc_4_6_2_release) (wersja 0)
a966c5b5 9236+++ libstdc++-v3/testsuite/23_containers/unordered_map/erase/51142.cc (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
9237@@ -0,0 +1,38 @@
9238+// Copyright (C) 2011 Free Software Foundation, Inc.
9239+//
9240+// This file is part of the GNU ISO C++ Library. This library is free
9241+// software; you can redistribute it and/or modify it under the
9242+// terms of the GNU General Public License as published by the
9243+// Free Software Foundation; either version 3, or (at your option)
9244+// any later version.
9245+//
9246+// This library is distributed in the hope that it will be useful,
9247+// but WITHOUT ANY WARRANTY; without even the implied warranty of
9248+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9249+// GNU General Public License for more details.
9250+//
9251+// You should have received a copy of the GNU General Public License along
9252+// with this library; see the file COPYING3. If not see
9253+// <http://www.gnu.org/licenses/>.
9254+//
9255+
9256+// { dg-do compile }
9257+// { dg-options "-std=gnu++0x" }
9258+
9259+#include <unordered_map>
9260+
9261+struct X
9262+{
9263+ template<typename T>
9264+ X(T&) {}
9265+};
9266+
9267+bool operator==(const X&, const X&) { return false; }
9268+
9269+// LWG 2059.
9270+void erasor(std::unordered_map<X, int>& s, X x)
9271+{
9272+ std::unordered_map<X, int>::iterator it = s.find(x);
9273+ if (it != s.end())
9274+ s.erase(it);
9275+}
9276Index: libstdc++-v3/testsuite/23_containers/multimap/modifiers/erase/51142.cc
9277===================================================================
9278--- libstdc++-v3/testsuite/23_containers/multimap/modifiers/erase/51142.cc (.../tags/gcc_4_6_2_release) (wersja 0)
a966c5b5 9279+++ libstdc++-v3/testsuite/23_containers/multimap/modifiers/erase/51142.cc (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
9280@@ -0,0 +1,38 @@
9281+// Copyright (C) 2011 Free Software Foundation, Inc.
9282+//
9283+// This file is part of the GNU ISO C++ Library. This library is free
9284+// software; you can redistribute it and/or modify it under the
9285+// terms of the GNU General Public License as published by the
9286+// Free Software Foundation; either version 3, or (at your option)
9287+// any later version.
9288+//
9289+// This library is distributed in the hope that it will be useful,
9290+// but WITHOUT ANY WARRANTY; without even the implied warranty of
9291+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9292+// GNU General Public License for more details.
9293+//
9294+// You should have received a copy of the GNU General Public License along
9295+// with this library; see the file COPYING3. If not see
9296+// <http://www.gnu.org/licenses/>.
9297+//
9298+
9299+// { dg-do compile }
9300+// { dg-options "-std=gnu++0x" }
9301+
9302+#include <map>
9303+
9304+struct X
9305+{
9306+ template<typename T>
9307+ X(T&) {}
9308+};
9309+
9310+bool operator<(const X&, const X&) { return false; }
9311+
9312+// LWG 2059.
9313+void erasor(std::multimap<X, int>& s, X x)
9314+{
9315+ std::multimap<X, int>::iterator it = s.find(x);
9316+ if (it != s.end())
9317+ s.erase(it);
9318+}
9319Index: libstdc++-v3/testsuite/23_containers/set/modifiers/erase/51142.cc
9320===================================================================
9321--- libstdc++-v3/testsuite/23_containers/set/modifiers/erase/51142.cc (.../tags/gcc_4_6_2_release) (wersja 0)
a966c5b5 9322+++ libstdc++-v3/testsuite/23_containers/set/modifiers/erase/51142.cc (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
9323@@ -0,0 +1,38 @@
9324+// Copyright (C) 2011 Free Software Foundation, Inc.
9325+//
9326+// This file is part of the GNU ISO C++ Library. This library is free
9327+// software; you can redistribute it and/or modify it under the
9328+// terms of the GNU General Public License as published by the
9329+// Free Software Foundation; either version 3, or (at your option)
9330+// any later version.
9331+//
9332+// This library is distributed in the hope that it will be useful,
9333+// but WITHOUT ANY WARRANTY; without even the implied warranty of
9334+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9335+// GNU General Public License for more details.
9336+//
9337+// You should have received a copy of the GNU General Public License along
9338+// with this library; see the file COPYING3. If not see
9339+// <http://www.gnu.org/licenses/>.
9340+//
9341+
9342+// { dg-do compile }
9343+// { dg-options "-std=gnu++0x" }
9344+
9345+#include <set>
9346+
9347+struct X
9348+{
9349+ template<typename T>
9350+ X(T&) {}
9351+};
9352+
9353+bool operator<(const X&, const X&) { return false; }
9354+
9355+// LWG 2059.
9356+void erasor(std::set<X>& s, X x)
9357+{
9358+ std::set<X>::iterator it = s.find(x);
9359+ if (it != s.end())
9360+ s.erase(it);
9361+}
9362Index: libstdc++-v3/testsuite/23_containers/unordered_multimap/erase/51142.cc
9363===================================================================
9364--- libstdc++-v3/testsuite/23_containers/unordered_multimap/erase/51142.cc (.../tags/gcc_4_6_2_release) (wersja 0)
a966c5b5 9365+++ libstdc++-v3/testsuite/23_containers/unordered_multimap/erase/51142.cc (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
9366@@ -0,0 +1,38 @@
9367+// Copyright (C) 2011 Free Software Foundation, Inc.
9368+//
9369+// This file is part of the GNU ISO C++ Library. This library is free
9370+// software; you can redistribute it and/or modify it under the
9371+// terms of the GNU General Public License as published by the
9372+// Free Software Foundation; either version 3, or (at your option)
9373+// any later version.
9374+//
9375+// This library is distributed in the hope that it will be useful,
9376+// but WITHOUT ANY WARRANTY; without even the implied warranty of
9377+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9378+// GNU General Public License for more details.
9379+//
9380+// You should have received a copy of the GNU General Public License along
9381+// with this library; see the file COPYING3. If not see
9382+// <http://www.gnu.org/licenses/>.
9383+//
9384+
9385+// { dg-do compile }
9386+// { dg-options "-std=gnu++0x" }
9387+
9388+#include <unordered_map>
9389+
9390+struct X
9391+{
9392+ template<typename T>
9393+ X(T&) {}
9394+};
9395+
9396+bool operator==(const X&, const X&) { return false; }
9397+
9398+// LWG 2059.
9399+void erasor(std::unordered_multimap<X, int>& s, X x)
9400+{
9401+ std::unordered_multimap<X, int>::iterator it = s.find(x);
9402+ if (it != s.end())
9403+ s.erase(it);
9404+}
9405Index: libstdc++-v3/testsuite/23_containers/unordered_set/erase/51142.cc
9406===================================================================
9407--- libstdc++-v3/testsuite/23_containers/unordered_set/erase/51142.cc (.../tags/gcc_4_6_2_release) (wersja 0)
a966c5b5 9408+++ libstdc++-v3/testsuite/23_containers/unordered_set/erase/51142.cc (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
9409@@ -0,0 +1,38 @@
9410+// Copyright (C) 2011 Free Software Foundation, Inc.
9411+//
9412+// This file is part of the GNU ISO C++ Library. This library is free
9413+// software; you can redistribute it and/or modify it under the
9414+// terms of the GNU General Public License as published by the
9415+// Free Software Foundation; either version 3, or (at your option)
9416+// any later version.
9417+//
9418+// This library is distributed in the hope that it will be useful,
9419+// but WITHOUT ANY WARRANTY; without even the implied warranty of
9420+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9421+// GNU General Public License for more details.
9422+//
9423+// You should have received a copy of the GNU General Public License along
9424+// with this library; see the file COPYING3. If not see
9425+// <http://www.gnu.org/licenses/>.
9426+//
9427+
9428+// { dg-do compile }
9429+// { dg-options "-std=gnu++0x" }
9430+
9431+#include <unordered_set>
9432+
9433+struct X
9434+{
9435+ template<typename T>
9436+ X(T&) {}
9437+};
9438+
9439+bool operator==(const X&, const X&) { return false; }
9440+
9441+// LWG 2059.
9442+void erasor(std::unordered_set<X>& s, X x)
9443+{
9444+ std::unordered_set<X>::iterator it = s.find(x);
9445+ if (it != s.end())
9446+ s.erase(it);
9447+}
9448Index: libstdc++-v3/testsuite/23_containers/multiset/modifiers/erase/51142.cc
9449===================================================================
9450--- libstdc++-v3/testsuite/23_containers/multiset/modifiers/erase/51142.cc (.../tags/gcc_4_6_2_release) (wersja 0)
a966c5b5 9451+++ libstdc++-v3/testsuite/23_containers/multiset/modifiers/erase/51142.cc (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
9452@@ -0,0 +1,38 @@
9453+// Copyright (C) 2011 Free Software Foundation, Inc.
9454+//
9455+// This file is part of the GNU ISO C++ Library. This library is free
9456+// software; you can redistribute it and/or modify it under the
9457+// terms of the GNU General Public License as published by the
9458+// Free Software Foundation; either version 3, or (at your option)
9459+// any later version.
9460+//
9461+// This library is distributed in the hope that it will be useful,
9462+// but WITHOUT ANY WARRANTY; without even the implied warranty of
9463+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9464+// GNU General Public License for more details.
9465+//
9466+// You should have received a copy of the GNU General Public License along
9467+// with this library; see the file COPYING3. If not see
9468+// <http://www.gnu.org/licenses/>.
9469+//
9470+
9471+// { dg-do compile }
9472+// { dg-options "-std=gnu++0x" }
9473+
9474+#include <set>
9475+
9476+struct X
9477+{
9478+ template<typename T>
9479+ X(T&) {}
9480+};
9481+
9482+bool operator<(const X&, const X&) { return false; }
9483+
9484+// LWG 2059.
9485+void erasor(std::multiset<X>& s, X x)
9486+{
9487+ std::multiset<X>::iterator it = s.find(x);
9488+ if (it != s.end())
9489+ s.erase(it);
9490+}
9491Index: libstdc++-v3/testsuite/23_containers/unordered_multiset/erase/51142.cc
9492===================================================================
9493--- libstdc++-v3/testsuite/23_containers/unordered_multiset/erase/51142.cc (.../tags/gcc_4_6_2_release) (wersja 0)
a966c5b5 9494+++ libstdc++-v3/testsuite/23_containers/unordered_multiset/erase/51142.cc (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
9495@@ -0,0 +1,38 @@
9496+// Copyright (C) 2011 Free Software Foundation, Inc.
9497+//
9498+// This file is part of the GNU ISO C++ Library. This library is free
9499+// software; you can redistribute it and/or modify it under the
9500+// terms of the GNU General Public License as published by the
9501+// Free Software Foundation; either version 3, or (at your option)
9502+// any later version.
9503+//
9504+// This library is distributed in the hope that it will be useful,
9505+// but WITHOUT ANY WARRANTY; without even the implied warranty of
9506+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9507+// GNU General Public License for more details.
9508+//
9509+// You should have received a copy of the GNU General Public License along
9510+// with this library; see the file COPYING3. If not see
9511+// <http://www.gnu.org/licenses/>.
9512+//
9513+
9514+// { dg-do compile }
9515+// { dg-options "-std=gnu++0x" }
9516+
9517+#include <unordered_set>
9518+
9519+struct X
9520+{
9521+ template<typename T>
9522+ X(T&) {}
9523+};
9524+
9525+bool operator==(const X&, const X&) { return false; }
9526+
9527+// LWG 2059.
9528+void erasor(std::unordered_multiset<X>& s, X x)
9529+{
9530+ std::unordered_multiset<X>::iterator it = s.find(x);
9531+ if (it != s.end())
9532+ s.erase(it);
9533+}
9534Index: libstdc++-v3/testsuite/23_containers/map/modifiers/erase/51142.cc
9535===================================================================
9536--- libstdc++-v3/testsuite/23_containers/map/modifiers/erase/51142.cc (.../tags/gcc_4_6_2_release) (wersja 0)
a966c5b5 9537+++ libstdc++-v3/testsuite/23_containers/map/modifiers/erase/51142.cc (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
9538@@ -0,0 +1,38 @@
9539+// Copyright (C) 2011 Free Software Foundation, Inc.
9540+//
9541+// This file is part of the GNU ISO C++ Library. This library is free
9542+// software; you can redistribute it and/or modify it under the
9543+// terms of the GNU General Public License as published by the
9544+// Free Software Foundation; either version 3, or (at your option)
9545+// any later version.
9546+//
9547+// This library is distributed in the hope that it will be useful,
9548+// but WITHOUT ANY WARRANTY; without even the implied warranty of
9549+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9550+// GNU General Public License for more details.
9551+//
9552+// You should have received a copy of the GNU General Public License along
9553+// with this library; see the file COPYING3. If not see
9554+// <http://www.gnu.org/licenses/>.
9555+//
9556+
9557+// { dg-do compile }
9558+// { dg-options "-std=gnu++0x" }
9559+
9560+#include <map>
9561+
9562+struct X
9563+{
9564+ template<typename T>
9565+ X(T&) {}
9566+};
9567+
9568+bool operator<(const X&, const X&) { return false; }
9569+
9570+// LWG 2059.
9571+void erasor(std::map<X, int>& s, X x)
9572+{
9573+ std::map<X, int>::iterator it = s.find(x);
9574+ if (it != s.end())
9575+ s.erase(it);
9576+}
a966c5b5
AM
9577Index: libstdc++-v3/testsuite/20_util/allocator/51626.cc
9578===================================================================
9579--- libstdc++-v3/testsuite/20_util/allocator/51626.cc (.../tags/gcc_4_6_2_release) (wersja 0)
9580+++ libstdc++-v3/testsuite/20_util/allocator/51626.cc (.../branches/gcc-4_6-branch) (wersja 182722)
9581@@ -0,0 +1,66 @@
9582+// Copyright (C) 2011 Free Software Foundation, Inc.
9583+//
9584+// This file is part of the GNU ISO C++ Library. This library is free
9585+// software; you can redistribute it and/or modify it under the
9586+// terms of the GNU General Public License as published by the
9587+// Free Software Foundation; either version 3, or (at your option)
9588+// any later version.
9589+
9590+// This library is distributed in the hope that it will be useful,
9591+// but WITHOUT ANY WARRANTY; without even the implied warranty of
9592+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9593+// GNU General Public License for more details.
9594+
9595+// You should have received a copy of the GNU General Public License along
9596+// with this library; see the file COPYING3. If not see
9597+// <http://www.gnu.org/licenses/>.
9598+
9599+// { dg-options "-std=gnu++0x" }
9600+
9601+#include <memory>
9602+#include <vector>
9603+#include <testsuite_hooks.h>
9604+
9605+int count = 0;
9606+
9607+template <class T>
9608+ struct allocator98 : std::allocator<T>
9609+ {
9610+ template <class U> struct rebind { typedef allocator98<U> other; };
9611+
9612+ allocator98() { }
9613+
9614+ template <class U> allocator98(const allocator98<U>&) { };
9615+
9616+ void construct(T* p, const T& val)
9617+ {
9618+ ++count;
9619+ std::allocator<T>::construct(p, val);
9620+ }
9621+ };
9622+
9623+template <class T>
9624+ struct allocator11 : std::allocator<T>
9625+ {
9626+ template <class U> struct rebind { typedef allocator11<U> other; };
9627+
9628+ allocator11() { }
9629+
9630+ template <class U> allocator11(const allocator11<U>&) { };
9631+
9632+ template<typename... Args>
9633+ void construct(T* p, Args&&... args)
9634+ {
9635+ ++count;
9636+ std::allocator<T>::construct(p, std::forward<Args>(args)...);
9637+ }
9638+ };
9639+
9640+int main()
9641+{
9642+ std::vector< int, allocator98<int> > v98(1);
9643+ VERIFY( count == 0 );
9644+
9645+ std::vector< int, allocator11<int> > v11(1);
9646+ VERIFY( count == 1 );
9647+}
2e34247b
AM
9648Index: configure.ac
9649===================================================================
a966c5b5
AM
9650--- configure.ac (.../tags/gcc_4_6_2_release) (wersja 182722)
9651+++ configure.ac (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
9652@@ -2428,10 +2428,6 @@
9653 extra_arflags_for_target=" -X32_64"
9654 extra_nmflags_for_target=" -B -X32_64"
9655 ;;
9656- *-*-darwin[[3-9]]*)
9657- # ranlib before Darwin10 requires the -c flag to look at common symbols.
9658- extra_ranlibflags_for_target=" -c"
9659- ;;
9660 mips*-*-pe | sh*-*-pe | *arm-wince-pe)
9661 target_makefile_frag="config/mt-wince"
9662 ;;
9663Index: libobjc/configure
6f35b5e4 9664===================================================================
a966c5b5
AM
9665--- libobjc/configure (.../tags/gcc_4_6_2_release) (wersja 182722)
9666+++ libobjc/configure (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
9667@@ -8797,7 +8797,7 @@
9668 ;;
9669
9670 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
9671- freebsd2*)
9672+ freebsd2.*)
9673 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
9674 hardcode_direct=yes
9675 hardcode_minus_L=yes
9676@@ -9713,7 +9713,7 @@
9677 objformat=`/usr/bin/objformat`
9678 else
9679 case $host_os in
9680- freebsd[123]*) objformat=aout ;;
9681+ freebsd[23].*) objformat=aout ;;
9682 *) objformat=elf ;;
9683 esac
9684 fi
9685@@ -9731,7 +9731,7 @@
9686 esac
9687 shlibpath_var=LD_LIBRARY_PATH
9688 case $host_os in
9689- freebsd2*)
9690+ freebsd2.*)
9691 shlibpath_overrides_runpath=yes
9692 ;;
9693 freebsd3.[01]* | freebsdelf3.[01]*)
9694Index: libobjc/ChangeLog
9695===================================================================
a966c5b5
AM
9696--- libobjc/ChangeLog (.../tags/gcc_4_6_2_release) (wersja 182722)
9697+++ libobjc/ChangeLog (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
9698@@ -1,3 +1,7 @@
9699+2011-11-20 Andreas Tobler <andreast@fgznet.ch>
9700+
9701+ * configure: Regenerate.
9702+
9703 2011-10-26 Release Manager
6f35b5e4 9704
2e34247b
AM
9705 * GCC 4.6.2 released.
9706Index: libgfortran/configure
6f35b5e4 9707===================================================================
a966c5b5
AM
9708--- libgfortran/configure (.../tags/gcc_4_6_2_release) (wersja 182722)
9709+++ libgfortran/configure (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
9710@@ -10326,7 +10326,7 @@
9711 ;;
9712
9713 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
9714- freebsd2*)
9715+ freebsd2.*)
9716 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
9717 hardcode_direct=yes
9718 hardcode_minus_L=yes
9719@@ -11242,7 +11242,7 @@
9720 objformat=`/usr/bin/objformat`
9721 else
9722 case $host_os in
9723- freebsd[123]*) objformat=aout ;;
9724+ freebsd[23].*) objformat=aout ;;
9725 *) objformat=elf ;;
9726 esac
9727 fi
9728@@ -11260,7 +11260,7 @@
9729 esac
9730 shlibpath_var=LD_LIBRARY_PATH
9731 case $host_os in
9732- freebsd2*)
9733+ freebsd2.*)
9734 shlibpath_overrides_runpath=yes
9735 ;;
9736 freebsd3.[01]* | freebsdelf3.[01]*)
9737@@ -14162,7 +14162,7 @@
9738 ;;
9739
9740 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
9741- freebsd2*)
9742+ freebsd2.*)
9743 archive_cmds_FC='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
9744 hardcode_direct_FC=yes
9745 hardcode_minus_L_FC=yes
9746@@ -14870,7 +14870,7 @@
9747 objformat=`/usr/bin/objformat`
9748 else
9749 case $host_os in
9750- freebsd[123]*) objformat=aout ;;
9751+ freebsd[23].*) objformat=aout ;;
9752 *) objformat=elf ;;
9753 esac
9754 fi
9755@@ -14888,7 +14888,7 @@
9756 esac
9757 shlibpath_var=LD_LIBRARY_PATH
9758 case $host_os in
9759- freebsd2*)
9760+ freebsd2.*)
9761 shlibpath_overrides_runpath=yes
9762 ;;
9763 freebsd3.[01]* | freebsdelf3.[01]*)
9764Index: libgfortran/ChangeLog
6f35b5e4 9765===================================================================
a966c5b5
AM
9766--- libgfortran/ChangeLog (.../tags/gcc_4_6_2_release) (wersja 182722)
9767+++ libgfortran/ChangeLog (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
9768@@ -1,3 +1,7 @@
9769+2011-11-20 Andreas Tobler <andreast@fgznet.ch>
9770+
9771+ * configure: Regenerate.
9772+
9773 2011-10-26 Release Manager
6f35b5e4 9774
2e34247b
AM
9775 * GCC 4.6.2 released.
9776Index: libada/Makefile.in
9777===================================================================
a966c5b5
AM
9778--- libada/Makefile.in (.../tags/gcc_4_6_2_release) (wersja 182722)
9779+++ libada/Makefile.in (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
9780@@ -70,6 +70,7 @@
9781 version := $(shell cat $(srcdir)/../gcc/BASE-VER)
9782 libsubdir := $(libdir)/gcc/$(target_noncanonical)/$(version)$(MULTISUBDIR)
9783 ADA_RTS_DIR=$(GCC_DIR)/ada/rts$(subst /,_,$(MULTISUBDIR))
9784+ADA_RTS_SUBDIR=./rts$(subst /,_,$(MULTISUBDIR))
9785
9786 # exeext should not be used because it's the *host* exeext. We're building
9787 # a *target* library, aren't we?!? Likewise for CC. Still, provide bogus
9788@@ -96,10 +97,10 @@
9789 "CFLAGS=$(CFLAGS) $(WARN_CFLAGS)"
9790
9791 # Rules to build gnatlib.
9792-.PHONY: gnatlib gnatlib-plain gnatlib-sjlj gnatlib-zcx gnatlib-shared oscons
9793+.PHONY: gnatlib gnatlib-plain gnatlib-sjlj gnatlib-zcx gnatlib-shared osconstool
9794 gnatlib: @default_gnatlib_target@
9795
9796-gnatlib-plain: oscons $(GCC_DIR)/ada/Makefile
9797+gnatlib-plain: osconstool $(GCC_DIR)/ada/Makefile
9798 test -f stamp-libada || \
9799 $(MAKE) -C $(GCC_DIR)/ada $(LIBADA_FLAGS_TO_PASS) gnatlib \
9800 && touch stamp-libada
9801@@ -108,7 +109,7 @@
9802 $(LN_S) $(ADA_RTS_DIR) adainclude
9803 $(LN_S) $(ADA_RTS_DIR) adalib
9804
9805-gnatlib-sjlj gnatlib-zcx gnatlib-shared: oscons $(GCC_DIR)/ada/Makefile
9806+gnatlib-sjlj gnatlib-zcx gnatlib-shared: osconstool $(GCC_DIR)/ada/Makefile
9807 test -f stamp-libada || \
9808 $(MAKE) -C $(GCC_DIR)/ada $(LIBADA_FLAGS_TO_PASS) $@ \
9809 && touch stamp-libada
9810@@ -117,8 +118,8 @@
9811 $(LN_S) $(ADA_RTS_DIR) adainclude
9812 $(LN_S) $(ADA_RTS_DIR) adalib
9813
9814-oscons:
9815- $(MAKE) -C $(GCC_DIR) $(LIBADA_FLAGS_TO_PASS) ada/s-oscons.ads
9816+osconstool:
9817+ $(MAKE) -C $(GCC_DIR)/ada $(LIBADA_FLAGS_TO_PASS) ./bldtools/oscons/xoscons
9818
9819 install-gnatlib: $(GCC_DIR)/ada/Makefile
9820 $(MAKE) -C $(GCC_DIR)/ada $(LIBADA_FLAGS_TO_PASS) install-gnatlib
9821Index: libada/ChangeLog
9822===================================================================
a966c5b5
AM
9823--- libada/ChangeLog (.../tags/gcc_4_6_2_release) (wersja 182722)
9824+++ libada/ChangeLog (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
9825@@ -1,3 +1,9 @@
9826+2011-11-13 Iain Sandoe <iains@gcc.gnu.org>
9827+
9828+ Backport from mainline r181319
9829+ Makefile.in: Change dependency on oscons to depend on the generator
9830+ tool.
9831+
9832 2011-10-26 Release Manager
6f35b5e4 9833
2e34247b
AM
9834 * GCC 4.6.2 released.
9835Index: libmudflap/configure
9836===================================================================
a966c5b5
AM
9837--- libmudflap/configure (.../tags/gcc_4_6_2_release) (wersja 182722)
9838+++ libmudflap/configure (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
9839@@ -8818,7 +8818,7 @@
9840 ;;
9841
9842 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
9843- freebsd2*)
9844+ freebsd2.*)
9845 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
9846 hardcode_direct=yes
9847 hardcode_minus_L=yes
9848@@ -9731,7 +9731,7 @@
9849 objformat=`/usr/bin/objformat`
9850 else
9851 case $host_os in
9852- freebsd[123]*) objformat=aout ;;
9853+ freebsd[23].*) objformat=aout ;;
9854 *) objformat=elf ;;
9855 esac
9856 fi
9857@@ -9749,7 +9749,7 @@
9858 esac
9859 shlibpath_var=LD_LIBRARY_PATH
9860 case $host_os in
9861- freebsd2*)
9862+ freebsd2.*)
9863 shlibpath_overrides_runpath=yes
9864 ;;
9865 freebsd3.[01]* | freebsdelf3.[01]*)
9866Index: libmudflap/ChangeLog
9867===================================================================
a966c5b5
AM
9868--- libmudflap/ChangeLog (.../tags/gcc_4_6_2_release) (wersja 182722)
9869+++ libmudflap/ChangeLog (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
9870@@ -1,3 +1,7 @@
9871+2011-11-20 Andreas Tobler <andreast@fgznet.ch>
9872+
9873+ * configure: Regenerate.
9874+
9875 2011-10-26 Release Manager
6f35b5e4 9876
2e34247b
AM
9877 * GCC 4.6.2 released.
9878Index: boehm-gc/ChangeLog
9879===================================================================
a966c5b5
AM
9880--- boehm-gc/ChangeLog (.../tags/gcc_4_6_2_release) (wersja 182722)
9881+++ boehm-gc/ChangeLog (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
9882@@ -1,3 +1,7 @@
9883+2011-11-20 Andreas Tobler <andreast@fgznet.ch>
9884+
9885+ * configure: Regenerate.
9886+
9887 2011-10-26 Release Manager
6f35b5e4 9888
2e34247b
AM
9889 * GCC 4.6.2 released.
9890Index: boehm-gc/configure
6f35b5e4 9891===================================================================
a966c5b5
AM
9892--- boehm-gc/configure (.../tags/gcc_4_6_2_release) (wersja 182722)
9893+++ boehm-gc/configure (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
9894@@ -9604,7 +9604,7 @@
9895 ;;
9896
9897 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
9898- freebsd2*)
9899+ freebsd2.*)
9900 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
9901 hardcode_direct=yes
9902 hardcode_minus_L=yes
9903@@ -10520,7 +10520,7 @@
9904 objformat=`/usr/bin/objformat`
9905 else
9906 case $host_os in
9907- freebsd[123]*) objformat=aout ;;
9908+ freebsd[23].*) objformat=aout ;;
9909 *) objformat=elf ;;
9910 esac
9911 fi
9912@@ -10538,7 +10538,7 @@
9913 esac
9914 shlibpath_var=LD_LIBRARY_PATH
9915 case $host_os in
9916- freebsd2*)
9917+ freebsd2.*)
9918 shlibpath_overrides_runpath=yes
9919 ;;
9920 freebsd3.[01]* | freebsdelf3.[01]*)
9921@@ -12428,7 +12428,7 @@
9922 esac
9923 ;;
9924
9925- freebsd[12]*)
9926+ freebsd2.*)
9927 # C++ shared libraries reported to be fairly broken before
9928 # switch to ELF
9929 ld_shlibs_CXX=no
9930@@ -14203,7 +14203,7 @@
9931 objformat=`/usr/bin/objformat`
9932 else
9933 case $host_os in
9934- freebsd[123]*) objformat=aout ;;
9935+ freebsd[23].*) objformat=aout ;;
9936 *) objformat=elf ;;
9937 esac
9938 fi
9939@@ -14221,7 +14221,7 @@
9940 esac
9941 shlibpath_var=LD_LIBRARY_PATH
9942 case $host_os in
9943- freebsd2*)
9944+ freebsd2.*)
9945 shlibpath_overrides_runpath=yes
9946 ;;
9947 freebsd3.[01]* | freebsdelf3.[01]*)
9948Index: libiberty/ChangeLog
6f35b5e4 9949===================================================================
a966c5b5
AM
9950--- libiberty/ChangeLog (.../tags/gcc_4_6_2_release) (wersja 182722)
9951+++ libiberty/ChangeLog (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
9952@@ -1,3 +1,17 @@
9953+2011-11-13 Iain Sandoe <iains@gcc.gnu.org>
9954+
9955+ PR target/48108
9956+ Backport from mainline r180523
9957+ * simple-object-mach-o.c (GNU_WRAPPER_SECTS, GNU_WRAPPER_INDEX,
9958+ GNU_WRAPPER_NAMES): New macros.
9959+ (simple_object_mach_o_segment): Handle wrapper scheme.
9960+ (simple_object_mach_o_write_section_header): Allow the segment name
9961+ to be supplied.
9962+ (simple_object_mach_o_write_segment): Handle wrapper scheme. Ensure
9963+ that the top-level segment name in the load command is empty.
9964+ (simple_object_mach_o_write_to_file): Determine the number of
9965+ sections during segment output, use that in writing the header.
9966+
9967 2011-10-26 Release Manager
6f35b5e4 9968
2e34247b
AM
9969 * GCC 4.6.2 released.
9970Index: libiberty/simple-object-mach-o.c
9971===================================================================
a966c5b5
AM
9972--- libiberty/simple-object-mach-o.c (.../tags/gcc_4_6_2_release) (wersja 182722)
9973+++ libiberty/simple-object-mach-o.c (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
9974@@ -1,5 +1,5 @@
9975 /* simple-object-mach-o.c -- routines to manipulate Mach-O object files.
9976- Copyright 2010 Free Software Foundation, Inc.
9977+ Copyright 2010, 2011 Free Software Foundation, Inc.
9978 Written by Ian Lance Taylor, Google.
9979
9980 This program is free software; you can redistribute it and/or modify it
9981@@ -174,6 +174,15 @@
9982
9983 #define GNU_SECTION_NAMES "__section_names"
9984
9985+/* A GNU-specific extension to wrap multiple sections using three
9986+ mach-o sections within a given segment. The section '__wrapper_sects'
9987+ is subdivided according to the index '__wrapper_index' and each sub
9988+ sect is named according to the names supplied in '__wrapper_names'. */
9989+
9990+#define GNU_WRAPPER_SECTS "__wrapper_sects"
9991+#define GNU_WRAPPER_INDEX "__wrapper_index"
9992+#define GNU_WRAPPER_NAMES "__wrapper_names"
9993+
9994 /* Private data for an simple_object_read. */
6f35b5e4 9995
2e34247b
AM
9996 struct simple_object_mach_o_read
9997@@ -214,8 +223,19 @@
9998 unsigned int reserved;
9999 };
6f35b5e4 10000
2e34247b
AM
10001-/* See if we have a Mach-O file. */
10002+/* See if we have a Mach-O MH_OBJECT file:
6f35b5e4 10003
2e34247b
AM
10004+ A standard MH_OBJECT (from as) will have three load commands:
10005+ 0 - LC_SEGMENT/LC_SEGMENT64
10006+ 1 - LC_SYMTAB
10007+ 2 - LC_DYSYMTAB
10008+
10009+ The LC_SEGMENT/LC_SEGMENT64 will introduce a single anonymous segment
10010+ containing all the sections.
10011+
10012+ Files written by simple-object will have only the segment command
10013+ (no symbol tables). */
10014+
10015 static void *
10016 simple_object_mach_o_match (
10017 unsigned char header[SIMPLE_OBJECT_MATCH_HEADER_LEN],
10018@@ -356,9 +376,30 @@
6f35b5e4 10019 }
2e34247b 10020 }
6f35b5e4 10021
2e34247b
AM
10022-/* Handle a segment in a Mach-O file. Return 1 if we should continue,
10023- 0 if the caller should return. */
10024+/* Handle a segment in a Mach-O Object file.
6f35b5e4 10025
2e34247b
AM
10026+ This will callback to the function pfn for each "section found" the meaning
10027+ of which depends on gnu extensions to mach-o:
10028+
10029+ If we find mach-o sections (with the segment name as specified) which also
10030+ contain: a 'sects' wrapper, an index, and a name table, we expand this into
10031+ as many sections as are specified in the index. In this case, there will
10032+ be a callback for each of these.
10033+
10034+ We will also allow an extension that permits long names (more than 16
10035+ characters) to be used with mach-o. In this case, the section name has
10036+ a specific format embedding an index into a name table, and the file must
10037+ contain such name table.
10038+
10039+ Return 1 if we should continue, 0 if the caller should return. */
10040+
10041+#define SOMO_SECTS_PRESENT 0x01
10042+#define SOMO_INDEX_PRESENT 0x02
10043+#define SOMO_NAMES_PRESENT 0x04
10044+#define SOMO_LONGN_PRESENT 0x08
10045+#define SOMO_WRAPPING (SOMO_SECTS_PRESENT | SOMO_INDEX_PRESENT \
10046+ | SOMO_NAMES_PRESENT)
10047+
10048 static int
10049 simple_object_mach_o_segment (simple_object_read *sobj, off_t offset,
10050 const unsigned char *segbuf,
10051@@ -378,9 +419,20 @@
10052 unsigned int nsects;
10053 unsigned char *secdata;
10054 unsigned int i;
10055+ unsigned int gnu_sections_found;
10056 unsigned int strtab_index;
10057+ unsigned int index_index;
10058+ unsigned int nametab_index;
10059+ unsigned int sections_index;
10060 char *strtab;
10061+ char *nametab;
10062+ unsigned char *index;
10063 size_t strtab_size;
10064+ size_t nametab_size;
10065+ size_t index_size;
10066+ unsigned int n_wrapped_sects;
10067+ size_t wrapper_sect_size;
10068+ off_t wrapper_sect_offset;
10069
10070 fetch_32 = (omr->is_big_endian
10071 ? simple_object_fetch_big_32
10072@@ -409,6 +461,8 @@
10073 nsects));
6f35b5e4 10074 }
2e34247b
AM
10075
10076+ /* Fetch the section headers from the segment command. */
10077+
10078 secdata = XNEWVEC (unsigned char, nsects * sechdrsize);
10079 if (!simple_object_internal_read (sobj->descriptor, offset + seghdrsize,
10080 secdata, nsects * sechdrsize, errmsg, err))
10081@@ -417,9 +471,13 @@
10082 return 0;
10083 }
10084
10085- /* Scan for a __section_names section. This is in effect a GNU
10086- extension that permits section names longer than 16 chars. */
10087+ /* Scan for special sections that signal GNU extensions to the format. */
10088
10089+ gnu_sections_found = 0;
10090+ index_index = nsects;
10091+ sections_index = nsects;
10092+ strtab_index = nsects;
10093+ nametab_index = nsects;
10094 for (i = 0; i < nsects; ++i)
6f35b5e4 10095 {
2e34247b
AM
10096 size_t nameoff;
10097@@ -427,19 +485,104 @@
10098 nameoff = i * sechdrsize + segname_offset;
10099 if (strcmp ((char *) secdata + nameoff, omr->segment_name) != 0)
10100 continue;
10101+
10102 nameoff = i * sechdrsize + sectname_offset;
10103- if (strcmp ((char *) secdata + nameoff, GNU_SECTION_NAMES) == 0)
10104- break;
10105+ if (strcmp ((char *) secdata + nameoff, GNU_WRAPPER_NAMES) == 0)
10106+ {
10107+ nametab_index = i;
10108+ gnu_sections_found |= SOMO_NAMES_PRESENT;
10109+ }
10110+ else if (strcmp ((char *) secdata + nameoff, GNU_WRAPPER_INDEX) == 0)
10111+ {
10112+ index_index = i;
10113+ gnu_sections_found |= SOMO_INDEX_PRESENT;
10114+ }
10115+ else if (strcmp ((char *) secdata + nameoff, GNU_WRAPPER_SECTS) == 0)
10116+ {
10117+ sections_index = i;
10118+ gnu_sections_found |= SOMO_SECTS_PRESENT;
10119+ }
10120+ else if (strcmp ((char *) secdata + nameoff, GNU_SECTION_NAMES) == 0)
10121+ {
10122+ strtab_index = i;
10123+ gnu_sections_found |= SOMO_LONGN_PRESENT;
10124+ }
10125 }
6f35b5e4 10126
2e34247b
AM
10127- strtab_index = i;
10128- if (strtab_index >= nsects)
10129+ /* If any of the special wrapper section components is present, then
10130+ they all should be. */
10131+
10132+ if ((gnu_sections_found & SOMO_WRAPPING) != 0)
10133 {
10134- strtab = NULL;
10135- strtab_size = 0;
10136+ off_t nametab_offset;
10137+ off_t index_offset;
10138+
10139+ if ((gnu_sections_found & SOMO_WRAPPING) != SOMO_WRAPPING)
10140+ {
10141+ *errmsg = "GNU Mach-o section wrapper: required section missing";
10142+ *err = 0; /* No useful errno. */
10143+ XDELETEVEC (secdata);
10144+ return 0;
10145+ }
10146+
10147+ /* Fetch the name table. */
10148+
10149+ simple_object_mach_o_section_info (omr->is_big_endian, is_32,
10150+ secdata + nametab_index * sechdrsize,
10151+ &nametab_offset, &nametab_size);
10152+ nametab = XNEWVEC (char, nametab_size);
10153+ if (!simple_object_internal_read (sobj->descriptor,
10154+ sobj->offset + nametab_offset,
10155+ (unsigned char *) nametab, nametab_size,
10156+ errmsg, err))
10157+ {
10158+ XDELETEVEC (nametab);
10159+ XDELETEVEC (secdata);
10160+ return 0;
10161+ }
10162+
10163+ /* Fetch the index. */
10164+
10165+ simple_object_mach_o_section_info (omr->is_big_endian, is_32,
10166+ secdata + index_index * sechdrsize,
10167+ &index_offset, &index_size);
10168+ index = XNEWVEC (unsigned char, index_size);
10169+ if (!simple_object_internal_read (sobj->descriptor,
10170+ sobj->offset + index_offset,
10171+ index, index_size,
10172+ errmsg, err))
10173+ {
10174+ XDELETEVEC (index);
10175+ XDELETEVEC (nametab);
10176+ XDELETEVEC (secdata);
10177+ return 0;
10178+ }
10179+
10180+ /* The index contains 4 unsigned ints per sub-section:
10181+ sub-section offset/length, sub-section name/length.
10182+ We fix this for both 32 and 64 bit mach-o for now, since
10183+ other fields limit the maximum size of an object to 4G. */
10184+ n_wrapped_sects = index_size / 16;
10185+
10186+ /* Get the parameters for the wrapper too. */
10187+ simple_object_mach_o_section_info (omr->is_big_endian, is_32,
10188+ secdata + sections_index * sechdrsize,
10189+ &wrapper_sect_offset,
10190+ &wrapper_sect_size);
6f35b5e4
AM
10191 }
10192 else
10193 {
2e34247b
AM
10194+ index = NULL;
10195+ index_size = 0;
10196+ nametab = NULL;
10197+ nametab_size = 0;
10198+ n_wrapped_sects = 0;
10199+ }
10200+
10201+ /* If we have a long names section, fetch it. */
10202+
10203+ if ((gnu_sections_found & SOMO_LONGN_PRESENT) != 0)
10204+ {
10205 off_t strtab_offset;
6f35b5e4 10206
2e34247b
AM
10207 simple_object_mach_o_section_info (omr->is_big_endian, is_32,
10208@@ -452,52 +595,120 @@
10209 errmsg, err))
10210 {
10211 XDELETEVEC (strtab);
10212+ XDELETEVEC (index);
10213+ XDELETEVEC (nametab);
10214 XDELETEVEC (secdata);
10215 return 0;
10216 }
6f35b5e4 10217 }
2e34247b
AM
10218+ else
10219+ {
10220+ strtab = NULL;
10221+ strtab_size = 0;
10222+ strtab_index = nsects;
10223+ }
10224
10225 /* Process the sections. */
10226
10227 for (i = 0; i < nsects; ++i)
6f35b5e4 10228 {
2e34247b
AM
10229 const unsigned char *sechdr;
10230- char namebuf[MACH_O_NAME_LEN + 1];
10231+ char namebuf[MACH_O_NAME_LEN * 2 + 2];
10232 char *name;
10233 off_t secoffset;
10234 size_t secsize;
10235+ int l;
10236
10237- if (i == strtab_index)
10238+ sechdr = secdata + i * sechdrsize;
10239+
10240+ /* We've already processed the long section names. */
10241+
10242+ if ((gnu_sections_found & SOMO_LONGN_PRESENT) != 0
10243+ && i == strtab_index)
10244 continue;
6f35b5e4 10245
2e34247b
AM
10246- sechdr = secdata + i * sechdrsize;
10247+ /* We only act on the segment named. */
10248
10249 if (strcmp ((char *) sechdr + segname_offset, omr->segment_name) != 0)
10250 continue;
10251
10252- memcpy (namebuf, sechdr + sectname_offset, MACH_O_NAME_LEN);
10253- namebuf[MACH_O_NAME_LEN] = '\0';
10254+ /* Process sections associated with the wrapper. */
10255
10256- name = &namebuf[0];
10257- if (strtab != NULL && name[0] == '_' && name[1] == '_')
10258+ if ((gnu_sections_found & SOMO_WRAPPING) != 0)
10259 {
10260- unsigned long stringoffset;
10261+ if (i == nametab_index || i == index_index)
10262+ continue;
10263
10264- if (sscanf (name + 2, "%08lX", &stringoffset) == 1)
10265+ if (i == sections_index)
10266 {
10267- if (stringoffset >= strtab_size)
10268+ unsigned int j;
10269+ for (j = 0; j < n_wrapped_sects; ++j)
10270 {
10271- *errmsg = "section name offset out of range";
10272- *err = 0;
10273- XDELETEVEC (strtab);
10274- XDELETEVEC (secdata);
10275- return 0;
10276+ unsigned int subsect_offset, subsect_length, name_offset;
10277+ subsect_offset = (*fetch_32) (index + 16 * j);
10278+ subsect_length = (*fetch_32) (index + 16 * j + 4);
10279+ name_offset = (*fetch_32) (index + 16 * j + 8);
10280+ /* We don't need the name_length yet. */
10281+
10282+ secoffset = wrapper_sect_offset + subsect_offset;
10283+ secsize = subsect_length;
10284+ name = nametab + name_offset;
10285+
10286+ if (!(*pfn) (data, name, secoffset, secsize))
10287+ {
10288+ *errmsg = NULL;
10289+ *err = 0;
10290+ XDELETEVEC (index);
10291+ XDELETEVEC (nametab);
10292+ XDELETEVEC (strtab);
10293+ XDELETEVEC (secdata);
10294+ return 0;
10295+ }
10296 }
10297-
10298- name = strtab + stringoffset;
10299+ continue;
10300 }
10301 }
10302
10303+ if ((gnu_sections_found & SOMO_LONGN_PRESENT) != 0)
10304+ {
10305+ memcpy (namebuf, sechdr + sectname_offset, MACH_O_NAME_LEN);
10306+ namebuf[MACH_O_NAME_LEN] = '\0';
10307+
10308+ name = &namebuf[0];
10309+ if (strtab != NULL && name[0] == '_' && name[1] == '_')
10310+ {
10311+ unsigned long stringoffset;
10312+
10313+ if (sscanf (name + 2, "%08lX", &stringoffset) == 1)
10314+ {
10315+ if (stringoffset >= strtab_size)
10316+ {
10317+ *errmsg = "section name offset out of range";
10318+ *err = 0;
10319+ XDELETEVEC (index);
10320+ XDELETEVEC (nametab);
10321+ XDELETEVEC (strtab);
10322+ XDELETEVEC (secdata);
10323+ return 0;
10324+ }
10325+
10326+ name = strtab + stringoffset;
10327+ }
10328+ }
10329+ }
10330+ else
10331+ {
10332+ /* Otherwise, make a name like __segment,__section as per the
10333+ convention in mach-o asm. */
10334+ name = &namebuf[0];
10335+ memset (namebuf, 0, MACH_O_NAME_LEN * 2 + 2);
10336+ memcpy (namebuf, (char *) sechdr + segname_offset, MACH_O_NAME_LEN);
10337+ l = strlen (namebuf);
10338+ namebuf[l] = ',';
10339+ memcpy (namebuf + l + 1, (char *) sechdr + sectname_offset,
10340+ MACH_O_NAME_LEN);
10341+ }
10342+
10343 simple_object_mach_o_section_info (omr->is_big_endian, is_32, sechdr,
10344 &secoffset, &secsize);
10345
10346@@ -505,12 +716,16 @@
10347 {
10348 *errmsg = NULL;
10349 *err = 0;
10350+ XDELETEVEC (index);
10351+ XDELETEVEC (nametab);
10352 XDELETEVEC (strtab);
10353 XDELETEVEC (secdata);
10354 return 0;
10355 }
10356 }
10357
10358+ XDELETEVEC (index);
10359+ XDELETEVEC (nametab);
10360 XDELETEVEC (strtab);
10361 XDELETEVEC (secdata);
10362
10363@@ -724,9 +939,9 @@
10364 simple_object_mach_o_write_section_header (simple_object_write *sobj,
10365 int descriptor,
10366 size_t sechdr_offset,
10367- const char *name, size_t secaddr,
10368- size_t secsize, size_t offset,
10369- unsigned int align,
10370+ const char *name, const char *segn,
10371+ size_t secaddr, size_t secsize,
10372+ size_t offset, unsigned int align,
10373 const char **errmsg, int *err)
6f35b5e4 10374 {
2e34247b
AM
10375 struct simple_object_mach_o_attributes *attrs =
10376@@ -748,7 +963,7 @@
10377 strncpy ((char *) hdr + offsetof (struct mach_o_section_32, sectname),
10378 name, MACH_O_NAME_LEN);
10379 strncpy ((char *) hdr + offsetof (struct mach_o_section_32, segname),
10380- sobj->segment_name, MACH_O_NAME_LEN);
10381+ segn, MACH_O_NAME_LEN);
10382 set_32 (hdr + offsetof (struct mach_o_section_32, addr), secaddr);
10383 set_32 (hdr + offsetof (struct mach_o_section_32, size), secsize);
10384 set_32 (hdr + offsetof (struct mach_o_section_32, offset), offset);
10385@@ -773,7 +988,7 @@
10386 strncpy ((char *) hdr + offsetof (struct mach_o_section_64, sectname),
10387 name, MACH_O_NAME_LEN);
10388 strncpy ((char *) hdr + offsetof (struct mach_o_section_64, segname),
10389- sobj->segment_name, MACH_O_NAME_LEN);
10390+ segn, MACH_O_NAME_LEN);
10391 set_64 (hdr + offsetof (struct mach_o_section_64, addr), secaddr);
10392 set_64 (hdr + offsetof (struct mach_o_section_64, size), secsize);
10393 set_32 (hdr + offsetof (struct mach_o_section_64, offset), offset);
10394@@ -793,11 +1008,25 @@
10395 sechdrsize, errmsg, err);
10396 }
10397
10398-/* Write out the single segment and the sections of a Mach-O file. */
10399+/* Write out the single (anonymous) segment containing the sections of a Mach-O
10400+ Object file.
10401
10402+ As a GNU extension to mach-o, when the caller specifies a segment name in
10403+ sobj->segment_name, all the sections passed will be output under a single
10404+ mach-o section header. The caller's sections are indexed within this
10405+ 'wrapper' section by a table stored in a second mach-o section. Finally,
10406+ arbitrary length section names are permitted by the extension and these are
10407+ stored in a table in a third mach-o section.
6f35b5e4 10408+
2e34247b
AM
10409+ Note that this is only likely to make any sense for the __GNU_LTO segment
10410+ at present.
10411+
10412+ If the wrapper extension is not in force, we assume that the section name
10413+ is in the form __SEGMENT_NAME,__section_name as per Mach-O asm. */
10414+
10415 static int
10416 simple_object_mach_o_write_segment (simple_object_write *sobj, int descriptor,
10417- size_t nsects, const char **errmsg,
10418+ size_t *nsects, const char **errmsg,
10419 int *err)
10420 {
10421 struct simple_object_mach_o_attributes *attrs =
10422@@ -814,6 +1043,10 @@
10423 simple_object_write_section *section;
10424 unsigned char hdrbuf[sizeof (struct mach_o_segment_command_64)];
10425 unsigned char *hdr;
10426+ size_t nsects_in;
10427+ unsigned int *index;
10428+ char *snames;
10429+ unsigned int sect;
10430
10431 set_32 = (attrs->is_big_endian
10432 ? simple_object_set_big_32
10433@@ -834,19 +1067,62 @@
10434 sechdrsize = sizeof (struct mach_o_section_64);
10435 }
6f35b5e4 10436
2e34247b
AM
10437+ name_offset = 0;
10438+ *nsects = nsects_in = 0;
10439+
10440+ /* Count the number of sections we start with. */
10441+
10442+ for (section = sobj->sections; section != NULL; section = section->next)
10443+ nsects_in++;
10444+
10445+ if (sobj->segment_name != NULL)
10446+ {
10447+ /* We will only write 3 sections: wrapped data, index and names. */
10448+
10449+ *nsects = 3;
10450+
10451+ /* The index has four entries per wrapped section:
10452+ Section Offset, length, Name offset, length.
10453+ Where the offsets are based at the start of the wrapper and name
10454+ sections respectively.
10455+ The values are stored as 32 bit int for both 32 and 64 bit mach-o
10456+ since the size of a mach-o MH_OBJECT cannot exceed 4G owing to
10457+ other constraints. */
10458+
10459+ index = XNEWVEC (unsigned int, nsects_in * 4);
6f35b5e4 10460+
2e34247b
AM
10461+ /* We now need to figure out the size of the names section. This just
10462+ stores the names as null-terminated c strings, packed without any
10463+ alignment padding. */
10464+
10465+ for (section = sobj->sections, sect = 0; section != NULL;
10466+ section = section->next, sect++)
10467+ {
10468+ index[sect*4+2] = name_offset;
10469+ index[sect*4+3] = strlen (section->name) + 1;
10470+ name_offset += strlen (section->name) + 1;
10471+ }
10472+ snames = XNEWVEC (char, name_offset);
10473+ }
10474+ else
10475+ {
10476+ *nsects = nsects_in;
10477+ index = NULL;
10478+ snames = NULL;
10479+ }
10480+
10481 sechdr_offset = hdrsize + seghdrsize;
10482- cmdsize = seghdrsize + nsects * sechdrsize;
10483+ cmdsize = seghdrsize + *nsects * sechdrsize;
10484 offset = hdrsize + cmdsize;
10485- name_offset = 0;
10486 secaddr = 0;
10487
10488- for (section = sobj->sections; section != NULL; section = section->next)
10489+ for (section = sobj->sections, sect = 0;
10490+ section != NULL; section = section->next, sect++)
10491 {
10492 size_t mask;
10493 size_t new_offset;
10494 size_t secsize;
10495 struct simple_object_write_section_buffer *buffer;
10496- char namebuf[MACH_O_NAME_LEN + 1];
10497
10498 mask = (1U << section->align) - 1;
10499 new_offset = offset + mask;
10500@@ -877,39 +1153,126 @@
10501 secsize += buffer->size;
10502 }
6f35b5e4 10503
2e34247b
AM
10504- snprintf (namebuf, sizeof namebuf, "__%08X", name_offset);
10505+ if (sobj->segment_name != NULL)
10506+ {
10507+ index[sect*4+0] = (unsigned int) offset;
10508+ index[sect*4+1] = secsize;
10509+ /* Stash the section name in our table. */
10510+ memcpy (snames + index[sect * 4 + 2], section->name,
10511+ index[sect * 4 + 3]);
10512+ }
10513+ else
10514+ {
10515+ char namebuf[MACH_O_NAME_LEN + 1];
10516+ char segnbuf[MACH_O_NAME_LEN + 1];
10517+ char *comma;
10518+
10519+ /* Try to extract segment,section from the input name. */
10520+
10521+ memset (namebuf, 0, sizeof namebuf);
10522+ memset (segnbuf, 0, sizeof segnbuf);
10523+ comma = strchr (section->name, ',');
10524+ if (comma != NULL)
10525+ {
10526+ int len = comma - section->name;
10527+ len = len > MACH_O_NAME_LEN ? MACH_O_NAME_LEN : len;
10528+ strncpy (namebuf, section->name, len);
10529+ strncpy (segnbuf, comma + 1, MACH_O_NAME_LEN);
10530+ }
10531+ else /* just try to copy the name, leave segment blank. */
10532+ strncpy (namebuf, section->name, MACH_O_NAME_LEN);
10533+
10534+ if (!simple_object_mach_o_write_section_header (sobj, descriptor,
10535+ sechdr_offset,
10536+ namebuf, segnbuf,
10537+ secaddr, secsize,
10538+ offset,
10539+ section->align,
10540+ errmsg, err))
10541+ return 0;
10542+ sechdr_offset += sechdrsize;
10543+ }
10544+
10545+ offset += secsize;
10546+ secaddr += secsize;
10547+ }
10548+
10549+ if (sobj->segment_name != NULL)
10550+ {
10551+ size_t secsize;
10552+ unsigned int i;
10553+
10554+ /* Write the section header for the wrapper. */
10555+ /* Account for any initial aligment - which becomes the alignment for this
10556+ created section. */
10557+
10558+ secsize = (offset - index[0]);
10559 if (!simple_object_mach_o_write_section_header (sobj, descriptor,
10560- sechdr_offset, namebuf,
10561- secaddr, secsize, offset,
10562- section->align,
10563+ sechdr_offset,
10564+ GNU_WRAPPER_SECTS,
10565+ sobj->segment_name,
10566+ 0 /*secaddr*/,
10567+ secsize, index[0],
10568+ sobj->sections->align,
10569 errmsg, err))
10570 return 0;
10571
10572+ /* Subtract the wrapper section start from the begining of each sub
10573+ section. */
10574+
10575+ for (i = 1; i < nsects_in; ++i)
10576+ index[4 * i] -= index[0];
10577+ index[0] = 0;
10578+
10579 sechdr_offset += sechdrsize;
10580- offset += secsize;
10581- name_offset += strlen (section->name) + 1;
10582- secaddr += secsize;
10583- }
10584
10585- /* Write out the section names. */
10586+ /* Write out the section names.
10587+ ... the header ...
10588+ name_offset contains the length of the section. It is not aligned. */
10589
10590- if (!simple_object_mach_o_write_section_header (sobj, descriptor,
10591- sechdr_offset,
10592- GNU_SECTION_NAMES, secaddr,
10593- name_offset, offset, 0,
10594- errmsg, err))
10595- return 0;
10596+ if (!simple_object_mach_o_write_section_header (sobj, descriptor,
10597+ sechdr_offset,
10598+ GNU_WRAPPER_NAMES,
10599+ sobj->segment_name,
10600+ 0 /*secaddr*/,
10601+ name_offset,
10602+ offset,
10603+ 0, errmsg, err))
10604+ return 0;
10605
10606- for (section = sobj->sections; section != NULL; section = section->next)
10607- {
10608- size_t namelen;
10609+ /* ... and the content.. */
10610+ if (!simple_object_internal_write (descriptor, offset,
10611+ (const unsigned char *) snames,
10612+ name_offset, errmsg, err))
10613+ return 0;
10614
10615- namelen = strlen (section->name) + 1;
10616+ sechdr_offset += sechdrsize;
10617+ secaddr += name_offset;
10618+ offset += name_offset;
10619+
10620+ /* Now do the index, we'll align this to 4 bytes although the read code
10621+ will handle unaligned. */
10622+
10623+ offset += 3;
10624+ offset &= ~0x03;
10625+ if (!simple_object_mach_o_write_section_header (sobj, descriptor,
10626+ sechdr_offset,
10627+ GNU_WRAPPER_INDEX,
10628+ sobj->segment_name,
10629+ 0 /*secaddr*/,
10630+ nsects_in * 16,
10631+ offset,
10632+ 2, errmsg, err))
10633+ return 0;
10634+
10635+ /* ... and the content.. */
10636 if (!simple_object_internal_write (descriptor, offset,
10637- (const unsigned char *) section->name,
10638- namelen, errmsg, err))
10639+ (const unsigned char *) index,
10640+ nsects_in*16, errmsg, err))
10641 return 0;
10642- offset += namelen;
10643+
10644+ XDELETEVEC (index);
10645+ XDELETEVEC (snames);
10646 }
6f35b5e4 10647
2e34247b
AM
10648 /* Write out the segment header. */
10649@@ -923,9 +1286,8 @@
10650 MACH_O_LC_SEGMENT);
10651 set_32 (hdr + offsetof (struct mach_o_segment_command_32, cmdsize),
10652 cmdsize);
10653- strncpy (((char *) hdr
10654- + offsetof (struct mach_o_segment_command_32, segname)),
10655- sobj->segment_name, MACH_O_NAME_LEN);
10656+ /* MH_OBJECTS have a single, anonymous, segment - so the segment name
10657+ is left empty. */
10658 /* vmaddr left as zero. */
10659 /* vmsize left as zero. */
10660 set_32 (hdr + offsetof (struct mach_o_segment_command_32, fileoff),
10661@@ -935,7 +1297,7 @@
10662 /* maxprot left as zero. */
10663 /* initprot left as zero. */
10664 set_32 (hdr + offsetof (struct mach_o_segment_command_32, nsects),
10665- nsects);
10666+ *nsects);
10667 /* flags left as zero. */
10668 }
10669 else
10670@@ -951,9 +1313,8 @@
10671 MACH_O_LC_SEGMENT);
10672 set_32 (hdr + offsetof (struct mach_o_segment_command_64, cmdsize),
10673 cmdsize);
10674- strncpy (((char *) hdr
10675- + offsetof (struct mach_o_segment_command_64, segname)),
10676- sobj->segment_name, MACH_O_NAME_LEN);
10677+ /* MH_OBJECTS have a single, anonymous, segment - so the segment name
10678+ is left empty. */
10679 /* vmaddr left as zero. */
10680 /* vmsize left as zero. */
10681 set_64 (hdr + offsetof (struct mach_o_segment_command_64, fileoff),
10682@@ -963,7 +1324,7 @@
10683 /* maxprot left as zero. */
10684 /* initprot left as zero. */
10685 set_32 (hdr + offsetof (struct mach_o_segment_command_64, nsects),
10686- nsects);
10687+ *nsects);
10688 /* flags left as zero. */
10689 #endif
6f35b5e4 10690 }
2e34247b
AM
10691@@ -978,23 +1339,17 @@
10692 simple_object_mach_o_write_to_file (simple_object_write *sobj, int descriptor,
10693 int *err)
10694 {
10695- size_t nsects;
10696- simple_object_write_section *section;
10697+ size_t nsects = 0;
10698 const char *errmsg;
10699
10700- /* Start at 1 for symbol_names section. */
10701- nsects = 1;
10702- for (section = sobj->sections; section != NULL; section = section->next)
10703- ++nsects;
10704+ if (!simple_object_mach_o_write_segment (sobj, descriptor, &nsects,
10705+ &errmsg, err))
10706+ return errmsg;
10707
10708 if (!simple_object_mach_o_write_header (sobj, descriptor, nsects,
10709 &errmsg, err))
10710 return errmsg;
10711
10712- if (!simple_object_mach_o_write_segment (sobj, descriptor, nsects,
10713- &errmsg, err))
10714- return errmsg;
10715-
10716 return NULL;
10717 }
6f35b5e4 10718
2e34247b 10719Index: ChangeLog
6f35b5e4 10720===================================================================
a966c5b5
AM
10721--- ChangeLog (.../tags/gcc_4_6_2_release) (wersja 182722)
10722+++ ChangeLog (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
10723@@ -1,3 +1,17 @@
10724+2011-12-18 Eric Botcazou <ebotcazou@adacore.com>
10725+
10726+ * configure: Regenerate.
10727+
10728+2011-11-20 Andreas Tobler <andreast@fgznet.ch>
10729+
10730+ * libtool.m4: Additional FreeBSD 10 fixes.
10731+
10732+2011-11-18 Iain Sandoe <iains@gcc.gnu.org>
10733+
10734+ PR target/49992
10735+ * configure.ac: Remove ranlib special-casing for Darwin.
10736+ * configure: Regenerate.
10737+
10738 2011-10-26 Release Manager
6f35b5e4 10739
2e34247b
AM
10740 * GCC 4.6.2 released.
10741Index: lto-plugin/configure
6f35b5e4 10742===================================================================
a966c5b5
AM
10743--- lto-plugin/configure (.../tags/gcc_4_6_2_release) (wersja 182722)
10744+++ lto-plugin/configure (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
10745@@ -8733,7 +8733,7 @@
10746 ;;
10747
10748 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
10749- freebsd2*)
10750+ freebsd2.*)
10751 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
10752 hardcode_direct=yes
10753 hardcode_minus_L=yes
10754@@ -9646,7 +9646,7 @@
10755 objformat=`/usr/bin/objformat`
10756 else
10757 case $host_os in
10758- freebsd[123]*) objformat=aout ;;
10759+ freebsd[23].*) objformat=aout ;;
10760 *) objformat=elf ;;
10761 esac
10762 fi
10763@@ -9664,7 +9664,7 @@
10764 esac
10765 shlibpath_var=LD_LIBRARY_PATH
10766 case $host_os in
10767- freebsd2*)
10768+ freebsd2.*)
10769 shlibpath_overrides_runpath=yes
10770 ;;
10771 freebsd3.[01]* | freebsdelf3.[01]*)
10772Index: lto-plugin/ChangeLog
10773===================================================================
a966c5b5
AM
10774--- lto-plugin/ChangeLog (.../tags/gcc_4_6_2_release) (wersja 182722)
10775+++ lto-plugin/ChangeLog (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
10776@@ -1,3 +1,7 @@
10777+2011-11-20 Andreas Tobler <andreast@fgznet.ch>
6f35b5e4 10778+
2e34247b 10779+ * configure: Regenerate.
6f35b5e4 10780+
2e34247b
AM
10781 2011-10-26 Release Manager
10782
10783 * GCC 4.6.2 released.
10784Index: libffi/configure
10785===================================================================
a966c5b5
AM
10786--- libffi/configure (.../tags/gcc_4_6_2_release) (wersja 182722)
10787+++ libffi/configure (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
10788@@ -9001,7 +9001,7 @@
10789 ;;
10790
10791 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
10792- freebsd2*)
10793+ freebsd2.*)
10794 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
10795 hardcode_direct=yes
10796 hardcode_minus_L=yes
10797@@ -9914,7 +9914,7 @@
10798 objformat=`/usr/bin/objformat`
10799 else
10800 case $host_os in
10801- freebsd[123]*) objformat=aout ;;
10802+ freebsd[23].*) objformat=aout ;;
10803 *) objformat=elf ;;
10804 esac
10805 fi
10806@@ -9932,7 +9932,7 @@
10807 esac
10808 shlibpath_var=LD_LIBRARY_PATH
10809 case $host_os in
10810- freebsd2*)
10811+ freebsd2.*)
10812 shlibpath_overrides_runpath=yes
10813 ;;
10814 freebsd3.[01]* | freebsdelf3.[01]*)
10815Index: libffi/ChangeLog
10816===================================================================
a966c5b5
AM
10817--- libffi/ChangeLog (.../tags/gcc_4_6_2_release) (wersja 182722)
10818+++ libffi/ChangeLog (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
10819@@ -1,3 +1,7 @@
10820+2011-11-20 Andreas Tobler <andreast@fgznet.ch>
6f35b5e4 10821+
2e34247b 10822+ * configure: Regenerate.
6f35b5e4
AM
10823+
10824 2011-10-26 Release Manager
10825
10826 * GCC 4.6.2 released.
2e34247b 10827Index: libssp/configure
6f35b5e4 10828===================================================================
a966c5b5
AM
10829--- libssp/configure (.../tags/gcc_4_6_2_release) (wersja 182722)
10830+++ libssp/configure (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
10831@@ -8864,7 +8864,7 @@
10832 ;;
10833
10834 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
10835- freebsd2*)
10836+ freebsd2.*)
10837 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
10838 hardcode_direct=yes
10839 hardcode_minus_L=yes
10840@@ -9780,7 +9780,7 @@
10841 objformat=`/usr/bin/objformat`
10842 else
10843 case $host_os in
10844- freebsd[123]*) objformat=aout ;;
10845+ freebsd[23].*) objformat=aout ;;
10846 *) objformat=elf ;;
10847 esac
10848 fi
10849@@ -9798,7 +9798,7 @@
10850 esac
10851 shlibpath_var=LD_LIBRARY_PATH
10852 case $host_os in
10853- freebsd2*)
10854+ freebsd2.*)
10855 shlibpath_overrides_runpath=yes
10856 ;;
10857 freebsd3.[01]* | freebsdelf3.[01]*)
10858Index: libssp/ChangeLog
10859===================================================================
a966c5b5
AM
10860--- libssp/ChangeLog (.../tags/gcc_4_6_2_release) (wersja 182722)
10861+++ libssp/ChangeLog (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
10862@@ -1,3 +1,7 @@
10863+2011-11-20 Andreas Tobler <andreast@fgznet.ch>
6f35b5e4 10864+
2e34247b 10865+ * configure: Regenerate.
6f35b5e4 10866+
2e34247b
AM
10867 2011-10-26 Release Manager
10868
10869 * GCC 4.6.2 released.
10870Index: config/ChangeLog
10871===================================================================
a966c5b5
AM
10872--- config/ChangeLog (.../tags/gcc_4_6_2_release) (wersja 182722)
10873+++ config/ChangeLog (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
10874@@ -1,3 +1,7 @@
10875+2011-12-18 Eric Botcazou <ebotcazou@adacore.com>
6f35b5e4 10876+
2e34247b 10877+ * acx.m4 (Test for GNAT): Update comment and add quotes in final test.
6f35b5e4 10878+
2e34247b
AM
10879 2011-10-26 Release Manager
10880
10881 * GCC 4.6.2 released.
10882Index: config/acx.m4
10883===================================================================
a966c5b5
AM
10884--- config/acx.m4 (.../tags/gcc_4_6_2_release) (wersja 182722)
10885+++ config/acx.m4 (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
10886@@ -356,9 +356,9 @@
10887 ac_c_preproc_warn_flag=yes])# AC_PROG_CPP_WERROR
10888
10889 # Test for GNAT.
10890-# We require the gnatbind program, and a compiler driver that
10891-# understands Ada. We use the user's CC setting, already found,
10892-# and possibly add $1 to the command-line parameters.
10893+# We require the gnatbind & gnatmake programs, as well as a compiler driver
10894+# that understands Ada. We use the user's CC setting, already found, and
10895+# possibly add $1 to the command-line parameters.
10896 #
10897 # Sets the shell variable have_gnat to yes or no as appropriate, and
10898 # substitutes GNATBIND and GNATMAKE.
10899@@ -387,7 +387,7 @@
10900 fi
10901 rm -f conftest.*])
10902
10903-if test x$GNATBIND != xno && test x$GNATMAKE != xno && test x$acx_cv_cc_gcc_supports_ada != xno; then
10904+if test "x$GNATBIND" != xno && test "x$GNATMAKE" != xno && test x$acx_cv_cc_gcc_supports_ada != xno; then
10905 have_gnat=yes
10906 else
10907 have_gnat=no
10908Index: libjava/libltdl/configure
10909===================================================================
a966c5b5
AM
10910--- libjava/libltdl/configure (.../tags/gcc_4_6_2_release) (wersja 182722)
10911+++ libjava/libltdl/configure (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
10912@@ -7355,7 +7355,7 @@
10913 ;;
10914
10915 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
10916- freebsd2*)
10917+ freebsd2.*)
10918 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
10919 hardcode_direct=yes
10920 hardcode_minus_L=yes
10921@@ -7968,7 +7968,7 @@
10922 esac
10923 shlibpath_var=LD_LIBRARY_PATH
10924 case $host_os in
10925- freebsd2*)
10926+ freebsd2.*)
10927 shlibpath_overrides_runpath=yes
10928 ;;
10929 freebsd3.[01]* | freebsdelf3.[01]*)
10930Index: libjava/libltdl/ChangeLog
10931===================================================================
a966c5b5
AM
10932--- libjava/libltdl/ChangeLog (.../tags/gcc_4_6_2_release) (wersja 182722)
10933+++ libjava/libltdl/ChangeLog (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
10934@@ -1,3 +1,8 @@
10935+2011-11-20 Andreas Tobler <andreast@fgznet.ch>
6f35b5e4 10936+
2e34247b
AM
10937+ * acinclude.m4: Additional FreeBSD 10 fixes.
10938+ * configure: Regenerate.
6f35b5e4 10939+
2e34247b
AM
10940 2011-10-26 Release Manager
10941
10942 * GCC 4.6.2 released.
10943Index: libjava/libltdl/acinclude.m4
10944===================================================================
a966c5b5
AM
10945--- libjava/libltdl/acinclude.m4 (.../tags/gcc_4_6_2_release) (wersja 182722)
10946+++ libjava/libltdl/acinclude.m4 (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
10947@@ -1377,7 +1377,7 @@
10948 esac
10949 shlibpath_var=LD_LIBRARY_PATH
10950 case $host_os in
10951- freebsd2*)
10952+ freebsd2.*)
10953 shlibpath_overrides_runpath=yes
10954 ;;
10955 freebsd3.[[01]]* | freebsdelf3.[[01]]*)
10956@@ -3035,7 +3035,7 @@
10957 ;;
10958 esac
10959 ;;
10960- freebsd[[12]]*)
10961+ freebsd2.*)
10962 # C++ shared libraries reported to be fairly broken before switch to ELF
10963 _LT_AC_TAGVAR(ld_shlibs, $1)=no
10964 ;;
10965@@ -5669,7 +5669,7 @@
10966 ;;
10967
10968 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
10969- freebsd2*)
10970+ freebsd2.*)
10971 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
10972 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
10973 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
10974Index: libjava/configure.ac
10975===================================================================
a966c5b5
AM
10976--- libjava/configure.ac (.../tags/gcc_4_6_2_release) (wersja 182722)
10977+++ libjava/configure.ac (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
10978@@ -1060,7 +1060,7 @@
10979 *-*-cygwin*)
10980 # Don't set THREADLIBS here. Cygwin doesn't have -lpthread.
10981 ;;
10982- *-*-freebsd[[1234]]*)
10983+ *-*-freebsd[[34]].*)
10984 # Before FreeBSD 5, it didn't have -lpthread (or any library which
10985 # merely adds pthread_* functions) but it does have a -pthread switch
10986 # which is required at link-time to select -lc_r *instead* of -lc.
10987Index: libjava/classpath/config.rpath
10988===================================================================
a966c5b5
AM
10989--- libjava/classpath/config.rpath (.../tags/gcc_4_6_2_release) (wersja 182722)
10990+++ libjava/classpath/config.rpath (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
10991@@ -361,7 +361,7 @@
10992 hardcode_libdir_flag_spec='-R$libdir'
10993 hardcode_direct=yes
10994 ;;
10995- freebsd2*)
10996+ freebsd2.*)
10997 hardcode_direct=yes
10998 hardcode_minus_L=yes
10999 ;;
11000@@ -533,7 +533,7 @@
11001 ;;
11002 freebsd* | dragonfly*)
11003 case "$host_os" in
11004- freebsd[123]*)
11005+ freebsd[23].*)
11006 library_names_spec='$libname$shrext$versuffix' ;;
11007 *)
11008 library_names_spec='$libname$shrext' ;;
11009Index: libjava/classpath/configure
11010===================================================================
a966c5b5
AM
11011--- libjava/classpath/configure (.../tags/gcc_4_6_2_release) (wersja 182722)
11012+++ libjava/classpath/configure (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
11013@@ -10025,7 +10025,7 @@
11014 ;;
11015
11016 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
11017- freebsd2*)
11018+ freebsd2.*)
11019 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
11020 hardcode_direct=yes
11021 hardcode_minus_L=yes
11022@@ -10941,7 +10941,7 @@
11023 objformat=`/usr/bin/objformat`
11024 else
11025 case $host_os in
11026- freebsd[123]*) objformat=aout ;;
11027+ freebsd[23].*) objformat=aout ;;
11028 *) objformat=elf ;;
11029 esac
11030 fi
11031@@ -10959,7 +10959,7 @@
11032 esac
11033 shlibpath_var=LD_LIBRARY_PATH
11034 case $host_os in
11035- freebsd2*)
11036+ freebsd2.*)
11037 shlibpath_overrides_runpath=yes
11038 ;;
11039 freebsd3.[01]* | freebsdelf3.[01]*)
11040@@ -14225,7 +14225,7 @@
11041 esac
11042 ;;
11043
11044- freebsd[12]*)
11045+ freebsd2.*)
11046 # C++ shared libraries reported to be fairly broken before
11047 # switch to ELF
11048 ld_shlibs_CXX=no
11049@@ -16000,7 +16000,7 @@
11050 objformat=`/usr/bin/objformat`
11051 else
11052 case $host_os in
11053- freebsd[123]*) objformat=aout ;;
11054+ freebsd[23].*) objformat=aout ;;
11055 *) objformat=elf ;;
11056 esac
11057 fi
11058@@ -16018,7 +16018,7 @@
11059 esac
11060 shlibpath_var=LD_LIBRARY_PATH
11061 case $host_os in
11062- freebsd2*)
11063+ freebsd2.*)
11064 shlibpath_overrides_runpath=yes
11065 ;;
11066 freebsd3.[01]* | freebsdelf3.[01]*)
11067Index: libjava/classpath/ChangeLog.gcj
11068===================================================================
a966c5b5
AM
11069--- libjava/classpath/ChangeLog.gcj (.../tags/gcc_4_6_2_release) (wersja 182722)
11070+++ libjava/classpath/ChangeLog.gcj (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
11071@@ -1,3 +1,9 @@
11072+2011-11-29 Andreas Tobler <andreast@fgznet.ch>
6f35b5e4 11073+
2e34247b
AM
11074+ * config.rpath (ld_shlibs): Fix detection of FreeBSD-10 and up.
11075+ (libname_spec): Likewise.
11076+ * configure: Regenerate with autoconf -I ../../.
11077+
11078 2011-02-13 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11079
11080 * config.rpath, ltcf-c.sh, ltcf-gcj.sh, ltconfig: Remove
11081Index: libjava/ChangeLog
6f35b5e4 11082===================================================================
a966c5b5
AM
11083--- libjava/ChangeLog (.../tags/gcc_4_6_2_release) (wersja 182722)
11084+++ libjava/ChangeLog (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
11085@@ -1,3 +1,16 @@
11086+2011-11-24 Jakub Jelinek <jakub@redhat.com>
6f35b5e4 11087+
2e34247b
AM
11088+ PR bootstrap/50888
11089+ * prims.cc: Don't include ctype.h.
11090+ (c_isspace): Define.
11091+ (next_property_key, next_property_value): Use it instead
11092+ of isspace.
6f35b5e4 11093+
2e34247b 11094+2011-11-20 Andreas Tobler <andreast@fgznet.ch>
6f35b5e4 11095+
2e34247b
AM
11096+ * configure.ac: Fix FreeBSD 10 detection.
11097+ * configure: Regenerate.
6f35b5e4 11098+
2e34247b
AM
11099 2011-10-26 Release Manager
11100
11101 * GCC 4.6.2 released.
11102Index: libjava/prims.cc
11103===================================================================
a966c5b5
AM
11104--- libjava/prims.cc (.../tags/gcc_4_6_2_release) (wersja 182722)
11105+++ libjava/prims.cc (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
11106@@ -38,7 +38,6 @@
11107 #endif
11108
11109 #ifndef DISABLE_GETENV_PROPERTIES
11110-#include <ctype.h>
11111 #include <java-props.h>
11112 #define PROCESS_GCJ_PROPERTIES process_gcj_properties()
11113 #else
11114@@ -985,6 +984,8 @@
11115
11116 #ifndef DISABLE_GETENV_PROPERTIES
11117
11118+#define c_isspace(c) (memchr (" \t\n\r\v\f", c, 6) != NULL)
6f35b5e4 11119+
2e34247b
AM
11120 static char *
11121 next_property_key (char *s, size_t *length)
11122 {
11123@@ -993,7 +994,7 @@
11124 JvAssert (s);
11125
11126 // Skip over whitespace
11127- while (isspace (*s))
11128+ while (c_isspace (*s))
11129 s++;
11130
11131 // If we've reached the end, return NULL. Also return NULL if for
11132@@ -1005,7 +1006,7 @@
11133
11134 // Determine the length of the property key.
11135 while (s[l] != 0
11136- && ! isspace (s[l])
11137+ && ! c_isspace (s[l])
11138 && s[l] != ':'
11139 && s[l] != '=')
11140 {
11141@@ -1027,19 +1028,19 @@
11142
11143 JvAssert (s);
11144
11145- while (isspace (*s))
11146+ while (c_isspace (*s))
11147 s++;
11148
11149 if (*s == ':'
11150 || *s == '=')
11151 s++;
11152
11153- while (isspace (*s))
11154+ while (c_isspace (*s))
11155 s++;
11156
11157 // Determine the length of the property value.
11158 while (s[l] != 0
11159- && ! isspace (s[l])
11160+ && ! c_isspace (s[l])
11161 && s[l] != ':'
11162 && s[l] != '=')
11163 {
11164Index: libjava/configure
11165===================================================================
a966c5b5
AM
11166--- libjava/configure (.../tags/gcc_4_6_2_release) (wersja 182722)
11167+++ libjava/configure (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
11168@@ -11560,7 +11560,7 @@
11169 ;;
11170
11171 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
11172- freebsd2*)
11173+ freebsd2.*)
11174 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
11175 hardcode_direct=yes
11176 hardcode_minus_L=yes
11177@@ -12476,7 +12476,7 @@
11178 objformat=`/usr/bin/objformat`
11179 else
11180 case $host_os in
11181- freebsd[123]*) objformat=aout ;;
11182+ freebsd[23].*) objformat=aout ;;
11183 *) objformat=elf ;;
11184 esac
11185 fi
11186@@ -12494,7 +12494,7 @@
11187 esac
11188 shlibpath_var=LD_LIBRARY_PATH
11189 case $host_os in
11190- freebsd2*)
11191+ freebsd2.*)
11192 shlibpath_overrides_runpath=yes
11193 ;;
11194 freebsd3.[01]* | freebsdelf3.[01]*)
11195@@ -14384,7 +14384,7 @@
11196 esac
11197 ;;
11198
11199- freebsd[12]*)
11200+ freebsd2.*)
11201 # C++ shared libraries reported to be fairly broken before
11202 # switch to ELF
11203 ld_shlibs_CXX=no
11204@@ -16159,7 +16159,7 @@
11205 objformat=`/usr/bin/objformat`
11206 else
11207 case $host_os in
11208- freebsd[123]*) objformat=aout ;;
11209+ freebsd[23].*) objformat=aout ;;
11210 *) objformat=elf ;;
11211 esac
11212 fi
11213@@ -16177,7 +16177,7 @@
11214 esac
11215 shlibpath_var=LD_LIBRARY_PATH
11216 case $host_os in
11217- freebsd2*)
11218+ freebsd2.*)
11219 shlibpath_overrides_runpath=yes
11220 ;;
11221 freebsd3.[01]* | freebsdelf3.[01]*)
11222@@ -18520,7 +18520,7 @@
11223 ;;
11224
11225 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
11226- freebsd2*)
11227+ freebsd2.*)
11228 archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
11229 hardcode_direct_GCJ=yes
11230 hardcode_minus_L_GCJ=yes
11231@@ -20715,7 +20715,7 @@
11232 *-*-cygwin*)
11233 # Don't set THREADLIBS here. Cygwin doesn't have -lpthread.
11234 ;;
11235- *-*-freebsd[1234]*)
11236+ *-*-freebsd[34].*)
11237 # Before FreeBSD 5, it didn't have -lpthread (or any library which
11238 # merely adds pthread_* functions) but it does have a -pthread switch
11239 # which is required at link-time to select -lc_r *instead* of -lc.
11240Index: maintainer-scripts/ChangeLog
11241===================================================================
a966c5b5
AM
11242--- maintainer-scripts/ChangeLog (.../tags/gcc_4_6_2_release) (wersja 182722)
11243+++ maintainer-scripts/ChangeLog (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
11244@@ -1,3 +1,8 @@
11245+2011-11-23 Gerald Pfeifer <gerald@pfeifer.com>
6f35b5e4 11246+
2e34247b
AM
11247+ * update_web_docs_svn: Make $DOCSDIR group writable after
11248+ creating it.
6f35b5e4 11249+
2e34247b
AM
11250 2011-10-26 Release Manager
11251
11252 * GCC 4.6.2 released.
11253Index: maintainer-scripts/update_web_docs_svn
11254===================================================================
a966c5b5
AM
11255--- maintainer-scripts/update_web_docs_svn (.../tags/gcc_4_6_2_release) (wersja 182722)
11256+++ maintainer-scripts/update_web_docs_svn (.../branches/gcc-4_6-branch) (wersja 182722)
2e34247b
AM
11257@@ -93,6 +93,7 @@
11258
11259 if [ ! -d $DOCSDIR ]; then
11260 mkdir $DOCSDIR
11261+ chmod g+w $DOCSDIR
11262 fi
11263
11264 if [ -z "$RELEASE" ]; then
This page took 3.648693 seconds and 4 git commands to generate.