Commit Graph

171154 Commits

Author SHA1 Message Date
Richard Biener
5a4c9a4931 re PR rtl-optimization/91656 (wrong code with -fgcse-after-reload)
2019-09-05  Richard Biener  <rguenther@suse.de>

	PR rtl-optimization/91656
	* postreload-gcse.c (record_last_mem_set_info): Revert addition
	of early out.

	* gcc.dg/torture/pr91656-1.c: New testcase.
	* gcc.dg/torture/pr91656-2.c: Likewise.
	* gcc.dg/torture/pr91656-3.c: Likewise.

From-SVN: r275406
2019-09-05 13:23:28 +00:00
Nathan Sidwell
b101938436 [C++ PATCH] vtable decl marking
https://gcc.gnu.org/ml/gcc-patches/2019-08/msg02063.html
	* cp-tree.h (DECL_VTABLE_OR_VTT_P): Forward to DECL_VIRTUAL_P.

From-SVN: r275404
2019-09-05 11:31:08 +00:00
JeanHeyd Meneide
95e9a7616d Implement std::span for C++20
2019-09-05  JeanHeyd Meneide  <phdofthehouse@gmail.com>

	* include/Makefile.am: Add <span> header.
	* include/Makefile.in: Regenerate.
	* include/bits/range_access.h (__adl_begin, __adl_end, __adl_cbegin)
	(__adl_cend, __adl_rbegin, __adl_rend, __adl_crbegin, __adl_crend)
	(__adl_data, __adl_cdata, __adl_size, __adl_empty, __adl_to_address):
	New functions for performing argument-dependent lookup of range
	customization points.
	* include/bits/stl_iterator.h (__normal_iterator): Add
	_GLIBCXX20_CONSTEXPR to all functions.
	* include/std/span: New header.
	* include/std/version (__cpp_lib_span): Define feature test macro.
	* testsuite/23_containers/span/contiguous_range_neg.cc: New test.
	* testsuite/23_containers/span/everything.cc: New test.
	* testsuite/23_containers/span/get_neg.cc: New test.
	* testsuite/23_containers/span/last_neg.cc: New test.
	* testsuite/23_containers/span/subspan_neg.cc: New test.
	* testsuite/23_containers/span/tuple_element_dynamic_neg.cc: New test.
	* testsuite/23_containers/span/tuple_element_oob_neg.cc: New test.
	* testsuite/23_containers/span/tuple_size_neg.cc: New test.

From-SVN: r275403
2019-09-05 12:27:45 +01:00
Nathan Sidwell
056f95ec95 [preprocessor/91639] #includes at EOF
https://gcc.gnu.org/ml/gcc-patches/2019-09/msg00280.html
	libcpp/
	PR preprocessor/91639
	* directives.c (do_include_common): Tell lexer we're a #include.
	* files.c (_cpp_stack_file): Lexer will have always incremented.
	* internal.h (struct cpp_context): Extend in_directive's
	semantics.
	* lex.c (_cpp_lex_direct): Increment line for final \n when lexing
	for an ISO #include.
	* line-map.c (linemap_line_start): Remember if we overflowed.

	gcc/testsuite/
	PR preprocessor/91639
	* c-c++-common/cpp/pr91639.c: New.
	* c-c++-common/cpp/pr91639-one.h: New.
	* c-c++-common/cpp/pr91639-two.h: New.

From-SVN: r275402
2019-09-05 11:23:48 +00:00
Richard Biener
e7414688f1 re PR middle-end/90501 (ICE: address taken, but ADDRESSABLE bit not set)
2019-09-05  Richard Biener  <rguenther@suse.de>

	PR middle-end/90501
	* tree-inline.c (declare_return_variable): Mark the return
	slot as addressable after building an address of it.

From-SVN: r275401
2019-09-05 11:02:43 +00:00
Arnaud Charlet
0fd3ee9234 install.texi: Update and clarify requirements to build GNAT.
* doc/install.texi: Update and clarify requirements to build GNAT.

From-SVN: r275400
2019-09-05 11:51:38 +02:00
Richard Sandiford
359f25f8e2 Force IFN_LOAD/STORE_LANES operands to be memory (PR91577)
This patch uses the workaround Richi suggested in the PR: make
discover_nonconstant_array_refs mark the source of an IFN_LOAD_LANES
call and the destination of an IFN_STORE_LANES call as addressable,
so that they don't end up being REG rtxes during expansion.

