Commit Graph

171154 Commits

Author SHA1 Message Date
Eric Botcazou
da81cc570f * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Size>: Add assertion.
From-SVN: r275187
2019-08-30 14:26:20 +00:00
Marek Polacek
81e753d9c8 * doc/invoke.texi (-Wvolatile): Use @code for volatile.
From-SVN: r275178
2019-08-30 13:55:59 +00:00
Jonathan Wakely
61f5cb2313 PR libstdc++/89164 enforce constraints for uninitialized algos
The memmove optimizations for std::uninitialized_copy/fill/_n will
compile even if the type is not copy constructible, because std::copy
doesn't require copy construction to work. But the uninitialized
algorithms do require it.

This adds explicit static assertions to ensure we don't allow ill-formed
initializations.

	PR libstdc++/89164
	* include/bits/stl_algobase.h (__copy_move): Give descriptive names
	to template parameters.
	* include/bits/stl_uninitialized.h (uninitialized_copy)
	(uninitialized_fill, uninitialized_fill_n): Add static assertions to
	diagnose invalid uses.
	* testsuite/20_util/specialized_algorithms/uninitialized_copy/1.cc:
	Adjust expected error.
	* testsuite/20_util/specialized_algorithms/uninitialized_copy/89164.cc:
	New test.
	* testsuite/20_util/specialized_algorithms/uninitialized_copy_n/
	89164.cc: New test.
	* testsuite/20_util/specialized_algorithms/uninitialized_fill/89164.cc:
	New test.
	* testsuite/20_util/specialized_algorithms/uninitialized_fill_n/
	89164.cc: New test.
	* testsuite/23_containers/vector/cons/89164.cc: New test.
	* testsuite/23_containers/vector/cons/89164_c++17.cc: New test.

From-SVN: r275177
2019-08-30 14:54:49 +01:00
Eric Botcazou
815b536832 gigi.h (gigi_checking_assert): New macro.
* gcc-interface/gigi.h (gigi_checking_assert): New macro.
	* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Modular_Integer_Type>:
	Remove redundant test and adjust comments.  Minor tweaks.
	* gcc-interface/trans.c (Call_to_gnu): Do not generate range checks,
	instead assert that the Do_Range_Check flag is not set.  Adjust call
	to convert_with_check.
	(gnat_to_gnu): Likewise.
	(assoc_to_constructor): Likewise.
	(pos_to_constructor): Likewise.  Remove GNAT_COMPONENT_TYPE parameter.
	(emit_range_check): Delete.
	(convert_with_check): Remove RANGE_P parameter and adjust.  Do a single
	overflow check for modular types.

From-SVN: r275174
2019-08-30 13:50:34 +00:00
Bernd Edlinger
3eefaaa9fe arm.md (unaligned_loaddi, [...]): New unspec insn patterns.
2019-08-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>

        * config/arm/arm.md (unaligned_loaddi,
        unaligned_storedi): New unspec insn patterns.
        * config/arm/neon.md (unaligned_storev8qi): Likewise.
        * config/arm/arm.c (gen_cpymem_ldrd_strd): Use unaligned_loaddi
        and unaligned_storedi for 4-byte aligned memory.
        (arm_block_set_aligned_vect): Use unaligned_storev8qi for
        4-byte aligned memory.

From-SVN: r275063
2019-08-30 10:38:37 +00:00
Martin Jambor
bb4d170d7b [PR 91579] Avoid creating redundant PHI nodes in tail-call pass
2019-08-30  Martin Jambor  <mjambor@suse.cz>

	tree-optimization/91579
	* tree-tailcall.c (tailr_arg_needs_copy): New variable.
	(find_tail_calls): Allocate tailr_arg_needs_copy and set its bits as
	appropriate.
	(arg_needs_copy_p): Removed.
	(eliminate_tail_call): Test tailr_arg_needs_copy instead of calling
	arg_needs_copy_p.
	(tree_optimize_tail_calls_1): Likewise.  Free tailr_arg_needs_copy.

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

From-SVN: r275062
2019-08-30 10:08:42 +02:00
GCC Administrator
ffb738a286 Daily bump.
From-SVN: r275059
2019-08-30 00:16:23 +00:00
Uros Bizjak
2a3daf5b61 * config/i386/i386-features.c
(general_scalar_chain::compute_convert_gain):
	Correct cost for double-word shifts.
	(general_scalar_to_vector_candidate_p): Reject count operands
	greater or equal to mode bitsize.

