Commit Graph

143540 Commits

Author SHA1 Message Date
Andrew Burgess 8064654176 arc.opt (mdiv-rem): Add period to the end.
2016-01-11  Andrew Burgess  <andrew.burgess@embecosm.com>

        * config/arc/arc.opt (mdiv-rem): Add period to the end.
        (mcode-density): Likewise.

From-SVN: r232207
2016-01-11 04:11:19 +00:00
GCC Administrator fecad594f7 Daily bump.
From-SVN: r232206
2016-01-11 00:16:14 +00:00
Patrick Palka 21efdd809b Fix -Wmisleading indentation false-positive for do-while statement
gcc/c-family/ChangeLog:

	PR c++/69029
	* c-indentation.c (should_warn_for_misleading_indentation):
	Don't warn about do-while statements.

gcc/testsuite/ChangeLog:

	PR c++/69029
	* c-c++-common/Wisleading-indentation.c: Augment test.

From-SVN: r232202
2016-01-10 16:39:39 +00:00
Thomas Koenig fd42eed899 re PR fortran/69154 (ICE in gfc_trans_where_2, at fortran/trans-stmt.c:5005 on *-linux)
2016-01-10  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/69154
	* frontend-passes.c (in_where):  New variable.
	(inline_matmul_assign):  Don't try this if we are within
	a WHERE statement.
	(gfc_code_walker):  Keep track of in_where.

2016-01-10  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/69154
	* gfortran.dg/inline_matmul_12.f90:  New test.

From-SVN: r232201
2016-01-10 13:18:54 +00:00
Paul Thomas 4f90ee6c77 re PR fortran/67779 (Strange ordering with strings in extended object)
2016-01-10  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/67779
	* trans_array.c (gfc_conv_scalarized_array_ref): Add missing
	se->use_offset from condition for calculation of 'base'.

2016-01-10  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/67779
	* gfortran.dg/actual_array_offset_1: New test.

From-SVN: r232200
2016-01-10 12:56:28 +00:00
Tom de Vries 3907c6cf93 Don't parallelize loops containing phis with addr_exprs
2016-01-10  Tom de Vries  <tom@codesourcery.com>

	PR tree-optimization/69062
	* tree-parloops.c (loop_has_phi_with_address_arg): New function.
	(parallelize_loops): Don't paralelize loop that has phi with address
	arg.

	* gcc.dg/autopar/pr69062.c: New test.

From-SVN: r232199
2016-01-10 12:44:57 +00:00
Thomas Schwinge b07b236e84 Fix scan-tree-dump syntax
gcc/testsuite/
	* gcc.dg/vect/slp-perm-1.c: Fix scan-tree-dump syntax.
	* gcc.dg/vect/slp-perm-2.c: Likewise.
	* gcc.dg/vect/slp-perm-3.c: Likewise.
	* gcc.dg/vect/slp-perm-5.c: Likewise.
	* gcc.dg/vect/slp-perm-6.c: Likewise.
	* gcc.dg/vect/slp-perm-7.c: Likewise.
	* gcc.dg/vect/slp-perm-8.c: Likewise.

From-SVN: r232197
2016-01-10 13:12:38 +01:00
Tom de Vries 23fab8aee7 Only allow single exit phi for reduction in try_create_reduction_list
2016-01-10  Tom de Vries  <tom@codesourcery.com>

	PR tree-optimization/69039
	* tree-parloops.c (try_create_reduction_list): Only allow single exit
	phi for reduction.

	* gcc.dg/autopar/pr69039.c: New test.

From-SVN: r232196
2016-01-10 09:12:03 +00:00
GCC Administrator 34b85c6437 Daily bump.
From-SVN: r232194
2016-01-10 00:16:13 +00:00
John David Anglin 5dac7dbda2 re PR middle-end/68743 (FAIL: gfortran.dg/aint_anint_1.f90 -O0 execution test)
PR middle-end/68743
	* match.pd: Require target has function_c99_misc before doing
	truncl(extend(x)) and trunc(extend(x)) -> extend(truncf(x)), etc.

