PR ipa/88586
* omp-low.c (lower_omp_task_reductions): Set DECL_CONTEXT on field
and ifield. Update TYPE_ALIGN from alignment of field, ifield or
bfield.
* g++.dg/gomp/pr88586.C: New test.
From-SVN: r267461
Precise stack scan needs to unwind the stack. When it is
unwinding the stack, if a profiling signal arrives, which also
does a traceback, it may deadlock in dl_iterate_phdr. Prevent
this deadlock by setting up runtime_in_callers before traceback.
Reviewed-on: https://go-review.googlesource.com/c/155766
From-SVN: r267457
The fields were set to true initially and never set to false.
These were left over from an earlier attempt at escape analysis.
Reviewed-on: https://go-review.googlesource.com/c/155750
From-SVN: r267455
Since snapshot() is implemented in assembly code, .file directive should
be removed. Otherwise, debugger can't find the snapshot source.
* gcc.target/x86_64/abi/asm-support-darwin.s: Remove .file
directive.
* gcc.target/x86_64/abi/asm-support.S: Likewise.
From-SVN: r267450
... so that we're then able to use this for other flags in addition to
"GOACC_FLAG_HOST_FALLBACK".
gcc/
* omp-expand.c (expand_omp_target): Restructure OpenACC vs. OpenMP
code paths. Update for libgomp OpenACC entry points change.
include/
* gomp-constants.h (GOACC_FLAG_HOST_FALLBACK)
(GOACC_FLAGS_MARSHAL_OP, GOACC_FLAGS_UNMARSHAL): Define.
libgomp/
* oacc-parallel.c (GOACC_parallel_keyed, GOACC_parallel)
(GOACC_data_start, GOACC_enter_exit_data, GOACC_update)
(GOACC_declare): Redefine the "device" argument to "flags".
From-SVN: r267448
libgomp/
* target.c (struct gomp_coalesce_chunk): New structure.
(struct gomp_coalesce_buf): Update the chunks member to use that
type. Adjust all users.
Co-Authored-By: Cesar Philippidis <cesar@codesourcery.com>
From-SVN: r267446
In build_address_map we allocate a unit, and then look for addresses in the
unit, which we store in the addrs vector, with the elements pointing to the
unit. However, if we cannot find addresses in the unit, the allocated unit is
not used.
Fix this by detecting if the allocated unit has been used, and reusing it
otherwise.
Bootstrapped and reg-tested on x86_64.
2018-12-28 Tom de Vries <tdevries@suse.de>
* dwarf.c (build_address_map): Reuse unused units.
From-SVN: r267445
In the main loop in build_address_map, we first read the abbrevs into a local
variable abbrevs, and then allocate the corresponding unit, after which we assign
the abbrevs to the unit. This results in dedicated free-upon-failure
handling for the variable, and extra code to make sure that free-upon-failure
doesn't trigger once the unit has taken ownership of the abbrevs.
Simplify this by reversing the order of abbrev reading and unit allocation,
and eliminating the abbrevs local variable.
Bootstrapped and reg-tested on x86_64.
2018-12-28 Tom de Vries <tdevries@suse.de>
* dwarf.c (build_address_map): Simplify by removing local variable
abbrevs.
From-SVN: r267444
When failing in build_address_map, we free the unit that's currently being
handled in the loop, but the ones that already have been allocated are leaked.
Fix this by keeping track of allocated units in a vector, and releasing them
upon failure.
Also, now that we have a vector of allocated units, move the freeing upon
failure of the abbrevs associated with each unit to build_address_map, and
remove the now redundant call to free_unit_addrs_vector.
Bootstrapped and reg-tested on x86_64.
2018-12-28 Ian Lance Taylor <iant@golang.org>
Tom de Vries <tdevries@suse.de>
PR libbacktrace/88063
* dwarf.c (free_unit_addrs_vector): Remove.
(build_address_map): Keep track of allocated units in vector. Free
allocated units and corresponding abbrevs upon failure. Remove now
redundant call to free_unit_addrs_vector. Free addrs vector upon
failure. Free allocated unit vector.
Co-Authored-By: Tom de Vries <tdevries@suse.de>
From-SVN: r267443
While upon failure in build_address_map we call free_unit_addrs_vector, this
does not actually free the addrs vector, but merely the abbrevs of the units
pointed at by the elements of the addrs vector.
Fix this by adding code to build_address_map to make sure that the addrs vector
is freed upon failure.
Bootstrapped and reg-tested on x86_64.
2018-12-28 Tom de Vries <tdevries@suse.de>
* dwarf.c (build_address_map): Free addrs vector upon failure.
From-SVN: r267442
* ipa-devirt.c (polymorphic_call_target_d): Add n_odr_types.
(polymorphic_call_target_hasher::hash): Hash it.
(polymorphic_call_target_hasher::equal): Compare it.
(possible_polymorphic_call_targets): Set it.
* tree.c (free_lang_data): Rebuild type inheritance graph even on
non-LTO path.
* g++.dg/ipa/devirt-53.C: New testcase.
From-SVN: r267438
2018-12-27 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/81027
* expr.c (gfc_check_init_expr): Distinguish assumed-shape versus
deferred-shape dummy arguments in an error message.
2018-12-27 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/81027
* gfortran.dg/pr81027.f90: New test.
* gfortran.dg/initialization_7.f90: Update error message.
From-SVN: r267437
2018-12-27 Steven G. Kargl <kargl@gcc.gnu.org>
* libgomp.fortran/aligned1.f03: Fix invalid code that now causes
an error after r267415.
From-SVN: r267436
On ARM32 EABI, unlike other platforms, the personality function is
called during _Unwind_Backtrace (libgcc/unwind-arm-common.inc:581).
In this case, simply unwind the frame without returning any
handlers. Otherwise traceback will loop if there is a frame with
a defer on stack.
Reviewed-on: https://go-review.googlesource.com/c/155759
From-SVN: r267434
2018-12-27 Martin Liska <mliska@suse.cz>
PR gcov-profile/88225
* gcov.c(source_info::get_functions_at_location):
Use newly added line_to_function_map.
(source_info::add_function): New.
(output_json_intermediate_file): Use a pointer return
type for get_functions_at_location.
(process_all_functions): Use add_function instead
of direct push to a s->functions container.
(release_structures): Release ident_to_fn.
(read_graph_file): Register function into ident_to_fn.
(read_count_file): Use the map.
(output_lines): Handle pointer return type of
get_functions_at_location.
From-SVN: r267431
2018-12-27 Martin Liska <mliska@suse.cz>
PR c++/88263
* decl2.c (get_local_tls_init_fn): Add location_t argument and
use it.
(get_tls_init_fn): Call it with location of variable for which
we'll need to create tls_init function.
(handle_tls_init): Likewise.
2018-12-27 Martin Liska <mliska@suse.cz>
PR c++/88263
* g++.dg/gcov/pr88263.C: New test.
From-SVN: r267429
On ARM32 EABI, when the "compact" unwinding model is used, it
does not have standard LSDA and _Unwind_GetLanguageSpecificData
will not return data that is parseable by us. Check this
conditon before calling _Unwind_GetLanguageSpecificData.
Fix ARM32 build.
Reviewed-on: https://go-review.googlesource.com/c/155758
From-SVN: r267428
2018-12-26 Harald Anlauf <anlauf@gmx.de>
PR fortran/85407
* module.c (read_module): Convert assert to fatal error to give
user a sensible error message.
From-SVN: r267422
2018-12-24 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/45513
PR fortran/81509
* check.c: Rename function gfc_check_iand to gfc_check_iand_ieor_ior.
* check.c (boz_args_check): New function. Check I and J not both BOZ.
(gfc_check_dshift,gfc_check_iand_ieor_ior, gfc_check_ishft,
gfc_check_and, gfc_check_merge_bits): Use it.
* check.c (gfc_check_iand_ieor_ior): Force conversion of BOZ to kind
type of other agrument. Remove silly GNU extension.
(gfc_check_ieor, gfc_check_ior): Delete now unused functions.
* intrinsic.c (add_functions): Use gfc_check_iand_ieor_ior. Wrap long
line.
* intrinsic.h: Rename gfc_check_iand to gfc_check_iand_ieor_ior.
Delete prototype for bool gfc_check_ieor and gfc_check_ior
* intrinsic.texi: Update documentation for boz-literal-constant.
2018-12-24 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/45513
PR fortran/81509
* gfortran.dg/graphite/id-26.f03: Fix non-conforming use of IAND.
* gfortran.dg/pr81509_1.f90: New test.
* gfortran.dg/pr81509_2.f90: New test.
From-SVN: r267415
* gimple-fold.c (get_range_strlen_tree): Factored out of
get_range_strlen. Minor comment updates/additions. Assert
argument is not a simple SSA_NAME.
(get_range_strlen): Call get_range_strlen_tree as appropriate.
Minor comment updates/additions.
From-SVN: r267412
* ipa-devirt.c (dump_targets): Cap number of targets printed.
(dump_possible_polymorphic_call_targets): Add verbose parameter.
(ipa_devirt): Use it.
* ipa-utils.h (dump_possible_polymorphic_call_targets): Add verbose
parametrs.
From-SVN: r267400
The PR is about a set of tests that were not executed because of
missing asm support.
However, the assembler can handle the insns now, so the tests are
attempted (but with a missing asm shim they fail).
This adds the shim.
In principle (bugs notwithstanding) Darwin’s x86_64 ABI is supposed
to follow the sysv psABI so we can have essentially a copy of the
Linux one.
2018-12-24 Iain Sandoe <iain@sandoe.co.uk>
PR testsuite/67974
* gcc.target/x86_64/abi/avx/asm-support-darwin.s: New.
From-SVN: r267395
The c-c++-common tests fail (or XPASS depending on which) on
powerpc Darwin because it doesn't currently emit .ident marker.
Since there's no support for .ident in the assembler, we can't
enable the output and therefore these tests should be skipped.
2018-12-24 Iain Sandoe <iain@sandoe.co.uk>
* c-c++-common/ident-0a.c: Skip for powerpc-darwin.
* c-c++-common/ident-0b.c: Likewise.
* c-c++-common/ident-1a.c: Likewise.
* c-c++-common/ident-1b.c: Likewise.
* c-c++-common/ident-2a.c: Likewise.
* c-c++-common/ident-2b.c: Likewise.
From-SVN: r267394
This corrects a long-standing misconfiguration for Darwin.
The assembler supports the “.file” and “.loc” directives, but
the GCC configury was not detecting this because it was
using objdump, which does not exist on most Darwin installations.
We added support for “otool” to GCC and now we can use that to
make the check that’s done with objdump on ELF targets.
2018-12-24 Iain Sandoe <iain@sandoe.co.uk>
* configure.ac (dwarf2_debug_line): Check for the debug_line
section using otool when there’s no objdump available.
* configure: Regenerate.
From-SVN: r267393
2018-12-23 Paul Thomas <pault@gcc.gnu.org>
PR fortran/77703
* resolve.c (get_temp_from_expr): Use the string length of
constant character expressions.
2018-12-23 Paul Thomas <pault@gcc.gnu.org>
PR fortran/77703
* gfortran.dg/ptr_func_assign_5.f08 : New test.
From-SVN: r267379