~ubuntu-branches/ubuntu/saucy/gcc-4.7/saucy-proposed

« back to all changes in this revision

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

  • Committer: Package Import Robot
  • Author(s): Matthias Klose
  • Date: 2013-06-14 11:58:35 UTC
  • mfrom: (15.1.29 sid)
  • Revision ID: package-import@ubuntu.com-20130614115835-d9d3jr4ksr1ambgu
Tags: 4.7.3-5ubuntu1
* Merge with Debian; remaining changes:
  - Build from upstream source.
* Really build from the Linaro 4.7-2013.06 release (the tarball
  released as 4.7-2013.06 really is 4.7-2013.05).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# DP: updates from the 4.7 branch upto 20130421 (r198115).
 
1
# DP: updates from the 4.7 branch upto 20130614 (r200084).
2
2
 
3
3
last_updated()
4
4
{
5
5
        cat > ${dir}LAST_UPDATED <<EOF
6
 
Sun Apr 21 14:41:06 CEST 2013
7
 
Sun Apr 21 12:41:06 UTC 2013 (revision 198115)
 
6
Fri Jun 14 09:56:44 CEST 2013
 
7
Fri Jun 14 07:56:44 UTC 2013 (revision 200084)
8
8
EOF
9
9
}
10
10
 
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: libstdc++-v3/src/c++11/system_error.cc
 
16
===================================================================
 
17
--- a/src/libstdc++-v3/src/c++11/system_error.cc        (.../tags/gcc_4_7_3_release)
 
18
+++ b/src/libstdc++-v3/src/c++11/system_error.cc        (.../branches/gcc-4_7-branch)
 
19
@@ -62,8 +62,8 @@
 
20
     }
 
21
   };
 
22
 
 
23
-  const generic_error_category generic_category_instance;
 
24
-  const system_error_category system_category_instance;
 
25
+  const generic_error_category generic_category_instance{};
 
26
+  const system_error_category system_category_instance{};
 
27
 }
 
28
 
 
29
 namespace std _GLIBCXX_VISIBILITY(default)
 
30
Index: libstdc++-v3/src/c++11/future.cc
 
31
===================================================================
 
32
--- a/src/libstdc++-v3/src/c++11/future.cc      (.../tags/gcc_4_7_3_release)
 
33
+++ b/src/libstdc++-v3/src/c++11/future.cc      (.../branches/gcc-4_7-branch)
 
34
@@ -60,7 +60,7 @@
 
35
   const future_error_category&
 
36
   __future_category_instance() noexcept
 
37
   {
 
38
-    static const future_error_category __fec;
 
39
+    static const future_error_category __fec{};
 
40
     return __fec;
 
41
   }
 
42
 }
 
43
Index: libstdc++-v3/include/bits/basic_string.h
 
44
===================================================================
 
45
--- a/src/libstdc++-v3/include/bits/basic_string.h      (.../tags/gcc_4_7_3_release)
 
46
+++ b/src/libstdc++-v3/include/bits/basic_string.h      (.../branches/gcc-4_7-branch)
 
47
@@ -2764,10 +2764,9 @@
 
48
    *
 
49
    *  Stores characters from @a __is into @a __str until @a __delim is
 
50
    *  found, the end of the stream is encountered, or str.max_size()
 
51
-   *  is reached.  If is.width() is non-zero, that is the limit on the
 
52
-   *  number of characters stored into @a __str.  Any previous
 
53
-   *  contents of @a __str are erased.  If @a __delim was encountered,
 
54
-   *  it is extracted but not stored into @a __str.
 
55
+   *  is reached.  Any previous contents of @a __str are erased.  If
 
56
+   *  @a __delim is encountered, it is extracted but not stored into
 
57
+   *  @a __str.
 
58
    */
 
59
   template<typename _CharT, typename _Traits, typename _Alloc>
 
60
     basic_istream<_CharT, _Traits>&
 
61
@@ -2782,10 +2781,9 @@
 
62
    *
 
63
    *  Stores characters from is into @a __str until &apos;\n&apos; is
 
64
    *  found, the end of the stream is encountered, or str.max_size()
 
65
-   *  is reached.  If __is.width() is non-zero, that is the limit on
 
66
-   *  the number of characters stored into @a __str.  Any previous
 
67
-   *  contents of @a __str are erased.  If end of line was
 
68
-   *  encountered, it is extracted but not stored into @a __str.
 
69
+   *  is reached.  Any previous contents of @a __str are erased.  If
 
70
+   *  end of line is encountered, it is extracted but not stored into
 
71
+   *  @a __str.
 
72
    */
 
73
   template<typename _CharT, typename _Traits, typename _Alloc>
 
74
     inline basic_istream<_CharT, _Traits>&
15
75
Index: libstdc++-v3/ChangeLog
16
76
===================================================================
17
77
--- a/src/libstdc++-v3/ChangeLog        (.../tags/gcc_4_7_3_release)
18
78
+++ b/src/libstdc++-v3/ChangeLog        (.../branches/gcc-4_7-branch)
19
 
@@ -1,3 +1,20 @@
 
79
@@ -1,3 +1,31 @@
 
80
+2013-05-15  Jonathan Wakely  <jwakely.gcc@gmail.com>
 
81
+
 
82
+       * include/bits/basic_string.h (getline): Fix doxygen comments.
 
83
+
 
84
+2013-05-14  Evgeniy Stepanov  <eugenis@google.com>
 
85
+
 
86
+       * src/c++11/system_error.cc (generic_category_instance): Add
 
87
+       initializer.
 
88
+       (system_category_instance): Likewise.
 
89
+       * src/c++11/future.cc (__fec): Likewise.
 
90
+
20
91
+2013-04-15  Jack Howarth  <howarth@bromo.med.uc.edu>
21
92
+
22
93
+       Backport from mainline
78
149
 AC_DEFUN([GLIBCXX_ENABLE_LIBSTDCXX_TIME], [
79
150
 
80
151
   AC_MSG_CHECKING([for clock_gettime, nanosleep and sched_yield])
 
152
Index: libgcc/config.host
 
153
===================================================================
 
154
--- a/src/libgcc/config.host    (.../tags/gcc_4_7_3_release)
 
155
+++ b/src/libgcc/config.host    (.../branches/gcc-4_7-branch)
 
156
@@ -315,7 +315,7 @@
 
157
        md_unwind_header=alpha/vms-unwind.h
 
158
        ;;
 
159
 arm-wrs-vxworks)
 
160
-       tmake_file="$tmake_file arm/t-arm arm/t-vxworks t-fdpbit"
 
161
+       tmake_file="$tmake_file arm/t-arm arm/t-vxworks t-softfp-sfdf t-softfp-excl arm/t-softfp t-softfp"
 
162
        extra_parts="$extra_parts crti.o crtn.o"
 
163
        ;;
 
164
 arm*-*-freebsd*)
 
165
Index: libgcc/Makefile.in
 
166
===================================================================
 
167
--- a/src/libgcc/Makefile.in    (.../tags/gcc_4_7_3_release)
 
168
+++ b/src/libgcc/Makefile.in    (.../branches/gcc-4_7-branch)
 
169
@@ -121,7 +121,8 @@
 
170
 .PHONY: all clean
 
171
 
 
172
 clean:
 
173
-       -rm -f config.h libgcc_tm.h stamp-h stmp-ldirs libgcc.map
 
174
+       -rm -f config.h libgcc_tm.h libgcc.map
 
175
+       -rm -f libgcc_tm.stamp stamp-h stmp-ldirs
 
176
        -rm -f *$(objext)
 
177
        -rm -f *.dep
 
178
        -rm -f *.a
81
179
Index: libgcc/ChangeLog
82
180
===================================================================
83
181
--- a/src/libgcc/ChangeLog      (.../tags/gcc_4_7_3_release)
84
182
+++ b/src/libgcc/ChangeLog      (.../branches/gcc-4_7-branch)
85
 
@@ -1,3 +1,10 @@
 
183
@@ -1,3 +1,31 @@
 
184
+2013-06-08  Walter Lee  <walt@tilera.com>
 
185
+
 
186
+       Backport from mainline:
 
187
+       2013-06-08  Walter Lee  <walt@tilera.com>
 
188
+       
 
189
+       * config/tilepro/atomic.h: Don't include stdint.h or features.h.
 
190
+       Replace int64_t with long long.  Add __extension__ where
 
191
+       appropriate.
 
192
+
 
193
+2013-06-06  Douglas B Rupp  <rupp@adacore.com>
 
194
+
 
195
+       * config.host (arm-wrs-vxworks): Configure with other soft float.
 
196
+
 
197
+2013-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
 
198
+
 
199
+       Backport from mainline:
 
200
+       2012-05-24  Olivier Hainque  <hainque@adacore.com>
 
201
+
 
202
+       * Makefile.in (clean): Remove libgcc_tm.stamp as well.
 
203
+       Use a separate command for stamp removals.
 
204
+
86
205
+2013-04-11  Julian Brown  <julian@codesourcery.com>
87
206
+
88
207
+       * config/arm/linux-atomic.c (SUBWORD_SYNC_OP, SUBWORD_VAL_CAS)
93
212
 2013-04-11  Release Manager
94
213
 
95
214
        * GCC 4.7.3 released.
 
215
Index: libgcc/config/tilepro/atomic.h
 
216
===================================================================
 
217
--- a/src/libgcc/config/tilepro/atomic.h        (.../tags/gcc_4_7_3_release)
 
218
+++ b/src/libgcc/config/tilepro/atomic.h        (.../branches/gcc-4_7-branch)
 
219
@@ -1,6 +1,5 @@
 
220
 /* Macros for atomic functionality for tile.
 
221
-   Copyright (C) 2011, 2012
 
222
-   Free Software Foundation, Inc.
 
223
+   Copyright (C) 2011-2013 Free Software Foundation, Inc.
 
224
    Contributed by Walter Lee (walt@tilera.com)
 
225
 
 
226
    This file is free software; you can redistribute it and/or modify it
 
227
@@ -93,8 +92,6 @@
 
228
    compare-and-exchange routine, so may be potentially less efficient.  */
 
229
 #endif
 
230
 
 
231
-#include <stdint.h>
 
232
-#include <features.h>
 
233
 #ifdef __tilegx__
 
234
 #include <arch/spr_def.h>
 
235
 #else
 
236
@@ -123,9 +120,9 @@
 
237
 
 
238
 /* 64-bit integer compare-and-exchange.  */
 
239
 static __inline __attribute__ ((always_inline))
 
240
-     int64_t arch_atomic_val_compare_and_exchange_8 (volatile int64_t * mem,
 
241
-                                                    int64_t oldval,
 
242
-                                                    int64_t newval)
 
243
+     long long arch_atomic_val_compare_and_exchange_8 (volatile long long
 
244
+                                                      *mem, long long oldval,
 
245
+                                                      long long newval)
 
246
 {
 
247
 #ifdef __tilegx__
 
248
   __insn_mtspr (SPR_CMPEXCH_VALUE, oldval);
 
249
@@ -140,7 +137,7 @@
 
250
                        "R04" (newval_lo), "R05" (newval_hi),
 
251
                        "m" (*mem):"r20", "r21", "r22", "r23", "r24", "r25",
 
252
                        "r26", "r27", "r28", "r29", "memory");
 
253
-  return ((uint64_t) result_hi) << 32 | result_lo;
 
254
+  return ((long long) result_hi) << 32 | result_lo;
 
255
 #endif
 
256
 }
 
257
 
 
258
@@ -151,11 +148,11 @@
 
259
 
 
260
 
 
261
 #define arch_atomic_val_compare_and_exchange(mem, o, n)                 \
 
