Commit Graph

169615 Commits

Author SHA1 Message Date
Jason Merrill 09039e9c72 PR c++/70462 - unnecessary base ctor variant with final.
As pointed out in the PR, we don't need base 'tor variants for a final
class, since it can never be a base.  I tried also dropping complete
variants for abstract classes, but that runs into ABI compatibility problems
with older releases that refer to those symbols.

	* optimize.c (populate_clone_array): Skip base variant if
	CLASSTYPE_FINAL.
	(maybe_clone_body): We don't need an alias if we are only defining
	one clone.

From-SVN: r272669
2019-06-26 00:56:07 -04:00
Hongtao Liu e21b52afe9 Enable GCC support for AVX512_VP2INTERSECT which will be in tigerlaker.
There are two instructions for AVX512_VP2INTERSECT:
VP2INTERSECTD and VP2INTERSECTQ.

gcc/
2019-06-05  Hongtao Liu  <hongtao.liu@intel.com>

	* common/config/i386/i386-common.c
	(OPTION_MASK_ISA_AVX512VP2INTERSECT_SET,
	OPTION_MASK_ISA_AVX512VP2INTERSECT_UNSET): New macros.
	(OPTION_MASK_ISA2_AVX512F_UNSET): Add
	OPTION_MASK_ISA_AVX512VP2INTERSECT_UNSET.
	(ix86_handle_option): Handle -mavx512vp2intersect.
	* config/i386/avx512vp2intersectintrin.h: New.
	* config/i386/avx512vp2intersectvlintrin.h: New.
	* config/i386/cpuid.h (bit_AVX512VP2INTERSECT): New.
	* config/i386/driver-i386.c (host_detect_local_cpu): Detect
	AVX512VP2INTERSECT.
	* config/i386/i386-builtin-types.def: Add new types.
	* config/i386/i386-builtin.def: Add new builtins.
	* config/i386/i386-builtins.c: (enum processor_features): Add
	F_AVX512VP2INTERSECT.
	(static const _isa_names_table isa_names_table): Ditto.
	* config/i386/i386-c.c (ix86_target_macros_internal): Define
	__AVX512VP2INTERSECT__.
	* config/i386/i386-expand.c (ix86_expand_builtin): Expand
	IX86_BUILTIN_2INTERSECTD512, IX86_BUILTIN_2INTERSECTQ512,
	IX86_BUILTIN_2INTERSECTD256, IX86_BUILTIN_2INTERSECTQ256,
	IX86_BUILTIN_2INTERSECTD128, IX86_BUILTIN_2INTERSECTQ128.
	* config/i386/i386-modes.def (P2QI, P2HI): New modes.
	* config/i386/i386-options.c (ix86_target_string): Add
	-mavx512vp2intersect.
	(ix86_option_override_internal): Handle AVX512VP2INTERSECT.
	* config/i386/i386.c (ix86_hard_regno_nregs): Allocate two regs for
	P2HImode and P2QImode.
	(ix86_hard_regno_mode_ok): Register pair only starts at even hardreg
	number for P2QImode and P2HImode.
	(ix86_regmode_natural_size): New function.
	* config/i386/i386.h (TARGET_AVX512VP2INTERSECT,
	TARGET_AVX512VP2INTERSECT_P, PTA_AVX512VP2INTERSECT
	REGMODE_NATURAL_SIZE, MASK_PAIR_REGNO_P): New.
	* config/i386/i386-protos.h (ix86_regmode_natural_size): Declare
	* config/i386/i386.opt: Add -mavx512vp2intersect.
	* config/i386/immintrin.h: Include avx512vp2intersectintrin.h and
	avx512vp2intersectvlintrin.h.
	* config/i386/sse.md (define_c_enum "unspec"): Add UNSPEC_VP2INTERSECT.
	(define_mode_iterator VI48_AVX512VP2VL): New.
	(avx512vp2intersect_2intersect<mode>,
	avx512vp2intersect_2intersectv16si): New define_insn patterns.
	* config.gcc: Add avx512vp2intersectvlintrin.h and
	avx512vp2intersectintrin.h to extra_headers.
	* doc/invoke.texi: Document -mavx512vp2intersect.

gcc/testsuite
2019-06-06  Hongtao Liu  <hongtao.liu@intel.com>
	    Olga Makhotina  <olga.makhotina@intel.com>

	* gcc.target/i386/avx512-check.h: Handle bit_AVX512VP2INTERSECT.
	* gcc.target/i386/avx512vp2intersect-2intersect-1a.c: New test.
	* gcc.target/i386/avx512vp2intersect-2intersect-1b.c: Likewise.
	* gcc.target/i386/avx512vp2intersect-2intersectvl-1a.c: Likewise.
	* gcc.target/i386/avx512vp2intersect-2intersectvl-1b.c: Likewise.
	* gcc.target/i386/sse-12.c: Add -mavx512vp2intersect.
	* gcc.target/i386/sse-13.c: Likewsie.
	* gcc.target/i386/sse-14.c: Likewise.
	* gcc.target/i386/sse-22.c: Likewise.
	* gcc.target/i386/sse-23.c: Likewise.
	* g++.dg/other/i386-2.C: Likewise.
	* g++.dg/other/i386-3.C: Likewise.

