Commit Graph

29428 Commits

Author SHA1 Message Date
Martin Liska 77719b0675 Reload global options when strict aliasing is dropped (PR ipa/79043).
2017-01-13  Martin Liska  <mliska@suse.cz>

	PR ipa/79043
	* function.c (set_cfun): Add new argument force.
	* function.h (set_cfun): Likewise.
	* ipa-inline-transform.c (inline_call): Use the function when
	strict alising from is dropped for function we inline to.
2017-01-13  Martin Liska  <mliska@suse.cz>

	PR ipa/79043
	* gcc.c-torture/execute/pr79043.c: New test.

From-SVN: r244435
2017-01-13 12:56:54 +00:00
Richard Biener a181b2bcd7 re PR middle-end/78411 (FAIL: gcc.target/i386/pr45685.c scan-assembler-times cmov 6)
2017-01-13  Richard Biener  <rguenther@suse.de>

	PR middle-end/78411
	* gcc.target/i386/pr45685.c: Add -ftree-loop-if-convert.

From-SVN: r244427
2017-01-13 11:34:40 +00:00
Andre Vehreschild eaed322611 re PR fortran/70697 ([Coarray] ICE on EVENT WAIT with array element UNTIL_COUNT argument)
gcc/testsuite/ChangeLog:

2017-01-13  Andre Vehreschild  <vehre@gcc.gnu.org>

	PR fortran/70697
	* gfortran.dg/coarray/event_4.f08: New test.


gcc/fortran/ChangeLog:

2017-01-13  Andre Vehreschild  <vehre@gcc.gnu.org>

	PR fortran/70697
	* resolve.c (resolve_lock_unlock_event): Resolve the expression for
	event's until_count.

From-SVN: r244413
2017-01-13 11:39:52 +01:00
Andre Vehreschild 4ccff88b71 re PR fortran/70696 ([Coarray] ICE on EVENT POST of host-associated EVENT_TYPE coarray)
gcc/testsuite/ChangeLog:

2017-01-13  Andre Vehreschild  <vehre@gcc.gnu.org>

	PR fortran/70696
	* gfortran.dg/coarray/event_3.f08: New test.

gcc/fortran/ChangeLog:

2017-01-13  Andre Vehreschild  <vehre@gcc.gnu.org>

	PR fortran/70696
	* trans-expr.c (gfc_get_tree_for_caf_expr): Ensure the backend_decl
	is valid before accessing it.

libgfortran/ChangeLog:

2017-01-13  Andre Vehreschild  <vehre@gcc.gnu.org>

	PR fortran/70696
	* caf/single.c (_gfortran_caf_register): Allocate enough memory for
	the event counter.

From-SVN: r244407
2017-01-13 11:22:21 +01:00
Richard Biener 3c3b9090f8 re PR tree-optimization/77283 (Revision 238005 disables loop unrolling)
2017-01-13  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/77283
	* gcc.dg/tree-ssa/split-path-9.c: Fix.

From-SVN: r244394
2017-01-13 08:47:57 +00:00
Richard Biener 2532991330 gimple-parser.c (c_parser_gimple_postfix_expression): Parse _Literal ( type-name ) number.
2017-01-13  Richard Biener  <rguenther@suse.de>

	c/
	* gimple-parser.c (c_parser_gimple_postfix_expression): Parse
	_Literal ( type-name ) number.

	* tree-pretty-print.c (dump_generic_node): Dump INTEGER_CSTs
	as _Literal ( type ) number in case usual suffixes do not
	preserve all information.

	* gcc.dg/gimplefe-22.c: New testcase.

From-SVN: r244393
2017-01-13 08:16:59 +00:00
Richard Biener 10b70b8e5e re PR tree-optimization/77283 (Revision 238005 disables loop unrolling)
2017-01-13  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/77283
	* gimple-ssa-split-paths.c: Include gimple-ssa.h, tree-phinodes.h
	and ssa-iterators.h.
	(is_feasible_trace): Implement a cost model based on joiner
	PHI node uses.

	* gcc.dg/tree-ssa/split-path-7.c: Adjust.
	* gcc.dg/tree-ssa/split-path-8.c: New testcase.
	* gcc.dg/tree-ssa/split-path-9.c: Likewise.

From-SVN: r244392
2017-01-13 08:11:01 +00:00
Sandra Loosemore 76a8f82f47 pr77862.c: Require fpic target.
2017-01-12  Sandra Loosemore  <sandra@codesourcery.com>

	gcc/testsuite/
	* gcc.dg/pr77862.c: Require fpic target.

