Commit Graph

146751 Commits

Author SHA1 Message Date
Bernd Edlinger
10d2fc2324 input.c (test_builtins): Fix an assertion.
2016-06-13  Bernd Edlinger  <bernd.edlinger@hotmail.de>

	* input.c (test_builtins): Fix an assertion.

From-SVN: r237383
2016-06-13 15:45:54 +00:00
Uros Bizjak
ac43f1a8c4 i386.md (paritydi2): Use ix86_expand_setcc.
* config/i386/i386.md (paritydi2): Use ix86_expand_setcc.
	(paritysi2): Ditto.
	(isinfxf2): Ditto.
	(isinf<mode>2): Ditto.

From-SVN: r237382
2016-06-13 16:38:51 +02:00
Uros Bizjak
30717592e2 ggc-tests.c (test_finalization): Only test need_finalization_p for GCC_VERSION >= 4003.
* ggc-tests.c (test_finalization): Only test need_finalization_p
	for GCC_VERSION >= 4003.

From-SVN: r237381
2016-06-13 16:27:01 +02:00
Martin Liska
ad23a23ed2 Make 'loop iv compare' heuristics scanning more precise
* gcc.dg/predict-1.c: Distinguish between "loop iv compare"
	and "guess loop iv compared" heuristics.
	* gcc.dg/predict-2.c: Likewise.
	* gcc.dg/predict-3.c: Likewise.
	* gcc.dg/predict-4.c: Likewise.
	* gcc.dg/predict-5.c: Likewise.
	* gcc.dg/predict-6.c: Likewise.

From-SVN: r237380
2016-06-13 14:03:51 +00:00
Andreas Krebbel
548e7de920 S/390: vecintrin.h fix file description in comment
gcc/ChangeLog:

2016-06-13  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>

	* config/s390/vecintrin.h: Fix file description in comment.

From-SVN: r237378
2016-06-13 12:05:43 +00:00
Andreas Krebbel
25fb89dfb1 S/390: Change builtin type naming scheme to match builtin-types.def.
gcc/ChangeLog:

2016-06-13  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>

	* config/s390/s390-builtin-types.def: Change builtin type naming
	scheme to match builtin-types.def.

From-SVN: r237377
2016-06-13 12:04:57 +00:00
Marc Glisse
b4817bd635 Move optimize_minmax_comparison to match.pd
2016-06-13  Marc Glisse  <marc.glisse@inria.fr>

	* fold-const.c (optimize_minmax_comparison): Remove.
	(fold_comparison): Remove call to the above.
	* match.pd (MIN (X, Y) == X, MIN (X, 5) == 0, MIN (X, C1) < C2):
	New transformations.

From-SVN: r237376
2016-06-13 11:21:45 +00:00
Alan Hayward
915794eb26 re PR tree-optimization/71416 (ICE at -O3 in 32-bit and 64-bit modes on x86_64-linux-gnu (vectorizable_live_operation))
2016-06-13  Alan Hayward  <alan.hayward@arm.com>

gcc/
	PR tree-optimization/71416
	* tree-vect-loop.c (vectorizable_live_operation): Let worklist have
	multiple entries

From-SVN: r237375
2016-06-13 11:07:35 +00:00
Martin Liska
46c1cff63f Change enum value to not to clash with a MSP430 private enum
* predict.c (enum predictor_reason): Prefix enum with REASON_.
	(combine_predictions_for_insn): Likewise.
	(prune_predictions_for_bb): Likewise.
	(combine_predictions_for_bb): Likewise.

From-SVN: r237370
2016-06-13 10:00:17 +00:00
Richard Biener
7a5824c6d7 re PR tree-optimization/71505 (-O3 internal compiler error in vect_analyze_data_ref_accesses, at tree-vect-data-refs.c:2596)
2016-06-13  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/71505
	* tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Make
	assert match comment.