Co-Authored-By: H.J. Lu <hongjiu.lu@intel.com>
Co-Authored-By: Olga Makhotina <olga.makhotina@intel.com>

From-SVN: r272668
2019-06-26 04:46:29 +00:00
Steven G. Kargl b48826985b re PR fortran/90988 (Wrong error message with variables named "PUBLIC*")
2019-06-24  Steven G. Kargl  <kargl@gcc.gnu.org>

	PR Fortran/90988
	* decl.c (access_attr_decl): Use temporary variable to reduce
	unreadability of code.  Normalize jumping to return.
	(gfc_match_protected): Fix parsing error.  Add comments to 
	explain code.  Remove dead code.
	(gfc_match_private): Use temporary variable to reduce unreadability 
	of code. Fix parsing error.  Move code to test for blank PRIVATE.
	Remove dead code.
	(gfc_match_public): Move code to test for blank PUBLIC.  Fix
	parsing error.  Remove dead code.

2019-06-24  Steven G. Kargl  <kargl@gcc.gnu.org>

	PR Fortran/90988
	* gfortran.dg/pr90988_1.f90: New test.
	* gfortran.dg/pr90988_2.f90: Ditto.
	* gfortran.dg/pr90988_3.f90: Ditto.

From-SVN: r272667
2019-06-26 04:31:14 +00:00
Ian Lance Taylor 07525dad06 libgo/testsuite: ignore symbols with a leading dot in symtogo
On AIX, a function has two symbols, a text symbol (with a leading dot)
    and a data one (without it).
    As the tests must be run only once, only the data symbol can be used to
    retrieve the final go symbol. Therefore, all symbols beginning with a dot
    are ignored by symtogo.
    
    Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/177837

From-SVN: r272666
2019-06-26 00:17:32 +00:00
GCC Administrator d62cbf43e0 Daily bump.
From-SVN: r272665
2019-06-26 00:16:23 +00:00
Ian Lance Taylor c31a34018a cmd/go: silence ar with D flag failures
The first call of ar must not show its output in order to avoid useless
    error messages about D flag.
    The corresponding Go toolchain patch is CL 182077.
    
    Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/183817

From-SVN: r272661
2019-06-26 00:04:36 +00:00
Iain Sandoe ebecdd0c36 Darwin, add a missed file change
From the last commit.

2019-06-25  Iain Sandoe  <iain@sandoe.co.uk>

	* config.host: Add libef_ppc.a to the extra files for powerpc-darwin.

From-SVN: r272660
2019-06-25 20:12:49 +00:00
Iain Sandoe a8e55c61f8 [Darwin, PPC] Move the out of line register save/restore to an endfile.
We have been including this in libgcc, which means that we have to append
-lgcc even when using shared libgcc. In preparation for revision of libgcc
split this into an endfile.

gcc/
2019-06-25  Iain Sandoe  <iain@sandoe.co.uk>

	* config/rs6000/darwin.h (ENDFILE_SPEC): New.

libgcc/
2019-06-25  Iain Sandoe  <iain@sandoe.co.uk>

	* config.host: Add libef_ppc.a to the extra files for powerpc-darwin.
	* config/rs6000/t-darwin: (PPC_ENDFILE_SRC, PPC_ENDFILE_OBJS): New.
	Build objects for the out of line save/restore register functions
	so that they can be used for any supported Darwin version.
	* config/t-darwin: Default the build Darwin version to Darwin8
	(MacOS 10.4).

From-SVN: r272659
2019-06-25 20:11:11 +00:00
Bill Seurer 2c04f8476a [PATCH, rs6000] Split up rs6000.c.
The source file rs6000.c has grown to unreasonable size and is being
split up into several smaller source files.  This should improve
compilation speed for building gcc.

This is the first of several patches to do this and moves most of the
prologue/epilogue code to a new source file.

Bootstrapped and tested on powerpc64le-unknown-linux-gnu and
powerpc64-unknown-linux-gnu with no regressions.  Is this ok for trunk?