From-SVN: r244387
2017-01-12 17:42:33 -05:00
Michael Meissner 59a505da6b re PR target/79004 (ICE in gcc.dg/torture/fp-int-convert-float128-ieee.c with -mcpu=power9)
[gcc]
2017-01-12  Michael Meissner  <meissner@linux.vnet.ibm.com>

	PR target/79004
	* config/rs6000/rs6000.md (FP_ISA3): Do not optimize converting
	char or short to __float128/_Float128 directly.

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

	PR target/79004
	* gcc.target/powerpc/pr79004.c: New test.

From-SVN: r244386
2017-01-12 22:02:57 +00:00
Martin Sebor bce6f76013 (-Wformat-overflow): ...to this.
gcc/c-family/ChangeLog:

	(-Wformat-overflow): ...to this.

gcc/ChangeLog:

	to -Wformat-overflow.
	* gimple-ssa-sprintf.c (pass_sprintf_length::gate): Adjust.
	(min_bytes_remaining): Same.
	(get_string_length): Same.
	(format_string): Same.
	(format_directive): Same.
	(add_bytes): Same.
	(pass_sprintf_length::handle_gimple_call): Same.

gcc/testsuite/ChangeLog:

	* gcc.dg/pr78138.c: Adjust.
	* gcc.dg/pr78768.c: Adjust.
	* gcc.dg/tree-ssa/builtin-sprintf-4.c: Adjust.
	* gcc.dg/tree-ssa/builtin-sprintf-warn-1.c: Adjust.
	* gcc.dg/tree-ssa/builtin-sprintf-warn-2.c: Adjust.
	* gcc.dg/tree-ssa/builtin-sprintf-warn-3.c: Adjust.
	* gcc.dg/tree-ssa/builtin-sprintf-warn-4.c: Adjust.
	* gcc.dg/tree-ssa/builtin-sprintf-warn-6.c: Adjust.
	* gcc.dg/tree-ssa/builtin-sprintf-warn-7.c: Adjust.
	* gcc.dg/tree-ssa/builtin-sprintf-warn-8.c: Adjust.
	* gcc.dg/tree-ssa/builtin-sprintf-warn-9.c: Adjust.
	* gcc.dg/tree-ssa/pr78605.c: Adjust.
	* gcc.dg/tree-ssa/pr78622.c: Adjust.

From-SVN: r244385
2017-01-12 14:54:41 -07:00
Jakub Jelinek 3eefa646f4 gimple-ssa-sprintf.c (try_substitute_return_value): Remove info.nowrite calls with no lhs that can't throw.
* gimple-ssa-sprintf.c (try_substitute_return_value): Remove
	info.nowrite calls with no lhs that can't throw.  Return bool
	whether gsi_remove has been called or not.
	(pass_sprintf_length::handle_gimple_call): Return bool whether
	try_substitute_return_value called gsi_remove.  Formatting fix.
	(pass_sprintf_length::execute): Don't use gsi_remove if
	handle_gimple_call returned true.

	* gcc.dg/tree-ssa/builtin-snprintf-1.c: New test.

From-SVN: r244384
2017-01-12 22:30:56 +01:00
Martin Sebor 940242cd07 re PR testsuite/79051 (FAIL: gcc.dg/attr-alloc_size-4.c (test for warnings, line 140))
PR testsuite/79051

gcc/testsuite/ChangeLog:
	* gcc.dg/attr-alloc_size-4.c: Work harder to avoid false negatives
	due to bug 79054.

From-SVN: r244382
2017-01-12 11:50:26 -07:00
Martin Sebor 8be3f30682 Reference PR testsuite/79051, not 791051.
From-SVN: r244381
2017-01-12 11:41:33 -07:00
Martin Sebor dcb5624309 PR testsuite/791051 - FAIL: gcc.dg/attr-alloc_size-4.c (test for warnings, line 140)
gcc/testsuite/ChangeLog:
	* gcc.dg/attr-alloc_size-4.c: Avoid false negatives due to bug 79054.

From-SVN: r244380
2017-01-12 11:35:19 -07:00
David Edelsohn b7431c206e * gcc.dg/pr78768.c: Require LTO.
From-SVN: r244379
2017-01-12 13:27:04 -05:00
Martin Sebor 2bcd9f3208 PR c/79074 - -Waddress difference between C and C++ with (T*)0
gcc/testsuite/ChangeLog:
	* c-c++-common/Waddress-2.c: Remove a test to avoid a C failure
	due to the referenced bug.