From-SVN: r232191
2016-01-09 18:13:44 +00:00
Gerald Pfeifer 72665d8d49 configure.ac (isl_options_set_schedule_serialize_sccs): Also use GMPINC.
* configure.ac (isl_options_set_schedule_serialize_sccs): Also
	use GMPINC.
	* configure: Regenerate.

From-SVN: r232190
2016-01-09 13:25:22 +00:00
Marek Polacek 73f0dae2a4 re PR c++/69113 (ICE: in vague_linkage_p, at cp/decl2.c:1875 with -fno-weak)
PR c++/69113
	* decl2.c (comdat_linkage): Only set DECL_COMDAT if TREE_PUBLIC is set.

	* g++.dg/pr69113.C: New test.

From-SVN: r232189
2016-01-09 11:15:26 +00:00
Jakub Jelinek 20b8d7342c re PR middle-end/50865 (Invalid code generation for INT64_MIN % 1 on x86_64)
PR middle-end/50865
	PR tree-optimization/69097
	* fold-const.h (expr_not_equal_to): New prototype.
	* fold-const.c: Include stringpool.h and tree-ssanames.h.
	(expr_not_equal_to): New function.
	* match.pd (X % -Y is the same as X % Y): Don't optimize
	unless X is known not to be equal to minimum or Y is known
	not to be equal to -1.
	* tree-vrp.c (simplify_div_or_mod_using_ranges): Add GSI argument.
	fold TRUNC_MOD_EXPR if the second argument is not a power of two.
	(simplify_stmt_using_ranges): Adjust caller.
	(vrp_finalize): Call set_value_range on SSA_NAMEs before calling
	substitute_and_fold.

	* gcc.c-torture/execute/pr50865.c: New test.
	* gcc.c-torture/execute/pr69097-1.c: New test.
	* gcc.c-torture/execute/pr69097-2.c: New test.
	* gcc.dg/pr69097-1.c: New test.
	* gcc.dg/pr69097-2.c: New test.

From-SVN: r232188
2016-01-09 08:37:04 +01:00
Jakub Jelinek c50e614be6 re PR tree-optimization/69164 (ICE in create_tmp_var, at gimple-expr.c:468)
PR c++/69164
	* class.c (layout_class_type): Use copy_node to copy FIELD_DECLs.

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

From-SVN: r232187
2016-01-09 08:34:41 +01:00
Jason Merrill fe71aa4ea5 re PR c++/69158 (ICE in in cxx_eval_indirect_ref, at cp/constexpr.c:2598)
PR c++/69158

	* constexpr.c (cxx_fold_indirect_ref): Handle array type differing
	in completion.

From-SVN: r232186
2016-01-09 00:12:03 -05:00
GCC Administrator 1090913901 Daily bump.
From-SVN: r232184
2016-01-09 00:16:11 +00:00
Jan Hubicka 78fcec3fee ipa-icf.c (sem_item_optimizer::merge_classes): Do not ICE on VAR_DECL w/o DECL_NAME.
* ipa-icf.c (sem_item_optimizer::merge_classes): Do not ICE on VAR_DECL
	w/o DECL_NAME.

From-SVN: r232179
2016-01-08 21:19:04 +00:00
Jakub Jelinek e0237993b6 re PR tree-optimization/69167 (internal compiler error: SSA corruption)
PR tree-optimization/69167
        * gimple-fold.c (replace_stmt_with_simplification): Also punt if
	new SSA_NAME_OCCURS_IN_ABNORMAL_PHI SSA_NAMEs appear in operands of
	ops[0] comparison.
	* gimple-match-head.c (maybe_push_res_to_seq): Likewise.

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

From-SVN: r232178
2016-01-08 21:50:24 +01:00
Marek Polacek bd8f5bb297 re PR c++/68449 (ICE in cxx_eval_constant_expression on atomic_load in C++)
PR c++/68449
	* constexpr.c (cxx_eval_constant_expression): Handle NULL initializer.

	* g++.dg/pr68449.C: New.

From-SVN: r232176
2016-01-08 19:08:37 +00:00
Alan Lawrence bb0f5ca786 [PATCH] Fix PR68707
gcc/:
	* tree-vect-slp.c (vect_analyze_slp_instance): Cancel permuted SLP
	instances that can be handled via vect_load_lanes.