262
-  ({                                                                    \
 
263
+  __extension__ ({                                                      \
 
264
     (__typeof(*(mem)))(__typeof(*(mem)-*(mem)))                         \
 
265
       ((sizeof(*(mem)) == 8) ?                                          \
 
266
        arch_atomic_val_compare_and_exchange_8(                          \
 
267
-         (volatile int64_t*)(mem), (__typeof((o)-(o)))(o),              \
 
268
+         (volatile long long*)(mem), (__typeof((o)-(o)))(o),            \
 
269
          (__typeof((n)-(n)))(n)) :                                      \
 
270
        (sizeof(*(mem)) == 4) ?                                          \
 
271
        arch_atomic_val_compare_and_exchange_4(                          \
 
272
@@ -165,7 +162,7 @@
 
273
   })
 
274
 
 
275
 #define arch_atomic_bool_compare_and_exchange(mem, o, n)                \
 
276
-  ({                                                                    \
 
277
+  __extension__ ({                                                      \
 
278
     __typeof(o) __o = (o);                                              \
 
279
     __builtin_expect(                                                   \
 
280
       __o == arch_atomic_val_compare_and_exchange((mem), __o, (n)), 1); \
 
281
@@ -175,7 +172,7 @@
 
282
 /* Loop with compare_and_exchange until we guess the correct value.
 
283
    Normally "expr" will be an expression using __old and __value.  */
 
284
 #define __arch_atomic_update_cmpxchg(mem, value, expr)                  \
 
285
-  ({                                                                    \
 
286
+  __extension__ ({                                                      \
 
287
     __typeof(value) __value = (value);                                  \
 
288
     __typeof(*(mem)) *__mem = (mem), __old = *__mem, __guess;           \
 
289
     do {                                                                \
 
290
@@ -190,12 +187,14 @@
 
291
 /* Generic atomic op with 8- or 4-byte variant.
 
292
    The _mask, _addend, and _expr arguments are ignored on tilegx.  */
 
293
 #define __arch_atomic_update(mem, value, op, _mask, _addend, _expr)     \
 
294
-  ({                                                                    \
 
295
+  __extension__ ({                                                      \
 
296
     ((__typeof(*(mem)))                                                 \
 
297
      ((sizeof(*(mem)) == 8) ? (__typeof(*(mem)-*(mem)))__insn_##op(     \
 
298
-        (void *)(mem), (int64_t)(__typeof((value)-(value)))(value)) :   \
 
299
+        (volatile void *)(mem),                                         \
 
300
+        (long long)(__typeof((value)-(value)))(value)) :                \
 
301
       (sizeof(*(mem)) == 4) ? (int)__insn_##op##4(                      \
 
302
-        (void *)(mem), (int32_t)(__typeof((value)-(value)))(value)) :   \
 
303
+        (volatile void *)(mem),                                         \
 
304
+        (int)(__typeof((value)-(value)))(value)) :                      \
 
305
       __arch_atomic_error_bad_argument_size()));                        \
 
306
   })
 
307
 
 
308
@@ -225,7 +224,7 @@
 
309
 /* Generic atomic op with 8- or 4-byte variant.
 
310
    The _op argument is ignored on tilepro.  */
 
311
 #define __arch_atomic_update(mem, value, _op, mask, addend, expr)       \
 
312
-  ({                                                                    \
 
313
+  __extension__ ({                                                      \
 
314
     (__typeof(*(mem)))(__typeof(*(mem)-*(mem)))                         \
 
315
       ((sizeof(*(mem)) == 8) ?                                          \
 
316
        __arch_atomic_update_cmpxchg((mem), (value), (expr)) :           \
 
317
@@ -264,13 +263,13 @@
 
318
   __arch_atomic_update_cmpxchg(mem, mask, ~(__old & __value))
 
319
 
 
320
 #define arch_atomic_bit_set(mem, bit)                                   \
 
321
-  ({                                                                    \
 
322
+  __extension__ ({                                                      \
 
323
     __typeof(*(mem)) __mask = (__typeof(*(mem)))1 << (bit);             \
 
324
     __mask & arch_atomic_or((mem), __mask);                             \
 
325
   })
 
326
 
 
327
 #define arch_atomic_bit_clear(mem, bit)                                 \
 
328
-  ({                                                                    \
 
329
+  __extension__ ({                                                      \
 
330
     __typeof(*(mem)) __mask = (__typeof(*(mem)))1 << (bit);             \
 
331
     __mask & arch_atomic_and((mem), ~__mask);                           \
 
332
   })
96
333
Index: libgcc/config/arm/linux-atomic.c
97
334
===================================================================
98
335
--- a/src/libgcc/config/arm/linux-atomic.c      (.../tags/gcc_4_7_3_release)
227
464
+++ b/src/gcc/DATESTAMP (.../branches/gcc-4_7-branch)
228
465
@@ -1 +1 @@
229
466
-20130411
230
 
+20130421
 
467
+20130614
 
468
Index: gcc/builtins.c
 
469
===================================================================
 
470
--- a/src/gcc/builtins.c        (.../tags/gcc_4_7_3_release)
 
471
+++ b/src/gcc/builtins.c        (.../branches/gcc-4_7-branch)
 
472
@@ -9692,7 +9692,16 @@
 
473
       case rvc_inf:
 
474
        /* If arg is Inf or NaN and we're logb, return it.  */
 
475
        if (TREE_CODE (rettype) == REAL_TYPE)
 
476
-         return fold_convert_loc (loc, rettype, arg);
 
477
+         {
 
478
+           /* For logb(-Inf) we have to return +Inf.  */
 
479
+           if (real_isinf (value) && real_isneg (value))
 
480
+             {
 
481
+               REAL_VALUE_TYPE tem;
 
482
+               real_inf (&tem);
 
483
+               return build_real (rettype, tem);
 
484
+             }
 
485
+           return fold_convert_loc (loc, rettype, arg);
 
486
+         }
 
487
        /* Fall through... */
 
488
       case rvc_zero:
 
489
        /* Zero may set errno and/or raise an exception for logb, also
231
490
Index: gcc/ChangeLog
232
491
===================================================================
233
492
--- a/src/gcc/ChangeLog (.../tags/gcc_4_7_3_release)
234
493
+++ b/src/gcc/ChangeLog (.../branches/gcc-4_7-branch)
235
 
@@ -1,3 +1,75 @@
 
494
@@ -1,3 +1,248 @@
 
495
+2013-06-07  Uros Bizjak  <ubizjak@gmail.com>
 
496
+
 
497
+       Backport from mainline
 
498
+       2013-06-10  Uros Bizjak  <ubizjak@gmail.com>
 
499
+
 
500
+       * config/alpha/alpha.c (alpha_emit_xfloating_compare): Also use
 
501
+       cmp_code to construct REG_EQUAL note.
 
502
+
 
503
+       Backport from mainline
 
504
+       2013-06-05  Uros Bizjak  <ubizjak@gmail.com>
 
505
+
 
506
+       * config/alpha/alpha.c (alpha_emit_conditional_move): Swap all
 
507
+       GE, GT, GEU and GTU compares, modulo DImode compares with zero.
 
508
+
 
509
+       Backport from mainline
 
510
+       2013-05-23  Uros Bizjak  <ubizjak@gmail.com>
 
511
+
 
512
+       PR target/57379
 
513
+       * config/alpha/alpha.md (unspec): Add UNSPEC_XFLT_COMPARE.
 
514
+       * config/alpha/alpha.c (alpha_emit_xfloating_compare): Construct
 
515
+       REG_EQUAL note as UNSPEC_XFLT_COMPARE unspec.
 
516
+
 
517
+2013-06-09  Jakub Jelinek  <jakub@redhat.com>
 
518
+
 
519
+       PR target/57568
 
520
+       * config/i386/i386.md (TARGET_READ_MODIFY_WRITE peepholes): Ensure
 
521
+       that operands[2] doesn't overlap with operands[0].
 
522
+
 
523
+2013-05-22  Uros Bizjak  <ubizjak@gmail.com>
 
524
+
 
525
+       PR target/57356
 
526
+       * config/i386/i386.md (*movti_internal_rex64): Emit movaps/movups
 
527
+       for non-sse2 targets.  Simplify mode attribute calculation.
 
528
+
 
529
+2013-05-17  Uros Bizjak  <ubizjak@gmail.com>
 
530
+
 
531
+       Backport from mainline
 
532
+       2013-05-16  Uros Bizjak  <ubizjak@gmail.com>
 
533
+
 
534
+       * config/i386/driver-i386.c (host_detect_local_cpu): Determine
 
535
+       cache parameters using detect_caches_amd also for CYRIX,
 
536
+       NSC and TM2 signatures.
 
537
+
 
538
+       2013-05-16  Uros Bizjak  <ubizjak@gmail.com>
 
539
+                   Dzianis Kahanovich  <mahatma@eu.by>
 
540
+
 
541
+       PR target/45359
 
542
+       PR target/46396
 
543
+       * config/i386/driver-i386.c (host_detect_local_cpu): Detect
 
544
+       VIA/Centaur processors and determine their cache parameters
 
545
+       using detect_caches_amd.
 
546
+
 
547
+       2013-05-15  Uros Bizjak  <ubizjak@gmail.com>
 
548
+
 
549
+       * config/i386/i386.c (ix86_option_override_internal): Add
 
550
+       PTA_POPCNT to corei7 entry.
 
551
+
 
552
+2013-05-14  Richard Biener  <rguenther@suse.de>
 
553
+
 
554
+       PR gcov-profile/57269
 
555
+       Backport from mainline
 
556
+       2012-06-30  Nathan Sidwell  <nathan@acm.org>
 
557
+
 
558
+       * coverage.c (coverage_init): Read counts file before writing
 
559
+       graph header.
 
560
+
 
561
+2013-05-13  Uros Bizjak  <ubizjak@gmail.com>
 
562
+
 
563
+       PR target/57264
 
564
+       Backport from mainline
 
565
+       2013-01-22  Jakub Jelinek  <jakub@redhat.com>
 
566
+
 
567
+       PR target/55686
 
568
+       * config/i386/i386.md (UNSPEC_STOS): New.
 
569
+       (strset_singleop, *strsetdi_rex_1, *strsetsi_1, *strsethi_1,
 
570
+       *strsetqi_1): Add UNSPEC_STOS.
 
571
+
 
572
+2013-05-10  Joey Ye  <joey.ye@arm.com>
 
573
+
 
574
+       Backport from mainline
 
575
+       2012-11-29  Matthew Gretton-Dann  <matthew.gretton-dann@linaro.org>
 
576
+
 
577
+       PR target/54974
 
578
+       * config/arm/arm.md (thumb2_pool_range, pool_range): Add comment on
 
579
+       Thumb pool ranges.
 
580
+       (thumb1_extendhisi2): Reduce Thumb pool range.
 
581
+       (arm_movdi): Likewise.
 
582
+       (thumb1_movdi_insn): Likewise.
 
583
+       (thumb1_movsi_insn): Likewise.
 
584
+       (pic_load_addr_unified): Likewise.
 
585
+       (pic_load_addr_32bit): Likewise.
 
586
+       (pic_load_addr_thumb1): Likewise.
 
587
+       (thumb1_movhf): Likewise.
 
588
+       (arm_movsf_soft_insn): Likewise.
 
589
+       (thumb1_movsf_soft_insn): Likewise.
 
590
+       (movdf_soft_insn): Likewise.
 
591
+       (thumb1_movdf_soft_insn): Likewise.
 
592
+       * config/arm/neon.md (*neon_mov<mode>): Likewise.
 
593
+       (*neon_mov<mode>): Likwise.
 
594
+       * config/arm/thumb2.md: (*thumb2_movsi_insn): Likewise.
 
595
+       (*thumb2_movhi_insn): Likewise.
 
596
+       (*thumb2_extendqisi_v6): Likewise.
 
597
+       (*thumb2_zero_extendqisi_v6): Likewise.
 
598
+       (*thumb2_zero_extendqisi2_v6): Likewise.
 
599
+       * config/arm/vfp.md: (*thumb2_movsi_vfp): Likewise.
 
600
+       (*movdi_vfp): Likewise.
 
601
+       (*movdi_vfp_cortexa8): Likewise.
 
602
+       (*thumb2_movsf_vfp): Likewise.
 
603
+       (*thumb2_movdf_vfp): Likewise.
 
604
+
 
605
+2013-05-10  Sebastian Huber  <sebastian.huber@embedded-brains.de>
 
606
+
 
607
+       * config/arm/t-rtems-eabi: Remove mthumb/march=armv7 multilib.
 
608
+       Add mthumb/march=armv7-a multilib.
 
609
+       Add mthumb/march=armv7-r multilib.
 
610
+       Add mthumb/march=armv7-a/mfpu=neon/mfloat-abi=hard multilib.
 
611
+
 
612
+2013-05-10  Ralf Corsépius  <ralf.corsepius@rtems.org>
 
613
+
 
614
+       PR target/57237
 
615
+       * config/v850/t-rtems: Add more multilibs.
 
616
+
 
617
+2013-05-07  Michael Meissner  <meissner@linux.vnet.ibm.com>
 
618
+
 
619
+       Backport from trunk
 
620
+       2013-05-03  Michael Meissner  <meissner@linux.vnet.ibm.com>
 
621
+
 
622
+       PR target/57150
 
623
+       * config/rs6000/rs6000.h (HARD_REGNO_CALLER_SAVE_MODE): Use DFmode
 
624
+       to save TFmode registers and DImode to save TImode registers for
 
625
+       caller save operations.
 
626
+       (HARD_REGNO_CALL_PART_CLOBBERED): TFmode and TDmode do not need to
 
627
+       mark being partially clobbered since they only use the first
 
628
+       double word.
 
629
+
 
630
+       * config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): TFmode
 
631
+       and TDmode only use the upper 64-bits of each VSX register.
 
632
+
 
633
+2013-05-03  Marek Polacek  <polacek@redhat.com>
 
634
+
 
635
+       Backport from mainline
 
636
+       2013-04-25  Marek Polacek  <polacek@redhat.com>
 
637
+
 
638
+       PR tree-optimization/57066
 
639
+       * builtins.c (fold_builtin_logb): Return +Inf for -Inf.
 
640
+
 
641
+2013-04-30  Uros Bizjak  <ubizjak@gmail.com>
 
642
+
 
643
+       Backport from mainline
 
644
+       2013-04-29  Uros Bizjak  <ubizjak@gmail.com>
 
645
+
 
646
+       PR target/44578
 
647
+       * config/i386/i386.md (*zero_extendsidi2_rex64): Add "!" to m->?*y
 
648
+       alternative.
 
649
+       (*zero_extendsidi2): Ditto.
 
650
+
 
651
+       Backport from mainline
 
652
+       2013-04-29  Uros Bizjak  <ubizjak@gmail.com>
 
653
+
 
654
+       PR target/57098
 
655
+       * config/i386/i386.c (ix86_expand_vec_perm): Validize constant memory.
 
656
+
 
657
+2013-04-29  Christian Bruel  <christian.bruel@st.com>
 
658
+
 
659
+       PR target/57108
 
660
+       * sh.md (tstsi_t_zero_extract_eq): Set mode for operand 0.
 
661
+
 
662
+2013-04-27  Jakub Jelinek  <jakub@redhat.com>
 
663
+
 
664
+       PR target/56866
 
665
+       * config/i386/sse.md (xop_rotr<mode>3): Fix up computation of
 
666
+       the immediate rotate count.
 
667
+
236
668
+2013-04-21  Eric Botcazou  <ebotcazou@adacore.com>
237
669
+
238
670
+       * cfgexpand.c (avoid_complex_debug_insns): Fix C++ism.
308
740
 2013-04-11  Release Manager
309
741
 
310
742
        * GCC 4.7.3 released.
 
743
Index: gcc/testsuite/gcc.target/powerpc/pr57150.c
 
744
===================================================================
 
745
--- a/src/gcc/testsuite/gcc.target/powerpc/pr57150.c    (.../tags/gcc_4_7_3_release)
 
746
+++ b/src/gcc/testsuite/gcc.target/powerpc/pr57150.c    (.../branches/gcc-4_7-branch)
 
747
@@ -0,0 +1,23 @@
 
748
+/* { dg-do compile { target { powerpc*-*-* } } } */
 
749
+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 
750
+/* { dg-require-effective-target powerpc_vsx_ok } */
 
751
+/* { dg-options "-O3 -mcpu=power7 -fcaller-saves" } */
 
752
+/* { dg-final { scan-assembler-not "lxvd2x" } } */
 
753
+/* { dg-final { scan-assembler-not "lxvw4x" } } */
 
754
+/* { dg-final { scan-assembler-not "lvx" } } */
 
755
+/* { dg-final { scan-assembler-not "stxvd2x" } } */
 
756
+/* { dg-final { scan-assembler-not "stxvw4x" } } */
 
757
+/* { dg-final { scan-assembler-not "stvx" } } */
 
758
+
 
759
+/* Insure caller save on long double does not use VSX instructions.  */
 
760
+
 
761
+extern long double modify (long double);
 
762
+
 
763
+void
 
764
+sum (long double *ptr, long double value, unsigned long n)
 
765
+{
 
766
+  unsigned long i;
 
767
+
 
768
+  for (i = 0; i < n; i++)
 
769
+    ptr[i] += modify (value);
 
770
+}
 
771
Index: gcc/testsuite/gcc.target/i386/pr57264.c
 
772
===================================================================
 
773
--- a/src/gcc/testsuite/gcc.target/i386/pr57264.c       (.../tags/gcc_4_7_3_release)
 
774
+++ b/src/gcc/testsuite/gcc.target/i386/pr57264.c       (.../branches/gcc-4_7-branch)
 
775
@@ -0,0 +1,18 @@
 
776
+/* { dg-do compile } */
 
777
+/* { dg-options "-O1 -mcld" } */
 
778
+
 
779
+void test (int x, int **pp)
 
780
+{
 
781
+  while (x)
 
782
+    {
 
783
+      int *ip = *pp;
 
784
+      int *op = *pp;
 
785
+      while (*ip)
 
786
+       {
 
787
+         int v = *ip++;
 
788
+         *op++ = v + 1;
 
789
+       }
 
790
+    }
 
791
+}
 
792
+
 
793
+/* { dg-final { scan-assembler-not "stosl" } } */
 
794
Index: gcc/testsuite/gcc.target/i386/pr44578.c
 
795
===================================================================
 
796
--- a/src/gcc/testsuite/gcc.target/i386/pr44578.c       (.../tags/gcc_4_7_3_release)
 
797
+++ b/src/gcc/testsuite/gcc.target/i386/pr44578.c       (.../branches/gcc-4_7-branch)
 
798
@@ -0,0 +1,31 @@
 
799
+/* { dg-do run } */
 
800
+/* { dg-options "-O2 -mtune=athlon64" } */
 
801
+
 
802
+extern void abort (void);
 
803
+
 
804
+long double
 
805
+__attribute__((noinline, noclone))
 
806
+test (float num)
 
807
+{
 
808
+  unsigned int i;
 
809
+
 
810
+  if (num < 0.0)
 
811
+    num = 0.0;
 
812
+
 
813
+  __builtin_memcpy (&i, &num, sizeof(unsigned int));
 
814
+
 
815
+  return (long double)(unsigned long long) i;
 
816
+}
 
817
+
 
818
+int
 
819
+main ()
 
820
+{
 
821
+  long double x;
 
822
+
 
823
+  x = test (0.0);
 
824
+
 
825
+  if (x != 0.0)
 
826
+    abort ();
 
827
+
 
828
+  return 0;
 
829
+}
 
830
Index: gcc/testsuite/gcc.target/i386/pr56866.c
 
831
===================================================================
 
832
--- a/src/gcc/testsuite/gcc.target/i386/pr56866.c       (.../tags/gcc_4_7_3_release)
 
833
+++ b/src/gcc/testsuite/gcc.target/i386/pr56866.c       (.../branches/gcc-4_7-branch)
 
834
@@ -0,0 +1,16 @@
 
835
+/* PR target/56866 */
 
836
+/* { dg-do run } */
 
837
+/* { dg-require-effective-target xop } */
 
838
+/* { dg-options "-O3 -mxop" } */
 
839
+
 
840
+#define main xop_test_main
 
841
+#include "../../gcc.c-torture/execute/pr56866.c"
 
842
+#undef main
 
843
+
 
844
+#include "xop-check.h"
 
845
+
 
846
+static void
 
847
+xop_test (void)
 
848
+{
 
849
+  xop_test_main ();
 
850
+}
 
851
Index: gcc/testsuite/gcc.target/i386/pr57098.c
 
852
===================================================================
 
853
--- a/src/gcc/testsuite/gcc.target/i386/pr57098.c       (.../tags/gcc_4_7_3_release)
 
854
+++ b/src/gcc/testsuite/gcc.target/i386/pr57098.c       (.../branches/gcc-4_7-branch)
 
855
@@ -0,0 +1,10 @@
 
856
+/* { dg-do compile } */
 
857
+/* { dg-require-effective-target lp64 } */
 
858
+/* { dg-options "-msse4 -mcmodel=large" } */
 
859
+
 
860
+typedef int V __attribute__((vector_size(16)));
 
861
+
 
862
+void foo (V *p, V *mask)
 
863
+{
 
864
+  *p = __builtin_shuffle (*p, *mask);
 
865
+}
 
866
Index: gcc/testsuite/gcc.target/sh/pr57108.c
 
867
===================================================================
 
868
--- a/src/gcc/testsuite/gcc.target/sh/pr57108.c (.../tags/gcc_4_7_3_release)
 
869
+++ b/src/gcc/testsuite/gcc.target/sh/pr57108.c (.../branches/gcc-4_7-branch)
 
870
@@ -0,0 +1,19 @@
 
871
+/* { dg-do compile { target "sh*-*-*" } } */
 
872
+/* { dg-options "-O1" } */
 
873
+
 
874
+void __assert_func (void) __attribute__ ((__noreturn__)) ;
 
875
+
 
876
+void ATATransfer (int num, int buffer)
 
877
+{
 
878
+ int wordCount;
 
879
+
 
880
+ while (num > 0)
 
881
+  {
 
882
+    wordCount = num * 512 / sizeof (int);
 
883
+
 
884
+    ((0 == (buffer & 63)) ? (void)0 : __assert_func () );
 
885
+    ((0 == (wordCount & 31)) ? (void)0 : __assert_func ());
 
886
+  }
 
887
+
 
888
+
 
889
+ }
 
890
Index: gcc/testsuite/gfortran.dg/size_kind_3.f90
 
891
===================================================================
 
892
--- a/src/gcc/testsuite/gfortran.dg/size_kind_3.f90     (.../tags/gcc_4_7_3_release)
 
893
+++ b/src/gcc/testsuite/gfortran.dg/size_kind_3.f90     (.../branches/gcc-4_7-branch)
 
894
@@ -0,0 +1,11 @@
 
895
+! { dg-do compile }
 
896
+!
 
897
+! PR fortran/57142
 
898
+!
 
899
+integer :: B(huge(1)+3_8,2_8)
 
900
+integer(8) :: var1(2), var2, var3
 
901
+
 
902
+var1 = shape(B) ! { dg-error "SHAPE overflows its kind" }
 
903
+var2 = size(B) ! { dg-error "SIZE overflows its kind" }
 
904
+var3 = size(B,dim=1) ! { dg-error "SIZE overflows its kind" }
 
905
+end
 
906
Index: gcc/testsuite/gfortran.dg/transfer_check_4.f90
 
907
===================================================================
 
908
--- a/src/gcc/testsuite/gfortran.dg/transfer_check_4.f90        (.../tags/gcc_4_7_3_release)
 
909
+++ b/src/gcc/testsuite/gfortran.dg/transfer_check_4.f90        (.../branches/gcc-4_7-branch)
 
910
@@ -0,0 +1,44 @@
 
911
+! { dg-do compile }
 
912
+! { dg-options "-Wall" }
 
913
+
 
914
+! PR 57022: [4.7/4.8/4.9 Regression] Inappropriate warning for use of TRANSFER with arrays
 
915
+! Contributed by William Clodius <wclodius@los-alamos.net>
 
916
+
 
917
+subroutine transfers (test)
 
918
+
 
919
+  use, intrinsic :: iso_fortran_env
 
920
+  
 
921
+  integer, intent(in) :: test
 
922
+
 
923
+  integer(int8)  :: test8(8)  = 0
 
924
+  integer(int16) :: test16(4) = 0
 
925
+  integer(int32) :: test32(2) = 0
 
926
+  integer(int64) :: test64    = 0
 
927
+
 
928
+  select case(test)
 
929
+  case(0)
 
930
+    test64 = transfer(test8, test64)
 
931
+  case(1)
 
932
+    test64 = transfer(test16, test64)
 
933
+  case(2)
 
934
+    test64 = transfer(test32, test64)
 
935
+  case(3)
 
936
+    test8  = transfer(test64, test8, 8)
 
937
+  case(4)
 
938
+    test16 = transfer(test64, test16, 4)
 
939
+  case(5)
 
940
+    test32 = transfer(test64, test32, 2)
 
941
+  end select
 
942
+
 
943
+end subroutine
 
944
+
 
945
+
 
946
+! PR 53685: surprising warns about transfer with explicit character range
 
947
+! Contributed by Jos de Kloe <kloedej@knmi.nl>
 
948
+
 
949
+subroutine mytest(byte_array,val)
 
950
+  integer, parameter :: r8_ = Selected_Real_Kind(15,307)  ! = real*8
 
951
+  character(len=1), dimension(16), intent(in) :: byte_array
 
952
+  real(r8_),intent(out) :: val
 
953
+  val = transfer(byte_array(1:8),val)    
 
954
+end subroutine
 
955
Index: gcc/testsuite/gfortran.dg/namelist_77.f90
 
956
===================================================================
 
957
--- a/src/gcc/testsuite/gfortran.dg/namelist_77.f90     (.../tags/gcc_4_7_3_release)
 
958
+++ b/src/gcc/testsuite/gfortran.dg/namelist_77.f90     (.../branches/gcc-4_7-branch)
 
959
@@ -0,0 +1,49 @@
 
960
+! { dg-do run }
 
961
+!
 
962
+! PR libfortran/51825 - Fortran runtime error: Cannot match namelist object name
 
963
+! Test case derived from PR.
 
964
+
 
965
+module local_mod
 
966
+
 
967
+    type mytype1
 
968
+        integer :: int1
 
969
+    end type
 
970
+
 
971
+    type mytype2
 
972
+        integer :: n_x       
 
973
+        integer :: n_px        
 
974
+    end type
 
975
+
 
976
+    type beam_init_struct
 
977
+        character(16) :: chars(1) = ''                                  
 
978
+        type (mytype1) dummy
 
979
+        type (mytype2) grid(1)      
 
980
+    end type
 
981
+
 
982
+end module
 
983
+
 
984
+program error_namelist
 
985
+
 
986
+    use local_mod
 
987
+
 
988
+    implicit none
 
989
+
 
990
+    type (beam_init_struct) beam_init
 
991
+
 
992
+    namelist / error_params / beam_init
 
993
+
 
994
+    open (10, status='scratch')
 
995
+    write (10, '(a)') "&error_params"
 
996
+    write (10, '(a)') "  beam_init%chars(1)='JUNK'"
 
997
+    write (10, '(a)') "  beam_init%grid(1)%n_x=3"
 
998
+    write (10, '(a)') "  beam_init%grid(1)%n_px=2"
 
999
+    write (10, '(a)') "/"
 
1000
+    rewind(10)
 
1001
+    read(10, nml=error_params)
 
1002
+    close (10)
 
1003
+
 
1004
+    if (beam_init%chars(1) /= 'JUNK') call abort
 
1005
+    if (beam_init%grid(1)%n_x /= 3) call abort
 
1006
+    if (beam_init%grid(1)%n_px /= 2) call abort
 
1007
+
 
1008
+end program
 
1009
Index: gcc/testsuite/gfortran.dg/namelist_79.f90
 
1010
===================================================================
 
1011
--- a/src/gcc/testsuite/gfortran.dg/namelist_79.f90     (.../tags/gcc_4_7_3_release)
 
1012
+++ b/src/gcc/testsuite/gfortran.dg/namelist_79.f90     (.../branches/gcc-4_7-branch)
 
1013
@@ -0,0 +1,43 @@
 
1014
+! { dg-do run }
 
1015
+! PR libfortran/52512 - Cannot match namelist object name
 
1016
+! Test case derived from PR.
 
1017
+
 
1018
+program testje
 
1019
+
 
1020
+    implicit none
 
1021
+
 
1022
+    integer :: getal, jn
 
1023
+    type ptracer
 
1024
+        character(len = 8)  :: sname  !: short name
 
1025
+        logical             :: lini   !: read in a file or not
 
1026
+    end type ptracer
 
1027
+    type(ptracer) , dimension(3) :: tracer
 
1028
+    namelist/namtoptrc/  getal,tracer
 
1029
+
 
1030
+    ! standard values
 
1031
+    getal = 9999
 
1032
+    do jn = 1, 3
 
1033
+        tracer(jn)%sname = 'default_name'
 
1034
+        tracer(jn)%lini = .false.
 
1035
+    end do
 
1036
+
 
1037
+    open (10, status='scratch')
 
1038
+    write (10, '(a)') "&namtoptrc"
 
1039
+    write (10, '(a)') "   getal = 7"
 
1040
+    write (10, '(a)') "   tracer(1) = 'DIC     ', .true."
 
1041
+    write (10, '(a)') "   tracer(2) = 'Alkalini', .true."
 
1042
+    write (10, '(a)') "   tracer(3) = 'O2      ', .true."
 
1043
+    write (10, '(a)') "/"
 
1044
+    rewind(10)
 
1045
+    read(10, nml=namtoptrc)
 
1046
+    close (10)
 
1047
+
 
1048
+    if (getal /= 7) call abort
 
1049
+    if (tracer(1)%sname /= 'DIC     ') call abort
 
1050
+    if (tracer(2)%sname /= 'Alkalini') call abort
 
1051
+    if (tracer(3)%sname /= 'O2      ') call abort
 
1052
+    if (.not. tracer(1)%lini) call abort
 
1053
+    if (.not. tracer(2)%lini) call abort
 
1054
+    if (.not. tracer(3)%lini) call abort
 
1055
+
 
1056
+end program testje
 
1057
Index: gcc/testsuite/gfortran.dg/size_kind_2.f90
 
1058
===================================================================
 
1059
--- a/src/gcc/testsuite/gfortran.dg/size_kind_2.f90     (.../tags/gcc_4_7_3_release)
 
1060
+++ b/src/gcc/testsuite/gfortran.dg/size_kind_2.f90     (.../branches/gcc-4_7-branch)
 
1061
@@ -0,0 +1,17 @@
 
1062
+! { dg-do compile }
 
1063
+! { dg-options "-fdump-tree-original" }
 
1064
+!
 
1065
+! PR fortran/57142
 
1066
+!
 
1067
+integer :: B(huge(1)+3_8,2_8)
 
1068
+integer(8) :: var1(2), var2, var3
 
1069
+
 
1070
+var1 = shape(B,kind=8)
 
1071
+var2 = size(B,kind=8)
 
1072
+var3 = size(B,dim=1,kind=8)
 
1073
+end
 
1074
+
 
1075
+! { dg-final { scan-tree-dump "static integer.kind=8. A..\\\[2\\\] = \\\{2147483650, 2\\\};" "original" } }
 
1076
+! { dg-final { scan-tree-dump "var2 = 4294967300;" "original" } }
 
1077
+! { dg-final { scan-tree-dump "var3 = 2147483650;" "original" } }
 
1078
+! { dg-final { cleanup-tree-dump "original" } }
 
1079
Index: gcc/testsuite/gfortran.dg/do_5.f90
 
1080
===================================================================
 
1081
--- a/src/gcc/testsuite/gfortran.dg/do_5.f90    (.../tags/gcc_4_7_3_release)
 
1082
+++ b/src/gcc/testsuite/gfortran.dg/do_5.f90    (.../branches/gcc-4_7-branch)
 
1083
@@ -0,0 +1,29 @@
 
1084
+! { dg-do compile }
 
1085
+!
 
1086
+! PR fortran/54370
 
1087
+!
 
1088
+! The following program was ICEing at tree-check time
 
1089
+! "L()" was regarded as default-kind logical.
 
1090
+!
 
1091
+! Contributed by Kirill Chilikin
 
1092
+!
 
1093
+      MODULE M
 
1094
+      CONTAINS
 
1095
+
 
1096
+      LOGICAL(C_BOOL) FUNCTION L() BIND(C)
 
1097
+      USE, INTRINSIC :: ISO_C_BINDING
 
1098
+      L = .FALSE.
 
1099
+      END FUNCTION
 
1100
+
 
1101
+      LOGICAL(8) FUNCTION L2() BIND(C) ! { dg-warning "may not be a C interoperable kind but it is bind" }
 
1102
+      L2 = .FALSE._8
 
1103
+      END FUNCTION
 
1104
+
 
1105
+      SUBROUTINE S()
 
1106
+      DO WHILE (L())
 
1107
+      ENDDO
 
1108
+      DO WHILE (L2())
 
1109
+      ENDDO
 
1110
+      END
 
1111
+
 
1112
+      END
 
1113
Index: gcc/testsuite/gfortran.dg/proc_ptr_41.f90
 
1114
===================================================================
 
1115
--- a/src/gcc/testsuite/gfortran.dg/proc_ptr_41.f90     (.../tags/gcc_4_7_3_release)
 
1116
+++ b/src/gcc/testsuite/gfortran.dg/proc_ptr_41.f90     (.../branches/gcc-4_7-branch)
 
1117
@@ -0,0 +1,37 @@
 
1118
+! { dg-do compile }
 
1119
+!
 
1120
+! PR 56968: [4.7/4.8/4.9 Regression] [F03] Issue with a procedure defined with a generic name returning procedure pointer
 
1121
+!
 
1122
+! Contributed by Samuel Debionne <samuel.debionne@ujf-grenoble.fr>
 
1123
+
 
1124
+module test
 
1125
+
 
1126
+  interface generic_name_get_proc_ptr
 
1127
+    module procedure specific_name_get_proc_ptr
 
1128
+  end interface
 
1129
+
 
1130
+  abstract interface
 
1131
+    double precision function foo(arg1)
 
1132
+      real, intent(in) :: arg1
 
1133
+    end function
 
1134
+  end interface
 
1135
+
 
1136
+contains
 
1137
+
 
1138
+  function specific_name_get_proc_ptr() result(res)
 
1139
+    procedure(foo), pointer :: res
 
1140
+  end function
 
1141
+
 
1142
+end module test
 
1143
+
 
1144
+program crash_test
 
1145
+    use :: test
 
1146
+
 
1147
+    procedure(foo), pointer :: ptr
 
1148
+
 
1149
+    ptr => specific_name_get_proc_ptr()
 
1150
+    ptr => generic_name_get_proc_ptr()
 
1151
+
 
1152
+end program
 
1153
+
 
1154
+! { dg-final { cleanup-modules "test" } }
 
1155
Index: gcc/testsuite/gfortran.dg/namelist_81.f90
 
1156
===================================================================
 
1157
--- a/src/gcc/testsuite/gfortran.dg/namelist_81.f90     (.../tags/gcc_4_7_3_release)
 
1158
+++ b/src/gcc/testsuite/gfortran.dg/namelist_81.f90     (.../branches/gcc-4_7-branch)
 
1159
@@ -0,0 +1,43 @@
 
1160
+! { dg-do run }
 
1161
+! PR56786 Error on embedded spaces
 
1162
+integer :: i(3)
 
1163
+namelist /nml/ i
 
1164
+
 
1165
+i = -42
 
1166
+open(99,status='scratch')
 
1167
+write(99,'(a)') '&nml i(3 ) = 5 /'
 
1168
+rewind(99)
 
1169
+read(99,nml=nml)
 
1170
+close(99)
 
1171
+if (i(1)/=-42 .or. i(2)/=-42 .or. i(3)/=5) call abort()
 
1172
+
 
1173
+! Shorten the file so the read hits EOF
 
1174
+
 
1175
+open(99,status='scratch')
 
1176
+write(99,'(a)') '&nml i(3 ) = 5 '
 
1177
+rewind(99)
 
1178
+read(99,nml=nml, end=30)
 
1179
+call abort()
 
1180
+! Shorten some more
 
1181
+ 30 close(99)
 
1182
+open(99,status='scratch')
 
1183
+write(99,'(a)') '&nml i(3 ) ='
 
1184
+rewind(99)
 
1185
+read(99,nml=nml, end=40)
 
1186
+call abort()
 
1187
+! Shorten some more
 
1188
+ 40 close(99)
 
1189
+open(99,status='scratch')
 
1190
+write(99,'(a)') '&nml i(3 )'
 
1191
+rewind(99)
 
1192
+read(99,nml=nml, end=50)
 
1193
+call abort()
 
1194
+! Shorten some more
 
1195
+ 50 close(99)
 
1196
+open(99,status='scratch')
 
1197
+write(99,'(a)') '&nml i(3 '
 
1198
+rewind(99)
 
1199
+read(99,nml=nml, end=60)
 
1200
+call abort()
 
1201
+ 60 close(99)
 
1202
+end
 
1203
Index: gcc/testsuite/gfortran.dg/typebound_override_4.f90
 
1204
===================================================================
 
1205
--- a/src/gcc/testsuite/gfortran.dg/typebound_override_4.f90    (.../tags/gcc_4_7_3_release)
 
1206
+++ b/src/gcc/testsuite/gfortran.dg/typebound_override_4.f90    (.../branches/gcc-4_7-branch)
 
1207
@@ -0,0 +1,34 @@
 
1208
+! { dg-do compile }
 
1209
+!
 
1210
+! PR 57217: [4.7/4.8/4.9 Regression][OOP] Accepts invalid TBP overriding - lacking arguments check
 
1211
+!
 
1212
+! Contributed by Salvatore Filippone <filippone.salvatore@gmail.com>
 
1213
+
 
1214
+module base_mod
 
1215
+  implicit none
 
1216
+  type base_type
 
1217
+  contains
 
1218
+    procedure, pass(map)  :: clone    => base_clone
 
1219
+  end type
 
1220
+contains
 
1221
+  subroutine  base_clone(map,mapout)
 
1222
+    class(base_type) :: map
 
1223
+    class(base_type) :: mapout
 
1224
+  end subroutine
 
1225
+end module
 
1226
+
 
1227
+module r_mod
 
1228
+  use base_mod
 
1229
+  implicit none
 
1230
+  type, extends(base_type) :: r_type
 
1231
+  contains
 
1232
+    procedure, pass(map)  :: clone    => r_clone   ! { dg-error "Type/rank mismatch in argument" }
 
1233
+  end type
 
1234
+contains
 
1235
+  subroutine  r_clone(map,mapout)
 
1236
+    class(r_type) :: map
 
1237
+    class(r_type) :: mapout
 
1238
+  end subroutine
 
1239
+end module
 
1240
+
 
1241
+! { dg-final { cleanup-modules "base_mod r_mod" } }
 
1242
Index: gcc/testsuite/gfortran.dg/namelist_78.f90
 
1243
===================================================================
 
1244
--- a/src/gcc/testsuite/gfortran.dg/namelist_78.f90     (.../tags/gcc_4_7_3_release)
 
1245
+++ b/src/gcc/testsuite/gfortran.dg/namelist_78.f90     (.../branches/gcc-4_7-branch)
 
1246
@@ -0,0 +1,34 @@
 
1247
+! { dg-do run }
 
1248
+!
 
1249
+! PR libfortran/51825
 
1250
+! Test case regarding namelist problems with derived types
 
1251
+
 
1252
+program namelist
 
1253
+
 
1254
+    type d1
 
1255
+        integer :: j = 0
 
1256
+    end type d1
 
1257
+
 
1258
+    type d2
 
1259
+        type(d1) k
 
1260
+    end type d2
 
1261
+
 
1262
+    type d3
 
1263
+        type(d2) d(2)
 
1264
+    end type d3
 
1265
+
 
1266
+    type(d3) der
 
1267
+    namelist /nmlst/ der
 
1268
+
 
1269
+    open (10, status='scratch')
 
1270
+    write (10, '(a)') "&NMLST"
 
1271
+    write (10, '(a)') " DER%D(1)%K%J = 1,"
 
1272
+    write (10, '(a)') " DER%D(2)%K%J = 2,"
 
1273
+    write (10, '(a)') "/"
 
1274
+    rewind(10)
 
1275
+    read(10, nml=nmlst)
 
1276
+    close (10)
 
1277
+
 
1278
+    if (der%d(1)%k%j /= 1) call abort
 
1279
+    if (der%d(2)%k%j /= 2) call abort
 
1280
+end program namelist
 
1281
Index: gcc/testsuite/gcc.c-torture/execute/pr57568.c
 
1282
===================================================================
 
1283
--- a/src/gcc/testsuite/gcc.c-torture/execute/pr57568.c (.../tags/gcc_4_7_3_release)
 
1284
+++ b/src/gcc/testsuite/gcc.c-torture/execute/pr57568.c (.../branches/gcc-4_7-branch)
 
1285
@@ -0,0 +1,12 @@
 
1286
+/* PR target/57568 */
 
1287
+
 
1288
+extern void abort (void);
 
1289
+int a[6][9] = { }, b = 1, *c = &a[3][5];
 
1290
+
 
1291
+int
 
1292
+main ()
 
1293
+{
 
1294
+  if (b && (*c = *c + *c))
 
1295
+    abort ();
 
1296
+  return 0;
 
1297
+}
 
1298
Index: gcc/testsuite/gcc.c-torture/execute/pr56866.c
 
1299
===================================================================
 
1300
--- a/src/gcc/testsuite/gcc.c-torture/execute/pr56866.c (.../tags/gcc_4_7_3_release)
 
1301
+++ b/src/gcc/testsuite/gcc.c-torture/execute/pr56866.c (.../branches/gcc-4_7-branch)
 
1302
@@ -0,0 +1,45 @@
 
1303
+/* PR target/56866 */
 
1304
+
 
1305
+int
 
1306
+main ()
 
1307
+{
 
1308
+#if __CHAR_BIT__ == 8 && __SIZEOF_LONG_LONG__ == 8 && __SIZEOF_INT__ == 4 && __SIZEOF_SHORT__ == 2
 
1309
+  unsigned long long wq[256], rq[256];
 
1310
+  unsigned int wi[256], ri[256];
 
1311
+  unsigned short ws[256], rs[256];
 
1312
+  unsigned char wc[256], rc[256];
 
1313
+  int t;
 
1314
+
 
1315
+  __builtin_memset (wq, 0, sizeof wq);
 
1316
+  __builtin_memset (wi, 0, sizeof wi);
 
1317
+  __builtin_memset (ws, 0, sizeof ws);
 
1318
+  __builtin_memset (wc, 0, sizeof wc);
 
1319
+  wq[0] = 0x0123456789abcdefULL;
 
1320
+  wi[0] = 0x01234567;
 
1321
+  ws[0] = 0x4567;
 
1322
+  wc[0] = 0x73;
 
1323
+
 
1324
+  asm volatile ("" : : "g" (wq), "g" (wi), "g" (ws), "g" (wc) : "memory");
 
1325
+
 
1326
+  for (t = 0; t < 256; ++t)
 
1327
+    rq[t] = (wq[t] >> 8) | (wq[t] << (sizeof (wq[0]) * __CHAR_BIT__ - 8));
 
1328
+  for (t = 0; t < 256; ++t)
 
1329
+    ri[t] = (wi[t] >> 8) | (wi[t] << (sizeof (wi[0]) * __CHAR_BIT__ - 8));
 
1330
+  for (t = 0; t < 256; ++t)
 
1331
+    rs[t] = (ws[t] >> 9) | (ws[t] << (sizeof (ws[0]) * __CHAR_BIT__ - 9));
 
1332
+  for (t = 0; t < 256; ++t)
 
1333
+    rc[t] = (wc[t] >> 5) | (wc[t] << (sizeof (wc[0]) * __CHAR_BIT__ - 5));
 
1334
+
 
1335
+  asm volatile ("" : : "g" (rq), "g" (ri), "g" (rs), "g" (rc) : "memory");
 
1336
+
 
1337
+  if (rq[0] != 0xef0123456789abcdULL || rq[1])
 
1338
+    __builtin_abort ();
 
1339
+  if (ri[0] != 0x67012345 || ri[1])
 
1340
+    __builtin_abort ();
 
1341
+  if (rs[0] != 0xb3a2 || rs[1])
 
1342
+    __builtin_abort ();
 
1343
+  if (rc[0] != 0x9b || rc[1])
 
1344
+    __builtin_abort ();
 
1345
+#endif
 
1346
+  return 0;
 
1347
+}
 
1348
Index: gcc/testsuite/gnat.dg/specs/last_bit.ads
 
1349
===================================================================
 
1350
--- a/src/gcc/testsuite/gnat.dg/specs/last_bit.ads      (.../tags/gcc_4_7_3_release)
 
1351
+++ b/src/gcc/testsuite/gnat.dg/specs/last_bit.ads      (.../branches/gcc-4_7-branch)
 
1352
@@ -0,0 +1,19 @@
 
1353
+-- { dg-do compile }
 
1354
+
 
1355
+package Last_Bit is
 
1356
+
 
1357
+   Max_Components : constant := 100;
 
1358
+   type Count_Type is new Natural range 0 .. Max_Components;
 
1359
+   subtype Index_Type is Count_Type range 1 .. Count_Type'Last;
 
1360
+   
 
1361
+   type List_Type is array (Index_Type range <>) of Integer;
 
1362
+
 
1363
+   type Record_Type (Count : Count_Type := 0) is record
 
1364
+      List : List_Type (1 .. Count);
 
1365
+   end record;
 
1366
+
 
1367
+   Null_Record : Record_Type (Count => 0);
 
1368
+
 
1369
+   List_Last_Bit : Integer := Null_Record.List'Last_Bit;
 
1370
+
 
1371
+end Last_Bit;
311
1372
Index: gcc/testsuite/gcc.dg/pr56890-2.c
312
1373
===================================================================
313
1374
--- a/src/gcc/testsuite/gcc.dg/pr56890-2.c      (.../tags/gcc_4_7_3_release)
350
1411
+  for (i = 0; y[i].s[i]; i++)
351
1412
+    *x++ = y[i].s[i];
352
1413
+}
 
1414
Index: gcc/testsuite/gcc.dg/torture/builtin-logb-1.c
 
1415
===================================================================
 
1416
--- a/src/gcc/testsuite/gcc.dg/torture/builtin-logb-1.c (.../tags/gcc_4_7_3_release)
 
1417
+++ b/src/gcc/testsuite/gcc.dg/torture/builtin-logb-1.c (.../branches/gcc-4_7-branch)
 
1418
@@ -48,25 +48,25 @@
 
1419
 /* Test if FUNCRES(FUNC(NEG FUNCARG(ARGARG))) is false.  Check the
 
1420
    sign as well.  */
 
1421
 #ifndef __SPU__
 
1422
-#define TESTIT3(FUNC,NEG,FUNCARG,ARGARG,FUNCRES) do { \
 
1423
+#define TESTIT3(FUNC,NEG,FUNCARG,ARGARG,FUNCRES,NEG2) do { \
 
1424
   if (!__builtin_##FUNCRES##f(__builtin_##FUNC(NEG __builtin_##FUNCARG##f(ARGARG))) \
 
1425
-      || CKSGN_F(__builtin_##FUNC##f(NEG __builtin_##FUNCARG##f(ARGARG)), NEG __builtin_##FUNCARG##f(ARGARG))) \
 
1426
+      || CKSGN_F(__builtin_##FUNC##f(NEG __builtin_##FUNCARG##f(ARGARG)), NEG2 __builtin_##FUNCARG##f(ARGARG))) \
 
1427
     link_error(__LINE__); \
 
1428
   if (!__builtin_##FUNCRES(__builtin_##FUNC(NEG __builtin_##FUNCARG(ARGARG))) \
 
1429
-      || CKSGN(__builtin_##FUNC(NEG __builtin_##FUNCARG(ARGARG)), NEG __builtin_##FUNCARG(ARGARG))) \
 
1430
+      || CKSGN(__builtin_##FUNC(NEG __builtin_##FUNCARG(ARGARG)), NEG2 __builtin_##FUNCARG(ARGARG))) \
 
1431
     link_error(__LINE__); \
 
1432
   if (!__builtin_##FUNCRES##l(__builtin_##FUNC##l(NEG __builtin_##FUNCARG##l(ARGARG))) \
 
1433
-      || CKSGN_L(__builtin_##FUNC##l(NEG __builtin_##FUNCARG##l(ARGARG)), NEG __builtin_##FUNCARG##l(ARGARG))) \
 
1434
+      || CKSGN_L(__builtin_##FUNC##l(NEG __builtin_##FUNCARG##l(ARGARG)), NEG2 __builtin_##FUNCARG##l(ARGARG))) \
 
1435
     link_error(__LINE__); \
 
1436
   } while (0)
 
1437
 #else
 
1438
-#define TESTIT3(FUNC,NEG,FUNCARG,ARGARG,FUNCRES) do { \
 
1439
+#define TESTIT3(FUNC,NEG,FUNCARG,ARGARG,FUNCRES,NEG2) do { \
 
1440
   /* SPU single-precision floating point format does not support Inf or Nan.  */ \
 
1441
   if (!__builtin_##FUNCRES(__builtin_##FUNC(NEG __builtin_##FUNCARG(ARGARG))) \
 
1442
-      || CKSGN(__builtin_##FUNC(NEG __builtin_##FUNCARG(ARGARG)), NEG __builtin_##FUNCARG(ARGARG))) \
 
1443
+      || CKSGN(__builtin_##FUNC(NEG __builtin_##FUNCARG(ARGARG)), NEG2 __builtin_##FUNCARG(ARGARG))) \
 
1444
     link_error(__LINE__); \
 
1445
   if (!__builtin_##FUNCRES##l(__builtin_##FUNC##l(NEG __builtin_##FUNCARG##l(ARGARG))) \
 
1446
-      || CKSGN_L(__builtin_##FUNC##l(NEG __builtin_##FUNCARG##l(ARGARG)), NEG __builtin_##FUNCARG##l(ARGARG))) \
 
1447
+      || CKSGN_L(__builtin_##FUNC##l(NEG __builtin_##FUNCARG##l(ARGARG)), NEG2 __builtin_##FUNCARG##l(ARGARG))) \
 
1448
     link_error(__LINE__); \
 
1449
   } while (0)
 
1450
 #endif
 
1451
@@ -173,15 +173,15 @@
 
1452
 
 
1453
   /* Test for f(+-Inf) -> +-Inf and f(+-NaN) -> +-NaN, regardless of
 
1454
      the radix.  */
 
1455
-  TESTIT3 (logb, ,inf, , isinf);
 
1456
-  TESTIT3 (logb, - ,inf, , isinf);
 
1457
-  TESTIT3 (logb,  ,nan, "", isnan);
 
1458
-  TESTIT3 (logb, - ,nan, "", isnan);
 
1459
+  TESTIT3 (logb, ,inf, , isinf, );
 
1460
+  TESTIT3 (logb, - ,inf, , isinf, );
 
1461
+  TESTIT3 (logb,  ,nan, "", isnan, );
 
1462
+  TESTIT3 (logb, - ,nan, "", isnan, -);
 
1463
 
 
1464
-  TESTIT3 (significand, ,inf, , isinf);
 
1465
-  TESTIT3 (significand, - ,inf, , isinf);
 
1466
-  TESTIT3 (significand,  ,nan, "", isnan);
 
1467
-  TESTIT3 (significand, - ,nan, "", isnan);
 
1468
+  TESTIT3 (significand, ,inf, , isinf, );
 
1469
+  TESTIT3 (significand, - ,inf, , isinf, -);
 
1470
+  TESTIT3 (significand,  ,nan, "", isnan, );
 
1471
+  TESTIT3 (significand, - ,nan, "", isnan, -);
 
1472
 }
 
1473
 
 
1474
 int main()
353
1475
Index: gcc/testsuite/gcc.dg/torture/pr53922.c
354
1476
===================================================================
355
1477
--- a/src/gcc/testsuite/gcc.dg/torture/pr53922.c        (.../tags/gcc_4_7_3_release)
387
1509
===================================================================
388
1510
--- a/src/gcc/testsuite/ChangeLog       (.../tags/gcc_4_7_3_release)
389
1511
+++ b/src/gcc/testsuite/ChangeLog       (.../branches/gcc-4_7-branch)
390
 
@@ -1,3 +1,22 @@
 
1512
@@ -1,3 +1,133 @@
 
1513
+2013-06-09  Jakub Jelinek  <jakub@redhat.com>
 
1514
+
 
1515
+       PR target/57568
 
1516
+       * gcc.c-torture/execute/pr57568.c: New test.
 
1517
+
 
1518
+2013-06-06  Tobias Burnus  <burnus@net-b.de>
 
1519
+
 
1520
+       Backport from mainline
 
1521
+       2012-08-27  Tobias Burnus  <burnus@net-b.de>
 
1522
+
 
1523
+       PR fortran/54370
 
1524
+       * gfortran.dg/do_5.f90: New.
 
1525
+
 
1526
+2013-06-01  Janus Weil  <janus@gcc.gnu.org>
 
1527
+           Tobias Burnus  <burnus@net-b.de>
 
1528
+
 
1529
+       PR fortran/57217
 
1530
+       * gfortran.dg/typebound_override_4.f90: New.
 
1531
+
 
1532
+2013-05-26  Eric Botcazou  <ebotcazou@adacore.com>
 
1533
+
 
1534
+       * gnat.dg/specs/last_bit.ads: New test.
 
1535
+
 
1536
+2013-05-13  Uros Bizjak  <ubizjak@gmail.com>
 
1537
+
 
1538
+       PR target/57264
 
1539
+       * gcc.target/i386/pr57264.c: New test.
 
1540
+
 
1541
+2013-05-07  Michael Meissner  <meissner@linux.vnet.ibm.com>
 
1542
+
 
1543
+       Backport from trunk
 
1544
+       2013-05-03  Michael Meissner  <meissner@linux.vnet.ibm.com>
 
1545
+
 
1546
+       PR target/57150
 
1547
+       * gcc.target/powerpc/pr57150.c: New file.
 
1548
+
 
1549
+2013-05-07  Tobias Burnus  <burnus@net-b.de>
 
1550
+
 
1551
+       Backport from mainline
 
1552
+       2013-05-02  Tobias Burnus  <burnus@net-b.de>
 
1553
+
 
1554
+       PR fortran/57142
 
1555
+       * gfortran.dg/size_kind_2.f90: New.
 
1556
+       * gfortran.dg/size_kind_3.f90: New.
 
1557
+
 
1558
+2013-05-03  Marek Polacek  <polacek@redhat.com>
 
1559
+
 
1560
+       Backport from mainline
 
1561
+       2013-04-25  Marek Polacek  <polacek@redhat.com>
 
1562
+
 
1563
+       PR tree-optimization/57066
 
1564
+       * gcc.dg/torture/builtin-logb-1.c: Adjust testcase.
 
1565
+
 
1566
+2013-04-30  Uros Bizjak  <ubizjak@gmail.com>
 
1567
+
 
1568
+       Backport from mainline
 
1569
+       2013-04-29  Uros Bizjak  <ubizjak@gmail.com>
 
1570
+
 
1571
+       PR target/44578
 
1572
+       * gcc.target/i386/pr44578.c: New test.
 
1573
+
 
1574
+       Backport from mainline
 
1575
+       2013-04-29  Uros Bizjak  <ubizjak@gmail.com>
 
1576
+
 
1577
+       PR target/57098
 
1578
+       * gcc.target/i386/pr57098.c: New test.
 
1579
+
 
1580
+2013-04-29  Christian Bruel  <christian.bruel@st.com>
 
1581
+
 
1582
+       PR target/57108
 
1583
+       * gcc.target/sh/pr57108.c: New test.
 
1584
+
 
1585
+2013-04-28  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
 
1586
+
 
1587
+       Backport from trunk:
 
1588
+
 
1589
+       PR fortran/51825
 
1590
+       * gfortran.dg/namelist_77.f90: New test.
 
1591
+       * gfortran.dg/namelist_78.f90: New test.
 
1592
+
 
1593
+2013-04-28  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
 
1594
+
 
1595
+       Backport from trunk:
 
1596
+
 
1597
+       PR fortran/56786
 
1598
+       * gfortran.dg/namelist_81.f90:  New test.
 
1599
+
 
1600
+2013-04-28  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
 
1601
+
 
1602
+       Backport from trunk:
 
1603
+
 
1604
+       PR fortran/52512
 
1605
+       * gfortran.dg/namelist_79.f90: New test.
 
1606
+
 
1607
+2013-04-27  Jakub Jelinek  <jakub@redhat.com>
 
1608
+
 
1609
+       PR target/56866
 
1610
+       * gcc.c-torture/execute/pr56866.c: New test.
 
1611
+       * gcc.target/i386/pr56866.c: New test.
 
1612
+
 
1613
+2013-04-26  Janus Weil  <janus@gcc.gnu.org>
 
1614
+
 
1615
+       Backports from trunk:
 
1616
+
 
1617
+       PR fortran/56968
 
1618
+       * gfortran.dg/proc_ptr_41.f90: New.
 
1619
+
 
1620
+       PR fortran/53685
 
1621
+       PR fortran/57022
 
1622
+       * gfortran.dg/transfer_check_4.f90: New.
 
1623
+
391
1624
+2013-04-19  Marek Polacek  <polacek@redhat.com>
392
1625
+
393
1626
+       Backport from mainline
429
1662
+        }
430
1663
+    }();
431
1664
+}
 
1665
Index: gcc/testsuite/g++.dg/cpp0x/constexpr-array-ptr8.C
 
1666
===================================================================
 
1667
--- a/src/gcc/testsuite/g++.dg/cpp0x/constexpr-array-ptr8.C     (.../tags/gcc_4_7_3_release)
 
1668
+++ b/src/gcc/testsuite/g++.dg/cpp0x/constexpr-array-ptr8.C     (.../branches/gcc-4_7-branch)
 
1669
@@ -0,0 +1,54 @@
 
1670
+// PR c++/57047
 
1671
+// { dg-require-effective-target c++11 }
 
1672
+
 
1673
+template <typename>
 
1674
+struct A;
 
1675
+template <typename T>
 
1676
+struct A <T &>
 
1677
+{
 
1678
+  typedef T type;
 
1679
+};
 
1680
+template <typename T>
 
1681
+constexpr T && foo (typename A <T>::type & __t) noexcept
 
1682
+{
 
1683
+  return static_cast <T &&>(__t);
 
1684
+}
 
1685
+template <class T1, class T2>
 
1686
+struct B
 
1687
+{
 
1688
+  T1 t1;
 
1689
+  T2 t2;
 
1690
+  template <class U>
 
1691
+  constexpr B (U && __x, const T2 & __y) : t1 (foo <U> (__x)), t2 (__y) {}
 
1692
+};
 
1693
+static inline constexpr bool
 
1694
+fn1 (const char c)
 
1695
+{
 
1696
+  return ('0' <= c) && (c <= '9');
 
1697
+}
 
1698
+static inline constexpr bool
 
1699
+fn2 (const char c)
 
1700
+{
 
1701
+  return (('A' <= c) && (c <= 'Z')) || (('a' <= c) && (c <= 'z'));
 
1702
+}
 
1703
+static constexpr bool
 
1704
+fn3 (const char *const x)
 
1705
+{
 
1706
+  return (x[1] == '\0' && x[0] == ']') ? true : (!fn1 (x[0])) ? false : fn3 (&x[1]);
 
1707
+}
 
1708
+static constexpr bool
 
1709
+fn4 (const char *const x)
 
1710
+{
 
1711
+  return (x[0] == '\0') ? fn3 (&x[1]) : fn4 (&x[1]);
 
1712
+}
 
1713
+static inline constexpr bool
 
1714
+fn5 (const char *const x)
 
1715
+{
 
1716
+  return fn2 (x[0]) ? fn4 (x) : false;
 
1717
+}
 
1718
+struct C final
 
1719
+{
 
1720
+  constexpr C (const char *const t1) : c (fn5 (t1) ? 199 : 69) {}
 
1721
+  unsigned c;
 
1722
+};
 
1723
+B <C, C> p ("a", "b");
 
1724
Index: gcc/testsuite/g++.dg/template/array26.C
 
1725
===================================================================
 
1726
--- a/src/gcc/testsuite/g++.dg/template/array26.C       (.../tags/gcc_4_7_3_release)
 
1727
+++ b/src/gcc/testsuite/g++.dg/template/array26.C       (.../branches/gcc-4_7-branch)
 
1728
@@ -0,0 +1,40 @@
 
1729
+// PR c++/57325
 
1730
+
 
1731
+class valarray { int _M_data; };
 
1732
+template < typename > struct SimpleJet { valarray partials; };
 
1733
+
 
1734
+template < class C > struct scoped_ptr_impl
 
1735
+{
 
1736
+    scoped_ptr_impl (C *):data_ () { }
 
1737
+    struct Data
 
1738
+    {
 
1739
+        C ptr;
 
1740
+    };
 
1741
+    Data data_;
 
1742
+};
 
1743
+
 
1744
+template < class, class = int >struct scoped_ptr;
 
1745
+template < class C, class D > struct scoped_ptr <C[], D >
 
1746
+{
 
1747
+    scoped_ptr ():impl_ (0) { }
 
1748
+    scoped_ptr_impl < C > impl_;
 
1749
+};
 
1750
+
 
1751
+template < typename JetsT > void
 
1752
+TestJets (JetsT *)
 
1753
+{
 
1754
+    typedef typename JetsT::JetType JetT;
 
1755
+    scoped_ptr < JetT[] > a;
 
1756
+}
 
1757
+
 
1758
+template < typename T > struct SimpleJets
 
1759
+{
 
1760
+    typedef SimpleJet < T > JetType;
 
1761
+    scoped_ptr < SimpleJet < T >[] > vars_;
 
1762
+};
 
1763
+
 
1764
+void fn ()
 
1765
+{
 
1766
+    SimpleJets < double >b;
 
1767
+    TestJets (&b);
 
1768
+}
 
1769
Index: gcc/cp/tree.c
 
1770
===================================================================
 
1771
--- a/src/gcc/cp/tree.c (.../tags/gcc_4_7_3_release)
 
1772
+++ b/src/gcc/cp/tree.c (.../branches/gcc-4_7-branch)
 
1773
@@ -816,10 +816,12 @@
 
1774
 
 
1775
       if (TYPE_MAIN_VARIANT (t) != m)
 
1776
        {
 
1777
-         if (COMPLETE_TYPE_P (t) && !COMPLETE_TYPE_P (m))
 
1778
+         if (COMPLETE_TYPE_P (TREE_TYPE (t)) && !COMPLETE_TYPE_P (m))
 
1779
            {
 
1780
              /* m was built before the element type was complete, so we
 
1781
-                also need to copy the layout info from t.  */
 
1782
+                also need to copy the layout info from t.  We might
 
1783
+                end up doing this multiple times if t is an array of
 
1784
+                unknown bound.  */
 
1785
              tree size = TYPE_SIZE (t);
 
1786
              tree size_unit = TYPE_SIZE_UNIT (t);
 
1787
              unsigned int align = TYPE_ALIGN (t);
432
1788
Index: gcc/cp/ChangeLog
433
1789
===================================================================
434
1790
--- a/src/gcc/cp/ChangeLog      (.../tags/gcc_4_7_3_release)
435
1791
+++ b/src/gcc/cp/ChangeLog      (.../branches/gcc-4_7-branch)
436
 
@@ -1,3 +1,13 @@
 
1792
@@ -1,3 +1,24 @@
 
1793
+2013-05-20  Jason Merrill  <jason@redhat.com>
 
1794
+
 
1795
+       PR c++/57325
 
1796
+       * tree.c (build_cplus_array_type): Copy layout info if element
 
1797
+       type is complete.
 
1798
+
 
1799
+2013-05-09  Jason Merrill  <jason@redhat.com>
 
1800
+
 
1801
+       PR c++/57047
 
1802
+       * semantics.c (cxx_fold_indirect_ref): Fix thinko.
 
1803
+
437
1804
+2013-04-21  Eric Botcazou  <ebotcazou@adacore.com>
438
1805
+
439
1806
+       * parser.c (cp_parser_late_return_type_opt): Fix C++ism.
451
1818
===================================================================
452
1819
--- a/src/gcc/cp/semantics.c    (.../tags/gcc_4_7_3_release)
453
1820
+++ b/src/gcc/cp/semantics.c    (.../branches/gcc-4_7-branch)
454
 
@@ -8959,13 +8959,12 @@
 
1821
@@ -7412,15 +7412,17 @@
 
1822
            }
 
1823
        }
 
1824
     }
 
1825
-  /* *(foo *)fooarrptreturn> (*fooarrptr)[0] */
 
1826
+  /* *(foo *)fooarrptr => (*fooarrptr)[0] */
 
1827
   else if (TREE_CODE (TREE_TYPE (subtype)) == ARRAY_TYPE
 
1828
           && (same_type_ignoring_top_level_qualifiers_p
 
1829
               (type, TREE_TYPE (TREE_TYPE (subtype)))))
 
1830
     {
 
1831
       tree type_domain;
 
1832
       tree min_val = size_zero_node;
 
1833
-      sub = cxx_fold_indirect_ref (loc, TREE_TYPE (subtype), sub, NULL);
 
1834
-      if (!sub)
 
1835
+      tree newsub = cxx_fold_indirect_ref (loc, TREE_TYPE (subtype), sub, NULL);
 
1836
+      if (newsub)
 
1837
+       sub = newsub;
 
1838
+      else
 
1839
        sub = build1_loc (loc, INDIRECT_REF, TREE_TYPE (subtype), sub);
 
1840
       type_domain = TYPE_DOMAIN (TREE_TYPE (sub));
 
1841
       if (type_domain && TYPE_MIN_VALUE (type_domain))
 
1842
@@ -8959,13 +8961,12 @@
455
1843
 insert_capture_proxy (tree var)
456
1844
 {
457
1845
   cp_binding_level *b;
466
1854
     {
467
1855
       cp_binding_level *n = b->level_chain;
468
1856
       if (n->kind == sk_function_parms)
469
 
@@ -8976,8 +8975,7 @@
 
1857
@@ -8976,8 +8977,7 @@
470
1858
 
471
1859
   /* And put a DECL_EXPR in the STATEMENT_LIST for the same block.  */
472
1860
   var = build_stmt (DECL_SOURCE_LOCATION (var), DECL_EXPR, var);
539
1927
          probability = ((REG_BR_PROB_BASE + nitercst / 2) / nitercst);
540
1928
          predict_edge (ex, predictor, probability);
541
1929
        }
 
1930
Index: gcc/ada/ChangeLog
 
1931
===================================================================
 
1932
--- a/src/gcc/ada/ChangeLog     (.../tags/gcc_4_7_3_release)
 
1933
+++ b/src/gcc/ada/ChangeLog     (.../branches/gcc-4_7-branch)
 
1934
@@ -1,3 +1,8 @@
 
1935
+2013-05-26  Eric Botcazou  <ebotcazou@adacore.com>
 
1936
+
 
1937
+       * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Last_Bit>: Add kludge
 
1938
+       to avoid generating an overflow for -1.
 
1939
+
 
1940
 2013-04-11  Release Manager
 
1941
 
 
1942
        * GCC 4.7.3 released.
 
1943
Index: gcc/ada/gcc-interface/trans.c
 
1944
===================================================================
 
1945
--- a/src/gcc/ada/gcc-interface/trans.c (.../tags/gcc_4_7_3_release)
 
1946
+++ b/src/gcc/ada/gcc-interface/trans.c (.../branches/gcc-4_7-branch)
 
1947
@@ -1901,14 +1901,19 @@
 
1948
            gnu_result = bitsize_int (bitpos % BITS_PER_UNIT);
 
1949
            gnu_result = size_binop (PLUS_EXPR, gnu_result,
 
1950
                                     TYPE_SIZE (TREE_TYPE (gnu_prefix)));
 
1951
-           gnu_result = size_binop (MINUS_EXPR, gnu_result,
 
1952
-                                    bitsize_one_node);
 
1953
+           /* ??? Avoid a large unsigned result that will overflow when
 
1954
+              converted to the signed universal_integer.  */
 
1955
+           if (integer_zerop (gnu_result))
 
1956
+             gnu_result = integer_minus_one_node;
 
1957
+           else
 
1958
+             gnu_result
 
1959
+               = size_binop (MINUS_EXPR, gnu_result, bitsize_one_node);
 
1960
            break;
 
1961
 
 
1962
          case Attr_Bit_Position:
 
1963
            gnu_result = gnu_field_bitpos;
 
1964
            break;
 
1965
-               }
 
1966
+         }
 
1967
 
 
1968
        /* If this has a PLACEHOLDER_EXPR, qualify it by the object we are
 
1969
           handling.  */
 
1970
Index: gcc/fortran/interface.c
 
1971
===================================================================
 
1972
--- a/src/gcc/fortran/interface.c       (.../tags/gcc_4_7_3_release)
 
1973
+++ b/src/gcc/fortran/interface.c       (.../branches/gcc-4_7-branch)
 
1974
@@ -987,7 +987,8 @@
 
1975
                             bool type_must_agree, char *errmsg, int err_len)
 
1976
 {
 
1977
   /* Check type and rank.  */
 
1978
-  if (type_must_agree && !compare_type_rank (s2, s1))
 
1979
+  if (type_must_agree &&
 
1980
+      (!compare_type_rank (s1, s2) || !compare_type_rank (s2, s1)))
 
1981
     {
 
1982
       if (errmsg != NULL)
 
1983
        snprintf (errmsg, err_len, "Type/rank mismatch in argument '%s'",
542
1984
Index: gcc/fortran/ChangeLog
543
1985
===================================================================
544
1986
--- a/src/gcc/fortran/ChangeLog (.../tags/gcc_4_7_3_release)
545
1987
+++ b/src/gcc/fortran/ChangeLog (.../branches/gcc-4_7-branch)
546
 
@@ -1,3 +1,8 @@
 
1988
@@ -1,3 +1,58 @@
 
1989
+2013-06-06  Tobias Burnus  <burnus@net-b.de>
 
1990
+
 
1991
+       Backport from mainline
 
1992
+       2012-08-27  Tobias Burnus  <burnus@net-b.de>
 
1993
+
 
1994
+       PR fortran/54370
 
1995
+       * trans-stmt.c (gfc_trans_do_while): Don't change the logical
 
1996
+       kind for negation of the condition.
 
1997
+
 
1998
+2013-06-01  Janus Weil  <janus@gcc.gnu.org>
 
1999
+           Tobias Burnus  <burnus@net-b.de>
 
2000
+
 
2001
+       PR fortran/57217
 
2002
+       * interface.c (check_dummy_characteristics): Symmetrize type check.
 
2003
+
 
2004
+2013-05-22  Janne Blomqvist  <jb@gcc.gnu.org>
 
2005
+
 
2006
+       * intrinsic.texi (RANDOM_SEED): Improve example.
 
2007
+
 
2008
+2013-05-07  Tobias Burnus  <burnus@net-b.de>
 
2009
+
 
2010
+       Backport from mainline
 
2011
+       2013-05-02  Tobias Burnus  <burnus@net-b.de>
 
2012
+
 
2013
+       PR fortran/57142
 
2014
+       * simplify.c (gfc_simplify_size): Renamed from
 
2015
+       simplify_size; fix kind=8 handling.
 
2016
+       (gfc_simplify_size): New function.
 
2017
+       (gfc_simplify_shape): Add range check.
 
2018
+       * resolve.c (resolve_function): Fix handling
 
2019
+       for ISYM_SIZE.
 
2020
+
 
2021
+2013-04-26  Janus Weil  <janus@gcc.gnu.org>
 
2022
+
 
2023
+       Backports from trunk:
 
2024
+
 
2025
+       PR fortran/56968
 
2026
+       * expr.c (gfc_check_pointer_assign): Handle generic functions returning
 
2027
+       procedure pointers.
 
2028
+
 
2029
+       PR fortran/53685
 
2030
+       PR fortran/57022
 
2031
+       * check.c (gfc_calculate_transfer_sizes): Fix for array-valued SOURCE
 
2032
+       expressions.
 
2033
+       * target-memory.h (gfc_element_size): New prototype.
 
2034
+       * target-memory.c (size_array): Remove.
 
2035
+       (gfc_element_size): New function.
 
2036
+       (gfc_target_expr_size): Modified to always return the full size of the
 
2037
+       expression.
 
2038
+
547
2039
+2013-04-18  Tobias Burnus  <burnus@net-b.de>
548
2040
+
549
2041
+       PR fortran/56994
552
2044
 2013-04-11  Release Manager
553
2045
 
554
2046
        * GCC 4.7.3 released.
 
2047
Index: gcc/fortran/trans-stmt.c
 
2048
===================================================================
 
2049
--- a/src/gcc/fortran/trans-stmt.c      (.../tags/gcc_4_7_3_release)
 
2050
+++ b/src/gcc/fortran/trans-stmt.c      (.../branches/gcc-4_7-branch)
 
2051
@@ -1743,7 +1743,7 @@
 
2052
   gfc_conv_expr_val (&cond, code->expr1);
 
2053
   gfc_add_block_to_block (&block, &cond.pre);
 
2054
   cond.expr = fold_build1_loc (code->expr1->where.lb->location,
 
2055
-                              TRUTH_NOT_EXPR, boolean_type_node, cond.expr);
 
2056
+                              TRUTH_NOT_EXPR, TREE_TYPE (cond.expr), cond.expr);
 
2057
 
 
2058
   /* Build "IF (! cond) GOTO exit_label".  */
 
2059
   tmp = build1_v (GOTO_EXPR, exit_label);
 
2060
Index: gcc/fortran/expr.c
 
2061
===================================================================
 
2062
--- a/src/gcc/fortran/expr.c    (.../tags/gcc_4_7_3_release)
 
2063
+++ b/src/gcc/fortran/expr.c    (.../branches/gcc-4_7-branch)
 
2064
@@ -3493,8 +3493,12 @@
 
2065
        }
 
2066
       else if (rvalue->expr_type == EXPR_FUNCTION)
 
2067
        {
 
2068
-         s2 = rvalue->symtree->n.sym->result;
 
2069
-         name = rvalue->symtree->n.sym->result->name;
 
2070
+         if (rvalue->value.function.esym)
 
2071
+           s2 = rvalue->value.function.esym->result;
 
2072
+         else
 
2073
+           s2 = rvalue->symtree->n.sym->result;
 
2074
+
 
2075
+         name = s2->name;
 
2076
        }
 
2077
       else
 
2078
        {
 
2079
Index: gcc/fortran/resolve.c
 
2080
===================================================================
 
2081
--- a/src/gcc/fortran/resolve.c (.../tags/gcc_4_7_3_release)
 
2082
+++ b/src/gcc/fortran/resolve.c (.../branches/gcc-4_7-branch)
 
2083
@@ -3155,6 +3155,7 @@
 
2084
       for (arg = expr->value.function.actual; arg; arg = arg->next)
 
2085
        {
 
2086
          if ((GENERIC_ID == GFC_ISYM_UBOUND || GENERIC_ID == GFC_ISYM_SIZE)
 
2087
+             && arg == expr->value.function.actual
 
2088
              && arg->next != NULL && arg->next->expr)
 
2089
            {
 
2090
              if (arg->next->expr->expr_type != EXPR_CONSTANT)
 
2091
Index: gcc/fortran/target-memory.c
 
2092
===================================================================
 
2093
--- a/src/gcc/fortran/target-memory.c   (.../tags/gcc_4_7_3_release)
 
2094
+++ b/src/gcc/fortran/target-memory.c   (.../branches/gcc-4_7-branch)
 
2095
@@ -35,17 +35,7 @@
 
2096
 /* --------------------------------------------------------------- */ 
 
2097
 /* Calculate the size of an expression.  */
 
2098
 
 
2099
-static size_t
 
2100
-size_array (gfc_expr *e)
 
2101
-{
 
2102
-  mpz_t array_size;
 
2103
-  gfc_constructor *c = gfc_constructor_first (e->value.constructor);
 
2104
-  size_t elt_size = gfc_target_expr_size (c->expr);
 
2105
 
 
2106
-  gfc_array_size (e, &array_size);
 
2107
-  return (size_t)mpz_get_ui (array_size) * elt_size;
 
2108
-}
 
2109
-
 
2110
 static size_t
 
2111
 size_integer (int kind)
 
2112
 {
 
2113
@@ -82,16 +72,14 @@
 
2114
 }
 
2115
 
 
2116
 
 
2117
+/* Return the size of a single element of the given expression.
 
2118
+   Identical to gfc_target_expr_size for scalars.  */
 
2119
+
 
2120
 size_t
 
2121
-gfc_target_expr_size (gfc_expr *e)
 
2122
+gfc_element_size (gfc_expr *e)
 
2123
 {
 
2124
   tree type;
 
2125
 
 
2126
-  gcc_assert (e != NULL);
 
2127
-
 
2128
-  if (e->expr_type == EXPR_ARRAY)
 
2129
-    return size_array (e);
 
2130
-
 
2131
   switch (e->ts.type)
 
2132
     {
 
2133
     case BT_INTEGER:
 
2134
@@ -130,12 +118,36 @@
 
2135
        return int_size_in_bytes (type);
 
2136
       }
 
2137
     default:
 
2138
-      gfc_internal_error ("Invalid expression in gfc_target_expr_size.");
 
2139
+      gfc_internal_error ("Invalid expression in gfc_element_size.");
 
2140
       return 0;
 
2141
     }
 
2142
 }
 
2143
 
 
2144
 
 
2145
+/* Return the size of an expression in its target representation.  */
 
2146
+
 
2147
+size_t
 
2148
+gfc_target_expr_size (gfc_expr *e)
 
2149
+{
 
2150
+  mpz_t tmp;
 
2151
+  size_t asz;
 
2152
+
 
2153
+  gcc_assert (e != NULL);
 
2154
+
 
2155
+  if (e->rank)
 
2156
+    {
 
2157
+      if (gfc_array_size (e, &tmp))
 
2158
+       asz = mpz_get_ui (tmp);
 
2159
+      else
 
2160
+       asz = 0;
 
2161
+    }
 
2162
+  else
 
2163
+    asz = 1;
 
2164
+
 
2165
+  return asz * gfc_element_size (e);
 
2166
+}
 
2167
+
 
2168
+
 
2169
 /* The encode_* functions export a value into a buffer, and 
 
2170
    return the number of bytes of the buffer that have been
 
2171
    used.  */
 
2172
Index: gcc/fortran/target-memory.h
 
2173
===================================================================
 
2174
--- a/src/gcc/fortran/target-memory.h   (.../tags/gcc_4_7_3_release)
 
2175
+++ b/src/gcc/fortran/target-memory.h   (.../branches/gcc-4_7-branch)
 
2176
@@ -25,7 +25,7 @@
 
2177
 /* Convert a BOZ to REAL or COMPLEX.  */
 
2178
 bool gfc_convert_boz (gfc_expr *, gfc_typespec *);
 
2179
 
 
2180
-/* Return the size of an expression in its target representation.  */
 
2181
+size_t gfc_element_size (gfc_expr *);
 
2182
 size_t gfc_target_expr_size (gfc_expr *);
 
2183
 
 
2184
 /* Write a constant expression in binary form to a target buffer.  */
 
2185
Index: gcc/fortran/check.c
 
2186
===================================================================
 
2187
--- a/src/gcc/fortran/check.c   (.../tags/gcc_4_7_3_release)
 
2188
+++ b/src/gcc/fortran/check.c   (.../branches/gcc-4_7-branch)
 
2189
@@ -3988,8 +3988,6 @@
 
2190
                              size_t *result_length_p)
 
2191
 {
 
2192
   size_t result_elt_size;
 
2193
-  mpz_t tmp;
 
2194
-  gfc_expr *mold_element;
 
2195
 
 
2196
   if (source->expr_type == EXPR_FUNCTION)
 
2197
     return FAILURE;
 
2198
@@ -3998,20 +3996,12 @@
 
2199
     return FAILURE;
 
2200
 
 
2201
   /* Calculate the size of the source.  */
 
2202
-  if (source->expr_type == EXPR_ARRAY
 
2203
-      && gfc_array_size (source, &tmp) == FAILURE)
 
2204
-    return FAILURE;
 
2205
-
 
2206
   *source_size = gfc_target_expr_size (source);
 
2207
   if (*source_size == 0)
 
2208
     return FAILURE;
 
2209
 
 
2210
-  mold_element = mold->expr_type == EXPR_ARRAY
 
2211
-                ? gfc_constructor_first (mold->value.constructor)->expr
 
2212
-                : mold;
 
2213
-
 
2214
   /* Determine the size of the element.  */
 
2215
-  result_elt_size = gfc_target_expr_size (mold_element);
 
2216
+  result_elt_size = gfc_element_size (mold);
 
2217
   if (result_elt_size == 0)
 
2218
     return FAILURE;
 
2219
 
 
2220
Index: gcc/fortran/simplify.c
 
2221
===================================================================
 
2222
--- a/src/gcc/fortran/simplify.c        (.../tags/gcc_4_7_3_release)
 
2223
+++ b/src/gcc/fortran/simplify.c        (.../branches/gcc-4_7-branch)
 
2224
@@ -32,7 +32,9 @@
 
2225
 
 
2226
 gfc_expr gfc_bad_expr;
 
2227
 
 
2228
+static gfc_expr *simplify_size (gfc_expr *, gfc_expr *, int);
 
2229
 
 
2230
+
 
2231
 /* Note that 'simplification' is not just transforming expressions.
 
2232
    For functions that are not simplified at compile time, range
 
2233
    checking is done if possible.
 
2234
@@ -3240,7 +3242,7 @@
 
2235
          gfc_expr* dim = result;
 
2236
          mpz_set_si (dim->value.integer, d);
 
2237
 
 
2238
-         result = gfc_simplify_size (array, dim, kind);
 
2239
+         result = simplify_size (array, dim, k);
 
2240
          gfc_free_expr (dim);
 
2241
          if (!result)
 
2242
            goto returnNull;
 
2243
@@ -5493,15 +5495,12 @@
 
2244
       e = gfc_get_constant_expr (BT_INTEGER, k, &source->where);
 
2245
 
 
2246
       if (t == SUCCESS)
 
2247
-       {
 
2248
-         mpz_set (e->value.integer, shape[n]);
 
2249
-         mpz_clear (shape[n]);
 
2250
-       }
 
2251
+       mpz_set (e->value.integer, shape[n]);
 
2252
       else
 
2253
        {
 
2254
          mpz_set_ui (e->value.integer, n + 1);
 
2255
 
 
2256
-         f = gfc_simplify_size (source, e, NULL);
 
2257
+         f = simplify_size (source, e, k);
 
2258
          gfc_free_expr (e);
 
2259
          if (f == NULL)
 
2260
            {
 
2261
@@ -5512,24 +5511,31 @@
 
2262
            e = f;
 
2263
        }
 
2264
 
 
2265
+      if (e == &gfc_bad_expr || range_check (e, "SHAPE") == &gfc_bad_expr)
 
2266
+       {
 
2267
+         gfc_free_expr (result);
 
2268
+         if (t)
 
2269
+           gfc_clear_shape (shape, source->rank);
 
2270
+         return &gfc_bad_expr;
 
2271
+       }
 
2272
+
 
2273
       gfc_constructor_append_expr (&result->value.constructor, e, NULL);
 
2274
     }
 
2275
 
 
2276
+  if (t)
 
2277
+    gfc_clear_shape (shape, source->rank);
 
2278
+
 
2279
   return result;
 
2280
 }
 
2281
 
 
2282
 
 
2283
-gfc_expr *
 
2284
-gfc_simplify_size (gfc_expr *array, gfc_expr *dim, gfc_expr *kind)
 
2285
+static gfc_expr *
 
2286
+simplify_size (gfc_expr *array, gfc_expr *dim, int k)
 
2287
 {
 
2288
   mpz_t size;
 
2289
   gfc_expr *return_value;
 
2290
   int d;
 
2291
-  int k = get_kind (BT_INTEGER, kind, "SIZE", gfc_default_integer_kind);
 
2292
 
 
2293
-  if (k == -1)
 
2294
-    return &gfc_bad_expr;
 
2295
-
 
2296
   /* For unary operations, the size of the result is given by the size
 
2297
      of the operand.  For binary ones, it's the size of the first operand
 
2298
      unless it is scalar, then it is the size of the second.  */
 
2299
@@ -5558,7 +5564,7 @@
 
2300
              replacement = array->value.op.op1;
 
2301
            else
 
2302
              {
 
2303
-               simplified = gfc_simplify_size (array->value.op.op1, dim, kind);
 
2304
+               simplified = simplify_size (array->value.op.op1, dim, k);
 
2305
                if (simplified)
 
2306
                  return simplified;
 
2307
 
 
2308
@@ -5568,18 +5574,20 @@
 
2309
        }
 
2310
 
 
2311
       /* Try to reduce it directly if possible.  */
 
2312
-      simplified = gfc_simplify_size (replacement, dim, kind);
 
2313
+      simplified = simplify_size (replacement, dim, k);
 
2314
 
 
2315
       /* Otherwise, we build a new SIZE call.  This is hopefully at least
 
2316
         simpler than the original one.  */
 
2317
       if (!simplified)
 
2318
-       simplified = gfc_build_intrinsic_call (gfc_current_ns,
 
2319
-                                              GFC_ISYM_SIZE, "size",
 
2320
-                                              array->where, 3,
 
2321
-                                              gfc_copy_expr (replacement),
 
2322
-                                              gfc_copy_expr (dim),
 
2323
-                                              gfc_copy_expr (kind));
 
2324
-
 
2325
+       {
 
2326
+         gfc_expr *kind = gfc_get_int_expr (gfc_default_integer_kind, NULL, k);
 
2327
+         simplified = gfc_build_intrinsic_call (gfc_current_ns,
 
2328
+                                                GFC_ISYM_SIZE, "size",
 
2329
+                                                array->where, 3,
 
2330
+                                                gfc_copy_expr (replacement),
 
2331
+                                                gfc_copy_expr (dim),
 
2332
+                                                kind);
 
2333
+       }
 
2334
       return simplified;
 
2335
     }
 
2336
 
 
2337
@@ -5598,13 +5606,32 @@
 
2338
        return NULL;
 
2339
     }
 
2340
 
 
2341
-  return_value = gfc_get_int_expr (k, &array->where, mpz_get_si (size));
 
2342
+  return_value = gfc_get_constant_expr (BT_INTEGER, k, &array->where);
 
2343
+  mpz_set (return_value->value.integer, size);
 
2344
   mpz_clear (size);
 
2345
+
 
2346
   return return_value;
 
2347
 }
 
2348
 
 
2349
 
 
2350
 gfc_expr *
 
2351
+gfc_simplify_size (gfc_expr *array, gfc_expr *dim, gfc_expr *kind)
 
2352
+{
 
2353
+  gfc_expr *result;
 
2354
+  int k = get_kind (BT_INTEGER, kind, "SIZE", gfc_default_integer_kind);
 
2355
+
 
2356
+  if (k == -1)
 
2357
+    return &gfc_bad_expr;
 
2358
+
 
2359
+  result = simplify_size (array, dim, k);
 
2360
+  if (result == NULL || result == &gfc_bad_expr)
 
2361
+    return result;
 
2362
+
 
2363
+  return range_check (result, "SIZE");
 
2364
+}
 
2365
+
 
2366
+
 
2367
+gfc_expr *
 
2368
 gfc_simplify_sign (gfc_expr *x, gfc_expr *y)
 
2369
 {
 
2370
   gfc_expr *result;
 
2371
Index: gcc/coverage.c
 
2372
===================================================================
 
2373
--- a/src/gcc/coverage.c        (.../tags/gcc_4_7_3_release)
 
2374
+++ b/src/gcc/coverage.c        (.../branches/gcc-4_7-branch)
 
2375
@@ -1099,6 +1099,9 @@
 
2376
   memcpy (da_file_name + prefix_len, filename, len);
 
2377
   strcpy (da_file_name + prefix_len + len, GCOV_DATA_SUFFIX);
 
2378
 
 
2379
+  if (flag_branch_probabilities)
 
2380
+    read_counts_file ();
 
2381
+
 
2382
   /* Name of bbg file.  */
 
2383
   if (flag_test_coverage && !flag_compare_debug)
 
2384
     {
 
2385
@@ -1118,9 +1121,6 @@
 
2386
          gcov_write_unsigned (local_tick);
 
2387
        }
 
2388
     }
 
2389
-
 
2390
-  if (flag_branch_probabilities)
 
2391
-    read_counts_file ();
 
2392
 }
 
2393
 
 
2394
 /* Performs file-level cleanup.  Close graph file, generate coverage
555
2395
Index: gcc/cfgexpand.c
556
2396
===================================================================
557
2397
--- a/src/gcc/cfgexpand.c       (.../tags/gcc_4_7_3_release)
636
2476
        flush_pending_lists (deps, insn, true, true);
637
2477
 
638
2478
       reg_pending_barrier = NOT_A_BARRIER;
 
2479
Index: gcc/config/alpha/alpha.md
 
2480
===================================================================
 
2481
--- a/src/gcc/config/alpha/alpha.md     (.../tags/gcc_4_7_3_release)
 
2482
+++ b/src/gcc/config/alpha/alpha.md     (.../branches/gcc-4_7-branch)
 
2483
@@ -25,6 +25,7 @@
 
2484
 ;; Uses of UNSPEC in this file:
 
2485
 
 
2486
 (define_c_enum "unspec" [
 
2487
+  UNSPEC_XFLT_COMPARE
 
2488
   UNSPEC_ARG_HOME
 
2489
   UNSPEC_LDGP1
 
2490
   UNSPEC_INSXH
 
2491
Index: gcc/config/alpha/alpha.c
 
2492
===================================================================
 
2493
--- a/src/gcc/config/alpha/alpha.c      (.../tags/gcc_4_7_3_release)
 
2494
+++ b/src/gcc/config/alpha/alpha.c      (.../branches/gcc-4_7-branch)
 
2495
@@ -2658,12 +2658,12 @@
 
2496
       break;
 
2497
 
 
2498
     case GE:  case GT:  case GEU:  case GTU:
 
2499
-      /* These must be swapped.  */
 
2500
-      if (op1 != CONST0_RTX (cmp_mode))
 
2501
-       {
 
2502
-         code = swap_condition (code);
 
2503
-         tem = op0, op0 = op1, op1 = tem;
 
2504
-       }
 
2505
+      /* These normally need swapping, but for integer zero we have
 
2506
+        special patterns that recognize swapped operands.  */
 
2507
+      if (cmp_mode == DImode && op1 == const0_rtx)
 
2508
+       break;
 
2509
+      code = swap_condition (code);
 
2510
+      tem = op0, op0 = op1, op1 = tem;
 
2511
       break;
 
2512
 
 
2513
     default:
 
2514
@@ -3025,12 +3025,9 @@
 
2515
   operands[1] = op1;
 
2516
   out = gen_reg_rtx (DImode);
 
2517
 
 
2518
-  /* What's actually returned is -1,0,1, not a proper boolean value,
 
2519
-     so use an EXPR_LIST as with a generic libcall instead of a 
 
2520
-     comparison type expression.  */
 
2521
-  note = gen_rtx_EXPR_LIST (VOIDmode, op1, NULL_RTX);
 
2522
-  note = gen_rtx_EXPR_LIST (VOIDmode, op0, note);
 
2523
-  note = gen_rtx_EXPR_LIST (VOIDmode, func, note);
 
2524
+  /* What's actually returned is -1,0,1, not a proper boolean value.  */
 
2525
+  note = gen_rtx_fmt_ee (cmp_code, VOIDmode, op0, op1);
 
2526
+  note = gen_rtx_UNSPEC (DImode, gen_rtvec (1, note), UNSPEC_XFLT_COMPARE);
 
2527
   alpha_emit_xfloating_libcall (func, out, operands, 2, note);
 
2528
 
 
2529
   return out;
639
2530
Index: gcc/config/sparc/sparc.c
640
2531
===================================================================
641
2532
--- a/src/gcc/config/sparc/sparc.c      (.../tags/gcc_4_7_3_release)
706
2597
            sparc_mode_class[i] = 1 << (int) SF_MODE;
707
2598
          else if (GET_MODE_SIZE (i) == 8)
708
2599
            sparc_mode_class[i] = 1 << (int) DF_MODE;
 
2600
Index: gcc/config/i386/i386.md
 
2601
===================================================================
 
2602
--- a/src/gcc/config/i386/i386.md       (.../tags/gcc_4_7_3_release)
 
2603
+++ b/src/gcc/config/i386/i386.md       (.../branches/gcc-4_7-branch)
 
2604
@@ -109,6 +109,7 @@
 
2605
   UNSPEC_CALL_NEEDS_VZEROUPPER
 
2606
   UNSPEC_PAUSE
 
2607
   UNSPEC_LEA_ADDR
 
2608
+  UNSPEC_STOS
 
2609
 
 
2610
   ;; For SSE/MMX support:
 
2611
   UNSPEC_FIX_NOTRUNC
 
2612
@@ -1855,18 +1856,16 @@
 
2613
   [(set_attr "type" "*,*,sselog1,ssemov,ssemov")
 
2614
    (set_attr "prefix" "*,*,maybe_vex,maybe_vex,maybe_vex")
 
2615
    (set (attr "mode")
 
2616
-       (cond [(eq_attr "alternative" "2,3")
 
2617
-                (if_then_else
 
2618
-                  (match_test "optimize_function_for_size_p (cfun)")
 
2619
-                  (const_string "V4SF")
 
2620
-                  (const_string "TI"))
 
2621
-              (eq_attr "alternative" "4")
 
2622
-                (if_then_else
 
2623
-                  (ior (match_test "TARGET_SSE_TYPELESS_STORES")
 
2624
-                       (match_test "optimize_function_for_size_p (cfun)"))
 
2625
-                  (const_string "V4SF")
 
2626
-                  (const_string "TI"))]
 
2627
-              (const_string "DI")))])
 
2628
+       (cond [(eq_attr "alternative" "0,1")
 
2629
+                (const_string "DI")
 
2630
+              (ior (not (match_test "TARGET_SSE2"))
 
2631
+                   (match_test "optimize_function_for_size_p (cfun)"))
 
2632
+                (const_string "V4SF")
 
2633
+              (and (eq_attr "alternative" "4")
 
2634
+                   (match_test "TARGET_SSE_TYPELESS_STORES"))
 
2635
+                (const_string "V4SF")
 
2636
+              ]
 
2637
+              (const_string "TI")))])
 
2638
 
 
2639
 (define_split
 
2640
   [(set (match_operand:TI 0 "nonimmediate_operand" "")
 
2641
@@ -3444,9 +3443,9 @@
 
2642
 })
 
2643
 
 
2644
 (define_insn "*zero_extendsidi2_rex64"
 
2645
-  [(set (match_operand:DI 0 "nonimmediate_operand"  "=r,o,?*Ym,?*y,?*Yi,*x")
 
2646
+  [(set (match_operand:DI 0 "nonimmediate_operand"  "=r,o,?*Ym,?!*y,?*Yi,*x")
 
2647
        (zero_extend:DI
 
2648
-        (match_operand:SI 1 "nonimmediate_operand" "rm,0,r   ,m  ,r   ,m")))]
 
2649
+        (match_operand:SI 1 "nonimmediate_operand" "rm,0,r   ,m   ,r   ,m")))]
 
2650
   "TARGET_64BIT"
 
2651
   "@
 
2652
    mov{l}\t{%1, %k0|%k0, %1}
 
2653
@@ -3469,9 +3468,9 @@
 
2654
 
 
2655
 ;; %%% Kill me once multi-word ops are sane.
 
2656
 (define_insn "zero_extendsidi2_1"
 
2657
-  [(set (match_operand:DI 0 "nonimmediate_operand" "=r,?r,?o,?*Ym,?*y,?*Yi,*x")
 
2658
+  [(set (match_operand:DI 0 "nonimmediate_operand" "=r,?r,?o,?*Ym,?!*y,?*Yi,*x")
 
2659
        (zero_extend:DI
 
2660
-        (match_operand:SI 1 "nonimmediate_operand" "0,rm,r ,r   ,m  ,r   ,m")))
 
2661
+        (match_operand:SI 1 "nonimmediate_operand" "0,rm,r ,r   ,m   ,r   ,m")))
 
2662
    (clobber (reg:CC FLAGS_REG))]
 
2663
   "!TARGET_64BIT"
 
2664
   "@
 
2665
@@ -15912,7 +15911,8 @@
 
2666
   [(parallel [(set (match_operand 1 "memory_operand" "")
 
2667
                   (match_operand 2 "register_operand" ""))
 
2668
              (set (match_operand 0 "register_operand" "")
 
2669
-                  (match_operand 3 "" ""))])]
 
2670
+                  (match_operand 3 "" ""))
 
2671
+             (unspec [(const_int 0)] UNSPEC_STOS)])]
 
2672
   ""
 
2673
   "ix86_current_function_needs_cld = 1;")
 
2674
 
 
2675
@@ -15921,7 +15921,8 @@
 
2676
        (match_operand:DI 2 "register_operand" "a"))
 
2677
    (set (match_operand:DI 0 "register_operand" "=D")
 
2678
        (plus:DI (match_dup 1)
 
2679
-                (const_int 8)))]
 
2680
+                (const_int 8)))
 
2681
+   (unspec [(const_int 0)] UNSPEC_STOS)]
 
2682
   "TARGET_64BIT
 
2683
    && !(fixed_regs[AX_REG] || fixed_regs[DI_REG])"
 
2684
   "stosq"
 
2685
@@ -15934,7 +15935,8 @@
 
2686
        (match_operand:SI 2 "register_operand" "a"))
 
2687
    (set (match_operand:P 0 "register_operand" "=D")
 
2688
        (plus:P (match_dup 1)
 
2689
-               (const_int 4)))]
 
2690
+               (const_int 4)))
 
2691
+   (unspec [(const_int 0)] UNSPEC_STOS)]
 
2692
   "!(fixed_regs[AX_REG] || fixed_regs[DI_REG])"
 
2693
   "stos{l|d}"
 
2694
   [(set_attr "type" "str")
 
2695
@@ -15946,7 +15948,8 @@
 
2696
        (match_operand:HI 2 "register_operand" "a"))
 
2697
    (set (match_operand:P 0 "register_operand" "=D")
 
2698
        (plus:P (match_dup 1)
 
2699
-               (const_int 2)))]
 
2700
+               (const_int 2)))
 
2701
+   (unspec [(const_int 0)] UNSPEC_STOS)]
 
2702
   "!(fixed_regs[AX_REG] || fixed_regs[DI_REG])"
 
2703
   "stosw"
 
2704
   [(set_attr "type" "str")
 
2705
@@ -15958,7 +15961,8 @@
 
2706
        (match_operand:QI 2 "register_operand" "a"))
 
2707
    (set (match_operand:P 0 "register_operand" "=D")
 
2708
        (plus:P (match_dup 1)
 
2709
-               (const_int 1)))]
 
2710
+               (const_int 1)))
 
2711
+   (unspec [(const_int 0)] UNSPEC_STOS)]
 