2019-06-24  Bill Seurer  <seurer@linux.vnet.ibm.com>

	* config/rs6000/rs6000.c (stack_info, rs6000_pic_labelno,
	savres_routine_syms, savres_routine_name, morestack_ref,
	rs6000_init_machine_status, save_reg_p, first_reg_to_save,
	first_fp_reg_to_save, first_altivec_reg_to_save, compute_vrsave_mask,
	compute_save_world_info, is_altivec_return_reg, fixed_reg_p,
	rs6000_savres_strategy, rs6000_stack_info, debug_stack_info,
	rs6000_return_addr, rs6000_decl_ok_for_sibcall,
	rs6000_function_ok_for_sibcall, rs6000_ra_ever_killed,
	rs6000_emit_load_toc_table, rs6000_emit_eh_reg_restore, uses_TOC,
	create_TOC_reference, rs6000_aix_asm_output_dwarf_table_ref,
	rs6000_emit_stack_tie, rs6000_emit_allocate_stack_1,
	get_stack_clash_protection_probe_interval,
	get_stack_clash_protection_guard_size,
	rs6000_emit_probe_stack_range_stack_clash, rs6000_emit_allocate_stack,
	rs6000_emit_probe_stack_range, output_probe_stack_range_1,
	interesting_frame_related_regno, output_probe_stack_range_stack_clash,
	output_probe_stack_range, rs6000_frame_related, generate_set_vrsave,
	gen_frame_set, gen_frame_load, gen_frame_store, emit_frame_save,
	gen_frame_mem_offset, rs6000_savres_routine_name,
	rs6000_savres_routine_sym, rs6000_emit_stack_reset,
	ptr_regno_for_savres, rs6000_emit_savres_rtx,
	rs6000_emit_prologue_move_from_cr, split_stack_arg_pointer_used_p,
	rs6000_global_entry_point_prologue_needed_p,
	rs6000_get_separate_components, rs6000_components_for_bb,
	rs6000_disqualify_components, rs6000_emit_prologue_components,
	rs6000_emit_epilogue_components, rs6000_set_handled_components,
	emit_vrsave_prologue, emit_split_stack_prologue, rs6000_emit_prologue,
	rs6000_output_savres_externs, rs6000_output_function_prologue,
	rs6000_keep_leaf_when_profiled, load_cr_save, restore_saved_cr,
	load_lr_save, restore_saved_lr, add_crlr_cfa_restore,
	offset_below_red_zone_p, emit_cfa_restores, rs6000_emit_epilogue,
	rs6000_output_function_epilogue, gen_add3_const,
	rs6000_expand_split_stack_prologue, rs6000_live_on_entry,
	rs6000_split_stack_space_check, rs6000_save_toc_in_prologue_p): Moved
	to rs6000-logue.c.
	(machine_function): Moved to rs6000.h.
	(rs6000_stack_t, ALTIVEC_REG_BIT, quad_address_offset_p) Moved to
	rs6000-internal.h.
	* config/rs6000/rs6000-logue.c(stack_info, rs6000_pic_labelno,
	savres_routine_syms, savres_routine_name, morestack_ref,
	rs6000_init_machine_status, save_reg_p, first_reg_to_save,
	first_fp_reg_to_save, first_altivec_reg_to_save, compute_vrsave_mask,
	compute_save_world_info, is_altivec_return_reg, fixed_reg_p,
	rs6000_savres_strategy, rs6000_stack_info, debug_stack_info,
	rs6000_return_addr, rs6000_decl_ok_for_sibcall,
	rs6000_function_ok_for_sibcall, rs6000_ra_ever_killed,
	rs6000_emit_load_toc_table, rs6000_emit_eh_reg_restore, uses_TOC,
	create_TOC_reference, rs6000_aix_asm_output_dwarf_table_ref,
	rs6000_emit_stack_tie, rs6000_emit_allocate_stack_1,
	get_stack_clash_protection_probe_interval,
	get_stack_clash_protection_guard_size,
	rs6000_emit_probe_stack_range_stack_clash, rs6000_emit_allocate_stack,
	rs6000_emit_probe_stack_range, output_probe_stack_range_1,
	interesting_frame_related_regno, output_probe_stack_range_stack_clash,
	output_probe_stack_range, rs6000_frame_related, generate_set_vrsave,
	gen_frame_set, gen_frame_load, gen_frame_store, emit_frame_save,
	gen_frame_mem_offset, rs6000_savres_routine_name,
	rs6000_savres_routine_sym, rs6000_emit_stack_reset,
	ptr_regno_for_savres, rs6000_emit_savres_rtx,
	rs6000_emit_prologue_move_from_cr, split_stack_arg_pointer_used_p,
	rs6000_global_entry_point_prologue_needed_p,
	rs6000_get_separate_components, rs6000_components_for_bb,
	rs6000_disqualify_components, rs6000_emit_prologue_components,
	rs6000_emit_epilogue_components, rs6000_set_handled_components,
	emit_vrsave_prologue, emit_split_stack_prologue, rs6000_emit_prologue,
	rs6000_output_savres_externs, rs6000_output_function_prologue,
	rs6000_keep_leaf_when_profiled, load_cr_save, restore_saved_cr,
	load_lr_save, restore_saved_lr, add_crlr_cfa_restore,
	offset_below_red_zone_p, emit_cfa_restores, rs6000_emit_epilogue,
	rs6000_output_function_epilogue, gen_add3_const,
	rs6000_expand_split_stack_prologue, rs6000_live_on_entry,
	rs6000_split_stack_space_check, rs6000_save_toc_in_prologue_p): Moved
	to here from rs6000.c.
	* config/rs6000/rs6000.h (machine_function): Moved to here from rs6000.c.
	* config/rs6000/rs6000-internal.h: (rs6000_stack_t, ALTIVEC_REG_BIT,
	quad_address_offset_p) Moved to here from rs6000.c.
	* config/rs6000/t-rs6000: Add new source file rs6000-logue.c.
	* config/config.gcc: Add new source file rs6000-logue.c to garbage
	collector.