From-SVN: r244378
2017-01-12 11:07:51 -07:00
Martin Sebor b2fc1c7050 PR testsuite/79073 - FAIL: gcc.dg/pr78973.c (test for warnings, line 12) in ILP32
gcc/testsuite/ChangeLog:
	* gcc.dg/pr78973.c: Xfail on ILP32 targets.

From-SVN: r244377
2017-01-12 10:43:16 -07:00
Uros Bizjak fbed6f3695 builtin_target.c (check_features): Check all supported __builtin_cpu_supports options.
* gcc.target/i386/builtin_target.c (check_features): Check all
	supported __builtin_cpu_supports options.

From-SVN: r244375
2017-01-12 18:30:03 +01:00
Kyrylo Tkachov 27282dadbf Add Cortex-A15 tuning to gcc.dg/uninit-pred-8_a.c
PR tree-optimization/78319
	* gcc.dg/uninit-pred-8_a.c: Add -mtune=cortex-a15 for arm.
	Remove xfail.

From-SVN: r244372
2017-01-12 17:02:38 +00:00
Bill Schmidt 6611316649 re PR target/79044 (ICE in insn_is_swappable_p, at config/rs6000/rs6000.c:41191)
[gcc]

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

	PR target/79044
	* config/rs6000/rs6000.c (insn_is_swappable_p): Mark
	element-reversing loads and stores as not swappable.

[gcc/testsuite]

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

	PR target/79044
	* gcc.target/powerpc/swaps-p8-26.c: New.

From-SVN: r244368
2017-01-12 16:01:13 +00:00
Richard Biener 6bb4ea5cdf tree-pretty-print.c (dump_generic_node): Provide -gimple variant for MEM_REF.
2017-01-12  Richard Biener  <rguenther@suse.de>

	* tree-pretty-print.c (dump_generic_node): Provide -gimple
	variant for MEM_REF.  Sanitize INTEGER_CST for -gimple.

	c/
	* gimple-parser.c (c_parser_gimple_postfix_expression): Parse
	__MEM.

	* gcc.dg/gimplefe-21.c: New testcase.

From-SVN: r244350
2017-01-12 08:33:09 +00:00
Michael Collison f15dbadbf6 zero_bits_compound-2.c: Fix test for aarch64.
2016-11-30  Michael Collison  <michael.collison@arm.com>

	* gcc.dg/zero_bits_compound-2.c: Fix test for aarch64.

From-SVN: r244348
2017-01-12 08:12:02 +00:00
Julia Koval 73e32c4743 i386-common.c (OPTION_MASK_ISA_SGX_UNSET): New.
* common/config/i386/i386-common.c (OPTION_MASK_ISA_SGX_UNSET): New.
	(OPTION_MASK_ISA_SGX_SET): New.
	(ix86_handle_option): Handle OPT_msgx.
	* config.gcc: Added sgxintrin.h.
	* config/i386/driver-i386.c (host_detect_local_cpu): Detect sgx.
	* config/i386/i386-c.c (ix86_target_macros_internal): Define __SGX__.
	* config/i386/i386.c (ix86_target_string): Add -msgx.
	(PTA_SGX): New.
	(ix86_option_override_internal): Handle new options.
	(ix86_valid_target_attribute_inner_p): Add sgx.
	* config/i386/i386.h (TARGET_SGX, TARGET_SGX_P): New.
	* config/i386/i386.opt: Add msgx.
	* config/i386/sgxintrin.h: New file.
	* config/i386/x86intrin.h: Add sgxintrin.h.

testsuite/ChangeLog:

	* gcc.target/i386/sgx.c New test.
	* gcc.target/i386/sse-12.c: Add -msgx.
	* gcc.target/i386/sse-13.c: Ditto.
	* gcc.target/i386/sse-14.c: Ditto.
	* gcc.target/i386/sse-22.c: Ditto.
	* gcc.target/i386/sse-23.c: Ditto.
	* g++.dg/other/i386-2.C: Ditto.
	* g++.dg/other/i386-3.C: Ditto.


Co-Authored-By: Uros Bizjak <ubizjak@gmail.com>

From-SVN: r244339
2017-01-11 22:41:13 +01:00
Martin Sebor 3594adc7b0 PR c++/24511 - [DR 470] explicit instantiation/extern template unsats
PR c++/24511 - [DR 470] explicit instantiation/extern template unsats
// on symbols defined later