From-SVN: r237368
2016-06-13 09:44:51 +00:00
Marek Polacek
146c55da60 re PR middle-end/71476 (ICE in gimplify_switch_expr with -Wswitch-unreachable)
PR middle-end/71476
	* gimplify.c (maybe_warn_switch_unreachable): Factored out of
	gimplify_switch_expr.
	(warn_switch_unreachable_r): New function.

	* c-c++-common/Wswitch-unreachable-4.c: New test.
	* gcc.dg/Wswitch-unreachable-2.c: New test.
	* g++.dg/tm/jump1.C: Move dg-warning.

From-SVN: r237367
2016-06-13 08:57:02 +00:00
Andreas Krebbel
f90eba2a3c S/390: Fix MAX_ARGS value.
gcc/ChangeLog:

2016-06-13  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>

	PR target/71379
	* config/s390/s390.c (s390_expand_builtin): Increase MAX_ARGS by
	one.

From-SVN: r237364
2016-06-13 08:34:45 +00:00
Richard Biener
50a593c7e2 download_prerequisites (ISL): Bump version to 0.16.1
2016-06-13  Richard Biener  <rguenther@suse.de>

	* download_prerequisites (ISL): Bump version to 0.16.1

From-SVN: r237363
2016-06-13 08:18:51 +00:00
Eric Botcazou
7cdb687133 decl.c (gnat_to_gnu_subprog_type): Build only a minimal PARM_DECL when the parameter type is dummy.
* gcc-interface/decl.c (gnat_to_gnu_subprog_type): Build only a minimal
	PARM_DECL when the parameter type is dummy.
	* gcc-interface/trans.c (Call_to_gnu): Translate formal types before
	formal objects.

From-SVN: r237362
2016-06-13 08:17:07 +00:00
Eric Botcazou
42e77cbc7d decl.c (gnat_to_gnu_entity): Deal with PLUS_EXPR in the expression of a renaming.
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Deal with
	PLUS_EXPR in the expression of a renaming.

From-SVN: r237360
2016-06-13 08:00:17 +00:00
Paul Thomas
7474dcc1fe re PR fortran/70673 (ICE with module containing functions with allocatable character scalars)
2016-06-13  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/70673
	* frontend-passes.c (realloc_string_callback): Add a call to
	gfc_dep_compare_expr.

2016-06-13  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/70673
	* gfortran.dg/pr70673.f90: New test.

From-SVN: r237358
2016-06-13 07:48:25 +00:00
Jonathan Wakely
4eb27c4174 generate_libstdcxx_web_docs: Use realpath to get absolute path.
* generate_libstdcxx_web_docs: Use realpath to get absolute path.

	Add comment about LaTeX errors.

From-SVN: r237357
2016-06-13 08:47:13 +01:00
Eric Botcazou
0317e5a24c utils2.c (known_alignment): Deal specially with calls to malloc.
* gcc-interface/utils2.c (known_alignment) <CALL_EXPR>: Deal specially
	with calls to malloc.

From-SVN: r237356
2016-06-13 07:40:47 +00:00
Richard Biener
f57f53d3a5 re PR middle-end/64516 (arm: wrong unaligned load generated)
2016-06-13  Richard Biener  <rguenther@suse.de>

	PR middle-end/64516
	* fold-const.c (fold_unary_loc): Preserve alignment when
	folding a VIEW_CONVERT_EXPR into a MEM_REF.

	* gcc.dg/align-3.c: New testcase.

From-SVN: r237355
2016-06-13 07:34:45 +00:00
Paolo Carlini
f423253bd7 decl.c (grokdeclarator): Fix typo in pedwarn text.
2016-06-13  Paolo Carlini  <paolo.carlini@oracle.com>

	* decl.c (grokdeclarator): Fix typo in pedwarn text.

From-SVN: r237354
2016-06-13 07:28:33 +00:00
Martin Liska
5843a5f0a2 Do not enable -fcheck-pointer-bounds w/ -fsanitize=bounds
PR sanitizer/71458
	* toplev.c (process_options): Do not enable -fcheck-pointer-bounds
	w/ -fsanitize=bounds.
	* gcc.target/i386/pr71458.c: New test.

