gcc/testsuite/ChangeLog:
2019-06-12 Dimitar Dimitrov <dimitar@dinux.eu>
* gcc.target/pru/abi-arg-struct.c: New test.
* gcc.target/pru/ashiftrt.c: New test.
* gcc.target/pru/builtins-1.c: New test.
* gcc.target/pru/builtins-error.c: New test.
* gcc.target/pru/clearbit.c: New test.
* gcc.target/pru/loop-asm.c: New test.
* gcc.target/pru/loop-dowhile.c: New test.
* gcc.target/pru/loop-hi-1.c: New test.
* gcc.target/pru/loop-hi-2.c: New test.
* gcc.target/pru/loop-qi-1.c: New test.
* gcc.target/pru/loop-qi-2.c: New test.
* gcc.target/pru/loop-short-1.c: New test.
* gcc.target/pru/loop-short-2.c: New test.
* gcc.target/pru/loop-si-1.c: New test.
* gcc.target/pru/loop-si-2.c: New test.
* gcc.target/pru/loop-u8_pcrel_overflow.c: New test.
* gcc.target/pru/loop-ubyte-1.c: New test.
* gcc.target/pru/loop-ubyte-2.c: New test.
* gcc.target/pru/lra-framepointer-fragmentation-1.c: New test.
* gcc.target/pru/lra-framepointer-fragmentation-2.c: New test.
* gcc.target/pru/mabi-ti-1.c: New test.
* gcc.target/pru/mabi-ti-2.c: New test.
* gcc.target/pru/mabi-ti-3.c: New test.
* gcc.target/pru/mabi-ti-4.c: New test.
* gcc.target/pru/mabi-ti-5.c: New test.
* gcc.target/pru/mabi-ti-6.c: New test.
* gcc.target/pru/mabi-ti-7.c: New test.
* gcc.target/pru/pr64366.c: New test.
* gcc.target/pru/pragma-ctable_entry.c: New test.
* gcc.target/pru/pru.exp: New file.
* gcc.target/pru/qbbc-1.c: New test.
* gcc.target/pru/qbbc-2.c: New test.
* gcc.target/pru/qbbc-3.c: New test.
* gcc.target/pru/qbbs-1.c: New test.
* gcc.target/pru/qbbs-2.c: New test.
* gcc.target/pru/setbit.c: New test.
* gcc.target/pru/zero_extend-and-hisi.c: New test.
* gcc.target/pru/zero_extend-and-qihi.c: New test.
* gcc.target/pru/zero_extend-and-qisi.c: New test.
* gcc.target/pru/zero_extend-hisi.c: New test.
* gcc.target/pru/zero_extend-qihi.c: New test.
* gcc.target/pru/zero_extend-qisi.c: New test.
* lib/target-supports.exp: Add PRU to feature filters.
From-SVN: r272205
libgcc/ChangeLog:
2019-06-12 Dimitar Dimitrov <dimitar@dinux.eu>
* config.host: Add PRU target.
* config/pru/asri.c: New file.
* config/pru/eqd.c: New file.
* config/pru/eqf.c: New file.
* config/pru/ged.c: New file.
* config/pru/gef.c: New file.
* config/pru/gtd.c: New file.
* config/pru/gtf.c: New file.
* config/pru/led.c: New file.
* config/pru/lef.c: New file.
* config/pru/lib2bitcountHI.c: New file.
* config/pru/lib2divHI.c: New file.
* config/pru/lib2divQI.c: New file.
* config/pru/lib2divSI.c: New file.
* config/pru/libgcc-eabi.ver: New file.
* config/pru/ltd.c: New file.
* config/pru/ltf.c: New file.
* config/pru/mpyll.S: New file.
* config/pru/pru-abi.h: New file.
* config/pru/pru-asm.h: New file.
* config/pru/pru-divmod.h: New file.
* config/pru/sfp-machine.h: New file.
* config/pru/t-pru: New file.
From-SVN: r272204
2019-06-12 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/90002
* array.c (gfc_free_array_spec): When freeing an array-spec, avoid
an ICE for assumed-shape coarrays
2019-06-12 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/90002
* gfortran.dg/pr90002.f90: New test.
From-SVN: r272201
With the test-case of PR90009 we run into a SIGSEGV in nvptx_neuter_pars,
because par->join_insn and par->join_block are NULL.
Detect this problem earlier, by adding an assert in nvptx_find_par that
asserts that a fork cannot be paired with more than one join.
Build and tested on x86_64 with nvptx accelerator enabled.
2019-06-12 Tom de Vries <tdevries@suse.de>
PR tree-optimization/90009
* config/nvptx/nvptx.c (nvptx_find_par): Assert fork has at most join.
From-SVN: r272189
Also fix a warning with -Wunused-parameter -Wsystem-headers.
* include/std/variant (get<T>, get<N>, get_if<N>, get_if<T>)
(variant::emplace): Change static_assert messages from "should be"
to "must be".
(hash<monostate>::operator()): Remove name of unused parameter.
From-SVN: r272188
The std::to_chars functions from C++17 can be used to implement
std::to_string with much better performance than calling snprintf. Only
the __detail::__to_chars_len and __detail::__to_chars_10 functions are
needed for to_string, because it always outputs base 10 representations.
The return type of __detail::__to_chars_10 should not be declared before
C++17, so the function body is extracted into a new function that can be
reused by to_string and __detail::__to_chars_10.
The existing tests for to_chars rely on to_string to check for correct
answers. Now that they use the same code that doesn't actually ensure
correctness, so add new tests for std::to_string that compare against
printf output.
* include/Makefile.am: Add new <bits/charconv.h> header.
* include/Makefile.in: Regenerate.
* include/bits/basic_string.h (to_string(int), to_string(unsigned))
(to_string(long), to_string(unsigned long), to_string(long long))
(to_string(unsigned long long)): Rewrite to use __to_chars_10_impl.
* include/bits/charconv.h: New header.
(__detail::__to_chars_len): Move here from <charconv>.
(__detail::__to_chars_10_impl): New function extracted from
__detail::__to_chars_10.
* include/std/charconv (__cpp_lib_to_chars): Add, but comment out.
(__to_chars_unsigned_type): New class template that reuses
__make_unsigned_selector_base::__select to pick a type.
(__unsigned_least_t): Redefine as __to_chars_unsigned_type<T>::type.
(__detail::__to_chars_len): Move to new header.
(__detail::__to_chars_10): Add inline specifier. Move code doing the
output to __detail::__to_chars_10_impl and call that.
* include/std/version (__cpp_lib_to_chars): Add, but comment out.
* testsuite/21_strings/basic_string/numeric_conversions/char/
to_string.cc: Fix reference in comment. Remove unused variable.
* testsuite/21_strings/basic_string/numeric_conversions/char/
to_string_int.cc: New test.
From-SVN: r272186
2019-06-12 Martin Liska <mliska@suse.cz>
* ggc-common.c (ggc_prune_overhead_list): Do not sanitize
the created map.
* hash-map.h: Add sanitize_eq_and_hash into ::hash_map.
* mem-stats.h (mem_alloc_description::mem_alloc_description):
Do not sanitize created maps.
From-SVN: r272183
PR target/90811
* cfgexpand.c (align_local_variable): Add really_expand argument,
don't SET_DECL_ALIGN if it is false.
(add_stack_var): Add really_expand argument, pass it through to
align_local_variable.
(expand_one_stack_var_1): Pass true as really_expand to
align_local_variable.
(expand_one_ssa_partition): Pass true as really_expand to
add_stack_var.
(expand_one_var): Pass really_expand through to add_stack_var.
From-SVN: r272181
PR c/90760
* symtab.c (symtab_node::set_section): Allow being called on aliases
as long as they aren't analyzed yet.
* gcc.dg/pr90760.c: New test.
From-SVN: r272178
This test currently fails on Darwin, because the port inlines fn2 for
both PIC (and non-pic for m32). Fixed by adjusting the target condition.
2019-06-11 Iain Sandoe <iain@sandoe.co.uk>
PR testsuite/65364
* gcc.dg/uninit-19.c (fn1): Adjust target condition for Darwin.
(fn2): Likewise.
From-SVN: r272167
* doc/invoke.texi (Winaccessible-base): Document.
* c.opt (Winaccessible-base): Added new option.
* class.c (warn_about_ambiguous_bases): Changed name to:
maybe_warn_about_inaccessible_bases.
(maybe_warn_about_inaccessible_bases): Implemented new
Winaccessible-base warning option for both direct and virtual
base warnings.
(layout_class_type): Call to warn_about_ambiguous_bases changed to fit
new name.
* g++.dg/warn/Winaccessible-base-1.C: New file.
* g++.dg/warn/Winaccessible-base-2.C: New file.
* g++.dg/warn/Winaccessible-virtual-base-1.C: New file.
* g++.dg/warn/Winaccessible-virtual-base-2.C: New file.
From-SVN: r272157
2019-06-11 Richard Biener <rguenther@suse.de>
PR c++/90801
* typeck2.c (split_nonconstant_init_1): Avoid ordered remove
from CONSTRUCTOR by marking to remove elements and doing all
of them in a O(n) scan.
From-SVN: r272156
2019-06-11 Richard Biener <rguenthe@suse.de>
d/90778
* toir.cc (pop_label): Only queue labels in a vector.
(cmp_labels): Label decl comparator.
(pop_binding_level): Pop labels in DECL_UID order to avoid
debug info differences.
From-SVN: r272146
2019-06-11 Martin Liska <mliska@suse.cz>
PR c++/87847
* hash-table.h: Extend create_gcc, add one parameter
that is passed into hash_table::hash_table.
2019-06-11 Martin Liska <mliska@suse.cz>
PR c++/87847
* pt.c (init_template_processing): Disable hash table
sanitization for decl_specializations and type_specializations.
From-SVN: r272144
Also move the determine_types pass on an inlined function body to one
place, rather than doing it ad hoc as needed.
This adds 79 new inlinable functions in the standard library, such as
bytes.HasPrefix and bytes.LastIndexByte.
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/181261
From-SVN: r272133
Heap_expression::do_get_backend emits an unconditional write
barrier if the type has pointers and it is not a stack allocation.
This CL changes it to use a write barrier for the assignment only
when write barriers are enabled. While here, also change it to
call gcWriteBarrier instead of typedmemmove for pointer-shaped
types.
For this to work, Function::build needs to be adjusted so that
Heap_expression::do_get_backend is called when there is a parent
block.
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/181540
From-SVN: r272132
This permits inlining functions with for loops and some switches, as
they are lowered to if and goto statements before exporting them.
This by itself only adds three new inlinable functions in the standard
library: sort.Search, context.(*emptyCtx).String, and
cmd/go/internal/work.(*Builder).disableBuildID.
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/181197
From-SVN: r272131
If a struct/array is pointer-shaped (i.e. having a single field
that is pointer-shaped), we can use gcWriteBarrier instead of
typedmemmove for the write barrier.
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/181539
From-SVN: r272130
* constexpr.c (unshare_constructor): Only unshare if T is itself a
CONSTRUCTOR.
(cxx_eval_call_expression): Don't call it on the result here.
From-SVN: r272126
* constexpr.c (cxx_bind_parameters_in_call): Use TREE_VEC rather
than TREE_LIST.
(constexpr_call_hasher::equal, cxx_bind_parameters_in_call)
(cxx_eval_call_expression): Adjust.
From-SVN: r272125