Commit Graph

155648 Commits

Author SHA1 Message Date
Will Schmidt
3d9a180f7d fold-vec-msum-char.c: New.
[gcc/testsuite]

2017-08-09  Will Schmidt  <will_schmidt@vnet.ibm.com>

	* gcc.target/powerpc/fold-vec-msum-char.c: New.
	* gcc.target/powerpc/fold-vec-msum-short.c: New.

From-SVN: r250997
2017-08-09 19:06:35 +00:00
Will Schmidt
ee9a9e7b21 fold-vec-madd-double.c: New.
[gcc/testsuite]

2017-08-09  Will Schmidt  <will_schmidt@vnet.ibm.com>

	* gcc.target/powerpc/fold-vec-madd-double.c: New.
	* gcc.target/powerpc/fold-vec-madd-float.c: New.
	* gcc.target/powerpc/fold-vec-madd-short.c: New.

From-SVN: r250996
2017-08-09 19:02:41 +00:00
Will Schmidt
07999eb2b1 fold-vec-cntlz-int.c: New.
2017-08-09  Will Schmidt  <will_schmidt@vnet.ibm.com>

	* gcc.target/powerpc/fold-vec-cntlz-int.c: New.
	* gcc.target/powerpc/fold-vec-cntlz-char.c: New.
	* gcc.target/powerpc/fold-vec-cntlz-short.c: New.
	* gcc.target/powerpc/fold-vec-cntlz-longlong.c: New.

From-SVN: r250995
2017-08-09 18:58:37 +00:00
Jason Merrill
9fb82e652c PR c++/81359 - Unparsed NSDMI error from SFINAE context.
* init.c (get_nsdmi): Add complain parm.
	* typeck2.c (digest_nsdmi_init): Add complain parm.
	(process_init_constructor_record): Pass complain to get_nsdmi.
	* pt.c (maybe_instantiate_noexcept): Add complain parm, return bool.
	* method.c (get_defaulted_eh_spec): Add complain parm.  Pass it into
	synthesized_method_walk.
	(synthesized_method_walk): Adjust.
	(walk_field_subobs): Pass complain to get_nsdmi.
	(defaulted_late_check): Skip other checks if deleted.
	* decl2.c (mark_used): Pass complain to maybe_instantiate_noexcept.
	* call.c (build_aggr_conv): Pass complain to get_nsdmi.
	* parser.c (defarg_location): New.
	* error.c (location_of): Use it.

From-SVN: r250994
2017-08-09 14:32:02 -04:00
Jonathan Wakely
04d07b61cb PR libstdc++/81751 don't call fflush(NULL)
PR libstdc++/79820
	PR libstdc++/81751
	* config/io/basic_file_stdio.cc (sys_open(FILE*, ios_base::openmode)):
	Call fflush on the stream instead of calling sync() while _M_cfile is
	null. Restore original value of errno.
	* testsuite/ext/stdio_filebuf/char/79820.cc: New.
	* testsuite/ext/stdio_filebuf/char/81751.cc: New.

From-SVN: r250993
2017-08-09 18:52:10 +01:00
Ian Lance Taylor
a171ac0380 compiler: handle >32bit exponent in Ldexp
Libgo's implementation of math.Ldexp declared the libc "ldexp" as
    taking an 'int' exponent argument, which is not quite right for 64-bit
    platforms (exp arg is always int32); this could yield incorrect
    results for exponent values outside the range of Minint32/Maxint32.
    Fix by upating the type for the libc version of ldexp, and adding
    guards to screen for out-of-range exponents.
    
    Fixes #21323.
    
    Reviewed-on: https://go-review.googlesource.com/54250

