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
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
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
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
* 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
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
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
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
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
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
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
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
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
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
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
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
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
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