2017-11-21 Martin Liska <mliska@suse.cz>
Backport from mainline
2017-10-31 Martin Liska <mliska@suse.cz>
PR gcov-profile/82633
* doc/gcov.texi: Document -fkeep-{static,inline}-functions and
their interaction with GCOV infrastructure.
From-SVN: r255010
2017-11-21 Martin Liska <mliska@suse.cz>
Backport from mainline
2017-10-18 Martin Liska <mliska@suse.cz>
PR sanitizer/82545
* asan.c (asan_expand_poison_ifn): Do not put gimple stmt
on an abnormal edge.
2017-11-21 Martin Liska <mliska@suse.cz>
Backport from mainline
2017-10-18 Martin Liska <mliska@suse.cz>
PR sanitizer/82545
* gcc.dg/asan/pr82545.c: New test.
From-SVN: r255008
2017-11-21 Martin Liska <mliska@suse.cz>
Backport from mainline
2017-10-11 Martin Liska <mliska@suse.cz>
* print-rtl.c (print_insn): Move declaration of idbuf
to same scope as name.
From-SVN: r255007
libgo:
Backport from mainline
With the change in the Solaris release model (no more major releases
like Solaris 12 but only minor ones like 11.4), the Solaris 12
references in GCC need to be adapted.
Patch by Rainer Orth.
Reviewed-on: https://go-review.googlesource.com/77490
libgcc:
Backport from mainline
2017-11-14 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* config.host (*-*-solaris2*): Adapt comment for Solaris 12
renaming.
* config/sol2/crtpg.c (__start_crt_compiler): Likewise.
* configure.ac (libgcc_cv_solaris_crts): Likewise.
* configure: Regenerate.
gcc:
Backport from mainline
2017-11-14 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* config.gcc (*-*-solaris2*): Enable default_use_cxa_atexit since
Solaris 11. Update comment.
* configure.ac (gcc_cv_ld_pid): Adapt comment for Solaris 12
renaming.
* config/sol2.h (STARTFILE_SPEC): Likewise.
* configure: Regenerate.
gcc/testsuite:
Backport from mainline
2017-11-14 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* lib/target-supports.exp (check_effective_target_pie): Adapt
comment for Solaris 12 renaming.
* gcc.dg/torture/pr60092.c: Remove *-*-solaris2.11* dg-xfail-run-if.
From-SVN: r254994
With the 32-bit SVR4 ABI we don't have a red zone, so we have to restore
the callee-saved registers before we restore the stack pointer.
The previous fix for this PR failed in two ways, for huge frames: first,
we use a negative offset from r11 in that case, so the (mem:BLK 11) access
does no good; second, sched does not handle accesses to mem:BLK correctly
in this case (does not make dependencies).
This patch fixes it by doing a store to (mem:BLK (scratch)) instead.
This means no unrelated (not to stack) loads/stores can be moved over the
stack restore either, but so be it.
PR target/77687
* config/rs6000/rs6000.md (stack_restore_tie): Store to a scratch
address instead of to r1 and r11.
gcc/testsuite/
PR target/77687
* gcc.target/powerpc/pr77687.c: New testcase.
From-SVN: r254968
2017-11-15 Richard Biener <rguenther@suse.de>
PR tree-optimization/82985
Backport from mainline
2017-08-15 Richard Biener <rguenther@suse.de>
PR tree-optimization/81790
* tree-ssa-sccvn.c (vn_lookup_simplify_result): Handle both
CONSTRUCTORs from simplifying and VN.
* gcc.dg/torture/pr81790.c: New testcase.
* g++.dg/torture/pr82985.C: Likewise.
From-SVN: r254766
Backport from mainline (r253147):
This patch is an attempt to fix the crash reported in PR82155.
When generating a C++ class method for a class that is itself nested in
a class method, dwarf2out_early_global_decl currently leaves the
existing context DIE as it is if it already exists. However, it is
possible that this call happens at a point where this context DIE is
just a declaration that is itself not located in its own context.
From there, if dwarf2out_early_global_decl is not called on any of the
FUNCTION_DECL in the context chain, DIEs will be left badly scoped and
some (such as the nested method) will be removed by the type pruning
machinery. As a consequence, dwarf2out_abstract_function will will
crash when called on the corresponding DECL because it asserts that the
DECL has a DIE.
This patch fixes this crash making dwarf2out_early_global_decl process
context DIEs the same way we process abstract origins for FUNCTION_DECL:
if the corresponding DIE exists but is only a declaration, call
dwarf2out_decl anyway on it so that it is turned into a more complete
DIE and so that it is relocated in the proper context.
Bootstrapped and regtested on x86_64-linux.
gcc/
PR debug/82155
* dwarf2out.c (dwarf2out_early_global_decl): Call dwarf2out_decl
on the FUNCTION_DECL function context if it has a DIE that is a
declaration.
gcc/testsuite/
* g++.dg/pr82155.C: New testcase.
From-SVN: r254761
2017-11-13 Paul Thomas <pault@gcc.gnu.org>
Backport from trunk
PR fortran/82934
* trans-stmt.c (gfc_trans_allocate): Remove the gcc_assert on
null string length for assumed length typespec and set
expr3_esize to NULL_TREE;
2017-11-13 Paul Thomas <pault@gcc.gnu.org>
Backport from trunk
PR fortran/82934
* gfortran.dg/allocate_assumed_charlen_1.f90: New test.
From-SVN: r254709
2017-11-13 Paul Thomas <pault@gcc.gnu.org>
Backport from trunk
PR fortran/78619
* check.c (same_type_check): Introduce a new argument 'assoc'
with default value false. If this is true, use the symbol type
spec of BT_PROCEDURE expressions.
(gfc_check_associated): Set 'assoc' true in the call to
'same_type_check'.
2017-11-13 Paul Thomas <pault@gcc.gnu.org>
Backport from trunk
PR fortran/78619
* gfortran.dg/pr78619.f90: New test.
From-SVN: r254708
* gcc-interface/utils.c (convert) <RECORD_TYPE>: Add comment and do
not fall through to the next case.
<ARRAY_TYPE>: Deal specially with a dereference from another array
type with the same element type.
From-SVN: r254619
Backport from mainline
2017-11-01 Segher Boessenkool <segher@kernel.crashing.org>
PR rtl-optimization/64682
PR rtl-optimization/69567
PR rtl-optimization/69737
PR rtl-optimization/82683
* combine.c (distribute_notes) <REG_DEAD>: If the new I2 sets the same
register mentioned in the note, drop the note, unless it came from I3,
in which case it should go to I3 again.
From-SVN: r254564
PR rtl-optimization/81803
* lra-constraints.c (curr_insn_transform): Also reload the whole
register for a strict subreg no wider than a word if this is for
a WORD_REGISTER_OPERATIONS target.
From-SVN: r254488
2017-11-06 Paul Thomas <pault@gcc.gnu.org>
Backported from trunk
PR fortran/78641
* resolve.c (resolve_ordinary_assign): Do not add the _data
component for class valued array constructors being assigned
to derived type arrays.
* trans-array.c (gfc_trans_array_ctor_element): Take the _data
of class valued elements for assignment to derived type arrays.
2017-11-06 Paul Thomas <pault@gcc.gnu.org>
Backported from trunk
PR fortran/78641
* gfortran.dg/class_66.f90: New test.
From-SVN: r254444
2017-11-06 Paul Thomas <pault@gcc.gnu.org>
PR fortran/69739
* trans-expr.c (gfc_map_intrinsic_function): Return false for
bounds without the DIM argument instead of ICEing.
2017-11-06 Paul Thomas <pault@gcc.gnu.org>
PR fortran/69739
* gfortran.dg/pr69739.f90: New test.
From-SVN: r254442
2017-11-05 Andreas Tobler <andreast@gcc.gnu.org>
Backport from mainline
2017-11-04 Andreas Tobler <andreast@gcc.gnu.org>
PR libgcc/82635
* config/i386/freebsd-unwind.h (MD_FALLBACK_FRAME_STATE_FOR): Use a
sysctl to determine whether we're in a trampoline.
Keep the pattern matching method for systems without
KERN_PROC_SIGTRAMP sysctl.
From-SVN: r254431
2017-11-05 Paul Thomas <pault@gcc.gnu.org>
PR fortran/81447
PR fortran/82783
* resolve.c (resolve_component): There is no need to resolve
the components of a use associated vtype.
(resolve_fl_derived): Unconditionally generate a vtable for any
module derived type, as long as the standard is F2003 or later
and it is not a vtype or a PDT template.
2017-11-05 Paul Thomas <pault@gcc.gnu.org>
PR fortran/81447
* gfortran.dg/class_65.f90: New test.
* gfortran.dg/alloc_comp_basics_1.f90: Increase builtin_free
count from 18 to 21.
* gfortran.dg/allocatable_scalar_9.f90: Increase builtin_free
count from 32 to 54.
* gfortran.dg/auto_dealloc_1.f90: Increase builtin_free
count from 4 to 10.
* gfortran.dg/coarray_lib_realloc_1.f90: Increase builtin_free
count from 3 to 6. Likewise _gfortran_caf_deregister from 2 to
3, builtin_malloc from 1 to 4 and builtin_memcpy|= MEM from
2 to 5.
* gfortran.dg/finalize_28.f90: Increase builtin_free
count from 3 to 6.
* gfortran.dg/move_alloc_15.f90: Increase builtin_free and
builtin_malloc counts from 11 to 14.
* gfortran.dg/typebound_proc_27.f03: Increase builtin_free
count from 7 to 10. Likewise builtin_malloc from 12 to 15.
From-SVN: r254429
2017-11-04 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/82796
* resolve.c (resolve_equivalence): An entity in a common block within
a module cannot appear in an equivalence statement if the entity is
with a pure procedure.
2017-11-04 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/82796
* gfortran.dg/equiv_pure.f90: New test.
From-SVN: r254409
gcc/fortran/ChangeLog:
2017-11-04 Andre Vehreschild <vehre@gcc.gnu.org>
* trans-expr.c (gfc_trans_assignment_1): Character kind conversion may
create a loop variant temporary, too.
* trans-intrinsic.c (conv_caf_send): Treat char arrays as arrays and
not as scalars.
* trans.c (get_array_span): Take the character kind into account when
doing pointer arithmetic.
gcc/testsuite/ChangeLog:
2017-11-04 Andre Vehreschild <vehre@gcc.gnu.org>
* gfortran.dg/coarray/send_char_array_1.f90: New test.
From-SVN: r254408
2017-11-03 Paul Thomas <pault@gcc.gnu.org>
PR fortran/81735
* trans-decl.c (gfc_trans_deferred_vars): Correct case where
'tmp' can be used unititialized.
2017-11-03 Paul Thomas <pault@gcc.gnu.org>
PR fortran/81735
* gfortran.dg/pr81735.f90: New test.
From-SVN: r254389
To fix PR60580 simplify the logic in aarch64_override_options_after_change_1 ().
If the frame pointer is enabled, set it to a special value that behaves similar
to frame pointer omission. If we don't do this all leaf functions will get a
frame pointer even if flag_omit_leaf_frame_pointer is set.
If flag_omit_frame_pointer has this special value, we must force the frame
pointer if not in a leaf function. We also need to force it in a leaf function
if flag_omit_frame_pointer is not set or if LR is used.
Doing this allows both -fomit-frame-pointer and -fomit-leaf-frame-pointer to be
independently set and changed in each function with the expected behaviour.
gcc/
PR middle-end/60580
* config/aarch64/aarch64.c (aarch64_frame_pointer_required)
Check special value of flag_omit_frame_pointer.
(aarch64_can_eliminate): Likewise.
(aarch64_override_options_after_change_1): Simplify handling of
-fomit-frame-pointer and -fomit-leaf-frame-pointer.
From-SVN: r254377
2017-11-01 Paul Thomas <pault@gcc.gnu.org>
PR fortran/80850
* trans_expr.c (gfc_conv_procedure_call): When passing a class
argument to an unlimited polymorphic dummy, it is wrong to cast
the passed expression as unlimited, unless it is unlimited. The
correct way is to assign to each of the fields and set the _len
field to zero.
2017-11-01 Paul Thomas <pault@gcc.gnu.org>
PR fortran/80850
* gfortran.dg/class_64_f90 : New test.
From-SVN: r254299