gcc/testsuite/:

	* lib/target-supports.exp (check_effective_target_vect_load_lanes): New.
	* gcc.dg/vect/slp-perm-1.c: Look for vect_load_lanes instead of SLP
	on platforms supporting it.
	* gcc.dg/vect/slp-perm-2.c: Likewise.
	* gcc.dg/vect/slp-perm-3.c: Likewise.
	* gcc.dg/vect/slp-perm-5.c: Likewise.
	* gcc.dg/vect/slp-perm-7.c: Likewise.
	* gcc.dg/vect/slp-perm-8.c: Likewise.
	* gcc.dg/vect/slp-perm-6.c: Look for vect_load_lanes in addition to SLP
	on platforms supporting it.

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

From-SVN: r232174
2016-01-08 18:02:35 +00:00
Uros Bizjak 5c07bed61d symtab.c (symtab_node::equal_address_to): Return -1 instead of 2 if we can't determine address equivalence.
* symtab.c (symtab_node::equal_address_to): Return -1 instead of 2
	if we can't determine address equivalence.
	* alias.c (compare_base_decl): Update for changed return value of
	symtab_node::equal_address_to.

From-SVN: r232172
2016-01-08 17:13:18 +01:00
Jason Merrill 550c5f8a7e constexpr.c (cxx_eval_call_expression): Remove convert_to_void workaround.
* constexpr.c (cxx_eval_call_expression): Remove convert_to_void
	workaround.

From-SVN: r232168
2016-01-08 11:01:17 -05:00
Jason Merrill 451773378f PR c++/68983 (BE)
PR c++/67557
gcc/
	* function.c (assign_temp): Guard against TREE_ADDRESSABLE types here.
	* expr.c (store_field): Not here.
	* tree-cfgcleanup.c (fixup_noreturn_call): Don't clear LHS of a
	call with TREE_ADDRESSABLE type.
	* tree-cfg.c (verify_gimple_call): Adjust.
gcc/cp/
	* cvt.c (convert_to_void): Don't strip a TARGET_EXPR of
	TREE_ADDRESSABLE type.

From-SVN: r232167
2016-01-08 11:01:12 -05:00
Jason Merrill 0795b6f262 PR c++/68983 (FE)
PR c++/67557
	* call.c (unsafe_copy_elision_p): Look through COMPOUND_EXPR.

From-SVN: r232166
2016-01-08 11:01:05 -05:00
Jonathan Wakely 8babc12b22 Use -std option in test for C99 macros in <cmath>
* testsuite/26_numerics/headers/cmath/
	c99_classification_macros_c++.cc: Rename to ...
	* testsuite/26_numerics/headers/cmath/
	c99_classification_macros_c++98.cc: Here and add -std=gnu++98.
	* testsuite/26_numerics/headers/cmath/
	c99_classification_macros_c++0x.cc: Rename to ...
	* testsuite/26_numerics/headers/cmath/
	c99_classification_macros_c++11.cc: Here.

From-SVN: r232165
2016-01-08 14:59:36 +00:00
Olivier Hainque b464ba1051 vxworks.h (VXWORKS_LIBGCC_SPEC): Don't link shared RTPs with libc_internal.
* config/vxworks.h (VXWORKS_LIBGCC_SPEC): Don't link shared RTPs with
	libc_internal.

From-SVN: r232164
2016-01-08 14:34:08 +00:00
Jonathan Wakely 32a8c97f5c Fix PR number in previous commit
From-SVN: r232163
2016-01-08 13:19:25 +00:00
Jonathan Wakely e525d78caa Add missing include for std::__addressof
PR libstdc++/69160
	* include/bits/uses_allocator.h: Add missing include.

From-SVN: r232162
2016-01-08 13:14:01 +00:00
Alan Lawrence b356666905 [PATCH][RS6000] Migrate reduction optabs in paired.md
* gcc.target/rs6000/paired.md (reduc_smax_v2sf): Rename to...
	(reduc_smax_scal_v2sf): ...here, make result SFmode, extract element.
	(reduc_smin_v2sf): Rename to...
	(reduc_smin_scal_v2sf): ...here, make result SFmode, extract element.
	(reduc_splus_v2sf): Rename to...
	(reduc_plus_scal_v2sf): ...here, make result SFmode, extract element.

