Commit Graph

152979 Commits

Author SHA1 Message Date
Andrew Burgess
dd3d6a42fc arc: Fix for loop end detection
We use a negative ID number to link together the doloop_begin and
doloop_end instructions.  This negative ID number is setup within
doloop_begin, at this point the ID is stored into the loop end
instruction (doloop_end_i) and placed into the doloop_begin_i
instruction.

In arc.c (arc_reorg) we extract the ID from the doloop_end_i
instruction in order to find the matching doloop_begin_i instruction,
though the ID is only used in some cases.

Currently in arc_reorg when we extract the ID we negate it.  This
negation is invalid.  The ID stored in both doloop_end_i and
doloop_begin_i is already negative, the negation in arc_reorg means
that if we need to use the ID to find the doloop_begin_i then we will
never find it (as the IDs will never match).

This commit removes the unneeded negation, moves the extraction of the
ID into a more appropriately scoped block and adds a new test for this
issue.

gcc/ChangeLog:

	* config/arc/arc.c (arc_reorg): Move loop_end_id into a more local
	block, and do not negate it, the stored id is already negative.

gcc/testsuite/ChangeLog:

	* gcc.target/arc/loop-1.c: New file.


Co-Authored-By: Guy Benyei <guybe@mellanox.com>

From-SVN: r246933
2017-04-14 22:14:34 +01:00
Andrew Burgess
8c1d6b64e3 arc: Use @pcl assembler syntax instead of invalid expressions
The old ARC assembler would accept expressions like 'LABEL-(.&-4)'
which would calculate the offset from the PCL to LABEL.  The new ARC
assembler does not accept these expressions, instead there's an @pcl
synax, used like LABEL@pcl which gives the offset from PCL to LABEL.

Most of the use of the old expression syntax have been removed,
however, this one got missed.

gcc/ChangeLog:

	* config/arc/arc.md (doloop_begin_i): Use @pcl assembler syntax.

From-SVN: r246932
2017-04-14 22:08:35 +01:00
Michael Meissner
31a07c8102 re PR target/80098 (ICE in curr_insn_transform, at lra-constraints.c:3816 on ppc64le)
[gcc]
2017-04-14  Michael Meissner  <meissner@linux.vnet.ibm.com>

	PR target/80098
	* config/rs6000/rs6000-cpus.def (OTHER_P9_VECTOR_MASKS): Define
	masks of options that should be turned off if the VSX vector
	options are turned off.
	(OTHER_P8_VECTOR_MASKS): Likewise.
	(OTHER_VSX_VECTOR_MASKS): Likewise.
	* config/rs6000/rs6000.c (rs6000_option_override_internal): Call
	rs6000_disable_incompatible_switches to validate no type switches
	like -mvsx.
	(rs6000_incompatible_switch): New function to disallow turning on
	other vector options if -mno-vsx, -mno-power8-vector, or
	-mno-power9-vector are specified.

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

	PR target/80098
	* gcc.target/powerpc/pr80098-1.c: New test.
	* gcc.target/powerpc/pr80098-2.c: Likewise.
	* gcc.target/powerpc/pr80098-3.c: Likewise.
	* gcc.target/powerpc/pr80098-4.c: Likewise.

From-SVN: r246930
2017-04-14 20:27:18 +00:00
Claudiu Zissulescu
19b250c43a [ARC] Use long jumps for CRT calls
gcc/
2017-04-17  Claudiu Zissulescu  <claziss@synopsys.com>

	* config/arc/arc.h (CRT_CALL_STATIC_FUNCTION): Use long calls.

From-SVN: r246927
2017-04-14 13:41:04 +02:00
Claudiu Zissulescu
213c9bf121 [ARC] DWARF emitting cleanup.
The use of CFA_FRAME_BASE_OFFSET and ARG_POINTER_CFA_OFFSET macros
leads to wrong offset calculation for DW_OP_fbreg constructions.
Remove them.

gcc/
2017-04-14  Claudiu Zissulescu  <claziss@synopsys.com>

	* config/arc/arc-protos.h (arc_decl_pretend_args): Remove.
	* config/arc/arc.c (arc_decl_pretend_args): Likewise.
	* config/arc/arc.h (CFA_FRAME_BASE_OFFSET): Likewise.
	(ARG_POINTER_CFA_OFFSET): Likewise.