From-SVN: r275055
2019-08-29 21:47:19 +02:00
Uros Bizjak
d1041899c2 i386.c (inline_secondary_memory_needed): Return true for moves between SSE and non-general registers and between mask...
* config/i386/i386.c (inline_secondary_memory_needed): Return true
	for moves between SSE and non-general registers and between
	mask and non-general registers.
	(ix86_register_move_cost): Remove stalled comment.

From-SVN: r275050
2019-08-29 20:15:13 +02:00
Uros Bizjak
ce189a6254 * ChangeLog: Fix wrong ChangeLog of my last entry.
From-SVN: r275049
2019-08-29 20:09:50 +02:00
Nathan Sidwell
b0d11f1ed6 [preprocessor] Include stacking
https://gcc.gnu.org/ml/gcc-patches/2019-08/msg01971.html
	* internal.h (enum include_type): Add IT_MAIN, IT_DIRECTIVE_HWM,
	IT_HEADER_HWM.
	(_cpp_stack_file): Take include_type, not a bool.
	* files.c (_cpp_find_file): Refactor to not hide an if inside a
	for conditional.
	(should_stack_file): Break apart to ...
	(is_known_idempotent_file, has_unique_contents): ... these.
	(_cpp_stack_file): Replace IMPORT boolean with include_type enum.
	Refactor to use new predicates.  Do linemap compensation here ...
	(_cpp_stack_include): ... not here.
	* init.c (cpp_read_main_file): Pass IT_MAIN to _cpp_stack_file.

From-SVN: r275034
2019-08-29 14:06:32 +00:00
Jonathan Wakely
d02a041242 PR libstdc++/91067 add more missing exports for directory iterators
PR libstdc++/91067
	* acinclude.m4 (libtool_VERSION): Bump to 6:28:0.
	* configure: Regenerate.
	* config/abi/pre/gnu.ver (GLIBCXX_3.4.28): Add new version. Export
	missing symbols.
	* testsuite/27_io/filesystem/iterators/91067.cc: Test move
	constructors.
	* testsuite/util/testsuite_abi.cc: Add new symbol version.

From-SVN: r275032
2019-08-29 13:16:27 +01:00
Richard Biener
132e2b41ef i386-features.c (general_scalar_chain::convert_insn): Guard debug work with MAY_HAVE_DEBUG_BIND_INSNS.
2019-08-29  Richard Biener  <rguenther@suse.de>

	* config/i386/i386-features.c (general_scalar_chain::convert_insn):
	Guard debug work with MAY_HAVE_DEBUG_BIND_INSNS.

From-SVN: r275031
2019-08-29 11:59:41 +00:00
Richard Biener
c49609be4f re PR bootstrap/91580 (i686-{darwin, linux} bootstrap fails after r274926)
2019-08-29  Richard Biener  <rguenther@suse.de>

	PR bootstrap/91580
	* config/i386/i386-features.c (general_scalar_chain::convert_insn):
	Do not emit scalar copies for debug-insns, instead replace
	their uses with the reg copy used in the chain or reset them
	if there is a reaching definition outside of the chain as well.

From-SVN: r275030
2019-08-29 10:30:48 +00:00
Jakub Jelinek
ae32cd0384 baseline_symbols.txt: Update.
* config/abi/post/aarch64-linux-gnu/baseline_symbols.txt: Update.
	* config/abi/post/s390x-linux-gnu/baseline_symbols.txt: Update.