From-SVN: r232158
2016-01-08 11:15:58 +00:00
Jakub Jelinek 33f0852f54 re PR tree-optimization/69162 (ICE in create_tmp_var, at gimple-expr.c:468)
PR tree-optimization/69162
	* gimplify.c (gimplify_va_arg_expr): Encode original type of
	valist argument in another argument.
	(gimplify_modify_expr): Adjust for the above change.  Cleanup.
	* tree-stdarg.c (expand_ifn_va_arg_1): Use new 3rd argument
	to determine the va_list type, build a MEM_REF instead of
	build_fold_indirect_ref.

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

From-SVN: r232156
2016-01-08 11:14:29 +01:00
Jakub Jelinek 22518428af re PR tree-optimization/69172 (ICE in make_ssa_name_fn, at tree-ssanames.c:266)
PR tree-optimization/69172
	* gimple-fold.c (gimple_fold_builtin_memory_chk): Pass type to
	gimple_build.

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

From-SVN: r232155
2016-01-08 11:13:23 +01:00
Thomas Preud'homme 80e9b3aaac re PR tree-optimization/67781 (wrong code generated on big-endian with -O1 -fexpensive-optimizations)
2016-01-08  Thomas Preud'homme  <thomas.preudhomme@arm.com>

    gcc/
    PR tree-optimization/67781
    * tree-ssa-math-opts.c (find_bswap_or_nop): Zero out bytes in cmpxchg
    and cmpnop in two steps: first the ones not accessed in original
    gimple expression in a endian independent way and then the ones not
    accessed in the final result in an endian-specific way.

    gcc/testsuite/
    PR tree-optimization/67781
    * gcc.c-torture/execute/pr67781.c: New file.

From-SVN: r232154
2016-01-08 09:21:19 +00:00
Jakub Jelinek 262a363ff9 re PR tree-optimization/69083 (ICE at -O3 in 64-bit mode on x86_64-linux-gnu (verify_gimple failed))
PR tree-optimization/69083
	* tree-vect-slp.c (vect_get_constant_vectors): For
	VECTOR_BOOLEAN_TYPE_P assert op is fold_convertible_p to vector_type's
	element type.  If op is fold_convertible_p to vector_type's element
	type, use NOP_EXPR instead of VCE.

	* gcc.dg/vect/pr69083.c: New test.

From-SVN: r232153
2016-01-08 09:37:17 +01:00
Sujoy Saraswati 6e1f093f74 Restrict to linux and gnu targets as not all math.h implementations support the issignaling macro.
Restrict to linux and gnu targets as not all math.h implementations support the
issignaling macro. Use -fexcess-precision=standard for compiler options. Use fabs()
only when  __FLT_EVAL_METHOD__ == 0.

gcc/testsuite/
	* gcc.dg/pr61441.c: Restrict to linux and gnu targets.
	Use -fexcess-precision=standard for compiler options.
	Use fabs() only when  __FLT_EVAL_METHOD__ == 0.

From-SVN: r232152
2016-01-08 08:35:02 +00:00
Jakub Jelinek 57bf30726c re PR fortran/69128 (OpenMP workshare problem with SUM())
PR fortran/69128
	* trans.h (OMPWS_SCALARIZER_BODY): Define.
	(OMPWS_NOWAIT): Renumber.
	* trans-stmt.c (gfc_trans_where_3): Only set OMPWS_SCALARIZER_WS
	if OMPWS_SCALARIZER_BODY is not set already, and set also
	OMPWS_SCALARIZER_BODY until the final loop creation.
	* trans-expr.c (gfc_trans_assignment_1): Likewise.
	* trans-openmp.c (gfc_trans_omp_workshare): Also clear
	OMPWS_SCALARIZER_BODY.
	* trans-array.c (gfc_trans_scalarized_loop_end): Don't create
	OMP_FOR if OMPWS_SCALARIZER_BODY is set.

	* gfortran.dg/gomp/pr69128.f90: New test.

