1 Index: libgomp/configure.tgt
2 ===================================================================
3 --- libgomp/configure.tgt (.../tags/gcc_4_5_2_release) (wersja 169176)
4 +++ libgomp/configure.tgt (.../branches/gcc-4_5-branch) (wersja 169176)
6 config_path="bsd posix"
10 + # Need to link with -lpthread so libgomp.so is self-contained.
11 + XLDFLAGS="${XLDFLAGS} -lpthread"
16 Index: libgomp/ChangeLog
17 ===================================================================
18 --- libgomp/ChangeLog (.../tags/gcc_4_5_2_release) (wersja 169176)
19 +++ libgomp/ChangeLog (.../branches/gcc-4_5-branch) (wersja 169176)
21 +2011-01-16 Jakub Jelinek <jakub@redhat.com>
23 + Backport from mainline
24 + 2010-12-14 Jakub Jelinek <jakub@redhat.com>
27 + * libgomp.fortran/allocatable6.f90: New test.
29 +2010-12-17 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
31 + Backport from mainline:
32 + 2010-12-01 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
34 + * configure.tgt (mips-sgi-irix6*): Add -lpthread to XLDFLAGS.
36 2010-12-16 Release Manager
39 Index: libgomp/testsuite/libgomp.fortran/allocatable6.f90
40 ===================================================================
41 --- libgomp/testsuite/libgomp.fortran/allocatable6.f90 (.../tags/gcc_4_5_2_release) (wersja 0)
42 +++ libgomp/testsuite/libgomp.fortran/allocatable6.f90 (.../branches/gcc-4_5-branch) (wersja 169176)
48 + subroutine sub (a, b, c, d, n)
50 + integer, allocatable :: a(:), b(:), c(:), d(:)
54 + integer, allocatable :: a(:), b(:), c(:), d(:)
56 + allocate (a(50), b(50), c(50), d(50))
58 + a(i) = 2 + modulo (i, 7)
59 + b(i) = 179 - modulo (i, 11)
63 + call sub (a, b, c, d, 50)
68 + else if (i .gt. 1 .and. i .lt. 9) then
71 + if (c(i) .ne. j) call abort
72 + j = 179 - modulo (i, 11)
73 + if (i .gt. 1 .and. i .lt. 9) j = i
74 + if (d(i) .ne. j) call abort
76 + deallocate (a, b, c, d)
79 +subroutine sub (a, b, c, d, n)
81 + integer, allocatable :: a(:), b(:), c(:), d(:)
82 +!$omp parallel do shared(a, b) reduction(+:c) reduction(min:d)
84 + c(a(i)) = c(a(i)) + 1
85 + d(i) = min(d(i), b(i))
86 + d(a(i)) = min(d(a(i)), a(i))
89 Index: gcc/tree-ssa-loop-im.c
90 ===================================================================
91 --- gcc/tree-ssa-loop-im.c (.../tags/gcc_4_5_2_release) (wersja 169176)
92 +++ gcc/tree-ssa-loop-im.c (.../branches/gcc-4_5-branch) (wersja 169176)
96 for (i = 0; VEC_iterate (edge, exits, i, ex); i++)
97 - if (ex->flags & EDGE_ABNORMAL)
98 + if (ex->flags & (EDGE_ABNORMAL | EDGE_EH))
102 Index: gcc/tree-loop-distribution.c
103 ===================================================================
104 --- gcc/tree-loop-distribution.c (.../tags/gcc_4_5_2_release) (wersja 169176)
105 +++ gcc/tree-loop-distribution.c (.../branches/gcc-4_5-branch) (wersja 169176)
108 /* Generate a call to memset. Return true when the operation succeeded. */
112 generate_memset_zero (gimple stmt, tree op0, tree nb_iter,
113 gimple_stmt_iterator bsi)
115 @@ -265,45 +265,27 @@
119 - if (!dr_analyze_innermost (dr))
121 + res = dr_analyze_innermost (dr);
122 + gcc_assert (res && stride_of_unit_type_p (DR_STEP (dr), TREE_TYPE (op0)));
124 - /* Test for a positive stride, iterating over every element. */
125 - if (integer_zerop (size_binop (MINUS_EXPR,
126 - fold_convert (sizetype, DR_STEP (dr)),
127 - TYPE_SIZE_UNIT (TREE_TYPE (op0)))))
129 - addr_base = fold_convert_loc (loc, sizetype,
130 - size_binop_loc (loc, PLUS_EXPR,
133 - addr_base = fold_build2_loc (loc, POINTER_PLUS_EXPR,
134 - TREE_TYPE (DR_BASE_ADDRESS (dr)),
135 - DR_BASE_ADDRESS (dr), addr_base);
136 + nb_bytes = build_size_arg_loc (loc, nb_iter, op0, &stmt_list);
137 + addr_base = size_binop_loc (loc, PLUS_EXPR, DR_OFFSET (dr), DR_INIT (dr));
138 + addr_base = fold_convert_loc (loc, sizetype, addr_base);
140 - nb_bytes = build_size_arg_loc (loc, nb_iter, op0, &stmt_list);
143 /* Test for a negative stride, iterating over every element. */
144 - else if (integer_zerop (size_binop (PLUS_EXPR,
145 - TYPE_SIZE_UNIT (TREE_TYPE (op0)),
146 - fold_convert (sizetype, DR_STEP (dr)))))
147 + if (integer_zerop (size_binop (PLUS_EXPR,
148 + TYPE_SIZE_UNIT (TREE_TYPE (op0)),
149 + fold_convert (sizetype, DR_STEP (dr)))))
151 - nb_bytes = build_size_arg_loc (loc, nb_iter, op0, &stmt_list);
153 - addr_base = size_binop_loc (loc, PLUS_EXPR, DR_OFFSET (dr), DR_INIT (dr));
154 - addr_base = fold_convert_loc (loc, sizetype, addr_base);
155 addr_base = size_binop_loc (loc, MINUS_EXPR, addr_base,
156 fold_convert_loc (loc, sizetype, nb_bytes));
157 addr_base = size_binop_loc (loc, PLUS_EXPR, addr_base,
158 TYPE_SIZE_UNIT (TREE_TYPE (op0)));
159 - addr_base = fold_build2_loc (loc, POINTER_PLUS_EXPR,
160 - TREE_TYPE (DR_BASE_ADDRESS (dr)),
161 - DR_BASE_ADDRESS (dr), addr_base);
166 + addr_base = fold_build2_loc (loc, POINTER_PLUS_EXPR,
167 + TREE_TYPE (DR_BASE_ADDRESS (dr)),
168 + DR_BASE_ADDRESS (dr), addr_base);
169 mem = force_gimple_operand (addr_base, &stmts, true, NULL);
170 gimple_seq_add_seq (&stmt_list, stmts);
172 @@ -311,14 +293,11 @@
173 fn_call = gimple_build_call (fn, 3, mem, integer_zero_node, nb_bytes);
174 gimple_seq_add_stmt (&stmt_list, fn_call);
175 gsi_insert_seq_after (&bsi, stmt_list, GSI_CONTINUE_LINKING);
178 if (dump_file && (dump_flags & TDF_DETAILS))
179 fprintf (dump_file, "generated memset zero\n");
186 /* Tries to generate a builtin function for the instructions of LOOP
192 gimple_stmt_iterator bsi;
193 tree nb_iter = number_of_exit_cond_executions (loop);
195 @@ -368,26 +346,17 @@
200 + if (!stmt_with_adjacent_zero_store_dr_p (write))
203 - op0 = gimple_assign_lhs (write);
204 - op1 = gimple_assign_rhs1 (write);
206 - if (!(TREE_CODE (op0) == ARRAY_REF
207 - || TREE_CODE (op0) == INDIRECT_REF))
210 /* The new statements will be placed before LOOP. */
211 bsi = gsi_last_bb (loop_preheader_edge (loop)->src);
212 + generate_memset_zero (write, gimple_assign_lhs (write), nb_iter, bsi);
215 - if (gimple_assign_rhs_code (write) == INTEGER_CST
216 - && (integer_zerop (op1) || real_zerop (op1)))
217 - res = generate_memset_zero (write, op0, nb_iter, bsi);
219 /* If this is the last partition for which we generate code, we have
220 to destroy the loop. */
221 - if (res && !copy_p)
224 unsigned nbbs = loop->num_nodes;
225 edge exit = single_exit (loop);
227 static void rdg_flag_vertex_and_dependent (struct graph *, int, bitmap, bitmap,
230 -/* Flag all the uses of U. */
233 -rdg_flag_all_uses (struct graph *rdg, int u, bitmap partition, bitmap loops,
234 - bitmap processed, bool *part_has_writes)
236 - struct graph_edge *e;
238 - for (e = rdg->vertices[u].succ; e; e = e->succ_next)
239 - if (!bitmap_bit_p (processed, e->dest))
241 - rdg_flag_vertex_and_dependent (rdg, e->dest, partition, loops,
242 - processed, part_has_writes);
243 - rdg_flag_all_uses (rdg, e->dest, partition, loops, processed,
248 /* Flag the uses of U stopping following the information from
249 upstream_mem_writes. */
251 @@ -720,68 +671,13 @@
255 -/* Flag all the nodes of RDG containing memory accesses that could
256 - potentially belong to arrays already accessed in the current
260 -rdg_flag_similar_memory_accesses (struct graph *rdg, bitmap partition,
261 - bitmap loops, bitmap processed,
262 - VEC (int, heap) **other_stores)
267 - bitmap_iterator ii;
268 - struct graph_edge *e;
270 - EXECUTE_IF_SET_IN_BITMAP (partition, 0, i, ii)
271 - if (RDG_MEM_WRITE_STMT (rdg, i)
272 - || RDG_MEM_READS_STMT (rdg, i))
274 - for (j = 0; j < rdg->n_vertices; j++)
275 - if (!bitmap_bit_p (processed, j)
276 - && (RDG_MEM_WRITE_STMT (rdg, j)
277 - || RDG_MEM_READS_STMT (rdg, j))
278 - && rdg_has_similar_memory_accesses (rdg, i, j))
280 - /* Flag first the node J itself, and all the nodes that
281 - are needed to compute J. */
282 - rdg_flag_vertex_and_dependent (rdg, j, partition, loops,
285 - /* When J is a read, we want to coalesce in the same
286 - PARTITION all the nodes that are using J: this is
287 - needed for better cache locality. */
288 - rdg_flag_all_uses (rdg, j, partition, loops, processed, &foo);
290 - /* Remove from OTHER_STORES the vertex that we flagged. */
291 - if (RDG_MEM_WRITE_STMT (rdg, j))
292 - for (k = 0; VEC_iterate (int, *other_stores, k, kk); k++)
295 - VEC_unordered_remove (int, *other_stores, k);
300 - /* If the node I has two uses, then keep these together in the
302 - for (n = 0, e = rdg->vertices[i].succ; e; e = e->succ_next, n++);
305 - rdg_flag_all_uses (rdg, i, partition, loops, processed, &foo);
309 /* Returns a bitmap in which all the statements needed for computing
310 the strongly connected component C of the RDG are flagged, also
311 including the loop exit conditions. */
314 build_rdg_partition_for_component (struct graph *rdg, rdgc c,
315 - bool *part_has_writes,
316 - VEC (int, heap) **other_stores)
317 + bool *part_has_writes)
320 bitmap partition = BITMAP_ALLOC (NULL);
322 rdg_flag_vertex_and_dependent (rdg, v, partition, loops, processed,
325 - /* Also iterate on the array of stores not in the starting vertices,
326 - and determine those vertices that have some memory affinity with
327 - the current nodes in the component: these are stores to the same
328 - arrays, i.e. we're taking care of cache locality. */
329 - rdg_flag_similar_memory_accesses (rdg, partition, loops, processed,
332 rdg_flag_loop_exits (rdg, loops, partition, processed, part_has_writes);
334 BITMAP_FREE (processed);
336 BITMAP_FREE (saved_components);
339 +/* Returns true when it is possible to generate a builtin pattern for
340 + the PARTITION of RDG. For the moment we detect only the memset
344 +can_generate_builtin (struct graph *rdg, bitmap partition)
347 + bitmap_iterator bi;
350 + int stores_zero = 0;
352 + EXECUTE_IF_SET_IN_BITMAP (partition, 0, i, bi)
353 + if (RDG_MEM_READS_STMT (rdg, i))
355 + else if (RDG_MEM_WRITE_STMT (rdg, i))
358 + if (stmt_with_adjacent_zero_store_dr_p (RDG_STMT (rdg, i)))
362 + return stores_zero == 1 && nb_writes == 1 && nb_reads == 0;
365 +/* Returns true when PARTITION1 and PARTITION2 have similar memory
366 + accesses in RDG. */
369 +similar_memory_accesses (struct graph *rdg, bitmap partition1,
373 + bitmap_iterator bi, bj;
375 + EXECUTE_IF_SET_IN_BITMAP (partition1, 0, i, bi)
376 + if (RDG_MEM_WRITE_STMT (rdg, i)
377 + || RDG_MEM_READS_STMT (rdg, i))
378 + EXECUTE_IF_SET_IN_BITMAP (partition2, 0, j, bj)
379 + if (RDG_MEM_WRITE_STMT (rdg, j)
380 + || RDG_MEM_READS_STMT (rdg, j))
381 + if (rdg_has_similar_memory_accesses (rdg, i, j))
387 +/* Fuse all the partitions from PARTITIONS that contain similar memory
388 + references, i.e., we're taking care of cache locality. This
389 + function does not fuse those partitions that contain patterns that
390 + can be code generated with builtins. */
393 +fuse_partitions_with_similar_memory_accesses (struct graph *rdg,
394 + VEC (bitmap, heap) **partitions)
397 + bitmap partition1, partition2;
399 + for (p1 = 0; VEC_iterate (bitmap, *partitions, p1, partition1); p1++)
400 + if (!can_generate_builtin (rdg, partition1))
401 + for (p2 = 0; VEC_iterate (bitmap, *partitions, p2, partition2); p2++)
403 + && !can_generate_builtin (rdg, partition2)
404 + && similar_memory_accesses (rdg, partition1, partition2))
406 + bitmap_ior_into (partition1, partition2);
407 + VEC_ordered_remove (bitmap, *partitions, p2);
412 /* Aggregate several components into a useful partition that is
413 registered in the PARTITIONS vector. Partitions will be
414 distributed in different loops. */
416 if (bitmap_bit_p (processed, v))
419 - np = build_rdg_partition_for_component (rdg, x, &part_has_writes,
421 + np = build_rdg_partition_for_component (rdg, x, &part_has_writes);
422 bitmap_ior_into (partition, np);
423 bitmap_ior_into (processed, np);
426 VEC_safe_push (bitmap, heap, *partitions, partition);
428 BITMAP_FREE (partition);
430 + fuse_partitions_with_similar_memory_accesses (rdg, partitions);
433 /* Dump to FILE the PARTITIONS. */
435 ===================================================================
436 --- gcc/DATESTAMP (.../tags/gcc_4_5_2_release) (wersja 169176)
437 +++ gcc/DATESTAMP (.../branches/gcc-4_5-branch) (wersja 169176)
442 ===================================================================
443 --- gcc/DEV-PHASE (.../tags/gcc_4_5_2_release) (wersja 169176)
444 +++ gcc/DEV-PHASE (.../branches/gcc-4_5-branch) (wersja 169176)
447 Index: gcc/tree-ssa-sccvn.c
448 ===================================================================
449 --- gcc/tree-ssa-sccvn.c (.../tags/gcc_4_5_2_release) (wersja 169176)
450 +++ gcc/tree-ssa-sccvn.c (.../branches/gcc-4_5-branch) (wersja 169176)
454 static tree *last_vuse_ptr;
455 +static vn_lookup_kind vn_walk_kind;
457 /* Callback for walk_non_aliased_vuses. Adjusts the vn_reference_t VR_
458 with the current VUSE and performs the expression lookup. */
459 @@ -1063,6 +1064,7 @@
460 size2 = TREE_INT_CST_LOW (gimple_call_arg (def_stmt, 2)) * 8;
461 if ((unsigned HOST_WIDE_INT)size2 / 8
462 == TREE_INT_CST_LOW (gimple_call_arg (def_stmt, 2))
464 && operand_equal_p (base, base2, 0)
466 && offset2 + size2 >= offset + maxsize)
467 @@ -1086,7 +1088,8 @@
468 HOST_WIDE_INT offset2, size2, maxsize2;
469 base2 = get_ref_base_and_extent (gimple_assign_lhs (def_stmt),
470 &offset2, &size2, &maxsize2);
471 - if (operand_equal_p (base, base2, 0)
473 + && operand_equal_p (base, base2, 0)
475 && offset2 + size2 >= offset + maxsize)
477 @@ -1101,7 +1104,8 @@
479 /* For aggregate copies translate the reference through them if
480 the copy kills ref. */
481 - else if (gimple_assign_single_p (def_stmt)
482 + else if (vn_walk_kind == VN_WALKREWRITE
483 + && gimple_assign_single_p (def_stmt)
484 && (DECL_P (gimple_assign_rhs1 (def_stmt))
485 || INDIRECT_REF_P (gimple_assign_rhs1 (def_stmt))
486 || handled_component_p (gimple_assign_rhs1 (def_stmt))))
487 @@ -1116,7 +1120,8 @@
488 /* See if the assignment kills REF. */
489 base2 = get_ref_base_and_extent (gimple_assign_lhs (def_stmt),
490 &offset2, &size2, &maxsize2);
491 - if (!operand_equal_p (base, base2, 0)
493 + || !operand_equal_p (base, base2, 0)
495 || offset2 + size2 < offset + maxsize)
497 @@ -1190,7 +1195,7 @@
499 vn_reference_lookup_pieces (tree vuse, alias_set_type set, tree type,
500 VEC (vn_reference_op_s, heap) *operands,
501 - vn_reference_t *vnresult, bool maywalk)
502 + vn_reference_t *vnresult, vn_lookup_kind kind)
504 struct vn_reference_s vr1;
506 @@ -1215,10 +1220,11 @@
507 vn_reference_lookup_1 (&vr1, vnresult);
511 + && kind != VN_NOWALK
515 + vn_walk_kind = kind;
516 if (ao_ref_init_from_vn_reference (&r, set, type, vr1.operands))
518 (vn_reference_t)walk_non_aliased_vuses (&r, vr1.vuse,
519 @@ -1241,7 +1247,7 @@
520 stored in the hashtable if one exists. */
523 -vn_reference_lookup (tree op, tree vuse, bool maywalk,
524 +vn_reference_lookup (tree op, tree vuse, vn_lookup_kind kind,
525 vn_reference_t *vnresult)
527 VEC (vn_reference_op_s, heap) *operands;
528 @@ -1256,12 +1262,13 @@
529 vr1.set = get_alias_set (op);
530 vr1.hashcode = vn_reference_compute_hash (&vr1);
533 + if (kind != VN_NOWALK
536 vn_reference_t wvnresult;
538 ao_ref_init (&r, op);
539 + vn_walk_kind = kind;
541 (vn_reference_t)walk_non_aliased_vuses (&r, vr1.vuse,
542 vn_reference_lookup_2,
543 @@ -1980,14 +1987,14 @@
545 last_vuse = gimple_vuse (stmt);
546 last_vuse_ptr = &last_vuse;
547 - result = vn_reference_lookup (op, gimple_vuse (stmt), true, NULL);
548 + result = vn_reference_lookup (op, gimple_vuse (stmt), VN_WALKREWRITE, NULL);
549 last_vuse_ptr = NULL;
551 /* If we have a VCE, try looking up its operand as it might be stored in
553 if (!result && TREE_CODE (op) == VIEW_CONVERT_EXPR)
554 result = vn_reference_lookup (TREE_OPERAND (op, 0), gimple_vuse (stmt),
556 + VN_WALKREWRITE, NULL);
558 /* We handle type-punning through unions by value-numbering based
559 on offset and size of the access. Be prepared to handle a
560 @@ -2098,7 +2105,7 @@
561 Otherwise, the vdefs for the store are used when inserting into
562 the table, since the store generates a new memory state. */
564 - result = vn_reference_lookup (lhs, gimple_vuse (stmt), false, NULL);
565 + result = vn_reference_lookup (lhs, gimple_vuse (stmt), VN_NOWALK, NULL);
569 Index: gcc/tree-ssa-sccvn.h
570 ===================================================================
571 --- gcc/tree-ssa-sccvn.h (.../tags/gcc_4_5_2_release) (wersja 169176)
572 +++ gcc/tree-ssa-sccvn.h (.../branches/gcc-4_5-branch) (wersja 169176)
573 @@ -185,10 +185,11 @@
574 void copy_reference_ops_from_call (gimple, VEC(vn_reference_op_s, heap) **);
575 bool ao_ref_init_from_vn_reference (ao_ref *, alias_set_type, tree,
576 VEC (vn_reference_op_s, heap) *);
577 +typedef enum { VN_NOWALK, VN_WALK, VN_WALKREWRITE } vn_lookup_kind;
578 tree vn_reference_lookup_pieces (tree, alias_set_type, tree,
579 VEC (vn_reference_op_s, heap) *,
580 - vn_reference_t *, bool);
581 -tree vn_reference_lookup (tree, tree, bool, vn_reference_t *);
582 + vn_reference_t *, vn_lookup_kind);
583 +tree vn_reference_lookup (tree, tree, vn_lookup_kind, vn_reference_t *);
584 vn_reference_t vn_reference_insert (tree, tree, tree);
585 vn_reference_t vn_reference_insert_pieces (tree, alias_set_type, tree,
586 VEC (vn_reference_op_s, heap) *,
588 ===================================================================
589 --- gcc/ChangeLog (.../tags/gcc_4_5_2_release) (wersja 169176)
590 +++ gcc/ChangeLog (.../branches/gcc-4_5-branch) (wersja 169176)
592 +2011-01-21 Richard Guenther <rguenther@suse.de>
594 + PR tree-optimization/47365
595 + * tree-ssa-sccvn.h (vn_lookup_kind): Declare.
596 + (vn_reference_lookup_pieces): Adjust.
597 + (vn_reference_lookup): Likewise.
598 + * tree-ssa-sccvn.c (vn_walk_kind): New static global.
599 + (vn_reference_lookup_3): Only look through kills if in
600 + VN_WALKREWRITE mode.
601 + (vn_reference_lookup_pieces): Adjust.
602 + (vn_reference_lookup): Likewise.
603 + (visit_reference_op_load): Likewise.
604 + (visit_reference_op_store): Likewise.
605 + * tree-ssa-pre.c (phi_translate_1): Use VN_WALK mode.
606 + (compute_avail): Likewise.
607 + (eliminate): Likewise.
609 +2011-01-20 Richard Guenther <rguenther@suse.de>
611 + PR tree-optimization/47167
612 + * tree-ssa-copyrename.c (copy_rename_partition_coalesce):
613 + Revert previous change, only avoid enumeral type changes.
615 +2011-01-17 H.J. Lu <hongjiu.lu@intel.com>
617 + Backport from mainline
618 + 2011-01-17 H.J. Lu <hongjiu.lu@intel.com>
621 + * config/i386/avxintrin.h (_mm_maskload_pd): Change mask to
623 + (_mm_maskstore_pd): Likewise.
624 + (_mm_maskload_ps): Likewise.
625 + (_mm_maskstore_ps): Likewise.
626 + (_mm256_maskload_pd): Change mask to __m256i.
627 + (_mm256_maskstore_pd): Likewise.
628 + (_mm256_maskload_ps): Likewise.
629 + (_mm256_maskstore_ps): Likewise.
631 + * config/i386/i386-builtin-types.def: Updated.
632 + (ix86_expand_special_args_builtin): Likewise.
634 + * config/i386/i386.c (bdesc_special_args): Update
635 + __builtin_ia32_maskloadpd, __builtin_ia32_maskloadps,
636 + __builtin_ia32_maskloadpd256, __builtin_ia32_maskloadps256,
637 + __builtin_ia32_maskstorepd, __builtin_ia32_maskstoreps,
638 + __builtin_ia32_maskstorepd256 and __builtin_ia32_maskstoreps256.
640 + * config/i386/sse.md (avx_maskload<ssemodesuffix><avxmodesuffix>):
641 + Use <avxpermvecmode> on mask register.
642 + (avx_maskstore<ssemodesuffix><avxmodesuffix>): Likewise.
644 +2011-01-17 Olivier Hainque <hainque@adacore.com>
645 + Michael Haubenwallner <michael.haubenwallner@salomon.at>
646 + Eric Botcazou <ebotcazou@adacore.com>
649 + * xcoffout.c (ASM_OUTPUT_LINE): Output line only if positive, and only
650 + if <= USHRT_MAX in 32-bit mode.
652 +2011-01-17 Richard Guenther <rguenther@suse.de>
654 + Backport from mainline
655 + PR tree-optimization/47286
656 + * tree-ssa-structalias.c (new_var_info): Register variables
659 + PR tree-optimization/44592
660 + * tree-ssa-ccp.c (gimplify_and_update_call_from_tree): Copy
663 +2011-01-16 Jakub Jelinek <jakub@redhat.com>
665 + Backport from mainline
666 + 2011-01-07 Jakub Jelinek <jakub@redhat.com>
669 + * config/i386/i386.c (ix86_delegitimize_address): If
670 + simplify_gen_subreg fails, return orig_x.
672 + 2011-01-06 Jakub Jelinek <jakub@redhat.com>
675 + * c-convert.c (convert): When converting a complex expression
676 + other than COMPLEX_EXPR to a different complex type, ensure
677 + c_save_expr is called instead of save_expr, unless in_late_binary_op.
678 + * c-typeck.c (convert_for_assignment): Set in_late_binary_op also
679 + when converting COMPLEX_TYPE.
681 + 2010-12-21 Jakub Jelinek <jakub@redhat.com>
684 + * config/i386/sse.md (sse2_loadlpd, sse2_movsd): Fix shufpd source
687 + PR middle-end/45852
688 + * expr.c (store_expr): Ignore alt_rtl if equal to target,
689 + but has side-effects.
691 + 2010-12-16 Jakub Jelinek <jakub@redhat.com>
693 + PR tree-optimization/43655
694 + * tree-ssa-ter.c (is_replaceable_p): Don't use
695 + gimple_references_memory_p for -O0, instead check for load
699 + * cfgexpand.c (expand_debug_expr): If GET_MODE (op0) is VOIDmode,
700 + use TYPE_MODE (TREE_TYPE (tem)) instead of mode1.
702 + 2010-12-10 Jakub Jelinek <jakub@redhat.com>
704 + PR rtl-optimization/46804
705 + * regmove.c (optimize_reg_copy_3): Look for REG_EQUAL note
706 + on the setter of src_reg rather than on insn. If it is
707 + equal to the setter's original SET_SRC, replace it with its
708 + zero or sign extension instead of dropping it.
710 + PR rtl-optimization/46865
711 + * rtl.c (rtx_equal_p_cb, rtx_equal_p): For last operand of
712 + ASM_OPERANDS and ASM_INPUT if integers are different,
714 + * jump.c (rtx_renumbered_equal_p): Likewise.
716 + PR tree-optimization/46864
717 + * tree-ssa-loop-im.c (loop_suitable_for_sm): Return false even
718 + when there are EDGE_EH exit edges.
720 + 2010-12-09 Jakub Jelinek <jakub@redhat.com>
723 + * config/rs6000/rs6000.c (rs6000_expand_vector_extract): Use stvx
725 + (altivec_expand_stv_builtin): For op0 use mode of operand 1 instead
727 + * config/rs6000/altivec.md (VI_scalar): New mode attr.
728 + (altivec_stve<VI_char>x, *altivec_stvesfx): Use scalar instead of
729 + vector mode for operand 0, put operand 1 into UNSPEC.
731 +2011-01-13 Nick Clifton <nickc@redhat.com>
733 + Import this fix from the mainline:
734 + 2010-10-19 Nick Clifton <nickc@redhat.com>
736 + * config/rx/rx.c (rx_function_value): Small integer types are
737 + promoted to SImode.
738 + (rx_promote_function_mode): New function.
739 + (TARGET_PROMOTE_FUNCTION_MODE): Define.
741 +2011-01-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
743 + Backport from mainline:
744 + 2011-01-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
747 + * config/i386/i386.c (legitimize_tls_address)
748 + <TLS_MODEL_INITIAL_EXEC>: Handle TARGET_64BIT && TARGET_SUN_TLS.
749 + * config/i386/i386.md (UNSPEC_TLS_IE_SUN): Declare.
750 + (tls_initial_exec_64_sun): New pattern.
752 +2011-01-03 Eric Botcazou <ebotcazou@adacore.com>
754 + Backport from mainline
755 + 2010-12-30 Eric Botcazou <ebotcazou@adacore.com>
758 + * config/sparc/sparc.c (sparc_file_end): Call resolve_unique_section
759 + on the GOT helper if USE_HIDDEN_LINKONCE.
761 + 2010-12-02 Eric Botcazou <ebotcazou@adacore.com>
764 + * config/sparc/sparc.c (can_use_mov_pic_label_ref): New predicate.
765 + (sparc_expand_move): Call it to decide whether to emit the special
766 + mov{si,di}_pic_label_ref patterns.
767 + (sparc_legitimize_pic_address): Call it to decide whether to emit
768 + the regular PIC sequence for labels. Fix long line.
769 + (sparc_file_end): Set is_thunk for the PIC helper.
771 +2010-12-30 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
773 + * config/pa/pa.md: Add ",*" condition to 64-bit add/subtract boolean
776 +2010-12-27 Yao Qi <yao@codesourcery.com>
778 + Backport from mainline:
779 + 2010-10-14 Yao Qi <yao@codesourcery.com>
782 + * config/arm/arm.c (arm_build_builtin_va_list): Assign
783 + va_list_name to TYPE_STUB_DECL (va_list_type).
785 +2010-12-23 Sebastian Pop <sebastian.pop@amd.com>
786 + Richard Guenther <rguenther@suse.de>
788 + PR tree-optimization/46758
789 + * graphite-sese-to-poly.c (scan_tree_for_params_right_scev): Use
790 + tree_int_to_gmp instead of int_cst_value.
791 + (scan_tree_for_params_int): Same.
792 + (scan_tree_for_params): Same.
793 + (pdr_add_data_dimensions): Use ppl_set_inhomogeneous_tree.
795 +2010-12-23 Sebastian Pop <sebastian.pop@amd.com>
797 + Backport from mainline
798 + Fix PR45758: reset scevs before Graphite.
799 + 2010-09-24 Sebastian Pop <sebastian.pop@amd.com>
801 + PR tree-optimization/45552
802 + * graphite.c (graphite_initialize): Call scev_reset.
804 +2010-12-23 Sebastian Pop <sebastian.pop@amd.com>
806 + PR tree-optimization/43023
807 + * tree-data-ref.c (mem_write_stride_of_same_size_as_unit_type_p):
809 + (stores_zero_from_loop): Call stmt_stores_zero.
810 + (stmt_with_adjacent_zero_store_dr_p): New.
811 + * tree-data-ref.h (stmt_with_adjacent_zero_store_dr_p): Declared.
812 + (stride_of_unit_type_p): New.
813 + * tree-loop-distribution.c (generate_memset_zero): Do not return a
814 + boolean. Call gcc_assert on stride_of_unit_type_p.
815 + (generate_builtin): Call stmt_stores_zero.
816 + (rdg_flag_all_uses): Removed.
817 + (rdg_flag_similar_memory_accesses): Removed.
818 + (build_rdg_partition_for_component): Removed parameter
819 + other_stores. Removed call to rdg_flag_similar_memory_accesses.
820 + (can_generate_builtin): New.
821 + (similar_memory_accesses): New.
822 + (fuse_partitions_with_similar_memory_accesses): New.
823 + (rdg_build_partitions): Call
824 + fuse_partitions_with_similar_memory_accesses.
826 +2010-12-21 Martin Jambor <mjambor@suse.cz>
828 + Backport from mainline:
829 + 2010-12-09 Martin Jambor <mjambor@suse.cz>
831 + PR middle-end/46734
832 + * tree-sra.c (splice_param_accesses): Check that there are not
833 + multiple ADDRESSABLE types.
835 +2010-12-19 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
837 + Backport from mainline:
838 + 2010-12-18 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
841 + * config/pa/pa.c (branch_to_delay_slot_p): Use next_active_insn instead
842 + of next_real_insn. Search forward checking for both ASM_INPUT and
843 + ASM_OPERANDS asms until exit condition is found.
844 + (branch_needs_nop_p): Likewise.
845 + (use_skip_p): New function.
846 + (output_cbranch): Use use_skip_p.
847 + (output_bb, output_bvb): Likewise.
849 +2010-12-19 Eric Botcazou <ebotcazou@adacore.com>
852 + * config/sparc/sparc.h (GLOBAL_OFFSET_TABLE_REGNUM): New macro.
853 + (PIC_OFFSET_TABLE_REGNUM): Rewrite in terms of above macro.
854 + * config/sparc/sparc.c (pic_helper_needed): Delete.
855 + (global_offset_table): Likewise.
856 + (pic_helper_symbol): Rename to...
857 + (got_helper_rtx): ...this.
858 + (global_offset_table_rtx): New global variable.
859 + (sparc_got_symbol): Likewise.
860 + (sparc_got): New static function.
861 + (check_pic): Use local variable and call sparc_got.
862 + (sparc_tls_symbol): Initialize to NULL_RTX.
863 + (sparc_tls_got): In non-PIC mode, reload the GOT register for Sun TLS
864 + and 32-bit ABI and copy the GOT symbol to a new register otherwise.
865 + (get_pc_thunk_name): Rename local variable.
866 + (gen_load_pcrel_sym): New wrapper around load_pcrel_sym{si,di}.
867 + (load_pic_register): Rename to...
868 + (load_got_register): ...this. Adjust and call gen_load_pcrel_sym.
869 + (sparc_expand_prologue): Do not test flag_pic.
870 + (sparc_output_mi_thunk): Use pic_offset_table_rtx directly.
871 + (sparc_file_end): Test got_helper_rtx instead of pic_helper_needed.
872 + Rename local variable and do not call get_pc_thunk_name again.
873 + * config/sparc/sparc.md (load_pcrel_sym): Add operand #3.
875 +2010-12-18 Alexandre Oliva <aoliva@redhat.com>
878 + * jump.c (mark_all_labels): Skip debug insns.
880 +2010-12-18 Alexandre Oliva <aoliva@redhat.com>
883 + * cfgcleanup.c (try_forward_edges): Skip debug insns.
885 +2010-12-16 Eric Botcazou <ebotcazou@adacore.com>
887 + * tree-ssa-sccvn.c (vn_reference_lookup_3): Always punt if the call to
888 + get_ref_base_and_extent returns -1 as the max size.
890 +2010-12-16 Richard Guenther <rguenther@suse.de>
892 + * DEV-PHASE: Set back to prerelease.
893 + * BASE-VER: Bump to 4.5.3.
895 2010-12-16 Release Manager
897 * GCC 4.5.2 released.
898 Index: gcc/testsuite/gcc.c-torture/compile/pr47150.c
899 ===================================================================
900 --- gcc/testsuite/gcc.c-torture/compile/pr47150.c (.../tags/gcc_4_5_2_release) (wersja 0)
901 +++ gcc/testsuite/gcc.c-torture/compile/pr47150.c (.../branches/gcc-4_5-branch) (wersja 169176)
905 +float _Complex foo (float, float);
912 + b = 0.5 * (foo (0, w) + foo (1, w) / w);
914 Index: gcc/testsuite/gcc.target/arm/pr45447.c
915 ===================================================================
916 --- gcc/testsuite/gcc.target/arm/pr45447.c (.../tags/gcc_4_5_2_release) (wersja 0)
917 +++ gcc/testsuite/gcc.target/arm/pr45447.c (.../branches/gcc-4_5-branch) (wersja 169176)
919 +/* { dg-do compile } */
920 +/* { dg-options "-g -femit-struct-debug-baseonly" } */
921 +typedef __builtin_va_list x;
922 Index: gcc/testsuite/gcc.target/i386/avx-vmaskmovps-256-1.c
923 ===================================================================
924 --- gcc/testsuite/gcc.target/i386/avx-vmaskmovps-256-1.c (.../tags/gcc_4_5_2_release) (wersja 169176)
925 +++ gcc/testsuite/gcc.target/i386/avx-vmaskmovps-256-1.c (.../branches/gcc-4_5-branch) (wersja 169176)
928 int m[8] = {mask_v(0), mask_v(1), mask_v(2), mask_v(3), mask_v(4), mask_v(5), mask_v(6), mask_v(7)};
929 float s[8] = {1,2,3,4,5,6,7,8};
935 - mask.x = _mm256_loadu_ps ((float*)m);
936 + mask.x = _mm256_loadu_si256 ((__m256i *)m);
937 u.x = _mm256_maskload_ps (s, mask.x);
939 for (i = 0 ; i < 8; i++)
940 Index: gcc/testsuite/gcc.target/i386/pr46880.c
941 ===================================================================
942 --- gcc/testsuite/gcc.target/i386/pr46880.c (.../tags/gcc_4_5_2_release) (wersja 0)
943 +++ gcc/testsuite/gcc.target/i386/pr46880.c (.../branches/gcc-4_5-branch) (wersja 169176)
945 +/* PR target/46880 */
947 +/* { dg-options "-O2 -fno-strict-aliasing -msse2" } */
948 +/* { dg-require-effective-target sse2_runtime } */
950 +typedef double __m128d __attribute__ ((__vector_size__ (16), __may_alias__));
951 +typedef double (*T)[2];
953 +static __attribute__ ((noinline, noclone)) __m128d
954 +foo (__m128d c, __m128d d)
958 + __m128d e = { (*cp)[1], (*dp)[1] };
965 + __m128d c = { 1.0, 2.0 };
966 + __m128d d = { 3.0, 4.0 };
967 + union { __m128d x; double d[2]; } u;
969 + if (u.d[0] != 2.0 || u.d[1] != 4.0)
970 + __builtin_abort ();
973 Index: gcc/testsuite/gcc.target/i386/avx-vmaskmovps-1.c
974 ===================================================================
975 --- gcc/testsuite/gcc.target/i386/avx-vmaskmovps-1.c (.../tags/gcc_4_5_2_release) (wersja 0)
976 +++ gcc/testsuite/gcc.target/i386/avx-vmaskmovps-1.c (.../branches/gcc-4_5-branch) (wersja 169176)
979 +/* { dg-require-effective-target avx } */
980 +/* { dg-options "-O2 -mavx" } */
982 +#include "avx-check.h"
988 +#define mask_v(pos) (((MASK & (0x1 << (pos))) >> (pos)) << 31)
994 + int m[4] = {mask_v(0), mask_v(1), mask_v(2), mask_v(3)};
995 + float s[4] = {1,2,3,4};
998 + float e[4] = {0.0};
1000 + mask.x = _mm_loadu_si128 ((__m128i *)m);
1001 + u.x = _mm_maskload_ps (s, mask.x);
1003 + for (i = 0 ; i < 4; i++)
1004 + e[i] = m[i] ? s[i] : 0;
1006 + if (check_union128 (u, e))
1009 Index: gcc/testsuite/gcc.target/i386/avx-vmaskmovpd-256-1.c
1010 ===================================================================
1011 --- gcc/testsuite/gcc.target/i386/avx-vmaskmovpd-256-1.c (.../tags/gcc_4_5_2_release) (wersja 169176)
1012 +++ gcc/testsuite/gcc.target/i386/avx-vmaskmovpd-256-1.c (.../branches/gcc-4_5-branch) (wersja 169176)
1017 - long long m[8] = {mask_v(0), mask_v(1), mask_v(2), mask_v(3)};
1018 + long long m[4] = {mask_v(0), mask_v(1), mask_v(2), mask_v(3)};
1019 double s[4] = {1.1, 2.2, 3.3, 4.4};
1020 - union256d u, mask;
1023 double e [4] = {0.0};
1025 - mask.x = _mm256_loadu_pd ((double*)m);
1026 + mask.x = _mm256_loadu_si256 ((__m256i *)m);
1027 u.x = _mm256_maskload_pd (s, mask.x);
1029 for (i = 0 ; i < 4; i++)
1030 Index: gcc/testsuite/gcc.target/i386/avx-vmaskmovpd-1.c
1031 ===================================================================
1032 --- gcc/testsuite/gcc.target/i386/avx-vmaskmovpd-1.c (.../tags/gcc_4_5_2_release) (wersja 0)
1033 +++ gcc/testsuite/gcc.target/i386/avx-vmaskmovpd-1.c (.../branches/gcc-4_5-branch) (wersja 169176)
1035 +/* { dg-do run } */
1036 +/* { dg-require-effective-target avx } */
1037 +/* { dg-options "-O2 -mavx" } */
1039 +#include "avx-check.h"
1045 +#define mask_v(pos) (((MASK & (0x1ULL << (pos))) >> (pos)) << 63)
1051 + long long m[2] = {mask_v(0), mask_v(1)};
1052 + double s[2] = {1.1, 2.2};
1055 + double e[2] = {0.0};
1057 + mask.x = _mm_loadu_si128 ((__m128i *)m);
1058 + u.x = _mm_maskload_pd (s, mask.x);
1060 + for (i = 0 ; i < 2; i++)
1061 + e[i] = m[i] ? s[i] : 0;
1063 + if (check_union128d (u, e))
1066 Index: gcc/testsuite/gcc.target/i386/pr46865-1.c
1067 ===================================================================
1068 --- gcc/testsuite/gcc.target/i386/pr46865-1.c (.../tags/gcc_4_5_2_release) (wersja 0)
1069 +++ gcc/testsuite/gcc.target/i386/pr46865-1.c (.../branches/gcc-4_5-branch) (wersja 169176)
1071 +/* PR rtl-optimization/46865 */
1072 +/* { dg-do compile } */
1073 +/* { dg-options "-O2" } */
1075 +extern unsigned long f;
1079 + asm volatile ("nop /* asmnop */\n"); \
1081 + asm volatile ("nop /* asmnop */\n");
1085 + asm volatile ("nop /* asmnop */\n" : : "i" (6) : "cx"); \
1087 + asm volatile ("nop /* asmnop */\n" : : "i" (6) : "cx");
1101 +/* { dg-final { scan-assembler-times "asmnop" 2 } } */
1102 Index: gcc/testsuite/gcc.target/i386/pr45852.c
1103 ===================================================================
1104 --- gcc/testsuite/gcc.target/i386/pr45852.c (.../tags/gcc_4_5_2_release) (wersja 0)
1105 +++ gcc/testsuite/gcc.target/i386/pr45852.c (.../branches/gcc-4_5-branch) (wersja 169176)
1107 +/* PR middle-end/45852 */
1108 +/* { dg-options "-O2 -mcmodel=small" } */
1109 +/* { dg-do compile { target { { i?86-*-linux* x86_64-*-linux* } && lp64 } } } */
1110 +/* { dg-require-visibility "" } */
1112 +struct S { int s; };
1114 +volatile struct S globvar __attribute__((visibility ("hidden"))) = { -6 };
1119 + globvar = globvar;
1122 +/* { dg-final { scan-assembler-times "globvar.%?rip" 2 } } */
1123 Index: gcc/testsuite/gcc.target/i386/avx-vmaskmovps-256-2.c
1124 ===================================================================
1125 --- gcc/testsuite/gcc.target/i386/avx-vmaskmovps-256-2.c (.../tags/gcc_4_5_2_release) (wersja 169176)
1126 +++ gcc/testsuite/gcc.target/i386/avx-vmaskmovps-256-2.c (.../branches/gcc-4_5-branch) (wersja 169176)
1129 int m[8] = {mask_v(0), mask_v(1), mask_v(2), mask_v(3), mask_v(4), mask_v(5), mask_v(6), mask_v(7)};
1130 float s[8] = {1,2,3,4,5,6,7,8};
1131 - union256 src, mask;
1134 float e [8] = {0.0};
1135 float d [8] = {0.0};
1137 src.x = _mm256_loadu_ps (s);
1138 - mask.x = _mm256_loadu_ps ((float *)m);
1139 + mask.x = _mm256_loadu_si256 ((__m256i *)m);
1140 _mm256_maskstore_ps (d, mask.x, src.x);
1142 for (i = 0 ; i < 8; i++)
1143 Index: gcc/testsuite/gcc.target/i386/avx-vmaskmovps-2.c
1144 ===================================================================
1145 --- gcc/testsuite/gcc.target/i386/avx-vmaskmovps-2.c (.../tags/gcc_4_5_2_release) (wersja 0)
1146 +++ gcc/testsuite/gcc.target/i386/avx-vmaskmovps-2.c (.../branches/gcc-4_5-branch) (wersja 169176)
1148 +/* { dg-do run } */
1149 +/* { dg-require-effective-target avx } */
1150 +/* { dg-options "-O2 -mavx" } */
1152 +#include "avx-check.h"
1158 +#define mask_v(pos) (((MASK & (0x1 << (pos))) >> (pos)) << 31)
1164 + int m[4] = {mask_v(0), mask_v(1), mask_v(2), mask_v(3)};
1165 + float s[4] = {1,2,3,4};
1168 + float e[4] = {0.0};
1169 + float d[4] = {0.0};
1171 + src.x = _mm_loadu_ps (s);
1172 + mask.x = _mm_loadu_si128 ((__m128i *)m);
1173 + _mm_maskstore_ps (d, mask.x, src.x);
1175 + for (i = 0 ; i < 4; i++)
1176 + e[i] = m[i] ? s[i] : 0;
1178 + if (checkVf (d, e, 4))
1181 Index: gcc/testsuite/gcc.target/i386/avx-vmaskmovpd-256-2.c
1182 ===================================================================
1183 --- gcc/testsuite/gcc.target/i386/avx-vmaskmovpd-256-2.c (.../tags/gcc_4_5_2_release) (wersja 169176)
1184 +++ gcc/testsuite/gcc.target/i386/avx-vmaskmovpd-256-2.c (.../branches/gcc-4_5-branch) (wersja 169176)
1186 double s[4] = {1.1, 2.2, 3.3, 4.4};
1187 double e [4] = {0.0};
1188 double d [4] = {0.0};
1189 - union256d src, mask;
1193 src.x = _mm256_loadu_pd (s);
1194 - mask.x = _mm256_loadu_pd ((double*)m);
1195 + mask.x = _mm256_loadu_si256 ((__m256i *)m);
1196 _mm256_maskstore_pd (d, mask.x, src.x);
1198 for (i = 0 ; i < 4; i++)
1199 Index: gcc/testsuite/gcc.target/i386/avx-vmaskmovpd-2.c
1200 ===================================================================
1201 --- gcc/testsuite/gcc.target/i386/avx-vmaskmovpd-2.c (.../tags/gcc_4_5_2_release) (wersja 0)
1202 +++ gcc/testsuite/gcc.target/i386/avx-vmaskmovpd-2.c (.../branches/gcc-4_5-branch) (wersja 169176)
1204 +/* { dg-do run } */
1205 +/* { dg-require-effective-target avx } */
1206 +/* { dg-options "-O2 -mavx" } */
1208 +#include "avx-check.h"
1214 +#define mask_v(pos) (((MASK & (0x1ULL << (pos))) >> (pos)) << 63)
1220 + long long m[2] = {mask_v(0), mask_v(1)};
1221 + double s[2] = {1.1, 2.2};
1222 + double e[2] = {0.0};
1223 + double d[2] = {0.0};
1227 + src.x = _mm_loadu_pd (s);
1228 + mask.x = _mm_loadu_si128 ((__m128i *)m);
1229 + _mm_maskstore_pd (d, mask.x, src.x);
1231 + for (i = 0 ; i < 2; i++)
1232 + e[i] = m[i] ? s[i] : 0;
1234 + if (checkVd (d, e, 2))
1237 Index: gcc/testsuite/gcc.target/i386/pr46865-2.c
1238 ===================================================================
1239 --- gcc/testsuite/gcc.target/i386/pr46865-2.c (.../tags/gcc_4_5_2_release) (wersja 0)
1240 +++ gcc/testsuite/gcc.target/i386/pr46865-2.c (.../branches/gcc-4_5-branch) (wersja 169176)
1242 +/* PR rtl-optimization/46865 */
1243 +/* { dg-do compile } */
1244 +/* { dg-options "-O2 -save-temps" } */
1246 +extern unsigned long f;
1250 + asm volatile ("nop /* asmnop */\n"); \
1252 + asm volatile ("nop /* asmnop */\n");
1256 + asm volatile ("nop /* asmnop */\n" : : "i" (6) : "cx"); \
1258 + asm volatile ("nop /* asmnop */\n" : : "i" (6) : "cx");
1272 +/* { dg-final { scan-assembler-times "asmnop" 2 } } */
1273 +/* { dg-final { cleanup-saved-temps } } */
1274 Index: gcc/testsuite/gnat.dg/opt13.adb
1275 ===================================================================
1276 --- gcc/testsuite/gnat.dg/opt13.adb (.../tags/gcc_4_5_2_release) (wersja 0)
1277 +++ gcc/testsuite/gnat.dg/opt13.adb (.../branches/gcc-4_5-branch) (wersja 169176)
1280 +-- { dg-options "-O" }
1282 +with Opt13_Pkg; use Opt13_Pkg;
1289 + raise Program_Error;
1292 Index: gcc/testsuite/gnat.dg/opt13_pkg.adb
1293 ===================================================================
1294 --- gcc/testsuite/gnat.dg/opt13_pkg.adb (.../tags/gcc_4_5_2_release) (wersja 0)
1295 +++ gcc/testsuite/gnat.dg/opt13_pkg.adb (.../branches/gcc-4_5-branch) (wersja 169176)
1297 +package body Opt13_Pkg is
1299 + subtype Index_Type is Natural range 0 .. 16;
1301 + type Arr is array (Index_Type range <>) of Integer;
1303 + type Rec is record
1304 + F1, F2, F3 : Float;
1310 + type Data (D : Index_Type) is record
1315 + Zero : constant Rec := (0.0, 0.0, 0.0, 0, False, False, 0.0);
1317 + procedure Allocate (T : out My_Type) is
1319 + T := new Data (Index_Type'last);
1322 + for I in 1 .. T.A'last loop
1328 Index: gcc/testsuite/gnat.dg/opt13_pkg.ads
1329 ===================================================================
1330 --- gcc/testsuite/gnat.dg/opt13_pkg.ads (.../tags/gcc_4_5_2_release) (wersja 0)
1331 +++ gcc/testsuite/gnat.dg/opt13_pkg.ads (.../branches/gcc-4_5-branch) (wersja 169176)
1333 +package Opt13_Pkg is
1337 + type My_Type is private;
1339 + procedure Allocate (T : out My_Type);
1345 + type My_Type is access Data;
1348 Index: gcc/testsuite/gcc.dg/pr47201.c
1349 ===================================================================
1350 --- gcc/testsuite/gcc.dg/pr47201.c (.../tags/gcc_4_5_2_release) (wersja 0)
1351 +++ gcc/testsuite/gcc.dg/pr47201.c (.../branches/gcc-4_5-branch) (wersja 169176)
1353 +/* PR target/47201 */
1354 +/* { dg-do compile } */
1355 +/* { dg-options "-O -fpic -g" { target fpic } } */
1359 + __UINTPTR_TYPE__ m;
1367 + (__UINTPTR_TYPE__)&u
1369 + return u.d == v.d;
1371 Index: gcc/testsuite/gcc.dg/pr46893.c
1372 ===================================================================
1373 --- gcc/testsuite/gcc.dg/pr46893.c (.../tags/gcc_4_5_2_release) (wersja 0)
1374 +++ gcc/testsuite/gcc.dg/pr46893.c (.../branches/gcc-4_5-branch) (wersja 169176)
1376 +/* PR debug/46893 */
1377 +/* { dg-do compile } */
1378 +/* { dg-options "-O -g" } */
1383 + union { unsigned long long l; double d; } u = { 0x7ff0000000000000ULL };
1384 + double v = 0, w = -u.d;
1389 Index: gcc/testsuite/gcc.dg/20061124-1.c
1390 ===================================================================
1391 --- gcc/testsuite/gcc.dg/20061124-1.c (.../tags/gcc_4_5_2_release) (wersja 169176)
1392 +++ gcc/testsuite/gcc.dg/20061124-1.c (.../branches/gcc-4_5-branch) (wersja 169176)
1395 /* { dg-require-effective-target sync_char_short } */
1396 +/* { dg-options "-mcpu=v9" { target sparc*-*-* } } */
1398 /* This testcase failed on s390 because no compare instruction for
1399 the check of FLAG was emitted. */
1400 Index: gcc/testsuite/gcc.dg/debug/pr46782.c
1401 ===================================================================
1402 --- gcc/testsuite/gcc.dg/debug/pr46782.c (.../tags/gcc_4_5_2_release) (wersja 0)
1403 +++ gcc/testsuite/gcc.dg/debug/pr46782.c (.../branches/gcc-4_5-branch) (wersja 169176)
1405 +/* PR debug/46782 */
1406 +/* { dg-do compile } */
1407 +/* { dg-options "-w -O0 -fvar-tracking -fcompare-debug" } */
1416 Index: gcc/testsuite/gcc.dg/graphite/run-id-pr46758.c
1417 ===================================================================
1418 --- gcc/testsuite/gcc.dg/graphite/run-id-pr46758.c (.../tags/gcc_4_5_2_release) (wersja 0)
1419 +++ gcc/testsuite/gcc.dg/graphite/run-id-pr46758.c (.../branches/gcc-4_5-branch) (wersja 169176)
1422 +movegt (int y, long long a)
1426 + for (i = 0; i < y; i++)
1427 + if (a == -1LL << 33)
1435 + if (movegt (1, -1LL << 33) != -1)
1436 + __builtin_abort ();
1439 Index: gcc/testsuite/gcc.dg/graphite/pr45552.c
1440 ===================================================================
1441 --- gcc/testsuite/gcc.dg/graphite/pr45552.c (.../tags/gcc_4_5_2_release) (wersja 0)
1442 +++ gcc/testsuite/gcc.dg/graphite/pr45552.c (.../branches/gcc-4_5-branch) (wersja 169176)
1462 +static void *array_from_ObjectSmooth( ObjectSmooth *obj )
1465 + VertexArray *array = (VertexArray *) __builtin_malloc( sizeof( VertexArray ) );
1466 + array->vertex = (float *) __builtin_malloc( 3*sizeof(float)*obj->num_vertex );
1467 + array->normal = (float *) __builtin_malloc( 3*sizeof(float)*obj->num_vertex );
1468 + for (i=0, j=0; i<obj->num_vertex; ++i) {
1469 + array->normal[j++] = 9;
1470 + array->vertex[j] = obj->vertex[i].z;
1471 + array->normal[j++] = 1;
1474 +static void draw_cell( void )
1476 + glCallList( array_from_ObjectSmooth( (ObjectSmooth *) __builtin_malloc(10) ));
1478 +static int render( State *st)
1481 + for (b=0; b<st->num_cells; ++b) {
1486 +reshape_glcells( int width, int height )
1490 Index: gcc/testsuite/gcc.dg/torture/pr47365.c
1491 ===================================================================
1492 --- gcc/testsuite/gcc.dg/torture/pr47365.c (.../tags/gcc_4_5_2_release) (wersja 0)
1493 +++ gcc/testsuite/gcc.dg/torture/pr47365.c (.../branches/gcc-4_5-branch) (wersja 169176)
1495 +/* { dg-do run } */
1508 +struct B b = { 0, 3 };
1513 + if (b.a[0].i != i)
1520 + if (b.a[1].i == i)
1521 + __builtin_abort ();
1523 + if (b.a[0].i == 0)
1524 + __builtin_abort ();
1534 Index: gcc/testsuite/gcc.dg/tree-ssa/pr47392.c
1535 ===================================================================
1536 --- gcc/testsuite/gcc.dg/tree-ssa/pr47392.c (.../tags/gcc_4_5_2_release) (wersja 0)
1537 +++ gcc/testsuite/gcc.dg/tree-ssa/pr47392.c (.../branches/gcc-4_5-branch) (wersja 169176)
1539 +/* { dg-do run } */
1540 +/* { dg-options "-O2 -fdump-tree-pre-stats" } */
1553 +struct B b = { 0, 3 };
1558 + if (b.a[0].i != i)
1565 + if (b.a[1].i == i)
1566 + __builtin_abort ();
1568 + if (b.a[0].i == 0)
1569 + __builtin_abort ();
1579 +/* { dg-final { scan-tree-dump "Eliminated: 1" "pre" } } */
1580 +/* { dg-final { cleanup-tree-dump "pre" } } */
1581 Index: gcc/testsuite/gcc.dg/tree-ssa/pr47286.c
1582 ===================================================================
1583 --- gcc/testsuite/gcc.dg/tree-ssa/pr47286.c (.../tags/gcc_4_5_2_release) (wersja 0)
1584 +++ gcc/testsuite/gcc.dg/tree-ssa/pr47286.c (.../branches/gcc-4_5-branch) (wersja 169176)
1586 +/* { dg-do compile } */
1587 +/* { dg-skip-if "" { ! { i?86-*-* x86_64-*-* } } { "*" } { "" } } */
1588 +/* { dg-options "-O2 -fdump-tree-optimized" } */
1590 +struct thread_info { int preempt_count; };
1591 +static inline struct thread_info *current_thread_info(void)
1593 + register struct thread_info *sp asm("esp");
1596 +void testcase(void)
1598 + current_thread_info()->preempt_count += 1;
1601 +/* We have to make sure that alias analysis treats sp as pointing
1602 + to globals and thus the store not optimized away. */
1604 +/* { dg-final { scan-tree-dump "->preempt_count =" "optimized" } } */
1605 +/* { dg-final { cleanup-tree-dump "optimized" } } */
1606 Index: gcc/testsuite/gcc.dg/pr28796-2.c
1607 ===================================================================
1608 --- gcc/testsuite/gcc.dg/pr28796-2.c (.../tags/gcc_4_5_2_release) (wersja 169176)
1609 +++ gcc/testsuite/gcc.dg/pr28796-2.c (.../branches/gcc-4_5-branch) (wersja 169176)
1611 /* { dg-options "-O2 -funsafe-math-optimizations -fno-finite-math-only -DUNSAFE" } */
1612 /* { dg-add-options ieee } */
1613 /* { dg-skip-if "No Inf/NaN support" { spu-*-* } } */
1614 +/* { dg-skip-if "Bug in _Q_dtoq" { sparc*-sun-solaris2.8 } } */
1616 #include "tg-tests.h"
1618 Index: gcc/testsuite/gcc.dg/vect/pr43430-1.c
1619 ===================================================================
1620 --- gcc/testsuite/gcc.dg/vect/pr43430-1.c (.../tags/gcc_4_5_2_release) (wersja 169176)
1621 +++ gcc/testsuite/gcc.dg/vect/pr43430-1.c (.../branches/gcc-4_5-branch) (wersja 169176)
1623 return foo (data_ch1, data_ch2, 1);
1626 -/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
1627 +/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vect_condition } } } */
1628 /* { dg-final { cleanup-tree-dump "vect" } } */
1629 Index: gcc/testsuite/gcc.dg/vect/slp-multitypes-2.c
1630 ===================================================================
1631 --- gcc/testsuite/gcc.dg/vect/slp-multitypes-2.c (.../tags/gcc_4_5_2_release) (wersja 169176)
1632 +++ gcc/testsuite/gcc.dg/vect/slp-multitypes-2.c (.../branches/gcc-4_5-branch) (wersja 169176)
1634 /* { dg-require-effective-target vect_int } */
1635 +/* { dg-do run { xfail { sparc*-*-* && ilp32 } } } PR rtl-opt/46603 */
1639 Index: gcc/testsuite/ChangeLog
1640 ===================================================================
1641 --- gcc/testsuite/ChangeLog (.../tags/gcc_4_5_2_release) (wersja 169176)
1642 +++ gcc/testsuite/ChangeLog (.../branches/gcc-4_5-branch) (wersja 169176)
1644 +2011-01-24 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1646 + * gfortran.dg/cray_pointers_2.f90: Avoid cycling through
1647 + optimization options.
1649 +2011-01-24 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1651 + * gfortran.dg/array_constructor_33.f90: Use dg-timeout-factor 4.
1653 +2011-01-21 Richard Guenther <rguenther@suse.de>
1655 + PR tree-optimization/47365
1656 + * gcc.dg/torture/pr47365.c: New testcase.
1657 + * gcc.dg/tree-ssa/pr47392.c: Likewise.
1659 +2011-01-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1661 + * g++.dg/other/anon5.C: Skip on mips-sgi-irix*.
1663 +2011-01-17 Eric Botcazou <ebotcazou@adacore.com>
1665 + Backport from mainline
1666 + 2010-11-22 Eric Botcazou <ebotcazou@adacore.com>
1668 + * gcc.dg/pr28796-2.c: SKIP on SPARC/Solaris 8.
1670 + PR rtl-optimization/46603
1671 + * gcc.dg/vect/slp-multitypes-2.c: XFAIL execution on SPARC 32-bit.
1673 + 2010-08-31 Bingfeng Mei <bmei@broadcom.com>
1675 + * gcc.dg/vect/pr43430-1.c: Requires vect_condition target.
1677 +2011-01-17 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1679 + * g++.old-deja/g++.other/init19.C: Don't XFAIL on mips-sgi-irix*.
1681 +2011-01-17 H.J. Lu <hongjiu.lu@intel.com>
1683 + Backport from mainline
1684 + 2011-01-17 H.J. Lu <hongjiu.lu@intel.com>
1687 + * gcc.target/i386/avx-vmaskmovpd-1.c: New.
1688 + * gcc.target/i386/avx-vmaskmovpd-2.c: Likewise.
1689 + * gcc.target/i386/avx-vmaskmovps-1.c: Likewise.
1690 + * gcc.target/i386/avx-vmaskmovps-1.c: Likewise.
1692 + * gcc.target/i386/avx-vmaskmovpd-256-1.c (avx_test): Load mask
1694 + * gcc.target/i386/avx-vmaskmovpd-256-2.c (avx_test): Likewise.
1695 + * gcc.target/i386/avx-vmaskmovps-256-1.c (avx_test): Likewise.
1696 + * gcc.target/i386/avx-vmaskmovps-256-2.c (avx_test): Likewise.
1698 +2011-01-17 Richard Guenther <rguenther@suse.de>
1700 + Backport from mainline
1701 + PR tree-optimization/47286
1702 + * gcc.dg/tree-ssa/pr47286.c: New testcase.
1704 + PR tree-optimization/44592
1705 + * gfortran.dg/pr44592.f90: New testcase.
1707 +2011-01-16 Jakub Jelinek <jakub@redhat.com>
1709 + Backport from mainline
1710 + 2011-01-07 Jakub Jelinek <jakub@redhat.com>
1713 + * gcc.dg/pr47201.c: New test.
1715 + 2011-01-06 Jakub Jelinek <jakub@redhat.com>
1718 + * gcc.c-torture/compile/pr47150.c: New test.
1720 + 2010-12-21 Jakub Jelinek <jakub@redhat.com>
1723 + * gcc.target/i386/pr46880.c: New test.
1725 + PR middle-end/45852
1726 + * gcc.target/i386/pr45852.c: New test.
1728 + 2010-12-16 Jakub Jelinek <jakub@redhat.com>
1730 + PR tree-optimization/43655
1731 + * g++.dg/opt/pr43655.C: New test.
1734 + * gcc.dg/pr46893.c: New test.
1736 + 2010-12-10 Jakub Jelinek <jakub@redhat.com>
1738 + PR rtl-optimization/46804
1739 + * gfortran.dg/pr46804.f90: New test.
1741 + PR rtl-optimization/46865
1742 + * gcc.target/i386/pr46865-1.c: New test.
1743 + * gcc.target/i386/pr46865-2.c: New test.
1745 + PR tree-optimization/46864
1746 + * g++.dg/opt/pr46864.C: New test.
1748 +2011-01-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1750 + * gfortran.dg/cray_pointers_2.f90: Use dg-timeout-factor 4.
1752 +2011-01-12 Eric Botcazou <ebotcazou@adacore.com>
1754 + PR testsuite/33033
1755 + * gcc.dg/20061124-1.c: Pass -mcpu=v9 on the SPARC.
1757 +2011-02-01 Thomas Koenig <tkoenig@gcc.gnu.org>
1759 + Backport from mainline
1761 + * gfortran.dg/userdef_operator_2.f90: New test case.
1763 +2010-12-27 Yao Qi <yao@codesourcery.com>
1765 + Backport from mainline:
1766 + 2010-10-14 Yao Qi <yao@codesourcery.com>
1769 + * gcc.target/arm/pr45447.c: New test.
1771 +2010-12-24 Eric Botcazou <ebotcazou@adacore.com>
1773 + * gnat.dg/opt13_pkg.ad[sb]: Fix line ending.
1775 +2010-12-22 Sebastian Pop <sebastian.pop@amd.com>
1777 + PR tree-optimization/46758
1778 + * gcc.dg/graphite/run-id-pr46758.c: New.
1780 +2010-12-23 Sebastian Pop <sebastian.pop@amd.com>
1782 + PR tree-optimization/45552
1783 + * gcc.dg/graphite/pr45552.c
1786 +2010-12-23 Sebastian Pop <sebastian.pop@amd.com>
1788 + PR tree-optimization/43023
1789 + * gfortran.dg/ldist-1.f90: Adjust pattern.
1790 + * gfortran.dg/ldist-pr43023.f90: New.
1792 +2010-12-21 Martin Jambor <mjambor@suse.cz>
1794 + PR middle-end/46734
1795 + * g++.dg/tree-ssa/pr46734.C: New test.
1797 +2010-12-18 Alexandre Oliva <aoliva@redhat.com>
1800 + * gfortran.dg/debug/pr46756.f: New.
1802 +2010-12-18 Alexandre Oliva <aoliva@redhat.com>
1805 + * gcc.dg/debug/pr46782.c: New.
1807 +2010-12-17 Daniel Kraft <d@domob.eu>
1810 + * gfortran.dg/power2.f90: Initialize variables.
1812 +2010-12-16 Eric Botcazou <ebotcazou@adacore.com>
1814 + * gnat.dg/opt13.adb: New test.
1815 + * gnat.dg/opt13_pkg.ad[sb]: New helper.
1817 2010-12-16 Release Manager
1819 * GCC 4.5.2 released.
1820 Index: gcc/testsuite/g++.old-deja/g++.other/init19.C
1821 ===================================================================
1822 --- gcc/testsuite/g++.old-deja/g++.other/init19.C (.../tags/gcc_4_5_2_release) (wersja 169176)
1823 +++ gcc/testsuite/g++.old-deja/g++.other/init19.C (.../branches/gcc-4_5-branch) (wersja 169176)
1825 -// { dg-do run { xfail { { ! cxa_atexit } && { ! *-*-solaris2* } } } }
1826 +// { dg-do run { xfail { { ! cxa_atexit } && { ! { mips-sgi-irix* *-*-solaris2* } } } } }
1829 #define assert(x) do { if (! (x)) abort(); } while (0)
1830 Index: gcc/testsuite/g++.dg/other/anon5.C
1831 ===================================================================
1832 --- gcc/testsuite/g++.dg/other/anon5.C (.../tags/gcc_4_5_2_release) (wersja 169176)
1833 +++ gcc/testsuite/g++.dg/other/anon5.C (.../branches/gcc-4_5-branch) (wersja 169176)
1836 -// { dg-do link { target { ! { *-*-darwin* *-*-hpux* *-*-solaris2.* alpha*-dec-osf* } } } }
1837 +// { dg-do link { target { ! { *-*-darwin* *-*-hpux* *-*-solaris2.* alpha*-dec-osf* mips-sgi-irix* } } } }
1838 // { dg-options "-g" }
1841 Index: gcc/testsuite/g++.dg/tree-ssa/pr46734.C
1842 ===================================================================
1843 --- gcc/testsuite/g++.dg/tree-ssa/pr46734.C (.../tags/gcc_4_5_2_release) (wersja 0)
1844 +++ gcc/testsuite/g++.dg/tree-ssa/pr46734.C (.../branches/gcc-4_5-branch) (wersja 169176)
1846 +/* { dg-do compile } */
1847 +/* { dg-options "-O -fipa-sra" } */
1852 + A() {p = (int *) -1;}
1853 + ~A() {if (p && p != (int *) -1) *p = 0;}
1860 + B() : a() {data[0] = 0;}
1868 +static int * __attribute__ ((noinline)) foo (B *b, void *z)
1870 + __builtin_memcpy (gz, z, 28);
1875 +int *bar (B *b, void *z)
1878 + return foo (b, z);
1880 Index: gcc/testsuite/g++.dg/opt/pr43655.C
1881 ===================================================================
1882 --- gcc/testsuite/g++.dg/opt/pr43655.C (.../tags/gcc_4_5_2_release) (wersja 0)
1883 +++ gcc/testsuite/g++.dg/opt/pr43655.C (.../branches/gcc-4_5-branch) (wersja 169176)
1885 +// PR tree-optimization/43655
1887 +// { dg-options "-O0 -ftree-ter" }
1889 +extern "C" void abort ();
1893 + C (int i) : val(i) { }
1894 + C (const C& c) : val(c.val) { }
1895 + ~C (void) { val = 999; }
1896 + C& operator = (const C& c) { val = c.val; return *this; }
1897 + C& inc (int i) { val += i; return *this; }
1910 + return f ().inc (i);
1916 + if (f (2).val != 5)
1919 Index: gcc/testsuite/g++.dg/opt/pr46864.C
1920 ===================================================================
1921 --- gcc/testsuite/g++.dg/opt/pr46864.C (.../tags/gcc_4_5_2_release) (wersja 0)
1922 +++ gcc/testsuite/g++.dg/opt/pr46864.C (.../branches/gcc-4_5-branch) (wersja 169176)
1924 +// PR tree-optimization/46864
1925 +// { dg-do compile }
1926 +// { dg-options "-O -fnon-call-exceptions" }
1933 + bool bar () throw ()
1936 + for (int i = 0; i < m; i++)
1947 + while (baz () && s->bar ())
1950 Index: gcc/testsuite/gfortran.dg/ldist-1.f90
1951 ===================================================================
1952 --- gcc/testsuite/gfortran.dg/ldist-1.f90 (.../tags/gcc_4_5_2_release) (wersja 169176)
1953 +++ gcc/testsuite/gfortran.dg/ldist-1.f90 (.../branches/gcc-4_5-branch) (wersja 169176)
1956 end Subroutine PADEC
1958 -! { dg-final { scan-tree-dump-times "distributed: split to 4 loops" 1 "ldist" } }
1959 +! There are 5 legal partitions in this code. Based on the data
1960 +! locality heuristic, this loop should not be split.
1962 +! { dg-final { scan-tree-dump-not "distributed: split to" "ldist" } }
1963 ! { dg-final { cleanup-tree-dump "ldist" } }
1964 Index: gcc/testsuite/gfortran.dg/debug/pr46756.f
1965 ===================================================================
1966 --- gcc/testsuite/gfortran.dg/debug/pr46756.f (.../tags/gcc_4_5_2_release) (wersja 0)
1967 +++ gcc/testsuite/gfortran.dg/debug/pr46756.f (.../branches/gcc-4_5-branch) (wersja 169176)
1969 +C PR debug/46756, reduced from ../20010519-1.f
1970 +C { dg-do compile }
1971 +C { dg-options "-O -fcompare-debug" }
1972 + LOGICAL QDISK,QDW,QCMPCT
1973 + LOGICAL LNOMA,LRAISE,LSCI,LBIG
1974 + ASSIGN 801 TO I800 ! { dg-warning "Deleted feature: ASSIGN" "Deleted feature: ASSIGN" }
1977 + ASSIGN 761 TO I760 ! { dg-warning "Deleted feature: ASSIGN" "Deleted feature: ASSIGN" }
1983 + DO WHILE((CVGMX.GT.TOLDIM).AND.(ITER.LT.ITMX))
1985 + ASSIGN 641 to I640 ! { dg-warning "Deleted feature: ASSIGN" "Deleted feature: ASSIGN" }
1992 + GOTO I640 ! { dg-warning "Deleted feature: Assigned" "Assigned GO TO" }
1994 + GOTO I760 ! { dg-warning "Deleted feature: Assigned" "Assigned GO TO" }
1996 + GOTO I800 ! { dg-warning "Deleted feature: Assigned" "Assigned GO TO" }
1998 Index: gcc/testsuite/gfortran.dg/cray_pointers_2.f90
1999 ===================================================================
2000 --- gcc/testsuite/gfortran.dg/cray_pointers_2.f90 (.../tags/gcc_4_5_2_release) (wersja 169176)
2001 +++ gcc/testsuite/gfortran.dg/cray_pointers_2.f90 (.../branches/gcc-4_5-branch) (wersja 169176)
2004 -! { dg-options "-fcray-pointer -fbounds-check" }
2005 +! Using two spaces between dg-do and run is a hack to keep gfortran-dg-runtest
2006 +! from cycling through optimization options for this expensive test.
2008 +! { dg-options "-O3 -fcray-pointer -fbounds-check" }
2009 +! { dg-timeout-factor 4 }
2010 ! Series of routines for testing a Cray pointer implementation
2012 common /errors/errors(400)
2013 Index: gcc/testsuite/gfortran.dg/dependency_39.f90
2014 ===================================================================
2015 --- gcc/testsuite/gfortran.dg/dependency_39.f90 (.../tags/gcc_4_5_2_release) (wersja 0)
2016 +++ gcc/testsuite/gfortran.dg/dependency_39.f90 (.../branches/gcc-4_5-branch) (wersja 169176)
2019 +! PR 45777 - component ref aliases when both are pointers
2022 + integer, dimension(:), allocatable :: data
2025 + subroutine s1(t,d)
2026 + integer, dimension(:), pointer :: d
2027 + type(t1), pointer :: t
2028 + d(1:5)=t%data(3:7)
2030 + subroutine s2(d,t)
2031 + integer, dimension(:), pointer :: d
2032 + type(t1), pointer :: t
2033 + t%data(3:7) = d(1:5)
2039 + type(t1), pointer :: t
2040 + integer, dimension(:), pointer :: d
2042 + allocate(t%data(10))
2043 + t%data=(/(i,i=1,10)/)
2046 + if (any(d.ne.(/3,4,5,6,7/))) call abort()
2047 + t%data=(/(i,i=1,10)/)
2050 + if (any(t%data.ne.(/1,2,1,2,3,4,5,8,9,10/))) call abort
2051 + deallocate(t%data)
2054 +! { dg-final { cleanup-modules "m1" } }
2055 Index: gcc/testsuite/gfortran.dg/ldist-pr43023.f90
2056 ===================================================================
2057 --- gcc/testsuite/gfortran.dg/ldist-pr43023.f90 (.../tags/gcc_4_5_2_release) (wersja 0)
2058 +++ gcc/testsuite/gfortran.dg/ldist-pr43023.f90 (.../branches/gcc-4_5-branch) (wersja 169176)
2060 +! { dg-do compile }
2061 +! { dg-options "-O2 -ftree-loop-distribution" }
2068 +real, dimension(:,:), allocatable :: Angle
2069 +real, dimension(:), allocatable :: exth, ezth, hxth, hyth, hyphi
2073 +SUBROUTINE NFT_Init()
2082 + exth(n) = cos(fi)*cos(th)
2083 + ezth(n) = -sin(th)
2084 + hxth(n) = -sin(fi)
2086 + hyphi(n) = -sin(fi)
2088 +END SUBROUTINE NFT_Init
2091 Index: gcc/testsuite/gfortran.dg/pr44592.f90
2092 ===================================================================
2093 --- gcc/testsuite/gfortran.dg/pr44592.f90 (.../tags/gcc_4_5_2_release) (wersja 0)
2094 +++ gcc/testsuite/gfortran.dg/pr44592.f90 (.../branches/gcc-4_5-branch) (wersja 169176)
2097 +! { dg-options "-O3" }
2098 +! From forall_12.f90
2099 +! Fails with loop reversal at -O3
2101 + character(len=1) :: b(4) = (/"1","2","3","4"/), c(4)
2104 + ! This statement must be here for the abort below
2105 + b(1:3)(i:i) = b(2:4)(i:i)
2108 + b(4:2:-1)(i:i) = b(3:1:-1)(i:i)
2110 + ! This fails. If the condition is printed, the result is F F F F
2111 + if (any (b .ne. (/"1","1","2","3"/))) i = 2
2113 + print *, b .ne. (/"1","1","2","3"/)
2114 + if (i == 2) call abort
2116 Index: gcc/testsuite/gfortran.dg/userdef_operator_2.f90
2117 ===================================================================
2118 --- gcc/testsuite/gfortran.dg/userdef_operator_2.f90 (.../tags/gcc_4_5_2_release) (wersja 0)
2119 +++ gcc/testsuite/gfortran.dg/userdef_operator_2.f90 (.../branches/gcc-4_5-branch) (wersja 169176)
2121 +! { dg-do compile }
2122 +! PR 45338 - no ICE when cmp is not used explicitly.
2123 +! Test case by Simon Smart
2127 + subroutine test_fn (cmp)
2128 + interface operator(.myop.)
2129 + pure function cmp (a, b) result(ret)
2130 + integer, intent(in) :: a, b
2135 + print*, a .myop. b
2136 + end subroutine test_fn
2137 +end module test_mod
2138 Index: gcc/testsuite/gfortran.dg/array_constructor_33.f90
2139 ===================================================================
2140 --- gcc/testsuite/gfortran.dg/array_constructor_33.f90 (.../tags/gcc_4_5_2_release) (wersja 169176)
2141 +++ gcc/testsuite/gfortran.dg/array_constructor_33.f90 (.../branches/gcc-4_5-branch) (wersja 169176)
2144 +! { dg-timeout-factor 4 }
2145 ! PR20923 gfortran slow for large array constructors.
2146 ! Test case prepared from PR by Jerry DeLisle <jvdelisle@gcc.gnu.org>
2148 Index: gcc/testsuite/gfortran.dg/pr46804.f90
2149 ===================================================================
2150 --- gcc/testsuite/gfortran.dg/pr46804.f90 (.../tags/gcc_4_5_2_release) (wersja 0)
2151 +++ gcc/testsuite/gfortran.dg/pr46804.f90 (.../branches/gcc-4_5-branch) (wersja 169176)
2153 +! PR rtl-optimization/46804
2155 +! { dg-options "-O -fPIC -fexpensive-optimizations -fgcse -foptimize-register-move -fpeel-loops -fno-tree-loop-optimize" }
2158 + integer, parameter :: n1 = 2, n2 = 3, n3 = 4, slen = 3
2159 + character (len = slen), dimension (n1, n2, n3) :: a
2160 + integer (kind = 1), dimension (2, 4) :: shift1
2161 + integer (kind = 2), dimension (2, 4) :: shift2
2162 + integer (kind = 4), dimension (2, 4) :: shift3
2166 + a (i1, i2, i3) = 'ab'(i1:i1) // 'cde'(i2:i2) // 'fghi'(i3:i3)
2170 + shift1 (1, :) = (/ 4, 11, 19, 20 /)
2171 + shift1 (2, :) = (/ 55, 5, 1, 2 /)
2174 + call test (cshift (a, shift2, 2))
2175 + call test (cshift (a, shift3, 2))
2177 + subroutine test (b)
2178 + character (len = slen), dimension (n1, n2, n3) :: b
2182 + i2p = mod (shift1 (i1, i3) + i2 - 1, n2) + 1
2183 + if (b (i1, i2, i3) .ne. a (i1, i2p, i3)) call abort
2187 + end subroutine test
2189 Index: gcc/testsuite/gfortran.dg/power2.f90
2190 ===================================================================
2191 --- gcc/testsuite/gfortran.dg/power2.f90 (.../tags/gcc_4_5_2_release) (wersja 169176)
2192 +++ gcc/testsuite/gfortran.dg/power2.f90 (.../branches/gcc-4_5-branch) (wersja 169176)
2194 INTEGER(KIND=1) :: k1
2195 INTEGER(KIND=2) :: k2
2203 Index: gcc/tree-ssa-copyrename.c
2204 ===================================================================
2205 --- gcc/tree-ssa-copyrename.c (.../tags/gcc_4_5_2_release) (wersja 169176)
2206 +++ gcc/tree-ssa-copyrename.c (.../branches/gcc-4_5-branch) (wersja 169176)
2207 @@ -225,11 +225,16 @@
2211 - /* Don't coalesce if the two variables are not of the same type. */
2212 - if (TREE_TYPE (root1) != TREE_TYPE (root2))
2213 + /* Don't coalesce if the two variables aren't type compatible . */
2214 + if (!types_compatible_p (TREE_TYPE (root1), TREE_TYPE (root2))
2215 + /* There is a disconnect between the middle-end type-system and
2216 + VRP, avoid coalescing enum types with different bounds. */
2217 + || ((TREE_CODE (TREE_TYPE (root1)) == ENUMERAL_TYPE
2218 + || TREE_CODE (TREE_TYPE (root2)) == ENUMERAL_TYPE)
2219 + && TREE_TYPE (root1) != TREE_TYPE (root2)))
2222 - fprintf (debug, " : Different types. No coalesce.\n");
2223 + fprintf (debug, " : Incompatible types. No coalesce.\n");
2227 Index: gcc/tree-ssa-ccp.c
2228 ===================================================================
2229 --- gcc/tree-ssa-ccp.c (.../tags/gcc_4_5_2_release) (wersja 169176)
2230 +++ gcc/tree-ssa-ccp.c (.../branches/gcc-4_5-branch) (wersja 169176)
2231 @@ -3355,7 +3355,9 @@
2232 is replaced. If the call is expected to produces a result, then it
2233 is replaced by an assignment of the new RHS to the result variable.
2234 If the result is to be ignored, then the call is replaced by a
2236 + GIMPLE_NOP. A proper VDEF chain is retained by making the first
2237 + VUSE and the last VDEF of the whole sequence be the same as the replaced
2238 + statement and using new SSA names for stores in between. */
2241 gimplify_and_update_call_from_tree (gimple_stmt_iterator *si_p, tree expr)
2242 @@ -3366,17 +3368,36 @@
2243 gimple_stmt_iterator i;
2244 gimple_seq stmts = gimple_seq_alloc();
2245 struct gimplify_ctx gctx;
2246 + gimple last = NULL;
2247 + gimple laststore = NULL;
2248 + tree reaching_vuse;
2250 stmt = gsi_stmt (*si_p);
2252 gcc_assert (is_gimple_call (stmt));
2254 lhs = gimple_call_lhs (stmt);
2255 + reaching_vuse = gimple_vuse (stmt);
2257 push_gimplify_context (&gctx);
2259 if (lhs == NULL_TREE)
2260 - gimplify_and_add (expr, &stmts);
2262 + gimplify_and_add (expr, &stmts);
2263 + /* We can end up with folding a memcpy of an empty class assignment
2264 + which gets optimized away by C++ gimplification. */
2265 + if (gimple_seq_empty_p (stmts))
2267 + pop_gimplify_context (NULL);
2268 + if (gimple_in_ssa_p (cfun))
2270 + unlink_stmt_vdef (stmt);
2271 + release_defs (stmt);
2273 + gsi_remove (si_p, true);
2278 tmp = get_initialized_tmp_var (expr, &stmts, NULL);
2280 @@ -3387,26 +3408,95 @@
2282 /* The replacement can expose previously unreferenced variables. */
2283 for (i = gsi_start (stmts); !gsi_end_p (i); gsi_next (&i))
2285 - new_stmt = gsi_stmt (i);
2286 - find_new_referenced_vars (new_stmt);
2287 - gsi_insert_before (si_p, new_stmt, GSI_NEW_STMT);
2288 - mark_symbols_for_renaming (new_stmt);
2294 + gsi_insert_before (si_p, last, GSI_NEW_STMT);
2297 + new_stmt = gsi_stmt (i);
2298 + if (gimple_in_ssa_p (cfun))
2300 + find_new_referenced_vars (new_stmt);
2301 + mark_symbols_for_renaming (new_stmt);
2303 + /* If the new statement has a VUSE, update it with exact SSA name we
2304 + know will reach this one. */
2305 + if (gimple_vuse (new_stmt))
2307 + /* If we've also seen a previous store create a new VDEF for
2308 + the latter one, and make that the new reaching VUSE. */
2311 + reaching_vuse = make_ssa_name (gimple_vop (cfun), laststore);
2312 + gimple_set_vdef (laststore, reaching_vuse);
2313 + update_stmt (laststore);
2316 + gimple_set_vuse (new_stmt, reaching_vuse);
2317 + gimple_set_modified (new_stmt, true);
2319 + if (gimple_assign_single_p (new_stmt)
2320 + && !is_gimple_reg (gimple_assign_lhs (new_stmt)))
2322 + laststore = new_stmt;
2327 if (lhs == NULL_TREE)
2329 - new_stmt = gimple_build_nop ();
2330 - unlink_stmt_vdef (stmt);
2331 - release_defs (stmt);
2332 + /* If we replace a call without LHS that has a VDEF and our new
2333 + sequence ends with a store we must make that store have the same
2334 + vdef in order not to break the sequencing. This can happen
2335 + for instance when folding memcpy calls into assignments. */
2336 + if (gimple_vdef (stmt) && laststore)
2338 + gimple_set_vdef (laststore, gimple_vdef (stmt));
2339 + if (TREE_CODE (gimple_vdef (stmt)) == SSA_NAME)
2340 + SSA_NAME_DEF_STMT (gimple_vdef (stmt)) = laststore;
2341 + update_stmt (laststore);
2343 + else if (gimple_in_ssa_p (cfun))
2345 + unlink_stmt_vdef (stmt);
2346 + release_defs (stmt);
2354 + gsi_insert_before (si_p, last, GSI_NEW_STMT);
2357 + if (laststore && is_gimple_reg (lhs))
2359 + gimple_set_vdef (laststore, gimple_vdef (stmt));
2360 + update_stmt (laststore);
2361 + if (TREE_CODE (gimple_vdef (stmt)) == SSA_NAME)
2362 + SSA_NAME_DEF_STMT (gimple_vdef (stmt)) = laststore;
2365 + else if (laststore)
2367 + reaching_vuse = make_ssa_name (gimple_vop (cfun), laststore);
2368 + gimple_set_vdef (laststore, reaching_vuse);
2369 + update_stmt (laststore);
2372 new_stmt = gimple_build_assign (lhs, tmp);
2373 - gimple_set_vuse (new_stmt, gimple_vuse (stmt));
2374 - gimple_set_vdef (new_stmt, gimple_vdef (stmt));
2375 - move_ssa_defining_stmt_for_defs (new_stmt, stmt);
2376 + if (!is_gimple_reg (tmp))
2377 + gimple_set_vuse (new_stmt, reaching_vuse);
2378 + if (!is_gimple_reg (lhs))
2380 + gimple_set_vdef (new_stmt, gimple_vdef (stmt));
2381 + if (TREE_CODE (gimple_vdef (stmt)) == SSA_NAME)
2382 + SSA_NAME_DEF_STMT (gimple_vdef (stmt)) = new_stmt;
2384 + else if (reaching_vuse == gimple_vuse (stmt))
2385 + unlink_stmt_vdef (stmt);
2388 gimple_set_location (new_stmt, gimple_location (stmt));
2389 Index: gcc/xcoffout.c
2390 ===================================================================
2391 --- gcc/xcoffout.c (.../tags/gcc_4_5_2_release) (wersja 169176)
2392 +++ gcc/xcoffout.c (.../branches/gcc-4_5-branch) (wersja 169176)
2394 #define ASM_OUTPUT_LINE(FILE,LINENUM) \
2397 + /* Make sure we're in a function and prevent output of .line 0, as \
2398 + line # 0 is meant for symbol addresses in xcoff. Additionally, \
2399 + line numbers are 'unsigned short' in 32-bit mode. */ \
2400 if (xcoff_begin_function_line >= 0) \
2401 - fprintf (FILE, "\t.line\t%d\n", ABS_OR_RELATIVE_LINENO (LINENUM)); \
2403 + int lno = ABS_OR_RELATIVE_LINENO (LINENUM); \
2404 + if (lno > 0 && (TARGET_64BIT || lno <= (int)USHRT_MAX)) \
2405 + fprintf (FILE, "\t.line\t%d\n", lno); \
2411 ===================================================================
2412 --- gcc/jump.c (.../tags/gcc_4_5_2_release) (wersja 169176)
2413 +++ gcc/jump.c (.../branches/gcc-4_5-branch) (wersja 169176)
2415 rtx prev_nonjump_insn = NULL;
2417 for (insn = f; insn; insn = NEXT_INSN (insn))
2418 - if (INSN_P (insn))
2419 + if (NONDEBUG_INSN_P (insn))
2421 mark_jump_label (PATTERN (insn), insn, 0);
2423 @@ -1728,7 +1728,13 @@
2426 if (XINT (x, i) != XINT (y, i))
2429 + if (((code == ASM_OPERANDS && i == 6)
2430 + || (code == ASM_INPUT && i == 1))
2431 + && locator_eq (XINT (x, i), XINT (y, i)))
2439 ===================================================================
2440 --- gcc/expr.c (.../tags/gcc_4_5_2_release) (wersja 169176)
2441 +++ gcc/expr.c (.../branches/gcc-4_5-branch) (wersja 169176)
2442 @@ -4730,7 +4730,10 @@
2443 /* If store_expr stores a DECL whose DECL_RTL(exp) == TARGET,
2444 but TARGET is not valid memory reference, TEMP will differ
2445 from TARGET although it is really the same location. */
2446 - && !(alt_rtl && rtx_equal_p (alt_rtl, target))
2448 + && rtx_equal_p (alt_rtl, target)
2449 + && !side_effects_p (alt_rtl)
2450 + && !side_effects_p (target))
2451 /* If there's nothing to copy, don't bother. Don't call
2452 expr_size unless necessary, because some front-ends (C++)
2453 expr_size-hook must not be given objects that are not
2454 Index: gcc/ada/ChangeLog
2455 ===================================================================
2456 --- gcc/ada/ChangeLog (.../tags/gcc_4_5_2_release) (wersja 169176)
2457 +++ gcc/ada/ChangeLog (.../branches/gcc-4_5-branch) (wersja 169176)
2459 +2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
2461 + * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
2462 + expressions of the parameter cache within the statement group of
2463 + the CICO mechanism.
2465 2010-12-16 Release Manager
2467 * GCC 4.5.2 released.
2468 Index: gcc/ada/gcc-interface/trans.c
2469 ===================================================================
2470 --- gcc/ada/gcc-interface/trans.c (.../tags/gcc_4_5_2_release) (wersja 169176)
2471 +++ gcc/ada/gcc-interface/trans.c (.../branches/gcc-4_5-branch) (wersja 169176)
2472 @@ -2303,6 +2303,31 @@
2474 gnu_result = end_stmt_group ();
2476 + /* If we populated the parameter attributes cache, we need to make sure that
2477 + the cached expressions are evaluated on all the possible paths leading to
2478 + their uses. So we force their evaluation on entry of the function. */
2479 + cache = DECL_STRUCT_FUNCTION (gnu_subprog_decl)->language->parm_attr_cache;
2482 + struct parm_attr_d *pa;
2485 + start_stmt_group ();
2487 + for (i = 0; VEC_iterate (parm_attr, cache, i, pa); i++)
2490 + add_stmt_with_node (pa->first, gnat_node);
2492 + add_stmt_with_node (pa->last, gnat_node);
2494 + add_stmt_with_node (pa->length, gnat_node);
2497 + add_stmt (gnu_result);
2498 + gnu_result = end_stmt_group ();
2501 /* If we are dealing with a return from an Ada procedure with parameters
2502 passed by copy-in/copy-out, we need to return a record containing the
2503 final values of these parameters. If the list contains only one entry,
2504 @@ -2341,30 +2366,6 @@
2506 pop_stack (&gnu_return_label_stack);
2508 - /* If we populated the parameter attributes cache, we need to make sure
2509 - that the cached expressions are evaluated on all possible paths. */
2510 - cache = DECL_STRUCT_FUNCTION (gnu_subprog_decl)->language->parm_attr_cache;
2513 - struct parm_attr_d *pa;
2516 - start_stmt_group ();
2518 - for (i = 0; VEC_iterate (parm_attr, cache, i, pa); i++)
2521 - add_stmt_with_node (pa->first, gnat_node);
2523 - add_stmt_with_node (pa->last, gnat_node);
2525 - add_stmt_with_node (pa->length, gnat_node);
2528 - add_stmt (gnu_result);
2529 - gnu_result = end_stmt_group ();
2532 /* Set the end location. */
2534 ((Present (End_Label (Handled_Statement_Sequence (gnat_node)))
2535 Index: gcc/fortran/trans-array.c
2536 ===================================================================
2537 --- gcc/fortran/trans-array.c (.../tags/gcc_4_5_2_release) (wersja 169176)
2538 +++ gcc/fortran/trans-array.c (.../branches/gcc-4_5-branch) (wersja 169176)
2539 @@ -3389,7 +3389,38 @@
2543 +/* Return true if both symbols could refer to the same data object. Does
2544 + not take account of aliasing due to equivalence statements. */
2547 +symbols_could_alias (gfc_symbol *lsym, gfc_symbol *rsym, bool lsym_pointer,
2548 + bool lsym_target, bool rsym_pointer, bool rsym_target)
2550 + /* Aliasing isn't possible if the symbols have different base types. */
2551 + if (gfc_compare_types (&lsym->ts, &rsym->ts) == 0)
2554 + /* Pointers can point to other pointers and target objects. */
2556 + if ((lsym_pointer && (rsym_pointer || rsym_target))
2557 + || (rsym_pointer && (lsym_pointer || lsym_target)))
2560 + /* Special case: Argument association, cf. F90 12.4.1.6, F2003 12.4.1.7
2561 + and F2008 12.5.2.13 items 3b and 4b. The pointer case (a) is already
2563 + if (lsym->attr.target && rsym->attr.target
2564 + && ((lsym->attr.dummy
2565 + && (!lsym->attr.dimension || lsym->as->type == AS_ASSUMED_SHAPE))
2566 + || (rsym->attr.dummy
2567 + && (!rsym->attr.dimension
2568 + || rsym->as->type == AS_ASSUMED_SHAPE))))
2575 /* Return true if the two SS could be aliased, i.e. both point to the same data
2577 /* TODO: resolve aliases based on frontend expressions. */
2578 @@ -3401,10 +3432,18 @@
2582 + bool lsym_pointer, lsym_target, rsym_pointer, rsym_target;
2584 lsym = lss->expr->symtree->n.sym;
2585 rsym = rss->expr->symtree->n.sym;
2586 - if (gfc_symbols_could_alias (lsym, rsym))
2588 + lsym_pointer = lsym->attr.pointer;
2589 + lsym_target = lsym->attr.target;
2590 + rsym_pointer = rsym->attr.pointer;
2591 + rsym_target = rsym->attr.target;
2593 + if (symbols_could_alias (lsym, rsym, lsym_pointer, lsym_target,
2594 + rsym_pointer, rsym_target))
2597 if (rsym->ts.type != BT_DERIVED
2598 @@ -3419,27 +3458,75 @@
2599 if (lref->type != REF_COMPONENT)
2602 - if (gfc_symbols_could_alias (lref->u.c.sym, rsym))
2603 + lsym_pointer = lsym_pointer || lref->u.c.sym->attr.pointer;
2604 + lsym_target = lsym_target || lref->u.c.sym->attr.target;
2606 + if (symbols_could_alias (lref->u.c.sym, rsym, lsym_pointer, lsym_target,
2607 + rsym_pointer, rsym_target))
2610 + if ((lsym_pointer && (rsym_pointer || rsym_target))
2611 + || (rsym_pointer && (lsym_pointer || lsym_target)))
2613 + if (gfc_compare_types (&lref->u.c.component->ts,
2618 for (rref = rss->expr->ref; rref != rss->data.info.ref;
2621 if (rref->type != REF_COMPONENT)
2624 - if (gfc_symbols_could_alias (lref->u.c.sym, rref->u.c.sym))
2625 + rsym_pointer = rsym_pointer || rref->u.c.sym->attr.pointer;
2626 + rsym_target = lsym_target || rref->u.c.sym->attr.target;
2628 + if (symbols_could_alias (lref->u.c.sym, rref->u.c.sym,
2629 + lsym_pointer, lsym_target,
2630 + rsym_pointer, rsym_target))
2633 + if ((lsym_pointer && (rsym_pointer || rsym_target))
2634 + || (rsym_pointer && (lsym_pointer || lsym_target)))
2636 + if (gfc_compare_types (&lref->u.c.component->ts,
2637 + &rref->u.c.sym->ts))
2639 + if (gfc_compare_types (&lref->u.c.sym->ts,
2640 + &rref->u.c.component->ts))
2642 + if (gfc_compare_types (&lref->u.c.component->ts,
2643 + &rref->u.c.component->ts))
2649 + lsym_pointer = lsym->attr.pointer;
2650 + lsym_target = lsym->attr.target;
2651 + lsym_pointer = lsym->attr.pointer;
2652 + lsym_target = lsym->attr.target;
2654 for (rref = rss->expr->ref; rref != rss->data.info.ref; rref = rref->next)
2656 if (rref->type != REF_COMPONENT)
2659 - if (gfc_symbols_could_alias (rref->u.c.sym, lsym))
2660 + rsym_pointer = rsym_pointer || rref->u.c.sym->attr.pointer;
2661 + rsym_target = lsym_target || rref->u.c.sym->attr.target;
2663 + if (symbols_could_alias (rref->u.c.sym, lsym,
2664 + lsym_pointer, lsym_target,
2665 + rsym_pointer, rsym_target))
2668 + if ((lsym_pointer && (rsym_pointer || rsym_target))
2669 + || (rsym_pointer && (lsym_pointer || lsym_target)))
2671 + if (gfc_compare_types (&lsym->ts, &rref->u.c.component->ts))
2677 Index: gcc/fortran/symbol.c
2678 ===================================================================
2679 --- gcc/fortran/symbol.c (.../tags/gcc_4_5_2_release) (wersja 169176)
2680 +++ gcc/fortran/symbol.c (.../branches/gcc-4_5-branch) (wersja 169176)
2681 @@ -2733,41 +2733,6 @@
2685 -/* Return true if both symbols could refer to the same data object. Does
2686 - not take account of aliasing due to equivalence statements. */
2689 -gfc_symbols_could_alias (gfc_symbol *lsym, gfc_symbol *rsym)
2691 - /* Aliasing isn't possible if the symbols have different base types. */
2692 - if (gfc_compare_types (&lsym->ts, &rsym->ts) == 0)
2695 - /* Pointers can point to other pointers, target objects and allocatable
2696 - objects. Two allocatable objects cannot share the same storage. */
2697 - if (lsym->attr.pointer
2698 - && (rsym->attr.pointer || rsym->attr.allocatable || rsym->attr.target))
2700 - if (lsym->attr.target && rsym->attr.pointer)
2702 - if (lsym->attr.allocatable && rsym->attr.pointer)
2705 - /* Special case: Argument association, cf. F90 12.4.1.6, F2003 12.4.1.7
2706 - and F2008 12.5.2.13 items 3b and 4b. The pointer case (a) is already
2708 - if (lsym->attr.target && rsym->attr.target
2709 - && ((lsym->attr.dummy
2710 - && (!lsym->attr.dimension || lsym->as->type == AS_ASSUMED_SHAPE))
2711 - || (rsym->attr.dummy
2712 - && (!rsym->attr.dimension
2713 - || rsym->as->type == AS_ASSUMED_SHAPE))))
2720 /* Undoes all the changes made to symbols in the current statement.
2721 This subroutine is made simpler due to the fact that attributes are
2722 never removed once added. */
2723 Index: gcc/fortran/trans-openmp.c
2724 ===================================================================
2725 --- gcc/fortran/trans-openmp.c (.../tags/gcc_4_5_2_release) (wersja 169176)
2726 +++ gcc/fortran/trans-openmp.c (.../branches/gcc-4_5-branch) (wersja 169176)
2727 @@ -480,13 +480,23 @@
2728 gfc_symbol init_val_sym, outer_sym, intrinsic_sym;
2729 gfc_expr *e1, *e2, *e3, *e4;
2731 - tree decl, backend_decl, stmt;
2732 + tree decl, backend_decl, stmt, type, outer_decl;
2733 locus old_loc = gfc_current_locus;
2737 decl = OMP_CLAUSE_DECL (c);
2738 gfc_current_locus = where;
2739 + type = TREE_TYPE (decl);
2740 + outer_decl = create_tmp_var_raw (type, NULL);
2741 + if (TREE_CODE (decl) == PARM_DECL
2742 + && TREE_CODE (type) == REFERENCE_TYPE
2743 + && GFC_DESCRIPTOR_TYPE_P (TREE_TYPE (type))
2744 + && GFC_TYPE_ARRAY_AKIND (TREE_TYPE (type)) == GFC_ARRAY_ALLOCATABLE)
2746 + decl = build_fold_indirect_ref (decl);
2747 + type = TREE_TYPE (type);
2750 /* Create a fake symbol for init value. */
2751 memset (&init_val_sym, 0, sizeof (init_val_sym));
2753 outer_sym.attr.dummy = 0;
2754 outer_sym.attr.result = 0;
2755 outer_sym.attr.flavor = FL_VARIABLE;
2756 - outer_sym.backend_decl = create_tmp_var_raw (TREE_TYPE (decl), NULL);
2757 + outer_sym.backend_decl = outer_decl;
2758 + if (decl != OMP_CLAUSE_DECL (c))
2759 + outer_sym.backend_decl = build_fold_indirect_ref (outer_decl);
2761 /* Create fake symtrees for it. */
2762 symtree1 = gfc_new_symtree (&root1, sym->name);
2763 @@ -622,12 +634,12 @@
2765 /* Create the init statement list. */
2767 - if (GFC_DESCRIPTOR_TYPE_P (TREE_TYPE (decl))
2768 - && GFC_TYPE_ARRAY_AKIND (TREE_TYPE (decl)) == GFC_ARRAY_ALLOCATABLE)
2769 + if (GFC_DESCRIPTOR_TYPE_P (type)
2770 + && GFC_TYPE_ARRAY_AKIND (type) == GFC_ARRAY_ALLOCATABLE)
2772 /* If decl is an allocatable array, it needs to be allocated
2773 with the same bounds as the outer var. */
2774 - tree type = TREE_TYPE (decl), rank, size, esize, ptr;
2775 + tree rank, size, esize, ptr;
2778 gfc_start_block (&block);
2781 /* Create the merge statement list. */
2783 - if (GFC_DESCRIPTOR_TYPE_P (TREE_TYPE (decl))
2784 - && GFC_TYPE_ARRAY_AKIND (TREE_TYPE (decl)) == GFC_ARRAY_ALLOCATABLE)
2785 + if (GFC_DESCRIPTOR_TYPE_P (type)
2786 + && GFC_TYPE_ARRAY_AKIND (type) == GFC_ARRAY_ALLOCATABLE)
2788 /* If decl is an allocatable array, it needs to be deallocated
2791 OMP_CLAUSE_REDUCTION_MERGE (c) = stmt;
2793 /* And stick the placeholder VAR_DECL into the clause as well. */
2794 - OMP_CLAUSE_REDUCTION_PLACEHOLDER (c) = outer_sym.backend_decl;
2795 + OMP_CLAUSE_REDUCTION_PLACEHOLDER (c) = outer_decl;
2797 gfc_current_locus = old_loc;
2799 Index: gcc/fortran/gfortran.h
2800 ===================================================================
2801 --- gcc/fortran/gfortran.h (.../tags/gcc_4_5_2_release) (wersja 169176)
2802 +++ gcc/fortran/gfortran.h (.../branches/gcc-4_5-branch) (wersja 169176)
2803 @@ -2483,8 +2483,6 @@
2804 int gfc_get_ha_symbol (const char *, gfc_symbol **);
2805 int gfc_get_ha_sym_tree (const char *, gfc_symtree **);
2807 -int gfc_symbols_could_alias (gfc_symbol *, gfc_symbol *);
2809 void gfc_undo_symbols (void);
2810 void gfc_commit_symbols (void);
2811 void gfc_commit_symbol (gfc_symbol *);
2812 Index: gcc/fortran/error.c
2813 ===================================================================
2814 --- gcc/fortran/error.c (.../tags/gcc_4_5_2_release) (wersja 169176)
2815 +++ gcc/fortran/error.c (.../branches/gcc-4_5-branch) (wersja 169176)
2819 if (flag_fatal_errors)
2821 + exit (FATAL_EXIT_CODE);
2826 error_print (_("Fatal Error:"), _(gmsgid), argp);
2830 + exit (FATAL_EXIT_CODE);
2834 @@ -1019,7 +1019,7 @@
2835 gfc_increment_error_count();
2837 if (flag_fatal_errors)
2839 + exit (FATAL_EXIT_CODE);
2843 Index: gcc/fortran/ChangeLog
2844 ===================================================================
2845 --- gcc/fortran/ChangeLog (.../tags/gcc_4_5_2_release) (wersja 169176)
2846 +++ gcc/fortran/ChangeLog (.../branches/gcc-4_5-branch) (wersja 169176)
2848 +2011-01-21 Tobias Burnus <burnus@net-b.de>
2851 + * error.c (gfc_error_now, gfc_fatal_error, gfc_error_check):
2852 + Use defined instead of magic number exit status codes.
2853 + * scanner.c (include_line, gfc_new_file): Ditto.
2854 + * gfortranspec.c (lang_specific_driver): Ditto.
2856 +2011-01-16 Jakub Jelinek <jakub@redhat.com>
2858 + Backport from mainline
2859 + 2010-12-14 Jakub Jelinek <jakub@redhat.com>
2862 + * trans-openmp.c (gfc_trans_omp_array_reduction): Handle allocatable
2865 +2011-01-16 Thomas Koenig <tkoenig@gcc.gnu.org>
2867 + Backport from trunk
2869 + * symbol.c (gfc_symbols_could_alias): Strip gfc_ prefix,
2870 + make static and move in front of its only caller, to ...
2871 + * trans-array.c (symbols_could_alias): ... here.
2872 + Pass information about pointer and target status as
2873 + arguments. Allocatable arrays don't alias anything
2874 + unless they have the POINTER attribute.
2875 + (gfc_could_be_alias): Keep track of pointer and target
2876 + status when following references. Also check if typespecs
2877 + of components match those of other components or symbols.
2878 + * gfortran.h: Remove prototype for gfc_symbols_could_alias.
2880 +2011-01-02 Thomas Koenig <tkoenig@gcc.gnu.org>
2882 + Backport from mainline
2884 + * resolve.c (resolve_operator): Mark function for user-defined
2885 + operator as referenced.
2887 2010-12-16 Release Manager
2889 * GCC 4.5.2 released.
2890 Index: gcc/fortran/scanner.c
2891 ===================================================================
2892 --- gcc/fortran/scanner.c (.../tags/gcc_4_5_2_release) (wersja 169176)
2893 +++ gcc/fortran/scanner.c (.../branches/gcc-4_5-branch) (wersja 169176)
2894 @@ -1841,7 +1841,7 @@
2896 filename = gfc_widechar_to_char (begin, -1);
2897 if (load_file (filename, NULL, false) == FAILURE)
2899 + exit (FATAL_EXIT_CODE);
2901 gfc_free (filename);
2903 @@ -2045,7 +2045,7 @@
2904 printf ("%s:%3d %s\n", LOCATION_FILE (line_head->location),
2905 LOCATION_LINE (line_head->location), line_head->line);
2908 + exit (SUCCESS_EXIT_CODE);
2912 Index: gcc/fortran/gfortranspec.c
2913 ===================================================================
2914 --- gcc/fortran/gfortranspec.c (.../tags/gcc_4_5_2_release) (wersja 169176)
2915 +++ gcc/fortran/gfortranspec.c (.../branches/gcc-4_5-branch) (wersja 169176)
2917 You may redistribute copies of GNU Fortran\n\
2918 under the terms of the GNU General Public License.\n\
2919 For more information about these matters, see the file named COPYING\n\n"));
2921 + exit (SUCCESS_EXIT_CODE);
2925 Index: gcc/fortran/resolve.c
2926 ===================================================================
2927 --- gcc/fortran/resolve.c (.../tags/gcc_4_5_2_release) (wersja 169176)
2928 +++ gcc/fortran/resolve.c (.../branches/gcc-4_5-branch) (wersja 169176)
2929 @@ -3577,9 +3577,12 @@
2930 sprintf (msg, _("Operand of user operator '%s' at %%L is %s"),
2931 e->value.op.uop->name, gfc_typename (&op1->ts));
2933 - sprintf (msg, _("Operands of user operator '%s' at %%L are %s/%s"),
2934 - e->value.op.uop->name, gfc_typename (&op1->ts),
2935 - gfc_typename (&op2->ts));
2937 + sprintf (msg, _("Operands of user operator '%s' at %%L are %s/%s"),
2938 + e->value.op.uop->name, gfc_typename (&op1->ts),
2939 + gfc_typename (&op2->ts));
2940 + e->value.op.uop->op->sym->attr.referenced = 1;
2945 Index: gcc/regmove.c
2946 ===================================================================
2947 --- gcc/regmove.c (.../tags/gcc_4_5_2_release) (wersja 169176)
2948 +++ gcc/regmove.c (.../branches/gcc-4_5-branch) (wersja 169176)
2950 rtx src_reg = XEXP (src, 0);
2951 int src_no = REGNO (src_reg);
2952 int dst_no = REGNO (dest);
2954 + rtx p, set, set_insn;
2955 enum machine_mode old_mode;
2956 basic_block bb = BLOCK_FOR_INSN (insn);
2959 GET_MODE_BITSIZE (GET_MODE (src_reg))))
2963 old_mode = GET_MODE (src_reg);
2964 PUT_MODE (src_reg, GET_MODE (src));
2965 XEXP (src, 0) = SET_SRC (set);
2966 @@ -583,9 +584,19 @@
2970 - rtx note = find_reg_note (p, REG_EQUAL, NULL_RTX);
2971 + rtx note = find_reg_note (set_insn, REG_EQUAL, NULL_RTX);
2973 - remove_note (p, note);
2975 + if (rtx_equal_p (XEXP (note, 0), XEXP (src, 0)))
2978 + = gen_rtx_fmt_e (GET_CODE (src), GET_MODE (src),
2980 + df_notes_rescan (set_insn);
2983 + remove_note (set_insn, note);
2989 ===================================================================
2990 --- gcc/BASE-VER (.../tags/gcc_4_5_2_release) (wersja 169176)
2991 +++ gcc/BASE-VER (.../branches/gcc-4_5-branch) (wersja 169176)
2995 Index: gcc/tree-data-ref.c
2996 ===================================================================
2997 --- gcc/tree-data-ref.c (.../tags/gcc_4_5_2_release) (wersja 169176)
2998 +++ gcc/tree-data-ref.c (.../branches/gcc-4_5-branch) (wersja 169176)
2999 @@ -4594,7 +4594,7 @@
3000 for (e = v->succ; e; e = e->succ_next)
3001 fprintf (file, " %d", e->dest);
3003 - fprintf (file, ") \n");
3004 + fprintf (file, ")\n");
3005 print_gimple_stmt (file, RDGV_STMT (v), 0, TDF_VOPS|TDF_MEMSYMS);
3006 fprintf (file, ")\n");
3008 @@ -4991,6 +4991,38 @@
3012 +/* Returns true when the statement at STMT is of the form "A[i] = 0"
3013 + that contains a data reference on its LHS with a stride of the same
3014 + size as its unit type. */
3017 +stmt_with_adjacent_zero_store_dr_p (gimple stmt)
3021 + struct data_reference *dr;
3024 + || !gimple_vdef (stmt)
3025 + || !is_gimple_assign (stmt)
3026 + || !gimple_assign_single_p (stmt)
3027 + || !(op1 = gimple_assign_rhs1 (stmt))
3028 + || !(integer_zerop (op1) || real_zerop (op1)))
3031 + dr = XCNEW (struct data_reference);
3032 + op0 = gimple_assign_lhs (stmt);
3034 + DR_STMT (dr) = stmt;
3035 + DR_REF (dr) = op0;
3037 + res = dr_analyze_innermost (dr)
3038 + && stride_of_unit_type_p (DR_STEP (dr), TREE_TYPE (op0));
3040 + free_data_ref (dr);
3044 /* For a data reference REF, return the declaration of its base
3045 address or NULL_TREE if the base is not determined. */
3047 Index: gcc/tree-data-ref.h
3048 ===================================================================
3049 --- gcc/tree-data-ref.h (.../tags/gcc_4_5_2_release) (wersja 169176)
3050 +++ gcc/tree-data-ref.h (.../branches/gcc-4_5-branch) (wersja 169176)
3051 @@ -567,7 +567,19 @@
3052 void remove_similar_memory_refs (VEC (gimple, heap) **);
3053 bool rdg_defs_used_in_other_loops_p (struct graph *, int);
3054 bool have_similar_memory_accesses (gimple, gimple);
3055 +bool stmt_with_adjacent_zero_store_dr_p (gimple);
3057 +/* Returns true when STRIDE is equal in absolute value to the size of
3058 + the unit type of TYPE. */
3061 +stride_of_unit_type_p (tree stride, tree type)
3063 + return tree_int_cst_equal (fold_unary (ABS_EXPR, TREE_TYPE (stride),
3065 + TYPE_SIZE_UNIT (type));
3068 /* Determines whether RDG vertices V1 and V2 access to similar memory
3069 locations, in which case they have to be in the same partition. */
3071 Index: gcc/c-typeck.c
3072 ===================================================================
3073 --- gcc/c-typeck.c (.../tags/gcc_4_5_2_release) (wersja 169176)
3074 +++ gcc/c-typeck.c (.../branches/gcc-4_5-branch) (wersja 169176)
3075 @@ -5025,10 +5025,10 @@
3078 bool save = in_late_binary_op;
3079 - if (codel == BOOLEAN_TYPE)
3080 + if (codel == BOOLEAN_TYPE || codel == COMPLEX_TYPE)
3081 in_late_binary_op = true;
3082 ret = convert_and_check (type, orig_rhs);
3083 - if (codel == BOOLEAN_TYPE)
3084 + if (codel == BOOLEAN_TYPE || codel == COMPLEX_TYPE)
3085 in_late_binary_op = save;
3088 Index: gcc/cfgexpand.c
3089 ===================================================================
3090 --- gcc/cfgexpand.c (.../tags/gcc_4_5_2_release) (wersja 169176)
3091 +++ gcc/cfgexpand.c (.../branches/gcc-4_5-branch) (wersja 169176)
3092 @@ -2578,7 +2578,7 @@
3093 enum machine_mode opmode = GET_MODE (op0);
3095 if (opmode == VOIDmode)
3097 + opmode = TYPE_MODE (TREE_TYPE (tem));
3099 /* This condition may hold if we're expanding the address
3100 right past the end of an array that turned out not to
3101 @@ -2599,7 +2599,8 @@
3103 : ZERO_EXTRACT, mode,
3104 GET_MODE (op0) != VOIDmode
3105 - ? GET_MODE (op0) : mode1,
3107 + : TYPE_MODE (TREE_TYPE (tem)),
3108 op0, GEN_INT (bitsize), GEN_INT (bitpos));
3111 Index: gcc/graphite.c
3112 ===================================================================
3113 --- gcc/graphite.c (.../tags/gcc_4_5_2_release) (wersja 169176)
3114 +++ gcc/graphite.c (.../branches/gcc-4_5-branch) (wersja 169176)
3120 recompute_all_dominators ();
3121 initialize_original_copy_tables ();
3122 cloog_initialize ();
3123 Index: gcc/tree-ssa-pre.c
3124 ===================================================================
3125 --- gcc/tree-ssa-pre.c (.../tags/gcc_4_5_2_release) (wersja 169176)
3126 +++ gcc/tree-ssa-pre.c (.../branches/gcc-4_5-branch) (wersja 169176)
3127 @@ -1701,7 +1701,7 @@
3128 tree result = vn_reference_lookup_pieces (newvuse, ref->set,
3132 + &newref, VN_WALK);
3134 VEC_free (vn_reference_op_s, heap, newoperands);
3136 @@ -2558,6 +2558,10 @@
3138 if (dump_file && (dump_flags & TDF_DETAILS))
3139 fprintf (dump_file, "Starting iteration %d\n", num_iterations);
3140 + /* ??? We need to clear our PHI translation cache here as the
3141 + ANTIC sets shrink and we restrict valid translations to
3142 + those having operands with leaders in ANTIC. Same below
3143 + for PA ANTIC computation. */
3146 for (i = n_basic_blocks - NUM_FIXED_BLOCKS - 1; i >= 0; i--)
3147 @@ -3965,7 +3969,7 @@
3148 copy_reference_ops_from_call (stmt, &ops);
3149 vn_reference_lookup_pieces (gimple_vuse (stmt), 0,
3150 gimple_expr_type (stmt),
3151 - ops, &ref, false);
3152 + ops, &ref, VN_NOWALK);
3153 VEC_free (vn_reference_op_s, heap, ops);
3156 @@ -4035,7 +4039,7 @@
3158 vn_reference_lookup (gimple_assign_rhs1 (stmt),
3165 @@ -4265,7 +4269,7 @@
3166 tree rhs = gimple_assign_rhs1 (stmt);
3168 val = vn_reference_lookup (gimple_assign_lhs (stmt),
3169 - gimple_vuse (stmt), true, NULL);
3170 + gimple_vuse (stmt), VN_WALK, NULL);
3171 if (TREE_CODE (rhs) == SSA_NAME)
3172 rhs = VN_INFO (rhs)->valnum;
3174 Index: gcc/cfgcleanup.c
3175 ===================================================================
3176 --- gcc/cfgcleanup.c (.../tags/gcc_4_5_2_release) (wersja 169176)
3177 +++ gcc/cfgcleanup.c (.../branches/gcc-4_5-branch) (wersja 169176)
3178 @@ -482,15 +482,20 @@
3179 /* When not optimizing, ensure that edges or forwarder
3180 blocks with different locus are not optimized out. */
3181 int locus = single_succ_edge (target)->goto_locus;
3184 if (locus && goto_locus && !locator_eq (locus, goto_locus))
3185 counter = n_basic_blocks;
3189 - if (INSN_P (BB_END (target)))
3190 + last = BB_END (target);
3191 + if (DEBUG_INSN_P (last))
3192 + last = prev_nondebug_insn (last);
3194 + if (last && INSN_P (last))
3196 - locus = INSN_LOCATOR (BB_END (target));
3197 + locus = INSN_LOCATOR (last);
3199 if (locus && goto_locus
3200 && !locator_eq (locus, goto_locus))
3201 Index: gcc/tree-sra.c
3202 ===================================================================
3203 --- gcc/tree-sra.c (.../tags/gcc_4_5_2_release) (wersja 169176)
3204 +++ gcc/tree-sra.c (.../branches/gcc-4_5-branch) (wersja 169176)
3205 @@ -3413,7 +3413,10 @@
3206 else if (ac2->size != access->size)
3209 - if (access_precludes_ipa_sra_p (ac2))
3210 + if (access_precludes_ipa_sra_p (ac2)
3211 + || (ac2->type != access->type
3212 + && (TREE_ADDRESSABLE (ac2->type)
3213 + || TREE_ADDRESSABLE (access->type))))
3216 modification |= ac2->write;
3217 Index: gcc/c-convert.c
3218 ===================================================================
3219 --- gcc/c-convert.c (.../tags/gcc_4_5_2_release) (wersja 169176)
3220 +++ gcc/c-convert.c (.../branches/gcc-4_5-branch) (wersja 169176)
3221 @@ -131,6 +131,32 @@
3225 + /* If converting from COMPLEX_TYPE to a different COMPLEX_TYPE
3226 + and e is not COMPLEX_EXPR, convert_to_complex uses save_expr,
3227 + but for the C FE c_save_expr needs to be called instead. */
3228 + if (TREE_CODE (TREE_TYPE (e)) == COMPLEX_TYPE)
3230 + tree subtype = TREE_TYPE (type);
3231 + tree elt_type = TREE_TYPE (TREE_TYPE (e));
3233 + if (TYPE_MAIN_VARIANT (elt_type) != TYPE_MAIN_VARIANT (subtype)
3234 + && TREE_CODE (e) != COMPLEX_EXPR)
3236 + if (in_late_binary_op)
3237 + e = save_expr (e);
3239 + e = c_save_expr (e);
3241 + = fold_build2 (COMPLEX_EXPR, type,
3243 + fold_build1 (REALPART_EXPR,
3246 + fold_build1 (IMAGPART_EXPR,
3251 ret = convert_to_complex (type, e);
3254 Index: gcc/tree-ssa-ter.c
3255 ===================================================================
3256 --- gcc/tree-ssa-ter.c (.../tags/gcc_4_5_2_release) (wersja 169176)
3257 +++ gcc/tree-ssa-ter.c (.../branches/gcc-4_5-branch) (wersja 169176)
3261 /* Without alias info we can't move around loads. */
3262 - if (gimple_references_memory_p (stmt) && !optimize)
3264 + && gimple_assign_single_p (stmt)
3265 + && !is_gimple_val (gimple_assign_rhs1 (stmt)))
3268 /* Float expressions must go through memory if float-store is on. */
3270 ===================================================================
3271 --- gcc/rtl.c (.../tags/gcc_4_5_2_release) (wersja 169176)
3272 +++ gcc/rtl.c (.../branches/gcc-4_5-branch) (wersja 169176)
3273 @@ -429,7 +429,15 @@
3276 if (XINT (x, i) != XINT (y, i))
3279 +#ifndef GENERATOR_FILE
3280 + if (((code == ASM_OPERANDS && i == 6)
3281 + || (code == ASM_INPUT && i == 1))
3282 + && locator_eq (XINT (x, i), XINT (y, i)))
3290 @@ -549,7 +557,15 @@
3293 if (XINT (x, i) != XINT (y, i))
3296 +#ifndef GENERATOR_FILE
3297 + if (((code == ASM_OPERANDS && i == 6)
3298 + || (code == ASM_INPUT && i == 1))
3299 + && locator_eq (XINT (x, i), XINT (y, i)))
3307 Index: gcc/graphite-sese-to-poly.c
3308 ===================================================================
3309 --- gcc/graphite-sese-to-poly.c (.../tags/gcc_4_5_2_release) (wersja 169176)
3310 +++ gcc/graphite-sese-to-poly.c (.../branches/gcc-4_5-branch) (wersja 169176)
3312 gcc_assert (TREE_CODE (e) == INTEGER_CST);
3315 - value_set_si (val, int_cst_value (e));
3316 + tree_int_to_gmp (e, val);
3317 add_value_to_dim (l, expr, val);
3320 @@ -729,16 +729,13 @@
3323 ppl_Coefficient_t coef;
3324 - int v = int_cst_value (cst);
3325 + tree type = TREE_TYPE (cst);
3328 - value_set_si (val, 0);
3330 /* Necessary to not get "-1 = 2^n - 1". */
3332 - value_sub_int (val, val, -v);
3334 - value_add_int (val, val, v);
3335 + mpz_set_double_int (val, double_int_sext (tree_to_double_int (cst),
3336 + TYPE_PRECISION (type)), false);
3338 value_multiply (val, val, k);
3339 ppl_new_Coefficient (&coef);
3342 gcc_assert (host_integerp (TREE_OPERAND (e, 1), 0));
3344 - value_set_si (val, int_cst_value (TREE_OPERAND (e, 1)));
3345 + tree_int_to_gmp (TREE_OPERAND (e, 1), val);
3346 value_multiply (val, val, k);
3347 scan_tree_for_params (s, TREE_OPERAND (e, 0), c, val);
3351 gcc_assert (host_integerp (TREE_OPERAND (e, 0), 0));
3353 - value_set_si (val, int_cst_value (TREE_OPERAND (e, 0)));
3354 + tree_int_to_gmp (TREE_OPERAND (e, 0), val);
3355 value_multiply (val, val, k);
3356 scan_tree_for_params (s, TREE_OPERAND (e, 1), c, val);
3358 @@ -1717,10 +1714,13 @@
3359 /* subscript - low >= 0 */
3360 if (host_integerp (low, 0))
3364 ppl_new_Linear_Expression_with_dimension (&expr, accessp_nb_dims);
3365 ppl_set_coef (expr, subscript, 1);
3367 - ppl_set_inhomogeneous (expr, -int_cst_value (low));
3368 + minus_low = fold_build1 (NEGATE_EXPR, TREE_TYPE (low), low);
3369 + ppl_set_inhomogeneous_tree (expr, minus_low);
3371 ppl_new_Constraint (&cstr, expr, PPL_CONSTRAINT_TYPE_GREATER_OR_EQUAL);
3372 ppl_Polyhedron_add_constraint (accesses, cstr);
3373 @@ -1740,7 +1740,7 @@
3374 ppl_new_Linear_Expression_with_dimension (&expr, accessp_nb_dims);
3375 ppl_set_coef (expr, subscript, -1);
3377 - ppl_set_inhomogeneous (expr, int_cst_value (high));
3378 + ppl_set_inhomogeneous_tree (expr, high);
3380 ppl_new_Constraint (&cstr, expr, PPL_CONSTRAINT_TYPE_GREATER_OR_EQUAL);
3381 ppl_Polyhedron_add_constraint (accesses, cstr);
3382 Index: gcc/tree-ssa-structalias.c
3383 ===================================================================
3384 --- gcc/tree-ssa-structalias.c (.../tags/gcc_4_5_2_release) (wersja 169176)
3385 +++ gcc/tree-ssa-structalias.c (.../branches/gcc-4_5-branch) (wersja 169176)
3386 @@ -369,7 +369,11 @@
3387 ret->may_have_pointers = true;
3388 ret->is_global_var = (t == NULL_TREE);
3389 if (t && DECL_P (t))
3390 - ret->is_global_var = is_global_var (t);
3391 + ret->is_global_var = (is_global_var (t)
3392 + /* We have to treat even local register variables
3393 + as escape points. */
3394 + || (TREE_CODE (t) == VAR_DECL
3395 + && DECL_HARD_REGISTER (t)));
3396 ret->solution = BITMAP_ALLOC (&pta_obstack);
3397 ret->oldsolution = BITMAP_ALLOC (&oldpta_obstack);
3399 Index: gcc/config/sparc/sparc.md
3400 ===================================================================
3401 --- gcc/config/sparc/sparc.md (.../tags/gcc_4_5_2_release) (wersja 169176)
3402 +++ gcc/config/sparc/sparc.md (.../branches/gcc-4_5-branch) (wersja 169176)
3403 @@ -1106,14 +1106,15 @@
3405 ;; Load in operand 0 the (absolute) address of operand 1, which is a symbolic
3406 ;; value subject to a PC-relative relocation. Operand 2 is a helper function
3407 -;; that adds the PC value at the call point to operand 0.
3408 +;; that adds the PC value at the call point to register #(operand 3).
3410 (define_insn "load_pcrel_sym<P:mode>"
3411 [(set (match_operand:P 0 "register_operand" "=r")
3412 (unspec:P [(match_operand:P 1 "symbolic_operand" "")
3413 - (match_operand:P 2 "call_address_operand" "")] UNSPEC_LOAD_PCREL_SYM))
3414 + (match_operand:P 2 "call_address_operand" "")
3415 + (match_operand:P 3 "const_int_operand" "")] UNSPEC_LOAD_PCREL_SYM))
3416 (clobber (reg:P 15))]
3418 + "REGNO (operands[0]) == INTVAL (operands[3])"
3420 if (flag_delayed_branch)
3421 return "sethi\t%%hi(%a1-4), %0\n\tcall\t%a2\n\t add\t%0, %%lo(%a1+4), %0";
3422 Index: gcc/config/sparc/sparc.c
3423 ===================================================================
3424 --- gcc/config/sparc/sparc.c (.../tags/gcc_4_5_2_release) (wersja 169176)
3425 +++ gcc/config/sparc/sparc.c (.../branches/gcc-4_5-branch) (wersja 169176)
3427 static int epilogue_renumber (rtx *, int);
3428 static bool sparc_assemble_integer (rtx, unsigned int, int);
3429 static int set_extends (rtx);
3430 -static void load_pic_register (void);
3431 +static void load_got_register (void);
3432 static int save_or_restore_regs (int, int, rtx, int, int);
3433 static void emit_save_or_restore_regs (int);
3434 static void sparc_asm_function_prologue (FILE *, HOST_WIDE_INT);
3435 @@ -966,6 +966,36 @@
3439 +/* Return true if the address of LABEL can be loaded by means of the
3440 + mov{si,di}_pic_label_ref patterns in PIC mode. */
3443 +can_use_mov_pic_label_ref (rtx label)
3445 + /* VxWorks does not impose a fixed gap between segments; the run-time
3446 + gap can be different from the object-file gap. We therefore can't
3447 + assume X - _GLOBAL_OFFSET_TABLE_ is a link-time constant unless we
3448 + are absolutely sure that X is in the same segment as the GOT.
3449 + Unfortunately, the flexibility of linker scripts means that we
3450 + can't be sure of that in general, so assume that GOT-relative
3451 + accesses are never valid on VxWorks. */
3452 + if (TARGET_VXWORKS_RTP)
3455 + /* Similarly, if the label is non-local, it might end up being placed
3456 + in a different section than the current one; now mov_pic_label_ref
3457 + requires the label and the code to be in the same section. */
3458 + if (LABEL_REF_NONLOCAL_P (label))
3461 + /* Finally, if we are reordering basic blocks and partition into hot
3462 + and cold sections, this might happen for any label. */
3463 + if (flag_reorder_blocks_and_partition)
3469 /* Expand a move instruction. Return true if all work is done. */
3472 @@ -1000,14 +1030,9 @@
3473 if (pic_address_needs_scratch (operands[1]))
3474 operands[1] = legitimize_pic_address (operands[1], NULL_RTX);
3476 - /* VxWorks does not impose a fixed gap between segments; the run-time
3477 - gap can be different from the object-file gap. We therefore can't
3478 - assume X - _GLOBAL_OFFSET_TABLE_ is a link-time constant unless we
3479 - are absolutely sure that X is in the same segment as the GOT.
3480 - Unfortunately, the flexibility of linker scripts means that we
3481 - can't be sure of that in general, so assume that _G_O_T_-relative
3482 - accesses are never valid on VxWorks. */
3483 - if (GET_CODE (operands[1]) == LABEL_REF && !TARGET_VXWORKS_RTP)
3484 + /* We cannot use the mov{si,di}_pic_label_ref patterns in all cases. */
3485 + if (GET_CODE (operands[1]) == LABEL_REF
3486 + && can_use_mov_pic_label_ref (operands[1]))
3490 @@ -2907,26 +2932,39 @@
3495 -static GTY(()) bool pic_helper_needed = false;
3496 -static GTY(()) rtx pic_helper_symbol;
3497 -static GTY(()) rtx global_offset_table;
3498 +/* Global Offset Table support. */
3499 +static GTY(()) rtx got_helper_rtx = NULL_RTX;
3500 +static GTY(()) rtx global_offset_table_rtx = NULL_RTX;
3502 +/* Return the SYMBOL_REF for the Global Offset Table. */
3504 +static GTY(()) rtx sparc_got_symbol = NULL_RTX;
3509 + if (!sparc_got_symbol)
3510 + sparc_got_symbol = gen_rtx_SYMBOL_REF (Pmode, "_GLOBAL_OFFSET_TABLE_");
3512 + return sparc_got_symbol;
3515 /* Ensure that we are not using patterns that are not OK with PIC. */
3525 - gcc_assert (GET_CODE (recog_data.operand[i]) != SYMBOL_REF
3526 - && (GET_CODE (recog_data.operand[i]) != CONST
3527 - || (GET_CODE (XEXP (recog_data.operand[i], 0)) == MINUS
3528 - && (XEXP (XEXP (recog_data.operand[i], 0), 0)
3529 - == global_offset_table)
3530 - && (GET_CODE (XEXP (XEXP (recog_data.operand[i], 0), 1))
3532 + op = recog_data.operand[i];
3533 + gcc_assert (GET_CODE (op) != SYMBOL_REF
3534 + && (GET_CODE (op) != CONST
3535 + || (GET_CODE (XEXP (op, 0)) == MINUS
3536 + && XEXP (XEXP (op, 0), 0) == sparc_got ()
3537 + && GET_CODE (XEXP (XEXP (op, 0), 1)) == CONST)));
3541 @@ -3161,9 +3199,9 @@
3545 -/* Construct the SYMBOL_REF for the tls_get_offset function. */
3546 +/* Return the SYMBOL_REF for the tls_get_addr function. */
3548 -static GTY(()) rtx sparc_tls_symbol;
3549 +static GTY(()) rtx sparc_tls_symbol = NULL_RTX;
3552 sparc_tls_get_addr (void)
3553 @@ -3174,21 +3212,28 @@
3554 return sparc_tls_symbol;
3557 +/* Return the Global Offset Table to be used in TLS mode. */
3560 sparc_tls_got (void)
3563 + /* In PIC mode, this is just the PIC offset table. */
3566 crtl->uses_pic_offset_table = 1;
3567 return pic_offset_table_rtx;
3570 - if (!global_offset_table)
3571 - global_offset_table = gen_rtx_SYMBOL_REF (Pmode, "_GLOBAL_OFFSET_TABLE_");
3572 - temp = gen_reg_rtx (Pmode);
3573 - emit_move_insn (temp, global_offset_table);
3575 + /* In non-PIC mode, Sun as (unlike GNU as) emits PC-relative relocations for
3576 + the GOT symbol with the 32-bit ABI, so we reload the GOT register. */
3577 + if (TARGET_SUN_TLS && TARGET_ARCH32)
3579 + load_got_register ();
3580 + return global_offset_table_rtx;
3583 + /* In all other cases, we load a new pseudo with the GOT symbol. */
3584 + return copy_to_reg (sparc_got ());
3587 /* Return true if X contains a thread-local symbol. */
3588 @@ -3369,7 +3414,7 @@
3590 if (GET_CODE (orig) == SYMBOL_REF
3591 /* See the comment in sparc_expand_move. */
3592 - || (TARGET_VXWORKS_RTP && GET_CODE (orig) == LABEL_REF))
3593 + || (GET_CODE (orig) == LABEL_REF && !can_use_mov_pic_label_ref (orig)))
3595 rtx pic_ref, address;
3597 @@ -3420,11 +3465,13 @@
3601 - pic_ref = gen_const_mem (Pmode,
3602 - gen_rtx_PLUS (Pmode,
3603 - pic_offset_table_rtx, address));
3605 + = gen_const_mem (Pmode,
3606 + gen_rtx_PLUS (Pmode,
3607 + pic_offset_table_rtx, address));
3608 insn = emit_move_insn (reg, pic_ref);
3611 /* Put a REG_EQUAL note on this insn, so that it can be optimized
3613 set_unique_reg_note (insn, REG_EQUAL, orig);
3614 @@ -3462,9 +3509,8 @@
3615 return gen_rtx_PLUS (Pmode, base, offset);
3617 else if (GET_CODE (orig) == LABEL_REF)
3618 - /* ??? Why do we do this? */
3619 - /* Now movsi_pic_label_ref uses it, but we ought to be checking that
3620 - the register is live instead, in case it is eliminated. */
3621 + /* ??? We ought to be checking that the register is live instead, in case
3622 + it is eliminated. */
3623 crtl->uses_pic_offset_table = 1;
3626 @@ -3529,59 +3575,69 @@
3628 get_pc_thunk_name (char name[32], unsigned int regno)
3630 - const char *pic_name = reg_names[regno];
3631 + const char *reg_name = reg_names[regno];
3633 /* Skip the leading '%' as that cannot be used in a
3638 if (USE_HIDDEN_LINKONCE)
3639 - sprintf (name, "__sparc_get_pc_thunk.%s", pic_name);
3640 + sprintf (name, "__sparc_get_pc_thunk.%s", reg_name);
3642 ASM_GENERATE_INTERNAL_LABEL (name, "LADDPC", regno);
3645 -/* Emit code to load the PIC register. */
3646 +/* Wrapper around the load_pcrel_sym{si,di} patterns. */
3649 -load_pic_register (void)
3651 +gen_load_pcrel_sym (rtx op0, rtx op1, rtx op2, rtx op3)
3653 int orig_flag_pic = flag_pic;
3656 - if (TARGET_VXWORKS_RTP)
3658 - emit_insn (gen_vxworks_load_got ());
3659 - emit_use (pic_offset_table_rtx);
3662 + /* The load_pcrel_sym{si,di} patterns require absolute addressing. */
3664 + if (TARGET_ARCH64)
3665 + insn = gen_load_pcrel_symdi (op0, op1, op2, op3);
3667 + insn = gen_load_pcrel_symsi (op0, op1, op2, op3);
3668 + flag_pic = orig_flag_pic;
3670 - /* If we haven't initialized the special PIC symbols, do so now. */
3671 - if (!pic_helper_needed)
3677 - pic_helper_needed = true;
3678 +/* Emit code to load the GOT register. */
3680 - get_pc_thunk_name (name, REGNO (pic_offset_table_rtx));
3681 - pic_helper_symbol = gen_rtx_SYMBOL_REF (Pmode, ggc_strdup (name));
3683 +load_got_register (void)
3685 + /* In PIC mode, this will retrieve pic_offset_table_rtx. */
3686 + if (!global_offset_table_rtx)
3687 + global_offset_table_rtx = gen_rtx_REG (Pmode, GLOBAL_OFFSET_TABLE_REGNUM);
3689 - global_offset_table = gen_rtx_SYMBOL_REF (Pmode, "_GLOBAL_OFFSET_TABLE_");
3690 + if (TARGET_VXWORKS_RTP)
3691 + emit_insn (gen_vxworks_load_got ());
3694 + /* The GOT symbol is subject to a PC-relative relocation so we need a
3695 + helper function to add the PC value and thus get the final value. */
3696 + if (!got_helper_rtx)
3699 + get_pc_thunk_name (name, GLOBAL_OFFSET_TABLE_REGNUM);
3700 + got_helper_rtx = gen_rtx_SYMBOL_REF (Pmode, ggc_strdup (name));
3703 + emit_insn (gen_load_pcrel_sym (global_offset_table_rtx, sparc_got (),
3705 + GEN_INT (GLOBAL_OFFSET_TABLE_REGNUM)));
3709 - if (TARGET_ARCH64)
3710 - emit_insn (gen_load_pcrel_symdi (pic_offset_table_rtx, global_offset_table,
3711 - pic_helper_symbol));
3713 - emit_insn (gen_load_pcrel_symsi (pic_offset_table_rtx, global_offset_table,
3714 - pic_helper_symbol));
3715 - flag_pic = orig_flag_pic;
3717 /* Need to emit this whether or not we obey regdecls,
3718 since setjmp/longjmp can cause life info to screw up.
3719 ??? In the case where we don't obey regdecls, this is not sufficient
3720 since we may not fall out the bottom. */
3721 - emit_use (pic_offset_table_rtx);
3722 + emit_use (global_offset_table_rtx);
3725 /* Emit a call instruction with the pattern given by PAT. ADDR is the
3726 @@ -4113,7 +4169,7 @@
3728 /* Expand the function prologue. The prologue is responsible for reserving
3729 storage for the frame, saving the call-saved registers and loading the
3730 - PIC register if needed. */
3731 + GOT register if needed. */
3734 sparc_expand_prologue (void)
3735 @@ -4215,9 +4271,9 @@
3737 emit_save_or_restore_regs (SORR_SAVE);
3739 - /* Load the PIC register if needed. */
3740 - if (flag_pic && crtl->uses_pic_offset_table)
3741 - load_pic_register ();
3742 + /* Load the GOT register if needed. */
3743 + if (crtl->uses_pic_offset_table)
3744 + load_got_register ();
3747 /* This function generates the assembly code for function entry, which boils
3748 @@ -8705,7 +8761,7 @@
3749 /* Emit the sequence of insns SEQ while preserving the registers REG and REG2.
3750 This is achieved by means of a manual dynamic stack space allocation in
3751 the current frame. We make the assumption that SEQ doesn't contain any
3752 - function calls, with the possible exception of calls to the PIC helper. */
3753 + function calls, with the possible exception of calls to the GOT helper. */
3756 emit_and_preserve (rtx seq, rtx reg, rtx reg2)
3757 @@ -8868,20 +8924,19 @@
3759 /* The hoops we have to jump through in order to generate a sibcall
3760 without using delay slots... */
3761 - rtx spill_reg, spill_reg2, seq, scratch = gen_rtx_REG (Pmode, 1);
3762 + rtx spill_reg, seq, scratch = gen_rtx_REG (Pmode, 1);
3766 spill_reg = gen_rtx_REG (word_mode, 15); /* %o7 */
3767 - spill_reg2 = gen_rtx_REG (word_mode, PIC_OFFSET_TABLE_REGNUM);
3769 - /* Delay emitting the PIC helper function because it needs to
3770 + /* Delay emitting the GOT helper function because it needs to
3771 change the section and we are emitting assembly code. */
3772 - load_pic_register (); /* clobbers %o7 */
3773 + load_got_register (); /* clobbers %o7 */
3774 scratch = legitimize_pic_address (funexp, scratch);
3777 - emit_and_preserve (seq, spill_reg, spill_reg2);
3778 + emit_and_preserve (seq, spill_reg, pic_offset_table_rtx);
3780 else if (TARGET_ARCH32)
3782 @@ -9032,17 +9087,15 @@
3784 sparc_file_end (void)
3786 - /* If need to emit the special PIC helper function, do so now. */
3787 - if (pic_helper_needed)
3788 + /* If we need to emit the special GOT helper function, do so now. */
3789 + if (got_helper_rtx)
3791 - unsigned int regno = REGNO (pic_offset_table_rtx);
3792 - const char *pic_name = reg_names[regno];
3794 + const char *name = XSTR (got_helper_rtx, 0);
3795 + const char *reg_name = reg_names[GLOBAL_OFFSET_TABLE_REGNUM];
3796 #ifdef DWARF2_UNWIND_INFO
3800 - get_pc_thunk_name (name, regno);
3801 if (USE_HIDDEN_LINKONCE)
3803 tree decl = build_decl (BUILTINS_LOCATION, FUNCTION_DECL,
3804 @@ -9055,7 +9108,9 @@
3805 make_decl_one_only (decl, DECL_ASSEMBLER_NAME (decl));
3806 DECL_VISIBILITY (decl) = VISIBILITY_HIDDEN;
3807 DECL_VISIBILITY_SPECIFIED (decl) = 1;
3808 + resolve_unique_section (decl, 0, flag_function_sections);
3809 allocate_struct_function (decl, true);
3810 + cfun->is_thunk = 1;
3811 current_function_decl = decl;
3812 init_varasm_status ();
3813 assemble_start_function (decl, name);
3814 @@ -9076,10 +9131,10 @@
3816 if (flag_delayed_branch)
3817 fprintf (asm_out_file, "\tjmp\t%%o7+8\n\t add\t%%o7, %s, %s\n",
3818 - pic_name, pic_name);
3819 + reg_name, reg_name);
3821 fprintf (asm_out_file, "\tadd\t%%o7, %s, %s\n\tjmp\t%%o7+8\n\t nop\n",
3822 - pic_name, pic_name);
3823 + reg_name, reg_name);
3824 #ifdef DWARF2_UNWIND_INFO
3826 fprintf (asm_out_file, "\t.cfi_endproc\n");
3827 Index: gcc/config/sparc/sparc.h
3828 ===================================================================
3829 --- gcc/config/sparc/sparc.h (.../tags/gcc_4_5_2_release) (wersja 169176)
3830 +++ gcc/config/sparc/sparc.h (.../branches/gcc-4_5-branch) (wersja 169176)
3831 @@ -964,10 +964,15 @@
3832 not be a register used by the prologue. */
3833 #define STATIC_CHAIN_REGNUM (TARGET_ARCH64 ? 5 : 2)
3835 +/* Register which holds the global offset table, if any. */
3837 +#define GLOBAL_OFFSET_TABLE_REGNUM 23
3839 /* Register which holds offset table for position-independent
3842 -#define PIC_OFFSET_TABLE_REGNUM (flag_pic ? 23 : INVALID_REGNUM)
3843 +#define PIC_OFFSET_TABLE_REGNUM \
3844 + (flag_pic ? GLOBAL_OFFSET_TABLE_REGNUM : INVALID_REGNUM)
3846 /* Pick a default value we can notice from override_options:
3848 Index: gcc/config/rx/rx.c
3849 ===================================================================
3850 --- gcc/config/rx/rx.c (.../tags/gcc_4_5_2_release) (wersja 169176)
3851 +++ gcc/config/rx/rx.c (.../branches/gcc-4_5-branch) (wersja 169176)
3852 @@ -821,9 +821,34 @@
3853 const_tree fn_decl_or_type ATTRIBUTE_UNUSED,
3854 bool outgoing ATTRIBUTE_UNUSED)
3856 - return gen_rtx_REG (TYPE_MODE (ret_type), FUNC_RETURN_REGNUM);
3857 + enum machine_mode mode = TYPE_MODE (ret_type);
3859 + /* RX ABI specifies that small integer types are
3860 + promoted to int when returned by a function. */
3861 + if (GET_MODE_SIZE (mode) > 0 && GET_MODE_SIZE (mode) < 4)
3862 + return gen_rtx_REG (SImode, FUNC_RETURN_REGNUM);
3864 + return gen_rtx_REG (mode, FUNC_RETURN_REGNUM);
3867 +/* TARGET_PROMOTE_FUNCTION_MODE must behave in the same way with
3868 + regard to function returns as does TARGET_FUNCTION_VALUE. */
3870 +static enum machine_mode
3871 +rx_promote_function_mode (const_tree type ATTRIBUTE_UNUSED,
3872 + enum machine_mode mode,
3873 + int * punsignedp ATTRIBUTE_UNUSED,
3874 + const_tree funtype ATTRIBUTE_UNUSED,
3877 + if (for_return != 1
3878 + || GET_MODE_SIZE (mode) >= 4
3879 + || GET_MODE_SIZE (mode) < 1)
3886 rx_return_in_memory (const_tree type, const_tree fntype ATTRIBUTE_UNUSED)
3888 @@ -2759,6 +2784,9 @@
3889 #undef TARGET_CC_MODES_COMPATIBLE
3890 #define TARGET_CC_MODES_COMPATIBLE rx_cc_modes_compatible
3892 +#undef TARGET_PROMOTE_FUNCTION_MODE
3893 +#define TARGET_PROMOTE_FUNCTION_MODE rx_promote_function_mode
3895 struct gcc_target targetm = TARGET_INITIALIZER;
3897 /* #include "gt-rx.h" */
3898 Index: gcc/config/i386/i386.md
3899 ===================================================================
3900 --- gcc/config/i386/i386.md (.../tags/gcc_4_5_2_release) (wersja 169176)
3901 +++ gcc/config/i386/i386.md (.../branches/gcc-4_5-branch) (wersja 169176)
3904 (UNSPEC_TLS_LD_BASE 22)
3906 + (UNSPEC_TLS_IE_SUN 24)
3908 ; Other random patterns
3910 @@ -14702,6 +14703,18 @@
3911 (set_attr "memory" "load")
3912 (set_attr "imm_disp" "false")])
3914 +;; The Sun linker took the AMD64 TLS spec literally and can only handle
3915 +;; %rax as destination of the initial executable code sequence.
3916 +(define_insn "tls_initial_exec_64_sun"
3917 + [(set (match_operand:DI 0 "register_operand" "=a")
3919 + [(match_operand:DI 1 "tls_symbolic_operand" "")]
3920 + UNSPEC_TLS_IE_SUN))
3921 + (clobber (reg:CC FLAGS_REG))]
3922 + "TARGET_64BIT && TARGET_SUN_TLS"
3923 + "mov{q}\t{%%fs:0, %0|%0, QWORD PTR fs:0}\n\tadd{q}\t{%a1@gottpoff(%%rip), %0|%0, %a1@gottpoff[rip]}"
3924 + [(set_attr "type" "multi")])
3926 ;; GNU2 TLS patterns can be split.
3928 (define_expand "tls_dynamic_gnu2_32"
3929 Index: gcc/config/i386/sse.md
3930 ===================================================================
3931 --- gcc/config/i386/sse.md (.../tags/gcc_4_5_2_release) (wersja 169176)
3932 +++ gcc/config/i386/sse.md (.../branches/gcc-4_5-branch) (wersja 169176)
3933 @@ -5011,7 +5011,7 @@
3934 movsd\t{%2, %0|%0, %2}
3935 movlpd\t{%2, %0|%0, %2}
3936 movsd\t{%2, %0|%0, %2}
3937 - shufpd\t{$2, %2, %0|%0, %2, 2}
3938 + shufpd\t{$2, %1, %0|%0, %1, 2}
3939 movhpd\t{%H1, %0|%0, %H1}
3942 @@ -5090,7 +5090,7 @@
3943 movsd\t{%2, %0|%0, %2}
3944 movlpd\t{%2, %0|%0, %2}
3945 movlpd\t{%2, %0|%0, %2}
3946 - shufpd\t{$2, %2, %0|%0, %2, 2}
3947 + shufpd\t{$2, %1, %0|%0, %1, 2}
3948 movhps\t{%H1, %0|%0, %H1}
3949 movhps\t{%1, %H0|%H0, %1}"
3950 [(set_attr "type" "ssemov,ssemov,ssemov,sselog,ssemov,ssemov")
3951 @@ -12097,7 +12097,7 @@
3952 [(set (match_operand:AVXMODEF2P 0 "register_operand" "=x")
3954 [(match_operand:AVXMODEF2P 1 "memory_operand" "m")
3955 - (match_operand:AVXMODEF2P 2 "register_operand" "x")
3956 + (match_operand:<avxpermvecmode> 2 "register_operand" "x")
3960 @@ -12110,7 +12110,7 @@
3961 (define_insn "avx_maskstorep<avxmodesuffixf2c><avxmodesuffix>"
3962 [(set (match_operand:AVXMODEF2P 0 "memory_operand" "=m")
3964 - [(match_operand:AVXMODEF2P 1 "register_operand" "x")
3965 + [(match_operand:<avxpermvecmode> 1 "register_operand" "x")
3966 (match_operand:AVXMODEF2P 2 "register_operand" "x")
3969 Index: gcc/config/i386/i386-builtin-types.def
3970 ===================================================================
3971 --- gcc/config/i386/i386-builtin-types.def (.../tags/gcc_4_5_2_release) (wersja 169176)
3972 +++ gcc/config/i386/i386-builtin-types.def (.../branches/gcc-4_5-branch) (wersja 169176)
3974 DEF_FUNCTION_TYPE (V1DI, V1DI, V1DI)
3975 DEF_FUNCTION_TYPE (V1DI, V2SI, V2SI)
3976 DEF_FUNCTION_TYPE (V1DI, V8QI, V8QI)
3977 -DEF_FUNCTION_TYPE (V2DF, PCV2DF, V2DF)
3978 +DEF_FUNCTION_TYPE (V2DF, PCV2DF, V2DI)
3979 DEF_FUNCTION_TYPE (V2DF, V2DF, DI)
3980 DEF_FUNCTION_TYPE (V2DF, V2DF, INT)
3981 DEF_FUNCTION_TYPE (V2DF, V2DF, PCDOUBLE)
3983 DEF_FUNCTION_TYPE (V2SI, V2SI, SI)
3984 DEF_FUNCTION_TYPE (V2SI, V2SI, V2SI)
3985 DEF_FUNCTION_TYPE (V2SI, V4HI, V4HI)
3986 -DEF_FUNCTION_TYPE (V4DF, PCV4DF, V4DF)
3987 +DEF_FUNCTION_TYPE (V4DF, PCV4DF, V4DI)
3988 DEF_FUNCTION_TYPE (V4DF, V4DF, INT)
3989 DEF_FUNCTION_TYPE (V4DF, V4DF, V4DF)
3990 DEF_FUNCTION_TYPE (V4DF, V4DF, V4DI)
3992 DEF_FUNCTION_TYPE (V4HI, V4HI, SI)
3993 DEF_FUNCTION_TYPE (V4HI, V4HI, V4HI)
3994 DEF_FUNCTION_TYPE (V4HI, V8QI, V8QI)
3995 -DEF_FUNCTION_TYPE (V4SF, PCV4SF, V4SF)
3996 +DEF_FUNCTION_TYPE (V4SF, PCV4SF, V4SI)
3997 DEF_FUNCTION_TYPE (V4SF, V4SF, DI)
3998 DEF_FUNCTION_TYPE (V4SF, V4SF, INT)
3999 DEF_FUNCTION_TYPE (V4SF, V4SF, PCV2SF)
4001 DEF_FUNCTION_TYPE (V8HI, V8HI, V8HI)
4002 DEF_FUNCTION_TYPE (V8QI, V4HI, V4HI)
4003 DEF_FUNCTION_TYPE (V8QI, V8QI, V8QI)
4004 -DEF_FUNCTION_TYPE (V8SF, PCV8SF, V8SF)
4005 +DEF_FUNCTION_TYPE (V8SF, PCV8SF, V8SI)
4006 DEF_FUNCTION_TYPE (V8SF, V8SF, INT)
4007 DEF_FUNCTION_TYPE (V8SF, V8SF, V8SF)
4008 DEF_FUNCTION_TYPE (V8SF, V8SF, V8SI)
4009 @@ -343,10 +343,10 @@
4010 DEF_FUNCTION_TYPE (V8SI, V8SI, V8SI, INT)
4011 DEF_FUNCTION_TYPE (V8SI, V8SI, V8SI, V8SI)
4012 DEF_FUNCTION_TYPE (VOID, PCVOID, UNSIGNED, UNSIGNED)
4013 -DEF_FUNCTION_TYPE (VOID, PV2DF, V2DF, V2DF)
4014 -DEF_FUNCTION_TYPE (VOID, PV4DF, V4DF, V4DF)
4015 -DEF_FUNCTION_TYPE (VOID, PV4SF, V4SF, V4SF)
4016 -DEF_FUNCTION_TYPE (VOID, PV8SF, V8SF, V8SF)
4017 +DEF_FUNCTION_TYPE (VOID, PV2DF, V2DI, V2DF)
4018 +DEF_FUNCTION_TYPE (VOID, PV4DF, V4DI, V4DF)
4019 +DEF_FUNCTION_TYPE (VOID, PV4SF, V4SI, V4SF)
4020 +DEF_FUNCTION_TYPE (VOID, PV8SF, V8SI, V8SF)
4021 DEF_FUNCTION_TYPE (VOID, UINT, UINT, UINT)
4022 DEF_FUNCTION_TYPE (VOID, UINT64, UINT, UINT)
4023 DEF_FUNCTION_TYPE (VOID, V16QI, V16QI, PCHAR)
4024 Index: gcc/config/i386/avxintrin.h
4025 ===================================================================
4026 --- gcc/config/i386/avxintrin.h (.../tags/gcc_4_5_2_release) (wersja 169176)
4027 +++ gcc/config/i386/avxintrin.h (.../branches/gcc-4_5-branch) (wersja 169176)
4028 @@ -890,55 +890,55 @@
4031 extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__))
4032 -_mm_maskload_pd (double const *__P, __m128d __M)
4033 +_mm_maskload_pd (double const *__P, __m128i __M)
4035 return (__m128d) __builtin_ia32_maskloadpd ((const __v2df *)__P,
4040 extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__))
4041 -_mm_maskstore_pd (double *__P, __m128d __M, __m128d __A)
4042 +_mm_maskstore_pd (double *__P, __m128i __M, __m128d __A)
4044 - __builtin_ia32_maskstorepd ((__v2df *)__P, (__v2df)__M, (__v2df)__A);
4045 + __builtin_ia32_maskstorepd ((__v2df *)__P, (__v2di)__M, (__v2df)__A);
4048 extern __inline __m256d __attribute__((__gnu_inline__, __always_inline__, __artificial__))
4049 -_mm256_maskload_pd (double const *__P, __m256d __M)
4050 +_mm256_maskload_pd (double const *__P, __m256i __M)
4052 return (__m256d) __builtin_ia32_maskloadpd256 ((const __v4df *)__P,
4057 extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__))
4058 -_mm256_maskstore_pd (double *__P, __m256d __M, __m256d __A)
4059 +_mm256_maskstore_pd (double *__P, __m256i __M, __m256d __A)
4061 - __builtin_ia32_maskstorepd256 ((__v4df *)__P, (__v4df)__M, (__v4df)__A);
4062 + __builtin_ia32_maskstorepd256 ((__v4df *)__P, (__v4di)__M, (__v4df)__A);
4065 extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
4066 -_mm_maskload_ps (float const *__P, __m128 __M)
4067 +_mm_maskload_ps (float const *__P, __m128i __M)
4069 return (__m128) __builtin_ia32_maskloadps ((const __v4sf *)__P,
4074 extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__))
4075 -_mm_maskstore_ps (float *__P, __m128 __M, __m128 __A)
4076 +_mm_maskstore_ps (float *__P, __m128i __M, __m128 __A)
4078 - __builtin_ia32_maskstoreps ((__v4sf *)__P, (__v4sf)__M, (__v4sf)__A);
4079 + __builtin_ia32_maskstoreps ((__v4sf *)__P, (__v4si)__M, (__v4sf)__A);
4082 extern __inline __m256 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
4083 -_mm256_maskload_ps (float const *__P, __m256 __M)
4084 +_mm256_maskload_ps (float const *__P, __m256i __M)
4086 return (__m256) __builtin_ia32_maskloadps256 ((const __v8sf *)__P,
4091 extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__))
4092 -_mm256_maskstore_ps (float *__P, __m256 __M, __m256 __A)
4093 +_mm256_maskstore_ps (float *__P, __m256i __M, __m256 __A)
4095 - __builtin_ia32_maskstoreps256 ((__v8sf *)__P, (__v8sf)__M, (__v8sf)__A);
4096 + __builtin_ia32_maskstoreps256 ((__v8sf *)__P, (__v8si)__M, (__v8sf)__A);
4099 extern __inline __m256 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
4100 Index: gcc/config/i386/i386.c
4101 ===================================================================
4102 --- gcc/config/i386/i386.c (.../tags/gcc_4_5_2_release) (wersja 169176)
4103 +++ gcc/config/i386/i386.c (.../branches/gcc-4_5-branch) (wersja 169176)
4104 @@ -10438,6 +10438,17 @@
4105 case TLS_MODEL_INITIAL_EXEC:
4108 + if (TARGET_SUN_TLS)
4110 + /* The Sun linker took the AMD64 TLS spec literally
4111 + and can only handle %rax as destination of the
4112 + initial executable code sequence. */
4114 + dest = gen_reg_rtx (Pmode);
4115 + emit_insn (gen_tls_initial_exec_64_sun (dest, x));
4120 type = UNSPEC_GOTNTPOFF;
4122 @@ -11027,7 +11038,11 @@
4124 x = XVECEXP (XEXP (x, 0), 0, 0);
4125 if (GET_MODE (orig_x) != Pmode)
4126 - return simplify_gen_subreg (GET_MODE (orig_x), x, Pmode, 0);
4128 + x = simplify_gen_subreg (GET_MODE (orig_x), x, Pmode, 0);
4129 + if (x == NULL_RTX)
4135 @@ -11096,7 +11111,11 @@
4138 if (GET_MODE (orig_x) != Pmode && MEM_P (orig_x))
4139 - return simplify_gen_subreg (GET_MODE (orig_x), result, Pmode, 0);
4141 + result = simplify_gen_subreg (GET_MODE (orig_x), result, Pmode, 0);
4142 + if (result == NULL_RTX)
4148 @@ -21638,14 +21657,14 @@
4149 { OPTION_MASK_ISA_AVX, CODE_FOR_avx_movntv4df, "__builtin_ia32_movntpd256", IX86_BUILTIN_MOVNTPD256, UNKNOWN, (int) VOID_FTYPE_PDOUBLE_V4DF },
4150 { OPTION_MASK_ISA_AVX, CODE_FOR_avx_movntv8sf, "__builtin_ia32_movntps256", IX86_BUILTIN_MOVNTPS256, UNKNOWN, (int) VOID_FTYPE_PFLOAT_V8SF },
4152 - { OPTION_MASK_ISA_AVX, CODE_FOR_avx_maskloadpd, "__builtin_ia32_maskloadpd", IX86_BUILTIN_MASKLOADPD, UNKNOWN, (int) V2DF_FTYPE_PCV2DF_V2DF },
4153 - { OPTION_MASK_ISA_AVX, CODE_FOR_avx_maskloadps, "__builtin_ia32_maskloadps", IX86_BUILTIN_MASKLOADPS, UNKNOWN, (int) V4SF_FTYPE_PCV4SF_V4SF },
4154 - { OPTION_MASK_ISA_AVX, CODE_FOR_avx_maskloadpd256, "__builtin_ia32_maskloadpd256", IX86_BUILTIN_MASKLOADPD256, UNKNOWN, (int) V4DF_FTYPE_PCV4DF_V4DF },
4155 - { OPTION_MASK_ISA_AVX, CODE_FOR_avx_maskloadps256, "__builtin_ia32_maskloadps256", IX86_BUILTIN_MASKLOADPS256, UNKNOWN, (int) V8SF_FTYPE_PCV8SF_V8SF },
4156 - { OPTION_MASK_ISA_AVX, CODE_FOR_avx_maskstorepd, "__builtin_ia32_maskstorepd", IX86_BUILTIN_MASKSTOREPD, UNKNOWN, (int) VOID_FTYPE_PV2DF_V2DF_V2DF },
4157 - { OPTION_MASK_ISA_AVX, CODE_FOR_avx_maskstoreps, "__builtin_ia32_maskstoreps", IX86_BUILTIN_MASKSTOREPS, UNKNOWN, (int) VOID_FTYPE_PV4SF_V4SF_V4SF },
4158 - { OPTION_MASK_ISA_AVX, CODE_FOR_avx_maskstorepd256, "__builtin_ia32_maskstorepd256", IX86_BUILTIN_MASKSTOREPD256, UNKNOWN, (int) VOID_FTYPE_PV4DF_V4DF_V4DF },
4159 - { OPTION_MASK_ISA_AVX, CODE_FOR_avx_maskstoreps256, "__builtin_ia32_maskstoreps256", IX86_BUILTIN_MASKSTOREPS256, UNKNOWN, (int) VOID_FTYPE_PV8SF_V8SF_V8SF },
4160 + { OPTION_MASK_ISA_AVX, CODE_FOR_avx_maskloadpd, "__builtin_ia32_maskloadpd", IX86_BUILTIN_MASKLOADPD, UNKNOWN, (int) V2DF_FTYPE_PCV2DF_V2DI },
4161 + { OPTION_MASK_ISA_AVX, CODE_FOR_avx_maskloadps, "__builtin_ia32_maskloadps", IX86_BUILTIN_MASKLOADPS, UNKNOWN, (int) V4SF_FTYPE_PCV4SF_V4SI },
4162 + { OPTION_MASK_ISA_AVX, CODE_FOR_avx_maskloadpd256, "__builtin_ia32_maskloadpd256", IX86_BUILTIN_MASKLOADPD256, UNKNOWN, (int) V4DF_FTYPE_PCV4DF_V4DI },
4163 + { OPTION_MASK_ISA_AVX, CODE_FOR_avx_maskloadps256, "__builtin_ia32_maskloadps256", IX86_BUILTIN_MASKLOADPS256, UNKNOWN, (int) V8SF_FTYPE_PCV8SF_V8SI },
4164 + { OPTION_MASK_ISA_AVX, CODE_FOR_avx_maskstorepd, "__builtin_ia32_maskstorepd", IX86_BUILTIN_MASKSTOREPD, UNKNOWN, (int) VOID_FTYPE_PV2DF_V2DI_V2DF },
4165 + { OPTION_MASK_ISA_AVX, CODE_FOR_avx_maskstoreps, "__builtin_ia32_maskstoreps", IX86_BUILTIN_MASKSTOREPS, UNKNOWN, (int) VOID_FTYPE_PV4SF_V4SI_V4SF },
4166 + { OPTION_MASK_ISA_AVX, CODE_FOR_avx_maskstorepd256, "__builtin_ia32_maskstorepd256", IX86_BUILTIN_MASKSTOREPD256, UNKNOWN, (int) VOID_FTYPE_PV4DF_V4DI_V4DF },
4167 + { OPTION_MASK_ISA_AVX, CODE_FOR_avx_maskstoreps256, "__builtin_ia32_maskstoreps256", IX86_BUILTIN_MASKSTOREPS256, UNKNOWN, (int) VOID_FTYPE_PV8SF_V8SI_V8SF },
4169 { OPTION_MASK_ISA_LWP, CODE_FOR_lwp_llwpcb, "__builtin_ia32_llwpcb", IX86_BUILTIN_LLWPCB, UNKNOWN, (int) VOID_FTYPE_PVOID },
4170 { OPTION_MASK_ISA_LWP, CODE_FOR_lwp_slwpcb, "__builtin_ia32_slwpcb", IX86_BUILTIN_SLWPCB, UNKNOWN, (int) PVOID_FTYPE_VOID },
4171 @@ -23927,18 +23946,18 @@
4175 - case V8SF_FTYPE_PCV8SF_V8SF:
4176 - case V4DF_FTYPE_PCV4DF_V4DF:
4177 - case V4SF_FTYPE_PCV4SF_V4SF:
4178 - case V2DF_FTYPE_PCV2DF_V2DF:
4179 + case V8SF_FTYPE_PCV8SF_V8SI:
4180 + case V4DF_FTYPE_PCV4DF_V4DI:
4181 + case V4SF_FTYPE_PCV4SF_V4SI:
4182 + case V2DF_FTYPE_PCV2DF_V2DI:
4187 - case VOID_FTYPE_PV8SF_V8SF_V8SF:
4188 - case VOID_FTYPE_PV4DF_V4DF_V4DF:
4189 - case VOID_FTYPE_PV4SF_V4SF_V4SF:
4190 - case VOID_FTYPE_PV2DF_V2DF_V2DF:
4191 + case VOID_FTYPE_PV8SF_V8SI_V8SF:
4192 + case VOID_FTYPE_PV4DF_V4DI_V4DF:
4193 + case VOID_FTYPE_PV4SF_V4SI_V4SF:
4194 + case VOID_FTYPE_PV2DF_V2DI_V2DF:
4197 /* Reserve memory operand for target. */
4198 Index: gcc/config/rs6000/rs6000.c
4199 ===================================================================
4200 --- gcc/config/rs6000/rs6000.c (.../tags/gcc_4_5_2_release) (wersja 169176)
4201 +++ gcc/config/rs6000/rs6000.c (.../branches/gcc-4_5-branch) (wersja 169176)
4202 @@ -4472,7 +4472,7 @@
4204 enum machine_mode mode = GET_MODE (vec);
4205 enum machine_mode inner_mode = GET_MODE_INNER (mode);
4209 if (VECTOR_MEM_VSX_P (mode) && (mode == V2DFmode || mode == V2DImode))
4211 @@ -4485,17 +4485,11 @@
4212 /* Allocate mode-sized buffer. */
4213 mem = assign_stack_temp (mode, GET_MODE_SIZE (mode), 0);
4215 + emit_move_insn (mem, vec);
4217 /* Add offset to field within buffer matching vector element. */
4218 - mem = adjust_address_nv (mem, mode, elt * GET_MODE_SIZE (inner_mode));
4219 + mem = adjust_address_nv (mem, inner_mode, elt * GET_MODE_SIZE (inner_mode));
4221 - /* Store single field into mode-sized buffer. */
4222 - x = gen_rtx_UNSPEC (VOIDmode,
4223 - gen_rtvec (1, const0_rtx), UNSPEC_STVE);
4224 - emit_insn (gen_rtx_PARALLEL (VOIDmode,
4226 - gen_rtx_SET (VOIDmode,
4229 emit_move_insn (target, adjust_address_nv (mem, inner_mode, 0));
4232 @@ -9897,6 +9891,7 @@
4233 rtx op2 = expand_normal (arg2);
4235 enum machine_mode tmode = insn_data[icode].operand[0].mode;
4236 + enum machine_mode smode = insn_data[icode].operand[1].mode;
4237 enum machine_mode mode1 = Pmode;
4238 enum machine_mode mode2 = Pmode;
4240 @@ -9906,8 +9901,8 @@
4241 || arg2 == error_mark_node)
4244 - if (! (*insn_data[icode].operand[1].predicate) (op0, tmode))
4245 - op0 = copy_to_mode_reg (tmode, op0);
4246 + if (! (*insn_data[icode].operand[1].predicate) (op0, smode))
4247 + op0 = copy_to_mode_reg (smode, op0);
4249 op2 = copy_to_mode_reg (mode2, op2);
4251 Index: gcc/config/rs6000/altivec.md
4252 ===================================================================
4253 --- gcc/config/rs6000/altivec.md (.../tags/gcc_4_5_2_release) (wersja 169176)
4254 +++ gcc/config/rs6000/altivec.md (.../branches/gcc-4_5-branch) (wersja 169176)
4256 (define_mode_iterator VM2 [V4SI V8HI V16QI V4SF V2DF V2DI])
4258 (define_mode_attr VI_char [(V4SI "w") (V8HI "h") (V16QI "b")])
4259 +(define_mode_attr VI_scalar [(V4SI "SI") (V8HI "HI") (V16QI "QI")])
4261 ;; Vector move instructions.
4262 (define_insn "*altivec_mov<mode>"
4263 @@ -1777,19 +1778,15 @@
4264 [(set_attr "type" "vecstore")])
4266 (define_insn "altivec_stve<VI_char>x"
4268 - [(set (match_operand:VI 0 "memory_operand" "=Z")
4269 - (match_operand:VI 1 "register_operand" "v"))
4270 - (unspec [(const_int 0)] UNSPEC_STVE)])]
4271 + [(set (match_operand:<VI_scalar> 0 "memory_operand" "=Z")
4272 + (unspec:<VI_scalar> [(match_operand:VI 1 "register_operand" "v")] UNSPEC_STVE))]
4274 "stve<VI_char>x %1,%y0"
4275 [(set_attr "type" "vecstore")])
4277 (define_insn "*altivec_stvesfx"
4279 - [(set (match_operand:V4SF 0 "memory_operand" "=Z")
4280 - (match_operand:V4SF 1 "register_operand" "v"))
4281 - (unspec [(const_int 0)] UNSPEC_STVE)])]
4282 + [(set (match_operand:SF 0 "memory_operand" "=Z")
4283 + (unspec:SF [(match_operand:V4SF 1 "register_operand" "v")] UNSPEC_STVE))]
4286 [(set_attr "type" "vecstore")])
4287 Index: gcc/config/arm/arm.c
4288 ===================================================================
4289 --- gcc/config/arm/arm.c (.../tags/gcc_4_5_2_release) (wersja 169176)
4290 +++ gcc/config/arm/arm.c (.../branches/gcc-4_5-branch) (wersja 169176)
4291 @@ -1114,6 +1114,7 @@
4293 DECL_ARTIFICIAL (va_list_name) = 1;
4294 TYPE_NAME (va_list_type) = va_list_name;
4295 + TYPE_STUB_DECL (va_list_type) = va_list_name;
4296 /* Create the __ap field. */
4297 ap_field = build_decl (BUILTINS_LOCATION,
4299 Index: gcc/config/pa/pa.md
4300 ===================================================================
4301 --- gcc/config/pa/pa.md (.../tags/gcc_4_5_2_release) (wersja 169176)
4302 +++ gcc/config/pa/pa.md (.../branches/gcc-4_5-branch) (wersja 169176)
4304 (match_operand:DI 3 "arith11_operand" "rI"))
4305 (match_operand:DI 1 "register_operand" "r")))]
4307 - "sub%I3 %3,%2,%%r0\;add,dc %%r0,%1,%0"
4308 + "sub%I3,* %3,%2,%%r0\;add,dc %%r0,%1,%0"
4309 [(set_attr "type" "binary")
4310 (set_attr "length" "8")])
4313 (match_operand:DI 3 "register_operand" "r"))
4314 (match_operand:DI 1 "register_operand" "r")))]
4316 - "sub %2,%3,%%r0\;add,dc %%r0,%1,%0"
4317 + "sub,* %2,%3,%%r0\;add,dc %%r0,%1,%0"
4318 [(set_attr "type" "binary")
4319 (set_attr "length" "8")])
4322 (match_operand:DI 3 "int11_operand" "I"))
4323 (match_operand:DI 1 "register_operand" "r")))]
4325 - "addi %k3,%2,%%r0\;add,dc %%r0,%1,%0"
4326 + "addi,* %k3,%2,%%r0\;add,dc %%r0,%1,%0"
4327 [(set_attr "type" "binary")
4328 (set_attr "length" "8")])
4331 (gtu:DI (match_operand:DI 2 "register_operand" "r")
4332 (match_operand:DI 3 "arith11_operand" "rI"))))]
4334 - "sub%I3 %3,%2,%%r0\;sub,db %1,%%r0,%0"
4335 + "sub%I3,* %3,%2,%%r0\;sub,db %1,%%r0,%0"
4336 [(set_attr "type" "binary")
4337 (set_attr "length" "8")])
4340 (match_operand:DI 3 "arith11_operand" "rI")))
4341 (match_operand:DI 4 "register_operand" "r")))]
4343 - "sub%I3 %3,%2,%%r0\;sub,db %1,%4,%0"
4344 + "sub%I3,* %3,%2,%%r0\;sub,db %1,%4,%0"
4345 [(set_attr "type" "binary")
4346 (set_attr "length" "8")])
4349 (ltu:DI (match_operand:DI 2 "register_operand" "r")
4350 (match_operand:DI 3 "register_operand" "r"))))]
4352 - "sub %2,%3,%%r0\;sub,db %1,%%r0,%0"
4353 + "sub,* %2,%3,%%r0\;sub,db %1,%%r0,%0"
4354 [(set_attr "type" "binary")
4355 (set_attr "length" "8")])
4358 (match_operand:DI 3 "register_operand" "r")))
4359 (match_operand:DI 4 "register_operand" "r")))]
4361 - "sub %2,%3,%%r0\;sub,db %1,%4,%0"
4362 + "sub,* %2,%3,%%r0\;sub,db %1,%4,%0"
4363 [(set_attr "type" "binary")
4364 (set_attr "length" "8")])
4367 (leu:DI (match_operand:DI 2 "register_operand" "r")
4368 (match_operand:DI 3 "int11_operand" "I"))))]
4370 - "addi %k3,%2,%%r0\;sub,db %1,%%r0,%0"
4371 + "addi,* %k3,%2,%%r0\;sub,db %1,%%r0,%0"
4372 [(set_attr "type" "binary")
4373 (set_attr "length" "8")])
4375 @@ -1013,7 +1013,7 @@
4376 (match_operand:DI 3 "int11_operand" "I")))
4377 (match_operand:DI 4 "register_operand" "r")))]
4379 - "addi %k3,%2,%%r0\;sub,db %1,%4,%0"
4380 + "addi,* %k3,%2,%%r0\;sub,db %1,%4,%0"
4381 [(set_attr "type" "binary")
4382 (set_attr "length" "8")])
4384 Index: gcc/config/pa/pa.c
4385 ===================================================================
4386 --- gcc/config/pa/pa.c (.../tags/gcc_4_5_2_release) (wersja 169176)
4387 +++ gcc/config/pa/pa.c (.../branches/gcc-4_5-branch) (wersja 169176)
4388 @@ -6097,37 +6097,94 @@
4391 /* Return TRUE if INSN, a jump insn, has an unfilled delay slot and
4392 - it branches to the next real instruction. Otherwise, return FALSE. */
4393 + it branches into the delay slot. Otherwise, return FALSE. */
4396 branch_to_delay_slot_p (rtx insn)
4400 if (dbr_sequence_length ())
4403 - return next_real_insn (JUMP_LABEL (insn)) == next_real_insn (insn);
4404 + jump_insn = next_active_insn (JUMP_LABEL (insn));
4407 + insn = next_active_insn (insn);
4408 + if (jump_insn == insn)
4411 + /* We can't rely on the length of asms. So, we return FALSE when
4412 + the branch is followed by an asm. */
4414 + || GET_CODE (PATTERN (insn)) == ASM_INPUT
4415 + || extract_asm_operands (PATTERN (insn)) != NULL_RTX
4416 + || get_attr_length (insn) > 0)
4423 -/* Return TRUE if INSN, a jump insn, needs a nop in its delay slot.
4424 +/* Return TRUE if INSN, a forward jump insn, needs a nop in its delay slot.
4426 This occurs when INSN has an unfilled delay slot and is followed
4427 - by an ASM_INPUT. Disaster can occur if the ASM_INPUT is empty and
4428 - the jump branches into the delay slot. So, we add a nop in the delay
4429 - slot just to be safe. This messes up our instruction count, but we
4430 - don't know how big the ASM_INPUT insn is anyway. */
4431 + by an asm. Disaster can occur if the asm is empty and the jump
4432 + branches into the delay slot. So, we add a nop in the delay slot
4433 + when this occurs. */
4436 branch_needs_nop_p (rtx insn)
4441 if (dbr_sequence_length ())
4444 - next_insn = next_real_insn (insn);
4445 - return GET_CODE (PATTERN (next_insn)) == ASM_INPUT;
4446 + jump_insn = next_active_insn (JUMP_LABEL (insn));
4449 + insn = next_active_insn (insn);
4450 + if (!insn || jump_insn == insn)
4453 + if (!(GET_CODE (PATTERN (insn)) == ASM_INPUT
4454 + || extract_asm_operands (PATTERN (insn)) != NULL_RTX)
4455 + && get_attr_length (insn) > 0)
4462 +/* Return TRUE if INSN, a forward jump insn, can use nullification
4463 + to skip the following instruction. This avoids an extra cycle due
4464 + to a mis-predicted branch when we fall through. */
4467 +use_skip_p (rtx insn)
4469 + rtx jump_insn = next_active_insn (JUMP_LABEL (insn));
4473 + insn = next_active_insn (insn);
4475 + /* We can't rely on the length of asms, so we can't skip asms. */
4477 + || GET_CODE (PATTERN (insn)) == ASM_INPUT
4478 + || extract_asm_operands (PATTERN (insn)) != NULL_RTX)
4480 + if (get_attr_length (insn) == 4
4481 + && jump_insn == next_active_insn (insn))
4483 + if (get_attr_length (insn) > 0)
4490 /* This routine handles all the normal conditional branch sequences we
4491 might need to generate. It handles compare immediate vs compare
4492 register, nullification of delay slots, varying length branches,
4493 @@ -6139,7 +6196,7 @@
4494 output_cbranch (rtx *operands, int negated, rtx insn)
4496 static char buf[100];
4499 int nullify = INSN_ANNULLED_BRANCH_P (insn);
4500 int length = get_attr_length (insn);
4502 @@ -6177,12 +6234,7 @@
4503 /* A forward branch over a single nullified insn can be done with a
4504 comclr instruction. This avoids a single cycle penalty due to
4505 mis-predicted branch if we fall through (branch not taken). */
4507 - && next_real_insn (insn) != 0
4508 - && get_attr_length (next_real_insn (insn)) == 4
4509 - && JUMP_LABEL (insn) == next_nonnote_insn (next_real_insn (insn))
4512 + useskip = (length == 4 && nullify) ? use_skip_p (insn) : FALSE;
4516 @@ -6470,7 +6522,7 @@
4517 output_bb (rtx *operands ATTRIBUTE_UNUSED, int negated, rtx insn, int which)
4519 static char buf[100];
4522 int nullify = INSN_ANNULLED_BRANCH_P (insn);
4523 int length = get_attr_length (insn);
4525 @@ -6496,14 +6548,8 @@
4526 /* A forward branch over a single nullified insn can be done with a
4527 extrs instruction. This avoids a single cycle penalty due to
4528 mis-predicted branch if we fall through (branch not taken). */
4529 + useskip = (length == 4 && nullify) ? use_skip_p (insn) : FALSE;
4532 - && next_real_insn (insn) != 0
4533 - && get_attr_length (next_real_insn (insn)) == 4
4534 - && JUMP_LABEL (insn) == next_nonnote_insn (next_real_insn (insn))
4541 @@ -6661,7 +6707,7 @@
4542 output_bvb (rtx *operands ATTRIBUTE_UNUSED, int negated, rtx insn, int which)
4544 static char buf[100];
4547 int nullify = INSN_ANNULLED_BRANCH_P (insn);
4548 int length = get_attr_length (insn);
4550 @@ -6687,14 +6733,8 @@
4551 /* A forward branch over a single nullified insn can be done with a
4552 extrs instruction. This avoids a single cycle penalty due to
4553 mis-predicted branch if we fall through (branch not taken). */
4554 + useskip = (length == 4 && nullify) ? use_skip_p (insn) : FALSE;
4557 - && next_real_insn (insn) != 0
4558 - && get_attr_length (next_real_insn (insn)) == 4
4559 - && JUMP_LABEL (insn) == next_nonnote_insn (next_real_insn (insn))
4566 Index: libstdc++-v3/src/bitmap_allocator.cc
4567 ===================================================================
4568 --- libstdc++-v3/src/bitmap_allocator.cc (.../tags/gcc_4_5_2_release) (wersja 169176)
4569 +++ libstdc++-v3/src/bitmap_allocator.cc (.../branches/gcc-4_5-branch) (wersja 169176)
4572 #if defined __GTHREADS
4573 __mutex_type& __bfl_mutex = _M_get_mutex();
4574 + __bfl_mutex.lock();
4576 const vector_type& __free_list = _M_get_free_list();
4577 using __gnu_cxx::__detail::__lower_bound;
4578 Index: libstdc++-v3/ChangeLog
4579 ===================================================================
4580 --- libstdc++-v3/ChangeLog (.../tags/gcc_4_5_2_release) (wersja 169176)
4581 +++ libstdc++-v3/ChangeLog (.../branches/gcc-4_5-branch) (wersja 169176)
4583 +2011-01-19 Graham Reed <greed@pobox.com>
4585 + PR libstdc++/47354
4586 + * src/bitmap_allocator.cc (free_list::_M_get): Lock mutex.
4588 +2010-12-17 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4590 + Backport from mainline:
4591 + 2010-12-10 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4593 + * testsuite/lib/libstdc++.exp (v3-build_support): Delete
4594 + libtestc++.a before creation.
4596 2010-12-16 Release Manager
4598 * GCC 4.5.2 released.
4599 Index: libstdc++-v3/testsuite/lib/libstdc++.exp
4600 ===================================================================
4601 --- libstdc++-v3/testsuite/lib/libstdc++.exp (.../tags/gcc_4_5_2_release) (wersja 169176)
4602 +++ libstdc++-v3/testsuite/lib/libstdc++.exp (.../branches/gcc-4_5-branch) (wersja 169176)
4603 @@ -586,6 +586,15 @@
4606 # Collect into libtestc++.a
4607 + # Delete libtestc++.a first. Mixed 32 and 64-bit archives cannot be
4608 + # linked on IRIX 6.
4609 + # Use same procedure as gcc-dg.exp (remove-build-file).
4610 + if [is_remote host] {
4611 + # Ensure the host knows the file is gone by deleting there
4613 + remote_file host delete "./libtestc++.a"
4615 + remote_file build delete "./libtestc++.a"
4616 if [info exists env(AR)] {
4619 Index: libffi/ChangeLog
4620 ===================================================================
4621 --- libffi/ChangeLog (.../tags/gcc_4_5_2_release) (wersja 169176)
4622 +++ libffi/ChangeLog (.../branches/gcc-4_5-branch) (wersja 169176)
4624 +2010-12-17 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4626 + Backport from mainline:
4627 + 2010-12-01 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4629 + * testsuite/libffi.call/ffitest.h [__sgi] (PRId64, PRIu64): Define.
4630 + (PRIuPTR): Define.
4632 2010-12-16 Release Manager
4634 * GCC 4.5.2 released.
4635 Index: libffi/testsuite/libffi.call/ffitest.h
4636 ===================================================================
4637 --- libffi/testsuite/libffi.call/ffitest.h (.../tags/gcc_4_5_2_release) (wersja 169176)
4638 +++ libffi/testsuite/libffi.call/ffitest.h (.../branches/gcc-4_5-branch) (wersja 169176)
4640 #define PRIuPTR "lu"
4645 +/* IRIX 6.5 <inttypes.h> provides all definitions, but only for C99
4647 +#if (_MIPS_SZLONG == 32)
4648 +#define PRId64 "lld"
4649 +#define PRIu64 "llu"
4651 +/* This doesn't match <inttypes.h>, which always has "lld" here, but the
4652 + arguments are uint64_t, int64_t, which are unsigned long, long for
4653 + 64-bit in <sgidefs.h>. */
4654 +#if (_MIPS_SZLONG == 64)
4655 +#define PRId64 "ld"
4656 +#define PRIu64 "lu"
4658 +/* This doesn't match <inttypes.h>, which has "u" here, but the arguments
4659 + are uintptr_t, which is always unsigned long. */
4660 +#define PRIuPTR "lu"
4663 /* Solaris < 10 kludge. */
4664 #if defined(__sun__) && defined(__svr4__) && !defined(PRIuPTR)
4665 #if defined(__arch64__) || defined (__x86_64__)
4666 Index: libjava/classpath/lib/java/security/VMAccessController.class
4667 ===================================================================
4668 Nie można wyświetlić: plik binarny.
4669 svn:mime-type = application/octet-stream
4670 Index: libjava/ChangeLog
4671 ===================================================================
4672 --- libjava/ChangeLog (.../tags/gcc_4_5_2_release) (wersja 169176)
4673 +++ libjava/ChangeLog (.../branches/gcc-4_5-branch) (wersja 169176)
4675 +2011-01-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4677 + Backport from mainline:
4678 + 2011-01-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4680 + * testsuite/libjava.jni/jni.exp (gcj_jni_get_cxxflags_invocation):
4681 + Add -shared-libgcc to cxxflags for *-*-solaris*.
4684 +2010-12-13 Andrew John Hughes <ahughes@redhat.com>
4687 + * libjava/java/security/VMAccessController.java:
4688 + (DEFAULT_CONTEXT): Create ProtectionDomain with
4689 + four argument constructor (arguments are the same
4690 + as those implied by the two argument constructor).
4691 + (getContext()): Create ProtectionDomain instances
4692 + with four argument constructor using a null Principal
4693 + array (as before) but including the classloader, which
4694 + was always null before.
4696 2010-12-16 Release Manager
4698 * GCC 4.5.2 released.
4699 Index: libjava/testsuite/libjava.jni/jni.exp
4700 ===================================================================
4701 --- libjava/testsuite/libjava.jni/jni.exp (.../tags/gcc_4_5_2_release) (wersja 169176)
4702 +++ libjava/testsuite/libjava.jni/jni.exp (.../branches/gcc-4_5-branch) (wersja 169176)
4703 @@ -274,8 +274,10 @@
4704 eval lappend cxxflags "-shared-libgcc -lgcj $libiconv"
4707 + # Make sure libgcc unwinder is used on 64-bit Solaris 10+/x86 rather than
4709 if { [istarget "*-*-solaris*"] } {
4710 - lappend cxxflags "-lsocket"
4711 + lappend cxxflags "-shared-libgcc"
4715 Index: libjava/java/security/VMAccessController.java
4716 ===================================================================
4717 --- libjava/java/security/VMAccessController.java (.../tags/gcc_4_5_2_release) (wersja 169176)
4718 +++ libjava/java/security/VMAccessController.java (.../branches/gcc-4_5-branch) (wersja 169176)
4720 Permissions permissions = new Permissions();
4721 permissions.add(new AllPermission());
4722 ProtectionDomain[] domain = new ProtectionDomain[] {
4723 - new ProtectionDomain(source, permissions)
4724 + new ProtectionDomain(source, permissions, null, null)
4726 DEFAULT_CONTEXT = new AccessControlContext(domain);
4728 @@ -178,12 +178,13 @@
4729 for (int i = 3; i < classes.length; i++)
4731 Class clazz = classes[i];
4732 + ClassLoader loader = clazz.getClassLoader();
4736 debug("checking " + clazz);
4737 // subject to getClassLoader RuntimePermission
4738 - debug("loader = " + clazz.getClassLoader());
4739 + debug("loader = " + loader);
4742 if (privileged && i == classes.length - 2)
4744 // Create a static snapshot of this domain, which may change over time
4745 // if the current policy changes.
4746 domains.add(new ProtectionDomain(domain.getCodeSource(),
4747 - domain.getPermissions()));
4748 + domain.getPermissions(),
4753 Index: libcpp/directives.c
4754 ===================================================================
4755 --- libcpp/directives.c (.../tags/gcc_4_5_2_release) (wersja 169176)
4756 +++ libcpp/directives.c (.../branches/gcc-4_5-branch) (wersja 169176)
4757 @@ -280,16 +280,17 @@
4759 end_directive (cpp_reader *pfile, int skip_line)
4761 - if (pfile->state.in_deferred_pragma)
4763 - else if (CPP_OPTION (pfile, traditional))
4764 + if (CPP_OPTION (pfile, traditional))
4766 /* Revert change of prepare_directive_trad. */
4767 - pfile->state.prevent_expansion--;
4768 + if (!pfile->state.in_deferred_pragma)
4769 + pfile->state.prevent_expansion--;
4771 if (pfile->directive != &dtable[T_DEFINE])
4772 _cpp_remove_overlay (pfile);
4774 + else if (pfile->state.in_deferred_pragma)
4776 /* We don't skip for an assembler #. */
4779 Index: libcpp/ChangeLog
4780 ===================================================================
4781 --- libcpp/ChangeLog (.../tags/gcc_4_5_2_release) (wersja 169176)
4782 +++ libcpp/ChangeLog (.../branches/gcc-4_5-branch) (wersja 169176)
4784 +2011-11-04 Eric Botcazou <ebotcazou@adacore.com>
4785 + Jakub Jelinek <jakub@redhat.com>
4787 + PR preprocessor/39213
4788 + * directives.c (end_directive): Call _cpp_remove_overlay for deferred
4789 + pragmas as well in traditional mode.
4791 2010-12-16 Release Manager
4793 * GCC 4.5.2 released.