Bill Schmidt [Wed, 7 Dec 2016 01:08:40 +0000 (01:08 +0000)]
backport: re PR tree-optimization/78646 (incorrect result type for pointer addition in slsr)
2016-12-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
Backport from mainline
2016-12-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
Stefan Freudenberger <stefan@reservoir.com>
PR tree-optimization/78646
* gimple-ssa-strength-reduction.c (replace_ref): The pointer
addition used for the memory base expression should have the type
of the candidate.
Backport from mainline
2016-10-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
PR rtl-optimization/78038
* ree.c (get_defs): Return NULL if a defining insn for REG cannot
be deduced to set REG through the RTL structure.
(make_defs_and_copies_lists): Return false on a failing get_defs call.
Andreas Krebbel [Fri, 2 Dec 2016 08:51:58 +0000 (08:51 +0000)]
S/390: Fix vector all/any cc modes.
This fixes a problem with the vector compares producing CC mode
results.
The instructions produce condition code modes which can be either
interpreted to check an ALL elements or an ANY element result. As the
modes where used before they could not be inverted by the middle-end
by inverting the comparison code (e.g. eq to ne). The result usually
was just wrong.
In fact inverting a comparison code on an CCVALL mode would require to
also change the mode to CCVANY but this cannot be done easily in the
middle-end. With this patch the meaning of an ALL cc mode only refers
to the not-inverted comparison code (e.g. eq, gt, ge). With that
change inverting the comparison code matches a not operation on the
condition code mask again.
Bootstrapped and regression tested on s390 and s390x.
Bye,
-Andreas-
gcc/testsuite/ChangeLog:
2016-12-02 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
Backport from mainline
2016-12-02 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
* gcc.target/s390/vector/vec-scalar-cmp-1.c: Fix and harden the
pattern checks.
* gcc.target/s390/zvector/vec-cmp-1.c: New test.
gcc/ChangeLog:
2016-12-02 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
Backport from mainline
2016-12-02 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
* config/s390/s390-modes.def (CCVEQANY, CCVH, CCVHANY, CCVHU)
(CCVHUANY): Remove modes.
(CCVIH, CCVIHU, CCVIALL, CCVIANY, CCVFALL, CCVFANY): Add modes and
documentation.
* config/s390/s390.c (s390_match_ccmode_set): Rename cc modes.
(s390_expand_vec_compare_scalar): Pick one of the cc consumer
modes.
(s390_branch_condition_mask): Adjust to use the new cc consumer
modes. The new modes allow for proper reversal in the middle-end.
(s390_expand_vec_compare_cc): Determine the proper cc producer and
consumer modes for a comparison.
* config/s390/s390.md: Rename CCVH to CCVIH and CCVHU to CCVIHU
throughout the file.
* config/s390/vx-builtins.md: Likewise.
Martin Liska [Thu, 24 Nov 2016 10:12:24 +0000 (11:12 +0100)]
Add sem_item::m_hash_set (PR ipa/78309)
PR ipa/78309
* ipa-icf.c (void sem_item::set_hash): Update m_hash_set.
(sem_function::get_hash): Use the new field.
(sem_function::parse): Remove an argument from ctor.
(sem_variable::parse): Likewise.
(sem_variable::get_hash): Use the new field.
(sem_item_optimizer::read_section): Use new ctor and set hash.
* ipa-icf.h: _hash is removed from sem_item::sem_item,
sem_variable::sem_variable, sem_function::sem_function.
Fix PR78294 - thread sanitizer broken when using ld.gold
When one uses ld.gold to build gcc, the thread sanitizer doesn't work,
because gold is more conservative when applying TLS relaxations than
ld.bfd. In this case a missing initial-exec attribute on a declaration
causes gcc to assume the general dynamic model. With ld.bfd this gets
relaxed to initial exec when linking the shared library, so the missing
attribute doesn't matter. But ld.gold doesn't perform this optimization
and this leads to crashes on tsan instrumented binaries.
Uros Bizjak [Fri, 11 Nov 2016 19:43:54 +0000 (20:43 +0100)]
i386.md (*<shift_insn><mode>3_doubleword): Mark operand 0 as earlyclobber.
* config/i386/i386.md (*<shift_insn><mode>3_doubleword): Mark
operand 0 as earlyclobber.
(*ashl<mode>3_doubleword): Ditto for all operand 0 alternatives.
Thomas Koenig [Sun, 6 Nov 2016 20:30:31 +0000 (20:30 +0000)]
backport: re PR fortran/69544 (Internal compiler error with -Wall and where)
2016-11-06 Thomas Koenig <tkoenig@gcc.gnu.org>
Backport from trunk
PR fortran/69544
PR fortran/78178
* gfortran.dg/where_5.f90: New test.
* gfortran.dg/where_6.f90: New test.
2016-11-06 Thomas Koenig <tkoenig@gcc.gnu.org>
Backport from trunk
PR fortran/69544
PR fortran/78178
* match.c (match_simple_where): Fill in locus for assigment
in simple WHERE statement.
(gfc_match_where): Likewise.
Thomas Koenig [Tue, 1 Nov 2016 08:12:00 +0000 (08:12 +0000)]
backport: re PR fortran/71902 (Unneeded temporary on reallocatable character assignment)
2016-10-31 Thomas Koenig <tkoenig@gcc.gnu.org>
Backport from trunk
PR fortran/71902
* frontend-passes.c (realloc_string_callback): Also check for the
lhs being deferred. Name temporary variable "realloc_string".
2016-10-31 Thomas Koenig <tkoenig@gcc.gnu.org>
Backport from trunk
PR fortran/71902
* gfortran.dg/dependency_47.f90: New test.
* gfortran.dg/dependency_49.f90: New test.
Jerry DeLisle [Mon, 31 Oct 2016 23:40:40 +0000 (23:40 +0000)]
backport: re PR libfortran/78123 (Short reads with T edit descriptor not padding correctly)
2016-10-31 Jerry DeLisle <jvdelisle@gcc.gnu.org>
Backport from trunk
PR libgfortran/78123
* io/transfer.c (formatted_transfer_scalar_read): Clear seen_eor
only if we have tabbed to left of current position.
Backport from trunk
PR fortran/78123
* gfortran.dg/fmt_t_9.f: New test.
Paul Thomas [Mon, 24 Oct 2016 12:14:52 +0000 (12:14 +0000)]
re PR fortran/61420 ([OOP] type-bound procedure returning a procedure pointer fails to compile)
2016-10-24 Paul Thomas <pault@gcc.gnu.org>
PR fortran/61420
PR fortran/78013
* resolve.c (resolve_variable): Obtain the typespec for a
variable expression, when the variable is a function result
that is a procedure pointer.
2016-10-24 Paul Thomas <pault@gcc.gnu.org>
PR fortran/61420
PR fortran/78013
* gfortran.dg/proc_ptr_49.f90: New test.
Bill Schmidt [Mon, 24 Oct 2016 02:41:12 +0000 (02:41 +0000)]
backport: re PR tree-optimization/77916 (ICE in verify_gimple_in_cfg: invalid (pointer) operands to plus/minus)
[gcc]
2016-10-23 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
Backport from mainline
2016-10-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
PR tree-optimization/77916
* gimple-ssa-strength-reduction.c (create_add_on_incoming_edge):
Don't allow a MINUS_EXPR for pointer arithmetic for either known
or unknown strides.
(record_increment): Increments of -1 for unknown strides just use
a multiply initializer like other negative values.
(analyze_increments): Remove stopgap solution for -1 increment
applied to pointer arithmetic.
(insert_initializers): Requirement of initializer for -1 should be
based on pointer-typedness of the candidate basis.
[gcc/testsuite]
2016-10-23 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
Backport from mainline
2016-10-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
Uros Bizjak [Wed, 19 Oct 2016 15:00:06 +0000 (17:00 +0200)]
re PR target/77991 (ICE on x32 in plus_constant, at explow.c:87)
PR target/77991
* config/i386/i386.c (legitimize_tls_address)
<case TLS_MODEL_INITIAL_EXEC>: For TARGET_64BIT || TARGET_ANY_GNU_TLS
convert dest to Pmode if different than Pmode.
testsuite/ChangeLog:
PR target/77991
* gcc.target/i386/pr77991.c: New test.
Jonathan Wakely [Wed, 19 Oct 2016 10:36:24 +0000 (11:36 +0100)]
PR77990 fix unique_ptr for non-copyable deleters
PR libstdc++/77990
* include/bits/unique_ptr.h (unique_ptr::unique_ptr(pointer)): Set
pointer member after value-initialization of tuple.
* testsuite/20_util/unique_ptr/assign/48635_neg.cc: Adjust dg-errors.
* testsuite/20_util/unique_ptr/cons/77990.cc: New test.
Jonathan Wakely [Mon, 17 Oct 2016 17:03:50 +0000 (18:03 +0100)]
Update docs on libstdc++ source-code layout
Backport from mainline:
2016-10-10 Jonathan Wakely <jwakely@redhat.com>
* doc/xml/manual/appendix_contributing.xml (contrib.organization):
Replace <literallayout> with nested <variablelist> elements. Update
some more outdated text.
* doc/html/*: Regenerate.
Backport from mainline:
2016-10-10 Jonathan Wakely <jwakely@redhat.com>
* doc/xml/manual/appendix_contributing.xml (contrib.organization):
Describe other subdirectories and add markup. Remove outdated
reference to check-script target.