2019-03-13 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/66695
PR fortran/77746
PR fortran/79485
* gfortran.h (gfc_symbol): Add bind_c component.
(gfc_get_gsymbol): Add argument bind_c.
* decl.c (add_global_entry): Add bind_c argument to
gfc_get_symbol.
* parse.c (parse_block_data): Likewise.
(parse_module): Likewise.
(add_global_procedure): Likewise.
(add_global_program): Likewise.
* resolve.c (resolve_common_blocks): Likewise.
(resolve_global_procedure): Likewise.
(gfc_verify_binding_labels): Likewise.
* symbol.c (gfc_get_gsymbol): Add argument bind_c. Set bind_c
in gsym.
* trans-decl.c (gfc_get_module_backend_decl): Add bind_c argument
to gfc_get_symbol.
(gfc_get_extern_function_decl): If the sym has a binding label
and it cannot be found in the global symbol tabel, it is the wrong
one and vice versa.
2019-03-13 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/66695
PR fortran/77746
PR fortran/79485
* gfortran.dg/binding_label_tests_30.f90: New test.
* gfortran.dg/binding_label_tests_31.f90: New test.
* gfortran.dg/binding_label_tests_32.f90: New test.
* gfortran.dg/binding_label_tests_33.f90: New test.
From-SVN: r269635
This change fixes a bug in which two interface types were being
incorrectly commoned (considered identical) in the initial stages of
writing out types to export data. The indexer does a walk to collect
candidates for export, inserting types into a table to eliminate
duplicates; as part of this process a local interface type T1 was
being commoned with a different interface type T2. This caused a cycle
in the exported type graph due to the way embedded interfaces are
handled.
The fix was to add a new flag to the Type::is_identical utility
routine to request that interface type comparison be done by examining
the original parse methods, as opposed to the expanded method set,
then use the new flag when creating the hash map for the exporter.
Fixesgolang/go#30659.
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/166638
From-SVN: r269634
Add a new debugging utility routine debug_go_type(), intended to
display the contents of a Type object in a way useful to debugging
a run of the compiler. Prior to this the only useful alternative
for debugging types was invoking the mangled_name() method, which
has problems (for example, won't work on interface types prior
to finalizing of methods).
This is a "deep" dump, meaning that all types reachable from the
type passed to debug_go_type() will be printed out. Example:
(gdb) print debug_go_type(t1)
T0 0x535f300 'net/http.Header' -> T1
T1 0x535d3d0 map ['string' -> string] T4
T2 0x5304bb0 'string' -> string
T3 0x331f900 string
T4 0x535d370 array [] 'string' -> string
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/166637
From-SVN: r269633
Backports fixes for many ICEs that occurred when using the vector .array
property in both CTFE and code generation passes.
Fixes https://gcc.gnu.org/PR88957
Reviewed-on: https://github.com/dlang/dmd/pull/9438
gcc/d/ChangeLog:
2019-03-13 Iain Buclaw <ibuclaw@gdcproject.org>
PR d/88957
* expr.cc (ExprVisitor::visit(VectorArrayExp)): New override.
gcc/testsuite/ChangeLog:
2019-03-13 Iain Buclaw <ibuclaw@gdcproject.org>
PR d/88957
* gdc.dg/pr88957.d: New test.
* gdc.dg/simd.d: Add new vector tests.
From-SVN: r269627
2019-03-12 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/87673
* match.c (gfc_match_type_spec): Remove call to
gfc_resolve_expr for character length.
2019-03-12 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/87673
* gfortran.dg/charlen_17.f90: New test.
From-SVN: r269624
This patch sets the inlining parameters for z13 and later to rather
aggressive values in response to PR85103 that caused performance
regressions in SPEC2006's sjeng and gobmk benchmarks.
From-SVN: r269623
This patch set adds new pipeline descriptions for z13 and z14. Based
on that, the scoring and some properties are handled differently in
the scheduler hooks.
The patch before (r269620) also belongs to this set but I accidentally
applied it separately.
From-SVN: r269622
The dmd front-end function FileName::canonicalName could be called
during the semantic pass of import("file") expressions, so still
requires that realpath() be redefined.
Initial patch by Rainer Orth.
gcc/d/ChangeLog:
2019-03-12 Iain Buclaw <ibuclaw@gdcproject.org>
PR d/87866
* d-system.h (realpath): Redefine as lrealpath.
From-SVN: r269619
2019-03-12 Paul Thomas <pault@gcc.gnu.org>
PR fortran/89363
PR fortran/89364
* trans-expr.c (set_dtype_for_unallocated): New function.
(gfc_conv_gfc_desc_to_cfi_desc): Call it for allocatable and
pointer arguments.
(gfc_conv_procedure_call): Likewise. Also, set the ubound of
the final dimension to -1 for assumed rank formal args that are
associated with assumed size arrays.
* trans-intrinsic.c (gfc_conv_intrinsic_bound): Return -1 for
the final dimension of assumed rank entities that are argument
associated with assumed size arrays.
(gfc_conv_intrinsic_shape): Likewise return -1 for the final
dimension of the shape intrinsic.
2019-03-12 Paul Thomas <pault@gcc.gnu.org>
PR fortran/89363
* gfortran.dg/assumed_rank_16.f90: New test.
PR fortran/89364
* gfortran.dg/assumed_rank_17.f90: New test.
From-SVN: r269612
Fixes C++ mangling for substituted basic types that are target-specific.
Introduces a new method that currently does nothing, but could in future
make use of flag_abi_version as extern(C++) integration improves in
latter versions of the D front-end.
Reviewed-on: https://github.com/dlang/dmd/pull/9439
gcc/d/ChangeLog:
2019-03-12 Iain Buclaw <ibuclaw@gdcproject.org>
* d-lang.cc (d_init_options): Set global.params.cplusplus to C++14.
* d-target.cc (Target::cppFundamentalType): New method.
From-SVN: r269611
PR target/52726
* config/s390/s390.md (tabort): Use %wd instead of
HOST_WIDE_INT_PRINT_DEC in error message, reword to avoid two capital
letters and periods.
* config/tilepro/tilepro.c (tilepro_print_operand): Use %wd in
output_operand_lossage instead of HOST_WIDE_INT_PRINT_DEC, replace
's with %< and %>.
From-SVN: r269607
2019-03-12 Richard Biener <rguenther@suse.de>
PR tree-optimization/89664
* tree-ssa-math-opts.c (execute_cse_reciprocals_1): Properly
free the occurance tree after the early out.
* gfortran.dg/pr89664.f90: New testcase.
From-SVN: r269604
Here we were wrongly treating binding a const lvalue ref to an xvalue as
direct binding, which is wrong under [dcl.init.ref] and [over.match.ref].
* call.c (build_user_type_conversion_1): Don't use a conversion to a
reference of the wrong rvalueness for direct binding.
From-SVN: r269602
PR fortran/89651
* trans-openmp.c (gfc_omp_clause_default_ctor): Set TREE_NO_WARNING
on decl if adding COND_EXPR for allocatable.
(gfc_omp_clause_copy_ctor): Set TREE_NO_WARNING on dest.
* gfortran.dg/gomp/pr89651.f90: New test.
From-SVN: r269598
Check for availability of POSIX sockatmark before using it.
Rename _S_ntoh overloads that are ambiguous when passed an integral type
that is neither uint16_t nor uint32_t.
PR libstdc++/89460
* configure.ac: Check for sockatmark.
* crossconfig.m4: Check for sockatmark.
* config.h.in: Regenerate.
* configure: Regenerate.
* include/experimental/internet (address_v4::_S_hton): Rename
overloaded functions to _S_hton_16 and _S_ntoh_16.
(address_v4::_S_ntoh): Rename to _S_ntoh_16 and _S_ntoh_32.
(basic_endpoint): Adjust calls to _S_hton and _S_ntoh.
* include/experimental/socket (basic_socket::at_mark): Check
_GLIBCXX_HAVE_SOCKATMARK.
From-SVN: r269588
This is C++ so there's no reason to use macros here.
* testsuite/29_atomics/atomic_flag/test_and_set/explicit-hle.cc: Use
const variables instead of macros.
From-SVN: r269585
PR libstdc++/89629
* libsupc++/hash_bytes.cc [__SIZEOF_SIZE_T__ == 8] (_Hash_bytes):
Use correct type for len_aligned.
* testsuite/20_util/hash/89629.cc: New test.
From-SVN: r269584
This fixes a problem with vec_add/sub_u128 builtins. The
s390_expand_builtin backend function is supposed to convert the
operand to TImode *AND* load it into a vector register. The current
implementation did only the conversion and gave up then.
gcc/ChangeLog:
2019-03-11 Andreas Krebbel <krebbel@linux.ibm.com>
* config/s390/s390.c (s390_expand_builtin): Do the copy_to_reg not
only on the else branch.
gcc/testsuite/ChangeLog:
2019-03-11 Andreas Krebbel <krebbel@linux.ibm.com>
* gcc.target/s390/zvector/vec-addc-u128.c: New test.
From-SVN: r269583
2019-03-11 Martin Liska <mliska@suse.cz>
* gcov.c (output_intermediate_json_line): Print function
name of each line.
(output_json_intermediate_file): Add new argument.
* doc/gcov.texi: Document the change.
From-SVN: r269581
2019-03-11 Richard Biener <rguenther@suse.de>
PR tree-optimization/89649
* tree-vectorizer.h (vect_loop_versioning): Adjust prototype.
* tree-vect-loop-manip.c (vect_do_peeling): Unset force_vectorize
on the prolog and epilog loops.
(vect_loop_versioning): Return copy of loop.
* tree-vect-loop.c (vect_transform_loop): Unset force_vectorize
on the non-vectorized version of the loop.
From-SVN: r269578
2019-03-10 Martin Jambor <mjambor@suse.cz>
PR tree-optimization/85762
PR tree-optimization/87008
PR tree-optimization/85459
* tree-sra.c (contains_vce_or_bfcref_p): New parameter, set the bool
it points to if there is a type changing MEM_REF. Adjust all callers.
(build_accesses_from_assign): Disable total scalarization if
contains_vce_or_bfcref_p returns true through the new parameter, for
both rhs and lhs.
testsuite/
* g++.dg/tree-ssa/pr87008.C: New test.
* gcc.dg/guality/pr54970.c: Xfail tests querying a[0] everywhere.
From-SVN: r269556