From-SVN: r272658
2019-06-25 20:06:07 +00:00
Jason Merrill a4cc282879 class.c (resolves_to_fixed_type_p): Check CLASSTYPE_FINAL.
* class.c (resolves_to_fixed_type_p): Check CLASSTYPE_FINAL.

If we have a pointer to final class, we know the dynamic type of the object
must be that class, because it can't have any derived classes.

From-SVN: r272656
2019-06-25 12:15:40 -04:00
Martin Liska 27bb6f7c47 Put hashtab_chk_error into hash-table.c.
2019-06-25  Martin Liska  <mliska@suse.cz>

	* hash-table.c (hashtab_chk_error): Move here from ...
	* hash-table.h (hashtab_chk_error): ... here.

From-SVN: r272655
2019-06-25 14:34:25 +00:00
Jakub Jelinek bc2687dd94 re PR c++/90969 (ICE: tree check: expected array_type, have vector_type in array_ref_low_bound, at tree.c:13570)
PR c++/90969
	* constexpr.c (cxx_eval_array_reference): Don't look through VCE from
	vector type if lval.

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

From-SVN: r272654
2019-06-25 16:05:13 +02:00
Jonathan Wakely e88d863cbd Fix non-portable use of std::abs(double) in constexpr function
Although libstdc++ adds 'constexpr' to its std::abs(floating-point)
overloads (as a non-conforming extension), those overloads are not used
if the target libc provides them, which is the case on Solaris.

The fix is to avoid std::abs and simply apply the negation when needed.

	* include/std/numeric (midpoint(T, T)): Avoid std::abs in constexpr
	function.

From-SVN: r272653
2019-06-25 14:18:36 +01:00
Martin Liska 247b63e33d Transform filter-rtags-warnings to filter-clang-warnings.
2019-06-25  Martin Liska  <mliska@suse.cz>

	contrib/filter-clang-warnings.py: Transform from
	filter-rtags-warnings.py.

From-SVN: r272652
2019-06-25 12:30:19 +00:00
Martin Liska adef5d4f4e Remove dead code in df-scan.c (PR tree-optimization/90978).
2019-06-25  Martin Liska  <mliska@suse.cz>

	PR tree-optimization/90978
	* df-scan.c (df_update_entry_block_defs): Remove dead else
	branch.
	(df_update_exit_block_uses): Likewise.

From-SVN: r272651
2019-06-25 11:50:12 +00:00
Martin Liska e5ce4cbc72 Do not call strlen with NULL argument in libgcov.
2019-06-25  Martin Liska  <mliska@suse.cz>

	* libgcov-driver-system.c (replace_filename_variables): Do not
	call strlen with NULL argument.

From-SVN: r272650
2019-06-25 11:49:36 +00:00
Kwok Cheung Yeung b1e86e33a2 Enable full GFortran library for AMD GCN
2019-06-25  Kwok Cheung Yeung  <kcy@codesourcery.com>
            Andrew Stubbs  <ams@codesourcery.com>

	libgfortran/
	* configure: Regenerate.
	* configure.ac (LIBGFOR_MINIMAL): Do not use on AMD GCN.

Co-Authored-By: Andrew Stubbs <ams@codesourcery.com>

From-SVN: r272649
2019-06-25 11:41:38 +00:00
Andrew Stubbs 52a47d2856 Stub implementation of unwinding for AMD GCN.
2019-06-25  Andrew Stubbs  <ams@codesourcery.com>

	libgcc/
	* config/gcn/t-amdgcn (LIB2ADD): Add unwind-gcn.c.
	* config/gcn/unwind-gcn.c: New file.

From-SVN: r272648
2019-06-25 11:41:33 +00:00
Kwok Cheung Yeung 76d4633107 Create GCN-specific gthreads
2019-06-25  Kwok Cheung Yeung  <kcy@codesourcery.com>
            Andrew Stubbs  <ams@codesourcery.com>

        gcc/
	* config.gcc (thread_file): Set to gcn for AMD GCN.
	* config/gcn/gcn.c (gcn_emutls_var_init): New function.
	(TARGET_EMUTLS_VAR_INIT): New hook.

	config/
	* gthr.m4 (GCC_AC_THREAD_HEADER): Add case for gcn.

	libgcc/
	* configure: Regenerate.
	* config/gcn/gthr-gcn.h: New.

Co-Authored-By: Andrew Stubbs <ams@codesourcery.com>

From-SVN: r272647
2019-06-25 11:41:29 +00:00
Martin Jambor 4c3d876014 [PR 90939] Remove outdated assert in ipcp_bits_lattice::meet_with
2019-06-25  Martin Jambor  <mjambor@suse.cz>

	PR ipa/90939
	* ipa-cp.c (ipcp_bits_lattice::meet_with): Remove assert.

	testsuite/
	* g++.dg/lto/pr90939_[01].C: New test.