2712
   "!(fixed_regs[AX_REG] || fixed_regs[DI_REG])"
 
2713
   "stosb"
 
2714
   [(set_attr "type" "str")
 
2715
@@ -17190,6 +17194,7 @@
 
2716
   "(TARGET_READ_MODIFY_WRITE || optimize_insn_for_size_p ())
 
2717
    && peep2_reg_dead_p (4, operands[0])
 
2718
    && !reg_overlap_mentioned_p (operands[0], operands[1])
 
2719
+   && !reg_overlap_mentioned_p (operands[0], operands[2])
 
2720
    && (<MODE>mode != QImode
 
2721
        || immediate_operand (operands[2], QImode)
 
2722
        || q_regs_operand (operands[2], QImode))
 
2723
@@ -17254,6 +17259,7 @@
 
2724
        || immediate_operand (operands[2], SImode)
 
2725
        || q_regs_operand (operands[2], SImode))
 
2726
    && !reg_overlap_mentioned_p (operands[0], operands[1])
 
2727
+   && !reg_overlap_mentioned_p (operands[0], operands[2])
 
2728
    && ix86_match_ccmode (peep2_next_insn (3),
 
2729
                         (GET_CODE (operands[3]) == PLUS
 
2730
                          || GET_CODE (operands[3]) == MINUS)
 
2731
Index: gcc/config/i386/sse.md
 
2732
===================================================================
 
2733
--- a/src/gcc/config/i386/sse.md        (.../tags/gcc_4_7_3_release)
 
2734
+++ b/src/gcc/config/i386/sse.md        (.../branches/gcc-4_7-branch)
 
2735
@@ -11167,7 +11167,8 @@
 
2736
         (match_operand:SI 2 "const_0_to_<sserotatemax>_operand" "n")))]
 