From-SVN: r275028
2019-08-29 12:25:13 +02:00
Jakub Jelinek
4bf4c103ee re PR target/91560 (Try harder for AVX non-AVX2 cross-lane permutations)
PR target/91560
	* config/i386/i386-expand.c (expand_vec_perm_movs,
	expand_vec_perm_blend, expand_vec_perm_vpermil,
	expand_vec_perm_pshufb, expand_vec_perm_1,
	expand_vec_perm_pshuflw_pshufhw, expand_vec_perm_palignr,
	expand_vec_perm_interleave2, expand_vec_perm_vpermq_perm_1,
	expand_vec_perm_vperm2f128, expand_vec_perm_interleave3,
	expand_vec_perm_vperm2f128_vblend, expand_vec_perm_2vperm2f128_vshuf,
	expand_vec_perm_even_odd, expand_vec_perm_broadcast): Adjust function
	comments - replace ix86_expand_vec_perm_builtin_1 with
	ix86_expand_vec_perm_const_1.
	(expand_vec_perm2_vperm2f128_vblend): New function.
	(ix86_expand_vec_perm_const_1): New forward declaration.  Call
	expand_vec_perm2_vperm2f128_vblend as last resort.
	(canonicalize_perm): Formatting fix.

	* gcc.dg/torture/vshuf-8.inc: Add two further permutations.

From-SVN: r275027
2019-08-29 11:22:57 +02:00
Jakub Jelinek
1d9cd701ec re PR tree-optimization/91351 (-fstrict-enums generates incorrect code)
PR tree-optimization/91351
	* tree-cfg.c (generate_range_test): Use range_check_type instead of
	unsigned_type_for.
	* tree-cfgcleanup.c (convert_single_case_switch): Punt if
	range_check_type returns NULL.
	* tree-switch-conversion.c (switch_conversion::build_one_array):
	Use range_check_type instead of unsigned_type_for, don't perform
	linear opt if it returns NULL.
	(bit_test_cluster::find_bit_tests): Formatting fix.
	(bit_test_cluster::emit): Use range_check_type instead of
	unsigned_type_for.
	(switch_decision_tree::try_switch_expansion): Punt if range_check_type
	returns NULL.

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

From-SVN: r275026
2019-08-29 11:20:54 +02:00
Paolo Carlini
c3bad34748 decl.c (check_var_type): Add location_t parameter and use it.
/cp
2019-08-29  Paolo Carlini  <paolo.carlini@oracle.com>

	* decl.c (check_var_type): Add location_t parameter and use it.
	(grokdeclarator): Adjust call.
	* pt.c (tsubst_decl): Likewise.
	* cp-tree.h: Adjust declaration.

/testsuite
2019-08-29  Paolo Carlini  <paolo.carlini@oracle.com>

	* g++.dg/spellcheck-typenames.C: Adjust expected locations.
	* g++.dg/cpp0x/pr84676.C: Check locations.
	* g++.dg/other/pr88187.C: Likewise.
	* g++.dg/parse/crash13.C: Likewise.
	* g++.dg/parse/crash46.C: Likewise.
	* g++.dg/parse/template28.C: Likewise.
	* g++.dg/parse/typename4.C: Likewise.

From-SVN: r275025
2019-08-29 09:01:26 +00:00
Richard Biener
f48e4da325 re PR tree-optimization/91568 (internal compiler error: in vect_schedule_slp_instance, at tree-vect-slp.c:3922)
2019-08-29  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/91568
	* tree-vectorizer.h (_slp_tree::max_nunits): Add.
	(vect_update_max_nunits): Add overload for poly_uint64.
	* tree-vect-slp.c (vect_create_new_slp_node): Initialize it.
	(vect_build_slp_tree): Record max_nunits into the subtree
	and merge it upwards.
	(vect_print_slp_tree): Print max_nunits.

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