gcc/testsuite/ChangeLog:
	* g++.dg/template/explicit9.C: New test.

From-SVN: r244337
2017-01-11 14:02:46 -07:00
Nathan Sidwell 01bfd25762 re PR c++/77812 (incorrectly rejects valid C++ code that uses enum in template instantiation)
cp/
	PR c++/77812
	* name-lookup.c (set_namespace_binding_1): An overload of 1 decl
	is a new overload.

	testsuite/
	PR c++/77812
	* g++.dg/pr77812.C: New.

From-SVN: r244335
2017-01-11 20:37:16 +00:00
Jakub Jelinek eae63d784c re PR c++/71537 (GCC rejects consetxpr boolean conversions and comparisons on the result of pointer arithmetic.)
PR c++/71537
	* fold-const.c (maybe_nonzero_address): Return 1 for function
	local objects.
	(tree_single_nonzero_warnv_p): Don't handle function local objects
	here.

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

From-SVN: r244333
2017-01-11 21:10:36 +01:00
Jakub Jelinek 88df7964b5 flatten-3.c: Add quotation marks around dg-options argument.
* gcc.dg/tree-ssa/flatten-3.c: Add quotation marks around dg-options
	argument.

From-SVN: r244332
2017-01-11 20:48:56 +01:00
Martin Sebor 960ecba4bf PR c/47931 - missing -Waddress warning for comparison with NULL
gcc/testsuite/ChangeLog:
	* c-c++-common/Waddress-2.c: New test.

From-SVN: r244331
2017-01-11 11:33:13 -07:00
Jakub Jelinek 1f258a55a9 re PR c++/78341 (ICE on invalid C++ code on x86_64-linux-gnu (internal compiler error: in cp_parser_std_attribute_spec, at cp/parser.c:24597))
PR c++/78341
	* parser.c (cp_parser_std_attribute_spec): Remove over-eager
	assertion.  Formatting fix.

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

From-SVN: r244329
2017-01-11 19:09:58 +01:00
Martin Sebor bf5fbf465d PR c/78768 - -Walloca-larger-than and -Wformat-length warnings disabled by -flto
gcc/ChangeLog:
	* c.opt (-Walloca-larger-than, -Wformat-length, -Wformat-truncation):
	Also enable for LTO.

gcc/testsuite/ChangeLog:
	PR c/78768
	* gcc.dg/pr78768.c: New test.

From-SVN: r244326
2017-01-11 10:28:52 -07:00
David Malcolm 19ff0049cd Offer suggestions for unrecognized sanitizer options (PR driver/78877)
gcc/ChangeLog:
	PR driver/78877
	* opts.c: Include "spellcheck.h"
	(struct string_fragment): New struct.
	(struct edit_distance_traits<const string_fragment &>): New
	struct.
	(get_closest_sanitizer_option): New function.
	(parse_sanitizer_options): Offer suggestions for unrecognized arguments.

gcc/testsuite/ChangeLog:
	PR driver/78877
	* gcc.dg/spellcheck-options-14.c: New test case.
	* gcc.dg/spellcheck-options-15.c: New test case.
	* gcc.dg/spellcheck-options-16.c: New test case.
	* gcc.dg/spellcheck-options-17.c: New test case.

From-SVN: r244325
2017-01-11 17:25:40 +00:00
Martin Liska c86e9f03ab Fix flatten-3.c test-case.
2017-01-11  Martin Liska  <mliska@suse.cz>

	* gcc.dg/tree-ssa/flatten-3.c: Add -fno-ipa-icf to dg-options.

From-SVN: r244313
2017-01-11 12:17:27 +00:00
Jakub Jelinek 947f51d61b decomp4.C (test): Use 2 identifier decomposition instead of just 1 for the decomposition from...
* g++.dg/cpp1z/decomp4.C (test): Use 2 identifier decomposition
	instead of just 1 for the decomposition from struct C.

From-SVN: r244312
2017-01-11 12:47:30 +01:00
Eric Botcazou 849fccf831 re PR rtl-optimization/79032 (unaligned memory access generated with LRA and optimization)
PR rtl-optimization/79032
	* lra-constraints.c (simplify_operand_subreg): In the MEM case, test
	the alignment of the adjusted memory reference against that of MODE,
	instead of the alignment of the original memory reference.