From-SVN: r250992
2017-08-09 17:15:02 +00:00
Slava Barinov
0ca970cd53 * g++.dg/asan/asan.exp: Switch on *.cc tests.
From-SVN: r250991
2017-08-09 10:26:58 -06:00
Marek Polacek
30af3a2bbd Boolify some parameters.
From-SVN: r250986
2017-08-09 12:34:36 +00:00
Marek Polacek
296c53ac8a re PR c/81233 (--Wdiscarded-qualifiers and Wincompatible-pointer-types missing important detail)
PR c/81233
	* c-typeck.c (pedwarn_init): Make the function take a variable list.
	Call emit_diagnostic_valist instead of pedwarn.
	(convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
	Print the relevant types in diagnostics.

	* diagnostic-core.h (emit_diagnostic_valist): Add declaration.
	* diagnostic.c (emit_diagnostic): Add a comment.
	(emit_diagnostic_valist): New function.

	* gcc.dg/diagnostic-types-1.c: New test.
	* gcc.dg/assign-warn-1.c: Update warning messages.
	* gcc.dg/assign-warn-2.c: Likewise.
	* gcc.dg/c90-const-expr-5.c: Likewise.
	* gcc.dg/c99-const-expr-5.c: Likewise.
	* gcc.dg/conv-2.c: Likewise.
	* gcc.dg/init-bad-7.c: Likewise.
	* gcc.dg/overflow-warn-1.c: Likewise.
	* gcc.dg/overflow-warn-2.c: Likewise.
	* gcc.dg/overflow-warn-3.c: Likewise.
	* gcc.dg/overflow-warn-4.c: Likewise.
	* gcc.dg/pointer-array-atomic.c: Likewise.
	* gcc.dg/pr26865.c: Likewise.
	* gcc.dg/pr61162-2.c: Likewise.
	* gcc.dg/pr61162.c: Likewise.
	* gcc.dg/pr67730-2.c: Likewise.
	* gcc.dg/pr69156.c: Likewise.
	* gcc.dg/pr70174.c: Likewise.
	* objc.dg/proto-lossage-4.m: Likewise.

From-SVN: r250985
2017-08-09 11:28:22 +00:00
Marek Polacek
a32c8316ff re PR c/81417 (-Wsign-compare should print types being compared)
PR c/81417
	* c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
	build_conditional_expr.	
	* c-parser.c (c_parser_conditional_expression): Create locations for
	EXP1 and EXP2 from their source ranges.  Pass the locations down to
	build_conditional_expr.
	* c-tree.h (build_conditional_expr): Update declaration.
	* c-typeck.c (build_conditional_expr): Add location_t parameters.
	For -Wsign-compare, also print the types.

	* input.c (make_location): New overload.
	* input.h (make_location): Declare.

	* objc-next-runtime-abi-02.c (build_v2_build_objc_method_call): Update
	a call to build_conditional_expr.

	* Wsign-compare-1.c: New test.
	* gcc.dg/compare1.c: Adjust dg-bogus.
	* gcc.dg/compare2.c: Likewise.
	* gcc.dg/compare3.c: Likewise.
	* gcc.dg/compare7.c: Likewise.
	* gcc.dg/compare8.c: Likewise.
	* gcc.dg/compare9.c: Likewise.
	* gcc.dg/pr11492.c: Likewise.

From-SVN: r250984
2017-08-09 08:51:20 +00:00
GCC Administrator
bc47a525cb Daily bump.
From-SVN: r250983
2017-08-09 00:16:27 +00:00
H.J. Lu
7345b71400 PR driver/81523: Make -static override -pie
-static and -pie together behave differently depending on whether GCC is
configured with --enable-default-pie.  On x86, "-static -pie" fails to
create executable when --enable-default-pie isn't used, but creates a
static executable when --enable-default-pie is used.  This patch makes
-static completely override -pie to create a static executable, regardless
if --enable-default-pie is used to configure GCC.

gcc/

	PR driver/81523
	* gcc.c (NO_PIE_SPEC): Delete.
	(PIE_SPEC): Define as !no-pie/pie.  Move static|shared|r
	exclusion..
	(LINK_PIE_SPEC): ..to here.
	(LINK_COMMAND_SPEC): Support -no-pie.
	* config/gnu-user.h (GNU_USER_TARGET_STARTFILE_SPEC): Correct
	chain of crtbegin*.o selection, update for PIE_SPEC changes and
	format.
	(GNU_USER_TARGET_ENDFILE_SPEC): Similarly.
	* config/sol2.h (STARTFILE_CRTBEGIN_SPEC): Similarly.
	(ENDFILE_CRTEND_SPEC): Similarly.

gcc/testsuite/

	PR driver/81523
	* gcc.dg/pie-7.c: New test.
	* gcc.dg/pie-static-1.c: Likewise.
	* gcc.dg/pie-static-2.c: Likewise.

From-SVN: r250974
2017-08-08 15:06:21 -07:00
Uros Bizjak
d5bf81b30f re PR target/81708 (The x86 stack canary location should be customizable)
PR target/81708
	* config/i386/i386.opt (mstack-protector-guard-reg=): New option
	(mstack-protector-guard-offset=): Ditto.
	* config/i386/i386.c (ix86_option_override): Handle
	-mstack-protector-guard-reg= and -mstack-protector-guard-offset=
	options.
	(ix86_stack_protect_guard): Use ix86_stack_protect_guard_reg and
	ix86_stack_protect_guard_offset variables.
	(TARGET_STACK_PROTECT_GUARD): Always define.
	* doc/invoke.texi (x86 Options): Document -mstack-protector-guard-reg=
	and -mstack-protector-guard-offset= options.

testsuite/ChangeLog:

	PR target/81708
	* gcc.target/i386/stack-prot-guard.c: New test.

From-SVN: r250965
2017-08-08 18:48:46 +02:00
Bin Cheng
7d27b70bd8 tree-ssa-loop-ivopts.c (relate_compare_use_with_all_cands): Handle boundary case for the last candidate.
* tree-ssa-loop-ivopts.c (relate_compare_use_with_all_cands): Handle
	boundary case for the last candidate.

From-SVN: r250960
2017-08-08 14:52:25 +00:00
Bin Cheng
5a11566178 invoke.texi: Document -ftree-loop-distribution for O3.
* doc/invoke.texi: Document -ftree-loop-distribution for O3.
	* opts.c (default_options_table): Add OPT_ftree_loop_distribution.

From-SVN: r250959
2017-08-08 14:09:10 +00:00
Tamar Christina
4261463d96 re PR middle-end/19706 (Recognize common Fortran usages of copysign.)
2017-08-08  Tamar Christina  <tamar.christina@arm.com>

	PR middle-end/19706
	* config/aarch64/aarch64.md (xorsign<mode>3): New optabs.
	* config/aarch64/aarch64-builtins.c
	(aarch64_builtin_vectorized_function): Added CASE_CFN_XORSIGN.
	* config/aarch64/aarch64-simd-builtins.def: Added xorsign BINOP.
	* config/aarch64/aarch64-simd.md: Added xorsign<mode>3.

gcc/testsuite/
2017-08-08  Tamar Christina  <tamar.christina@arm.com>

	* gcc.target/aarch64/xorsign.c: New.
	* gcc.target/aarch64/xorsign_exec.c: New.
	* gcc.target/aarch64/vect-xorsign_exec.c: New.

From-SVN: r250957
2017-08-08 13:17:41 +00:00
Tamar Christina
336a06a163 re PR middle-end/19706 (Recognize common Fortran usages of copysign.)
2017-08-08  Tamar Christina  <tamar.christina@arm.com>
	    Andrew Pinski <pinskia@gmail.com>

	PR middle-end/19706
	* internal-fn.def (XORSIGN): New.
	* optabs.def (xorsign_optab): New.
	* tree-ssa-math-opts.c (is_copysign_call_with_1): New.
	(convert_expand_mult_copysign): New.
	(pass_optimize_widening_mul::execute): Call convert_expand_mult_copysign.


Co-Authored-By: Andrew Pinski <pinskia@gmail.com>

From-SVN: r250956
2017-08-08 13:15:44 +00:00
Bill Schmidt
b115e80367 re PR tree-optimization/81354 (Segmentation fault in SSA Strength Reduction using -O3)
[gcc]

2017-08-08  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

	PR tree-optimization/81354
	* gimple-ssa-strength-reduction.c (create_add_on_incoming_edge):
	Insert on edges rather than explicitly creating landing pads.
	(analyze_candidates_and_replace): Commit edge inserts.


[gcc/testsuite]

2017-08-08  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

	PR tree-optimization/81354
	* g++.dg/torture/pr81354.C: New file.

From-SVN: r250955
2017-08-08 12:52:22 +00:00
Richard Biener
51bd28edcb re PR middle-end/81719 (Range-based for loop on short fixed size array generates long unrolled loop)
2017-08-08  Richard Biener  <rguenther@suse.de>

	PR middle-end/81719
	* tree-ssa-loop-niter.c: Include tree-dfa.h.
	(expand_simple_operations): Also look through ADDR_EXPRs with
	MEM_REF bases treating them as POINTER_PLUS_EXPR.

	* g++.dg/tree-ssa/pr81719.C: New testcase.

From-SVN: r250954
2017-08-08 12:51:20 +00:00
Richard Biener
26d66f28fd re PR tree-optimization/81723 (fortran build doesn't terminate on 64bit targets)
2017-08-08  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/81723
	* tree-vect-slp.c (struct bst_traits): New hash traits.
	(bst_fail): New global.
	(vect_build_slp_tree_2): New worker, split out from ...
	(vect_build_slp_tree): ... this now wrapping it with using
	bst_fail set to cache SLP tree build fails.  Properly handle
	max_tree_size.
	(vect_analyze_slp_instance): Allocate and free bst_fail.

	* gfortran.dg/pr81723.f: New testcase.

From-SVN: r250953
2017-08-08 12:49:39 +00:00
Bill Schmidt
82c0d3ebe6 scalar-extract-exp-2.c: Adjust diagnostic string.
2017-08-08  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

	* gcc.target/powerpc/bfp/scalar-extract-exp-2.c: Adjust diagnostic
	string.
	* gcc.target/powerpc/bfp/scalar-extract-exp-5.c: Likewise.
	* gcc.target/powerpc/bfp/scalar-extract-sig-2.c: Likewise.
	* gcc.target/powerpc/bfp/scalar-extract-sig-5.c: Likewise.
	* gcc.target/powerpc/bfp/scalar-insert-exp-11.c: Likewise.
	* gcc.target/powerpc/bfp/scalar-insert-exp-2.c: Likewise.
	* gcc.target/powerpc/bfp/scalar-insert-exp-5.c: Likewise.
	* gcc.target/powerpc/bfp/scalar-insert-exp-8.c: Likewise.
	* gcc.target/powerpc/byte-in-set-2.c: Likewise.
	* gcc.target/powerpc/cmpb-3.c: Likewise.
	* gcc.target/powerpc/vsu/vec-xl-len-13.c: Likewise.
	* gcc.target/powerpc/vsu/vec-xst-len-13.c: Likewise.

From-SVN: r250952
2017-08-08 12:46:08 +00:00
Martin Liska
d81e058f5e ICF: properly handle LABEL_DECLs (PR tree-opt/81696).
2017-08-08  Martin Liska  <mliska@suse.cz>

	PR tree-opt/81696
	* ipa-icf-gimple.c (func_checker::compare_cst_or_decl): Consider
	LABEL_DECLs that can be from a different function.
2017-08-08  Martin Liska  <mliska@suse.cz>

	PR tree-opt/81696
	* gcc.dg/ipa/pr81696.c: New test.

From-SVN: r250951
2017-08-08 11:59:23 +00:00
Bin Cheng
a5c93f5387 re PR tree-optimization/81744 (ICE: verify_ssa failed, at tree-ssa.c:1186)
PR tree-optimization/81744
	* tree-predcom.c (prepare_finalizers_chain): Deep copy expr of
	loop's number of iterations.

	gcc/testsuite
	* gcc.dg/tree-ssa/pr81744.c: New.

From-SVN: r250950
2017-08-08 11:32:05 +00:00
Tom de Vries
eac3ab4aa4 Add missing include of attribs.h in lto.c
2017-08-08  Tom de Vries  <tom@codesourcery.com>

	* lto.c: Include attribs.h.

From-SVN: r250949
2017-08-08 10:40:42 +00:00
Marek Polacek
a5afbdd655 re PR c++/81607 (Conditional operator: "type mismatch in shift expression" error)
PR c++/81607
	* cp-gimplify.c (cp_fold): If folding exposed a branch of
	a COND_EXPR, convert it to the original type of the COND_EXPR, if
	they differ.		   

	* g++.dg/other/bitfield6.C: New test.

From-SVN: r250948
2017-08-08 08:55:43 +00:00
Martin Liska
314e635204 trans.c: Include header files.
.
2017-08-08  Martin Liska  <mliska@suse.cz>

	* gcc-interface/trans.c: Include header files.
2017-08-08  Martin Liska  <mliska@suse.cz>

	* objc-gnu-runtime-abi-01.c: Include header files.
	* objc-next-runtime-abi-01.c: Likewise.
	* objc-next-runtime-abi-02.c: Likewise.
2017-08-08  Martin Liska  <mliska@suse.cz>

	* asan.c: Include header files.
	* attribs.c (build_decl_attribute_variant): New function moved
	from tree.[ch].
	(build_type_attribute_qual_variant): Likewise.
	(cmp_attrib_identifiers): Likewise.
	(simple_cst_list_equal): Likewise.
	(omp_declare_simd_clauses_equal): Likewise.
	(attribute_value_equal): Likewise.
	(comp_type_attributes): Likewise.
	(build_type_attribute_variant): Likewise.
	(lookup_ident_attribute): Likewise.
	(remove_attribute): Likewise.
	(merge_attributes): Likewise.
	(merge_type_attributes): Likewise.
	(merge_decl_attributes): Likewise.
	(merge_dllimport_decl_attributes): Likewise.
	(handle_dll_attribute): Likewise.
	(attribute_list_equal): Likewise.
	(attribute_list_contained): Likewise.
	* attribs.h (lookup_attribute): New function moved from tree.[ch].
	(lookup_attribute_by_prefix): Likewise.
	* bb-reorder.c: Include header files.
	* builtins.c: Likewise.
	* calls.c: Likewise.
	* cfgexpand.c: Likewise.
	* cgraph.c: Likewise.
	* cgraphunit.c: Likewise.
	* convert.c: Likewise.
	* dwarf2out.c: Likewise.
	* final.c: Likewise.
	* fold-const.c: Likewise.
	* function.c: Likewise.
	* gimple-expr.c: Likewise.
	* gimple-fold.c: Likewise.
	* gimple-pretty-print.c: Likewise.
	* gimple.c: Likewise.
	* gimplify.c: Likewise.
	* hsa-common.c: Likewise.
	* hsa-gen.c: Likewise.
	* internal-fn.c: Likewise.
	* ipa-chkp.c: Likewise.
	* ipa-cp.c: Likewise.
	* ipa-devirt.c: Likewise.
	* ipa-fnsummary.c: Likewise.
	* ipa-inline.c: Likewise.
	* ipa-visibility.c: Likewise.
	* ipa.c: Likewise.
	* lto-cgraph.c: Likewise.
	* omp-expand.c: Likewise.
	* omp-general.c: Likewise.
	* omp-low.c: Likewise.
	* omp-offload.c: Likewise.
	* omp-simd-clone.c: Likewise.
	* opts-global.c: Likewise.
	* passes.c: Likewise.
	* predict.c: Likewise.
	* sancov.c: Likewise.
	* sanopt.c: Likewise.
	* symtab.c: Likewise.
	* toplev.c: Likewise.
	* trans-mem.c: Likewise.
	* tree-chkp.c: Likewise.
	* tree-eh.c: Likewise.
	* tree-into-ssa.c: Likewise.
	* tree-object-size.c: Likewise.
	* tree-parloops.c: Likewise.
	* tree-profile.c: Likewise.
	* tree-ssa-ccp.c: Likewise.
	* tree-ssa-live.c: Likewise.
	* tree-ssa-loop.c: Likewise.
	* tree-ssa-sccvn.c: Likewise.
	* tree-ssa-structalias.c: Likewise.
	* tree-ssa.c: Likewise.
	* tree-streamer-in.c: Likewise.
	* tree-vectorizer.c: Likewise.
	* tree-vrp.c: Likewise.
	* tsan.c: Likewise.
	* ubsan.c: Likewise.
	* varasm.c: Likewise.
	* varpool.c: Likewise.
	* tree.c: Remove functions moved to attribs.[ch].
	* tree.h: Likewise.
	* config/aarch64/aarch64.c: Add attrs.h header file.
	* config/alpha/alpha.c: Likewise.
	* config/arc/arc.c: Likewise.
	* config/arm/arm.c: Likewise.
	* config/avr/avr.c: Likewise.
	* config/bfin/bfin.c: Likewise.
	* config/c6x/c6x.c: Likewise.
	* config/cr16/cr16.c: Likewise.
	* config/cris/cris.c: Likewise.
	* config/darwin.c: Likewise.
	* config/epiphany/epiphany.c: Likewise.
	* config/fr30/fr30.c: Likewise.
	* config/frv/frv.c: Likewise.
	* config/ft32/ft32.c: Likewise.
	* config/h8300/h8300.c: Likewise.
	* config/i386/winnt.c: Likewise.
	* config/ia64/ia64.c: Likewise.
	* config/iq2000/iq2000.c: Likewise.
	* config/lm32/lm32.c: Likewise.
	* config/m32c/m32c.c: Likewise.
	* config/m32r/m32r.c: Likewise.
	* config/m68k/m68k.c: Likewise.
	* config/mcore/mcore.c: Likewise.
	* config/microblaze/microblaze.c: Likewise.
	* config/mips/mips.c: Likewise.
	* config/mmix/mmix.c: Likewise.
	* config/mn10300/mn10300.c: Likewise.
	* config/moxie/moxie.c: Likewise.
	* config/msp430/msp430.c: Likewise.
	* config/nds32/nds32-isr.c: Likewise.
	* config/nds32/nds32.c: Likewise.
	* config/nios2/nios2.c: Likewise.
	* config/nvptx/nvptx.c: Likewise.
	* config/pa/pa.c: Likewise.
	* config/pdp11/pdp11.c: Likewise.
	* config/powerpcspe/powerpcspe.c: Likewise.
	* config/riscv/riscv.c: Likewise.
	* config/rl78/rl78.c: Likewise.
	* config/rx/rx.c: Likewise.
	* config/s390/s390.c: Likewise.
	* config/sh/sh.c: Likewise.
	* config/sol2.c: Likewise.
	* config/sparc/sparc.c: Likewise.
	* config/spu/spu.c: Likewise.
	* config/stormy16/stormy16.c: Likewise.
	* config/tilegx/tilegx.c: Likewise.
	* config/tilepro/tilepro.c: Likewise.
	* config/v850/v850.c: Likewise.
	* config/vax/vax.c: Likewise.
	* config/visium/visium.c: Likewise.
	* config/xtensa/xtensa.c: Likewise.
2017-08-08  Martin Liska  <mliska@suse.cz>

	* call.c: Include header files.
	* cp-gimplify.c: Likewise.
	* cp-ubsan.c: Likewise.
	* cvt.c: Likewise.
	* init.c: Likewise.
	* search.c: Likewise.
	* semantics.c: Likewise.
	* typeck.c: Likewise.
2017-08-08  Martin Liska  <mliska@suse.cz>

	* lto-lang.c: Include header files.
	* lto-symtab.c: Likewise.
2017-08-08  Martin Liska  <mliska@suse.cz>

	* c-convert.c: Include header files.
	* c-typeck.c: Likewise.
2017-08-08  Martin Liska  <mliska@suse.cz>

	* c-ada-spec.c: Include header files.
	* c-ubsan.c: Likewise.
	* c-warn.c: Likewise.
2017-08-08  Martin Liska  <mliska@suse.cz>

	* trans-types.c: Include header files.

From-SVN: r250946
2017-08-08 04:46:51 +00:00
GCC Administrator
082adc1e43 Daily bump.
From-SVN: r250940
2017-08-08 00:16:19 +00:00
Michael Meissner
08c4c51e36 re PR target/81593 (Optimize PowerPC vector set from vector extract)
[gcc]
2017-08-07  Michael Meissner  <meissner@linux.vnet.ibm.com>

	PR target/81593
	* config/rs6000/vsx.md (vsx_concat_<mode>, VSX_D): Cleanup
	constraints since the -mupper-regs-* switches have been
	eliminated.
	(vsx_concat_<mode>_1): New combiner insns to recognize inserting
	into a vector from a double word element that was extracted from
	another vector, and eliminate extra XXPERMDI instructions.
	(vsx_concat_<mode>_2): Likewise.
	(vsx_concat_<mode>_3): Likewise.
	(vsx_set_<mode>, VSX_D): Rewrite vector set in terms of vector
	concat to allow optimizing inserts from previous extracts.

[gcc/testsuite]
2017-08-07  Michael Meissner  <meissner@linux.vnet.ibm.com>

	PR target/81593
	* gcc.target/powerpc/vec-setup.h: New tests to test various
	combinations of setting up vectors of 2 double word elements.
	* gcc.target/powerpc/vec-setup-long.c: Likewise.
	* gcc.target/powerpc/vec-setup-double.c: Likewise.
	* gcc.target/powerpc/vec-setup-be-long.c: Likewise.
	* gcc.target/powerpc/vec-setup-be-double.c: Likewise.
	* gcc.target/powerpc/vsx-extract-6.c: New tests for optimzing
	vector inserts from vector extracts.
	* gcc.target/powerpc/vsx-extract-7.c: Likewise.

From-SVN: r250936
2017-08-07 23:51:27 +00:00
Uros Bizjak
1abeb09f83 i386.c (ix86_stack_protect_guard): Generate memory reference to a SSP offset in TLS address space.
* config/i386/i386.c (ix86_stack_protect_guard): Generate
	memory reference to a SSP offset in TLS address space.
	(ix86_print_operand) <case '@'>: Remove.
	(ix86_print_operand_punct_valid_p): Remove '@' code.
	* config/i386/i386.md (unspec): Remove UNSPEC_SP_TLS_SET and
	UNSPEC_SP_TLS_TEST.
	(stack_tls_protect_set_<mode>): Remove.
	(stack_protect_set): Do not call gen_stack_tls_protect_set_<mode>.
	(stack_tls_protect_test_<mode>): Remove.
	(stack_protect_test): Do not call gen_stack_tls_protect_test_<mode>.

From-SVN: r250932
2017-08-07 22:35:00 +02:00
Olivier Hainque
0cbfcdf46f Olivier Hainque <hainque@adacore.com>
PR target/81755
	* config/vxworksae.h (VXWORKS_HAVE_TLS): Define.

From-SVN: r250931
2017-08-07 20:13:53 +00:00
Doug Rupp
664650989a Makefile.in (install-mkheaders): Fix typo, where the multi_dir variable was referenced as multidir in command.
2017-08-07  Douglas Rupp  <rupp@adacore.com>

	* Makefile.in (install-mkheaders): Fix typo, where the multi_dir
	variable was referenced as multidir in command.

From-SVN: r250930
2017-08-07 19:55:55 +00:00
Jakub Jelinek
56b5041c02 re PR c/69389 (bit field incompatible with OpenMP atomic update)
PR c/69389
	* gimplify.c (goa_stabilize_expr): Handle BIT_INSERT_EXPR and
	BIT_FIELD_REF.

	* c-omp.c (c_finish_omp_atomic): Handle atomics on bitfields.

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

From-SVN: r250929
2017-08-07 20:34:29 +02:00
Martin Liska
2643d17f5a Add missing header file attribs.h to couple of targets.
2017-08-07  Martin Liska  <mliska@suse.cz>

	* config/m32c/m32c.c: Add include of stringpool.h and attribs.h.
	* config/rl78/rl78.c: Add include of attribs.h.
	* config/sh/sh.c: Likewise.
	* config/v850/v850.c: Likewise.

From-SVN: r250926
2017-08-07 17:12:52 +00:00
Tom de Vries
f4c222c035 Fix diff_type in expand_oacc_for char iter_type
2017-08-07  Tom de Vries  <tom@codesourcery.com>

	PR middle-end/78266
	* omp-expand.c (expand_oacc_for): Ensure diff_type is large enough.

	* testsuite/libgomp.oacc-c-c++-common/vprop-2.c: New test.
	* testsuite/libgomp.oacc-c-c++-common/vprop.c: Remove xfail.

From-SVN: r250925
2017-08-07 17:06:11 +00:00
Martin Liska
58fccd6c21 Fix missing include of header file in mips.c.
2017-08-07  Martin Liska  <mliska@suse.cz>

	* config/mips/mips.c: Include attribs.h.

From-SVN: r250924
2017-08-07 16:47:56 +00:00
Thomas Koenig
950a884bcb re PR fortran/68829 (Segfaults with -Ofast due to large array on stack)
2017-08-07  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/68829
	* doc/invoke.texi: Document change in behvaior for -Ofast for
	Fortran.

2017-08-07  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/68829
	PR fortran/81701
	* options.c: Make -Ofast honor -fmax-stack-var-size.
	* invoke.texi: Document change.

2017-08-07  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/68829
	PR fortran/81701
	* gfortran.dg/o_fast_stacksize.90:  New test.

From-SVN: r250923
2017-08-07 16:43:05 +00:00
Joseph Myers
ebeeb49c44 * es.po: Update.
From-SVN: r250921
2017-08-07 16:56:00 +01:00
Eric Botcazou
db44013866 c-ada-spec.c (has_nontrivial_methods): Test for FUNCTION_DECL.
* c-ada-spec.c (has_nontrivial_methods): Test for FUNCTION_DECL.
	(print_ada_methods): Likewise.
	(print_ada_declaration): Likewise.

From-SVN: r250920
2017-08-07 15:09:07 +00:00
Wilco Dijkstra
30079dde47 [AArch64] Use gen_frame_mem for callee-saves
The frame code uses a mixture of gen_rtx_MEM and gen_frame_mem for
callee-saves.  Callee-saves never alias with local variables, so using
gen_frame_mem is best.

    gcc/
	* config/aarch64/aarch64.c (aarch64_pushwb_single_reg):
	Use gen_frame_mem.
	(aarch64_pop_regs): Likewise.
	(aarch64_gen_load_pair): Likewise.
	(aarch64_save_callee_saves): Likewise.
	(aarch64_restore_callee_saves): Likewise.

From-SVN: r250919
2017-08-07 14:17:09 +00:00
Wilco Dijkstra
6f1a16cbe8 Fix unresolved in gcc.dg/pr46932.c
Build only if pre-increment is supported.  Given there is no config test,
add a list of targets which have HAVE_PRE_INCREMENT set.

    testsuite/
	PR middle-end/46932
	* gcc.dg/pr46932.c: Compile on targets with pre-increment.

From-SVN: r250918
2017-08-07 13:56:02 +00:00
H.J. Lu
4090b65231 Revert r250916
From-SVN: r250917
2017-08-07 06:28:47 -07:00
H.J. Lu
079a03638c i386: Don't use frame pointer without stack access
When there is no stack access, there is no need to use frame pointer
even if -fno-omit-frame-pointer is used.

gcc/

	PR target/81736
	* config/i386/i386.c (ix86_finalize_stack_realign_flags): Renamed
	to ...
	(ix86_finalize_stack_frame_flags): This.  Also clear
	frame_pointer_needed if -fno-omit-frame-pointer is used without
	stack access.
	(ix86_expand_prologue): Replace ix86_finalize_stack_realign_flags
	with ix86_finalize_stack_frame_flags.
	(ix86_expand_epilogue): Likewise.
	(ix86_expand_split_stack_prologue): Likewise.

gcc/testsuite/

	PR target/81736
	* gcc.target/i386/pr81736-1.c: New test.
	* gcc.target/i386/pr81736-2.c: Likewise.
	* gcc.target/i386/pr81736-3.c: Likewise.
	* gcc.target/i386/pr81736-4.c: Likewise.

From-SVN: r250916
2017-08-07 04:49:10 -07:00
H.J. Lu
356512c066 i386: Set priority to P_AES for Westmere
The difference between Nehalem and Westmere is AES.  We should set
priority to P_AES for Westmere, not P_PROC_SSE4_2 which is for Nehalem.
Otherwise, we will pick Nehalem implementation on Westmere.  Tested on
Westmere.

	PR target/81743
	* config/i386/i386.c (get_builtin_code_for_version): Set priority
	to P_AES for Westmere.

From-SVN: r250915
2017-08-07 04:47:22 -07:00
Jonathan Yong
c8f34527b1 Share mingw fset-stack-executable with cygwin
This patch is in use by Cygwin for years, upstream to GCC.

	* gcc/config/i386/mingw.opt (fset-stack-executable): Removed.
	* gcc/config/i386/cygming.opt (fset-stack-executable): Moved
	from mingw.opt.
	* gcc/config/i386/cygwin.h: Define CHECK_EXECUTE_STACK_ENABLED.
	* ligcc/config.host (*-cygwin): Include file from mingw
	config/i386/enable-execute-stack-mingw32.c

From-SVN: r250914
2017-08-07 11:40:08 +00:00
Segher Boessenkool
d5e2c91a26 print-rtl: NOT is ~, not !
Slim RTL dumps print the RTL code NOT as !, but that is misleading:
its semantics are like the C operator ~.  This fixes it.


	* print-rtl.c (print_exp): Print NOT as "~" instead of as "!".

From-SVN: r250913
2017-08-07 12:21:32 +02:00
Marek Polacek
1653a86549 re PR middle-end/81737 (164.gzip in SPEC CPU 2000 failed to build)
PR middle-end/81737
	* fold-const.c (fold_indirect_ref_1): Check type_domain.

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

From-SVN: r250912
2017-08-07 09:13:02 +00:00
Martin Liska
577eec5656 Canonicalize names of attributes.
2017-08-07  Martin Liska  <mliska@suse.cz>

	* attribs.h (canonicalize_attr_name): New function.
	(cmp_attribs): Move from c-format.c and adjusted.
	(is_attribute_p): Moved from tree.h.
	* tree-inline.c: Add new includes.
	* tree.c (cmp_attrib_identifiers): Use cmp_attribs.
	(private_is_attribute_p): Remove.
	(private_lookup_attribute): Likewise.
	(private_lookup_attribute_by_prefix): Simplify.
	(remove_attribute): Use is_attribute_p.
	* tree.h: Remove removed declarations.
2017-08-07  Martin Liska  <mliska@suse.cz>

	* array-notation-common.c: Add new includes.
	* c-format.c( handle_format_attribute): Canonicalize a format
	function name.
	* c-lex.c (c_common_has_attribute): Canonicalize name of an
	attribute.
	* c-pretty-print.c: Add new include.
2017-08-07  Martin Liska  <mliska@suse.cz>

	* parser.c (cp_parser_gnu_attribute_list): Canonicalize name of an
	attribute.
	(cp_parser_std_attribute): Likewise.
	* tree.c: Add new include.
2017-08-07  Martin Liska  <mliska@suse.cz>

	* c-parser.c (c_parser_attributes): Canonicalize name of an
	attribute.
2017-08-07  Martin Liska  <mliska@suse.cz>

	* go-gcc.cc (Gcc_backend::function): Look up for no_split_stack
	and not __no_split_stack__.
2017-08-07  Martin Liska  <mliska@suse.cz>

	* g++.dg/cpp0x/pr65558.C: Update scanned pattern.
	* gcc.dg/parm-impl-decl-1.c: Likewise.
	* gcc.dg/parm-impl-decl-3.c: Likewise.
	* gcc.dg/Wattributes-5.c: New test.

From-SVN: r250911
2017-08-07 08:37:07 +00:00
Jakub Jelinek
a5320f3ce2 * include/system/sys/ptrace.h: New file.
From-SVN: r250910
2017-08-07 10:32:47 +02:00
Jakub Jelinek
f5b328d964 re PR middle-end/81698 (expand_case uses wrong edge as default edge)
PR middle-end/81698
	* stmt.c (emit_case_dispatch_table): Add DEFAULT_EDGE argument,
	instead of computing it in the function.  Formatting fix.
	(expand_case): Don't rely on default_edge being the first edge,
	clear it if removing it, pass default_edge to
	emit_case_dispatch_table.
	(expand_sjlj_dispatch_table): Pass NULL as DEFAULT_EDGE, formatting
	fix.

From-SVN: r250909
2017-08-07 10:29:21 +02:00
GCC Administrator
c0e5f294e8 Daily bump.
From-SVN: r250908
2017-08-07 00:16:37 +00:00