2017-05-19 Richard Biener <rguenther@suse.de>
PR c++/80593
* c-warn.c (strict_aliasing_warning): Do not warn for accesses
to alias-set zero memory.
* g++.dg/warn/Wstrict-aliasing-bogus-char-2.C: New testcase.
* g++.dg/warn/Wstrict-aliasing-6.C: Adjust expected outcome.
From-SVN: r248269
If we cannot load a constant into a register in one insn, and that
constant is a valid mask (for rotate instructions), we currently
prefer to load -1 and then mask it. This patch makes us not do that if
instead we could use two add or or instructions, since those are
sometimes faster on certain CPUs (and never are slower).
* config/rs6000/rs6000.md (splitter to load of -1 and mask): Don't
use this splitter if two add or or instructions would also work for
the constant we want to generate.
From-SVN: r248265
* ipa-inline.h (ipa_call_summary): Turn sizes into signed;
add ctor.
* ipa-inline.c (want_inline_small_function_p): Do not cast to
unsigned.
From-SVN: r248263
This patch implements separate shrink-wrapping for the non-volatile
floating point registers (FPR14..FPR31). It is pretty much exactly
analogous to the code for GPRs.
* config/rs6000/rs6000.c (struct machine_function): Add field
fpr_is_wrapped_separately.
(rs6000_get_separate_components): Use 64 components. Handle the
new FPR components.
(rs6000_components_for_bb): Handle the FPR components.
(rs6000_emit_prologue_components): Handle the FPR components.
(rs6000_emit_epilogue_components): Handle the FPR components.
(rs6000_set_handled_components): Handle the FPR components.
(rs6000_emit_prologue): Don't output prologue code for those FPRs
that are already separately shrink-wrapped.
(rs6000_emit_epilogue): Don't output epilogue code for those FPRs
that are already separately shrink-wrapped.
From-SVN: r248256
[gcc]
2017-05-18 Michael Meissner <meissner@linux.vnet.ibm.com>
PR target/80510
* config/rs6000/predicates.md (simple_offsettable_mem_operand):
New predicate.
* config/rs6000/rs6000.md (ALTIVEC_DFORM): New iterator.
(define_peephole2 for Altivec d-form load): Add peepholes to catch
cases where the register allocator uses a move and an offsettable
memory operation to/from a FPR register on ISA 2.06/2.07.
(define_peephole2 for Altivec d-form store): Likewise.
[gcc/testsuite]
2017-05-18 Michael Meissner <meissner@linux.vnet.ibm.com>
PR target/80510
* gcc.target/powerpc/pr80510-1.c: New test.
* gcc.target/powerpc/pr80510-2.c: Likewise.
From-SVN: r248254
2017-05-18 Matthias Klose <doko@ubuntu.com>
* gcc_release (build_gzip): Build xz tarball instead of bz2 tarball.
(build_diffs): Handle building diffs from either bz2 or xz tarballs,
compress diffs using xz instead of bz2.
(build_diff): Likewise.
(upload_files): Check for *.xz files instead of *.bz2 files.
(announce_snapshot): Announce xz tarball instead of bz2 tarball.
(XZ): New definition.
(<toplevel>): Look for both bz2 and xz compressed old tarballs.
From-SVN: r248251
Go 1.8 includes a language change (https://golang.org/doc/go1.8#language):
in an explicit conversion from one struct type to another, any field
tags are ignored.
This CL implements this language change in the gofrontend. The tests
for this are in the gc testsuite, which will be copied into the gccgo
repository in due course.
Updates golang/go#16085.
Reviewed-on: https://go-review.googlesource.com/43614
From-SVN: r248248
PR libstdc++/80478
* include/std/functional (_Mem_fn_traits_base): Add specializations
for noexcept member function types.
* testsuite/20_util/function_objects/mem_fn/80478.cc: New test.
From-SVN: r248245
Add an assert to leaf_function_p to ensure it is not called from a
prolog or epilog sequence (which would incorrectly return true in a
non-leaf function). There are several targets which still call
leaf_function_p, and while most appear safe or appear aware of the
issue, it is likely not all such calls are safe. This check enables
any such latent bugs to be found.
gcc/
* final.c (leaf_function_p): Check we are not in a sequence.
From-SVN: r248240
* cp-tree.h (OVL_USED): Replace with ...
(OVL_USING_P): ... this.
(ovl_iterator::using_p): Adjust.
* name-lookup.c (push_overloaded_decl_1)
do_nonmember_using_decl): Adjust.
* search.c (lookup_field_r): Adjust.
* tree.c (ovl_insert, ovl_scope): Adjust.
(--This line, and those below, will be ignored--
M cp/tree.c
M cp/cp-tree.h
M cp/name-lookup.c
M cp/search.c
M cp/ChangeLog
From-SVN: r248229
* cp-tree.h (lookup_add): Swap args.
(ovl_cons, build_overload): Delete.
* name-lookup.c (add_function, push_overloaded_decl_1)
do_nonmember_using_decl, merge_functions, remove_hidden_names):
Use lookup_add, ovl_insert.
* pt.c (check_explicit_specialization): Use lookup_add.
(do_class_deduction): Likewise. Refactor if.
* tree.c (lookup_add): Swap args.
(ovl_cons, build_overload): Delete.
(--This line, and those below, will be ignored--
M cp/cp-tree.h
M cp/name-lookup.c
M cp/pt.c
M cp/ChangeLog
M cp/tree.c
From-SVN: r248198
* c-common.c (self_promoting_args_p): Change the return type to bool.
Use false/true instead of 0/1.
* c-common.h (self_promoting_args_p): Update.
* c-decl.c (start_decl): Use false/true instead of 0/1.
(grokdeclarator): Likewise.
(finish_struct): Likewise.
(start_function): Change the return type to bool. Use false/true
instead of 0/1.
(declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
* c-tree.h (start_function): Update.
* c-typeck.c (same_translation_unit_p): Change the return type to bool.
(set_designator): Change the return type to bool. Use false/true
instead of 0/1.
From-SVN: r248192
* config/sparc/sparc.c (sparc_option_override): Set function
alignment for -mcpu=niagara7 to 64 to match the I$ line.
* config/sparc/sparc.h (BRANCH_COST): Set the SPARC M7 branch
latency to 1.
* config/sparc/sparc.h (BRANCH_COST): Set the SPARC T4 branch
latency to 2.
* config/sparc/sol2.h: Fix a ASM_CPU32_DEFAULT_SPEC typo.
* gcc.target/sparc/niagara7-align.c: New test.
From-SVN: r248184
Decimal float negative zero should compare equal to positive zero.
Decimal float zeroes are encoded as value class "normal" (in real.c);
they need to be handled specially, but in this one case that does not
yet happen. This fixes it.
PR middle-end/80692
* real.c (do_compare): Give decimal_do_compare preference over
comparing just the signs.
gcc/testsuite/
PR middle-end/80692
* gcc.c-torture/execute/pr80692.c: New testcase.
From-SVN: r248174
2017-05-17 Andreas Tobler <andreast@gcc.gnu.org>
* config/arm/unwind-arm.h: Make _Unwind_GetIP, _Unwind_GetIPInfo and
_Unwind_SetIP available as functions for arm*-*-freebsd*.
* config/arm/unwind-arm.c: Implement the above.
From-SVN: r248173
Ensure that the packages vendored into the standard library do not
have the same pkgpath as the actual packages. If we don't, attempts
to build and test the actual packages will get confused. The specific
error I was seeing was import loops, causing some of the packages to
fail to get initialized, causing an obscure run time crash.
Reviewed-on: https://go-review.googlesource.com/43610
From-SVN: r248168