From-SVN: r232151
2016-01-08 07:45:18 +01:00
Jakub Jelinek 53290e072a re PR c++/69145 (Bogus 'warning: #pragma implementation for ‘...’ appears after file is included')
PR c++/69145
	* files.c (cpp_included_before): If IS_ADHOC_LOC (location), lookup
	real location from the line_table.

	* g++.dg/ext/pr69145-1.C: New test.
	* g++.dg/ext/pr69145-2-very-long-filename.cc: New file.
	* g++.dg/ext/pr69145-2.h: New file.

From-SVN: r232150
2016-01-08 07:43:31 +01:00
Segher Boessenkool 52ad5601bf shrink-wrap: Once more PRs 67778, 68634, and now 68909
If a candidate PRE cannot get the prologue because a block BB is
reachable from it, but PRE does not dominate BB, we try again with the
dominators of PRE.  That "try again" needs to again consider BB though,
we aren't done with it.

	PR rtl-optimization/67778
	PR rtl-optimization/68634
	PR rtl-optimization/68909
	* shrink-wrap.c (try_shrink_wrapping): Add comment.  Don't pop
	block from the stack until done with it.  Remove a superfluous
	bitmap set.  Remove a superfluous bitmap test.

From-SVN: r232148
2016-01-08 04:58:40 +01:00
Martin Sebor 7a127fa7c4 PR c/68966 - atomic_fetch_* on atomic_bool not diagnosed
gcc/ChangeLog:
	* doc/extend.texi (__atomic Builtins, __sync Builtins): Document
	constraint on the type of arguments.

gcc/c-family/ChangeLog:
	* c-common.c (sync_resolve_size): Reject first argument when it's
	a pointer to _Bool.

gcc/testsuite/ChangeLog:
	* gcc.dg/atomic-fetch-bool.c: New test.
	* gcc.dg/sync-fetch-bool.c: New test.

From-SVN: r232147
2016-01-07 18:00:25 -07:00
GCC Administrator c9733b8599 Daily bump.
From-SVN: r232146
2016-01-08 00:16:15 +00:00
Mike Frysinger bd12353b79 longlong: fix sh -Wundef builds
This file fails when building for SuperH as it assumes __SHMEDIA__
is always defined.  Update the code to check if it's defined.

From-SVN: r232143
2016-01-07 22:18:09 +00:00
Andreas Tobler 33b0992375 freebsd.h: Rename SUBTARGET_OVERRIDE_OPTIONS to SUBTARGET_OVERRIDE_INTERNAL_OPTIONS.
2016-01-07  Andreas Tobler  <andreast@gcc.gnu.org>

    * config/arm/freebsd.h: Rename SUBTARGET_OVERRIDE_OPTIONS to
    SUBTARGET_OVERRIDE_INTERNAL_OPTIONS. Adjust to check
    unaligned_access on the gcc_options set.
    * config/arm/arm.c (arm_option_override_internal): Use
    SUBTARGET_OVERRIDE_INTERNAL_OPTIONS.

From-SVN: r232141
2016-01-07 21:35:53 +01:00
Uros Bizjak 0de71e1f51 re PR target/69140 (stack alignment + O1 breaks with Microsoft ABI)
2016-01-07  Uros Bizjak  <ubizjak@gmail.com>

	PR target/69140
	* config/i386/i386.c (ix86_frame_pointer_required): Enable
	frame pointer for TARGET_64BIT_MS_ABI when stack is misaligned.

2016-01-07  Uros Bizjak  <ubizjak@gmail.com>

	Revert
	2016-01-06  Uros Bizjak  <ubizjak@gmail.com>

	PR target/69140
	* config/i386/i386.c (ix86_expand_prologue): Declare fs.sp_valid
	depending on frame_pointer_needed before remaining integer and SSE
	registers are saved.

From-SVN: r232140
2016-01-07 20:06:37 +01:00
H.J. Lu 95918b49df Move pr66680.f90 to libgomp
gcc/testsuite/

	PR fortran/66680
	gfortran.dg/gomp/pr66680.f90: Moved to libgomp.

libgomp/

	PR fortran/66680
	* testsuite/libgomp.fortran/pr66680.f90: New test.