From-SVN: r237353
2016-06-13 07:17:16 +00:00
GCC Administrator
1d1ca0deaa Daily bump.
From-SVN: r237349
2016-06-13 00:16:21 +00:00
Uros Bizjak
e449556dc8 i386.c (ix86_init_builtins): Calculate FLOAT128_FTYPE_CONST_STRING function type only once.
* config/i386/i386.c (ix86_init_builtins): Calculate
	FLOAT128_FTYPE_CONST_STRING function type only once.
	* doc/extend.texi (x86 Built-in Functions): Update text, __float128
	built-in functions are available for x86-32 and x86-64 targets.

From-SVN: r237342
2016-06-12 21:38:42 +02:00
Uros Bizjak
ee38bd2e97 Add missing commit:
* doc/extend.texi (x86 Built-in Functions): Document
	__builtin_nanq and __builtin_nansq.

From-SVN: r237339
2016-06-12 20:05:36 +02:00
Uros Bizjak
aa8fdb441f re PR target/71241 ([x86] Missing built-in functions for float128 NaNs)
PR target/71241
	* config/i386/i386.i386-builtin-types.def (CONST_STRING):
	New primitive type.
	(FLOAT128_FTYPE_CONST_STRING): New function type.
	* config/i386/i386.c (enum ix86_builtins) [IX86_BUILTIN_NANQ]: New.
	[IX86_BUILTIN_NANSQ]: Ditto.
	(ix86_fold_builtin): Handle IX86_BUILTIN_NANQ and IX86_BUILTIN_NANSQ.
	(ix86_init_builtin_types) Declare const_string_type_node.
	Add __builtin_nanq and __builtin_nansq builtin functions.
	(ix86_expand_builtin): Handle IX86_BUILTIN_NANQ and IX86_BUILTIN_NANSQ.
	* doc/extend.texi (x86 Built-in Functions): Document
	__builtin_nanq and __builtin_nansq.

testsuite/ChangeLog:

	PR target/71241
	* testsuite/gcc.dg/torture/float128-nan.c: New test.

From-SVN: r237338
2016-06-12 19:22:16 +02:00
GCC Administrator
a543674d47 Daily bump.
From-SVN: r237336
2016-06-12 00:16:17 +00:00
Dominique d'Humieres
2043e4d760 re PR fortran/60751 (Extra comma in WRITE statement not diagnosed)
2016-06-12  Dominique d'Humieres  <dominiq@lps.ens.fr>

	PR target/60751
	* gfortran.dg/guality/pr41558.f90: Remove extra comma in WRITE
	statement.

From-SVN: r237332
2016-06-12 00:36:50 +02:00
Jiong Wang
5775d58c06 [ARM] length pop* pattern in epilogue correctly
PR target/71061
	* config/arm/arm-protos.h (arm_attr_length_pop_multi): New declaration.
	* config/arm/arm.c (arm_attr_length_pop_multi): New function to return
	length for pop patterns.
	(arm_attr_length_push_multi): Update comments.
	* config/arm/arm.md (*load_multiple_with_writeback): Set "length"
	attribute.
	(*pop_multiple_with_writeback_and_return): Likewise.
	(*pop_multiple_with_return): Likewise.

From-SVN: r237331
2016-06-11 20:42:26 +00:00
Dominique d'Humieres
a0d6600253 re PR fortran/60751 (Extra comma in WRITE statement not diagnosed)
2016-06-11  Dominique d'Humieres  <dominiq@lps.ens.fr>

	PR target/60751
	* gfortran.dg/comma_IO_extension_1.f90: New test.
	* gfortran.dg/comma_IO_extension_2.f90: Likewise.