From-SVN: r244311
2017-01-11 11:27:43 +00:00
Richard Biener 80c74722bc tree-vrp.c (evrp_dom_walker::before_dom_children): Also set range/nonnull info for PHI results.
2017-01-11  Richard Biener  <rguenther@suse.de>

	* tree-vrp.c (evrp_dom_walker::before_dom_children): Also
	set range/nonnull info for PHI results.  Do not set it on
	stmts marked for removal.

	* gcc.dg/tree-ssa/pr61743-1.c: Adjust.

From-SVN: r244305
2017-01-11 09:06:29 +00:00
Jakub Jelinek 4c4b47031d re PR middle-end/50199 (wrong code with -flto -fno-merge-constants)
PR middle-end/50199
	* lto-lang.c (lto_post_options): Force flag_merge_constants = 1
	if it was 0.

	* gcc.dg/lto/pr50199_0.c: New test.

From-SVN: r244304
2017-01-11 09:40:59 +01:00
Martin Sebor 664b1a6b29 PR testsuite/78960 - FAIL: gcc.dg/tree-ssa/builtin-sprintf.c execution test
PR testsuite/78960 - FAIL: gcc.dg/tree-ssa/builtin-sprintf.c execution test
PR testsuite/78959 - FAIL: gcc.c-torture/execute/pr78622.c 
PR testsuite/78133 - Commit r241489 adds printf specifiers not supported by newlib

gcc/testsuite/ChangeLog:
	PR testsuite/78960
	PR testsuite/78959
	PR testsuite/78133
	* gcc.dg/tree-ssa/builtin-sprintf.c: Require C99 runtime.
	* gcc.dg/tree-ssa/pr78622.c: Ditto.

From-SVN: r244298
2017-01-10 15:45:52 -07:00
Martin Sebor fefd30867d PR middle-end/78138 - missing warnings on buffer overflow with non-constant source length
gcc/testsuite/ChangeLog:

	PR middle-end/78138
	* gcc.dg/pr78138.c: New test.

From-SVN: r244297
2017-01-10 15:35:22 -07:00
Martin Sebor 5a50f6bbed PR middle-end/78245 - missing -Wformat-length on an overflow of a dynamically allocated buffer
gcc/testsuite/ChangeLog:

	PR middle-end/78245
	* gcc.dg/tree-ssa/builtin-sprintf-warn-3.c: Add tests.

gcc/ChangeLog:

	PR middle-end/78245
	* gimple-ssa-sprintf.c (get_destination_size): Call
	{init,fini}object_sizes.
	* tree-object-size.c (addr_object_size): Adjust.
	(pass_through_call): Adjust.
	(pass_object_sizes::execute): Adjust.
	* tree-object-size.h (fini_object_sizes): Declare.

From-SVN: r244294
2017-01-10 14:56:44 -07:00
David Malcolm b9f4757f8e Fix issues with unrepresentable column numbers (PR c++/77949)
PR c++/77949 identifies an ICE when the C++ frontend attempts to emit a
fix-it hint inserting a missing semicolon at column 4097 of a source file.

This column value exceeds LINE_MAP_MAX_COLUMN_NUMBER and hence isn't
representable using a location_t.

Attempting to do so leads to these problems, which this patch fixes:

(a) when encountering a column number > LINE_MAP_MAX_COLUMN_NUMBER we
create a new linemap with m_column_and_range_bits == 0, but
linemap_position_for_column doesn't check for this, and hence can emit
a bogus location_t value that's calculated relative to the previous
linemap start, but which will be decoded relative to the new linemap,
leading to very large incorrect line values.

(b) when encountering a column number that can't be represented, and
for which the linemap was pre-existing, the code would hit this assertion:
  if (linemap_assert_fails (column < (1u << map->m_column_and_range_bits)))
around a bail-out condition.  The patch replaces this assertion with a
simple conditional, to stop the ICE when this occurs, and fixes the
bit count (effective column bits, vs column+range bits)

(c) the C++ frontend wasn't checking for failure of
linemap_position_for_loc_and_offset when considering emitting the fix-it
hint.  The patch adds a conditional, so that no fix-it hint is emitted
if the location is bogus.

gcc/cp/ChangeLog:
	PR c++/77949
	* parser.c (cp_parser_class_specifier_1): Only suggest inserting
	a missing semicolon if we have a valid insertion location for
	the fix-it hint.

gcc/ChangeLog:
	PR c++/77949
	* input.c (selftest::test_accessing_ordinary_linemaps): Verify
	that we correctly handle column numbers greater than
	LINE_MAP_MAX_COLUMN_NUMBER.

gcc/testsuite/ChangeLog:
	PR c++/77949
	* g++.dg/diagnostic/pr77949.C: New test case.

