Commit Graph

159182 Commits

Author SHA1 Message Date
Tony Reix 47c699f52a xcoff.c (xcoff_incl_compare): New function.
* xcoff.c (xcoff_incl_compare): New function.
	(xcoff_incl_search): New function.
	(xcoff_process_linenos): Use bsearch to find include file.
	(xcoff_initialize_fileline): Sort include file information.

From-SVN: r256895
2018-01-19 17:45:24 +00:00
Tom de Vries 8c8e9a6bb6 [nvptx] Fix bug in jit bug workaround
2018-01-19  Tom de Vries  <tom@codesourcery.com>
	    Cesar Philippidis  <cesar@codesourcery.com>

	PR target/83920

	* config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.

	* testsuite/libgomp.oacc-c-c++-common/pr83920.c: New test.
	* testsuite/libgomp.oacc-fortran/pr83920.f90: New test.

Co-Authored-By: Cesar Philippidis <cesar@codesourcery.com>

From-SVN: r256894
2018-01-19 16:29:41 +00:00
Cesar Philippidis 6c7c47081a [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
2018-01-19 06:21:08 -08:00
Rainer Orth b8d090dbdc Fix missing g++.dg/torture/pr83619.C warning
* g++.dg/torture/pr83619.C: Remove dg-message.

From-SVN: r256890
2018-01-19 14:04:52 +00:00
Martin Liska 1a92f9f650 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
2018-01-19 12:07:39 +00:00
Martin Liska 664d17c65c 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
2018-01-19 12:06:18 +00:00
Martin Liska e2a1e6a441 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
2018-01-19 12:05:20 +00:00
Martin Liska d1b9a5724b 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
2018-01-19 12:03:24 +00:00
Richard Sandiford 09a7858b2c 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
2018-01-19 11:57:47 +00:00
Richard Sandiford 271134dd48 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
2018-01-19 11:57:34 +00:00
Kyrylo Tkachov 4b04107b25 [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
2018-01-19 10:41:57 +00:00
Kyrylo Tkachov 9f14d763af [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
2018-01-19 10:26:53 +00:00
Christophe Lyon a46c4287bb [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
2018-01-19 11:17:34 +01:00
Kyrylo Tkachov 80b21c416c [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
2018-01-19 09:58:37 +00:00
Ian Lance Taylor 2a3abc862a 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
2018-01-19 05:09:43 +00:00
Ian Lance Taylor 5d15877758 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
2018-01-19 05:04:51 +00:00
Ian Lance Taylor ddc606cef7 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
2018-01-19 04:52:12 +00:00
Ian Lance Taylor 674dddfe2d runtime: no escape for some functions on AIX
Reviewed-on: https://go-review.googlesource.com/88236

From-SVN: r256874
2018-01-19 04:48:51 +00:00
Ian Lance Taylor 219f9bad83 cmd/go: recognize AIX objects and archives
Reviewed-on: https://go-review.googlesource.com/88275

From-SVN: r256873
2018-01-19 04:27:38 +00:00
Ian Lance Taylor 549e4febc3 runtime: add go:noescape declaration for Solaris
Patch by Rainer Orth.
    
    Reviewed-on: https://go-review.googlesource.com/88376

From-SVN: r256872
2018-01-19 04:09:55 +00:00
John David Anglin 502a18ca45 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
2018-01-19 00:22:33 +00:00
GCC Administrator 90e04a348b Daily bump.
From-SVN: r256870
2018-01-19 00:16:14 +00:00
Jakub Jelinek 9736f5769d 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
2018-01-19 00:39:26 +01:00
Jason Merrill b4cda6a6b7 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
2018-01-18 17:15:32 -05:00
Paolo Carlini 48cdaab9d7 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
2018-01-18 20:56:08 +00:00
Carl Love 3480ed3a8f 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
2018-01-18 20:38:41 +00:00
Jakub Jelinek 6aee2fd064 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
2018-01-18 21:30:33 +01:00
Jason Merrill d3a9902e52 PR c++/82461 - constexpr list-initialized member
* constexpr.c (potential_constant_expression_1): Check
	TARGET_EXPR_DIRECT_INIT_P.

From-SVN: r256860
2018-01-18 15:02:06 -05:00
Uros Bizjak dac867c90a 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
2018-01-18 20:52:16 +01:00
Paolo Carlini 50b27938f7 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
2018-01-18 17:11:43 +00:00
Wilco Dijkstra 9f7b87cad7 [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
2018-01-18 16:37:44 +00:00
Jan Hubicka cbb4e4ca11 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
2018-01-18 16:26:54 +00:00
Martin Sebor 8ca07d928c Be clear about virtual table pointer corruptuion rather than the vtable itself.
From-SVN: r256852
2018-01-18 09:26:14 -07:00
Christophe Lyon 00850e40be [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
2018-01-18 17:14:31 +01:00
Jan Hubicka 8b2d991b03 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
2018-01-18 15:57:48 +00:00
Christophe Lyon 1f0267acfd [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
2018-01-18 15:54:41 +01:00
Kyrylo Tkachov 215054684a [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
2018-01-18 14:26:02 +00:00
Boris Kolpackov 7365279fca 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
2018-01-18 13:17:37 +00:00
Martin Liska 82a7bb2dff 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
2018-01-18 13:13:23 +00:00
Christophe Lyon 5b06990f1a [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
2018-01-18 14:04:04 +01:00
Boris Kolpackov 7b7f78d7bd Add Boris Kolpackov <boris@codesynthesis.com> to MAINTAINERS
From-SVN: r256844
2018-01-18 12:36:31 +00:00
Nathan Sidwell 5a752e3f79 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
2018-01-18 11:53:50 +00:00
Richard Biener 7467ab4232 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
2018-01-18 10:59:33 +00:00
Kyrylo Tkachov c5affc0451 [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
2018-01-18 09:30:58 +00:00
Christophe Lyon f2f4f2442c [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
2018-01-18 10:13:27 +01:00
Jakub Jelinek 8ae438811f 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
2018-01-18 09:29:14 +01:00
Harald Anlauf fcf7923742 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
2018-01-18 07:54:17 +00:00
Siddhesh Poyarekar 3c1f3bf69d Add myself to the MAINTAINERS file
* MAINTAINERS (write after approval): Add myself.

From-SVN: r256836
2018-01-18 06:58:52 +00:00
Ian Lance Taylor a9411cce01 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
2018-01-18 04:24:48 +00:00
Jeff Law b7e60023a2 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
2018-01-17 21:05:27 -07:00