From-SVN: r246926
2017-04-14 13:40:54 +02:00
Claudiu Zissulescu
1fccdd40cf [ARC] Update mode_dependent_address_p hook.
Update arc_mode_dependent_address_p to avoid emitting subreg(mem (reg
..)) when expanding by relaxing the conditions.

gcc/
2017-04-14  Claudiu Zissulescu  <claziss@synopsys.com>

	* config/arc/arc.c (arc_mode_dependent_address_p): Relax
	conditions to take advantage of various optimizations.

From-SVN: r246925
2017-04-14 13:40:43 +02:00
Jeff Law
1f33abd75d mips.mips.md (zero_extendsidi2): Do not allow SP to appear in operands[1] if it is a MEM and TARGET_MIPS16 is active.
* config/mips.mips.md (zero_extendsidi2): Do not allow SP to appear
	in operands[1] if it is a MEM and TARGET_MIPS16 is active.
	(zero_extendsidi2_dext): Likewise.

From-SVN: r246924
2017-04-13 23:13:19 -06:00
GCC Administrator
67630cef4d Daily bump.
From-SVN: r246923
2017-04-14 00:16:18 +00:00
Jakub Jelinek
19929ba9c9 plugin-nvptx.c (cuda_lib_inited): Use signed char type instead of char.
* plugin/plugin-nvptx.c (cuda_lib_inited): Use signed char type
	instead of char.

From-SVN: r246918
2017-04-13 21:59:04 +02:00
Jakub Jelinek
099560172f re PR sanitizer/80403 (UBSAN: compile time crash with "type mismatch in binary expression" message in / and % expr)
PR sanitizer/80403
	* fold-const.c (fold_ternary_loc): Revert
	use op0 instead of fold_convert_loc (loc, type, arg0) part of
	2017-04-12 change.

	* g++.dg/ubsan/pr80403-2.C: New test.

From-SVN: r246917
2017-04-13 21:52:58 +02:00
Vladimir Makarov
bc04239603 re PR rtl-optimization/80343 (ICE in extract_constrain_insn, at recog.c:2213 (error: insn does not satisfy its constraints))
2017-04-13  Vladimir Makarov  <vmakarov@redhat.com>

	PR rtl-optimization/80343
	* lra-remat.c (update_scratch_ops): Assign original hard reg to
	new scratch pseudo.

2017-04-13  Vladimir Makarov  <vmakarov@redhat.com>

	PR rtl-optimization/80343
	* gcc.target/powerpc/pr80343.c: New.

From-SVN: r246914
2017-04-13 18:08:51 +00:00
Denis Khalikov
abac4c3400 re PR sanitizer/80414 ([UBSAN] segfault with -fsanitize=undefined)
PR sanitizer/80414
	* ubsan.c (ubsan_expand_bounds_ifn): Pass original index
	to ubsan_encode_value.

	* c-c++-common/ubsan/bounds-15.c: New test.

From-SVN: r246909
2017-04-13 17:52:23 +03:00
Jeff Law
3535a0fb6f reload1.c (eliminate_regs_1): Call gen_rtx_raw_SUBREG for SUBREGs appearing in DEBUG_INSNs.
* reload1.c (eliminate_regs_1): Call gen_rtx_raw_SUBREG for SUBREGs
	appearing in DEBUG_INSNs.

From-SVN: r246904
2017-04-13 08:02:33 -06:00
Martin Liska
0040ecb07f Do not call memcpy with a NULL argument (PR gcov-profile/80413).
2017-04-13  Martin Liska  <mliska@suse.cz>

	PR gcov-profile/80413
	* gcov-io.c (gcov_write_string): Copy to buffer just when
	allocated size is greater than zero.

From-SVN: r246903
2017-04-13 11:51:28 +00:00
Richard Biener
43a3aa03ac re PR testsuite/80416 (FAIL: g++.dg/torture/pr79671.C -O2 execution test)
2017-04-13  Richard Biener  <rguenther@suse.de>

	PR testsuite/80416
	* g++.dg/torture/pr79671.C: Fix asm constraints.

From-SVN: r246902
2017-04-13 11:17:38 +00:00
Jakub Jelinek
031fbdb9c9 re PR debug/80321 (infinite recursion with inlining of nested function and debug info)
PR debug/80321
	* dwarf2out.c (decls_for_scope): Ignore declarations of
	current_function_decl in BLOCK_NONLOCALIZED_VARS.

	* gcc.dg/debug/pr80321.c: New test.