From-SVN: r272646
2019-06-25 13:05:19 +02:00
Richard Biener 332d6c4189 re PR tree-optimization/90930 (Excessive memory consumption)
2019-06-25  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/90930
	* tree-ssa-reassoc.c (reassociate_bb): Only rewrite expression
	into parallel form in the last pass instance.

	* gcc.dg/tree-ssa/reassoc-24.c: Adjust.
	* gcc.dg/tree-ssa/reassoc-25.c: Likewise.

From-SVN: r272644
2019-06-25 10:59:48 +00:00
Claudiu Zissulescu 673f01b856 [ARC] Fix for PR89838
gcc/
xxxx-xx-xx  Claudiu Zissulescu  <claziss@synopsys.com>

	* config/arc/arc.c (arc_symbol_binds_local_p): New function.
	(arc_legitimize_pic_address): Simplify and cleanup the function.
	(SYMBOLIC_CONST): Remove.
	(prepare_pic_move): Likewise.
	(prepare_move_operands): Handle complex mov cases here.
	(arc_legitimize_address_0): Remove call to
	arc_legitimize_pic_address.
	(arc_legitimize_address): Remove call to
	arc_legitimize_tls_address.
	* config/arc/arc.md (movqi_insn): Allow Cm3 match.
	(movhi_insn): Likewise.

/gcc/testsuite
xxxx-xx-xx  Claudiu Zissulescu  <claziss@synopsys.com>

	* gcc.target/arc/pr89838.c: New file.

From-SVN: r272643
2019-06-25 11:52:04 +02:00
Jozef Lawrynowicz 5e5803060c Implement alternate "__intN__" form of "__intN" type
gcc/ChangeLog:

	* gcc/c-family/c-common.c (c_common_nodes_and_builtins): Define
	alternate "__intN__" name for "__intN" types.
	* gcc/c/c-parser.c (c_parse_init): Create keyword for "__intN__" type.
	* gcc/cp/lex.c (init_reswords): Likewise.
	* gcc/config/msp430/msp430.h: Use __int20__ for SIZE_TYPE and
	PTRDIFF_TYPE.
	* gcc/cp/cp-tree.h (cp_decl_specifier_seq): New bitfield "int_n_alt".
	* gcc/c/c-decl.c (declspecs_add_type): Don't pedwarn about "__intN" ISO
	C incompatibility if alternate "__intN__" form is used.
	* gcc/cp/decl.c (grokdeclarator): Likewise.
	* gcc/cp/parser.c (cp_parser_simple_type_specifier): Set
	decl_specs->int_n_alt if "__intN__" form is used.
	* gcc/gimple-ssa-sprintf.c (build_intmax_type_nodes): Accept "__intN__"
	format of "__intN" types for UINTMAX_TYPE.
	* gcc/brig/brig-lang.c (brig_build_c_type_nodes): Accept "__intN__"
	format of "__intN" types for SIZE_TYPE.
	* gcc/lto/lto-lang.c (lto_build_c_type_nodes): Likewise.
	* gcc/stor-layout.c (initialize_sizetypes): Accept "__intN__"
	format of "__intN" types for SIZETYPE.
	* gcc/tree.c (build_common_tree_nodes): Accept "__intN__"
	format of "__intN" types for SIZE_TYPE and PTRDIFF_TYPE.
	* gcc/doc/invoke.texi: Document that __intN__ disables pedantic
	warnings.

gcc/testsuite/ChangeLog:

	* gcc.target/msp430/mlarge-pedwarns.c: New test.

From-SVN: r272640
2019-06-25 09:41:17 +00:00
Jan Hubicka a7e8a463cd tree-ssa-alias.c (indirect_ref_may_alias_decl_p): Check that base2_alias_set is non-zero before doing TBAA based disambiguation.
* tree-ssa-alias.c (indirect_ref_may_alias_decl_p): Check that
	base2_alias_set is non-zero before doing TBAA based disambiguation.

From-SVN: r272639
2019-06-25 08:35:01 +00:00
Martin Liska 1a3e38aee2 Properly sum costs in tree-vect-loop.c (PR tree-optimization/90973).
2019-06-25  Martin Liska  <mliska@suse.cz>

	PR tree-optimization/90973
	* tree-vect-loop.c (vect_get_known_peeling_cost): Sum retval
	of prologue and epilogue.

From-SVN: r272638
2019-06-25 08:17:39 +00:00
Eric Botcazou c23524153d decl.c (gnat_to_gnu_entity): Remove superfluous test in previous change.
* gcc-interface/decl.c (gnat_to_gnu_entity): Remove superfluous test
	in previous change.
	* gcc-interface/gigi.h (maybe_character_type): Fix formatting.
	(maybe_character_value): Likewise.

From-SVN: r272637
2019-06-25 08:17:08 +00:00
Jakub Jelinek 361af3e419 re PR sanitizer/90954 (ICE: combining undefined behavior sanitizer with openmp)
PR sanitizer/90954
	* c-omp.c (c_finish_omp_atomic): Allow tree_invariant_p in addition
	to SAVE_EXPR in first operand of a COMPOUND_EXPR.

	* c-c++-common/gomp/pr90954.c: New test.

