[gcc]
2017-09-12 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
Backport from mainline
2017-09-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
PR target/81833
* config/rs6000/altivec.md (altivec_vsum2sws): Convert from a
define_insn to a define_expand.
(altivec_vsum2sws_direct): New define_insn.
(altivec_vsumsws): Convert from a define_insn to a define_expand.
[gcc/testsuite]
2017-09-12 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
Backport from mainline
2017-09-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
PR target/81833
* gcc.target/powerpc/pr81833-1.c: New file.
* gcc.target/powerpc/pr81833-2.c: New file.
From-SVN: r252042
As discussed in PR c++/80265 ("__builtin_{memcmp,memchr,strlen} are
not usable in constexpr functions"), use __builtin_constant_p to tell
whether we can defer to a constexpr algorithm.
I used __always_inline__ just to be thorough. It isn't really really
necessary as far as I could determine.
Changes like these:
if (__n == 0)
return 0;
- return wmemcmp(__s1, __s2, __n);
+ else
+ return wmemcmp(__s1, __s2, __n);
are necessary otherwise G++ complains that we're calling a
non-constexpr function, which looks like a a manifestation of PR67026
to me.
libstdc++-v3:
2017-06-12 Pedro Alves <palves@redhat.com>
* doc/xml/manual/status_cxx2017.xml: Update C++17 constexpr
char_traits status.
* doc/html/*: Regenerate.
* include/bits/char_traits.h (_GLIBCXX_ALWAYS_INLINE): Define if
not already defined.
(__cpp_lib_constexpr_char_traits): Uncomment.
(__constant_string_p, __constant_char_array_p): New.
(std::char_traits<char>, std::char_traits<wchar_t>): Add
_GLIBCXX17_CONSTEXPR on compare, length and find and use
__constant_string_p, __constant_char_array_p and
__builtin_constant_p to defer to __gnu_cxx::char_traits at compile
time.
* testsuite/21_strings/char_traits/requirements/
constexpr_functions_c++17.cc: Uncomment
__cpp_lib_constexpr_char_traits tests. Uncomment
test_compare<char>, test_length<char>, test_find<char>,
test_compare<wchar_t>, test_length<wchar_t> and test_find<wchar_t>
static_assert tests.
From-SVN: r252030
2017-09-11 Max Filippov <jcmvbkbc@gmail.com>
gcc/
Backport from mainline
* config/xtensa/xtensa.c (xtensa_mem_offset): Check that both
words of DImode object are reachable by xtensa_uimm8x4 access.
From-SVN: r251987
[gcc]
2017-09-10 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
Backport from mainline
2017-05-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
PR target/80695
* config/rs6000/rs6000.c (rs6000_builtin_vectorization_cost):
Account for direct move costs for vec_construct of integer
vectors.
Backport from mainline
2017-07-23 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
PR target/80695
* config/rs6000/rs6000.c (rs6000_builtin_vectorization_cost):
Reduce cost estimate for direct moves.
[gcc/testsuite]
2017-09-10 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
Backport from mainline
2017-05-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
PR target/80695
* gcc.target/powerpc/pr80695-p8.c: New file.
* gcc.target/powerpc/pr80695-p9.c: New file.
From-SVN: r251952
* gcc-interface/decl.c (promote_object_alignment): New function taken
from...
(gnat_to_gnu_entity) <E_Variable>: ...here. Invoke it.
(gnat_to_gnu_field): If the field is Atomic or VFA, invoke it and
create a padding type on success before doing the atomic check.
From-SVN: r251932
* sem_util.ads (Set_Rep_Info): New inline procedure.
* sem_util.adb (Set_Rep_Info): Implement it.
* sem_ch3.adb (Process_Subtype): If the case of a constraint present,
always copy the representation aspects onto the subtype.
* gcc-interface/decl.c (gnat_to_gnu_entity): Only set the TYPE_ALIGN_OK
and TYPE_BY_REFERENCE_P flags on types after various promotions.
* gcc-interface/trans.c (node_has_volatile_full_access) <N_Identifier>:
Consider all kinds of entities.
From-SVN: r251928
PR bootstrap/81926
* cp-objcp-common.c (struct debug_type_hasher): New class.
(debug_type_hash): New variable.
(cp_get_debug_type): Associate the OFFSET_TYPEs with the types.
From-SVN: r251923
Backported from mainline
2017-09-05 Jakub Jelinek <jakub@redhat.com>
PR middle-end/81768
* omp-low.c (lower_omp_for): Recompute tree invariant if
gimple_omp_for_initial/final is ADDR_EXPR.
* gcc.dg/gomp/pr81768-2.c: New test.
From-SVN: r251857
Backported from mainline
2017-09-05 Jakub Jelinek <jakub@redhat.com>
PR middle-end/81768
* omp-expand.c (expand_omp_simd): Force second operands of COND_EXPR
into gimple val before gimplification fo the COND_EXPR.
* gcc.dg/gomp/pr81768-1.c: New test.
From-SVN: r251856
Backported from mainline
2017-09-01 Jakub Jelinek <jakub@redhat.com>
PR sanitizer/81923
* asan.c (create_odr_indicator): Strip name encoding from assembler
name before appending it after __odr_asan_.
* gcc.dg/asan/pr81923.c: New test.
From-SVN: r251854
Backported from mainline
2017-08-03 Jakub Jelinek <jakub@redhat.com>
PR driver/81650
* calls.c (alloc_max_size): Use HOST_WIDE_INT_UC (10??)
instead of 10??LU, perform unit multiplication in wide_int,
don't change alloc_object_size_limit if the limit is larger
than SSIZE_MAX.
* gcc.dg/pr81650.c: New test.
From-SVN: r251850
Backported from mainline
2017-08-03 Jakub Jelinek <jakub@redhat.com>
PR middle-end/81052
* omp-low.c (diagnose_sb_0): Handle flag_openmp_simd like flag_openmp.
(pass_diagnose_omp_blocks::gate): Enable also for flag_openmp_simd.
* c-c++-common/pr81052.c: New test.
From-SVN: r251849
Backported from mainline
2017-07-27 Jakub Jelinek <jakub@redhat.com>
PR c/45784
* c-omp.c (c_finish_omp_for): If the condition is wrapped in
rhs of COMPOUND_EXPR(s), skip them and readd their lhs into
new COMPOUND_EXPRs around the rhs of the comparison.
* testsuite/libgomp.c/pr45784.c: New test.
* testsuite/libgomp.c++/pr45784.C: New test.
From-SVN: r251848
[gcc]
2017-09-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
Backport from mainline:
2017-08-30 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
PR tree-optimization/81987
* gimple-ssa-strength-reduction.c (insert_initializers): Don't
insert an initializer in a location not dominated by the stride
definition.
[gcc/testsuite]
2017-09-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
Backport from mainline:
2017-08-30 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
PR tree-optimization/81987
* g++.dg/torture/pr81987.C: New file.
From-SVN: r251815
PR testsuite/82120
* gcc.dg/tree-ssa/pr81588.c: Don't run on logical_op_short_circuit
targets except for those where -mbranch-cost=2 is supported.
From-SVN: r251806
[gcc]
2017-09-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
Backport from mainline
2017-08-29 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
Jakub Jelinek <jakub@redhat.com>
Richard Biener <rguenther@suse.de>
PR tree-optimization/81503
* gimple-ssa-strength-reduction.c (replace_mult_candidate): Ensure
folded constant fits in the target type; reorder tests for clarity.
[gcc/testsuite]
2017-09-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
Backport from mainline
2017-08-29 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
Jakub Jelinek <jakub@redhat.com>
Richard Biener <rguenther@suse.de>
PR tree-optimization/81503
* gcc.c-torture/execute/pr81503.c: New file.
From-SVN: r251743
This is a backport from trunk.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79542 reports an ICE in
dwarf2out.c for an Ada testcase built with optimization.
This crash happens during the late generation pass because
add_gnat_descriptive_type cannot find the type DIE corresponding to some
descriptive type after having tried to generate it. This is because the
DIE was generated during the early generation pass, but then pruned by
the type pruning machinery. So why was it pruned?
We are in a situation where we have cloned types (because of inlining,
IIUC) whose TYPE_NAME have non-null DECL_ABSTRACT_ORIGIN attributes. As
a consequence:
* In modified_type_die, the "handle C typedef types" part calls
gen_type_die on the cloned type.
* gen_type_die matches a typedef variant, and then calls gen_decl_die
on its TYPE_NAME, which will end up calling gen_typedef_die.
* gen_typedef_die checks decl_ultimate_origin for this TYPE_DECL, and
finds one, so it only adds a DW_AT_abstract_origin attribute to the
DW_TAG_typedef DIE, but the cloned type itself does not get its own
DIE.
* Back in modified_type_die, the call to lookup_type_die on the type
passed to gen_type_die returns NULL.
In the end, whole type trees, i.e. the ones referenced by
DECL_ABSTRACT_ORIGIN attributes, are never referenced from type pruning
"roots" and are thus pruned. The descriptive type at stake here is one
of them, hence the assertion failure.
This patch attemps to fix that with what seems to be the most sensible
thing to do in my opinion: updating the "handle C typedef types" part in
modified_type_die to check decl_ultimate_origin before calling
gen_type_die: if that function returns something not null, then we know
that gen_type_die/gen_typedef_die will not generate a DIE for the input
type, so we try to process the ultimate origin instead. It also updates
in a similar way gen_type_die_with_usage, assert that when
gen_typedef_die is called on nodes that have an ultimate origin, this
origin is themselves.
gcc/
PR ada/79542
* dwarf2out.c (modified_type_die): For C typedef types that have
an ultimate origin, process the ultimate origin instead of the
input type.
(gen_typedef_die): Assert that input DECLs have no ultimate
origin.
(gen_type_die_with_usage): For typedef variants that have an
ultimate origin, just call gen_decl_die on the original DECL.
(process_scope_var): Avoid creating DIEs for local typedefs and
concrete static variables.
gcc/testsuite/
PR ada/79542
* gnat.dg/debug13.ads, gnat.dg/debug13.adb: New testcase.
From-SVN: r251709
PR ada/62235
* gcc-interface/decl.c (gnat_to_gnu_entity): Skip regular processing
for Itypes that are E_Record_Subtype with a cloned subtype.
<E_Record_Subtype>: Use the DECL of the cloned type directly, if any.
From-SVN: r251707
* gcc-interface/utils.c (unchecked_convert): When the result type is a
non-biased integral type with size 0, set the result to 0 directly.
From-SVN: r251702
* gcc-interface/trans.c (Call_to_gnu): If this is a function call and
there is no target, do not create a temporary for the return value for
an allocator either.
From-SVN: r251696
Backport from mainline
2017-08-09 Jonathan Wakely <jwakely@redhat.com>
* include/std/type_traits (_GLIBCXX_NO_BUILTIN_HAS_UNIQ_OBJ_REP):
Replace with _GLIBCXX_HAVE_BUILTIN_HAS_UNIQ_OBJ_REP and use
__is_identifier to set it.
From-SVN: r251656