1 Index: libstdc++-v3/ChangeLog
2 ===================================================================
3 --- libstdc++-v3/ChangeLog (.../tags/gcc_4_7_3_release) (revision 198690)
4 +++ libstdc++-v3/ChangeLog (.../branches/gcc-4_7-branch) (revision 198690)
6 +2013-04-15 Jack Howarth <howarth@bromo.med.uc.edu>
8 + Backport from mainline
10 + 2012-10-10 Jack Howarth <howarth@bromo.med.uc.edu>
11 + Jonathan Wakely <jwakely.gcc@gmail.com>
14 + * config/os/bsd/darwin/os_defines.h: Define _GLIBCXX_USE_NANOSLEEP
15 + and _GLIBCXX_USE_SCHED_YIELD.
16 + * acinclude.m4 (GLIBCXX_ENABLE_LIBSTDCXX_TIME): Add comment.
18 +2013-04-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
20 + * testsuite/30_threads/condition_variable/members/53841.cc: Add
21 + -std=gnu++0x -pthread on alpha*-*-osf*, mips-sgi-irix6*.
23 2013-04-11 Release Manager
26 Index: libstdc++-v3/testsuite/30_threads/condition_variable/members/53841.cc
27 ===================================================================
28 --- libstdc++-v3/testsuite/30_threads/condition_variable/members/53841.cc (.../tags/gcc_4_7_3_release) (revision 198690)
29 +++ libstdc++-v3/testsuite/30_threads/condition_variable/members/53841.cc (.../branches/gcc-4_7-branch) (revision 198690)
32 -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* powerpc-ibm-aix* hppa*-hp-hpux11* } }
33 +// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* hppa*-hp-hpux11* } }
34 // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } }
35 // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } }
36 // { dg-require-cstdint "" }
37 Index: libstdc++-v3/config/os/bsd/darwin/os_defines.h
38 ===================================================================
39 --- libstdc++-v3/config/os/bsd/darwin/os_defines.h (.../tags/gcc_4_7_3_release) (revision 198690)
40 +++ libstdc++-v3/config/os/bsd/darwin/os_defines.h (.../branches/gcc-4_7-branch) (revision 198690)
42 // Static initializer macro is buggy in darwin, see libstdc++/51906
43 #define _GTHREAD_USE_RECURSIVE_MUTEX_INIT_FUNC
45 +// Configure checks for nanosleep fail on Darwin, but nanosleep and
46 +// sched_yield are always available, so use them.
47 +#define _GLIBCXX_USE_NANOSLEEP 1
48 +#define _GLIBCXX_USE_SCHED_YIELD 1
51 Index: libstdc++-v3/acinclude.m4
52 ===================================================================
53 --- libstdc++-v3/acinclude.m4 (.../tags/gcc_4_7_3_release) (revision 198690)
54 +++ libstdc++-v3/acinclude.m4 (.../branches/gcc-4_7-branch) (revision 198690)
55 @@ -1132,6 +1132,11 @@
56 dnl --disable-libstdcxx-time
57 dnl disables the checks completely
59 +dnl N.B. Darwin provides nanosleep but doesn't support the whole POSIX
60 +dnl Timers option, so doesn't define _POSIX_TIMERS. Because the test
61 +dnl below fails Darwin unconditionally defines _GLIBCXX_USE_NANOSLEEP in
62 +dnl os_defines.h and also defines _GLIBCXX_USE_SCHED_YIELD.
64 AC_DEFUN([GLIBCXX_ENABLE_LIBSTDCXX_TIME], [
66 AC_MSG_CHECKING([for clock_gettime, nanosleep and sched_yield])
67 Index: libgcc/ChangeLog
68 ===================================================================
69 --- libgcc/ChangeLog (.../tags/gcc_4_7_3_release) (revision 198690)
70 +++ libgcc/ChangeLog (.../branches/gcc-4_7-branch) (revision 198690)
72 +2013-04-11 Julian Brown <julian@codesourcery.com>
74 + * config/arm/linux-atomic.c (SUBWORD_SYNC_OP, SUBWORD_VAL_CAS)
75 + (SUBWORD_TEST_AND_SET): Use signed char/short types instead of
76 + unsigned char/unsigned short.
77 + (__sync_val_compare_and_swap_{1,2}): Handle signed argument.
79 2013-04-11 Release Manager
82 Index: libgcc/config/arm/linux-atomic.c
83 ===================================================================
84 --- libgcc/config/arm/linux-atomic.c (.../tags/gcc_4_7_3_release) (revision 198690)
85 +++ libgcc/config/arm/linux-atomic.c (.../branches/gcc-4_7-branch) (revision 198690)
87 return (RETURN & mask) >> shift; \
90 -SUBWORD_SYNC_OP (add, , +, unsigned short, 2, oldval)
91 -SUBWORD_SYNC_OP (sub, , -, unsigned short, 2, oldval)
92 -SUBWORD_SYNC_OP (or, , |, unsigned short, 2, oldval)
93 -SUBWORD_SYNC_OP (and, , &, unsigned short, 2, oldval)
94 -SUBWORD_SYNC_OP (xor, , ^, unsigned short, 2, oldval)
95 -SUBWORD_SYNC_OP (nand, ~, &, unsigned short, 2, oldval)
96 +SUBWORD_SYNC_OP (add, , +, short, 2, oldval)
97 +SUBWORD_SYNC_OP (sub, , -, short, 2, oldval)
98 +SUBWORD_SYNC_OP (or, , |, short, 2, oldval)
99 +SUBWORD_SYNC_OP (and, , &, short, 2, oldval)
100 +SUBWORD_SYNC_OP (xor, , ^, short, 2, oldval)
101 +SUBWORD_SYNC_OP (nand, ~, &, short, 2, oldval)
103 -SUBWORD_SYNC_OP (add, , +, unsigned char, 1, oldval)
104 -SUBWORD_SYNC_OP (sub, , -, unsigned char, 1, oldval)
105 -SUBWORD_SYNC_OP (or, , |, unsigned char, 1, oldval)
106 -SUBWORD_SYNC_OP (and, , &, unsigned char, 1, oldval)
107 -SUBWORD_SYNC_OP (xor, , ^, unsigned char, 1, oldval)
108 -SUBWORD_SYNC_OP (nand, ~, &, unsigned char, 1, oldval)
109 +SUBWORD_SYNC_OP (add, , +, signed char, 1, oldval)
110 +SUBWORD_SYNC_OP (sub, , -, signed char, 1, oldval)
111 +SUBWORD_SYNC_OP (or, , |, signed char, 1, oldval)
112 +SUBWORD_SYNC_OP (and, , &, signed char, 1, oldval)
113 +SUBWORD_SYNC_OP (xor, , ^, signed char, 1, oldval)
114 +SUBWORD_SYNC_OP (nand, ~, &, signed char, 1, oldval)
116 #define OP_AND_FETCH_WORD(OP, PFX_OP, INF_OP) \
118 @@ -132,19 +132,19 @@
119 OP_AND_FETCH_WORD (xor, , ^)
120 OP_AND_FETCH_WORD (nand, ~, &)
122 -SUBWORD_SYNC_OP (add, , +, unsigned short, 2, newval)
123 -SUBWORD_SYNC_OP (sub, , -, unsigned short, 2, newval)
124 -SUBWORD_SYNC_OP (or, , |, unsigned short, 2, newval)
125 -SUBWORD_SYNC_OP (and, , &, unsigned short, 2, newval)
126 -SUBWORD_SYNC_OP (xor, , ^, unsigned short, 2, newval)
127 -SUBWORD_SYNC_OP (nand, ~, &, unsigned short, 2, newval)
128 +SUBWORD_SYNC_OP (add, , +, short, 2, newval)
129 +SUBWORD_SYNC_OP (sub, , -, short, 2, newval)
130 +SUBWORD_SYNC_OP (or, , |, short, 2, newval)
131 +SUBWORD_SYNC_OP (and, , &, short, 2, newval)
132 +SUBWORD_SYNC_OP (xor, , ^, short, 2, newval)
133 +SUBWORD_SYNC_OP (nand, ~, &, short, 2, newval)
135 -SUBWORD_SYNC_OP (add, , +, unsigned char, 1, newval)
136 -SUBWORD_SYNC_OP (sub, , -, unsigned char, 1, newval)
137 -SUBWORD_SYNC_OP (or, , |, unsigned char, 1, newval)
138 -SUBWORD_SYNC_OP (and, , &, unsigned char, 1, newval)
139 -SUBWORD_SYNC_OP (xor, , ^, unsigned char, 1, newval)
140 -SUBWORD_SYNC_OP (nand, ~, &, unsigned char, 1, newval)
141 +SUBWORD_SYNC_OP (add, , +, signed char, 1, newval)
142 +SUBWORD_SYNC_OP (sub, , -, signed char, 1, newval)
143 +SUBWORD_SYNC_OP (or, , |, signed char, 1, newval)
144 +SUBWORD_SYNC_OP (and, , &, signed char, 1, newval)
145 +SUBWORD_SYNC_OP (xor, , ^, signed char, 1, newval)
146 +SUBWORD_SYNC_OP (nand, ~, &, signed char, 1, newval)
149 __sync_val_compare_and_swap_4 (int *ptr, int oldval, int newval)
151 actual_oldval = *wordptr; \
153 if (__builtin_expect (((actual_oldval & mask) >> shift) != \
154 - (unsigned int) oldval, 0)) \
155 + ((unsigned int) oldval & MASK_##WIDTH), 0)) \
156 return (actual_oldval & mask) >> shift; \
158 actual_newval = (actual_oldval & ~mask) \
163 -SUBWORD_VAL_CAS (unsigned short, 2)
164 -SUBWORD_VAL_CAS (unsigned char, 1)
165 +SUBWORD_VAL_CAS (short, 2)
166 +SUBWORD_VAL_CAS (signed char, 1)
168 typedef unsigned char bool;
171 return (oldval == actual_oldval); \
174 -SUBWORD_BOOL_CAS (unsigned short, 2)
175 -SUBWORD_BOOL_CAS (unsigned char, 1)
176 +SUBWORD_BOOL_CAS (short, 2)
177 +SUBWORD_BOOL_CAS (signed char, 1)
180 __sync_synchronize (void)
182 return (oldval & mask) >> shift; \
185 -SUBWORD_TEST_AND_SET (unsigned short, 2)
186 -SUBWORD_TEST_AND_SET (unsigned char, 1)
187 +SUBWORD_TEST_AND_SET (short, 2)
188 +SUBWORD_TEST_AND_SET (signed char, 1)
190 #define SYNC_LOCK_RELEASE(TYPE, WIDTH) \
192 Index: gcc/doc/tm.texi
193 ===================================================================
194 --- gcc/doc/tm.texi (.../tags/gcc_4_7_3_release) (revision 198690)
195 +++ gcc/doc/tm.texi (.../branches/gcc-4_7-branch) (revision 198690)
196 @@ -9495,6 +9495,10 @@
197 True if the @code{.debug_pubtypes} and @code{.debug_pubnames} sections should be emitted. These sections are not used on most platforms, and in particular GDB does not use them.
200 +@deftypevr {Target Hook} bool TARGET_FORCE_AT_COMP_DIR
201 +True if the @code{DW_AT_comp_dir} attribute should be emitted for each compilation unit. This attribute is required for the darwin linker to emit debug information.
204 @deftypevr {Target Hook} bool TARGET_DELAY_SCHED2
205 True if sched2 is not to be run at its normal place. This usually means it will be run as part of machine-specific reorg.
207 Index: gcc/doc/tm.texi.in
208 ===================================================================
209 --- gcc/doc/tm.texi.in (.../tags/gcc_4_7_3_release) (revision 198690)
210 +++ gcc/doc/tm.texi.in (.../branches/gcc-4_7-branch) (revision 198690)
211 @@ -9388,6 +9388,8 @@
213 @hook TARGET_WANT_DEBUG_PUB_SECTIONS
215 +@hook TARGET_FORCE_AT_COMP_DIR
217 @hook TARGET_DELAY_SCHED2
219 @hook TARGET_DELAY_VARTRACK
220 Index: gcc/target.def
221 ===================================================================
222 --- gcc/target.def (.../tags/gcc_4_7_3_release) (revision 198690)
223 +++ gcc/target.def (.../branches/gcc-4_7-branch) (revision 198690)
224 @@ -2758,6 +2758,13 @@
229 + "True if the @code{DW_AT_comp_dir} attribute should be emitted for each \
230 + compilation unit. This attribute is required for the darwin linker \
231 + to emit debug information.",
235 (delay_sched2, "True if sched2 is not to be run at its normal place. \
236 This usually means it will be run as part of machine-specific reorg.",
239 ===================================================================
240 --- gcc/DATESTAMP (.../tags/gcc_4_7_3_release) (revision 198690)
241 +++ gcc/DATESTAMP (.../branches/gcc-4_7-branch) (revision 198690)
245 Index: gcc/builtins.c
246 ===================================================================
247 --- gcc/builtins.c (.../tags/gcc_4_7_3_release) (revision 198690)
248 +++ gcc/builtins.c (.../branches/gcc-4_7-branch) (revision 198690)
249 @@ -9692,7 +9692,16 @@
251 /* If arg is Inf or NaN and we're logb, return it. */
252 if (TREE_CODE (rettype) == REAL_TYPE)
253 - return fold_convert_loc (loc, rettype, arg);
255 + /* For logb(-Inf) we have to return +Inf. */
256 + if (real_isinf (value) && real_isneg (value))
258 + REAL_VALUE_TYPE tem;
260 + return build_real (rettype, tem);
262 + return fold_convert_loc (loc, rettype, arg);
264 /* Fall through... */
266 /* Zero may set errno and/or raise an exception for logb, also
268 ===================================================================
269 --- gcc/ChangeLog (.../tags/gcc_4_7_3_release) (revision 198690)
270 +++ gcc/ChangeLog (.../branches/gcc-4_7-branch) (revision 198690)
272 +2013-05-03 Marek Polacek <polacek@redhat.com>
274 + Backport from mainline
275 + 2013-04-25 Marek Polacek <polacek@redhat.com>
277 + PR tree-optimization/57066
278 + * builtins.c (fold_builtin_logb): Return +Inf for -Inf.
280 +2013-04-30 Uros Bizjak <ubizjak@gmail.com>
282 + Backport from mainline
283 + 2013-04-29 Uros Bizjak <ubizjak@gmail.com>
286 + * config/i386/i386.md (*zero_extendsidi2_rex64): Add "!" to m->?*y
288 + (*zero_extendsidi2): Ditto.
290 + Backport from mainline
291 + 2013-04-29 Uros Bizjak <ubizjak@gmail.com>
294 + * config/i386/i386.c (ix86_expand_vec_perm): Validize constant memory.
296 +2013-04-29 Christian Bruel <christian.bruel@st.com>
299 + * sh.md (tstsi_t_zero_extract_eq): Set mode for operand 0.
301 +2013-04-27 Jakub Jelinek <jakub@redhat.com>
304 + * config/i386/sse.md (xop_rotr<mode>3): Fix up computation of
305 + the immediate rotate count.
307 +2013-04-21 Eric Botcazou <ebotcazou@adacore.com>
309 + * cfgexpand.c (avoid_complex_debug_insns): Fix C++ism.
311 +2013-04-19 Matthias Klose <doko@ubuntu.com>
313 + PR middle-end/56848
315 + 2013-04-01 Andrey Belevantsev <abel@ispras.ru>
317 + Backport from mainline
318 + 2013-02-25 Andrey Belevantsev <abel@ispras.ru>
319 + Alexander Monakov <amonakov@ispras.ru>
321 + PR middle-end/56077
322 + * sched-deps.c (sched_analyze_insn): When reg_pending_barrier,
323 + flush pending lists also on non-jumps. Adjust comment.
326 + 2012-08-27 Maxim Kuvyrkov <maxim@codesourcery.com>
328 + * sched-deps.c (add_dependence_list_and_free): Simplify.
329 + (flush_pending_list_and_free): Fix a hack that was fixing a hack. Free
330 + lists when add_dependence_list_and_free doesn't free them.
332 +2013-04-19 Marek Polacek <polacek@redhat.com>
334 + Backport from mainline
335 + 2013-01-08 Steven Bosscher <steven@gcc.gnu.org>
336 + Jakub Jelinek <jakub@redhat.com>
338 + PR tree-optimization/48189
339 + * predict.c (predict_loops): If max is 0, don't call compare_tree_int.
340 + If nitercst is 0, don't predict the exit edge.
342 +2013-04-16 Jack Howarth <howarth@bromo.med.uc.edu>
344 + Backport from mainline
345 + 2012-05-29 Jack Howarth <howarth@bromo.med.uc.edu>
346 + * config/darwin.h (STARTFILE_SPEC): Use -no_new_main with -lgcrt1.o
348 + (DARWIN_CRT1_SPEC): Use -lcrt1.10.6.o when Darwin >= 10 and < 12.
351 + 2012-05-29 Jack Howarth <howarth@bromo.med.uc.edu>
353 + * doc/tm.texi: Update.
354 + * doc/tm.texi.in (SDB and DWARF) <TARGET_FORCE_AT_COMP_DIR>: Add @hook.
355 + * target.def (force_at_comp_dir): New hook.
356 + * config/darwin.h (TARGET_FORCE_AT_COMP_DIR): Define.
357 + * dwarf2out.c (dwarf2out_finish): Check targetm.force_at_comp_dir.
359 +2013-04-15 Eric Botcazou <ebotcazou@adacore.com>
362 + * config/sparc/sparc.c (enum sparc_mode_class): Add H_MODE value.
363 + (S_MODES): Set H_MODE bit.
364 + (SF_MODES): Set only S_MODE and SF_MODE bits.
365 + (DF_MODES): Set SF_MODES and only D_MODE and DF_MODE bits.
366 + (sparc_init_modes) <MODE_INT>: Set H_MODE bit for sub-word modes.
367 + <MODE_VECTOR_INT>: Do not set SF_MODE for sub-word modes.
368 + <MODE_FLOAT>: Likewise.
370 +2013-04-13 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
372 + Backport from mainline:
373 + 2013-04-06 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
376 + * config/pa/pa.c (legitimize_pic_address): Before incrementing label
377 + nuses, make sure we have a label.
379 +2013-04-11 Richard Biener <rguenther@suse.de>
381 + * BASE-VER: Set to 4.7.4.
382 + * DEV-PHASE: Set to prerelease.
384 2013-04-11 Release Manager
386 * GCC 4.7.3 released.
387 Index: gcc/testsuite/gcc.target/i386/pr44578.c
388 ===================================================================
389 --- gcc/testsuite/gcc.target/i386/pr44578.c (.../tags/gcc_4_7_3_release) (revision 0)
390 +++ gcc/testsuite/gcc.target/i386/pr44578.c (.../branches/gcc-4_7-branch) (revision 198690)
393 +/* { dg-options "-O2 -mtune=athlon64" } */
395 +extern void abort (void);
398 +__attribute__((noinline, noclone))
406 + __builtin_memcpy (&i, &num, sizeof(unsigned int));
408 + return (long double)(unsigned long long) i;
423 Index: gcc/testsuite/gcc.target/i386/pr56866.c
424 ===================================================================
425 --- gcc/testsuite/gcc.target/i386/pr56866.c (.../tags/gcc_4_7_3_release) (revision 0)
426 +++ gcc/testsuite/gcc.target/i386/pr56866.c (.../branches/gcc-4_7-branch) (revision 198690)
428 +/* PR target/56866 */
430 +/* { dg-require-effective-target xop } */
431 +/* { dg-options "-O3 -mxop" } */
433 +#define main xop_test_main
434 +#include "../../gcc.c-torture/execute/pr56866.c"
437 +#include "xop-check.h"
444 Index: gcc/testsuite/gcc.target/i386/pr57098.c
445 ===================================================================
446 --- gcc/testsuite/gcc.target/i386/pr57098.c (.../tags/gcc_4_7_3_release) (revision 0)
447 +++ gcc/testsuite/gcc.target/i386/pr57098.c (.../branches/gcc-4_7-branch) (revision 198690)
449 +/* { dg-do compile } */
450 +/* { dg-require-effective-target lp64 } */
451 +/* { dg-options "-msse4 -mcmodel=large" } */
453 +typedef int V __attribute__((vector_size(16)));
455 +void foo (V *p, V *mask)
457 + *p = __builtin_shuffle (*p, *mask);
459 Index: gcc/testsuite/gcc.target/sh/pr57108.c
460 ===================================================================
461 --- gcc/testsuite/gcc.target/sh/pr57108.c (.../tags/gcc_4_7_3_release) (revision 0)
462 +++ gcc/testsuite/gcc.target/sh/pr57108.c (.../branches/gcc-4_7-branch) (revision 198690)
464 +/* { dg-do compile { target "sh*-*-*" } } */
465 +/* { dg-options "-O1" } */
467 +void __assert_func (void) __attribute__ ((__noreturn__)) ;
469 +void ATATransfer (int num, int buffer)
475 + wordCount = num * 512 / sizeof (int);
477 + ((0 == (buffer & 63)) ? (void)0 : __assert_func () );
478 + ((0 == (wordCount & 31)) ? (void)0 : __assert_func ());
483 Index: gcc/testsuite/gfortran.dg/size_kind_3.f90
484 ===================================================================
485 --- gcc/testsuite/gfortran.dg/size_kind_3.f90 (.../tags/gcc_4_7_3_release) (revision 0)
486 +++ gcc/testsuite/gfortran.dg/size_kind_3.f90 (.../branches/gcc-4_7-branch) (revision 198690)
492 +integer :: B(huge(1)+3_8,2_8)
493 +integer(8) :: var1(2), var2, var3
495 +var1 = shape(B) ! { dg-error "SHAPE overflows its kind" }
496 +var2 = size(B) ! { dg-error "SIZE overflows its kind" }
497 +var3 = size(B,dim=1) ! { dg-error "SIZE overflows its kind" }
499 Index: gcc/testsuite/gfortran.dg/transfer_check_4.f90
500 ===================================================================
501 --- gcc/testsuite/gfortran.dg/transfer_check_4.f90 (.../tags/gcc_4_7_3_release) (revision 0)
502 +++ gcc/testsuite/gfortran.dg/transfer_check_4.f90 (.../branches/gcc-4_7-branch) (revision 198690)
505 +! { dg-options "-Wall" }
507 +! PR 57022: [4.7/4.8/4.9 Regression] Inappropriate warning for use of TRANSFER with arrays
508 +! Contributed by William Clodius <wclodius@los-alamos.net>
510 +subroutine transfers (test)
512 + use, intrinsic :: iso_fortran_env
514 + integer, intent(in) :: test
516 + integer(int8) :: test8(8) = 0
517 + integer(int16) :: test16(4) = 0
518 + integer(int32) :: test32(2) = 0
519 + integer(int64) :: test64 = 0
523 + test64 = transfer(test8, test64)
525 + test64 = transfer(test16, test64)
527 + test64 = transfer(test32, test64)
529 + test8 = transfer(test64, test8, 8)
531 + test16 = transfer(test64, test16, 4)
533 + test32 = transfer(test64, test32, 2)
539 +! PR 53685: surprising warns about transfer with explicit character range
540 +! Contributed by Jos de Kloe <kloedej@knmi.nl>
542 +subroutine mytest(byte_array,val)
543 + integer, parameter :: r8_ = Selected_Real_Kind(15,307) ! = real*8
544 + character(len=1), dimension(16), intent(in) :: byte_array
545 + real(r8_),intent(out) :: val
546 + val = transfer(byte_array(1:8),val)
548 Index: gcc/testsuite/gfortran.dg/namelist_77.f90
549 ===================================================================
550 --- gcc/testsuite/gfortran.dg/namelist_77.f90 (.../tags/gcc_4_7_3_release) (revision 0)
551 +++ gcc/testsuite/gfortran.dg/namelist_77.f90 (.../branches/gcc-4_7-branch) (revision 198690)
555 +! PR libfortran/51825 - Fortran runtime error: Cannot match namelist object name
556 +! Test case derived from PR.
569 + type beam_init_struct
570 + character(16) :: chars(1) = ''
571 + type (mytype1) dummy
572 + type (mytype2) grid(1)
577 +program error_namelist
583 + type (beam_init_struct) beam_init
585 + namelist / error_params / beam_init
587 + open (10, status='scratch')
588 + write (10, '(a)') "&error_params"
589 + write (10, '(a)') " beam_init%chars(1)='JUNK'"
590 + write (10, '(a)') " beam_init%grid(1)%n_x=3"
591 + write (10, '(a)') " beam_init%grid(1)%n_px=2"
592 + write (10, '(a)') "/"
594 + read(10, nml=error_params)
597 + if (beam_init%chars(1) /= 'JUNK') call abort
598 + if (beam_init%grid(1)%n_x /= 3) call abort
599 + if (beam_init%grid(1)%n_px /= 2) call abort
602 Index: gcc/testsuite/gfortran.dg/namelist_79.f90
603 ===================================================================
604 --- gcc/testsuite/gfortran.dg/namelist_79.f90 (.../tags/gcc_4_7_3_release) (revision 0)
605 +++ gcc/testsuite/gfortran.dg/namelist_79.f90 (.../branches/gcc-4_7-branch) (revision 198690)
608 +! PR libfortran/52512 - Cannot match namelist object name
609 +! Test case derived from PR.
615 + integer :: getal, jn
617 + character(len = 8) :: sname !: short name
618 + logical :: lini !: read in a file or not
620 + type(ptracer) , dimension(3) :: tracer
621 + namelist/namtoptrc/ getal,tracer
626 + tracer(jn)%sname = 'default_name'
627 + tracer(jn)%lini = .false.
630 + open (10, status='scratch')
631 + write (10, '(a)') "&namtoptrc"
632 + write (10, '(a)') " getal = 7"
633 + write (10, '(a)') " tracer(1) = 'DIC ', .true."
634 + write (10, '(a)') " tracer(2) = 'Alkalini', .true."
635 + write (10, '(a)') " tracer(3) = 'O2 ', .true."
636 + write (10, '(a)') "/"
638 + read(10, nml=namtoptrc)
641 + if (getal /= 7) call abort
642 + if (tracer(1)%sname /= 'DIC ') call abort
643 + if (tracer(2)%sname /= 'Alkalini') call abort
644 + if (tracer(3)%sname /= 'O2 ') call abort
645 + if (.not. tracer(1)%lini) call abort
646 + if (.not. tracer(2)%lini) call abort
647 + if (.not. tracer(3)%lini) call abort
650 Index: gcc/testsuite/gfortran.dg/size_kind_2.f90
651 ===================================================================
652 --- gcc/testsuite/gfortran.dg/size_kind_2.f90 (.../tags/gcc_4_7_3_release) (revision 0)
653 +++ gcc/testsuite/gfortran.dg/size_kind_2.f90 (.../branches/gcc-4_7-branch) (revision 198690)
656 +! { dg-options "-fdump-tree-original" }
660 +integer :: B(huge(1)+3_8,2_8)
661 +integer(8) :: var1(2), var2, var3
663 +var1 = shape(B,kind=8)
664 +var2 = size(B,kind=8)
665 +var3 = size(B,dim=1,kind=8)
668 +! { dg-final { scan-tree-dump "static integer.kind=8. A..\\\[2\\\] = \\\{2147483650, 2\\\};" "original" } }
669 +! { dg-final { scan-tree-dump "var2 = 4294967300;" "original" } }
670 +! { dg-final { scan-tree-dump "var3 = 2147483650;" "original" } }
671 +! { dg-final { cleanup-tree-dump "original" } }
672 Index: gcc/testsuite/gfortran.dg/proc_ptr_41.f90
673 ===================================================================
674 --- gcc/testsuite/gfortran.dg/proc_ptr_41.f90 (.../tags/gcc_4_7_3_release) (revision 0)
675 +++ gcc/testsuite/gfortran.dg/proc_ptr_41.f90 (.../branches/gcc-4_7-branch) (revision 198690)
679 +! PR 56968: [4.7/4.8/4.9 Regression] [F03] Issue with a procedure defined with a generic name returning procedure pointer
681 +! Contributed by Samuel Debionne <samuel.debionne@ujf-grenoble.fr>
685 + interface generic_name_get_proc_ptr
686 + module procedure specific_name_get_proc_ptr
690 + double precision function foo(arg1)
691 + real, intent(in) :: arg1
697 + function specific_name_get_proc_ptr() result(res)
698 + procedure(foo), pointer :: res
706 + procedure(foo), pointer :: ptr
708 + ptr => specific_name_get_proc_ptr()
709 + ptr => generic_name_get_proc_ptr()
713 +! { dg-final { cleanup-modules "test" } }
714 Index: gcc/testsuite/gfortran.dg/namelist_81.f90
715 ===================================================================
716 --- gcc/testsuite/gfortran.dg/namelist_81.f90 (.../tags/gcc_4_7_3_release) (revision 0)
717 +++ gcc/testsuite/gfortran.dg/namelist_81.f90 (.../branches/gcc-4_7-branch) (revision 198690)
720 +! PR56786 Error on embedded spaces
725 +open(99,status='scratch')
726 +write(99,'(a)') '&nml i(3 ) = 5 /'
730 +if (i(1)/=-42 .or. i(2)/=-42 .or. i(3)/=5) call abort()
732 +! Shorten the file so the read hits EOF
734 +open(99,status='scratch')
735 +write(99,'(a)') '&nml i(3 ) = 5 '
737 +read(99,nml=nml, end=30)
741 +open(99,status='scratch')
742 +write(99,'(a)') '&nml i(3 ) ='
744 +read(99,nml=nml, end=40)
748 +open(99,status='scratch')
749 +write(99,'(a)') '&nml i(3 )'
751 +read(99,nml=nml, end=50)
755 +open(99,status='scratch')
756 +write(99,'(a)') '&nml i(3 '
758 +read(99,nml=nml, end=60)
762 Index: gcc/testsuite/gfortran.dg/namelist_78.f90
763 ===================================================================
764 --- gcc/testsuite/gfortran.dg/namelist_78.f90 (.../tags/gcc_4_7_3_release) (revision 0)
765 +++ gcc/testsuite/gfortran.dg/namelist_78.f90 (.../branches/gcc-4_7-branch) (revision 198690)
769 +! PR libfortran/51825
770 +! Test case regarding namelist problems with derived types
787 + namelist /nmlst/ der
789 + open (10, status='scratch')
790 + write (10, '(a)') "&NMLST"
791 + write (10, '(a)') " DER%D(1)%K%J = 1,"
792 + write (10, '(a)') " DER%D(2)%K%J = 2,"
793 + write (10, '(a)') "/"
795 + read(10, nml=nmlst)
798 + if (der%d(1)%k%j /= 1) call abort
799 + if (der%d(2)%k%j /= 2) call abort
800 +end program namelist
801 Index: gcc/testsuite/gcc.c-torture/execute/pr56866.c
802 ===================================================================
803 --- gcc/testsuite/gcc.c-torture/execute/pr56866.c (.../tags/gcc_4_7_3_release) (revision 0)
804 +++ gcc/testsuite/gcc.c-torture/execute/pr56866.c (.../branches/gcc-4_7-branch) (revision 198690)
806 +/* PR target/56866 */
811 +#if __CHAR_BIT__ == 8 && __SIZEOF_LONG_LONG__ == 8 && __SIZEOF_INT__ == 4 && __SIZEOF_SHORT__ == 2
812 + unsigned long long wq[256], rq[256];
813 + unsigned int wi[256], ri[256];
814 + unsigned short ws[256], rs[256];
815 + unsigned char wc[256], rc[256];
818 + __builtin_memset (wq, 0, sizeof wq);
819 + __builtin_memset (wi, 0, sizeof wi);
820 + __builtin_memset (ws, 0, sizeof ws);
821 + __builtin_memset (wc, 0, sizeof wc);
822 + wq[0] = 0x0123456789abcdefULL;
823 + wi[0] = 0x01234567;
827 + asm volatile ("" : : "g" (wq), "g" (wi), "g" (ws), "g" (wc) : "memory");
829 + for (t = 0; t < 256; ++t)
830 + rq[t] = (wq[t] >> 8) | (wq[t] << (sizeof (wq[0]) * __CHAR_BIT__ - 8));
831 + for (t = 0; t < 256; ++t)
832 + ri[t] = (wi[t] >> 8) | (wi[t] << (sizeof (wi[0]) * __CHAR_BIT__ - 8));
833 + for (t = 0; t < 256; ++t)
834 + rs[t] = (ws[t] >> 9) | (ws[t] << (sizeof (ws[0]) * __CHAR_BIT__ - 9));
835 + for (t = 0; t < 256; ++t)
836 + rc[t] = (wc[t] >> 5) | (wc[t] << (sizeof (wc[0]) * __CHAR_BIT__ - 5));
838 + asm volatile ("" : : "g" (rq), "g" (ri), "g" (rs), "g" (rc) : "memory");
840 + if (rq[0] != 0xef0123456789abcdULL || rq[1])
841 + __builtin_abort ();
842 + if (ri[0] != 0x67012345 || ri[1])
843 + __builtin_abort ();
844 + if (rs[0] != 0xb3a2 || rs[1])
845 + __builtin_abort ();
846 + if (rc[0] != 0x9b || rc[1])
847 + __builtin_abort ();
851 Index: gcc/testsuite/gcc.dg/pr56890-2.c
852 ===================================================================
853 --- gcc/testsuite/gcc.dg/pr56890-2.c (.../tags/gcc_4_7_3_release) (revision 0)
854 +++ gcc/testsuite/gcc.dg/pr56890-2.c (.../branches/gcc-4_7-branch) (revision 198690)
856 +/* PR target/56890 */
857 +/* Reported by Rainer Jung <rainer.jung@kippdata.de> */
859 +/* { dg-do assemble } */
860 +/* { dg-options "-O" } */
862 +unsigned int buggy(unsigned int min, unsigned int max)
864 + unsigned int number;
866 + unsigned short num16;
867 + num16 = min + (long) ((double) (max - min + 1.0) * (num16 / (65535 + 1.0)));
871 + (number) = min + (long) ((double) (max - min + 1.0) * (number / (4294967295U + 1.0)));
875 Index: gcc/testsuite/gcc.dg/pr48189.c
876 ===================================================================
877 --- gcc/testsuite/gcc.dg/pr48189.c (.../tags/gcc_4_7_3_release) (revision 0)
878 +++ gcc/testsuite/gcc.dg/pr48189.c (.../branches/gcc-4_7-branch) (revision 198690)
880 +/* PR tree-optimization/48189 */
881 +/* { dg-do compile } */
882 +/* { dg-options "-O --param max-predicted-iterations=0" } */
884 +struct S { int s[8]; };
887 +foo (int *x, struct S *y)
890 + for (i = 0; y[i].s[i]; i++)
893 Index: gcc/testsuite/gcc.dg/torture/builtin-logb-1.c
894 ===================================================================
895 --- gcc/testsuite/gcc.dg/torture/builtin-logb-1.c (.../tags/gcc_4_7_3_release) (revision 198690)
896 +++ gcc/testsuite/gcc.dg/torture/builtin-logb-1.c (.../branches/gcc-4_7-branch) (revision 198690)
898 /* Test if FUNCRES(FUNC(NEG FUNCARG(ARGARG))) is false. Check the
901 -#define TESTIT3(FUNC,NEG,FUNCARG,ARGARG,FUNCRES) do { \
902 +#define TESTIT3(FUNC,NEG,FUNCARG,ARGARG,FUNCRES,NEG2) do { \
903 if (!__builtin_##FUNCRES##f(__builtin_##FUNC(NEG __builtin_##FUNCARG##f(ARGARG))) \
904 - || CKSGN_F(__builtin_##FUNC##f(NEG __builtin_##FUNCARG##f(ARGARG)), NEG __builtin_##FUNCARG##f(ARGARG))) \
905 + || CKSGN_F(__builtin_##FUNC##f(NEG __builtin_##FUNCARG##f(ARGARG)), NEG2 __builtin_##FUNCARG##f(ARGARG))) \
906 link_error(__LINE__); \
907 if (!__builtin_##FUNCRES(__builtin_##FUNC(NEG __builtin_##FUNCARG(ARGARG))) \
908 - || CKSGN(__builtin_##FUNC(NEG __builtin_##FUNCARG(ARGARG)), NEG __builtin_##FUNCARG(ARGARG))) \
909 + || CKSGN(__builtin_##FUNC(NEG __builtin_##FUNCARG(ARGARG)), NEG2 __builtin_##FUNCARG(ARGARG))) \
910 link_error(__LINE__); \
911 if (!__builtin_##FUNCRES##l(__builtin_##FUNC##l(NEG __builtin_##FUNCARG##l(ARGARG))) \
912 - || CKSGN_L(__builtin_##FUNC##l(NEG __builtin_##FUNCARG##l(ARGARG)), NEG __builtin_##FUNCARG##l(ARGARG))) \
913 + || CKSGN_L(__builtin_##FUNC##l(NEG __builtin_##FUNCARG##l(ARGARG)), NEG2 __builtin_##FUNCARG##l(ARGARG))) \
914 link_error(__LINE__); \
917 -#define TESTIT3(FUNC,NEG,FUNCARG,ARGARG,FUNCRES) do { \
918 +#define TESTIT3(FUNC,NEG,FUNCARG,ARGARG,FUNCRES,NEG2) do { \
919 /* SPU single-precision floating point format does not support Inf or Nan. */ \
920 if (!__builtin_##FUNCRES(__builtin_##FUNC(NEG __builtin_##FUNCARG(ARGARG))) \
921 - || CKSGN(__builtin_##FUNC(NEG __builtin_##FUNCARG(ARGARG)), NEG __builtin_##FUNCARG(ARGARG))) \
922 + || CKSGN(__builtin_##FUNC(NEG __builtin_##FUNCARG(ARGARG)), NEG2 __builtin_##FUNCARG(ARGARG))) \
923 link_error(__LINE__); \
924 if (!__builtin_##FUNCRES##l(__builtin_##FUNC##l(NEG __builtin_##FUNCARG##l(ARGARG))) \
925 - || CKSGN_L(__builtin_##FUNC##l(NEG __builtin_##FUNCARG##l(ARGARG)), NEG __builtin_##FUNCARG##l(ARGARG))) \
926 + || CKSGN_L(__builtin_##FUNC##l(NEG __builtin_##FUNCARG##l(ARGARG)), NEG2 __builtin_##FUNCARG##l(ARGARG))) \
927 link_error(__LINE__); \
930 @@ -173,15 +173,15 @@
932 /* Test for f(+-Inf) -> +-Inf and f(+-NaN) -> +-NaN, regardless of
934 - TESTIT3 (logb, ,inf, , isinf);
935 - TESTIT3 (logb, - ,inf, , isinf);
936 - TESTIT3 (logb, ,nan, "", isnan);
937 - TESTIT3 (logb, - ,nan, "", isnan);
938 + TESTIT3 (logb, ,inf, , isinf, );
939 + TESTIT3 (logb, - ,inf, , isinf, );
940 + TESTIT3 (logb, ,nan, "", isnan, );
941 + TESTIT3 (logb, - ,nan, "", isnan, -);
943 - TESTIT3 (significand, ,inf, , isinf);
944 - TESTIT3 (significand, - ,inf, , isinf);
945 - TESTIT3 (significand, ,nan, "", isnan);
946 - TESTIT3 (significand, - ,nan, "", isnan);
947 + TESTIT3 (significand, ,inf, , isinf, );
948 + TESTIT3 (significand, - ,inf, , isinf, -);
949 + TESTIT3 (significand, ,nan, "", isnan, );
950 + TESTIT3 (significand, - ,nan, "", isnan, -);
954 Index: gcc/testsuite/gcc.dg/torture/pr53922.c
955 ===================================================================
956 --- gcc/testsuite/gcc.dg/torture/pr53922.c (.../tags/gcc_4_7_3_release) (revision 198690)
957 +++ gcc/testsuite/gcc.dg/torture/pr53922.c (.../branches/gcc-4_7-branch) (revision 198690)
960 /* { dg-require-weak "" } */
961 -/* { dg-skip-if "No undefined weak" { hppa*-*-hpux* && { ! lp64 } } { "*" } { "" } } */
962 +/* { dg-skip-if "No undefined weak" { alpha*-*-osf* } } */
963 +/* { dg-skip-if "No undefined weak" { hppa*-*-hpux* && { ! lp64 } } } */
967 Index: gcc/testsuite/gcc.dg/pr56890-1.c
968 ===================================================================
969 --- gcc/testsuite/gcc.dg/pr56890-1.c (.../tags/gcc_4_7_3_release) (revision 0)
970 +++ gcc/testsuite/gcc.dg/pr56890-1.c (.../branches/gcc-4_7-branch) (revision 198690)
972 +/* PR target/56890 */
973 +/* Reported by Rainer Jung <rainer.jung@kippdata.de> */
975 +/* { dg-do assemble } */
976 +/* { dg-options "-O2" } */
978 +unsigned int buggy(unsigned int min, unsigned int max)
981 + unsigned short num16 = 0;
982 + num16 = min + (long) ((double) (max - min + 1.0) * (num16 / (65535 + 1.0)));
987 Index: gcc/testsuite/ChangeLog
988 ===================================================================
989 --- gcc/testsuite/ChangeLog (.../tags/gcc_4_7_3_release) (revision 198690)
990 +++ gcc/testsuite/ChangeLog (.../branches/gcc-4_7-branch) (revision 198690)
992 +2013-05-07 Tobias Burnus <burnus@net-b.de>
994 + Backport from mainline
995 + 2013-05-02 Tobias Burnus <burnus@net-b.de>
998 + * gfortran.dg/size_kind_2.f90: New.
999 + * gfortran.dg/size_kind_3.f90: New.
1001 +2013-05-03 Marek Polacek <polacek@redhat.com>
1003 + Backport from mainline
1004 + 2013-04-25 Marek Polacek <polacek@redhat.com>
1006 + PR tree-optimization/57066
1007 + * gcc.dg/torture/builtin-logb-1.c: Adjust testcase.
1009 +2013-04-30 Uros Bizjak <ubizjak@gmail.com>
1011 + Backport from mainline
1012 + 2013-04-29 Uros Bizjak <ubizjak@gmail.com>
1015 + * gcc.target/i386/pr44578.c: New test.
1017 + Backport from mainline
1018 + 2013-04-29 Uros Bizjak <ubizjak@gmail.com>
1021 + * gcc.target/i386/pr57098.c: New test.
1023 +2013-04-29 Christian Bruel <christian.bruel@st.com>
1026 + * gcc.target/sh/pr57108.c: New test.
1028 +2013-04-28 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1030 + Backport from trunk:
1033 + * gfortran.dg/namelist_77.f90: New test.
1034 + * gfortran.dg/namelist_78.f90: New test.
1036 +2013-04-28 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1038 + Backport from trunk:
1041 + * gfortran.dg/namelist_81.f90: New test.
1043 +2013-04-28 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1045 + Backport from trunk:
1048 + * gfortran.dg/namelist_79.f90: New test.
1050 +2013-04-27 Jakub Jelinek <jakub@redhat.com>
1053 + * gcc.c-torture/execute/pr56866.c: New test.
1054 + * gcc.target/i386/pr56866.c: New test.
1056 +2013-04-26 Janus Weil <janus@gcc.gnu.org>
1058 + Backports from trunk:
1061 + * gfortran.dg/proc_ptr_41.f90: New.
1065 + * gfortran.dg/transfer_check_4.f90: New.
1067 +2013-04-19 Marek Polacek <polacek@redhat.com>
1069 + Backport from mainline
1070 + 2013-01-08 Steven Bosscher <steven@gcc.gnu.org>
1071 + Jakub Jelinek <jakub@redhat.com>
1073 + PR tree-optimization/48189
1074 + * gcc.dg/pr48189.c: New test.
1076 +2013-04-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1078 + * gcc.dg/torture/pr53922.c: Skip on alpha*-*-osf*.
1079 + Remove dg-skip-if default args.
1081 +2013-04-15 Eric Botcazou <ebotcazou@adacore.com>
1083 + * gcc.dg/pr56890-1.c: New test.
1084 + * gcc.dg/pr56890-2.c: Likewise.
1086 2013-04-11 Release Manager
1088 * GCC 4.7.3 released.
1089 Index: gcc/testsuite/g++.dg/cpp0x/lambda/lambda-eh3.C
1090 ===================================================================
1091 --- gcc/testsuite/g++.dg/cpp0x/lambda/lambda-eh3.C (.../tags/gcc_4_7_3_release) (revision 0)
1092 +++ gcc/testsuite/g++.dg/cpp0x/lambda/lambda-eh3.C (.../branches/gcc-4_7-branch) (revision 198690)
1095 +// { dg-require-effective-target c++11 }
1099 + bool /*const*/ condition = false;
1108 Index: gcc/cp/ChangeLog
1109 ===================================================================
1110 --- gcc/cp/ChangeLog (.../tags/gcc_4_7_3_release) (revision 198690)
1111 +++ gcc/cp/ChangeLog (.../branches/gcc-4_7-branch) (revision 198690)
1113 +2013-04-21 Eric Botcazou <ebotcazou@adacore.com>
1115 + * parser.c (cp_parser_late_return_type_opt): Fix C++ism.
1117 +2013-04-15 Jason Merrill <jason@redhat.com>
1120 + * semantics.c (insert_capture_proxy): Just use index 1 in the
1123 2013-04-11 Release Manager
1125 * GCC 4.7.3 released.
1126 Index: gcc/cp/semantics.c
1127 ===================================================================
1128 --- gcc/cp/semantics.c (.../tags/gcc_4_7_3_release) (revision 198690)
1129 +++ gcc/cp/semantics.c (.../branches/gcc-4_7-branch) (revision 198690)
1130 @@ -8959,13 +8959,12 @@
1131 insert_capture_proxy (tree var)
1133 cp_binding_level *b;
1137 /* Put the capture proxy in the extra body block so that it won't clash
1138 with a later local variable. */
1139 b = current_binding_level;
1140 - for (skip = 0; ; ++skip)
1143 cp_binding_level *n = b->level_chain;
1144 if (n->kind == sk_function_parms)
1145 @@ -8976,8 +8975,7 @@
1147 /* And put a DECL_EXPR in the STATEMENT_LIST for the same block. */
1148 var = build_stmt (DECL_SOURCE_LOCATION (var), DECL_EXPR, var);
1149 - stmt_list = VEC_index (tree, stmt_list_stack,
1150 - VEC_length (tree, stmt_list_stack) - 1 - skip);
1151 + stmt_list = VEC_index (tree, stmt_list_stack, 1);
1152 gcc_assert (stmt_list);
1153 append_to_statement_list_force (var, &stmt_list);
1155 Index: gcc/cp/parser.c
1156 ===================================================================
1157 --- gcc/cp/parser.c (.../tags/gcc_4_7_3_release) (revision 198690)
1158 +++ gcc/cp/parser.c (.../branches/gcc-4_7-branch) (revision 198690)
1159 @@ -16691,7 +16691,7 @@
1160 cp_parser_late_return_type_opt (cp_parser* parser, cp_cv_quals quals)
1164 + tree type, save_ccp, save_ccr;
1166 /* Peek at the next token. */
1167 token = cp_lexer_peek_token (parser->lexer);
1168 @@ -16702,8 +16702,8 @@
1169 /* Consume the ->. */
1170 cp_lexer_consume_token (parser->lexer);
1172 - tree save_ccp = current_class_ptr;
1173 - tree save_ccr = current_class_ref;
1174 + save_ccp = current_class_ptr;
1175 + save_ccr = current_class_ref;
1178 /* DR 1207: 'this' is in scope in the trailing return type. */
1179 Index: gcc/dwarf2out.c
1180 ===================================================================
1181 --- gcc/dwarf2out.c (.../tags/gcc_4_7_3_release) (revision 198690)
1182 +++ gcc/dwarf2out.c (.../branches/gcc-4_7-branch) (revision 198690)
1183 @@ -22538,7 +22538,7 @@
1184 /* Add the name for the main input file now. We delayed this from
1185 dwarf2out_init to avoid complications with PCH. */
1186 add_name_attribute (comp_unit_die (), remap_debug_filename (filename));
1187 - if (!IS_ABSOLUTE_PATH (filename))
1188 + if (!IS_ABSOLUTE_PATH (filename) || targetm.force_at_comp_dir)
1189 add_comp_dir_attribute (comp_unit_die ());
1190 else if (get_AT (comp_unit_die (), DW_AT_comp_dir) == NULL)
1192 Index: gcc/predict.c
1193 ===================================================================
1194 --- gcc/predict.c (.../tags/gcc_4_7_3_release) (revision 198690)
1195 +++ gcc/predict.c (.../branches/gcc-4_7-branch) (revision 198690)
1197 if (TREE_CODE (niter) == INTEGER_CST)
1199 if (host_integerp (niter, 1)
1200 - && compare_tree_int (niter, max-1) == -1)
1202 + && compare_tree_int (niter, max - 1) == -1)
1203 nitercst = tree_low_cst (niter, 1) + 1;
1206 @@ -1005,6 +1006,11 @@
1210 + /* If the prediction for number of iterations is zero, do not
1211 + predict the exit edges. */
1212 + if (nitercst == 0)
1215 probability = ((REG_BR_PROB_BASE + nitercst / 2) / nitercst);
1216 predict_edge (ex, predictor, probability);
1218 Index: gcc/fortran/ChangeLog
1219 ===================================================================
1220 --- gcc/fortran/ChangeLog (.../tags/gcc_4_7_3_release) (revision 198690)
1221 +++ gcc/fortran/ChangeLog (.../branches/gcc-4_7-branch) (revision 198690)
1223 +2013-05-07 Tobias Burnus <burnus@net-b.de>
1225 + Backport from mainline
1226 + 2013-05-02 Tobias Burnus <burnus@net-b.de>
1229 + * simplify.c (gfc_simplify_size): Renamed from
1230 + simplify_size; fix kind=8 handling.
1231 + (gfc_simplify_size): New function.
1232 + (gfc_simplify_shape): Add range check.
1233 + * resolve.c (resolve_function): Fix handling
1236 +2013-04-26 Janus Weil <janus@gcc.gnu.org>
1238 + Backports from trunk:
1241 + * expr.c (gfc_check_pointer_assign): Handle generic functions returning
1242 + procedure pointers.
1246 + * check.c (gfc_calculate_transfer_sizes): Fix for array-valued SOURCE
1248 + * target-memory.h (gfc_element_size): New prototype.
1249 + * target-memory.c (size_array): Remove.
1250 + (gfc_element_size): New function.
1251 + (gfc_target_expr_size): Modified to always return the full size of the
1254 +2013-04-18 Tobias Burnus <burnus@net-b.de>
1257 + * invoke.texi (NEAREST): S argument is not optional.
1259 2013-04-11 Release Manager
1261 * GCC 4.7.3 released.
1262 Index: gcc/fortran/expr.c
1263 ===================================================================
1264 --- gcc/fortran/expr.c (.../tags/gcc_4_7_3_release) (revision 198690)
1265 +++ gcc/fortran/expr.c (.../branches/gcc-4_7-branch) (revision 198690)
1266 @@ -3493,8 +3493,12 @@
1268 else if (rvalue->expr_type == EXPR_FUNCTION)
1270 - s2 = rvalue->symtree->n.sym->result;
1271 - name = rvalue->symtree->n.sym->result->name;
1272 + if (rvalue->value.function.esym)
1273 + s2 = rvalue->value.function.esym->result;
1275 + s2 = rvalue->symtree->n.sym->result;
1281 Index: gcc/fortran/resolve.c
1282 ===================================================================
1283 --- gcc/fortran/resolve.c (.../tags/gcc_4_7_3_release) (revision 198690)
1284 +++ gcc/fortran/resolve.c (.../branches/gcc-4_7-branch) (revision 198690)
1285 @@ -3155,6 +3155,7 @@
1286 for (arg = expr->value.function.actual; arg; arg = arg->next)
1288 if ((GENERIC_ID == GFC_ISYM_UBOUND || GENERIC_ID == GFC_ISYM_SIZE)
1289 + && arg == expr->value.function.actual
1290 && arg->next != NULL && arg->next->expr)
1292 if (arg->next->expr->expr_type != EXPR_CONSTANT)
1293 Index: gcc/fortran/target-memory.c
1294 ===================================================================
1295 --- gcc/fortran/target-memory.c (.../tags/gcc_4_7_3_release) (revision 198690)
1296 +++ gcc/fortran/target-memory.c (.../branches/gcc-4_7-branch) (revision 198690)
1298 /* --------------------------------------------------------------- */
1299 /* Calculate the size of an expression. */
1302 -size_array (gfc_expr *e)
1305 - gfc_constructor *c = gfc_constructor_first (e->value.constructor);
1306 - size_t elt_size = gfc_target_expr_size (c->expr);
1308 - gfc_array_size (e, &array_size);
1309 - return (size_t)mpz_get_ui (array_size) * elt_size;
1313 size_integer (int kind)
1319 +/* Return the size of a single element of the given expression.
1320 + Identical to gfc_target_expr_size for scalars. */
1323 -gfc_target_expr_size (gfc_expr *e)
1324 +gfc_element_size (gfc_expr *e)
1328 - gcc_assert (e != NULL);
1330 - if (e->expr_type == EXPR_ARRAY)
1331 - return size_array (e);
1336 @@ -130,12 +118,36 @@
1337 return int_size_in_bytes (type);
1340 - gfc_internal_error ("Invalid expression in gfc_target_expr_size.");
1341 + gfc_internal_error ("Invalid expression in gfc_element_size.");
1347 +/* Return the size of an expression in its target representation. */
1350 +gfc_target_expr_size (gfc_expr *e)
1355 + gcc_assert (e != NULL);
1359 + if (gfc_array_size (e, &tmp))
1360 + asz = mpz_get_ui (tmp);
1367 + return asz * gfc_element_size (e);
1371 /* The encode_* functions export a value into a buffer, and
1372 return the number of bytes of the buffer that have been
1374 Index: gcc/fortran/target-memory.h
1375 ===================================================================
1376 --- gcc/fortran/target-memory.h (.../tags/gcc_4_7_3_release) (revision 198690)
1377 +++ gcc/fortran/target-memory.h (.../branches/gcc-4_7-branch) (revision 198690)
1379 /* Convert a BOZ to REAL or COMPLEX. */
1380 bool gfc_convert_boz (gfc_expr *, gfc_typespec *);
1382 -/* Return the size of an expression in its target representation. */
1383 +size_t gfc_element_size (gfc_expr *);
1384 size_t gfc_target_expr_size (gfc_expr *);
1386 /* Write a constant expression in binary form to a target buffer. */
1387 Index: gcc/fortran/check.c
1388 ===================================================================
1389 --- gcc/fortran/check.c (.../tags/gcc_4_7_3_release) (revision 198690)
1390 +++ gcc/fortran/check.c (.../branches/gcc-4_7-branch) (revision 198690)
1391 @@ -3988,8 +3988,6 @@
1392 size_t *result_length_p)
1394 size_t result_elt_size;
1396 - gfc_expr *mold_element;
1398 if (source->expr_type == EXPR_FUNCTION)
1400 @@ -3998,20 +3996,12 @@
1403 /* Calculate the size of the source. */
1404 - if (source->expr_type == EXPR_ARRAY
1405 - && gfc_array_size (source, &tmp) == FAILURE)
1408 *source_size = gfc_target_expr_size (source);
1409 if (*source_size == 0)
1412 - mold_element = mold->expr_type == EXPR_ARRAY
1413 - ? gfc_constructor_first (mold->value.constructor)->expr
1416 /* Determine the size of the element. */
1417 - result_elt_size = gfc_target_expr_size (mold_element);
1418 + result_elt_size = gfc_element_size (mold);
1419 if (result_elt_size == 0)
1422 Index: gcc/fortran/intrinsic.texi
1423 ===================================================================
1424 --- gcc/fortran/intrinsic.texi (.../tags/gcc_4_7_3_release) (revision 198690)
1425 +++ gcc/fortran/intrinsic.texi (.../branches/gcc-4_7-branch) (revision 198690)
1426 @@ -9209,7 +9209,7 @@
1427 @item @emph{Arguments}:
1428 @multitable @columnfractions .15 .70
1429 @item @var{X} @tab Shall be of type @code{REAL}.
1430 -@item @var{S} @tab (Optional) shall be of type @code{REAL} and
1431 +@item @var{S} @tab Shall be of type @code{REAL} and
1435 Index: gcc/fortran/simplify.c
1436 ===================================================================
1437 --- gcc/fortran/simplify.c (.../tags/gcc_4_7_3_release) (revision 198690)
1438 +++ gcc/fortran/simplify.c (.../branches/gcc-4_7-branch) (revision 198690)
1441 gfc_expr gfc_bad_expr;
1443 +static gfc_expr *simplify_size (gfc_expr *, gfc_expr *, int);
1446 /* Note that 'simplification' is not just transforming expressions.
1447 For functions that are not simplified at compile time, range
1448 checking is done if possible.
1449 @@ -3240,7 +3242,7 @@
1450 gfc_expr* dim = result;
1451 mpz_set_si (dim->value.integer, d);
1453 - result = gfc_simplify_size (array, dim, kind);
1454 + result = simplify_size (array, dim, k);
1455 gfc_free_expr (dim);
1458 @@ -5493,15 +5495,12 @@
1459 e = gfc_get_constant_expr (BT_INTEGER, k, &source->where);
1463 - mpz_set (e->value.integer, shape[n]);
1464 - mpz_clear (shape[n]);
1466 + mpz_set (e->value.integer, shape[n]);
1469 mpz_set_ui (e->value.integer, n + 1);
1471 - f = gfc_simplify_size (source, e, NULL);
1472 + f = simplify_size (source, e, k);
1476 @@ -5512,24 +5511,31 @@
1480 + if (e == &gfc_bad_expr || range_check (e, "SHAPE") == &gfc_bad_expr)
1482 + gfc_free_expr (result);
1484 + gfc_clear_shape (shape, source->rank);
1485 + return &gfc_bad_expr;
1488 gfc_constructor_append_expr (&result->value.constructor, e, NULL);
1492 + gfc_clear_shape (shape, source->rank);
1499 -gfc_simplify_size (gfc_expr *array, gfc_expr *dim, gfc_expr *kind)
1501 +simplify_size (gfc_expr *array, gfc_expr *dim, int k)
1504 gfc_expr *return_value;
1506 - int k = get_kind (BT_INTEGER, kind, "SIZE", gfc_default_integer_kind);
1509 - return &gfc_bad_expr;
1511 /* For unary operations, the size of the result is given by the size
1512 of the operand. For binary ones, it's the size of the first operand
1513 unless it is scalar, then it is the size of the second. */
1514 @@ -5558,7 +5564,7 @@
1515 replacement = array->value.op.op1;
1518 - simplified = gfc_simplify_size (array->value.op.op1, dim, kind);
1519 + simplified = simplify_size (array->value.op.op1, dim, k);
1523 @@ -5568,18 +5574,20 @@
1526 /* Try to reduce it directly if possible. */
1527 - simplified = gfc_simplify_size (replacement, dim, kind);
1528 + simplified = simplify_size (replacement, dim, k);
1530 /* Otherwise, we build a new SIZE call. This is hopefully at least
1531 simpler than the original one. */
1533 - simplified = gfc_build_intrinsic_call (gfc_current_ns,
1534 - GFC_ISYM_SIZE, "size",
1536 - gfc_copy_expr (replacement),
1537 - gfc_copy_expr (dim),
1538 - gfc_copy_expr (kind));
1541 + gfc_expr *kind = gfc_get_int_expr (gfc_default_integer_kind, NULL, k);
1542 + simplified = gfc_build_intrinsic_call (gfc_current_ns,
1543 + GFC_ISYM_SIZE, "size",
1545 + gfc_copy_expr (replacement),
1546 + gfc_copy_expr (dim),
1552 @@ -5598,13 +5606,32 @@
1556 - return_value = gfc_get_int_expr (k, &array->where, mpz_get_si (size));
1557 + return_value = gfc_get_constant_expr (BT_INTEGER, k, &array->where);
1558 + mpz_set (return_value->value.integer, size);
1561 return return_value;
1566 +gfc_simplify_size (gfc_expr *array, gfc_expr *dim, gfc_expr *kind)
1569 + int k = get_kind (BT_INTEGER, kind, "SIZE", gfc_default_integer_kind);
1572 + return &gfc_bad_expr;
1574 + result = simplify_size (array, dim, k);
1575 + if (result == NULL || result == &gfc_bad_expr)
1578 + return range_check (result, "SIZE");
1583 gfc_simplify_sign (gfc_expr *x, gfc_expr *y)
1586 Index: gcc/cfgexpand.c
1587 ===================================================================
1588 --- gcc/cfgexpand.c (.../tags/gcc_4_7_3_release) (revision 198690)
1589 +++ gcc/cfgexpand.c (.../branches/gcc-4_7-branch) (revision 198690)
1590 @@ -3646,6 +3646,8 @@
1591 avoid_complex_debug_insns (rtx insn, rtx *exp_p, int depth)
1594 + const char *format_ptr;
1597 if (exp == NULL_RTX)
1599 @@ -3668,8 +3670,7 @@
1603 - const char *format_ptr = GET_RTX_FORMAT (GET_CODE (exp));
1605 + format_ptr = GET_RTX_FORMAT (GET_CODE (exp));
1606 for (i = 0; i < GET_RTX_LENGTH (GET_CODE (exp)); i++)
1607 switch (*format_ptr++)
1609 Index: gcc/sched-deps.c
1610 ===================================================================
1611 --- gcc/sched-deps.c (.../tags/gcc_4_7_3_release) (revision 198690)
1612 +++ gcc/sched-deps.c (.../branches/gcc-4_7-branch) (revision 198690)
1613 @@ -1563,24 +1563,15 @@
1614 add_dependence_list_and_free (struct deps_desc *deps, rtx insn, rtx *listp,
1615 int uncond, enum reg_note dep_type)
1618 + add_dependence_list (insn, *listp, uncond, dep_type);
1620 /* We don't want to short-circuit dependencies involving debug
1621 insns, because they may cause actual dependencies to be
1623 if (deps->readonly || DEBUG_INSN_P (insn))
1625 - add_dependence_list (insn, *listp, uncond, dep_type);
1630 - for (list = *listp, *listp = NULL; list ; list = next)
1632 - next = XEXP (list, 1);
1633 - if (uncond || ! sched_insns_conditions_mutex_p (insn, XEXP (list, 0)))
1634 - add_dependence (insn, XEXP (list, 0), dep_type);
1635 - free_INSN_LIST_node (list);
1637 + free_INSN_LIST_list (listp);
1640 /* Remove all occurences of INSN from LIST. Return the number of
1641 @@ -1764,6 +1755,15 @@
1642 add_dependence_list_and_free (deps, insn, &deps->pending_jump_insns, 1,
1645 + if (DEBUG_INSN_P (insn))
1648 + free_INSN_LIST_list (&deps->pending_read_insns);
1649 + free_INSN_LIST_list (&deps->pending_write_insns);
1650 + free_INSN_LIST_list (&deps->last_pending_memory_flush);
1651 + free_INSN_LIST_list (&deps->pending_jump_insns);
1654 if (!deps->readonly)
1656 free_EXPR_LIST_list (&deps->pending_write_mems);
1657 @@ -3262,9 +3262,9 @@
1658 SET_REGNO_REG_SET (&deps->reg_last_in_use, i);
1661 - /* Flush pending lists on jumps, but not on speculative checks. */
1662 - if (JUMP_P (insn) && !(sel_sched_p ()
1663 - && sel_insn_is_speculation_check (insn)))
1664 + /* Don't flush pending lists on speculative checks for
1665 + selective scheduling. */
1666 + if (!sel_sched_p () || !sel_insn_is_speculation_check (insn))
1667 flush_pending_lists (deps, insn, true, true);
1669 reg_pending_barrier = NOT_A_BARRIER;
1670 Index: gcc/config/sparc/sparc.c
1671 ===================================================================
1672 --- gcc/config/sparc/sparc.c (.../tags/gcc_4_7_3_release) (revision 198690)
1673 +++ gcc/config/sparc/sparc.c (.../branches/gcc-4_7-branch) (revision 198690)
1674 @@ -4207,13 +4207,14 @@
1675 mapped into one sparc_mode_class mode. */
1677 enum sparc_mode_class {
1678 - S_MODE, D_MODE, T_MODE, O_MODE,
1679 + H_MODE, S_MODE, D_MODE, T_MODE, O_MODE,
1680 SF_MODE, DF_MODE, TF_MODE, OF_MODE,
1684 /* Modes for single-word and smaller quantities. */
1685 -#define S_MODES ((1 << (int) S_MODE) | (1 << (int) SF_MODE))
1687 + ((1 << (int) H_MODE) | (1 << (int) S_MODE) | (1 << (int) SF_MODE))
1689 /* Modes for double-word and smaller quantities. */
1690 #define D_MODES (S_MODES | (1 << (int) D_MODE) | (1 << DF_MODE))
1691 @@ -4224,13 +4225,11 @@
1692 /* Modes for 8-word and smaller quantities. */
1693 #define O_MODES (T_MODES | (1 << (int) O_MODE) | (1 << (int) OF_MODE))
1695 -/* Modes for single-float quantities. We must allow any single word or
1696 - smaller quantity. This is because the fix/float conversion instructions
1697 - take integer inputs/outputs from the float registers. */
1698 -#define SF_MODES (S_MODES)
1699 +/* Modes for single-float quantities. */
1700 +#define SF_MODES ((1 << (int) S_MODE) | (1 << (int) SF_MODE))
1702 /* Modes for double-float and smaller quantities. */
1703 -#define DF_MODES (D_MODES)
1704 +#define DF_MODES (SF_MODES | (1 << (int) D_MODE) | (1 << DF_MODE))
1706 /* Modes for quad-float and smaller quantities. */
1707 #define TF_MODES (DF_MODES | (1 << (int) TF_MODE))
1708 @@ -4326,7 +4325,9 @@
1710 case MODE_PARTIAL_INT:
1711 case MODE_COMPLEX_INT:
1712 - if (GET_MODE_SIZE (i) <= 4)
1713 + if (GET_MODE_SIZE (i) < 4)
1714 + sparc_mode_class[i] = 1 << (int) H_MODE;
1715 + else if (GET_MODE_SIZE (i) == 4)
1716 sparc_mode_class[i] = 1 << (int) S_MODE;
1717 else if (GET_MODE_SIZE (i) == 8)
1718 sparc_mode_class[i] = 1 << (int) D_MODE;
1719 @@ -4338,14 +4339,16 @@
1720 sparc_mode_class[i] = 0;
1722 case MODE_VECTOR_INT:
1723 - if (GET_MODE_SIZE (i) <= 4)
1724 - sparc_mode_class[i] = 1 << (int)SF_MODE;
1725 + if (GET_MODE_SIZE (i) == 4)
1726 + sparc_mode_class[i] = 1 << (int) SF_MODE;
1727 else if (GET_MODE_SIZE (i) == 8)
1728 - sparc_mode_class[i] = 1 << (int)DF_MODE;
1729 + sparc_mode_class[i] = 1 << (int) DF_MODE;
1731 + sparc_mode_class[i] = 0;
1734 case MODE_COMPLEX_FLOAT:
1735 - if (GET_MODE_SIZE (i) <= 4)
1736 + if (GET_MODE_SIZE (i) == 4)
1737 sparc_mode_class[i] = 1 << (int) SF_MODE;
1738 else if (GET_MODE_SIZE (i) == 8)
1739 sparc_mode_class[i] = 1 << (int) DF_MODE;
1740 Index: gcc/config/i386/i386.md
1741 ===================================================================
1742 --- gcc/config/i386/i386.md (.../tags/gcc_4_7_3_release) (revision 198690)
1743 +++ gcc/config/i386/i386.md (.../branches/gcc-4_7-branch) (revision 198690)
1744 @@ -3444,9 +3444,9 @@
1747 (define_insn "*zero_extendsidi2_rex64"
1748 - [(set (match_operand:DI 0 "nonimmediate_operand" "=r,o,?*Ym,?*y,?*Yi,*x")
1749 + [(set (match_operand:DI 0 "nonimmediate_operand" "=r,o,?*Ym,?!*y,?*Yi,*x")
1751 - (match_operand:SI 1 "nonimmediate_operand" "rm,0,r ,m ,r ,m")))]
1752 + (match_operand:SI 1 "nonimmediate_operand" "rm,0,r ,m ,r ,m")))]
1755 mov{l}\t{%1, %k0|%k0, %1}
1756 @@ -3469,9 +3469,9 @@
1758 ;; %%% Kill me once multi-word ops are sane.
1759 (define_insn "zero_extendsidi2_1"
1760 - [(set (match_operand:DI 0 "nonimmediate_operand" "=r,?r,?o,?*Ym,?*y,?*Yi,*x")
1761 + [(set (match_operand:DI 0 "nonimmediate_operand" "=r,?r,?o,?*Ym,?!*y,?*Yi,*x")
1763 - (match_operand:SI 1 "nonimmediate_operand" "0,rm,r ,r ,m ,r ,m")))
1764 + (match_operand:SI 1 "nonimmediate_operand" "0,rm,r ,r ,m ,r ,m")))
1765 (clobber (reg:CC FLAGS_REG))]
1768 Index: gcc/config/i386/sse.md
1769 ===================================================================
1770 --- gcc/config/i386/sse.md (.../tags/gcc_4_7_3_release) (revision 198690)
1771 +++ gcc/config/i386/sse.md (.../branches/gcc-4_7-branch) (revision 198690)
1772 @@ -11167,7 +11167,8 @@
1773 (match_operand:SI 2 "const_0_to_<sserotatemax>_operand" "n")))]
1776 - operands[3] = GEN_INT ((<ssescalarnum> * 8) - INTVAL (operands[2]));
1778 + = GEN_INT (GET_MODE_BITSIZE (<ssescalarmode>mode) - INTVAL (operands[2]));
1779 return \"vprot<ssemodesuffix>\t{%3, %1, %0|%0, %1, %3}\";
1781 [(set_attr "type" "sseishft")
1782 Index: gcc/config/i386/i386.c
1783 ===================================================================
1784 --- gcc/config/i386/i386.c (.../tags/gcc_4_7_3_release) (revision 198690)
1785 +++ gcc/config/i386/i386.c (.../branches/gcc-4_7-branch) (revision 198690)
1786 @@ -20026,7 +20026,7 @@
1787 vec[i * 2 + 1] = const1_rtx;
1789 vt = gen_rtx_CONST_VECTOR (maskmode, gen_rtvec_v (w, vec));
1790 - vt = force_const_mem (maskmode, vt);
1791 + vt = validize_mem (force_const_mem (maskmode, vt));
1792 t1 = expand_simple_binop (maskmode, PLUS, t1, vt, t1, 1,
1795 @@ -20223,7 +20223,7 @@
1796 for (i = 0; i < 16; ++i)
1797 vec[i] = GEN_INT (i/e * e);
1798 vt = gen_rtx_CONST_VECTOR (V16QImode, gen_rtvec_v (16, vec));
1799 - vt = force_const_mem (V16QImode, vt);
1800 + vt = validize_mem (force_const_mem (V16QImode, vt));
1802 emit_insn (gen_xop_pperm (mask, mask, mask, vt));
1804 @@ -20234,7 +20234,7 @@
1805 for (i = 0; i < 16; ++i)
1806 vec[i] = GEN_INT (i % e);
1807 vt = gen_rtx_CONST_VECTOR (V16QImode, gen_rtvec_v (16, vec));
1808 - vt = force_const_mem (V16QImode, vt);
1809 + vt = validize_mem (force_const_mem (V16QImode, vt));
1810 emit_insn (gen_addv16qi3 (mask, mask, vt));
1813 Index: gcc/config/sh/sh.md
1814 ===================================================================
1815 --- gcc/config/sh/sh.md (.../tags/gcc_4_7_3_release) (revision 198690)
1816 +++ gcc/config/sh/sh.md (.../branches/gcc-4_7-branch) (revision 198690)
1819 (define_insn "tstsi_t_zero_extract_eq"
1820 [(set (reg:SI T_REG)
1821 - (eq:SI (zero_extract:SI (match_operand 0 "logical_operand" "z")
1822 + (eq:SI (zero_extract:SI (match_operand:SI 0 "logical_operand" "z")
1823 (match_operand:SI 1 "const_int_operand")
1824 (match_operand:SI 2 "const_int_operand"))
1826 Index: gcc/config/darwin.h
1827 ===================================================================
1828 --- gcc/config/darwin.h (.../tags/gcc_4_7_3_release) (revision 198690)
1829 +++ gcc/config/darwin.h (.../branches/gcc-4_7-branch) (revision 198690)
1831 %{!Zbundle:%{pg:%{static:-lgcrt0.o} \
1832 %{!static:%{object:-lgcrt0.o} \
1833 %{!object:%{preload:-lgcrt0.o} \
1834 - %{!preload:-lgcrt1.o %(darwin_crt2)}}}} \
1835 + %{!preload:-lgcrt1.o \
1836 + %:version-compare(>= 10.8 mmacosx-version-min= -no_new_main) \
1837 + %(darwin_crt2)}}}} \
1838 %{!pg:%{static:-lcrt0.o} \
1839 %{!static:%{object:-lcrt0.o} \
1840 %{!object:%{preload:-lcrt0.o} \
1842 #define DARWIN_CRT1_SPEC \
1843 "%:version-compare(!> 10.5 mmacosx-version-min= -lcrt1.o) \
1844 %:version-compare(>< 10.5 10.6 mmacosx-version-min= -lcrt1.10.5.o) \
1845 - %:version-compare(>= 10.6 mmacosx-version-min= -lcrt1.10.6.o) \
1846 + %:version-compare(>< 10.6 10.8 mmacosx-version-min= -lcrt1.10.6.o) \
1847 %{fgnu-tm: -lcrttms.o}"
1849 /* Default Darwin ASM_SPEC, very simple. */
1852 #define TARGET_WANT_DEBUG_PUB_SECTIONS true
1854 +#define TARGET_FORCE_AT_COMP_DIR true
1856 /* When generating stabs debugging, use N_BINCL entries. */
1858 #define DBX_USE_BINCL
1859 Index: gcc/config/pa/pa.c
1860 ===================================================================
1861 --- gcc/config/pa/pa.c (.../tags/gcc_4_7_3_release) (revision 198690)
1862 +++ gcc/config/pa/pa.c (.../branches/gcc-4_7-branch) (revision 198690)
1864 /* Extract CODE_LABEL. */
1865 orig = XEXP (orig, 0);
1866 add_reg_note (insn, REG_LABEL_OPERAND, orig);
1867 - LABEL_NUSES (orig)++;
1868 + /* Make sure we have label and not a note. */
1869 + if (LABEL_P (orig))
1870 + LABEL_NUSES (orig)++;
1872 crtl->uses_pic_offset_table = 1;
1874 Index: libgfortran/ChangeLog
1875 ===================================================================
1876 --- libgfortran/ChangeLog (.../tags/gcc_4_7_3_release) (revision 198690)
1877 +++ libgfortran/ChangeLog (.../branches/gcc-4_7-branch) (revision 198690)
1879 +2013-04-28 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1881 + Backport from mainline:
1882 + 2013-03-20 Tilo Schwarz <tilo@tilo-schwarz.de>
1884 + PR libfortran/51825
1885 + * io/list_read.c (nml_read_obj): Don't end the component loop on a
1886 + nested derived type, but continue with the next loop iteration.
1887 + (nml_get_obj_data): Don't move the first_nl pointer further in the
1888 + list if a qualifier was found.
1890 +2013-04-28 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1892 + Backport from mainline:
1894 + PR libfortran/56786
1895 + * io/list_read.c (nml_parse_qualifier): Remove spurious next_char call
1896 + when checking for EOF. Use error return mechanism when EOF detected.
1897 + Do not return FAILURE unless parse_err_msg and parse_err_msg_size have
1898 + been set. Use hit_eof.
1899 + (nml_get_obj_data): Likewise use the correct error mechanism.
1900 + * io/transfer.c (hit_eof): Do not set AFTER_ENDFILE if in namelist
1903 +2013-04-28 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1905 + Backport from mainline:
1906 + 2013-03-25 Tilo Schwarz <tilo@tilo-schwarz.de>
1908 + PR libfortran/52512
1909 + * io/list_read.c (nml_parse_qualifier): To check for a derived type
1910 + don't use the namelist head element type but the current element type.
1911 + (nml_get_obj_data): Add current namelist element type to
1912 + nml_parse_qualifier call.
1914 2013-04-11 Release Manager
1916 * GCC 4.7.3 released.
1917 Index: libgfortran/io/list_read.c
1918 ===================================================================
1919 --- libgfortran/io/list_read.c (.../tags/gcc_4_7_3_release) (revision 198690)
1920 +++ libgfortran/io/list_read.c (.../branches/gcc-4_7-branch) (revision 198690)
1921 @@ -2028,8 +2028,8 @@
1924 nml_parse_qualifier (st_parameter_dt *dtp, descriptor_dimension *ad,
1925 - array_loop_spec *ls, int rank, char *parse_err_msg,
1926 - size_t parse_err_msg_size,
1927 + array_loop_spec *ls, int rank, bt nml_elem_type,
1928 + char *parse_err_msg, size_t parse_err_msg_size,
1932 @@ -2053,7 +2053,7 @@
1933 /* The next character in the stream should be the '('. */
1935 if ((c = next_char (dtp)) == EOF)
1939 /* Process the qualifier, by dimension and triplet. */
1941 @@ -2067,7 +2067,7 @@
1943 /* Process a potential sign. */
1944 if ((c = next_char (dtp)) == EOF)
1950 @@ -2085,11 +2085,12 @@
1951 /* Process characters up to the next ':' , ',' or ')'. */
1954 - if ((c = next_char (dtp)) == EOF)
1957 + c = next_char (dtp);
1964 is_array_section = 1;
1966 @@ -2112,10 +2113,8 @@
1970 - case ' ': case '\t':
1971 + case ' ': case '\t': case '\r': case '\n':
1973 - if ((c = next_char (dtp) == EOF))
1978 @@ -2204,7 +2203,7 @@
1979 do not allow excess data to be processed. */
1980 if (is_array_section == 1
1981 || !(compile_options.allow_std & GFC_STD_GNU)
1982 - || dtp->u.p.ionml->type == BT_DERIVED)
1983 + || nml_elem_type == BT_DERIVED)
1984 ls[dim].end = ls[dim].start;
1986 dtp->u.p.expanded_read = 1;
1987 @@ -2257,6 +2256,15 @@
1991 + /* The EOF error message is issued by hit_eof. Return true so that the
1992 + caller does not use parse_err_msg and parse_err_msg_size to generate
1993 + an unrelated error message. */
1997 + dtp->u.p.input_complete = 1;
2003 @@ -2553,17 +2561,17 @@
2004 since a single object can have multiple reads. */
2005 dtp->u.p.expanded_read = 0;
2007 - /* Now loop over the components. Update the component pointer
2008 - with the return value from nml_write_obj. This loop jumps
2009 - past nested derived types by testing if the potential
2010 - component name contains '%'. */
2011 + /* Now loop over the components. */
2013 for (cmp = nl->next;
2015 - !strncmp (cmp->var_name, obj_name, obj_name_len) &&
2016 - !strchr (cmp->var_name + obj_name_len, '%');
2017 + !strncmp (cmp->var_name, obj_name, obj_name_len);
2020 + /* Jump over nested derived type by testing if the potential
2021 + component name contains '%'. */
2022 + if (strchr (cmp->var_name + obj_name_len, '%'))
2025 if (nml_read_obj (dtp, cmp, (index_type)(pdata - nl->mem_pos),
2026 pprev_nl, nml_err_msg, nml_err_msg_size,
2027 @@ -2726,12 +2734,12 @@
2030 if ((c = next_char (dtp)) == EOF)
2036 if ((c = next_char (dtp)) == EOF)
2041 snprintf (nml_err_msg, nml_err_msg_size,
2042 @@ -2781,8 +2789,9 @@
2043 if (!is_separator (c))
2044 push_char (dtp, tolower(c));
2045 if ((c = next_char (dtp)) == EOF)
2047 - } while (!( c=='=' || c==' ' || c=='\t' || c =='(' || c =='%' ));
2050 + while (!( c=='=' || c==' ' || c=='\t' || c =='(' || c =='%' ));
2052 unget_char (dtp, c);
2054 @@ -2842,7 +2851,7 @@
2057 if (nml_parse_qualifier (dtp, nl->dim, nl->ls, nl->var_rank,
2058 - nml_err_msg, nml_err_msg_size,
2059 + nl->type, nml_err_msg, nml_err_msg_size,
2060 &parsed_rank) == FAILURE)
2062 char *nml_err_msg_end = strchr (nml_err_msg, '\0');
2063 @@ -2857,7 +2866,7 @@
2066 if ((c = next_char (dtp)) == EOF)
2069 unget_char (dtp, c);
2071 else if (nl->var_rank > 0)
2072 @@ -2876,14 +2885,15 @@
2076 - if (*pprev_nl == NULL || !component_flag)
2077 + /* Don't move first_nl further in the list if a qualifier was found. */
2078 + if ((*pprev_nl == NULL && !qualifier_flag) || !component_flag)
2084 if ((c = next_char (dtp)) == EOF)
2090 @@ -2898,8 +2908,8 @@
2091 descriptor_dimension chd[1] = { {1, clow, nl->string_length} };
2092 array_loop_spec ind[1] = { {1, clow, nl->string_length, 1} };
2094 - if (nml_parse_qualifier (dtp, chd, ind, -1, nml_err_msg,
2095 - nml_err_msg_size, &parsed_rank)
2096 + if (nml_parse_qualifier (dtp, chd, ind, -1, nl->type,
2097 + nml_err_msg, nml_err_msg_size, &parsed_rank)
2100 char *nml_err_msg_end = strchr (nml_err_msg, '\0');
2101 @@ -2921,7 +2931,7 @@
2104 if ((c = next_char (dtp)) == EOF)
2107 unget_char (dtp, c);
2110 @@ -2961,7 +2971,7 @@
2113 if ((c = next_char (dtp)) == EOF)
2119 @@ -2996,6 +3006,17 @@
2123 + /* The EOF error message is issued by hit_eof. Return true so that the
2124 + caller does not use nml_err_msg and nml_err_msg_size to generate
2125 + an unrelated error message. */
2128 + dtp->u.p.input_complete = 1;
2129 + unget_char (dtp, c);
2137 Index: libgfortran/io/transfer.c
2138 ===================================================================
2139 --- libgfortran/io/transfer.c (.../tags/gcc_4_7_3_release) (revision 198690)
2140 +++ libgfortran/io/transfer.c (.../branches/gcc-4_7-branch) (revision 198690)
2141 @@ -3748,7 +3748,7 @@
2144 generate_error (&dtp->common, LIBERROR_END, NULL);
2145 - if (!is_internal_unit (dtp))
2146 + if (!is_internal_unit (dtp) && !dtp->u.p.namelist_mode)
2148 dtp->u.p.current_unit->endfile = AFTER_ENDFILE;
2149 dtp->u.p.current_unit->current_record = 0;