Sebastian Perta [Mon, 22 Jan 2018 13:53:48 +0000 (13:53 +0000)]
rl78.c (rl78_note_reg_set): fixed dead reg check for non-QImode registers
2018-01-12 Sebastian Perta <sebastian.perta@renesas.com>
* config/rl78/rl78.c (rl78_note_reg_set): fixed dead reg check
for non-QImode registers
From-SVN: r256945
Janne Blomqvist [Mon, 22 Jan 2018 13:31:08 +0000 (15:31 +0200)]
PR 78534, 83704 Large character lengths
This patch fixes various parts of the code to use a larger type than
int for the character length. Depending on the situation,
HOST_WIDE_INT, size_t, or gfc_charlen_t is appropriate.
Regtested on x86_64-pc-linux-gnu and i686-pc-linux-gnu.
gcc/fortran/ChangeLog:
2018-01-22 Janne Blomqvist <jb@gcc.gnu.org>
PR 78534
PR 83704
* arith.c (gfc_arith_concat): Use size_t for string length.
(gfc_compare_string): Likewise.
(gfc_compare_with_Cstring): Likewise.
* array.c (gfc_resolve_character_array_constructor): Use
HOST_WIDE_INT, gfc_mpz_get_hwi.
* check.c (gfc_check_fe_runtime_error): Use size_t.
* data.c (create_character_initializer): Use HOST_WIDE_INT,
gfc_extract_hwi.
* decl.c (gfc_set_constant_character_len): Use gfc_charlen_t.
(add_init_expr_to_sym): Use HOST_WIDE_INT.
* expr.c (gfc_build_init_expr): Use HOST_WIDE_INT,
gfc_extract_hwi.
(gfc_apply_init): Likewise.
* match.h (gfc_set_constant_character_len): Update prototype.
* primary.c (match_string_constant): Use size_t.
* resolve.c (resolve_ordinary_assign): Use HOST_WIDE_INT,
gfc_mpz_get_hwi.
* simplify.c (init_result_expr): Likewise.
(gfc_simplify_len_trim): Use size_t.
* target-memory.c (gfc_encode_character): Use size_t.
(gfc_target_encode_expr): Use HOST_WIDE_INT, gfc_mpz_get_hwi.
(interpret_array): Use size_t.
(gfc_interpret_character): Likewise.
* target-memory.h (gfc_encode_character): Update prototype.
(gfc_interpret_character): Likewise.
(gfc_target_interpret_expr): Likewise.
* trans-const.c (gfc_build_string_const): Use size_t for length
argument.
(gfc_build_wide_string_const): Likewise.
* trans-const.h (gfc_build_string_const): Likewise.
(gfc_build_wide_string_const): Likewise.
2018-01-22 Janne Blomqvist <jb@gcc.gnu.org>
PR 78534
PR 83704
* gfortran.dg/string_1.f90: Remove printing the length.
From-SVN: r256944
Richard Biener [Mon, 22 Jan 2018 13:10:57 +0000 (13:10 +0000)]
re PR tree-optimization/83963 ([graphite] ICE in merge_sese, at graphite-scop-detection.c:517)
2018-01-22 Richard Biener <rguenther@suse.de>
PR tree-optimization/83963
* graphite-scop-detection.c (scop_detection::get_sese): Delay
including the loop exit block.
(scop_detection::merge_sese): Likewise.
(scop_detection::add_scop): Do it here instead.
* gcc.dg/graphite/pr83963.c: New testcase.
From-SVN: r256943
Ville Voutilainen [Mon, 22 Jan 2018 12:44:33 +0000 (14:44 +0200)]
re PR c++/83895 (-Wparentheses warns about pointer-to-member typedefs)
PR c++/83895
cp/
* decl.c (grokdeclarator): Don't diagnose extra parens
on typedefs.
testsuite/
* g++.dg/warn/83895.C: New.
From-SVN: r256942
Sudakshina Das [Mon, 22 Jan 2018 10:56:26 +0000 (10:56 +0000)]
[ARM] Fix test fail with conflicting -mfloat-abi
This patch fixes my earlier test case that fails for arm-none-eabi
with explicit user option for -mfloat-abi which conflict with
the test case options. I have added a guard to skip the test
on those cases.
ChangeLog entries:
*** gcc/testsuite/ChangeLog ***
2018-01-22 Sudakshina Das <sudi.das@arm.com>
* gcc.c-torture/compile/pr82096.c: Add dg-skip-if and
dg-require-effective-target directives.
From-SVN: r256941
Kyrylo Tkachov [Mon, 22 Jan 2018 10:50:20 +0000 (10:50 +0000)]
[arm] Make gcc.target/arm/copysign_softfloat_1.c more robust
This test has needlessly restrictive requirements. It tries to force a soft-float target and tries to run.
This makes it unsupportable for any non-soft-float variant.
In fact, the test can be a run-time test for any target, and only the scan-assembler tests are specific to
-mfloat-abi=soft. So this patch makes the test always runnable and makes the scan-assembler checks predicable
on the the new arm_sotftfloat effective target check.
* doc/sourcebuild.texi (arm_softfloat): Document.
* lib/target-supports.exp (check_effective_target_arm_softfloat):
New procedure.
* gcc.target/arm/copysign_softfloat_1.c: Allow running everywhere.
Adjust scan-assembler checks for soft-float.
From-SVN: r256940
Bill Schmidt [Mon, 22 Jan 2018 02:46:11 +0000 (02:46 +0000)]
re PR target/83946 (Safe Indirect Jumps broken on AIX)
2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
PR target/83946
* gcc.target/powerpc/safe-indirect-jump-8.c: Skip for AIX.
From-SVN: r256939
GCC Administrator [Mon, 22 Jan 2018 00:16:13 +0000 (00:16 +0000)]
Daily bump.
From-SVN: r256938
John David Anglin [Sun, 21 Jan 2018 18:35:49 +0000 (18:35 +0000)]
pr83621.c: Add -fno-common additional option on hppa*-&-hpux*.
* gcc.dg/pr83621.c: Add -fno-common additional option on hppa*-&-hpux*.
* gcc.dg/pr83623.c: Likewise.
* gcc.dg/pr83666.c: Likewise.
From-SVN: r256935
John David Anglin [Sun, 21 Jan 2018 18:15:31 +0000 (18:15 +0000)]
re PR testsuite/77734 (FAIL: gcc.dg/plugin/must-tail-call-1.c -fplugin=./must_tail_call_plugin.so (test for excess errors))
PR gcc/77734
* config/pa/pa.c (pa_function_ok_for_sibcall): Use
targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
From-SVN: r256934
John David Anglin [Sun, 21 Jan 2018 17:52:44 +0000 (17:52 +0000)]
re PR lto/83452 (FAIL: gfortran.dg/save_6.f90 -O0 (test for excess errors))
PR lto/83452
* config/pa/stublib.c (L_gnu_lto_v1): New stub definition.
* config/pa/t-stublib (gnu_lto_v1-stub.o): Add make fragment.
From-SVN: r256933
Bill Schmidt [Sun, 21 Jan 2018 13:26:07 +0000 (13:26 +0000)]
re PR target/83946 (Safe Indirect Jumps broken on AIX)
[gcc]
2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
David Edelsohn <dje.gcc@gmail.com>
PR target/83946
* config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
Change "crset eq" to "crset 2".
(*call_value_indirect_nonlocal_sysv<mode>): Likewise.
(*call_indirect_aix<mode>_nospec): Likewise.
(*call_value_indirect_aix<mode>_nospec): Likewise.
(*call_indirect_elfv2<mode>_nospec): Likewise.
(*call_value_indirect_elfv2<mode>_nospec): Likewise.
(*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
change assembly output from . to $.
(*sibcall_value_nonlocal_sysv<mode>): Likewise.
(indirect_jump<mode>_nospec): Change assembly output from . to $.
(*tablejump<mode>_internal1_nospec): Likewise.
[gcc/testsuite]
2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
David Edelsohn <dje.gcc@gmail.com>
PR target/83946
* gcc.target/powerpc/safe-indirect-jump-1.c: Change expected
assembly output from "crset eq" to "crset 2".
* gcc.target/powerpc/safe-indirect-jump-2.c: Change expected
assembly output from . to $.
* gcc.target/powerpc/safe-indirect-jump-3.c: Likewise.
* gcc.target/powerpc/safe-indirect-jump-1.c: Change expected
assembly output from "crset eq" to "crset 2".
* gcc.target/powerpc/safe-indirect-jump-8.c: Change expected
assembly output from "crset eq" to "crset 2", and from . to $.
Co-Authored-By: David Edelsohn <dje.gcc@gmail.com>
From-SVN: r256931
Oleg Endo [Sun, 21 Jan 2018 05:12:01 +0000 (05:12 +0000)]
Fix ChangeLog entry.
From-SVN: r256927
Oleg Endo [Sun, 21 Jan 2018 05:03:26 +0000 (05:03 +0000)]
re PR target/80870 (ICE building 7.1.0 sh-elf crosscompiler on macOS)
PR target/80870
* config/sh/rx/rx.c (config/sh/sh_optimize_sett_clrt.cc):
Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
From-SVN: r256926
Eli Zaretskii [Sun, 21 Jan 2018 05:01:31 +0000 (05:01 +0000)]
simple-object-xcoff.c (simple_object_xcoff_find_sections): Use ulong_type to avoid warning about 32-bit shift.
* simple-object-xcoff.c (simple_object_xcoff_find_sections): Use
ulong_type to avoid warning about 32-bit shift.
From-SVN: r256925
GCC Administrator [Sun, 21 Jan 2018 00:16:29 +0000 (00:16 +0000)]
Daily bump.
From-SVN: r256924
Steven G. Kargl [Sat, 20 Jan 2018 20:33:34 +0000 (20:33 +0000)]
re PR fortran/83900 (ICE in gfc_simplify_matmul, at fortran/simplify.c:4593)
2018-01-20 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/83900
* simplify.c (gfc_simplify_matmul): Set return type correctly.
2018-01-20 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/83900
* gfortran.dg/matmul_18.f90: New test.
From-SVN: r256919
Richard Sandiford [Sat, 20 Jan 2018 13:43:22 +0000 (13:43 +0000)]
Fix vect_def_type handling in x86 scatter support (PR 83940)
As Jakub says in the PR, the problem here was that the x86/built-in
version of the scatter support was using a bogus scatter_src_dt
when calling vect_get_vec_def_for_stmt_copy (and had since it
was added). The patch uses the vect_def_type from the original
call to vect_is_simple_use instead.
However, Jakub also pointed out that other parts of the load and store
code passed the vector operand rather than the scalar operand to
vect_is_simple_use. That probably works most of the time since
a constant scalar operand should give a constant vector operand,
and likewise for external and internal definitions. But it
definitely seems more robust to pass the scalar operand.
The patch avoids the issue for gather and scatter offsets by
using the cached gs_info.offset_dt. This is safe because gathers
and scatters are never grouped, so there's only one statement operand
to consider. The patch also caches the vect_def_type for mask operands,
which is safe because grouped masked operations share the same mask.
That just leaves the store rhs. We still need to recalculate the
vect_def_type there since different store values in the group can
have different definition types. But since we still have access
to the original scalar operand, it seems better to use that instead.
2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
gcc/
PR tree-optimization/83940
* tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
offset_dt to vect_constant_def rather than vect_unknown_def_type.
(vect_check_load_store_mask): Add a mask_dt_out parameter and
use it to pass back the definition type.
(vect_check_store_rhs): Likewise rhs_dt_out.
(vect_build_gather_load_calls): Add a mask_dt argument and use
it instead of a call to vect_is_simple_use.
(vectorizable_store): Update calls to vect_check_load_store_mask
and vect_check_store_rhs. Use the dt returned by the latter instead
of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
instead of calls to vect_is_simple_use. Pass the scalar rather
than the vector operand to vect_is_simple_use when handling
second and subsequent copies of an rhs value.
(vectorizable_load): Update calls to vect_check_load_store_mask
and vect_build_gather_load_calls. Use the cached mask_dt and
gs_info.offset_dt instead of calls to vect_is_simple_use.
gcc/testsuite/
PR tree-optimization/83940
* gcc.dg/torture/pr83940.c: New test.
From-SVN: r256918
Jakub Jelinek [Sat, 20 Jan 2018 09:58:31 +0000 (10:58 +0100)]
re PR middle-end/83945 (internal compiler error: Segmentation fault with -O -fcode-hoisting)
PR middle-end/83945
* tree-emutls.c: Include gimplify.h.
(lower_emutls_2): New function.
(lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
it before further processing.
* gcc.dg/tls/pr83945.c: New test.
From-SVN: r256916
Jakub Jelinek [Sat, 20 Jan 2018 09:54:06 +0000 (10:54 +0100)]
re PR target/83930 (ICE: RTL check: expected code 'const_int', have 'mem' in simplify_binary_operation_1, at simplify-rtx.c:3302)
PR target/83930
* simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
UINTVAL (trueop1) instead of INTVAL (op1).
* gcc.dg/pr83930.c: New test.
From-SVN: r256915
Steven G. Kargl [Sat, 20 Jan 2018 06:15:55 +0000 (06:15 +0000)]
re PR fortran/83900 (ICE in gfc_simplify_matmul, at fortran/simplify.c:4593)
2018-01-19 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/83900
* simplify.c (gfc_simplify_matmul): Delete bogus assertion.
2018-01-19 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/83900
* gfortran.dg/matmul_17.f90: New test.
From-SVN: r256912
GCC Administrator [Sat, 20 Jan 2018 00:16:35 +0000 (00:16 +0000)]
Daily bump.
From-SVN: r256911
Steven G. Kargl [Fri, 19 Jan 2018 23:28:18 +0000 (23:28 +0000)]
re PR fortran/80768 (NULL pointer dereferenced in gfc_check_num_images at fortran/check.c)
2018-01-19 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/80768
* gfortran.dg/num_images_1.f90: New test that tests fix in r250734.
From-SVN: r256906
Jakub Jelinek [Fri, 19 Jan 2018 22:37:37 +0000 (23:37 +0100)]
re PR c++/81167 (ICE on valid C++ code in deferred_printed_type, at cp/error.c:118)
PR c++/81167
* call.c (joust): Use TREE_TYPE (source) if source is
a POINTER_TYPE_P rather than if ! DECL_CONSTRUCTOR_P (w->fn).
* g++.dg/cpp0x/pr81167.C: New test.
From-SVN: r256905
Jakub Jelinek [Fri, 19 Jan 2018 22:36:04 +0000 (23:36 +0100)]
re PR debug/81570 (create_pseudo_cfg assumes that INCOMING_FRAME_SP_OFFSET is a constant)
PR debug/81570
PR debug/83728
* dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
INCOMING_FRAME_SP_OFFSET if not defined.
(scan_trace): Add ENTRY argument. If true and
DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
emit a note to adjust the CFA offset.
(create_cfi_notes): Adjust scan_trace callers.
(create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
INCOMING_FRAME_SP_OFFSET in the CIE.
* config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
* config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
Likewise.
* doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
* doc/tm.texi: Regenerated.
From-SVN: r256904
Jakub Jelinek [Fri, 19 Jan 2018 22:35:09 +0000 (23:35 +0100)]
re PR c++/83919 (spurious -Wignored-qualifiers warning)
PR c++/83919
* typeck.c (convert_for_assignment): Suppress warn_ignored_qualifiers
for direct enum init.
* decl.c (reshape_init): Likewise.
* g++.dg/cpp0x/pr83919.C: New test.
From-SVN: r256903
Andreas Krebbel [Fri, 19 Jan 2018 22:16:30 +0000 (22:16 +0000)]
re PR rtl-optimization/83147 (LRA inheritance undo on multiple sets problem)
2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
PR rtl-optimization/83147
* lra-constraints.c (remove_inheritance_pseudos): Use
lra_substitute_pseudo_within_insn.
From-SVN: r256902
Marek Polacek [Fri, 19 Jan 2018 20:52:21 +0000 (20:52 +0000)]
* constexpr.c (fold_simple): Simplify.
From-SVN: r256899
Jeff Law [Fri, 19 Jan 2018 18:42:30 +0000 (11:42 -0700)]
stack-check-16.c: New test.
* gcc.dg/stack-check-16.c: New test.
Co-Authored-By: Jakub Jelinek <jakub@redhat.com>
From-SVN: r256896
Tony Reix [Fri, 19 Jan 2018 17:45:24 +0000 (17:45 +0000)]
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
Tom de Vries [Fri, 19 Jan 2018 16:29:41 +0000 (16:29 +0000)]
[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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
GCC Administrator [Fri, 19 Jan 2018 00:16:14 +0000 (00:16 +0000)]
Daily bump.
From-SVN: r256870
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Boris Kolpackov [Thu, 18 Jan 2018 12:36:31 +0000 (12:36 +0000)]
Add Boris Kolpackov <boris@codesynthesis.com> to MAINTAINERS
From-SVN: r256844
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
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
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
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
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
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
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
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
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
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
GCC Administrator [Thu, 18 Jan 2018 00:16:22 +0000 (00:16 +0000)]
Daily bump.
From-SVN: r256827
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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