From-SVN: r275023
2019-08-29 08:07:35 +00:00
Marek Polacek
8a902edbbd Implement P1152R4: Deprecating some uses of volatile.
PR c++/91361
	* c-opts.c (c_common_post_options): Enable -Wvolatile by
	default for C++2a, unless -Wno-deprecated.
	* c.opt (Wvolatile): New warning.

	* cp-gimplify.c (cp_fold): Set TREE_THIS_VOLATILE.
	* decl.c (grokdeclarator): Warn about a volatile-qualified structured
	binding and return type.
	(grokparms): Warn about a volatile-qualified function parameter.
	* expr.c (mark_use) <case MODIFY_EXPR>: Emit a -Wvolatile warning.
	* typeck.c (cp_build_unary_op): Emit a -Wvolatile warning for pre and
	post ++/-- on a volatile operand.
	(genericize_compound_lvalue): Use a better location.  Don't lose
	TREE_THIS_VOLATILE.
	(cp_build_modify_expr): Emit a -Wvolatile warning for a compound
	assignment whose LHS is volatile-qualified.  Build the assignment with
	a more precise location.

	* doc/invoke.texi: Document -Wvolatile.

	* c-c++-common/Wbool-operation-1.c: Use -Wno-volatile in C++.
	* c-c++-common/gomp/atomic-1.c: Likewise.
	* c-c++-common/gomp/atomic-9.c: Likewise.
	* c-c++-common/gomp/depend-iterator-1.c: Likewise.
	* c-c++-common/gomp/loop-1.c: Adjust warning location for C++.
	* c-c++-common/gomp/order-3.c: Likewise.
	* c-c++-common/pr69733.c: Use -Wno-volatile in C++.
	* c-c++-common/spec-barrier-2.c: Likewise.
	* c-c++-common/tm/pr54893.c: Likewise.
	* g++.dg/cpp0x/pr65327.C: Add dg-warning.
	* g++.dg/cpp0x/rv-conv2.C: Likewise.
	* g++.dg/cpp0x/rv1n.C: Likewise.
	* g++.dg/cpp0x/rv1p.C: Likewise.
	* g++.dg/cpp0x/rv2n.C: Likewise.
	* g++.dg/cpp0x/rv2p.C: Likewise.
	* g++.dg/cpp0x/rv3n.C: Likewise.
	* g++.dg/cpp0x/rv3p.C: Likewise.
	* g++.dg/cpp0x/rv4n.C: Likewise.
	* g++.dg/cpp0x/rv4p.C: Likewise.
	* g++.dg/cpp0x/rv5n.C: Likewise.
	* g++.dg/cpp0x/rv5p.C: Likewise.
	* g++.dg/cpp0x/rv6n.C: Likewise.
	* g++.dg/cpp0x/rv6p.C: Likewise.
	* g++.dg/cpp0x/rv7n.C: Likewise.
	* g++.dg/cpp0x/rv7p.C: Likewise.
	* g++.dg/cpp0x/rv8p.C: Likewise.
	* g++.dg/cpp0x/trailing14.C: Use -Wno-volatile.
	* g++.dg/cpp1y/new1.C: Add dg-warning.
	* g++.dg/cpp2a/volatile1.C: New test.
	* g++.dg/cpp2a/volatile2.C: New test.
	* g++.dg/cpp2a/volatile3.C: New test.
	* g++.dg/cpp2a/volatile4.C: New test.
	* g++.dg/expr/bool3.C: Add dg-warning.
	* g++.dg/expr/bool4.C: Likewise.
	* g++.dg/expr/cond9.C: Likewise.
	* g++.dg/ext/vector25.C: Likewise.
	* g++.dg/gomp/depend-iterator-1.C: Use -Wno-volatile.
	* g++.dg/inherit/covariant21.C: Add dg-warning.
	* g++.dg/init/ref18.C: Likewise.
	* g++.dg/ipa/pr63838.C: Likewise.
	* g++.dg/overload/rvalue2.C: Likewise.
	* g++.dg/parse/semicolon4.C: Likewise.
	* g++.dg/warn/Wreturn-type-4.C: Likewise.
	* g++.dg/warn/pr36069.C: Likewise.
	* g++.old-deja/g++.mike/p9506.C: Likewise.
	* g++.old-deja/g++.other/volatile1.C: Likewise.

From-SVN: r275022
2019-08-29 03:11:50 +00:00
GCC Administrator
737c5bac68 Daily bump.
From-SVN: r275021
2019-08-29 00:16:24 +00:00
Joseph Myers
c085c154df * es.po: Update.
From-SVN: r275012
2019-08-28 22:40:43 +01:00
Jonathan Wakely
d8c26520fa Update ABI baselines for x86 and powerpc GNU targets
* config/abi/post/i386-linux-gnu/baseline_symbols.txt: Update.
	* config/abi/post/i486-linux-gnu/baseline_symbols.txt: Update.
	* config/abi/post/powerpc-linux-gnu/baseline_symbols.txt: Update.
	* config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt: Update.
	* config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Update.
	* config/abi/post/x86_64-linux-gnu/32/baseline_symbols.txt: Update.
	* config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Update.