2017-04-13  Eric Botcazou  <ebotcazou@adacore.com>

	* gnat.dg/debug10.adb: New test.
	* gnat.dg/debug10_pkg.ads: New helper.

From-SVN: r246900
2017-04-13 13:05:09 +02:00
Jan Hubicka
fb81a61b15 re PR c++/69953 (Using lto causes gtkmm/gparted and gtkmm/inkscape compile to fail)
PR lto/69953 
	* ipa-visibility.c (non_local_p): Fix typos.
	(localize_node): When localizing symbol in same comdat group,
	dissolve the group only when we know external symbols are going
	to be privatized.
	(function_and_variable_visibility): Do not localize DECL_EXTERNAL.

From-SVN: r246899
2017-04-13 08:04:52 +00:00
GCC Administrator
8da3e6995e Daily bump.
From-SVN: r246898
2017-04-13 00:16:17 +00:00
Jakub Jelinek
deed3da9af re PR tree-optimization/79390 (10% performance drop in SciMark2 LU after r242550)
PR tree-optimization/79390
	* optabs.c (emit_conditional_move): If the preferred op2/op3 operand
	order does not result in usable sequence, retry with reversed operand
	order.

	* gcc.target/i386/pr70465-2.c: Xfail the scan-assembler-not test.

From-SVN: r246882
2017-04-12 20:09:47 +02:00
Jakub Jelinek
b96a3e1157 re PR sanitizer/80403 (UBSAN: compile time crash with "type mismatch in binary expression" message in / and % expr)
PR sanitizer/80403
	PR sanitizer/80404
	PR sanitizer/80405
	* fold-const.c (fold_ternary_loc): Use op1 instead of arg1 as argument
	to fold_build2_loc.  Convert TREE_OPERAND (tem, 0) to type.  Use
	op0 instead of fold_convert_loc (loc, type, arg0).

	* g++.dg/ubsan/pr80403.C: New test.
	* g++.dg/ubsan/pr80404.C: New test.
	* g++.dg/ubsan/pr80405.C: New test.

From-SVN: r246881
2017-04-12 20:08:29 +02:00
Jeff Law
988ed78513 genattrtab.c (write_eligible_delay): Verify DELAY_INSN still has a delay slot in the generated code.
* genattrtab.c (write_eligible_delay): Verify DELAY_INSN still
	has a delay slot in the generated code.

From-SVN: r246879
2017-04-12 10:08:18 -06:00
Jeff Law
e1abef483e cris.md (cris_preferred_reload_class): Return GENNONACR_REGS rather than GENERAL_REGS.
* config/cris/cris.md (cris_preferred_reload_class): Return
	GENNONACR_REGS rather than GENERAL_REGS.

From-SVN: r246877
2017-04-12 08:58:23 -06:00
Jakub Jelinek
7687375840 re PR middle-end/80163 (ICE on hopefully valid code)
PR c/80163
	* expr.c <CASE_CONVERT>: For EXPAND_INITIALIZER determine SIGN_EXTEND
	vs. ZERO_EXTEND based on signedness of treeop0's type rather than
	signedness of the result type.

	* gcc.dg/torture/pr80163.c: New test.

From-SVN: r246876
2017-04-12 15:57:45 +02:00
Richard Biener
940c9a7c2c re PR tree-optimization/80359 (DSE causes error: invalid reference prefix)
2017-04-12  Richard Biener  <rguenther@suse.de>
	Jeff Law  <law@redhat.com>

	PR tree-optimization/80359
	* tree-ssa-dse.c (maybe_trim_partially_dead_store): Do not
	trim stores to TARGET_MEM_REFs.

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

Co-Authored-By: Jeff Law <law@redhat.com>

From-SVN: r246875
2017-04-12 13:47:26 +00:00
Richard Biener
7f7e9dae36 re PR tree-optimization/79390 (10% performance drop in SciMark2 LU after r242550)
2017-04-12  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/79390
	* gimple-ssa-split-paths.c (is_feasible_trace): Restrict
	threading case even more.