From-SVN: r237330
2016-06-11 21:21:22 +02:00
Dominique d'Humieres
d3dc025d96 re PR fortran/60751 (Extra comma in WRITE statement not diagnosed)
2016-06-11  Dominique d'Humieres  <dominiq@lps.ens.fr>

	PR fortran/60751
	* io.c (gfc_resolve_dt): Replace GFC_STD_GNU with GFC_STD_LEGACY.

	* gfortran.dg/comma_IO_extension_1.f90: New test.
	* gfortran.dg/comma_IO_extension_2.f90: Likewise.
	* gfortran.dg/array_constructor_49.f90: Remove extra comma in WRITE
	statement.
	* gfortran.dg/graphite/pr38083.f90: Likewise.
	* gfortran.dg/integer_exponentiation_6.F90: Likewise and add
	missing format.

--This line

M    fortran/ChangeLog
M    fortran/io.c
M    testsuite/ChangeLog
M    testsuite/gfortran.dg/array_constructor_49.f90
M    testsuite/gfortran.dg/graphite/pr38083.f90
M    testsuite/gfortran.dg/integer_exponentiation_6.F90

From-SVN: r237329
2016-06-11 21:19:43 +02:00
Eric Botcazou
aa18f65ad4 trans.c (build_binary_op_trapv): If no operand is a constant, use the generic implementation of the middle-end...
* gcc-interface/trans.c (build_binary_op_trapv): If no operand is a
	constant, use the generic implementation of the middle-end; otherwise
	turn the dynamic conditions into static conditions and simplify.

From-SVN: r237328
2016-06-11 12:07:54 +00:00
Eric Botcazou
a31d78c6a0 * gcc-interface/trans.c (Case_Statement_to_gnu): Deal with characters.
From-SVN: r237326
2016-06-11 11:53:11 +00:00
Pierre-Marie de Rodat
773392af39 decl.c (gnat_to_gnu_entity): Do not clobber gnat_entity_name with temporary names for XUP and XUT types.
* gcc-interface/decl.c (gnat_to_gnu_entity): Do not clobber
	gnat_entity_name with temporary names for XUP and XUT types.

From-SVN: r237324
2016-06-11 11:23:54 +00:00
GCC Administrator
52b7270a5f Daily bump.
From-SVN: r237323
2016-06-11 00:16:23 +00:00
Segher Boessenkool
95c18dd046 fold-const: Don't access bit fields with too big mode (PR71310)
Currently, optimize_bit_field_compare reads the bitfield in word_mode
if it can.  If the bit field is normally accessed in a smaller mode,
this might be a violation of the memory model, although the "extra"
part of the read is not used.  But also, previous stores to the bit
field will have been done in the smaller mode, and then bigger loads
from it cause a LHS problem.


	PR middle-end/71310
	* fold-const.c (optimize_bit_field_compare): Don't try to use
	word_mode unconditionally for reading the bit field, look at
	DECL_BIT_FIELD_REPRESENTATIVE instead.

gcc/testsuite/
	PR middle-end/71310
	* gcc.target/powerpc/pr71310.c: New testcase.

From-SVN: r237319
2016-06-11 01:58:09 +02:00
Kugan Vivekanandarajah
b97d37b423 re PR tree-optimization/71478 (ICE in tree-ssa-reassoc.c after r236564)
gcc/testsuite/ChangeLog:

2016-06-11  Kugan Vivekanandarajah  <kuganv@linaro.org>

	PR middle-end/71478
	* gcc.dg/pr71478.c: New test.

gcc/ChangeLog:

2016-06-11  Kugan Vivekanandarajah  <kuganv@linaro.org>

	PR middle-end/71478
	* tree-ssa-reassoc.c (reassociate_bb): Remove (-1) from ops list for
	vector integer type.

From-SVN: r237318
2016-06-10 21:57:01 +00:00
Jakub Jelinek
ec1c20db05 re PR middle-end/71494 (label as value in nested function)
PR middle-end/71494
	* tree-nested.c (convert_nonlocal_reference_stmt): For GIMPLE_GOTO
	without LABEL_DECL, set *handled_ops_p to false instead of true.

	* gcc.c-torture/execute/pr71494.c: New test.

