gcc.git
7 years agoi386: Use reference of struct ix86_frame to avoid copy
H.J. Lu [Mon, 6 Nov 2017 23:04:15 +0000 (23:04 +0000)]
i386: Use reference of struct ix86_frame to avoid copy

When there is no need to make a copy of ix86_frame, we can use reference
of struct ix86_frame to avoid copy.

Tested on x86-64.

* config/i386/i386.c (ix86_can_use_return_insn_p): Use reference
of struct ix86_frame.
(ix86_initial_elimination_offset): Likewise.
(ix86_expand_split_stack_prologue): Likewise.

From-SVN: r254480

7 years agostack-check-12.c: Revert to initial version.
Jeff Law [Mon, 6 Nov 2017 22:44:39 +0000 (15:44 -0700)]
stack-check-12.c: Revert to initial version.

* gcc.target/i386/stack-check-12.c: Revert to initial version.  Then..
Add -fomit-frame-pointer.

From-SVN: r254479

7 years agoUpdate comment in tree-vrp.h
Marc Glisse [Mon, 6 Nov 2017 21:43:00 +0000 (22:43 +0100)]
Update comment in tree-vrp.h

2017-11-06  Marc Glisse  <marc.glisse@inria.fr>

* tree-vrp.h (enum value_range_type): Update stale comment.

From-SVN: r254478

7 years agotr1.cc: Compile with -O0.
François Dumont [Mon, 6 Nov 2017 21:15:48 +0000 (21:15 +0000)]
tr1.cc: Compile with -O0.

2017-11-06  François Dumont  <fdumont@gcc.gnu.org>

* testsuite/libstdc++-prettyprinters/tr1.cc:  Compile with -O0.

From-SVN: r254477

7 years agocompiler: disable escape analysis for runtime
Ian Lance Taylor [Mon, 6 Nov 2017 21:00:32 +0000 (21:00 +0000)]
compiler: disable escape analysis for runtime

    Currently the runtime is hard-coded to non-escape in various places.
    Don't run escape analysis for runtime.

    Reviewed-on: https://go-review.googlesource.com/76210

From-SVN: r254476

7 years agolibgo: pass flags to recursive make
Ian Lance Taylor [Mon, 6 Nov 2017 20:59:32 +0000 (20:59 +0000)]
libgo: pass flags to recursive make

    "make check" runs make recursively to check each package. Pass
    the flags through. So it is possible to run "make check" with
    different settings easily.

    Reviewed-on: https://go-review.googlesource.com/76029

From-SVN: r254475

7 years ago[AArch64] Pass number of units to aarch64_expand_vec_perm(_const)
Richard Sandiford [Mon, 6 Nov 2017 20:02:49 +0000 (20:02 +0000)]
[AArch64] Pass number of units to aarch64_expand_vec_perm(_const)

This patch passes the number of units to aarch64_expand_vec_perm
and aarch64_expand_vec_perm_const, which avoids a to_constant ()
once GET_MODE_NUNITS is variable.

2017-11-06  Richard Sandiford  <richard.sandiford@linaro.org>
    Alan Hayward  <alan.hayward@arm.com>
    David Sherwood  <david.sherwood@arm.com>

gcc/
* config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm)
(aarch64_expand_vec_perm_const): Take the number of units too.
* config/aarch64/aarch64.c (aarch64_expand_vec_perm)
(aarch64_expand_vec_perm_const): Likewise.
* config/aarch64/aarch64-simd.md (vec_perm_const<mode>)
(vec_perm<mode>): Update accordingly.

Reviewed-by: James Greenhalgh <james.greenhalgh@arm.com>
Co-Authored-By: Alan Hayward <alan.hayward@arm.com>
Co-Authored-By: David Sherwood <david.sherwood@arm.com>
From-SVN: r254469

7 years ago[AArch64] Pass number of units to aarch64_simd_vect_par_cnst_half
Richard Sandiford [Mon, 6 Nov 2017 20:02:35 +0000 (20:02 +0000)]
[AArch64] Pass number of units to aarch64_simd_vect_par_cnst_half

This patch passes the number of units to aarch64_simd_vect_par_cnst_half,
which avoids a to_constant () once GET_MODE_NUNITS is variable.

2017-11-06  Richard Sandiford  <richard.sandiford@linaro.org>
    Alan Hayward  <alan.hayward@arm.com>
    David Sherwood  <david.sherwood@arm.com>

gcc/
* config/aarch64/aarch64-protos.h (aarch64_simd_vect_par_cnst_half):
Take the number of units too.
* config/aarch64/aarch64.c (aarch64_simd_vect_par_cnst_half): Likewise.
(aarch64_simd_check_vect_par_cnst_half): Update call accordingly,
but check for a vector mode before rather than after the call.
* config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
(move_hi_quad_<mode>, vec_unpack<su>_hi_<mode>)
(vec_unpack<su>_lo_<mode, vec_widen_<su>mult_lo_<mode>)
(vec_widen_<su>mult_hi_<mode>, vec_unpacks_lo_<mode>)
(vec_unpacks_hi_<mode>, aarch64_saddl2<mode>, aarch64_uaddl2<mode>)
(aarch64_ssubl2<mode>, aarch64_usubl2<mode>, widen_ssum<mode>3)
(widen_usum<mode>3, aarch64_saddw2<mode>, aarch64_uaddw2<mode>)
(aarch64_ssubw2<mode>, aarch64_usubw2<mode>, aarch64_sqdmlal2<mode>)
(aarch64_sqdmlsl2<mode>, aarch64_sqdmlal2_lane<mode>)
(aarch64_sqdmlal2_laneq<mode>, aarch64_sqdmlsl2_lane<mode>)
(aarch64_sqdmlsl2_laneq<mode>, aarch64_sqdmlal2_n<mode>)
(aarch64_sqdmlsl2_n<mode>, aarch64_sqdmull2<mode>)
(aarch64_sqdmull2_lane<mode>, aarch64_sqdmull2_laneq<mode>)
(aarch64_sqdmull2_n<mode>): Update accordingly.

Reviewed-by: James Greenhalgh <james.greenhalgh@arm.com>
Co-Authored-By: Alan Hayward <alan.hayward@arm.com>
Co-Authored-By: David Sherwood <david.sherwood@arm.com>
From-SVN: r254468

7 years ago[AArch64] Pass number of units to aarch64_reverse_mask
Richard Sandiford [Mon, 6 Nov 2017 20:02:27 +0000 (20:02 +0000)]
[AArch64] Pass number of units to aarch64_reverse_mask

This patch passes the number of units to aarch64_reverse_mask,
which avoids a to_constant () once GET_MODE_NUNITS is variable.

2017-11-06  Richard Sandiford  <richard.sandiford@linaro.org>
    Alan Hayward  <alan.hayward@arm.com>
    David Sherwood  <david.sherwood@arm.com>

gcc/
* config/aarch64/aarch64-protos.h (aarch64_reverse_mask): Take
the number of units too.
* config/aarch64/aarch64.c (aarch64_reverse_mask): Likewise.
* config/aarch64/aarch64-simd.md (vec_load_lanesoi<mode>)
(vec_store_lanesoi<mode>, vec_load_lanesci<mode>)
(vec_store_lanesci<mode>, vec_load_lanesxi<mode>)
(vec_store_lanesxi<mode>): Update accordingly.

Reviewed-by: James Greenhalgh <james.greenhalgh@arm.com>
Co-Authored-By: Alan Hayward <alan.hayward@arm.com>
Co-Authored-By: David Sherwood <david.sherwood@arm.com>
From-SVN: r254467

7 years ago[AArch64] Add an endian_lane_rtx helper routine
Richard Sandiford [Mon, 6 Nov 2017 20:02:10 +0000 (20:02 +0000)]
[AArch64] Add an endian_lane_rtx helper routine

Later patches turn the number of vector units into a poly_int.
We deliberately don't support applying GEN_INT to those (except
in target code that doesn't distinguish between poly_ints and normal
constants); gen_int_mode needs to be used instead.

This patch therefore replaces instances of:

  GEN_INT (ENDIAN_LANE_N (builtin_mode, INTVAL (op[opc])))

with uses of a new endian_lane_rtx function.

2017-11-06  Richard Sandiford  <richard.sandiford@linaro.org>
    Alan Hayward  <alan.hayward@arm.com>
    David Sherwood  <david.sherwood@arm.com>

gcc/
* config/aarch64/aarch64-protos.h (aarch64_endian_lane_rtx): Declare.
* config/aarch64/aarch64.c (aarch64_endian_lane_rtx): New function.
* config/aarch64/aarch64.h (ENDIAN_LANE_N): Take the number
of units rather than the mode.
* config/aarch64/iterators.md (nunits): New mode attribute.
* config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args):
Use aarch64_endian_lane_rtx instead of GEN_INT (ENDIAN_LANE_N ...).
* config/aarch64/aarch64-simd.md (aarch64_dup_lane<mode>)
(aarch64_dup_lane_<vswap_width_name><mode>, *aarch64_mul3_elt<mode>)
(*aarch64_mul3_elt_<vswap_width_name><mode>): Likewise.
(*aarch64_mul3_elt_to_64v2df, *aarch64_mla_elt<mode>): Likewise.
(*aarch64_mla_elt_<vswap_width_name><mode>, *aarch64_mls_elt<mode>)
(*aarch64_mls_elt_<vswap_width_name><mode>, *aarch64_fma4_elt<mode>)
(*aarch64_fma4_elt_<vswap_width_name><mode>):: Likewise.
(*aarch64_fma4_elt_to_64v2df, *aarch64_fnma4_elt<mode>): Likewise.
(*aarch64_fnma4_elt_<vswap_width_name><mode>): Likewise.
(*aarch64_fnma4_elt_to_64v2df, reduc_plus_scal_<mode>): Likewise.
(reduc_plus_scal_v4sf, reduc_<maxmin_uns>_scal_<mode>): Likewise.
(reduc_<maxmin_uns>_scal_<mode>): Likewise.
(*aarch64_get_lane_extend<GPI:mode><VDQQH:mode>): Likewise.
(*aarch64_get_lane_zero_extendsi<mode>): Likewise.
(aarch64_get_lane<mode>, *aarch64_mulx_elt_<vswap_width_name><mode>)
(*aarch64_mulx_elt<mode>, *aarch64_vgetfmulx<mode>): Likewise.
(aarch64_sq<r>dmulh_lane<mode>, aarch64_sq<r>dmulh_laneq<mode>)
(aarch64_sqrdml<SQRDMLH_AS:rdma_as>h_lane<mode>): Likewise.
(aarch64_sqrdml<SQRDMLH_AS:rdma_as>h_laneq<mode>): Likewise.
(aarch64_sqdml<SBINQOPS:as>l_lane<mode>): Likewise.
(aarch64_sqdml<SBINQOPS:as>l_laneq<mode>): Likewise.
(aarch64_sqdml<SBINQOPS:as>l2_lane<mode>_internal): Likewise.
(aarch64_sqdml<SBINQOPS:as>l2_laneq<mode>_internal): Likewise.
(aarch64_sqdmull_lane<mode>, aarch64_sqdmull_laneq<mode>): Likewise.
(aarch64_sqdmull2_lane<mode>_internal): Likewise.
(aarch64_sqdmull2_laneq<mode>_internal): Likewise.
(aarch64_vec_load_lanesoi_lane<mode>): Likewise.
(aarch64_vec_store_lanesoi_lane<mode>): Likewise.
(aarch64_vec_load_lanesci_lane<mode>): Likewise.
(aarch64_vec_store_lanesci_lane<mode>): Likewise.
(aarch64_vec_load_lanesxi_lane<mode>): Likewise.
(aarch64_vec_store_lanesxi_lane<mode>): Likewise.
(aarch64_simd_vec_set<mode>): Update use of ENDIAN_LANE_N.
(aarch64_simd_vec_setv2di): Likewise.

Reviewed-by: James Greenhalgh <james.greenhalgh@arm.com>
Co-Authored-By: Alan Hayward <alan.hayward@arm.com>
Co-Authored-By: David Sherwood <david.sherwood@arm.com>
From-SVN: r254466

7 years agoFix ChangeLog entry
Richard Sandiford [Mon, 6 Nov 2017 19:40:43 +0000 (19:40 +0000)]
Fix ChangeLog entry

From-SVN: r254465

7 years agors6000-c.c (P8V_BUILTIN_VEC_REVB): Add power 8 definitions.
Carl Love [Mon, 6 Nov 2017 19:35:55 +0000 (19:35 +0000)]
rs6000-c.c (P8V_BUILTIN_VEC_REVB): Add power 8 definitions.

gcc/ChangeLog:

2017-11-06  Carl Love  <cel@us.ibm.com>

* config/rs6000/rs6000-c.c (P8V_BUILTIN_VEC_REVB): Add power 8
definitions.
(P9V_BUILTIN_VEC_REVB): Remove the power 9 instance definitions.
* config/rs6000/altivec.h (vec_revb): Change the #define from power 9
to power 8.
* config/rs6000/r6000-protos.h (swap_endian_selector_for_mode): Add new
extern declaration.
* config/rs6000/rs6000.c (swap_endian_selector_for_mode): Add function.
* config/rs6000/rs6000-builtin.def (BU_P8V_VSX_1, BU_P8V_OVERLOAD_1):
Add power 8 macro expansions.
(BU_P9V_OVERLOAD_1): Remove power 9 overload expansion.
* config/rs6000/vsx.md (revb_<mode>): Add define_expand to generate
power 8 instructions.  (VSX_XXBR): Add iterator.

gcc/testsuite/ChangeLog:

2017-11-06  Carl Love  <cel@us.ibm.com>

* gcc.target/powerpc/builtins-revb-runnable.c: New runnable test file.

From-SVN: r254464

7 years ago[Arm] Cleanup IT attributes
Wilco Dijkstra [Mon, 6 Nov 2017 19:26:27 +0000 (19:26 +0000)]
[Arm] Cleanup IT attributes

A recent change to remove the movdi_vfp_cortexa8 meant that ldrd was used in
ITs block even when arm_restrict_it was enabled.  Rather than just fixing this
latent issue, change the default of predicable_short_it to "no" so that only
16-bit instructions need to be marked with it.  As a result there are far fewer
patterns that need the attribute, and omitting predicable_short_it is no longer
causing issues.

* config/arm/arm.md (predicable_short_it): Change default to "no",
improve documentation, remove uses that are identical to the default.
(enabled_for_depr_it): Rename to enabled_for_short_it.
* gcc/config/arm/arm-fixed.md (predicable_short_it): Remove default uses.
* gcc/config/arm/ldmstm.md (predicable_short_it): Likewise.
* gcc/config/arm/sync.md (predicable_short_it): Likewise.
* gcc/config/arm/thumb2.md (predicable_short_it): Likewise.
* gcc/config/arm/vfp.md (predicable_short_it): Likewise.

From-SVN: r254463