From-SVN: r246869
2017-04-12 09:41:02 +00:00
Segher Boessenkool
de81c2f2f9 rs6000: Enforce quad_address_p in TImode atomic_load/store (PR80382)
Whatever expand expands to should be valid instructions.  The defined
instructions here have a quad_memory_operand predicate, which boils
down to quad_address_p on the address, so let's test for that instead
of only disallowing indexed addresses.


	* config/rs6000/sync.md (atomic_load<mode>, atomic_store<mode): Test
	for quad_address_p for TImode, instead of just not indexed_address.

From-SVN: r246868
2017-04-12 10:32:56 +02:00
Segher Boessenkool
ba6bf284a5 rs6000: Enforce quad_address_p in TImode atomic_load/store (PR80382)
Whatever expand expands to should be valid instructions.  The defined
instructions here have a quad_memory_operand predicate, which boils
down to quad_address_p on the address, so let's test for that instead
of only disallowing indexed addresses.


	* config/rs6000/sync.md (atomic_load<mode>, atomic_store<mode): Test
	for quad_address_p for TImode, instead of just not indexed_address.

From-SVN: r246867
2017-04-12 10:31:40 +02:00
Richard Biener
350792ffae re PR target/79671 (mapnik miscompilation on armv7hl since r235622)
2017-04-12  Richard Biener  <rguenther@suse.de>
	Bernd Edlinger  <bernd.edlinger@hotmail.de>

	PR middle-end/79671
	* alias.c (component_uses_parent_alias_set_from): Handle
	TYPE_TYPELESS_STORAGE.
	(get_alias_set): Likewise.
	* tree-core.h (tree_type_common): Add typeless_storage flag.
	* tree.h (TYPE_TYPELESS_STORAGE): New macro.
	* stor-layout.c (place_union_field): Set TYPE_TYPELESS_STORAGE
	for types containing members with TYPE_TYPELESS_STORAGE.
	(place_field): Likewise.
	(layout_type): Likewise for ARRAY_TYPE.
	* lto-streamer-out.c (hash_tree): Hash TYPE_TYPELESS_STORAGE.
	* tree-streamer-in.c (unpack_ts_type_common_value_fields): Stream
	TYPE_TYPELESS_STORAGE.
	* tree-streamer-out.c (pack_ts_type_common_value_fields): Likewise.

	lto/
	* lto.c (compare_tree_sccs_1): Compare TYPE_TYPELESS_STORAGE.

	cp/
	* tree.c (build_cplus_array_type): Set TYPE_TYPELESS_STORAGE
	for arrays of character or std::byte type.

	* g++.dg/torture/pr79671.C: New testcase.
	* g++.dg/lto/pr79671_0.C: Likewise.
	* g++.dg/lto/pr79671_1.c: Likewise.

Co-Authored-By: Bernd Edlinger <bernd.edlinger@hotmail.de>

From-SVN: r246866
2017-04-12 07:35:49 +00:00
Jakub Jelinek
d62e6f1078 re PR sanitizer/80349 (UBSAN: compile time crash with "type mismatch in binary expression" message)
PR sanitizer/80349
	* fold-const.c (fold_binary_loc) <case BIT_IOR_EXPR>: Convert arg0's
	first argument to type.

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