From-SVN: r272635
2019-06-25 09:00:34 +02:00
Jakub Jelinek 32bab8b6ad pstl_config.h (_PSTL_PRAGMA_SIMD_SCAN, [...]): Define to OpenMP 5.0 pragmas even for GCC 10.0+.
* include/pstl/pstl_config.h (_PSTL_PRAGMA_SIMD_SCAN,
	_PSTL_PRAGMA_SIMD_INCLUSIVE_SCAN, _PSTL_PRAGMA_SIMD_EXCLUSIVE_SCAN):
	Define to OpenMP 5.0 pragmas even for GCC 10.0+.
	(_PSTL_UDS_PRESENT): Define to 1 for GCC 10.0+.

From-SVN: r272634
2019-06-25 08:59:12 +02:00
Ian Lance Taylor 81fadf1c8d runtime: mark memequal and memclrNoHeapPointers nosplit
They are wrappers of libc functions that use no stack. Mark them
    nosplit so the linker won't patch it to call __morestack_non_split.
    
    Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/183629

From-SVN: r272633
2019-06-25 06:16:21 +00:00
GCC Administrator 33437116ed Daily bump.
From-SVN: r272632
2019-06-25 00:16:16 +00:00
Jan Hubicka f4af4019df ipa-utils.h (type_with_linkage_p): Verify that type is CXX_ODR_P.
* ipa-utils.h (type_with_linkage_p): Verify that type is
	CXX_ODR_P.
	(odr_type_p): Remove extra return.
	* lto-streamer-out.c (hash_tree): Hash TYPE_CXX_ODR_P;
	hash STRING_FLAG only for arrays and integers.
	* tree-stremaer-in.c (unpack_ts_type_common_value_fields):
	Update analogously.
	* tree-streamer-out.c (pack_ts_type_common_value_fields):
	Likewise.
	* print-tree.c (print_node): Print cxx-odr-p
	and string-flag.
	* tree.c (need_assembler_name_p): Also check that type
	is CXX_ODR_TYPE_P
	(verify_type_variant): Update verification of SRING_FLAG;
	also check CXX_ODR_P.
	* tree.h (ARRAY_OR_INTEGER_TYPE_CHECK): New macro.
	(TYPE_STRING_FLAG): Use it.
	(TYPE_CXX_ODR_P): New macro.

	* lto-common.c (compare_tree_sccs_1): Compare CXX_ODR_P;
	compare STRING_FLAG only for arrays and integers.

	* gcc-interface/decl.c (gnat_to_gnu_entity): Check that
	type is array or integer prior checking string flag.
	* gcc-interface/gigi.h (gnat_signed_type_for,
	maybe_character_value): Likewise.

	* c-common.c (braced_lists_to_strings): Check that
	type is array or integer prior checking string flag.

	* lex.c (cxx_make_type): Set TYPE_CXX_ODR_P.

	* dwarf2out.c (gen_array_type_die): First check that type
	is an array and then test string flag.

	* trans-expr.c (gfc_conv_substring): Check that
	type is array or integer prior checking string flag.
	(gfc_conv_string_parameter): Likewise.
	* trans-openmp.c (gfc_omp_scalar_p): Likewise.
	* trans.c (gfc_build_array_ref): Likewise.

From-SVN: r272628
2019-06-24 21:13:12 +00:00
Iain Sandoe cd57f4d81b [Darwin, PPC, testsuite] Skip tests for unimplemented functionality.
The -mno-speculate-indirect-jumps functionality is not implemented for
Darwin and, given that it's deprecated, is unlikely to be.

2019-06-24  Iain Sandoe  <iain@sandoe.co.uk>

	* gcc.target/powerpc/safe-indirect-jump-1.c: Skip for Darwin.
	* gcc.target/powerpc/safe-indirect-jump-7.c: Likewise.

From-SVN: r272627
2019-06-24 19:36:56 +00:00
Iain Sandoe 4de1ded224 [Darwin, PPC, testsuite] Fix spec-barr-1.c for Darwin.
We just needed to adjust the regex to accept Darwin's register names.

2019-06-24  Iain Sandoe  <iain@sandoe.co.uk>

	* gcc.target/powerpc/spec-barr-1.c: Adjust scan assembler regex
	to recognise Darwin's register names.

From-SVN: r272626
2019-06-24 19:25:44 +00:00
Iain Sandoe 367e5f9e43 [Darwin, testsuite] Fix isystem-2.c.
For the test to succeed there needs to be some header that is to be found in
the 'expected' place i.e. <sysroot>/usr/include/.  It's important that it is
not the name of a header for which fixincludes have been applied, since such
headers will be found in the gcc include-fixed dir and, in general, reference
additional headers.  The dummy sysroot will prevent the additional headers
from being found, resulting in a failed test.  The fix is to use a header name
that isn't expected to be present in a real sysroot.

