Commit Graph

145205 Commits

Author SHA1 Message Date
Jakub Jelinek
72e7cd6e8b re PR target/70290 (-mavx512vl breaks parsing of C++ vector condition)
PR target/70290
	* g++.dg/ext/pr70290.C: Add -Wno-psabi -w to dg-options.  Formatting.

From-SVN: r234450
2016-03-24 12:26:44 +01:00
Richard Biener
ce9d0c0395 re PR tree-optimization/70372 (ICE: in wide_int_to_tree, at tree.c:1488 with -fno-tree-fre and v2ti vectors)
2016-03-24  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/70372
	* tree-ssa-reassoc.c (eliminate_plus_minus_pair): Use
	build_all_ones_cst to also handle vector types correctly.

	* gcc.dg/tree-ssa/pr70372.c: New testcase.

From-SVN: r234449
2016-03-24 08:17:43 +00:00
GCC Administrator
1923c60d63 Daily bump.
From-SVN: r234447
2016-03-24 00:16:15 +00:00
Patrick Palka
426b942808 Fix PR c++/70347 (default member initializer not picked up by union)
gcc/cp/ChangeLog:

	PR c++/70347
	* typeck.c (process_init_constructor_union): If the initializer
	is empty, use the union's NSDMI if it has one.

gcc/testsuite/ChangeLog:

	PR c++/70347
	* g++.dg/cpp1y/nsdmi-union1.C: New test.

From-SVN: r234443
2016-03-23 21:08:32 +00:00
Patrick Palka
cd1588c4d6 Fix PR c++/70332 (ICE due to aggregate initialization of NSDMI)
gcc/cp/ChangeLog:

	PR c++/70332
	* pt.c (tsubst_copy) [PARM_DECL]: Handle the use of 'this' in an
	NSDMI that's part of an aggregrate initialization.

gcc/testsuite/ChangeLog:

	PR c++/70332
	* g++.dg/cpp1y/nsdmi-aggr5.C: New test.

From-SVN: r234442
2016-03-23 21:02:34 +00:00
Michael Meissner
80636611f3 re PR target/70381 (On powerpc, -mfloat128 is on by default for all VSX systems)
2016-03-23  Michael Meissner  <meissner@linux.vnet.ibm.com>

	PR target/70381
	* config/rs6000/rs6000-cpus.def (ISA_2_6_MASKS_SERVER): Do not set
	-mfloat128 here.

From-SVN: r234441
2016-03-23 20:33:28 +00:00
Jakub Jelinek
928af3bfe2 re PR c++/70001 (Infinity compilation time)
PR c++/70001
	* constexpr.c (cxx_eval_vec_init_1): Reuse CONSTRUCTOR initializers
	for 1..max even for multi-dimensional arrays.  Call unshare_expr
	on it.

	* g++.dg/cpp0x/constexpr-70001-4.C: New test.
	* g++.dg/cpp1y/pr70001.C: New test.

From-SVN: r234439
2016-03-23 19:55:38 +01:00
Jakub Jelinek
61637db3f2 re PR c++/70323 (missing error on integer overflow in constexpr function result converted to bool)
PR c++/70323
	* constexpr.c (cxx_eval_constant_expression): Diagnose overflow
	on TREE_OVERFLOW constants.

	* g++.dg/cpp0x/constexpr-70323.C: New test.

From-SVN: r234438
2016-03-23 19:45:26 +01:00
Jakub Jelinek
048336099e re PR c++/70376 (OpenMP taskloop construct fails to instantiate copy constructor(same as Bug 48869))
PR c++/70376
	* cp-gimplify.c (genericize_omp_for_stmt): Don't walk OMP_FOR_CLAUSES
	for OMP_TASKLOOP here.
	(cp_genericize_r): Handle OMP_TASKLOOP like OMP_TASK, except do call
	genericize_omp_for_stmt instead of cp_walk_tree on OMP_BODY.

	* testsuite/libgomp.c++/pr70376.C: New test.