libcpp/ChangeLog:
	PR c++/77949
	* line-map.c (linemap_position_for_column): When calling
	linemap_start_line, detect if a new linemap was created with
	0 column bits, and bail out early if this is the case.
	(linemap_position_for_loc_and_offset): Replace overzealous
	linemap_assert_fails with a simple conditional; use correct
	bit count.

From-SVN: r244292
2017-01-10 21:54:09 +00:00
Martin Sebor c16880eff0 PR tree-optimization/78775 - [7 Regression] ICE in maybe_warn_alloc_args_overflow
gcc/ChangeLog:

	PR tree-optimization/78775
	* builtins.c (get_size_range): Move...
	* calls.c: ...to here.
	(alloc_max_size): Accept zero argument.
	(operand_signed_p): Remove.
	(maybe_warn_alloc_args_overflow): Call get_size_range.
	* calls.h (get_size_range): Declare.

gcc/testsuite/ChangeLog:

	PR tree-optimization/78775
	* gcc.dg/attr-alloc_size-4.c: Add test cases.
	* gcc.dg/attr-alloc_size-10.c: New test.
	* gcc.dg/attr-alloc_size-11.c: New test.
	* gcc.dg/builtin-stringop-chk-7.c: New test.
	* gcc.dg/pr78775.c: New test.
	* gcc.dg/pr78973-2.c: New test.
	* gcc.dg/pr78973.c: New test.

From-SVN: r244290
2017-01-10 14:02:07 -07:00
Jeff Law 5363d9d949 re PR middle-end/77766 (wrong code at -O2 and -O3 in 64-bit mode on x86_64-linux-gnu (executable hangs))
PR tree-optimization/77766
	PR tree-optimization/78856
	* gcc.c-torture/execute/pr77766.c: New test.

From-SVN: r244287
2017-01-10 13:55:59 -07:00
Richard Biener aae23693f8 re PR tree-optimization/79034 (error: missing PHI def in verify_gimple_in_cfg)
2016-01-10  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/79034
	* tree-call-cdce.c (shrink_wrap_one_built_in_call_with_conds):
	Propagate out degenerate PHIs in the joiner.

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

From-SVN: r244274
2017-01-10 14:50:32 +00:00
Martin Liska a0843aedb8 IPA ICF: make algorithm stable to survive -fcompare-debug
2017-01-10  Martin Liska  <mliska@suse.cz>

	* gcc.dg/ipa/ipa-icf-1.c: Change scanned pattern.
	* gcc.dg/ipa/ipa-icf-10.c: Likewise.
	* gcc.dg/ipa/ipa-icf-11.c: Likewise.
	* gcc.dg/ipa/ipa-icf-12.c: Likewise.
	* gcc.dg/ipa/ipa-icf-13.c: Likewise.
	* gcc.dg/ipa/ipa-icf-16.c: Likewise.
	* gcc.dg/ipa/ipa-icf-18.c: Likewise.
	* gcc.dg/ipa/ipa-icf-2.c: Likewise.
	* gcc.dg/ipa/ipa-icf-20.c: Likewise.
	* gcc.dg/ipa/ipa-icf-21.c: Likewise.
	* gcc.dg/ipa/ipa-icf-23.c: Likewise.
	* gcc.dg/ipa/ipa-icf-25.c: Likewise.
	* gcc.dg/ipa/ipa-icf-26.c: Likewise.
	* gcc.dg/ipa/ipa-icf-27.c: Likewise.
	* gcc.dg/ipa/ipa-icf-3.c: Likewise.
	* gcc.dg/ipa/ipa-icf-35.c: Likewise.
	* gcc.dg/ipa/ipa-icf-36.c: Likewise.
	* gcc.dg/ipa/ipa-icf-37.c: Likewise.
	* gcc.dg/ipa/ipa-icf-5.c: Likewise.
	* gcc.dg/ipa/ipa-icf-7.c: Likewise.
	* gcc.dg/ipa/ipa-icf-8.c: Likewise.
	* gcc.dg/ipa/pr64307.c: Likewise.
	* gcc.dg/ipa/pr77653.c: Likewise.
2017-01-10  Martin Liska  <mliska@suse.cz>

	* ipa-icf.c (sort_sem_items_by_decl_uid): New function.
	(sort_congruence_classes_by_decl_uid): Likewise.
	(sort_congruence_class_groups_by_decl_uid): Likewise.
	(sem_item_optimizer::merge_classes): Sort class, groups in these
	classes and members in the groups by DECL_UID of declarations.
	This would make merge operations stable.