From-SVN: r275011
2019-08-28 22:14:58 +01:00
Ian Lance Taylor
32b1d51f16 runtime: move osinit to Go
This is a step toward updating libgo to 1.13.  This adds the 1.13
    version of the osinit function to Go code, and removes the
    corresponding code from the C runtime.  This should simplify future updates.
    Some additional 1.13 code was brought in to simplify this change.
    
    Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/191717

From-SVN: r275010
2019-08-28 20:39:32 +00:00
Steven G. Kargl
c980510a5a re PR fortran/91551 (ICE in sort_actual, at fortran/intrinsic.c:4193)
2019-08-28  Steven G. Kargl  <kargl@gcc.gnu.org>

	PR fortran/91551
	* intrinsic.c (sort_actual): ALLOCATED has one argument. Check for
	no argument case.

2019-08-28  Steven G. Kargl  <kargl@gcc.gnu.org>

	PR fortran/91551
	* gfortran.dg/allocated_3.f90

From-SVN: r275009
2019-08-28 20:36:00 +00:00
Marek Polacek
4742dbe718 PR c++/91360 - Implement C++20 P1143R2: constinit.
* c-common.c (c_common_reswords): Add constinit and __constinit.
	(keyword_is_decl_specifier): Handle RID_CONSTINIT.
	* c-common.h (enum rid): Add RID_CONSTINIT, RID_FIRST_CXX20, and
	RID_LAST_CXX20.
	(D_CXX20): Define.
	* c-cppbuiltin.c (c_cpp_builtins): Define __cpp_constinit.
	* c-format.c (cxx_keywords): Add "constinit".
	* c.opt (Wc++2a-compat, Wc++20-compat): New options.

	* cp-tree.h (TINFO_VAR_DECLARED_CONSTINIT): Define.
	(LOOKUP_CONSTINIT): Define.
	(enum cp_decl_spec): Add ds_constinit.
	* decl.c (check_tag_decl): Give an error for constinit in type
	declarations.
	(check_initializer): Also check LOOKUP_CONSTINIT.
	(cp_finish_decl): Add checking for a constinit declaration.  Set
	TINFO_VAR_DECLARED_CONSTINIT.
	(grokdeclarator): Add checking for a declaration with the constinit
	specifier.
	* lex.c (init_reswords): Handle D_CXX20.
	* parser.c (cp_lexer_get_preprocessor_token): Pass a better location
	to warning_at.  Warn about C++20 keywords.
	(cp_keyword_starts_decl_specifier_p): Handle RID_CONSTINIT.
	(cp_parser_diagnose_invalid_type_name): Add an inform about constinit.
	(cp_parser_decomposition_declaration): Maybe pass LOOKUP_CONSTINIT to
	cp_finish_decl.
	(cp_parser_decl_specifier_seq): Handle RID_CONSTINIT.
	(cp_parser_init_declarator): Maybe pass LOOKUP_CONSTINIT to
	cp_finish_decl.
	(set_and_check_decl_spec_loc): Add "constinit".
	* pt.c (tsubst_decl): Set TINFO_VAR_DECLARED_CONSTINIT.
	(instantiate_decl): Maybe pass LOOKUP_CONSTINIT to cp_finish_decl.
	* typeck2.c (store_init_value): If a constinit variable wasn't
	initialized using a constant initializer, give an error.

	* doc/invoke.texi: Document -Wc++20-compat.

	* g++.dg/cpp2a/constinit1.C: New test.
	* g++.dg/cpp2a/constinit2.C: New test.
	* g++.dg/cpp2a/constinit3.C: New test.
	* g++.dg/cpp2a/constinit4.C: New test.
	* g++.dg/cpp2a/constinit5.C: New test.
	* g++.dg/cpp2a/constinit6.C: New test.
	* g++.dg/cpp2a/constinit7.C: New test.
	* g++.dg/cpp2a/constinit8.C: New test.
	* g++.dg/cpp2a/constinit9.C: New test.
	* g++.dg/cpp2a/constinit10.C: New test.
	* g++.dg/cpp2a/constinit11.C: New test.
	* g++.dg/cpp2a/constinit12.C: New test.

From-SVN: r275008
2019-08-28 20:31:31 +00:00
Steven G. Kargl
6e12721acd re PR fortran/91565 (ICE in gfc_simplify_reshape, at fortran/simplify.c:6707 etc.)
2019-08-28  Steven G. Kargl  <kargl@gcc.gnu.org>

	PR fortran/91565
	* simplify.c (gfc_simplify_reshape): Add additional checks of the
	ORDER dummy argument.