From-SVN: r234437
2016-03-23 19:42:19 +01:00
Alexandre Oliva
05aca4e73c re PR c++/69315 (ICE in finish_function with constexpr and templates)
PR c++/69315
	* cp-tree.h (defer_mark_used_calls, deferred_mark_used_calls): Remove.
	* decl.c (defer_mark_used_calls, deferred_mark_used_calls): Remove.
	(finish_function): Don't set or test them.
	* decl2.c (mark_used): Don't handle defer_mark_used_calls.

	* g++.dg/cpp0x/constexpr-69315.C: New test.
	* g++.dg/cpp0x/variadic122.C: Change one dg-warning into dg-bogus.

Co-Authored-By: Jakub Jelinek <jakub@redhat.com>
Co-Authored-By: Jason Merrill <jason@redhat.com>

From-SVN: r234436
2016-03-23 19:36:25 +01:00
Jason Merrill
96a4ef9d6a re PR c++/70344 (ICE on invalid code at -O1 and above on x86_64-linux-gnu in record_reference, at cgraphbuild.c:64)
PR c++/70344

	* constexpr.c (cxx_eval_call_expression): Catch invalid recursion.

From-SVN: r234434
2016-03-23 14:23:04 -04:00
Marek Polacek
fbdb6bafe2 re PR c++/69884 (warning: ignoring attributes on template argument)
PR c++/69884
	* c.opt (Wignored-attributes): New option.

	* pt.c (canonicalize_type_argument): Use OPT_Wignored_attributes.

	* doc/invoke.texi: Document -Wignored-attributes.

	* g++.dg/warn/Wignored-attributes-1.C: New test.
	* g++.dg/warn/Wignored-attributes-2.C: New test.

From-SVN: r234433
2016-03-23 17:51:56 +00:00
Tom de Vries
d79ee5242b Add missing initializations in oacc testcases
2016-03-23  Tom de Vries  <tom@codesourcery.com>

	* c-c++-common/goacc/kernels-default.c (foo): Add missing
	initialization.
	* gfortran.dg/goacc/private-3.f95 (test): Same.
	* gfortran.dg/goacc/routine-5.f90 (gang, worker, vector, seq): Add
	missing use param.

	* testsuite/libgomp.oacc-fortran/reduction-2.f90: Add missing
	initialization of lresult and lvresult.
	* testsuite/libgomp.oacc-fortran/reduction-3.f90: Same.

From-SVN: r234432
2016-03-23 17:32:05 +00:00
Bin Cheng
9bf63f8cb2 re PR tree-optimization/69042 (Missed optimization in ivopts)
PR tree-optimization/69042
	* params.def (PARAM_IV_CONSIDER_ALL_CANDIDATES_BOUND): Increase the
	parameter from 30 to 40.

From-SVN: r234430
2016-03-23 15:26:43 +00:00
Bin Cheng
cfe8aebe85 re PR tree-optimization/69042 (Missed optimization in ivopts)
PR tree-optimization/69042
	* tree-ssa-loop-ivopts.c (add_iv_candidate_for_use): Add IV cand
	for use with constant offset stripped in base.

From-SVN: r234429
2016-03-23 15:24:20 +00:00
James Norris
b6d1f2b546 re PR libgomp/69414 ([OpenACC] "!$acc update self" does not provide expected result)
PR libgomp/69414
	* oacc-mem.c (delete_copyout, update_dev_host): Fix device address.
	* testsuite/libgomp.oacc-c-c++-common/update-1.c: Additional tests.
	* testsuite/libgomp.oacc-c-c++-common/update-1-2.c: Likewise.
	* testsuite/libgomp.oacc-fortran/update-1.f90: New file.

Co-Authored-By: Daichi Fukuoka <dc-fukuoka@sgi.com>