2737
   "TARGET_XOP"
 
2738
 {
 
2739
-  operands[3] = GEN_INT ((<ssescalarnum> * 8) - INTVAL (operands[2]));
 
2740
+  operands[3]
 
2741
+    = GEN_INT (GET_MODE_BITSIZE (<ssescalarmode>mode) - INTVAL (operands[2]));
 
2742
   return \"vprot<ssemodesuffix>\t{%3, %1, %0|%0, %1, %3}\";
 
2743
 }
 
2744
   [(set_attr "type" "sseishft")
 
2745
Index: gcc/config/i386/driver-i386.c
 
2746
===================================================================
 
2747
--- a/src/gcc/config/i386/driver-i386.c (.../tags/gcc_4_7_3_release)
 
2748
+++ b/src/gcc/config/i386/driver-i386.c (.../branches/gcc-4_7-branch)
 
2749
@@ -350,7 +350,10 @@
 
2750
 enum vendor_signatures
 
2751
 {
 
2752
   SIG_INTEL =  0x756e6547 /* Genu */,
 
2753
-  SIG_AMD =    0x68747541 /* Auth */
 
2754
+  SIG_AMD =    0x68747541 /* Auth */,
 
2755
+  SIG_CENTAUR =        0x746e6543 /* Cent */,
 
2756
+  SIG_CYRIX =  0x69727943 /* Cyri */,
 
2757
+  SIG_NSC =    0x646f6547 /* Geod */
 
2758
 };
 
2759
 
 
2760
 enum processor_signatures
 
2761
@@ -510,7 +513,10 @@
 
2762
 
 
2763
   if (!arch)
 
2764
     {
 
2765
-      if (vendor == SIG_AMD)
 
2766
+      if (vendor == SIG_AMD
 
2767
+         || vendor == SIG_CENTAUR
 
2768
+         || vendor == SIG_CYRIX
 
2769
+         || vendor == SIG_NSC)
 
2770
        cache = detect_caches_amd (ext_level);
 
2771
       else if (vendor == SIG_INTEL)
 
2772
        {
 
2773
@@ -549,6 +555,37 @@
 
2774
       else
 
2775
        processor = PROCESSOR_PENTIUM;
 
2776
     }
 
2777
+  else if (vendor == SIG_CENTAUR)
 
2778
+    {
 
2779
+      if (arch)
 
2780
+       {
 
2781
+         switch (family)
 
2782
+           {
 
2783
+           case 6:
 
2784
+             if (model > 9)
 
2785
+               /* Use the default detection procedure.  */
 
2786
+               processor = PROCESSOR_GENERIC32;
 
2787
+             else if (model == 9)
 
2788
+               cpu = "c3-2";
 
2789
+             else if (model >= 6)
 
2790
+               cpu = "c3";
 
2791
+             else
 
2792
+               processor = PROCESSOR_GENERIC32;
 
2793
+             break;
 
2794
+           case 5:
 
2795
+             if (has_3dnow)
 
2796
+               cpu = "winchip2";
 
2797
+             else if (has_mmx)
 
2798
+               cpu = "winchip2-c6";
 
2799
+             else
 
2800
+               processor = PROCESSOR_GENERIC32;
 
2801
+             break;
 
2802
+           default:
 
2803
+             /* We have no idea.  */
 
2804
+             processor = PROCESSOR_GENERIC32;
 
2805
+           }
 
2806
+       }
 
2807
+    }
 
2808
   else
 
2809
     {
 
2810
       switch (family)
 
2811
Index: gcc/config/i386/i386.c
 
2812
===================================================================
 
2813
--- a/src/gcc/config/i386/i386.c        (.../tags/gcc_4_7_3_release)
 
2814
+++ b/src/gcc/config/i386/i386.c        (.../branches/gcc-4_7-branch)
 
2815
@@ -2979,7 +2979,7 @@
 
2816
        | PTA_SSSE3 | PTA_CX16},
 
2817
       {"corei7", PROCESSOR_COREI7_64, CPU_COREI7,
 
2818
        PTA_64BIT | PTA_MMX | PTA_SSE | PTA_SSE2 | PTA_SSE3
 
2819
-       | PTA_SSSE3 | PTA_SSE4_1 | PTA_SSE4_2 | PTA_CX16},
 
2820
+       | PTA_SSSE3 | PTA_SSE4_1 | PTA_SSE4_2 | PTA_CX16 | PTA_POPCNT},
 
2821
       {"corei7-avx", PROCESSOR_COREI7_64, CPU_COREI7,
 
2822
        PTA_64BIT | PTA_MMX | PTA_SSE | PTA_SSE2 | PTA_SSE3
 
2823
        | PTA_SSSE3 | PTA_SSE4_1 | PTA_SSE4_2 | PTA_AVX
 
2824
@@ -20026,7 +20026,7 @@
 
2825
              vec[i * 2 + 1] = const1_rtx;
 
2826
            }
 
2827
          vt = gen_rtx_CONST_VECTOR (maskmode, gen_rtvec_v (w, vec));
 
2828
-         vt = force_const_mem (maskmode, vt);
 
2829
+         vt = validize_mem (force_const_mem (maskmode, vt));
 
2830
          t1 = expand_simple_binop (maskmode, PLUS, t1, vt, t1, 1,
 
2831
                                    OPTAB_DIRECT);
 
2832
 
 
2833
@@ -20223,7 +20223,7 @@
 
2834
       for (i = 0; i < 16; ++i)
 
2835
        vec[i] = GEN_INT (i/e * e);
 
2836
       vt = gen_rtx_CONST_VECTOR (V16QImode, gen_rtvec_v (16, vec));
 
2837
-      vt = force_const_mem (V16QImode, vt);
 
2838
+      vt = validize_mem (force_const_mem (V16QImode, vt));
 
2839
       if (TARGET_XOP)
 
2840
        emit_insn (gen_xop_pperm (mask, mask, mask, vt));
 
2841
       else
 
2842
@@ -20234,7 +20234,7 @@
 
2843
       for (i = 0; i < 16; ++i)
 
2844
        vec[i] = GEN_INT (i % e);
 
2845
       vt = gen_rtx_CONST_VECTOR (V16QImode, gen_rtvec_v (16, vec));
 
2846
-      vt = force_const_mem (V16QImode, vt);
 
2847
+      vt = validize_mem (force_const_mem (V16QImode, vt));
 
2848
       emit_insn (gen_addv16qi3 (mask, mask, vt));
 
2849
     }
 
