gcc.git
5 years agoUpdate pc-relative support.
Michael Meissner [Fri, 28 Jun 2019 20:19:54 +0000 (20:19 +0000)]
Update pc-relative support.

2019-06-28  Michael Meissner  <meissner@linux.ibm.com>

* config/rs6000/predicates.md (pcrel_address):  Use
SYMBOL_REF_LOCAL_P to determine if a label is local.
(pcrel_external_address): New predicate.
(non_prefixed_mem_operand): Delete, predicate not used.
* config/rs6000/rs6000.h (SYMBOL_FLAG_PCREL_P): Delete, we now use
SYMBOL_REF_LOCAL_P to determine if we can use pc-relative
addressing.
(SYMBOL_REF_PCREL_P): Likewise.

From-SVN: r272792

5 years agore PR target/91009 (Bug with future PowerPC patches with lfiwax/lfiwzx (related to...
Michael Meissner [Fri, 28 Jun 2019 19:52:52 +0000 (19:52 +0000)]
re PR target/91009 (Bug with future PowerPC patches with lfiwax/lfiwzx (related to PR 90822))

Fix PR target/91009

2019-06-27   Michael Meissner  <meissner@linux.ibm.com>

PR target/91009
* config/rs6000/rs6000.md (floatsi<mode>2_lfiwax): Add non-VSX
alternative.
(floatsi<mode>2_lfiwax_mem): Add non-VSX alternative.
(floatunssi<mode>2_lfiwzx): Add non-VSX alternative.
(floatunssi<mode>2_lfiwzx_mem): Add non-VSX alternative.

From-SVN: r272791

5 years ago[Darwin, PPC] Install the same headers as other sub-targets.
Iain Sandoe [Fri, 28 Jun 2019 18:51:09 +0000 (18:51 +0000)]
[Darwin, PPC] Install the same headers as other sub-targets.

This is primarily in order to improve testsuite coverage, we might elect
to prune the list at some point.

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

* config.gcc (powerpc-*-darwin*, powerpc64-*-darwin*): Remove
override on extra_headers.

From-SVN: r272790

5 years ago[Darwin] Fix a couple of Wformat-diag build warnings.
Iain Sandoe [Fri, 28 Jun 2019 18:41:09 +0000 (18:41 +0000)]
[Darwin] Fix a couple of Wformat-diag build warnings.

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

* config/darwin-c.c (pop_field_alignment): Quote #pragma options.
* config/darwin-driver.c (darwin_default_min_version): Remove newline
from warning.
(darwin_driver_init): Likewise.

From-SVN: r272789

5 years agox86: improve GFNI insns
Jan Beulich [Fri, 28 Jun 2019 13:21:53 +0000 (13:21 +0000)]
x86: improve GFNI insns

There's no need for three alternatives: "v" without TARGET_AVX512F is
the same as "x".

From-SVN: r272784

5 years agox86: fix vgf2p8affine*qb insns
Jan Beulich [Fri, 28 Jun 2019 13:19:51 +0000 (13:19 +0000)]
x86: fix vgf2p8affine*qb insns

The affine transformations are not commutative (the two source operands
have entirely different meaning).

Also the nonimmediate_operand predicate can better be vector_operand.

From-SVN: r272783

5 years ago[ARC][COMMITTED] Fix slsr-13 regressions.
Claudiu Zissulescu [Fri, 28 Jun 2019 13:14:12 +0000 (15:14 +0200)]
[ARC][COMMITTED] Fix slsr-13 regressions.

A recent RTX cost commit has changed the costs for ARC700 leading to errors in slsr-13.c test.
 This commit fixes this issue by reverting the cost computation for short instructions.

2019-06-28  Claudiu Zissulescu  <claziss@synopsys.com>

* config/arc/arc.c (arc_rtx_costs): All short instructions are
having a lower cost regardless of the speed option.

From-SVN: r272782

5 years agoadd file missing from earlier commit
Jan Beulich [Fri, 28 Jun 2019 08:49:23 +0000 (08:49 +0000)]
add file missing from earlier commit

From-SVN: r272781

5 years agox86: fix CVT{,T}PD2PI insns
Jan Beulich [Fri, 28 Jun 2019 08:46:56 +0000 (08:46 +0000)]
x86: fix CVT{,T}PD2PI insns

With just an "m" constraint misaligned memory operands won't be forced
into a register, and hence cause #GP. So far this was guaranteed only
in the case that CVT{,T}PD2DQ were chosen (which looks to be the case on
x86-64 only).

Switch the second alternative to Bm and also replace
nonimmediate_operand by vector_operand.

From-SVN: r272780

5 years ago[Arm] Remove constraint strings from define_expand constructs in the back end
Dennis Zhang [Fri, 28 Jun 2019 08:42:09 +0000 (08:42 +0000)]
[Arm] Remove constraint strings from define_expand constructs in the back end

A number of Arm define_expand patterns have specified constraints for
their operands. But the constraint strings are ignored at expand time
and are therefore redundant/useless. We now avoid specifying constraints
in new define_expands, but we should clean up the existing define_expand
definitions.

2019-06-28  Dennis Zhang  <dennis.zhang@arm.com>

        * config/arm/arm.md: Remove redundant constraints from
        define_expand but leave reload_inm and reload_outm patterns
        untouched since they need special constraints to work.
        * config/arm/arm-fixed.md: Remove redundant constraints from
        define_expand.
        * config/arm/iwmmxt.md: Likewise.
        * config/arm/neon.md: Likewise.
        * config/arm/sync.md: Likewise.
        * config/arm/thumb1.md: Likewise.
        * config/arm/vec-common.md: Likewise.

From-SVN: r272779

5 years agoDaily bump.
GCC Administrator [Fri, 28 Jun 2019 00:16:16 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r272774

5 years agoAdd --disable-tm-clone-registry libgcc configure option.
Ilia Diachkov [Thu, 27 Jun 2019 23:41:03 +0000 (23:41 +0000)]
Add --disable-tm-clone-registry libgcc configure option.

This patch adds libgcc configuration option to disable TM clone
registry. This option helps to reduce code size for embedded targets
which do not need transactional memory support.

gcc/
* doc/install.texi: Document --disable-tm-clone-registry.
libgcc/
* Makefile.in (USE_TM_CLONE_REGISTRY): New.
(CRTSTUFF_CFLAGS): Use USE_TM_CLONE_REGISTRY.
* configure.ac: Add --disable-tm-clone-registry option.
* configure: Regenerate.

From-SVN: r272769

5 years agoPR c++/55442 - memory-hog with highly recursive constexpr.
Jason Merrill [Thu, 27 Jun 2019 21:29:19 +0000 (17:29 -0400)]
PR c++/55442 - memory-hog with highly recursive constexpr.

This testcase in the PR is extremely recursive, and therefore uses a huge
amount of memory on caching the results of individual calls.  We no longer
need to track all calls to catch infinite recursion, as we have other limits
on maximum depth and operations count.  So let's only cache a few calls at
the top level: 8 seems to be a reasonable compromise.

gcc/c-family/
* c.opt (fconstexpr-loop-limit): New.
gcc/cp/
* constexpr.c (push_cx_call_context): Return depth.
(cxx_eval_call_expression): Don't cache past constexpr_cache_depth.

From-SVN: r272765

5 years agore PR c++/91024 (-Wimplicit-fallthrough is confused by likely/unlikely attributes)
Jakub Jelinek [Thu, 27 Jun 2019 21:25:56 +0000 (23:25 +0200)]
re PR c++/91024 (-Wimplicit-fallthrough is confused by likely/unlikely attributes)

PR c++/91024
* gimplify.c (collect_fallthrough_labels): Ignore GIMPLE_PREDICT
statements.

* g++.dg/warn/Wimplicit-fallthrough-4.C: New test.

From-SVN: r272764

5 years agore PR tree-optimization/91010 (ICE: Segmentation fault (in location_wrapper_p))
Jakub Jelinek [Thu, 27 Jun 2019 21:23:09 +0000 (23:23 +0200)]
re PR tree-optimization/91010 (ICE: Segmentation fault (in location_wrapper_p))

PR tree-optimization/91010
* tree-vect-stmts.c (scan_operand_equal_p): If offset1 == offset2,
return true.  Otherwise, don't call operand_equal_p if offset1 or
offset2 is NULL and just return false.

* g++.dg/vect/simd-10.cc: New test.

From-SVN: r272763

5 years ago[Darwin, PPC] Allow the user to override the use of hard float in kexts.
Iain Sandoe [Thu, 27 Jun 2019 19:08:16 +0000 (19:08 +0000)]
[Darwin, PPC] Allow the user to override the use of hard float in kexts.

The default for the kernel is soft-float, however a user writing a kernel
extension might want to make use of hard float.  This change makes
" -mkernel -mhard-float " work as expected.

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

* config/rs6000/rs6000.c (darwin_rs6000_override_options): Honour
user-specified float mode choice for kernel mode code.

From-SVN: r272760

5 years ago[Darwin, PPC] Correct whitespace in specs.
Iain Sandoe [Thu, 27 Jun 2019 19:01:57 +0000 (19:01 +0000)]
[Darwin, PPC] Correct whitespace in specs.

A recent merge dropped whitespace in the endfile specs, which affects
transactional memory cases.

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

* config/rs6000/darwin.h (ENDFILE_SPEC): Correct whitespace in the
spec.

From-SVN: r272759

5 years ago[Darwin, PPC] Do not use longcall for 64b code.
Iain Sandoe [Thu, 27 Jun 2019 18:56:53 +0000 (18:56 +0000)]
[Darwin, PPC] Do not use longcall for 64b code.

The linker [ld64] that supports 64Bit does not need the JBSR longcall
optimisation, and will not work with the most generic case (where the
symbol is undefined external, but there is no symbl stub).  So switch
the longcall option off.  ld64 will generate branch islands as needed.

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

* config/rs6000/rs6000.c (darwin_rs6000_override_options): Do not
use longcall for 64b code.

From-SVN: r272758

5 years agore PR fortran/90987 (Wrong error message with variables named "COMMON*")
Steven G. Kargl [Thu, 27 Jun 2019 17:52:00 +0000 (17:52 +0000)]
re PR fortran/90987 (Wrong error message with variables named "COMMON*")

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

PR fortran/90987
* match.c (gfc_match_common): Adjust parsing of fixed and free form
source code containing, e.g., COMMONI.

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

PR fortran/90987
* gfortran.dg/common_1.f: new test.
* gfortran.dg/common_26.f90: Ditto.

From-SVN: r272756

5 years agobuiltins.c (get_memory_rtx): Fix comment.
Aaron Sawdey [Thu, 27 Jun 2019 14:45:36 +0000 (14:45 +0000)]
builtins.c (get_memory_rtx): Fix comment.

2019-06-27  Aaron Sawdey <acsawdey@linux.ibm.com>

* builtins.c (get_memory_rtx): Fix comment.
* optabs.def (movmem_optab): Change to cpymem_optab.
* expr.c (emit_block_move_via_cpymem): Change movmem to cpymem.
(emit_block_move_hints): Change movmem to cpymem.
* defaults.h: Change movmem to cpymem.
* targhooks.c (get_move_ratio): Change movmem to cpymem.
(default_use_by_pieces_infrastructure_p): Ditto.
* config/aarch64/aarch64-protos.h: Change movmem to cpymem.
* config/aarch64/aarch64.c (aarch64_expand_movmem): Change movmem
to cpymem.
* config/aarch64/aarch64.h: Change movmem to cpymem.
* config/aarch64/aarch64.md (movmemdi): Change name to cpymemdi.
* config/alpha/alpha.h: Change movmem to cpymem in comment.
* config/alpha/alpha.md (movmemqi, movmemdi, *movmemdi_1): Change
movmem to cpymem.
* config/arc/arc-protos.h: Change movmem to cpymem.
* config/arc/arc.c (arc_expand_movmem): Change movmem to cpymem.
* config/arc/arc.h: Change movmem to cpymem in comment.
* config/arc/arc.md (movmemsi): Change movmem to cpymem.
* config/arm/arm-protos.h: Change movmem to cpymem in names.
* config/arm/arm.c (arm_movmemqi_unaligned, arm_gen_movmemqi,
gen_movmem_ldrd_strd, thumb_expand_movmemqi) Change movmem to cpymem.
* config/arm/arm.md (movmemqi): Change movmem to cpymem.
* config/arm/thumb1.md (movmem12b, movmem8b): Change movmem to cpymem.
* config/avr/avr-protos.h: Change movmem to cpymem.
* config/avr/avr.c (avr_adjust_insn_length, avr_emit_movmemhi,
avr_out_movmem): Change movmem to cpymem.
* config/avr/avr.md (movmemhi, movmem_<mode>, movmemx_<mode>):
Change movmem to cpymem.
* config/bfin/bfin-protos.h: Change movmem to cpymem.
* config/bfin/bfin.c (single_move_for_movmem, bfin_expand_movmem):
Change movmem to cpymem.
* config/bfin/bfin.h: Change movmem to cpymem in comment.
* config/bfin/bfin.md (movmemsi): Change name to cpymemsi.
* config/c6x/c6x-protos.h: Change movmem to cpymem.
* config/c6x/c6x.c (c6x_expand_movmem): Change movmem to cpymem.
* config/c6x/c6x.md (movmemsi): Change name to cpymemsi.
* config/frv/frv.md (movmemsi): Change name to cpymemsi.
* config/ft32/ft32.md (movmemsi): Change name to cpymemsi.
* config/h8300/h8300.md (movmemsi): Change name to cpymemsi.
* config/i386/i386-expand.c (expand_set_or_movmem_via_loop,
expand_set_or_movmem_via_rep, expand_movmem_epilogue,
expand_setmem_epilogue_via_loop, expand_set_or_cpymem_prologue,
expand_small_cpymem_or_setmem,
expand_set_or_cpymem_prologue_epilogue_by_misaligned_moves,
expand_set_or_cpymem_constant_prologue,
ix86_expand_set_or_cpymem): Change movmem to cpymem.
* config/i386/i386-protos.h: Change movmem to cpymem.
* config/i386/i386.h: Change movmem to cpymem in comment.
* config/i386/i386.md (movmem<mode>): Change name to cpymem.
(setmem<mode>): Change expansion function name.
* config/lm32/lm32.md (movmemsi): Change name to cpymemsi.
* config/m32c/blkmov.md (movmemhi, movmemhi_bhi_op, movmemhi_bpsi_op,
movmemhi_whi_op, movmemhi_wpsi_op): Change movmem to cpymem.
* config/m32c/m32c-protos.h: Change movmem to cpymem.
* config/m32c/m32c.c (m32c_expand_movmemhi): Change movmem to cpymem.
* config/m32r/m32r.c (m32r_expand_block_move): Change movmem to cpymem.
* config/m32r/m32r.md (movmemsi, movmemsi_internal): Change movmem
to cpymem.
* config/mcore/mcore.md (movmemsi): Change name to cpymemsi.
* config/microblaze/microblaze.c: Change movmem to cpymem in comment.
* config/microblaze/microblaze.md (movmemsi): Change name to cpymemsi.
* config/mips/mips.c (mips_use_by_pieces_infrastructure_p):
Change movmem to cpymem.
* config/mips/mips.h: Change movmem to cpymem.
* config/mips/mips.md (movmemsi): Change name to cpymemsi.
* config/nds32/nds32-memory-manipulation.c
(nds32_expand_movmemsi_loop_unknown_size,
nds32_expand_movmemsi_loop_known_size, nds32_expand_movmemsi_loop,
nds32_expand_movmemsi_unroll,
nds32_expand_movmemsi): Change movmem to cpymem.
* config/nds32/nds32-multiple.md (movmemsi): Change name to cpymemsi.
* config/nds32/nds32-protos.h: Change movmem to cpymem.
* config/pa/pa.c (compute_movmem_length): Change movmem to cpymem.
(pa_adjust_insn_length): Change call to compute_movmem_length.
* config/pa/pa.md (movmemsi, movmemsi_prereload, movmemsi_postreload,
movmemdi, movmemdi_prereload,
movmemdi_postreload): Change movmem to cpymem.
* config/pdp11/pdp11.md (movmemhi, movmemhi1,
movmemhi_nocc, UNSPEC_MOVMEM): Change movmem to cpymem.
* config/riscv/riscv.c: Change movmem to cpymem in comment.
* config/riscv/riscv.h: Change movmem to cpymem.
* config/riscv/riscv.md: (movmemsi) Change name to cpymemsi.
* config/rs6000/rs6000.md: (movmemsi) Change name to cpymemsi.
* config/rx/rx.md: (UNSPEC_MOVMEM, movmemsi, rx_movmem): Change
movmem to cpymem.
* config/s390/s390-protos.h: Change movmem to cpymem.
* config/s390/s390.c (s390_expand_movmem, s390_expand_setmem,
s390_expand_insv): Change movmem to cpymem.
* config/s390/s390.md (movmem<mode>, movmem_short, *movmem_short,
movmem_long, *movmem_long, *movmem_long_31z): Change movmem to cpymem.
* config/sh/sh.md (movmemsi): Change name to cpymemsi.
* config/sparc/sparc.h: Change movmem to cpymem in comment.
* config/vax/vax-protos.h (vax_output_movmemsi): Remove prototype
for nonexistent function.
* config/vax/vax.h: Change movmem to cpymem in comment.
* config/vax/vax.md (movmemhi, movmemhi1): Change movmem to cpymem.
* config/visium/visium.h: Change movmem to cpymem in comment.
* config/visium/visium.md (movmemsi): Change name to cpymemsi.
* config/xtensa/xtensa.md (movmemsi): Change name to cpymemsi.
* doc/md.texi: Change movmem to cpymem and update description to match.
* doc/rtl.texi: Change movmem to cpymem.
* target.def (use_by_pieces_infrastructure_p): Change movmem to cpymem.
        * doc/tm.texi: Regenerate.

From-SVN: r272755

5 years agors6000.c (rs6000_option_override_internal): Enable -fvariable-expansion-in-unroller...
Bill Schmidt [Thu, 27 Jun 2019 13:59:20 +0000 (13:59 +0000)]
rs6000.c (rs6000_option_override_internal): Enable -fvariable-expansion-in-unroller by default.

2019-06-27  Bill Schmidt  <wschmidt@linux.ibm.com>

* config/rs6000/rs6000.c (rs6000_option_override_internal): Enable
-fvariable-expansion-in-unroller by default.
* doc/invoke.texi (-fvariable-expansion-in-unroller): Document new
default for Power.

From-SVN: r272754

5 years agorevert: config.gcc (powerpc-ibm-aix*): Define target_gtfiles.
David Edelsohn [Thu, 27 Jun 2019 13:33:45 +0000 (13:33 +0000)]
revert: config.gcc (powerpc-ibm-aix*): Define target_gtfiles.

        Revert
        2019-06-26  David Edelsohn  <dje.gcc@gmail.com>
        * config.gcc (powerpc-ibm-aix*): Define target_gtfiles.

        * config.gcc(rs6000-*-*): Define target_gtfiles.

From-SVN: r272753

5 years agolto-common.c: tree-pretty-print.h
Jan Hubicka [Thu, 27 Jun 2019 12:08:12 +0000 (12:08 +0000)]
lto-common.c: tree-pretty-print.h

* lto-common.c: tree-pretty-print.h
(type_streaming_finished): New static var.
(gimple_register_canonical_type_1): Return updated hash; handle ODR
types.
(iterative_hash_canonical_type): Update use of
gimple_register_canonical_type_1.

From-SVN: r272750

5 years agoclass.c (layout_class_type): Set TYPE_CXX_ODR_P for as-base type copy.
Jan Hubicka [Thu, 27 Jun 2019 12:07:43 +0000 (14:07 +0200)]
class.c (layout_class_type): Set TYPE_CXX_ODR_P for as-base type copy.

* class.c (layout_class_type): Set TYPE_CXX_ODR_P for as-base
type copy.

* ipa-devirt.c (odr_type_d): Add tbaa_enabled flag.
(add_type_duplicate): When odr hash is not allocated, to nothing.
(odr_based_tbaa_p): New function.
(set_type_canonical_for_odr_type): New function.
* ipa-utils.h (enable_odr_based_tbaa, odr_based_tbaa_p,
set_type_canonical_for_odr_type): New.
* tree.c (gimple_canonical_types_compatible_p): ODR types with
ODR based TBAA are not equivalent to non-ODR types.

* lto-common.c: Include demangle.h and tree-pretty-print.h
(type_streaming_finished): New static var.
(gimple_register_canonical_type_1): Return updated hash; handle ODR
types.
(iterative_hash_canonical_type): Update use of
gimple_register_canonical_type_1.

* g++.dg/lto/alias-2_0.C: New testcase.
* g++.dg/lto/alias-2_1.C: New testcase.

From-SVN: r272749

5 years agoFix various issues seen with clang-static-analyzer.
Martin Liska [Thu, 27 Jun 2019 11:22:36 +0000 (13:22 +0200)]
Fix various issues seen with clang-static-analyzer.

2019-06-27  Martin Liska  <mliska@suse.cz>

PR tree-optimization/90974
PR rtl-optimization/90975
PR rtl-optimization/90976
PR target/91016
PR tree-optimization/91017
* config/i386/i386-expand.c (ix86_expand_rounddf_32): Remove
unused tmp.
* lra.c (lra_set_insn_recog_data): Remove a leftover from
initial commit of IRA.
* optabs.c (expand_twoval_binop): Use xop0 and xop1 instead
of op0 and op1.
* tree-vect-loop.c (vect_create_epilog_for_reduction):
Remove unused mode1.
* tree-vect-stmts.c (vectorizable_call): Remove dead assignment
to new_stmt_info.

From-SVN: r272746

5 years agore PR target/90991 (_mm_loadu_ps instrinsic translates to vmovaps in combination...
Jakub Jelinek [Thu, 27 Jun 2019 11:13:10 +0000 (13:13 +0200)]
re PR target/90991 (_mm_loadu_ps instrinsic translates to vmovaps in combination with _mm512_insertf32x4)

PR target/90991
* config/i386/sse.md (avx_vec_concat<mode>): Use nonimmediate_operand
instead of register_operand for operands[1], add m to its constraints
if operands[2] uses "C" constraint.  Ensure in condition that if
operands[2] is not 0, then operands[1] is not a MEM.  For last two
alternatives, use unaligned loads instead of aligned if operands[1] is
misaligned_operand.

* gcc.target/i386/avx2-pr90991-1.c: New test.
* gcc.target/i386/avx512dq-pr90991-2.c: New test.

From-SVN: r272745

5 years agoRemove quite obvious dead assignments.
Martin Liska [Thu, 27 Jun 2019 10:25:21 +0000 (12:25 +0200)]
Remove quite obvious dead assignments.

2019-06-27  Martin Liska  <mliska@suse.cz>

* asan.c (asan_emit_allocas_unpoison): Remove obviously
dead assignments.
* bt-load.c (move_btr_def): Likewise.
* builtins.c (expand_builtin_apply_args_1): Likewise.
(expand_builtin_apply): Likewise.
* cfgexpand.c (expand_asm_stmt): Likewise.
(construct_init_block): Likewise.
* cfghooks.c (verify_flow_info): Likewise.
* cfgloopmanip.c (remove_path): Likewise.
* cfgrtl.c (rtl_verify_bb_layout): Likewise.
* cgraph.c (cgraph_node::set_pure_flag): Likewise.
* combine.c (simplify_if_then_else): Likewise.
* config/i386/i386.c (ix86_setup_incoming_vararg_bounds): Likewise.
(choose_basereg): Likewise.
(ix86_expand_prologue): Likewise.
(ix86_preferred_output_reload_class): Likewise.
* cselib.c (cselib_record_sets): Likewise.
* df-scan.c (df_scan_alloc): Likewise.
* dojump.c (do_jump_by_parts_greater_rtx): Likewise.
* early-remat.c (early_remat::record_equiv_candidates): Likewise.
* emit-rtl.c (try_split): Likewise.
* graphite-scop-detection.c (assign_parameter_index_in_region): Likewise.
* ipa-cp.c (cgraph_edge_brings_all_agg_vals_for_node): Likewise.
* ira-color.c (setup_profitable_hard_regs): Likewise.
* ira.c (rtx_moveable_p): Likewise.
* lra-eliminations.c (eliminate_regs_in_insn): Likewise.
* read-rtl.c (read_subst_mapping): Likewise.
* regrename.c (scan_rtx): Likewise.
* reorg.c (fill_slots_from_thread): Likewise.
* tree-inline.c (tree_function_versioning): Likewise.
* tree-ssa-reassoc.c (optimize_ops_list): Likewise.
* tree-ssa-sink.c (statement_sink_location): Likewise.
* tree-ssa-threadedge.c (thread_across_edge): Likewise.
* tree-vect-loop.c (vect_get_loop_niters): Likewise.
(vect_create_epilog_for_reduction): Likewise.
* tree.c (build_nonstandard_integer_type): Likewise.
2019-06-27  Martin Liska  <mliska@suse.cz>

* class.c (adjust_clone_args): Remove obviously
dead assignments.
(dump_class_hierarchy_r): Likewise.
* decl.c (check_initializer): Likewise.
* parser.c (cp_parser_lambda_expression): Likewise.
* pt.c (unify_bound_ttp_args): Likewise.
(convert_template_argument): Likewise.
* rtti.c (build_headof): Likewise.
* typeck.c (convert_for_initialization): Likewise.
2019-06-27  Martin Liska  <mliska@suse.cz>

* libgcov-driver-system.c (gcov_exit_open_gcda_file): Remove obviously
dead assignments.
* libgcov-util.c: Likewise.

From-SVN: r272744

5 years agoix86: pass correct options to compiler for gfni-4 testcase
Jan Beulich [Thu, 27 Jun 2019 10:19:37 +0000 (10:19 +0000)]
ix86: pass correct options to compiler for gfni-4 testcase

SSE2 is the required prereq of the builtins; as x86-64 has SSE2 enabled
anyway, the test failure was noticable on 32-bit builds only.

From-SVN: r272743

5 years agotree-ssa-sccvn.c (vn_reference_lookup_3): Encode valueized RHS.
Richard Biener [Thu, 27 Jun 2019 10:11:57 +0000 (10:11 +0000)]
tree-ssa-sccvn.c (vn_reference_lookup_3): Encode valueized RHS.

2019-06-27  Richard Biener  <rguenther@suse.de>

* tree-ssa-sccvn.c (vn_reference_lookup_3): Encode valueized RHS.

* gcc.dg/tree-ssa/ssa-fre-69.c: New testcase.

From-SVN: r272742

5 years agore PR tree-optimization/89772 (memchr for a character not in constant nul-padded...
Jun Ma [Thu, 27 Jun 2019 09:50:35 +0000 (09:50 +0000)]
re PR tree-optimization/89772 (memchr for a character not in constant nul-padded string not folded)

PR tree-optimization/89772
* gimple-fold.c (gimple_fold_builtin_memchr): consider trailing nuls in
out-of-bound accesses checking.

gcc/testsuite
* gcc.dg/builtin-memchr-4.c: New test.

From-SVN: r272740

5 years agoPR libstdc++/91012 fixfilesystem_error::what() string
Jonathan Wakely [Thu, 27 Jun 2019 09:42:39 +0000 (10:42 +0100)]
PR libstdc++/91012 fixfilesystem_error::what() string

When I refactored the filesystem_error code I changed it to only use the
constructor parameter in the what() string, instead of the string
returned by system_error::what(). That meant it no longer included the
description of the error_code that system_error adds. This restores the
previous behaivour, as encouraged by the standard ("Implementations
should include the system_error::what() string and the pathnames of
path1 and path2 in the native format in the returned string").

PR libstdc++/91012
* src/c++17/fs_path.cc (filesystem_error::_Impl): Use a string_view
for the what_arg parameters.
(filesystem_error::filesystem_error): Pass system_error::what() to
the _Impl constructor.
* testsuite/27_io/filesystem/filesystem_error/cons.cc: Ensure that
filesystem_error::what() contains system_error::what().

From-SVN: r272739

5 years agoFix ICE when __builtin_calloc has no LHS (PR tree-optimization/91014).
Martin Liska [Thu, 27 Jun 2019 09:41:34 +0000 (11:41 +0200)]
Fix ICE when __builtin_calloc has no LHS (PR tree-optimization/91014).

2019-06-27  Martin Liska  <mliska@suse.cz>

PR tree-optimization/91014
* tree-ssa-dse.c (initialize_ao_ref_for_dse): Bail out
when LHS is NULL_TREE.
2019-06-27  Martin Liska  <mliska@suse.cz>

PR tree-optimization/91014
* gcc.target/s390/pr91014.c: New test.

From-SVN: r272738

5 years agore PR testsuite/91004 (Excess errors in g++.dg/torture/pr34850.C starting with r272688)
Richard Biener [Thu, 27 Jun 2019 09:08:02 +0000 (09:08 +0000)]
re PR testsuite/91004 (Excess errors in g++.dg/torture/pr34850.C starting with r272688)

2019-06-27  Richard Biener  <rguenther@suse.de>

PR testsuite/91004
* g++.dg/torture/pr34850.C: Fix overly reduced testcase.

From-SVN: r272737

5 years agoFix warnings seen by clang in gcc/symbol-summary.h.
Martin Liska [Thu, 27 Jun 2019 08:21:47 +0000 (10:21 +0200)]
Fix warnings seen by clang in gcc/symbol-summary.h.

2019-06-27  Martin Liska  <mliska@suse.cz>

* symbol-summary.h (traverse): Pass
argument a to the call of callback.
(gt_ggc_mx): Mark arguments as unused.
(gt_pch_nx): Likewise.

From-SVN: r272734

5 years agoFix misc stuff seen by clang-static-analyzer.
Martin Liska [Thu, 27 Jun 2019 08:21:32 +0000 (10:21 +0200)]
Fix misc stuff seen by clang-static-analyzer.

2019-06-27  Martin Liska  <mliska@suse.cz>

* lto-dump.c (struct symbol_entry): Add default dtor.
(struct variable_entry): Likewise.
(struct function_entry): Likewise.
(dump_list_functions): Release memory.
(dump_list_variables): Likewise.
2019-06-27  Martin Liska  <mliska@suse.cz>

* libgcov-util.c (gcov_profile_merge): Release allocated
memory.
(calculate_overlap): Likewise.

From-SVN: r272733

5 years agoOne line change onto r272731
Kewen Lin [Thu, 27 Jun 2019 05:33:15 +0000 (05:33 +0000)]
One line change onto r272731

    PR target/62147
    * gcc/loop-iv.c (find_simple_exit)

-  if (single_exit (loop) && finite_loop_p (loop))
+  if (desc->infinite && single_exit (loop) && finite_loop_p (loop))

From-SVN: r272732

5 years agoCall finite_loop_p in RTL to get better finiteness information.
Kewen Lin [Thu, 27 Jun 2019 05:24:00 +0000 (05:24 +0000)]
Call finite_loop_p in RTL to get better finiteness information.

gcc/ChangeLog

2019-06-27  Kewen Lin  <linkw@gcc.gnu.org>

    PR target/62147
    * gcc/loop-iv.c (find_simple_exit): Call finite_loop_p to update finiteness.

gcc/testsuite/ChangeLog

2019-06-27  Kewen Lin  <linkw@gcc.gnu.org>

    PR target/62147
    * gcc.target/powerpc/pr62147.c: New test.

From-SVN: r272731

5 years agore PR tree-optimization/90883 (Generated code is worse if returned struct is unnamed)
Jeff Law [Thu, 27 Jun 2019 02:42:30 +0000 (20:42 -0600)]
re PR tree-optimization/90883 (Generated code is worse if returned struct is unnamed)

PR tree-optimization/90883
* tree-ssa-dse.c (delete_dead_or_redundant_call): Fix signature.
(delete_dead_or_redundant_assignment): Likewise.

From-SVN: r272726

5 years agore PR tree-optimization/90883 (Generated code is worse if returned struct is unnamed)
Jeff Law [Thu, 27 Jun 2019 02:41:27 +0000 (20:41 -0600)]
re PR tree-optimization/90883 (Generated code is worse if returned struct is unnamed)

PR tree-optimization/90883
* tree-ssa-dse.c (delete_dead_or_redundant_call): Fix signature.
(delete_dead_or_redundant_assignment): Likewise.

From-SVN: r272725

5 years agoDaily bump.
GCC Administrator [Thu, 27 Jun 2019 00:16:22 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r272723

5 years agoDefine std::chars_format enumeration type
Jonathan Wakely [Wed, 26 Jun 2019 22:54:38 +0000 (23:54 +0100)]
Define std::chars_format enumeration type

This type isn't used anywhere yet, but will be needed for the
floating-point overloads of to_chars and from_chars.

* include/std/charconv (chars_format): Define bitmask type.
* testsuite/20_util/to_chars/chars_format.cc: New test.

From-SVN: r272718

5 years agore PR tree-optimization/90883 (Generated code is worse if returned struct is unnamed)
Jeff Law [Wed, 26 Jun 2019 21:36:27 +0000 (15:36 -0600)]
re PR tree-optimization/90883 (Generated code is worse if returned struct is unnamed)

PR tree-optimization/90883
* tree-ssa-alias.c (stmt_kills_ref_p): Handle BUILT_IN_CALLOC.
* tree-ssa-dse.c: Update various comments to distinguish between
dead and redundant stores.
(initialize_ao_ref_for_dse): Handle BUILT_IN_CALLOC.
(dse_optimize_redundant_stores): New function.
(delete_dead_or_redundant_call): Renamed from delete_dead_call.
Distinguish between dead and redundant calls in dump output.  All
callers updated.
(delete_dead_or_redundant_assignment): Similarly for assignments.
(dse_optimize_stmt): Handle _CHK variants.  For statements which
store 0 into multiple memory locations, try to prove a subsequent
store is redundant.

        PR tree-optimization/90883
* g++.dg/tree-ssa/pr90883.C: New test.
* gcc.dg/tree-ssa/ssa-dse-36.c: New test.

From-SVN: r272717

5 years agore PR target/89021 (Implement mmintrin.h in SSE)
Uros Bizjak [Wed, 26 Jun 2019 19:12:27 +0000 (21:12 +0200)]
re PR target/89021 (Implement mmintrin.h in SSE)

PR target/89021
* config/i386/i386.c (ix86_autovectorize_vector_sizes):
Autovectorize 8-byte vectors for TARGET_MMX_WITH_SSE.

testsuite/ChangeLog:

PR target/89021
* lib/target-supports.exp (available_vector_sizes)
<[istarget i?86-*-*] || [istarget x86_64-*-*]>: Add
64-bit vectors for !ia32.

From-SVN: r272711

5 years ago[PATCH, PPC 2/2] Fix Darwin bootstrap after split of rs6000.c.
Iain Sandoe [Wed, 26 Jun 2019 19:04:50 +0000 (19:04 +0000)]
[PATCH, PPC 2/2] Fix Darwin bootstrap after split of rs6000.c.

To fix this we need to make the branch islands (or code) visible between
both files.  This keeps the generation side in rs6000.c and moves the
output routine to rs6000-logue.c, placing a reference to the islands
vector in rs6000-internal.h.

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

* config/rs6000/rs6000-internal.h (branch_island): New typedef.
(branch_islands): New extern.
* config/rs6000/rs6000-logue.c (macho_branch_islands): Moved from
* config/rs6000/rs6000.c: .. here.

From-SVN: r272710

5 years ago[PATCH, PPC 1/2] Make sure the gt- files are built for all sub-targets.
Iain Sandoe [Wed, 26 Jun 2019 19:00:16 +0000 (19:00 +0000)]
[PATCH, PPC 1/2] Make sure the gt- files are built for all sub-targets.

The new gt-rs6000-logue.h is common to all sub-targets in the port, so
it needs to be added for them.

It seems better to place the common target_gtfiles in the powerpc*-*-*
section, rather than duplicating them in sub-targets.  This would make it
less likely that a sub-target would be overlooked in any future file
introductions.

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

* config.gcc (powerpc*-*-linux*): Move target_gtfiles from here..
(powerpc*-*-*) ... to here.

From-SVN: r272708

5 years agotree-ssa-dse.c (initialize_ao_ref_for_dse): Handle _chk variants of memcpy, memmove...
Jeff Law [Wed, 26 Jun 2019 18:00:00 +0000 (12:00 -0600)]
tree-ssa-dse.c (initialize_ao_ref_for_dse): Handle _chk variants of memcpy, memmove and memset builtins.

* tree-ssa-dse.c (initialize_ao_ref_for_dse): Handle _chk variants of
memcpy, memmove and memset builtins.
(maybe_trim_memstar_call): Likewise.

* gcc.c-torture/execute/builtins/builtins.exp: Add -fno-tree-dse
as DSE compromises several of these tests.
* gcc.dg/builtin-stringop-chk-1.c: Similarly.
* gcc.dg/memcpy-2.c: Similarly.
* gcc.dg/pr40340-1.c: Similarly.
* gcc.dg/pr40340-2.c: Similarly.
* gcc.dg/pr40340-5.c: Similarly.

From-SVN: r272704

5 years agoChangeLog: Document revision 272698
Steven G. Kargl [Wed, 26 Jun 2019 16:16:58 +0000 (16:16 +0000)]
ChangeLog: Document revision 272698

2016-06-26  Steven G. Kargl  <kargl@gcc.gnu.org>

* ChangeLog: Document revision 272698

2016-06-26  Steven G. Kargl  <kargl@gcc.gnu.org>

        * testsuite/ChangeLog: Document revision 272698

From-SVN: r272699

5 years agoAdd new helper traits for signed/unsigned integer types
Jonathan Wakely [Wed, 26 Jun 2019 14:38:23 +0000 (15:38 +0100)]
Add new helper traits for signed/unsigned integer types

Reuse the __is_one_of alias in additional places, and define traits to
check for signed/unsigned integer types so we don't have to duplicate
those checks elsewhere.

The additional overloads for std::byte in <bit> were reviewed by LEWG
and considered undesirable, so this patch removes them.

* include/bits/fs_path.h (path::__is_encoded_char): Use __is_one_of.
* include/std/bit (_If_is_unsigned_integer_type): Remove.
(_If_is_unsigned_integer): Use __is_unsigned_integer.
(rotl(byte, unsigned), rotr(byte, unsigned), countl_zero(byte))
(countl_one(byte), countr_zero(byte), countr_one(byte))
(popcount(byte), ispow2(byte), ceil2(byte), floor2(byte))
(log2p1(byte)): Remove.
* include/std/charconv (__detail::__is_one_of): Move to <type_traits>.
(__detail::__is_int_to_chars_type): Remove.
(__detail::__integer_to_chars_result_type): Use __is_signed_integer
and __is_unsigned_integer.
* include/std/type_traits (__is_one_of): Move here from <charconv>.
(__is_signed_integer, __is_unsigned_integer): New helpers.
* testsuite/26_numerics/bit/bit.pow.two/ceil2.cc: Remove test for
std::byte overload.
* testsuite/26_numerics/bit/bit.pow.two/floor2.cc: Likewise.
* testsuite/26_numerics/bit/bit.pow.two/ispow2.cc: Likewise.
* testsuite/26_numerics/bit/bit.pow.two/log2p1.cc: Likewise.
* testsuite/26_numerics/bit/bitops.count/countl_one.cc: Likewise.
* testsuite/26_numerics/bit/bitops.count/countl_zero.cc: Likewise.
* testsuite/26_numerics/bit/bitops.count/countr_one.cc: Likewise.
* testsuite/26_numerics/bit/bitops.count/countr_zero.cc: Likewise.
* testsuite/26_numerics/bit/bitops.count/popcount.cc: Likewise.
* testsuite/26_numerics/bit/bitops.rot/rotl.cc: Likewise.
* testsuite/26_numerics/bit/bitops.rot/rotr.cc: Likewise.

From-SVN: r272695

5 years ago* config/rs6000/rs6000-logue.c: Add #ifndef TARGET_PROFILE_KERNEL.
David Edelsohn [Wed, 26 Jun 2019 13:46:01 +0000 (13:46 +0000)]
* config/rs6000/rs6000-logue.c: Add #ifndef TARGET_PROFILE_KERNEL.

From-SVN: r272694

5 years ago* config.gcc (powerpc-ibm-aix*): Define target_gtfiles.
David Edelsohn [Wed, 26 Jun 2019 13:36:23 +0000 (13:36 +0000)]
* config.gcc (powerpc-ibm-aix*): Define target_gtfiles.

From-SVN: r272693

5 years ago[PR preprocessor/90927] Fixe dependency output
Nathan Sidwell [Wed, 26 Jun 2019 12:58:39 +0000 (12:58 +0000)]
[PR preprocessor/90927] Fixe dependency output

https://gcc.gnu.org/ml/gcc-patches/2019-06/msg01664.html
libcpp/
PR preprocessor/90927
* mkdeps.c (mkdeps::vec::operator[]): Add non-const variant.
(deps_add_target): Deal with out of order unquoted targets.

gcc/testsuite/
* c-c++-common/pr90927.c: New.

From-SVN: r272692

5 years agors6000: Fix rs6000_keep_leaf_when_profiled
Segher Boessenkool [Wed, 26 Jun 2019 12:16:40 +0000 (14:16 +0200)]
rs6000: Fix rs6000_keep_leaf_when_profiled

This function is called from elsewhere, so shouldn't be static.

* config/rs6000/rs6000-internal.h (rs6000_keep_leaf_when_profiled): New
declaration.
* config/rs6000/rs6000-logue.c (rs6000_keep_leaf_when_profiled): Remove
"static".
* config/rs6000/rs6000.c (rs6000_keep_leaf_when_profiled): Delete
declaration.

---
 gcc/config/rs6000/rs6000-internal.h | 1 +
 gcc/config/rs6000/rs6000-logue.c    | 4 ++--
 gcc/config/rs6000/rs6000.c          | 1 -
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/gcc/config/rs6000/rs6000-internal.h b/gcc/config/rs6000/rs6000-internal.h
index a1acb66..22ebd37 100644
--- a/gcc/config/rs6000/rs6000-internal.h
+++ b/gcc/config/rs6000/rs6000-internal.h
@@ -99,6 +99,7 @@ extern bool save_reg_p (int reg);
 extern const char * rs6000_machine_from_flags (void);
 extern void emit_asm_machine (void);
 extern bool rs6000_global_entry_point_prologue_needed_p (void);
+extern bool rs6000_keep_leaf_when_profiled (void);

 /* Return true if the OFFSET is valid for the quad address instructions that
    use d-form (register + offset) addressing.  */
diff --git a/gcc/config/rs6000/rs6000-logue.c b/gcc/config/rs6000/rs6000-logue.c
index 9df4b5a..adc137b 100644
--- a/gcc/config/rs6000/rs6000-logue.c
+++ b/gcc/config/rs6000/rs6000-logue.c
@@ -4025,8 +4025,8 @@ rs6000_output_function_prologue (FILE *file)

 /* -mprofile-kernel code calls mcount before the function prolog,
    so a profiled leaf function should stay a leaf function.  */
-static bool
-rs6000_keep_leaf_when_profiled ()
+bool
+rs6000_keep_leaf_when_profiled (void)
 {
   return TARGET_PROFILE_KERNEL;
 }
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index 3fc4029..bcfc881 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -1338,7 +1338,6 @@ static bool rs6000_secondary_reload_move (enum rs6000_reg_type,
    secondary_reload_info *,
    bool);
 rtl_opt_pass *make_pass_analyze_swaps (gcc::context*);
-static bool rs6000_keep_leaf_when_profiled () __attribute__ ((unused));
 static tree rs6000_fold_builtin (tree, int, tree *, bool);

 /* Hash table stuff for keeping track of TOC entries.  */
--
1.8.3.1

From-SVN: r272691

5 years agors6000: Remove duplicated code
Segher Boessenkool [Wed, 26 Jun 2019 12:14:37 +0000 (14:14 +0200)]
rs6000: Remove duplicated code

A large portion of the code moved from rs6000.c (to rs6000-logue.c)
was accidentally retained.  This fixes it.

* rs6000.c: Fix previous commit, it missed some changes.

From-SVN: r272690

5 years agore PR middle-end/90982 (ICE in make_decl_rtl, at varasm.c:1344)
Richard Biener [Wed, 26 Jun 2019 11:16:56 +0000 (11:16 +0000)]
re PR middle-end/90982 (ICE in make_decl_rtl, at varasm.c:1344)

2019-06-26  Richard Biener  <rguenther@suse.de>

PR ipa/90982
* tree-inline.c (remap_ssa_name): Copy SSA range info.

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

From-SVN: r272688

5 years agolto-streamer.h (lto_bitmap_alloc): Remove.
Richard Biener [Wed, 26 Jun 2019 11:09:51 +0000 (11:09 +0000)]
lto-streamer.h (lto_bitmap_alloc): Remove.

2019-06-26  Richard Biener  <rguenther@suse.de>

* lto-streamer.h (lto_bitmap_alloc): Remove.
(lto_bitmap_free): Likewise.
* lto-streamer.c (lto_bitmap_alloc): Remove.
(lto_bitmap_free): Likewise.
(lto_obstack): Likewise.
(lto_obstack_initialized): Likewise.
* lto-streamer-out.c (lto_output): Use own obstack for local
bitmap, free it consistently.

From-SVN: r272687

5 years agoFix sanitizer_common/sanitizer_posix_libcdep.cc compilation on Solaris 11.5
Rainer Orth [Wed, 26 Jun 2019 10:43:08 +0000 (10:43 +0000)]
Fix sanitizer_common/sanitizer_posix_libcdep.cc compilation on Solaris 11.5

* sanitizer_common/sanitizer_posix_libcdep.cc: Cherry-pick
compiler-rt revision 363778.

From-SVN: r272685

5 years agore PR c++/67184 (Missed optimization with C++11 final specifier)
Paolo Carlini [Wed, 26 Jun 2019 08:51:50 +0000 (08:51 +0000)]
re PR c++/67184 (Missed optimization with C++11 final specifier)

2019-06-26  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/67184
PR c++/69445
* g++.dg/other/final3.C: New.
* g++.dg/other/final5.C: Likewise.

From-SVN: r272675

5 years agore PR target/90991 (_mm_loadu_ps instrinsic translates to vmovaps in combination...
Jakub Jelinek [Wed, 26 Jun 2019 08:26:18 +0000 (10:26 +0200)]
re PR target/90991 (_mm_loadu_ps instrinsic translates to vmovaps in combination with _mm512_insertf32x4)

PR target/90991
* config/i386/sse.md
(*<extract_type>_vinsert<shuffletype><extract_suf>_0): Use vmovupd,
vmovups, vmovdqu, vmovdqu32 or vmovdqu64 instead of the aligned
insns if operands[2] is misaligned_operand.

* gcc.target/i386/avx512dq-pr90991-1.c: New test.

From-SVN: r272674

5 years ago[RS6000] Change maddld match_operand from DI to GPR
Li Jia He [Wed, 26 Jun 2019 08:23:06 +0000 (08:23 +0000)]
[RS6000] Change maddld match_operand from DI to GPR

From PowerPC ISA3.0, the description of `maddld RT, RA.RB, RC` is as follows:
64-bit RA and RB are multiplied and then the RC is signed extend to 128 bits,
and add them together.

We only apply it to 64-bit mode (DI) when implementing maddld.  However, if we
can guarantee that the result of the maddld operation will be limited to 32-bit
mode (SI), we can still apply it to 32-bit mode (SI).

gcc/ChangeLog
2019-06-26  Li Jia He  <helijia@linux.ibm.com>

* config/rs6000/rs6000.h (TARGET_MADDLD): Remove the restriction of
TARGET_POWERPC64.
* config/rs6000/rs6000.md (maddld): Change maddld match_operand from DI
to GPR.

gcc/testsuite/ChangeLog
2019-06-26  Li Jia He  <helijia@linux.ibm.com>

* gcc.target/powerpc/maddld-1.c: New testcase.

From-SVN: r272673

5 years agodoc: Fix opindex for -W options
Segher Boessenkool [Wed, 26 Jun 2019 07:43:52 +0000 (09:43 +0200)]
doc: Fix opindex for -W options

@opindex -Wxxx is wrong; it should be @opindex Wxxx.

* doc/invoke.texi (Warning Options): Fix some @opindex syntax.

From-SVN: r272672

5 years agoFix one another thinko in tree-vect-loop.c (PR tree-optimization/90973).
Martin Liska [Wed, 26 Jun 2019 06:44:58 +0000 (08:44 +0200)]
Fix one another thinko in tree-vect-loop.c (PR tree-optimization/90973).

2019-06-26  Martin Liska  <mliska@suse.cz>

PR tree-optimization/90973
* tree-vect-loop.c (vect_get_known_peeling_cost): Use
epilogue_cost_vec instead of prologue_cost_vec for
a epilogue cost.

From-SVN: r272671

5 years agoFix missing else keyword seen with clang-static-analyzer:
Martin Liska [Wed, 26 Jun 2019 06:44:28 +0000 (08:44 +0200)]
Fix missing else keyword seen with clang-static-analyzer:

2019-06-26  Martin Liska  <mliska@suse.cz>

* bb-reorder.c (connect_better_edge_p): Add missing else
statement in the middle of if-else statements.

/home/marxin/Programming/gcc/gcc/bb-reorder.c:1031:2: warning: Value stored to 'is_better_edge' is never read
        is_better_edge = true;
        ^                ~~~~
/home/marxin/Programming/gcc/gcc/bb-reorder.c:1034:2: warning: Value stored to 'is_better_edge' is never read
        is_better_edge = false;
        ^                ~~~~~

From-SVN: r272670

5 years agoPR c++/70462 - unnecessary base ctor variant with final.
Jason Merrill [Wed, 26 Jun 2019 04:56:07 +0000 (00:56 -0400)]
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

5 years agoEnable GCC support for AVX512_VP2INTERSECT which will be in tigerlaker.
Hongtao Liu [Wed, 26 Jun 2019 04:46:29 +0000 (04:46 +0000)]
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

5 years agore PR fortran/90988 (Wrong error message with variables named "PUBLIC*")
Steven G. Kargl [Wed, 26 Jun 2019 04:31:14 +0000 (04:31 +0000)]
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

5 years agolibgo/testsuite: ignore symbols with a leading dot in symtogo
Ian Lance Taylor [Wed, 26 Jun 2019 00:17:32 +0000 (00:17 +0000)]
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

5 years agoDaily bump.
GCC Administrator [Wed, 26 Jun 2019 00:16:23 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r272665

5 years agocmd/go: silence ar with D flag failures
Ian Lance Taylor [Wed, 26 Jun 2019 00:04:36 +0000 (00:04 +0000)]
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

5 years agoDarwin, add a missed file change
Iain Sandoe [Tue, 25 Jun 2019 20:12:49 +0000 (20:12 +0000)]
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

5 years ago[Darwin, PPC] Move the out of line register save/restore to an endfile.
Iain Sandoe [Tue, 25 Jun 2019 20:11:11 +0000 (20:11 +0000)]
[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

5 years ago[PATCH, rs6000] Split up rs6000.c.
Bill Seurer [Tue, 25 Jun 2019 20:06:07 +0000 (20:06 +0000)]
[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

5 years agoclass.c (resolves_to_fixed_type_p): Check CLASSTYPE_FINAL.
Jason Merrill [Tue, 25 Jun 2019 16:15:40 +0000 (12:15 -0400)]
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

5 years agoPut hashtab_chk_error into hash-table.c.
Martin Liska [Tue, 25 Jun 2019 14:34:25 +0000 (16:34 +0200)]
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

5 years agore PR c++/90969 (ICE: tree check: expected array_type, have vector_type in array_ref_...
Jakub Jelinek [Tue, 25 Jun 2019 14:05:13 +0000 (16:05 +0200)]
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

5 years agoFix non-portable use of std::abs(double) in constexpr function
Jonathan Wakely [Tue, 25 Jun 2019 13:18:36 +0000 (14:18 +0100)]
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

5 years agoTransform filter-rtags-warnings to filter-clang-warnings.
Martin Liska [Tue, 25 Jun 2019 12:30:19 +0000 (14:30 +0200)]
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

5 years agoRemove dead code in df-scan.c (PR tree-optimization/90978).
Martin Liska [Tue, 25 Jun 2019 11:50:12 +0000 (13:50 +0200)]
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

5 years agoDo not call strlen with NULL argument in libgcov.
Martin Liska [Tue, 25 Jun 2019 11:49:36 +0000 (13:49 +0200)]
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

5 years agoEnable full GFortran library for AMD GCN
Kwok Cheung Yeung [Tue, 25 Jun 2019 11:41:38 +0000 (11:41 +0000)]
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

5 years agoStub implementation of unwinding for AMD GCN.
Andrew Stubbs [Tue, 25 Jun 2019 11:41:33 +0000 (11:41 +0000)]
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

5 years agoCreate GCN-specific gthreads
Kwok Cheung Yeung [Tue, 25 Jun 2019 11:41:29 +0000 (11:41 +0000)]
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

5 years ago[PR 90939] Remove outdated assert in ipcp_bits_lattice::meet_with
Martin Jambor [Tue, 25 Jun 2019 11:05:19 +0000 (13:05 +0200)]
[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

5 years agore PR tree-optimization/90930 (Excessive memory consumption)
Richard Biener [Tue, 25 Jun 2019 10:59:48 +0000 (10:59 +0000)]
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

5 years ago[ARC] Fix for PR89838
Claudiu Zissulescu [Tue, 25 Jun 2019 09:52:04 +0000 (11:52 +0200)]
[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

5 years agoImplement alternate "__intN__" form of "__intN" type
Jozef Lawrynowicz [Tue, 25 Jun 2019 09:41:17 +0000 (09:41 +0000)]
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

5 years agotree-ssa-alias.c (indirect_ref_may_alias_decl_p): Check that base2_alias_set is non...
Jan Hubicka [Tue, 25 Jun 2019 08:35:01 +0000 (10:35 +0200)]
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

5 years agoProperly sum costs in tree-vect-loop.c (PR tree-optimization/90973).
Martin Liska [Tue, 25 Jun 2019 08:17:39 +0000 (10:17 +0200)]
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

5 years agodecl.c (gnat_to_gnu_entity): Remove superfluous test in previous change.
Eric Botcazou [Tue, 25 Jun 2019 08:17:08 +0000 (08:17 +0000)]
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

5 years agore PR sanitizer/90954 (ICE: combining undefined behavior sanitizer with openmp)
Jakub Jelinek [Tue, 25 Jun 2019 07:00:34 +0000 (09:00 +0200)]
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

5 years agopstl_config.h (_PSTL_PRAGMA_SIMD_SCAN, [...]): Define to OpenMP 5.0 pragmas even...
Jakub Jelinek [Tue, 25 Jun 2019 06:59:12 +0000 (08:59 +0200)]
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

5 years agoruntime: mark memequal and memclrNoHeapPointers nosplit
Ian Lance Taylor [Tue, 25 Jun 2019 06:16:21 +0000 (06:16 +0000)]
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

5 years agoDaily bump.
GCC Administrator [Tue, 25 Jun 2019 00:16:16 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r272632

5 years agoipa-utils.h (type_with_linkage_p): Verify that type is CXX_ODR_P.
Jan Hubicka [Mon, 24 Jun 2019 21:13:12 +0000 (23:13 +0200)]
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

5 years ago[Darwin, PPC, testsuite] Skip tests for unimplemented functionality.
Iain Sandoe [Mon, 24 Jun 2019 19:36:56 +0000 (19:36 +0000)]
[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

5 years ago[Darwin, PPC, testsuite] Fix spec-barr-1.c for Darwin.
Iain Sandoe [Mon, 24 Jun 2019 19:25:44 +0000 (19:25 +0000)]
[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

5 years ago[Darwin, testsuite] Fix isystem-2.c.
Iain Sandoe [Mon, 24 Jun 2019 19:13:01 +0000 (19:13 +0000)]
[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

5 years agocompiler: open code string equality
Ian Lance Taylor [Mon, 24 Jun 2019 17:54:07 +0000 (17:54 +0000)]
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

5 years agore PR target/90972 (ICE in fold_convert_loc, at fold-const.c:2429)
Richard Biener [Mon, 24 Jun 2019 17:21:40 +0000 (17:21 +0000)]
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

5 years agore PR tree-optimization/90930 (Excessive memory consumption)
Richard Biener [Mon, 24 Jun 2019 17:17:26 +0000 (17:17 +0000)]
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

5 years agocompiler: use builtin memcmp directly
Ian Lance Taylor [Mon, 24 Jun 2019 16:54:22 +0000 (16:54 +0000)]
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