Paul Thomas [Sat, 29 Dec 2018 18:21:39 +0000 (18:21 +0000)]
re PR fortran/82550 (program using submodules fails to link)
2018-12-29 Paul Thomas <pault@gcc.gnu.org>
PR fortran/82550
* trans_decl.c (gfc_get_symbol_decl): Procedure symbols that
have the 'used_in_submodule' attribute should be processed by
'gfc_get_extern_function_decl'.
2018-12-29 Paul Thomas <pault@gcc.gnu.org>
PR fortran/82550
* gfortran.dg/submodule_30.f08 : New test.
Iain Sandoe [Mon, 24 Dec 2018 12:20:18 +0000 (12:20 +0000)]
fix Darwin target/81685
2018-12-24 Iain Sandoe <iain@sandoe.co.uk>
Backport from mainline
2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
PR target/81685
* config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
DEBUG_RNGLISTS_SECTION) new macros. (DEBUG_PUBNAMES_SECTION,
DEBUG_PUBTYPES_SECTION) update to include GNU variant.
Steven G. Kargl [Sat, 22 Dec 2018 23:23:02 +0000 (23:23 +0000)]
re PR fortran/85798 (ICE in get_array_index, at fortran/data.c:69)
2018-12-22 Steven G . Kargl <kargl@gcc.gnu.org>
PR fortran/85798
* decl.c (gfc_match_data): If a component of a derived type entity
appears in data statement, check that does not have the allocatable
attribute.
2018-12-22 Steven G . Kargl <kargl@gcc.gnu.org>
PR fortran/85798
* gfortran.dg/pr85798.f90: New test.
Uros Bizjak [Fri, 21 Dec 2018 18:11:04 +0000 (19:11 +0100)]
backport: re PR target/88418 (ICE in extract_insn, at recog.c:2305 (error: unrecognizable insn))
Backport from mainline
2018-12-10 Uros Bizjak <ubizjak@gmail.com>
PR target/88418
* config/i386/i386.c (ix86_expand_sse_cmp): For vector modes,
check operand 1 with vector_operand predicate.
(ix86_expand_sse_movcc): For vector modes, check op_true with
vector_operand, not nonimmediate_operand.
testsuite/ChangeLog:
Backport from mainline
2018-12-10 Uros Bizjak <ubizjak@gmail.com>
PR target/88418
* gcc.target/i386/pr88418.c: New test.
Bill Schmidt [Wed, 19 Dec 2018 18:34:25 +0000 (18:34 +0000)]
backport: extend.texi (PowerPC Altivec/VSX Built-in Functions): Describe when a typedef name can be used as the type specifier for a vector type...
2018-12-19 Bill Schmidt <wschmidt@linux.ibm.com>
Backport from mainline
2018-12-18 Bill Schmidt <wschmidt@linux.ibm.com>
* doc/extend.texi (PowerPC Altivec/VSX Built-in Functions):
Describe when a typedef name can be used as the type specifier for
a vector type, and when it cannot.
Andreas Krebbel [Thu, 13 Dec 2018 12:07:58 +0000 (12:07 +0000)]
S/390: Fix zvector vec_double builtin
The (unsigned) long int to double vector conversion instructions
expect 2 immediate parameters. One for the inexact suppression
control and another one for the rounding mode. However, the
vec_double builtin has just the vector source operand. The 2
addtional operands need to be added with an intermediate expander.
The expanders were already there but unfortunately not wired up
correctly to the builtin.
gcc/ChangeLog:
2018-12-13 Andreas Krebbel <krebbel@linux.ibm.com>
Backport from mainline
2018-12-13 Andreas Krebbel <krebbel@linux.ibm.com>
* config/s390/s390-builtins.def (s390_vec_double_s64): Map to
s390_vec_double_s64 instead of s390_vcdgb.
(s390_vec_double_u64): Map to s390_vec_double_u64 instead of
s390_vcdlgb.
gcc/testsuite/ChangeLog:
2018-12-13 Andreas Krebbel <krebbel@linux.ibm.com>
Backport from mainline
2018-12-13 Andreas Krebbel <krebbel@linux.ibm.com>
* gcc.target/s390/zvector/vec-double-1.c: New test.
* gcc.target/s390/zvector/vec-double-2.c: New test.
Peter Bergner [Wed, 12 Dec 2018 17:20:41 +0000 (17:20 +0000)]
backport: re PR target/87496 (ICE in aggregate_value_p at gcc/function.c:2046)
gcc/
Backport from mainline
2018-12-07 Peter Bergner <bergner@linux.ibm.com>
PR target/87496
* config/rs6000/rs6000.c (rs6000_option_override_internal): Disallow
-mabi=ieeelongdouble and -mabi=ibmlongdouble without -mlong-double-128.
Do not error for -mabi=ibmlongdouble and no ISA 2.06 support.
* doc/invoke.texi: Document -mabi=ibmlongdouble and -mabi=ieeelongdouble
require -mlong-double-128.
gcc/testsuite/
Backport from mainline
2018-12-07 Peter Bergner <bergner@linux.ibm.com>
PR target/87496
* gcc.target/powerpc/pr87496-1.c: New test.
* gcc.target/powerpc/pr87496-2.c: New test.
* gcc.target/powerpc/pr87496-3.c: New test.
Steven G. Kargl [Wed, 12 Dec 2018 00:08:12 +0000 (00:08 +0000)]
re PR fortran/88249 (ICE in gfc_resolve_filepos, at fortran/io.c:2853)
2018-12-11 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/88249
* gfortran.h: Update prototype for gfc_resolve_filepos().
* io.c (gfc_resolve_filepos): Check for UNIT number if ERR= is present.
Use passed in locus for error message.
* resolve.c (gfc_resolve_code): Pass locus in gfc_resolve_filepos()
call.
2018-12-11 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/88249
* gfortran.dg/pr88249.f90: New test.
Steven G. Kargl [Mon, 10 Dec 2018 20:03:32 +0000 (20:03 +0000)]
re PR fortran/88269 (ICE in gfc_format_decoder, at fortran/error.c:947)
2018-12-10 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/88269
* io.c (io_constraint): Update macro. If locus line buffer is NULL,
use gfc_current_locus in error messages.
(check_io_constraints): Catch missing IO UNIT in write and read
statements. io_constraint macro is incompatible here.
2018-12-10 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/88269
* gfortran.dg/pr88269.f90: New test.
Janne Blomqvist [Thu, 6 Dec 2018 15:38:25 +0000 (17:38 +0200)]
Initialize backtrace state once
From backtrace.h for backtrace_create_state:
Calling this function allocates resources that can not be freed.
There is no backtrace_free_state function. The state is used to
cache information that is expensive to recompute. Programs are
expected to call this function at most once and to save the return
value for all later calls to backtrace functions.
So instead of calling backtrace_create_state every time we wish to
show a backtrace, do it once and store the result in a static
variable. libbacktrace allows multiple threads to access the state,
so no need to use TLS, but use atomic load/store to access the static
variable.
Regtested on x86_64-pc-linux-gnu.
libgfortran/ChangeLog:
2018-12-06 Janne Blomqvist <jb@gcc.gnu.org>
Backport from trunk
PR libfortran/88137
* runtime/backtrace.c (show_backtrace): Store backtrace state in a
static variable, initialize once.
Richard Biener [Wed, 28 Nov 2018 12:57:58 +0000 (12:57 +0000)]
re PR tree-optimization/79351 (Invalid tree PRE optimization around compound literal)
2018-11-28 Richard Biener <rguenther@suse.de>
PR tree-optimization/79351
* tree-ssa-sccvn.c (vn_reference_lookup_3): For assignments from
empty CONSTRUCTORs ensure the store is at a constant position.
Iain Sandoe [Mon, 26 Nov 2018 19:49:19 +0000 (19:49 +0000)]
darwin - backport r263763 to fix PR81033
2018-11-26 Iain Sandoe <iain@sandoe.co.uk>
Backport from mainline
2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
PR bootstrap/81033
PR target/81733
PR target/52795
* gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
(dwarf2out_switch_text_section): Generate a local label for the second
function sub-section and apply it as the second FDE start label.
* gcc/final.c (final_scan_insn_1): Emit second FDE label after the second
sub-section start.
Jason Merrill [Mon, 26 Nov 2018 15:53:43 +0000 (10:53 -0500)]
PR c++/87075 - ICE with constexpr array initialization.
My patch of 2016-08-26 to avoid calling a trivial default constructor
introduced TARGET_EXPRs initialized with void_node to express trivial
initialization. But when this shows up in a VEC_INIT_EXPR, we weren't
prepared to handle it. Fixed by handling it explicitly in
cxx_eval_vec_init_1.
Andreas Krebbel [Mon, 26 Nov 2018 15:29:27 +0000 (15:29 +0000)]
S/390: Fix flogr RTX.
The flogr instruction uses a 64 bit register pair target operand. In
the RTX we model this as a write to a TImode register. Unfortunately
the RTX's being assigned to the two parts of the target operand were
swapped. This is no problem if in the end the flogr instruction will
be emitted since the instruction still does what the clzdi expander
expects. However, a problem arises when the RTX is used to optimize
CLZ for a constant input operand. Even then it matters only if the
expression couldn't be folded on tree level already.
In the testcase this happened thanks to loop unrolling on RTL level.
The iteration variable is used as an argument to the clz
builtin. Due to the loop unrolling it becomes a constant and after
folding the broken RTX leads to a wrong assumption.
gcc/ChangeLog:
2018-11-26 Andreas Krebbel <krebbel@linux.ibm.com>
Backport from mainline
2018-11-20 Andreas Krebbel <krebbel@linux.ibm.com>
* config/s390/s390.md ("clztidi2"): Swap the RTX's written to the
DImode parts of the target operand.
gcc/testsuite/ChangeLog:
2018-11-26 Andreas Krebbel <krebbel@linux.ibm.com>
Backport from mainline
2018-11-20 Andreas Krebbel <krebbel@linux.ibm.com>
Richard Biener [Mon, 26 Nov 2018 13:31:21 +0000 (13:31 +0000)]
backport: [multiple changes]
2018-11-26 Richard Biener <rguenther@suse.de>
Backport from mainline
2018-10-15 Richard Biener <rguenther@suse.de>
PR middle-end/87610
* tree-ssa-structalias.c (struct vls_data): Add escaped_p member.
(visit_loadstore): When a used restrict tag escaped verify that
the points-to solution of "other" pointers do not include
escaped.
(compute_dependence_clique): If a used restrict tag escaped
communicated that down to visit_loadstore.
* gcc.dg/torture/restrict-6.c: New testcase.
2018-10-25 Richard Biener <rguenther@suse.de>
PR tree-optimization/87665
PR tree-optimization/87745
* tree-vectorizer.h (get_earlier_stmt): Remove.
(get_later_stmt): Pick up UID from the original non-pattern stmt.