From-SVN: r232138
2016-01-07 10:18:29 -08:00
Sandra Loosemore 365db8e0e5 re PR target/1078 (Problems with attributes documentation)
2016-01-07  Sandra Loosemore <sandra@codesourcery.com>

	PR 1078
	gcc/
	* doc/extend.texi (Nvidia PDX Function Attributes): New section.

From-SVN: r232136
2016-01-07 13:02:25 -05:00
Nick Clifton c8e62a9df1 Add a test for PR66655
PR target/66655
	* g++.dg/pr66655.C: New test.
	* g++.dg/pr66655_1.cc: Test support file.
	* g++.dg/pr66655.h: Test header file.

From-SVN: r232133
2016-01-07 17:13:50 +00:00
Jonathan Wakely f885fa898f Use std::addressof in insert iterators, allocators and promises
PR libstdc++/69105
	PR libstdc++/69106
	PR libstdc++/69114
	* include/bits/stl_iterator.h (back_insert_iterator,
	front_insert_iterator, insert_iterator): Use __addressof (LWG 2324).
	* include/bits/uses_allocator.h (__use_alloc): Use __addressof.
	* include/std/future (__future::base::_State_baseV2::__setter):
	Likewise.
	* include/std/scoped_allocator (__outermost): Likewise.
	* testsuite/20_util/scoped_allocator/69114.cc: New.
	* testsuite/20_util/uses_allocator/69114.cc: New.
	* testsuite/30_threads/promise/69106.cc: New.

From-SVN: r232129
2016-01-07 15:01:33 +00:00
Dominique d'Humieres 64d3ef31df re PR fortran/66680 (ICE with openmp, a loop and a type bound procedure)
2016-01-07  Dominique d'Humieres <dominiq@lps.ens.fr>

	PR fortran/66680
	gfortran.dg/gomp/pr66680.f90: New test.

From-SVN: r232127
2016-01-07 14:21:54 +01:00
H.J. Lu 4cd9ca92cf Add round_nimm_scalar_predicate and use xBm
Add round_nimm_scalar_predicate for scalar SSE integer to floating point
conversions since round_nimm_predicate is for vector operand.

round_constraint can't be used on vector SSE patterns since it is mapped
to "vm".  The "xBm" constraint must be used in this case.

gcc/

	PR target/69171
	* config/i386/sse.md (<sse>_sqrt<mode>2<mask_name><round_name>):
	Use the "xBm" constraint.
	(float<sseintvecmodelower><mode>2<mask_name><round_name):
	Likewise.
	(sse_cvtsi2ss<round_name>): Use round_nimm_scalar_predicate.
	(sse_cvtsi2ssq<round_name>): Likewise.
	(sse_cvtss2si<round_name>): Likewise.
	(sse_cvtss2siq<round_name>): Likewise.
	(sse2_cvtsi2sdq<round_name>): Likewise.
	(sse2_cvtsd2si<round_name>): Likewise.
	(sse2_cvtsd2siq<round_name>): Likewise.
	* config/i386/subst.md (round_nimm_scalar_predicate): New
	predicate.

gcc/testsuite/

	PR target/69171
	* gcc.target/i386/pr69171-1.c: New test.
	* gcc.target/i386/pr69171-2.c: Likewise.
	* gcc.target/i386/pr69171-3.c: Likewise.
	* gcc.target/i386/pr69171-4.c: Likewise.
	* gcc.target/i386/pr69171-5.c: Likewise.
	* gcc.target/i386/pr69171-6.c: Likewise.

From-SVN: r232126
2016-01-07 04:43:06 -08:00
Bernd Schmidt 7e33d4dc9e Fix SSA inconsistencies with invalid asm reg names (PR67639)
PR middle-end/67639
	* varasm.c (make_decl_rtl): Mark invalid register vars as
	DECL_EXTERNAL.

testsuite/
	PR middle-end/67639
	* c-c++-common/pr67639.c: New test.

From-SVN: r232125
2016-01-07 12:17:39 +00:00
Bernd Schmidt c6a0add9d0 Fix a minor issue found by a static analyzer (PR66206).
PR rtl-optimization/66206
	* bt-load.c (find_btr_use): Change first arg to be a pointer to an rtx.
	All callers changed.

From-SVN: r232124
2016-01-07 12:15:59 +00:00