From-SVN: r234428
2016-03-23 14:38:55 +00:00
Richard Biener
4d8989d5b0 re PR tree-optimization/70251 (Wrong code with -O3 -march=skylake-avx512.)
2016-03-23  Richard Biener  <rguenther@suse.de>

	PR middle-end/70251
	* match.pd (A + (B vcmp C ? 1 : 0) -> A - (B vcmp C)): Adjust
	mode compatibility check.
	(A - (B vcmp C ? 1 : 0) -> A + (B vcmp C)): Likewise.

From-SVN: r234427
2016-03-23 13:40:50 +00:00
Jeff Law
478baf913e re PR tree-optimization/64058 (Performance degradation after r216304)
PR tree-optimization/64058
	* tree-ssa-coalesce.c (struct coalesce_pair): Add new field
	CONFLICT_COUNT.
	(struct ssa_conflicts): Move up earlier in the file.
	(conflicts_, var_map_): New static variables.
	(initialize_conflict_count): New function to initialize the
	CONFLICT_COUNT field for each conflict pair.
	(compare_pairs): Lazily initialize the conflict count and use it
	as the first tie-breaker.
	(sort_coalesce_list): Add new arguments conflicts, map.  Initialize
	and wipe conflicts_ and map_ around the call to qsort.  Remove
	special case for 2 coalesce pairs.
	* bitmap.c (bitmap_count_unique_bits): New function.
	(bitmap_count_bits_in_word): New function, extracted from
	bitmap_count_bits.
	(bitmap_count_bits): Use bitmap_count_bits_in_word.
	* bitmap.h (bitmap_count_unique_bits): Declare it.

From-SVN: r234425
2016-03-23 07:20:16 -06:00
Ilya Enkovich
b01e88e56b re PR target/69917 (gcc.target/i386/chkp-hidden-def.c FAILs)
gcc/

	PR target/69917
	* config/i386/sol2.h (ASM_OUTPUT_DEF_FROM_DECLS): Follow
	transparent alias chain for decl assembler name.
	* config/sol2.c (solaris_assemble_visibility): Likewise.

From-SVN: r234423
2016-03-23 10:55:37 +00:00
Kyrylo Tkachov
4af0f474d7 [ARM] Reduce size of arm1020e automaton
* config/arm/arm1020e.md (1020call_op): Reduce reservation
	duration.
	(v10_fdivs): Likewise.
	(v10_fdivd): Likewise.

From-SVN: r234422
2016-03-23 10:39:10 +00:00
Kyrylo Tkachov
a59f0bef3e [ARM] Split out armv7ve effective target check
* lib/target-supports.exp: Remove v7ve entry from loop
	creating effective target checks.
	(check_effective_target_arm_arch_v7ve_ok): New procedure.
	(add_options_for_arm_arch_v7ve): Likewise.

From-SVN: r234420
2016-03-23 10:32:54 +00:00
Kyrylo Tkachov
6b32fd17a6 [ARM] PR driver/70132: Avoid double fclose in driver-arm.c
PR driver/70132
	* config/arm/driver-arm.c (host_detect_local_cpu): Reorder exit logic
	to not call fclose twice on file.

From-SVN: r234419
2016-03-23 10:16:31 +00:00
Martin Liska
7397fce2f7 Copy shadow argument conditionally (PR hsa/70337)
PR hsa/70337
	* plugin/plugin-hsa.c (GOMP_OFFLOAD_run): Copy shadow
	argument just in case a dispatched kernel uses that argument.

From-SVN: r234418
2016-03-23 09:59:51 +00:00
Jakub Jelinek
0179520a83 re PR tree-optimization/70354 (Wrong code with -O3 -march=broadwell and -march=skylake-avx512.)
PR tree-optimization/70354
	* tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern): If
	oprnd0 is wider than oprnd1 and there is a cast from the wider
	type to oprnd1, mask it with the mask of the narrower type.

	* gcc.dg/vect/pr70354-1.c: New test.
	* gcc.dg/vect/pr70354-2.c: New test.
	* gcc.target/i386/avx2-pr70354-1.c: New test.
	* gcc.target/i386/avx2-pr70354-2.c: New test.