2850
 
 
2851
Index: gcc/config/sh/sh.md
 
2852
===================================================================
 
2853
--- a/src/gcc/config/sh/sh.md   (.../tags/gcc_4_7_3_release)
 
2854
+++ b/src/gcc/config/sh/sh.md   (.../branches/gcc-4_7-branch)
 
2855
@@ -654,7 +654,7 @@
 
2856
 
 
2857
 (define_insn "tstsi_t_zero_extract_eq"
 
2858
   [(set (reg:SI T_REG)
 
2859
-       (eq:SI (zero_extract:SI (match_operand 0 "logical_operand" "z")
 
2860
+       (eq:SI (zero_extract:SI (match_operand:SI 0 "logical_operand" "z")
 
2861
                (match_operand:SI 1 "const_int_operand")
 
2862
                (match_operand:SI 2 "const_int_operand"))
 
2863
          (const_int 0)))]
 
2864
Index: gcc/config/rs6000/rs6000.c
 
2865
===================================================================
 
2866
--- a/src/gcc/config/rs6000/rs6000.c    (.../tags/gcc_4_7_3_release)
 
2867
+++ b/src/gcc/config/rs6000/rs6000.c    (.../branches/gcc-4_7-branch)
 
2868
@@ -2398,8 +2398,16 @@
 
2869
        reg_size = UNITS_PER_WORD;
 
2870
 
 
2871
       for (m = 0; m < NUM_MACHINE_MODES; ++m)
 
2872
-       rs6000_class_max_nregs[m][c]
 
2873
-         = (GET_MODE_SIZE (m) + reg_size - 1) / reg_size;
 
2874
+       {
 
2875
+         int reg_size2 = reg_size;
 
2876
+
 
2877
+         /* TFmode/TDmode always takes 2 registers, even in VSX.  */
 
2878
+         if (m == TDmode || m == TFmode)
 
2879
+           reg_size2 = UNITS_PER_FP_WORD;
 
2880
+
 
2881
+         rs6000_class_max_nregs[m][c]
 
2882
+           = (GET_MODE_SIZE (m) + reg_size2 - 1) / reg_size2;
 
2883
+       }
 
2884
     }
 
2885
 
 
2886
   if (TARGET_E500_DOUBLE)
 
2887
Index: gcc/config/rs6000/rs6000.h
 
2888
===================================================================
 
2889
--- a/src/gcc/config/rs6000/rs6000.h    (.../tags/gcc_4_7_3_release)
 
2890
+++ b/src/gcc/config/rs6000/rs6000.h    (.../branches/gcc-4_7-branch)
 
2891
@@ -1033,12 +1033,17 @@
 
2892
 #define HARD_REGNO_NREGS(REGNO, MODE) rs6000_hard_regno_nregs[(MODE)][(REGNO)]
 
2893
 
 
2894
 /* When setting up caller-save slots (MODE == VOIDmode) ensure we allocate
 
2895
-   enough space to account for vectors in FP regs. */
 
2896
+   enough space to account for vectors in FP regs.  However, TFmode/TDmode
 
2897
+   should not use VSX instructions to do a caller save. */
 
2898
 #define HARD_REGNO_CALLER_SAVE_MODE(REGNO, NREGS, MODE)                        \
 
2899
   (TARGET_VSX                                                          \
 
2900
    && ((MODE) == VOIDmode || ALTIVEC_OR_VSX_VECTOR_MODE (MODE))                \
 
2901
-   && FP_REGNO_P (REGNO)                               \
 
2902
-   ? V2DFmode                                          \
 
2903
+   && FP_REGNO_P (REGNO)                                               \
 
2904
+   ? V2DFmode                                                          \
 
2905
+   : ((MODE) == TFmode && FP_REGNO_P (REGNO))                          \
 
2906
+   ? DFmode                                                            \
 
2907
+   : ((MODE) == TDmode && FP_REGNO_P (REGNO))                          \
 
2908
+   ? DImode                                                            \
 
2909
    : choose_hard_reg_mode ((REGNO), (NREGS), false))
 
2910
 
 
2911
 #define HARD_REGNO_CALL_PART_CLOBBERED(REGNO, MODE)                    \
 
2912
@@ -1046,7 +1051,8 @@
 
2913
      && (GET_MODE_SIZE (MODE) > 4)                                     \
 
2914
      && INT_REGNO_P (REGNO)) ? 1 : 0)                                  \
 
