gcc.git
6 years ago[nvptx] Add support for CUDA 9
Cesar Philippidis [Fri, 19 Jan 2018 14:21:08 +0000 (06:21 -0800)]
[nvptx] Add support for CUDA 9

PR target/83790

gcc/
* config/nvptx/nvptx.c (output_init_frag): Don't use generic address
spaces for function labels.

gcc/testsuite/
* gcc.target/nvptx/indirect_call.c: New test.

From-SVN: r256891

6 years agoFix missing g++.dg/torture/pr83619.C warning
Rainer Orth [Fri, 19 Jan 2018 14:04:52 +0000 (14:04 +0000)]
Fix missing g++.dg/torture/pr83619.C warning

* g++.dg/torture/pr83619.C: Remove dg-message.

From-SVN: r256890

6 years agoFix test-suite fallout.
Martin Liska [Fri, 19 Jan 2018 12:07:39 +0000 (13:07 +0100)]
Fix test-suite fallout.

2018-01-19  Martin Liska  <mliska@suse.cz>

* gcc.dg/predict-1.c: Adjust expected probability.
* gcc.dg/predict-3.c: Likewise.
* gcc.dg/predict-5.c: Likewise.
* gcc.dg/predict-6.c: Likewise.
* gcc.dg/predict-9.c: Likewise.

From-SVN: r256889

6 years agoAdjust predictor values according to SPEC2006 and SPEC2017.
Martin Liska [Fri, 19 Jan 2018 12:06:18 +0000 (13:06 +0100)]
Adjust predictor values according to SPEC2006 and SPEC2017.

2018-01-19  Martin Liska  <mliska@suse.cz>

* predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
(PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
(PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
(PRED_OPCODE_POSITIVE): Change from 64 to 59.
(PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
(PRED_CONST_RETURN): Change from 69 to 65.
(PRED_NULL_RETURN): Change from 91 to 71.
(PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
(PRED_LOOP_GUARD): Change from 66 to 73.

From-SVN: r256888

6 years agoIntroduce PROB_UNINITIALIZED constant and use it in predict.def.
Martin Liska [Fri, 19 Jan 2018 12:05:20 +0000 (13:05 +0100)]
Introduce PROB_UNINITIALIZED constant and use it in predict.def.

2018-01-19  Martin Liska  <mliska@suse.cz>

* predict.c (predict_insn_def): Add new assert.
(struct branch_predictor): Change type to signed integer.
(test_prediction_value_range): Amend test to cover
PROB_UNINITIALIZED.
* predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
(PRED_LOOP_ITERATIONS_GUESSED): Likewise.
(PRED_LOOP_ITERATIONS_MAX): Likewise.
(PRED_LOOP_IV_COMPARE): Likewise.
* predict.h (PROB_UNINITIALIZED): Define new constant.

From-SVN: r256887

6 years agoFix usage of analyze_brprob.py script.
Martin Liska [Fri, 19 Jan 2018 12:03:24 +0000 (13:03 +0100)]
Fix usage of analyze_brprob.py script.

2018-01-19  Martin Liska  <mliska@suse.cz>

* analyze_brprob.py: Support new format that can be easily
parsed. Add new column to report.
2018-01-19  Martin Liska  <mliska@suse.cz>

* predict.c (dump_prediction): Add new format for
analyze_brprob.py script which is enabled with -details
suboption.
* profile-count.h (precise_p): New function.

From-SVN: r256886

6 years agoCheck whether any statements need masking (PR 83922)
Richard Sandiford [Fri, 19 Jan 2018 11:57:47 +0000 (11:57 +0000)]
Check whether any statements need masking (PR 83922)

This PR is an odd case in which, due to the low optimisation level,
we enter vectorisation with:

  outer1:
    x_1 = PHI <x_3(outer2), ...>;
    ...

  inner:
    x_2 = 0;
    ...

  outer2:
    x_3 = PHI <x_2(inner)>;

These statements are tentatively treated as a double reduction by
vect_force_simple_reduction, but in the end only x_3 and x_2 are marked
as relevant.  vect_analyze_loop_operations skips over x_3, leaving the
vectorizable_reduction check to a presumed future test of x_1, which
in this case never happens.  We therefore end up vectorising x_2 only
(complete with peeling for niters!) and leave the scalar x_3 in place.

This caused a segfault in the support for fully-masked loops,
since there were no statements that needed masking.  Fixed by
checking for that.

But I think this is also a flaw in vect_analyze_loop_operations.
Outer loop vectorisation reduces the number of times that the
inner loop is executed, so it wouldn't necessarily be valid
to leave the scalar x_3 in place for all vectorisable x_2.
There's already code to forbid that when x_1 isn't present:

              /* FORNOW: we currently don't support the case that these phis
                 are not used in the outerloop (unless it is double reduction,
                 i.e., this phi is vect_reduction_def), cause this case
                 requires to actually do something here.  */

I think we need to do the same if x_1 is present but not relevant.

2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>

gcc/
PR tree-optimization/83922
* tree-vect-loop.c (vect_verify_full_masking): Return false if
there are no statements that need masking.
(vect_active_double_reduction_p): New function.
(vect_analyze_loop_operations): Use it when handling phis that
are not in the loop header.

gcc/testsuite/
PR tree-optimization/83922
* gcc.dg/pr83922.c: New test.

From-SVN: r256885

6 years agoAvoid ICE for nested inductions (PR 83914)
Richard Sandiford [Fri, 19 Jan 2018 11:57:34 +0000 (11:57 +0000)]
Avoid ICE for nested inductions (PR 83914)

This testcase ICEd because we converted the initial value of an
induction to the vector element type even for nested inductions.
This isn't necessary because the initial expression is vectorised
normally, and it meant that init_expr was no longer the original
statement operand by the time we called vect_get_vec_def_for_operand.

Also, adding the conversion code here made the existing SLP conversion
redundant.

2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>

gcc/
PR tree-optimization/83914
* tree-vect-loop.c (vectorizable_induction): Don't convert
init_expr or apply the peeling adjustment for inductions
that are nested within the vectorized loop.

gcc/testsuite/
PR tree-optimization/83914
* gcc.dg/vect/pr83914.c: New test.

From-SVN: r256884

6 years ago[arm] Fix gcc.target/arm/negdi-[12].c
Kyrylo Tkachov [Fri, 19 Jan 2018 10:41:57 +0000 (10:41 +0000)]
[arm] Fix gcc.target/arm/negdi-[12].c

These tests are failing for a silly reason. They scan for an occurrence of the NEGS instruction.
NEGS (and NEG in general) is a pre-UAL alias of RSB with an immediate of 0 and we only emit it
in one pattern: *thumb2_negsi2_short in thumb2.md. In all other instances of negation we emit
the modern RSB mnemonic. This causes needless differences in assembly output.
For example, for these testcases we emit NEG when compiling for -march=armv7-a, but for armv7ve
we emit RSB, causing the scan-assembler tests to fail.

This patch updates the *thumb2_negsi2_short pattern to use the RSB mnemonic and
fixes the flaky scan-assembler directives.

These tests now pass for my compiler configured with:
--with-cpu=cortex-a15 --with-fpu=neon-vfpv4 --with-float=hard --with-mode=thumb

Bootstrapped and tested on arm-none-linux-gnueabihf as well.

* config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
instead of NEG.

* gcc.target/arm/negdi-1.c: Remove bogus assembler scan for negs.
* gcc.target/arm/negdi-2.c: Likewise.
* gcc.target/arm/thumb-16bit-ops.c: Replace scan for NEGS with RSBS.
--This line,gand those below, will be ignored--

M    gcc/config/arm/thumb2.md
M    gcc/ChangeLog
M    gcc/testsuite/gcc.target/arm/thumb-16bit-ops.c
M    gcc/testsuite/gcc.target/arm/negdi-1.c
M    gcc/testsuite/gcc.target/arm/negdi-2.c
M    gcc/testsuite/ChangeLog

From-SVN: r256881

6 years ago[arm] Fix gcc.target/arm/pr40956.c
Kyrylo Tkachov [Fri, 19 Jan 2018 10:26:53 +0000 (10:26 +0000)]
[arm] Fix gcc.target/arm/pr40956.c

The scan-assembler tests here check for MOVS for Thumb1 and MOV for Thumb2,
but in fact there's no reason why we wouldn't generate MOVS for Thumb2 as well,
it really depends on a lot of optimisation decisions.
The only behaviour we want to test is that we move a 0 constant into a register
only once, which can be achieved with either MOV or MOVS.
Simplify the check by always checking for either MOV or MOVS.

      * gcc.target/arm/pr40956.c: Adjust scan-assembler pattern.

From-SVN: r256880

6 years ago[libstdc++][testsuite] Fix dg-options/dg-add-options order
Christophe Lyon [Fri, 19 Jan 2018 10:17:34 +0000 (10:17 +0000)]
[libstdc++][testsuite] Fix dg-options/dg-add-options order

2018-01-19  Christophe Lyon  <christophe.lyon@linaro.org>

* testsuite/ext/special_functions/airy_ai/check_nan.cc: Fix
          dg-options and dg-add-options order.
* testsuite/ext/special_functions/airy_bi/check_nan.cc: Likewise.
* testsuite/ext/special_functions/conf_hyperg/check_nan.cc:
Likewise.
* testsuite/ext/special_functions/hyperg/check_nan.cc: Likewise.
* testsuite/special_functions/01_assoc_laguerre/check_nan.cc:
Likewise.
* testsuite/special_functions/02_assoc_legendre/check_nan.cc:
Likewise.
* testsuite/special_functions/03_beta/check_nan.cc: Likewise.
* testsuite/special_functions/04_comp_ellint_1/check_nan.cc:
Likewise.
* testsuite/special_functions/05_comp_ellint_2/check_nan.cc:
Likewise.
* testsuite/special_functions/06_comp_ellint_3/check_nan.cc:
Likewise.
* testsuite/special_functions/06_comp_ellint_3/pr66689.cc:
Likewise.
* testsuite/special_functions/07_cyl_bessel_i/check_nan.cc:
Likewise.
* testsuite/special_functions/08_cyl_bessel_j/check_nan.cc:
Likewise.
* testsuite/special_functions/09_cyl_bessel_k/check_nan.cc:
Likewise.
* testsuite/special_functions/10_cyl_neumann/check_nan.cc:
Likewise.
* testsuite/special_functions/11_ellint_1/check_nan.cc: Likewise.
* testsuite/special_functions/12_ellint_2/check_nan.cc: Likewise.
* testsuite/special_functions/13_ellint_3/check_nan.cc: Likewise.
* testsuite/special_functions/13_ellint_3/pr66689.cc: Likewise.
* testsuite/special_functions/14_expint/check_nan.cc: Likewise.
* testsuite/special_functions/15_hermite/check_nan.cc: Likewise.
* testsuite/special_functions/16_laguerre/check_nan.cc: Likewise.
* testsuite/special_functions/17_legendre/check_nan.cc: Likewise.
* testsuite/special_functions/18_riemann_zeta/check_nan.cc:
Likewise.
* testsuite/special_functions/19_sph_bessel/check_nan.cc:
Likewise.
* testsuite/special_functions/20_sph_legendre/check_nan.cc:
Likewise.
* testsuite/special_functions/21_sph_neumann/check_nan.cc:
Likewise.

From-SVN: r256879

6 years ago[arm] Fix gcc.target/arm/pr79058.c
Kyrylo Tkachov [Fri, 19 Jan 2018 09:58:37 +0000 (09:58 +0000)]
[arm] Fix gcc.target/arm/pr79058.c

This testcase tests 32-bit ARM state functionality, so add the -marm to make it explicit
as well as to avoid Thumb1 hard-float errors for certain toolchain configurations.

     * gcc.target/arm/pr79058.c: Add arm_arm_ok check and -marm to options.

From-SVN: r256878

6 years agomksysinfo: use rlimit64 if available when we use getrlimit64
Ian Lance Taylor [Fri, 19 Jan 2018 05:09:43 +0000 (05:09 +0000)]
mksysinfo: use rlimit64 if available when we use getrlimit64

    This makes no difference on most systems, because <sys/resource.h>
    renames the type appropriately anyhow, but apparently it makes a
    difference on AIX.

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

From-SVN: r256877

6 years agoMakefile.am (GOTOOLS_TEST_TIMEOUT): Define.
Ian Lance Taylor [Fri, 19 Jan 2018 05:04:51 +0000 (05:04 +0000)]
Makefile.am (GOTOOLS_TEST_TIMEOUT): Define.

* Makefile.am (GOTOOLS_TEST_TIMEOUT): Define.
(check-go-tool): Pass -test.timeout with GOTOOLS_TEST_TIMEOUT.
(check-cgo-test, check-carchive-test, check-vet): Likewise.
* Makefile.in: Rebuild.

From-SVN: r256876

6 years agomksysinfo: force Passwd.Pw_[ug]id from int32 to uint32
Ian Lance Taylor [Fri, 19 Jan 2018 04:52:12 +0000 (04:52 +0000)]
mksysinfo: force Passwd.Pw_[ug]id from int32 to uint32

    Solaris 10 uses int32 for the Pw_uid and Pw_gid fields of Passwd,
    but most systems, including Solaris 11, use uint32.  Force uint32
    for consistency and to fix the build.

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

From-SVN: r256875

6 years agoruntime: no escape for some functions on AIX
Ian Lance Taylor [Fri, 19 Jan 2018 04:48:51 +0000 (04:48 +0000)]
runtime: no escape for some functions on AIX

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

From-SVN: r256874

6 years agocmd/go: recognize AIX objects and archives
Ian Lance Taylor [Fri, 19 Jan 2018 04:27:38 +0000 (04:27 +0000)]
cmd/go: recognize AIX objects and archives

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

From-SVN: r256873

6 years agoruntime: add go:noescape declaration for Solaris
Ian Lance Taylor [Fri, 19 Jan 2018 04:09:55 +0000 (04:09 +0000)]
runtime: add go:noescape declaration for Solaris

    Patch by Rainer Orth.

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

From-SVN: r256872

6 years agopr52451.c (main): Skip long double test on hppa*-*-hpux*.
John David Anglin [Fri, 19 Jan 2018 00:22:33 +0000 (00:22 +0000)]
pr52451.c (main): Skip long double test on hppa*-*-hpux*.

* gcc.dg/torture/pr52451.c (main): Skip long double test on
hppa*-*-hpux*.

From-SVN: r256871

6 years agoDaily bump.
GCC Administrator [Fri, 19 Jan 2018 00:16:14 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r256870

6 years agore PR ipa/83619 (ICE in inliner: caller edge count does not match BB count)
Jakub Jelinek [Thu, 18 Jan 2018 23:39:26 +0000 (00:39 +0100)]
re PR ipa/83619 (ICE in inliner: caller edge count does not match BB count)

PR ipa/83619
PR testsuite/83934
* g++.dg/torture/pr83619.C (e): Define before first use instead of
forward declaration.

From-SVN: r256867

6 years agoFix template/inherit4.C.
Jason Merrill [Thu, 18 Jan 2018 22:15:32 +0000 (17:15 -0500)]
Fix template/inherit4.C.

PR c++/83714
* search.c (any_dependent_bases_p): Handle null TREE_BINFO.
* pt.c (instantiation_dependent_scope_ref_p): True if
any_dependent_bases_p.

From-SVN: r256866

6 years agocp-tree.h: Fix comment typo (DECL_NON_TRIVIALLY_INITIALIZED_P vs...
Paolo Carlini [Thu, 18 Jan 2018 20:56:08 +0000 (20:56 +0000)]
cp-tree.h: Fix comment typo (DECL_NON_TRIVIALLY_INITIALIZED_P vs...

2018-01-18  Paolo Carlini  <paolo.carlini@oracle.com>

* cp-tree.h: Fix comment typo (DECL_NON_TRIVIALLY_INITIALIZED_P
vs DECL_NONTRIVIALLY_INITIALIZED_P).

From-SVN: r256865

6 years agobuiltins-6.h (foo): Add missing closing bracket to the function.
Carl Love [Thu, 18 Jan 2018 20:38:41 +0000 (20:38 +0000)]
builtins-6.h (foo): Add missing closing bracket to the function.

gcc/testsuite/ChangeLog:

2018-01-18  Carl Love  <cel@us.ibm.com>
* gcc.target/powerpc/builtins-6.h (foo): Add missing closing bracket
to the function.

From-SVN: r256864

6 years agore PR sanitizer/81715 (asan-stack=1 redzone allocation is too inflexible)
Jakub Jelinek [Thu, 18 Jan 2018 20:30:33 +0000 (21:30 +0100)]
re PR sanitizer/81715 (asan-stack=1 redzone allocation is too inflexible)

PR sanitizer/81715
PR testsuite/83882
* function.h (gimplify_parameters): Add gimple_seq * argument.
* function.c: Include gimple.h and options.h.
(gimplify_parameters): Add cleanup argument, add CLOBBER stmts
for the added local temporaries if needed.
* gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
if there are any parameter cleanups, wrap whole body into a
try/finally with the cleanups.

From-SVN: r256861

6 years agoPR c++/82461 - constexpr list-initialized member
Jason Merrill [Thu, 18 Jan 2018 20:02:06 +0000 (15:02 -0500)]
PR c++/82461 - constexpr list-initialized member

* constexpr.c (potential_constant_expression_1): Check
TARGET_EXPR_DIRECT_INIT_P.

From-SVN: r256860

6 years agoconfigure.ac (AC_CHECK_HEADERS): Add linux/types.h.
Uros Bizjak [Thu, 18 Jan 2018 19:52:16 +0000 (20:52 +0100)]
configure.ac (AC_CHECK_HEADERS): Add linux/types.h.

* configure.ac (AC_CHECK_HEADERS): Add linux/types.h.  Conditionally
include linux/types.h when checking linux/random.h header.
* config.h.in: Regenerate.
* configure: Ditto.
* src/c++11/random.cc: Conditionally include linux/types.h.

From-SVN: r256859

6 years agore PR c++/81013 (ICE with invalid union in class hierarchy)
Paolo Carlini [Thu, 18 Jan 2018 17:11:43 +0000 (17:11 +0000)]
re PR c++/81013 (ICE with invalid union in class hierarchy)

/cp
2018-01-18  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/81013
* decl.c (xref_basetypes): Early return upon error about derived
union.

/testsuite
2018-01-18  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/81013
* g++.dg/inherit/union3.C: New.

From-SVN: r256856

6 years ago[AArch64] Fix fp16 test failures after PR82964 fix
Wilco Dijkstra [Thu, 18 Jan 2018 16:37:44 +0000 (16:37 +0000)]
[AArch64] Fix fp16 test failures after PR82964 fix

This fixes test failures in gcc.target/aarch64/f16_mov_immediate_*.c
after fixing PR82964.  The check for a scalar floating point constant
didn't include 16-bit floating point modes, so use GET_MODE_CLASS
instead.

    gcc/
PR target/82964
* config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
Use GET_MODE_CLASS for scalar floating point.

From-SVN: r256854

6 years agore PR ipa/82256 (clones created by create_version_clone_with_body are not observable...
Jan Hubicka [Thu, 18 Jan 2018 16:26:54 +0000 (17:26 +0100)]
re PR ipa/82256 (clones created by create_version_clone_with_body are not observable to insertion hooks)

PR ipa/82256
patch by PaX Team
* cgraphclones.c (cgraph_node::create_version_clone_with_body):
Fix call of call_cgraph_insertion_hooks.

From-SVN: r256853

6 years agoBe clear about virtual table pointer corruptuion rather than the vtable itself.
Martin Sebor [Thu, 18 Jan 2018 16:26:14 +0000 (16:26 +0000)]
Be clear about virtual table pointer corruptuion rather than the vtable itself.

From-SVN: r256852

6 years ago[arm] Enable gcc.dg/rtl/arm/stl-cond.c on armeb.
Christophe Lyon [Thu, 18 Jan 2018 16:14:31 +0000 (16:14 +0000)]
[arm] Enable gcc.dg/rtl/arm/stl-cond.c on armeb.

2018-01-18  Christophe Lyon <christophe.lyon@linaro.org>

* gcc.dg/rtl/arm/stl-cond.c: Enable on arm*.

From-SVN: r256851

6 years agore PR ipa/83619 (ICE in inliner: caller edge count does not match BB count)
Jan Hubicka [Thu, 18 Jan 2018 15:57:48 +0000 (16:57 +0100)]
re PR ipa/83619 (ICE in inliner: caller edge count does not match BB count)

PR ipa/83619
* g++.dg/torture/pr83619.C: New testcase.
* cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
frequencies.

From-SVN: r256850

6 years ago[ARM,testsuite] Make arm_arch_FUNC_ok more robust
Christophe Lyon [Thu, 18 Jan 2018 14:54:41 +0000 (14:54 +0000)]
[ARM,testsuite] Make arm_arch_FUNC_ok more robust

2018-01-18  Christophe Lyon <christophe.lyon@linaro.org>

* lib/target-supports.exp (check_effective_target_arm_arch_FUNC_ok):
Add function body to force error messages in some configurations.

From-SVN: r256849

6 years ago[arm] Fix gcc.target/arm/pr70278.c
Kyrylo Tkachov [Thu, 18 Jan 2018 14:26:02 +0000 (14:26 +0000)]
[arm] Fix gcc.target/arm/pr70278.c

This test needs an armv4t Thumb1 target but doesn't add the right effective target checks.
This patch adds them so the test is skipped appropriately on Thumb2 hard-float tarets.

     * gcc.target/arm/pr70278.c: Add effective target checks for armv4t
     and arm_thumb1_ok.

From-SVN: r256848

6 years agoAdd ability to remap file names in __FILE__, etc (PR other/70268)
Boris Kolpackov [Thu, 18 Jan 2018 13:17:37 +0000 (13:17 +0000)]
Add ability to remap file names in __FILE__, etc (PR other/70268)

This commit adds the -fmacro-prefix-map option that allows remapping of file
names in __FILE__, __BASE_FILE__, and __builtin_FILE(), similar to how
-fdebug-prefix-map allows to do the same for debug information.

Additionally, it adds -ffile-prefix-map which can be used to specify both
mappings with a single option (and, should we need to add more -f*-prefix-map
options in the future, those as well).

libcpp/ChangeLog:

2018-01-18  Boris Kolpackov  <boris@codesynthesis.com>

        PR other/70268
        * include/cpplib.h (cpp_callbacks::remap_filename): New callback.
        * libcpp/macro.c (_cpp_builtin_macro_text): Call remap_filename for
        __FILE__ and __BASE_FILE__.

gcc/ChangeLog:

2018-01-18  Boris Kolpackov  <boris@codesynthesis.com>

        PR other/70268
        * common.opt: (-ffile-prefix-map): New option.
        * opts.c (common_handle_option): Defer it.
        * opts-global.c (handle_common_deferred_options): Handle it.
        * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
        * file-prefix-map.h: New file.
        (remap_debug_filename, add_debug_prefix_map): ...here.
        (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
        * final.c (debug_prefix_map, add_debug_prefix_map
        remap_debug_filename): Move to...
        * file-prefix-map.c: New file.
        (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
        generalize, get rid of alloca(), use strrchr() instead of strchr().
        (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
        Implement in terms of add_prefix_map().
        (remap_macro_filename, remap_debug_filename): Implement in term of
        remap_filename().
        * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
        * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
        * dbxout.c: Include file-prefix-map.h.
        * varasm.c: Likewise.
        * vmsdbgout.c: Likewise.
        * xcoffout.c: Likewise.
        * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
        * doc/cppopts.texi (-fmacro-prefix-map): Document.
        * doc/invoke.texi (-ffile-prefix-map): Document.
(-fdebug-prefix-map): Update description.

gcc/c-family/ChangeLog:

2018-01-18  Boris Kolpackov  <boris@codesynthesis.com>

        PR other/70268
        * c-family/c.opt (-fmacro-prefix-map): New option.
        * c-family/c-opts.c (c_common_handle_option): Handle it.
        * c-family/c-lex.c (init_c_lex): Set remap_filename cpp callback.
        * c-family/c-ppoutput.c (init_pp_output): Likewise.

gcc/testsuite/ChangeLog:

2018-01-18  Boris Kolpackov  <boris@codesynthesis.com>

        PR other/70268
        * c-c++-common/ffile-prefix-map.c: New test.
        * c-c++-common/fmacro-prefix-map.c: New test.
        * c-c++-common/cpp/ffile-prefix-map.c: New test.
        * c-c++-common/cpp/fmacro-prefix-map.c: New test.

From-SVN: r256847

6 years agoSmall retpoline clean-up.
Martin Liska [Thu, 18 Jan 2018 13:13:23 +0000 (14:13 +0100)]
Small retpoline clean-up.

2018-01-18  Martin Liska  <mliska@suse.cz>

* config/i386/i386.c (indirect_thunk_name): Document that also
lfence is emitted.
(output_indirect_thunk): Document why both instructions
(pause and lfence) are generated.
2018-01-18  Martin Liska  <mliska@suse.cz>

* gcc.target/i386/indirect-thunk-3.c: Remove duplicate options.
* gcc.target/i386/indirect-thunk-4.c: Likewise.
* gcc.target/i386/indirect-thunk-6.c: Likewise.
* gcc.target/i386/indirect-thunk-bnd-4.c: Likewise.
* gcc.target/i386/ret-thunk-10.c: Likewise.
* gcc.target/i386/ret-thunk-11.c: Likewise.
* gcc.target/i386/ret-thunk-12.c: Likewise.
* gcc.target/i386/ret-thunk-15.c: Likewise.
* gcc.target/i386/ret-thunk-9.c: Likewise.

From-SVN: r256846

6 years ago[arm] Fix gcc.target/arm/xor-and.c
Christophe Lyon [Thu, 18 Jan 2018 13:04:04 +0000 (13:04 +0000)]
[arm] Fix gcc.target/arm/xor-and.c

2018-01-18  Christophe Lyon  <christophe.lyon@linaro.org>

* gcc.target/arm/xor-and.c: Fix dg-options and dg-add-options
order.

From-SVN: r256845

6 years agoAdd Boris Kolpackov <boris@codesynthesis.com> to MAINTAINERS
Boris Kolpackov [Thu, 18 Jan 2018 12:36:31 +0000 (12:36 +0000)]
Add Boris Kolpackov <boris@codesynthesis.com> to MAINTAINERS

From-SVN: r256844

6 years agoPR c++/83160] local ref to capture
Nathan Sidwell [Thu, 18 Jan 2018 11:53:50 +0000 (11:53 +0000)]
PR c++/83160] local ref to capture

https://gcc.gnu.org/ml/gcc-patches/2018-01/msg01638.html
PR c++/83160
* cp-tree.h (mark_use): Declare.
* expr.c (mark_use): Make extern.
* call.c (direct_reference_binding): Set inner conv's
rvaluedness_matches_p, if it is an identity.
(convert_like_real): Mark lvalue or rvalue use for identity as
rvaledness_matches_p demands.

PR c++/83160
* g++.dg/cpp0x/pr83160.C: New.

From-SVN: r256842

6 years agore PR tree-optimization/83887 ([graphite] ICE in verify_dominators, at dominance...
Richard Biener [Thu, 18 Jan 2018 10:59:33 +0000 (10:59 +0000)]
re PR tree-optimization/83887 ([graphite] ICE in verify_dominators, at dominance.c:1184 (error: dominator of 3 should be 21, not 18))

2018-01-18  Richard Biener  <rguenther@suse.de>

PR tree-optimization/83887
* graphite-scop-detection.c
(scop_detection::get_nearest_dom_with_single_entry): Remove.
(scop_detection::get_nearest_pdom_with_single_exit): Likewise.
(scop_detection::merge_sese): Re-implement with a flood-fill
algorithm that properly finds a SESE region if it exists.

* gcc.dg/graphite/pr83887.c: New testcase.
* gfortran.dg/graphite/pr83887.f90: Likewise.
* gfortran.dg/graphite/pr83887.f: Likewise.

From-SVN: r256841

6 years ago[arm] PR target/65578: Fix builtin-bswap16-1.c and builtin-bswap-1.c
Kyrylo Tkachov [Thu, 18 Jan 2018 09:30:58 +0000 (09:30 +0000)]
[arm] PR target/65578: Fix builtin-bswap16-1.c and builtin-bswap-1.c

The builtin-bswap-1.c and builtin-bswap16-1.c are pretty annoying at the moment.
They force an explicit armv6 option that is a thumb1 target, so if you're testing a toolchain
configured with something like --with-cpu=cortex-a15 --with-float=hard --with-mode=thumb
you'll get those pesky errors about Thumb1 hard-float not being implemented, even though
the tests don't relate to floating-point functionality at all. I *think* this is also due
to the wrong order of dg-options and dg-require-effective-target directives that might
end up not doing a proper effective target check.

The solution in this patch is to commonise the code and create a couple of tests for each.
One tests an armv6t2 target. This allows us to test an ARM or a Thumb2 target.
The second one sets an armv6-m target, which is a Thumb1 target.
The dg-add-options machinery for arm_arch_v6m knows how to add the right -mfloat-abi=soft option.

With this patch we end up testing all of ARM, Thumb1, Thumb2 codegen whereas before we only
ever tried testing Thumb1, if the multilib options happened to line up just right, and would
give an ugly error otherwise.  Now, if the multilib options don't allow the test it should just
appear as UNSUPPORTED.

PR target/65578
* gcc.target/arm/builtin-bswap.x: New file.
* gcc.target/arm/builtin-bswap-1.c: Include the above.  Add checks
and options for armv6t2.
* gcc.target/arm/builtin-bswap-2.c: Include the above.  Add checks
and options for Thumb1.
* gcc.target/arm/builtin-bswap16.x: New file.
* gcc.target/arm/builtin-bswap16-1.c: Include the above.  Add checks
and options for armv6t2.
* gcc.target/arm/builtin-bswap16-2.c: Include the above.  Add checks
and options for Thumb1.

From-SVN: r256840

6 years ago[arm] Fix gcc.target/arm/pr40887.c directives
Christophe Lyon [Thu, 18 Jan 2018 09:13:27 +0000 (09:13 +0000)]
[arm] Fix gcc.target/arm/pr40887.c directives

2018-01-18  Christophe Lyon  <christophe.lyon@linaro.org>

* gcc.target/arm/pr40887.c: Fix dg-options and dg-add-options
order.

From-SVN: r256839

6 years agore PR c/61240 (Incorrect warning "integer overflow in expression" on pointer-pointer...
Jakub Jelinek [Thu, 18 Jan 2018 08:29:14 +0000 (09:29 +0100)]
re PR c/61240 (Incorrect warning "integer overflow in expression" on pointer-pointer subtraction)

PR c/61240
* match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
pointer_diff optimizations use view_convert instead of convert.

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

From-SVN: r256838

6 years agore PR fortran/83864 (ICE in gfc_apply_init, at fortran/expr.c:4271)
Harald Anlauf [Thu, 18 Jan 2018 07:54:17 +0000 (07:54 +0000)]
re PR fortran/83864 (ICE in gfc_apply_init, at fortran/expr.c:4271)

2018-01-17  Harald Anlauf  <anlauf@gmx.de>

PR fortran/83864
* expr.c (add_init_expr_to_sym): Do not dereference NULL pointer.

2018-01-17  Harald Anlauf  <anlauf@gmx.de>

PR fortran/83864
* gfortran.dg/pr83864.f90: New test.

From-SVN: r256837

6 years agoAdd myself to the MAINTAINERS file
Siddhesh Poyarekar [Thu, 18 Jan 2018 06:58:52 +0000 (06:58 +0000)]
Add myself to the MAINTAINERS file

* MAINTAINERS (write after approval): Add myself.

From-SVN: r256836

6 years agore PR go/83787 (Many 32-bit Solaris/SPARC Go tests FAIL after Go1.10beta1 update)
Ian Lance Taylor [Thu, 18 Jan 2018 04:24:48 +0000 (04:24 +0000)]
re PR go/83787 (Many 32-bit Solaris/SPARC Go tests FAIL after Go1.10beta1 update)

PR go/83787
    compiler: pass int to makechan, call makechan64 when appropriate

    The update to 1.10beta1 changed makechan to take int instead of int64,
    and added a makechan64 call for large values.  Since the size is the
    last argument to makechan, the old compiler which always passed a
    64-bit int worked fine on 64-bit systems and little-endian 32-bit
    systems, but broke on big-endian 32-bit systems.  This CL fixes the
    compiler to use the appropriate types.

    This fixes GCC PR 83787.

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

From-SVN: r256835

6 years agore PR testsuite/83883 (FAIL: gcc.dg/tree-ssa/ssa-dse-26.c scan-tree-dump-times dse1...
Jeff Law [Thu, 18 Jan 2018 04:05:27 +0000 (21:05 -0700)]
re PR testsuite/83883 (FAIL: gcc.dg/tree-ssa/ssa-dse-26.c scan-tree-dump-times dse1 "Deleted dead store" 2 (found 4 times))

PR testsuite/83883
* gcc.dg/tree-ssa/ssa-dse-26.c: Tighten expected output.

From-SVN: r256833

6 years agors6000.md (*call_indirect_nonlocal_sysv<mode>): Generate different code for -mno...
Bill Schmidt [Thu, 18 Jan 2018 01:21:50 +0000 (01:21 +0000)]
rs6000.md (*call_indirect_nonlocal_sysv<mode>): Generate different code for -mno-speculate-indirect-jumps.

[gcc]

2018-01-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

* config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
Generate different code for -mno-speculate-indirect-jumps.
(*call_value_indirect_nonlocal_sysv<mode>): Likewise.
(*call_indirect_aix<mode>): Disable for
-mno-speculate-indirect-jumps.
(*call_indirect_aix<mode>_nospec): New define_insn.
(*call_value_indirect_aix<mode>): Disable for
-mno-speculate-indirect-jumps.
(*call_value_indirect_aix<mode>_nospec): New define_insn.
(*sibcall_nonlocal_sysv<mode>): Generate different code for
-mno-speculate-indirect-jumps.
(*sibcall_value_nonlocal_sysv<mode>): Likewise.

[gcc/testsuite]

2018-01-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

* gcc.target/powerpc/safe-indirect-jump-1.c: Remove endian
restriction, but still restrict to 64-bit.
* gcc.target/powerpc/safe-indirect-jump-7.c: New file.
* gcc.target/powerpc/safe-indirect-jump-8.c: New file.

From-SVN: r256831

6 years agoDaily bump.
GCC Administrator [Thu, 18 Jan 2018 00:16:22 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r256827

6 years agore PR fortran/83874 (ICE initializing character array from derived type)
Harald Anlauf [Wed, 17 Jan 2018 23:50:02 +0000 (23:50 +0000)]
re PR fortran/83874 (ICE initializing character array from derived type)

2018-01-17  Harald Anlauf  <anlauf@gmx.de>

PR fortran/83874
* decl.c (add_init_expr_to_sym): Do not dereference NULL pointer.

2018-01-17  Harald Anlauf  <anlauf@gmx.de>

PR fortran/83874
* gfortran.dg/pr83874.f90: New test.

From-SVN: r256824

6 years agore PR c++/83824 (ICE on invalid C++ code with alignas: in chainon, at tree.c:3037)
Jakub Jelinek [Wed, 17 Jan 2018 23:42:36 +0000 (00:42 +0100)]
re PR c++/83824 (ICE on invalid C++ code with alignas: in chainon, at tree.c:3037)

PR c++/83824
* parser.c (attr_chainon): New function.
(cp_parser_label_for_labeled_statement, cp_parser_decl_specifier_seq,
cp_parser_namespace_definition, cp_parser_init_declarator,
cp_parser_type_specifier_seq, cp_parser_parameter_declaration,
cp_parser_gnu_attributes_opt): Use it.
(cp_parser_member_declaration, cp_parser_objc_class_ivars,
cp_parser_objc_struct_declaration): Likewise.  Don't reset
prefix_attributes if attributes is error_mark_node.

* g++.dg/cpp0x/pr83824.C: New test.

From-SVN: r256823

6 years agors6000.c (rs6000_emit_move): If we load or store a long double type...
Michael Meissner [Wed, 17 Jan 2018 23:16:03 +0000 (23:16 +0000)]
rs6000.c (rs6000_emit_move): If we load or store a long double type...

[gcc]
2018-01-17  Michael Meissner  <meissner@linux.vnet.ibm.com>

* config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
long double type, set the flags for noting the default long double
type, even if we don't pass or return a long double type.

[gcc/testsuite]
2018-01-17  Michael Meissner  <meissner@linux.vnet.ibm.com>

* gcc.target/powerpc/gnuattr1.c: New test to make sure we set the
appropriate .gnu_attribute for the long double type, if we use the
long double type, but do not generate any calls.
* gcc.target/powerpc/gnuattr2.c: Likewise.
* gcc.target/powerpc/gnuattr3.c: Likewise.

From-SVN: r256822

6 years agore PR c++/78344 (ICE on invalid c++ code on x86_64-linux-gnu (internal compiler error...
Paolo Carlini [Wed, 17 Jan 2018 21:29:59 +0000 (21:29 +0000)]
re PR c++/78344 (ICE on invalid c++ code on x86_64-linux-gnu (internal compiler error: tree check: expected tree_list, have error_mark in cp_check_const_attributes, at cp/decl2.c:1347))

/cp
2018-01-17  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/78344
* decl.c (grokdeclarator): Do not append the error_mark_node
due to an erroneous optional attribute-specifier-seq.

/testsuite
2018-01-17  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/78344
* g++.dg/cpp0x/alignas13.C: New.

From-SVN: r256821

6 years agocompiler: enable escape analysis for runtime
Ian Lance Taylor [Wed, 17 Jan 2018 21:24:41 +0000 (21:24 +0000)]
compiler: enable escape analysis for runtime

    The runtime package was hard-coded non-escape, and the escape
    analysis was not run for the runtime package. This CL removes
    the hard-code, and lets the escape analysis decide. It is not
    allowed for local variables and closures in the runtime to be
    heap allocated. This CL adds the check that make sure that they
    indeed do not escape.

    The escape analysis is always run when compiling the runtime
    now.

    Fixes golang/go#17431

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

From-SVN: r256820

6 years agore PR c++/83897 (Useless __builtin_unreachable () emitted by the C++ FE)
Jakub Jelinek [Wed, 17 Jan 2018 21:08:36 +0000 (22:08 +0100)]
re PR c++/83897 (Useless __builtin_unreachable () emitted by the C++ FE)

PR c++/83897
* cp-gimplify.c (cp_maybe_instrument_return): Handle
CLEANUP_POINT_EXPR.

* g++.dg/cpp0x/pr83897.C: New test.

From-SVN: r256819

6 years agore PR ipa/83051 (ICE on valid code at -O3: in edge_badness, at ipa-inline.c:1024)
Jan Hubicka [Wed, 17 Jan 2018 20:40:46 +0000 (21:40 +0100)]
re PR ipa/83051 (ICE on valid code at -O3: in edge_badness, at ipa-inline.c:1024)

PR ipa/83051
* ipa-inline.c (flatten_function): Do not overwrite final inlining
failure.
* gcc.c-torture/compile/pr83051-2.c: New testcase.

From-SVN: r256818

6 years agore PR c++/81054 (ICE with volatile variable in constexpr function)
Paolo Carlini [Wed, 17 Jan 2018 20:29:25 +0000 (20:29 +0000)]
re PR c++/81054 (ICE with volatile variable in constexpr function)

/cp
2018-01-17  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/81054
* constexpr.c (ensure_literal_type_for_constexpr_object): Return
error_mark_node when we give an error.
* decl.c (cp_finish_decl): Use the latter.

/testsuite
2018-01-17  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/81054
* g++.dg/cpp0x/constexpr-ice19.C: New.

From-SVN: r256817

6 years agore PR c++/81054 (ICE with volatile variable in constexpr function)
Paolo Carlini [Wed, 17 Jan 2018 20:28:47 +0000 (20:28 +0000)]
re PR c++/81054 (ICE with volatile variable in constexpr function)

/cp
2018-01-17  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/81054
* constexpr.c (ensure_literal_type_for_constexpr_object): Return
error_mark_node when we give an error.
* decl.c (cp_finish_decl): Use the latter.

/testsuite
2018-01-17  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/81054
* g++.dg/cpp0x/constexpr-ice19.C: New.

From-SVN: r256816

6 years agofold-vec-mergehl-char.c: New.
Will Schmidt [Wed, 17 Jan 2018 19:44:45 +0000 (19:44 +0000)]
fold-vec-mergehl-char.c: New.

[testsuite]

2018-01-17  Will Schmidt  <will_schmidt@vnet.ibm.com>

* gcc.target/powerpc/fold-vec-mergehl-char.c: New.
* gcc.target/powerpc/fold-vec-mergehl-double.c: New.
* gcc.target/powerpc/fold-vec-mergehl-float.c: New.
* gcc.target/powerpc/fold-vec-mergehl-int.c: New.
* gcc.target/powerpc/fold-vec-mergehl-longlong.c: New.
* gcc.target/powerpc/fold-vec-mergehl-pixel.c: New.
* gcc.target/powerpc/fold-vec-mergehl-short.c: New.
* gcc.target/powerpc/builtins-1-be-folded.c: New.
* gcc.target/powerpc/builtins-1-le-folded.c: New.
* gcc.target/powerpc/builtins-1.fold.h: New.

From-SVN: r256815

6 years agors6000.c (rs6000_gimple_builtin): Add gimple folding support for merge[hl].
Will Schmidt [Wed, 17 Jan 2018 19:41:02 +0000 (19:41 +0000)]
rs6000.c (rs6000_gimple_builtin): Add gimple folding support for merge[hl].

[gcc]

2018-01-17  Will Schmidt  <will_schmidt@vnet.ibm.com>

* config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
support for merge[hl].
(fold_mergehl_helper): New helper function.
(tree-vector-builder.h): New #include for tree_vector_builder usage.
* config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
(altivec_vmrglw_direct): Add xxmrglw insn.

[testsuite]

2018-01-17  Will Schmidt  <will_schmidt@vnet.ibm.com>

* gcc.target/powerpc/fold-vec-mergehl-char.c: New.
* gcc.target/powerpc/fold-vec-mergehl-double.c: New.
* gcc.target/powerpc/fold-vec-mergehl-float.c: New.
* gcc.target/powerpc/fold-vec-mergehl-int.c: New.
* gcc.target/powerpc/fold-vec-mergehl-longlong.c: New.
* gcc.target/powerpc/fold-vec-mergehl-pixel.c: New.
* gcc.target/powerpc/fold-vec-mergehl-short.c: New.
* gcc.target/powerpc/builtins-1-be.c: Disable gimple-folding.
* gcc.target/powerpc/builtins-1-le.c: Disable gimple-folding.
* gcc.target/powerpc/builtins-1-be-folded.c: New.
* gcc.target/powerpc/builtins-1-le-folded.c: New.
* gcc.target/powerpc/builtins-1.fold.h: New.

From-SVN: r256814

6 years agoGuard against undefined weak symbols before Mac OS X 10.9 (PR sanitizer/82825)
Rainer Orth [Wed, 17 Jan 2018 19:31:43 +0000 (19:31 +0000)]
Guard against undefined weak symbols before Mac OS X 10.9 (PR sanitizer/82825)

PR sanitizer/82825
* sanitizer_common/sanitizer_internal_defs.h: Cherry-pick upstream
r??????.

From-SVN: r256813

6 years ago[arm] Fix gcc.target/arm/g2.c and scd42-2.c for --with-mode=thumb hardfloat targets
Kyrylo Tkachov [Wed, 17 Jan 2018 19:11:15 +0000 (19:11 +0000)]
[arm] Fix gcc.target/arm/g2.c and scd42-2.c for --with-mode=thumb hardfloat targets

These -mcpu=xscale tests are ARM-only tests and they go to great pains to reject
explicit overriding options, but they're missing the -marm in their dg-options, which means
they will still give that nasty Thumb1 hard-float error when testing an implicit --with-mode=thumb
toolchain (--with-cpu=cortex-a15 --with-fpu=neon-vfpv4 --with-float=hard --with-mode=thumb, for example).

This patch adds the missing -marm and all is good again.

     * gcc.target/arm/g2.c: Add -marm to dg-options.
     * gcc.target/arm/scd42-2.c: Likewise.

From-SVN: r256812

6 years agoRISC-V: Mark fsX as call clobbered when soft-float.
Andrew Waterman [Wed, 17 Jan 2018 19:07:20 +0000 (19:07 +0000)]
RISC-V: Mark fsX as call clobbered when soft-float.

2018-01-17  Andrew Waterman  <andrew@sifive.com>
gcc/
* config/riscv/riscv.c (riscv_conditional_register_usage): If
UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.

From-SVN: r256811

6 years agoarchive/tar: support stat and device numbers on AIX
Ian Lance Taylor [Wed, 17 Jan 2018 18:33:50 +0000 (18:33 +0000)]
archive/tar: support stat and device numbers on AIX

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

From-SVN: r256810

6 years ago[C++/83287] Another overload lookup ice
Nathan Sidwell [Wed, 17 Jan 2018 18:11:49 +0000 (18:11 +0000)]
[C++/83287] Another overload lookup ice

https://gcc.gnu.org/ml/gcc-patches/2018-01/msg01580.html
PR c++/83287
* init.c (build_raw_new_expr): Scan list for lookups to keep.

PR c++/83287
* g++.dg/lookup/pr83287-2.C: New.

From-SVN: r256809

6 years agoC++: Fix crash in warn_for_memset within templates (PR c++/83814)
David Malcolm [Wed, 17 Jan 2018 17:51:25 +0000 (17:51 +0000)]
C++: Fix crash in warn_for_memset within templates (PR c++/83814)

gcc/c-family/ChangeLog:
PR c++/83814
* c-common.c (fold_for_warn): Move to c/c-fold.c and cp/expr.c.

gcc/c/ChangeLog:
PR c++/83814
* c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
the C part.

gcc/cp/ChangeLog:
PR c++/83814
* expr.c (fold_for_warn): Move from c-common.c, reducing to just
the C++ part.  If processing a template, call
fold_non_dependent_expr rather than fully folding.

gcc/testsuite/ChangeLog:
PR c++/83814
PR c++/83902
* g++.dg/wrappers/pr83814.C: New test case.
* g++.dg/wrappers/pr83902.C: New test case.

From-SVN: r256804

6 years agoPR c++/81067 - redundant NULL warning.
Jason Merrill [Wed, 17 Jan 2018 17:44:42 +0000 (12:44 -0500)]
PR c++/81067 - redundant NULL warning.

* call.c (convert_like_real): Restore null_node handling.

From-SVN: r256803

6 years agoPR c++/81843 - ICE with variadic member template.
Jason Merrill [Wed, 17 Jan 2018 17:44:35 +0000 (12:44 -0500)]
PR c++/81843 - ICE with variadic member template.

PR c++/72801
* pt.c (unify_pack_expansion): Don't try to deduce enclosing
template args.

From-SVN: r256802

6 years agolto, testsuite: Fix ICE in -Wodr (PR lto/83121)
David Malcolm [Wed, 17 Jan 2018 16:56:56 +0000 (16:56 +0000)]
lto, testsuite: Fix ICE in -Wodr (PR lto/83121)

PR lto/83121 reports an ICE deep inside the linemap code when -Wodr
reports on a type mismatch.

The root cause is that the warning can access the DECL_SOURCE_LOCATION
of a streamed-in decl before the lto_location_cache has been applied.

lto_location_cache::input_location stores RESERVED_LOCATION_COUNT (==2)
as a poison value until the cache is applied:
250   /* Keep value RESERVED_LOCATION_COUNT in *loc as linemap lookups will
251      ICE on it.  */

The fix is relatively simple: apply the cache before reading the
DECL_SOURCE_LOCATION.

Triggering the ICE was fiddly: it seems to be affected by many things,
including the order of files, and (I think) by filenames.  My theory is
that it's affected by the ordering of the tree nodes in the LTO stream:
for the ICE to occur, the types in question need to be compared before
some other operation flushes the lto_location_cache.  This ordering
is affected by the hash-based ordering in DFS in lto-streamer-out.c, which
might explain why r255066 seemed to trigger the bug; the only relevant
change to LTO there seemed to be:
  * lto-streamer-out.c (hash_tree): Hash TYPE_EMPTY_P and DECL_PADDING_P.
If so, then the bug was presumably already present, but hidden.

The patch also adds regression test coverage for the ICE, which is more
involved - as far as I can tell, we don't have an existing way to verify
diagnostics emitted during link-time optimization.

Hence the patch adds some machinery to lib/lto.exp to support two new
directives: dg-lto-warning and dg-lto-message, corresponding to
dg-warning and dg-message respectively, where the diagnostics are
expected to be emitted at link-time.

The test case includes examples of LTO warnings and notes in both the
primary and secondary source files

Doing so required reusing the logic from DejaGnu for handling diagnostics.
Unfortunately the pertinent code is a 50 line loop within a ~200 line Tcl
function in dg.exp (dg-test), so I had to copy it from DejaGnu, making
various changes as necessary (see lto_handle_diagnostics_for_file in the
patch; for example the LTO version supports multiple source files,
identifying which source file emitted a diagnostic).

For non-LTO diagnostics we currently ignore surplus "note" diagnostics.
This patch updates lto_prune_warns to follow this behavior (since
otherwise we'd need numerous dg-lto-message directives for the motivating
test case).

The patch adds these PASS results to g++.sum:

PASS: g++.dg/lto/pr83121 cp_lto_pr83121_0.o assemble, -O0 -flto
PASS: g++.dg/lto/pr83121 cp_lto_pr83121_1.o assemble, -O0 -flto
PASS: g++.dg/lto/pr83121  (test for LTO warnings, pr83121_0.C line 6)
PASS: g++.dg/lto/pr83121  (test for LTO warnings, pr83121_0.C line 8)
PASS: g++.dg/lto/pr83121  (test for LTO warnings, pr83121_1.C line 2)
PASS: g++.dg/lto/pr83121  (test for LTO warnings, pr83121_1.C line 3)
PASS: g++.dg/lto/pr83121 cp_lto_pr83121_0.o-cp_lto_pr83121_1.o link, -O0 -flto

The output for dg-lto-message above refers to "warnings", rather than
"messages" but that's the same as for the non-LTO case, where dg-message
also refers to "warnings".

gcc/ChangeLog:
PR lto/83121
* ipa-devirt.c (add_type_duplicate): When comparing memory layout,
call the lto_location_cache before reading the
DECL_SOURCE_LOCATION of the types.

gcc/testsuite/ChangeLog:
PR lto/83121
* g++.dg/lto/pr83121_0.C: New test case.
* g++.dg/lto/pr83121_1.C: New test case.
* lib/lto.exp (lto_handle_diagnostics_for_file): New procedure,
adapted from DejaGnu's dg-test.
(lto_handle_diagnostics): New procedure.
(lto_prune_warns): Ignore informational notes.
(lto-link-and-maybe-run): Add "messages_by_file" param.
Call lto_handle_diagnostics.  Avoid issuing "unresolved" for
"execute" when "link" fails if "execute" was not specified.
(lto-can-handle-directive): New procedure.
(lto-get-options-main): Call lto-can-handle-directive.  Add a
dg-messages local, using it to set the caller's
dg-messages-by-file for the given source file.
(lto-get-options): Likewise.
(lto-execute): Add dg-messages-by-file local, and pass it to
lto-link-and-maybe-run.

From-SVN: r256801

6 years ago[AArch64] PR82964: Fix 128-bit immediate ICEs
Wilco Dijkstra [Wed, 17 Jan 2018 16:31:42 +0000 (16:31 +0000)]
[AArch64] PR82964: Fix 128-bit immediate ICEs

This fixes PR82964 which reports ICEs for some CONST_WIDE_INT immediates.
It turns out decimal floating point CONST_DOUBLE get changed into
CONST_WIDE_INT without checking the constraint on the operand, which
results in failures.  Avoid this by only allowing SF/DF/TF mode floating
point constants in aarch64_legitimate_constant_p.  A similar issue can
occur with 128-bit immediates which may be emitted even when disallowed
in aarch64_legitimate_constant_p, and the constraints in movti_aarch64
don't match.  Fix this with a new constraint and allowing valid immediates
in aarch64_legitimate_constant_p.

Rather than allowing all 128-bit immediates and expanding in up to 8
MOV/MOVK instructions, limit them to 4 instructions and use a literal
load for other cases.  Improve a few TImode tests to use a literal and
ensure they are skipped with -fpic.

This fixes all reported failures.

    gcc/
PR target/82964
* config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
* config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
(aarch64_legitimate_constant_p): Just support CONST_DOUBLE
SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
* config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
Add declaration.
* config/aarch64/constraints.md (aarch64_movti_operand):
Limit immediates.
* config/aarch64/predicates.md (Uti): Add new constraint.

    gcc/testsuite/
PR target/79041
PR target/82964
* gcc.target/aarch64/pr79041-2.c: Improve test, disable with fpic.
* gcc.target/aarch64/pr78733.c: Improve test, disable with fpic.

Co-Authored-By: Richard Sandiford <richard.sandiford@linaro.org>
From-SVN: r256800

6 years ago[arm][testsuite] Fix -march tests in effective target checks auto-generation
Kyrylo Tkachov [Wed, 17 Jan 2018 16:27:19 +0000 (16:27 +0000)]
[arm][testsuite] Fix -march tests in effective target checks auto-generation

There is a typo in the armv8.1-a and armv8.2-a effective target check generators.
They are not actually used anywhere in the testsuite as far as I can tell, but the fix is obvious.

     * lib/target-supports.exp: Fix -march arguments in arm arch effective
     target check autogenerator for armv8.1-a and armv8.2-a.

From-SVN: r256799

6 years agovsx.md (define_expand xl_len_r, [...]): Add match_dup argument.
Carl Love [Wed, 17 Jan 2018 16:21:02 +0000 (16:21 +0000)]
vsx.md (define_expand xl_len_r, [...]): Add match_dup argument.

gcc/ChangeLog:

2018-01-17 Carl Love  <cel@us.ibm.com>
* config/rs6000/vsx.md (define_expand xl_len_r,
define_expand stxvl, define_expand *stxvl): Add match_dup argument.
(define_insn): Add, match_dup 1 argument to define_insn stxvll and
lxvll.
(define_expand, define_insn): Move the shift left from the
define_insn to the define_expand for lxvl and stxvl instructions.
* config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
and XL_LEN_R definitions to PURE.

gcc/testsuite/ChangeLog:

2018-01-17  Carl Love  <cel@us.ibm.com>
* gcc.target/powerpc/builtins-6-p9-runnable.c: Add additional tests.
Add debug print statements.
* gcc.target/powerpc/builtins-5-p9-runnable.c: Add test to do
16 byte vector load followed by a partial vector load.

From-SVN: r256798

6 years agoi386.c (indirect_thunk_name): Declare regno as unsigned int.
Uros Bizjak [Wed, 17 Jan 2018 15:58:48 +0000 (16:58 +0100)]
i386.c (indirect_thunk_name): Declare regno as unsigned int.

* config/i386/i386.c (indirect_thunk_name): Declare regno
as unsigned int.  Compare regno with INVALID_REGNUM.
(output_indirect_thunk): Ditto.
(output_indirect_thunk_function): Ditto.
(ix86_code_end): Declare regno as unsigned int.  Use INVALID_REGNUM
in the call to output_indirect_thunk_function.

From-SVN: r256797

6 years agoFix failure building LLVM with location wrapper nodes (PR c++/83799)
David Malcolm [Wed, 17 Jan 2018 15:56:07 +0000 (15:56 +0000)]
Fix failure building LLVM with location wrapper nodes (PR c++/83799)

PR c++/83799 reports a failure building LLVM due to a bogus
"no matching function for call to" error at a callsite like this:
  TLI->getTypeLegalizationCost(DL);
where "DL" is from:
  using TargetTransformInfoImplBase::DL;

The root cause is that type_dependent_expression_p on a USING_DECL
should return true when processing a template, but after r256448 the
the argument at the callsite is a location wrapper around the USING_DECL,
and type_dependent_expression_p erroneously returns false for it, as
it is comparing tree codes, and failing a match, then looking at types.

This prevents cp_parser_postfix_expression from using the
"build_min_nt_call_vec" path for handling the call, instead erroneously
handling it via build_new_method_call (which fails for this case).

This patch fixes the problem by stripping any location wrappers before
the various tree code tests in type_dependent_expression_p.   It fixes
the reduced test case, and the full BasicTargetTransformInfo.ii; after
this patch, the assembly generated for that latter case is identical to
that generated before r256448.

gcc/cp/ChangeLog:
PR c++/83799
* pt.c (type_dependent_expression_p): Strip any location wrapper
before testing tree codes.
(selftest::test_type_dependent_expression_p): New function.
(selftest::cp_pt_c_tests): Call it.

gcc/testsuite/ChangeLog:
PR c++/83799
* g++.dg/wrappers/pr83799.C: New test case.

From-SVN: r256796

6 years ago[C++/83739] bogus error tsubsting range for in generic lambda
Nathan Sidwell [Wed, 17 Jan 2018 15:39:35 +0000 (15:39 +0000)]
[C++/83739] bogus error tsubsting range for in generic lambda

https://gcc.gnu.org/ml/gcc-patches/2018-01/msg01554.html
PR c++/83739
* pt.c (tsubst_expr) <case RANGE_FOR_STMT>: Rebuild a range_for if
this not a final instantiation.

PR c++/83739
* g++.dg/cpp1y/pr83739.C: New.

From-SVN: r256795

6 years agolibgo: update to Go1.10beta2 release
Ian Lance Taylor [Wed, 17 Jan 2018 14:20:29 +0000 (14:20 +0000)]
libgo: update to Go1.10beta2 release

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

From-SVN: r256794

6 years agooverflow8.c: Pass -fno-if-conversion.
Eric Botcazou [Wed, 17 Jan 2018 13:45:55 +0000 (13:45 +0000)]
overflow8.c: Pass -fno-if-conversion.

* gcc.target/visium/overflow8.c: Pass -fno-if-conversion.
* gcc.target/visium/overflow16.c: Likewise.
* gcc.target/visium/overflow32.c: Likewise.

From-SVN: r256793

6 years ago* gcc.dg/ipa/inlinehint-4.c: Also pass --param inline-unit-growth=20.
Eric Botcazou [Wed, 17 Jan 2018 11:44:24 +0000 (11:44 +0000)]
* gcc.dg/ipa/inlinehint-4.c: Also pass --param inline-unit-growth=20.

From-SVN: r256787

6 years ago[arm] Convert gcc.target/arm/stl-cond.c into an RTL test
Kyrylo Tkachov [Wed, 17 Jan 2018 11:30:35 +0000 (11:30 +0000)]
[arm] Convert gcc.target/arm/stl-cond.c into an RTL test

This is an awkward testsuite failure. The original bug was that we were failing to put out
the conditional code in the conditional form of the STL instruction (oops!).
So we wanted to output STLNE, but instead output STL.
The testacase relies on if-conversion to conditionalise the insn for STL.
However, ever since r251643 the expansion of a non-relaxed atomic store
always includes a compiler barrier. That blocks if-conversion in all cases.

So there's no easy way to get to a conditional STL instruction from a C program.
But we do want to test for the original bug fix that if the RTL insn for STL is conditionalised
it should output the conditional code.

The solution in this patch is to convert the test into an RTL test with the COND_EXEC form
of the STL insn and scan the assembly output there.
This seems to work fine, and gives us an opportunity to create a gcc.dg/rtl/arm directory
in the RTL tests.

This now makes the gcc.target/arm/stl-cond.c disappear (as the test is deleted) and
the new test in gcc.dg/rtl/arm/stl-cond.c passes.

     * gcc.dg/rtl/arm/stl-cond.c: New test.
     * gcc.target/arm/stl-cond.c: Delete.

From-SVN: r256785

6 years ago[arm] Fix gcc.target/arm/pr40887.c directives
Kyrylo Tkachov [Wed, 17 Jan 2018 11:24:52 +0000 (11:24 +0000)]
[arm] Fix gcc.target/arm/pr40887.c directives

This patch converts gcc.target/arm/pr40887.c to use the proper effective target check and dg-add-options for armv5te
so that we avoid situations where we end up trying to compile the test with a Thumb1 hard-float ABI, which makes the
compiler complain.

This allows the test to pass gracefully for me for my compiler configured with:
--with-cpu=cortex-a15 --with-fpu=neon-vfpv4 --with-float=hard --with-mode=thumb

     * gcc.target/arm/pr40887.c: Add armv5te effective target checks and
     directives.

From-SVN: r256784

6 years agore PR tree-optimization/83843 (wrong code at -O2)
Jakub Jelinek [Wed, 17 Jan 2018 11:19:16 +0000 (12:19 +0100)]
re PR tree-optimization/83843 (wrong code at -O2)

PR tree-optimization/83843
* gcc.dg/store_merging_18.c: Don't expect "Merging successful" on arm.
* gcc.dg/store_merging_19.c: New test.

From-SVN: r256783

6 years ago[arm] Fix gcc.target/arm/xor-and.c
Kyrylo Tkachov [Wed, 17 Jan 2018 11:13:05 +0000 (11:13 +0000)]
[arm] Fix gcc.target/arm/xor-and.c

This test is naughty because it doesn't use the proper effective target checks
and add-options mechanisms for setting a Thumb1 target, which leads to Thumb1 hard-float errors
when testing a toolchain configured with --with-cpu=cortex-a15 --with-fpu=neon-vfpv4 --with-float=hard --with-mode=thumb.

This patch fixes that in the obvious way.

* gcc.target/arm/xor-and.c: Fix armv6 effective target checks
and options.

From-SVN: r256782

6 years agore PR rtl-optimization/83771 (ICE: verify_flow_info failed (error: non-cold basic...
Jakub Jelinek [Wed, 17 Jan 2018 11:04:11 +0000 (12:04 +0100)]
re PR rtl-optimization/83771 (ICE: verify_flow_info failed (error: non-cold basic block 3 reachable only by paths crossing the cold partition))

PR rtl-optimization/83771
* gcc.dg/pr83771.c: New test.

From-SVN: r256781

6 years agore PR tree-optimization/81184 (gcc.dg/pr21643.c and gcc.dg/tree-ssa/phi-opt-11.c...
Eric Botcazou [Wed, 17 Jan 2018 11:03:00 +0000 (11:03 +0000)]
re PR tree-optimization/81184 (gcc.dg/pr21643.c and gcc.dg/tree-ssa/phi-opt-11.c fail starting with r249450)

PR tree-optimization/81184
* gcc.dg/pr21643.c: Adjust dg-final line for logical_op_short_circuit
targets.
* gcc.dg/tree-ssa/phi-opt-11.c: Likewise.

From-SVN: r256780

6 years agoVIEW_CONVERT_EXPR slots for strict-align targets (PR 83884)
Richard Sandiford [Wed, 17 Jan 2018 09:28:28 +0000 (09:28 +0000)]
VIEW_CONVERT_EXPR slots for strict-align targets (PR 83884)

This PR is about a case in which we VIEW_CONVERT a variable-sized
unaligned record:

 <record_type 0x7ffff6d92888 check_displace_generation__T245b sizes-gimplified type_7 BLK
    size <var_decl 0x7ffff6846510 D.3499 ...>
    unit-size <var_decl 0x7ffff68465a0 D.3500 ...>
    align:8 ...>

to an aligned 32-bit integer.  The strict-alignment handling of
this case creates an aligned temporary slot, moves the operand
into the slot in the operand's original mode, then accesses the
slot in the more-aligned result mode.

Previously the size of the temporary slot was calculated using:

                  HOST_WIDE_INT temp_size
                    = MAX (int_size_in_bytes (inner_type),
                           (HOST_WIDE_INT) GET_MODE_SIZE (mode));

int_size_in_bytes would return -1 for the variable-length type,
so we'd use the size of the result mode for the slot.  r256152 replaced
int_size_in_bytes with tree_to_poly_uint64, which triggered an ICE.

If op0 has BLKmode we do a block copy of GET_MODE_SIZE (mode) bytes
and then convert the slot to "mode":

                  poly_uint64 mode_size = GET_MODE_SIZE (mode);
                  ...
                  if (GET_MODE (op0) == BLKmode)
                    {
                      rtx size_rtx = gen_int_mode (mode_size, Pmode);
                      emit_block_move (new_with_op0_mode, op0, size_rtx,
                                       (modifier == EXPAND_STACK_PARM
                                        ? BLOCK_OP_CALL_PARM
                                        : BLOCK_OP_NORMAL));
                    }
                  else
                    ...

                  op0 = new_rtx;
                }
            }

          op0 = adjust_address (op0, mode, 0);

so I think in that case just the size of "mode" is enough, even if op0
is a fixed-size type.  For non-BLKmode op0 we first move in op0's mode
and then convert the slot to "mode":

                    emit_move_insn (new_with_op0_mode, op0);

                  op0 = new_rtx;
                }
            }

          op0 = adjust_address (op0, mode, 0);

so I think we want the maximum of the two mode sizes in that case.

2018-01-17  Richard Sandiford  <richard.sandiford@linaro.org>

gcc/
PR middle-end/83884
* expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
rather than the size of inner_type to determine the stack slot size
when handling VIEW_CONVERT_EXPRs on strict-alignment targets.

From-SVN: r256779

6 years ago* c-c++-common/Wrestrict.c (test_strcpy_range): Revert latest change.
Eric Botcazou [Wed, 17 Jan 2018 09:11:07 +0000 (09:11 +0000)]
* c-c++-common/Wrestrict.c (test_strcpy_range): Revert latest change.

From-SVN: r256778

6 years agoRe-enabling of RDRND for Silvermont.
Sebastian Peryt [Wed, 17 Jan 2018 09:02:13 +0000 (10:02 +0100)]
Re-enabling of RDRND for Silvermont.

2018-01-15  Sebastian Peryt  <sebastian.peryt@intel.com>

gcc/

PR target/83546
* config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
to PTA_SILVERMONT.

2018-01-15  Sebastian Peryt  <sebastian.peryt@intel.com>

gcc/testsuite/

PR target/83546
* gcc.target/i386/pr83546.c: New test.

From-SVN: r256777

6 years agoelf.c (codes): Fix size to be 288.
Ian Lance Taylor [Wed, 17 Jan 2018 01:39:05 +0000 (01:39 +0000)]
elf.c (codes): Fix size to be 288.

* elf.c (codes) [GENERATE_FIXED_HUFFMAN_TABLE]: Fix size to be
288.
(main) [GENERATE_FIXED_HUFFMAN_TABLE]: Pass 288 to
elf_zlib_inflate_table.  Generate elf_zlib_default_dist_table.
(elf_zlib_default_table): Update.
(elf_zlib_default_dist_table): New static array.
(elf_zlib_inflate): Use elf_zlib_default_dist_table for dist table
for block type 1.
* ztest.c (struct zlib_test): Add uncompressed_len.
(tests): Initialize uncompressed_len field.  Add new test case.
(test_samples): Use uncompressed_len field.

From-SVN: r256776

6 years agoconfig.gcc (powerpc*-linux*-*): Add support for 64-bit little endian Linux systems...
Michael Meissner [Wed, 17 Jan 2018 01:06:34 +0000 (01:06 +0000)]
config.gcc (powerpc*-linux*-*): Add support for 64-bit little endian Linux systems to optionally enable...

2018-01-16  Michael Meissner  <meissner@linux.vnet.ibm.com>

* config.gcc (powerpc*-linux*-*): Add support for 64-bit little
endian Linux systems to optionally enable multilibs for selecting
the long double type if the user configured an explicit type.
* config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
have no long double multilibs if not defined.
* config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
warn if the user used -mabi={ieee,ibm}longdouble and we built
multilibs for long double.
* config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
appropriate multilib option.
(MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
multilib options.
* config/rs6000/t-ldouble-linux64le-ibm: New configuration files
for building long double multilibs.
* config/rs6000/t-ldouble-linux64le-ieee: Likewise.

From-SVN: r256775

6 years agoconfig.gcc (hppa*-*-linux*): Change callee copies ABI to caller copies.
John David Anglin [Wed, 17 Jan 2018 00:38:15 +0000 (00:38 +0000)]
config.gcc (hppa*-*-linux*): Change callee copies ABI to caller copies.

* config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
copies.

From-SVN: r256774

6 years agopa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to 64 bits.
John David Anglin [Wed, 17 Jan 2018 00:19:05 +0000 (00:19 +0000)]
pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to 64 bits.

* config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
64 bits.
* config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
128 bits.

From-SVN: r256773

6 years agoDaily bump.
GCC Administrator [Wed, 17 Jan 2018 00:16:29 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r256772

6 years agosom.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode variables.
John David Anglin [Wed, 17 Jan 2018 00:09:44 +0000 (00:09 +0000)]
som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode variables.

* config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
variables.

From-SVN: r256769

6 years agopa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE return value.
John David Anglin [Tue, 16 Jan 2018 23:59:31 +0000 (23:59 +0000)]
pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE return value.

* config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
return value.

From-SVN: r256768

6 years agogimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an ADDR_EXPR, do...
Eric Botcazou [Tue, 16 Jan 2018 23:11:10 +0000 (23:11 +0000)]
gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.

* gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.

From-SVN: r256766

6 years agoPR c++/83714 - ICE checking return in template.
Jason Merrill [Tue, 16 Jan 2018 23:05:39 +0000 (18:05 -0500)]
PR c++/83714 - ICE checking return in template.

* typeck.c (check_return_expr): Call build_non_dependent_expr.

From-SVN: r256765

6 years agoWrestrict.c (test_strcpy_range): Bump string size of one test and add dg-warning...
Eric Botcazou [Tue, 16 Jan 2018 22:53:46 +0000 (22:53 +0000)]
Wrestrict.c (test_strcpy_range): Bump string size of one test and add dg-warning for the -Wstringop-overflow warning.

* c-c++-common/Wrestrict.c (test_strcpy_range): Bump string size of one
test and add dg-warning for the -Wstringop-overflow warning.

From-SVN: r256764

6 years agoWarray-bounds-4.c (test_strcpy_bounds_memarray_range): XFAIL last test on SPARC and...
Eric Botcazou [Tue, 16 Jan 2018 22:38:49 +0000 (22:38 +0000)]
Warray-bounds-4.c (test_strcpy_bounds_memarray_range): XFAIL last test on SPARC and Visium.

* c-c++-common/Warray-bounds-4.c (test_strcpy_bounds_memarray_range):
XFAIL last test on SPARC and Visium.

From-SVN: r256763

6 years agors6000-p8swap.c (rs6000_gen_stvx): Generate different rtl trees depending on TARGET_6...
Kelvin Nilsen [Tue, 16 Jan 2018 22:14:27 +0000 (22:14 +0000)]
rs6000-p8swap.c (rs6000_gen_stvx): Generate different rtl trees depending on TARGET_64BIT.

gcc/ChangeLog:

2018-01-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>

* config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
different rtl trees depending on TARGET_64BIT.
(rs6000_gen_lvx): Likewise.

From-SVN: r256762