~ubuntu-branches/debian/sid/gcc-4.5/sid

« back to all changes in this revision

Viewing changes to debian/patches/svn-updates-linaro.diff

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2011-06-08 14:37:01 UTC
  • Revision ID: james.westby@ubuntu.com-20110608143701-ct4xkye5yzeorvcd
Tags: 4.5.3-2
* Update to SVN 20110608 (r174800) from the gcc-4_5-branch.
  - Fix PR target/48774, PR tree-optimization/48809, PR middle-end/48597,
    PR c/48742, PR c/48685, PR middle-end/43085, PR bootstrap/43858,
    PR target/48288, PR c++/48046, PR fortran/48894, PR target/48857,
    PR target/48495, PR tree-optimization/48837, PR target/48900,
    PR c++/40975, PR target/48252, PR target/48708, PR c++/48936,
    PR c++/48873, PR target/49238, PR target/49186,
    PR tree-optimization/49038, PR target/43700, PR target/43995,
    PR rtl-optimization/41619, PR tree-optimization/47714, PR fortran/45786.
* pr45979.diff: Update to the version from the trunk.
* Update the Linaro support to the 4.5-2011.05-0 release.
* Check for large file support (backport from 4.6). LP: #784705.
* Add some conditionals to build the package on older releases.
* Fix c++ biarch header installation on i386.
* Add multiarch attributes for gnat and libgnat packages.
* Add multiarch attributes for libgcj* packages.
* Adjust build dependency on multiarch glibc.
* Enable multiarch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# DP: updates from the 4.5 branch upto 20110421 (r172810).
 
1
# DP: updates from the 4.5 branch upto 20110608 (r174800).
2
2
 
3
3
last_updated()
4
4
{
5
5
        cat > ${dir}LAST_UPDATED <<EOF
6
 
Thu Apr 21 07:08:12 CEST 2011
7
 
Thu Apr 21 05:08:12 UTC 2011 (revision 172810)
 
6
Wed Jun  8 11:49:21 CEST 2011
 
7
Wed Jun  8 09:49:21 UTC 2011 (revision 174800)
8
8
EOF
9
9
}
10
10
 
11
 
svn diff svn://gcc.gnu.org/svn/gcc/branches/gcc-4_5-branch@172013 svn://gcc.gnu.org/svn/gcc/branches/gcc-4_5-branch \
 
11
svn diff svn://gcc.gnu.org/svn/gcc/branches/gcc-4_5-branch@173417 svn://gcc.gnu.org/svn/gcc/branches/gcc-4_5-branch \
12
12
        | sed -r 's,^--- (\S+)\t(\S+)(.*)$,--- a/src/\1\t\2,;s,^\+\+\+ (\S+)\t(\S+)(.*)$,+++ b/src/\1\t\2,' \
13
13
        | awk '/^Index:.*\.(class|texi)/ {skip=1; next} /^Index:/ { skip=0 } skip==0'
14
14
 
 
15
Index: libgomp/fortran.c
 
16
===================================================================
 