From-SVN: r237317
2016-06-10 21:49:05 +02:00
Jakub Jelinek
50b15873a2 re PR c/68657 ("gcc -Werror=sign-conversion test.i" shows invalid: -Wsign-conversion is not an option that controls warnings)
PR c/68657
	* c.opt (Wpsabi): Add Warning flag.

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

From-SVN: r237316
2016-06-10 21:46:13 +02:00
Jakub Jelinek
900bcda399 re PR inline-asm/68843 (ICE with "u" input constraint)
PR inline-asm/68843
	* gcc.target/i386/pr68843-2.c: Add dg-do run and empty dg-options.
	(test): Add -masm=intel alternatives.

From-SVN: r237315
2016-06-10 20:40:37 +02:00
Martin Sebor
4d926e3493 PR c/71392 - SEGV calling integer overflow built-ins with a null pointer
gcc/ChangeLog:
2016-06-10  Martin Sebor  <msebor@redhat.com>

	PR c/71392
	* builtin-attrs.def (ATTR_NOTHROW_NONNULL_LEAF_LIST): New macro.
	(ATTR_NOTHROW_NONNULL_TYPEGENERIC_LEAF): Same.
	* builtins.def (BUILT_IN_SADD_OVERFLOW, BUILT_IN_SADDL_OVERFLOW): Use
	them.
	(BUILT_IN_SADDLL_OVERFLOW, BUILT_IN_SSUB_OVERFLOW): Same.
	(BUILT_IN_SSUBL_OVERFLOW, BUILT_IN_SSUBLL_OVERFLOW): Same.
	(BUILT_IN_SMUL_OVERFLOW, BUILT_IN_SMULL_OVERFLOW): Same.
	(BUILT_IN_SMULLL_OVERFLOW, BUILT_IN_UADD_OVERFLOW): Same.
	(BUILT_IN_UADDL_OVERFLOW, BUILT_IN_UADDLL_OVERFLOW): Same.
	(BUILT_IN_USUB_OVERFLOW, BUILT_IN_USUBL_OVERFLOW): Same.
	(BUILT_IN_USUBLL_OVERFLOW, BUILT_IN_UMUL_OVERFLOW): Same.
	(BUILT_IN_UMULL_OVERFLOW, BUILT_IN_UMULLL_OVERFLOW):

gcc/ada/ChangeLog:
2016-06-10  Martin Sebor  <msebor@redhat.com>

	PR c/71392
	* gcc/ada/gcc-interface/utils.c (handle_nonnull_attribute): Accept
	the nonnull attribute in type-generic builtins.

gcc/c-family/ChangeLog:
2016-06-10  Martin Sebor  <msebor@redhat.com>

	PR c/71392
	* gcc/c-family/c-common.c (handle_nonnull_attribute): Accept
	the nonnull attribute in type-generic builtins.

gcc/lto/ChangeLog:
2016-06-10  Martin Sebor  <msebor@redhat.com>

	PR c/71392
	* gcc/lto/lto-lang.c (handle_nonnull_attribute): Accept the nonnull
	attribute in type-generic builtins.

gcc/testsuite/ChangeLog:
2016-06-10  Martin Sebor  <msebor@redhat.com>

	PR c/71392
	* c-c++-common/builtin-arith-overflow-1.c: Add test cases.

From-SVN: r237314
2016-06-10 11:38:19 -06:00
Bernd Edlinger
a102ee4ba8 arm.h (pool_vector_label, [...]): Remove.
2016-06-10  Bernd Edlinger  <bernd.edlinger@hotmail.de>

        * config/arm/arm.h (pool_vector_label,
        return_used_this_function): Remove.