I had to move the discover_nonconstant_array_refs call outside the
currently_expanding_to_rtl block since otherwise mark_addressable
just queues the decision for later.

2019-09-05  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
	PR middle-end/91577
	* cfgexpand.c (discover_nonconstant_array_refs): Force the source
	of an IFN_LOAD_LANES call and the destination of an IFN_STORE_LANES
	call to be in memory.
	(pass_expand::execute): Call discover_nonconstant_array_refs before
	setting currently_expanding_to_rtl.

gcc/testsuite/
	PR middle-end/91577
	* gfortran.dg/pr91577.f90: New test, taken from temporary_1.f90.

From-SVN: r275399
2019-09-05 07:50:07 +00:00
Jonathan Wakely
efd9a01b59 Remove broken URL from libstdc++ manual
The URL for the "What Are Allocators Good For?" article has been a
recurring source of problems. It moved from the C/C++ Users Journal
website to the Dr Dobbs site after CUJ shut down, and the original
domain changed hands, leaving old links pointing to nefarious sites.

Now the URL to the copy on drdobbs.com no longer works either and I
can't find a (legal) copy of the article online. The simplest solution
is to remove the URL.

	* doc/xml/manual/allocator.xml: Remove URL for bibliography entry.
	* doc/html/*: Regenerate.

From-SVN: r275398
2019-09-05 08:46:00 +01:00
Janne Blomqvist
0eaee4abb1 Improve PRNG jumping when using threads
Currently, when a new thread needs to use the RANDOM_NUMBER intrinsic,
the per-thread PRNG state is initialized by copying the master state
and then jumping forwards N*2**128 entries in the stream so that the
PRNG streams for different threads don't alias each other, where N is
the number of threads that have so far initialized the PRNG.

With this patch the master state itself is jumped forwards once each
time a new thread initializes the PRNG, thus obviating the need to
jump through all the N-1 previous streams. Effectively turning an O(N)
algorithm into an O(1) one.

Regtested on x86_64-pc-linux-gnu.

libgfortran/ChangeLog:

2019-09-05  Janne Blomqvist  <jb@gcc.gnu.org>

	* intrinsics/random.c (master_init): Replace with
	master_state.init.
	(njumps): Remove variable.
	(master_state): Make instance of struct prng_state.
	(init_rand_state): When jumping, update the master_state once
	instead of keeping track of how many jumps need to be done.
	(SZU64): Modify to handle new master_state.
	(SZ): Likewise.
	(random_seed_i4): Likewise.
	(random_seed_i8): Likewise.

From-SVN: r275397
2019-09-05 09:59:55 +03:00
Ian Lance Taylor
f44526e367 re PR tree-optimization/91663 (split function can be re-inlined, leaving bad stack trace)
PR tree-optimization/91663
	* go-lang.c (go_langhook_post_options): Clear
	flag_partial_inlining.

From-SVN: r275396
2019-09-05 04:12:30 +00:00
GCC Administrator
7d394f772f Daily bump.
From-SVN: r275395
2019-09-05 00:16:27 +00:00
Steven G. Kargl
4844a5cb8c re PR fortran/91650 (ICE in gfc_conv_constant_to_tree, at fortran/trans-const.c:370)
2019-09-04  Steven G. Kargl  <kargl@gcvc.gnu.org>

	PR fortran/91650
	* io.c (match_io_element):  An output IO list item cannot be a BOZ.

2019-09-04  Steven G. Kargl  <kargl@gcvc.gnu.org>

	PR fortran/91650
	* gfortran.dg/pr91650_1.f90: New test.
	* gfortran.dg/pr91650_2.f90: Ditto.

From-SVN: r275391
2019-09-04 23:21:12 +00:00
Mike Crowe
ad4d1d21ad PR libstdc++/41861 Add full steady_clock support to condition_variable
The pthread_cond_clockwait function is available in glibc since the 2.30
release. If this function is available in the C library it can be used
to fix PR libstdc++/41861 by supporting std::chrono::steady_clock
properly with std::condition_variable.

This means that code using std::condition_variable::wait_for or
std::condition_variable::wait_until with std::chrono::steady_clock is no
longer subject to timing out early or potentially waiting for much
longer if the system clock is warped at an inopportune moment.

If pthread_cond_clockwait is available then std::chrono::steady_clock is
deemed to be the "best" clock available which means that it is used for
the relative wait_for calls and absolute wait_until calls using
user-defined clocks. Calls explicitly using std::chrono::system_clock
continue to use CLOCK_REALTIME via __gthread_cond_timedwait.

If pthread_cond_clockwait is not available then
std::chrono::system_clock is deemed to be the "best" clock available
which means that the previous suboptimal behaviour remains.

2019-09-04  Mike Crowe  <mac@mcrowe.com>

	PR libstdc++/41861
	* acinclude.m4 (GLIBCXX_CHECK_PTHREAD_COND_CLOCKWAIT): Check for new
	pthread_cond_clockwait function.
	* configure.ac: Use GLIBCXX_CHECK_PTHREAD_COND_CLOCKWAIT.
	* configure: Regenerate.
	* config.h.in: Regenerate.
	* include/std/condition_variable: (condition_variable): Rename
	__steady_clock_t typedef and add system_clock. Change __clock_t to be
	a typedef for the preferred clock to convert arbitrary other clocks to.
	[_GLIBCXX_USE_PTHREAD_COND_CLOCKWAIT] (wait_until): Add a steady_clock
	overload.
	(wait_until): Change __clock_t overload to use system_clock.
	[_GLIBCXX_USE_PTHREAD_COND_CLOCKWAIT] (__wait_until_impl): Add
	steady_clock overload that calls pthread_cond_clockwait.
	(__wait_until_impl): Change __clock_t overload to use system_clock.
	(condition_variable_any) [_GLIBCXX_USE_PTHREAD_COND_CLOCKWAIT]: Use
	steady_clock for __clock_t if pthread_cond_clockwait is available.

From-SVN: r275390
2019-09-04 23:43:29 +01:00
Mike Crowe
76e0dd66c8 Add user-defined clock to libstdc++ condition_variable tests
2019-09-04  Mike Crowe  <mac@mcrowe.com>

	* testsuite/30_threads/condition_variable/members/2.cc (test01):
	Parameterise so that test can be run against an arbitrary clock.
	(main): Test using std::chrono::steady_clock and a user-defined
	clock in addition to the previous std::chrono::system_clock.
	* testsuite/30_threads/condition_variable_any/members/2.cc: Likewise.

From-SVN: r275389
2019-09-04 23:43:20 +01:00
Caroline Tice
9eb730b839 Disallow -fvtable-verify and -flto to be used together.
Vtable verification currently does not work properly with
link time optimization.  Until this can be fixed users should
not be allowed to specify both options together.

2019-09-04  Caroline Tice  <cmtice@google.com>
 
        *  opts.c (finish_options):  Disallow -fvtable-verify and -flto to be
           specified together.

From-SVN: r275388
2019-09-04 15:33:27 -07:00
Marek Polacek
db9d227478 Remove -fdeduce-init-list.
From-SVN: r275387
2019-09-04 20:10:13 +00:00
Uros Bizjak
0c7800b29b re PR target/32413 (internal compiler error: in reload_cse_simplify_operands, at postreload.c:396)
PR target/32413
	* config/i386/i386.c (inline_secondary_memory_needed): Return true
	for QI and HImode moves between SSE and general registers.

From-SVN: r275377
2019-09-04 20:25:05 +02:00
Prathamesh Kulkarni
68e2c1996e Add warning Wenum-conversion for C and ObjC.
The patch enables warning with Wextra due to PR91593 and warnings with
allmodconfig kernel build. Once these issues are resolved, we could
consider promoting it to Wall.

2019-09-04  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>

	PR c/78736
	* doc/invoke.texi: Document -Wenum-conversion.

c-family
	* c.opt (Wenum-conversion): New option.

c/
	* c-typeck.c (convert_for_assignment): Handle Wenum-conversion.

testsuite/
	* gcc.dg/Wenum-conversion.c: New test-case.

From-SVN: r275376
2019-09-04 16:25:21 +00:00
Martin Liska
bc7f7ff954 mklog: Do not print changed functions in testsuite
2019-09-04  Martin Liska  <mliska@suse.cz>

	* mklog: Do not print changed functions for
	testsuite files.

From-SVN: r275369
2019-09-04 08:08:20 +00:00
Martin Liska
a45de90e56 mklog: parse PR references from new test files
2019-09-04  Martin Liska  <mliska@suse.cz>

	* mklog: Parse PR references from newly added
	test files.

From-SVN: r275368
2019-09-04 08:08:06 +00:00
Martin Liska
e94e92dcda Use argparse.ArgumentParser for mklog.
2019-09-04  Martin Liska  <mliska@suse.cz>

	* mklog: Use argparse instead of getopt.

From-SVN: r275367
2019-09-04 08:07:37 +00:00
Richard Biener
dc91c65378 re PR middle-end/36262 (Extreme memory usage of VRP compared to older versions)
2019-09-04  Richard Biener  <rguenther@suse.de>

	PR rtl-optimization/36262
	* postreload-gcse.c: Include intl.h and gcse.h.
	(insert_expr_in_table): Insert at the head of cur_expr->avail_occr
	to avoid linear list walk.
	(record_last_mem_set_info): Gate off if not computing transparentness.
	(get_bb_avail_insn): If transparentness isn't computed give up
	early.
	(gcse_after_reload_main): Skip compute_transp and extended PRE
	if gcse_or_cprop_is_too_expensive says so.

From-SVN: r275365
2019-09-04 07:27:42 +00:00
Steven G. Kargl
f8e36f0aef gfortran.texi: Update documentation to catch up with BOZ changes.
2019-09-03  Steven G. Kargl  <kargl@gcc.gnu.org>

	* gfortran.texi: Update documentation to catch up with BOZ changes.
	* invoke.texi: Fix English from previous BOZ changes commit.

From-SVN: r275364
2019-09-04 03:43:40 +00:00
GCC Administrator
48259207e6 Daily bump.
From-SVN: r275362
2019-09-04 00:16:33 +00:00
Ian Lance Taylor
2974ecdae5 compiler: only import variable into . if same package
If we dot-import a package, we should only add an imported variable to
    the package bindings if the variable is in the package being imported.
    A test case for this is the 1.13 os package, in which ErrClosed and
    friends are defined both locally and in the imported internal/oserror package.
    
    Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/192718

From-SVN: r275358
2019-09-03 23:35:13 +00:00
Jozef Lawrynowicz
64be2b26eb MSP430: Use default_elf_select_section to determine sections for data
2019-09-03  Jozef Lawrynowicz  <jozef.l@mittosystems.com>

	* config/msp430/msp430.c (msp430_init_sections): Remove handling of the
	noinit section.
	(msp430_select_section): Handle decls with the "noinit" attribute with
	default_elf_select_section.
	Handle SECCAT_RODATA_MERGE_* section types with
	default_elf_select_section.
	Add comments about handling of unsupported section types.
	(msp430_section_type_flags): Remove handling of the noinit section.

From-SVN: r275357
2019-09-03 20:57:02 +00:00
Jozef Lawrynowicz
f1deee9179 MSP430: Setup exclusion tables for function and data attributes
gcc/ChangeLog:

2019-09-03  Jozef Lawrynowicz  <jozef.l@mittosystems.com>

	* config/msp430/msp430.c (msp430_attr): Remove warnings about
	conflicting msp430-specific attributes.
	(msp430_section_attr): Likewise.
	Add warnings about conflicts with generic "noinit" and "section"
	attributes.
	Fix grammar in -mlarge error message.
	(msp430_data_attr): Rename to msp430_persist_attr.
	Add warnings about conflicts with generic "noinit" and "section"
	attributes.
	Add warning for when variable is not initialized.
	Chain conditionals which prevent the attribute being added.
	(ATTR_EXCL): New helper.
	(attr_reent_exclusions): New exclusion table.
	(attr_naked_exclusions): Likewise.
	(attr_crit_exclusions): Likewise.
	(attr_lower_exclusions): Likewise.
	(attr_upper_exclusions): Likewise.
	(attr_either_exclusions): Likewise.
	(attr_persist_exclusions): Likewise.
	(msp430_attribute_table): Update with exclusion rules.
	(msp430_output_aligned_decl_common): Don't output common symbol if decl
	has a section.

gcc/testsuite/ChangeLog:

2019-09-03  Jozef Lawrynowicz  <jozef.l@mittosystems.com>

	* gcc.target/msp430/data-attributes-2.c: New test.
	* gcc.target/msp430/function-attributes-4.c: Update dg-warning
	strings.
	* gcc.target/msp430/region-attribute-misuse.c: Likewise.

From-SVN: r275356
2019-09-03 20:48:55 +00:00
Jozef Lawrynowicz
7a4418a53e Implement TARGET_HANDLE_GENERIC_ATTRIBUTE
gcc/ChangeLog:

2019-09-03  Jozef Lawrynowicz  <jozef.l@mittosystems.com>

	* config/msp430/msp430.c (TARGET_HANDLE_GENERIC_ATTRIBUTE): Define.
	(msp430_handle_generic_attribute): New function.
	* doc/tm.texi: Regenerate.
	* doc/tm.texi.in: Add TARGET_HANDLE_GENERIC_ATTRIBUTE.
	* hooks.c (hook_tree_treeptr_tree_tree_int_boolptr_null): New.
	* hooks.h (hook_tree_treeptr_tree_tree_int_boolptr_null): New.
	* target.def: Define new hook TARGET_HANDLE_GENERIC_ATTRIBUTE.

gcc/c-family/ChangeLog:

2019-09-03  Jozef Lawrynowicz  <jozef.l@mittosystems.com>

	* c-attribs.c (handle_section_attribute): Call the
	handle_generic_attribute target hook after performing target
	independent processing.
	(handle_noinit_attribute): Likewise.

From-SVN: r275355
2019-09-03 20:36:49 +00:00
Kamlesh Kumar
52792faa0c re PR tree-optimization/91504 (Inlining misses some logical operation folding)
PR tree-optimization/91504
	* match.pd: Add ((~a & b) ^a) --> (a | b).

        PR tree-optimization/91504
	gcc.dg/tree-ssa/pr91504.c: New test.

From-SVN: r275354
2019-09-03 14:13:22 -06:00
Eduard-Mihai Burtescu
42bf58bb13 rust-demangle.c (unescape): Remove.
* rust-demangle.c (unescape): Remove.
	(parse_lower_hex_nibble): New function.
	(parse_legacy_escape): New function.
	(is_prefixed_hash): Use parse_lower_hex_nibble.
	(looks_like_rust): Use parse_legacy_escape.
	(rust_demangle_sym): Use parse_legacy_escape.
	* testsuite/rust-demangle-expected: Add 'llv$u6d$' test.

From-SVN: r275353
2019-09-03 14:04:32 -06:00
Ian Lance Taylor
5f76ab159a c-cppbuiltin.c (builtin_define_with_hex_fp_value): Always expand when using -fgo-dump-spec.
* c-cppbuiltin.c (builtin_define_with_hex_fp_value): Always expand
	when using -fgo-dump-spec.

From-SVN: r275352
2019-09-03 19:42:38 +00:00
Jakub Jelinek
deeedbada1 re PR target/91604 (ICE in extract_insn at recog.c:2310 since r272323)
PR target/91604
	* config/i386/i386-expand.c (split_double_mode): If there is more than
	one MEM operand and they are rtx_equal_p, reuse lo_half/hi_half from
	already split matching MEM operand instead of calling adjust_address
	again.

	* gcc.target/i386/pr91604.c: New test.

From-SVN: r275344
2019-09-03 18:46:06 +02:00
Ulrich Weigand
2f2aeda98f Remove Cell Broadband Engine SPU targets
From-SVN: r275343
2019-09-03 15:08:28 +00:00
Bernd Edlinger
9343921853 re PR middle-end/91603 (Unaligned access in expand_assignment)
2019-09-03  Bernd Edlinger  <bernd.edlinger@hotmail.de>

        PR middle-end/91603
        PR middle-end/91612
        PR middle-end/91613
        * expr.c (expand_expr_real_1): Handle unaligned decl_rtl
        and SSA_NAME referring to CONSTANT_P correctly.

testsuite:
2019-09-03  Bernd Edlinger  <bernd.edlinger@hotmail.de>

        PR middle-end/91603
        * testsuite/gcc.target/arm/pr91603.c: New test.

From-SVN: r275342
2019-09-03 14:37:41 +00:00
Chung-Lin Tang
c6c2d1bc9b re PR other/79543 (Inappropriate "ld --version" checking)
2019-09-03  Chung-Lin Tang <cltang@codesourcery.com>

	libatomic/
	PR other/79543
	* acinclude.m4 (LIBAT_CHECK_LINKER_FEATURES): Fix GNU ld --version
	scanning to conform to the GNU Coding Standards.
	* configure: Regenerate.

	libffi/
	PR other/79543
	* acinclude.m4 (LIBAT_CHECK_LINKER_FEATURES): Fix GNU ld --version
	scanning to conform to the GNU Coding Standards.
	* configure: Regenerate.

	libgomp/
	PR other/79543
	* acinclude.m4 (LIBGOMP_CHECK_LINKER_FEATURES): Fix GNU ld --version
	scanning to conform to the GNU Coding Standards.
	* configure: Regenerate.

	libitm/
	PR other/79543
	* acinclude.m4 (LIBITM_CHECK_LINKER_FEATURES): Fix GNU ld --version
	scanning to conform to the GNU Coding Standards.
	* configure: Regenerate.

	libstdc++-v3/
	PR other/79543
	* acinclude.m4 (GLIBCXX_CHECK_LINKER_FEATURES): Fix GNU ld --version
	scanning to conform to the GNU Coding Standards.
	* configure: Regenerate.

From-SVN: r275341
2019-09-03 14:10:26 +00:00
Richard Biener
c8d3491299 tree-ssa-sccvn.h (vn_nary_op_lookup): Remove.
2019-09-03  Richard Biener  <rguenther@suse.de>

	* tree-ssa-sccvn.h (vn_nary_op_lookup): Remove.
	(vn_nary_op_insert): Likewise.
	* tree-ssa-sccvn.c (init_vn_nary_op_from_op): Remove.
	(vn_nary_op_lookup): Likewise.
	(vn_nary_op_insert): Likewise.

From-SVN: r275338
2019-09-03 11:24:18 +00:00
Ilya Leoshkevich
70b766b25a S/390: Commit forgotten test for r275336
gcc/testsuite/ChangeLog:

2019-09-03  Ilya Leoshkevich  <iii@linux.ibm.com>

	* gcc.target/s390/sigfpe-eh.c: Forgotten test.

From-SVN: r275337
2019-09-03 10:27:04 +00:00
Ilya Leoshkevich
837ee1e0b6 S/390: Fix failing RTL check in s390_canonicalize_comparison
The new sigfpe-eh.c fails with

    internal compiler error: RTL check: expected elt 0 type 'e' or 'u', have 'w' (rtx const_int)

This is most likely due to a typo: XEXP (*op1, 0) was used, when
XEXP (*op0, 1) was intended.  This did not cause any user-visible
problems, because reversed_comparison_code_parts ignores the
respective argument, and the release compiler is built without RTL
checks.

gcc/ChangeLog:

2019-09-03  Ilya Leoshkevich  <iii@linux.ibm.com>

	* config/s390/s390.c (s390_canonicalize_comparison): Use XEXP
	(*op0, 1) instead of XEXP (*op1, 0).

gcc/testsuite/ChangeLog:

2019-09-03  Ilya Leoshkevich  <iii@linux.ibm.com>

	* gcc.target/s390/sigfpe-eh.c: New test.

From-SVN: r275336
2019-09-03 09:29:02 +00:00
Kyrylo Tkachov
e1d5d19ec4 [AArch64] Add support for __jcvt intrinsic
This patch implements the __jcvt ACLE intrinsic [1] that maps down to the FJCVTZS [2] instruction from Armv8.3-a.
No fancy mode iterators or nothing. Just a single builtin, UNSPEC and define_insn and the associate plumbing.
This patch also defines __ARM_FEATURE_JCVT to indicate when the intrinsic is available.

[1] https://developer.arm.com/docs/101028/latest/data-processing-intrinsics
[2] https://developer.arm.com/docs/ddi0596/latest/simd-and-floating-point-instructions-alphabetic-order/fjcvtzs-floating-point-javascript-convert-to-signed-fixed-point-rounding-toward-zero

	* config/aarch64/aarch64.md (UNSPEC_FJCVTZS): Define.
	(aarch64_fjcvtzs): New define_insn.
	* config/aarch64/aarch64.h (TARGET_JSCVT): Define.
	* config/aarch64/aarch64-builtins.c (aarch64_builtins):
	Add AARCH64_JSCVT.
	(aarch64_init_builtins): Initialize __builtin_aarch64_jcvtzs.
	(aarch64_expand_builtin): Handle AARCH64_JSCVT.
	* config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Define
	__ARM_FEATURE_JCVT where appropriate.
	* config/aarch64/arm_acle.h (__jcvt): Define.

	* gcc.target/aarch64/acle/jcvt_1.c: New test.

From-SVN: r275335
2019-09-03 08:40:30 +00:00
Kyrylo Tkachov
10bd1d964e [AArch64] Implement ACLE intrinsics for FRINT[32,64][Z,X]
This patch implements the ACLE intrinsics to access the FRINT[32,64][Z,X] scalar[1] and vector[2][3] instructions
from Armv8.5-a. These are enabled when the __ARM_FEATURE_FRINT macro is defined.

They're added in a fairly standard way through builtins and unspecs at the RTL level.

	* config/aarch64/aarch64.md ("unspec"): Add UNSPEC_FRINT32Z,
	UNSPEC_FRINT32X, UNSPEC_FRINT64Z, UNSPEC_FRINT64X.
	(aarch64_<frintnzs_op><mode>): New define_insn.
	* config/aarch64/aarch64.h (TARGET_FRINT): Define.
	* config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Define
	__ARM_FEATURE_FRINT when appropriate.
	* config/aarch64/aarch64-simd-builtins.def: Add builtins for frint32z,
	frint32x, frint64z, frint64x.
	* config/aarch64/arm_acle.h (__rint32zf, __rint32z, __rint64zf,
	__rint64z, __rint32xf, __rint32x, __rint64xf, __rint64x): Define.
	* config/aarch64/arm_neon.h (vrnd32z_f32, vrnd32zq_f32, vrnd32z_f64,
	vrnd32zq_f64, vrnd32x_f32, vrnd32xq_f32, vrnd32x_f64, vrnd32xq_f64,
	vrnd64z_f32, vrnd64zq_f32, vrnd64z_f64, vrnd64zq_f64, vrnd64x_f32,
	vrnd64xq_f32, vrnd64x_f64, vrnd64xq_f64): Define.
	* config/aarch64/iterators.md (VSFDF): Define.
	(FRINTNZX): Likewise.
	(frintnzs_op): Likewise.

	* gcc.target/aarch64/acle/rintnzx_1.c: New test.
	* gcc.target/aarch64/simd/vrndnzx_1.c: Likewise.

From-SVN: r275334
2019-09-03 08:38:08 +00:00
Dennis Zhang
e0664b7a63 [AArch64] Add support for missing CPUs
This patch adds '-mcpu' options for following CPUs:
Cortex-A77, Cortex-A76AE, Cortex-A65, Cortex-A65AE, and Cortex-A34.

Related specifications are as following:
https://developer.arm.com/ip-products/processors/cortex-a

Bootstraped/regtested for aarch64-none-linux-gnu.

2019-09-03  Dennis Zhang  <dennis.zhang@arm.com>

	* config/aarch64/aarch64-cores.def (AARCH64_CORE): New entries
	for Cortex-A77, Cortex-A76AE, Cortex-A65, Cortex-A65AE, and
	Cortex-A34.
	* config/aarch64/aarch64-tune.md: Regenerated.
	* doc/invoke.texi: Document the new processors.

From-SVN: r275333
2019-09-03 08:27:58 +00:00
Bernd Edlinger
bca3073692 libphobos.exp (libphobos_init): Add multi-lib libgcc dirs to the ld_library_path var.
2019-09-03  Bernd Edlinger  <bernd.edlinger@hotmail.de>

        * testsuite/lib/libphobos.exp (libphobos_init): Add multi-lib libgcc 
        dirs to the ld_library_path var.

From-SVN: r275332
2019-09-03 08:24:03 +00:00
Kyrylo Tkachov
75f935365d [AArch64] Add Linux hwcap strings for some extensions
This patch adds feature strings for some of the extensions. This string is what is read from /proc/cpuinfo on Linux systems
and used during -march=native detection.

The strings are taken from the kernel source tree at:
https://github.com/torvalds/linux/blob/master/arch/arm64/kernel/cpuinfo.c#L45


	* config/aarch64/aarch64-option-extensions.def (sb): Add feature
	string.
	(ssbs): Likewise.
	(sve2): Likewise.
	(sve2-sm4): Likewise.
	(sveaes): Likewise.
	(svesha3): Likewise.
	(svebitperm): Likewise.

From-SVN: r275331
2019-09-03 08:06:43 +00:00
Jakub Jelinek
3729852e40 re PR tree-optimization/91597 (GCC miscompiles a branch depending on a pointer tag)
PR tree-optimization/91597
	* tree-vrp.c (extract_range_from_binary_expr): Remove unsafe
	BIT_AND_EXPR optimization for pointers, even if both operand
	ranges don't include NULL, the result can be NULL.

	* gcc.c-torture/execute/pr91597.c: New test.

Co-Authored-By: Richard Biener <rguenther@suse.de>

From-SVN: r275330
2019-09-03 09:50:46 +02:00
Alexandre Oliva
e4a8d4a7ec [x86 testsuite] preserve full register across main
This test uses a call-saved register as a global variable.  It
attempts to preserve its value across main, but only the lower int
part is preserved, which is not good enough for x86_64, when the
runtime that calls main() happens to hold something in the chosen
register that is not a zero-extension from the 32-bit value, and
rightfully expects the full register to remain unchanged when main()
returns.


for  gcc/testsuite/ChangeLog

	* gcc.target/i386/20020616-1.c: Preserve full register across
	main.

From-SVN: r275329
2019-09-03 06:06:02 +00:00
GCC Administrator
97d6a7c80e Daily bump.
From-SVN: r275328
2019-09-03 00:16:40 +00:00
Paul Thomas
f79be3a7db re PR fortran/91589 (ICE in gfc_conv_component_ref, at fortran/trans-expr.c:2447)
2019-09-02  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/91589
	* primary.c (gfc_match_varspec): Return MATCH_NO on an apparent
	component ref, when the primary type is intrinsic.

2019-09-02  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/91589
	* gfortran.dg/pr91589.f90 : New test.

From-SVN: r275324
2019-09-02 19:54:02 +00:00
Steven G. Kargl
be0fb5484a re PR fortran/91552 (ICE with valid array constructor)
2019-09-02  Steven G. Kargl  <kargl@gc.gnu.org>

	PR fortran/91552
	* array.c (walk_array_constructor): New function.
	(gfc_match_array_constructor): Use it.

2019-09-02  Steven G. Kargl  <kargl@gc.gnu.org>

	PR fortran/91552
	* gfortran.dg/pr91552.f90: New test.

From-SVN: r275322
2019-09-02 16:46:54 +00:00
Bernd Edlinger
b82c2e6fce re PR middle-end/91605 (ICE in ix86_avx256_split_vector_move_misalign, at config/i386/i386-expand.c:489 since r274986)
2019-09-02  Bernd Edlinger  <bernd.edlinger@hotmail.de>

        PR middle-end/91605
        * expr.c (addr_expr_of_non_mem_decl_p_1): Refactor into...
        (non_mem_decl_p): ...this.
        (mem_ref_refers_to_non_mem_p): Handle DECL_P as well ase MEM_REF.
        (expand_assignment): Call mem_ref_referes_to_non_mem_p
        unconditionally as before.

testsuite:
2019-09-02  Bernd Edlinger  <bernd.edlinger@hotmail.de>

        PR middle-end/91605
        * g++.target/i386/pr91605.C: New test.

From-SVN: r275320
2019-09-02 14:26:26 +00:00
Jakub Jelinek
1525fa83cc re PR tree-optimization/91632 (Probably wrong code since r275026)
PR tree-optimization/91632
	* gcc.c-torture/execute/pr91632.c: New test.

From-SVN: r275318
2019-09-02 15:35:54 +02:00