Commit Graph

130355 Commits

Author SHA1 Message Date
GCC Administrator 2d8d78a10d Daily bump.
From-SVN: r256652
2018-01-14 00:16:08 +00:00
Steven G. Kargl e2be496352 backport: re PR fortran/78814 (ICE in symbol_rank, at fortran/interface.c:1265)
2012-01-13  Steven G. Kargl  <kargl@gcc.gnu.org>

	Backport from mainline
        PR fortran/78814
        * interface.c (symbol_rank): Check for NULL pointer.

2012-01-13  Steven G. Kargl  <kargl@gcc.gnu.org>

	Backport from mainline
        PR fortran/78814
        * gfortran.dg/interface_40.f90: New testcase.

From-SVN: r256646
2018-01-13 18:58:56 +00:00
GCC Administrator ab1c0a5d9c Daily bump.
From-SVN: r256601
2018-01-13 00:16:10 +00:00
Oleg Endo 22ec74897c backport: re PR target/81819 ([RX] internal compiler error: in rx_is_restricted_memory_address, at config/rx/rx.c:311)
gcc/
	Backport from mainline
	2018-01-12  Oleg Endo  <olegendo@gcc.gnu.org>

	PR target/81819
	* config/rx/rx.c (rx_is_restricted_memory_address):
	Handle SUBREG case.

From-SVN: r256579
2018-01-12 12:12:38 +00:00
Eric Botcazou 951346c205 re PR rtl-optimization/83565 (RTL combine pass yields wrong rotate result)
PR rtl-optimization/83565
	* rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
	not extend the result to a larger mode for rotate operations.
	(num_sign_bit_copies1): Likewise.

From-SVN: r256573
2018-01-12 10:20:42 +00:00
Rainer Orth 28b93b9304 Avoid Solaris/SPARC comparison failures with Solaris as (PR bootstrap/81926)
Backport from mainline
	2018-01-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	PR bootstrap/81926
	* cgraphunit.c (symbol_table::compile): Switch to text_section
	before calling assembly_start debug hook.

From-SVN: r256562
2018-01-12 05:32:31 +00:00
GCC Administrator e1521062de Daily bump.
From-SVN: r256560
2018-01-12 00:16:09 +00:00
Oleg Endo 05d34c633d backport: re PR target/81821 ([RX] xchg_mem<mode> uses wrong memory operand size)
gcc/
	Backport from mainline
	2018-01-11  Oleg Endo  <olegendo@gcc.gnu.org>

	PR target/81821
	* config/rx/rx.md (BW): New mode attribute.
	(sync_lock_test_and_setsi): Add mode suffix to insn output.

From-SVN: r256538
2018-01-11 15:18:38 +00:00
GCC Administrator 4bf06d991a Daily bump.
From-SVN: r256471
2018-01-11 00:16:09 +00:00
Steven G. Kargl 91716fe0dd re PR fortran/82367 (ICE with deferred length string allocate on non-deferred length argument)
2018-01-10  Steven G. Kargl  <kargl@gcc.gnu.org>

	PR fortran/82367
	* resolve.c (resolve_allocate_expr): Check for NULL pointer.

2018-01-10  Steven G. Kargl  <kargl@gcc.gnu.org>

	PR fortran/82367
	* gfortran.dg/deferred_character_18.f90: New test.

From-SVN: r256466
2018-01-10 23:41:48 +00:00
Steven G. Kargl 7a760f1977 backport: re PR fortran/83093 (ICE in fold_convert_loc, at fold-const.c:2266)
2018-01-10 Steven G. Kargl  <kargl@gcc.gnu.org>

	Backport from trunk
	PR fortran/83093
	* resolve.c (resolve_charlen): Check the type of cl->length
	after resolution.

2018-01-10  Steven G. Kargl  <kargl@gcc.gnu.org>

	Backport from trunk
	PR fortran/83093
	* gfortran.dg/allocate_with_typespec_7.f90: New test.

From-SVN: r256459
2018-01-10 22:35:00 +00:00
Steven G. Kargl ee30b822e5 backport: re PR fortran/82841 (Segfault in gfc_simplify_transfer)
2018-01-10  Steven G. Kargl  <kargl@kgcc.gnu.org>

	Backport r254555 from trunk
	PR Fortran/82841
	* gfortran.dg/transfer_simplify_11.f90: New test.


2018-01-10  Steven G. Kargl  <kargl@kgcc.gnu.org>

	Backport r254555 from trunk
	PR Fortran/82841
	* simplify.c(gfc_simplify_transfer): Do not dereference a NULL pointer.
	Unwrap a short line.

From-SVN: r256445
2018-01-10 18:47:44 +00:00
GCC Administrator df18d5afa6 Daily bump.
From-SVN: r256414
2018-01-10 00:16:13 +00:00
Joseph Myers 8c90c237aa * es.po: Update.
From-SVN: r256409
2018-01-09 23:36:24 +00:00
Richard Biener d8d1029d8e backport: re PR c++/83713 (ICE in do_narrow at gcc/convert.c:474)
2018-01-09  Richard Biener  <rguenther@suse.de>

	Backport from mainline
	2018-01-08  Richard Biener  <rguenther@suse.de>

	PR middle-end/83713
	* convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.

	* g++.dg/torture/pr83713.C: New testcase.