2915
    || (TARGET_VSX && FP_REGNO_P (REGNO)                                        \
 
2916
-       && GET_MODE_SIZE (MODE) > 8))
 
2917
+       && GET_MODE_SIZE (MODE) > 8 && ((MODE) != TDmode)               \
 
2918
+       && ((MODE) != TFmode)))
 
2919
 
 
2920
 #define VSX_VECTOR_MODE(MODE)          \
 
2921
         ((MODE) == V4SFmode            \
709
2922
Index: gcc/config/darwin.h
710
2923
===================================================================
711
2924
--- a/src/gcc/config/darwin.h   (.../tags/gcc_4_7_3_release)
739
2952
 /* When generating stabs debugging, use N_BINCL entries.  */
740
2953
 
741
2954
 #define DBX_USE_BINCL
 
2955
Index: gcc/config/arm/thumb2.md
 
2956
===================================================================
 
2957
--- a/src/gcc/config/arm/thumb2.md      (.../tags/gcc_4_7_3_release)
 
2958
+++ b/src/gcc/config/arm/thumb2.md      (.../branches/gcc-4_7-branch)
 
2959
@@ -182,7 +182,7 @@
 
2960
    str%?\\t%1, %0"
 
2961
   [(set_attr "type" "*,*,*,*,load1,load1,store1,store1")
 
2962
    (set_attr "predicable" "yes")
 
2963
-   (set_attr "pool_range" "*,*,*,*,1020,4096,*,*")
 
2964
+   (set_attr "pool_range" "*,*,*,*,1018,4094,*,*")
 
2965
    (set_attr "neg_pool_range" "*,*,*,*,0,0,*,*")]
 
2966
 )
 