17
--- a/src/libgomp/fortran.c     (revision
 
18
+++ b/src/libgomp/fortran.c     (revision
 
19
@@ -1,4 +1,4 @@
 
20
-/* Copyright (C) 2005, 2007, 2008, 2009 Free Software Foundation, Inc.
 
21
+/* Copyright (C) 2005, 2007, 2008, 2009, 2011 Free Software Foundation, Inc.
 
22
    Contributed by Jakub Jelinek <jakub@redhat.com>.
 
23
 
 
24
    This file is part of the GNU OpenMP Library (libgomp).
 
25
@@ -27,6 +27,7 @@
 
26
 #include "libgomp.h"
 
27
 #include "libgomp_f.h"
 
28
 #include <stdlib.h>
 
29
+#include <limits.h>
 
30
 
 
31
 #ifdef HAVE_ATTRIBUTE_ALIAS
 
32
 /* Use internal aliases if possible.  */
 
33
@@ -244,6 +245,8 @@
 
34
 omp_lock_symver (omp_test_nest_lock_)
 
35
 #endif
 
36
 
 
37
+#define TO_INT(x) ((x) > INT_MIN ? (x) < INT_MAX ? (x) : INT_MAX : INT_MIN)
 
38
+
 
39
 void
 
40
 omp_set_dynamic_ (const int32_t *set)
 
41
 {
 
42
@@ -253,7 +256,7 @@
 
43
 void
 
44
 omp_set_dynamic_8_ (const int64_t *set)
 
45
 {
 
46
-  omp_set_dynamic (*set);
 
47
+  omp_set_dynamic (!!*set);
 
48
 }
 
49
 
 
50
 void
 
51
@@ -265,7 +268,7 @@
 
52
 void
 
53
 omp_set_nested_8_ (const int64_t *set)
 
54
 {
 
55
-  omp_set_nested (*set);
 
56
+  omp_set_nested (!!*set);
 
57
 }
 
58
 
 
59
 void
 
60
@@ -277,7 +280,7 @@
 
61
 void
 
62
 omp_set_num_threads_8_ (const int64_t *set)
 
63
 {
 
64
-  omp_set_num_threads (*set);
 
65
+  omp_set_num_threads (TO_INT (*set));
 
66
 }
 
67
 
 
68
 int32_t
 
69
@@ -343,7 +346,7 @@
 
70
 void
 
71
 omp_set_schedule_8_ (const int32_t *kind, const int64_t *modifier)
 
72
 {
 
73
-  omp_set_schedule (*kind, *modifier);
 
74
+  omp_set_schedule (*kind, TO_INT (*modifier));
 
75
 }
 
76
 
 
77
 void
 
78
@@ -381,7 +384,7 @@
 
79
 void
 
80
 omp_set_max_active_levels_8_ (const int64_t *levels)
 
81
 {
 
82
-  omp_set_max_active_levels (*levels);
 
83
+  omp_set_max_active_levels (TO_INT (*levels));
 
84
 }
 
85
 
 
86
 int32_t
 
87
@@ -405,7 +408,7 @@
 
88
 int32_t
 
89
 omp_get_ancestor_thread_num_8_ (const int64_t *level)
 
90
 {
 
91
-  return omp_get_ancestor_thread_num (*level);
 
92
+  return omp_get_ancestor_thread_num (TO_INT (*level));
 
93
 }
 
94
 
 
95
 int32_t
 
96
@@ -417,7 +420,7 @@
 
97
 int32_t
 
98
 omp_get_team_size_8_ (const int64_t *level)
 
99
 {
 
100
-  return omp_get_team_size (*level);
 
101
+  return omp_get_team_size (TO_INT (*level));
 
102
 }
 
103
 
 
104
 int32_t
 
105
Index: libgomp/ChangeLog
 
106
===================================================================
 
107
--- a/src/libgomp/ChangeLog     (revision
 
108
+++ b/src/libgomp/ChangeLog     (revision
 
109
@@ -1,3 +1,15 @@
 
110
+2011-05-06  Jakub Jelinek  <jakub@redhat.com>
 
111
+
 
112
+       PR fortran/48894
 
113
+       * fortran.c: Include limits.h.
 
114
+       (TO_INT): Define.
 
115
+       (omp_set_dynamic_8_, omp_set_num_threads_8_): Use !!*set instead of
 
116
+       *set.
 
117
+       (omp_set_num_threads_8_, omp_set_schedule_8_,
 
118
+       omp_set_max_active_levels_8_, omp_get_ancestor_thread_num_8_,
 
119
+       omp_get_team_size_8_): Use TO_INT macro.
 
120
+       * testsuite/libgomp.fortran/pr48894.f90: New test.
 
121
+
 
122
 2011-04-28  Release Manager
 
123
 
 
124
        * GCC 4.5.3 released.
 
125
Index: libgomp/testsuite/libgomp.fortran/pr48894.f90
 
126
===================================================================
 
127
--- a/src/libgomp/testsuite/libgomp.fortran/pr48894.f90 (revision
 
128
+++ b/src/libgomp/testsuite/libgomp.fortran/pr48894.f90 (revision
 
129
@@ -0,0 +1,23 @@
 
130
+! PR fortran/48894
 
131
+! { dg-do run }
 
132
+! { dg-options "-fdefault-integer-8" }
 
133
+
 
134
+  use omp_lib
 
135
+  integer, parameter :: zero = 0
 
136
+  integer :: err
 
137
+  logical :: l
 
138
+  err = 0
 
139
+  !$omp parallel
 
140
+    !$omp parallel private (l)
 
141
+      l = omp_get_ancestor_thread_num (-HUGE (zero)) .ne. -1
 
142
+      l = l .or. (omp_get_ancestor_thread_num (HUGE (zero)) .ne. -1)
 
143
+      l = l .or. (omp_get_team_size (-HUGE (zero)) .ne. -1)
 
144
+      l = l .or. (omp_get_team_size (HUGE (zero)) .ne. -1)
 
145
+      if (l) then
 
146
+        !$omp atomic
 
147
+          err = err + 1
 
148
+      endif
 
149
+    !$omp end parallel
 
150
+  !$omp end parallel
 
151
+  if (err .ne. 0) call abort
 
152
+end
 
153
Index: gcc/DATESTAMP
 
154
===================================================================
 
155
--- a/src/gcc/DATESTAMP (revision
 
156
+++ b/src/gcc/DATESTAMP (revision
 
157
@@ -1 +1 @@
 
158
-20110505
 
159
+20110608
 
160
Index: gcc/tree-tailcall.c
 
161
===================================================================
 
162
--- a/src/gcc/tree-tailcall.c   (revision
 
163
+++ b/src/gcc/tree-tailcall.c   (revision
 
164
@@ -1007,6 +1007,14 @@
 
165
                                             integer_one_node);
 
166
     }
 
167
 
 
168
+  if (a_acc || m_acc)
 
169
+    {
 
170
+      /* When the tail call elimination using accumulators is performed,
 
171
+        statements adding the accumulated value are inserted at all exits.
 
172
+        This turns all other tail calls to non-tail ones.  */
 
173
+      opt_tailcalls = false;
 
174
+    }
 
175
+
 
176
   for (; tailcalls; tailcalls = next)
 
177
     {
 
178
       next = tailcalls->next;
 
179
Index: gcc/ChangeLog
 
180
===================================================================
 
181
--- a/src/gcc/ChangeLog (revision
 
182
+++ b/src/gcc/ChangeLog (revision
 
183
@@ -1,5 +1,171 @@
 
184
-2010-05-05  Ira Rosen  <ira.rosen@linaro.org>
 
185
+2011-06-08  Kaz Kojima  <kkojima@gcc.gnu.org>
 
186
 
 
187
+       Backport from mainline
 
188
+       2011-06-01  Kaz Kojima  <kkojima@gcc.gnu.org>
 
189
+
 
190
+       PR target/49238
 
191
+       * config/sh/sh.c (expand_cbranchdi4): Use a scratch register if
 
192
+       needed when original operands are used for msw_skip comparison.
 
193
+
 
194
+2011-06-05  Eric Botcazou  <ebotcazou@adacore.com>
 
195
+
 
196
+       * config/sparc/sparc.c (output_return): Fix thinko in the output of an
 
197
+       EH return when delayed branches are disabled.
 
198
+
 
199
+2011-06-05  Kaz Kojima  <kkojima@gcc.gnu.org>
 
200
+
 
201
+       Backport from mainline
 
202
+       2011-05-30  Kaz Kojima  <kkojima@gcc.gnu.org>
 
203
+
 
204
+       PR target/49186
 
205
+       * config/sh/sh.c (expand_cbranchdi4): Set msw_skip when the high
 
206
+       part of the second operand is 0.
 
207
+
 
208
+2011-06-04  Ira Rosen  <ira.rosen@linaro.org>
 
209
+
 
210
+       PR tree-optimization/49038
 
211
+       * tree-vect-loop-manip.c (vect_generate_tmps_on_preheader):
 
212
+       Ensure at least one epilogue iteration if required by data
 
213
+       accesses with gaps.
 
214
+       * tree-vectorizer.h (struct _loop_vec_info): Add new field
 
215
+       to mark loops that require peeling for gaps.
 
216
+       * tree-vect-loop.c (new_loop_vec_info): Initialize new field.
 
217
+       (vect_estimate_min_profitable_iters): Take peeling for gaps into
 
218
+       account.
 
219
+       (vect_transform_loop): Generate epilogue if required by data
 
220
+       access with gaps.
 
221
+       * tree-vect-data-refs.c (vect_analyze_group_access): Mark the
 
222
+       loop as requiring an epilogue if there are gaps in the end of
 
223
+       the strided group.
 
224
+
 
225
+2011-05-29  Richard Sandiford  <rdsandiford@googlemail.com>
 
226
+
 
227
+       PR target/43700
 
228
+       * config/mips/mips.c (mips_cfun_call_saved_reg_p): Handle global
 
229
+       registers.
 
230
+
 
231
+2011-05-29  Richard Sandiford  <rdsandiford@googlemail.com>
 
232
+
 
233
+       PR target/43995
 
234
+       * config/mips/mips.c (mips_pic_call_symbol_from_set): Add a
 
235
+       recurse_p argument.  Only follow register copies if it is set,
 
236
+       and prevent mips_find_pic_call_symbol from recursing.
 
237
+       (mips_find_pic_call_symbol): Add a recurse_p argument.
 
238
+       Pass it to mips_pic_call_symbol_from_set.
 
239
+       (mips_annotate_pic_calls): Update accordingly.
 
240
+
 
241
+2011-05-26  Eric Botcazou  <ebotcazou@adacore.com>
 
242
+
 
243
+       * config/sparc/sparc-protos.h (sparc_optimization_options): Declare.
 
244
+       * config/sparc/sparc.h (OPTIMIZATION_OPTIONS): Define.
 
245
+       * config/sparc/sparc.c (sparc_optimization_options): New function.
 
246
+       Set flag_ira_share_save_slots to 0.
 
247
+
 
248
+       Backport from mainline
 
249
+       2011-01-21  Jeff Law  <law@redhat.com>
 
250
+
 
251
+       PR rtl-optimization/41619
 
252
+       * caller-save.c (setup_save_areas): Break out code to determine
 
253
+       which hard regs are live across calls by examining the reload chains
 
254
+       so that it is always used.
 
255
+       Eliminate code which checked REG_N_CALLS_CROSSED.
 
256
+
 
257
+2011-05-25  Uros Bizjak  <ubizjak@gmail.com>
 
258
+
 
259
+       PR target/49133
 
260
+       * config/i386/sse.md (sse2_loadhpd): Remove shufpd alternative.
 
261
+
 
262
+2011-05-21  Eric Botcazou  <ebotcazou@adacore.com>
 
263
+
 
264
+       * config/sparc/sparc.md (setjmp): Handle PIC mode and use the hard
 
265
+       frame pointer.
 
266
+
 
267
+2011-05-21  Eric Botcazou  <ebotcazou@adacore.com>
 
268
+
 
269
+       * config/sparc/sparc.c (eligible_for_return_delay): Do not return
 
270
+       false if there are call-saved registers here...
 
271
+       (sparc_can_use_return_insn_p): ...but here instead.
 
272
+       (save_or_restore_regs): Fix thinko.
 
273
+       (sparc_expand_prologue): Use current_function_is_leaf.
 
274
+       (sparc_frame_pointer_required): Likewise.
 
275
+
 
276
+2011-05-20  Nick Clifton  <nickc@redhat.com>
 
277
+
 
278
+       * config/rx/rx.h (HAVE_PRE_DECREMENT): Fix typo in macro name.
 
279
+
 
280
+2011-05-16  Uros Bizjak  <ubizjak@gmail.com>
 
281
+
 
282
+       * config/i386/i386.md (*movxf_internal): Disable CONST_DOUBLE
 
283
+       optimization for CM_MEDIUM and CM_LARGE code models.  Fix usage
 
284
+       of standard_80387_constant_p.
 
285
+       (*movxf_internal_nointeger): Ditto.
 
286
+       (*movdf_internal): Remove dead code-size optimization.
 
287
+       (*movdf_internal_rex64): Fix usage of standard_80387_constant_p.
 
288
+       (*movdf_internal_nointeger): Ditto.
 
289
+       (*movsf_internal): Ditto.
 
290
+       (floating point move splitters): Ditto.
 
291
+       * config/i386/constraints.md (G): Ditto.
 
292
+       * config/i386/i386.c (ix86_preferred_reload_class): Ditto.
 
293
+
 
294
+2011-05-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
 
295
+
 
296
+       Backport from mainline
 
297
+       2011-05-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
 
298
+
 
299
+       PR target/48857, 48495
 
300
+       * config/rs6000/rs6000.h (VSX_SCALAR_MODE): Delete.
 
301
+       (VSX_MODE): Ditto.
 
302
+       (VSX_MOVE_MODE): Ditto.
 
303
+       (ALTIVEC_OR_VSX_VECTOR_MODE): New macro, combine all Altivec and
 
304
+       VSX vector types.  Add V2DImode.
 
305
+       (HARD_REGNO_CALLER_SAVE_MODE): Use it instead of
 
306
+       ALTIVEC_VECTOR_MODE and VSX_VECTOR_MODE calls.
 
307
+       (MODES_TIEABLE_P): Ditto.
 
308
+
 
309
+       * config/rs6000/rs6000.c (rs6000_emit_move): Use
 
310
+       ALTIVEC_OR_VSX_MODE instead of ALTIVEC_VECTOR_MODE and
 
311
+       VSX_VECTOR_MODE.
 
312
+       (init_cumulative_args): Ditto.
 
313
+       (rs6000_function_arg_boundary): Ditto.
 
314
+       (rs6000_function_arg_advance_1): Ditto.
 
315
+       (rs6000_function_arg): Ditto.
 
316
+       (rs6000_function_ok_for_sibcall): Ditto.
 
317
+       (emit_frame_save): Ditto.
 
318
+       (rs6000_function_value): Ditto.
 
319
+       (rs6000_libcall_value): Ditto.
 
320
+
 
321
+2011-05-10  Jakub Jelinek  <jakub@redhat.com>
 
322
+
 
323
+       Backported from mainline
 
324
+       2011-05-07  Zdenek Dvorak  <ook@ucw.cz>
 
325
+
 
326
+       PR tree-optimization/48837
 
327
+       * tree-tailcall.c (tree_optimize_tail_calls_1): Do not mark tailcalls
 
328
+       when accumulator transformation is performed.
 
329
+
 
330
+2011-05-09  Eric Botcazou  <ebotcazou@adacore.com>
 
331
+
 
332
+       * var-tracking.c (find_mem_expr_in_1pdv): Fix thinko.
 
333
+       (dataflow_set_preserve_mem_locs): Likewise.
 
334
+
 
335
+2011-05-07  Alan Modra  <amodra@gmail.com>
 
336
+
 
337
+       PR target/48900
 
338
+       * config/rs6000/rs6000.c (rs6000_legitimize_tls_address): Use
 
339
+       const0_rtx as the arg to the dummy __tls_get_addr libcall.
 
340
+
 
341
+2011-05-05  Jason Merrill  <jason@redhat.com>
 
342
+
 
343
+       PR c++/40975
 
344
+       * tree-inline.c (copy_tree_r): Handle STATEMENT_LIST.
 
345
+
 
346
+2011-05-05  Julian Brown  <julian@codesourcery.com>
 
347
+
 
348
+       * config/arm/neon.md (vec_set<mode>_internal): Fix misplaced
 
349
+       parenthesis in D-register case.
 
350
+
 
351
+2011-05-05  Ira Rosen  <ira.rosen@linaro.org>
 
352
+
 
353
        Backport from mainline:
 
354
        2011-04-18  Ulrich Weigand  <ulrich.weigand@linaro.org>
 
355
                    Ira Rosen  <ira.rosen@linaro.org>
 
356
Index: gcc/tree-vect-loop-manip.c
 
357
===================================================================
 
358
--- a/src/gcc/tree-vect-loop-manip.c    (revision
 
359
+++ b/src/gcc/tree-vect-loop-manip.c    (revision
 
360
@@ -1516,7 +1516,7 @@
 
361
   edge pe;
 
362
   basic_block new_bb;
 
363
   gimple_seq stmts;
 
364
-  tree ni_name;
 
365
+  tree ni_name, ni_minus_gap_name;
 
366
   tree var;
 
367
   tree ratio_name;
 
368
   tree ratio_mult_vf_name;
 
369
@@ -1533,9 +1533,39 @@
 
370
   ni_name = vect_build_loop_niters (loop_vinfo, cond_expr_stmt_list);
 
371
   log_vf = build_int_cst (TREE_TYPE (ni), exact_log2 (vf));
 
372
 
 
373
+  /* If epilogue loop is required because of data accesses with gaps, we
 
374
+     subtract one iteration from the total number of iterations here for
 
375
+     correct calculation of RATIO.  */
 
376
+  if (LOOP_VINFO_PEELING_FOR_GAPS (loop_vinfo))
 
377
+    {
 
378
+      ni_minus_gap_name = fold_build2 (MINUS_EXPR, TREE_TYPE (ni_name),
 
379
+                                      ni_name,
 
380
+                                      build_one_cst (TREE_TYPE (ni_name)));
 
381
+      if (!is_gimple_val (ni_minus_gap_name))
 
382
+       {
 
383
+         var = create_tmp_var (TREE_TYPE (ni), "ni_gap");
 
384
+          add_referenced_var (var);
 
385
+
 
386
+          stmts = NULL;
 
387
+          ni_minus_gap_name = force_gimple_operand (ni_minus_gap_name, &stmts,
 
388
+                                                   true, var);
 
389
+          if (cond_expr_stmt_list)
 
390
+            gimple_seq_add_seq (&cond_expr_stmt_list, stmts);
 
391
+          else
 
392
+            {
 
393
+              pe = loop_preheader_edge (loop);
 
394
+              new_bb = gsi_insert_seq_on_edge_immediate (pe, stmts);
 
395
+              gcc_assert (!new_bb);
 
396
+            }
 
397
+        }
 
398
+    }
 
399
+  else
 
400
+    ni_minus_gap_name = ni_name;
 
401
+
 
402
   /* Create: ratio = ni >> log2(vf) */
 
403
 
 
404
-  ratio_name = fold_build2 (RSHIFT_EXPR, TREE_TYPE (ni_name), ni_name, log_vf);
 
405
+  ratio_name = fold_build2 (RSHIFT_EXPR, TREE_TYPE (ni_minus_gap_name),
 
406
+                           ni_minus_gap_name, log_vf);
 
407
   if (!is_gimple_val (ratio_name))
 
408
     {
 
409
       var = create_tmp_var (TREE_TYPE (ni), "bnd");
 
410
Index: gcc/testsuite/gcc.c-torture/execute/960321-1.x
 
411
===================================================================
 
412
--- a/src/gcc/testsuite/gcc.c-torture/execute/960321-1.x        (revision
 
413
+++ b/src/gcc/testsuite/gcc.c-torture/execute/960321-1.x        (revision
 
414
@@ -1,15 +0,0 @@
 
415
-# This test fails to link on 64-bit Solaris 2/x86 due to a Sun as bug.
 
416
-if { [istarget "i?86-*-solaris2*"]
 
417
-     && ! [check_effective_target_ilp32]
 
418
-     && ! [check_effective_target_gas] } { 
 
419
-    set torture_eval_before_compile {
 
420
-        global compiler_conditional_xfail_data
 
421
-        set compiler_conditional_xfail_data {
 
422
-            "64-bit Sun as bug" \
 
423
-                { "i?86-*-solaris2*" } \
 
424
-                { "-O[1-3s]" } \
 
425
-                { "" }
 
426
-       }
 
427
-    }
 
428
-}
 
429
-return 0
 
430
Index: gcc/testsuite/gcc.c-torture/execute/pr49186.c
 
431
===================================================================
 
432
--- a/src/gcc/testsuite/gcc.c-torture/execute/pr49186.c (revision
 
433
+++ b/src/gcc/testsuite/gcc.c-torture/execute/pr49186.c (revision
 
434
@@ -0,0 +1,15 @@
 
435
+/* PR target/49186 */
 
436
+extern void abort (void);
 
437
+
 
438
+int
 
439
+main ()
 
440
+{
 
441
+  int x;
 
442
+  unsigned long long uv = 0x1000000001ULL;
 
443
+
 
444
+  x = (uv < 0x80) ? 1 : ((uv < 0x800) ? 2 : 3);
 
445
+  if (x != 3)
 
446
+    abort ();
 
447
+
 
448
+  return 0;
 
449
+}
 
450
Index: gcc/testsuite/gcc.c-torture/compile/pr49238.c
 
451
===================================================================
 
452
--- a/src/gcc/testsuite/gcc.c-torture/compile/pr49238.c (revision
 
453
+++ b/src/gcc/testsuite/gcc.c-torture/compile/pr49238.c (revision
 
454
@@ -0,0 +1,18 @@
 
455
+/* PR target/49238 */
 
456
+extern int bar (void);
 
457
+
 
458
+void
 
459
+foo (unsigned long long a, int b)
 
460
+{
 
461
+  int i;
 
462
+
 
463
+  if (b)
 
464
+    for (a = -12; a >= 10; a = bar ())
 
465
+      break;
 
466
+  else
 
467
+    return;
 
468
+
 
469
+  for (i = 0; i < 10; i += 10)
 
470
+    if ((i == bar ()) | (bar () >= a))
 
471
+      bar ();
 
472
+}
 
473
Index: gcc/testsuite/gcc.target/arm/neon-vset_lanes8.c
 
474
===================================================================
 
475
--- a/src/gcc/testsuite/gcc.target/arm/neon-vset_lanes8.c       (revision
 
476
+++ b/src/gcc/testsuite/gcc.target/arm/neon-vset_lanes8.c       (revision
 
477
@@ -0,0 +1,21 @@
 
478
+/* Test the `vset_lane_s8' ARM Neon intrinsic.  */
 
479
+
 
480
+/* { dg-do run } */
 
481
+/* { dg-require-effective-target arm_neon_hw } */
 
482
+/* { dg-options "-O0" } */
 
483
+/* { dg-add-options arm_neon } */
 
484
+
 
485
+#include "arm_neon.h"
 
486
+#include <stdlib.h>
 
487
+#include <string.h>
 
488
+
 
489
+int8x8_t x = { 1, 2, 3, 4, 5, 6, 7, 8 };
 
490
+int8x8_t y = { 1, 2, 3, 16, 5, 6, 7, 8 };
 
491
+
 
492
+int main (void)
 
493
+{
 
494
+  x = vset_lane_s8 (16, x, 3);
 
495
+  if (memcmp (&x, &y, sizeof (x)) != 0)
 
496
+    abort();
 
497
+  return 0;
 
498
+}
 
499
Index: gcc/testsuite/gcc.target/powerpc/pr48857.c
 
500
===================================================================
 
501
--- a/src/gcc/testsuite/gcc.target/powerpc/pr48857.c    (revision
 
502
+++ b/src/gcc/testsuite/gcc.target/powerpc/pr48857.c    (revision
 
503
@@ -0,0 +1,25 @@
 
504
+/* { dg-do compile { target { powerpc*-*-* } } } */
 
505
+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 
506
+/* { dg-require-effective-target powerpc_vsx_ok } */
 
507
+/* { dg-options "-O2 -mcpu=power7 -mabi=altivec" } */
 
508
+/* { dg-final { scan-assembler-times "lxvd2x" 1 } } */
 
509
+/* { dg-final { scan-assembler-times "stxvd2x" 1 } } */
 
510
+/* { dg-final { scan-assembler-not "ld" } } */
 
511
+/* { dg-final { scan-assembler-not "lwz" } } */
 
512
+/* { dg-final { scan-assembler-not "stw" } } */
 
513
+/* { dg-final { scan-assembler-not "addi" } } */
 
514
+
 
515
+typedef vector long long v2di_type;
 
516
+
 
517
+v2di_type
 
518
+return_v2di (v2di_type *ptr)
 
519
+{
 
520
+  return *ptr;         /* should generate lxvd2x 34,0,3.  */
 
521
+}
 
522
+
 
523
+void
 
524
+pass_v2di (v2di_type arg, v2di_type *ptr)
 
525
+{
 
526
+  *ptr = arg;          /* should generate stxvd2x 34,0,{3,5}.  */
 
527
+}
 
528
+
 
529
Index: gcc/testsuite/gcc.target/mips/reg-var-1.c
 
530
===================================================================
 
531
--- a/src/gcc/testsuite/gcc.target/mips/reg-var-1.c     (revision
 
532
+++ b/src/gcc/testsuite/gcc.target/mips/reg-var-1.c     (revision
 
533
@@ -0,0 +1,16 @@
 
534
+/* { dg-do run } */
 
535
+register int g asm ("$18");
 
536
+
 
537
+void __attribute__((noinline))
 
538
+test (void)
 
539
+{
 
540
+  g = g + 1;
 
541
+}
 
542
+
 
543
+int
 
544
+main (void)
 
545
+{
 
546
+  g = 2;
 
547
+  test ();
 
548
+  return g != 3;
 
549
+}
 
550
Index: gcc/testsuite/gcc.dg/pr48837.c
 
551
===================================================================
 
552
--- a/src/gcc/testsuite/gcc.dg/pr48837.c        (revision
 
553
+++ b/src/gcc/testsuite/gcc.dg/pr48837.c        (revision
 
554
@@ -0,0 +1,30 @@
 
555
+/* PR tree-optimization/48837 */
 
556
+/* { dg-do run } */
 
557
+/* { dg-options "-O2" } */
 
558
+
 
559
+void abort (void);
 
560
+
 
561
+__attribute__((noinline))
 
562
+int baz(void)
 
563
+{
 
564
+  return 1;
 
565
+}
 
566
+
 
567
+inline const int *bar(const int *a, const int *b)
 
568
+{
 
569
+ return *a ? a : b;
 
570
+}
 
571
+
 
572
+int foo(int a, int b)
 
573
+{
 
574
+   return a || b ? baz() : foo(*bar(&a, &b), 1) + foo(1, 0);
 
575
+}
 
576
+
 
577
+int main(void)
 
578
+{
 
579
+ if (foo(0, 0) != 2)
 
580
+   abort();
 
581
+
 
582
+ return 0;
 
583
+}
 
584
+
 
585
Index: gcc/testsuite/gcc.dg/vect/vect-strided-u8-i8-gap4-unknown.c
 
586
===================================================================
 
587
--- a/src/gcc/testsuite/gcc.dg/vect/vect-strided-u8-i8-gap4-unknown.c   (revision
 
588
+++ b/src/gcc/testsuite/gcc.dg/vect/vect-strided-u8-i8-gap4-unknown.c   (revision
 
589
@@ -0,0 +1,116 @@
 
590
+/* { dg-require-effective-target vect_int } */
 
591
+
 
592
+#include <stdarg.h>
 
593
+#include <stdio.h>
 
594
+#include "tree-vect.h"
 
595
+
 
596
+#define N 160 
 
597
+
 
598
+typedef struct {
 
599
+   unsigned char a;
 
600
+   unsigned char b;
 
601
+   unsigned char c;
 
602
+   unsigned char d;
 
603
+   unsigned char e;
 
604
+   unsigned char f;
 
605
+   unsigned char g;
 
606
+   unsigned char h;
 
607
+} s;
 
608
+
 
609
+__attribute__ ((noinline)) int
 
610
+main1 (s *arr, int n)
 
611
+{
 
612
+  int i;
 
613
+  s *ptr = arr;
 
614
+  s res[N];
 
615
+  unsigned char x;
 
616
+
 
617
+  for (i = 0; i < N; i++)
 
618
+    {
 
619
+      res[i].a = 0;
 
620
+      res[i].b = 0;
 
621
+      res[i].c = 0;
 
622
+      res[i].d = 0;
 
623
+      res[i].e = 0;
 
624
+      res[i].f = 0;
 
625
+      res[i].g = 0;
 
626
+      res[i].h = 0;
 
627
+      __asm__ volatile ("");
 
628
+    }
 
629
+
 
630
+  /* Check peeling for gaps for unknown loop bound.  */
 
631
+  for (i = 0; i < n; i++)
 
632
+    {
 
633
+      res[i].c = ptr->b + ptr->c;
 
634
+      x = ptr->c + ptr->f;
 
635
+      res[i].a = x + ptr->b;
 
636
+      res[i].d = ptr->b + ptr->c;
 
637
+      res[i].b = ptr->c;
 
638
+      res[i].f = ptr->f + ptr->e;
 
639
+      res[i].e = ptr->b + ptr->e; 
 
640
+      res[i].h = ptr->c;   
 
641
+      res[i].g = ptr->b + ptr->c;
 
642
+      ptr++; 
 
643
+    } 
 
644
+   
 
645
+  /* check results:  */
 
646
+  for (i = 0; i < n; i++)
 
647
+    { 
 
648
+      if (res[i].c != arr[i].b + arr[i].c
 
649
+          || res[i].a != arr[i].c + arr[i].f + arr[i].b
 
650
+          || res[i].d != arr[i].b + arr[i].c
 
651
+          || res[i].b != arr[i].c
 
652
+          || res[i].f != arr[i].f + arr[i].e
 
653
+          || res[i].e != arr[i].b + arr[i].e
 
654
+          || res[i].h != arr[i].c
 
655
+          || res[i].g != arr[i].b + arr[i].c)
 
656
+        abort ();
 
657
+   }
 
658
+
 
659
+  /* Check also that we don't do more iterations than needed.  */
 
660
+  for (i = n; i < N; i++)
 
661
+    {
 
662
+      if (res[i].c == arr[i].b + arr[i].c
 
663
+          || res[i].a == arr[i].c + arr[i].f + arr[i].b
 
664
+          || res[i].d == arr[i].b + arr[i].c
 
665
+          || res[i].b == arr[i].c
 
666
+          || res[i].f == arr[i].f + arr[i].e
 
667
+          || res[i].e == arr[i].b + arr[i].e
 
668
+          || res[i].h == arr[i].c
 
669
+          || res[i].g == arr[i].b + arr[i].c)
 
670
+        abort ();
 
671
+   }
 
672
+
 
673
+  return 0;
 
674
+}
 
675
+
 
676
+
 
677
+int main (void)
 
678
+{
 
679
+  int i;
 
680
+  s arr[N];
 
681
+  
 
682
+  check_vect ();
 
683
+
 
684
+  for (i = 0; i < N; i++)
 
685
+    { 
 
686
+      arr[i].a = 5;
 
687
+      arr[i].b = 6;
 
688
+      arr[i].c = 17;
 
689
+      arr[i].d = 3;
 
690
+      arr[i].e = 16;
 
691
+      arr[i].f = 16;
 
692
+      arr[i].g = 3;
 
693
+      arr[i].h = 56;
 
694
+      if (arr[i].a == 178)
 
695
+         abort(); 
 
696
+    } 
 
697
+
 
698
+  main1 (arr, N-2);
 
699
+
 
700
+  return 0;
 
701
+}
 
702
+
 
703
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target { vect_interleave && vect_extract_even_odd } } } } */
 
704
+/* { dg-final { cleanup-tree-dump "vect" } } */
 
705
+  
 
706
Index: gcc/testsuite/gcc.dg/vect/pr49038.c
 
707
===================================================================
 
708
--- a/src/gcc/testsuite/gcc.dg/vect/pr49038.c   (revision
 
709
+++ b/src/gcc/testsuite/gcc.dg/vect/pr49038.c   (revision
 
710
@@ -0,0 +1,42 @@
 
711
+#include <sys/mman.h>
 
712
+#include <stdio.h>
 
713
+
 
714
+#define COUNT 320
 
715
+#define MMAP_SIZE 0x10000
 
716
+#define ADDRESS 0x1122000000
 
717
+#define TYPE unsigned short
 
718
+
 
719
+#ifndef MAP_ANONYMOUS
 
720
+#define MAP_ANONYMOUS MAP_ANON
 
721
+#endif
 
722
+
 
723
+void __attribute__((noinline))
 
724
+foo (TYPE *__restrict a, TYPE *__restrict b)
 
725
+{
 
726
+  int n;
 
727
+
 
728
+  for (n = 0; n < COUNT; n++)
 
729
+    a[n] = b[n * 2];
 
730
+}
 
731
+
 
732
+int
 
733
+main (void)
 
734
+{
 
735
+  void *x;
 
736
+  size_t b_offset;
 
737
+
 
738
+  x = mmap ((void *) ADDRESS, MMAP_SIZE, PROT_READ | PROT_WRITE,
 
739
+           MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
 
740
+  if (x == MAP_FAILED)
 
741
+    {
 
742
+      perror ("mmap");
 
743
+      return 1;
 
744
+    }
 
745
+
 
746
+  b_offset = MMAP_SIZE - (2 * COUNT - 1) * sizeof (TYPE);
 
747
+  foo ((unsigned short *) x,
 
748
+       (unsigned short *) ((char *) x + b_offset));
 
749
+  return 0;
 
750
+}
 
751
+
 
752
+/* { dg-final { cleanup-tree-dump "vect" } } */
 
753
Index: gcc/testsuite/ChangeLog
 
754
===================================================================
 
755
--- a/src/gcc/testsuite/ChangeLog       (revision
 
756
+++ b/src/gcc/testsuite/ChangeLog       (revision
 
757
@@ -1,5 +1,87 @@
 
758
-2010-05-05  Ira Rosen  <ira.rosen@linaro.org>
 
759
+2011-06-08  Kaz Kojima  <kkojima@gcc.gnu.org>
 
760
 
 
761
+       Backport from mainline
 
762
+       2011-06-01  Kaz Kojima  <kkojima@gcc.gnu.org>
 
763
+
 
764
+       PR target/49238
 
765
+       * gcc.c-torture/compile/pr49238.c: New.
 
766
+
 
767
+2011-06-05  Kaz Kojima  <kkojima@gcc.gnu.org>
 
768
+
 
769
+       Backport from mainline
 
770
+       2011-05-30  Kaz Kojima  <kkojima@gcc.gnu.org>
 
771
+
 
772
+       PR target/49186
 
773
+       * gcc.c-torture/execute/pr49186.c: New.
 
774
+
 
775
+2011-06-04  Ira Rosen  <ira.rosen@linaro.org>
 
776
+
 
777
+       PR tree-optimization/49038
 
778
+       * gcc.dg/vect/vect-strided-u8-i8-gap4-unknown.c: New test.
 
779
+       * gcc.dg/vect/pr49038.c: New test.
 
780
+
 
781
+2011-06-02  Thomas Koenig  <tkoenig@gcc.gnu.org>
 
782
+
 
783
+       Backport from trunk
 
784
+       PR fortran/45786
 
785
+       * gfortran.dg/operator_7.f90:  New test case.
 
786
+
 
787
+2011-05-31  Duncan Sands  <baldrick@free.fr>
 
788
+
 
789
+       Backported from 4.6 branch
 
790
+       2011-03-09  Martin Jambor  <mjambor@suse.cz>
 
791
+
 
792
+       PR tree-optimization/47714
 
793
+       * g++.dg/torture/pr47714.C: New test.
 
794
+
 
795
+2011-05-29  Richard Sandiford  <rdsandiford@googlemail.com>
 
796
+
 
797
+       * gcc.target/mips/reg-var-1.c: New test.
 
798
+
 
799
+2011-05-25  Uros Bizjak  <ubizjak@gmail.com>
 
800
+
 
801
+       PR target/49133
 
802
+       * g++.dg/other/pr49133.C: New test.
 
803
+
 
804
+2011-05-20  Jason Merrill  <jason@redhat.com>
 
805
+
 
806
+       * g++.dg/init/new32.C: New.
 
807
+
 
808
+2011-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
 
809
+
 
810
+       * gcc.c-torture/execute/960321-1.x: Remove.
 
811
+
 
812
+2011-05-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
 
813
+
 
814
+       Backport from mainline
 
815
+       2011-05-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
 
816
+
 
817
+       PR target/48857
 
818
+       * gcc.target/powerpc/pr48857.c: New file, make sure V2DI arguments
 
819
+       are passed and returned in vector registers.
 
820
+
 
821
+2011-05-10  Jakub Jelinek  <jakub@redhat.com>
 
822
+
 
823
+       Backported from mainline
 
824
+       2011-05-07  Zdenek Dvorak  <ook@ucw.cz>
 
825
+
 
826
+       PR tree-optimization/48837
 
827
+       * gcc.dg/pr48837.c: New testcase.
 
828
+
 
829
+2011-05-09  Jason Merrill  <jason@redhat.com>
 
830
+
 
831
+       * g++.dg/template/nontype23.C: New.
 
832
+
 
833
+2011-05-05  Jason Merrill  <jason@redhat.com>
 
834
+
 
835
+       * g++.dg/init/new30.C: New.
 
836
+
 
837
+2011-05-05  Julian Brown  <julian@codesourcery.com>
 
838
+
 
839
+       * gcc.target/arm/neon-vset_lanes8.c: New test.
 
840
+
 
841
+2011-05-05  Ira Rosen  <ira.rosen@linaro.org>
 
842
+
 
843
        Backport from mainline:
 
844
        2011-04-18  Ulrich Weigand  <ulrich.weigand@linaro.org>
 
845
                    Ira Rosen  <ira.rosen@linaro.org>
 
846
Index: gcc/testsuite/g++.dg/other/pr49133.C
 
847
===================================================================
 
848
--- a/src/gcc/testsuite/g++.dg/other/pr49133.C  (revision
 
849
+++ b/src/gcc/testsuite/g++.dg/other/pr49133.C  (revision
 
850
@@ -0,0 +1,37 @@
 
851
+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
 
852
+/* { dg-options "-O2 -msse2" } */
 
853
+/* { dg-require-effective-target sse2 } */
 
854
+/* { dg-require-effective-target sse2_runtime } */
 
855
+
 
856
+#include <xmmintrin.h>
 
857
+
 
858
+extern "C" void abort ();
 
859
+
 
860
+typedef double double_a __attribute__((__may_alias__));
 
861
+
 
862
+struct V
 
863
+{
 
864
+  __m128d data;
 
865
+};
 
866
+
 
867
+int
 
868
+main()
 
869
+{
 
870
+  V a;
 
871
+  __m128d b;
 
872
+
 
873
+  b = _mm_set_pd (1., 0.);
 
874
+  a.data = _mm_set_pd (1., 0.);
 
875
+  a.data = _mm_add_pd (a.data,
 
876
+                      _mm_and_pd (_mm_cmpeq_pd (a.data, _mm_set1_pd (0.)),
 
877
+                                  _mm_set1_pd (2.)));
 
878
+  reinterpret_cast<double_a *>(&a.data)[1] += 1.;
 
879
+  b = _mm_add_pd (b, _mm_and_pd (_mm_cmpeq_pd (b, _mm_set1_pd (0.)),
 
880
+                                _mm_set1_pd (1.)));
 
881
+  b = _mm_add_pd (b, _mm_and_pd (_mm_cmpeq_pd (b, _mm_set1_pd (1.)),
 
882
+                                _mm_set1_pd (1.)));
 
883
+  if (_mm_movemask_pd (_mm_cmpeq_pd (a.data, b)) != 0x3)
 
884
+    abort();
 
885
+
 
886
+  return 0;
 
887
+}
 
888
Index: gcc/testsuite/g++.dg/init/new30.C
 
889
===================================================================
 
890
--- a/src/gcc/testsuite/g++.dg/init/new30.C     (revision
 
891
+++ b/src/gcc/testsuite/g++.dg/init/new30.C     (revision
 
892
@@ -0,0 +1,15 @@
 
893
+// PR c++/40975
 
894
+
 
895
+struct data_type
 
896
+{
 
897
+    // constructor required to reproduce compiler bug
 
898
+    data_type() {}
 
899
+};
 
900
+
 
901
+struct ptr_type
 
902
+{
 
903
+    // array new as default argument required to reproduce compiler bug
 
904
+    ptr_type (data_type* ptr = new data_type[1]) { delete[] ptr; }
 
905
+};
 
906
+
 
907
+ptr_type obj;
 
908
Index: gcc/testsuite/g++.dg/init/new32.C
 
909
===================================================================
 
910
--- a/src/gcc/testsuite/g++.dg/init/new32.C     (revision
 
911
+++ b/src/gcc/testsuite/g++.dg/init/new32.C     (revision
 
912
@@ -0,0 +1,16 @@
 
913
+// PR c++/48873
 
914
+
 
915
+#include <new>
 
916
+
 
917
+struct D {
 
918
+private:
 
919
+  ~D();
 
920
+};
 
921
+
 
922
+template<class T>
 
923
+T& create();
 
924
+
 
925
+void f()
 
926
+{
 
927
+  D* dp = new (((void*) 0)) D(create<D>()); // #
 
928
+}
 
929
Index: gcc/testsuite/g++.dg/torture/pr47714.C
 
930
===================================================================
 
931
--- a/src/gcc/testsuite/g++.dg/torture/pr47714.C        (revision
 
932
+++ b/src/gcc/testsuite/g++.dg/torture/pr47714.C        (revision
 
933
@@ -0,0 +1,16 @@
 
934
+struct A { virtual ~A () {} };
 
935
+struct B { virtual ~B () {} };
 
936
+struct C { virtual const A *foo (int) const = 0; };
 
937
+struct E : public B, public A { };
 
938
+struct F : public C
 
939
+{
 
940
+  virtual const E *foo (int) const;
 
941
+};
 
942
+void bar (int &);
 
943
+
 
944
+const E *
 
945
+F::foo (int x) const
 
946
+{
 
947
+  bar (x);
 
948
+  return __null;
 
949
+}
 
950
Index: gcc/testsuite/g++.dg/template/nontype23.C
 
951
===================================================================
 
952
--- a/src/gcc/testsuite/g++.dg/template/nontype23.C     (revision
 
953
+++ b/src/gcc/testsuite/g++.dg/template/nontype23.C     (revision
 
954
@@ -0,0 +1,9 @@
 
955
+// PR c++/48936
 
956
+
 
957
+template <bool C> int foo (void);
 
958
+template <class T> struct S
 
959
+{
 
960
+  static const unsigned int a = sizeof (T);
 
961
+  enum { c = sizeof (foo <(a == 0)> ()) };
 
962
+};
 
963
+S<int> x;
 
964
Index: gcc/testsuite/gfortran.dg/operator_7.f90
 
965
===================================================================
 
966
--- a/src/gcc/testsuite/gfortran.dg/operator_7.f90      (revision
 
967
+++ b/src/gcc/testsuite/gfortran.dg/operator_7.f90      (revision
 
968
@@ -0,0 +1,27 @@
 
969
+! { dg-do compile }
 
970
+! PR fortran/45786 - operators were not correctly marked as public
 
971
+! if the alternative form was used.
 
972
+! Test case contributed by Neil Carlson.
 
973
+module foo_type
 
974
+  private
 
975
+  public :: foo, operator(==)
 
976
+  type :: foo
 
977
+    integer :: bar
 
978
+  end type
 
979
+  interface operator(.eq.)
 
980
+    module procedure eq_foo
 
981
+  end interface
 
982
+contains
 
983
+  logical function eq_foo (a, b)
 
984
+    type(foo), intent(in) :: a, b
 
985
+    eq_foo = (a%bar == b%bar)
 
986
+  end function
 
987
+end module
 
988
+
 
989
+ subroutine use_it (a, b)
 
990
+  use foo_type
 
991
+  type(foo) :: a, b
 
992
+  print *, a == b
 
993
+end subroutine
 
994
+
 
995
+! { dg-final { cleanup-modules "foo_type" } }
 
996
Index: gcc/cp/method.c
 
997
===================================================================
 
998
--- a/src/gcc/cp/method.c       (revision
 
999
+++ b/src/gcc/cp/method.c       (revision
 
1000
@@ -374,6 +374,7 @@
 
1001
       DECL_CONTEXT (x) = thunk_fndecl;
 
1002
       SET_DECL_RTL (x, NULL_RTX);
 
1003
       DECL_HAS_VALUE_EXPR_P (x) = 0;
 
1004
+      TREE_ADDRESSABLE (x) = 0;
 
1005
       t = x;
 
1006
     }
 
1007
   a = nreverse (t);
 
1008
Index: gcc/cp/tree.c
 
1009
===================================================================
 
1010
--- a/src/gcc/cp/tree.c (revision
 
1011
+++ b/src/gcc/cp/tree.c (revision
 
1012
@@ -2954,7 +2954,8 @@
 
1013
   if (!TREE_SIDE_EFFECTS (exp))
 
1014
     init_expr = NULL_TREE;
 
1015
   else if (!real_lvalue_p (exp)
 
1016
-          || !TYPE_NEEDS_CONSTRUCTING (TREE_TYPE (exp)))
 
1017
+          || (!TYPE_NEEDS_CONSTRUCTING (TREE_TYPE (exp))
 
1018
+              && !TYPE_HAS_NONTRIVIAL_DESTRUCTOR (TREE_TYPE (exp))))
 
1019
     {
 
1020
       init_expr = get_target_expr (exp);
 
1021
       exp = TARGET_EXPR_SLOT (init_expr);
 
1022
Index: gcc/cp/ChangeLog
 
1023
===================================================================
 
1024
--- a/src/gcc/cp/ChangeLog      (revision
 
1025
+++ b/src/gcc/cp/ChangeLog      (revision
 
1026
@@ -1,3 +1,22 @@
 
1027
+2011-05-31  Duncan Sands  <baldrick@free.fr>
 
1028
+
 
1029
+       Backported from 4.6 branch
 
1030
+       2011-03-09  Martin Jambor  <mjambor@suse.cz>
 
1031
+
 
1032
+       PR tree-optimization/47714
 
1033
+       * method.c (use_thunk): Clear addressable flag of thunk arguments.
 
1034
+
 
1035
+2011-05-20  Jason Merrill  <jason@redhat.com>
 
1036
+
 
1037
+       PR c++/48873
 
1038
+       * tree.c (stabilize_expr): Don't make gratuitous copies of classes.
 
1039
+
 
1040
+2011-05-09  Jason Merrill  <jason@redhat.com>
 
1041
+
 
1042
+       PR c++/48936
 
1043
+       * decl2.c (mark_used): Instantiate constant variables even
 
1044
+       in unevaluated context.
 
1045
+
 
1046
 2011-04-27  Jason Merrill  <jason@redhat.com>
 
1047
 
 
1048
        PR c++/48046
 
1049
Index: gcc/cp/decl2.c
 
1050
===================================================================
 
1051
--- a/src/gcc/cp/decl2.c        (revision
 
1052
+++ b/src/gcc/cp/decl2.c        (revision
 
1053
@@ -3991,8 +3991,6 @@
 
1054
 void
 
1055
 mark_used (tree decl)
 
1056
 {
 
1057
-  HOST_WIDE_INT saved_processing_template_decl = 0;
 
1058
-
 
1059
   /* If DECL is a BASELINK for a single function, then treat it just
 
1060
      like the DECL for the function.  Otherwise, if the BASELINK is
 
1061
      for an overloaded function, we don't know which function was
 
1062
@@ -4029,9 +4027,6 @@
 
1063
       error ("used here");
 
1064
       return;
 
1065
     }
 
1066
-  /* If we don't need a value, then we don't need to synthesize DECL.  */
 
1067
-  if (cp_unevaluated_operand != 0)
 
1068
-    return;
 
1069
 
 
1070
   /* We can only check DECL_ODR_USED on variables or functions with
 
1071
      DECL_LANG_SPECIFIC set, and these are also the only decls that we
 
1072
@@ -4059,9 +4054,10 @@
 
1073
      DECL.  However, if DECL is a static data member initialized with
 
1074
      a constant, we need the value right now because a reference to
 
1075
      such a data member is not value-dependent.  */
 
1076
-  if (TREE_CODE (decl) == VAR_DECL
 
1077
-      && DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P (decl)
 
1078
-      && DECL_CLASS_SCOPE_P (decl))
 
1079
+  if (DECL_INTEGRAL_CONSTANT_VAR_P (decl)
 
1080
+      && !DECL_INITIAL (decl)
 
1081
+      && DECL_LANG_SPECIFIC (decl)
 
1082
+      && DECL_TEMPLATE_INSTANTIATION (decl))
 
1083
     {
 
1084
       /* Don't try to instantiate members of dependent types.  We
 
1085
         cannot just use dependent_type_p here because this function
 
1086
@@ -4071,12 +4067,14 @@
 
1087
       if (CLASSTYPE_TEMPLATE_INFO ((DECL_CONTEXT (decl)))
 
1088
          && uses_template_parms (CLASSTYPE_TI_ARGS (DECL_CONTEXT (decl))))
 
1089
        return;
 
1090
-      /* Pretend that we are not in a template, even if we are, so
 
1091
-        that the static data member initializer will be processed.  */
 
1092
-      saved_processing_template_decl = processing_template_decl;
 
1093
-      processing_template_decl = 0;
 
1094
+      instantiate_decl (decl, /*defer_ok=*/false,
 
1095
+                       /*expl_inst_class_mem_p=*/false);
 
1096
     }
 
1097
 
 
1098
+  /* If we don't need a value, then we don't need to synthesize DECL.  */
 
1099
+  if (cp_unevaluated_operand != 0)
 
1100
+    return;
 
1101
+
 
1102
   if (processing_template_decl)
 
1103
     return;
 
1104
 
 
1105
@@ -4149,8 +4147,6 @@
 
1106
        need.  Therefore, we always try to defer instantiation.  */
 
1107
     instantiate_decl (decl, /*defer_ok=*/true,
 
1108
                      /*expl_inst_class_mem_p=*/false);
 
1109
-
 
1110
-  processing_template_decl = saved_processing_template_decl;
 
1111
 }
 
1112
 
 
1113
 #include "gt-cp-decl2.h"
 
1114
Index: gcc/caller-save.c
 
1115
===================================================================
 
1116
--- a/src/gcc/caller-save.c     (revision
 
1117
+++ b/src/gcc/caller-save.c     (revision
 
1118
@@ -439,101 +439,93 @@
 
1119
 void
 
1120
 setup_save_areas (void)
 
1121
 {
 
1122
-  int i, j, k;
 
1123
-  unsigned int r;
 
1124
+  int i, j, k, freq;
 
1125
   HARD_REG_SET hard_regs_used;
 
1126
+  struct saved_hard_reg *saved_reg;
 
1127
+  rtx insn;
 
1128
+  struct insn_chain *chain, *next;
 
1129
+  unsigned int regno;
 
1130
+  HARD_REG_SET hard_regs_to_save, used_regs, this_insn_sets;
 
1131
+  reg_set_iterator rsi;
 
1132
 
 
1133
-  /* Allocate space in the save area for the largest multi-register
 
1134
-     pseudos first, then work backwards to single register
 
1135
-     pseudos.  */
 
1136
-
 
1137
-  /* Find and record all call-used hard-registers in this function.  */
 
1138
   CLEAR_HARD_REG_SET (hard_regs_used);
 
1139
-  for (i = FIRST_PSEUDO_REGISTER; i < max_regno; i++)
 
1140
-    if (reg_renumber[i] >= 0 && REG_N_CALLS_CROSSED (i) > 0)
 
1141
-      {
 
1142
-       unsigned int regno = reg_renumber[i];
 
1143
-       unsigned int endregno
 
1144
-         = end_hard_regno (GET_MODE (regno_reg_rtx[i]), regno);
 
1145
-       for (r = regno; r < endregno; r++)
 
1146
-         if (call_used_regs[r])
 
1147
-           SET_HARD_REG_BIT (hard_regs_used, r);
 
1148
-      }
 
1149
 
 
1150
-  if (optimize && flag_ira_share_save_slots)
 
1151
+  /* Find every CALL_INSN and record which hard regs are live across the
 
1152
+     call into HARD_REG_MAP and HARD_REGS_USED.  */
 
1153
+  initiate_saved_hard_regs ();
 
1154
+  /* Create hard reg saved regs.  */
 
1155
+  for (chain = reload_insn_chain; chain != 0; chain = next)
 
1156
     {
 
1157
-      rtx insn, slot;
 
1158
-      struct insn_chain *chain, *next;
 
1159
-      char *saved_reg_conflicts;
 
1160
-      unsigned int regno;
 
1161
-      int next_k, freq;
 
1162
-      struct saved_hard_reg *saved_reg, *saved_reg2, *saved_reg3;
 
1163
-      int call_saved_regs_num;
 
1164
-      struct saved_hard_reg *call_saved_regs[FIRST_PSEUDO_REGISTER];
 
1165
-      HARD_REG_SET hard_regs_to_save, used_regs, this_insn_sets;
 
1166
-      reg_set_iterator rsi;
 
1167
-      int best_slot_num;
 
1168
-      int prev_save_slots_num;
 
1169
-      rtx prev_save_slots[FIRST_PSEUDO_REGISTER];
 
1170
+      insn = chain->insn;
 
1171
+      next = chain->next;
 
1172
+      if (!CALL_P (insn)
 
1173
+         || find_reg_note (insn, REG_NORETURN, NULL))
 
1174
+       continue;
 
1175
+      freq = REG_FREQ_FROM_BB (BLOCK_FOR_INSN (insn));
 
1176
+      REG_SET_TO_HARD_REG_SET (hard_regs_to_save,
 
1177
+                              &chain->live_throughout);
 
1178
+      COPY_HARD_REG_SET (used_regs, call_used_reg_set);
 
1179
 
 
1180
-      initiate_saved_hard_regs ();
 
1181
-      /* Create hard reg saved regs.  */
 
1182
-      for (chain = reload_insn_chain; chain != 0; chain = next)
 
1183
+      /* Record all registers set in this call insn.  These don't
 
1184
+        need to be saved.  N.B. the call insn might set a subreg
 
1185
+        of a multi-hard-reg pseudo; then the pseudo is considered
 
1186
+        live during the call, but the subreg that is set
 
1187
+        isn't.  */
 
1188
+      CLEAR_HARD_REG_SET (this_insn_sets);
 
1189
+      note_stores (PATTERN (insn), mark_set_regs, &this_insn_sets);
 
1190
+      /* Sibcalls are considered to set the return value.  */
 
1191
+      if (SIBLING_CALL_P (insn) && crtl->return_rtx)
 
1192
+       mark_set_regs (crtl->return_rtx, NULL_RTX, &this_insn_sets);
 
1193
+
 
1194
+      AND_COMPL_HARD_REG_SET (used_regs, call_fixed_reg_set);
 
1195
+      AND_COMPL_HARD_REG_SET (used_regs, this_insn_sets);
 
1196
+      AND_HARD_REG_SET (hard_regs_to_save, used_regs);
 
1197
+      for (regno = 0; regno < FIRST_PSEUDO_REGISTER; regno++)
 
1198
+       if (TEST_HARD_REG_BIT (hard_regs_to_save, regno))
 
1199
+         {
 
1200
+           if (hard_reg_map[regno] != NULL)
 
1201
+             hard_reg_map[regno]->call_freq += freq;
 
1202
+           else
 
1203
+             saved_reg = new_saved_hard_reg (regno, freq);
 
1204
+           SET_HARD_REG_BIT (hard_regs_used, regno);
 
1205
+         }
 
1206
+      /* Look through all live pseudos, mark their hard registers.  */
 
1207
+      EXECUTE_IF_SET_IN_REG_SET
 
1208
+       (&chain->live_throughout, FIRST_PSEUDO_REGISTER, regno, rsi)
 
1209
        {
 
1210
-         insn = chain->insn;
 
1211
-         next = chain->next;
 
1212
-         if (!CALL_P (insn)
 
1213
-             || find_reg_note (insn, REG_NORETURN, NULL))
 
1214
+         int r = reg_renumber[regno];
 
1215
+         int bound;
 
1216
+
 
1217
+         if (r < 0)
 
1218
            continue;
 
1219
-         freq = REG_FREQ_FROM_BB (BLOCK_FOR_INSN (insn));
 
1220
-         REG_SET_TO_HARD_REG_SET (hard_regs_to_save,
 
1221
-                                  &chain->live_throughout);
 
1222
-         COPY_HARD_REG_SET (used_regs, call_used_reg_set);
 
1223
 
 
1224
-         /* Record all registers set in this call insn.  These don't
 
1225
-            need to be saved.  N.B. the call insn might set a subreg
 
1226
-            of a multi-hard-reg pseudo; then the pseudo is considered
 
1227
-            live during the call, but the subreg that is set
 
1228
-            isn't.  */
 
1229
-         CLEAR_HARD_REG_SET (this_insn_sets);
 
1230
-         note_stores (PATTERN (insn), mark_set_regs, &this_insn_sets);
 
1231
-         /* Sibcalls are considered to set the return value.  */
 
1232
-         if (SIBLING_CALL_P (insn) && crtl->return_rtx)
 
1233
-           mark_set_regs (crtl->return_rtx, NULL_RTX, &this_insn_sets);
 
1234
-
 
1235
-         AND_COMPL_HARD_REG_SET (used_regs, call_fixed_reg_set);
 
1236
-         AND_COMPL_HARD_REG_SET (used_regs, this_insn_sets);
 
1237
-         AND_HARD_REG_SET (hard_regs_to_save, used_regs);
 
1238
-         for (regno = 0; regno < FIRST_PSEUDO_REGISTER; regno++)
 
1239
-           if (TEST_HARD_REG_BIT (hard_regs_to_save, regno))
 
1240
+         bound = r + hard_regno_nregs[r][PSEUDO_REGNO_MODE (regno)];
 
1241
+         for (; r < bound; r++)
 
1242
+           if (TEST_HARD_REG_BIT (used_regs, r))
 
1243
              {
 
1244
-               if (hard_reg_map[regno] != NULL)
 
1245
-                 hard_reg_map[regno]->call_freq += freq;
 
1246
+               if (hard_reg_map[r] != NULL)
 
1247
+                 hard_reg_map[r]->call_freq += freq;
 
1248
                else
 
1249
-                 saved_reg = new_saved_hard_reg (regno, freq);
 
1250
+                 saved_reg = new_saved_hard_reg (r, freq);
 
1251
+                SET_HARD_REG_BIT (hard_regs_to_save, r);
 
1252
+                SET_HARD_REG_BIT (hard_regs_used, r);
 
1253
              }
 
1254
-         /* Look through all live pseudos, mark their hard registers.  */
 
1255
-         EXECUTE_IF_SET_IN_REG_SET
 
1256
-           (&chain->live_throughout, FIRST_PSEUDO_REGISTER, regno, rsi)
 
1257
-           {
 
1258
-             int r = reg_renumber[regno];
 
1259
-             int bound;
 
1260
+       }
 
1261
+    }
 
1262
 
 
1263
-             if (r < 0)
 
1264
-               continue;
 
1265
+  /* If requested, figure out which hard regs can share save slots.  */
 
1266
+  if (optimize && flag_ira_share_save_slots)
 
1267
+    {
 
1268
+      rtx slot;
 
1269
+      char *saved_reg_conflicts;
 
1270
+      int next_k;
 
1271
+      struct saved_hard_reg *saved_reg2, *saved_reg3;
 
1272
+      int call_saved_regs_num;
 
1273
+      struct saved_hard_reg *call_saved_regs[FIRST_PSEUDO_REGISTER];
 
1274
+      int best_slot_num;
 
1275
+      int prev_save_slots_num;
 
1276
+      rtx prev_save_slots[FIRST_PSEUDO_REGISTER];
 
1277
 
 
1278
-             bound = r + hard_regno_nregs[r][PSEUDO_REGNO_MODE (regno)];
 
1279
-             for (; r < bound; r++)
 
1280
-               if (TEST_HARD_REG_BIT (used_regs, r))
 
1281
-                 {
 
1282
-                   if (hard_reg_map[r] != NULL)
 
1283
-                     hard_reg_map[r]->call_freq += freq;
 
1284
-                   else
 
1285
-                     saved_reg = new_saved_hard_reg (r, freq);
 
1286
-                   SET_HARD_REG_BIT (hard_regs_to_save, r);
 
1287
-                 }
 
1288
-           }
 
1289
-       }
 
1290
       /* Find saved hard register conflicts.  */
 
1291
       saved_reg_conflicts = (char *) xmalloc (saved_regs_num * saved_regs_num);
 
1292
       memset (saved_reg_conflicts, 0, saved_regs_num * saved_regs_num);
 
1293
@@ -691,8 +683,10 @@
 
1294
     }
 
1295
   else
 
1296
     {
 
1297
-      /* Now run through all the call-used hard-registers and allocate
 
1298
-        space for them in the caller-save area.  Try to allocate space
 
1299
+      /* We are not sharing slots. 
 
1300
+
 
1301
+        Run through all the call-used hard-registers and allocate
 
1302
+        space for each in the caller-save area.  Try to allocate space
 
1303
         in a manner which allows multi-register saves/restores to be done.  */
 
1304
 
 
1305
       for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
 
1306
Index: gcc/fortran/interface.c
 
1307
===================================================================
 
1308
--- a/src/gcc/fortran/interface.c       (revision
 
1309
+++ b/src/gcc/fortran/interface.c       (revision
 
1310
@@ -1213,7 +1213,55 @@
 
1311
     }
 
1312
 }
 
1313
 
 
1314
+/* Given an intrinsic op, return an equivalent op if one exists,
 
1315
+   or INTRINSIC_NONE otherwise.  */
 
1316
 
 
1317
+gfc_intrinsic_op
 
1318
+gfc_equivalent_op (gfc_intrinsic_op op)
 
1319
+{
 
1320
+  switch(op)
 
1321
+    {
 
1322
+    case INTRINSIC_EQ:
 
1323
+      return INTRINSIC_EQ_OS;
 
1324
+
 
1325
+    case INTRINSIC_EQ_OS:
 
1326
+      return INTRINSIC_EQ;
 
1327
+
 
1328
+    case INTRINSIC_NE:
 
1329
+      return INTRINSIC_NE_OS;
 
1330
+
 
1331
+    case INTRINSIC_NE_OS:
 
1332
+      return INTRINSIC_NE;
 
1333
+
 
1334
+    case INTRINSIC_GT:
 
1335
+      return INTRINSIC_GT_OS;
 
1336
+
 
1337
+    case INTRINSIC_GT_OS:
 
1338
+      return INTRINSIC_GT;
 
1339
+
 
1340
+    case INTRINSIC_GE:
 
1341
+      return INTRINSIC_GE_OS;
 
1342
+
 
1343
+    case INTRINSIC_GE_OS:
 
1344
+      return INTRINSIC_GE;
 
1345
+
 
1346
+    case INTRINSIC_LT:
 
1347
+      return INTRINSIC_LT_OS;
 
1348
+
 
1349
+    case INTRINSIC_LT_OS:
 
1350
+      return INTRINSIC_LT;
 
1351
+
 
1352
+    case INTRINSIC_LE:
 
1353
+      return INTRINSIC_LE_OS;
 
1354
+
 
1355
+    case INTRINSIC_LE_OS:
 
1356
+      return INTRINSIC_LE;
 
1357
+
 
1358
+    default:
 
1359
+      return INTRINSIC_NONE;
 
1360
+    }
 
1361
+}
 
1362
+
 
1363
 /* For the namespace, check generic, user operator and intrinsic
 
1364
    operator interfaces for consistency and to remove duplicate
 
1365
    interfaces.  We traverse the whole namespace, counting on the fact
 
1366
@@ -1253,75 +1301,19 @@
 
1367
 
 
1368
       for (ns2 = ns; ns2; ns2 = ns2->parent)
 
1369
        {
 
1370
+         gfc_intrinsic_op other_op;
 
1371
+         
 
1372
          if (check_interface1 (ns->op[i], ns2->op[i], 0,
 
1373
                                interface_name, true))
 
1374
            goto done;
 
1375
 
 
1376
-         switch (i)
 
1377
-           {
 
1378
-             case INTRINSIC_EQ:
 
1379
-               if (check_interface1 (ns->op[i], ns2->op[INTRINSIC_EQ_OS],
 
1380
-                                     0, interface_name, true)) goto done;
 
1381
-               break;
 
1382
-
 
1383
-             case INTRINSIC_EQ_OS:
 
1384
-               if (check_interface1 (ns->op[i], ns2->op[INTRINSIC_EQ],
 
1385
-                                     0, interface_name, true)) goto done;
 
1386
-               break;
 
1387
-
 
1388
-             case INTRINSIC_NE:
 
1389
-               if (check_interface1 (ns->op[i], ns2->op[INTRINSIC_NE_OS],
 
1390
-                                     0, interface_name, true)) goto done;
 
1391
-               break;
 
1392
-
 
1393
-             case INTRINSIC_NE_OS:
 
1394
-               if (check_interface1 (ns->op[i], ns2->op[INTRINSIC_NE],
 
1395
-                                     0, interface_name, true)) goto done;
 
1396
-               break;
 
1397
-
 
1398
-             case INTRINSIC_GT:
 
1399
-               if (check_interface1 (ns->op[i], ns2->op[INTRINSIC_GT_OS],
 
1400
-                                     0, interface_name, true)) goto done;
 
1401
-               break;
 
1402
-
 
1403
-             case INTRINSIC_GT_OS:
 
1404
-               if (check_interface1 (ns->op[i], ns2->op[INTRINSIC_GT],
 
1405
-                                     0, interface_name, true)) goto done;
 
1406
-               break;
 
1407
-
 
1408
-             case INTRINSIC_GE:
 
1409
-               if (check_interface1 (ns->op[i], ns2->op[INTRINSIC_GE_OS],
 
1410
-                                     0, interface_name, true)) goto done;
 
1411
-               break;
 
1412
-
 
1413
-             case INTRINSIC_GE_OS:
 
1414
-               if (check_interface1 (ns->op[i], ns2->op[INTRINSIC_GE],
 
1415
-                                     0, interface_name, true)) goto done;
 
1416
-               break;
 
1417
-
 
1418
-             case INTRINSIC_LT:
 
1419
-               if (check_interface1 (ns->op[i], ns2->op[INTRINSIC_LT_OS],
 
1420
-                                     0, interface_name, true)) goto done;
 
1421
-               break;
 
1422
-
 
1423
-             case INTRINSIC_LT_OS:
 
1424
-               if (check_interface1 (ns->op[i], ns2->op[INTRINSIC_LT],
 
1425
-                                     0, interface_name, true)) goto done;
 
1426
-               break;
 
1427
-
 
1428
-             case INTRINSIC_LE:
 
1429
-               if (check_interface1 (ns->op[i], ns2->op[INTRINSIC_LE_OS],
 
1430
-                                     0, interface_name, true)) goto done;
 
1431
-               break;
 
1432
-
 
1433
-             case INTRINSIC_LE_OS:
 
1434
-               if (check_interface1 (ns->op[i], ns2->op[INTRINSIC_LE],
 
1435
-                                     0, interface_name, true)) goto done;
 
1436
-               break;
 
1437
-
 
1438
-             default:
 
1439
-               break;
 
1440
-            }
 
1441
+         /* i should be gfc_intrinsic_op, but has to be int with this cast
 
1442
+            here for stupid C++ compatibility rules.  */
 
1443
+         other_op = gfc_equivalent_op ((gfc_intrinsic_op) i);
 
1444
+         if (other_op != INTRINSIC_NONE
 
1445
+           &&  check_interface1 (ns->op[i], ns2->op[other_op],
 
1446
+                                 0, interface_name, true))
 
1447
+           goto done;
 
1448
        }
 
1449
     }
 
1450
 
 
1451
Index: gcc/fortran/decl.c
 
1452
===================================================================
 
1453
--- a/src/gcc/fortran/decl.c    (revision
 
1454
+++ b/src/gcc/fortran/decl.c    (revision
 
1455
@@ -6062,8 +6062,19 @@
 
1456
        case INTERFACE_INTRINSIC_OP:
 
1457
          if (gfc_current_ns->operator_access[op] == ACCESS_UNKNOWN)
 
1458
            {
 
1459
+             gfc_intrinsic_op other_op;
 
1460
+
 
1461
              gfc_current_ns->operator_access[op] =
 
1462
                (st == ST_PUBLIC) ? ACCESS_PUBLIC : ACCESS_PRIVATE;
 
1463
+
 
1464
+             /* Handle the case if there is another op with the same
 
1465
+                function, for INTRINSIC_EQ vs. INTRINSIC_EQ_OS and so on.  */
 
1466
+             other_op = gfc_equivalent_op (op);
 
1467
+
 
1468
+             if (other_op != INTRINSIC_NONE)
 
1469
+               gfc_current_ns->operator_access[other_op] =
 
1470
+                 (st == ST_PUBLIC) ? ACCESS_PUBLIC : ACCESS_PRIVATE;
 
1471
+
 
1472
            }
 
1473
          else
 
1474
            {
 
1475
Index: gcc/fortran/gfortran.h
 
1476
===================================================================
 
1477
--- a/src/gcc/fortran/gfortran.h        (revision
 
1478
+++ b/src/gcc/fortran/gfortran.h        (revision
 
1479
@@ -2718,6 +2718,7 @@
 
1480
 gfc_symtree* gfc_find_sym_in_symtree (gfc_symbol*);
 
1481
 bool gfc_arglist_matches_symbol (gfc_actual_arglist**, gfc_symbol*);
 
1482
 bool gfc_check_operator_interface (gfc_symbol*, gfc_intrinsic_op, locus);
 
1483
+gfc_intrinsic_op gfc_equivalent_op (gfc_intrinsic_op);
 
1484
 
 
1485
 /* io.c */
 
1486
 extern gfc_st_label format_asterisk;
 
1487
Index: gcc/fortran/ChangeLog
 
1488
===================================================================
 
1489
--- a/src/gcc/fortran/ChangeLog (revision
 
1490
+++ b/src/gcc/fortran/ChangeLog (revision
 
1491
@@ -1,3 +1,13 @@
 
1492
+2011-06-02  Thomas Koenig  <tkoenig@gcc.gnu.org>
 
1493
+
 
1494
+       Backport from trunk
 
1495
+       PR fortran/45786
 
1496
+       * interface.c (gfc_equivalent_op):  New function.
 
1497
+       (gfc_check_interface):  Use gfc_equivalent_op instead
 
1498
+       of switch statement.
 
1499
+       * decl.c (access_attr_decl):  Also set access to an
 
1500
+       equivalent operator.
 
1501
+
 
1502
 2011-04-28  Release Manager
 
1503
 
 
1504
        * GCC 4.5.3 released.
 
1505
Index: gcc/tree-vectorizer.h
 
1506
===================================================================
 
1507
--- a/src/gcc/tree-vectorizer.h (revision
 
1508
+++ b/src/gcc/tree-vectorizer.h (revision
 
1509
@@ -242,6 +242,12 @@
 
1510
   /* The unrolling factor needed to SLP the loop. In case of that pure SLP is
 
1511
      applied to the loop, i.e., no unrolling is needed, this is 1.  */
 
1512
   unsigned slp_unrolling_factor;
 
1513
+
 
1514
+  /* When we have strided data accesses with gaps, we may introduce invalid
 
1515
+     memory accesses.  We peel the last iteration of the loop to prevent
 
1516
+     this.  */
 
1517
+  bool peeling_for_gaps;
 
1518
+
 
1519
 } *loop_vec_info;
 
1520
 
 
1521
 /* Access Functions.  */
 
1522
@@ -266,6 +272,7 @@
 
1523
 #define LOOP_VINFO_STRIDED_STORES(L)       (L)->strided_stores
 
1524
 #define LOOP_VINFO_SLP_INSTANCES(L)        (L)->slp_instances
 
1525
 #define LOOP_VINFO_SLP_UNROLLING_FACTOR(L) (L)->slp_unrolling_factor
 
1526
+#define LOOP_VINFO_PEELING_FOR_GAPS(L)     (L)->peeling_for_gaps
 
1527
 
 
1528
 #define LOOP_REQUIRES_VERSIONING_FOR_ALIGNMENT(L) \
 
1529
 VEC_length (gimple, (L)->may_misalign_stmts) > 0
 
1530
Index: gcc/tree-vect-loop.c
 
1531
===================================================================
 
1532
--- a/src/gcc/tree-vect-loop.c  (revision
 
1533
+++ b/src/gcc/tree-vect-loop.c  (revision
 
1534
@@ -711,6 +711,7 @@
 
1535
   LOOP_VINFO_STRIDED_STORES (res) = VEC_alloc (gimple, heap, 10);
 
1536
   LOOP_VINFO_SLP_INSTANCES (res) = VEC_alloc (slp_instance, heap, 10);
 
1537
   LOOP_VINFO_SLP_UNROLLING_FACTOR (res) = 1;
 
1538
+  LOOP_VINFO_PEELING_FOR_GAPS (res) = false;
 
1539
 
 
1540
   return res;
 
1541
 }
 
1542
@@ -2053,6 +2054,10 @@
 
1543
          peel_iters_prologue = niters < peel_iters_prologue ?
 
1544
                                        niters : peel_iters_prologue;
 
1545
          peel_iters_epilogue = (niters - peel_iters_prologue) % vf;
 
1546
+         /* If we need to peel for gaps, but no peeling is required, we have
 
1547
+            to peel VF iterations.  */
 
1548
+         if (LOOP_VINFO_PEELING_FOR_GAPS (loop_vinfo) && !peel_iters_epilogue)
 
1549
+           peel_iters_epilogue = vf;
 
1550
        }
 
1551
     }
 
1552
 
 
1553
@@ -4212,7 +4217,8 @@
 
1554
   do_peeling_for_loop_bound
 
1555
     = (!LOOP_VINFO_NITERS_KNOWN_P (loop_vinfo)
 
1556
        || (LOOP_VINFO_NITERS_KNOWN_P (loop_vinfo)
 
1557
-          && LOOP_VINFO_INT_NITERS (loop_vinfo) % vectorization_factor != 0));
 
1558
+          && LOOP_VINFO_INT_NITERS (loop_vinfo) % vectorization_factor != 0)
 
1559
+       || LOOP_VINFO_PEELING_FOR_GAPS (loop_vinfo));
 
1560
 
 
1561
   if (LOOP_REQUIRES_VERSIONING_FOR_ALIGNMENT (loop_vinfo)
 
1562
       || LOOP_REQUIRES_VERSIONING_FOR_ALIAS (loop_vinfo))
 
1563
Index: gcc/tree-vect-data-refs.c
 
1564
===================================================================
 
1565
--- a/src/gcc/tree-vect-data-refs.c     (revision
 
1566
+++ b/src/gcc/tree-vect-data-refs.c     (revision
 
1567
@@ -1450,7 +1450,7 @@
 
1568
   loop_vec_info loop_vinfo = STMT_VINFO_LOOP_VINFO (stmt_info);
 
1569
   bb_vec_info bb_vinfo = STMT_VINFO_BB_VINFO (stmt_info);
 
1570
   HOST_WIDE_INT dr_step = TREE_INT_CST_LOW (step);
 
1571
-  HOST_WIDE_INT stride;
 
1572
+  HOST_WIDE_INT stride, last_accessed_element = 1;
 
1573
   bool slp_impossible = false;
 
1574
 
 
1575
   /* For interleaving, STRIDE is STEP counted in elements, i.e., the size of the
 
1576
@@ -1479,6 +1479,16 @@
 
1577
              fprintf (vect_dump, " step ");
 
1578
              print_generic_expr (vect_dump, step, TDF_SLIM);
 
1579
            }
 
1580
+
 
1581
+         if (loop_vinfo)
 
1582
+           {
 
1583
+             LOOP_VINFO_PEELING_FOR_GAPS (loop_vinfo) = true;
 
1584
+
 
1585
+             if (vect_print_dump_info (REPORT_DETAILS))
 
1586
+               fprintf (vect_dump, "Data access with gaps requires scalar "
 
1587
+                                   "epilogue loop");
 
1588
+           }
 
1589
+
 
1590
          return true;
 
1591
        }
 
1592
       if (vect_print_dump_info (REPORT_DETAILS))
 
1593
@@ -1531,6 +1541,7 @@
 
1594
               next = DR_GROUP_NEXT_DR (vinfo_for_stmt (next));
 
1595
               continue;
 
1596
             }
 
1597
+
 
1598
           prev = next;
 
1599
 
 
1600
           /* Check that all the accesses have the same STEP.  */
 
1601
@@ -1561,6 +1572,8 @@
 
1602
               gaps += diff - 1;
 
1603
            }
 
1604
 
 
1605
+         last_accessed_element += diff;
 
1606
+
 
1607
           /* Store the gap from the previous member of the group. If there is no
 
1608
              gap in the access, DR_GROUP_GAP is always 1.  */
 
1609
           DR_GROUP_GAP (vinfo_for_stmt (next)) = diff;
 
1610
@@ -1652,6 +1665,15 @@
 
1611
             VEC_safe_push (gimple, heap, BB_VINFO_STRIDED_STORES (bb_vinfo),
 
1612
                            stmt);
 
1613
         }
 
1614
+
 
1615
+      /* There is a gap in the end of the group.  */
 
1616
+      if (stride - last_accessed_element > 0 && loop_vinfo)
 
1617
+       {
 
1618
+         LOOP_VINFO_PEELING_FOR_GAPS (loop_vinfo) = true;
 
1619
+         if (vect_print_dump_info (REPORT_DETAILS))
 
1620
+           fprintf (vect_dump, "Data access with gaps requires scalar "
 
1621
+                               "epilogue loop");
 
1622
+       }
 
1623
     }
 
1624
 
 
1625
   return true;
 
1626
Index: gcc/tree-inline.c
 
1627
===================================================================
 
1628
--- a/src/gcc/tree-inline.c     (revision
 
1629
+++ b/src/gcc/tree-inline.c     (revision
 
1630
@@ -4179,14 +4179,16 @@
 
1631
                                         CONSTRUCTOR_ELTS (*tp));
 
1632
       *tp = new_tree;
 
1633
     }
 
1634
+  else if (code == STATEMENT_LIST)
 
1635
+    /* We used to just abort on STATEMENT_LIST, but we can run into them
 
1636
+       with statement-expressions (c++/40975).  */
 
1637
+    copy_statement_list (tp);
 
1638
   else if (TREE_CODE_CLASS (code) == tcc_type)
 
1639
     *walk_subtrees = 0;
 
1640
   else if (TREE_CODE_CLASS (code) == tcc_declaration)
 
1641
     *walk_subtrees = 0;
 
1642
   else if (TREE_CODE_CLASS (code) == tcc_constant)
 
1643
     *walk_subtrees = 0;
 
1644
-  else
 
1645
-    gcc_assert (code != STATEMENT_LIST);
 
1646
   return NULL_TREE;
 
1647
 }
 
1648
 
 
1649
Index: gcc/var-tracking.c
 
1650
===================================================================
 
1651
--- a/src/gcc/var-tracking.c    (revision
 
1652
+++ b/src/gcc/var-tracking.c    (revision
 
1653
@@ -4134,8 +4134,9 @@
 
1654
   VALUE_RECURSED_INTO (val) = true;
 
1655
 
 
1656
   for (node = var->var_part[0].loc_chain; node; node = node->next)
 
1657
-    if (MEM_P (node->loc) && MEM_EXPR (node->loc) == expr
 
1658
-       && MEM_OFFSET (node->loc) == 0)
 
1659
+    if (MEM_P (node->loc)
 
1660
+       && MEM_EXPR (node->loc) == expr
 
1661
+       && INT_MEM_OFFSET (node->loc) == 0)
 
1662
       {
 
1663
        where = node;
 
1664
        break;
 
1665
@@ -4198,11 +4199,10 @@
 
1666
        {
 
1667
          for (loc = var->var_part[0].loc_chain; loc; loc = loc->next)
 
1668
            {
 
1669
-             /* We want to remove dying MEMs that doesn't refer to
 
1670
-                DECL.  */
 
1671
+             /* We want to remove dying MEMs that doesn't refer to DECL.  */
 
1672
              if (GET_CODE (loc->loc) == MEM
 
1673
                  && (MEM_EXPR (loc->loc) != decl
 
1674
-                     || MEM_OFFSET (loc->loc))
 
1675
+                     || INT_MEM_OFFSET (loc->loc) != 0)
 
1676
                  && !mem_dies_at_call (loc->loc))
 
1677
                break;
 
1678
              /* We want to move here MEMs that do refer to DECL.  */
 
1679
@@ -4246,7 +4246,7 @@
 
1680
 
 
1681
          if (GET_CODE (loc->loc) != MEM
 
1682
              || (MEM_EXPR (loc->loc) == decl
 
1683
-                 && MEM_OFFSET (loc->loc) == 0)
 
1684
+                 && INT_MEM_OFFSET (loc->loc) == 0)
 
1685
              || !mem_dies_at_call (loc->loc))
 
1686
            {
 
1687
              if (old_loc != loc->loc && emit_notes)
 
1688
Index: gcc/config/sparc/sparc.md
 
1689
===================================================================
 
1690
--- a/src/gcc/config/sparc/sparc.md     (revision
 
1691
+++ b/src/gcc/config/sparc/sparc.md     (revision
 
1692
@@ -6491,8 +6491,8 @@
 
1693
                      (const_int 4)))])
 
1694
 
 
1695
 ;; For __builtin_setjmp we need to flush register windows iff the function
 
1696
-;; calls alloca as well, because otherwise the register window might be
 
1697
-;; saved after %sp adjustment and thus setjmp would crash
 
1698
+;; calls alloca as well, because otherwise the current register window might
 
1699
+;; be saved after the %sp adjustment and thus setjmp would crash.
 
1700
 (define_expand "builtin_setjmp_setup"
 
1701
   [(match_operand 0 "register_operand" "r")]
 
1702
   ""
 
1703
@@ -6531,19 +6531,26 @@
 
1704
                (eq_attr "pic" "true")
 
1705
                  (const_int 4)] (const_int 3)))])
 
1706
 
 
1707
-;; Pattern for use after a setjmp to store FP and the return register
 
1708
-;; into the stack area.
 
1709
+;; Pattern for use after a setjmp to store registers into the save area.
 
1710
 
 
1711
 (define_expand "setjmp"
 
1712
   [(const_int 0)]
 
1713
   ""
 
1714
 {
 
1715
   rtx mem;
 
1716
-  
 
1717
+
 
1718
+  if (flag_pic)
 
1719
+    {
 
1720
+      mem = gen_rtx_MEM (Pmode,
 
1721
+                        plus_constant (stack_pointer_rtx,
 
1722
+                                       SPARC_STACK_BIAS + 7 * UNITS_PER_WORD));
 
1723
+      emit_insn (gen_rtx_SET (VOIDmode, mem, pic_offset_table_rtx));
 
1724
+    }
 
1725
+
 
1726
   mem = gen_rtx_MEM (Pmode,
 
1727
                     plus_constant (stack_pointer_rtx,
 
1728
                                    SPARC_STACK_BIAS + 14 * UNITS_PER_WORD));
 
1729
-  emit_insn (gen_rtx_SET (VOIDmode, mem, frame_pointer_rtx));
 
1730
+  emit_insn (gen_rtx_SET (VOIDmode, mem, hard_frame_pointer_rtx));
 
1731
 
 
1732
   mem = gen_rtx_MEM (Pmode,
 
1733
                     plus_constant (stack_pointer_rtx,
 
1734
Index: gcc/config/sparc/sparc-protos.h
 
1735
===================================================================
 
1736
--- a/src/gcc/config/sparc/sparc-protos.h       (revision
 
1737
+++ b/src/gcc/config/sparc/sparc-protos.h       (revision
 
1738
@@ -48,6 +48,7 @@
 
1739
 extern int check_pic (int);
 
1740
 extern int short_branch (int, int);
 
1741
 extern void sparc_profile_hook (int);
 
1742
+extern void sparc_optimization_options (int, int);
 
1743
 extern void sparc_override_options (void);
 
1744
 extern void sparc_output_scratch_registers (FILE *);
 
1745
 
 
1746
Index: gcc/config/sparc/sparc.c
 
1747
===================================================================
 
1748
--- a/src/gcc/config/sparc/sparc.c      (revision
 
1749
+++ b/src/gcc/config/sparc/sparc.c      (revision
 
1750
@@ -627,6 +627,17 @@
 
1751
   return true;
 
1752
 }
 
1753
 
 
1754
+/* Specify default optimizations.  */
 
1755
+
 
1756
+void
 
1757
+sparc_optimization_options (int l ATTRIBUTE_UNUSED, int s ATTRIBUTE_UNUSED)
 
1758
+{
 
1759
+  /* Disable save slot sharing for call-clobbered registers by default.
 
1760
+     The IRA sharing algorithm works on single registers only and this
 
1761
+     pessimizes for double floating-point registers.  */
 
1762
+  flag_ira_share_save_slots = 0;
 
1763
+}
 
1764
+
 
1765
 /* Validate and override various options, and do some machine dependent
 
1766
    initialization.  */
 
1767
 
 
1768
@@ -2767,11 +2778,6 @@
 
1769
   if (get_attr_length (trial) != 1)
 
1770
     return 0;
 
1771
 
 
1772
-  /* If there are any call-saved registers, we should scan TRIAL if it
 
1773
-     does not reference them.  For now just make it easy.  */
 
1774
-  if (num_gfregs)
 
1775
-    return 0;
 
1776
-
 
1777
   /* If the function uses __builtin_eh_return, the eh_return machinery
 
1778
      occupies the delay slot.  */
 
1779
   if (crtl->calls_eh_return)
 
1780
@@ -4093,7 +4099,7 @@
 
1781
            emit_move_insn (gen_rtx_REG (mode, regno), mem);
 
1782
 
 
1783
          /* Always preserve double-word alignment.  */
 
1784
-         offset = (offset + 7) & -8;
 
1785
+         offset = (offset + 8) & -8;
 
1786
        }
 
1787
     }
 
1788
 
 
1789
@@ -4200,7 +4206,7 @@
 
1790
      example, the regrename pass has special provisions to not rename to
 
1791
      non-leaf registers in a leaf function.  */
 
1792
   sparc_leaf_function_p
 
1793
-    = optimize > 0 && leaf_function_p () && only_leaf_regs_used ();
 
1794
+    = optimize > 0 && current_function_is_leaf && only_leaf_regs_used ();
 
1795
 
 
1796
   /* Need to use actual_fsize, since we are also allocating
 
1797
      space for our callee (and our own register save area).  */
 
1798
@@ -4324,6 +4330,7 @@
 
1799
 sparc_can_use_return_insn_p (void)
 
1800
 {
 
1801
   return sparc_prologue_data_valid_p
 
1802
+        && num_gfregs == 0
 
1803
         && (actual_fsize == 0 || !sparc_leaf_function_p);
 
1804
 }
 
1805
 
 
1806
@@ -4425,18 +4432,20 @@
 
1807
             machinery occupies the delay slot.  */
 
1808
          gcc_assert (! final_sequence);
 
1809
 
 
1810
-         if (! flag_delayed_branch)
 
1811
-           fputs ("\tadd\t%fp, %g1, %fp\n", asm_out_file);
 
1812
+          if (flag_delayed_branch)
 
1813
+           {
 
1814
+             if (TARGET_V9)
 
1815
+               fputs ("\treturn\t%i7+8\n", asm_out_file);
 
1816
+             else
 
1817
+               fputs ("\trestore\n\tjmp\t%o7+8\n", asm_out_file);
 
1818
 
 
1819
-         if (TARGET_V9)
 
1820
-           fputs ("\treturn\t%i7+8\n", asm_out_file);
 
1821
+             fputs ("\t add\t%sp, %g1, %sp\n", asm_out_file);
 
1822
+           }
 
1823
          else
 
1824
-           fputs ("\trestore\n\tjmp\t%o7+8\n", asm_out_file);
 
1825
-
 
1826
-         if (flag_delayed_branch)
 
1827
-           fputs ("\t add\t%sp, %g1, %sp\n", asm_out_file);
 
1828
-         else
 
1829
-           fputs ("\t nop\n", asm_out_file);
 
1830
+           {
 
1831
+             fputs ("\trestore\n\tadd\t%sp, %g1, %sp\n", asm_out_file);
 
1832
+             fputs ("\tjmp\t%o7+8\n\t nop\n", asm_out_file);
 
1833
+           }
 
1834
        }
 
1835
       else if (final_sequence)
 
1836
        {
 
1837
@@ -9267,7 +9276,7 @@
 
1838
 bool
 
1839
 sparc_frame_pointer_required (void)
 
1840
 {
 
1841
-  return !(leaf_function_p () && only_leaf_regs_used ());
 
1842
+  return !(current_function_is_leaf && only_leaf_regs_used ());
 
1843
 }
 
1844
 
 
1845
 /* The way this is structured, we can't eliminate SFP in favor of SP
 
1846
Index: gcc/config/sparc/sparc.h
 
1847
===================================================================
 
1848
--- a/src/gcc/config/sparc/sparc.h      (revision
 
1849
+++ b/src/gcc/config/sparc/sparc.h      (revision
 
1850
@@ -501,7 +501,8 @@
 
1851
 #define CAN_DEBUG_WITHOUT_FP
 
1852
 
 
1853
 /* Option handling.  */
 
1854
-
 
1855
+#define OPTIMIZATION_OPTIONS(LEVEL, SIZE) \
 
1856
+  sparc_optimization_options ((LEVEL), (SIZE))
 
1857
 #define OVERRIDE_OPTIONS  sparc_override_options ()
 
1858
 
 
1859
 /* Mask of all CPU selection flags.  */
 
1860
Index: gcc/config/rx/rx.h
 
1861
===================================================================
 
1862
--- a/src/gcc/config/rx/rx.h    (revision
 
1863
+++ b/src/gcc/config/rx/rx.h    (revision
 
1864
@@ -168,7 +168,7 @@
 
1865
 
 
1866
 #define HANDLE_PRAGMA_PACK_PUSH_POP    1
 
1867
 
 
1868
-#define HAVE_PRE_DECCREMENT            1
 
1869
+#define HAVE_PRE_DECREMENT             1
 
1870
 #define HAVE_POST_INCREMENT            1
 
1871
 
 
1872
 #define MOVE_RATIO(SPEED)              ((SPEED) ? 4 : 2)
 
1873
Index: gcc/config/i386/i386.md
 
1874
===================================================================
 
1875
--- a/src/gcc/config/i386/i386.md       (revision
 
1876
+++ b/src/gcc/config/i386/i386.md       (revision
 
1877
@@ -2872,7 +2872,7 @@
 
1878
    && (reload_in_progress || reload_completed
 
1879
        || (ix86_cmodel == CM_MEDIUM || ix86_cmodel == CM_LARGE)
 
1880
        || (!TARGET_SSE_MATH && optimize_function_for_size_p (cfun)
 
1881
-          && standard_80387_constant_p (operands[1]))
 
1882
+          && standard_80387_constant_p (operands[1]) > 0)
 
1883
        || GET_CODE (operands[1]) != CONST_DOUBLE
 
1884
        || memory_operand (operands[0], SFmode))"
 
1885
 {
 
1886
@@ -3043,11 +3043,10 @@
 
1887
        || (!(TARGET_SSE2 && TARGET_SSE_MATH)
 
1888
            && optimize_function_for_size_p (cfun)
 
1889
            && !memory_operand (operands[0], DFmode)
 
1890
-          && standard_80387_constant_p (operands[1]))
 
1891
+          && standard_80387_constant_p (operands[1]) > 0)
 
1892
        || GET_CODE (operands[1]) != CONST_DOUBLE
 
1893
        || ((optimize_function_for_size_p (cfun)
 
1894
-            || !TARGET_MEMORY_MISMATCH_STALL
 
1895
-           || reload_in_progress || reload_completed)
 
1896
+            || !TARGET_MEMORY_MISMATCH_STALL)
 
1897
           && memory_operand (operands[0], DFmode)))"
 
1898
 {
 
1899
   switch (which_alternative)
 
1900
@@ -3196,7 +3195,7 @@
 
1901
        || (ix86_cmodel == CM_MEDIUM || ix86_cmodel == CM_LARGE)
 
1902
        || (!(TARGET_SSE2 && TARGET_SSE_MATH)
 
1903
            && optimize_function_for_size_p (cfun)
 
1904
-          && standard_80387_constant_p (operands[1]))
 
1905
+          && standard_80387_constant_p (operands[1]) > 0)
 
1906
        || GET_CODE (operands[1]) != CONST_DOUBLE
 
1907
        || memory_operand (operands[0], DFmode))"
 
1908
 {
 
1909
@@ -3337,7 +3336,7 @@
 
1910
        || (ix86_cmodel == CM_MEDIUM || ix86_cmodel == CM_LARGE)
 
1911
        || (!(TARGET_SSE2 && TARGET_SSE_MATH)
 
1912
            && optimize_function_for_size_p (cfun)
 
1913
-          && standard_80387_constant_p (operands[1]))
 
1914
+          && standard_80387_constant_p (operands[1]) > 0)
 
1915
        || GET_CODE (operands[1]) != CONST_DOUBLE
 
1916
        || memory_operand (operands[0], DFmode))"
 
1917
 {
 
1918
@@ -3568,7 +3567,8 @@
 
1919
   "optimize_function_for_size_p (cfun)
 
1920
    && !(MEM_P (operands[0]) && MEM_P (operands[1]))
 
1921
    && (reload_in_progress || reload_completed
 
1922
-       || standard_80387_constant_p (operands[1])
 
1923
+       || (ix86_cmodel == CM_MEDIUM || ix86_cmodel == CM_LARGE)
 
1924
+       || standard_80387_constant_p (operands[1]) > 0
 
1925
        || GET_CODE (operands[1]) != CONST_DOUBLE
 
1926
        || memory_operand (operands[0], XFmode))"
 
1927
 {
 
1928
@@ -3596,6 +3596,7 @@
 
1929
   "optimize_function_for_speed_p (cfun)
 
1930
    && !(MEM_P (operands[0]) && MEM_P (operands[1]))
 
1931
    && (reload_in_progress || reload_completed
 
1932
+       || (ix86_cmodel == CM_MEDIUM || ix86_cmodel == CM_LARGE)
 
1933
        || GET_CODE (operands[1]) != CONST_DOUBLE
 
1934
        || memory_operand (operands[0], XFmode))"
 
1935
 {
 
1936
@@ -3740,7 +3741,7 @@
 
1937
     }
 
1938
   else if (FP_REG_P (r))
 
1939
     {
 
1940
-      if (!standard_80387_constant_p (c))
 
1941
+      if (standard_80387_constant_p (c) < 1)
 
1942
        FAIL;
 
1943
     }
 
1944
   else if (MMX_REG_P (r))
 
1945
@@ -3772,7 +3773,7 @@
 
1946
     }
 
1947
   else if (FP_REG_P (r))
 
1948
     {
 
1949
-      if (!standard_80387_constant_p (c))
 
1950
+      if (standard_80387_constant_p (c) < 1)
 
1951
        FAIL;
 
1952
     }
 
1953
   else if (MMX_REG_P (r))
 
1954
Index: gcc/config/i386/constraints.md
 
1955
===================================================================
 
1956
--- a/src/gcc/config/i386/constraints.md        (revision
 
1957
+++ b/src/gcc/config/i386/constraints.md        (revision
 
1958
@@ -149,7 +149,7 @@
 
1959
 (define_constraint "G"
 
1960
   "Standard 80387 floating point constant."
 
1961
   (and (match_code "const_double")
 
1962
-       (match_test "standard_80387_constant_p (op)")))
 
1963
+       (match_test "standard_80387_constant_p (op) > 0")))
 
1964
 
 
1965
 ;; This can theoretically be any mode's CONST0_RTX.
 
1966
 (define_constraint "C"
 
1967
Index: gcc/config/i386/sse.md
 
1968
===================================================================
 
1969
--- a/src/gcc/config/i386/sse.md        (revision
 
1970
+++ b/src/gcc/config/i386/sse.md        (revision
 
1971
@@ -4964,24 +4964,22 @@
 
1972
 ;; Avoid combining registers from different units in a single alternative,
 
1973
 ;; see comment above inline_secondary_memory_needed function in i386.c
 
1974
 (define_insn "sse2_loadhpd"
 
1975
-  [(set (match_operand:V2DF 0 "nonimmediate_operand"     "=x,x,x,o,o,o")
 
1976
+  [(set (match_operand:V2DF 0 "nonimmediate_operand"     "=x,x,o,o,o")
 
1977
        (vec_concat:V2DF
 
1978
          (vec_select:DF
 
1979
-           (match_operand:V2DF 1 "nonimmediate_operand" " 0,0,x,0,0,0")
 
1980
+           (match_operand:V2DF 1 "nonimmediate_operand" " 0,0,0,0,0")
 
1981
            (parallel [(const_int 0)]))
 
1982
-         (match_operand:DF 2 "nonimmediate_operand"     " m,x,0,x,*f,r")))]
 
1983
+         (match_operand:DF 2 "nonimmediate_operand"     " m,x,x,*f,r")))]
 
1984
   "TARGET_SSE2 && !(MEM_P (operands[1]) && MEM_P (operands[2]))"
 
1985
   "@
 
1986
    movhpd\t{%2, %0|%0, %2}
 
1987
    unpcklpd\t{%2, %0|%0, %2}
 
1988
-   shufpd\t{$1, %1, %0|%0, %1, 1}
 
1989
    #
 
1990
    #
 
1991
    #"
 
1992
-  [(set_attr "type" "ssemov,sselog,sselog,ssemov,fmov,imov")
 
1993
-   (set_attr "prefix_data16" "1,*,*,*,*,*")
 
1994
-   (set_attr "length_immediate" "*,*,1,*,*,*")
 
1995
-   (set_attr "mode" "V1DF,V2DF,V2DF,DF,DF,DF")])
 
1996
+  [(set_attr "type" "ssemov,sselog,ssemov,fmov,imov")
 
1997
+   (set_attr "prefix_data16" "1,*,*,*,*")
 
1998
+   (set_attr "mode" "V1DF,V2DF,DF,DF,DF")])
 
1999
 
 
2000
 (define_split
 
2001
   [(set (match_operand:V2DF 0 "memory_operand" "")
 
2002
Index: gcc/config/i386/i386.c
 
2003
===================================================================
 
2004
--- a/src/gcc/config/i386/i386.c        (revision
 
2005
+++ b/src/gcc/config/i386/i386.c        (revision
 
2006
@@ -25071,7 +25071,7 @@
 
2007
         zero above.  We only want to wind up preferring 80387 registers if
 
2008
         we plan on doing computation with them.  */
 
2009
       if (TARGET_80387
 
2010
-         && standard_80387_constant_p (x))
 
2011
+         && standard_80387_constant_p (x) > 0)
 
2012
        {
 
2013
          /* Limit class to non-sse.  */
 
2014
          if (regclass == FLOAT_SSE_REGS)
 
2015
Index: gcc/config/sh/sh.c
 
2016
===================================================================
 
2017
--- a/src/gcc/config/sh/sh.c    (revision
 
2018
+++ b/src/gcc/config/sh/sh.c    (revision
 
2019
@@ -1945,7 +1945,10 @@
 
2020
          else if (op2h != CONST0_RTX (SImode))
 
2021
            msw_taken = LTU;
 
2022
          else
 
2023
-           break;
 
2024
+           {
 
2025
+             msw_skip = swap_condition (LTU);
 
2026
+             break;
 
2027
+           }
 
2028
          msw_skip = swap_condition (msw_taken);
 
2029
        }
 
2030
       break;
 
2031
@@ -1998,6 +2001,13 @@
 
2032
        {
 
2033
          operands[1] = op1h;
 
2034
          operands[2] = op2h;
 
2035
+         if (reload_completed
 
2036
+             && ! arith_reg_or_0_operand (op2h, SImode)
 
2037
+             && (true_regnum (op1h) || (comparison != EQ && comparison != NE)))
 
2038
+           {
 
2039
+             emit_move_insn (scratch, operands[2]);
 
2040
+             operands[2] = scratch;
 
2041
+           }
 
2042
        }
 
2043
 
 
2044
       operands[3] = skip_label = gen_label_rtx ();
 
2045
Index: gcc/config/rs6000/rs6000.c
 
2046
===================================================================
 
2047
--- a/src/gcc/config/rs6000/rs6000.c    (revision
 
2048
+++ b/src/gcc/config/rs6000/rs6000.c    (revision
 
2049
@@ -5426,10 +5426,11 @@
 
2050
 
 
2051
       if (model == TLS_MODEL_GLOBAL_DYNAMIC)
 
2052
        {
 
2053
-         r3 = gen_rtx_REG (Pmode, 3);
 
2054
          tga = rs6000_tls_get_addr ();
 
2055
-         emit_library_call_value (tga, dest, LCT_CONST, Pmode, 1, r3, Pmode);
 
2056
+         emit_library_call_value (tga, dest, LCT_CONST, Pmode,
 
2057
+                                  1, const0_rtx, Pmode);
 
2058
 
 
2059
+         r3 = gen_rtx_REG (Pmode, 3);
 
2060
          if (DEFAULT_ABI == ABI_AIX && TARGET_64BIT)
 
2061
            insn = gen_tls_gd_aix64 (r3, got, addr, tga, const0_rtx);
 
2062
          else if (DEFAULT_ABI == ABI_AIX && !TARGET_64BIT)
 
2063
@@ -5446,11 +5447,12 @@
 
2064
        }
 
2065
       else if (model == TLS_MODEL_LOCAL_DYNAMIC)
 
2066
        {
 
2067
-         r3 = gen_rtx_REG (Pmode, 3);
 
2068
          tga = rs6000_tls_get_addr ();
 
2069
          tmp1 = gen_reg_rtx (Pmode);
 
2070
-         emit_library_call_value (tga, tmp1, LCT_CONST, Pmode, 1, r3, Pmode);
 
2071
+         emit_library_call_value (tga, tmp1, LCT_CONST, Pmode,
 
2072
+                                  1, const0_rtx, Pmode);
 
2073
 
 
2074
+         r3 = gen_rtx_REG (Pmode, 3);
 
2075
          if (DEFAULT_ABI == ABI_AIX && TARGET_64BIT)
 
2076
            insn = gen_tls_ld_aix64 (r3, got, tga, const0_rtx);
 
2077
          else if (DEFAULT_ABI == ABI_AIX && !TARGET_64BIT)
 
2078
@@ -6694,7 +6696,7 @@
 
2079
 
 
2080
 /* Nonzero if we can use an AltiVec register to pass this arg.  */
 
2081
 #define USE_ALTIVEC_FOR_ARG_P(CUM,MODE,TYPE,NAMED)             \
 
2082
-  ((ALTIVEC_VECTOR_MODE (MODE) || VSX_VECTOR_MODE (MODE))      \
 
2083
+  (ALTIVEC_OR_VSX_VECTOR_MODE (MODE)                           \
 
2084
    && (CUM)->vregno <= ALTIVEC_ARG_MAX_REG                     \
 
2085
    && TARGET_ALTIVEC_ABI                                       \
 
2086
    && (NAMED))
 
2087
@@ -6920,7 +6922,7 @@
 
2088
    existing library interfaces.
 
2089
 
 
2090
    Doubleword align SPE vectors.
 
2091
-   Quadword align Altivec vectors.
 
2092
+   Quadword align Altivec/VSX vectors.
 
2093
    Quadword align large synthetic vector types.   */
 
2094
 
 
2095
 int
 
2096
@@ -6937,7 +6939,7 @@
 
2097
               && int_size_in_bytes (type) >= 8
 
2098
               && int_size_in_bytes (type) < 16))
 
2099
     return 64;
 
2100
-  else if ((ALTIVEC_VECTOR_MODE (mode) || VSX_VECTOR_MODE (mode))
 
2101
+  else if (ALTIVEC_OR_VSX_VECTOR_MODE (mode)
 
2102
           || (type && TREE_CODE (type) == VECTOR_TYPE
 
2103
               && int_size_in_bytes (type) >= 16))
 
2104
     return 128;
 
2105
@@ -7082,8 +7084,7 @@
 
2106
     cum->nargs_prototype--;
 
2107
 
 
2108
   if (TARGET_ALTIVEC_ABI
 
2109
-      && (ALTIVEC_VECTOR_MODE (mode)
 
2110
-         || VSX_VECTOR_MODE (mode)
 
2111
+      && (ALTIVEC_OR_VSX_VECTOR_MODE (mode)
 
2112
          || (type && TREE_CODE (type) == VECTOR_TYPE
 
2113
              && int_size_in_bytes (type) == 16)))
 
2114
     {
 
2115
@@ -7677,8 +7678,7 @@
 
2116
     else
 
2117
       return gen_rtx_REG (mode, cum->vregno);
 
2118
   else if (TARGET_ALTIVEC_ABI
 
2119
-          && (ALTIVEC_VECTOR_MODE (mode)
 
2120
-              || VSX_VECTOR_MODE (mode)
 
2121
+          && (ALTIVEC_OR_VSX_VECTOR_MODE (mode)
 
2122
               || (type && TREE_CODE (type) == VECTOR_TYPE
 
2123
                   && int_size_in_bytes (type) == 16)))
 
2124
     {
 
2125
@@ -18280,7 +18280,7 @@
 
2126
 
 
2127
   /* Some cases that need register indexed addressing.  */
 
2128
   if ((TARGET_ALTIVEC_ABI && ALTIVEC_VECTOR_MODE (mode))
 
2129
-      || (TARGET_VSX && VSX_VECTOR_MODE (mode))
 
2130
+      || (TARGET_VSX && ALTIVEC_OR_VSX_VECTOR_MODE (mode))
 
2131
       || (TARGET_E500_DOUBLE && mode == DFmode)
 
2132
       || (TARGET_SPE_ABI
 
2133
          && SPE_VECTOR_MODE (mode)
 
2134
@@ -25565,14 +25565,13 @@
 
2135
   else if (TREE_CODE (valtype) == COMPLEX_TYPE
 
2136
           && targetm.calls.split_complex_arg)
 
2137
     return rs6000_complex_function_value (mode);
 
2138
+  /* VSX is a superset of Altivec and adds V2DImode/V2DFmode.  Since the same
 
2139
+     return register is used in both cases, and we won't see V2DImode/V2DFmode
 
2140
+     for pure altivec, combine the two cases.  */
 
2141
   else if (TREE_CODE (valtype) == VECTOR_TYPE
 
2142
           && TARGET_ALTIVEC && TARGET_ALTIVEC_ABI
 
2143
-          && ALTIVEC_VECTOR_MODE (mode))
 
2144
+          && ALTIVEC_OR_VSX_VECTOR_MODE (mode))
 
2145
     regno = ALTIVEC_ARG_RETURN;
 
2146
-  else if (TREE_CODE (valtype) == VECTOR_TYPE
 
2147
-          && TARGET_VSX && TARGET_ALTIVEC_ABI
 
2148
-          && VSX_VECTOR_MODE (mode))
 
2149
-    regno = ALTIVEC_ARG_RETURN;
 
2150
   else if (TARGET_E500_DOUBLE && TARGET_HARD_FLOAT
 
2151
           && (mode == DFmode || mode == DCmode
 
2152
               || mode == TFmode || mode == TCmode))
 
2153
@@ -25611,12 +25610,12 @@
 
2154
           && TARGET_HARD_FLOAT && TARGET_FPRS
 
2155
            && ((TARGET_SINGLE_FLOAT && mode == SFmode) || TARGET_DOUBLE_FLOAT))
 
2156
     regno = FP_ARG_RETURN;
 
2157
-  else if (ALTIVEC_VECTOR_MODE (mode)
 
2158
+  /* VSX is a superset of Altivec and adds V2DImode/V2DFmode.  Since the same
 
2159
+     return register is used in both cases, and we won't see V2DImode/V2DFmode
 
2160
+     for pure altivec, combine the two cases.  */
 
2161
+  else if (ALTIVEC_OR_VSX_VECTOR_MODE (mode)
 
2162
           && TARGET_ALTIVEC && TARGET_ALTIVEC_ABI)
 
2163
     regno = ALTIVEC_ARG_RETURN;
 
2164
-  else if (VSX_VECTOR_MODE (mode)
 
2165
-          && TARGET_VSX && TARGET_ALTIVEC_ABI)
 
2166
-    regno = ALTIVEC_ARG_RETURN;
 
2167
   else if (COMPLEX_MODE_P (mode) && targetm.calls.split_complex_arg)
 
2168
     return rs6000_complex_function_value (mode);
 
2169
   else if (TARGET_E500_DOUBLE && TARGET_HARD_FLOAT
 
2170
 
 
2171
Property changes on: gcc/config/rs6000/rs6000.c
 
2172
___________________________________________________________________
 
2173
Added: svn:mergeinfo
 
2174
   Merged /trunk/gcc/config/rs6000/rs6000.c:r162404,173624
 
2175
 
 
2176
Index: gcc/config/rs6000/rs6000.h
 
2177
===================================================================
 
2178
--- a/src/gcc/config/rs6000/rs6000.h    (revision
 
2179
+++ b/src/gcc/config/rs6000/rs6000.h    (revision
 
2180
@@ -1038,10 +1038,9 @@
 
2181
 
 
2182
 /* When setting up caller-save slots (MODE == VOIDmode) ensure we allocate
 
2183
    enough space to account for vectors in FP regs. */
 
2184
-#define HARD_REGNO_CALLER_SAVE_MODE(REGNO, NREGS, MODE)        \
 
2185
-  (TARGET_VSX                                          \
 
2186
-   && ((MODE) == VOIDmode || VSX_VECTOR_MODE (MODE)    \
 
2187
-       || ALTIVEC_VECTOR_MODE (MODE))                  \
 
2188
+#define HARD_REGNO_CALLER_SAVE_MODE(REGNO, NREGS, MODE)                        \
 
2189
+  (TARGET_VSX                                                          \
 
2190
+   && ((MODE) == VOIDmode || ALTIVEC_OR_VSX_VECTOR_MODE (MODE))                \
 
2191
    && FP_REGNO_P (REGNO)                               \
 
2192
    ? V2DFmode                                          \
 
2193
    : choose_hard_reg_mode ((REGNO), (NREGS), false))
 
2194
@@ -1057,25 +1056,16 @@
 
2195
         ((MODE) == V4SFmode            \
 
2196
          || (MODE) == V2DFmode)        \
 
2197
 
 
2198
-#define VSX_SCALAR_MODE(MODE)          \
 
2199
-       ((MODE) == DFmode)
 
2200
-
 
2201
-#define VSX_MODE(MODE)                 \
 
2202
-       (VSX_VECTOR_MODE (MODE)         \
 
2203
-        || VSX_SCALAR_MODE (MODE))
 
2204
-
 
2205
-#define VSX_MOVE_MODE(MODE)            \
 
2206
-       (VSX_VECTOR_MODE (MODE)         \
 
2207
-        || VSX_SCALAR_MODE (MODE)      \
 
2208
-        || ALTIVEC_VECTOR_MODE (MODE)  \
 
2209
-        || (MODE) == TImode)
 
2210
-
 
2211
 #define ALTIVEC_VECTOR_MODE(MODE)      \
 
2212
         ((MODE) == V16QImode           \
 
2213
          || (MODE) == V8HImode         \
 
2214
          || (MODE) == V4SFmode         \
 
2215
          || (MODE) == V4SImode)
 
2216
 
 
2217
+#define ALTIVEC_OR_VSX_VECTOR_MODE(MODE)                               \
 
2218
+  (ALTIVEC_VECTOR_MODE (MODE) || VSX_VECTOR_MODE (MODE)                        \
 
2219
+   || (MODE) == V2DImode)
 
2220
+
 
2221
 #define SPE_VECTOR_MODE(MODE)          \
 
2222
        ((MODE) == V4HImode             \
 
2223
          || (MODE) == V2SFmode          \
 
2224
@@ -1118,10 +1108,10 @@
 
2225
    ? ALTIVEC_VECTOR_MODE (MODE2)               \
 
2226
    : ALTIVEC_VECTOR_MODE (MODE2)               \
 
2227
    ? ALTIVEC_VECTOR_MODE (MODE1)               \
 
2228
-   : VSX_VECTOR_MODE (MODE1)                   \
 
2229
-   ? VSX_VECTOR_MODE (MODE2)                   \
 
2230
-   : VSX_VECTOR_MODE (MODE2)                   \
 
2231
-   ? VSX_VECTOR_MODE (MODE1)                   \
 
2232
+   : ALTIVEC_OR_VSX_VECTOR_MODE (MODE1)                \
 
2233
+   ? ALTIVEC_OR_VSX_VECTOR_MODE (MODE2)                \
 
2234
+   : ALTIVEC_OR_VSX_VECTOR_MODE (MODE2)                \
 
2235
+   ? ALTIVEC_OR_VSX_VECTOR_MODE (MODE1)                \
 
2236
    : 1)
 
2237
 
 
2238
 /* Post-reload, we can't use any new AltiVec registers, as we already
 
2239
 
 
2240
Property changes on: gcc/config/rs6000/rs6000.h
 
2241
___________________________________________________________________
 
2242
Added: svn:mergeinfo
 
2243
   Merged /trunk/gcc/config/rs6000/rs6000.h:r162404,173624
 
2244
 
 
2245
Index: gcc/config/arm/neon.md
 
2246
===================================================================
 
2247
--- a/src/gcc/config/arm/neon.md        (revision
 
2248
+++ b/src/gcc/config/arm/neon.md        (revision
 
2249
@@ -680,7 +680,7 @@
 
2250
           (match_operand:SI 2 "immediate_operand" "i")))]
 
2251
   "TARGET_NEON"
 
2252
 {
 
2253
-  int elt = ffs ((int) INTVAL (operands[2]) - 1);
 
2254
+  int elt = ffs ((int) INTVAL (operands[2])) - 1;
 
2255
   if (BYTES_BIG_ENDIAN)
 
2256
     elt = GET_MODE_NUNITS (<MODE>mode) - 1 - elt;
 
2257
   operands[2] = GEN_INT (elt);
 
2258
Index: gcc/config/mips/mips.c
 
2259
===================================================================
 
2260
--- a/src/gcc/config/mips/mips.c        (revision
 
2261
+++ b/src/gcc/config/mips/mips.c        (revision
 
2262
@@ -1162,7 +1162,7 @@
 
2263
   }
 
2264
 };
 
2265
 
 
2266
-static rtx mips_find_pic_call_symbol (rtx, rtx);
 
2267
+static rtx mips_find_pic_call_symbol (rtx, rtx, bool);
 
2268
 
 
2269
 /* This hash table keeps track of implicit "mips16" and "nomips16" attributes
 
2270
    for -mflip_mips16.  It maps decl names onto a boolean mode setting.  */
 
2271
@@ -9007,6 +9007,11 @@
 
2272
 static bool
 
2273
 mips_cfun_call_saved_reg_p (unsigned int regno)
 
2274
 {
 
2275
+  /* If the user makes an ordinarily-call-saved register global,
 
2276
+     that register is no longer call-saved.  */
 
2277
+  if (global_regs[regno])
 
2278
+    return false;
 
2279
+
 
2280
   /* Interrupt handlers need to save extra registers.  */
 
2281
   if (cfun->machine->interrupt_handler_p
 
2282
       && mips_interrupt_extra_call_saved_reg_p (regno))
 
2283
@@ -14040,12 +14045,16 @@
 
2284
 }
 
2285
 
 
2286
 /* REG is set in DEF.  See if the definition is one of the ways we load a
 
2287
-   register with a symbol address for a mips_use_pic_fn_addr_reg_p call.  If
 
2288
-   it is return the symbol reference of the function, otherwise return
 
2289
-   NULL_RTX.  */
 
2290
+   register with a symbol address for a mips_use_pic_fn_addr_reg_p call.
 
2291
+   If it is, return the symbol reference of the function, otherwise return
 
2292
+   NULL_RTX.
 
2293
 
 
2294
+   If RECURSE_P is true, use mips_find_pic_call_symbol to interpret
 
2295
+   the values of source registers, otherwise treat such registers as
 
2296
+   having an unknown value.  */
 
2297
+
 
2298
 static rtx
 
2299
-mips_pic_call_symbol_from_set (df_ref def, rtx reg)
 
2300
+mips_pic_call_symbol_from_set (df_ref def, rtx reg, bool recurse_p)
 
2301
 {
 
2302
   rtx def_insn, set;
 
2303
 
 
2304
@@ -14072,21 +14081,39 @@
 
2305
          return symbol;
 
2306
        }
 
2307
 
 
2308
-      /* Follow simple register copies.  */
 
2309
-      if (REG_P (src))
 
2310
-       return mips_find_pic_call_symbol (def_insn, src);
 
2311
+      /* Follow at most one simple register copy.  Such copies are
 
2312
+        interesting in cases like:
 
2313
+
 
2314
+            for (...)
 
2315
+              {
 
2316
+                locally_binding_fn (...);
 
2317
+              }
 
2318
+
 
2319
+        and:
 
2320
+
 
2321
+            locally_binding_fn (...);
 
2322
+            ...
 
2323
+            locally_binding_fn (...);
 
2324
+
 
2325
+        where the load of locally_binding_fn can legitimately be
 
2326
+        hoisted or shared.  However, we do not expect to see complex
 
2327
+        chains of copies, so a full worklist solution to the problem
 
2328
+        would probably be overkill.  */
 
2329
+      if (recurse_p && REG_P (src))
 
2330
+       return mips_find_pic_call_symbol (def_insn, src, false);
 
2331
     }
 
2332
 
 
2333
   return NULL_RTX;
 
2334
 }
 
2335
 
 
2336
-/* Find the definition of the use of REG in INSN.  See if the definition is
 
2337
-   one of the ways we load a register with a symbol address for a
 
2338
-   mips_use_pic_fn_addr_reg_p call.  If it is return the symbol reference of
 
2339
-   the function, otherwise return NULL_RTX.  */
 
2340
+/* Find the definition of the use of REG in INSN.  See if the definition
 
2341
+   is one of the ways we load a register with a symbol address for a
 
2342
+   mips_use_pic_fn_addr_reg_p call.  If it is return the symbol reference
 
2343
+   of the function, otherwise return NULL_RTX.  RECURSE_P is as for
 
2344
+   mips_pic_call_symbol_from_set.  */
 
2345
 
 
2346
 static rtx
 
2347
-mips_find_pic_call_symbol (rtx insn, rtx reg)
 
2348
+mips_find_pic_call_symbol (rtx insn, rtx reg, bool recurse_p)
 
2349
 {
 
2350
   df_ref use;
 
2351
   struct df_link *defs;
 
2352
@@ -14098,7 +14125,7 @@
 
2353
   defs = DF_REF_CHAIN (use);
 
2354
   if (!defs)
 
2355
     return NULL_RTX;
 
2356
-  symbol = mips_pic_call_symbol_from_set (defs->ref, reg);
 
2357
+  symbol = mips_pic_call_symbol_from_set (defs->ref, reg, recurse_p);
 
2358
   if (!symbol)
 
2359
     return NULL_RTX;
 
2360
 
 
2361
@@ -14107,7 +14134,7 @@
 
2362
     {
 
2363
       rtx other;
 
2364
 
 
2365
-      other = mips_pic_call_symbol_from_set (defs->ref, reg);
 
2366
+      other = mips_pic_call_symbol_from_set (defs->ref, reg, recurse_p);
 
2367
       if (!rtx_equal_p (symbol, other))
 
2368
        return NULL_RTX;
 
2369
     }
 
2370
@@ -14178,7 +14205,7 @@
 
2371
       if (!REG_P (reg))
 
2372
        continue;
 
2373
 
 
2374
-      symbol = mips_find_pic_call_symbol (insn, reg);
 
2375
+      symbol = mips_find_pic_call_symbol (insn, reg, true);
 
2376
       if (symbol)
 
2377
        {
 
2378
          mips_annotate_pic_call_expr (call, symbol);