From-SVN: r244273
2017-01-10 14:39:33 +00:00
Andrew Senkevich 79fc8ffe6c Enable AVX-512 VPOPCNTD/VPOPCNTQ instructions.
gcc/
	* common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512VPOPCNTDQ_SET,
	OPTION_MASK_ISA_AVX512VPOPCNTDQ_UNSET): New.
	* config.gcc: Add avx512vpopcntdqintrin.h.
	* config/i386/avx512vpopcntdqintrin.h: New.
	* config/i386/cpuid.h (bit_AVX512VPOPCNTDQ): New.
	* config/i386/i386-builtin-types.def: Add new types.
	* config/i386/i386-builtin.def (__builtin_ia32_vpopcountd_v16si,
	__builtin_ia32_vpopcountd_v16si_mask, __builtin_ia32_vpopcountq_v8di,
	__builtin_ia32_vpopcountq_v8di_mask): New.
	* config/i386/i386-c.c (ix86_target_macros_internal): Define
	__AVX512VPOPCNTDQ__.
	* config/i386/i386.c (ix86_target_string): Add -mavx512vpopcntdq.
	(PTA_AVX512VPOPCNTDQ): Define.
	* config/i386/i386.h (TARGET_AVX512VPOPCNTDQ,
	TARGET_AVX512VPOPCNTDQ_P): Define.
	* config/i386/i386.opt: Add mavx512vpopcntdq.
	* config/i386/immintrin.h: Include avx512vpopcntdqintrin.h.
	* config/i386/sse.md (define_insn "vpopcount<mode><mask_name>"): New.

libgcc/
	* config/i386/cpuinfo.h (processor_features): Add
	FEATURE_AVX512VPOPCNTDQ.
	* config/i386/cpuinfo.c (get_available_features): Habdle new
	feature.

gcc/testsuite/
	* g++.dg/other/i386-2.C: Add -mavx512vpopcntdq.
	* g++.dg/other/i386-3.C: Ditto.
	* gcc.target/i386/sse-12.c: Ditto.
	* gcc.target/i386/sse-13.c: Ditto.
	* gcc.target/i386/sse-22.c: Ditto.
	* gcc.target/i386/sse-23.c: Ditto.
	* gcc.target/i386/builtin_target.c: Handle new option.
	* gcc.target/i386/funcspec-56.inc: Test new attributes.
	* gcc.target/i386/avx512vpopcntdq-vpopcntd.c: New test.
	* gcc.target/i386/avx512vpopcntdq-vpopcntq.c: Ditto.

From-SVN: r244263
2017-01-10 12:55:41 +00:00
Martin Sebor dfa6951fdc PR testsuite/79036 - gcc.dg/tree-ssa/builtin-sprintf.c fails starting with r244037
PR testsuite/79036 - gcc.dg/tree-ssa/builtin-sprintf.c fails starting with r244037
gcc/testsuite/ChangeLog:
	* gcc.dg/tree-ssa/builtin-sprintf.c: Handle extended formats
	with different precisions.

From-SVN: r244250
2017-01-09 16:31:38 -07:00
Eric Botcazou a271e41561 expr.c (store_field): In the bitfield case...
* expr.c (store_field): In the bitfield case, if the value comes from
	a function call and is of an aggregate type returned in registers, do
	not modify the field mode; extract the value in all cases if the mode
	is BLKmode and the size is not larger than a word.