From-SVN: r234417
2016-03-23 10:52:00 +01:00
Jakub Jelinek
7da7269a69 re PR target/70321 (STV generates less optimized code)
PR target/70321
	* config/i386/i386.md (*anddi3_doubleword, *<code>di3_doubleword):
	Optimize TARGET_STV splitters, if high or low word of last argument
	is 0 or -1.

From-SVN: r234416
2016-03-23 10:49:12 +01:00
Bernd Edlinger
bfd84e6ba5 Makefile.am (install-freestanding-headers): Add concept_check.h and move.h to the installed headers.
2016-03-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>

        * include/Makefile.am (install-freestanding-headers): Add
        concept_check.h and move.h to the installed headers.
        * include/Makefile.in: Regenerated.
        * include/bits/concept_check.h: Ignore _GLIBCXX_CONCEPT_CHECKS for
        freestanding implementations.
        * doc/xml/manual/using.xml (_GLIBCXX_CONCEPT_CHECKS): Mention
        that this macro has no effect for freestanding implementations.
        * doc/html/manual/using_macros.html: Likewise.

From-SVN: r234414
2016-03-23 00:41:52 +00:00
GCC Administrator
9a607978a2 Daily bump.
From-SVN: r234413
2016-03-23 00:16:13 +00:00
Jeff Law
75bb14d7cc re PR target/70232 (excessive stack usage with -O2)
PR target/70232
	tree-ssa-threadbackward.c
	(fsm_find_control_statement_thread_paths): Correctly distinguish
	between old style jump threads vs FSM jump threads.

	PR target/70232
	* gcc.dg/tree-ssa/pr70232.c: New test.