From-SVN: r256371
2018-01-09 08:53:14 +00:00
Jim Wilson 603ceb882d RISC-V: Fix -msave-restore bug with sibcalls.
2018-01-08  Monk Chiang  <sh.chiang04@gmail.com>
		    Kito Cheng  <kito.cheng@gmail.com>
	gcc/
	* config/riscv/riscv.c (machine_function::is_leaf): Remove field.
	(riscv_leaf_function_p): Delete.
	(riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.

	2018-01-08  Chih-Mao Chen <pkmx.tw@gmail.com>
		    Monk Chiang  <sh.chiang04@gmail.com>
	gcc/testsuite/
	* gcc.target/riscv/save-restore-1.c: New.

	2017-11-29  Jim Wilson  <jimw@sifive.com>
	gcc/testsuite/
	* gcc.target/riscv/riscv.exp: New.

From-SVN: r256363
2018-01-08 17:01:45 -08:00
GCC Administrator c9af7ef850 Daily bump.
From-SVN: r256360
2018-01-09 00:16:15 +00:00
Kyrylo Tkachov 9192145f0b [arm] PR target/82975: Guard against reg_renumber being NULL in arm.h
Backport from mainline
	2017-12-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

	PR target/82975
	* config/arm/arm.h (TEST_REGNO): Adjust comment as expected in r255830.

	* gcc.dg/pr82975.c: New test.

From-SVN: r256350
2018-01-08 18:42:50 +00:00
Sebastian Huber 2fc75a03b0 RTEMS/EPIPHANY: Add RTEMS support
gcc/
	* config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
	* config/epiphany/rtems.h: New file.

libgcc/
	* config.host (epiphany-*-elf*): Add (epiphany-*-rtems*)
	configuration.

From-SVN: r256342
2018-01-08 13:39:11 +00:00
GCC Administrator 871fb7e343 Daily bump.
From-SVN: r256326
2018-01-08 00:16:12 +00:00
Uros Bizjak 71cacd0b5c alpha.md (*sadd<modesuffix>): Use ASHIFT instead of MULT rtx.
* config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
	instead of MULT rtx.  Update all corresponding splitters.
	(*saddl_se): Ditto.
	(*ssub<modesuffix>): Ditto.
	(*ssubl_se): Ditto.
	(*cmp_sadd_di): Update split patterns.
	(*cmp_sadd_si): Ditto.
	(*cmp_sadd_sidi): Ditto.
	(*cmp_ssub_di): Ditto.
	(*cmp_ssub_si): Ditto.
	(*cmp_ssub_sidi): Ditto.
	* config/alpha/predicates.md (const23_operand): New predicate.
	* config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
	Look for ASHIFT, not MULT inner operand.
	(alpha_split_conditional_move): Update for *sadd<modesuffix> change.

testsuite/ChangeLog:

	* gcc.target/alpha/pr83628-1.c: New test.
	* gcc.target/alpha/pr83628-2.c: Ditto.

From-SVN: r256324
2018-01-07 20:14:55 +01:00
GCC Administrator 7f40e113d0 Daily bump.
From-SVN: r256316
2018-01-07 00:16:12 +00:00
GCC Administrator 7203d58a46 Daily bump.
From-SVN: r256303
2018-01-06 00:16:14 +00:00
GCC Administrator 30833826aa Daily bump.
From-SVN: r256271
2018-01-05 00:16:14 +00:00
Steven G. Kargl 58929d71e1 re PR fortran/83679 (r256113 causes regression on pr77942.f90)
2018-01-04  Steven G. Kargl  <kargl@gcc.gnu.org>

	PR Fortran/83679
	* simplify.c (gfc_simplify_cshift): Restore early return for zero-sized
	array.  Update Copyright year while here.

From-SVN: r256263
2018-01-04 20:16:23 +00:00
GCC Administrator a03a98143d Daily bump.
From-SVN: r256221
2018-01-04 00:16:15 +00:00
GCC Administrator cb1df2ac95 Daily bump.
From-SVN: r256115
2018-01-03 00:16:15 +00:00
Andrew Waterman 1b4f0bcf4b RISC-V: Fix for icache flush issue on multicore processors.
gcc/
	* config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
	* config/riscv/riscv.md (clear_cache): Use it.

From-SVN: r256110
2018-01-02 12:57:54 -08:00
Jakub Jelinek 27f04c8cc7 re PR c++/83556 (ICE in gimplify_expr, at gimplify.c:12004)
PR c++/83556
	* tree.c (replace_placeholders_r): Pass NULL as last argument to
	cp_walk_tree instead of d->pset.  If non-TREE_CONSTANT and
	non-PLACEHOLDER_EXPR tree has been seen already, set *walk_subtrees
	to false and return.
	(replace_placeholders): Pass NULL instead of &pset as last argument
	to cp_walk_tree.

	* g++.dg/cpp0x/pr83556.C: New test.

From-SVN: r256087
2018-01-02 19:07:41 +01:00
Thomas Koenig 52535f91db re PR fortran/83650 (Wrong simplification in cshift with negative shifts)
2018-01-02  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/83650
	* simplify.c (gfc_simplify_cshift): Correct contition for
	negative shifts.

2018-01-02  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/83650
	* gfortran.dg/simplify_cshift_1.f90: Correct condition.

From-SVN: r256085
2018-01-02 18:01:31 +00:00
GCC Administrator 22be5165e0 Daily bump.
From-SVN: r256067
2018-01-02 00:16:09 +00:00
Jakub Jelinek 528dc0195d re PR rtl-optimization/83608 (ICE in convert_move, at expr.c:229 in GIMPLE store merging pass)
PR middle-end/83608
	* expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
	convert_modes if target mode has the right side, but different mode
	class.

	* g++.dg/opt/pr83608.C: New test.

From-SVN: r256063
2018-01-01 12:30:28 +01:00
Jakub Jelinek 63563fe69e re PR tree-optimization/83609 (ICE in read_complex_part at gcc/expr.c:3202)
PR middle-end/83609
	* expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
	last argument when extracting from CONCAT.  If either from_real or
	from_imag is NULL, use expansion through memory.  If result is not
	a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
	the parts directly to inner mode, if even that fails, use expansion
	through memory.

	* gcc.dg/pr83609.c: New test.
	* g++.dg/opt/pr83609.C: New test.

From-SVN: r256062
2018-01-01 12:28:57 +01:00
Jakub Jelinek f0b9bc3434 re PR middle-end/83623 (ICE: in convert_move, at expr.c:248 with -march=knl and 16bit vector bswap/rotate)
PR middle-end/83623
	* expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
	check for bswap in mode rather than HImode and use that in expand_unop
	too.

	* gcc.dg/pr83623.c: New test.

From-SVN: r256061
2018-01-01 12:27:17 +01:00
Joseph Myers dc9fa14196 * es.po: Update.
From-SVN: r256060
2018-01-01 00:17:45 +00:00
GCC Administrator c6f9988610 Daily bump.
From-SVN: r256057
2018-01-01 00:16:08 +00:00
GCC Administrator e11c6835a7 Daily bump.
From-SVN: r256047
2017-12-31 00:16:09 +00:00
GCC Administrator f4c4157567 Daily bump.
From-SVN: r256038
2017-12-30 00:16:08 +00:00
GCC Administrator 48498fcfee Daily bump.
From-SVN: r256029
2017-12-29 00:16:09 +00:00
Steven G. Kargl 8c5b3f8f74 re PR fortran/83548 (Compilation Error using logical function in parameter)
2017-12-28  Steven G. Kargl  <kargl@gcc.gnu.org>

	PR Fortran/83548
	* match.c (gfc_match_type_spec): Check for LOGICAL conflict in
	type-spec versus LOGICAL intrinsic subprogram.

2017-12-28  Steven G. Kargl  <kargl@gcc.gnu.org>

	PR Fortran/83548
	* gfortran.dg/array_constructor_type_22.f03: New test.

From-SVN: r256025
2017-12-28 20:43:38 +00:00
GCC Administrator cb6d05cd81 Daily bump.
From-SVN: r256016
2017-12-28 00:16:08 +00:00
GCC Administrator b37ba4de67 Daily bump.
From-SVN: r256005
2017-12-27 00:16:08 +00:00
GCC Administrator 8abf694609 Daily bump.
From-SVN: r255999
2017-12-26 00:16:11 +00:00
GCC Administrator 09c83dafc2 Daily bump.
From-SVN: r255995
2017-12-25 00:16:13 +00:00
GCC Administrator 8c8599a14d Daily bump.
From-SVN: r255990
2017-12-24 00:16:12 +00:00
Jakub Jelinek 11942b1776 re PR c++/83553 (compiler removes body of the for-loop, although there is a case label inside)
PR c++/83553
	* fold-const.c (struct contains_label_data): New type.
	(contains_label_1): Return non-NULL even for CASE_LABEL_EXPR, unless
	inside of a SWITCH_BODY seen during the walk.
	(contains_label_p): Use walk_tree instead of
	walk_tree_without_duplicates, prepare data for contains_label_1 and
	provide own pset.

	* c-c++-common/torture/pr83553.c: New test.

From-SVN: r255988
2017-12-23 09:43:10 +01:00
GCC Administrator 2c0a302f1a Daily bump.
From-SVN: r255985
2017-12-23 00:16:09 +00:00
Martin Jambor 7ad64964da [PR 82027] Also stream opt_info of former_clones
2017-12-22  Martin Jambor  <mjambor@suse.cz>

	PR lto/82027
	* lto-cgraph.c (output_cgraph_opt_summary_p): Also check former
	clones.

testsuite/
	* g++.dg/lto/pr82027_0.C: New test.

From-SVN: r255983
2017-12-22 19:28:59 +01:00
Jakub Jelinek b58d01a977 re PR debug/83550 (Bad location of DW_TAG_structure_type with forward declaration since r224161)
PR debug/83550
	* c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
	TYPE_STUB_DECL and call rest_of_type_compilation before processing
	incomplete vars rather than after it.

	* c-c++-common/dwarf2/pr83550.c: New test.

From-SVN: r255982
2017-12-22 19:12:15 +01:00
Jakub Jelinek b4b883cee3 backport: re PR c/83448 (ice in get_source_location_for_substring, at input.c:1507)
Backported from mainline
	2017-12-21  Jakub Jelinek  <jakub@redhat.com>

	PR c/83448
	* gimple-ssa-sprintf.c (maybe_warn): Don't call set_caret_index
	if navail is >= dir.len.

	* gcc.c-torture/compile/pr83448.c: New test.
	* gcc.dg/tree-ssa/builtin-snprintf-warn-4.c: New test.

From-SVN: r255972
2017-12-22 09:54:26 +01:00
Jakub Jelinek 7dc36181a0 backport: re PR rtl-optimization/80747 (gcc.dg/tree-ssa/tailrecursion-4.c fails with ICE when compiled with options "-fprofile-use -freorder-blocks-and-partition")
Backported from mainline
	2017-12-21  Jakub Jelinek  <jakub@redhat.com>

	PR rtl-optimization/80747
	PR rtl-optimization/83512
	* cfgrtl.c (force_nonfallthru_and_redirect): When splitting
	succ edge from ENTRY, copy partition from e->dest to the newly
	created bb.
	* bb-reorder.c (reorder_basic_blocks_simple): If last_tail is
	ENTRY, use BB_PARTITION of its successor block as current_partition.
	Don't copy partition when splitting succ edge from ENTRY.

	* gcc.dg/pr80747.c: New test.
	* gcc.dg/pr83512.c: New test.

From-SVN: r255971
2017-12-22 09:53:37 +01:00
Jakub Jelinek f0666a4f0a backport: re PR tree-optimization/83523 (ICE: verify_gimple failed (error: statement marked for throw, but doesn't))
Backported from mainline
	2017-12-21  Jakub Jelinek  <jakub@redhat.com>

	PR tree-optimization/83523
	* tree-ssa-math-opts.c (is_widening_mult_p): Return false if
	for INTEGER_TYPE TYPE_OVERFLOW_TRAPS.
	(convert_mult_to_fma): Likewise.

	* g++.dg/tree-ssa/pr83523.C: New test.

From-SVN: r255970
2017-12-22 09:52:28 +01:00
Jakub Jelinek 79cd47fc9d backport: re PR tree-optimization/83521 (ICE: verify_gimple failed (error: invalid operand in unary operation))
Backported from mainline
	2017-12-21  Jakub Jelinek  <jakub@redhat.com>

	PR tree-optimization/83521
	* tree-ssa-phiopt.c (factor_out_conditional_conversion): Use
	gimple_build_assign without code on result of
	fold_build1 (VIEW_CONVERT_EXPR, ...), as it might not create
	a VIEW_CONVERT_EXPR.

	* gcc.dg/pr83521.c: New test.

From-SVN: r255969
2017-12-22 09:51:26 +01:00
Jakub Jelinek 5e35526170 backport: re PR ipa/82801 (Internal compiler error with Eigen and __attribute__((always_inline, flatten)))
Backported from mainline
	2017-12-19  Jakub Jelinek  <jakub@redhat.com>

	PR ipa/82801
	PR ipa/83346
	* ipa-inline.c (flatten_remove_node_hook): New function.
	(ipa_inline): Keep only nodes with flatten attribute at the end of
	the array in the order from ipa_reverse_postorder, only walk that
	portion of array for flattening, if there is more than one such
	node, temporarily register a removal hook and ignore removed nodes.

	* g++.dg/ipa/pr82801.C: New test.

From-SVN: r255968
2017-12-22 09:50:30 +01:00
GCC Administrator ec59f9b643 Daily bump.
From-SVN: r255964
2017-12-22 00:16:11 +00:00
Uros Bizjak 32a3966ecd re PR target/83467 (ICE: in assign_by_spills, at lra-assigns.c:1476: unable to find a register to spill with -flive-range-shrinkage -m8bit-idiv)
PR target/83467
	* config/i386/i386.md (*ashl<mode>3_mask): Add operand
	constraints to operand 2.
	(*<shift_insn><mode>3_mask): Ditto.
	(*<rotate_insn><mode>3_mask): Ditto.

testsuite/ChangeLog:

	PR target/83467
	* gcc.target/i386/pr83467-1.c: New test.
	* gcc.target/i386/pr83467-2.c: Ditto.

From-SVN: r255956
2017-12-21 21:48:34 +01:00
Thomas Koenig 44612ae164 backport: re PR fortran/83436 (Internal file cannot be accessed by UNFORMATTED data transfer when reading from /dev/urandom)
2017-12-21  Thomas Koenig  <tkoenig@gcc.gnu.org>

	Backport from trunk
	PR fortran/83436
	* gfortran.dg/internal_readwrite_4.f90: New test.

From-SVN: r255940
2017-12-21 10:34:35 +00:00
GCC Administrator 0e927c845c Daily bump.
From-SVN: r255908
2017-12-21 00:16:12 +00:00
GCC Administrator 61d8fc0ea3 Daily bump.
From-SVN: r255847
2017-12-20 00:16:13 +00:00
Bin Cheng 3c6ef044d3 backport: re PR tree-optimization/82726 (ICE in verify_ssa during GIMPLE pass: pcom)
Backport from mainline
	2017-11-15  Bin Cheng  <bin.cheng@arm.com>

	PR tree-optimization/82726
	PR tree-optimization/70754
	* tree-predcom.c (order_drefs_by_pos): New function.
	(combine_chains): Move code setting has_max_use_after to...
	(try_combine_chains): ...here.  New parameter.  Sort combined chains
	according to position information.
	(tree_predictive_commoning_loop): Update call to above function.
	(update_pos_for_combined_chains, pcom_stmt_dominates_stmt_p): New.

	2017-11-15  Bin Cheng  <bin.cheng@arm.com>

	PR tree-optimization/82726
	Revert
	2017-01-23  Bin Cheng  <bin.cheng@arm.com>

	PR tree-optimization/70754
	* tree-predcom.c (stmt_combining_refs): New parameter INSERT_BEFORE.
	(reassociate_to_the_same_stmt): New parameter INSERT_BEFORE.  Insert
	combined stmt before it if not NULL.
	(combine_chains): Process refs reversely and compute dominance point
	for root ref.

	Revert
	2017-02-23  Bin Cheng  <bin.cheng@arm.com>

	PR tree-optimization/79663
	* tree-predcom.c (combine_chains): Process refs in reverse order
	only for ZERO length chains, and add explaining comment.

	gcc/testsuite

	Backport from mainline
	2017-11-15  Bin Cheng  <bin.cheng@arm.com>

	PR tree-optimization/82726
	* gcc.dg/tree-ssa/pr82726.c: New test.

From-SVN: r255828
2017-12-19 15:25:56 +00:00
H.J. Lu b1c275e2c5 Add a tetst for PR middle-end/83471
Backported from mainline
	PR middle-end/83471
	* g++.dg/torture/pr83471.C: New test.

From-SVN: r255822
2017-12-19 05:40:42 -08:00
Marek Polacek fe513fce56 re PR c++/83116 (Statement with no effect causes wrong code of static object constexpr method)
PR c++/83116
	* constexpr.c (cxx_eval_call_expression): Only look into
	constexpr_call_table if ctx->strict.

	* g++.dg/cpp1y/constexpr-83116.C: New test.

From-SVN: r255813
2017-12-19 10:02:48 +00:00
Sebastian Huber 109836feac RTEMS/PowerPC: Remove 64-bit soft-float multilib
gcc/
	PR target/83387
	* config/rs6000/t-rtems (MULTILIB_REQUIRED): Remove 64-bit soft-float
	multilib.

From-SVN: r255810
2017-12-19 08:20:05 +00:00
Daniel Cederman 9f987b42fc SPARC: Make sure that jump is to a label in errata workaround
In some cases the jump could be to a return instruction and in those cases the
next_active_insn() function tries to follow an invalid pointer which leads to a
crash. This error did not manifest when using a 32-bit version of GCC which is
why I did not detect it before.

gcc/
	* config/sparc/sparc.c (sparc_do_work_around_errata): Make sure
	the jump is to a label.

From-SVN: r255808
2017-12-19 08:07:22 +00:00
GCC Administrator 8ef935f76a Daily bump.
From-SVN: r255794
2017-12-19 00:16:09 +00:00
GCC Administrator cfee4c0585 Daily bump.
From-SVN: r255770
2017-12-18 00:16:15 +00:00
John David Anglin 4e138baf89 backport: pa.c (pa_legitimate_address_p): For scaled indexing...
Backport from mainline
	2017-12-03  John David Anglin  <danglin@gcc.gnu.org>

	* config/pa/pa.c (pa_legitimate_address_p): For scaled indexing,
	require base operand is a REG_POINTER prior to reload on targets
	with non-equivalent space registers.

From-SVN: r255762
2017-12-17 17:02:10 +00:00
GCC Administrator eb94321967 Daily bump.
From-SVN: r255757
2017-12-17 00:16:08 +00:00
Jakub Jelinek e8baf08f2a backport: re PR c++/83205 (ICE on structured binding with ill-formed negative std::tuple_size<T>::value)
Backported from mainline
	2017-12-15  Jakub Jelinek  <jakub@redhat.com>

	PR c++/83205
	* decl.c (cp_finish_decomp): Handle the case when tsize is not
	error_mark_node, but doesn't fit into uhwi.  Split up count != eltscnt
	and !tree_fits_uhwi_p (tsize) error_at calls into error_n and inform_n
	to handle plural forms properly.

	* g++.dg/cpp1z/decomp3.C: Adjust for structured binding count
	mismatch diagnostics split into error and warning with plural
	forms.
	* g++.dg/cpp1z/decomp10.C: Likewise.
	* g++.dg/cpp1z/decomp32.C: New test.

From-SVN: r255736
2017-12-16 01:41:10 +01:00
Jakub Jelinek c3fce73ee9 backport: re PR c++/81197 (ICE with structured binding and lifetime-extended temporaries)
Backported from mainline
	2017-12-15  Jakub Jelinek  <jakub@redhat.com>

	PR c++/81197
	* cp-tree.h (cp_maybe_mangle_decomp): Declare.
	* decl.c (cp_maybe_mangle_decomp): New function.
	(cp_finish_decomp): Don't SET_DECL_ASSEMBLER_NAME here.
	* parser.c (cp_convert_range_for,
	cp_parser_decomposition_declaration): Call cp_maybe_mangle_decomp.
	* pt.c (tsubst_expr): Likewise.
	* mangle.c (find_decomp_unqualified_name): New function.
	(write_unqualified_name): Handle DECL_DECOMPOSITION_P
	where DECL_ASSEMBLER_NAME is already set.

	* g++.dg/cpp1z/decomp34.C: New test.

From-SVN: r255735
2017-12-16 01:40:14 +01:00
GCC Administrator b0fc69c943 Daily bump.
From-SVN: r255733
2017-12-16 00:16:12 +00:00
Jakub Jelinek f455bd3a1d re PR c++/83217 (Compiler segfault: structured binding by reference to a templated type via a pointer)
PR c++/83217
	* decl.c (cp_finish_decomp): If decl's type is REFERENCE_TYPE,
	call complete_type (TREE_TYPE (type)).

	* g++.dg/cpp1z/decomp33.C: New test.

From-SVN: r255730
2017-12-15 23:16:15 +01:00
Jakub Jelinek 99ccf43c70 re PR tree-optimization/83269 (Wrong constant folding)
PR tree-optimization/83269
	* fold-const.c (fold_binary_loc): Perform (-A) - B -> (-B) - A
	subtraction in arg0's type if type is signed and arg0 is unsigned.
	Formatting fix.

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

From-SVN: r255729
2017-12-15 23:15:30 +01:00
Jakub Jelinek ea5869d324 backport: re PR tree-optimization/83198 (ICE in format_floating, at gimple-ssa-sprintf.c:1900)
Backported from mainline
	2017-12-14  Jakub Jelinek  <jakub@redhat.com>

	PR tree-optimization/83198
	* gimple-ssa-sprintf.c (format_floating): Set type solely based on
	dir.modifier, regardless of TREE_TYPE (arg).  Assume non-REAL_CST
	value if arg is a REAL_CST with incompatible type.

	* gcc.dg/pr83198.c: New test.
	* gcc.dg/tree-ssa/pr83198.c: New test.

From-SVN: r255728
2017-12-15 23:14:41 +01:00
Jakub Jelinek a31d2f7b36 backport: re PR c++/79650 (ICE on invalid c++ code with label arithmetic in convert_nontype_argument (pt.c:6515))
Backported from mainline
	2017-12-14  Jakub Jelinek  <jakub@redhat.com>

	PR c++/79650
	* pt.c (convert_nontype_argument): Diagnose
	reduced_constant_expression_p expressions that aren't INTEGER_CST.

	* g++.dg/template/pr79650.C: New test.

From-SVN: r255727
2017-12-15 23:13:37 +01:00
Jakub Jelinek a9a6b2e8cf backport: re PR tree-optimization/80631 (Compiling with -O3 -mavx2 gives wrong code)
Backported from mainline
	2017-12-12  Jakub Jelinek  <jakub@redhat.com>

	PR tree-optimization/80631
	* tree-vect-loop.c (get_initial_def_for_reduction): Fix comment typo.
	(vect_create_epilog_for_reduction): Add INDUC_VAL argument, for
	INTEGER_INDUC_COND_REDUCTION use INDUC_VAL instead of
	hardcoding zero as the value if COND_EXPR is never true.  For
	INTEGER_INDUC_COND_REDUCTION don't emit the final COND_EXPR if
	INDUC_VAL is equal to INITIAL_DEF.
	(vectorizable_reduction): Compute INDUC_VAL for
	vect_create_epilog_for_reduction, if no value is suitable, don't
	use INTEGER_INDUC_COND_REDUCTION for now.  Formatting fixes.

	* gcc.dg/vect/pr80631-1.c: New test.
	* gcc.dg/vect/pr80631-2.c: New test.

	PR tree-optimization/80631
	* gcc.target/i386/avx2-pr80631.c: New test.

From-SVN: r255726
2017-12-15 23:12:46 +01:00
Jakub Jelinek af3b2e0538 backport: re PR target/81906 (Calls to rint() wrongly optimized away starting in g++ 6)
Backported from mainline
	2017-12-08  Joseph Myers  <joseph@codesourcery.com>
		    Alexander Monakov  <amonakov@ispras.ru>
		    Jakub Jelinek  <jakub@redhat.com>

	PR target/81906
	* config/i386/i386.c (ix86_expand_rint): Handle flag_rounding_math.

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

From-SVN: r255725
2017-12-15 23:11:33 +01:00
Jakub Jelinek 1c8f2b0a85 backport: re PR c++/80259 (ICE deleting friend function)
Backported from mainline
	2017-12-06  Jakub Jelinek  <jakub@redhat.com>

	PR c++/80259
	* decl2.c (grokfield): Diagnose = delete redefinition of a friend.

	* g++.dg/cpp0x/pr80259.C: New test.

From-SVN: r255723
2017-12-15 23:10:40 +01:00
Jakub Jelinek 25d8a020e0 backport: re PR sanitizer/81212 (-Wreturn-type is disabled when used together with -fsanitize=return)
Backported from mainline
	2017-12-02  Jakub Jelinek  <jakub@redhat.com>

	PR c++/81212
	* tree-cfg.c (pass_warn_function_return::execute): Handle
	__builtin_ubsan_handle_missing_return like __builtin_unreachable
	with BUILTINS_LOCATION.

	* g++.dg/ubsan/pr81212.C: New test.

From-SVN: r255722
2017-12-15 23:09:50 +01:00
Jakub Jelinek e2e1e8d9f8 backport: re PR target/78643 (ICE in convert_move, at expr.c:230)
Backported from mainline
	2017-12-02  Jakub Jelinek  <jakub@redhat.com>

	PR target/78643
	PR target/80583
	* expr.c (get_inner_reference): If DECL_MODE of a non-bitfield
	is BLKmode for vector field with vector raw mode, use TYPE_MODE
	instead of DECL_MODE.

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

From-SVN: r255721
2017-12-15 23:09:07 +01:00
Jakub Jelinek ab26ce4518 backport: re PR target/80819 (Useless store to the stack in _mm_set_epi64x with SSE4 -mno-avx)
Backported from mainline
	2017-11-29  Jakub Jelinek  <jakub@redhat.com>

	PR target/80819
	* config/i386/sse.md (vec_concatv2di): Remove * from (=Yr,0,*rm)
	alternative.

	* gcc.target/i386/pr80819-1.c: New test.
	* gcc.target/i386/pr80819-2.c: New test.

From-SVN: r255720
2017-12-15 23:08:20 +01:00
Jakub Jelinek d67cb7e401 backport: re PR c++/81888 (Structured bindings stopped working)
Backported from mainline
	2017-11-27  Jakub Jelinek  <jakub@redhat.com>

	PR c++/81888
	* parser.c (cp_parser_decomposition_declaration): Reject just
	BRACE_ENCLOSED_INITIALIZER_P initializers with nelts != 1 rather
	than all such CONSTRUCTORs, and only if is_direct_init is true.

	* g++.dg/cpp1z/decomp30.C: Add a test for structured binding with
	= {} and = { a, a } initializers.
	* g++.dg/cpp1z/decomp31.C: New test.

From-SVN: r255719
2017-12-15 23:07:23 +01:00
Jakub Jelinek 4c8c427fcf backport: re PR c++/81675 (attribute(noreturn) of destructor in :? not honored)
Backported from mainline
	2017-11-27  Jakub Jelinek  <jakub@redhat.com>

	PR c++/81675
	* cp-gimplify.c (cp_fold) <case COND_EXPR>: Don't return immediately
	for VOID_TYPE_P COND_EXPRs, instead fold the operands and if op0 is
	INTEGER_CST, ensure that both op1 and op2 are non-NULL and fall
	through into normal folding, otherwise just rebuild x if any op
	changed.

	* g++.dg/warn/pr81675.C: New test.

From-SVN: r255718
2017-12-15 23:06:16 +01:00
Jakub Jelinek 7e27191cf5 backport: re PR rtl-optimization/81553 (ICE in immed_wide_int_const, at emit-rtl.c:607)
Backported from mainline
	2017-11-25  Jakub Jelinek  <jakub@redhat.com>

	PR rtl-optimization/81553
	* combine.c (simplify_if_then_else): In (if_then_else COND (OP Z C1) Z)
	to (OP Z (mult COND (C1 * STORE_FLAG_VALUE))) optimization, if OP
	is a shift where C1 has different mode than the whole shift, use C1's
	mode for MULT rather than the shift's mode.

	* gcc.c-torture/compile/pr81553.c: New test.

From-SVN: r255717
2017-12-15 23:05:00 +01:00
Jakub Jelinek 88b712c241 backport: re PR fortran/81304 (Bogus warning with -Wsurprising and -fopenmp: Type specified for intrinsic function 'min' / 'max')
Backported from mainline
	2017-11-24  Jakub Jelinek  <jakub@redhat.com>

	PR fortran/81304
	* trans-openmp.c (gfc_trans_omp_array_reduction_or_udr): Set
	attr.implicit_type in intrinsic_sym to avoid undesirable warning.

	* testsuite/libgomp.fortran/pr81304.f90: New test.

From-SVN: r255716
2017-12-15 23:00:48 +01:00
Jakub Jelinek e57525d514 backport: re PR sanitizer/83014 (ICE in pretty-print with -fsanitize=bounds)
Backported from mainline
	2017-11-24  Jakub Jelinek  <jakub@redhat.com>
 
	PR sanitizer/83014
	* ubsan.c (ubsan_type_descriptor): Use pp_unsigned_wide_integer
	instead of pp_printf with HOST_WIDE_INT_PRINT_DEC.  Avoid calling
	tree_to_uhwi twice.

	* gcc.dg/ubsan/pr83014.c: New test.

From-SVN: r255715
2017-12-15 22:58:13 +01:00
Jakub Jelinek 5a8687cc52 backport: tree-object-size.c (pass_through_call): Do not handle BUILT_IN_STPNCPY_CHK which is not a pass through call.
Backported from mainline
	2017-11-24  Jakub Jelinek  <jakub@redhat.com>

	* tree-object-size.c (pass_through_call): Do not handle
	BUILT_IN_STPNCPY_CHK which is not a pass through call.

	* gcc.dg/builtin-object-size-18.c: New test.

From-SVN: r255714
2017-12-15 22:57:19 +01:00
Jakub Jelinek 7c11fb2820 backport: parser.c (cp_parser_omp_declare): Change return type to bool from void, return true for declare simd.
Backported from mainline
	2017-11-23  Jakub Jelinek  <jakub@redhat.com>

	* parser.c (cp_parser_omp_declare): Change return type to bool from
	void, return true for declare simd.
	(cp_parser_pragma): Return cp_parser_omp_declare returned value
	rather than always false.

From-SVN: r255713
2017-12-15 22:56:21 +01:00
Jakub Jelinek 29d1342c4b backport: re PR fortran/81841 (THREADPRIVATE (OpenMP) wrongly rejected in BLOCK DATA)
Backported from mainline
	2017-11-23  Dirk Broemmel  <d.broemmel@fz-juelich.de>
		    Jakub Jelinek  <jakub@redhat.com>

	PR fortran/81841
	* parse.c (parse_spec): Allow ST_OMP_THREADPRIVATE inside of
	BLOCK DATA.

	* libgomp.fortran/pr81841.f90: New test.

From-SVN: r255712
2017-12-15 22:55:47 +01:00
Jakub Jelinek 8ea87c5f83 backport: re PR middle-end/82253 (ICE in convert_move, at expr.c:604)
Backported from mainline
	2017-11-23  Jakub Jelinek  <jakub@redhat.com>

	PR middle-end/82253
	* expr.c (expand_assignment): For CONCAT to_rtx, complex type from and
	bitpos/bitsize covering the whole destination, use store_expr only if
	the complex mode is the same.  Otherwise, use expand_normal and if
	it returns CONCAT, subreg each part separately instead of trying to
	subreg the whole result.

	* gfortran.dg/pr82253.f90: New test.

From-SVN: r255711
2017-12-15 22:54:15 +01:00
Jakub Jelinek 98a409be9d backport: re PR debug/83084 (-fcompare-debug failure on ppc64le)
Backported from mainline
	2017-11-22  Jakub Jelinek  <jakub@redhat.com>

	PR debug/83084
	* valtrack.c (propagate_for_debug_subst, propagate_for_debug): Reset
	debug insns if they would contain UNSPEC_VOLATILE or volatile asm.
	(dead_debug_insert_temp): Likewise, but also ignore even non-volatile
	asm.

	* g++.dg/opt/pr83084.C: New test.

From-SVN: r255710
2017-12-15 22:53:29 +01:00
Jakub Jelinek 98ea6f03f9 backport: re PR target/82880 (gcc --help=target --help=optimizers hangs on mips)
Backported from mainline
	2017-11-21  James Cowgill  <James.Cowgill@imgtec.com>
		    Jakub Jelinek  <jakub@redhat.com>

	PR target/82880
	* config/mips/frame-header-opt.c (mips_register_frame_header_opt):
	Remove static keyword from f variable.

	* gcc.dg/opts-8.c: New test.

From-SVN: r255709
2017-12-15 22:52:06 +01:00
Jakub Jelinek 0c924e851e backport: re PR c++/83059 (ICE on invalid C++ code: in tree_to_uhwi, at tree.c:6633)
Backported from mainline
	2017-11-21  Jakub Jelinek  <jakub@redhat.com>

	PR c++/83059
	* c-common.c (get_atomic_generic_size): Use TREE_INT_CST_LOW
	instead of tree_to_uhwi, formatting fix.

	* c-c++-common/pr83059.c: New test.

From-SVN: r255708
2017-12-15 22:50:52 +01:00
Jakub Jelinek e74d698765 backport: re PR c++/82781 (Vector extension operators return wrong result in constexpr)
Backported from mainline
	2017-11-20  Jakub Jelinek  <jakub@redhat.com>

	PR c++/82781
	* constexpr.c (cxx_eval_vector_conditional_expression): New function.
	(cxx_eval_constant_expression) <case VEC_COND_EXPR>: Use it instead
	of cxx_eval_conditional_expression.

	* g++.dg/ext/constexpr-pr82781.C: New test.

From-SVN: r255707
2017-12-15 22:50:00 +01:00
Richard Biener 8c633e4d27 re PR bootstrap/83439 (Bootstrap failure with --enable-checking=yes,rtl,extra)
2017-12-15  Richard Biener  <rguenther@suse.de>

	PR bootstrap/83439
	* tree-ssa-pre.c (eliminate_dom_walker::before_dom_children):
	Adjust remaining gimple_set_modified to use the modified
	variable instead.

From-SVN: r255704
2017-12-15 20:45:36 +00:00
Eric Botcazou 9f671acc02 re PR target/66488 (segfault on sizeof(long) < sizeof(void*) and large GCC memory usage)
PR target/66488
	* ggc-page.c (HOST_BITS_PER_PTR): Do not define here...
	* hwint.h (HOST_BITS_PER_PTR): ...but here instead.
	* config/i386/xm-mingw32.h (HOST_BITS_PER_PTR): Delete.

From-SVN: r255688
2017-12-15 11:31:42 +00:00
Richard Biener 2c44df49aa backport: re PR tree-optimization/82060 (ICE in refs_may_alias_p_1 with devirtualization enabled)
2017-12-15  Richard Biener  <rguenther@suse.de>

	Backport from mainline
	PR tree-optimization/82060
	* tree-ssa-pre.c (eliminate_dom_walker::before_dom_children):
	Move devirtualization after stmt folding and before EH/AB/noreturn
	cleanup to get the stmt refs canonicalized.  Use a bool instead
	of gimple_modified_p since that doesn't work for NOPs.  Schedule
	NOPs generated by folding for removal.

	* g++.dg/torture/pr82060.C: New testcase.

From-SVN: r255682
2017-12-15 10:12:08 +00:00
Sudakshina Das c49c3117e3 Fix regression on soft float targets for armv8_2-fp16-move-2.c
*** gcc/testsuite/ChangeLog ***

2017-12-15  Sudakshina Das  <sudi.das@arm.com>

	* gcc.target/arm/armv8_2-fp16-move-2.c: Remove dg-add-options.

From-SVN: r255681
2017-12-15 09:59:24 +00:00
Richard Biener ab5f49b5d8 backport: [multiple changes]
2017-12-15  Richard Biener  <rguenther@suse.de>
 
	Backport from mainline
	2017-09-05  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/82102
	* tree-ssa-pre.c (eliminate): Check if lhs is NULL.

	* gcc.dg/torture/pr82102.c: New testcase.

	2017-09-13  Richard Biener  <rguenther@suse.de>

	PR middle-end/82128
	* gimple-fold.c (gimple_fold_call): Update SSA name in-place to
	default-def to avoid breaking iterator update with the weird
	interaction with cgraph_update_edges_for_call_stmt_node.

	* g++.dg/pr82128.C: New testcase.

From-SVN: r255678
2017-12-15 08:19:15 +00:00
Richard Biener ec40d1a8ad Backport PRs 82402, 82697, 82765, 82902
2017-12-15  Richard Biener  <rguenther@suse.de>

	Backport from mainline
	2017-11-24  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/82402
	* tree-vect-loop-manip.c (create_lcssa_for_virtual_phi): Properly
	set SSA_NAME_OCCURS_IN_ABNORMAL_PHI.

	* gcc.dg/torture/pr82402.c: New testcase.

	2017-10-24  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/82697
	* tree-ssa-phiopt.c (cond_store_replacement): Use alias-set
	zero for conditional load and unconditional store.

	* gcc.dg/torture/pr82697.c: New testcase.

	2017-11-02  Richard Biener  <rguenther@suse.de>

	PR middle-end/82765
	* varasm.c (decode_addr_const): Make offset HOST_WIDE_INT.
	Truncate ARRAY_REF index and element size.

	* gcc.dg/pr82765.c: New testcase.

	2017-11-09  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/82902
	* tree-ssa-phiprop.c (propagate_with_phi): Test proper type.

	* g++.dg/torture/pr82902.C: New testcase.

From-SVN: r255677
2017-12-15 08:12:10 +00:00