2019-06-24  Iain Sandoe  <iain@sandoe.co.uk>

	* gcc.dg/cpp/isysroot-1.c (main): Use <example.h> as the test header.
	* gcc.dg/cpp/usr/include/stdio.h: Rename...
	* gcc.dg/cpp/usr/include/example.h: ... to this.

From-SVN: r272625
2019-06-24 19:13:01 +00:00
Ian Lance Taylor 609c7da9ab compiler: open code string equality
Open code string equality with builtin memcmp. This allows
    further optimizations in the backend.
    
    Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/183538

From-SVN: r272624
2019-06-24 17:54:07 +00:00
Richard Biener d611cec3de re PR target/90972 (ICE in fold_convert_loc, at fold-const.c:2429)
2019-06-24  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/90972
	* tree-vect-stmts.c (vect_init_vector): Handle CONSTANT_CLASS_P
	in common code, dealing with STRING_CST properly.

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

From-SVN: r272623
2019-06-24 17:21:40 +00:00
Richard Biener bab9de71b4 re PR tree-optimization/90930 (Excessive memory consumption)
2019-06-24  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/90930
	PR tree-optimization/90316
	* tree-ssa-alias.c (walk_non_aliased_vuses): Add missing
	decrement of limit.

From-SVN: r272621
2019-06-24 17:17:26 +00:00
Ian Lance Taylor 2b92d5c69b compiler: use builtin memcmp directly
Instead of going through a C function __go_memcmp, we can just
    use __builtin_memcmp directly. This allows more optimizations in
    the compiler backend.
    
    Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/183537

From-SVN: r272620
2019-06-24 16:54:22 +00:00
Martin Sebor 1e3d475ea1 utils.c (handle_nonnull_attribute): Quote attribute name.
gcc/ada/ChangeLog:

	* gcc-interface/utils.c (handle_nonnull_attribute): Quote attribute
	name.

gcc/c/ChangeLog:

	* c-typeck.c (build_binary_op): Hyphenate floating-point.

gcc/testsuite/ChangeLog:

	* gcc.dg/Wfloat-equal-1.c: Adjust text of expected diagnostic.
	* gcc.dg/misc-column.c: Ditto.

gcc/ChangeLog:

	* tree-pretty-print.h: Remove unnecessary punctuation characters
	from a diagnostic.
	* tree-ssa.c (release_defs_bitset): Correct preprocessor conditional.

From-SVN: r272619
2019-06-24 09:47:22 -06:00
Jason Merrill c3337b44c4 Don't use a separate CLASSTYPE_AS_BASE if it's the same size.
* class.c (layout_class_type): Don't use a separate
	CLASSTYPE_AS_BASE if it's the same size.

From-SVN: r272618
2019-06-24 10:34:35 -04:00
Jonathan Wakely a3c8d7fbe2 Fix std::midpoint for denormal values
* include/std/numeric (midpoint(T, T)): Change implementation for
	floating-point types to avoid incorrect rounding of denormals.
	* testsuite/26_numerics/midpoint/floating.cc: Add check for correct
	rounding with denormals.
	* testsuite/26_numerics/gcd/gcd_neg.cc: Adjust dg-error line numbers.
	* testsuite/26_numerics/lcm/lcm_neg.cc: Likewise.

From-SVN: r272616
2019-06-24 13:09:51 +01:00
Jonathan Wakely ff164b601b Define C11 macros such as FLT_DECIMAL_DIG for C++17
* testsuite/18_support/headers/cfloat/values_c++17.cc: New test.

From-SVN: r272615
2019-06-24 13:09:47 +01:00
GCC Administrator efe8764f72 Daily bump.
From-SVN: r272613
2019-06-24 00:16:17 +00:00
Ian Lance Taylor 587bd42530 compiler: edit error messages to avoid -Wformat-diag warnings
GCC recently introduced -Wformat-diag to scrutinize GCC error messages.
    It reports a number of warnings about gofrontend code, such as:
    
    ../../trunk/gcc/go/gofrontend/import.cc: In member function ‘Type* Import::type_for_index(int, const string&, size_t, bool*)’:
    ../../trunk/gcc/go/gofrontend/import.cc:1129:48: warning: unquoted operator ‘>=’ in format [-Wformat-diag]
     1129 |         "error in %s at %lu: bad type index %d >= %d",
          |                                                ^~
    
    ../../trunk/gcc/go/gofrontend/ast-dump.cc: In member function ‘void Ast_dump_context::dump(Gogo*, const char*)’:
    ../../trunk/gcc/go/gofrontend/ast-dump.cc:203:25: warning: unquoted option name ‘-fgo-dump-ast’ in format [-Wformat-diag]
      203 |     "cannot open %s:%m, -fgo-dump-ast ignored", dumpname.c_str());
          |                         ^~~~~~~~~~~~~
    
    ../../trunk/gcc/go/gofrontend/expressions.cc: In static member function ‘static Bexpression* Func_expression::get_code_pointer(Gogo*, Named_object*, Location)’:
    ../../trunk/gcc/go/gofrontend/expressions.cc:1350:29: warning: misspelled term ‘builtin function’ in format; use ‘built-in function’ instead [-Wformat-diag]
     1350 |     "invalid use of special builtin function %qs; must be called",
          |                             ^~~~~~~~~~~~~~~~
    
    ../../trunk/gcc/go/gofrontend/gogo.cc: In member function ‘void Gogo::add_linkname(const string&, bool, const string&, Location)’:
    ../../trunk/gcc/go/gofrontend/gogo.cc:2527:4: warning: unquoted sequence of 2 consecutive punctuation characters ‘//’ in format [-Wformat-diag]
     2527 |   ("%s is not a function; "
          |   ~^~~~~~~~~~~~~~~~~~~~~~~~
     2528 |    "//go:linkname is only supported for functions"),
          |    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    This CL edits error messages to avoid these warnings.
    
    Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/183497

	* go.test/test/blank1.go: Update for diagnostic message changes.