From-SVN: r246865
2017-04-12 08:12:26 +02:00
Ian Lance Taylor
31d61ac600 re PR go/77857 (gccgo: vendoring doesn't work in gcc 6/7)
PR go/77857
    cmd/go: generate vendor paths for -I arg on compile
    
    This change generates the vendor path to be used with -I
    on a gccgo compile to find imports from the vendor directories.
    
    Fixes golang/go#15628
    
    Reviewed-on: https://go-review.googlesource.com/39590

From-SVN: r246864
2017-04-12 04:26:15 +00:00
GCC Administrator
782f992918 Daily bump.
From-SVN: r246863
2017-04-12 00:16:20 +00:00
Gerald Pfeifer
5ee26fce81 faq.xml: Update reference link to C++ ABI for Itanium.
* doc/xml/faq.xml: Update reference link to C++ ABI for Itanium.
	* doc/xml/manual/abi.xml. Ditto (thrice).

From-SVN: r246860
2017-04-11 22:36:40 +00:00
Bill Schmidt
6f78039049 re PR target/80376 (Some vec_xxpermdi usage lead to ICE)
2017-04-11  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

	PR target/80376
	PR target/80315
	* config/rs6000/rs6000.c (rs6000_expand_unop_builtin): Return
	CONST0_RTX (mode) rather than const0_rtx where appropriate.
	(rs6000_expand_binop_builtin): Likewise.
	(rs6000_expand_ternop_builtin): Likewise; also add missing
	vsx_xxpermdi_* variants; also fix typo (arg1 => arg2) for
	vshasigma built-ins.
	* doc/extend.texi: Document that vec_xxpermdi's third argument
	must be a constant.

From-SVN: r246859
2017-04-11 21:37:16 +00:00
Jason Merrill
125db6a1c6 PR c++/80294 - ICE with constexpr and inheritance.
* constexpr.c (reduced_constant_expression_p):
	A null constructor element is non-constant.
	(cxx_eval_indirect_ref): Don't VERIFY_CONSTANT before
	returning an empty base.

From-SVN: r246858
2017-04-11 17:07:32 -04:00
Jakub Jelinek
347e1f7769 re PR c++/80370 (ICE when using structured bindings and nested generic lambdas (tsubst_decomp_names))
PR c++/80370
	* decl.c (cp_finish_decomp): If processing_template_decl on
	non-dependent decl, only set TREE_TYPE on the v[i] decls, but don't
	change their DECL_VALUE_EXPR nor cp_finish_decl them.  Instead make
	sure DECL_VALUE_EXPR is the canonical NULL type ARRAY_REF for tsubst
	processing.
	* pt.c (value_dependent_expression_p) <case VAR_DECL>: For variables
	with DECL_VALUE_EXPR, return true if DECL_VALUE_EXPR is type
	dependent.

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

From-SVN: r246857
2017-04-11 22:51:16 +02:00
Uros Bizjak
98b5e81a05 i386.c (dimode_scalar_chain::compute_convert_gain): Use shift_const cost parameter when calculating gain of STV shifts.
* config/i386/i386.c (dimode_scalar_chain::compute_convert_gain):
	Use shift_const cost parameter when calculating gain of STV shifts.

From-SVN: r246856
2017-04-11 22:36:58 +02:00
Vladimir Makarov
4796d8f620 re PR rtl-optimization/70478 ([LRA] S/390: Performance regression - superfluous stack frame)
2017-04-11  Vladimir Makarov  <vmakarov@redhat.com>

	PR rtl-optimization/70478
	* lra-constraints.c (process_alt_operands): Check memory for
	disfavoring memory insn operand.

From-SVN: r246854
2017-04-11 19:39:59 +00:00
Jakub Jelinek
df1c878ec2 re PR middle-end/80100 (simplify-rtx.c sanitizer detects undefined behaviour with optimization)
PR middle-end/80100
	* simplify-rtx.c (simplify_binary_operation_1) <case IOR>: Perform
	left shift in unsigned HOST_WIDE_INT type.

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

From-SVN: r246851
2017-04-11 19:21:51 +02:00
Jakub Jelinek
8585103f05 re PR rtl-optimization/80385 (Segfault in commutative_operand_precedence() rtlanal.c:3373)
PR rtl-optimization/80385
	* simplify-rtx.c (simplify_unary_operation_1): Don't transform
	(not (neg X)) into (plus X -1) for complex or non-integral modes.

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

From-SVN: r246850
2017-04-11 19:19:56 +02:00
Jakub Jelinek
fbc698e0f4 re PR libgomp/80394 (Empty OpenMP task is wrongly removed when optimizing)
PR libgomp/80394
	* omp-low.c (scan_omp_task): Don't optimize away empty tasks
	if they have any depend clauses.

	* testsuite/libgomp.c/pr80394.c: New test.

From-SVN: r246849
2017-04-11 19:15:47 +02:00
Martin Liska
c6cf6ef7c0 Add function part to a same comdat group (PR ipa/80212).
2017-04-11  Martin Liska  <mliska@suse.cz>

	PR ipa/80212
	* cgraph.c (cgraph_node::dump): Dump calls_comdat_local.
	* ipa-split.c (split_function): Create a local comdat symbol
	if caller is in a comdat group.
2017-04-11  Martin Liska  <mliska@suse.cz>

	PR ipa/80212
	* g++.dg/ipa/pr80212.C: New test.

From-SVN: r246848
2017-04-11 16:38:19 +00:00
Martin Liska
58928b3589 Do not create a constprop clone for calls_comdat_local nodes (PR ipa/80212).
2017-04-11  Martin Liska  <mliska@suse.cz>

	PR ipa/80212
	* ipa-cp.c (determine_versionability): Handle calls_comdat_local
	flags.

From-SVN: r246847
2017-04-11 16:37:31 +00:00
Martin Sebor
3812f46046 PR middle-end/80364 - sanitizer detects signed integer overflow in gimple-ssa-sprintf.c
gcc/ChangeLog:
	PR middle-end/80364
	* gimple-ssa-sprintf.c (get_int_range): Remove second argument and
	always use the int type.  Use INTEGRAL_TYPE_P() rather than testing
	for INTEGER_TYPE.
	(directive::set_width, directive::set_precision, format_character):
	Adjust.
	(parse_directive): Use INTEGRAL_TYPE_P() rather than testing for
	INTEGER_TYPE.

gcc/testsuite/ChangeLog:
	PR middle-end/80364
	* gcc.dg/tree-ssa/builtin-sprintf-warn-16.c: New test.

From-SVN: r246846
2017-04-11 10:35:34 -06:00
Damian Rouson
b1c0468f72 download_prerequisites (md5_check): New function emulates Linux 'md5 --check' on macOS.
2017-04-11  Damian Rouson  <damian@sourceryinstitute.org>

        * download_prerequisites (md5_check): New function emulates Linux
        'md5 --check' on macOS.  Modified script for macOS compatibility.

From-SVN: r246845
2017-04-11 16:34:07 +00:00
Richard Earnshaw
9b523c934a [arm] PR 80389 - if architecture and cpu mismatch, don't print an architecture name as a CPU name
In this PR we incorrectly print the architecture name in a .cpu
directive in the assembly file when the -mcpu and -march options
conflict (don't target the same base architecture).  In this case the
.arch overrides the .cpu directive and we should emit a .arch option.

PR target/80389
* config/arm/arm.c (arm_configure_build_target): When -mcpu and -arch conflict,
set target->arch_name instead of target->cpu_name.

From-SVN: r246843
2017-04-11 14:57:41 +00:00
Jerry DeLisle
f29876bba0 close.c: Fix white space in pointer declarations and comment formats where applicable.
2017-04-11  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	* close.c: Fix white space in pointer declarations and comment
	formats where applicable.
	* fbuf.c: Likewise.
	* fbuf.h: Likewise.
	* format.c: Likewise.
	* inquire.c: Likewise.
	* intrinsics.c: Likewise.
	* list_read.c: Likewise.
	* lock.c: Likewise.
	* open.c: Likewise.
	* read.c: Likewise.
	* transfer.c: Likewise.
	* unit.c: Likewise.
	* unix.c: Likewise.
	* unix.h: Likewise.
	* write.c: Likewise.

From-SVN: r246842
2017-04-11 14:51:25 +00:00
Richard Biener
276ebde7b1 re PR tree-optimization/80374 (ICE in fold_convert_loc, at fold-const.c:2384)
2017-04-11  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/80374
	* tree-ssa-dom.c (derive_equivalences_from_bit_ior): Use
	build_zero_cst, remove fold_convertible_p check again.

From-SVN: r246840
2017-04-11 13:44:24 +00:00
Martin Liska
9f67937000 Do not instrument register variables in object-size sanitizer (PR sanitizer/70878).
2017-04-11  Martin Liska  <mliska@suse.cz>

	PR sanitizer/70878
	* ubsan.c (instrument_object_size): Do not instrument register
	variables.
2017-04-11  Martin Liska  <mliska@suse.cz>

	PR sanitizer/70878
	* gcc.dg/ubsan/pr70878.c: New test.

From-SVN: r246837
2017-04-11 13:08:08 +00:00
Jakub Jelinek
cb278caa18 re PR target/80381 (AVX512: -O3, _mm512_srai_epi32, the last argument must be an 8-bit immediate)
PR target/80381
	* config/i386/i386-builtin-types.def
	(V16HI_FTYPE_V16HI_INT_V16HI_UHI_COUNT,
	V16HI_FTYPE_V16HI_V8HI_V16HI_UHI_COUNT,
	V16SI_FTYPE_V16SI_INT_V16SI_UHI_COUNT,
	V16SI_FTYPE_V16SI_V4SI_V16SI_UHI_COUNT,
	V2DI_FTYPE_V2DI_INT_V2DI_UQI_COUNT,
	V2DI_FTYPE_V2DI_V2DI_V2DI_UQI_COUNT,
	V32HI_FTYPE_V32HI_INT_V32HI_USI_COUNT,
	V32HI_FTYPE_V32HI_V8HI_V32HI_USI_COUNT,
	V4DI_FTYPE_V4DI_INT_V4DI_UQI_COUNT,
	V4DI_FTYPE_V4DI_V2DI_V4DI_UQI_COUNT,
	V4SI_FTYPE_V4SI_INT_V4SI_UQI_COUNT,
	V4SI_FTYPE_V4SI_V4SI_V4SI_UQI_COUNT,
	V8DI_FTYPE_V8DI_INT_V8DI_UQI_COUNT,
	V8DI_FTYPE_V8DI_V2DI_V8DI_UQI_COUNT,
	V8HI_FTYPE_V8HI_INT_V8HI_UQI_COUNT,
	V8HI_FTYPE_V8HI_V8HI_V8HI_UQI_COUNT,
	V8SI_FTYPE_V8SI_INT_V8SI_UQI_COUNT,
	V8SI_FTYPE_V8SI_V4SI_V8SI_UQI_COUNT): New function type aliases.
	* config/i386/i386-builtin.def (__builtin_ia32_pslld512_mask,
	__builtin_ia32_pslldi512_mask, __builtin_ia32_psllq512_mask,
	__builtin_ia32_psllqi512_mask, __builtin_ia32_psrad512_mask,
	__builtin_ia32_psradi512_mask, __builtin_ia32_psraq512_mask,
	__builtin_ia32_psraqi512_mask, __builtin_ia32_psrld512_mask,
	__builtin_ia32_psrldi512_mask, __builtin_ia32_psrlq512_mask,
	__builtin_ia32_psrlqi512_mask, __builtin_ia32_psllwi128_mask,
	__builtin_ia32_pslldi128_mask, __builtin_ia32_psllqi128_mask,
	__builtin_ia32_psllw128_mask, __builtin_ia32_pslld128_mask,
	__builtin_ia32_psllq128_mask, __builtin_ia32_psllwi256_mask,
	__builtin_ia32_psllw256_mask, __builtin_ia32_pslldi256_mask,
	__builtin_ia32_pslld256_mask, __builtin_ia32_psllqi256_mask,
	__builtin_ia32_psllq256_mask, __builtin_ia32_psradi128_mask,
	__builtin_ia32_psrad128_mask, __builtin_ia32_psradi256_mask,
	__builtin_ia32_psrad256_mask, __builtin_ia32_psraqi128_mask,
	__builtin_ia32_psraq128_mask, __builtin_ia32_psraqi256_mask,
	__builtin_ia32_psraq256_mask, __builtin_ia32_psrldi128_mask,
	__builtin_ia32_psrld128_mask, __builtin_ia32_psrldi256_mask,
	__builtin_ia32_psrld256_mask, __builtin_ia32_psrlqi128_mask,
	__builtin_ia32_psrlq128_mask, __builtin_ia32_psrlqi256_mask,
	__builtin_ia32_psrlq256_mask, __builtin_ia32_psrawi256_mask,
	__builtin_ia32_psraw256_mask, __builtin_ia32_psrawi128_mask,
	__builtin_ia32_psraw128_mask, __builtin_ia32_psrlwi256_mask,
	__builtin_ia32_psrlw256_mask, __builtin_ia32_psrlwi128_mask,
	__builtin_ia32_psrlw128_mask, __builtin_ia32_psllwi512_mask,
	__builtin_ia32_psllw512_mask, __builtin_ia32_psrawi512_mask,
	__builtin_ia32_psraw512_mask, __builtin_ia32_psrlwi512_mask,
	__builtin_ia32_psrlw512_mask): Use _COUNT suffixed function type
	aliases.
	* config/i386/i386.c (ix86_expand_args_builtin): Rename last_arg_count
	flag to second_arg_count, handle 4 argument function type _COUNT
	aliases, handle second_arg_count on second argument rather than last.

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

From-SVN: r246835
2017-04-11 10:54:54 +02:00
Jakub Jelinek
82665822b1 re PR c++/80363 (#'vec_cond_expr' not supported by dump_expr#<expression error>)
PR c++/80363
	* error.c (dump_expr): Handle VEC_COND_EXPR like COND_EXPR.

	* g++.dg/ext/pr80363.C: New test.

From-SVN: r246834
2017-04-11 10:51:40 +02:00