On MIPS, SIGABRT is defined like this:
#define SIGIOT 6
#define SIGABRT SIGIOT
This breaks addsig which tries to append __SIGIOT_ to SIGLIST. Signal
number 6 is later added to the output and go complains about a
duplicate signal number.
Fix by recursing once when obtaining the signal number from
gen-sysinfo.go if the signal is defined as an alias of another signal.
Also modify the sed expression to 's/.* = //' which is equivalent to
the original expression but is less misleading given that it might not
match a number.
Reviewed-on: https://go-review.googlesource.com/43252
From-SVN: r247948
gcc/ChangeLog:
2017-05-11 Carl Love <cel@us.ibm.com>
* config/rs6000/rs6000-c: Add support for built-in functions
vector unsigned char vec_popcnt (vector signed char)
vector unsigned char vec_popcnt (vector unsigned char)
vector unsigned short vec_popcnt (vector signed short)
vector unsigned short vec_popcnt (vector unsigned short)
vector unsigned int vec_popcnt (vector signed int)
vector unsigned int vec_popcnt (vector unsigned int)
vector unsigned long long vec_popcnt (vector signed long long)
vector unsigned long long vec_popcnt (vector unsigned long long)
vector signed long long vec_slo (vector signed long long,
vector signed char)
vector signed long long vec_slo (vector signed long long,
vector unsigned char)
vector unsigned long long vec_slo (vector unsigned long long,
vector signed char)
vector unsigned long long vec_slo (vector unsigned long long,
vector unsigned char)
* config/rs6000/rs6000-builtin.def: Add definitions for VPOPCNTUB,
VPOPCNTUH, VPOPCNTUW, and VPOPCNTUD overloads.
* config/rs6000/altivec.h: Add define for vec_popcnt, vec_popcntb,
vec_popcnth, vec_popcntw and vec_popcntd built-in functions.
* doc/extend.texi: Update the built-in documentation file for the
new built-in functions.
gcc/testsuite/ChangeLog:
2017-05-11 Carl Love <cel@us.ibm.com>
* gcc.target/powerpc/builtins-3-p8.c: Add tests for the new built-ins
to the test suite file.
* gcc.target/powerpc/builtins-3.c: Add tests for the new built-ins
to the test suite file.
From-SVN: r247933
The gc toolchain decides whether a goroutine is a system goroutine by
comparing startpc to a list of saved special PCs. In gccgo that
approach does not work as startpc is often a thunk that invokes the
real function with arguments, so the thunk address never matches the
saved special PCs.
This patch fixes gccgo's understanding of system goroutines. Since
there are only a limited number of them, we simply change each one to
mark itself as special.
This fixes stack dumps and functions like runtime.NumGoroutine to
behave more like gc. It also fixes the goprint test in the gc
testsuite.
Reviewed-on: https://go-review.googlesource.com/43156
From-SVN: r247931
2017-05-11 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/78659
* io.c (dtio_procs_present): Add new function to check for DTIO
procedures relative to I/O statement READ or WRITE.
(gfc_resolve_dt): Add namelist checks using the new function.
* resolve.c (dtio_procs_present): Remove function and related
namelist checks. (resolve_fl_namelist): Add check specific to
Fortran 95 restriction on namelist objects.
* gfortran.dg/namelist_91.f90: New test.
* gfortran.dg/namelist_92.f90: New test.
* gfortran.dg/namelist_93.f90: New test.
* gfortran.dg/namelist_94.f90: New test.
From-SVN: r247930
[gcc]
2017-05-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
PR target/80695
* config/rs6000/rs6000.c (rs6000_builtin_vectorization_cost):
Account for direct move costs for vec_construct of integer
vectors.
[gcc/testsuite]
2017-05-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
PR target/80695
* gcc.target/powerpc/pr80695-p8.c: New file.
* gcc.target/powerpc/pr80695-p9.c: New file.
From-SVN: r247928
Glibc 2.17 made __secure_getenv an officially supported function, and
renamed it secure_getenv. The libgfortran configure has checked for
both of these, per
https://sourceware.org/glibc/wiki/Tips_and_Tricks/secure_getenv.
Unfortunately, while the dynamical library (libc.so) retains the
__secure_getenv symbol for backwards compatibility, the static library
(libc.a) does not. This means that a libgfortran.a compiled against an
older glibc will not work if one tries to link against a newer
libc.a. This creates problems for providing gfortran binary
distributions that work on as many target systems as possible.
Thus, retain the support for __secure_getenv but call it only via a
weak reference.
Regtested on x86_64-pc-linux-gnu.
2017-05-11 Janne Blomqvist <jb@gcc.gnu.org>
* libgfortran.h: HAVE_SECURE_GETENV: Don't check
HAVE___SECURE_GETENV.
* environ/runtime.c (secure_getenv): Use __secure_getenv via a
weak reference.
From-SVN: r247927
* cp-lang.c (get_global_decls, cxx_pushdecl, LANG_HOOK_GETDECLS)
LANG_HOOKS_PUSHDECL): Move to ...
* cp-objcp-common.c (cp_get_global_decls, cp_pushdec)
LANG_HOOK_DECLS, LANG_HOOKS_PUSHDECL): ... here.
* cp-objcp-common.h (cp_get_global_decls, cp_pushdecl): Declare.
((--This line, and those below, will be ignored--
M cp/ChangeLog
M cp/cp-lang.c
M cp/cp-objcp-common.c
M cp/cp-objcp-common.h
From-SVN: r247923
adding myself to Write After Approval list.
2017-05-11 Steven Munroe <munroesj@gcc.gnu.org>
* MAINTAINERS: Add myself to Write After Approval section.
From-SVN: r247913
gcc/testsuite/ChangeLog:
2017-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
* gcc.target/powerpc/cmpb-1.c: New test.
* gcc.target/powerpc/cmpb-2.c: New test.
* gcc.target/powerpc/cmpb-3.c: New test.
* gcc.target/powerpc/cmpb32-1.c: New test.
* gcc.target/powerpc/cmpb32-2.c: New test.
gcc/ChangeLog:
2017-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
* config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
array entries to represent two legal parameterizations of the
overloaded __builtin_cmpb function, as represented by the
P6_OV_BUILTIN_CMPB constant.
(altivec_resolve_overloaded_builtin): Add special case handling
for the __builtin_cmpb function, as represented by the
P6_OV_BUILTIN_CMPB constant.
* config/rs6000/rs6000-builtin.def (BU_P6_2): New macro.
(BU_P6_64BIT_2): New macro.
(BU_P6_OVERLOAD_2): New macro
(CMPB_32): Add 32-bit compare-bytes support for 32-bit only targets.
(CMPB): Add 64-bit compare-bytes support for 32-bit and 64-bit targets.
(CMPB): Add overload support to represent both 32-bit and 64-bit
compare-bytes function.
* config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add
support for TARGET_CMPB.
* config/rs6000/rs6000.h: Add support for RS6000_BTM_CMPB.
* doc/extend.texi (PowerPC AltiVec Built-in Functions): Add
documentation of the __builtin_cmpb overloaded built-in function.
From-SVN: r247907
2017-05-11 Richard Biener <rguenther@suse.de>
PR tree-optimization/80705
* tree-vect-data-refs.c (vect_analyze_data_refs): DECL_NONALIASED
bases are not vectorizable.
* gcc.dg/vect/bb-slp-pr80705.c: New testcase.
From-SVN: r247906
PR libstdc++/80285
* include/bits/shared_ptr_base.h (_Sp_make_shared_tag::_S_ti): Define
function to get unique fake std::type_info reference.
(_Sp_counted_ptr_inplace::_M_get_deleter) [!__cpp_rtti]: Compare to
_S_ti() fake reference.
(__shared_ptr(_Sp_make_shared_tag, const Alloc&, Args&&...)): Share
single implementation with or without RTTI enable.
[!__cpp_rtti]: Pass fake reference to _M_get_deleter.
* testsuite/20_util/shared_ptr/creation/alloc.cc: Change expected
allocation and deallocation counts.
* testsuite/20_util/shared_ptr/creation/single_allocation.cc: New.
* testsuite/20_util/shared_ptr/creation/single_allocation_no_rtti.cc:
New.
From-SVN: r247905
* cp-tree.h (pushdecl, pushdecl_maybe_friend, pushtag)
pushtag_top_level_maybe_friend,
pushdecl_top_level_and_finish): Move declarations to ...
* name-lookup.h: ... here. Group pushdecl variants.
(pushdecl_top_level_and_finish): Rename to ...
(pushdecl_top_level_with_init): ... here.
* decl.c (cp_make_fname_decl): Use pushdecl_top_level_with_init.
* decl2.c (get_guard, handle_tls_init): Likewise.
* rtti.c (get_tinfo_decl, tinfo_base_init): Likewise.
* lambda.c (maybe_add_lambda_conv_op): Use namespace_bindings_p.
* method.c (implicitly_declare_fn): Likewise.
* searchc (node_debug_info_needed): Likewise.
* name-lookup.c (pushdecl_top_level_and_finish): Rename to ...
(pushdecl_top_level_with_init): ... here.
(pop_everything): Use namespace_bindings_p.
(--This line, and those below, will be ignored--
M cp/ChangeLog
M cp/method.c
M cp/cp-tree.h
M cp/decl.c
M cp/lambda.c
M cp/rtti.c
M cp/name-lookup.c
M cp/decl2.c
M cp/name-lookup.h
M cp/search.c
From-SVN: r247902
* tree-ssa-loop-ivopts.c (find_interesting_uses): Move inv vars dump
to ...
(determine_group_iv_costs): ... here.
(find_inv_vars_cb): Record inv var if it's not recorded before.
From-SVN: r247896
* tree-ssa-address.c: Include header file.
(move_hint_to_base): Return TRUE if BASE_HINT is moved to memory
address.
(add_to_parts): Refactor.
(addr_to_parts): New parameter. Update use of move_hint_to_base.
(create_mem_ref): Update use of addr_to_parts. Re-associate addr
in new order.
From-SVN: r247894
PR tree-optimization/53090
* tree-ssa-loop-ivopts.c (enum comp_iv_rewrite): New enum value
COMP_IV_EXPR_2.
(extract_cond_operands): Detect condition with IV on both sides
and return COMP_IV_EXPR_2.
(find_interesting_uses_cond): Add iv_use for both IVs in condition.
(rewrite_use_compare): Simplify by removing call to function
extract_cond_operands.
From-SVN: r247893