From-SVN: r244249
2017-01-09 22:17:17 +00:00
Jakub Jelinek bd2c62704b re PR translation/79019 (translatable string typo in cif-code.def:141)
PR translation/79019
	PR translation/79020
	* params.def (PARAM_INLINE_MIN_SPEEDUP,
	PARAM_IPA_CP_SINGLE_CALL_PENALTY,
	PARAM_USE_AFTER_SCOPE_DIRECT_EMISSION_THRESHOLD): Fix typos
	in descriptions.
	* config/avr/avr.opt (maccumulate-args): Likewise.
	* config/msp430/msp430.opt (mwarn-mcu): Likewise.
	* common.opt (freport-bug): Likewise.
	* cif-code.def (CIF_FINAL_ERROR): Likewise.
	* doc/invoke.texi (ipa-cp-single-call-penalty): Likewise.
	* config/s390/s390.c (s390_invalid_binary_op): Fix spelling in
	translatable string.
	* config/i386/i386.c (function_value_32): Likewise.
	* config/nios2/nios2.c (nios2_valid_target_attribute_rec): Likewise.
	* config/msp430/msp430.c (msp430_option_override, msp430_attr):
	Likewise.
	* config/msp430/driver-msp430.c (msp430_select_hwmult_lib): Likewise.
	* common/config/msp430/msp430-common.c (msp430_handle_option):
	Likewise.
	* symtab.c (symtab_node::verify_base): Likewise.
	* opts.c (set_debug_level): Likewise.
	* tree.c (verify_type_variant): Likewise.  Fix typo in comment.
	* config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Add
	missing whitespace to translatable strings.
	* config/avr/avr.md (bswapsi2): Fix typo in comment.
	* config/sh/superh.h: Likewise.
	* config/i386/xopintrin.h: Likewise.
	* config/i386/znver1.md: Likewise.
	* config/rs6000/rs6000.c (struct rs6000_opt_mask): Likewise.
	* ipa-inline-analysis.c (compute_inline_parameters): Likewise.
	* double-int.h (struct double_int): Likewise.
	* double-int.c (div_and_round_double): Likewise.
	* wide-int.cc: Likewise.
	* tree-ssa.c (non_rewritable_mem_ref_base): Likewise.
	* tree-ssa-sccvn.c (vn_reference_lookup_3): Likewise.
	* cfgcleanup.c (crossjumps_occured): Renamed to ...
	(crossjumps_occurred): ... this.
	(try_crossjump_bb, try_head_merge_bb, try_optimize_cfg, cleanup_cfg):
	Adjust all uses.
cp/
	* semantics.c (finish_omp_clauses): Add missing whitespace to
	translatable strings.
	* cp-cilkplus.c (cpp_validate_cilk_plus_loop_aux): Fix comment typo.
lto/
	* lto-symtab.c (lto_symtab_merge_symbols): Fix comment typo.
fortran/
	* decl.c (attr_decl1): Fix spelling in translatable string.
	* intrinsic.texi: Fix spelling - invokation -> invocation.
	* lang.opt (faggressive-function-elimination, gfc_convert): Fix
	typos in descriptions.
	* openmp.c (resolve_omp_clauses): Add missing whitespace to
	translatable strings.
c-family/
	* c.opt (Wnormalized=): Fix typo in description.
testsuite/
	* c-c++-common/goacc/host_data-2.c (f): Adjust expected spelling of
	diagnostics.
	* gfortran.dg/initialization_17.f90: Likewise.

From-SVN: r244245
2017-01-09 22:48:33 +01:00
Dominique d'Humieres 1c1d8e7506 re PR testsuite/79026 (The tests changed by revision r244006 now fail on darwin)
testsuite/ChangeLog:

	PR testsuite/79026
	* gcc.target/i386/pr78904-2.c: Require nonpic targets.
	* gcc.target/i386/pr78904-4.c: Likewise.
	* gcc.target/i386/pr78904-6.c: Likewise.
	* gcc.target/i386/pr78967-2.c: Likewise.

From-SVN: r244244
2017-01-09 22:41:02 +01:00
Jakub Jelinek cb330ba582 re PR tree-optimization/78899 (Vestorized loop with optmized mask stores motion is completely deleted after r242520.)
PR tree-optimization/78899
	* tree-if-conv.c (version_loop_for_if_conversion): Instead of
	returning bool return struct loop *, NULL for failure and the new
	loop on success.
	(versionable_outer_loop_p): Don't version outer loop if it has
	dont_vectorized bit set.
	(tree_if_conversion): When versioning outer loop, ensure
	tree_if_conversion is performed also on the inner loop of the
	non-vectorizable outer loop copy.
	* tree-vectorizer.c (set_uid_loop_bbs): Formatting fix.  Fold
	LOOP_VECTORIZED in inner loop of the scalar outer loop and
	prevent vectorization of it.
	(vectorize_loops): For outer + inner LOOP_VECTORIZED, ensure
	the outer loop vectorization of the non-scalar version is attempted
	before vectorization of the inner loop in scalar version.  If
	outer LOOP_VECTORIZED guarded loop is not vectorized, prevent
	vectorization of its inner loop.
	* tree-vect-loop-manip.c (rename_variables_in_bb): If outer_loop
	has 2 inner loops, rename also on edges from bb whose single pred
	is outer_loop->header.  Fix typo in function comment.

	* gcc.target/i386/pr78899.c: New test.
	* gcc.dg/pr71077.c: New test.

From-SVN: r244238
2017-01-09 21:10:23 +01:00