1
# DP: updates from the 4.8 branch upto 20140606 (r211339).
5
cat > ${dir}LAST_UPDATED <<EOF
6
Sat Jun 7 02:24:56 CEST 2014
7
Sat Jun 7 00:24:56 UTC 2014 (revision 211339)
11
LANG=C svn diff svn://gcc.gnu.org/svn/gcc/tags/gcc_4_8_3_release svn://gcc.gnu.org/svn/gcc/branches/gcc-4_8-branch \
12
| sed -r 's,^--- (\S+)\t(\S+)(.*)$,--- a/src/\1\t\2,;s,^\+\+\+ (\S+)\t(\S+)(.*)$,+++ b/src/\1\t\2,' \
13
| awk '/^Index:.*\.(class|texi)/ {skip=1; next} /^Index:/ { skip=0 } skip==0'
15
Index: libstdc++-v3/scripts/run_doxygen
16
===================================================================
17
--- a/src/libstdc++-v3/scripts/run_doxygen (.../tags/gcc_4_8_3_release)
18
+++ b/src/libstdc++-v3/scripts/run_doxygen (.../branches/gcc-4_8-branch)
23
- # Also drop in the header file and style sheet
24
- doxygen -w latex header.tex doxygen.sty
25
+ # Grrr, Doxygen 1.8.x changed the -w latex options.
26
+ need_footer=`doxygen -h | sed -n -e '/-w latex/s=.*footer.*=true=p'`
28
+ # Also drop in the header file (maybe footer file) and style sheet
29
+ if $need_footer; then
30
+ doxygen -w latex header.tex footer.tex doxygen.sty
32
+ doxygen -w latex header.tex doxygen.sty
36
echo :: LaTeX pages begin with
37
Index: libstdc++-v3/include/std/future
38
===================================================================
39
--- a/src/libstdc++-v3/include/std/future (.../tags/gcc_4_8_3_release)
40
+++ b/src/libstdc++-v3/include/std/future (.../branches/gcc-4_8-branch)
43
_M_set_result(function<_Ptr_type()> __res, bool __ignore_failure = false)
45
- bool __set = __ignore_failure;
47
// all calls to this function are serialized,
48
// side-effects of invoking __res only happen once
49
call_once(_M_once, &_State_base::_M_do_set, this, ref(__res),
53
+ _M_cond.notify_all();
54
+ else if (!__ignore_failure)
55
__throw_future_error(int(future_errc::promise_already_satisfied));
59
lock_guard<mutex> __lock(_M_mutex);
60
_M_result.swap(__res);
62
- _M_cond.notify_all();
68
set_value(const _Res& __r)
70
+ auto __future = _M_future;
71
auto __setter = _State::__setter(this, __r);
72
- _M_future->_M_set_result(std::move(__setter));
73
+ __future->_M_set_result(std::move(__setter));
79
+ auto __future = _M_future;
80
auto __setter = _State::__setter(this, std::move(__r));
81
- _M_future->_M_set_result(std::move(__setter));
82
+ __future->_M_set_result(std::move(__setter));
86
set_exception(exception_ptr __p)
88
+ auto __future = _M_future;
89
auto __setter = _State::__setter(__p, this);
90
- _M_future->_M_set_result(std::move(__setter));
91
+ __future->_M_set_result(std::move(__setter));
95
@@ -1081,15 +1085,17 @@
99
+ auto __future = _M_future;
100
auto __setter = _State::__setter(this, __r);
101
- _M_future->_M_set_result(std::move(__setter));
102
+ __future->_M_set_result(std::move(__setter));
106
set_exception(exception_ptr __p)
108
+ auto __future = _M_future;
109
auto __setter = _State::__setter(__p, this);
110
- _M_future->_M_set_result(std::move(__setter));
111
+ __future->_M_set_result(std::move(__setter));
115
@@ -1166,8 +1172,9 @@
117
set_exception(exception_ptr __p)
119
+ auto __future = _M_future;
120
auto __setter = _State::__setter(__p, this);
121
- _M_future->_M_set_result(std::move(__setter));
122
+ __future->_M_set_result(std::move(__setter));
126
@@ -1193,8 +1200,9 @@
128
promise<void>::set_value()
130
+ auto __future = _M_future;
131
auto __setter = _State::__setter(this);
132
- _M_future->_M_set_result(std::move(__setter));
133
+ __future->_M_set_result(std::move(__setter));
137
Index: libstdc++-v3/include/bits/stl_tree.h
138
===================================================================
139
--- a/src/libstdc++-v3/include/bits/stl_tree.h (.../tags/gcc_4_8_3_release)
140
+++ b/src/libstdc++-v3/include/bits/stl_tree.h (.../branches/gcc-4_8-branch)
141
@@ -510,11 +510,11 @@
145
- { return static_cast<_Link_type>(&this->_M_impl._M_header); }
146
+ { return reinterpret_cast<_Link_type>(&this->_M_impl._M_header); }
150
- { return static_cast<_Const_Link_type>(&this->_M_impl._M_header); }
151
+ { return reinterpret_cast<_Const_Link_type>(&this->_M_impl._M_header); }
153
static const_reference
154
_S_value(_Const_Link_type __x)
155
Index: libstdc++-v3/include/tr2/bool_set
156
===================================================================
157
--- a/src/libstdc++-v3/include/tr2/bool_set (.../tags/gcc_4_8_3_release)
158
+++ b/src/libstdc++-v3/include/tr2/bool_set (.../branches/gcc-4_8-branch)
162
* See N2136, Bool_set: multi-valued logic
163
- * by Herv� Br�nnimann, Guillaume Melquiond, Sylvain Pion.
164
+ * by Hervé Brönnimann, Guillaume Melquiond, Sylvain Pion.
166
* The implicit conversion to bool is slippery! I may use the new
167
* explicit conversion. This has been specialized in the language
168
Index: libstdc++-v3/ChangeLog
169
===================================================================
170
--- a/src/libstdc++-v3/ChangeLog (.../tags/gcc_4_8_3_release)
171
+++ b/src/libstdc++-v3/ChangeLog (.../branches/gcc-4_8-branch)
173
+2014-06-03 Jonathan Wakely <jwakely@redhat.com>
175
+ Backport from mainline
176
+ 2014-04-15 Jonathan Wakely <jwakely@redhat.com>
179
+ * include/bits/stl_tree.h (_Rb_tree::_M_end): Fix invalid cast.
181
+ Backport from mainline
182
+ 2014-05-16 Jonathan Wakely <jwakely@redhat.com>
185
+ * include/std/future (__future_base::_State_baseV2::_M_set_result):
186
+ Signal condition variable after call_once returns.
187
+ (__future_base::_State_baseV2::_M_do_set): Do not signal here.
188
+ (promise::set_value, promise::set_exception): Increment the reference
189
+ count on the shared state until the function returns.
190
+ * testsuite/30_threads/promise/60966.cc: New.
192
+2014-05-29 Jonathan Wakely <jwakely@redhat.com>
194
+ * include/tr2/bool_set: Use UTF-8 for accented characters.
195
+ * scripts/run_doxygen: Handle Doxygen 1.8.x change.
197
2014-05-22 Release Manager
199
* GCC 4.8.3 released.
200
Index: libstdc++-v3/testsuite/30_threads/promise/60966.cc
201
===================================================================
202
--- a/src/libstdc++-v3/testsuite/30_threads/promise/60966.cc (.../tags/gcc_4_8_3_release)
203
+++ b/src/libstdc++-v3/testsuite/30_threads/promise/60966.cc (.../branches/gcc-4_8-branch)
205
+// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-gnu* *-*-solaris* *-*-cygwin *-*-darwin* powerpc-ibm-aix* } }
206
+// { dg-options " -std=gnu++11 -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-gnu* powerpc-ibm-aix* } }
207
+// { dg-options " -std=gnu++11 -pthreads" { target *-*-solaris* } }
208
+// { dg-options " -std=gnu++11 " { target *-*-cygwin *-*-darwin* } }
209
+// { dg-require-cstdint "" }
210
+// { dg-require-gthreads "" }
211
+// { dg-require-atomic-builtins "" }
213
+// Copyright (C) 2014 Free Software Foundation, Inc.
215
+// This file is part of the GNU ISO C++ Library. This library is free
216
+// software; you can redistribute it and/or modify it under the
217
+// terms of the GNU General Public License as published by the
218
+// Free Software Foundation; either version 3, or (at your option)
219
+// any later version.
221
+// This library is distributed in the hope that it will be useful,
222
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
223
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
224
+// GNU General Public License for more details.
226
+// You should have received a copy of the GNU General Public License along
227
+// with this library; see the file COPYING3. If not see
228
+// <http://www.gnu.org/licenses/>.
231
+// This test hangs if std::promise::~promise() destroys the
232
+// shared state before std::promise::set_value() finishes using it.
238
+const int THREADS = 10;
240
+void run_task(std::promise<void>* pr)
242
+ std::this_thread::sleep_for(std::chrono::milliseconds(100));
248
+ std::vector<std::promise<void>*> tasks(THREADS);
249
+ std::vector<std::thread> threads(THREADS);
250
+ std::vector<std::future<void>> futures(THREADS);
252
+ for (int i = 0; i < THREADS; ++i)
254
+ std::promise<void>* task = new std::promise<void>;
256
+ futures[i] = task->get_future();
257
+ threads[i] = std::thread(run_task, task);
260
+ for (int i = 0; i < THREADS; ++i)
262
+ // the temporary future releases the state as soon as wait() returns
263
+ std::future<void>(std::move(futures[i])).wait();
264
+ // state is ready, should now be safe to delete promise, so it
265
+ // releases the shared state too
269
+ for (auto& t : threads)
273
===================================================================
274
--- a/src/gcc/DATESTAMP (.../tags/gcc_4_8_3_release)
275
+++ b/src/gcc/DATESTAMP (.../branches/gcc-4_8-branch)
280
===================================================================
281
--- a/src/gcc/ipa-cp.c (.../tags/gcc_4_8_3_release)
282
+++ b/src/gcc/ipa-cp.c (.../branches/gcc-4_8-branch)
284
else if (!opt_for_fn (node->symbol.decl, optimize)
285
|| !opt_for_fn (node->symbol.decl, flag_ipa_cp))
286
reason = "non-optimized function";
287
+ else if (node->tm_clone)
288
+ reason = "transactional memory clone";
290
if (reason && dump_file && !node->alias && !node->thunk.thunk_p)
291
fprintf (dump_file, "Function %s/%i is not versionable, reason: %s.\n",
293
===================================================================
294
--- a/src/gcc/ChangeLog (.../tags/gcc_4_8_3_release)
295
+++ b/src/gcc/ChangeLog (.../branches/gcc-4_8-branch)
297
+2014-06-06 Michael Meissner <meissner@linux.vnet.ibm.com>
299
+ Back port from trunk
300
+ 2014-06-06 Michael Meissner <meissner@linux.vnet.ibm.com>
303
+ * config/rs6000/vsx.md (VSX_LE): Split VSX_D into 2 separate
304
+ iterators, VSX_D that handles 64-bit types, and VSX_LE that
305
+ handles swapping the two 64-bit double words on little endian
306
+ systems. Include V1TImode and optionally TImode in VSX_LE so that
307
+ these types are properly swapped. Change all of the insns and
308
+ splits that do the 64-bit swaps to use VSX_LE.
309
+ (vsx_le_perm_load_<mode>): Likewise.
310
+ (vsx_le_perm_store_<mode>): Likewise.
311
+ (splitters for little endian memory operations): Likewise.
312
+ (vsx_xxpermdi2_le_<mode>): Likewise.
313
+ (vsx_lxvd2x2_le_<mode>): Likewise.
314
+ (vsx_stxvd2x2_le_<mode>): Likewise.
316
+2014-06-05 Martin Jambor <mjambor@suse.cz>
319
+ * ipa-cp.c (determine_versionability): Pretend that tm_clones are
322
+2014-06-04 Richard Biener <rguenther@suse.de>
324
+ PR tree-optimization/61383
325
+ * tree-ssa-ifcombine.c (bb_no_side_effects_p): Make sure
328
+2014-06-03 Andrey Belevantsev <abel@ispras.ru>
330
+ Backport from mainline
331
+ 2014-05-14 Andrey Belevantsev <abel@ispras.ru>
333
+ PR rtl-optimization/60866
334
+ * sel-sched-ir (sel_init_new_insn): New parameter old_seqno.
335
+ Default it to -1. Pass it down to init_simplejump_data.
336
+ (init_simplejump_data): New parameter old_seqno. Pass it down
337
+ to get_seqno_for_a_jump.
338
+ (get_seqno_for_a_jump): New parameter old_seqno. Use it for
339
+ initializing new jump seqno as a last resort. Add comment.
340
+ (sel_redirect_edge_and_branch): Save old seqno of the conditional
341
+ jump and pass it down to sel_init_new_insn.
342
+ (sel_redirect_edge_and_branch_force): Likewise.
344
+2014-06-03 Andrey Belevantsev <abel@ispras.ru>
346
+ Backport from mainline
347
+ 2014-05-14 Andrey Belevantsev <abel@ispras.ru>
349
+ PR rtl-optimization/60901
350
+ * config/i386/i386.c (ix86_dependencies_evaluation_hook): Check that
351
+ bb predecessor belongs to the same scheduling region. Adjust comment.
353
+2014-06-03 Uros Bizjak <ubizjak@gmail.com>
355
+ Backport from mainline
356
+ 2014-06-02 Uros Bizjak <ubizjak@gmail.com>
359
+ * config/i386/i386.c (ix86_expand_vec_perm) [case V32QImode]: Use
360
+ GEN_INT (-128) instead of GEN_INT (128) to set MSB of QImode constant.
362
+2014-05-28 Guozhi Wei <carrot@google.com>
365
+ * config/aarch64/arm_neon.h (vqdmulh_n_s16): Change the last operand's
367
+ (vqdmulhq_n_s16): Likewise.
369
+2014-05-28 Eric Botcazou <ebotcazou@adacore.com>
371
+ Backport from mainline
372
+ 2014-05-27 Eric Botcazou <ebotcazou@adacore.com>
374
+ * double-int.c (div_and_round_double) <ROUND_DIV_EXPR>: Use the proper
375
+ predicate to detect a negative quotient.
377
+2014-05-28 Georg-Johann Lay <avr@gjlay.de>
380
+ * doc/extend.texi (Local Labels): Note that label differences are
381
+ not supported for AVR.
383
+2014-05-26 Michael Tautschnig <mt@debian.org>
386
+ * doc/extend.texi (X86 Built-in Functions): Fix parameter lists of
387
+ __builtin_ia32_vfrczs[sd] and __builtin_ia32_mpsadbw256.
389
+2014-05-23 Alan Modra <amodra@gmail.com>
392
+ * config/rs6000/rs6000.c (mem_operand_gpr): Handle SImode.
393
+ * config/rs6000/rs6000.md (extendsidi2_lfiwax, extendsidi2_nocell):
394
+ Use "Y" constraint rather than "m".
396
+2014-05-22 Peter Bergner <bergner@vnet.ibm.com>
398
+ Backport from mainline
399
+ 2014-05-22 Peter Bergner <bergner@vnet.ibm.com>
401
+ * config/rs6000/htm.md (ttest): Use correct shift value to get CR0.
403
+2014-05-22 Richard Earnshaw <rearnsha@arm.com>
406
+ * arm.md (arm_cmpdi_unsigned): Fix length calculation for Thumb2.
408
2014-05-22 Release Manager
410
* GCC 4.8.3 released.
411
Index: gcc/testsuite/gcc.target/powerpc/htm-ttest.c
412
===================================================================
413
--- a/src/gcc/testsuite/gcc.target/powerpc/htm-ttest.c (.../tags/gcc_4_8_3_release)
414
+++ b/src/gcc/testsuite/gcc.target/powerpc/htm-ttest.c (.../branches/gcc-4_8-branch)
416
+/* { dg-do compile { target { powerpc*-*-* } } } */
417
+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
418
+/* { dg-require-effective-target powerpc_htm_ok } */
419
+/* { dg-options "-O2 -mhtm" } */
421
+/* { dg-final { scan-assembler "rlwinm r?\[0-9\]+,r?\[0-9\]+,3,30,31" { target { ilp32 } } } } */
422
+/* { dg-final { scan-assembler "rldicl r?\[0-9\]+,r?\[0-9\]+,35,62" { target { lp64 } } } } */
424
+#include <htmintrin.h>
428
+ return _HTM_STATE(__builtin_ttest());
430
Index: gcc/testsuite/gcc.target/i386/pr60901.c
431
===================================================================
432
--- a/src/gcc/testsuite/gcc.target/i386/pr60901.c (.../tags/gcc_4_8_3_release)
433
+++ b/src/gcc/testsuite/gcc.target/i386/pr60901.c (.../branches/gcc-4_8-branch)
435
+/* { dg-options "-O -fselective-scheduling -fschedule-insns -fsel-sched-pipelining -fsel-sched-pipelining-outer-loops -fno-tree-dominator-opts" } */
438
+extern void bar (void);
439
+extern int baz (int);
445
+ for (j = 0; j < n; j++)
447
+ for (i = 1; i < j; i++)
452
Index: gcc/testsuite/gnat.dg/overflow_fixed.adb
453
===================================================================
454
--- a/src/gcc/testsuite/gnat.dg/overflow_fixed.adb (.../tags/gcc_4_8_3_release)
455
+++ b/src/gcc/testsuite/gnat.dg/overflow_fixed.adb (.../branches/gcc-4_8-branch)
458
+-- { dg-options "-gnato -O" }
460
+procedure Overflow_Fixed is
462
+ type Unsigned_8_Bit is mod 2**8;
464
+ procedure Fixed_To_Eight (Value : Duration) is
465
+ Item : Unsigned_8_Bit;
467
+ Item := Unsigned_8_Bit(Value);
468
+ raise Program_Error;
470
+ when Constraint_Error => null; -- expected case
474
+ Fixed_To_Eight (-0.5);
476
Index: gcc/testsuite/gnat.dg/aliasing1.adb
477
===================================================================
478
--- a/src/gcc/testsuite/gnat.dg/aliasing1.adb (.../tags/gcc_4_8_3_release)
479
+++ b/src/gcc/testsuite/gnat.dg/aliasing1.adb (.../branches/gcc-4_8-branch)
484
--- { dg-final { scan-tree-dump-not "__gnat_rcheck" "optimized" } }
485
+-- { dg-final { scan-tree-dump-not "gnat_rcheck" "optimized" } }
486
-- { dg-final { cleanup-tree-dump "optimized" } }
487
Index: gcc/testsuite/gcc.dg/pr60866.c
488
===================================================================
489
--- a/src/gcc/testsuite/gcc.dg/pr60866.c (.../tags/gcc_4_8_3_release)
490
+++ b/src/gcc/testsuite/gcc.dg/pr60866.c (.../branches/gcc-4_8-branch)
492
+/* { dg-do compile { target powerpc*-*-* ia64-*-* x86_64-*-* } } */
493
+/* { dg-options "-O -fselective-scheduling -fno-if-conversion -fschedule-insns" } */
498
+foo (int w, int **dnroot, int **dn)
501
+ int *xchild = xchild;
506
+ for (child = *dn; child; child = xchild)
510
Index: gcc/testsuite/gcc.dg/torture/pr61383-1.c
511
===================================================================
512
--- a/src/gcc/testsuite/gcc.dg/torture/pr61383-1.c (.../tags/gcc_4_8_3_release)
513
+++ b/src/gcc/testsuite/gcc.dg/torture/pr61383-1.c (.../branches/gcc-4_8-branch)
517
+int a, b = 1, c, d, e, f, g;
528
+ for (; d < 1; d = e)
550
Index: gcc/testsuite/ChangeLog
551
===================================================================
552
--- a/src/gcc/testsuite/ChangeLog (.../tags/gcc_4_8_3_release)
553
+++ b/src/gcc/testsuite/ChangeLog (.../branches/gcc-4_8-branch)
555
+2014-06-04 Richard Biener <rguenther@suse.de>
557
+ PR tree-optimization/61383
558
+ * gcc.dg/torture/pr61383-1.c: New testcase.
560
+2014-06-03 Andrey Belevantsev <abel@ispras.ru>
562
+ Backport from mainline
563
+ 2014-05-14 Andrey Belevantsev <abel@ispras.ru>
565
+ PR rtl-optimization/60866
566
+ * gcc.dg/pr60866.c: New test.
568
+2014-06-03 Andrey Belevantsev <abel@ispras.ru>
570
+ Backport from mainline
571
+ 2014-05-14 Andrey Belevantsev <abel@ispras.ru>
573
+ PR rtl-optimization/60901
574
+ * gcc.target/i386/pr60901.c: New test.
576
+2014-05-28 Eric Botcazou <ebotcazou@adacore.com>
578
+ Backport from mainline
579
+ 2014-05-27 Eric Botcazou <ebotcazou@adacore.com>
581
+ * gnat.dg/overflow_fixed.adb: New test.
583
+2014-05-27 Eric Botcazou <ebotcazou@adacore.com>
585
+ * gnat.dg/aliasing1.adb (dg-final): Robustify pattern matching.
587
+2014-05-22 Peter Bergner <bergner@vnet.ibm.com>
589
+ Backport from mainline
590
+ 2014-05-22 Peter Bergner <bergner@vnet.ibm.com>
592
+ * gcc.target/powerpc/htm-ttest.c: New test.
594
2014-05-22 Release Manager
596
* GCC 4.8.3 released.
597
Index: gcc/double-int.c
598
===================================================================
599
--- a/src/gcc/double-int.c (.../tags/gcc_4_8_3_release)
600
+++ b/src/gcc/double-int.c (.../branches/gcc-4_8-branch)
602
== (unsigned HOST_WIDE_INT) htwice)
603
&& (labs_den <= ltwice)))
608
add_double (*lquo, *hquo,
609
(HOST_WIDE_INT) -1, (HOST_WIDE_INT) -1, lquo, hquo);
610
Index: gcc/tree-ssa-ifcombine.c
611
===================================================================
612
--- a/src/gcc/tree-ssa-ifcombine.c (.../tags/gcc_4_8_3_release)
613
+++ b/src/gcc/tree-ssa-ifcombine.c (.../branches/gcc-4_8-branch)
616
gimple stmt = gsi_stmt (gsi);
618
+ if (is_gimple_debug (stmt))
621
if (gimple_has_side_effects (stmt)
622
+ || gimple_could_trap_p (stmt)
623
|| gimple_vuse (stmt))
626
Index: gcc/sel-sched-ir.c
627
===================================================================
628
--- a/src/gcc/sel-sched-ir.c (.../tags/gcc_4_8_3_release)
629
+++ b/src/gcc/sel-sched-ir.c (.../branches/gcc-4_8-branch)
631
static void free_av_set (basic_block);
632
static void invalidate_av_set (basic_block);
633
static void extend_insn_data (void);
634
-static void sel_init_new_insn (insn_t, int);
635
+static void sel_init_new_insn (insn_t, int, int = -1);
636
static void finish_insns (void);
638
/* Various list functions. */
639
@@ -4011,9 +4011,10 @@
643
-/* Compute seqno for INSN by its preds or succs. */
644
+/* Compute seqno for INSN by its preds or succs. Use OLD_SEQNO to compute
645
+ seqno in corner cases. */
647
-get_seqno_for_a_jump (insn_t insn)
648
+get_seqno_for_a_jump (insn_t insn, int old_seqno)
652
@@ -4069,8 +4070,16 @@
654
seqno = get_seqno_by_succs (insn);
658
+ /* The only case where this could be here legally is that the only
659
+ unscheduled insn was a conditional jump that got removed and turned
660
+ into this unconditional one. Initialize from the old seqno
661
+ of that jump passed down to here. */
665
gcc_assert (seqno >= 0);
670
@@ -4250,22 +4259,24 @@
673
/* This is used to initialize spurious jumps generated by
674
- sel_redirect_edge (). */
675
+ sel_redirect_edge (). OLD_SEQNO is used for initializing seqnos
676
+ in corner cases within get_seqno_for_a_jump. */
678
-init_simplejump_data (insn_t insn)
679
+init_simplejump_data (insn_t insn, int old_seqno)
681
init_expr (INSN_EXPR (insn), vinsn_create (insn, false), 0,
682
REG_BR_PROB_BASE, 0, 0, 0, 0, 0, 0,
683
vNULL, true, false, false,
685
- INSN_SEQNO (insn) = get_seqno_for_a_jump (insn);
686
+ INSN_SEQNO (insn) = get_seqno_for_a_jump (insn, old_seqno);
687
init_first_time_insn_data (insn);
690
/* Perform deferred initialization of insns. This is used to process
691
- a new jump that may be created by redirect_edge. */
693
-sel_init_new_insn (insn_t insn, int flags)
694
+ a new jump that may be created by redirect_edge. OLD_SEQNO is used
695
+ for initializing simplejumps in init_simplejump_data. */
697
+sel_init_new_insn (insn_t insn, int flags, int old_seqno)
699
/* We create data structures for bb when the first insn is emitted in it. */
701
@@ -4292,7 +4303,7 @@
702
if (flags & INSN_INIT_TODO_SIMPLEJUMP)
705
- init_simplejump_data (insn);
706
+ init_simplejump_data (insn, old_seqno);
709
gcc_assert (CONTAINING_RGN (BLOCK_NUM (insn))
710
@@ -5578,8 +5589,7 @@
713
/* A wrapper for redirect_edge_and_branch_force, which also initializes
714
- data structures for possibly created bb and insns. Returns the newly
715
- added bb or NULL, when a bb was not needed. */
716
+ data structures for possibly created bb and insns. */
718
sel_redirect_edge_and_branch_force (edge e, basic_block to)
720
@@ -5586,6 +5596,7 @@
721
basic_block jump_bb, src, orig_dest = e->dest;
724
+ int old_seqno = -1;
726
/* This function is now used only for bookkeeping code creation, where
727
we'll never get the single pred of orig_dest block and thus will not
728
@@ -5594,8 +5605,13 @@
729
&& !single_pred_p (orig_dest));
731
prev_max_uid = get_max_uid ();
732
+ /* Compute and pass old_seqno down to sel_init_new_insn only for the case
733
+ when the conditional jump being redirected may become unconditional. */
734
+ if (any_condjump_p (BB_END (src))
735
+ && INSN_SEQNO (BB_END (src)) >= 0)
736
+ old_seqno = INSN_SEQNO (BB_END (src));
738
jump_bb = redirect_edge_and_branch_force (e, to);
741
sel_add_bb (jump_bb);
743
@@ -5607,7 +5623,8 @@
745
jump = find_new_jump (src, jump_bb, prev_max_uid);
747
- sel_init_new_insn (jump, INSN_INIT_TODO_LUID | INSN_INIT_TODO_SIMPLEJUMP);
748
+ sel_init_new_insn (jump, INSN_INIT_TODO_LUID | INSN_INIT_TODO_SIMPLEJUMP,
750
set_immediate_dominator (CDI_DOMINATORS, to,
751
recompute_dominator (CDI_DOMINATORS, to));
752
set_immediate_dominator (CDI_DOMINATORS, orig_dest,
753
@@ -5626,6 +5643,7 @@
755
bool recompute_toporder_p = false;
756
bool maybe_unreachable = single_pred_p (orig_dest);
757
+ int old_seqno = -1;
759
latch_edge_p = (pipelining_p
761
@@ -5634,6 +5652,12 @@
763
prev_max_uid = get_max_uid ();
765
+ /* Compute and pass old_seqno down to sel_init_new_insn only for the case
766
+ when the conditional jump being redirected may become unconditional. */
767
+ if (any_condjump_p (BB_END (src))
768
+ && INSN_SEQNO (BB_END (src)) >= 0)
769
+ old_seqno = INSN_SEQNO (BB_END (src));
771
redirected = redirect_edge_and_branch (e, to);
773
gcc_assert (redirected && !last_added_blocks.exists ());
774
@@ -5654,7 +5678,7 @@
776
jump = find_new_jump (src, NULL, prev_max_uid);
778
- sel_init_new_insn (jump, INSN_INIT_TODO_LUID | INSN_INIT_TODO_SIMPLEJUMP);
779
+ sel_init_new_insn (jump, INSN_INIT_TODO_LUID | INSN_INIT_TODO_SIMPLEJUMP, old_seqno);
781
/* Only update dominator info when we don't have unreachable blocks.
782
Otherwise we'll update in maybe_tidy_empty_bb. */
783
Index: gcc/fortran/ChangeLog
784
===================================================================
785
--- a/src/gcc/fortran/ChangeLog (.../tags/gcc_4_8_3_release)
786
+++ b/src/gcc/fortran/ChangeLog (.../branches/gcc-4_8-branch)
788
+2014-05-26 Janne Blomqvist <jb@gcc.gnu.org>
790
+ Backport from mainline
791
+ PR libfortran/61310
792
+ * intrinsics.texi (CTIME): Remove mention of locale-dependent
795
2014-05-22 Release Manager
797
* GCC 4.8.3 released.
798
Index: gcc/config/i386/i386.c
799
===================================================================
800
--- a/src/gcc/config/i386/i386.c (.../tags/gcc_4_8_3_release)
801
+++ b/src/gcc/config/i386/i386.c (.../branches/gcc-4_8-branch)
802
@@ -20505,7 +20505,7 @@
803
t1 = gen_reg_rtx (V32QImode);
804
t2 = gen_reg_rtx (V32QImode);
805
t3 = gen_reg_rtx (V32QImode);
806
- vt2 = GEN_INT (128);
807
+ vt2 = GEN_INT (-128);
808
for (i = 0; i < 32; i++)
810
vt = gen_rtx_CONST_VECTOR (V32QImode, gen_rtvec_v (32, vec));
811
@@ -24640,13 +24640,17 @@
815
- /* Assume that region is SCC, i.e. all immediate predecessors
816
- of non-head block are in the same region. */
818
+ /* Regions are SCCs with the exception of selective
819
+ scheduling with pipelining of outer blocks enabled.
820
+ So also check that immediate predecessors of a non-head
821
+ block are in the same region. */
822
FOR_EACH_EDGE (e, ei, bb->preds)
824
/* Avoid creating of loop-carried dependencies through
825
- using topological odering in region. */
826
- if (BLOCK_TO_BB (bb->index) > BLOCK_TO_BB (e->src->index))
827
+ using topological ordering in the region. */
828
+ if (rgn == CONTAINING_RGN (e->src->index)
829
+ && BLOCK_TO_BB (bb->index) > BLOCK_TO_BB (e->src->index))
830
add_dependee_for_func_arg (first_arg, e->src);
833
Index: gcc/config/aarch64/arm_neon.h
834
===================================================================
835
--- a/src/gcc/config/aarch64/arm_neon.h (.../tags/gcc_4_8_3_release)
836
+++ b/src/gcc/config/aarch64/arm_neon.h (.../branches/gcc-4_8-branch)
837
@@ -13815,7 +13815,7 @@
839
__asm__ ("sqdmulh %0.4h,%1.4h,%2.h[0]"
843
: /* No clobbers */);
846
@@ -13837,7 +13837,7 @@
848
__asm__ ("sqdmulh %0.8h,%1.8h,%2.h[0]"
852
: /* No clobbers */);
855
Index: gcc/config/rs6000/htm.md
856
===================================================================
857
--- a/src/gcc/config/rs6000/htm.md (.../tags/gcc_4_8_3_release)
858
+++ b/src/gcc/config/rs6000/htm.md (.../branches/gcc-4_8-branch)
861
UNSPECV_HTM_TABORTWCI))
862
(set (subreg:CC (match_dup 2) 0) (match_dup 1))
863
- (set (match_dup 3) (lshiftrt:SI (match_dup 2) (const_int 24)))
864
+ (set (match_dup 3) (lshiftrt:SI (match_dup 2) (const_int 28)))
865
(parallel [(set (match_operand:SI 0 "int_reg_operand" "")
866
(and:SI (match_dup 3) (const_int 15)))
867
(clobber (scratch:CC))])]
868
Index: gcc/config/rs6000/rs6000.c
869
===================================================================
870
--- a/src/gcc/config/rs6000/rs6000.c (.../tags/gcc_4_8_3_release)
871
+++ b/src/gcc/config/rs6000/rs6000.c (.../branches/gcc-4_8-branch)
872
@@ -6109,7 +6109,8 @@
875
extra = GET_MODE_SIZE (mode) - UNITS_PER_WORD;
876
- gcc_assert (extra >= 0);
880
if (GET_CODE (addr) == LO_SUM)
881
/* For lo_sum addresses, we must allow any offset except one that
882
Index: gcc/config/rs6000/vsx.md
883
===================================================================
884
--- a/src/gcc/config/rs6000/vsx.md (.../tags/gcc_4_8_3_release)
885
+++ b/src/gcc/config/rs6000/vsx.md (.../branches/gcc-4_8-branch)
887
;; Iterator for the 2 64-bit vector types
888
(define_mode_iterator VSX_D [V2DF V2DI])
890
+;; Iterator for the 2 64-bit vector types + 128-bit types that are loaded with
891
+;; lxvd2x to properly handle swapping words on little endian
892
+(define_mode_iterator VSX_LE [V2DF
895
+ (TI "VECTOR_MEM_VSX_P (TImode)")])
897
;; Iterator for the 2 32-bit vector types
898
(define_mode_iterator VSX_W [V4SF V4SI])
901
;; The patterns for LE permuted loads and stores come before the general
902
;; VSX moves so they match first.
903
(define_insn_and_split "*vsx_le_perm_load_<mode>"
904
- [(set (match_operand:VSX_D 0 "vsx_register_operand" "=wa")
905
- (match_operand:VSX_D 1 "memory_operand" "Z"))]
906
+ [(set (match_operand:VSX_LE 0 "vsx_register_operand" "=wa")
907
+ (match_operand:VSX_LE 1 "memory_operand" "Z"))]
908
"!BYTES_BIG_ENDIAN && TARGET_VSX"
910
"!BYTES_BIG_ENDIAN && TARGET_VSX"
912
(set_attr "length" "8")])
914
(define_insn "*vsx_le_perm_store_<mode>"
915
- [(set (match_operand:VSX_D 0 "memory_operand" "=Z")
916
- (match_operand:VSX_D 1 "vsx_register_operand" "+wa"))]
917
+ [(set (match_operand:VSX_LE 0 "memory_operand" "=Z")
918
+ (match_operand:VSX_LE 1 "vsx_register_operand" "+wa"))]
919
"!BYTES_BIG_ENDIAN && TARGET_VSX"
921
[(set_attr "type" "vecstore")
923
(set_attr "length" "12")])
926
- [(set (match_operand:VSX_D 0 "memory_operand" "")
927
- (match_operand:VSX_D 1 "vsx_register_operand" ""))]
928
+ [(set (match_operand:VSX_LE 0 "memory_operand" "")
929
+ (match_operand:VSX_LE 1 "vsx_register_operand" ""))]
930
"!BYTES_BIG_ENDIAN && TARGET_VSX && !reload_completed"
934
;; The post-reload split requires that we re-permute the source
935
;; register in case it is still live.
937
- [(set (match_operand:VSX_D 0 "memory_operand" "")
938
- (match_operand:VSX_D 1 "vsx_register_operand" ""))]
939
+ [(set (match_operand:VSX_LE 0 "memory_operand" "")
940
+ (match_operand:VSX_LE 1 "vsx_register_operand" ""))]
941
"!BYTES_BIG_ENDIAN && TARGET_VSX && reload_completed"
944
@@ -1352,9 +1359,9 @@
945
;; xxpermdi for little endian loads and stores. We need several of
946
;; these since the form of the PARALLEL differs by mode.
947
(define_insn "*vsx_xxpermdi2_le_<mode>"
948
- [(set (match_operand:VSX_D 0 "vsx_register_operand" "=wa")
950
- (match_operand:VSX_D 1 "vsx_register_operand" "wa")
951
+ [(set (match_operand:VSX_LE 0 "vsx_register_operand" "=wa")
953
+ (match_operand:VSX_LE 1 "vsx_register_operand" "wa")
954
(parallel [(const_int 1) (const_int 0)])))]
955
"!BYTES_BIG_ENDIAN && VECTOR_MEM_VSX_P (<MODE>mode)"
956
"xxpermdi %x0,%x1,%x1,2"
957
@@ -1401,9 +1408,9 @@
958
;; lxvd2x for little endian loads. We need several of
959
;; these since the form of the PARALLEL differs by mode.
960
(define_insn "*vsx_lxvd2x2_le_<mode>"
961
- [(set (match_operand:VSX_D 0 "vsx_register_operand" "=wa")
963
- (match_operand:VSX_D 1 "memory_operand" "Z")
964
+ [(set (match_operand:VSX_LE 0 "vsx_register_operand" "=wa")
966
+ (match_operand:VSX_LE 1 "memory_operand" "Z")
967
(parallel [(const_int 1) (const_int 0)])))]
968
"!BYTES_BIG_ENDIAN && VECTOR_MEM_VSX_P (<MODE>mode)"
970
@@ -1450,9 +1457,9 @@
971
;; stxvd2x for little endian stores. We need several of
972
;; these since the form of the PARALLEL differs by mode.
973
(define_insn "*vsx_stxvd2x2_le_<mode>"
974
- [(set (match_operand:VSX_D 0 "memory_operand" "=Z")
976
- (match_operand:VSX_D 1 "vsx_register_operand" "wa")
977
+ [(set (match_operand:VSX_LE 0 "memory_operand" "=Z")
979
+ (match_operand:VSX_LE 1 "vsx_register_operand" "wa")
980
(parallel [(const_int 1) (const_int 0)])))]
981
"!BYTES_BIG_ENDIAN && VECTOR_MEM_VSX_P (<MODE>mode)"
983
Index: gcc/config/rs6000/rs6000.md
984
===================================================================
985
--- a/src/gcc/config/rs6000/rs6000.md (.../tags/gcc_4_8_3_release)
986
+++ b/src/gcc/config/rs6000/rs6000.md (.../branches/gcc-4_8-branch)
989
(define_insn "*extendsidi2_lfiwax"
990
[(set (match_operand:DI 0 "gpc_reg_operand" "=r,r,??wm,!wl,!wu")
991
- (sign_extend:DI (match_operand:SI 1 "lwa_operand" "m,r,r,Z,Z")))]
992
+ (sign_extend:DI (match_operand:SI 1 "lwa_operand" "Y,r,r,Z,Z")))]
993
"TARGET_POWERPC64 && TARGET_LFIWAX"
998
(define_insn "*extendsidi2_nocell"
999
[(set (match_operand:DI 0 "gpc_reg_operand" "=r,r")
1000
- (sign_extend:DI (match_operand:SI 1 "lwa_operand" "m,r")))]
1001
+ (sign_extend:DI (match_operand:SI 1 "lwa_operand" "Y,r")))]
1002
"TARGET_POWERPC64 && rs6000_gen_cell_microcode && !TARGET_LFIWAX"
1005
Index: gcc/config/arm/arm.md
1006
===================================================================
1007
--- a/src/gcc/config/arm/arm.md (.../tags/gcc_4_8_3_release)
1008
+++ b/src/gcc/config/arm/arm.md (.../branches/gcc-4_8-branch)
1009
@@ -7630,12 +7630,13 @@
1011
(define_insn "*arm_cmpdi_unsigned"
1012
[(set (reg:CC_CZ CC_REGNUM)
1013
- (compare:CC_CZ (match_operand:DI 0 "s_register_operand" "r")
1014
- (match_operand:DI 1 "arm_di_operand" "rDi")))]
1015
+ (compare:CC_CZ (match_operand:DI 0 "s_register_operand" "r,r")
1016
+ (match_operand:DI 1 "arm_di_operand" "rDi,rDi")))]
1018
"cmp\\t%R0, %R1\;it eq\;cmpeq\\t%Q0, %Q1"
1019
[(set_attr "conds" "set")
1020
- (set_attr "length" "8")]
1021
+ (set_attr "arch" "a,t2")
1022
+ (set_attr "length" "8,10")]
1025
(define_insn "*arm_cmpdi_zero"
1026
Index: libgfortran/intrinsics/ctime.c
1027
===================================================================
1028
--- a/src/libgfortran/intrinsics/ctime.c (.../tags/gcc_4_8_3_release)
1029
+++ b/src/libgfortran/intrinsics/ctime.c (.../branches/gcc-4_8-branch)
1034
-/* strftime-like function that fills a C string with %c format which
1035
- is identical to ctime in the default locale. As ctime and ctime_r
1036
- are poorly specified and their usage not recommended, the
1037
- implementation instead uses strftime. */
1038
+/* Maximum space a ctime-like string might need. A "normal" ctime
1039
+ string is 26 bytes, and in our case 24 bytes as we don't include
1040
+ the trailing newline and null. However, the longest possible year
1041
+ number is -2,147,481,748 (1900 - 2,147,483,648, since tm_year is a
1042
+ 32-bit signed integer) so an extra 7 bytes are needed. */
1043
+#define CTIME_BUFSZ 31
1046
-strctime (char *s, size_t max, const time_t *timep)
1048
+/* Thread-safe ctime-like function that fills a Fortran
1049
+ string. ctime_r is a portability headache and marked as obsolescent
1050
+ in POSIX 2008, which recommends strftime in its place. However,
1051
+ strftime(..., "%c",...) doesn't produce ctime-like output on
1052
+ MinGW, so do it manually with snprintf. */
1055
+gf_ctime (char *s, size_t max, const time_t timev)
1059
+ char buf[CTIME_BUFSZ + 1];
1060
/* Some targets provide a localtime_r based on a draft of the POSIX
1061
standard where the return type is int rather than the
1062
standardized struct tm*. */
1063
- __builtin_choose_expr (__builtin_classify_type (localtime_r (timep, <m))
1064
+ __builtin_choose_expr (__builtin_classify_type (localtime_r (&timev, <m))
1066
- failed = localtime_r (timep, <m) == NULL,
1067
- failed = localtime_r (timep, <m) != 0);
1068
+ failed = localtime_r (&timev, <m) == NULL,
1069
+ failed = localtime_r (&timev, <m) != 0);
1072
- return strftime (s, max, "%c", <m);
1074
+ int n = snprintf (buf, sizeof (buf),
1075
+ "%3.3s %3.3s%3d %.2d:%.2d:%.2d %d",
1076
+ "SunMonTueWedThuFriSat" + ltm.tm_wday * 3,
1077
+ "JanFebMarAprMayJunJulAugSepOctNovDec" + ltm.tm_mon * 3,
1078
+ ltm.tm_mday, ltm.tm_hour, ltm.tm_min, ltm.tm_sec,
1079
+ 1900 + ltm.tm_year);
1082
+ if ((size_t) n <= max)
1084
+ cf_strcpy (s, max, buf);
1088
+ memset (s, ' ', max);
1092
-/* In the default locale, the date and time representation fits in 26
1093
- bytes. However, other locales might need more space. */
1096
extern void fdate (char **, gfc_charlen_type *);
1097
export_proto(fdate);
1099
fdate (char ** date, gfc_charlen_type * date_len)
1101
time_t now = time(NULL);
1102
- *date = xmalloc (CSZ);
1103
- *date_len = strctime (*date, CSZ, &now);
1104
+ *date = xmalloc (CTIME_BUFSZ);
1105
+ *date_len = gf_ctime (*date, CTIME_BUFSZ, now);
1110
fdate_sub (char * date, gfc_charlen_type date_len)
1112
time_t now = time(NULL);
1113
- char *s = xmalloc (date_len + 1);
1114
- size_t n = strctime (s, date_len + 1, &now);
1115
- fstrcpy (date, date_len, s, n);
1117
+ gf_ctime (date, date_len, now);
1122
PREFIX(ctime) (char ** date, gfc_charlen_type * date_len, GFC_INTEGER_8 t)
1125
- *date = xmalloc (CSZ);
1126
- *date_len = strctime (*date, CSZ, &now);
1127
+ *date = xmalloc (CTIME_BUFSZ);
1128
+ *date_len = gf_ctime (*date, CTIME_BUFSZ, now);
1133
ctime_sub (GFC_INTEGER_8 * t, char * date, gfc_charlen_type date_len)
1136
- char *s = xmalloc (date_len + 1);
1137
- size_t n = strctime (s, date_len + 1, &now);
1138
- fstrcpy (date, date_len, s, n);
1140
+ gf_ctime (date, date_len, now);
1142
Index: libgfortran/ChangeLog
1143
===================================================================
1144
--- a/src/libgfortran/ChangeLog (.../tags/gcc_4_8_3_release)
1145
+++ b/src/libgfortran/ChangeLog (.../branches/gcc-4_8-branch)
1147
+2014-05-26 Janne Blomqvist <jb@gcc.gnu.org>
1149
+ Backport from mainline
1150
+ PR libfortran/61310
1151
+ * intrinsics/ctime.c (strctime): Rename to gf_ctime, use snprintf
1152
+ instead of strftime.
1153
+ (fdate): Use gf_ctime.
1154
+ (fdate_sub): Likewise.
1155
+ (ctime): Likewise.
1156
+ (ctime_sub): Likewise.
1158
+2014-05-25 Janne Blomqvist <jb@gcc.gnu.org>
1160
+ Backport from trunk.
1161
+ PR libfortran/61187
1162
+ * io/unix.c (raw_close): Check if s->fd is -1.
1163
+ (fd_to_stream): Check return value of fstat(), handle error.
1165
2014-05-22 Release Manager
1167
* GCC 4.8.3 released.
1168
Index: libgfortran/io/unix.c
1169
===================================================================
1170
--- a/src/libgfortran/io/unix.c (.../tags/gcc_4_8_3_release)
1171
+++ b/src/libgfortran/io/unix.c (.../branches/gcc-4_8-branch)
1176
- if (s->fd != STDOUT_FILENO
1179
+ else if (s->fd != STDOUT_FILENO
1180
&& s->fd != STDERR_FILENO
1181
&& s->fd != STDIN_FILENO)
1182
retval = close (s->fd);
1183
@@ -983,7 +985,15 @@
1185
/* Get the current length of the file. */
1187
- fstat (fd, &statbuf);
1188
+ if (fstat (fd, &statbuf) == -1)
1190
+ s->st_dev = s->st_ino = -1;
1191
+ s->file_length = 0;
1192
+ if (errno == EBADF)
1195
+ return (stream *) s;
1198
s->st_dev = statbuf.st_dev;
1199
s->st_ino = statbuf.st_ino;