2967
 
 
2968
@@ -217,7 +217,7 @@
 
2969
    ldr%(h%)\\t%0, %1\\t%@ movhi"
 
2970
   [(set_attr "type" "*,*,store1,load1")
 
2971
    (set_attr "predicable" "yes")
 
2972
-   (set_attr "pool_range" "*,*,*,4096")
 
2973
+   (set_attr "pool_range" "*,*,*,4094")
 
2974
    (set_attr "neg_pool_range" "*,*,*,250")]
 
2975
 )
 
2976
 
 
2977
@@ -570,7 +570,7 @@
 
2978
    ldr%(sb%)\\t%0, %1"
 
2979
   [(set_attr "type" "alu_shift,load_byte")
 
2980
    (set_attr "predicable" "yes")
 
2981
-   (set_attr "pool_range" "*,4096")
 
2982
+   (set_attr "pool_range" "*,4094")
 
2983
    (set_attr "neg_pool_range" "*,250")]
 
2984
 )
 
2985
 
 
2986
@@ -583,7 +583,7 @@
 
2987
    ldr%(h%)\\t%0, %1"
 
2988
   [(set_attr "type" "alu_shift,load_byte")
 
2989
    (set_attr "predicable" "yes")
 
2990
-   (set_attr "pool_range" "*,4096")
 
2991
+   (set_attr "pool_range" "*,4094")
 
2992
    (set_attr "neg_pool_range" "*,250")]
 
2993
 )
 
2994
 
 
2995
@@ -596,7 +596,7 @@
 
2996
    ldr%(b%)\\t%0, %1\\t%@ zero_extendqisi2"
 
2997
   [(set_attr "type" "alu_shift,load_byte")
 
2998
    (set_attr "predicable" "yes")
 
2999
-   (set_attr "pool_range" "*,4096")
 
3000
+   (set_attr "pool_range" "*,4094")
 
3001
    (set_attr "neg_pool_range" "*,250")]
 
3002
 )
 
3003
 
 
3004
Index: gcc/config/arm/vfp.md
 
3005
===================================================================
 
3006
--- a/src/gcc/config/arm/vfp.md (.../tags/gcc_4_7_3_release)
 
3007
+++ b/src/gcc/config/arm/vfp.md (.../branches/gcc-4_7-branch)
 
3008
@@ -126,7 +126,7 @@
 
3009
   [(set_attr "predicable" "yes")
 
3010
    (set_attr "type" "*,*,*,*,load1,load1,store1,store1,r_2_f,f_2_r,fcpys,f_loads,f_stores")
 
3011
    (set_attr "insn" "mov,mov,mvn,mov,*,*,*,*,*,*,*,*,*")
 
3012
-   (set_attr "pool_range"     "*,*,*,*,1020,4096,*,*,*,*,*,1020,*")
 
3013
+   (set_attr "pool_range"     "*,*,*,*,1018,4094,*,*,*,*,*,1018,*")
 
3014
    (set_attr "neg_pool_range" "*,*,*,*,   0,   0,*,*,*,*,*,1008,*")]
 
3015
 )
 
3016
 
 
3017
@@ -177,7 +177,8 @@
 
3018
                                  (const_int 8)
 
3019
                                  (const_int 4))]
 
3020
                               (const_int 4)))
 
3021
-   (set_attr "pool_range"     "*,*,*,*,1020,4096,*,*,*,*,1020,*")
 
3022
+   (set_attr "arm_pool_range"     "*,*,*,*,1020,4096,*,*,*,*,1020,*")
 
3023
+   (set_attr "thumb2_pool_range"     "*,*,*,*,1018,4094,*,*,*,*,1018,*")
 
3024
    (set_attr "neg_pool_range" "*,*,*,*,1004,0,*,*,*,*,1004,*")
 
3025
    (set_attr "arch"           "t2,any,any,any,a,t2,any,any,any,any,any,any")]
 
3026
 )
 
3027
@@ -222,7 +223,8 @@
 
3028
                                  * 4")]
 
3029
                               (const_int 4)))
 
3030
    (set_attr "predicable"    "yes")
 
3031
-   (set_attr "pool_range"     "*,*,*,*,1020,4096,*,*,*,*,1020,*")
 
3032
+   (set_attr "arm_pool_range"     "*,*,*,*,1018,4094,*,*,*,*,1018,*")
 
3033
+   (set_attr "thumb2_pool_range"     "*,*,*,*,1018,4094,*,*,*,*,1018,*")
 
3034
    (set_attr "neg_pool_range" "*,*,*,*,1004,0,*,*,*,*,1004,*")
 
3035
    (set (attr "ce_count") 
 
3036
        (symbol_ref "get_attr_length (insn) / 4"))
 
3037
@@ -409,7 +411,7 @@
 
3038
    (set_attr "type"
 
3039
      "r_2_f,f_2_r,fconsts,f_loads,f_stores,load1,store1,fcpys,*")
 
3040
    (set_attr "insn" "*,*,*,*,*,*,*,*,mov")
 
3041
-   (set_attr "pool_range" "*,*,*,1020,*,4092,*,*,*")
 
3042
+   (set_attr "pool_range" "*,*,*,1018,*,4090,*,*,*")
 
3043
    (set_attr "neg_pool_range" "*,*,*,1008,*,0,*,*,*")]
 
3044
 )
 
3045
 
 
3046
@@ -501,7 +503,7 @@
 
3047
                                 (const_int 8)
 
3048
                                 (const_int 4))]
 
3049
                              (const_int 4)))
 
3050
-   (set_attr "pool_range" "*,*,*,1020,*,4096,*,*,*")
 
3051
+   (set_attr "pool_range" "*,*,*,1018,*,4094,*,*,*")
 
3052
    (set_attr "neg_pool_range" "*,*,*,1008,*,0,*,*,*")]
 
3053
 )
 
3054
 
 
3055
Index: gcc/config/arm/neon.md
 
3056
===================================================================
 
3057
--- a/src/gcc/config/arm/neon.md        (.../tags/gcc_4_7_3_release)
 
3058
+++ b/src/gcc/config/arm/neon.md        (.../branches/gcc-4_7-branch)
 
3059
@@ -201,7 +201,8 @@
 
3060
   (set_attr "type" "*,f_stored,*,f_loadd,*,*,alu,load2,store2")
 
3061
   (set_attr "insn" "*,*,*,*,*,*,mov,*,*")
 
3062
   (set_attr "length" "4,4,4,4,4,4,8,8,8")
 
3063
-  (set_attr "pool_range"     "*,*,*,1020,*,*,*,1020,*")
 
3064
+  (set_attr "arm_pool_range"     "*,*,*,1020,*,*,*,1020,*")
 
3065
+  (set_attr "thumb2_pool_range"     "*,*,*,1018,*,*,*,1018,*")
 
3066
   (set_attr "neg_pool_range" "*,*,*,1004,*,*,*,1004,*")])
 
3067
 
 
3068
 (define_insn "*neon_mov<mode>"
 
3069
@@ -246,7 +247,8 @@
 
3070
    (set_attr "type" "*,*,*,*,*,*,alu,load4,store4")
 
3071
    (set_attr "insn" "*,*,*,*,*,*,mov,*,*")
 
3072
    (set_attr "length" "4,8,4,8,8,8,16,8,16")
 
3073
-   (set_attr "pool_range" "*,*,*,1020,*,*,*,1020,*")
 
3074
+   (set_attr "arm_pool_range" "*,*,*,1020,*,*,*,1020,*")
 
3075
+   (set_attr "thumb2_pool_range" "*,*,*,1018,*,*,*,1018,*")
 
3076
    (set_attr "neg_pool_range" "*,*,*,996,*,*,*,996,*")])
 
3077
 
 
3078
 (define_expand "movti"
 
3079
Index: gcc/config/arm/arm.md
 
3080
===================================================================
 
3081
--- a/src/gcc/config/arm/arm.md (.../tags/gcc_4_7_3_release)
 
3082
+++ b/src/gcc/config/arm/arm.md (.../branches/gcc-4_7-branch)
 
3083
@@ -256,6 +256,9 @@
 
3084
 ; POOL_RANGE is how far away from a constant pool entry that this insn
 
3085
 ; can be placed.  If the distance is zero, then this insn will never
 
3086
 ; reference the pool.
 
3087
+; Note that for Thumb constant pools the PC value is rounded down to the
 
3088
+; nearest multiple of four.  Therefore, THUMB2_POOL_RANGE (and POOL_RANGE for
 
3089
+; Thumb insns) should be set to <max_range> - 2.
 
3090
 ; NEG_POOL_RANGE is nonzero for insns that can reference a constant pool entry
 
3091
 ; before its address.  It is set to <max_range> - (8 + <data_size>).
 
3092
 (define_attr "arm_pool_range" "" (const_int 0))
 
3093
@@ -4833,7 +4836,7 @@
 
3094
                                        (const_int 2) (const_int 4))
 
3095
                          (const_int 4)])
 
3096
    (set_attr "type" "alu_shift,load_byte")
 
3097
-   (set_attr "pool_range" "*,1020")]
 
3098
+   (set_attr "pool_range" "*,1018")]
 
3099
 )
 
3100
 
 
3101
 ;; This pattern will only be used when ldsh is not available
 
3102
@@ -5239,7 +5242,7 @@
 
3103
    (set_attr "type" "*,*,*,load2,store2")
 
3104
    (set_attr "arm_pool_range" "*,*,*,1020,*")
 
3105
    (set_attr "arm_neg_pool_range" "*,*,*,1004,*")
 
3106
-   (set_attr "thumb2_pool_range" "*,*,*,4096,*")
 
3107
+   (set_attr "thumb2_pool_range" "*,*,*,4094,*")
 
3108
    (set_attr "thumb2_neg_pool_range" "*,*,*,0,*")]
 
3109
 )
 
3110
 
 
3111
@@ -5379,7 +5382,7 @@
 
3112
   [(set_attr "length" "4,4,6,2,2,6,4,4")
 
3113
    (set_attr "type" "*,*,*,load2,store2,load2,store2,*")
 
3114
    (set_attr "insn" "*,mov,*,*,*,*,*,mov")
 
3115
-   (set_attr "pool_range" "*,*,*,*,*,1020,*,*")]
 
3116
+   (set_attr "pool_range" "*,*,*,*,*,1018,*,*")]
 
3117
 )
 
3118
 
 
3119
 (define_expand "movsi"
 
3120
@@ -5539,7 +5542,7 @@
 
3121
    mov\\t%0, %1"
 
3122
   [(set_attr "length" "2,2,4,4,2,2,2,2,2")
 
3123
    (set_attr "type" "*,*,*,*,load1,store1,load1,store1,*")
 
3124
-   (set_attr "pool_range" "*,*,*,*,*,*,1020,*,*")
 
3125
+   (set_attr "pool_range" "*,*,*,*,*,*,1018,*,*")
 
3126
    (set_attr "conds" "set,clob,*,*,nocond,nocond,nocond,nocond,nocond")])
 
3127
 
 
3128
 (define_split 
 
3129
@@ -5632,7 +5635,7 @@
 
3130
                                         (match_dup 2)] UNSPEC_PIC_BASE))]
 
3131
  "operands[3] = TARGET_THUMB ? GEN_INT (4) : GEN_INT (8);"
 
3132
  [(set_attr "type" "load1,load1,load1")
 
3133
-  (set_attr "pool_range" "4096,4096,1024")
 
3134
+  (set_attr "pool_range" "4096,4094,1022")
 
3135
   (set_attr "neg_pool_range" "4084,0,0")
 
3136
   (set_attr "arch"  "a,t2,t1")    
 
3137
   (set_attr "length" "8,6,4")]
 
3138
@@ -5648,7 +5651,10 @@
 
3139
   "TARGET_32BIT && flag_pic"
 
3140
   "ldr%?\\t%0, %1"
 
3141
   [(set_attr "type" "load1")
 
3142
-   (set_attr "pool_range" "4096")
 
3143
+   (set (attr "pool_range")
 
3144
+       (if_then_else (eq_attr "is_thumb" "no")
 
3145
+                     (const_int 4096)
 
3146
+                     (const_int 4094)))
 
3147
    (set (attr "neg_pool_range")
 
3148
        (if_then_else (eq_attr "is_thumb" "no")
 
3149
                      (const_int 4084)
 
3150
@@ -5661,7 +5667,7 @@
 
3151
   "TARGET_THUMB1 && flag_pic"
 
3152
   "ldr\\t%0, %1"
 
3153
   [(set_attr "type" "load1")
 
3154
-   (set (attr "pool_range") (const_int 1024))]
 
3155
+   (set (attr "pool_range") (const_int 1018))]
 
3156
 )
 
3157
 
 
3158
 (define_insn "pic_add_dot_plus_four"
 
3159
@@ -6456,7 +6462,7 @@
 
3160
   [(set_attr "length" "2")
 
3161
    (set_attr "type" "*,load1,store1,*,*")
 
3162
    (set_attr "insn" "mov,*,*,mov,mov")
 
3163
-   (set_attr "pool_range" "*,1020,*,*,*")
 
3164
+   (set_attr "pool_range" "*,1018,*,*,*")
 
3165
    (set_attr "conds" "clob,nocond,nocond,nocond,nocond")])
 
3166
 
 
3167
 (define_expand "movsf"
 
3168
@@ -6511,7 +6517,8 @@
 
3169
   [(set_attr "predicable" "yes")
 
3170
    (set_attr "type" "*,load1,store1")
 
3171
    (set_attr "insn" "mov,*,*")
 
3172
-   (set_attr "pool_range" "*,4096,*")
 
3173
+   (set_attr "arm_pool_range" "*,4096,*")
 
3174
+   (set_attr "thumb2_pool_range" "*,4094,*")
 
3175
    (set_attr "arm_neg_pool_range" "*,4084,*")
 
3176
    (set_attr "thumb2_neg_pool_range" "*,0,*")]
 
3177
 )
 
3178
@@ -6533,7 +6540,7 @@
 
3179
    mov\\t%0, %1"
 
3180
   [(set_attr "length" "2")
 
3181
    (set_attr "type" "*,load1,store1,load1,store1,*,*")
 
3182
-   (set_attr "pool_range" "*,*,*,1020,*,*,*")
 
3183
+   (set_attr "pool_range" "*,*,*,1018,*,*,*")
 
3184
    (set_attr "insn" "*,*,*,*,*,mov,mov")
 
3185
    (set_attr "conds" "clob,nocond,nocond,nocond,nocond,nocond,nocond")]
 
3186
 )
 
3187
@@ -6622,7 +6629,8 @@
 
3188
   "
 