2019-08-28  Steven G. Kargl  <kargl@gcc.gnu.org>

	PR fortran/91565
	* gfortran.dg/pr91565.f90: New test.

From-SVN: r275007
2019-08-28 20:16:57 +00:00
Steven G. Kargl
ab0f6d4c5f re PR fortran/91564 (ICE in gimplify_expr, at gimplify.c:14147)
2019-08-28  Steven G. Kargl  <kargl@gcc.gnu.org>

	PR fortran/91564
	* check.c (gfc_check_kill_sub): Additional checks on status dummy
	argument.

2019-08-28  Steven G. Kargl  <kargl@gcc.gnu.org>

	PR fortran/91564
	* gfortran.dg/pr91564.f90: New test.

From-SVN: r275005
2019-08-28 19:54:23 +00:00
Martin Liska
91eed5f281 Add .clangd and compile_commands.json to .gitignore.
2019-08-28  Martin Liska  <mliska@suse.cz>

	* .gitignore: Add .clangd and compile_commands.json
	to .gitignore.

From-SVN: r275004
2019-08-28 19:33:28 +00:00
Ian Lance Taylor
4ee38894af compiler: handle unsafe conversion expression in escape analysis
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/192037

From-SVN: r275000
2019-08-28 18:45:45 +00:00
Nathan Sidwell
a0be978a82 [Preprocessor] small cleanups
https://gcc.gnu.org/ml/gcc-patches/2019-08/msg01904.html
	* directives-only.c (_cpp_preprocess_dir_only): Use false, not
	zero for _cpp_handle_directive call.
	* directives.c (_cpp_handle_directive): Indented is bool.
	* files.c (struct _cpp_file): Make bools 1 bit bitfields.
	* internal.h (enum include_type): Reformat and comment.
	(struct cpp_buffer): Make flags 1 bit bitfields.
	(_cpp_handle_directive): Indented is bool.

From-SVN: r274999
2019-08-28 18:43:37 +00:00
Ian Lance Taylor
fc4f90f0c8 compiler, runtime: provide index information on bounds check failure
This implements https://golang.org/cl/161477 in the gofrontend.
    
    Updates golang/go#30116
    
    Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/191881

From-SVN: r274998
2019-08-28 18:27:30 +00:00
Martin Sebor
464969eb9b PR tree-optimization/91457 - inconsistent warning for writing past the end of an array member
gcc/ChangeLog:

	PR tree-optimization/91457
	* builtins.c (component_size): New function.
	(compute_objsize): Add argument. Handle ARRAY_REF and COMPONENT_REF.
	* builtins.h (compute_objsize): Add argument.
	* tree-ssa-strlen.c (handle_store): Handle no-warning bit.
	* tree-vrp.c (vrp_prop::check_array_ref): Return warning result.
	(vrp_prop::check_mem_ref): Same.
	(vrp_prop::search_for_addr_array): Set no-warning bit.
	(check_array_bounds): Same.

gcc/testsuite/ChangeLog:

	PR tree-optimization/91457
	* c-c++-common/Wstringop-overflow-2.c: New test.
	* g++.dg/warn/Warray-bounds-8.C: New test.
	* g++.dg/warn/Wstringop-overflow-3.C: New test.
	* gcc.dg/Wstringop-overflow-15.c: New test.

From-SVN: r274997
2019-08-28 10:43:56 -06:00
Martin Sebor
e2eee23981 PR driver/80545 - option -Wstringop-overflow not recognized by Fortran
gcc/ChangeLog:

	PR driver/80545
	* opts-common.c (option_enabled): Correct checking for language
	options.

From-SVN: r274996
2019-08-28 10:24:38 -06:00
Uros Bizjak
bc4aa158c9 * config/i386/i386-features.c
(general_scalar_chain::compute_convert_gain):
	Correct cost for double-word shifts.
	(general_scalar_to_vector_candidate_p): Reject count operands
	greater or equal to mode bitsize.

