Commit Graph

155648 Commits

Author SHA1 Message Date
Rainer Orth
0d9255af20 Require -static support in gcc.dg/pie-static-[12].c (PR testsuite/81793)
PR testsuite/81793
	* gcc.dg/pie-static-1.c: Require both static and pie support.
	* gcc.dg/pie-static-2.c: Likewise.

From-SVN: r251067
2017-08-12 16:00:00 +00:00
Pierre-Marie de Rodat
7a7b545f8e [PR79542][Ada] Fix ICE in dwarf2out.c with nested func. inlining
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79542 reports an ICE in
dwarf2out.c for an Ada testcase built with optimization.

This crash happens during the late generation pass because
add_gnat_descriptive_type cannot find the type DIE corresponding to some
descriptive type after having tried to generate it. This is because the
DIE was generated during the early generation pass, but then pruned by
the type pruning machinery. So why was it pruned?

We are in a situation where we have cloned types (because of inlining,
IIUC) whose TYPE_NAME have non-null DECL_ABSTRACT_ORIGIN attributes. As
a consequence:

  * In modified_type_die, the "handle C typedef types" part calls
    gen_type_die on the cloned type.

  * gen_type_die matches a typedef variant, and then calls gen_decl_die
    on its TYPE_NAME, which will end up calling gen_typedef_die.

  * gen_typedef_die checks decl_ultimate_origin for this TYPE_DECL, and
    finds one, so it only adds a DW_AT_abstract_origin attribute to the
    DW_TAG_typedef DIE, but the cloned type itself does not get its own
    DIE.

  * Back in modified_type_die, the call to lookup_type_die on the type
    passed to gen_type_die returns NULL.

In the end, whole type trees, i.e. the ones referenced by
DECL_ABSTRACT_ORIGIN attributes, are never referenced from type pruning
"roots" and are thus pruned. The descriptive type at stake here is one
of them, hence the assertion failure.

This patch attemps to fix that with what seems to be the most sensible
thing to do in my opinion: updating the "handle C typedef types" part in
modified_type_die to check decl_ultimate_origin before calling
gen_type_die: if that function returns something not null, then we know
that gen_type_die/gen_typedef_die will not generate a DIE for the input
type, so we try to process the ultimate origin instead. It also updates
in a similar way gen_type_die_with_usage, assert that when
gen_typedef_die is called on nodes that have an ultimate origin, this
origin is themselves.

gcc/
	PR ada/79542
	* dwarf2out.c (modified_type_die): For C typedef types that have
	an ultimate origin, process the ultimate origin instead of the
	input type.
	(gen_typedef_die): Assert that input DECLs have no ultimate
	origin.
	(gen_type_die_with_usage): For typedef variants that have an
	ultimate origin, just call gen_decl_die on the original DECL.
	(process_scope_var): Avoid creating DIEs for local typedefs and
	concrete static variables.

gcc/testsuite/

	PR ada/79542
	* gnat.dg/debug13.ads, gnat.dg/debug13.adb: New testcase.

From-SVN: r251066
2017-08-12 09:07:12 +00:00
Alan Modra
ff97dd826e [RS6000] linux startfile/endfile
These need to match the gnu-user.h definitions to support
--enable-default-pie.  Otherwise we end up linking the wrong startup
files when defaulting to PIE.

	PR target/81170
	PR target/81295
	* config/rs6000/sysv4.h (STARTFILE_LINUX_SPEC): Upgrade to
	match gnu-user.h startfile.
	(ENDFILE_LINUX_SPEC): Similarly.