From-SVN: r237313
2016-06-10 16:27:27 +00:00
Jeff Law
ad071b2b63 re PR tree-optimization/71335 (wrong code at -O2 and -O3 in 32-bit and 64-bit modes on x86_64-linux-gnu)
PR tree-optimization/71335
	* tree-ssa-threadbackward.c (profitable_jump_thread_path): Filter out
	zero length paths here.
	(convert_and_register_jump_thread_path): Remove hacks related to
	duplicated blocks in the jump thread path.
	(fsm_find_control_statement_thread_paths): Avoid putting the same
	block on the thread path twice, but ensure the thread path is
	unchanged from the caller's point of view.

	PR tree-optimization/71335
	* gcc.c-torture/execute/pr71335.c: New test.

From-SVN: r237312
2016-06-10 10:23:06 -06:00
Jan Hubicka
66b4d26113 predict.c (predict_loops): Remove PRED_LOOP_BRANCH.
* predict.c (predict_loops): Remove PRED_LOOP_BRANCH.
	* predict.def (PRED_LOOP_BRANCH): Remove.

From-SVN: r237311
2016-06-10 16:00:24 +00:00
David Malcolm
2704efe8c4 Remove platform-specific details from must-tail-call-2.c messages
gcc/testsuite/ChangeLog:
	* gcc.dg/plugin/must-tail-call-2.c: Remove all details from
	the various "cannot tail-call: " messages.

From-SVN: r237310
2016-06-10 14:14:04 +00:00
David Malcolm
8c4294b2ff Add ggc-tests.c
gcc/ChangeLog:
	* Makefile.in (OBJS): Add ggc-tests.o.
	(GTFILES): Add ggc-tests.c.
	* ggc-tests.c: New file.
	* selftest-run-tests.c (selftest::run_tests): Call
	selftest::ggc_tests_c_tests.
	* selftest.h (selftest::ggc_tests_c_tests): New prototype.

From-SVN: r237309
2016-06-10 13:41:03 +00:00
Christophe Lyon
18c9b7d424 pr37780_1.c: Use arm_arch_v6t2 effective target and options.
* gcc.target/arm/pr37780_1.c: Use arm_arch_v6t2 effective target and options.

From-SVN: r237308
2016-06-10 15:37:35 +02:00
Alexander Monakov
603aeb8750 * match.pd (-1 / B < A): Use :c to avoid pattern duplication.
From-SVN: r237307
2016-06-10 15:58:53 +03:00
Maxim Ostapenko
7cfa10f33c re PR sanitizer/71480 (ASan should align string constants to shadow granularity.)
2016-06-10  Maxim Ostapenko  <m.ostapenko@samsung.com>

	PR sanitizer/71480
	* varasm.c (place_block_symbol): Adjust alignment for asan protected
	STRING_CSTs even if TREE_CONSTANT_POOL_ADDRESS_P.

	* c-c++-common/asan/pr71480.c: New test.

From-SVN: r237306
2016-06-10 15:57:14 +03:00
Jan Hubicka
aade5c72c6 profile.c: Include cfgloop.h.
* profile.c: Include cfgloop.h.
	(branch_prob): Compute estimated number of iterations.
	* tree-ssa-loop-niter.c (estimate_numbers_of_iterations_loop): Do not
	recompute estimate number of iterations from profile.

From-SVN: r237305
2016-06-10 12:46:30 +00:00
H.J. Lu
1f24fd3e73 Use __USER_LABEL_PREFIX__ in asm statement
A target may have a prefix in function symbol.  Update interrrupt tests
to use __USER_LABEL_PREFIX__ for function symbol in asm statement.

	* gcc.dg/guality/pr68037-1.c (ASMNAME): New.
	(ASMNAME2): Likewise.
	(main): Replace fn in asm statement with ASMNAME ("fn").
	* gcc.dg/guality/pr68037-2.c: Likewise.
	* gcc.dg/guality/pr68037-3.c: Likewise.
	* gcc.dg/torture/pr68037-1.c: Likewise.
	* gcc.dg/torture/pr68037-2.c: Likewise.
	* gcc.dg/torture/pr68037-3.c: Likewise.

From-SVN: r237304
2016-06-10 05:38:16 -07:00