From-SVN: r274994
2019-08-28 17:09:51 +02:00
Martin Jambor
b66113e9c1 [PR 91468] Small fixes in ipa-cp.c and ipa-prop.c
2019-08-28  Martin Jambor  <mjambor@suse.cz>

	PR ipa/91468
	* ipa-cp.c (merge_agg_lats_step): Removed redundant test, made a
	checking assert a normal assert to test it really is redundant.
	* ipa-prop.c (compute_complex_assign_jump_func): Removed
	redundant test.
	(update_jump_functions_after_inlining): Removed combining unary
	arithmetic operations with an ancestor jump function.
	(ipcp_modif_dom_walker::before_dom_children): Fix wrong use of rhs
	instead of t.

From-SVN: r274992
2019-08-28 16:26:45 +02:00
Nathan Sidwell
a09b09ccee [PR c++/90613] Fix using-decl debug bloat
https://gcc.gnu.org/ml/gcc-patches/2019-08/msg01888.html
	cp/
	PR c++/90613
	* name-lookup.c (cp_emit_debug_info): Check for builtins during
	overload iteration.

	testsuite/
	PR c++/90613
	* g++.dg/lookup/using61.C: New.

From-SVN: r274991
2019-08-28 13:36:54 +00:00
Richard Biener
629c4e52e4 i386-features.c (convert_scalars_to_vector): Do not add the MD problem.
2019-08-28  Richard Biener  <rguenther@suse.de>

	* config/i386/i386-features.c (convert_scalars_to_vector): Do not
	add the MD problem.

From-SVN: r274990
2019-08-28 13:26:41 +00:00
Mark Eggleston
13668284c9 Stated standards in documentation
Correct the stated standards in documentation and for intrinsics and
specific intrinsics.  In C_SIZEOF the printed value is T not .TRUE..
In IPARITY example wrap BOZ constants in calls to INT.

From-SVN: r274988
2019-08-28 10:21:31 +00:00
Bernd Edlinger
0b778f9f4a re PR middle-end/89544 (Argument marshalling incorrectly assumes stack slots are naturally aligned.)
2019-08-28  Bernd Edlinger  <bernd.edlinger@hotmail.de>

        PR middle-end/89544
        * gcc.target/arm/unaligned-argument-3.c: New test.

From-SVN: r274987
2019-08-28 10:20:44 +00:00
Bernd Edlinger
70cdb21e57 expr.c (expand_assignment): Handle misaligned DECLs.
2019-09-28  Bernd Edlinger  <bernd.edlinger@hotmail.de>
	    Richard Biener  <rguenther@suse.de>

	* expr.c (expand_assignment): Handle misaligned DECLs.
	(expand_expr_real_1): Handle FUNCTION_DECL as unaligned.
	* function.c (assign_parm_adjust_stack_rtl): Check movmisalign optab
	too.
	(assign_parm_setup_stack): Allocate properly aligned stack slots.
	* varasm.c (build_constant_desc): Align constants of misaligned types.
	* config/arm/predicates.md (aligned_operand): New predicate.
	* config/arm/arm.md (movdi, movsi, movhi, movhf, movsf, movdf): Use
	aligned_operand to check restrictions on memory addresses.
	* config/arm/neon.md (movti, mov<VSTRUCT>, mov<VH>): Likewise.
	* config/arm/vec-common.md (mov<VALL>): Likewise.

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

From-SVN: r274986
2019-08-28 10:18:23 +00:00
Jakub Jelinek
e62506f362 re PR libgomp/91530 (Several libgomp.*/scan-* tests FAIL without avx_runtime)
PR libgomp/91530
	* config/i386/sse.md (vec_shl_<mode>, vec_shr_<mode>): Use
	V_128 iterator instead of VI_128.

	* testsuite/libgomp.c/scan-21.c: New test.
	* testsuite/libgomp.c/scan-22.c: New test.

From-SVN: r274985
2019-08-28 12:13:21 +02:00
Jakub Jelinek
5cb72d83bb re PR libgomp/91530 (Several libgomp.*/scan-* tests FAIL without avx_runtime)
PR libgomp/91530
	* config/i386/sse.md (vec_shl_<mode>, vec_shr_<mode>): Use
	V_128 iterator instead of VI_128.

	* testsuite/libgomp.c/scan-21.c: New test.
	* testsuite/libgomp.c/scan-22.c: New test.