From-SVN: r251065
2017-08-12 09:58:04 +09:30
GCC Administrator
9567c62efb Daily bump.
From-SVN: r251064
2017-08-12 00:16:31 +00:00
Marek Polacek
bb85aa74f0 re PR c/81795 (Stray "originally defined here" when using -Wc++-compat with #pragma GCC diagnostic push/pop)
PR c/81795
	* c-decl.c (pushtag): Only print inform if the warning was printed.
	(grokdeclarator): Likewise.

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

From-SVN: r251056
2017-08-11 18:02:18 +00:00
Thomas Koenig
27c33b8fa5 invoke.texi: Actually commit change about -Ofast.
2017-08-11  Thomas Koenig  <tkoenig@gcc.gnu.org>

	* invoke.texi:  Actually commit change about -Ofast.

From-SVN: r251055
2017-08-11 17:48:45 +00:00
Thomas Koenig
c4fa898440 re PR fortran/60355 ([F08] constraint C519 for BIND attribute not enforced)
2017-08-11  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/60355
	* resolve.c (resolve_symbol): Adjust (and reformat)
	comment.  Perform check if a BIND(C) is declared
	at module level regardless of whether it is typed
	implicitly or not.

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

	PR fortran/60355
	* gfortran.dg (bind_c_usage_30): New test.

From-SVN: r251054
2017-08-11 17:45:36 +00:00
Thomas Schwinge
0a29142da6 [PR lto/81430] Revert "Add nvptx_override_options_after_change"
This reverts r250421; properly fixed by r250852.

	PR lto/81430
	* config/nvptx/nvptx.c (nvptx_override_options_after_change):
	Remove function.
	(TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Remove definition.

From-SVN: r251053
2017-08-11 17:37:14 +02:00
William Schmidt
f158348e0f Correct invalid ChangeLog entry
From-SVN: r251052
2017-08-11 14:11:22 +00:00
Tamar Christina
701170a4a6 aarch64.md (mov<mode>): Change.
2017-08-11  Tamar Christina  <tamar.christina@arm.com>
	* config/aarch64/aarch64.md (mov<mode>): Change.
	(*movhf_aarch64, *movsf_aarch64, *movdf_aarch64):
	aarch64_reg_or_fp_float into aarch64_reg_or_fp_zero.
	* config/aarch64/predicates.md (aarch64_reg_or_fp_float): Removed.

From-SVN: r251051
2017-08-11 13:47:57 +00:00
Eric Botcazou
89e18b1a7b tree-sra.c (build_access_from_expr_1): Use more precise diagnostics for storage order barriers.
* tree-sra.c (build_access_from_expr_1): Use more precise diagnostics
	for storage order barriers.

From-SVN: r251050
2017-08-11 13:06:43 +00:00
Martin Liska
fe8a99d8cd Do not instrument void variables with MPX (PR tree-opt/79987).
2017-08-11  Martin Liska  <mliska@suse.cz>

	PR tree-opt/79987
	* tree-chkp.c (chkp_get_bounds_for_decl_addr): Do not instrument
	variables of void type.
2017-08-11  Martin Liska  <mliska@suse.cz>

	PR tree-opt/79987
	* gcc.target/i386/mpx/pr79987.c: New test.

From-SVN: r251049
2017-08-11 10:01:13 +00:00
Martin Liska
a8b522b483 Introduce TARGET_SUPPORTS_ALIASES
2017-08-11  Martin Liska  <mliska@suse.cz>

	* c-opts.c (c_common_post_options): Replace ASM_OUTPUT_DEF with
	TARGET_SUPPORTS_ALIASES.
2017-08-11  Martin Liska  <mliska@suse.cz>

	* asan.c (asan_protect_global): Replace ASM_OUTPUT_DEF with
	TARGET_SUPPORTS_ALIASES.
	* cgraph.c (cgraph_node::create_same_body_alias): Likewise.
	* ipa-visibility.c (can_replace_by_local_alias): Likewise.
	(optimize_weakref): Likewise.
	* symtab.c (symtab_node::noninterposable_alias): Likewise.
	* varpool.c (varpool_node::create_extra_name_alias): Likewise.
	* defaults.h: Introduce TARGET_SUPPORTS_ALIASES.
2017-08-11  Martin Liska  <mliska@suse.cz>

	* decl2.c (get_tls_init_fn): Replace ASM_OUTPUT_DEF with
	TARGET_SUPPORTS_ALIASES.
	(handle_tls_init): Likewise.
	(note_mangling_alias): Likewise.  Remove ATTRIBUTE_UNUSED for
	both arguments.
	* optimize.c (can_alias_cdtor): Likewise.

From-SVN: r251048
2017-08-11 08:14:54 +00:00
Martin Liska
4c71a171ed Fix ifunc and resolver (PR ipa/81213).
2017-08-11  Martin Liska  <mliska@suse.cz>

	PR ipa/81213
	* config/i386/i386.c (make_resolver_func): Do complete
	refactoring of the function.
2017-08-11  Martin Liska  <mliska@suse.cz>

	PR ipa/81213
	* gcc.target/i386/pr81213.c: New test.

From-SVN: r251047
2017-08-11 08:10:42 +00:00
Jason Merrill
5675808f5c PR c++/81671 - nullptr_t template parameter
* pt.c (convert_nontype_argument): Fix nullptr_t check.

From-SVN: r251046
2017-08-11 01:35:39 -04:00
GCC Administrator
81f2064e41 Daily bump.
From-SVN: r251045
2017-08-11 00:17:26 +00:00
Jonathan Wakely
1ea93d89a9 PR libstdc++/81808 skip test if reading directory doesn't fail
PR libstdc++/81808
	* testsuite/27_io/basic_fstream/53984.cc: Adjust test for targets
	that allow opening a directory as a FILE and reading from it.

From-SVN: r251041
2017-08-11 01:14:57 +01:00
Uros Bizjak
e1769bdd4c re PR target/81708 (The x86 stack canary location should be customizable)
PR target/81708
	* config/i386/i386.opt (mstack-protector-guard-symbol=): New option
	* config/i386/i386.c (ix86_stack_protect_guard): Use
	ix86_stack_protect_guard_symbol_str to generate varible declaration.
	* doc/invoke.texi (x86 Options): Document
	-mstack-protector-guard-symbol= option.

testsuite/ChangeLog:

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

From-SVN: r251040
2017-08-10 22:59:10 +02:00
Uros Bizjak
f18f68226c Rename ix86_split_stack_boundary to ix86_split_stack_guard.
From-SVN: r251039
2017-08-10 22:52:50 +02:00
Richard Sandiford
adc8403799 PR81738: Split vect-alias-check-6.c
The second loop in the testcase only vectorises if we can reverse
a vector and if aligned loads aren't required.

2017-08-10  Richard Sandiford  <richard.sandiford@linaro.org>

gcc/testsuite/
	PR testsuite/81738
	* gcc.dg/vect/vect-alias-check-6.c: Move second function to...
	* gcc.dg/vect/vect-alias-check-7.c: ...this new file.  Require
	vect_perm and vect_element_align for vectorization.

From-SVN: r251037
2017-08-10 19:58:16 +00:00
Jason Merrill
339922f4e1 PR c++/81359 - Unparsed NSDMI error from SFINAE context.
* method.c (synthesized_method_walk): Don't diagnose lack of
	operator delete.

From-SVN: r251036
2017-08-10 15:55:48 -04:00
Jason Merrill
4ce8c5dea5 PR c++/80452 - Core 1579, implicit move semantics on return/throw
* cp-tree.h (LOOKUP_PREFER_RVALUE): Now means that we've already
	tentatively changed the lvalue to an rvalue.
	* call.c (reference_binding): Remove LOOKUP_PREFER_RVALUE handling.
	(build_over_call): If LOOKUP_PREFER_RVALUE, check that the first
	parameter is an rvalue reference.
	* except.c (build_throw): Do maybe-rvalue overload resolution twice.
	* typeck.c (check_return_expr): Likewise.

From-SVN: r251035
2017-08-10 15:07:30 -04:00
Uros Bizjak
a0a10c6def * config/i386/i386.c (ix86_split_stack_boundary): Add comment.
From-SVN: r251033
2017-08-10 20:40:39 +02:00
Uros Bizjak
5e4882f90c i386-protos.h (ix86_split_stack_boundary): New prototype.
* config/i386/i386-protos.h (ix86_split_stack_boundary): New prototype.
	* config/i386/i386.c (ix86_split_stack_boundary): New function.
	(ix86_xpand_split_stack_prologue): Call ix86_split_stack_boundary.
	(ix86_legitimate_address_p) <case UNSPEC_STACK_CHECK>: Remove.
	(i386_asm_output_addr_const_extra) <case UNSPEC_STACK_CHECK>: Ditto.
	(optput_pic_addr_const): Remove UNSPEC_STACK_CHECK handling.
	* config/i386/i386.md (unspec): Remove UNSPEC_STACK_CHECK.
	(split_stack_space_check): Call ix86_split_stack_boundary.

From-SVN: r251031
2017-08-10 20:27:40 +02:00
Martin Sebor
8197ac2f30 print-tree.c (print_node): Print location using the established format %s:%i%i.
gcc/ChangeLog:

	* print-tree.c (print_node): Print location using the established
	format %s:%i%i.
	Replace spaces with colons.
	(debug_raw, debug): Ditto.

From-SVN: r251030
2017-08-10 11:43:28 -06:00
Martin Sebor
0a8923faca PR c++/81586 - valgrind error in output_buffer_append_r with -Wall
gcc/ChangeLog:

	PR c++/81586
	* pretty-print.c (pp_format): Correct the handling of %s precision.

From-SVN: r251029
2017-08-10 11:40:11 -06:00
H.J. Lu
8e941ae950 i386: Don't use frame pointer without stack access
When there is no stack access, there is no need to use frame pointer
even if -fno-omit-frame-pointer is used and caller's frame pointer is
unchanged.

gcc/

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

gcc/testsuite/

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

From-SVN: r251028
2017-08-10 08:29:05 -07:00
Will Schmidt
798f86281b fold-vec-msum-short.c: Fix typo.
[gcc/testsuite]

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

        * gcc.target/powerpc/fold-vec-msum-short.c: Fix typo.
        * gcc.target/powerpc/fold-vec/pack-longlong.c: Mark for 64-bit only.

From-SVN: r251027
2017-08-10 14:05:26 +00:00
David Malcolm
32129a1750 C/C++: show pertinent open token when missing a close token
gcc/c/ChangeLog:
	* c-parser.c (c_parser_error): Rename to...
	(c_parser_error_richloc): ...this, making static, and adding
	"richloc" parameter, passing it to the c_parse_error call,
	rather than calling c_parser_set_source_position_from_token.
	(c_parser_error): Reintroduce, reimplementing in terms of the
	above, converting return type from void to bool.
	(class token_pair): New class.
	(struct matching_paren_traits): New struct.
	(matching_parens): New typedef.
	(struct matching_brace_traits): New struct.
	(matching_braces): New typedef.
	(get_matching_symbol): New function.
	(c_parser_require): Add param MATCHING_LOCATION, using it to
	highlight matching "opening" tokens for missing "closing" tokens.
	(c_parser_skip_until_found): Likewise.
	(c_parser_static_assert_declaration_no_semi): Convert explicit
	parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
	class matching_parens, so that the pertinent open parenthesis is
	highlighted when there are problems locating the close
	parenthesis.
	(c_parser_struct_or_union_specifier): Likewise.
	(c_parser_typeof_specifier): Likewise.
	(c_parser_alignas_specifier): Likewise.
	(c_parser_simple_asm_expr): Likewise.
	(c_parser_braced_init): Likewise, for matching_braces.
	(c_parser_paren_condition): Likewise, for matching_parens.
	(c_parser_switch_statement): Likewise.
	(c_parser_for_statement): Likewise.
	(c_parser_asm_statement): Likewise.
	(c_parser_asm_operands): Likewise.
	(c_parser_cast_expression): Likewise.
	(c_parser_sizeof_expression): Likewise.
	(c_parser_alignof_expression): Likewise.
	(c_parser_generic_selection): Likewise.
	(c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
	RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
	RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
	In case CPP_OPEN_PAREN, pass loc_open_paren to the
	c_parser_skip_until_found call.
	(c_parser_objc_class_definition): Use class matching_parens as
	above.
	(c_parser_objc_method_decl): Likewise.
	(c_parser_objc_try_catch_finally_statement): Likewise.
	(c_parser_objc_synchronized_statement): Likewise.
	(c_parser_objc_at_property_declaration): Likewise.
	(c_parser_oacc_wait_list): Likewise.
	(c_parser_omp_var_list_parens): Likewise.
	(c_parser_omp_clause_collapse): Likewise.
	(c_parser_omp_clause_default): Likewise.
	(c_parser_omp_clause_if): Likewise.
	(c_parser_omp_clause_num_threads): Likewise.
	(c_parser_omp_clause_num_tasks): Likewise.
	(c_parser_omp_clause_grainsize): Likewise.
	(c_parser_omp_clause_priority): Likewise.
	(c_parser_omp_clause_hint): Likewise.
	(c_parser_omp_clause_defaultmap): Likewise.
	(c_parser_oacc_single_int_clause): Likewise.
	(c_parser_omp_clause_ordered): Likewise.
	(c_parser_omp_clause_reduction): Likewise.
	(c_parser_omp_clause_schedule): Likewise.
	(c_parser_omp_clause_num_teams): Likewise.
	(c_parser_omp_clause_thread_limit): Likewise.
	(c_parser_omp_clause_aligned): Likewise.
	(c_parser_omp_clause_linear): Likewise.
	(c_parser_omp_clause_safelen): Likewise.
	(c_parser_omp_clause_simdlen): Likewise.
	(c_parser_omp_clause_depend): Likewise.
	(c_parser_omp_clause_map): Likewise.
	(c_parser_omp_clause_device): Likewise.
	(c_parser_omp_clause_dist_schedule): Likewise.
	(c_parser_omp_clause_proc_bind): Likewise.
	(c_parser_omp_clause_uniform): Likewise.
	(c_parser_omp_for_loop): Likewise.
	(c_parser_cilk_clause_vectorlength): Likewise.
	(c_parser_cilk_clause_linear): Likewise.
	(c_parser_transaction_expression): Likewise.
	* c-parser.h (c_parser_require): Add param matching_location with
	default UNKNOWN_LOCATION.
	(c_parser_error): Convert return type from void to bool.
	(c_parser_skip_until_found): Add param matching_location with
	default UNKNOWN_LOCATION.

gcc/c-family/ChangeLog:
	* c-common.c (c_parse_error): Add rich_location * param, using it
	rather implicitly using input_location.
	* c-common.h (c_parse_error): Add rich_location * param.

gcc/cp/ChangeLog:
	* parser.c (cp_parser_error): Update for new param to
	c_parse_error.
	(class token_pair): New class.
	(struct matching_paren_traits): New struct.
	(matching_parens): New typedef.
	(struct matching_brace_traits): New struct.
	(matching_braces): New typedef.
	(cp_parser_statement_expr): Convert explicit parsing of
	CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
	class matching_parens, so that the pertinent open parenthesis is
	highlighted when there are problems locating the close
	parenthesis.
	(cp_parser_primary_expression): Likewise.
	(cp_parser_compound_literal_p): Remove consumption of opening
	paren.
	(cp_parser_postfix_expression): Convert explicit parsing of
	CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use matching parens, as
	above.  Use it to consume the opening paren previously consumed by
	cp_parser_compound_literal_p.
	(cp_parser_parenthesized_expression_list): Likewise.
	(cp_parser_unary_expression): Likewise.
	(cp_parser_new_expression): Likewise.
	(cp_parser_cast_expression): Likewise.
	(cp_parser_builtin_offsetof): Likewise.
	(cp_parser_trait_expr): Likewise.
	(cp_parser_lambda_declarator_opt): Likewise.
	(cp_parser_lambda_body): Likewise, for matching_braces.
	(cp_parser_compound_statement): Likewise.
	(cp_parser_selection_statement): Likewise, for matching_parens.
	(cp_parser_iteration_statement): Likewise.
	(cp_parser_already_scoped_statement): Likewise, for
	matching_braces.
	(cp_parser_linkage_specification): Likewise.
	(cp_parser_static_assert): Likewise, for matching_parens.
	(cp_parser_decltype): Likewise.
	(cp_parser_operator): Likewise.
	(cp_parser_enum_specifier): Likewise.
	(cp_parser_namespace_definition): Likewise.
	(cp_parser_direct_declarator): Likewise.
	(cp_parser_braced_list): Likewise.
	(cp_parser_class_specifier_1): Likewise, for matching_braces.
	(cp_parser_constant_initializer): Likewise.
	(cp_parser_noexcept_specification_opt): Likewise, for
	matching_parens.
	(cp_parser_exception_specification_opt): Likewise.
	(cp_parser_handler): Likewise.
	(cp_parser_asm_specification_opt): Likewise.
	(cp_parser_asm_operand_list): Likewise.
	(cp_parser_gnu_attributes_opt): Likewise.
	(cp_parser_std_attribute_spec): Likewise.
	(cp_parser_requirement_parameter_list): Likewise.
	(cp_parser_requirement_body): Likewise, for matching_braces.
	(cp_parser_compound_requirement): Likewise.
	(cp_parser_template_introduction): Likewise.
	(cp_parser_sizeof_pack): Likewise, for matching_parens.
	(cp_parser_sizeof_operand): Likewise; use it to consume the
	opening paren previously consumed by cp_parser_compound_literal_p.
	(get_matching_symbol): New function.
	(cp_parser_required_error): Add param "matching_location".  Remove
	calls to cp_parser_error, instead setting a non-NULL gmsgid, and
	handling it if set by calling c_parse_error, potentially with a
	secondary location if matching_location was set.
	(cp_parser_require): Add param "matching_location", with a default
	value of UNKNOWN_LOCATION.
	(cp_parser_require_keyword): Update for new param of
	cp_parser_required_error.
	(cp_parser_objc_encode_expression): Update to class matching_parens
	as above.
	(cp_parser_objc_defs_expression): Likewise.
	(cp_parser_objc_protocol_expression): Likewise.
	(cp_parser_objc_selector_expression): Likewise.
	(cp_parser_objc_typename): Likewise.
	(cp_parser_objc_superclass_or_category): Likewise.
	(cp_parser_objc_try_catch_finally_statement): Likewise.
	(cp_parser_objc_synchronized_statement): Likewise.
	(cp_parser_objc_at_property_declaration): Likewise.
	(cp_parser_oacc_single_int_clause): Likewise.
	(cp_parser_oacc_shape_clause): Likewise.
	(cp_parser_omp_clause_collapse): Likewise.
	(cp_parser_omp_clause_default): Likewise.
	(cp_parser_omp_clause_final): Likewise.
	(cp_parser_omp_clause_if): Likewise.
	(cp_parser_omp_clause_num_threads): Likewise.
	(cp_parser_omp_clause_num_tasks): Likewise.
	(cp_parser_omp_clause_grainsize): Likewise.
	(cp_parser_omp_clause_priority): Likewise.
	(cp_parser_omp_clause_hint): Likewise.
	(cp_parser_omp_clause_defaultmap): Likewise.
	(cp_parser_omp_clause_ordered): Likewise.
	(cp_parser_omp_clause_schedule): Likewise.
	(cp_parser_omp_clause_num_teams): Likewise.
	(cp_parser_omp_clause_thread_limit): Likewise.
	(cp_parser_omp_clause_aligned): Likewise.
	(cp_parser_omp_clause_linear): Likewise.
	(cp_parser_omp_clause_safelen): Likewise.
	(cp_parser_omp_clause_simdlen): Likewise.
	(cp_parser_omp_clause_depend): Likewise.
	(cp_parser_omp_clause_device): Likewise.
	(cp_parser_omp_clause_dist_schedule): Likewise.
	(cp_parser_oacc_clause_async): Likewise.
	(cp_parser_omp_critical): Likewise.
	(cp_parser_omp_for_loop): Likewise.
	(cp_parser_omp_sections_scope): Likewise.
	(cp_parser_omp_declare_reduction_exprs): Likewise.
	Update for new param to cp_parser_required_error.
	(cp_parser_oacc_routine): Likewise.
	(cp_parser_transaction_expression): Likewise.
	(cp_parser_cilk_simd_vectorlength): Likewise.

gcc/testsuite/ChangeLog:
	* c-c++-common/missing-close-symbol.c: New test case.
	* c-c++-common/missing-symbol.c: New test case.
	* gcc.dg/unclosed-init.c: New test case.
	* g++.dg/diagnostic/unclosed-extern-c.C: New test case.
	* g++.dg/diagnostic/unclosed-function.C: New test case.
	* g++.dg/diagnostic/unclosed-namespace.C: New test case.
	* g++.dg/diagnostic/unclosed-struct.C: New test case.
	* g++.dg/parse/pragma2.C: Update to reflect movement of the
	"expected identifier" error.

From-SVN: r251026
2017-08-10 13:22:27 +00:00
Fritz Reese
7c23ac0d25 options.c (set_dec_flags): Only set legacy standards when value is not zero.
2017-08-10  Fritz Reese <fritzoreese@gmail.com>

    gcc/fortran/ChangeLog:

	* options.c (set_dec_flags): Only set legacy standards when value
	is not zero.

From-SVN: r251025
2017-08-10 12:52:01 +00:00
Fritz Reese
57e1270f58 options.c (set_dec_flags, [...]): Only set flag_d_lines with -fdec when not set by user.
2017-08-10  Fritz Reese <Reese-Fritz@zai.com>

    gcc/fortran/ChangeLog:

	* options.c (set_dec_flags, gfc_post_options): Only set flag_d_lines
	with -fdec when not set by user.

    gcc/testsuite/ChangeLog:

    gfortran.dg/
	* dec_d_lines_1.f, dec_d_lines_2.f: New.

From-SVN: r251024
2017-08-10 12:36:44 +00:00
Fritz Reese
6f855a26ab decl.c (attr_seen): New static variable.
2017-08-10  Fritz Reese <Reese-Fritz@zai.com>

    gcc/fortran/ChangeLog:

	* decl.c (attr_seen): New static variable.
	* decl.c (variable_decl): Match %FILL in STRUCTURE body.
	* gfortran.texi: Update documentation.

    gcc/testsuite/ChangeLog:

    gfortran.dg/
	* dec_structure_18.f90, dec_structure_19.f90, dec_structure_20.f90,
	dec_structure_21.f90: New.

From-SVN: r251023
2017-08-10 12:19:13 +00:00
Marek Polacek
f234f0787e * objc.dg/proto-lossage-4.m: Accept int/long int as intptr_t.
From-SVN: r251022
2017-08-10 09:26:14 +00:00
Marek Polacek
aaab59b48f re PR testsuite/81784 (gcc.dg/compare2.c fails starting with r250984)
PR testsuite/81784
	* gcc.dg/compare2.c: Update dg-bogus and dg-warning.

From-SVN: r251021
2017-08-10 08:54:04 +00:00
Martin Liska
2b7d0696e1 Fix target attribute handling (PR c++/81355).
2017-08-10  Martin Liska  <mliska@suse.cz>

	PR c++/81355
	* c-attribs.c (handle_target_attribute):
	Report warning for an empty string argument of target attribute.
2017-08-10  Martin Liska  <mliska@suse.cz>

	PR c++/81355
	* g++.dg/other/pr81355.C: New test.

From-SVN: r251020
2017-08-10 07:43:49 +00:00
Jakub Jelinek
50aa16c388 re PR c/81687 (Compiler drops label in OpenMP region)
PR c/81687
	* omp-low.c (omp_copy_decl): Don't remap FORCED_LABEL or DECL_NONLOCAL
	LABEL_DECLs.
	* tree-cfg.c (move_stmt_op): Don't adjust DECL_CONTEXT of FORCED_LABEL
	or DECL_NONLOCAL labels.
	(move_stmt_r) <case GIMPLE_LABEL>: Adjust DECL_CONTEXT of FORCED_LABEL
	or DECL_NONLOCAL labels here.

	* testsuite/libgomp.c/pr81687-1.c: New test.
	* testsuite/libgomp.c/pr81687-2.c: New test.

From-SVN: r251019
2017-08-10 02:33:20 +02:00
David Malcolm
47ee1b7c10 jit: add gcc_jit_type_get_vector
gcc/jit/ChangeLog:
	* docs/cp/topics/types.rst (Vector types): New section.
	* docs/topics/compatibility.rst (LIBGCCJIT_ABI_8): New tag.
	* docs/topics/types.rst (gcc_jit_context_get_type): Fix typo in
	example.
	(Vector types): New section.
	* docs/_build/texinfo/libgccjit.texi: Regenerate.
	* jit-playback.c (gcc::jit::playback::type::get_vector): New
	method.
	* jit-playback.h (gcc::jit::playback::type::get_vector): New
	method.
	* jit-recording.c: In namespace gcc::jit::recording::
	(type::get_vector): New method.
	(memento_of_get_aligned::write_reproducer): Fix typo
	in leading comment.
	(memento_of_get_vector::replay_into): New method.
	(memento_of_get_vector::make_debug_string): New method.
	(memento_of_get_vector::write_reproducer): New method.
	* jit-recording.h: In namespace gcc::jit::recording::
	(type::get_vector): New
	 method.
	(class memento_of_get_vector): New class.
	* libgccjit++.h (gccjit::type::get_vector): New method.
	* libgccjit.c (gcc_jit_type_get_vector): New public entrypoint.
	* libgccjit.h (LIBGCCJIT_HAVE_gcc_jit_type_get_vector): New
	define.
	(gcc_jit_type_get_vector): New decl.
	* libgccjit.map (LIBGCCJIT_ABI_8): New ABI tag.

gcc/testsuite/ChangeLog:
	* jit.dg/all-non-failing-tests.h: Add note about
	test-vector-types.cc.
	* jit.dg/test-error-gcc_jit_type_get_vector-bad-type.c: New test
	case.
	* jit.dg/test-error-gcc_jit_type_get_vector-non-power-of-two.c:
	New test case.
	* jit.dg/test-vector-types.cc: New test case.

From-SVN: r251018
2017-08-10 00:18:19 +00:00
GCC Administrator
b240c0e02e Daily bump.
From-SVN: r251017
2017-08-10 00:16:18 +00:00
Andrew Pinski
b388427bf1 vect-xorsign_exec.c: Add --save-temps to the options passed.
2017-08-09  Andrew Pinski  <apinski@cavium.com>

        * gcc.target/aarch64/vect-xorsign_exec.c: Add
        --save-temps to the options passed.

From-SVN: r251013
2017-08-09 17:05:30 -07:00
Segher Boessenkool
25f402d1c1 This time with the file added.
Testcase for PR81423

gcc/testsuite/
	PR rtl-optimization/81423
	* gcc.c-torture/execute/pr81423.c: New testcase.

From-SVN: r251011
2017-08-09 23:52:30 +02:00
Michael Collison
12c2ab7bb4 packed8.C: Remove -mstructure-size- boundary option and fix comment.
2017-08-09  Michael Collison  <michael.collison@arm.com>

	* testsuite/g++.dg/ext/packed8.C: Remove -mstructure-size-
	boundary option and fix comment.
	* testsuite/g++.dg/init/array16.C: Remove -mstructure-size-
	boundary option and fix comment.
	* testsuite/g++.dg/other/crash-4.C: Remove -mstructure-size-
	boundary option and fix comment.
	* testsuite/gcc.dg/builtin-stringop-chk-1.c: Remove
	-mstructure-size boundary option.

From-SVN: r251010
2017-08-09 21:46:10 +00:00
Jonathan Wakely
2d763763ed Fix test for __has_unique_object_representations support in Clang
* include/std/type_traits (_GLIBCXX_NO_BUILTIN_HAS_UNIQ_OBJ_REP):
	Replace with _GLIBCXX_HAVE_BUILTIN_HAS_UNIQ_OBJ_REP and use
	__is_identifier to set it.

From-SVN: r251009
2017-08-09 22:38:05 +01:00
Katsuhiko Nishimra
2ae804bf9d Fix test for __is_aggregate support in Clang
2017-08-09  Katsuhiko Nishimra  <ktns.87@gmail.com>

	* include/std/type_traits (_GLIBCXX_HAVE_BUILTIN_IS_AGGREGATE): Use
	__is_identifier instead of __has_builtin.

From-SVN: r251008
2017-08-09 22:37:52 +01:00
Will Schmidt
2fb40463a9 rs6000.c (rs6000_option_override_internal): Add blurb to indicate when early gimple folding has been disabled.
[gcc]

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

        * config/rs6000/rs6000.c (rs6000_option_override_internal): Add blurb
        to indicate when early gimple folding has been disabled.
        (rs6000_gimple_fold_builtin): Add debug content.
        (rs6000_invalid_builtin): Fix whitespace.
        (rs6000_expand_builtin): Fix whitespace.
        * config/rs6000/rs6000.opt: Add option for -mfold-gimple.

From-SVN: r251007
2017-08-09 21:28:39 +00:00
Ian Lance Taylor
19eec7ac5f compiler: fix buglet in lshift type determination
It's possible to construct an lshift expression using unsafe.Sizeof
    that is technically a compile-time constant but can't be evaluated
    without going through backend methods. In this case, insure that
    Type::make_non_abstract_type is called on the numeric operand of the
    shift (as opposed to leaving as abstract), to avoid an assert later on
    in the compiler flow.
    
    Fixes golang/go#21372.
    
    Reviewed-on: https://go-review.googlesource.com/54370

From-SVN: r251006
2017-08-09 21:24:00 +00:00
Segher Boessenkool
cc6a467f45 rs6000: Use SAVE_MULTIPLE only if we restore what it saves (PR80938)
We can have SAVE_MULTIPLE while we do not have REST_MULTIPLE.  If the
inline restore does not restore all registers, the CFI for the save
and restore can conflict if things are shrink-wrapped.

We could restore all registers that are saved (not ideal), or emit
the CFI notes to say we did (which will work fine, but is also not
so great); instead, let's not save the registers that are unused.


	PR target/80938
	* config/rs6000/rs6000.c (rs6000_savres_strategy): Don't use
	SAVE_MULTIPLE if not all the registers that saves, should be saved.

From-SVN: r251005
2017-08-09 23:08:33 +02:00
Segher Boessenkool
a8a581af9e Testcase for PR81423
gcc/testsuite/
	PR rtl-optimization/81423
	* gcc.c-torture/execute/pr81423.c: New testcase.

From-SVN: r251004
2017-08-09 23:05:45 +02:00
Jim Wilson
825ada3580 Add falkor pipeline description.
gcc/
	* config/aarch64/aarch64-cores.def (falkor): Use falkor pipeline.
	(qdf24xx): Likewise.
	* config/aarch64/aarch64.md: Include falkor.md.
	* config/aarch64/falkor.md: New.

From-SVN: r251003
2017-08-09 13:58:35 -07:00
Jason Merrill
233608bdb1 PR c++/81525 - wrong constant value with generic lambda
* pt.c (tsubst_decl) [VAR_DECL]: Avoid clobbering auto.
	(tsubst_copy) [VAR_DECL]: Handle auto.

From-SVN: r250999
2017-08-09 15:21:49 -04:00
Will Schmidt
50a87c1c0c fold-vec-pack-double.c: New.
[gcc/testsuite]

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

	* gcc.target/powerpc/fold-vec-pack-double.c: New.
	* gcc.target/powerpc/fold-vec-pack-int.c: New.
	* gcc.target/powerpc/fold-vec-pack-longlong.c: New.
	* gcc.target/powerpc/fold-vec-pack-short.c: New.

From-SVN: r250998
2017-08-09 19:11:03 +00:00