7 years agore PR target/82748 (ICE with __builtin_fabsq and __float128 in copy_to_mode_reg,...
Michael Meissner [Mon, 6 Nov 2017 18:31:48 +0000 (18:31 +0000)]
re PR target/82748 (ICE with __builtin_fabsq and __float128 in copy_to_mode_reg, at explow.c:612)

[gcc]
2017-11-06  Michael Meissner  <meissner@linux.vnet.ibm.com>

PR target/82748
* config/rs6000/rs6000-builtin.def (BU_FLOAT128_1): Delete
float128 helper macros, which are no longer used after deleting
the old 'q' built-in functions, and moving the round to odd
built-in functions to being special built-in functions.
(BU_FLOAT128_2): Likewise.
(BU_FLOAT128_1_HW): Likewise.
(BU_FLOAT128_2_HW): Likewise.
(BU_FLOAT128_3_HW): Likewise.
(FABSQ): Delete old 'q' built-in functions.
(COPYSIGNQ): Likewise.
(SQRTF128_ODD): Move round to odd built-in functions to be
special built-in functions, so that we can handle
-mabi=ieeelongdouble.
(TRUNCF128_ODD): Likewise.
(ADDF128_ODD): Likewise.
(SUBF128_ODD): Likewise.
(MULF128_ODD): Likewise.
(DIVF128_ODD): Likewise.
(FMAF128_ODD): Likewise.
* config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Map old 'q'
built-in names to 'f128'.
* config/rs6000/rs6000.c (rs6000_fold_builtin): Remove folding the
old 'q' built-in functions, as the machine independent code for
'f128' built-in functions handles this.
(rs6000_expand_builtin): Add expansion for float128 round to odd
functions, keying off on -mabi=ieeelongdouble of whether to use
the KFmode or TFmode variant.
(rs6000_init_builtins): Initialize the _Float128 round to odd
built-in functions.
* doc/extend.texi (PowerPC Built-in Functions): Document the old
_Float128 'q' built-in functions are now mapped into the new
'f128' built-in functions.

[gcc/testsuite]
2017-11-06  Michael Meissner  <meissner@linux.vnet.ibm.com>

PR target/82748
* gcc.target/powerpc/pr82748-1.c: New test.
* gcc.target/powerpc/pr82748-2.c: Likewise.

From-SVN: r254462

7 years agore PR c++/65579 ([C++11] gcc requires definition of a static constexpr member even...
Paolo Carlini [Mon, 6 Nov 2017 17:45:55 +0000 (17:45 +0000)]
re PR c++/65579 ([C++11] gcc requires definition of a static constexpr member even though it is not odr-used)

/cp
2017-11-06  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/65579
* decl2.c (finish_static_data_member_decl): If there's an initializer,
complete the type and re-apply the quals.

/testsuite
2017-11-06  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/65579
* g++.dg/cpp0x/constexpr-template11.C: New.

From-SVN: r254461

7 years agocollect2.c (add_lto_object): Compile for OBJECT_COFF.
David Edelsohn [Mon, 6 Nov 2017 17:24:57 +0000 (17:24 +0000)]
collect2.c (add_lto_object): Compile for OBJECT_COFF.

* collect2.c (add_lto_object): Compile for OBJECT_COFF.
(scan_prog_file): Don't skip PASS_LTOINFO. Scan for LTO objects.

From-SVN: r254460

7 years ago* gcc-interface/misc.c (gnat_post_options): Clear warn_return_type.
Eric Botcazou [Mon, 6 Nov 2017 17:23:08 +0000 (17:23 +0000)]
* gcc-interface/misc.c (gnat_post_options): Clear warn_return_type.

From-SVN: r254459

7 years agoipa-fnsummary.c: fix use-after-free crash (PR jit/82826)
David Malcolm [Mon, 6 Nov 2017 16:31:04 +0000 (16:31 +0000)]
ipa-fnsummary.c: fix use-after-free crash (PR jit/82826)

gcc/ChangeLog:
PR jit/82826
* ipa-fnsummary.c (ipa_fnsummary_c_finalize): New function.
* ipa-fnsummary.h (ipa_fnsummary_c_finalize): New decl.
* toplev.c: Include "ipa-fnsummary.h".
(toplev::finalize): Call ipa_fnsummary_c_finalize.

From-SVN: r254458

7 years agore PR tree-optimization/82838 (ICE in verify_ssa failed w/ store-merging)
Jakub Jelinek [Mon, 6 Nov 2017 16:29:11 +0000 (17:29 +0100)]
re PR tree-optimization/82838 (ICE in verify_ssa failed w/ store-merging)

PR tree-optimization/82838
* gimple-ssa-store-merging.c
(imm_store_chain_info::output_merged_store): Call force_gimple_operand_1
on a separate gimple_seq which is then appended to seq.

* gcc.c-torture/compile/pr82838.c: New test.

From-SVN: r254457

7 years agore PR target/82788 (wrong code with -fstack-clash-protection --param=stack-clash...
Jeff Law [Mon, 6 Nov 2017 15:51:16 +0000 (08:51 -0700)]
re PR target/82788 (wrong code with -fstack-clash-protection --param=stack-clash-protection-probe-interval=10 on simple code)

PR target/82788
* config/i386/i386.c (PROBE_INTERVAL): Remove.
(get_probe_interval): New functions.
(ix86_adjust_stack_and_probe_stack_clash): Use get_probe_interval.
(ix86_adjust_stack_and_probe): Likewise.
(output_adjust_stack_and_probe): Likewise.
(ix86_emit_probe_stack_range): Likewise.
(ix86_expand_prologue): Likewise.

PR target/82788
* gcc.dg/pr82788.c: New test.

From-SVN: r254456

7 years agoCheck in right version of stack-check-12.c
Jeff Law [Mon, 6 Nov 2017 15:49:59 +0000 (08:49 -0700)]
Check in right version of stack-check-12.c

From-SVN: r254455

7 years agoPR82816: Widening multiplies of bitfields
Richard Sandiford [Mon, 6 Nov 2017 14:47:43 +0000 (14:47 +0000)]
PR82816: Widening multiplies of bitfields

In this PR we tried to create a widening multiply of two 3-bit numbers,
but that isn't a widening multiply at the optab/rtl level, since both
the input and output still have the same mode.

We could trap this either in is_widening_mult_p or (as the patch does)
in the routines that actually ask for an optab.  The latter seemed
more natural since is_widening_mult_p doesn't otherwise care about modes.

2017-11-03  Richard Sandiford  <richard.sandiford@linaro.org>
    Alan Hayward  <alan.hayward@arm.com>
    David Sherwood  <david.sherwood@arm.com>

gcc/
PR tree-optimization/82816
* tree-ssa-math-opts.c (convert_mult_to_widen): Return false
if the modes of the two types are the same.
(convert_plusminus_to_widen): Likewise.

gcc/testsuite/
* gcc.c-torture/compile/pr82816.c: New test.

Co-Authored-By: Alan Hayward <alan.hayward@arm.com>
Co-Authored-By: David Sherwood <david.sherwood@arm.com>
From-SVN: r254454

7 years ago[gcc]
Bill Schmidt [Mon, 6 Nov 2017 13:47:46 +0000 (13:47 +0000)]
[gcc]

2017-11-06  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

* config/rs6000/altivec.md (*p9_vadu<mode>3) Rename to
p9_vadu<mode>3.
(usadv16qi): New define_expand.
(usadv8hi): New define_expand.

[gcc/testsuite]

2017-11-06  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

* gcc.target/powerpc/sad-vectorize-1.c: New file.
* gcc.target/powerpc/sad-vectorize-2.c: New file.
* gcc.target/powerpc/sad-vectorize-3.c: New file.
* gcc.target/powerpc/sad-vectorize-4.c: New file.

From-SVN: r254453

7 years agore PR bootstrap/82832 (Broken PGO LTO bootstrap on x86_64 after r254379)
Jan Hubicka [Mon, 6 Nov 2017 13:45:41 +0000 (14:45 +0100)]
re PR bootstrap/82832 (Broken PGO LTO bootstrap on x86_64 after r254379)

PR bootstrap/82832
* ipa-inline-transform.c (update_noncloned_frequencies): Always
scale.
(inline_transform): Likewise.
* predict.c (counts_to_freqs): Remove useless conditional.
* profile-count.h (profile_count::apply_scale): Move sanity check.
* tree-inline.c (copy_bb): Always scale.
(copy_cfg_body): Likewise.

From-SVN: r254452

7 years agoFix -Wreturn-type fallout.
Martin Liska [Mon, 6 Nov 2017 13:41:35 +0000 (14:41 +0100)]
Fix -Wreturn-type fallout.

2017-11-06  Martin Liska  <mliska@suse.cz>

* c-c++-common/cilk-plus/AN/pr57541-2.c (foo1): Return a value
for functions with non-void return type, or change type to void,
or add -Wno-return-type for test.
(foo2): Likewise.
* c-c++-common/cilk-plus/AN/pr57541.c (foo): Likewise.
(foo1): Likewise.
* c-c++-common/cilk-plus/CK/errors.c: Likewise.
* c-c++-common/cilk-plus/CK/pr60197.c: Likewise.
* c-c++-common/cilk-plus/CK/spawn_in_return.c: Likewise.
* c-c++-common/fold-masked-cmp-1.c (test_pic): Likewise.
(test_exe): Likewise.
* c-c++-common/fold-masked-cmp-2.c (test_exe): Likewise.
* g++.dg/cilk-plus/AN/builtin_fn_mutating_tplt.cc (my_func): Likewise.
* g++.dg/cilk-plus/CK/pr68997.cc (fa2): Likewise.
* g++.dg/eh/sighandle.C (dosegv): Likewise.
* g++.dg/ext/vector14.C (foo): Likewise.
(main): Likewise.
* g++.dg/graphite/pr41305.C: Likewise.
* g++.dg/graphite/pr42930.C: Likewise.
* g++.dg/opt/pr46640.C (struct QBasicAtomicInt): Likewise.
(makeDir): Likewise.
* g++.dg/other/i386-8.C (foo): Likewise.
* g++.dg/pr45788.C: Likewise.
* g++.dg/pr64688.C (at_c): Likewise.
* g++.dg/pr65032.C (G::DecodeVorbis): Likewise.
* g++.dg/pr71633.C (c3::fn2): Likewise.
* g++.dg/stackprotectexplicit2.C (A): Likewise.
* g++.old-deja/g++.law/weak.C (main): Likewise.
2017-11-06  Martin Liska  <mliska@suse.cz>

* testsuite/libgomp.c++/loop-2.C: Return a value
for functions with non-void return type, or change type to void,
or add -Wno-return-type for test.
* testsuite/libgomp.c++/loop-4.C: Likewise.
* testsuite/libgomp.c++/parallel-1.C: Likewise.
* testsuite/libgomp.c++/shared-1.C: Likewise.
* testsuite/libgomp.c++/single-1.C: Likewise.
* testsuite/libgomp.c++/single-2.C: Likewise.
2017-11-06  Martin Liska  <mliska@suse.cz>

* testsuite/27_io/basic_fstream/cons/char/path.cc (main):
  Return a value for functions with non-void return type,
  or change type to void, or add -Wno-return-type for test.
* testsuite/27_io/basic_ifstream/cons/char/path.cc (main):
Likewise.
* testsuite/27_io/basic_ofstream/open/char/path.cc (main):
Likewise.

From-SVN: r254451

7 years agodeduction.cc: Avoid -Wreturn-type warnings.
Paolo Carlini [Mon, 6 Nov 2017 12:55:35 +0000 (12:55 +0000)]
deduction.cc: Avoid -Wreturn-type warnings.

2017-11-06  Paolo Carlini  <paolo.carlini@oracle.com>

* testsuite/20_util/optional/cons/deduction.cc: Avoid -Wreturn-type
warnings.
* testsuite/20_util/pair/cons/deduction.cc: Likewise.
* testsuite/20_util/pair/traits.cc: Likewise.
* testsuite/20_util/tuple/cons/deduction.cc: Likewise.
* testsuite/20_util/variant/compile.cc: Likewise.
* testsuite/23_containers/map/modifiers/try_emplace/1.cc: Likewise.
* testsuite/23_containers/unordered_map/modifiers/try_emplace.cc:
Likewise.

From-SVN: r254450

7 years agogcov: New directory.
Eric Botcazou [Mon, 6 Nov 2017 11:41:49 +0000 (11:41 +0000)]
gcov: New directory.

* gnat.dg/gcov: New directory.
* gnat.dg/gcov/gcov.exp: New driver.
* gnat.dg/gcov/check.adb: New test.

From-SVN: r254447

7 years ago[ARM] PR 67591 ARM v8 Thumb IT blocks are deprecated part 2
Christophe Lyon [Mon, 6 Nov 2017 10:43:19 +0000 (10:43 +0000)]
[ARM] PR 67591 ARM v8 Thumb IT blocks are deprecated part 2

2017-11-06  Christophe Lyon  <christophe.lyon@linaro.org>

PR target/67591
* config/arm/arm.md (*sub_shiftsi): Add predicable_short_it
attribute.
(*cmp_ite0): Add enabled_for_depr_it attribute.
(*cmp_ite1): Likewise.

From-SVN: r254446

7 years ago[testsuite] Fix directives order
Christophe Lyon [Mon, 6 Nov 2017 10:40:43 +0000 (10:40 +0000)]
[testsuite] Fix directives order

2017-11-06  Christophe Lyon  <christophe.lyon@linaro.org>

* gcc.c-torture/execute/pr23135.c: Move dg-add-options after
dg-options.
* gcc.dg/torture/pr78305.c: Move dg-do as first directive.
* gcc.misc-tests/gcov-3.c: Likewise.
* gcc.target/arm/cmse/baseline/cmse-11.c: Move dg-options before dg-add-options.
* gcc.target/arm/cmse/baseline/cmse-13.c: Likewise.
* gcc.target/arm/cmse/baseline/cmse-2.c: Likewise.
* gcc.target/arm/cmse/baseline/cmse-6.c: Likewise.
* gcc.target/arm/cmse/baseline/softfp.c: Likewise.
* gcc.target/arm/cmse/mainline/hard-sp/cmse-13.c: Likewise.
* gcc.target/arm/cmse/mainline/hard-sp/cmse-5.c: Likewise.
* gcc.target/arm/cmse/mainline/hard-sp/cmse-7.c: Likewise.
* gcc.target/arm/cmse/mainline/hard-sp/cmse-8.c: Likewise.
* gcc.target/arm/cmse/mainline/hard/cmse-13.c: Likewise.
* gcc.target/arm/cmse/mainline/hard/cmse-5.c: Likewise.
* gcc.target/arm/cmse/mainline/hard/cmse-7.c: Likewise.
* gcc.target/arm/cmse/mainline/hard/cmse-8.c: Likewise.
* gcc.target/arm/cmse/mainline/soft/cmse-13.c: Likewise.
* gcc.target/arm/cmse/mainline/soft/cmse-5.c: Likewise.
* gcc.target/arm/cmse/mainline/soft/cmse-7.c: Likewise.
* gcc.target/arm/cmse/mainline/soft/cmse-8.c: Likewise.
* gcc.target/arm/cmse/mainline/softfp-sp/cmse-5.c: Likewise.
* gcc.target/arm/cmse/mainline/softfp-sp/cmse-7.c: Likewise.
* gcc.target/arm/cmse/mainline/softfp-sp/cmse-8.c: Likewise.
* gcc.target/arm/cmse/mainline/softfp/cmse-13.c: Likewise.
* gcc.target/arm/cmse/mainline/softfp/cmse-5.c: Likewise.
* gcc.target/arm/cmse/mainline/softfp/cmse-7.c: Likewise.
* gcc.target/arm/cmse/mainline/softfp/cmse-8.c: Likewise.
* gcc.target/arm/lp1189445.c: Likewise.

From-SVN: r254445

7 years agore PR c++/80955 (Macros expanded in definition of user-defined literals)
Mukesh Kapoor [Mon, 6 Nov 2017 10:33:41 +0000 (10:33 +0000)]
re PR c++/80955 (Macros expanded in definition of user-defined literals)

/libcpp
2017-11-06  Mukesh Kapoor  <mukesh.kapoor@oracle.com>

PR c++/80955
* lex.c (lex_string): When checking for a valid macro for the
warning related to -Wliteral-suffix (CPP_W_LITERAL_SUFFIX),
check that the macro name does not start with an underscore
before calling is_macro().

/gcc/testsuite
2017-11-06  Mukesh Kapoor  <mukesh.kapoor@oracle.com>

PR c++/80955
* g++.dg/cpp0x/udlit-macros.C: New.

From-SVN: r254443

7 years ago[multiple changes]
Paul Thomas [Mon, 6 Nov 2017 09:54:09 +0000 (09:54 +0000)]
[multiple changes]

 2017-11-06  Paul Thomas  <pault@gcc.gnu.org>

PR fortran/69739
* trans-expr.c (gfc_map_intrinsic_function): Return false for
bounds without the DIM argument instead of ICEing.

2017-11-06  Paul Thomas  <pault@gcc.gnu.org>

PR fortran/69739
* gfortran.dg/pr69739.f90: New test.

From-SVN: r254441

7 years agoFix test-suite fallout of default -Wreturn-type.
Martin Liska [Mon, 6 Nov 2017 09:05:03 +0000 (10:05 +0100)]
Fix test-suite fallout of default -Wreturn-type.

2017-11-06  Martin Liska  <mliska@suse.cz>

* c-c++-common/Wimplicit-fallthrough-8.c: Return a value for
functions with non-void return type, or change type to void, or
add -Wno-return-type for test.
* c-c++-common/asan/pr63638.c (f): Likewise.
* c-c++-common/goacc/parallel-1.c (firstprivate): Likewise.
* c-c++-common/gomp/sink-1.c (depend): Likewise.
* c-c++-common/missing-symbol.c: Likewise.
* c-c++-common/pr36513-2.c (main2): Likewise.
* c-c++-common/pr36513.c (main1): Likewise.
* c-c++-common/pr49706-2.c: Likewise.
* c-c++-common/pr65120.c: Likewise.
* c-c++-common/tm/volatile-1.c (f): Likewise.
* c-c++-common/vector-1.c (f): Likewise.
* c-c++-common/vector-2.c (f): Likewise.
* g++.dg/abi/abi-tag14.C (f): Likewise.
(g): Likewise.
* g++.dg/abi/abi-tag18.C (f): Likewise.
* g++.dg/abi/abi-tag18a.C (f): Likewise.
* g++.dg/abi/covariant2.C (struct c3): Likewise.
(struct c7): Likewise.
* g++.dg/abi/covariant3.C (c1::f6): Likewise.
* g++.dg/abi/mangle7.C (f1): Likewise.
* g++.dg/asan/pr81340.C (class e): Likewise.
(e::f): Likewise.
* g++.dg/concepts/fn8.C (struct S): Likewise.
* g++.dg/concepts/pr65575.C (f): Likewise.
* g++.dg/concepts/template-parm11.C (f): Likewise.
* g++.dg/conversion/op6.C: Likewise.
* g++.dg/cpp0x/Wunused-variable-1.C (foo): Likewise.
* g++.dg/cpp0x/access01.C: Likewise.
* g++.dg/cpp0x/alignas3.C (class alignas): Likewise.
* g++.dg/cpp0x/auto2.C (f): Likewise.
(struct A): Likewise.
(main): Likewise.
* g++.dg/cpp0x/constexpr-array17.C (struct D): Likewise.
* g++.dg/cpp0x/constexpr-defarg2.C (a): Likewise.
(B::foo): Likewise.
(B::bar): Likewise.
* g++.dg/cpp0x/constexpr-memfn1.C (struct Y): Likewise.
* g++.dg/cpp0x/dc1.C (struct D): Likewise.
* g++.dg/cpp0x/dc3.C (struct D): Likewise.
* g++.dg/cpp0x/decltype12.C: Likewise.
* g++.dg/cpp0x/decltype17.C (main): Likewise.
* g++.dg/cpp0x/decltype3.C: Likewise.
* g++.dg/cpp0x/decltype41.C (struct C): Likewise.
(struct D): Likewise.
* g++.dg/cpp0x/defaulted28.C (f): Likewise.
* g++.dg/cpp0x/enum_base3.C (struct D): Likewise.
* g++.dg/cpp0x/gen-attrs-4.C (five): Likewise.
* g++.dg/cpp0x/initlist96.C: Likewise.
* g++.dg/cpp0x/lambda/lambda-58566.C (struct A): Likewise.
* g++.dg/cpp0x/lambda/lambda-conv10.C: Likewise.
* g++.dg/cpp0x/lambda/lambda-conv12.C: Likewise.
* g++.dg/cpp0x/lambda/lambda-defarg3.C: Likewise.
* g++.dg/cpp0x/lambda/lambda-ice3.C (Klass::dostuff): Likewise.
* g++.dg/cpp0x/lambda/lambda-ice5.C (foo): Likewise.
* g++.dg/cpp0x/lambda/lambda-nested2.C (f1): Likewise.
* g++.dg/cpp0x/lambda/lambda-template12.C (class X): Likewise.
* g++.dg/cpp0x/lambda/lambda-template2.C (struct T): Likewise.
* g++.dg/cpp0x/lambda/lambda-this12.C (struct A): Likewise.
* g++.dg/cpp0x/nolinkage1.C (main): Likewise.
* g++.dg/cpp0x/nolinkage1a.cc (dummy): Likewise.
* g++.dg/cpp0x/nsdmi-template5.C: Likewise.
* g++.dg/cpp0x/parse1.C (B::B): Likewise.
* g++.dg/cpp0x/pr34054.C (foo): Likewise.
* g++.dg/cpp0x/pr47416.C: Likewise.
* g++.dg/cpp0x/pr58781.C: Likewise.
* g++.dg/cpp0x/pr70538.C: Likewise.
* g++.dg/cpp0x/pr81325.C: Likewise.
* g++.dg/cpp0x/range-for13.C (begin): Likewise.
(end): Likewise.
* g++.dg/cpp0x/range-for14.C (begin): Likewise.
(end): Likewise.
* g++.dg/cpp0x/rv2n.C (test2_18): Likewise.
(test2_28): Likewise.
(test2_38): Likewise.
(test2_58): Likewise.
(test2_68): Likewise.
(test2_78): Likewise.
* g++.dg/cpp0x/rv3n.C (test3_128): Likewise.
* g++.dg/cpp0x/static_assert10.C (foo): Likewise.
* g++.dg/cpp0x/static_assert11.C (struct A): Likewise.
* g++.dg/cpp0x/static_assert12.C: Likewise.
* g++.dg/cpp0x/static_assert13.C: Likewise.
* g++.dg/cpp0x/trailing1.C (struct A): Likewise.
* g++.dg/cpp0x/trailing5.C (foo): Likewise.
(bar): Likewise.
* g++.dg/cpp0x/variadic114.C: Likewise.
* g++.dg/cpp0x/variadic57.C (Dims...>::foo): Likewise.
(bar): Likewise.
* g++.dg/cpp0x/variadic65.C: Likewise.
* g++.dg/cpp0x/variadic66.C (bind): Likewise.
* g++.dg/cpp0x/variadic97.C: Likewise.
* g++.dg/cpp0x/variadic98.C (__attribute__): Likewise.
* g++.dg/cpp1y/auto-fn11.C: Likewise.
* g++.dg/cpp1y/auto-fn29.C: Likewise.
* g++.dg/cpp1y/auto-fn38.C: Likewise.
* g++.dg/cpp1y/constexpr-return2.C: Likewise.
* g++.dg/cpp1y/lambda-init7.C (foo): Likewise.
* g++.dg/cpp1y/pr63996.C: Likewise.
* g++.dg/cpp1y/pr65202.C: Likewise.
* g++.dg/cpp1y/pr66443-cxx14.C (Ok): Likewise.
* g++.dg/cpp1y/pr79253.C (struct D): Likewise.
* g++.dg/cpp1y/static_assert1.C: Likewise.
* g++.dg/cpp1y/static_assert2.C: Likewise.
* g++.dg/cpp1y/var-templ44.C: Likewise.
* g++.dg/cpp1z/fold6.C (f): Likewise.
* g++.dg/cpp1z/inline-var2.C (foo): Likewise.
* g++.dg/cpp1z/lambda-this1.C (struct B): Likewise.
* g++.dg/cpp1z/static_assert-nomsg.C: Likewise.
* g++.dg/debug/dwarf-eh-personality-1.C (foobar): Likewise.
* g++.dg/debug/dwarf2/dwarf4-typedef.C (struct B): Likewise.
* g++.dg/debug/dwarf2/icf.C: Likewise.
* g++.dg/debug/dwarf2/pr61433.C (main): Likewise.
* g++.dg/debug/nullptr01.C (g): Likewise.
* g++.dg/debug/pr16792.C (foo): Likewise.
* g++.dg/debug/pr46241.C (class btCollisionWorld): Likewise.
* g++.dg/debug/pr46338.C (struct S): Likewise.
* g++.dg/debug/pr47106.C (baz): Likewise.
(bar): Likewise.
(foo): Likewise.
* g++.dg/debug/pr71057.C (fn1): Likewise.
* g++.dg/debug/pr71432.C (class CLIParameterType): Likewise.
(CLIParameterType::checkSwitched): Likewise.
* g++.dg/debug/pr80461.C (struct B): Likewise.
* g++.dg/dfp/44473-1.C (bar): Likewise.
* g++.dg/dfp/44473-2.C (bar): Likewise.
(foo): Likewise.
* g++.dg/eh/builtin1.C: Likewise.
* g++.dg/eh/builtin2.C: Likewise.
* g++.dg/eh/builtin3.C: Likewise.
* g++.dg/eh/pr45569.C (j): Likewise.
* g++.dg/eh/unwind2.C: Likewise.
* g++.dg/expr/bitfield11.C: Likewise.
* g++.dg/expr/static_cast7.C (f): Likewise.
* g++.dg/ext/altivec-14.C: Likewise.
* g++.dg/ext/asm13.C (fn1): Likewise.
* g++.dg/ext/builtin-object-size3.C: Likewise.
* g++.dg/ext/has_nothrow_assign_odr.C (main): Likewise.
(S::operator=): Likewise.
* g++.dg/ext/label7.C (f): Likewise.
* g++.dg/ext/label8.C (f): Likewise.
* g++.dg/ext/tmplattr7.C (test): Likewise.
* g++.dg/ext/vector8.C (f): Likewise.
* g++.dg/ext/visibility/anon1.C: Likewise.
* g++.dg/ext/visibility/anon2.C (f): Likewise.
* g++.dg/ext/visibility/namespace1.C (__attribute): Likewise.
* g++.dg/ext/vla16.C (fn1): Likewise.
* g++.dg/goacc/reference.C: Likewise.
* g++.dg/gomp/pr37189.C: Likewise.
* g++.dg/gomp/pr39495-1.C: Likewise.
* g++.dg/gomp/pr39495-2.C: Likewise.
* g++.dg/gomp/pr82054.C: Likewise.
* g++.dg/inherit/covariant10.C (struct c6): Likewise.
(struct c17): Likewise.
* g++.dg/inherit/covariant11.C (struct c1): Likewise.
(struct c3): Likewise.
(struct c11): Likewise.
(struct c15): Likewise.
* g++.dg/inherit/protected1.C (A::operator==): Likewise.
* g++.dg/init/inline1.C (struct A): Likewise.
* g++.dg/init/new18.C: Likewise.
* g++.dg/init/reference2.C (f): Likewise.
* g++.dg/init/reference3.C: Likewise.
* g++.dg/init/switch1.C (f): Likewise.
* g++.dg/ipa/devirt-10.C (struct wxDCBase): Likewise.
* g++.dg/ipa/devirt-13.C (main): Likewise.
* g++.dg/ipa/devirt-14.C (main): Likewise.
* g++.dg/ipa/devirt-15.C (main): Likewise.
* g++.dg/ipa/devirt-16.C (main): Likewise.
* g++.dg/ipa/devirt-17.C (main): Likewise.
* g++.dg/ipa/devirt-18.C (main): Likewise.
* g++.dg/ipa/devirt-19.C: Likewise.
* g++.dg/ipa/devirt-21.C (main): Likewise.
* g++.dg/ipa/devirt-23.C (main): Likewise.
* g++.dg/ipa/devirt-38.C: Likewise.
* g++.dg/ipa/devirt-40.C (A::m_fn1): Likewise.
* g++.dg/ipa/devirt-41.C (main): Likewise.
* g++.dg/ipa/devirt-42.C (main): Likewise.
* g++.dg/ipa/devirt-44.C (struct A): Likewise.
(main): Likewise.
* g++.dg/ipa/devirt-45.C (struct A): Likewise.
(main): Likewise.
* g++.dg/ipa/devirt-48.C (struct B): Likewise.
(struct D): Likewise.
* g++.dg/ipa/devirt-52.C: Likewise.
* g++.dg/ipa/nothrow-1.C (main): Likewise.
* g++.dg/ipa/pr43812.C (LocalSurface::bbox): Likewise.
* g++.dg/ipa/pr44372.C: Likewise.
* g++.dg/ipa/pr45572-1.C (fgetc_unlocked): Likewise.
(putc_unlocked): Likewise.
(getline): Likewise.
(ferror_unlocked): Likewise.
* g++.dg/ipa/pr58371.C: Likewise.
* g++.dg/ipa/pr59176.C: Likewise.
* g++.dg/ipa/pr60640-1.C (class G): Likewise.
* g++.dg/ipa/pr61540.C (struct top): Likewise.
* g++.dg/ipa/pr63470.C (class FTjackSupport): Likewise.
* g++.dg/ipa/pr63587-1.C: Likewise.
* g++.dg/ipa/pr63587-2.C: Likewise.
* g++.dg/ipa/pr63838.C (__attribute__): Likewise.
* g++.dg/ipa/pr63894.C (J::m_fn3): Likewise.
* g++.dg/ipa/pr64068.C (class A): Likewise.
(A::m_fn2): Likewise.
(class C): Likewise.
* g++.dg/ipa/pr64896.C (struct D): Likewise.
* g++.dg/ipa/pr65002.C: Likewise.
* g++.dg/ipa/pr65008.C (__attribute__): Likewise.
* g++.dg/ipa/pr65465.C (struct D): Likewise.
* g++.dg/ipa/pr66896.C (struct A): Likewise.
* g++.dg/ipa/pr68851.C (class G): Likewise.
(C::checkPseudoClass): Likewise.
* g++.dg/ipa/pr78211.C: Likewise.
* g++.dg/ipa/pr79931.C (AttrImpl::insertBefore): Likewise.
* g++.dg/ipa/pure-const-1.C (main): Likewise.
* g++.dg/ipa/pure-const-2.C (main): Likewise.
* g++.dg/ipa/pure-const-3.C (main): Likewise.
* g++.dg/ipa/remref-1.C (main): Likewise.
* g++.dg/ipa/remref-2.C (main): Likewise.
* g++.dg/lookup/builtin2.C (f): Likewise.
* g++.dg/lookup/crash3.C (struct A): Likewise.
(struct B): Likewise.
(crash): Likewise.
* g++.dg/lookup/friend20.C: Likewise.
* g++.dg/lookup/pr80891-5.C (vf2_subgraph_iso): Likewise.
* g++.dg/lookup/struct2.C (A::c): Likewise.
* g++.dg/lto/20080709_0.C (f): Likewise.
* g++.dg/lto/20080907_0.C: Likewise.
* g++.dg/lto/20080915_0.C (struct Baz): Likewise.
* g++.dg/lto/20080916_0.C (g): Likewise.
* g++.dg/lto/20081022_0.C (main): Likewise.
* g++.dg/lto/20081023_0.C (main): Likewise.
* g++.dg/lto/20081118_0.C (foo::method): Likewise.
* g++.dg/lto/20081118_1.C (bar::method): Likewise.
* g++.dg/lto/20081120-1_0.C: Likewise.
* g++.dg/lto/20081120-1_1.C: Likewise.
* g++.dg/lto/20081127_1.C (main): Likewise.
* g++.dg/lto/20081217-2_0.C (struct A): Likewise.
* g++.dg/lto/20090303_0.C: Likewise.
* g++.dg/lto/20090311-1_0.C: Likewise.
* g++.dg/lto/20090312_0.C: Likewise.
* g++.dg/lto/20090315_0.C (main): Likewise.
* g++.dg/lto/20091002-1_0.C: Likewise.
* g++.dg/lto/20091002-2_0.C (class DataArray): Likewise.
* g++.dg/lto/20091002-3_0.C (class DataArray): Likewise.
* g++.dg/lto/20091004-1_0.C: Likewise.
* g++.dg/lto/20091004-2_0.C: Likewise.
* g++.dg/lto/20091004-3_1.C (All_Torus_Intersections): Likewise.
* g++.dg/lto/20100721-1_0.C (__gthread_active_p): Likewise.
* g++.dg/lto/20101010-1_0.C: Likewise.
* g++.dg/lto/20101010-2_0.C: Likewise.
* g++.dg/lto/pr45679-1_0.C: Likewise.
* g++.dg/lto/pr45679-1_1.C: Likewise.
* g++.dg/lto/pr45679-2_0.C: Likewise.
* g++.dg/lto/pr48042_0.C (B::x): Likewise.
* g++.dg/lto/pr51650-1_0.C (fn): Likewise.
(main): Likewise.
* g++.dg/lto/pr51650-3_0.C (fn): Likewise.
(main): Likewise.
* g++.dg/lto/pr63270_1.C: Likewise.
* g++.dg/lto/pr65193_0.C: Likewise.
* g++.dg/lto/pr65302_0.C: Likewise.
* g++.dg/lto/pr65316_0.C: Likewise.
* g++.dg/lto/pr65475c_0.C: Likewise.
* g++.dg/lto/pr65549_0.C (main): Likewise.
* g++.dg/lto/pr69077_0.C (cWeightedStdDev::netPack): Likewise.
* g++.dg/lto/pr69589_0.C: Likewise.
* g++.dg/opt/combine.C (qvariant_cast): Likewise.
(QScriptDebuggerBackendPrivate::trace): Likewise.
* g++.dg/opt/complex3.C (j): Likewise.
* g++.dg/opt/covariant1.C (struct T): Likewise.
* g++.dg/opt/declone3.C (Item::m_fn1): Likewise.
* g++.dg/opt/dump1.C (__attribute__): Likewise.
* g++.dg/opt/inline15.C (struct C): Likewise.
(fn2): Likewise.
* g++.dg/opt/local1.C (h): Likewise.
* g++.dg/opt/memcpy1.C (csBoxClipper::Clip): Likewise.
* g++.dg/opt/new1.C: Likewise.
* g++.dg/opt/nrv8.C (main): Likewise.
* g++.dg/opt/pr23299.C (struct A): Likewise.
(struct B): Likewise.
(struct C): Likewise.
* g++.dg/opt/pr27826.C (struct Geometry): Likewise.
* g++.dg/opt/pr44919.C (back_inserter): Likewise.
* g++.dg/opt/pr47615.C (main): Likewise.
* g++.dg/opt/pr55329.C (struct A): Likewise.
* g++.dg/opt/pr61456.C (Set): Likewise.
* g++.dg/opt/pr65003.C (D::foo): Likewise.
(F::foo): Likewise.
* g++.dg/opt/pr65554.C: Likewise.
* g++.dg/opt/pr69432.C (struct C): Likewise.
* g++.dg/opt/pr78373.C (struct D): Likewise.
(Traits>::m_fn4): Likewise.
* g++.dg/opt/pr79267.C (struct F): Likewise.
* g++.dg/opt/pr82159-2.C: Likewise.
* g++.dg/other/array3.C (reserve): Likewise.
* g++.dg/other/crash-5.C (f): Likewise.
* g++.dg/other/crash-8.C: Likewise.
* g++.dg/other/error34.C (S): Likewise.
* g++.dg/other/pr22003.C (c3::func): Likewise.
* g++.dg/other/pr24623.C (RefCountPointer): Likewise.
* g++.dg/other/pr29610.C (struct __normal_iterator): Likewise.
(Painter::for_each): Likewise.
(Painter::redraw_window): Likewise.
* g++.dg/other/pr42645-1.C (struct S): Likewise.
* g++.dg/other/pr42645-2.C (foo): Likewise.
(f3): Likewise.
* g++.dg/other/pr52048.C: Likewise.
* g++.dg/other/typedef3.C (XalanCProcessor::getParseOption): Likewise.
* g++.dg/overload/defarg4.C (class foo): Likewise.
(bar::Initialize): Likewise.
* g++.dg/overload/operator5.C (equalIgnoringCase): Likewise.
* g++.dg/overload/ref-conv1.C: Likewise.
* g++.dg/overload/template5.C (test): Likewise.
* g++.dg/parse/crash40.C (class AAA): Likewise.
* g++.dg/parse/crash61.C: Likewise.
* g++.dg/parse/crash67.C: Likewise.
* g++.dg/parse/ctor5.C: Likewise.
* g++.dg/parse/defarg4.C (Foo): Likewise.
* g++.dg/parse/defarg6.C: Likewise.
* g++.dg/parse/error5.C (class Foo): Likewise.
* g++.dg/parse/expr2.C (foo): Likewise.
* g++.dg/parse/friend7.C: Likewise.
* g++.dg/parse/namespace1.C (bar): Likewise.
* g++.dg/parse/namespace9.C (g): Likewise.
* g++.dg/parse/ret-type2.C: Likewise.
* g++.dg/parse/typedef8.C (foo): Likewise.
* g++.dg/pch/static-1.C (LocalStaticTest): Likewise.
(main): Likewise.
* g++.dg/plugin/diagnostic-test-expressions-1.C (test_structure_references): Likewise.
(test_postfix_incdec): Likewise.
(test_sizeof): Likewise.
(test_alignof): Likewise.
(test_prefix_incdec): Likewise.
* g++.dg/plugin/dumb-plugin-test-1.C (func): Likewise.
* g++.dg/plugin/self-assign-test-1.C (func): Likewise.
* g++.dg/plugin/self-assign-test-2.C (func): Likewise.
* g++.dg/plugin/self-assign-test-3.C (func): Likewise.
* g++.dg/pr55513.C (main): Likewise.
* g++.dg/pr55604.C (main): Likewise.
* g++.dg/pr57662.C: Likewise.
* g++.dg/pr58389.C (F::m_fn1): Likewise.
* g++.dg/pr59510.C: Likewise.
* g++.dg/pr67989.C: Likewise.
* g++.dg/pr70590-2.C: Likewise.
* g++.dg/pr70590.C: Likewise.
* g++.dg/pr70965.C (foo): Likewise.
* g++.dg/pr77550.C: Likewise.
* g++.dg/pr80287.C (struct A): Likewise.
* g++.dg/pr80707.C (A::m_fn1): Likewise.
* g++.dg/pr81194.C: Likewise.
* g++.dg/spellcheck-identifiers.C: Likewise.
* g++.dg/tc1/dr152.C: Likewise.
* g++.dg/template/aggr-init1.C (CreateA): Likewise.
* g++.dg/template/anon1.C (struct x): Likewise.
(struct vector): Likewise.
* g++.dg/template/array29.C: Likewise.
* g++.dg/template/array7.C (bar): Likewise.
* g++.dg/template/canon-type-8.C: Likewise.
* g++.dg/template/conv1.C (First::Foo): Likewise.
* g++.dg/template/crash107.C: Likewise.
* g++.dg/template/crash23.C (f): Likewise.
* g++.dg/template/crash8.C (struct bar): Likewise.
* g++.dg/template/defarg4.C (struct A): Likewise.
* g++.dg/template/dependent-expr9.C: Likewise.
* g++.dg/template/error10.C (Btest): Likewise.
* g++.dg/template/friend32.C (f): Likewise.
* g++.dg/template/init6.C (Graph::Inner::get): Likewise.
(main): Likewise.
* g++.dg/template/memfriend7.C (A::h): Likewise.
* g++.dg/template/new10.C (Analyzer::ReadDictionary): Likewise.
* g++.dg/template/nontype12.C (baz): Likewise.
* g++.dg/template/overload12.C (foo2): Likewise.
* g++.dg/template/overload5.C (foo::f): Likewise.
* g++.dg/template/overload8.C (struct A): Likewise.
* g++.dg/template/partial10.C (fn): Likewise.
(main): Likewise.
* g++.dg/template/partial9.C (f): Likewise.
* g++.dg/template/qual1.C (shift_compare): Likewise.
* g++.dg/template/show-template-tree-3.C: Likewise.
* g++.dg/template/sizeof8.C (S<sizeof): Likewise.
* g++.dg/template/sizeof9.C (d): Likewise.
* g++.dg/template/spec6.C: Likewise.
* g++.dg/template/spec7.C (h): Likewise.
* g++.dg/template/typedef8.C: Likewise.
* g++.dg/template/using20.C (f): Likewise.
* g++.dg/template/vla1.C (label): Likewise.
* g++.dg/tm/cgraph_edge.C: Likewise.
* g++.dg/tm/pr46646.C: Likewise.
* g++.dg/tm/pr47554.C (class list): Likewise.
* g++.dg/tm/pr47573.C (getStringHeight): Likewise.
* g++.dg/tm/unsafe1.C (f): Likewise.
* g++.dg/tm/unsafe2.C (g): Likewise.
* g++.dg/torture/pr70971.C: Likewise.
* g++.dg/torture/20070621-1.C: Likewise.
* g++.dg/torture/20090329-1.C: Likewise.
* g++.dg/torture/20141013.C: Likewise.
* g++.dg/torture/pr33134.C (fxsaveGIF): Likewise.
* g++.dg/torture/pr33340.C (new): Likewise.
* g++.dg/torture/pr33627.C (class pf_Frag): Likewise.
* g++.dg/torture/pr34222.C (readFloat): Likewise.
* g++.dg/torture/pr34241.C (test): Likewise.
* g++.dg/torture/pr34641.C: Likewise.
* g++.dg/torture/pr34850.C (OctetString::operator^=): Likewise.
* g++.dg/torture/pr35164-1.C: Likewise.
* g++.dg/torture/pr36745.C: Likewise.
* g++.dg/torture/pr38705.C (S::bar): Likewise.
* g++.dg/torture/pr38811.C (AbcAbcdTracer::TestIsoAbcde): Likewise.
* g++.dg/torture/pr39362.C: Likewise.
* g++.dg/torture/pr39732.C (f): Likewise.
* g++.dg/torture/pr40991.C: Likewise.
* g++.dg/torture/pr41775.C: Likewise.
* g++.dg/torture/pr42183.C: Likewise.
* g++.dg/torture/pr42450.C: Likewise.
* g++.dg/torture/pr42704.C: Likewise.
* g++.dg/torture/pr42760.C (baz): Likewise.
(bar): Likewise.
* g++.dg/torture/pr42773.C (Cell::obscuringCells): Likewise.
* g++.dg/torture/pr42883.C: Likewise.
* g++.dg/torture/pr43905.C (struct Matrix): Likewise.
* g++.dg/torture/pr44148.C: Likewise.
* g++.dg/torture/pr44295.C: Likewise.
* g++.dg/torture/pr44357.C: Likewise.
* g++.dg/torture/pr44813.C: Likewise.
* g++.dg/torture/pr45580.C: Likewise.
* g++.dg/torture/pr45874.C (Mpeg2FrameConstructor::ParsePictureHeader): Likewise.
* g++.dg/torture/pr45877.C: Likewise.
* g++.dg/torture/pr46383.C: Likewise.
* g++.dg/torture/pr46469.C (__attribute__): Likewise.
(identifierByPthreadHandle): Likewise.
* g++.dg/torture/pr47313.C: Likewise.
* g++.dg/torture/pr48271.C: Likewise.
* g++.dg/torture/pr49615.C (Dispatch): Likewise.
(C::f): Likewise.
* g++.dg/torture/pr49770.C (main): Likewise.
* g++.dg/torture/pr49938.C: Likewise.
* g++.dg/torture/pr51436.C: Likewise.
* g++.dg/torture/pr51482.C (anim_track_bez_wvect::tangent): Likewise.
* g++.dg/torture/pr51737.C (id_state::start_file): Likewise.
* g++.dg/torture/pr51959.C: Likewise.
* g++.dg/torture/pr52772.C (class c6): Likewise.
* g++.dg/torture/pr52918-2.C (__cxa_allocate_exception): Likewise.
* g++.dg/torture/pr53011.C: Likewise.
* g++.dg/torture/pr53602.C: Likewise.
* g++.dg/torture/pr53752.C: Likewise.
* g++.dg/torture/pr54838.C: Likewise.
* g++.dg/torture/pr54902.C: Likewise.
* g++.dg/torture/pr56029.C: Likewise.
* g++.dg/torture/pr56768.C (operator!=): Likewise.
* g++.dg/torture/pr57107.C: Likewise.
* g++.dg/torture/pr57140.C: Likewise.
* g++.dg/torture/pr57235.C: Likewise.
* g++.dg/torture/pr58252.C: Likewise.
* g++.dg/torture/pr58555.C: Likewise.
* g++.dg/torture/pr59208.C (get_dbx_doc): Likewise.
* g++.dg/torture/pr60438-1.C (foo): Likewise.
* g++.dg/torture/pr60746.C (Two::run): Likewise.
* g++.dg/torture/pr61554.C: Likewise.
* g++.dg/torture/pr63419.C: Likewise.
* g++.dg/torture/pr63476.C: Likewise.
* g++.dg/torture/pr63512.C (C::m_fn3): Likewise.
* g++.dg/torture/pr64282.C (class H): Likewise.
* g++.dg/torture/pr64378.C (struct top): Likewise.
* g++.dg/torture/pr64565.C: Likewise.
* g++.dg/torture/pr64568-2.C: Likewise.
* g++.dg/torture/pr64669.C (Lex::advance_one_char): Likewise.
* g++.dg/torture/pr64686.C (B::m_fn1): Likewise.
* g++.dg/torture/pr64978.C (B::m_fn2): Likewise.
* g++.dg/torture/pr64995.C (A::m_fn2): Likewise.
* g++.dg/torture/pr65655.C: Likewise.
* g++.dg/torture/pr65851.C: Likewise.
* g++.dg/torture/pr67055.C: Likewise.
* g++.dg/torture/pr67191.C: Likewise.
* g++.dg/torture/pr68852.C: Likewise.
* g++.dg/torture/pr69264.C: Likewise.
* g++.dg/torture/pr77674.C: Likewise.
* g++.dg/torture/pr77947.C (B::m_fn2): Likewise.
* g++.dg/torture/pr78268.C: Likewise.
* g++.dg/torture/pr78507.C: Likewise.
* g++.dg/torture/pr78692.C (F::g): Likewise.
* g++.dg/torture/pr80171.C: Likewise.
* g++.dg/torture/pr82154.C (class f): Likewise.
(f::k): Likewise.
* g++.dg/tree-ssa/copyprop.C: Likewise.
* g++.dg/tree-ssa/pr22444.C: Likewise.
* g++.dg/tree-ssa/pr23948.C (make_scheduler_request): Likewise.
* g++.dg/tree-ssa/pr24172.C (dummy): Likewise.
* g++.dg/tree-ssa/pr24351-3.C: Likewise.
* g++.dg/tree-ssa/pr27283.C: Likewise.
* g++.dg/tree-ssa/pr27291.C: Likewise.
* g++.dg/tree-ssa/pr27548.C: Likewise.
* g++.dg/tree-ssa/pr34355.C (Parse_Float): Likewise.
* g++.dg/tree-ssa/pr42337.C: Likewise.
* g++.dg/tree-ssa/pred-1.C (main): Likewise.
* g++.dg/ubsan/pr65019.C (C::foo): Likewise.
* g++.dg/ubsan/pr65583.C: Likewise.
* g++.dg/vect/pr60836.cc (norm_): Likewise.
* g++.dg/vect/pr68145.cc: Likewise.
* g++.dg/vect/pr70729-nest.cc (my_alloc): Likewise.
* g++.dg/vect/pr70729.cc (my_alloc): Likewise.
* g++.dg/warn/Waddress-3.C: Likewise.
* g++.dg/warn/Wconversion-null-2.C (warn_for___null): Likewise.
* g++.dg/warn/Wnull-conversion-2.C (main): Likewise.
* g++.dg/warn/Wparentheses-10.C: Likewise.
* g++.dg/warn/Wparentheses-11.C: Likewise.
* g++.dg/warn/Wparentheses-12.C: Likewise.
* g++.dg/warn/Wparentheses-25.C: Likewise.
* g++.dg/warn/Wparentheses-6.C: Likewise.
* g++.dg/warn/Wparentheses-7.C: Likewise.
* g++.dg/warn/Wparentheses-8.C: Likewise.
* g++.dg/warn/Wparentheses-9.C: Likewise.
* g++.dg/warn/Wshadow-5.C: Likewise.
* g++.dg/warn/Wtype-limits-Wextra.C (ff): Likewise.
(gg): Likewise.
* g++.dg/warn/Wtype-limits-no.C (ff): Likewise.
(gg): Likewise.
* g++.dg/warn/Wtype-limits.C (ff): Likewise.
(gg): Likewise.
* g++.dg/warn/Wunused-local-typedefs.C: Likewise.
* g++.dg/warn/Wzero-as-null-pointer-constant-5.C: Likewise.
* g++.dg/warn/pmf1.C (a::f): Likewise.
* g++.old-deja/g++.benjamin/p13417.C: Likewise.
* g++.old-deja/g++.brendan/crash24.C (main): Likewise.
* g++.old-deja/g++.ext/constructor.C: Likewise.
* g++.old-deja/g++.ext/namedret1.C (f): Likewise.
* g++.old-deja/g++.ext/namedret3.C: Likewise.
* g++.old-deja/g++.ext/return1.C: Likewise.
* g++.old-deja/g++.jason/anon4.C (main): Likewise.
* g++.old-deja/g++.jason/enum6.C: Likewise.
* g++.old-deja/g++.jason/lineno2.C (main): Likewise.
* g++.old-deja/g++.jason/lineno3.C: Likewise.
* g++.old-deja/g++.jason/lineno4.C: Likewise.
* g++.old-deja/g++.jason/new2.C (main): Likewise.
* g++.old-deja/g++.jason/new4.C (main): Likewise.
* g++.old-deja/g++.jason/shadow1.C (main): Likewise.
* g++.old-deja/g++.jason/tempcons.C (struct A): Likewise.
* g++.old-deja/g++.jason/thunk2.C (main): Likewise.
* g++.old-deja/g++.law/builtin1.C (main): Likewise.
* g++.old-deja/g++.law/enum9.C: Likewise.
* g++.old-deja/g++.law/except3.C: Likewise.
* g++.old-deja/g++.law/init6.C: Likewise.
* g++.old-deja/g++.law/profile1.C (main): Likewise.
* g++.old-deja/g++.law/shadow2.C (main): Likewise.
* g++.old-deja/g++.law/temps4.C (main): Likewise.
* g++.old-deja/g++.mike/bool2.C (main): Likewise.
* g++.old-deja/g++.mike/eh1.C: Likewise.
* g++.old-deja/g++.mike/eh10.C: Likewise.
* g++.old-deja/g++.mike/eh13.C (main): Likewise.
* g++.old-deja/g++.mike/eh16.C: Likewise.
* g++.old-deja/g++.mike/eh17.C: Likewise.
* g++.old-deja/g++.mike/eh2.C: Likewise.
* g++.old-deja/g++.mike/eh23.C: Likewise.
* g++.old-deja/g++.mike/eh24.C: Likewise.
* g++.old-deja/g++.mike/eh25.C: Likewise.
* g++.old-deja/g++.mike/eh26.C: Likewise.
* g++.old-deja/g++.mike/eh27.C: Likewise.
* g++.old-deja/g++.mike/eh28.C: Likewise.
* g++.old-deja/g++.mike/eh29.C: Likewise.
* g++.old-deja/g++.mike/eh30.C: Likewise.
* g++.old-deja/g++.mike/eh31.C: Likewise.
* g++.old-deja/g++.mike/eh35.C: Likewise.
* g++.old-deja/g++.mike/eh36.C: Likewise.
* g++.old-deja/g++.mike/eh37.C: Likewise.
* g++.old-deja/g++.mike/eh38.C: Likewise.
* g++.old-deja/g++.mike/eh39.C: Likewise.
* g++.old-deja/g++.mike/eh40.C: Likewise.
* g++.old-deja/g++.mike/eh47.C: Likewise.
* g++.old-deja/g++.mike/eh50.C: Likewise.
* g++.old-deja/g++.mike/eh51.C: Likewise.
* g++.old-deja/g++.mike/eh7.C: Likewise.
* g++.old-deja/g++.mike/eh8.C: Likewise.
* g++.old-deja/g++.mike/eh9.C: Likewise.
* g++.old-deja/g++.mike/mangle1.C: Likewise.
* g++.old-deja/g++.mike/p5958.C: Likewise.
* g++.old-deja/g++.mike/p6004.C: Likewise.
* g++.old-deja/g++.mike/p700.C: Likewise.
* g++.old-deja/g++.mike/p7912.C: Likewise.
* g++.old-deja/g++.mike/p811.C (main): Likewise.
* g++.old-deja/g++.mike/virt4.C (main): Likewise.
* g++.old-deja/g++.oliva/nameret1.C: Likewise.
* g++.old-deja/g++.oliva/nameret2.C: Likewise.
* g++.old-deja/g++.other/decl1.C (bar): Likewise.
* g++.old-deja/g++.other/expr1.C (struct T): Likewise.
(main): Likewise.
* g++.old-deja/g++.other/inline8.C (main): Likewise.
* g++.old-deja/g++.other/loop1.C: Likewise.
* g++.old-deja/g++.other/syntax1.C (main): Likewise.
* g++.old-deja/g++.pt/repo3.C (main): Likewise.
* g++.old-deja/g++.robertl/eb27.C (main): Likewise.
* g++.old-deja/g++.robertl/eb83.C (main): Likewise.
* gcc.dg/pr44545.c: Likewise.
* obj-c++.dg/comp-types-8.mm: Likewise.
* obj-c++.dg/demangle-3.mm: Likewise.
* obj-c++.dg/super-class-1.mm: Likewise.

From-SVN: r254440

7 years agors6000: Implement insn_cost for mfcr, mfcrf
Segher Boessenkool [Mon, 6 Nov 2017 09:04:23 +0000 (10:04 +0100)]
rs6000: Implement insn_cost for mfcr, mfcrf

This gives mfcrf a cost of three integer insns, just like we do for sync
and load-with-reservation already.

* config/rs6000/rs6000.c (rs6000_insn_cost): Handle TYPE_MFCR and
TYPE_MFCRF.

From-SVN: r254439

7 years agoFix all tests that fail with -sanitize=return.
Martin Liska [Mon, 6 Nov 2017 09:02:33 +0000 (10:02 +0100)]
Fix all tests that fail with -sanitize=return.

2017-11-06  Martin Liska  <mliska@suse.cz>

* c-c++-common/dfp/call-by-value.c (foo32): Return a default
value of change return type to void.
(foo64): Likewise.
(foo128): Likewise.
* g++.dg/bprob/g++-bprob-1.C: Likewise.
* g++.dg/cpp0x/lambda/lambda-template.C (f): Likewise.
* g++.dg/cpp0x/range-for6.C (foo): Likewise.
* g++.dg/cpp0x/udlit-template.C: Likewise.
* g++.dg/cpp1z/eval-order3.C (struct A): Likewise.
(operator>>): Likewise.
* g++.dg/expr/cond12.C (struct X): Likewise.
(X::operator=): Likewise.
* g++.dg/gcov/gcov-1.C: Likewise.
* g++.dg/gcov/gcov-threads-1.C (ContentionNoDeadlock_thread): Likewise.
* g++.dg/ipa/devirt-21.C: Likewise.
* g++.dg/ipa/devirt-23.C: Likewise.
* g++.dg/ipa/devirt-34.C (t): Likewise.
* g++.dg/missing-return.C: New test. Likewise.
* g++.dg/opt/20050511-1.C (bar): Likewise.
* g++.dg/opt/const3.C (A::foo1): Likewise.
(A::foo2): Likewise.
* g++.dg/opt/pr23299.C (E::c): Likewise.
* g++.dg/other/copy2.C (A::operator=): Likewise.
* g++.dg/overload/addr1.C: Likewise.
* g++.dg/pr48484.C: Likewise.
* g++.dg/tls/thread_local3.C (thread_main): Likewise.
* g++.dg/tls/thread_local3g.C (thread_main): Likewise.
* g++.dg/tls/thread_local5.C (thread_main): Likewise.
* g++.dg/tls/thread_local5g.C (thread_main): Likewise.
* g++.dg/tls/thread_local6.C (thread_main): Likewise.
* g++.dg/tls/thread_local6g.C (thread_main): Likewise.
* g++.dg/torture/pr34850.C (OctetString::operator^=): Likewise.
* g++.dg/tree-prof/pr79259.C (fn2): Likewise.
* g++.dg/tree-ssa/pr33604.C (struct Value): Likewise.
* g++.dg/tree-ssa/pr81408.C (struct p): Likewise.
(av): Likewise.
* g++.dg/warn/string1.C (test): Likewise.

From-SVN: r254438

7 years agoInstrument function exit with __builtin_unreachable in C++
Martin Liska [Mon, 6 Nov 2017 09:02:15 +0000 (10:02 +0100)]
Instrument function exit with __builtin_unreachable in C++

2017-11-06  Martin Liska  <mliska@suse.cz>

PR middle-end/82404
* c-opts.c (c_common_post_options): Set -Wreturn-type for C++
FE.
* c.opt: Set default value of warn_return_type.
2017-11-06  Martin Liska  <mliska@suse.cz>

PR middle-end/82404
* constexpr.c (cxx_eval_builtin_function_call): Handle
__builtin_unreachable call.
(get_function_named_in_call): Declare function earlier.
(constexpr_fn_retval): Skip __builtin_unreachable.
* cp-gimplify.c (cp_ubsan_maybe_instrument_return): Rename to
...
(cp_maybe_instrument_return): ... this.
(cp_genericize): Call the function unconditionally.
2017-11-06  Martin Liska  <mliska@suse.cz>

PR middle-end/82404
* options.c (gfc_post_options): Set default value of
-Wreturn-type to false.

From-SVN: r254437

7 years agoRework vrp_int_const_binop interface
Richard Sandiford [Mon, 6 Nov 2017 08:59:09 +0000 (08:59 +0000)]
Rework vrp_int_const_binop interface

...to avoid a warning about uninitialised wide_ints.

2017-11-06  Richard Sandiford  <richard.sandiford@linaro.org>

gcc/
* tree-vrp.c (vrp_int_const_binop): Return true on success and
return the value by pointer.
(extract_range_from_multiplicative_op_1): Update accordingly.
Return as soon as an operation fails.

From-SVN: r254436

7 years agoDaily bump.
GCC Administrator [Mon, 6 Nov 2017 00:16:17 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r254435

7 years agore PR fortran/82471 (Reorder loop for unfavorable index ordering in DO CONCURRENT...
Thomas Koenig [Sun, 5 Nov 2017 17:24:37 +0000 (17:24 +0000)]
re PR fortran/82471 (Reorder loop for unfavorable index ordering in DO  CONCURRENT and FORALL)

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

PR fortran/82471
* lang.opt (ffrontend-loop-interchange): New option.
(Wfrontend-loop-interchange): New option.
* options.c (gfc_post_options): Handle ffrontend-loop-interchange.
* frontend-passes.c (gfc_run_passes): Run
optimize_namespace if flag_frontend_optimize or
flag_frontend_loop_interchange are set.
(optimize_namespace): Run functions according to flags set;
also call index_interchange.
(ind_type): New function.
(has_var): New function.
(index_cost): New function.
(loop_comp): New function.

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

PR fortran/82471
* gfortran.dg/loop_interchange_1.f90: New test.

From-SVN: r254430

7 years agore PR fortran/78641 ([OOP] ICE on polymorphic allocatable function in array constructor)
Paul Thomas [Sun, 5 Nov 2017 14:32:05 +0000 (14:32 +0000)]
re PR fortran/78641 ([OOP] ICE on polymorphic allocatable function in array constructor)

2017-11-05  Paul Thomas  <pault@gcc.gnu.org>

PR fortran/78641
* resolve.c (resolve_ordinary_assign): Do not add the _data
component for class valued array constructors being assigned
to derived type arrays.
* trans-array.c (gfc_trans_array_ctor_element): Take the _data
of class valued elements for assignment to derived type arrays.

2017-11-05  Paul Thomas  <pault@gcc.gnu.org>

PR fortran/78641
* gfortran.dg/class_66.f90: New test.

From-SVN: r254428

7 years agore PR fortran/81447 ([7/8] gfortran fails to recognize the exact dynamic type of...
Paul Thomas [Sun, 5 Nov 2017 12:38:42 +0000 (12:38 +0000)]
re PR fortran/81447 ([7/8] gfortran fails to recognize the exact dynamic type of a polymorphic entity that was allocated in a external procedure)

2017-11-05  Paul Thomas  <pault@gcc.gnu.org>

PR fortran/81447
PR fortran/82783
* resolve.c (resolve_component): There is no need to resolve
the components of a use associated vtype.
(resolve_fl_derived): Unconditionally generate a vtable for any
module derived type, as long as the standard is F2003 or later
and it is not a vtype or a PDT template.

2017-11-05  Paul Thomas  <pault@gcc.gnu.org>

PR fortran/81447
* gfortran.dg/class_65.f90: New test.
* gfortran.dg/alloc_comp_basics_1.f90: Increase builtin_free
count from 18 to 21.
* gfortran.dg/allocatable_scalar_9.f90: Increase builtin_free
count from 32 to 54.
* gfortran.dg/auto_dealloc_1.f90: Increase builtin_free
count from 4 to 10.
* gfortran.dg/coarray_lib_realloc_1.f90: Increase builtin_free
count from 3 to 6. Likewise _gfortran_caf_deregister from 2 to
3, builtin_malloc from 1 to 4 and builtin_memcpy|= MEM from
2 to 5.
* gfortran.dg/finalize_28.f90: Increase builtin_free
count from 3 to 6.
* gfortran.dg/move_alloc_15.f90: Increase builtin_free and
builtin_malloc counts from 11 to 14.
* gfortran.dg/typebound_proc_27.f03: Increase builtin_free
count from 7 to 10. Likewise builtin_malloc from 12 to 15.

From-SVN: r254427

7 years ago* doc/xml/manual/abi.xml: Move docs.oracle.com references to https.
Gerald Pfeifer [Sun, 5 Nov 2017 11:14:38 +0000 (11:14 +0000)]
* doc/xml/manual/abi.xml: Move docs.oracle.com references to https.

From-SVN: r254426

7 years agoRemove semicolon after do {} while (0) in DEF_SANITIZER_BUILTIN
Tom de Vries [Sun, 5 Nov 2017 09:58:27 +0000 (09:58 +0000)]
Remove semicolon after do {} while (0) in DEF_SANITIZER_BUILTIN

2017-11-05  Tom de Vries  <tom@codesourcery.com>

PR other/82784
* asan.c (DEF_SANITIZER_BUILTIN_1): Factor out of ...
(DEF_SANITIZER_BUILTIN): ... here.
(initialize_sanitizer_builtins): Use DEF_SANITIZER_BUILTIN_1 instead of
DEF_SANITIZER_BUILTIN in if stmt.  Add missing semicolon.

From-SVN: r254425

7 years ago[libcpp] Remove semicolon after do {} while (0) in BUF_APPEND
Tom de Vries [Sun, 5 Nov 2017 09:58:16 +0000 (09:58 +0000)]
[libcpp] Remove semicolon after do {} while (0) in BUF_APPEND

2017-11-05  Tom de Vries  <tom@codesourcery.com>

PR other/82784
* lex.c (BUF_APPEND): Remove semicolon after
"do {} while (0)".

From-SVN: r254424

7 years agoRemove semicolon after ASM_OUTPUT_BEFORE_CASE_LABEL macro body
Tom de Vries [Sun, 5 Nov 2017 09:58:05 +0000 (09:58 +0000)]
Remove semicolon after ASM_OUTPUT_BEFORE_CASE_LABEL macro body

2017-11-05  Tom de Vries  <tom@codesourcery.com>

PR other/82784
* config/elfos.h (ASM_OUTPUT_BEFORE_CASE_LABEL): Remove semicolon after
macro body.
(ASM_OUTPUT_CASE_LABEL): Add semicolon after
ASM_OUTPUT_BEFORE_CASE_LABEL call.
* config/arc/arc.h (ASM_OUTPUT_BEFORE_CASE_LABEL): Remove semicolon
after macro body.
* config/m68k/m68kelf.h (ASM_OUTPUT_BEFORE_CASE_LABEL): Same.
* config/mips/mips.h (ASM_OUTPUT_BEFORE_CASE_LABEL): Same.
* config/v850/v850.h (ASM_OUTPUT_BEFORE_CASE_LABEL): Same.

From-SVN: r254423

7 years ago[fortran] Remove semicolon after do {} while (0) in match macros
Tom de Vries [Sun, 5 Nov 2017 09:57:53 +0000 (09:57 +0000)]
[fortran] Remove semicolon after do {} while (0) in match macros

2017-11-05  Tom de Vries  <tom@codesourcery.com>

PR other/82784
* parse.c (match, matcha, matchs, matcho, matchds, matchdo): Remove
semicolon after "do {} while (0)".

From-SVN: r254422

7 years ago[graphite] Remove semicolon after do {} while (0) in DEBUG_PRINT
Tom de Vries [Sun, 5 Nov 2017 09:57:43 +0000 (09:57 +0000)]
[graphite] Remove semicolon after do {} while (0) in DEBUG_PRINT

2017-11-05  Tom de Vries  <tom@codesourcery.com>

PR other/82784
* graphite-scop-detection.c (DEBUG_PRINT): Remove semicolon after
"do {} while (0)".

From-SVN: r254421

7 years ago[libquadmath] Remove semicolon after do {} while (0) in MPN_MUL_N_RECURSE
Tom de Vries [Sun, 5 Nov 2017 09:57:30 +0000 (09:57 +0000)]
[libquadmath] Remove semicolon after do {} while (0) in MPN_MUL_N_RECURSE

2017-11-05  Tom de Vries  <tom@codesourcery.com>

PR other/82784
* printf/gmp-impl.h (MPN_MUL_N_RECURSE): Remove semicolon after
"do {} while (0)".

From-SVN: r254420

7 years ago[libsanitizer] Remove semicolon after do {} while (0) in macro body
Tom de Vries [Sun, 5 Nov 2017 09:57:17 +0000 (09:57 +0000)]
[libsanitizer] Remove semicolon after do {} while (0) in macro body

2017-11-05  Tom de Vries  <tom@codesourcery.com>

PR other/82784
* asan/asan_poisoning.cc (CHECK_SMALL_REGION): Remove semicolon after
"do {} while (0)".
* lsan/lsan_common.cc (LOG_POINTERS, LOG_THREADS): Same.

From-SVN: r254419

7 years agoRISC-V: Emit "i" suffix for instructions with immediate operands
Michael Clark [Sun, 5 Nov 2017 00:42:54 +0000 (00:42 +0000)]
RISC-V: Emit "i" suffix for instructions with immediate operands

This changes makes GCC asm output use instruction names that are
consistent with the RISC-V ISA manual.  The assembler accepts
immediate-operand instructions without the "i" suffix, so this all
worked before, it's just a bit cleaner to match the ISA manual more
closely.

gcc/ChangeLog

2017-10-03  Michael Clark  <michaeljclark@mac.com>

        * config/riscv/riscv.c (riscv_print_operand): Add a 'i' format.
        config/riscv/riscv.md (addsi3): Use 'i' for immediates.
        (adddi3): Likewise.
        (*addsi3_extended): Likewise.
        (*addsi3_extended2): Likewise.
        (<optab>si3): Likewise.
        (<optab>di3): Likewise.
        (<optab><mode>3): Likewise.
        (<*optabe>si3_internal): Likewise.
        (zero_extendqi<SUPERQI:mode>2): Likewise.
        (*add<mode>hi3): Likewise.
        (*xor<mode>hi3): Likewise.
        (<optab>di3): Likewise.
        (*<optab>si3_extend): Likewise.
        (*sge<u>_<X:mode><GPR:mode>): Likewise.
        (*slt<u>_<X:mode><GPR:mode>): Likewise.
        (*sle<u>_<X:mode><GPR:mode>): Likewise.

From-SVN: r254418

7 years agoRISC-V: If -m[no-]strict-align is not passed, assume its value from -mtune
Andrew Waterman [Sun, 5 Nov 2017 00:39:01 +0000 (00:39 +0000)]
RISC-V: If -m[no-]strict-align is not passed, assume its value from -mtune

2017-11-04  Andrew Waterman  <andrew@sifive.com>

* config/riscv/riscv.c (riscv_option_override): Conditionally set
TARGET_STRICT_ALIGN based upon -mtune argument.

From-SVN: r254417

7 years agoRISC-V: Set SLOW_BYTE_ACCESS=1
Andrew Waterman [Sun, 5 Nov 2017 00:30:40 +0000 (00:30 +0000)]
RISC-V: Set SLOW_BYTE_ACCESS=1

When implementing the RISC-V port, I took the name of this macro at
face value.  It appears we were mistaken in what this means, here's a
quote from the SPARC port that better describes what SLOW_BYTE_ACCESS
does

    /* Nonzero if access to memory by bytes is slow and undesirable.
       For RISC chips, it means that access to memory by bytes is no
       better than access by words when possible, so grab a whole word
       and maybe make use of that.  */

I've added the comment to our port as well.

See https://gcc.gnu.org/ml/gcc/2017-08/msg00202.html for more
discussion.  Thanks to Michael Clark and Andrew Pinski for the help!

gcc/ChangeLog

2017-11-04  Andrew Waterman  <andrew@sifive.com>

        * config/riscv/riscv.h (SLOW_BYTE_ACCESS): Change to 1.

From-SVN: r254416

7 years agoDaily bump.
GCC Administrator [Sun, 5 Nov 2017 00:16:12 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r254415

7 years agoPR target/82002 Part 2: Correct non-immediate offset/invalid INSN
Daniel Santos [Sat, 4 Nov 2017 22:38:43 +0000 (22:38 +0000)]
PR target/82002 Part 2: Correct non-immediate offset/invalid INSN

When we are realigning the stack pointer, making an ms_abi to sysv_abi
call and allocating 2GiB or more on the stack we end up with an invalid
INSN due to a non-immediate offset.  This occurs both with and without
-mcall-ms2sysv-xlogues.  Additionally, the stack allocation with
-mcall-ms2sysv-xlogues is ignoring (silently disabling) stack checking,
stack clash checking and probing.

This patch fixes these problems by:

1. No longer allocate stack space in ix86_emit_outlined_ms2sysv_save.
2. Rearrange where we emit SSE saves or stub call:
   a. Before frame allocation when offset from frame to save area is >= 2GiB.
   b. After frame allocation when frame is < 2GiB.  (Stack allocations
      prior to the stub call can't be combined with those afterwards, so
      this is better when possible.)
3. Modify choose_baseaddr to take an optional scratch_regno argument
   and never return rtx that cannot be used as an immediate.

gcc:
config/i386/i386.c (choose_basereg): Use optional scratch
register and add assertion.
(x86_emit_outlined_ms2sysv_save): Use scratch register when
needed, and don't allocate stack.
(ix86_expand_prologue): Rearrange where SSE saves/stub call is
emitted, correct wrong allocation with -mcall-ms2sysv-xlogues.
(ix86_emit_outlined_ms2sysv_restore): Fix non-immediate offsets.

gcc/testsuite:
gcc.target/i386/pr82002-2a.c: Change from xfail to fail.
gcc.target/i386/pr82002-2b.c: Likewise.

From-SVN: r254412

7 years agore PR libgcc/82635 (std::thread's join broken on FreeBSD with all GCCs >= 5)
Andreas Tobler [Sat, 4 Nov 2017 19:40:23 +0000 (20:40 +0100)]
re PR libgcc/82635 (std::thread's join broken on FreeBSD with all GCCs >= 5)

2017-11-04  Andreas Tobler  <andreast@gcc.gnu.org>

    PR libgcc/82635
    * config/i386/freebsd-unwind.h (MD_FALLBACK_FRAME_STATE_FOR): Use a
    sysctl to determine whether we're in a trampoline.
    Keep the pattern matching method for systems without
    KERN_PROC_SIGTRAMP sysctl.

From-SVN: r254411

7 years agotrans-expr.c (gfc_trans_assignment_1): Character kind conversion may create a loop...
Andre Vehreschild [Sat, 4 Nov 2017 14:35:45 +0000 (15:35 +0100)]
trans-expr.c (gfc_trans_assignment_1): Character kind conversion may create a loop variant temporary, too.

gcc/fortran/ChangeLog:

2017-11-04  Andre Vehreschild  <vehre@gcc.gnu.org>

* trans-expr.c (gfc_trans_assignment_1): Character kind conversion may
create a loop variant temporary, too.
* trans-intrinsic.c (conv_caf_send): Treat char arrays as arrays and
not as scalars.
* trans.c (get_array_span): Take the character kind into account when
doing pointer arithmetic.

gcc/testsuite/ChangeLog:

2017-11-04  Andre Vehreschild  <vehre@gcc.gnu.org>

* gfortran.dg/coarray/send_char_array_1.f90: New test.

From-SVN: r254407

7 years agore PR fortran/70330 (ICE with -Wextra -Wno-unused-dummy-argument and unused optional...
Thomas Koenig [Sat, 4 Nov 2017 13:54:27 +0000 (13:54 +0000)]
re PR fortran/70330 (ICE with -Wextra -Wno-unused-dummy-argument and unused optional dummy argument)

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

PR fortran/70330
* gfortran.dg/pr70330.f90: New test.

From-SVN: r254406

7 years agore PR fortran/29600 ([F03] MINLOC and MAXLOC take an optional KIND argument)
Thomas Koenig [Sat, 4 Nov 2017 13:20:32 +0000 (13:20 +0000)]
re PR fortran/29600 ([F03] MINLOC and MAXLOC take an optional KIND argument)

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

PR fortran/29600
* gfortran.h (gfc_check_f): Replace fm3l with fm4l.
* intrinsic.h (gfc_resolve_maxloc): Add gfc_expr * to argument
list in protoytpe.
(gfc_resolve_minloc): Likewise.
* check.c (gfc_check_minloc_maxloc): Handle kind argument.
* intrinsic.c (add_sym_3_ml): Rename to
(add_sym_4_ml): and handle kind argument.
(add_function): Replace add_sym_3ml with add_sym_4ml and add
extra arguments for maxloc and minloc.
(check_specific): Change use of check.f3ml with check.f4ml.
* iresolve.c (gfc_resolve_maxloc): Handle kind argument. If
the kind is smaller than the smallest library version available,
use gfc_default_integer_kind and convert afterwards.
(gfc_resolve_minloc): Likewise.

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

PR fortran/29600
* gfortran.dg/minmaxloc_8.f90: New test.

From-SVN: r254405

7 years agore PR fortran/81735 (double free or corruption (fasttop) error (SIGABRT) with charact...
Paul Thomas [Sat, 4 Nov 2017 09:07:09 +0000 (09:07 +0000)]
re PR fortran/81735 (double free or corruption (fasttop) error (SIGABRT) with character(:) and custom return type with allocatable)

2017-11-04  Paul Thomas  <pault@gcc.gnu.org>

PR fortran/81735
* trans-decl.c (gfc_trans_deferred_vars): Do a better job of a
case where 'tmp' was used unititialized and remove TODO.

2017-11-04  Paul Thomas  <pault@gcc.gnu.org>

PR fortran/81735
* gfortran.dg/pr81735.f90: New test.

From-SVN: r254404

7 years agore PR fortran/82796 (Private+equivalence in used module breaks compilation of pure...
Steven G. Kargl [Sat, 4 Nov 2017 00:34:40 +0000 (00:34 +0000)]
re PR fortran/82796 (Private+equivalence in used module breaks compilation of pure function)

2017-11-01  Steven G. Kargl  <kargl@gcc.gnu.org>

PR fortran/82796
* resolve.c (resolve_equivalence): An entity in a common block within
  a module cannot appear in an equivalence statement if the entity is
with a pure procedure.

2017-11-01  Steven G. Kargl  <kargl@gcc.gnu.org>

PR fortran/82796
* gfortran.dg/equiv_pure.f90: New test.

From-SVN: r254403

7 years agoDaily bump.
GCC Administrator [Sat, 4 Nov 2017 00:16:16 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r254402

7 years agore PR target/82823 (ICE in ix86_expand_prologue, at config/i386/i386.c:13171 with...
Jeff Law [Fri, 3 Nov 2017 20:42:41 +0000 (14:42 -0600)]
re PR target/82823 (ICE in ix86_expand_prologue, at config/i386/i386.c:13171 with -fstack-clash-protection)

PR target/82823
* g++.dg/torture/pr82823.C: New test.

From-SVN: r254398

7 years agoAdd BZ marker to a recent change
Jeff Law [Fri, 3 Nov 2017 20:36:01 +0000 (14:36 -0600)]
Add BZ marker to a recent change

From-SVN: r254397

7 years agoi386.c (ix86_emit_restore_reg_using_pop): Prototype.
Jeff Law [Fri, 3 Nov 2017 20:30:53 +0000 (14:30 -0600)]
i386.c (ix86_emit_restore_reg_using_pop): Prototype.

* config/i386/i386.c (ix86_emit_restore_reg_using_pop): Prototype.
(ix86_adjust_stack_and_probe_stack_clash): Use a push/pop sequence
to probe at the start of a noreturn function.

* gcc.target/i386/stack-check-12.c: New test.

From-SVN: r254396

7 years agore PR tree-optimization/78821 (GCC7: Copying whole 32 bits structure field by field...
Jakub Jelinek [Fri, 3 Nov 2017 19:08:25 +0000 (20:08 +0100)]
re PR tree-optimization/78821 (GCC7: Copying whole 32 bits structure field by field not optimised into copying whole 32 bits at once)

PR tree-optimization/78821
* gimple-ssa-store-merging.c: Update the file comment.
(MAX_STORE_ALIAS_CHECKS): Define.
(struct store_operand_info): New type.
(store_operand_info::store_operand_info): New constructor.
(struct store_immediate_info): Add rhs_code and ops data members.
(store_immediate_info::store_immediate_info): Add rhscode, op0r
and op1r arguments to the ctor, initialize corresponding data members.
(struct merged_store_group): Add load_align_base and load_align
data members.
(merged_store_group::merged_store_group): Initialize them.
(merged_store_group::do_merge): Update them.
(merged_store_group::apply_stores): Pick the constant for
encode_tree_to_bitpos from one of the two operands, or skip
encode_tree_to_bitpos if neither operand is a constant.
(class pass_store_merging): Add process_store method decl.  Remove
bool argument from terminate_all_aliasing_chains method decl.
(pass_store_merging::terminate_all_aliasing_chains): Remove
var_offset_p argument and corresponding handling.
(stmts_may_clobber_ref_p): New function.
(compatible_load_p): New function.
(imm_store_chain_info::coalesce_immediate_stores): Terminate group
if there is overlap and rhs_code is not INTEGER_CST.  For
non-overlapping stores terminate group if rhs is not mergeable.
(get_alias_type_for_stmts): Change first argument from
auto_vec<gimple *> & to vec<gimple *> &.  Add IS_LOAD, CLIQUEP and
BASEP arguments.  If IS_LOAD is true, look at rhs1 of the stmts
instead of lhs.  Compute *CLIQUEP and *BASEP in addition to the
alias type.
(get_location_for_stmts): Change first argument from
auto_vec<gimple *> & to vec<gimple *> &.
(struct split_store): Remove orig_stmts data member, add orig_stores.
(split_store::split_store): Create orig_stores rather than orig_stmts.
(find_constituent_stmts): Renamed to ...
(find_constituent_stores): ... this.  Change second argument from
vec<gimple *> * to vec<store_immediate_info *> *, push pointers
to info structures rather than the statements.
(split_group): Rename ALLOW_UNALIGNED argument to
ALLOW_UNALIGNED_STORE, add ALLOW_UNALIGNED_LOAD argument and handle
it.  Adjust find_constituent_stores caller.
(imm_store_chain_info::output_merged_store): Handle rhs_code other
than INTEGER_CST, adjust split_group, get_alias_type_for_stmts and
get_location_for_stmts callers.  Set MR_DEPENDENCE_CLIQUE and
MR_DEPENDENCE_BASE on the MEM_REFs if they are the same in all stores.
(mem_valid_for_store_merging): New function.
(handled_load): New function.
(pass_store_merging::process_store): New method.
(pass_store_merging::execute): Use process_store method.  Adjust
terminate_all_aliasing_chains caller.

* gcc.dg/store_merging_13.c: New test.
* gcc.dg/store_merging_14.c: New test.

From-SVN: r254391

7 years ago2017-11-3 Steven G. Kargl <kargl@gcc.gnu.org>
Steven G. Kargl [Fri, 3 Nov 2017 19:03:59 +0000 (19:03 +0000)]
2017-11-3  Steven G. Kargl  <kargl@gcc.gnu.org>

* gfortran.dg/large_real_kind_2.F90: Test passes on FreeBSD.  Remove
dg-xfail-if directive.

From-SVN: r254390

7 years agoImprove aarch64_legitimate_constant_p
Wilco Dijkstra [Fri, 3 Nov 2017 18:19:33 +0000 (18:19 +0000)]
Improve aarch64_legitimate_constant_p

This patch further improves aarch64_legitimate_constant_p.  Allow all
integer, floating point and vector constants.  Allow label references
and non-anchor symbols with an immediate offset.  This allows such
constants to be rematerialized, resulting in smaller code and fewer stack
spills.  SPEC2006 codesize reduces by 0.08%, SPEC2017 by 0.13%.

    gcc/
* config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
Return true for more constants, symbols and label references.
(aarch64_valid_floating_const): Remove unused function.

From-SVN: r254388

7 years agomsa.c: Add -fcommon to dg-options.
Sandra Loosemore [Fri, 3 Nov 2017 17:45:45 +0000 (13:45 -0400)]
msa.c: Add -fcommon to dg-options.

2017-11-03  Sandra Loosemore  <sandra@codesourcery.com>

gcc/testsuite/
* gcc.target/mips/msa.c: Add -fcommon to dg-options.

From-SVN: r254387

7 years agoi386.c (ix86_expand_prologue): Tighten assert for int_registers_saved.
Jeff Law [Fri, 3 Nov 2017 17:14:23 +0000 (11:14 -0600)]
i386.c (ix86_expand_prologue): Tighten assert for int_registers_saved.

* config/i386/i386.c (ix86_expand_prologue): Tighten assert
for int_registers_saved.

From-SVN: r254386

7 years agore PR testsuite/82828 (i386/pr70263-2.c fail)
Uros Bizjak [Fri, 3 Nov 2017 16:37:39 +0000 (17:37 +0100)]
re PR testsuite/82828 (i386/pr70263-2.c fail)

PR testsuite/82828
PR rtl-optimization/70263
* gcc.target/i386/pr70263-2.c: Fix invalid testcase.

From-SVN: r254385

7 years agore PR c++/82768 (ICE in synthesize_implicit_template_parm, at cp/parser.c:39338)
Wilco Dijkstra [Fri, 3 Nov 2017 16:29:47 +0000 (16:29 +0000)]
re PR c++/82768 (ICE in synthesize_implicit_template_parm, at cp/parser.c:39338)

Fix PR82768

Forcing LR at the bottom of the frame caused a few test failures.
Since there are some cases that generate worse code, revert this
part, and the frame tests pass again.

    gcc/
PR target/82786
* config/aarch64/aarch64.c (aarch64_layout_frame):
Undo forcing of LR at bottom of frame.

From-SVN: r254384

7 years agocfganal.c (single_pred_edge_ignoring_loop_edges): New function extracted from tree...
Jeff Law [Fri, 3 Nov 2017 16:28:28 +0000 (10:28 -0600)]
cfganal.c (single_pred_edge_ignoring_loop_edges): New function extracted from tree-ssa-dom.c.

* cfganal.c (single_pred_edge_ignoring_loop_edges): New function
extracted from tree-ssa-dom.c.
* cfganal.h (single_pred_edge_ignoring_loop_edges): Prototype.
* tree-ssa-dom.c (single_incoming_edge_ignoring_loop_edges): Remove.
(record_equivalences_from_incoming_edge): Add additional argument
to single_pred_edge_ignoring_loop_edges call.
* tree-ssa-uncprop.c (single_incoming_edge_ignoring_loop_edges): Remove.
(uncprop_dom_walker::before_dom_children): Add additional argument
to single_pred_edge_ignoring_loop_edges call.
* tree-ssa-sccvn.c (sccvn_dom_walker::before_dom_children): Use
single_pred_edge_ignoring_loop_edges rather than open coding.
* tree-vrp.c (evrp_dom_walker::before_dom_children): Similarly.

From-SVN: r254383

7 years agoGeneralize -(-X) a little
Marc Glisse [Fri, 3 Nov 2017 16:23:57 +0000 (17:23 +0100)]
Generalize -(-X) a little

2017-11-03  Marc Glisse  <marc.glisse@inria.fr>

gcc/
* match.pd (-(-A)): Rewrite.

gcc/testsuite/
* gcc.dg/tree-ssa/negneg-1.c: New file.
* gcc.dg/tree-ssa/negneg-2.c: Likewise.
* gcc.dg/tree-ssa/negneg-3.c: Likewise.
* gcc.dg/tree-ssa/negneg-4.c: Likewise.

From-SVN: r254382

7 years agoDefine std::endian for C++2a (P0463R1)
Jonathan Wakely [Fri, 3 Nov 2017 15:45:49 +0000 (15:45 +0000)]
Define std::endian for C++2a (P0463R1)

* include/std/type_traits (endian): Define new enumeration type.
* testsuite/20_util/endian/1.cc: New test.

From-SVN: r254381

7 years agors6000: Remove rs6000_emit_sISEL
Segher Boessenkool [Fri, 3 Nov 2017 15:44:29 +0000 (16:44 +0100)]
rs6000: Remove rs6000_emit_sISEL

Instead of calling rs6000_emit_sISEL, call rs6000_emit_int_cmove
directly, in the one place it is used.

* config/rs6000/rs60000-protos.h (rs6000_emit_sISEL): Delete.
(rs6000_emit_int_cmove): New declaration.
* config/rs6000/rs6000.c (rs6000_emit_int_cmove): Delete declaration.
(rs6000_emit_sISEL): Delete.
(rs6000_emit_int_cmove): Make non-static.
* config/rs6000/rs6000.md (cstore<mode>4): Use rs6000_emit_int_cmove
instead of rs6000_emit_sISEL.

From-SVN: r254380

7 years agoasan.c (create_cond_insert_point): Maintain profile.
Jan Hubicka [Fri, 3 Nov 2017 15:42:30 +0000 (16:42 +0100)]
asan.c (create_cond_insert_point): Maintain profile.

* asan.c (create_cond_insert_point): Maintain profile.
* ipa-utils.c (ipa_merge_profiles): Be sure only IPA profiles are
merged.
* basic-block.h (struct basic_block_def): Remove frequency.
(EDGE_FREQUENCY): Use to_frequency
* bb-reorder.c (push_to_next_round_p): Use only IPA counts for global
heuristics.
(find_traces): Update to use to_frequency.
(find_traces_1_round): Likewise; use only IPA counts.
(bb_to_key): Likewise.
(connect_traces): Use IPA counts only.
(copy_bb_p): Update to use to_frequency.
(fix_up_crossing_landing_pad): Likewise.
(sanitize_hot_paths): Likewise.
* bt-load.c (basic_block_freq): Likewise.
* cfg.c (init_flow): Set count_max to uninitialized.
(check_bb_profile): Remove frequencies; check counts.
(dump_bb_info): Do not dump frequencies.
(update_bb_profile_for_threading): Update counts only.
(scale_bbs_frequencies_int): Likewise.
(MAX_SAFE_MULTIPLIER): Remove.
(scale_bbs_frequencies_gcov_type): Update counts only.
(scale_bbs_frequencies_profile_count): Update counts only.
(scale_bbs_frequencies): Update counts only.
* cfg.h (struct control_flow_graph): Add count-max.
(update_bb_profile_for_threading): Update prototype.
* cfgbuild.c (find_bb_boundaries): Do not update frequencies.
(find_many_sub_basic_blocks): Likewise.
* cfgcleanup.c (try_forward_edges): Likewise.
(try_crossjump_to_edge): Likewise.
* cfgexpand.c (expand_gimple_cond): Likewise.
(expand_gimple_tailcall): Likewise.
(construct_init_block): Likewise.
(construct_exit_block): Likewise.
* cfghooks.c (verify_flow_info): Check consistency of counts.
(dump_bb_for_graph): Do not dump frequencies.
(split_block_1): Do not update frequencies.
(split_edge): Do not update frequencies.
(make_forwarder_block): Do not update frequencies.
(duplicate_block): Do not update frequencies.
(account_profile_record): Do not update frequencies.
* cfgloop.c (find_subloop_latch_edge_by_profile): Use IPA counts
for global heuristics.
* cfgloopanal.c (average_num_loop_insns): Update to use to_frequency.
(expected_loop_iterations_unbounded): Use counts only.
* cfgloopmanip.c (scale_loop_profile): Simplify.
(create_empty_loop_on_edge): Simplify
(loopify): Simplify
(duplicate_loop_to_header_edge): Simplify
* cfgrtl.c (force_nonfallthru_and_redirect): Update profile.
(update_br_prob_note): Take care of removing note when profile
becomes undefined.
(relink_block_chain): Do not dump frequency.
(rtl_account_profile_record): Use to_frequency.
* cgraph.c (symbol_table::create_edge): Convert count to ipa count.
(cgraph_edge::redirect_call_stmt_to_calle): Conver tcount to ipa count.
(cgraph_update_edges_for_call_stmt_node): Likewise.
(cgraph_edge::verify_count_and_frequency): Update.
(cgraph_node::verify_node): Temporarily disable frequency verification.
* cgraphbuild.c (compute_call_stmt_bb_frequency): Use
to_cgraph_frequency.
(cgraph_edge::rebuild_edges): Convert to ipa counts.
* cgraphunit.c (init_lowered_empty_function): Do not initialize
frequencies.
(cgraph_node::expand_thunk): Update profile.
* except.c (dw2_build_landing_pads): Do not update frequency.
* final.c (compute_alignments): Use to_frequency.
(dump_basic_block_info): Do not dump frequency.
* gimple-pretty-print.c (dump_profile): Do not dump frequency.
(dump_gimple_bb_header): Do not dump frequency.
* gimple-ssa-isolate-paths.c (isolate_path): Do not update frequency;
do update count.
* gimple-streamer-in.c (input_bb): Do not stream frequency.
* gimple-streamer-out.c (output_bb): Do not stream frequency.
* haifa-sched.c (sched_pressure_start_bb): Use to_freuqency.
(init_before_recovery): Do not update frequency.
(sched_create_recovery_edges): Do not update frequency.
* hsa-gen.c (convert_switch_statements): Do not update frequency.
* ipa-cp.c (ipcp_propagate_stage): Update search for max_count.
(ipa_cp_c_finalize): Set max_count to uninitialized.
* ipa-fnsummary.c (get_minimal_bb): Use counts.
(param_change_prob): Use counts.
* ipa-profile.c (ipa_profile_generate_summary): Do not summarize
local profiles.
* ipa-split.c (consider_split): Use to_frequency.
(split_function): Use to_frequency.
* ira-build.c (loop_compare_func): Likewise.
(mark_loops_for_removal): Likewise.
(mark_all_loops_for_removal): Likewise.
* loop-doloop.c (doloop_modify): Do not update frequency.
* loop-unroll.c (unroll_loop_runtime_iterations): Do not update
frequency.
* lto-streamer-in.c (input_function): Update count_max.
* omp-expand.c (expand_omp_taskreg): Update count_max.
* omp-simd-clone.c (simd_clone_adjust): Update profile.
* predict.c (maybe_hot_frequency_p): Use to_frequency.
(maybe_hot_count_p): Use ipa counts only.
(maybe_hot_bb_p): Simplify.
(maybe_hot_edge_p): Simplify.
(probably_never_executed): Do not take frequency argument.
(probably_never_executed_bb_p): Do not pass frequency.
(probably_never_executed_edge_p): Likewise.
(combine_predictions_for_bb): Check that profile is nonzero.
(propagate_freq): Do not set frequency.
(drop_profile): Simplify.
(counts_to_freqs): Simplify.
(expensive_function_p): Use to_frequency.
(propagate_unlikely_bbs_forward): Simplify.
(determine_unlikely_bbs): Simplify.
(estimate_bb_frequencies): Add hack to silence graphite issues.
(compute_function_frequency): Use ipa counts.
(pass_profile::execute): Update.
(rebuild_frequencies): Use counts only.
(force_edge_cold): Use counts only.
* profile-count.c (profile_count::dump): Dump new count types.
(profile_count::differs_from_p): Check compatiblity.
(profile_count::to_frequency): New function.
(profile_count::to_cgraph_frequency): New function.
* profile-count.h (struct function): Declare.
(enum profile_quality): Add profile_guessed_local and
profile_guessed_global0.
(class profile_proability): Decrease number of bits to 29;
update from_reg_br_prob_note and to_reg_br_prob_note.
(class profile_count: Update comment; decrease number of bits
to 61. Check compatibility.
(profile_count::compatible_p): New private member function.
(profile_count::ipa_p): New member function.
(profile_count::operator<): Handle global zero correctly.
(profile_count::operator>): Handle global zero correctly.
(profile_count::operator<=): Handle global zero correctly.
(profile_count::operator>=): Handle global zero correctly.
(profile_count::nonzero_p): New member function.
(profile_count::force_nonzero): New member function.
(profile_count::max): New member function.
(profile_count::apply_scale): Handle IPA scalling.
(profile_count::guessed_local): New member function.
(profile_count::global0): New member function.
(profile_count::ipa): New member function.
(profile_count::to_frequency): Declare.
(profile_count::to_cgraph_frequency): Declare.
* profile.c (OVERLAP_BASE): Delete.
(compute_frequency_overlap): Delete.
(compute_branch_probabilities): Do not use compute_frequency_overlap.
* regs.h (REG_FREQ_FROM_BB): Use to_frequency.
* sched-ebb.c (rank): Use counts only.
* shrink-wrap.c (handle_simple_exit): Use counts only.
(try_shrink_wrapping): Use counts only.
(place_prologue_for_one_component): Use counts only.
* tracer.c (find_best_predecessor): Use to_frequency.
(find_trace): Use to_frequency.
(tail_duplicate): Use to_frequency.
* trans-mem.c (expand_transaction): Do not update frequency.
* tree-call-cdce.c: Do not update frequency.
* tree-cfg.c (gimple_find_sub_bbs): Likewise.
(gimple_merge_blocks): Likewise.
(gimple_split_edge): Likewise.
(gimple_duplicate_sese_region): Likewise.
(gimple_duplicate_sese_tail): Likewise.
(move_sese_region_to_fn): Likewise.
(gimple_account_profile_record): Likewise.
(insert_cond_bb): Likewise.
* tree-complex.c (expand_complex_div_wide): Likewise.
* tree-eh.c (lower_resx): Update profile.
* tree-inline.c (copy_bb): Simplify count scaling; do not scale
frequencies.
(initialize_cfun): Do not initialize frequencies
(freqs_to_counts): Delete.
(copy_cfg_body): Ignore count parameter.
(copy_body): Update.
(expand_call_inline): Update count_max.
(optimize_inline_calls): Update count_max.
(tree_function_versioning): Update count_max.
* tree-ssa-coalesce.c (coalesce_cost_bb): Use to_frequency.
* tree-ssa-ifcombine.c (update_profile_after_ifcombine): Do not update
frequency.
* tree-ssa-loop-im.c (execute_sm_if_changed): Use counts only.
* tree-ssa-loop-ivcanon.c (unloop_loops): Do not update freuqency.
(try_peel_loop): Likewise.
* tree-ssa-loop-ivopts.c (get_scaled_computation_cost_at): Use
to_frequency.
* tree-ssa-loop-manip.c (niter_for_unrolled_loop): Pass -1.
(tree_transform_and_unroll_loop): Do not use frequencies
* tree-ssa-loop-niter.c (estimate_numbers_of_iterations):
Use reliable prediction only.
* tree-ssa-loop-unswitch.c (hoist_guard): Do not use frequencies.
* tree-ssa-sink.c (select_best_block): Use to_frequency.
* tree-ssa-tail-merge.c (replace_block_by): Temporarily disable
probability scaling.
* tree-ssa-threadupdate.c (create_block_for_threading): Do
not update frequency
(any_remaining_duplicated_blocks): Likewise.
(update_profile): Likewise.
(estimated_freqs_path): Delete.
(freqs_to_counts_path): Delete.
(clear_counts_path): Delete.
(ssa_fix_duplicate_block_edges): Likewise.
(duplicate_thread_path): Likewise.
* tree-switch-conversion.c (gen_inbound_check): Use counts.
* tree-tailcall.c (decrease_profile): Do not update frequency.
(eliminate_tail_call): Likewise.
* tree-vect-loop-manip.c (vect_do_peeling): Likewise.
* tree-vect-loop.c (scale_profile_for_vect_loop): Likewise.
(optimize_mask_stores): Likewise.
* tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
* ubsan.c (ubsan_expand_null_ifn): Update profile.
(ubsan_expand_ptr_ifn): Update profile.
* value-prof.c (gimple_ic): Simplify.
* value-prof.h (gimple_ic): Update prototype.
* ipa-inline-transform.c (inline_transform): Fix scaling conditoins.
* ipa-inline.c (compute_uninlined_call_time): Be sure that
counts are nonzero.
(want_inline_self_recursive_call_p): Likewise.
(resolve_noninline_speculation): Only cummulate defined counts.
(inline_small_functions): Use nonzero_p.
(ipa_inline): Do not access freed node.

Unknown ChangeLog:

2017-11-02  Jan Hubicka  <hubicka@ucw.cz>

* testsuite/gcc.dg/no-strict-overflow-3.c (foo): Update magic
value to not clash with frequency.
* testsuite/gcc.dg/strict-overflow-3.c (foo): Likewise.
* testsuite/gcc.dg/tree-ssa/builtin-sprintf-2.c: Update template.
* testsuite/gcc.dg/tree-ssa/dump-2.c: Update template.
* testsuite/gcc.dg/tree-ssa/ifc-10.c: Update template.
* testsuite/gcc.dg/tree-ssa/ifc-11.c: Update template.
* testsuite/gcc.dg/tree-ssa/ifc-12.c: Update template.
* testsuite/gcc.dg/tree-ssa/ifc-20040816-1.c: Update template.
* testsuite/gcc.dg/tree-ssa/ifc-20040816-2.c: Update template.
* testsuite/gcc.dg/tree-ssa/ifc-5.c: Update template.
* testsuite/gcc.dg/tree-ssa/ifc-8.c: Update template.
* testsuite/gcc.dg/tree-ssa/ifc-9.c: Update template.
* testsuite/gcc.dg/tree-ssa/ifc-cd.c: Update template.
* testsuite/gcc.dg/tree-ssa/ifc-pr56541.c: Update template.
* testsuite/gcc.dg/tree-ssa/ifc-pr68583.c: Update template.
* testsuite/gcc.dg/tree-ssa/ifc-pr69489-1.c: Update template.
* testsuite/gcc.dg/tree-ssa/ifc-pr69489-2.c: Update template.
* testsuite/gcc.target/i386/pr61403.c: Update template.

From-SVN: r254379

7 years agoSet default sched pressure algorithm
Wilco Dijkstra [Fri, 3 Nov 2017 15:20:53 +0000 (15:20 +0000)]
Set default sched pressure algorithm

The Arm backend sets the default sched-pressure algorithm to SCHED_PRESSURE_MODEL.
Benchmarking on AArch64 shows this speeds up floating point performance on SPEC -
eg. CactusBSSN improves by ~16%.  The gains are mostly due to less spilling,
so enable this on AArch64 by default.

    gcc/
* config/aarch64/aarch64.c (aarch64_override_options_internal):
Set PARAM_SCHED_PRESSURE_ALGORITHM to SCHED_PRESSURE_MODEL.

From-SVN: r254378

7 years agoRISC-V: Handle non-legitimate address in riscv_legitimize_move
Kito Cheng [Fri, 3 Nov 2017 14:59:39 +0000 (14:59 +0000)]
RISC-V: Handle non-legitimate address in riscv_legitimize_move

GCC may generate non-legitimate address due to we allow some
load/store with non-legitimate address in pic.md.

gcc/ChangeLog

2017-11-03  Kito Cheng  <kito.cheng@gmail.com>

        * config/riscv/riscv.c (riscv_legitimize_move): Handle
        non-legitimate address.

From-SVN: r254376

7 years ago[PATCH] Fix testsuire error message
Nathan Sidwell [Fri, 3 Nov 2017 14:18:01 +0000 (14:18 +0000)]
[PATCH] Fix testsuire error message

https://gcc.gnu.org/ml/gcc-patches/2017-11/msg00196.html
* lib/scanlang.exp: Fix error message to refer to scan-lang-dump.

From-SVN: r254375

7 years agors6000: Improve *lt0 patterns
Segher Boessenkool [Fri, 3 Nov 2017 14:09:10 +0000 (15:09 +0100)]
rs6000: Improve *lt0 patterns

The rs6000 port currently has an *lt0_disi define_insn, setting the DI
result to whether the SI argument is negative or not.  It turns out the
generic optimisers cannot always figure out in the other cases either
that this is just a shift for us.  This patch adds patterns for all
four SI/DI combinations.

* config/rs6000/rs6000.md (*lt0_disi): Delete.
(*lt0_<mode>di, *lt0_<mode>si): New.

From-SVN: r254374

7 years agors6000: move_from_CR_ov_bit is TARGET_PAIRED_FLOAT, not TARGET_ISEL
Segher Boessenkool [Fri, 3 Nov 2017 14:07:25 +0000 (15:07 +0100)]
rs6000: move_from_CR_ov_bit is TARGET_PAIRED_FLOAT, not TARGET_ISEL

* config/rs6000/rs6000.md (move_from_CR_ov_bit): Change condition to
TARGET_PAIRED_FLOAT.

From-SVN: r254373

7 years ago[aarch64] Add Qualcomm saphira CPU support.
Siddhesh Poyarekar [Fri, 3 Nov 2017 13:26:28 +0000 (13:26 +0000)]
[aarch64] Add Qualcomm saphira CPU support.

This patch adds an mcpu option for the Qualcomm saphira server part.
Tested on aarch64 and did not find any regressions resulting from this
patch.

2017-11-03  Siddhesh Poyarekar  <siddhesh.poyarekar@linaro.org>
    Jim Wilson  <jim.wilson@linaro.org>

* config/aarch64/aarch64-cores.def (saphira): New CPU.
* config/aarch64/aarch64-tune.md: Regenerated.
* doc/invoke.texi (AArch64 Options/-mtune): Add "saphira".
* gcc/config/aarch64/aarch64.c (saphira_tunings): New tuning table.

Co-Authored-By: Jim Wilson <jim.wilson@linaro.org>
From-SVN: r254372

7 years ago[PR c++/82710] false positive paren warning
Nathan Sidwell [Fri, 3 Nov 2017 13:16:06 +0000 (13:16 +0000)]
[PR c++/82710] false positive paren warning

https://gcc.gnu.org/ml/gcc-patches/2017-11/msg00186.html
PR c++/82710
* decl.c (grokdeclarator): Protect MAYBE_CLASS things from paren
warning too.

PR c++/82710
* g++.dg/warn/pr82710.C: More cases.

From-SVN: r254371

7 years agoRemove _Node_insert_return::get() member functions (P0508R0)
Jonathan Wakely [Fri, 3 Nov 2017 11:04:45 +0000 (11:04 +0000)]
Remove _Node_insert_return::get() member functions (P0508R0)

* include/bits/node_handle.h (_Node_insert_return::get): Remove, as
per P0508R0.

From-SVN: r254368

7 years ago[ARC] Fix to unwinding.
Cupertino Miranda [Fri, 3 Nov 2017 10:51:18 +0000 (10:51 +0000)]
[ARC] Fix to unwinding.

gcc/ChangeLog:
2017-11-03  Cupertino Miranda  <cmiranda@synopsys.com>

        * config/arc/arc.c (arc_save_restore): Corrected CFA note.
        (arc_expand_prologue): Restore blink for millicode.
        * config/arc/linux.h (LINK_EH_SPEC): Defined.

libgcc/ChangeLog:
2017-11-03  Cupertino Miranda  <cmiranda@synopsys.com>
            Vineet Gupta <vgupta@synopsys.com>

        * config.host (arc*-*-linux*): Set md_unwind_header variable.
        * config/arc/linux-unwind-reg.def: New file.
        * config/arc/linux-unwind.h: Likewise.

Co-Authored-By: Vineet Gupta <vgupta@synopsys.com>
From-SVN: r254367

7 years agoPR82809: register handling in ix86_vector_duplicate_value
Richard Sandiford [Fri, 3 Nov 2017 09:24:28 +0000 (09:24 +0000)]
PR82809: register handling in ix86_vector_duplicate_value

When adding the call to gen_vec_duplicate, I failed to notice that
code further down modified the VEC_DUPLICATE in place.  That isn't
safe if gen_vec_duplicate returned a const_vector.

2017-11-02  Richard Sandiford  <richard.sandiford@linaro.org>

gcc/
PR target/82809
* config/i386/i386.c (ix86_vector_duplicate_value): Use
gen_vec_duplicate after forcing the scalar into a register.

gcc/testsuite/
* gcc.dg/pr82809.c: New test.

From-SVN: r254366

7 years agocombine: Print insns we try to combine
Segher Boessenkool [Fri, 3 Nov 2017 00:19:06 +0000 (01:19 +0100)]
combine: Print insns we try to combine

This adds some extra debug info to the dump file for combine: print
the insns that are input to try_combine.  I was worried printing more
will make the dump file only harder to read, but especially the info
from the REG_DEAD notes is invaluable.

* combine (try_combine): Print the insns input to try_combine to the
dump file.

From-SVN: r254365

7 years agoDaily bump.
GCC Administrator [Fri, 3 Nov 2017 00:16:19 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r254364

7 years agore PR c++/81957 (ICE decltype)
Paolo Carlini [Fri, 3 Nov 2017 00:13:06 +0000 (00:13 +0000)]
re PR c++/81957 (ICE decltype)

/cp
2017-11-02  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/81957
* pt.c (make_pack_expansion): Add tsubst_flags_t parameter.
(expand_integer_pack, convert_template_argument, coerce_template_parms,
gen_elem_of_pack_expansion_instantiation, tsubst_pack_expansion,
unify): Adjust calls.
* tree.c (cp_build_qualified_type_real): Likewise.
* cp-tree.h (make_pack_expansion): Adjust declaration.

/testsuite
2017-11-02  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/81957
* g++.dg/cpp0x/variadic-crash5.C: New.

From-SVN: r254361

7 years agore PR target/79868 (aarch64: diagnostic "malformed target %s value" not translateable)
Steve Ellcey [Thu, 2 Nov 2017 21:58:05 +0000 (21:58 +0000)]
re PR target/79868 (aarch64: diagnostic "malformed target %s value" not translateable)

PR target/79868
* gcc.target/aarch64/spellcheck_1.c: Update dg-error string to match
new format.
* gcc.target/aarch64/spellcheck_2.c: Ditto.
* gcc.target/aarch64/spellcheck_3.c: Ditto.
* gcc.target/aarch64/target_attr_11.c: Ditto.
* gcc.target/aarch64/target_attr_12.c: Ditto.
* gcc.target/aarch64/target_attr_17.c: Ditto.

From-SVN: r254360

7 years agore PR target/79868 (aarch64: diagnostic "malformed target %s value" not translateable)
Steve Ellcey [Thu, 2 Nov 2017 21:56:00 +0000 (21:56 +0000)]
re PR target/79868 (aarch64: diagnostic "malformed target %s value" not translateable)

PR target/79868
* config/aarch64/aarch64-c.c (aarch64_pragma_target_parse):
Remove second argument from aarch64_process_target_attr call.
* config/aarch64/aarch64-protos.h (aarch64_process_target_attr):
Ditto.
* config/aarch64/aarch64.c (aarch64_attribute_info): Change
field type.
(aarch64_handle_attr_arch): Remove second argument.
(aarch64_handle_attr_cpu): Ditto.
(aarch64_handle_attr_tune): Ditto.
(aarch64_handle_attr_isa_flags): Ditto.
(aarch64_process_one_target_attr): Ditto.
(aarch64_process_target_attr): Ditto.
(aarch64_option_valid_attribute_p): Remove second argument.
on aarch64_process_target_attr call.

From-SVN: r254359

7 years agoAdd selftest for diagnostic_get_location_text
David Malcolm [Thu, 2 Nov 2017 20:13:18 +0000 (20:13 +0000)]
Add selftest for diagnostic_get_location_text

gcc/ChangeLog:
* diagnostic.c: Include "selftest-diagnostic.h".
(selftest::assert_location_text): New function.
(selftest::test_diagnostic_get_location_text): New function.
(selftest::diagnostic_c_tests): Call it.

From-SVN: r254355

7 years agoMove selftest::test_diagnostic_context to its own header
David Malcolm [Thu, 2 Nov 2017 20:09:18 +0000 (20:09 +0000)]
Move selftest::test_diagnostic_context to its own header

It's useful to not rely on global_dc in selftests, so this patch
moves class selftest::test_diagnostic_context from
diagnostic-show-locus.c to a new header and source file.

gcc/ChangeLog:
* Makefile.in (OBJS-libcommon): Add selftest-diagnostic.o.
* diagnostic-show-locus.c: Include "selftest-diagnostic.h".
(class selftest::test_diagnostic_context): Move to...
* selftest-diagnostic.c: New file.
* selftest-diagnostic.h: New file.

From-SVN: r254354

7 years agoAdd FT32B support
James Bowman [Thu, 2 Nov 2017 19:41:02 +0000 (19:41 +0000)]
Add FT32B support

FT32B is a new FT32 architecture type. FT32B has a code compression
scheme which uses linker relaxations. It also has a security option to
prevent reads from program memory.

gcc/
* config/ft32/ft32.c (ft32_addr_space_legitimate_address_p): increase
offset range for FT32B.
* config/ft32/ft32.h: option "mcompress" enables relaxation.
* config/ft32/ft32.md: Add TARGET_NOPM.
* config/ft32/ft32.opt: Add mft32b, mcompress, mnopm.
* gcc/doc/invoke.texi: Add mft32b, mcompress, mnopm.

From-SVN: r254351

7 years ago[C++ PATCH] overloaded operator fns [8/N]
Nathan Sidwell [Thu, 2 Nov 2017 18:29:26 +0000 (18:29 +0000)]
[C++ PATCH] overloaded operator fns [8/N]

https://gcc.gnu.org/ml/gcc-patches/2017-11/msg00095.html
* cp-tree.h (IDENTIFIER_NEWDEL_OP_P): Restore, adjust.
(IDENTIFIER_NEW_OP_P): New.
* decl.c (grokdeclarator): Restore IDENTIFIER_NEWDEL_OP_P use.
* pt.c (push_template_decl_real): Likewise.
* typeck.c (check_return_expr): Use IDENTIFIER_NEW_OP_P.

From-SVN: r254350

7 years ago[PR c++/82710] false positive paren warning
Nathan Sidwell [Thu, 2 Nov 2017 18:26:29 +0000 (18:26 +0000)]
[PR c++/82710] false positive paren warning

https://gcc.gnu.org/ml/gcc-patches/2017-11/msg00119.html
PR c++/82710
* decl.c (grokdeclarator): Don't warn when parens protect a return
type from a qualified name.

PR c++/82710
* g++.dg/warn/pr82710.C: New.

From-SVN: r254349

7 years agoDefine MALLOC_ABI_ALIGNMENT
Wilco Dijkstra [Thu, 2 Nov 2017 15:12:51 +0000 (15:12 +0000)]
Define MALLOC_ABI_ALIGNMENT

The AArch64 backend currently doesn't set MALLOC_ABI_ALIGNMENT, so
add this to enable alignment optimizations on malloc pointers.
Use the same value as STACK_BOUNDARY and BIGGEST_ALIGNMENT.

    gcc/
* config/aarch64/aarch64.h (MALLOC_ABI_ALIGNMENT): New define.

From-SVN: r254348

7 years agoMove testsuite entries to proper file
Eric Botcazou [Thu, 2 Nov 2017 14:59:59 +0000 (14:59 +0000)]
Move testsuite entries to proper file

From-SVN: r254346

7 years agogimple-ssa-sprintf.c (sprintf_dom_walker): Remove virtual keyword on FINAL OVERRIDE...
Jeff Law [Thu, 2 Nov 2017 14:54:58 +0000 (08:54 -0600)]
gimple-ssa-sprintf.c (sprintf_dom_walker): Remove virtual keyword on FINAL OVERRIDE members.

* gimple-ssa-sprintf.c (sprintf_dom_walker): Remove
virtual keyword on FINAL OVERRIDE members.

* tree-ssa-propagate.h (ssa_propagation_engine): Group
virtuals together.  Add virtual destructor.
(substitute_and_fold_engine): Similarly.

From-SVN: r254345

7 years agoRe: [PATCH] fix fdump-lang-raw ICE
Nathan Sidwell [Thu, 2 Nov 2017 14:10:12 +0000 (14:10 +0000)]
Re: [PATCH] fix fdump-lang-raw ICE

https://gcc.gnu.org/ml/gcc-patches/2017-11/msg00093.html
* g++.dg/lang-dump.C: New.

From-SVN: r254344

7 years ago* x86-tune.def (X86_TUNE_USE_INCDEC): Enable for Haswell+.
Jan Hubicka [Thu, 2 Nov 2017 13:49:31 +0000 (14:49 +0100)]
* x86-tune.def (X86_TUNE_USE_INCDEC): Enable for Haswell+.

From-SVN: r254343