Eric Botcazou [Mon, 26 Feb 2018 16:37:11 +0000 (16:37 +0000)]
Re-add test.
From-SVN: r257998
Eric Botcazou [Mon, 26 Feb 2018 16:36:20 +0000 (16:36 +0000)]
Remove bogus test.
From-SVN: r257997
Eric Botcazou [Mon, 26 Feb 2018 16:29:30 +0000 (16:29 +0000)]
re PR rtl-optimization/83496 (wrong code generated with -Os -mbranch-cost=1)
PR rtl-optimization/83496
* reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
booleans to RTXes. Call fix_reg_dead_note on every non-null element.
(steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
redundant insn, if any.
(relax_delay_slots): Likewise.
(update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
From-SVN: r257996
Richard Sandiford [Mon, 26 Feb 2018 16:17:00 +0000 (16:17 +0000)]
Make fix for PR 83965 handle SLP reduction chains
This patch prevents pattern-matching of fold-left SLP reduction chains,
which the previous patch for 83965 didn't handle properly. It only
stops the last statement in the group from being matched, but that's
enough to cause the group to be dissolved later.
A better fix would be to put all the information about the reduction
on the the first statement in the reduction chain, so that every
statement in the group can tell what the group is doing. That doesn't
seem like stage 4 material though.
2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
gcc/
PR tree-optimization/83965
* tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
that grouped statements are part of a reduction chain. Return
true if the statement is not marked as a reduction itself but
is part of a group.
(vect_recog_dot_prod_pattern): Don't check whether the statement
is part of a group here.
(vect_recog_sad_pattern): Likewise.
(vect_recog_widen_sum_pattern): Likewise.
gcc/testsuite/
PR tree-optimization/83965
* gcc.dg/vect/pr83965-2.c: New test.
From-SVN: r257995
Tom de Vries [Mon, 26 Feb 2018 16:02:21 +0000 (16:02 +0000)]
[testsuite] Add missing function decl to regs-arg-size.c
2018-02-26 Tom de Vries <tom@codesourcery.com>
* gcc.c-torture/compile/regs-arg-size.c (swprintf): Declare.
From-SVN: r257994
Eric Botcazou [Mon, 26 Feb 2018 15:40:18 +0000 (15:40 +0000)]
re PR debug/84545 (FAIL: g++.dg/debug/pr44182.C -gdwarf-2 -O2 (test for excess errors))
PR debug/84545
* final.c (rest_of_clean_state): Also look for calls inside sequences.
From-SVN: r257993
H.J. Lu [Mon, 26 Feb 2018 15:29:30 +0000 (15:29 +0000)]
i386: Update -mfunction-return= for return with pop
When -mfunction-return= is used, simple_return_pop_internal should pop
return address into ECX register, adjust stack by bytes to pop from stack
and jump to the return thunk via ECX register.
Tested on i686 and x86-64.
PR target/84530
* config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
the bool argument.
(ix86_output_indirect_function_return): New prototype.
(ix86_split_simple_return_pop_internal): Likewise.
* config/i386/i386.c (indirect_return_via_cx): New.
(indirect_return_via_cx_bnd): Likewise.
(indirect_thunk_name): Handle return va CX_REG.
(output_indirect_thunk_function): Create alias for
__x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
(ix86_output_indirect_jmp): Remove the bool argument.
(ix86_output_indirect_function_return): New function.
(ix86_split_simple_return_pop_internal): Likewise.
* config/i386/i386.md (*indirect_jump): Don't pass false
to ix86_output_indirect_jmp.
(*tablejump_1): Likewise.
(simple_return_pop_internal): Change it to define_insn_and_split.
Call ix86_split_simple_return_pop_internal to split it for
-mfunction-return=.
(simple_return_indirect_internal): Call
ix86_output_indirect_function_return instead of
ix86_output_indirect_jmp.
gcc/testsuite/
PR target/84530
* gcc.target/i386/ret-thunk-22.c: New test.
* gcc.target/i386/ret-thunk-23.c: Likewise.
* gcc.target/i386/ret-thunk-24.c: Likewise.
* gcc.target/i386/ret-thunk-25.c: Likewise.
* gcc.target/i386/ret-thunk-26.c: Likewise.
From-SVN: r257992
Paolo Carlini [Mon, 26 Feb 2018 15:00:44 +0000 (15:00 +0000)]
re PR c++/84533 (ICE with duplicate enum value)
/cp
2018-02-26 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/84533
* decl.c (redeclaration_error_message): Don't try to use
DECL_DECLARED_CONSTEXPR_P on CONST_DECLs.
/testsuite
2018-02-26 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/84533
* g++.dg/cpp1z/pr84533.C: New.
From-SVN: r257991
Paolo Carlini [Mon, 26 Feb 2018 14:58:47 +0000 (14:58 +0000)]
lambda.c (build_capture_proxy): Define static.
2018-02-26 Paolo Carlini <paolo.carlini@oracle.com>
* lambda.c (build_capture_proxy): Define static.
* cp-tree.h (build_capture_proxy): Remove.
From-SVN: r257990
Jakub Jelinek [Mon, 26 Feb 2018 14:37:45 +0000 (15:37 +0100)]
re PR bootstrap/84405 (Fails to bootstrap with GCC 4.1.2, GCC 4.2.4)
PR bootstrap/84405
* vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
memset and value initialization afterwards.
From-SVN: r257989
Marek Polacek [Mon, 26 Feb 2018 14:12:25 +0000 (14:12 +0000)]
re PR c++/84537 (ICE in get_string, at spellcheck-tree.h)
PR c++/84537
* name-lookup.c (suggest_alternative_in_explicit_scope): Return false
if name is error node.
* g++.dg/parse/error60.C: New test.
From-SVN: r257988
Christophe Lyon [Mon, 26 Feb 2018 11:07:31 +0000 (11:07 +0000)]
Fix lto-wrapper link flags
2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
gcc/
* Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
From-SVN: r257987
Jakub Jelinek [Mon, 26 Feb 2018 10:18:31 +0000 (11:18 +0100)]
re PR c++/84556 (C++17, lambda, OpenMP simd: sorry, unimplemented: unexpected AST)
PR c++/84556
* g++.dg/gomp/pr84556.C: New test.
* g++.dg/vect/pr84556.cc: New test.
From-SVN: r257986
Dominique d'Humieres [Mon, 26 Feb 2018 09:55:39 +0000 (10:55 +0100)]
re PR fortran/32957 (C/Fortran interoperability and -fdefault-integer-8)
2018-02-26 Dominique d'Humieres <dominiq@gcc.gnu.org>
PR fortran/32957
* gfortran.dg/c_f_pointer_shape_tests_2.f03: Use explicit KIND c_int.
* gfortran.dg/c_f_pointer_shape_tests_4.f03: Likewise.
* gfortran.dg/c_funloc_tests_3.f03: Likewise.
* gfortran.dg/c_loc_test.f90: Likewise.
* gfortran.dg/c_loc_tests_2.f03: Likewise.
* gfortran.dg/proc_decl_17.f90: Likewise.
* gfortran.dg/proc_ptr_8.f90: Likewise.
From-SVN: r257985
Ramana Radhakrishnan [Mon, 26 Feb 2018 09:25:21 +0000 (09:25 +0000)]
[Patch AArch64] Turn on frame pointer / partial fix for PR84521
This fixes a GCC-8 regression that we accidentally switched off frame
pointers in the AArch64 backend when changing the defaults in the common
parts of the code. This breaks an ABI decision that was made in GCC at
the dawn of the port with respect to having a frame pointer at all
times. If we really want to turn this off lets have a discussion around
that separately.
For now turn this back on and I believe this will leave PR84521 latent
again with -fomit-frame-pointer and (hopefully) make the ruby issue go
away. I'm asking Sudi to pick that up.
Bootstrapped and regression tested on AArch64-none-linux-gnu but I see
one regression in gcc.c-torture/execute/960419-2.c which needs to be
looked at next (PR84528, thanks Kyrill).
Ok to put in and then look at PR84528 ?
2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
PR target/84521
* common/config/aarch64/aarch64-common.c
(aarch_option_optimization_table[]): Switch
off fomit-frame-pointer
2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
PR target/84521
* gcc.target/aarch64/lr_free_2.c: Revert changes in
r254814 disabling -fomit-frame-pointer by default.
* gcc.target/aarch64/spill_1.c: Likewise.
* gcc.target/aarch64/test_frame_11.c: Likewise.
* gcc.target/aarch64/test_frame_12.c: Likewise.
* gcc.target/aarch64/test_frame_13.c: Likewise.
* gcc.target/aarch64/test_frame_14.c: Likewise.
* gcc.target/aarch64/test_frame_15.c: Likewise.
* gcc.target/aarch64/test_frame_3.c: Likewise.
* gcc.target/aarch64/test_frame_5.c: Likewise.
* gcc.target/aarch64/test_frame_9.c: Likewise.
From-SVN: r257984
Kito Cheng [Mon, 26 Feb 2018 07:01:08 +0000 (07:01 +0000)]
[NDS32] Do not use multiple load/store instructions for volatile memory access.
gcc/
* config/nds32/nds32-multiple.md(load_multiple): Disallow
volatile memory.
(store_multiple): Ditto.
Co-Authored-By: Chung-Ju Wu <jasonwucj@gmail.com>
From-SVN: r257983
Kito Cheng [Mon, 26 Feb 2018 06:47:32 +0000 (06:47 +0000)]
[NDS32] Basic support for -mcpu= and --with-cpu= options.
gcc/
* config.gcc: Add --with-cpu support for nds32 target.
* config/nds32/nds32-opts.h(nds32_cpu_type): New.
* config/nds32/nds32.opt: Add -mcpu= option.
From-SVN: r257982
Jason Merrill [Mon, 26 Feb 2018 05:05:15 +0000 (00:05 -0500)]
PR c++/84015 - ICE with class deduction and auto template parm.
* pt.c (rewrite_template_parm): Use tf_partial in first tsubst.
From-SVN: r257979
GCC Administrator [Mon, 26 Feb 2018 00:16:31 +0000 (00:16 +0000)]
Daily bump.
From-SVN: r257978
Segher Boessenkool [Sun, 25 Feb 2018 20:54:41 +0000 (21:54 +0100)]
rs6000: Warn for deprecated options
Some command-line options have been deprecated for a long time. This
patch adds a warning for them, so that we can remove them in GCC 9
without surprising any users.
* config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
isel=yes): Warn for these deprecated options.
From-SVN: r257975
Steven G. Kargl [Sun, 25 Feb 2018 16:50:50 +0000 (16:50 +0000)]
re PR fortran/83633 (gfortran internal compiler error for explicit-shape array with non-constant bounds)
2018-02-25 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/83633
* decl.c (variable_decl): Check that an explicit-shape-array with
nonconstant bounds is allowed.
2018-02-25 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/83633
* gfortran.dg/explicit_shape_1.f90: New test.
* gfortran.dg/automatic_module_variable.f90: Update regex.
* gfortran.dg/bad_automatic_objects_1.f90: Ditto.
* gfortran.dg/constant_shape.f90: Ditto.
* gfortran.dg/dec_structure_23.f90: Ditto.
* gfortran.dg/pr78240.f90: Ditto.
From-SVN: r257971
Paul Thomas [Sun, 25 Feb 2018 12:41:26 +0000 (12:41 +0000)]
re PR fortran/84523 (Runtime crash deallocating allocatable array within derived type)
2018-02-25 Paul Thomas <pault@gcc.gnu.org>
PR fortran/84523
* trans-intrinsic.c (gfc_conv_allocated): If the argument se
has a pre block, add it to the expression pre block.
2018-02-25 Paul Thomas <pault@gcc.gnu.org>
PR fortran/84523
* gfortran.dg/pr84523.f90: New test.
From-SVN: r257970
Thomas Koenig [Sun, 25 Feb 2018 09:02:32 +0000 (09:02 +0000)]
re PR fortran/78238 ([OOP] ICE: verify_gimple failed, with -fdefault-integer-8)
2018-02-25 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/78238
* gfortran.h (gfc_integer_4_kind): Define.
* resolve.c (resolve_select_type): Make sure that the
kind of c->high is gfc_integer_4_kind.
2018-02-25 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/78238
* gfortran.dg/select_type_40.f90: New test.
From-SVN: r257968
GCC Administrator [Sun, 25 Feb 2018 00:16:23 +0000 (00:16 +0000)]
Daily bump.
From-SVN: r257967
Steven G. Kargl [Sat, 24 Feb 2018 17:22:10 +0000 (17:22 +0000)]
re PR fortran/30792 (DATA implied-do substring allowed with -std=f95/f2003)
2018-02-24 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/30792
* decl.c (gfc_match_data): Check for invalid substring in
data-implied-do
2018-02-24 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/30792
* gfortran.dg/data_substring.f90: New test.
From-SVN: r257962
Marek Polacek [Sat, 24 Feb 2018 13:10:44 +0000 (13:10 +0000)]
re PR c++/83692 (Rejects valid constexpr with unrelated code fixing problem)
PR c++/83692
* constexpr.c (maybe_constant_init_1): New function.
(maybe_constant_init): Make it a wrapper around maybe_constant_init_1.
(cxx_constant_init): New function.
* cp-tree.h (cxx_constant_init): Declare.
* typeck2.c (store_init_value): Call cxx_constant_init instead of
cxx_constant_value. Move the maybe_constant_init call under an 'else'.
* g++.dg/cpp1z/constexpr-83692.C: New test.
From-SVN: r257961
GCC Administrator [Sat, 24 Feb 2018 00:16:14 +0000 (00:16 +0000)]
Daily bump.
From-SVN: r257960
Jonathan Wakely [Fri, 23 Feb 2018 23:23:43 +0000 (23:23 +0000)]
PR libstdc++/84532 prevent unwrapping of reference_wrapper arguments
PR libstdc++/84532
* include/std/thread (thread::__make_invoker): Construct tuple
directly instead of using make_tuple.
* testsuite/30_threads/async/84532.cc: New.
* testsuite/30_threads/thread/84532.cc: New.
From-SVN: r257956
Ian Lance Taylor [Fri, 23 Feb 2018 21:38:57 +0000 (21:38 +0000)]
compiler: ignore aliases in fieldtrack info
We want to track references to fields in the real struct, not in
aliases to the struct.
Reviewed-on: https://go-review.googlesource.com/96816
From-SVN: r257954
Steven G. Kargl [Fri, 23 Feb 2018 20:06:52 +0000 (20:06 +0000)]
intrinsic.texi: Arguments to MATMUL cannot both be rank one.
2018-02-23 Steven G. Kargl <kargl@gcc.gnu.org>
* intrinsic.texi: Arguments to MATMUL cannot both be rank one.
From-SVN: r257952
David Edelsohn [Fri, 23 Feb 2018 19:14:15 +0000 (19:14 +0000)]
* config/rs6000/aix71.h (TARGET_DEFAULT): Change to ISA_2_5_MASKS_EMBEDDED.
From-SVN: r257944
Steven G. Kargl [Fri, 23 Feb 2018 18:59:38 +0000 (18:59 +0000)]
re PR fortran/84511 (Internal compiler error from directly printing return of C_LOC)
2018-02-23 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/84511
* trans-io.c (transfer_expr): Deal with C_LOC in transfer statement.
From-SVN: r257943
Steven G. Kargl [Fri, 23 Feb 2018 18:57:41 +0000 (18:57 +0000)]
re PR fortran/84346 (Statement functions should not accept keywords)
2018-02-23 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/84346
* interface.c (compare_actual_formal): Issue error if keyword is
used in a statement function.
2018-02-23 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/84346
* gfortran.dg/statement_function_1.f90: Update test.
From-SVN: r257942
Jerry DeLisle [Fri, 23 Feb 2018 18:40:14 +0000 (18:40 +0000)]
re PR fortran/84506 (INQUIRE(pos=) always sets pos=0 with -fdefault-integer-8)
2018-02-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/84506
* trans-io.c (set_parameter_value_inquire): Adjust range check of
negative unit values for kind=8 units to the kind=4 negative limit.
* gfortran.dg/inquire_19.f90: New test.
From-SVN: r257941
Jakub Jelinek [Fri, 23 Feb 2018 18:27:28 +0000 (19:27 +0100)]
ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and p->max as pointers rather than using iterative_hash_expr.
* ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
p->max as pointers rather than using iterative_hash_expr.
From-SVN: r257940
Jan Hubicka [Fri, 23 Feb 2018 18:18:07 +0000 (19:18 +0100)]
* lto-partition.c (lto_balanced_map): Watch overflow.
From-SVN: r257939
Paul Thomas [Fri, 23 Feb 2018 17:55:13 +0000 (17:55 +0000)]
re PR fortran/83149 ([6- and 7-branches] Missing test for sym->ns->proc_name: crash_signal in toplev.c:325)
2018-02-23 Paul Thomas <pault@gcc.gnu.org>
PR fortran/83149
* trans-types.c (gfc_sym_type): Test sym->ns->proc_name before
accessing its components.
2018-02-23 Paul Thomas <pault@gcc.gnu.org>
PR fortran/83149
* gfortran.dg/pr83149_b.f90: New test.
* gfortran.dg/pr83149_a.f90: Additional source for previous.
From-SVN: r257938
Carl Love [Fri, 23 Feb 2018 17:22:10 +0000 (17:22 +0000)]
rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2 macro expansions from BU_VSX_2 to BU_P8V_VSX_2...
gcc/ChangeLog:
2018-02-23 Carl Love <cel@us.ibm.com>
* config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
BU_P8V_OVERLOAD_2.
* config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
P8V_BUILTIN_VEC_VUNSIGNED2.
gcc/testsuite/ChangeLog:
2018-02-23 Carl Love <cel@us.ibm.com>
* gcc.target/powerpc/builtins-3-runnable.c: Move tests for vec_float2,
vec_signed2 and vec_unsigned2 to new Power 8 test file.
* gcc.target/powerpc/builtins-3-runnable-p8.c: New test file for
Power 8 tests.
From-SVN: r257937
Will Schmidt [Fri, 23 Feb 2018 16:50:58 +0000 (16:50 +0000)]
pr80695-p8.c: Update dg-requires stanza.
[testsuite]
2018-02-23 Will Schmidt <will_schmidt@vnet.ibm.com>
* gcc.target/powerpc/pr80695-p8.c: Update dg-requires stanza.
* gcc.target/powerpc/pr80695-p9.c: Update dg-requires stanza.
From-SVN: r257936
Will Schmidt [Fri, 23 Feb 2018 16:46:00 +0000 (16:46 +0000)]
[testsuite]
2018-02-23 Will Schmidt <will_schmidt@vnet.ibm.com>
* fold-vec-mult-int128-p9.c: Add maddld insn to expected output.
From-SVN: r257935
Paul Thomas [Fri, 23 Feb 2018 16:22:28 +0000 (16:22 +0000)]
re PR fortran/83149 ([6- and 7-branches] Missing test for sym->ns->proc_name: crash_signal in toplev.c:325)
2018-02-23 Paul Thomas <pault@gcc.gnu.org>
PR fortran/83149
* trans-decl.c (gfc_finish_var_decl): Test sym->ns->proc_name
before accessing its components.
2018-02-23 Paul Thomas <pault@gcc.gnu.org>
PR fortran/83149
* gfortran.dg/pr83149_1.f90: New test.
* gfortran.dg/pr83149.f90: Additional source for previous.
From-SVN: r257934
Segher Boessenkool [Fri, 23 Feb 2018 14:17:35 +0000 (15:17 +0100)]
Fix tsan race_on_mutex.c testcase (PR80551)
The testcase did not match the glibc internal names while it should.
This fixes it.
gcc/testsuite/
PR testsuite/80551
* c-c++-common/tsan/race_on_mutex.c: Change regexp to allow
__GI___pthread_mutex_init as well.
From-SVN: r257932
Jason Merrill [Fri, 23 Feb 2018 13:32:41 +0000 (08:32 -0500)]
PR c++/70468 - ICE with constructor delegation via typedef.
* pt.c (tsubst_initializer_list): Check for other mem-initializers
with constructor delegation.
From-SVN: r257931
Paul Thomas [Fri, 23 Feb 2018 12:35:30 +0000 (12:35 +0000)]
re PR fortran/83148 (ICE: crash_signal from toplev.c:325)
2018-02-23 Paul Thomas <pault@gcc.gnu.org>
PR fortran/83148
* trans-const.c : Clean up some whitespace issues.
* trans-expr.c (gfc_conv_initializer): If an iso_c_binding
derived type has a kind value of zero, set it to the default
integer kind.
2018-02-23 Paul Thomas <pault@gcc.gnu.org>
PR fortran/83148
* gfortran.dg/class_68.f90: New test.
From-SVN: r257930
Janne Blomqvist [Fri, 23 Feb 2018 09:33:27 +0000 (11:33 +0200)]
ChangeLog entry for r257928
From-SVN: r257929
Janne Blomqvist [Fri, 23 Feb 2018 09:07:24 +0000 (11:07 +0200)]
PR 84519 Handle optional QUIET specifier for STOP and ERROR STOP
Fortran 2018 adds a new QUIET specifier for the STOP and ERROR STOP
statements, in order to suppress the printing of signaling FP
exceptions and the stop code. This patch adds the necessary library
changes, but for now the new specifier is not parsed and the frontend
unconditionally adds a false value for the new argument.
Regtested on x86_64-pc-linux-gnu.
gcc/fortran/ChangeLog:
2018-02-23 Janne Blomqvist <jb@gcc.gnu.org>
PR fortran/84519
* trans-decl.c (gfc_build_builtin_function_decls): Add bool
argument to stop and error stop decls.
* trans-stmt.c (gfc_trans_stop): Add false value to argument
lists.
libgfortran/ChangeLog:
2018-02-23 Janne Blomqvist <jb@gcc.gnu.org>
PR fortran/84519
* caf/libcaf.h (_gfortran_caf_stop_numeric): Add bool argument.
(_gfortran_caf_stop_str): Likewise.
(_gfortran_caf_error_stop_str): Likewise.
(_gfortran_caf_error_stop): Likewise.
* caf/mpi.c (_gfortran_caf_error_stop_str): Handle new argument.
(_gfortran_caf_error_stop): Likewise.
* caf/single.c (_gfortran_caf_stop_numeric): Likewise.
(_gfortran_caf_stop_str): Likewise.
(_gfortran_caf_error_stop_str): Likewise.
(_gfortran_caf_error_stop): Likewise.
(_gfortran_caf_lock): Likewise.
(_gfortran_caf_unlock): Likewise.
* libgfortran.h (stop_string): Add bool argument.
* runtime/pause.c (do_pause): Add false argument.
* runtime/stop.c (stop_numeric): Handle new argument.
(stop_string): Likewise.
(error_stop_string): Likewise.
(error_stop_numeric): Likewise.
From-SVN: r257928
GCC Administrator [Fri, 23 Feb 2018 00:16:14 +0000 (00:16 +0000)]
Daily bump.
From-SVN: r257927
Jason Merrill [Thu, 22 Feb 2018 22:50:37 +0000 (17:50 -0500)]
PR c++/84424 - ICE with constexpr and __builtin_shuffle.
* constexpr.c (reduced_constant_expression_p): Handle CONSTRUCTOR of
VECTOR_TYPE.
From-SVN: r257924
Thomas Koenig [Thu, 22 Feb 2018 22:01:53 +0000 (22:01 +0000)]
re PR fortran/59781 ([F03] Incorrect initialisation of derived type)
2018-02-22 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/59781
* gfortran.dg/derived_init_5.f90: New test.
From-SVN: r257917
Jakub Jelinek [Thu, 22 Feb 2018 21:27:44 +0000 (22:27 +0100)]
re PR target/82851 (g++.dg/vect/slp-pr56812.cc, i386/avx2-vpaddq-3.c, i386/avx2-vpsubq-3.c fails)
PR target/82851
* gcc.target/i386/avx2-vpaddq-3.c: Add -mtune=generic to dg-options.
* gcc.target/i386/avx2-vpsubq-3.c: Likewise.
From-SVN: r257916
Vladimir Makarov [Thu, 22 Feb 2018 21:17:51 +0000 (21:17 +0000)]
re PR target/81572 (gcc-7 regression: unnecessary vector regmove on compare)
2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
PR target/81572
* lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
* lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
LRA_UNKNOWN_ALT.
* lra-constraints.c (curr_insn_transform): Set up
LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
LRA_UNKNOWN_ALT.
(remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
* lra-eliminations.c (spill_pseudos): Ditto.
(process_insn_for_elimination): Ditto.
* lra-lives.c (reg_early_clobber_p): Use the new macros.
* lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
LRA_NON_CLOBBERED_ALT.
2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
PR target/81572
* gcc.target/powerpc/pr81572.c: New.
From-SVN: r257915
Andreas Schwab [Thu, 22 Feb 2018 19:49:04 +0000 (19:49 +0000)]
re PR go/84484 (libgo configure tests fail to find -latomic)
PR go/84484
libgo: add support for riscv64
Patch by Andreas Schwab.
Reviewed-on: https://go-review.googlesource.com/96377
* go.test/go-test.exp (go-set-goarch): Recognize riscv64-*-*.
From-SVN: r257914
Ian Lance Taylor [Thu, 22 Feb 2018 18:52:33 +0000 (18:52 +0000)]
runtime: funcfileline: get missing function name from symbol table
Copy the idea of https://golang.org/cl/92756 to funcfileline, which is
used by runtime.FuncForPC, runtime.(*Frames).Next, and others.
Reviewed-on: https://go-review.googlesource.com/96175
From-SVN: r257913
Ian Lance Taylor [Thu, 22 Feb 2018 18:49:33 +0000 (18:49 +0000)]
libgo: add -L option for libatomic when using -pthread
Fixes https://gcc.gnu.org/PR84484
Reviewed-on: https://go-review.googlesource.com/95436
From-SVN: r257911
Martin Sebor [Thu, 22 Feb 2018 17:35:29 +0000 (17:35 +0000)]
PR tree-optimization/84480 - bogus -Wstringop-truncation despite assignment with an inlined string literal
gcc/ChangeLog:
PR tree-optimization/84480
* gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
to maybe_diag_stxncpy_trunc. Call it.
* tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
from gimple_fold_builtin_strcpy. Print inlining stack.
(handle_builtin_stxncpy): Print inlining stack.
* tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
gcc/testsuite/ChangeLog:
PR tree-optimization/84480
* c-c++-common/Wstringop-truncation.c: Adjust text of expected warnings.
* g++.dg/warn/Wstringop-truncation-1.C: New test.
From-SVN: r257910
H.J. Lu [Thu, 22 Feb 2018 17:09:06 +0000 (17:09 +0000)]
i386: Add __x86_indirect_thunk_nt_reg for -fcf-protection -mcet
nocf_check attribute can be used with -fcf-protection -mcet to disable
control-flow check by adding NOTRACK prefix before indirect branch.
When -mindirect-branch=thunk-extern -mindirect-branch-register is added,
indirect branch via register, "notrack call/jmp reg", is converted to
call/jmp __x86_indirect_thunk_nt_reg
When running on machines with CET enabled, __x86_indirect_thunk_nt_reg
can be updated to
notrack jmp reg
at run-time to restore NOTRACK prefix in the original indirect branch.
Since we don't support -mindirect-branch=thunk-extern, CET and MPX at
the same time, -mindirect-branch=thunk-extern is disallowed with
-fcf-protection=branch and -fcheck-pointer-bounds.
Tested on i686 and x86-64.
gcc/
PR target/84176
* config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
error when -mindirect-branch=thunk-extern, -fcf-protection=branch
and -fcheck-pointer-bounds are used together.
(indirect_thunk_prefix): New enum.
(indirect_thunk_need_prefix): New function.
(indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
"_nt" instead of "_bnd" for NOTRACK prefix.
(output_indirect_thunk): Replace need_bnd_p with need_prefix.
(output_indirect_thunk_function): Likewise.
(): Likewise.
(ix86_code_end): Update output_indirect_thunk_function calls.
(ix86_output_indirect_branch_via_reg): Replace
ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
(ix86_output_indirect_branch_via_push): Likewise.
(ix86_output_function_return): Likewise.
* doc/invoke.texi: Document -mindirect-branch=thunk-extern is
incompatible with -fcf-protection=branch and
-fcheck-pointer-bounds.
gcc/testsuite/
PR target/84176
* gcc.target/i386/indirect-thunk-11.c: New test.
* gcc.target/i386/indirect-thunk-12.c: Likewise.
* gcc.target/i386/indirect-thunk-attr-12.c: Likewise.
* gcc.target/i386/indirect-thunk-attr-13.c: Likewise.
* gcc.target/i386/indirect-thunk-attr-14.c: Likewise.
* gcc.target/i386/indirect-thunk-attr-15.c: Likewise.
* gcc.target/i386/indirect-thunk-attr-16.c: Likewise.
* gcc.target/i386/indirect-thunk-extern-10.c: Likewise.
* gcc.target/i386/indirect-thunk-extern-8.c: Likewise.
* gcc.target/i386/indirect-thunk-extern-9.c: Likewise.
From-SVN: r257909
Steve Ellcey [Thu, 22 Feb 2018 17:08:10 +0000 (17:08 +0000)]
re PR target/83335 ([aarch64,ilp32] gcc.target/aarch64/asm-2.c ICEs since 255481)
2018-02-22 Steve Ellcey <sellcey@cavium.com>
PR target/83335
* gcc/testsuite/gcc.target/aarch64/asm-2.c: Add dg-error for
ILP32 mode.
* gcc/testsuite/gcc.target/aarch64/asm-4.c: New test.
From-SVN: r257908
Steve Ellcey [Thu, 22 Feb 2018 17:06:31 +0000 (17:06 +0000)]
re PR target/83335 ([aarch64,ilp32] gcc.target/aarch64/asm-2.c ICEs since 255481)
2018-02-22 Steve Ellcey <sellcey@cavium.com>
PR target/83335
* config/aarch64/aarch64.c (aarch64_print_address_internal):
Change gcc_assert call to output_operand_lossage.
From-SVN: r257907
Steve Ellcey [Thu, 22 Feb 2018 16:49:28 +0000 (16:49 +0000)]
extend.texi (__builtin_extend_pointer): Document builtin.
2018-02-22 Steve Ellcey <sellcey@cavium.com>
* doc/extend.texi (__builtin_extend_pointer): Document builtin.
From-SVN: r257906
DJ Delorie [Thu, 22 Feb 2018 16:36:48 +0000 (11:36 -0500)]
rx.c (rx_rtx_costs): New function.
gcc/
* config/rx/rx.c (rx_rtx_costs): New function.
(TARGET_RTX_COSTS): Override to use rx_rtx_costs.
Co-Authored-By: Oleg Endo <olegendo@gcc.gnu.org>
Co-Authored-By: Sebastian Perta <sebastian.perta@renesas.com>
From-SVN: r257905
Thomas Preud'homme [Thu, 22 Feb 2018 16:31:56 +0000 (16:31 +0000)]
[ARM] Multilib mapping for Armv8-R
Due to there being no multilib mapping for Armv8-R, default multilib
builts for -march=armv4t with softfloat floating-point arithmetic is
being used. This patch maps it instead to the existing Armv7 multilibs.
Note that mapping for single-precision Armv8-R has been left out due to
there being no Arm implementation of that architecture variant.
2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
gcc/
* config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
gcc/testsuite/
* gcc.target/arm/multilib.exp: Add tests for Armv8-R multilib mappings.
From-SVN: r257904
Janne Blomqvist [Thu, 22 Feb 2018 16:14:21 +0000 (18:14 +0200)]
PR 78534, 84509 Fix libgfortran API for PAUSE statement
This patch changes the libgfortran API for the PAUSE statement. By
passing a GFC_INTEGER_8 it handles -fdefault-integer-8, and for the
character version passing the length as a size_t.
Regtested on x86_64-pc-linux-gnu, committed as obvious.
gcc/fortran/ChangeLog:
2018-02-22 Janne Blomqvist <jb@gcc.gnu.org>
PR 78534
PR 84509
* trans-decl.c (gfc_build_builtin_function_decls): Pass
gfc_int8_type node to pause_numeric, size_type_node to
pause_string.
* trans-stmt.c (gfc_trans_pause): Likewise.
libgfortran/ChangeLog:
2018-02-22 Janne Blomqvist <jb@gcc.gnu.org>
PR 78534
PR 84509
* runtime/pause.c (pause_numeric): Modify to take GFC_INTEGER_8
argument.
(pause_string): Modify to take size_t character length argument.
From-SVN: r257903
David Edelsohn [Thu, 22 Feb 2018 16:12:26 +0000 (16:12 +0000)]
inclhack.def (aix_stdlib_vec_malloc): New.
* inclhack.def (aix_stdlib_vec_malloc): New.
(aix_stdlib_vec_calloc): New.
* fixincl.x: Regenerate.
* tests/base/stdlib.h [AIX_STDLIB_VEC_MALLOC]: New test.
[AIX_STDLIB_VEC_CALLOC]: New test.
From-SVN: r257902
Martin Liska [Thu, 22 Feb 2018 12:16:58 +0000 (13:16 +0100)]
Add "native" as a valid option value for -mcpu/-mtune= on arm (PR driver/83193).
2018-02-22 Martin Liska <mliska@suse.cz>
PR driver/83193
* common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
Add "native" as a possible value.
From-SVN: r257900
Marek Polacek [Thu, 22 Feb 2018 11:18:37 +0000 (11:18 +0000)]
re PR c++/84493 (ICE with invalid cast)
PR c++/84493
* parser.c (cp_parser_braced_list): Use require_open instead of
consume_open.
* g++.dg/parse/error59.C: New test.
From-SVN: r257899
Tom de Vries [Thu, 22 Feb 2018 11:01:16 +0000 (11:01 +0000)]
[testsuite] Require et alloca for pr82210.c
2018-02-22 Tom de Vries <tom@codesourcery.com>
* gcc.c-torture/execute/pr82210.c: Require effective target alloca.
From-SVN: r257898
Paolo Carlini [Thu, 22 Feb 2018 10:44:04 +0000 (10:44 +0000)]
re PR c++/77655 (ICE on invalid c++ code on x86_64-linux-gnu (internal compiler error: Segmentation fault (program cc1plus)))
2018-02-22 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/77655
* g++.dg/cpp0x/pr77655.C: New.
From-SVN: r257896
Jakub Jelinek [Thu, 22 Feb 2018 09:55:32 +0000 (10:55 +0100)]
re PR c++/84496 (Internal compiler error with lambda, static and auto since r236615)
PR c++/84496
* g++.dg/cpp1y/pr84496.C: New test.
From-SVN: r257895
Janne Blomqvist [Thu, 22 Feb 2018 09:44:31 +0000 (11:44 +0200)]
Character length cleanup for Coarray Fortran library
Following the change to use size_t for Fortran character lengths (PR
78534), this patch modifies the Coarray ABI in a similar way. The
single-image implementation that is included in libgfortran is
updated, but this needs corresponding work in the OpenCoarray library
as well for multi-image support. I also fixed the types for the STOP
and ERROR STOP implementation in libgfortran, as the calling of them
is somewhat intertwined with the calling of the corresponding CAF
functions. I'll send the OpenCoarray changes as a separate pull
request to the OpenCoarrays repository.
Regtested on x86_64-pc-linux-gnu.
gcc/fortran/ChangeLog:
2018-02-22 Janne Blomqvist <jb@gcc.gnu.org>
* gfortran.texi: Update Coarray API description.
* trans-decl.c (gfc_build_builtin_function_decls): Use size_t for
character lengths, int for exit codes.
(generate_coarray_sym_init): Use size_t for character length.
* trans-intrinsic.c (conv_co_collective): Likewise.
* trans-stmt.c (gfc_trans_lock_unlock): Likewise.
(gfc_trans_event_post_wait): Likewise.
(gfc_trans_sync): Likewise.
(gfc_trans_stop): Use size_t for character lengths, int for exit
codes.
libgfortran/ChangeLog:
2018-02-22 Janne Blomqvist <jb@gcc.gnu.org>
* libgfortran.h (stop_string): Use size_t for character length.
* runtime/stop.c (stop_string): Likewise.
(error_stop_string): Likewise.
(stop_numeric): Use int for exit code.
(error_stop_numeric): Likewise.
* caf/libcaf.h: Remove stdint.h include.
(_gfortran_caf_register): Use size_t for character length.
(_gfortran_caf_deregister): Likewise.
(_gfortran_caf_sync_all): Likewise.
(_gfortran_caf_sync_memory): Likewise.
(_gfortran_caf_sync_images): Likewise.
(_gfortran_caf_stop_numeric): Use int for exit code.
(_gfortran_caf_stop_str): Use size_t for character length.
(_gfortran_caf_error_stop_str): Likewise.
(_gfortran_caf_error_stop): Use int for exit code.
(_gfortran_caf_co_broadcast): Use size_t for character length.
(_gfortran_caf_co_sum): Likewise.
(_gfortran_caf_co_min): Likewise.
(_gfortran_caf_co_max): Likewise.
(_gfortran_caf_co_reduce): Likewise.
(_gfortran_caf_lock): Likewise.
(_gfortran_caf_unlock): Likewise.
(_gfortran_caf_event_post): Likewise.
(_gfortran_caf_event_wait): Likewise.
* caf/mpi.c (_gfortran_caf_register): Update implementation to
match prototype.
(_gfortran_caf_deregister): Likewise.
(_gfortran_caf_sync_all): Likewise.
(_gfortran_caf_sync_images): Likewise.
(_gfortran_caf_error_stop_str): Likewise.
(_gfortran_caf_error_stop): Likewise.
* caf/single.c (caf_internal_error): Likewise.
(_gfortran_caf_register): Likewise.
(_gfortran_caf_deregister): Likewise.
(_gfortran_caf_sync_all): Likewise.
(_gfortran_caf_sync_memory): Likewise.
(_gfortran_caf_sync_images): Likewise.
(_gfortran_caf_stop_numeric): Likewise.
(_gfortran_caf_stop_str): Likewise.
(_gfortran_caf_error_stop_str): Likewise.
(_gfortran_caf_error_stop): Likewise.
(_gfortran_caf_co_broadcast): Likewise.
(_gfortran_caf_co_sum): Likewise.
(_gfortran_caf_co_min): Likewise.
(_gfortran_caf_co_max): Likewise.
(_gfortran_caf_co_reduce): Likewise.
(_gfortran_caf_event_post): Likewise.
(_gfortran_caf_event_wait): Likewise.
(_gfortran_caf_lock): Likewise.
(_gfortran_caf_unlock): Likewise.
From-SVN: r257894
Martin Liska [Thu, 22 Feb 2018 08:50:41 +0000 (09:50 +0100)]
Add "native" as a valid option value for -march= on i386 (PR driver/83193).
2018-02-22 Martin Liska <mliska@suse.cz>
PR driver/83193
* config/i386/i386.c (ix86_option_override_internal):
Add "native" as a possible value for -march and -mtune.
From-SVN: r257893
Jakub Jelinek [Thu, 22 Feb 2018 08:29:56 +0000 (09:29 +0100)]
re PR c++/84502 (Argument corruption when passing empty templated struct)
PR target/84502
* stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
to all type variants.
* g++.dg/torture/pr84502.C: New test.
From-SVN: r257892
Jakub Jelinek [Thu, 22 Feb 2018 08:28:42 +0000 (09:28 +0100)]
re PR tree-optimization/84503 (store-merging miscompilation on powerpc64 with -O3 since r241789)
PR tree-optimization/84503
* gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
width as info->bitpos + info->bitsize - start.
(merged_store_group::merge_overlapping): Simplify width computation.
(check_no_overlap): New function.
(imm_store_chain_info::try_coalesce_bswap): Compute expected
start + width and last_order of the group, fail if check_no_overlap
fails.
(imm_store_chain_info::coalesce_immediate_stores): Don't merge info
to group if check_no_overlap fails.
* gcc.dg/pr84503-1.c: New test.
* gcc.dg/pr84503-2.c: New test.
From-SVN: r257891
Segher Boessenkool [Thu, 22 Feb 2018 01:09:18 +0000 (02:09 +0100)]
rs6000: Delete meaningless arguments to define_{expand,split,peephole2}
This removes the (usually empty) constraint arguments to define_expand,
define_split, and define_peephole2: this argument is meaningless and
just noise.
* config/rs6000/altivec.md: Delete contraint arguments to
define_expand, define_split, and define_peephole2, and in
define_insn_and_split if always unused.
* config/rs6000/darwin.md: Ditto.
* config/rs6000/dfp.md: Ditto.
* config/rs6000/rs6000.md: Ditto.
* config/rs6000/sync.md: Ditto.
* config/rs6000/vector.md: Ditto.
* config/rs6000/vsx.md: Ditto.
From-SVN: r257890
Segher Boessenkool [Thu, 22 Feb 2018 01:08:02 +0000 (02:08 +0100)]
rs6000: Use brace blocks in define_insn
This patch changes the remaining cases in our machine description files
to use brace blocks instead of double-quoted strings as the output
control string. This increases readability by making the blocks look
more like normal C code, mostly because backslash quoting is no longer
needed. It also removes such quoting where it was still there (usually
harmless but always confusing). and it writes "\n\t" as "\;" in one
place where we didn't already.
* config/rs6000/altivec.md: Write output control strings as braced
blocks instead of double-quoted strings.
* config/rs6000/darwin.md: Ditto.
* config/rs6000/rs6000.md: Ditto.
* config/rs6000/vector.md: Ditto.
* config/rs6000/vsx.md: Ditto.
From-SVN: r257889
GCC Administrator [Thu, 22 Feb 2018 00:16:25 +0000 (00:16 +0000)]
Daily bump.
From-SVN: r257887
Jason Merrill [Wed, 21 Feb 2018 22:12:08 +0000 (17:12 -0500)]
PR c++/84314 - ICE with templates and fastcall attribute.
* attribs.c (build_type_attribute_qual_variant): Remove assert.
From-SVN: r257883
Jan Hubicka [Wed, 21 Feb 2018 20:11:15 +0000 (21:11 +0100)]
* ipa-cp.c (determine_versionability): Fix comment typos.
From-SVN: r257878
Jan Hubicka [Wed, 21 Feb 2018 19:05:30 +0000 (20:05 +0100)]
re PR c/84229 (A valid code rejected with -flto)
PR c/84229
* ipa-cp.c (determine_versionability): Do not version functions caling
va_arg_pack.
From-SVN: r257877
Jason Merrill [Wed, 21 Feb 2018 14:25:54 +0000 (09:25 -0500)]
PR c++/84454 - ICE with pack expansion in signature.
* error.c (find_typenames_r): Also stop on EXPR_PACK_EXPANSION.
From-SVN: r257875
Martin Liska [Wed, 21 Feb 2018 14:05:45 +0000 (15:05 +0100)]
Add "native" as a valid option value for -march= on aarch64 (PR driver/83193).
2018-02-21 Martin Liska <mliska@suse.cz>
PR driver/83193
* config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
Add "native" as a possible value.
* config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
the macro when native cpu detection is available.
From-SVN: r257874
Martin Liska [Wed, 21 Feb 2018 14:05:17 +0000 (15:05 +0100)]
Add "native" as a valid option value for -march= on arm (PR driver/83193).
2018-02-21 Martin Liska <mliska@suse.cz>
PR driver/83193
* common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
Add "native" as a possible value.
* config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
when native cpu detection is available.
From-SVN: r257873
Jakub Jelinek [Wed, 21 Feb 2018 10:35:46 +0000 (11:35 +0100)]
re PR tree-optimization/84478 (pdftex miscompilation on i386)
PR tree-optimization/84478
* gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
false.
* gimple-fold.c (get_range_strlen): Make minlen const and assume it
can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
support which is conservatively correct, for 2 only stay conservative
for maxlen. Formatting and comment capitalization fixes. Add STRICT
argument to the 2 argument get_range_strlen, adjust 6 arg
get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
false.
(get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
(gimple_fold_builtin_strlen): Pass true as last argument to
get_range_strlen.
* gcc.c-torture/execute/pr84478.c: New test.
Co-Authored-By: Martin Sebor <msebor@redhat.com>
From-SVN: r257870
Martin Liska [Wed, 21 Feb 2018 07:57:52 +0000 (08:57 +0100)]
Add IntegerRange for Wcatch-value= option.
2018-02-21 Martin Liska <mliska@suse.cz>
* c.opt (Wcatch-value=): Add IntegerRange.
From-SVN: r257869
GCC Administrator [Wed, 21 Feb 2018 00:16:25 +0000 (00:16 +0000)]
Daily bump.
From-SVN: r257868
Max Filippov [Tue, 20 Feb 2018 20:55:56 +0000 (20:55 +0000)]
libgcc: xtensa: fix build with -mtext-section-literals
libgcc/
2018-02-20 Max Filippov <jcmvbkbc@gmail.com>
* config/xtensa/ieee754-df.S (__adddf3_aux): Add
.literal_position directive.
* config/xtensa/ieee754-sf.S (__addsf3_aux): Likewise.
From-SVN: r257862
François Dumont [Tue, 20 Feb 2018 20:51:44 +0000 (20:51 +0000)]
aligned_buffer.h [...] (template<> __aligned_buffer): Define as __aligned_membuf alias.
2018-02-20 François Dumont <fdumont@gcc.gnu.org>
* include/ext/aligned_buffer.h [_GLIBCXX_INLINE_VERSION]
(template<> __aligned_buffer): Define as __aligned_membuf alias.
From-SVN: r257861
Martin Sebor [Tue, 20 Feb 2018 20:22:01 +0000 (20:22 +0000)]
PR middle-end/84095 - false-positive -Wrestrict warnings for memcpy within array
gcc/ChangeLog:
PR middle-end/84095
* gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
(builtin_memref::set_base_and_offset): Same. Handle inner references.
(builtin_memref::builtin_memref): Factor out parts into
set_base_and_offset and call it.
gcc/testsuite/ChangeLog:
PR middle-end/84095
* c-c++-common/Warray-bounds-3.c: Adjust text of expected warnings.
* c-c++-common/Wrestrict.c: Same.
* gcc.dg/Wrestrict-6.c: Same.
* gcc.dg/Warray-bounds-27.c: New test.
* gcc.dg/Wrestrict-8.c: New test.
* gcc.dg/Wrestrict-9.c: New test.
* gcc.dg/pr84095.c: New test.
From-SVN: r257860
Thomas Koenig [Tue, 20 Feb 2018 19:53:42 +0000 (19:53 +0000)]
structure_constructor_14.f90: Adjust STOP number.
2018-02-20 Thomas Koenig <tkoenig@gcc.gnu.org>
* gfortran.dg/structure_constructor_14.f90: Adjust STOP number.
From-SVN: r257859
Richard Sandiford [Tue, 20 Feb 2018 19:11:34 +0000 (19:11 +0000)]
re PR target/84406 ([MSP430] ICE on valid code in find_widening_optab_handler_and_mode, at optabs-query.c:476)
PR middle-end/84406
* optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
search at the associated MODE_INT.
From-SVN: r257858
Jeff Law [Tue, 20 Feb 2018 18:59:22 +0000 (11:59 -0700)]
re PR middle-end/82123 (spurious -Wformat-overflow warning for converted vars)
PR middle-end/82123
PR tree-optimization/81592
PR middle-end/79257
* gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
for range data rather than using global data.
* gcc.dg/pr81592.c: New test.
* gcc.dg/pr82123.c: New test.
From-SVN: r257857
Thomas Koenig [Tue, 20 Feb 2018 18:57:34 +0000 (18:57 +0000)]
re PR fortran/48890 ([F95] Wrong length of a character component of named constant derived-type)
2018-02-20 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/48890
PR fortran/83823
* primary.c (gfc_convert_to_structure_constructor):
For a constant string constructor, make sure the length
is correct.
2018-02-20 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/48890
PR fortran/83823
* gfortran.dg/structure_constructor_14.f90: New test.
From-SVN: r257856
Jeff Law [Tue, 20 Feb 2018 18:56:56 +0000 (11:56 -0700)]
re PR middle-end/82123 (spurious -Wformat-overflow warning for converted vars)
PR middle-end/82123
PR tree-optimization/81592
PR middle-end/79257
* gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
range data rather than using global data.
From-SVN: r257855
Jeff Law [Tue, 20 Feb 2018 18:56:01 +0000 (11:56 -0700)]
re PR middle-end/82123 (spurious -Wformat-overflow warning for converted vars)
PR middle-end/82123
PR tree-optimization/81592
PR middle-end/79257
* gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
pass it to children as needed.
(struct directive::fmtresult): Similarly.
(struct directive::set_width): Similarly.
(struct directive::set_precision): Similarly.
(format_integer, format_directive, parse_directive): Similarly.
(format_none): Accept unnamed vr_values parameter.
(format_percent, format_floating, format_character): Similarly.
(format_string, format_plain): Similarly.
From-SVN: r257854
Jeff Law [Tue, 20 Feb 2018 18:53:29 +0000 (11:53 -0700)]
re PR middle-end/82123 (spurious -Wformat-overflow warning for converted vars)
PR middle-end/82123
PR tree-optimization/81592
PR middle-end/79257
* gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
the EVRP range analyzer for range data rather than using global data.
From-SVN: r257853
Jeff Law [Tue, 20 Feb 2018 18:52:07 +0000 (11:52 -0700)]
re PR middle-end/82123 (spurious -Wformat-overflow warning for converted vars)
PR middle-end/82123
PR tree-optimization/81592
PR middle-end/79257
* gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
gimple-ssa-evrp-analyze.h
(class sprintf_dom_walker): Add after_dom_children member function.
Add evrp_range_analyzer member.
(sprintf_dom_walker::before_dom_children): Call into the EVRP
range analyzer as needed.
(sprintf_dom_walker::after_dom_children): New member function.
* gcc.dg/builtin-unreachable-6.c: Turn off VRP.
From-SVN: r257852
Jeff Law [Tue, 20 Feb 2018 18:49:46 +0000 (11:49 -0700)]
re PR middle-end/82123 (spurious -Wformat-overflow warning for converted vars)
PR middle-end/82123
PR tree-optimization/81592
PR middle-end/79257
* gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
if not optimizing.
(evrp_range_analyzer::record_ranges_from_stmt): Likewise.
(evrp_range_analyzer::pop_to_marker): Likewise.
From-SVN: r257851
Jakub Jelinek [Tue, 20 Feb 2018 17:00:23 +0000 (18:00 +0100)]
re PR c++/84488 (Incorrect "set but not used" warning for static_cast<Enum>(double))
PR c++/84488
* g++.dg/warn/Wunused-var-30.C: New test.
From-SVN: r257850
Carl Love [Tue, 20 Feb 2018 16:48:39 +0000 (16:48 +0000)]
The removal of file fold-vec-neg-int.p7.c in commit 257812 didn't get commited.
Removing the file.
From-SVN: r257849
Ian Lance Taylor [Tue, 20 Feb 2018 15:30:31 +0000 (15:30 +0000)]
runtime: allow preemption in fast syscall return
Let a fast syscall return be a preemption point. This helps with
tight loops that make system calls, as in BenchmarkSyscallExcessWork.
Reviewed-on: https://go-review.googlesource.com/94895
From-SVN: r257848
Richard Sandiford [Tue, 20 Feb 2018 14:44:24 +0000 (14:44 +0000)]
Fix incorrect TARGET_MEM_REF alignment (PR 84419)
expand_call_mem_ref checks for TARGET_MEM_REFs that have compatible
type, but it didn't then go on to install the specific type we need,
which might have different alignment due to:
if (TYPE_ALIGN (type) != align)
type = build_aligned_type (type, align);
This was causing masked stores to be incorrectly marked as
aligned on AVX512.
2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
gcc/
PR tree-optimization/84419
* internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
with the required type if its current type is compatible but
different.
gcc/testsuite/
PR tree-optimization/84419
* gcc.dg/vect/pr84419.c: New test.
From-SVN: r257847