From-SVN: r234409
2016-03-22 15:32:34 -06:00
Michael Meissner
104cdaf14f re PR libgcc/70363 (PowerPC __float128 to long double doesn't link if built with an assember without ISA 3.0 support)
2016-03-22  Michael Meissner  <meissner@linux.vnet.ibm.com>

	PR libgcc/70363
	* config/rs6000/extendkftf2-sw.c (__extendkftf2_sw): If libgcc was
	built with an assembler that does not support ISA 3.0
	instructions, rename __extendkftf2_sw to __extendkftf2.

From-SVN: r234408
2016-03-22 21:05:43 +00:00
Ilya Enkovich
72c9526d3d re PR target/70302 (crash on valid code at -O2 and -O3 in 32-bit mode on x86_64-linux-gnu (in convert_op, at config/i386/i386.c:3414))
2016-03-22  Ilya Enkovich  <enkovich.gnu@gmail.com>

	PR target/70302
	* config/i386/i386.c (scalar_chain::convert_op): Support
	uninitialized register usage case.

	PR target/70302
	* gcc.target/i386/pr70302.c: New test.

From-SVN: r234406
2016-03-22 13:00:14 -06:00
Richard Biener
a3ca1bc5bd re PR tree-optimization/70251 (Wrong code with -O3 -march=skylake-avx512.)
2016-03-22  Richard Biener  <rguenther@suse.de>

	PR middle-end/70251
	* genmatch.c (gen_transform): Adjust last parameter to a three-state
	int...
	(capture::gen_transform): ... to change behavior when substituting
	a condition into cond or not-cond expr context.
	(dt_simplify::gen_1): Adjust.
	* gimple-match-head.c: Include gimplify.h for unshare_expr.
	* match.pd (A + (B vcmp C ? 1 : 0) -> A - (B vcmp C)): Revert
	last change and instead change to
	A + (B vcmp C ? 1 : 0) -> A - (B vcmp C ? -1 : 0).
	(A - (B vcmp C ? 1 : 0) -> A + (B vcmp C)): Likewise.

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

From-SVN: r234405
2016-03-22 14:38:42 +00:00
Anthony Green
ec613b6634 Fix endianness issue for moxiebox
From-SVN: r234404
2016-03-22 14:25:44 +00:00
David Malcolm
5c240f4db3 PR c/69993: improvements to wording of -Wmisleading-indentation
gcc/c-family/ChangeLog:
	PR c/69993
	* c-indentation.c (warn_for_misleading_indentation): Rewrite the
	diagnostic text, reversing the order of the warning and note so
	that they appear in source order.

gcc/testsuite/ChangeLog:
	PR c/69993
	* c-c++-common/Wmisleading-indentation-3.c: New test, based on
	Wmisleading-indentation.c.
	* c-c++-common/Wmisleading-indentation.c: Update thoughout to
	reflect change to diagnostic text and order of messages.
	* gcc.dg/plugin/location-overflow-test-2.c: Likewise.

From-SVN: r234403
2016-03-22 14:20:49 +00:00
David Edelsohn
80f6631ba0 * g++.dg/ext/java-3.C: Don't compile on AIX.
From-SVN: r234402
2016-03-22 09:46:09 -04:00
Richard Biener
9a10956c4b re PR target/70333 (Test miscompiled with -O0.)
2016-03-22  Richard Biener  <rguenther@suse.de>

	PR middle-end/70333
	* fold-const.c (extract_muldiv_1): Properly perform multiplication
	in the wide type.

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

From-SVN: r234401
2016-03-22 13:23:00 +00:00
Kirill Yukhin
380d99c9aa Remove duplicated AVX-512VL bit check.
gcc/
	* config/i386/i386.c (def_builtin): Remove duplicated functionality.

From-SVN: r234400
2016-03-22 13:17:11 +00:00
Ilya Enkovich
6cedf92249 re PR target/70290 (-mavx512vl breaks parsing of C++ vector condition)
gcc/cp/

	PR target/70290
	* call.c (build_conditional_expr_1): Always use original
	condition type for vector type checks and build.

gcc/testsuite/

	PR target/70290
	* g++.dg/ext/pr70290.C: New test.

From-SVN: r234399
2016-03-22 12:31:12 +00:00
Martin Liska
7d36fe985c Fix ChangeLog entries for PR ipa/70306
From-SVN: r234398
2016-03-22 11:31:53 +00:00
Kirill Yukhin
cd6c27ac21 re PR target/70325 (ICE on __builtin_ia32_storedquqi256_mask)
PR target/70325
gcc/
	* config/i386/i386.c (def_builtin): Handle
	OPTION_MASK_ISA_AVX512VL to be and-ed with other
	bits.
	(const struct builtin_description bdesc_special_args[]):
	Remove duplicate ISA bits.
gcc/testsuite/
	* gcc.target/i386/pr70325.c: New test.

From-SVN: r234395
2016-03-22 11:09:03 +00:00
Jakub Jelinek
b01915ed16 re PR target/70329 (wrong code with -mavx512bw and 64byte vectors)
PR target/70329
	* config/i386/i386.c (ix86_expand_vecop_qihi): Don't bother computing
	d.perm[i] for i >= d.nelt.  If not full_interleave, compute d.perm[i]
	in a way that works also for AVX512BW.

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

From-SVN: r234394
2016-03-22 09:28:49 +01:00
Jakub Jelinek
4e3e2cf17d re PR target/70300 (ICE: in extract_constrain_insn, at recog.c:2190 (insn does not satisfy its constraints) with -mtune=amdfam10 -mavx512bw)
PR target/70300
	* config/i386/i386.md (cvtsd2ss splitter): Unpack in destination
	instead of source if operands[1] is xmm16 and above and
	!TARGET_AVX512VL.  Use avx512f_vec_dupv16sf_1 instead of
	vec_interleave_lowv4sf if we need to unpack xmm16 and above.

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

From-SVN: r234393
2016-03-22 09:14:24 +01:00
Jakub Jelinek
4cde512c84 re PR c++/70295 (bogus -Wnonnull-compare for "dynamic_cast<const FuSelection *>(this) != nullptr")
PR c++/70295
	* gimplify.c (gimplify_modify_expr): Call gimple_set_no_warning
	on assign if (*from_p) is a comparison, set it to
	TREE_NO_WARNING (*from_p).

	* c-c++-common/nonnull-1.c (func): Remove parens around cp4 != 0.
	(func2): New function for cond with parens, xfail warning for c++.
	* g++.dg/warn/Wnonnull-compare-8.C: New test.

From-SVN: r234392
2016-03-22 09:11:14 +01:00
Patrick Palka
16f6d7dc5c Fix PR c++/70096 (wrong code for pointer-to-member-function copy)
gcc/cp/ChangeLog:

	PR c++/70096
	* pt.c (tsubst_decl): Clear the DECL_MODE of the new decl.

gcc/testsuite/ChangeLog:

	PR c++/70096
	* g++.dg/template/ptrmem30.C: New test.

From-SVN: r234391
2016-03-22 02:02:01 +00:00
Patrick Palka
a3e2b43831 Fix PR c++/70204 (ICE in non_const_var_error)
gcc/cp/ChangeLog:

	PR c++/70204
	* constexpr.c (non_const_var_error): Check
	DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.

gcc/testsuite/ChangeLog:

	PR c++/70204
	* g++.dg/cpp0x/constexpr-70204a.C: New test.
	* g++.dg/cpp0x/constexpr-70204b.C: New test.

From-SVN: r234390
2016-03-22 00:30:57 +00:00
GCC Administrator
b9bcad15fb Daily bump.
From-SVN: r234389
2016-03-22 00:16:14 +00:00
Richard Henderson
ad77920598 re PR middle-end/70273 (FAIL: g++.dg/ext/label13a.C -std=gnu++98 execution test / scan-assembler _ZN1CC4Ev)
PR c++/70273

  * decl.c (notice_forced_label_r): New.
  (cp_finish_decl): Use it.

From-SVN: r234386
2016-03-21 16:03:56 -07:00
Jason Merrill
683b810150 re PR c++/70285 (ICE on valid code on x86_64-linux-gnu: verify_gimple failed)
PR c++/70285
	* cp-gimplify.c (cp_fold) [COND_EXPR]: Handle bit-fields.

From-SVN: r234384
2016-03-21 17:13:06 -04:00
Jakub Jelinek
11b6a02e91 re PR rtl-optimization/70326 (ICE: RTL check: expected elt 3 type 'e' or 'u', have '0' (rtx note) in PATTERN, at rtl.h:1440)
PR middle-end/70326
	* lra.c (restore_scratches): Ignore deleted insns.

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

From-SVN: r234383
2016-03-21 22:04:32 +01:00
Marc Glisse
b94078834d re PR tree-optimization/70317 (folding x<=x to true for large vectors, ignoring nans)
PR tree-optimization/70317
	* match.pd (cmp @0 @0): Pass @0 instead of TYPE_MODE (TREE_TYPE (@0))
	to HONOR_NANS.

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

Co-Authored-By: Jakub Jelinek <jakub@redhat.com>

From-SVN: r234382
2016-03-21 22:03:44 +01:00
Uros Bizjak
4a148e19be re PR target/70327 (ICE: in extract_insn, at recog.c:2287 (unrecognizable insn) with -mavx512ifma and v4ti argument)
PR target/70327
	* config/i386/i386.md (movxi): Use ix86_expand_vector_move instead
	of ix86_expand_move.
	(movoi): Ditto.
	(movti): Use general_operand for operand 1 predicate.

testsuite/ChangeLog:

	PR target/70327
	* gcc.target/i386/pr70327.c: New test.

From-SVN: r234380
2016-03-21 20:56:50 +01:00