From-SVN: r274984
2019-08-28 12:12:11 +02:00
Martin Liska
95ecbf4695 Remove code leftover that has never been used.
2019-08-28  Martin Liska  <mliska@suse.cz>

	PR tree-optimization/90970
	* builtins.c (check_access): Remove assignment to maxread
	as it hasn't been used since when it was introduced in r255755.

From-SVN: r274983
2019-08-28 06:39:47 +00:00
Marek Polacek
8692693732 PR c++/81676 - bogus -Wunused warnings in constexpr if.
* semantics.c (maybe_mark_exp_read_r): New function.
	(finish_if_stmt): Call it on THEN_CLAUSE and ELSE_CLAUSE.

	* g++.dg/cpp1z/constexpr-if31.C: New test.
	* g++.dg/cpp1z/constexpr-if32.C: New test.

From-SVN: r274982
2019-08-28 02:22:29 +00:00
Marek Polacek
14da3939da PR c++/91428 - warn about std::is_constant_evaluated in if constexpr.
* cp-tree.h (decl_in_std_namespace_p): Declare.
	* semantics.c (is_std_constant_evaluated_p): New.
	(finish_if_stmt_cond): Warn about "std::is_constant_evaluated ()" in
	an if-constexpr.
	* typeck.c (decl_in_std_namespace_p): No longer static.

	* g++.dg/cpp2a/is-constant-evaluated9.C: New test.

From-SVN: r274981
2019-08-28 02:03:48 +00:00
GCC Administrator
4719ac2f2d Daily bump.
From-SVN: r274980
2019-08-28 00:16:21 +00:00
Martin Sebor
407b92bcfb PR tree-optimization/91567 - Spurious -Wformat-overflow warnings building glibc (32-bit only)
gcc/ChangeLog:

	PR tree-optimization/91567
	* gimple-ssa-sprintf.c (get_string_length): Handle more forms of lengths
	of unknown strings.
	* vr-values.c (vr_values::extract_range_basic): Set strlen upper bound
	to PTRDIFF_MAX - 2.

gcc/testsuite/ChangeLog:

	PR tree-optimization/91567
	* gcc.dg/tree-ssa/builtin-snprintf-6.c: Xfail a subset of assertions
	on targets other than x86_64 to work around PR 83543.
	* gcc.dg/tree-ssa/builtin-sprintf-warn-22.c: New test.

From-SVN: r274976
2019-08-27 17:31:44 -06:00
Jeff Law
2d8ba44101 tree-ssa-strlen.c (printf_strlen_execute): Initialize the loop optimizer and SCEV before sizing ssa_ver_to_stridx.
* tree-ssa-strlen.c (printf_strlen_execute): Initialize
	the loop optimizer and SCEV before sizing ssa_ver_to_stridx.

	* gcc.c-torture/compile/20190827-1.c: New test.

From-SVN: r274975
2019-08-27 17:03:45 -06:00
Harald Anlauf
2bd86b95f7 re PR fortran/91496 (!GCC$ directives error if mistyped or unknown)
2019-08-27  Harald Anlauf  <anlauf@gmx.de>

	PR fortran/91496
	* gfortran.h: Extend struct gfc_iterator for loop annotations.
	* array.c (gfc_copy_iterator): Copy loop annotations by IVDEP,
	VECTOR, and NOVECTOR pragmas.
	* decl.c (gfc_match_gcc_ivdep, gfc_match_gcc_vector)
	(gfc_match_gcc_novector): New matcher functions handling IVDEP,
	VECTOR, and NOVECTOR pragmas.
	* match.h: Declare prototypes of matcher functions handling IVDEP,
	VECTOR, and NOVECTOR pragmas.
	* parse.c (decode_gcc_attribute, parse_do_block)
	(parse_executable): Decode IVDEP, VECTOR, and NOVECTOR pragmas;
	emit warning for unrecognized pragmas instead of error.
	* trans-stmt.c (gfc_trans_simple_do, gfc_trans_do): Add code to
	emit annotations for IVDEP, VECTOR, and NOVECTOR pragmas.
	* gfortran.texi: Document IVDEP, VECTOR, and NOVECTOR pragmas.

	PR fortran/91496
	* gfortran.dg/pr91496.f90: New testcase.

From-SVN: r274966
2019-08-27 19:16:33 +00:00