3189
   [(set_attr "length" "8,12,16,8,8")
 
3190
    (set_attr "type" "*,*,*,load2,store2")
 
3191
-   (set_attr "pool_range" "*,*,*,1020,*")
 
3192
+   (set_attr "arm_pool_range" "*,*,*,1020,*")
 
3193
+   (set_attr "thumb2_pool_range" "*,*,*,1018,*")
 
3194
    (set_attr "arm_neg_pool_range" "*,*,*,1004,*")
 
3195
    (set_attr "thumb2_neg_pool_range" "*,*,*,0,*")]
 
3196
 )
 
3197
@@ -6665,7 +6673,7 @@
 
3198
   [(set_attr "length" "4,2,2,6,4,4")
 
3199
    (set_attr "type" "*,load2,store2,load2,store2,*")
 
3200
    (set_attr "insn" "*,*,*,*,*,mov")
 
3201
-   (set_attr "pool_range" "*,*,*,1020,*,*")]
 
3202
+   (set_attr "pool_range" "*,*,*,1018,*,*")]
 
3203
 )
 
3204
 
 
3205
 (define_expand "movxf"
 
3206
Index: gcc/config/arm/t-rtems-eabi
 
3207
===================================================================
 
3208
--- a/src/gcc/config/arm/t-rtems-eabi   (.../tags/gcc_4_7_3_release)
 
3209
+++ b/src/gcc/config/arm/t-rtems-eabi   (.../branches/gcc-4_7-branch)
 
3210
@@ -1,8 +1,47 @@
 
3211
 # Custom RTEMS EABI multilibs
 
3212
 
 
3213
-MULTILIB_OPTIONS    = mthumb march=armv6-m/march=armv7/march=armv7-m
 
3214
-MULTILIB_DIRNAMES   = thumb armv6-m armv7 armv7-m
 
3215
-MULTILIB_EXCEPTIONS = march=armv6-m march=armv7 march=armv7-m
 
3216
-MULTILIB_MATCHES    =
 
3217
-MULTILIB_EXCLUSIONS =
 
3218
-MULTILIB_OSDIRNAMES =
 
3219
+MULTILIB_OPTIONS  = mthumb march=armv6-m/march=armv7-a/march=armv7-r/march=armv7-m mfpu=neon mfloat-abi=hard
 
3220
+MULTILIB_DIRNAMES = thumb armv6-m armv7-a armv7-r armv7-m neon hard
 
3221
+
 
3222
+# Enumeration of multilibs
 
3223
+
 
3224
+MULTILIB_EXCEPTIONS =
 
3225
+MULTILIB_EXCEPTIONS += mthumb/march=armv6-m/mfpu=neon/mfloat-abi=hard
 
3226
+MULTILIB_EXCEPTIONS += mthumb/march=armv6-m/mfpu=neon
 
3227
+MULTILIB_EXCEPTIONS += mthumb/march=armv6-m/mfloat-abi=hard
 
3228
+# MULTILIB_EXCEPTIONS += mthumb/march=armv6-m
 
3229
+# MULTILIB_EXCEPTIONS += mthumb/march=armv7-a/mfpu=neon/mfloat-abi=hard
 
3230
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-a/mfpu=neon
 
3231
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-a/mfloat-abi=hard
 
3232
+# MULTILIB_EXCEPTIONS += mthumb/march=armv7-a
 
3233
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-r/mfpu=neon/mfloat-abi=hard
 
3234
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-r/mfpu=neon
 
3235
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-r/mfloat-abi=hard
 
3236
+# MULTILIB_EXCEPTIONS += mthumb/march=armv7-r
 
3237
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-m/mfpu=neon/mfloat-abi=hard
 
3238
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-m/mfpu=neon
 
3239
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-m/mfloat-abi=hard
 
3240
+# MULTILIB_EXCEPTIONS += mthumb/march=armv7-m
 
3241
+MULTILIB_EXCEPTIONS += mthumb/mfpu=neon/mfloat-abi=hard
 
3242
+MULTILIB_EXCEPTIONS += mthumb/mfpu=neon
 
3243
+MULTILIB_EXCEPTIONS += mthumb/mfloat-abi=hard
 
3244
+# MULTILIB_EXCEPTIONS += mthumb
 
3245
+MULTILIB_EXCEPTIONS += march=armv6-m/mfpu=neon/mfloat-abi=hard
 
3246
+MULTILIB_EXCEPTIONS += march=armv6-m/mfpu=neon
 
3247
+MULTILIB_EXCEPTIONS += march=armv6-m/mfloat-abi=hard
 
3248
+MULTILIB_EXCEPTIONS += march=armv6-m
 
3249
+MULTILIB_EXCEPTIONS += march=armv7-a/mfpu=neon/mfloat-abi=hard
 
3250
+MULTILIB_EXCEPTIONS += march=armv7-a/mfpu=neon
 
3251
+MULTILIB_EXCEPTIONS += march=armv7-a/mfloat-abi=hard
 
3252
+MULTILIB_EXCEPTIONS += march=armv7-a
 
3253
+MULTILIB_EXCEPTIONS += march=armv7-r/mfpu=neon/mfloat-abi=hard
 
3254
+MULTILIB_EXCEPTIONS += march=armv7-r/mfpu=neon
 
3255
+MULTILIB_EXCEPTIONS += march=armv7-r/mfloat-abi=hard
 
3256
+MULTILIB_EXCEPTIONS += march=armv7-r
 
3257
+MULTILIB_EXCEPTIONS += march=armv7-m/mfpu=neon/mfloat-abi=hard
 
3258
+MULTILIB_EXCEPTIONS += march=armv7-m/mfpu=neon
 
3259
+MULTILIB_EXCEPTIONS += march=armv7-m/mfloat-abi=hard
 
3260
+MULTILIB_EXCEPTIONS += march=armv7-m
 
3261
+MULTILIB_EXCEPTIONS += mfpu=neon/mfloat-abi=hard
 
3262
+MULTILIB_EXCEPTIONS += mfpu=neon
 
3263
+MULTILIB_EXCEPTIONS += mfloat-abi=hard
742
3264
Index: gcc/config/pa/pa.c
743
3265
===================================================================
744
3266
--- a/src/gcc/config/pa/pa.c    (.../tags/gcc_4_7_3_release)
754
3276
        }
755
3277
       crtl->uses_pic_offset_table = 1;
756
3278
       return reg;
 
3279
Index: gcc/config/v850/t-rtems
 
3280
===================================================================
 
3281
--- a/src/gcc/config/v850/t-rtems       (.../tags/gcc_4_7_3_release)
 
3282
+++ b/src/gcc/config/v850/t-rtems       (.../branches/gcc-4_7-branch)
 
3283
@@ -1,3 +1,7 @@
 
3284
 # Custom multilibs for RTEMS
 
3285
 
 
3286
+MULTILIB_OPTIONS  = mv850/mv850e/mv850e2/mv850e2v3
 
3287
+MULTILIB_DIRNAMES = v850 v850e v850e2 v850e2v3
 
3288
+MULTILIB_MATCHES  = mv850e=mv850e1 
 
3289
+
 
3290
 MULTILIB_MATCHES  += mv850e=mv850es
 
3291
Index: libgfortran/ChangeLog
 
3292
===================================================================
 
3293
--- a/src/libgfortran/ChangeLog (.../tags/gcc_4_7_3_release)
 
3294
+++ b/src/libgfortran/ChangeLog (.../branches/gcc-4_7-branch)
 
3295
@@ -1,3 +1,38 @@
 
3296
+2013-04-28  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
 
3297
+
 
3298
+       Backport from mainline:
 
3299
+       2013-03-20  Tilo Schwarz  <tilo@tilo-schwarz.de>
 
3300
+
 
3301
+       PR libfortran/51825
 
3302
+       * io/list_read.c (nml_read_obj): Don't end the component loop on a
 
3303
+       nested derived type, but continue with the next loop iteration.
 
3304
+       (nml_get_obj_data): Don't move the first_nl pointer further in the
 
3305
+       list if a qualifier was found.
 
3306
+
 
3307
+2013-04-28  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
 
3308
+
 
3309
+       Backport from mainline:
 
3310
+
 
3311
+       PR libfortran/56786
 
3312
+       * io/list_read.c (nml_parse_qualifier): Remove spurious next_char call
 
3313
+       when checking for EOF. Use error return mechanism when EOF detected.
 
3314
+       Do not return FAILURE unless parse_err_msg and parse_err_msg_size have
 
3315
+       been set. Use hit_eof.
 
3316
+       (nml_get_obj_data): Likewise use the correct error mechanism.
 
3317
+       * io/transfer.c (hit_eof): Do not set AFTER_ENDFILE if in namelist
 
3318
+       mode.
 
3319
+
 
3320
+2013-04-28  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
 
3321
+
 
3322
+       Backport from mainline:
 
3323
+       2013-03-25  Tilo Schwarz  <tilo@tilo-schwarz.de>
 
3324
+
 
3325
+       PR libfortran/52512
 
3326
+       * io/list_read.c (nml_parse_qualifier): To check for a derived type
 
3327
+       don't use the namelist head element type but the current element type.
 
3328
+       (nml_get_obj_data): Add current namelist element type to
 
3329
+       nml_parse_qualifier call.
 
3330
+
 
3331
 2013-04-11  Release Manager
 
3332
 
 
3333
        * GCC 4.7.3 released.
 
3334
Index: libgfortran/io/list_read.c
 
3335
===================================================================
 
3336
--- a/src/libgfortran/io/list_read.c    (.../tags/gcc_4_7_3_release)
 
3337
+++ b/src/libgfortran/io/list_read.c    (.../branches/gcc-4_7-branch)
 
3338
@@ -2028,8 +2028,8 @@
 
3339
 
 
3340
 static try
 
3341
 nml_parse_qualifier (st_parameter_dt *dtp, descriptor_dimension *ad,
 
3342
-                    array_loop_spec *ls, int rank, char *parse_err_msg,
 
3343
-                    size_t parse_err_msg_size,
 
3344
+                    array_loop_spec *ls, int rank, bt nml_elem_type,
 
3345
+                    char *parse_err_msg, size_t parse_err_msg_size,
 
3346
                     int *parsed_rank)
 
3347
 {
 
3348
   int dim;
 
3349
@@ -2053,7 +2053,7 @@
 
3350
   /* The next character in the stream should be the '('.  */
 
3351
 
 
3352
   if ((c = next_char (dtp)) == EOF)
 
3353
-    return FAILURE;
 
3354
+    goto err_ret;
 
3355
 
 
3356
   /* Process the qualifier, by dimension and triplet.  */
 
3357
 
 
3358
@@ -2067,7 +2067,7 @@
 
3359
 
 
3360
          /* Process a potential sign.  */
 
3361
          if ((c = next_char (dtp)) == EOF)
 
3362
-           return FAILURE;
 
3363
+           goto err_ret;
 
3364
          switch (c)
 
3365
            {
 
3366
            case '-':
 
3367
@@ -2085,11 +2085,12 @@
 
3368
          /* Process characters up to the next ':' , ',' or ')'.  */
 
3369
          for (;;)
 
3370
            {
 
3371
-             if ((c = next_char (dtp)) == EOF)
 
3372
-               return FAILURE;
 
3373
-
 
3374
+             c = next_char (dtp);
 
3375
              switch (c)
 
3376
                {
 
3377
+               case EOF:
 
3378
+                 goto err_ret;
 
3379
+
 
3380
                case ':':
 
3381
                   is_array_section = 1;
 
3382
                  break;
 
3383
@@ -2112,10 +2113,8 @@
 
3384
                  push_char (dtp, c);
 
3385
                  continue;
 
3386
 
 
3387
-               case ' ': case '\t':
 
3388
+               case ' ': case '\t': case '\r': case '\n':
 
3389
                  eat_spaces (dtp);
 
3390
-                 if ((c = next_char (dtp) == EOF))
 
3391
-                   return FAILURE;
 
3392
                  break;
 
3393
 
 
3394
                default:
 
3395
@@ -2204,7 +2203,7 @@
 
3396
                      do not allow excess data to be processed.  */
 
3397
                  if (is_array_section == 1
 
3398
                      || !(compile_options.allow_std & GFC_STD_GNU)
 
3399
-                     || dtp->u.p.ionml->type == BT_DERIVED)
 
3400
+                     || nml_elem_type == BT_DERIVED)
 
3401
                    ls[dim].end = ls[dim].start;
 
3402
                  else
 
3403
                    dtp->u.p.expanded_read = 1;
 
3404
@@ -2257,6 +2256,15 @@
 
3405
 
 
3406
 err_ret:
 
3407
 
 
3408
+  /* The EOF error message is issued by hit_eof. Return true so that the
 
3409
+     caller does not use parse_err_msg and parse_err_msg_size to generate
 
3410
+     an unrelated error message.  */
 
3411
+  if (c == EOF)
 
3412
+    {
 
3413
+      hit_eof (dtp);
 
3414
+      dtp->u.p.input_complete = 1;
 
3415
+      return SUCCESS;
 
3416
+    }
 
3417
   return FAILURE;
 
3418
 }
 
3419
 
 
3420
@@ -2553,17 +2561,17 @@
 
3421
               since a single object can have multiple reads.  */
 
3422
            dtp->u.p.expanded_read = 0;
 
3423
 
 
3424
-           /* Now loop over the components. Update the component pointer
 
3425
-              with the return value from nml_write_obj.  This loop jumps
 
3426
-              past nested derived types by testing if the potential
 
3427
-              component name contains '%'.  */
 
3428
+           /* Now loop over the components.  */
 
3429
 
 
3430
            for (cmp = nl->next;
 
3431
                 cmp &&
 
3432
-                  !strncmp (cmp->var_name, obj_name, obj_name_len) &&
 
3433
-                  !strchr (cmp->var_name + obj_name_len, '%');
 
3434
+                  !strncmp (cmp->var_name, obj_name, obj_name_len);
 
3435
                 cmp = cmp->next)
 
3436
              {
 
3437
+               /* Jump over nested derived type by testing if the potential
 
3438
+                  component name contains '%'.  */
 
3439
+               if (strchr (cmp->var_name + obj_name_len, '%'))
 
3440
+                   continue;
 
3441
 
 
3442
                if (nml_read_obj (dtp, cmp, (index_type)(pdata - nl->mem_pos),
 
3443
                                  pprev_nl, nml_err_msg, nml_err_msg_size,
 
3444
@@ -2726,12 +2734,12 @@
 
3445
     return SUCCESS;
 
3446
 
 
3447
   if ((c = next_char (dtp)) == EOF)
 
3448
-    return FAILURE;
 
3449
+    goto nml_err_ret;
 
3450
   switch (c)
 
3451
     {
 
3452
     case '=':
 
3453
       if ((c = next_char (dtp)) == EOF)
 
3454
-       return FAILURE;
 
3455
+       goto nml_err_ret;
 
3456
       if (c != '?')
 
3457
        {
 
3458
          snprintf (nml_err_msg, nml_err_msg_size, 
 
3459
@@ -2781,8 +2789,9 @@
 
3460
       if (!is_separator (c))
 
3461
        push_char (dtp, tolower(c));
 
3462
       if ((c = next_char (dtp)) == EOF)
 
3463
-       return FAILURE;
 
3464
-    } while (!( c=='=' || c==' ' || c=='\t' || c =='(' || c =='%' ));
 
3465
+       goto nml_err_ret;
 
3466
+    }
 
3467
+  while (!( c=='=' || c==' ' || c=='\t' || c =='(' || c =='%' ));
 
3468
 
 
3469
   unget_char (dtp, c);
 
3470
 
 
3471
@@ -2842,7 +2851,7 @@
 
3472
     {
 
3473
       parsed_rank = 0;
 
3474
       if (nml_parse_qualifier (dtp, nl->dim, nl->ls, nl->var_rank,
 
3475
-                              nml_err_msg, nml_err_msg_size, 
 
3476
+                              nl->type, nml_err_msg, nml_err_msg_size,
 
3477
                               &parsed_rank) == FAILURE)
 
3478
        {
 
3479
          char *nml_err_msg_end = strchr (nml_err_msg, '\0');
 
3480
@@ -2857,7 +2866,7 @@
 
3481
       qualifier_flag = 1;
 
3482
 
 
3483
       if ((c = next_char (dtp)) == EOF)
 
3484
-       return FAILURE;
 
3485
+       goto nml_err_ret;
 
3486
       unget_char (dtp, c);
 
3487
     }
 
3488
   else if (nl->var_rank > 0)
 
3489
@@ -2876,14 +2885,15 @@
 
3490
          goto nml_err_ret;
 
3491
        }
 
3492
 
 
3493
-      if (*pprev_nl == NULL || !component_flag)
 
3494
+      /* Don't move first_nl further in the list if a qualifier was found.  */
 
3495
+      if ((*pprev_nl == NULL && !qualifier_flag) || !component_flag)
 
3496
        first_nl = nl;
 
3497
 
 
3498
       root_nl = nl;
 
3499
 
 
3500
       component_flag = 1;
 
3501
       if ((c = next_char (dtp)) == EOF)
 
3502
-       return FAILURE;
 
3503
+       goto nml_err_ret;
 
3504
       goto get_name;
 
3505
     }
 
3506
 
 
3507
@@ -2898,8 +2908,8 @@
 
3508
       descriptor_dimension chd[1] = { {1, clow, nl->string_length} };
 
3509
       array_loop_spec ind[1] = { {1, clow, nl->string_length, 1} };
 
3510
 
 
3511
-      if (nml_parse_qualifier (dtp, chd, ind, -1, nml_err_msg, 
 
3512
-                              nml_err_msg_size, &parsed_rank)
 
3513
+      if (nml_parse_qualifier (dtp, chd, ind, -1, nl->type,
 
3514
+                              nml_err_msg, nml_err_msg_size, &parsed_rank)
 
3515
          == FAILURE)
 
3516
        {
 
3517
          char *nml_err_msg_end = strchr (nml_err_msg, '\0');
 
3518
@@ -2921,7 +2931,7 @@
 
3519
        }
 
3520
 
 
3521
       if ((c = next_char (dtp)) == EOF)
 
3522
-       return FAILURE;
 
3523
+       goto nml_err_ret;
 
3524
       unget_char (dtp, c);
 
3525
     }
 
3526
 
 
3527
@@ -2961,7 +2971,7 @@
 
3528
     return SUCCESS;
 
3529
 
 
3530
   if ((c = next_char (dtp)) == EOF)
 
3531
-    return FAILURE;
 
3532
+    goto nml_err_ret;
 
3533
 
 
3534
   if (c != '=')
 
3535
     {
 
3536
@@ -2996,6 +3006,17 @@
 
3537
 
 
3538
 nml_err_ret:
 
3539
 
 
3540
+  /* The EOF error message is issued by hit_eof. Return true so that the
 
3541
+     caller does not use nml_err_msg and nml_err_msg_size to generate
 
3542
+     an unrelated error message.  */
 
3543
+  if (c == EOF)
 
3544
+    {
 
3545
+      dtp->u.p.input_complete = 1;
 
3546
+      unget_char (dtp, c);
 
3547
+      hit_eof (dtp);
 
3548
+      return SUCCESS;
 
3549
+    }
 
3550
+
 
3551
   return FAILURE;
 
3552
 }
 
3553
 
 
3554
Index: libgfortran/io/transfer.c
 
3555
===================================================================
 
3556
--- a/src/libgfortran/io/transfer.c     (.../tags/gcc_4_7_3_release)
 
3557
+++ b/src/libgfortran/io/transfer.c     (.../branches/gcc-4_7-branch)
 
3558
@@ -3748,7 +3748,7 @@
 
3559
       case NO_ENDFILE:
 
3560
       case AT_ENDFILE:
 
3561
         generate_error (&dtp->common, LIBERROR_END, NULL);
 
3562
-       if (!is_internal_unit (dtp))
 
3563
+       if (!is_internal_unit (dtp) && !dtp->u.p.namelist_mode)
 
3564
          {
 
3565
            dtp->u.p.current_unit->endfile = AFTER_ENDFILE;
 
3566
            dtp->u.p.current_unit->current_record = 0;