Nathan Sidwell [Wed, 14 Feb 2018 16:31:26 +0000 (16:31 +0000)]
[C++ PATCH]: instantiation via vtable marking
https://gcc.gnu.org/ml/gcc-patches/2018-02/msg00850.html
gcc/cp/
* decl2.c (mark_vtable_entries): Set input_location to decl's.
(c_parse_final_cleanups): Restore input_location after emitting
vtables.
gcc/testsuite/
* g++.dg/template/instantiate5.C: Adjust required-from loc.
From-SVN: r257665
Will Schmidt [Wed, 14 Feb 2018 15:47:54 +0000 (15:47 +0000)]
altivec-consts.c: Update compile stanzas.
[testsuite]
2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
* gcc.target/powerpc/altivec-consts.c: Update compile stanzas.
* gcc.target/powerpc/le-altivec-consts.c: Same.
From-SVN: r257664
Will Schmidt [Wed, 14 Feb 2018 15:32:02 +0000 (15:32 +0000)]
re PR target/84220 (rs6000 builtin __builtin_vec_sld() ICEs on invalid 3rd argument)
[gcc]
2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
PR target/84220
* config/rs6000/rs6000-c.c: Update definitions for
ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
[testsuite]
2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
PR target/84220
* gcc.target/powerpc/pr84220-sld.c: New test.
* gcc.target/powerpc/pr84220-sld2.c: New test.
* gcc.target/powerpc/pr84220-sldw.c: New test.
* gcc.target/powerpc/pr84220-xxperm.c: New test.
* gcc.target/powerpc/pr84220-xxsld.c: New test.
From-SVN: r257662
Igor Tsimbalist [Wed, 14 Feb 2018 15:06:21 +0000 (16:06 +0100)]
Reimplement CET intrinsics for rdssp/incssp insn.
Introduce a couple of new CET intrinsics for reading and updating a
shadow stack pointer (_get_ssp and _inc_ssp). They replace the existing
_rdssp[d|q] and _incssp[d|q] instrinsics.
PR target/84239
* gcc/config/i386/cetintrin.h: Remove _rdssp[d|q] and
add _get_ssp intrinsics. Remove argument from
__builtin_ia32_rdssp[d|q].
* gcc/config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
* gcc/config/i386/i386-builtin.def: Remove argument from
__builtin_ia32_rdssp[d|q].
* gcc/config/i386/i386.c: Use UINT_FTYPE_VOID. Use
ix86_expand_special_args_builtin for _rdssp[d|q].
* gcc/config/i386/i386.md: Remove argument from rdssp[si|di] insn.
Clear register before usage.
* doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
Add documentation for new _get_ssp and _inc_ssp intrinsics.
* testsuite/gcc.target/i386/cet-intrin-3.c: Use new _get_ssp and
_inc_ssp intrinsics.
* testsuite/gcc.target/i386/cet-intrin-4.c: Likewise.
* testsuite/gcc.target/i386/cet-rdssp-1.c: Remove argument from
__builtin_ia32_rdssp[d|q].
* libgcc/config/i386/shadow-stack-unwind.hi (_Unwind_Frames_Extra):
Use new _get_ssp and _inc_ssp intrinsics.
From-SVN: r257660
Paolo Carlini [Wed, 14 Feb 2018 14:19:50 +0000 (14:19 +0000)]
cp-tree.h (do_auto_deduction (tree, tree, tree)): Remove.
2018-02-14 Paolo Carlini <paolo.carlini@oracle.com>
* cp-tree.h (do_auto_deduction (tree, tree, tree)): Remove.
(do_auto_deduction (tree, tree, tree, tsubst_flags_t,
auto_deduction_context, tree, int): Add defaults.
* pt.c (do_auto_deduction (tree, tree, tree)): Remove definition.
(tsubst_omp_for_iterator): Adjust do_auto_deduction call, forward
tsubst_flags_t argument.
* init.c (build_new): Likewise.
From-SVN: r257659
Jakub Jelinek [Wed, 14 Feb 2018 14:19:36 +0000 (15:19 +0100)]
re PR other/82368 (with r253275 several new test cases in libbacktrace fail)
PR other/82368
* elf.c (EM_PPC64, EF_PPC64_ABI): Undefine and define.
(struct elf_ppc64_opd_data): New type.
(elf_initialize_syminfo): Add opd argument, handle symbols
pointing into the PowerPC64 ELFv1 .opd section.
(elf_add): Read .opd section on PowerPC64 ELFv1, pass pointer
to structure with .opd data to elf_initialize_syminfo.
From-SVN: r257658
Richard Sandiford [Wed, 14 Feb 2018 13:14:51 +0000 (13:14 +0000)]
Check array indices in object_address_invariant_in_loop_p (PR 84357)
object_address_invariant_in_loop_p ignored ARRAY_REF indices on
the basis that:
/* Index of the ARRAY_REF was zeroed in analyze_indices, thus we only
need to check the stride and the lower bound of the reference. */
That was true back in 2007 when the code was added:
static void
dr_analyze_indices (struct data_reference *dr, struct loop *nest)
{
[...]
while (handled_component_p (aref))
{
if (TREE_CODE (aref) == ARRAY_REF)
{
op = TREE_OPERAND (aref, 1);
access_fn = analyze_scalar_evolution (loop, op);
access_fn = resolve_mixers (nest, access_fn);
VEC_safe_push (tree, heap, access_fns, access_fn);
TREE_OPERAND (aref, 1) = build_int_cst (TREE_TYPE (op), 0);
}
aref = TREE_OPERAND (aref, 0);
}
but the assignment was removed a few years ago. We were therefore
treating "two->arr[i]" and "three->arr[i]" as loop invariant.
2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
gcc/
PR tree-optimization/84357
* tree-data-ref.c (object_address_invariant_in_loop_p): Check
operand 1 of an ARRAY_REF too.
gcc/testsuite/
PR tree-optimization/84357
* gcc.dg/vect/pr84357.c: New test.
From-SVN: r257657
Oleg Endo [Wed, 14 Feb 2018 12:33:37 +0000 (12:33 +0000)]
re PR target/83831 ([RX] Unused bclr,bnot,bset insns)
gcc/
PR target/83831
* config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
declarations.
(set_of_reg): New struct.
(rx_find_set_of_reg, rx_find_use_of_reg): New functions.
* config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
functions.
* config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
Split into bitclr, bitset, bitinvert patterns if appropriate.
(*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
use rx_fuse_in_memory_bitop.
(*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
to named insn, correct maximum insn length.
gcc/testsuite/
PR target/83831
* gcc.target/rx/pr83831.c: New tests.
From-SVN: r257655
Jakub Jelinek [Wed, 14 Feb 2018 12:12:15 +0000 (13:12 +0100)]
re PR fortran/84313 ([F08] reject procedure pointers in COMMON blocks)
PR fortran/84313
* testsuite/libgomp.fortran/threadprivate4.f90: Add
-std=f2003 -fall-intrinsics into dg-additional-options.
From-SVN: r257654
Jozef Lawrynowicz [Wed, 14 Feb 2018 07:21:11 +0000 (07:21 +0000)]
re PR target/79242 (ICE in simplify_subreg, at simplify-rtx.c:6029)
2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
PR target/79242
* machmode.def: Define a complex mode for PARTIAL_INT.
* genmodes.c (complex_class): Return MODE_COMPLEX_INT for
MODE_PARTIAL_INT.
* doc/rtl.texi: Document CSPImode.
* config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
handling.
(msp430_hard_regno_nregs_with_padding): Likewise.
PR target/79242
* gcc.target/msp430/pr79242.c: New test.
From-SVN: r257653
GCC Administrator [Wed, 14 Feb 2018 00:16:14 +0000 (00:16 +0000)]
Daily bump.
From-SVN: r257651
Peter Bergner [Tue, 13 Feb 2018 23:29:38 +0000 (17:29 -0600)]
re PR target/84372 (test case gcc.target/powerpc/lvsl-lvsr.c fails on power9)
PR target/84372
* gcc.target/powerpc/lvsl-lvsr.c: Also match lxv when compiling
with -mcpu=power9.
From-SVN: r257648
Peter Bergner [Tue, 13 Feb 2018 23:05:59 +0000 (17:05 -0600)]
re PR target/84279 (powerpc64le ICE on cvc4)
gcc/
PR target/84279
* config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
gcc/testsuite/
PR target/84279
* g++.dg/pr84279.C: New test.
From-SVN: r257647
Jeff Law [Tue, 13 Feb 2018 22:43:36 +0000 (15:43 -0700)]
Add another PR marker to Alex's change.
From-SVN: r257646
Jeff Law [Tue, 13 Feb 2018 22:38:42 +0000 (15:38 -0700)]
Add PR marker for one of Alex's changes
From-SVN: r257645
Segher Boessenkool [Tue, 13 Feb 2018 22:12:55 +0000 (23:12 +0100)]
combine: Update links correctly for new I2 (PR84169)
If there is a LOG_LINK between two insns, this means those two insns
can be combined, as far as dataflow is concerned. There never should
be a LOG_LINK between two unrelated insns. If there is one, combine
will try to combine the insns without doing all the needed checks if
the earlier destination is used before the later insn, etc.
Unfortunately we do not update the LOG_LINKs correctly in some cases.
This patch fixes at least some of those cases.
PR rtl-optimization/84169
* combine.c (try_combine): New variable split_i2i3. Set it to true if
we generated a parallel as new i3 and we split that to new i2 and i3
instructions. Handle split_i2i3 similar to swap_i2i3: scan the
LOG_LINKs of i3 to see which of those need to link to i2 now. Link
those to i2, not i1. Partially rewrite this scan code.
gcc/testsuite/
PR rtl-optimization/84169
* gcc.c-torture/execute/pr84169.c: New.
From-SVN: r257644
Peter Bergner [Tue, 13 Feb 2018 22:04:00 +0000 (16:04 -0600)]
re PR testsuite/84370 (Invalid option used in test case gcc.target/powerpc/builtins-3-p9-runnable.c)
PR target/84370
* gcc.target/powerpc/builtins-3-p9-runnable.c: Remove deprecated option.
From-SVN: r257642
Peter Bergner [Tue, 13 Feb 2018 21:52:12 +0000 (15:52 -0600)]
re PR target/84365 (gcc.target/powerpc/altivec-7-le.c fails on power9)
PR target/84365
* gcc.target/powerpc/altivec-7-le.c: Also match lxv when compiling
with -mcpu=power9.
From-SVN: r257641
Jakub Jelinek [Tue, 13 Feb 2018 21:40:35 +0000 (22:40 +0100)]
re PR c++/84364 (-Weffc++ warns on "return *this" in template after r253599)
PR c++/84364
* typeck.c (check_return_expr): Don't emit -Weffc++ warning
about return other than *this in assignment operators if
retval is type dependent expression.
* g++.dg/warn/effc4.C: New test.
From-SVN: r257640
Joseph Myers [Tue, 13 Feb 2018 21:32:49 +0000 (21:32 +0000)]
* fr.po: Update.
From-SVN: r257639
Paolo Carlini [Tue, 13 Feb 2018 21:23:22 +0000 (21:23 +0000)]
re PR c++/84333 (ICE with ternary operator in template function)
/cp
2018-02-13 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/84333
* call.c (build_conditional_expr_1): Use cp_save_expr instead of
save_expr for the G++ extension.
/testsuite
2018-02-13 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/84333
* g++.dg/template/sizeof16.C: New.
* g++.dg/template/sizeof17.C: Likewise.
From-SVN: r257638
Ian Lance Taylor [Tue, 13 Feb 2018 21:15:41 +0000 (21:15 +0000)]
compiler: don't export function descriptors for unexported names
They aren't needed, and could potentially cause unlikely symbol name
collisions. Also, the runtime package's reference to main could cause
the runtime package to define main.main..f, which could also be
defined in the main package if it does something like fmt.Print(main).
That will normally work but will fail with a multiple symbol
definition error when using -static-libgo.
Reviewed-on: https://go-review.googlesource.com/93656
From-SVN: r257637
Janus Weil [Tue, 13 Feb 2018 21:00:37 +0000 (22:00 +0100)]
re PR fortran/84313 ([F08] reject procedure pointers in COMMON blocks)
2018-02-13 Janus Weil <janus@gcc.gnu.org>
PR fortran/84313
* symbol.c (check_conflict): Reject procedure pointers in common blocks.
2018-02-13 Janus Weil <janus@gcc.gnu.org>
PR fortran/84313
* gfortran.dg/proc_ptr_common_1.f90: Fix invalid test case,
add necessary compiler options.
* gfortran.dg/proc_ptr_common_2.f90: Add missing error message.
From-SVN: r257636
Jakub Jelinek [Tue, 13 Feb 2018 20:23:58 +0000 (21:23 +0100)]
re PR c/82210 (Having _Alignas in a struct with VLAs causes writing to one array to overwrite another)
PR c/82210
* stor-layout.c (place_field): For variable length fields, adjust
offset_align afterwards not just based on the field's alignment,
but also on the size.
* gcc.c-torture/execute/pr82210.c: New test.
From-SVN: r257635
Jakub Jelinek [Tue, 13 Feb 2018 20:22:50 +0000 (21:22 +0100)]
re PR middle-end/84309 (Wrong-code with -ffast-math)
PR middle-end/84309
* match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
of exps and logs in the use_exp2 case.
* gcc.dg/pr84309-2.c: New test.
From-SVN: r257634
Jeff Law [Tue, 13 Feb 2018 18:36:51 +0000 (11:36 -0700)]
rl78.c (rl78_attribute_table): Fix terminator and entry for "vector".
2018-02-13 Jeff Law <law@redhat.com>
* config/rl/rl78.c (rl78_attribute_table): Fix terminator and
entry for "vector".
From-SVN: r257633
Jeff Law [Tue, 13 Feb 2018 18:17:23 +0000 (11:17 -0700)]
rl78.c (rl78_handle_func_attribute): Mark ARGS as unused.
* config/rl78/rl78.c (rl78_handle_func_attribute): Mark
ARGS as unused.
From-SVN: r257632
Alexandre Oliva [Tue, 13 Feb 2018 16:18:37 +0000 (16:18 +0000)]
common.opt (gas-loc-support, [...]): New.
* common.opt (gas-loc-support, gas-locview-support): New.
(ginline-points, ginternal-reset-location-views): New.
* doc/invoke.texi: Document them. Use @itemx where intended.
(gvariable-location-views): Adjust.
* target.def (reset_location_view): New.
* doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
(TARGET_RESET_LOCATION_VIEW): New.
* doc/tm.texi: Rebuilt.
* dwarf2out.c (dwarf2out_default_as_loc_support): New.
(dwarf2out_default_as_locview_support): New.
(output_asm_line_debug_info): Use option variables.
(dwarf2out_maybe_output_loclist_view_pair): Likewise.
(output_loc_list): Likewise.
(add_high_low_attributes): Check option variables.
Don't output entry view attribute in strict mode.
(gen_inlined_subroutine_die): Check option variables.
(dwarf2out_inline_entry): Likewise.
(init_sections_and_labels): Likewise.
(dwarf2out_early_finish): Likewise.
(maybe_reset_location_view): New, from...
(dwarf2out_var_location): ... here. Call it.
* debug.h (dwarf2out_default_as_loc_support): Declare.
(dwarf2out_default_as_locview_support): Declare.
* hooks.c (hook_int_rtx_insn_0): New.
* hooks.h (hook_int_rtx_insn_0): Declare.
* toplev.c (process_options): Take -gas-loc-support and
-gas-locview-support from dwarf2out. Enable
-gvariable-location-views by default only with locview
assembler support. Enable -ginternal-reset-location-views by
default only if the target defines the corresponding hook.
Enable -ginline-points by default if location views are
enabled; force it disabled if statement frontiers are
disabled.
* tree-inline.c (expand_call_inline): Check option variables.
* tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
From-SVN: r257631
Jason Merrill [Tue, 13 Feb 2018 15:57:00 +0000 (10:57 -0500)]
PR c++/84080 - ICE with return type deduction and specialization.
* pt.c (determine_specialization): Check uses_template_parms.
From-SVN: r257630
Richard Sandiford [Tue, 13 Feb 2018 15:48:38 +0000 (15:48 +0000)]
re PR tree-optimization/84321 (ice in intersect_range_with_nonzero_bits, at tree-vrp.c:213)
2018-02-12 Richard Sandiford <richard.sandiford@linaro.org>
gcc/
PR tree-optimization/84321
* tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
handling. Also check whether the anti-range contains any values
that satisfy the mask; switch to a VR_RANGE if not.
gcc/testsuite/
PR tree-optimization/84321
* gcc.dg/pr84321.c: New test.
From-SVN: r257629
Vladimir Makarov [Tue, 13 Feb 2018 14:57:17 +0000 (14:57 +0000)]
re PR target/84359 (gcc.target/i386/pr57193.c fail)
2018-02-13 Vladimir Makarov <vmakarov@redhat.com>
PR target/84359
* gcc.target/i386/57193.c: Add -march=x86-64.
From-SVN: r257628
Jason Merrill [Tue, 13 Feb 2018 14:22:07 +0000 (09:22 -0500)]
Fix more variadic capture issues.
* pt.c (find_parameter_packs_r): Also look at explicit captures.
(check_for_bare_parameter_packs): Check current_class_type for
lambda context.
(extract_locals_r): Handle seeing a full instantiation of a pack.
(tsubst_pack_expansion): Likewise. Force lambda capture.
* parser.c (cp_parser_lambda_introducer): Don't
check_for_bare_parameter_packs.
From-SVN: r257627
Jason Merrill [Tue, 13 Feb 2018 14:22:01 +0000 (09:22 -0500)]
PR c++/84338 - wrong variadic sizeof.
* pt.c (argument_pack_select_arg): Like the macro, but look through
a pack expansion.
(tsubst, tsubst_copy, dependent_template_arg_p): Use it.
(extract_fnparm_pack): Do make_pack_expansion.
(extract_locals_r): Do strip a pack expansion.
* cp-tree.h (ARGUMENT_PACK_SELECT_ARG): Remove.
From-SVN: r257626
Paolo Bonzini [Tue, 13 Feb 2018 13:03:22 +0000 (13:03 +0000)]
re PR sanitizer/84340 (g++.dg/asan/use-after-scope-types-1.C (and others) fails after r257585)
gcc:
2018-02-13 Paolo Bonzini <bonzini@gnu.org>
PR sanitizer/84340
* internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
gcc/testsuite:
2018-02-13 Paolo Bonzini <bonzini@gnu.org>
PR sanitizer/84307
* gcc.dg/asan/pr84307.c: Remove test.
From-SVN: r257625
Maciej W. Rozycki [Tue, 13 Feb 2018 13:01:33 +0000 (13:01 +0000)]
WebAssembly: Disable subdirectory configuration for unsupported LD
Remove an LD subdirectory configuration error:
*** ld does not support target wasm32-unknown-none
*** see ld/configure.tgt for supported targets
make[1]: *** [configure-ld] Error 1
which prevents binutils for the WebAssembly target from being built
unless an explicit `--disable-ld' configuration option has been given.
Users must not have to disable features selected by default to get a
working configuration.
/
* configure.ac <wasm32-*-*> (noconfigdirs): Add `ld'.
* configure: Regenerate.
From-SVN: r257624
Martin Jambor [Tue, 13 Feb 2018 12:25:36 +0000 (13:25 +0100)]
[PR 83990] Fix location handling in ipa_modify_call_arguments
2018-02-13 Martin Jambor <mjambor@suse.cz>
PR c++/83990
* ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
of call statements, also set location of a load to a temporary.
From-SVN: r257623
Sebastian Perta [Tue, 13 Feb 2018 11:55:39 +0000 (11:55 +0000)]
rl78.c (add_vector_labels): New function.
2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
* config/rl78/rl78.c (add_vector_labels): New function.
* config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
* config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
* config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
which checks that no arguments are passed.
* config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
* doc/extend.texi: Documentation for the new attribute.
2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
* gcc.target/rl78/test_auto_vector.c: New test.
From-SVN: r257622
Andreas Schwab [Tue, 13 Feb 2018 11:21:01 +0000 (11:21 +0000)]
RISC-V: define _REENTRANT with -pthread
This is expected by the AX_PTHREAD autoconf macro from
<http://www.gnu.org/software/autoconf-archive/ax_pthread.html>.
* config/riscv/linux.h (CPP_SPEC): Define.
From-SVN: r257621
Richard Sandiford [Tue, 13 Feb 2018 10:28:54 +0000 (10:28 +0000)]
Add a DECL_EXPR for VLA pointer casts (PR 84305)
This PR was about a case in which we ended up with a MULT_EXPR
that was shared between an ungimplified VLA type and a pointer
calculation. The SSA names used in the pointer calculation were
later freed, but they were still there in the VLA, and caused an
ICE when remapping the types during inlinling.
The fix is to add a DECL_EXPR that forces the VLA type sizes to be
gimplified too, but the tricky part is deciding where. As the comment
in grokdeclarator says, we can't just add it to the statement list,
since the size might only be conditionally evaluated. It might also
end up being evaluated out of sequence.
The patch gets around that by putting the DECL_EXPR in a BIND_EXPR
and adding the BIND_EXPR to the list of things that need to be
evaluated for the declarator.
2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
gcc/c/
PR c/84305
* c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
and include the BIND_EXPR in the list of things that need to be
pre-evaluated.
gcc/testsuite/
PR c/84305
* gcc.c-torture/compile/pr84305.c: New test.
From-SVN: r257620
Jakub Jelinek [Tue, 13 Feb 2018 09:12:47 +0000 (10:12 +0100)]
re PR target/84335 (ICE on invalid code in copy_to_mode_reg, at explow.c:612)
PR target/84335
* config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
OPTION_MASK_ISA_AES as first argument to def_builtin_const
for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
instead of OPTION_MASK_ISA_PCLMUL as first argument to
def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
* config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
temporarily for AES and PCLMUL builtins.
* gcc.target/i386/pr84335.c: New test.
From-SVN: r257619
Jakub Jelinek [Tue, 13 Feb 2018 08:35:53 +0000 (09:35 +0100)]
re PR tree-optimization/84339 (Wrong-code with optimizing strlen)
PR tree-optimization/84339
* gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
Formatting fixes.
* gcc.c-torture/execute/pr84339.c: New test.
From-SVN: r257618
Jakub Jelinek [Tue, 13 Feb 2018 08:34:42 +0000 (09:34 +0100)]
re PR middle-end/84309 (Wrong-code with -ffast-math)
PR middle-end/84309
* match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
* generic-match-head.c (canonicalize_math_after_vectorization_p): New
inline function.
* gimple-match-head.c (canonicalize_math_after_vectorization_p): New
inline function.
* omp-simd-clone.h: New file.
* omp-simd-clone.c: Include omp-simd-clone.h.
(expand_simd_clones): No longer static.
* tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
cgraph.h and omp-simd-clone.h.
(vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
(vect_recog_widen_shift_pattern): Formatting fix.
(vect_pattern_recog_1): Don't check optab for calls.
* gcc.dg/pr84309.c: New test.
* gcc.target/i386/pr84309.c: New test.
From-SVN: r257617
Jakub Jelinek [Tue, 13 Feb 2018 08:31:58 +0000 (09:31 +0100)]
re PR target/84336 (ICE in extract_insn, at recog.c:2304)
PR target/84336
* config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
operands[2] into a REG before using gen_lowpart on it.
* gcc.target/i386/pr84336.c: New test.
From-SVN: r257616
Alastair McKinstry [Tue, 13 Feb 2018 07:59:10 +0000 (07:59 +0000)]
Make module files reproducible
Using lbasename ensures that the build path does not end up in the
module file.
Regtested on x86_64-pc-linux-gnu, committed to trunk. Will shortly
backport to the 6 and 7 branches as well.
2018-02-13 Alastair McKinstry <alastair.mckinstry@sceal.ie>
Janne Blomqvist <jb@gcc.gnu.org>
* module.c (dump_module): Use lbasename to ensure that module
files are reproducible.
Co-Authored-By: Janne Blomqvist <jb@gcc.gnu.org>
From-SVN: r257613
Jeff Law [Tue, 13 Feb 2018 03:07:04 +0000 (20:07 -0700)]
re PR target/83760 ([SH] ICE in maybe_record_trace_start building glibc tst-copy_file_range.c)
PR target/83760
* config/sh/sh.c (find_barrier): Consider a sibling call
a barrier as well.
From-SVN: r257611
GCC Administrator [Tue, 13 Feb 2018 00:16:21 +0000 (00:16 +0000)]
Daily bump.
From-SVN: r257610
Jakub Jelinek [Mon, 12 Feb 2018 22:25:41 +0000 (23:25 +0100)]
re PR c++/84341 (ICE with #pragma omp atomic)
PR c++/84341
* parser.c (cp_parser_binary_expression): Use build_min instead of
build2_loc to build the no_toplevel_fold_p toplevel binary expression.
* c-c++-common/gomp/pr84341.c: New test.
From-SVN: r257607
Joseph Myers [Mon, 12 Feb 2018 21:31:23 +0000 (21:31 +0000)]
* sv.po: Update.
From-SVN: r257606
Thomas Koenig [Mon, 12 Feb 2018 20:51:16 +0000 (20:51 +0000)]
re PR fortran/68746 (FAIL: gfortran.dg/read_dir.f90 -O0 execution test)
2018-02-12 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/68746
* gfortran.dg/read_dir.f90: Re-add dg-do run.
From-SVN: r257605
Thomas Koenig [Mon, 12 Feb 2018 20:48:32 +0000 (20:48 +0000)]
re PR fortran/68746 (FAIL: gfortran.dg/read_dir.f90 -O0 execution test)
2018-02-12 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/68746
* gfortran.dg/read_dir.f90: Remove xfails. Also allow iostat
of zero for read.
From-SVN: r257604
Thomas Koenig [Mon, 12 Feb 2018 19:53:17 +0000 (19:53 +0000)]
libgfortran.h (GFC_ARRAY_DESCRIPTOR): Remove dimension of descriptor to use vaiable members for dim.
2018-02-12 Thomas Koenig <tkoenig@gcc.gnu.org>
* libgfortran.h (GFC_ARRAY_DESCRIPTOR): Remove dimension
of descriptor to use vaiable members for dim.
Change usage of GFC_ARRAY_DESCRIPTOR accordingly.
(GFC_FILL_ARRAY_DESCRIPTOR): New macro.
(gfc_full_array_i4): New type.
* intrinsics/date_and_time.c (secnds): Use sizeof
(gfc_array_i4) + sizeof (descriptor_dimension) for memory
allocation.
* intrinsics/reshape_generic.c: Use GFC_FULL_ARRAY_DESCRIPTOR.
* io/format.c: Use sizeof (gfc_array_i4) + sizeof
(descriptor_dimension) for memoy allocation.
* io/list_read.c (list_formatted_read_scalar): Use
gfc_full_array_i4 for variable.
(nml_read_obj): Likewise.
* io/write.c (list_formatted_write_scalar): Likewise.
(nml_write_obj): Likewise.
* m4/reshape.m4: Use GFC_FULL_ARRAY_DESCRIPTOR.
* generated/reshape_c10.c: Regenerated.
* generated/reshape_c16.c: Regenerated.
* generated/reshape_c4.c: Regenerated.
* generated/reshape_c8.c: Regenerated.
* generated/reshape_i16.c: Regenerated.
* generated/reshape_i4.c: Regenerated.
* generated/reshape_i8.c: Regenerated.
* generated/reshape_r10.c: Regenerated.
* generated/reshape_r16.c: Regenerated.
* generated/reshape_r4.c: Regenerated.
* generated/reshape_r8.c: Regenerated.
From-SVN: r257601
Ian Lance Taylor [Mon, 12 Feb 2018 19:29:52 +0000 (19:29 +0000)]
compiler: error on func declaration/definition
Long long long ago Go permitted writing
func F()
in one file and writing
func F() {}
in another file. This was removed from the language, and that is now
considered to be a multiple definition error. Gccgo never caught up
to that, and it has been permitting this invalid code for some time.
Stop permitting it, so that we give correct errors. Since we've
supported it for a long time, the compiler uses it in a couple of
cases: it predeclares the hash/equal methods if it decides to create
them while compiling another function, and it predeclares main.main as
a mechanism for getting the right warning if a program uses the wrong
signature for main. For simplicity, keep those existing uses.
This required a few minor changes in libgo which were relying,
unnecessarily, on the current behavior.
Reviewed-on: https://go-review.googlesource.com/93083
From-SVN: r257600
Ian Lance Taylor [Mon, 12 Feb 2018 18:50:16 +0000 (18:50 +0000)]
re PR go/84215 (Random results in go/libgo tests)
PR go/84215
runtime, sync/atomic: use write barrier for atomic pointer functions
This copies atomic_pointer.go from 1.10rc2. It was omitted during the
transition of the runtime from C to Go, and I forgot about it.
This may help with https://gcc.gnu.org/PR84215.
Reviewed-on: https://go-review.googlesource.com/93197
From-SVN: r257599
Jeff Law [Mon, 12 Feb 2018 18:32:18 +0000 (11:32 -0700)]
cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when successfully back substituting a reg.
* cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
successfully back substituting a reg.
* gcc.c-torture/compile/reg-args-size.c: New test.
From-SVN: r257598
Carl Love [Mon, 12 Feb 2018 17:21:28 +0000 (17:21 +0000)]
builtins-4-runnable.c (main): Move int128 and uint128 tests to new testfile.
gcc/testsuite/ChangeLog:
2018-02-12 Carl Love <cel@us.ibm.com>
* gcc.target/powerpc/builtins-4-runnable.c (main): Move int128 and
uint128 tests to new testfile.
* gcc.target/powerpc/builtins-4-int128-runnable.c: New testfile for
int128 and uint128 tests.
* gcc.target/powerpc/powerpc.exp: Add builtins-4-int128-runnable.c to
list of torture tests.
From-SVN: r257591
Janus Weil [Mon, 12 Feb 2018 17:11:58 +0000 (18:11 +0100)]
re PR fortran/84273 ([F03] Reject allocatable passed-object dummy argument (proc_ptr_47.f90))
2018-02-12 Janus Weil <janus@gcc.gnu.org>
PR fortran/84273
* resolve.c (resolve_component): Fix checks of passed argument in
procedure-pointer components.
2018-02-12 Janus Weil <janus@gcc.gnu.org>
PR fortran/84273
* gfortran.dg/proc_ptr_47.f90: Fix invalid test case.
* gfortran.dg/proc_ptr_comp_pass_4.f90: Fix and extend test case.
From-SVN: r257590
Richard Biener [Mon, 12 Feb 2018 13:55:04 +0000 (13:55 +0000)]
re PR tree-optimization/84037 (Speed regression of polyhedron benchmark since r256644)
2018-02-12 Richard Biener <rguenther@suse.de>
PR tree-optimization/84037
* tree-vect-slp.c (vect_analyze_slp_cost): Add visited
parameter, move visited init to caller.
(vect_slp_analyze_operations): Separate cost from validity
check, initialize visited once for all instances.
(vect_schedule_slp): Analyze map to CSE vectorized nodes once
for all instances.
* tree-vect-stmts.c (vect_model_simple_cost): Make early
out an assert.
(vect_model_promotion_demotion_cost): Likewise.
(vectorizable_bswap): Guard cost modeling with !slp_node
instead of !PURE_SLP_STMT to avoid double-counting on hybrid
SLP stmts.
(vectorizable_call): Likewise.
(vectorizable_conversion): Likewise.
(vectorizable_assignment): Likewise.
(vectorizable_shift): Likewise.
(vectorizable_operation): Likewise.
(vectorizable_store): Likewise.
(vectorizable_load): Likewise.
(vectorizable_condition): Likewise.
(vectorizable_comparison): Likewise.
From-SVN: r257588
Sebastian Perta [Mon, 12 Feb 2018 13:49:22 +0000 (13:49 +0000)]
Corrected mistakes in ChangeLog spotted by Jakub Jelinek.
From-SVN: r257587
Tamar Christina [Mon, 12 Feb 2018 12:52:29 +0000 (12:52 +0000)]
re PR target/82641 (Unable to enable crc32 for a certain function with target attribute on ARM (aarch32))
2018-02-12 Tamar Christina <tamar.christina@arm.com>
PR target/82641
* gcc.target/arm/pragma_arch_switch_2.c: Use armv5te.
From-SVN: r257586
Paolo Bonzini [Mon, 12 Feb 2018 12:47:56 +0000 (12:47 +0000)]
re PR sanitizer/84307 (asan blocks dead-store elimination)
gcc:
2018-02-12 Paolo Bonzini <bonzini@gnu.org>
PR sanitizer/84307
* internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
(ASAN_MARK): Fix fnspec to account for return value, change pointer
argument from 'R' to 'W' so that the pointed-to datum is clobbered.
gcc/testsuite:
2018-02-12 Paolo Bonzini <bonzini@gnu.org>
PR sanitizer/84307
* gcc.dg/asan/pr84307.c: New test.
From-SVN: r257585
Nathan Sidwell [Mon, 12 Feb 2018 11:58:40 +0000 (11:58 +0000)]
[PR c++/84263] GC ICE with decltype
https://gcc.gnu.org/ml/gcc-patches/2018-02/msg00435.html
PR c++/84263
* parser.c (cp_parser_decltype): Push and pop
deferring_access_checks. Reorganize to avoid goto.
* g++.dg/parse/pr84263.C: New.
From-SVN: r257584
Paolo Carlini [Mon, 12 Feb 2018 11:16:33 +0000 (11:16 +0000)]
re PR c++/79626 (ICE on invalid code in build_temp (call.c:6489))
2018-02-12 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/79626
* g++.dg/template/crash129.C: New.
From-SVN: r257583
Jan Hubicka [Mon, 12 Feb 2018 09:48:06 +0000 (10:48 +0100)]
re PR middle-end/83665 (Big code size regression and some code quality improvement at Jan 2 2018)
PR middle-end/83665
* params.def (inline-min-speedup): Increase from 8 to 15.
(max-inline-insns-auto): Decrease from 40 to 30.
* ipa-split.c (consider_split): Add some buffer for function to
be considered inlining candidate.
* invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
default values.
From-SVN: r257582
Richard Biener [Mon, 12 Feb 2018 08:54:28 +0000 (08:54 +0000)]
re PR tree-optimization/84037 (Speed regression of polyhedron benchmark since r256644)
2018-02-12 Richard Biener <rguenther@suse.de>
PR tree-optimization/84037
* tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
matched stmts if we cannot swap the non-matched ones.
From-SVN: r257581
Richard Biener [Mon, 12 Feb 2018 07:31:56 +0000 (07:31 +0000)]
re PR c++/84281 (Heap grows indefinitely)
2018-02-12 Richard Biener <rguenther@suse.de>
PR c++/84281
* constexpr.c (cxx_eval_vec_init_1): Use a RANGE_EXPR to compact
uniform constructors and delay allocating them fully.
From-SVN: r257580
Olga Makhotina [Mon, 12 Feb 2018 06:14:15 +0000 (06:14 +0000)]
Fix AVX-512 popcnt and bitalg tests.
gcc/testsuite/
PR target/83828
* gcc.target/i386/avx512bitalg-vpopcntb-1.c: Fix test.
* gcc.target/i386/avx512bitalg-vpopcntw-1.c: Ditto.
* gcc.target/i386/avx512bitalg-vpshufbitqmb-1.c: Ditto.
* gcc.target/i386/avx512vpopcntdq-vpopcntd-1.c: Ditto.
* gcc.target/i386/avx512vpopcntdq-vpopcntq-1.c: Ditto.
From-SVN: r257579
Olga Makhotina [Mon, 12 Feb 2018 06:09:20 +0000 (06:09 +0000)]
Add missing mask[z]_scalef_round_s[d,s] intrinsics
gcc/
* config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
_mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
_mm_maskz_scalef_round_ss): New intrinsics.
(__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
* config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
__builtin_ia32_scalefss_round): Remove.
(__builtin_ia32_scalefsd_mask_round,
__builtin_ia32_scalefss_mask_round): New intrinsics.
* config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
(vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
((match_operand:VF_128 2 "<round_nimm_predicate>"
"<round_constraint>")): Changed to ...
((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
"<round_scalar_constraint>")): ... this.
("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
%0, %1, %2<round_op3>}"): Changed to ...
("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
%0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
%2<round_scalar_mask_op3>}"): ... this.
* config/i386/subst.md (round_scalar_nimm_predicate): New.
gcc/testsuite/
* gcc.target/i386/avx512f-vscalefsd-1.c (_mm_mask_scalef_round_sd,
_mm_maskz_scalef_round_sd): Test new intrinsics.
* gcc.target/i386/avx512f-vscalefsd-2.c (_mm_scalef_round_sd,
_mm_mask_scalef_round_sd, _mm_maskz_scalef_round_sd): Test new
intrinsics.
* gcc.target/i386/avx512f-vscalefss-1.c (_mm_mask_scalef_round_ss,
_mm_maskz_scalef_round_ss): Test new intrinsics.
* gcc.target/i386/avx512f-vscalefss-2.c (_mm_scalef_round_ss,
_mm_mask_scalef_round_ss, _mm_maskz_scalef_round_ss): Test new
intrinsics.
* gcc.target/i386/avx-1.c (__builtin_ia32_scalefsd_round,
__builtin_ia32_scalefss_round): Remove builtin.
(__builtin_ia32_scalefsd_mask_round,
__builtin_ia32_scalefss_mask_round): Test new builtin.
* gcc.target/i386/sse-13.c: Ditto.
* gcc.target/i386/sse-23.c: Ditto.
From-SVN: r257578
Olga Makhotina [Mon, 12 Feb 2018 05:45:38 +0000 (05:45 +0000)]
Add missing ChangeLog entry for previous patch.
From-SVN: r257577
Olga Makhotina [Mon, 12 Feb 2018 05:44:29 +0000 (05:44 +0000)]
Add missing intrinsics for _mm_mask[z]_sqrt_round_[sd,ss]
gcc/
* config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
(_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
(_mm_maskz_sqrt_round_ss): New intrinsics.
(__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
(__builtin_ia32_sqrtsd_mask_round)
(__builtin_ia32_sqrtss_mask_round): New builtins.
* config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
(__builtin_ia32_sqrtss_round): Remove.
(__builtin_ia32_sqrtsd_mask_round)
(__builtin_ia32_sqrtss_mask_round): New builtins.
* config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
(vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
((match_operand:VF_128 1 "vector_operand"
"xBm,<round_constraint>")): Changed to ...
((match_operand:VF_128 1 "vector_operand"
"xBm,<round_scalar_constraint>")): ... this.
(vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
%0, %2, %<iptr>1<round_op3>}): Changed to ...
(vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
%0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
%<iptr>1<round_scalar_mask_op3>}): ... this.
((set_attr "prefix" "<round_prefix>")): Changed to ...
((set_attr "prefix" "<round_scalar_prefix>")): ... this.
gcc/testsuite/
* gcc.target/i386/avx512f-vsqrtsd-1.c (_mm_mask_sqrt_round_sd)
(_mm_maskz_sqrt_round_sd): Test new intrinsics.
* gcc.target/i386/avx512f-vsqrtsd-2.c (_mm_sqrt_round_sd)
(_mm_mask_sqrt_round_sd, _mm_maskz_sqrt_round_sd): Test new intrinsics.
* gcc.target/i386/avx512f-vsqrtss-1.c (_mm_mask_sqrt_round_ss)
(_mm_maskz_sqrt_round_ss): Test new intrinsics.
* gcc.target/i386/avx512f-vsqrtss-2.c (_mm_sqrt_round_ss)
(_mm_mask_sqrt_round_ss, _mm_maskz_sqrt_round_ss): Test new
intrinsics.
* gcc.target/i386/avx-1.c (__builtin_ia32_sqrtsd_round)
(__builtin_ia32_sqrtss_round): Remove builtins.
(__builtin_ia32_sqrtsd_mask_round)
(__builtin_ia32_sqrtss_mask_round): Test new builtins.
* gcc.target/i386/sse-13.c: Ditto.
* gcc.target/i386/sse-23.c: Ditto.
From-SVN: r257576
Jason Merrill [Mon, 12 Feb 2018 01:21:39 +0000 (20:21 -0500)]
PR c++/84036 - ICE with variadic capture.
Handle variadic capture proxies more like non-variadic.
* lambda.c (build_capture_proxy): Remove workaround.
* pt.c (find_parameter_packs_r): The proxy is a pack.
(instantiate_class_template_1): Remove dead lambda code.
(extract_fnparm_pack): Don't make_pack_expansion.
(extract_locals_r): Don't strip a pack expansion.
(tsubst_pack_expansion): Handle proxy packs. Use
PACK_EXPANSION_EXTRA_ARGS less.
(tsubst_decl) [FIELD_DECL]: Don't register_specialization.
(tsubst_copy) [FIELD_DECL]: Don't retrieve*_specialization.
[VAR_DECL]: Handle ARGUMENT_PACK_SELECT.
(tsubst_expr) [DECL_EXPR]: Handle proxy packs.
(tsubst_copy_and_build) [VAR_DECL]: Handle proxy packs normally.
From-SVN: r257575
GCC Administrator [Mon, 12 Feb 2018 00:16:14 +0000 (00:16 +0000)]
Daily bump.
From-SVN: r257574
Steven Munroe [Sun, 11 Feb 2018 21:45:39 +0000 (21:45 +0000)]
re PR target/84266 (mmintrin.h intrinsic headers for PowerPC code fails on power9)
Fix PR 84266
From-SVN: r257571
Francois-Xavier Coudert [Sun, 11 Feb 2018 19:07:55 +0000 (19:07 +0000)]
Commit ChangeLog entries forgotten in r257566.
2018-02-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
PR fortran/35299
ChangeLog for r257566
* gfortran.dg/statement_function_3.f: New test.
2018-02-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
PR fortran/35299
ChangeLog for r257566
* resolve.c (resolve_formal_arglist): Update error message.
From-SVN: r257568
Andre Vehreschild [Sun, 11 Feb 2018 18:59:59 +0000 (19:59 +0100)]
gfortran.texi: Fix typos in documentation of caf_register ().
gcc/fortran/ChangeLog:
2018-02-11 Andre Vehreschild <vehre@gcc.gnu.org>
* gfortran.texi: Fix typos in documentation of caf_register ().
* trans-array.c (structure_alloc_comps): Only register a component of
a derived typed corray, not of an ultimate component coarray.
From-SVN: r257567
Francois-Xavier Coudert [Sun, 11 Feb 2018 18:55:31 +0000 (18:55 +0000)]
re PR fortran/35299 (scope of variables in statement function do not acquire rank from host)
2018-02-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
PR fortran/35299
* gfortran.dg/statement_function_3.f: New test.
2018-02-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
PR fortran/35299
* resolve.c (resolve_formal_arglist): Update error message.
From-SVN: r257566
Steven G. Kargl [Sun, 11 Feb 2018 18:44:05 +0000 (18:44 +0000)]
re PR fortran/54223 (Statement function statement with dummy arguments that are also OPTIONAL may crash in wrong calls)
2018-02-11 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/54223
PR fortran/84276
* interface.c (compare_actual_formal): Add in_statement_function
bool parameter. Skip check of INTENT attribute for statement
functions. Arguments to a statement function cannot be optional,
issue error for missing argument.
(gfc_procedure_use, gfc_ppc_use, gfc_arglist_matches_symbol): Use
in_statement_function.
2018-02-11 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/54223
PR fortran/84276
* gfortran.dg/statement_function_1.f90: New test.
* gfortran.dg/statement_function_2.f90: New test.
From-SVN: r257565
Paul Thomas [Sun, 11 Feb 2018 18:22:24 +0000 (18:22 +0000)]
re PR fortran/84074 (Incorrect indexing of array when actual argument is an array expression and dummy is polymorphic)
2018-02-11 Paul Thomas <pault@gcc.gnu.org>
PR fortran/84074
* trans-expr.c (gfc_conv_derived_to_class): Set the use_offset
flag. If the is a vector subscript or the expression is not a
variable, make the descriptor one-based.
2018-02-11 Paul Thomas <pault@gcc.gnu.org>
PR fortran/84074
* gfortran.dg/type_to_class_5.f03: New test.
From-SVN: r257564
Alexandre Oliva [Sun, 11 Feb 2018 15:26:11 +0000 (15:26 +0000)]
[LVU] deal with md final_scan_insn
Ports call final_scan_insn with seen == NULL, and then
maybe_output_next_view crashes because it assumes it's
non-NULL. Oops. Fixed.
for gcc/ChangeLog
* final.c (final_scan_insn_1): Renamed from...
(final_scan_insn): ... this. New wrapper, to recover
seen from the outermost call in recursive ones.
* config/sparc/sparc.c (output_return): Drop seen from call.
(output_sibcall): Likewise.
* config/visium/visium.c (output_branch): Likewise.
From-SVN: r257562
GCC Administrator [Sun, 11 Feb 2018 00:16:13 +0000 (00:16 +0000)]
Daily bump.
From-SVN: r257559
John David Anglin [Sat, 10 Feb 2018 23:15:53 +0000 (23:15 +0000)]
pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as function label.
* config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
function label.
From-SVN: r257554
Paul Thomas [Sat, 10 Feb 2018 18:16:14 +0000 (18:16 +0000)]
re PR fortran/84141 (Internal error: type_name(): Bad type)
2018-02-10 Paul Thomas <pault@gcc.gnu.org>
PR fortran/84141
PR fortran/84155
* trans-array.c (gfc_array_init_size): Revert the change made
in revision 257356 setting the dtype.
* trans-types.c (gfc_get_dtype): Do not use the cached dtype.
Call gfc_get_dtype_rank_type every time.
PR fortran/56691
* trans-array.c (gfc_conv_expr_descriptor): If the source array
is a descriptor type, use its offset, removing the condition
that is be a class expression.
2018-02-10 Paul Thomas <pault@gcc.gnu.org>
PR fortran/56691
* gfortran.dg/type_to_class_4.f03: New test.
From-SVN: r257550
Alan Modra [Sat, 10 Feb 2018 04:49:15 +0000 (15:19 +1030)]
PR84300, ICE in dwarf2cfi on ppc64le with -fsplit-stack -fno-omit-frame-pointer
PR target/84300
gcc/
* config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
Specify LR as an input.
gcc/testsuite/
* gcc.dg/pr84300.c: New.
From-SVN: r257549
GCC Administrator [Sat, 10 Feb 2018 00:16:12 +0000 (00:16 +0000)]
Daily bump.
From-SVN: r257548
Jakub Jelinek [Fri, 9 Feb 2018 23:22:43 +0000 (00:22 +0100)]
re PR sanitizer/83987 (ICE with OpenMP, sanitizer and virtual bases)
PR sanitizer/83987
* omp-low.c (maybe_remove_omp_member_access_dummy_vars,
remove_member_access_dummy_vars): New functions.
(lower_omp_for, lower_omp_taskreg, lower_omp_target,
lower_omp_1, execute_lower_omp): Use them.
* tree.c (cp_free_lang_data): Revert 2018-01-23 change.
* g++.dg/ubsan/pr83987-2.C: New test.
From-SVN: r257545
Jakub Jelinek [Fri, 9 Feb 2018 23:21:35 +0000 (00:21 +0100)]
re PR rtl-optimization/84308 (Memory leak in spread_components)
PR rtl-optimization/84308
* shrink-wrap.c (spread_components): Release todo vector.
From-SVN: r257544
Peter Bergner [Fri, 9 Feb 2018 22:03:43 +0000 (16:03 -0600)]
re PR target/83926 (ICE during RTL pass: ira, in elimination_costs_in_insn, at reload1.c:3633)
PR target/83926
* gcc.target/powerpc/pr83926.c: Filter out gimple folding disabled
message.
From-SVN: r257543
Jason Merrill [Fri, 9 Feb 2018 21:01:49 +0000 (16:01 -0500)]
PR c++/81917 - ICE with void_t and partial specialization.
* pt.c (instantiate_class_template_1): Set TYPE_BEING_DEFINED before
calling most_specialized_partial_spec.
From-SVN: r257542
Will Schmidt [Fri, 9 Feb 2018 20:59:40 +0000 (20:59 +0000)]
vsx-vector-6-le.c: Update CPU target.
[testsuite]
2018-02-07 Will Schmidt <will_schmidt@vnet.ibm.com>
* gcc.target/powerpc/vsx-vector-6-le.c: Update CPU target.
* gcc.target/powerpc/vsx-vector-6-le.p9.c: New.
From-SVN: r257541
Ian Lance Taylor [Fri, 9 Feb 2018 19:39:14 +0000 (19:39 +0000)]
compiler: track //go:nointerface in export data
The magic //go:nointerface comment, used for field tracking, was only
implemented for conversions to interface types in the same package.
Record it in the export data, so that it works as expected for types
imported from a different package.
Reviewed-on: https://go-review.googlesource.com/93075
From-SVN: r257540
Nathan Sidwell [Fri, 9 Feb 2018 19:31:10 +0000 (19:31 +0000)]
[PR c/84293] Unexpected strict-alias warning
https://gcc.gnu.org/ml/gcc-patches/2018-02/msg00510.html
PR c/84293
gcc/c/
* c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
to strict_aliasing_warning.
gcc/c-family/
* c-common.h (strict_aliasing_warning): Drop OTYPE arg, insert LOC
arg.
* c-warn.c (strict_aliasing_warning): Drop OTYPE arg, require LOC
arg. Adjust.
gcc/cp/
* typeck.c (cp_build_indirect_ref_1, build_reinterpret_cast_1):
Pass expr location to strict_aliasing_warning.
gcc/testsuite/
* c-c++-common/pr84293.h: New.
* c-c++-common/pr84293.c: New.
From-SVN: r257539
Jason Merrill [Fri, 9 Feb 2018 19:10:42 +0000 (14:10 -0500)]
PR c++/84296 - ICE with qualified-id in template.
PR c++/83714
* pt.c (unknown_base_ref_p): New.
(instantiation_dependent_scope_ref_p): Use it instead of
any_dependent_bases_p.
From-SVN: r257538
Vladimir Makarov [Fri, 9 Feb 2018 18:23:58 +0000 (18:23 +0000)]
re PR rtl-optimization/57193 (suboptimal register allocation for SSE registers)
2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
PR rtl-optimization/57193
* ira-color.c (struct allocno_color_data): Add member
conflict_allocno_hard_prefs.
(update_conflict_allocno_hard_prefs): New.
(bucket_allocno_compare_func): Add a preference based on
conflict_allocno_hard_prefs.
(push_allocno_to_stack): Update conflict_allocno_hard_prefs.
(color_allocnos): Remove a dead code. Initiate
conflict_allocno_hard_prefs. Call update_costs_from_prefs.
2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
PR rtl-optimization/57193
* gcc.target/i386/57193.c: New.
From-SVN: r257537
Jakub Jelinek [Fri, 9 Feb 2018 18:19:08 +0000 (19:19 +0100)]
re PR target/84226 (ICE in simplify_const_unary_operation, at simplify-rtx.c:1974 on ppc64le)
PR target/84226
* config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
constraint from =wa to wa. Avoid a subreg on the output operand,
instead use a pseudo and subreg it in a move.
(p9_xxbrd_<mode>): Changed to ...
(p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
(p9_xxbrd_v2df): New expander.
(p9_xxbrw_<mode>): Changed to ...
(p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
(p9_xxbrw_v4sf): New expander.
* gcc.target/powerpc/pr84226.c: New test.
From-SVN: r257536
Peter Bergner [Fri, 9 Feb 2018 18:02:15 +0000 (12:02 -0600)]
builtins-1-be.c: Rename duplicate test from this to...
* gcc.target/powerpc/builtins-1-be.c <vclzb>: Rename duplicate test
from this to...
<vclzd>: ...this.
From-SVN: r257535
Martin Sebor [Fri, 9 Feb 2018 17:58:54 +0000 (17:58 +0000)]
PR lto/84212 - -Wno-* does not disable warnings from -flto link stage
gcc/c-family/ChangeLog:
PR lto/84212
* c.opt (-Wstringop-overflow, -Warray-bounds): Add LTO.
(-Walloc-size-larger-than, -Wformat-truncation=): Same.
(-Wmaybe-uninitialized, -Wnonnull, -Wrestrict): Same.
(-Wstrict-overflow, -Wsuggest-attribute): Same.
(-Wuninitialized): Same.
gcc/testsuite/ChangeLog:
PR lto/84212
* gcc.dg/lto/pr84212_0.c: New test file.
* gcc.dg/lto/pr84212_1.c: Same.
From-SVN: r257534
Sebastian Perta [Fri, 9 Feb 2018 17:43:11 +0000 (17:43 +0000)]
rx.md: updated "movsicc" expand to be matched by GCC
2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
*config/rx.md: updated "movsicc" expand to be matched by GCC
*testsuite/gcc.target/rx/movsicc.c: new test case
From-SVN: r257533
Peter Bergner [Fri, 9 Feb 2018 16:32:37 +0000 (10:32 -0600)]
re PR target/83926 (ICE during RTL pass: ira, in elimination_costs_in_insn, at reload1.c:3633)
gcc/
PR target/83926
* config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
multiply in 32-bit mode.
(vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
(vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
mode.
gcc/testsuite/
PR target/83926
* gcc.target/powerpc/pr83926.c: New test.
* gcc.target/powerpc/builtins-1-be.c: Filter out gimple folding disabled
message. Fix test for running in 32-bit mode.
From-SVN: r257531
Sebastian Perta [Fri, 9 Feb 2018 16:17:13 +0000 (16:17 +0000)]
constraints.md: added new constraint CALL_OP_SYMBOL_REF to allow or block "symbol_ref"...
2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
* config/rx/constraints.md: added new constraint CALL_OP_SYMBOL_REF
to allow or block "symbol_ref" depending on value of TARGET_JSR
* config/rx/rx.md: use CALL_OP_SYMBOL_REF in call_internal and
call_value_internal insns
From-SVN: r257529
Ian Lance Taylor [Fri, 9 Feb 2018 15:05:17 +0000 (15:05 +0000)]
* Makefile.am (GOTOOLS_TEST_TIMEOUT): Double value.
From-SVN: r257527
Pierre-Marie de Rodat [Fri, 9 Feb 2018 14:02:37 +0000 (14:02 +0000)]
DWARF: no location for non-definition DECLs with non-trivial DECL_VALUE_EXPR
This patch restricts the set of cases in which we allow the generation of
location attributes for variables that are not defined in the current unit.
For such variables with complex DECL_VALUE_EXPR trees, generating a location
attribute can end up creating relocations to text symbols in the debug section
of LTO object files, which is not valid.
gcc/
PR lto/84213
* dwarf2out.c (is_trivial_indirect_ref): New function.
(dwarf2out_late_global_decl): Do not generate a location
attribute for variables that have a non-trivial DECL_VALUE_EXPR
and that are not defined in the current unit.
From-SVN: r257526