The definition and most uses of MAKECONTEXT_STACK_TOP were removed in
https://golang.org/cl/88660043, which removed support for Solaris 8/9.
One use of MAKECONTEXT_STACK_TOP was accidentally left in the source
code. Remove it now.
Reviewed-on: https://go-review.googlesource.com/28911
From-SVN: r240045
Some systems, such as ia64 and PPC, require that a ucontext_t pointer
passed to getcontext and friends be aligned to a 16-byte boundary.
Currently the ucontext_t fields in the g structure are defined in Go,
and Go has no way to ensure a 16-byte alignment for a struct field.
The fields are currently represented by an array of unsafe.Pointer.
Enforce the alignment by making the array larger, and picking an offset
into the array that is 16-byte aligned.
Reviewed-on: https://go-review.googlesource.com/28910
From-SVN: r240044
This patch arranges for half-precision complex multiply and divide
routines to be built if __LIBGCC_HAS_HF_MODE__. This will be true
if the target supports the _Float16 type.
libgcc/
PR target/63250
* Makefile.in (lib2funcs): Build _mulhc3 and _divhc3.
* libgcc2.h (LIBGCC_HAS_HF_MODE): Conditionally define.
(HFtype): Likewise.
(HCtype): Likewise.
(__divhc3): Likewise.
(__mulhc3): Likewise.
* libgcc2.c: Support _mulhc3 and _divhc3.
From-SVN: r240043
2016-09-08 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/69514
* array.c (gfc_match_array_constructor): If type-spec is present,
walk the array constructor performing possible conversions for
numeric types.
2016-09-08 Steven G. Kargl <kargl@gcc.gnu.org>
Louis Krupp <lkrupp@gcc.gnu.org>
PR fortran/69514
* gfortran.dg/pr69514_1.f90: New test.
* gfortran.dg/pr69514_2.f90: New test.
Co-Authored-By: Louis Krupp <lkrupp@gcc.gnu.org>
From-SVN: r240039
PR fortran/77500
* trans-openmp.c (gfc_trans_omp_atomic): For atomic write or
swap, don't try to look through GFC_ISYM_CONVERSION. In other cases,
check that value.function.isym is non-NULL before dereferencing it.
* gfortran.dg/gomp/pr77500.f90: New test.
From-SVN: r240038
libgcc complex multiply is meant to eliminate excess
precision from certain internal values by forcing them to memory in
exactly those cases where the type has excess precision. But in
https://gcc.gnu.org/ml/gcc-patches/2014-09/msg01894.html I
accidentally inverted the logic so that values get forced to memory in
exactly the cases where it's not needed. (This is a pessimization in
the no-excess-precision case, in principle could lead to bad results
depending on code generation in the excess-precision case. Note: I do
not have a test demonstrating bad results.)
Bootstrapped with no regressions on x86_64-pc-linux-gnu. Code size
went down on x86_64 as expected; old sizes:
text data bss dec hex filename
887 0 0 887 377 _muldc3.o
810 0 0 810 32a _mulsc3.o
2032 0 0 2032 7f0 _multc3.o
983 0 0 983 3d7 _mulxc3.o
New sizes:
847 0 0 847 34f _muldc3.o
770 0 0 770 302 _mulsc3.o
2032 0 0 2032 7f0 _multc3.o
951 0 0 951 3b7 _mulxc3.o
PR libgcc/77519
* libgcc2.c (NOTRUNC): Invert settings.
From-SVN: r240033
gcc/ChangeLog:
* Makefile.in (OBJS): Add substring-locations.o.
* langhooks-def.h (class substring_loc): New forward decl.
(lhd_get_substring_location): New decl.
(LANG_HOOKS_GET_SUBSTRING_LOCATION): New macro.
(LANG_HOOKS_INITIALIZER): Add LANG_HOOKS_GET_SUBSTRING_LOCATION.
* langhooks.c (lhd_get_substring_location): New function.
* langhooks.h (class substring_loc): New forward decl.
(struct lang_hooks): Add field get_substring_location.
* substring-locations.c: New file, taking definition of
format_warning_va and format_warning_at_substring from
c-family/c-format.c, making them non-static.
* substring-locations.h (class substring_loc): Move class here
from c-family/c-common.h. Add and rewrite comments.
(format_warning_va): New decl.
(format_warning_at_substring): New decl.
(get_source_location_for_substring): Add comment.
gcc/c-family/ChangeLog:
* c-common.c (get_cpp_ttype_from_string_type): Handle being passed
a POINTER_TYPE.
(substring_loc::get_location): Move to substring-locations.c,
keeping implementation as...
(c_get_substring_location): New function, from the above, reworked
to use accessors rather than member lookup.
* c-common.h (class substring_loc): Move to substring-locations.h,
replacing with a forward decl.
(c_get_substring_location): New decl.
* c-format.c: Include "substring-locations.h".
(format_warning_va): Move to substring-locations.c.
(format_warning_at_substring): Likewise.
gcc/c/ChangeLog:
* c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
c_get_substring_location for this new langhook.
gcc/testsuite/ChangeLog:
* gcc.dg/plugin/diagnostic_plugin_test_string_literals.c: Include
"substring-locations.h".
From-SVN: r240028
Improve aarch64_legitimize_address - avoid splitting the offset if it is
supported. When we do split, take the mode size into account. BLKmode
falls into the unaligned case but should be treated like LDP/STP.
This improves codesize slightly due to fewer base address calculations:
int f(int *p) { return p[5000] + p[7000]; }
Now generates:
f:
add x0, x0, 16384
ldr w1, [x0, 3616]
ldr w0, [x0, 11616]
add w0, w1, w0
ret
instead of:
f:
add x1, x0, 16384
add x0, x0, 24576
ldr w1, [x1, 3616]
ldr w0, [x0, 3424]
add w0, w1, w0
ret
gcc/
* config/aarch64/aarch64.c (aarch64_legitimize_address):
Avoid use of base_offset if offset already in range.
From-SVN: r240026
2016-09-06 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libgfortran/77393
* io/write_float.def (build_float_string): Recognize when the
result will not fit in the user provided, star fill, and exit
early.
* gfortran.dg/fmt_f0_2.f90: Update test.
* gfortran.dg/fmt_f0_3.f90: New test.
From-SVN: r240018
PR target/69255
* config/i386/i386.c (ix86_expand_builtin): For builtin with
unsupported or unknown ISA, use expand_call.
* gcc.target/i386/pr69255-1.c: New test.
* gcc.target/i386/pr69255-2.c: New test.
* gcc.target/i386/pr69255-3.c: New test.
From-SVN: r240014
gcc/c-family/ChangeLog:
PR c/77336
* c-format.c (check_function_format): Avoid issuing warnings for
functions unless they call format functions with non-constant
format strings.
gcc/testsuite/ChangeLog:
PR c/77336
* gcc.dg/format/miss-7.c: New test.
From-SVN: r240013
The avr backend supports __builtin_return_address only for the current
stack frame. The test expects it to work for caller frames as well and
therefore fails for avr.
Add avr to the list of targets already excluded with dg-skip-if.
gcc/testsuite/ChangeLog:
2016-09-06 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
* gcc.dg/Wno-frame-address.c: Skip for avr-*-*.
From-SVN: r240005
PR target/77476
* config/i386/i386.md (isa): Add x64_avx512bw.
(*zero_extendsidi2): For alternative 11 use x64_avx512bw isa.
(kmov_isa): New mode attr.
(zero_extend<mode>di2): Use <kmov_isa> isa for the last alternative.
(*zero_extend<mode>si2): Likewise.
(*zero_extendqihi2): Use avx512dq isa for the last alternative.
* gcc.target/i386/avx512f-pr77476.c: New test.
* gcc.target/i386/avx512bw-pr77476.c: New test.
* gcc.target/i386/avx512dq-pr77476.c: New test.
From-SVN: r240000
2016-09-05 Mikhail Strelnikov <mikhail.strelnikov@gmail.com>
* include/std/variant (_Variant_storage::_M_storage()): Use std::addressof
instead of operator& to take address.
From-SVN: r239996
PR rtl-optimization/77452
* explow.c (plus_constant) <case MEM>: Extract scalar constant from
inner-mode reference to a CONST_VECTOR constant in the constant pool.
testsuite/ChangeLog:
PR rtl-optimization/77452
* gcc.target/i386/pr77452.c: New test.
From-SVN: r239989
2016-09-04 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/77391
* resolve.c (deferred_requirements): New function to check F2008:C402.
(resolve_fl_variable,resolve_fl_parameter): Use it.
2016-09-04 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/77391
* gfortran.dg/pr77391.f90: New test.
From-SVN: r239982
2016-09-04 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/77460
* simplify.c (simplify_transformation_to_scalar): On error, result
may be NULL, simply return.
2016-09-04 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/77460
* gfortran.dg/pr77460.f90: New test.
From-SVN: r239979
* src/pa/ffi.c (ffi_struct_type): Put type declaration on separate line.
(ffi_prep_args_pa32): Likewise.
(ffi_size_stack_pa32): Likewise.
(ffi_prep_cif_machdep): Likewise.
(ffi_call): Likewise. Rename to ffi_call_int. Add closure argument
and update call to ffi_call_pa32.
(ffi_call, ffi_call_go, ffi_prep_go_closure): New.
(ffi_closure_inner_pa32): Update to handle go closures.
* src/pa/ffitarget.h (FFI_GO_CLOSURES): Define.
* src/pa/hpux32.S (ffi_call_pa32): Pass go closure argument in static
chain register (%ret1).
(ffi_closure_pa32): Set closure type argument to zero.
(ffi_go_closure_pa32): New function. Add unwind data for it.
* src/pa/linux.S: Likewise. Use cfi directives for unwind data.
* testsuite/libffi.go/static-chain.h (STATIC_CHAIN_REG): Define for
hppa.
From-SVN: r239978
2016-09-04 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/71902
* frontend-passes.c (realloc_string_callback): Also check for the
lhs being deferred. Name temporary variable "realloc_string".
2016-09-04 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/71902
* gfortran.dg/dependency_47.f90: New test.
* gfortran.dg/dependency_49.f90: New test.
From-SVN: r239977
2016-09-04 Tom de Vries <tom@codesourcery.com>
revert:
2016-08-29 Tom de Vries <tom@codesourcery.com>
* c-common.c (build_va_arg): Replace first argument type error
with assert.
From-SVN: r239975