From-SVN: r272608
2019-06-23 22:10:19 +00:00
Ian Lance Taylor 26fcb396d1 compiler: add go_debug and use it for debug messages
GCC recently added a new warning -Wformat-diag which does a lot of
    rigorous checks on GCC diagnostic messages.  This produces a number of
    unnecessary diagnostics on gofrontend diagnostic output, such as
    
    ../../trunk/gcc/go/gofrontend/escape.cc: In member function ‘virtual int Escape_analysis_assign::statement(Block*, size_t*, Statement*)’:
    ../../trunk/gcc/go/gofrontend/escape.cc:1336:33: warning: spurious leading punctuation sequence ‘[’ in format [-Wformat-diag]
     1336 |       go_inform(s->location(), "[%d] %s esc: %s",
          |                                 ^
    
    ../../trunk/gcc/go/gofrontend/escape.cc: In member function ‘void Escape_analysis_assign::call(Call_expression*)’:
    ../../trunk/gcc/go/gofrontend/escape.cc:1964:17: warning: unquoted operator ‘::’ in format [-Wformat-diag]
     1964 |         "esccall:: indirect call <- %s, untracked",
          |                 ^~
    
    ../../trunk/gcc/go/gofrontend/escape.cc:1964:34: warning: unbalanced punctuation character ‘<’ in format [-Wformat-diag]
     1964 |         "esccall:: indirect call <- %s, untracked",
          |                                  ^
    
    Avoid these messages by adding a new function go_debug that uses only
    printf formatting, not GCC diagnostic formatting, and change all the
    optimization debugging messages to use it.  None of the debugging
    messages used the GCC diagnostic formatting specifiers anyhow.
    
    Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/183437

From-SVN: r272607
2019-06-23 22:04:53 +00:00
Iain Sandoe d7e96c4608 [Darwin, PPC, testsuite] Fix builtins-2 for Darwin.
This cannot pass for current Darwin, since it requires VSX and we
don't have any hardware supporting that.  Add a dg-requires clause
for this.

2019-06-23  Iain Sandoe  <iain@sandoe.co.uk>

	* gcc.target/powerpc/builtins-2.c: Require VSX hardware support.

From-SVN: r272606
2019-06-23 20:29:09 +00:00
Iain Sandoe 5fe352455b [Darwin, PPC, testsuite] Fix pr80125 testcase for Darwin.
Darwin (unlike most of the members of the PowerPC port family)
defaults to signed chars, so the test was failing to compile with
a "mismatched parameters" error.

2019-06-23  Iain Sandoe  <iain@sandoe.co.uk>

	* gcc.target/powerpc/pr80125.c (foo): Use an unsigned char
	vector explicitly for the vec_perm.

From-SVN: r272605
2019-06-23 20:12:22 +00:00
Iain Sandoe fb007b0dd3 [Darwin, PPC, testsuite] Fix builtins-1 testcase for Darwin.
This needs to account for Darwin's __USER_LABEL_PREFIX__.

2019-06-23  Iain Sandoe  <iain@sandoe.co.uk>

	* gcc.target/powerpc/builtins-1.c: Account for Darwin's use of
	__USER_LABEL_PREFIX__.

From-SVN: r272604
2019-06-23 19:48:55 +00:00
Iain Sandoe deb9c4ebea [Darwin, PPC] Handle GCC target pragma.
For compatibility with other members of the port.
Note, that we do not handle the longcall attribute, since longcall
is not required/used on current Darwin.

2019-06-23  Iain Sandoe  <iain@sandoe.co.uk>

	* config/rs6000/darwin.h: Handle GCC target pragma.

From-SVN: r272603
2019-06-23 19:23:51 +00:00
Iain Sandoe 64ce6cc2de [Darwin, PPC] Emit uppercase versions of ppc defines.
Emit __PPC__ (32b) and __PPC64__ (64bit) as per the other members
of the PowerPC port.

2019-06-23  Iain Sandoe  <iain@sandoe.co.uk>

	* config/rs6000/darwin.h: (__PPC__, __PPC64__): New.

From-SVN: r272602
2019-06-23 19:13:08 +00:00